فهرست منبع

Merge branch 'develop_yh43' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh43

lilei 11 ماه پیش
والد
کامیت
525c20db0b
21فایلهای تغییر یافته به همراه374 افزوده شده و 258 حذف شده
  1. 2 0
      src/views/productManagement/newProduct/detail.vue
  2. 31 22
      src/views/productManagement/newProduct/list.vue
  3. 7 2
      src/views/productManagement/newProduct/modal.vue
  4. 24 14
      src/views/productManagement/priceChangeRecord/list.vue
  5. 11 4
      src/views/productManagement/productBrand/detailModal.vue
  6. 17 11
      src/views/productManagement/productBrand/editModal.vue
  7. 19 6
      src/views/productManagement/productBrand/list.vue
  8. 10 3
      src/views/productManagement/productCategory/editModal.vue
  9. 6 2
      src/views/productManagement/productCategory/list.vue
  10. 37 27
      src/views/productManagement/productLaunchAudit/list.vue
  11. 7 4
      src/views/productManagement/productLevel/editModal.vue
  12. 18 33
      src/views/productManagement/productLevel/list.vue
  13. 36 26
      src/views/productManagement/productNotOnline/list.vue
  14. 28 20
      src/views/productManagement/productOfflineAudit/list.vue
  15. 7 5
      src/views/productManagement/productSourcePath/chooseImportModal.vue
  16. 8 7
      src/views/productManagement/productSourcePath/importGuideModal.vue
  17. 51 43
      src/views/productManagement/productSourcePath/list.vue
  18. 2 3
      src/views/productManagement/productSourcePath/warrantyInfoModal.vue
  19. 18 11
      src/views/productManagement/productUniversal/editModal.vue
  20. 22 14
      src/views/productManagement/productUniversal/list.vue
  21. 13 1
      src/views/purchasingManagement/purchaseReceipt/edit.vue

+ 2 - 0
src/views/productManagement/newProduct/detail.vue

@@ -49,7 +49,9 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+// 组件
 import imgZoom from 'vue2.0-zoom'
+// 接口
 import { productSnDetail } from '@/api/product.js'
 export default {
   name: 'ViewProduct',

+ 31 - 22
src/views/productManagement/newProduct/list.vue

@@ -1,45 +1,45 @@
 <template>
   <div>
-    <a-card size="small" :bordered="false" class="productInfoList-wrap searchBoxNormal">
+    <a-card size="small" :bordered="false" class="newProductList-wrap searchBoxNormal">
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
-        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-form layout="inline" id="newProductList-form" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="产品编码">
-                <a-input id="productInfoList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
+                <a-input id="newProductList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="产品名称">
-                <a-input id="productInfoList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
+                <a-input id="newProductList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item :label="($route.params.onlineFalg=='1'?'上':'下')+'线时间'">
-                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                <rangeDate id="newProductList-time" ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-item label="产品品牌">
-                  <ProductBrand id="productInfoList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
+                  <ProductBrand id="newProductList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="产品分类">
-                  <productTypeAll placeholder="请选择产品分类" @change="changeProductType" v-model="productType" id="productInfoList-productType"></productTypeAll>
+                  <productTypeAll placeholder="请选择产品分类" @change="changeProductType" v-model="productType" id="newProductList-productType"></productTypeAll>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="原厂编码">
-                  <a-input id="productInfoList-origCode" v-model.trim="queryParam.origCode" allowClear placeholder="请输入原厂编码"/>
+                  <a-input id="newProductList-origCode" v-model.trim="queryParam.origCode" allowClear placeholder="请输入原厂编码"/>
                 </a-form-item>
               </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productInfoList-reset">重置</a-button>
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="newProductList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="newProductList-reset">重置</a-button>
               <a-button
                 style="margin-left: 5px"
                 type="primary"
@@ -47,7 +47,7 @@
                 @click="handleExport"
                 :disabled="disabled"
                 v-if="$hasPermissions('B_productLaunchInfoExoprt')"
-                id="productInfoList-export">导出</a-button>
+                id="newProductList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -87,7 +87,7 @@
               type="link"
               class="button-success"
               @click="handleDetail(record)"
-              id="productInfoList-detail-btn">详情</a-button>
+              id="newProductList-detail-btn">详情</a-button>
           </template>
         </s-table>
       </a-spin>
@@ -96,14 +96,16 @@
 </template>
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { queryNewProductPage, queryOnlinePageList, productLogExportExcel } from '@/api/product'
+import moment from 'moment'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
 import { STable, VSelect } from '@/components'
 import ProductBrand from '@/views/common/productBrand.js'
 import productTypeAll from '@/views/common/productTypeAll.js'
 import rangeDate from '@/views/common/rangeDate.vue'
-import moment from 'moment'
 import getDate from '@/libs/getDate.js'
-import { hdExportExcel } from '@/libs/exportExcel'
+// 接口
+import { queryNewProductPage, queryOnlinePageList, productLogExportExcel } from '@/api/product'
 export default {
   name: 'NewProductList',
   mixins: [commonMixin],
@@ -112,11 +114,13 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
-      tableHeight: 0,
-      productType: [],
-      queryParam: { //  查询条件
-        beginDate: '',
-        endDate: '',
+      tableHeight: 0, // 表格高度
+      disabled: false, //  查询、重置按钮是否可操作
+      productType: [], // 产品分类
+      //  查询条件
+      queryParam: {
+        beginDate: '', // 上下线开始时间
+        endDate: '', // 上下线结束时间
         code: '', //  产品编码
         name: '', //  产品名称
         origCode: '', //  原厂编码
@@ -127,7 +131,7 @@ export default {
         productTypeSn3: '', //  产品三级分类
         enabledFlag: undefined //  状态
       },
-      disabled: false, //  查询、重置按钮是否可操作
+      // 上下线时间查询
       time: [
         moment(getDate.getCurrMonthDays().starttime, 'YYYY-MM-DD'),
         moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
@@ -147,6 +151,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
+        // type=='onlineInfo' 获取上线列表数据  type=='unlineInfo' 获取下线列表数据
         const ajaxName = this.$route.params.type == 'onlineInfo' ? queryOnlinePageList : queryNewProductPage
         if (this.$route.params.type == 'onlineInfo') {
           if (this.queryParam.beginDate || this.queryParam.endDate) {
@@ -163,6 +168,7 @@ export default {
           let data
           if (res.status == 200) {
             data = res.data
+            // 计算表格序号
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
@@ -178,7 +184,7 @@ export default {
     }
   },
   methods: {
-    //  创建时间  change
+    //  上下线时间  change
     dateChange (date) {
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
@@ -195,6 +201,7 @@ export default {
       this.queryParam.productTypeSn3 = ''
       this.queryParam.enabledFlag = undefined
       this.productType = []
+      // 上线产品 上线时间初始化
       if (this.$route.params.type == 'onlineInfo') {
         this.$refs.rangeDate.resetDate(this.time)
         this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
@@ -229,12 +236,14 @@ export default {
         _this.spinning = false
       })
     },
+    // 初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 200

+ 7 - 2
src/views/productManagement/newProduct/modal.vue

@@ -15,7 +15,7 @@
         bordered>
       </s-table>
       <div style="padding-top: 15px;">
-        <a-button @click="viewMore" block type="primary" ghost>查看更多{{ onlineFalg==1?'新品':'下线产品' }}</a-button>
+        <a-button id="newProduct-modal-btn" @click="viewMore" block type="primary" ghost>查看更多{{ onlineFalg==1?'新品':'下线产品' }}</a-button>
       </div>
     </a-spin>
   </div>
@@ -23,7 +23,9 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+// 组件
 import { STable } from '@/components'
+// 接口
 import { queryNewProductPage } from '@/api/product'
 export default {
   name: 'NewProductListModal',
@@ -38,14 +40,16 @@ export default {
   data () {
     return {
       spinning: false,
-      queryParam: {},
+      queryParam: {}, // 查询参数
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.spinning = true
+        // 获取表格数据 无分页
         return queryNewProductPage(Object.assign(parameter, this.queryParam, { onlineFalg: this.onlineFalg })).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
+            // 计算表格序号
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
@@ -75,6 +79,7 @@ export default {
     }
   },
   methods: {
+    // 查看更多
     viewMore () {
       this.$emit('seeMore')
     }

+ 24 - 14
src/views/productManagement/priceChangeRecord/list.vue

@@ -3,11 +3,11 @@
     <a-card size="small" :bordered="false" class="productChangeRecordList-wrap searchBoxNormal">
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
-        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-form layout="inline" id="productChangeRecordList-form" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="变更时间">
-                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                <rangeDate ref="rangeDate" id="productChangeRecordList-time" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -79,7 +79,7 @@
           </template>
           <!-- 变更状态 -->
           <span slot="productStatus" slot-scope="text, record">
-            <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model="record.enabledFlag" @change="changeFlagHandle(text, record)"/>
+            <a-switch checkedChildren="启用" id="productChangeRecordList-enabledFlag" unCheckedChildren="禁用" v-model="record.enabledFlag" @change="changeFlagHandle(text, record)"/>
           </span>
           <!-- 省级价变更后 -->
           <template slot="afterProvincePrice" slot-scope="text, record">
@@ -115,11 +115,13 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import moment from 'moment'
-import getDate from '@/libs/getDate.js'
+// 组件
 import { STable, VSelect } from '@/components'
+import getDate from '@/libs/getDate.js'
 import rangeDate from '@/views/common/rangeDate.vue'
 import ProductBrand from '@/views/common/productBrand.js'
 import ProductType from '@/views/common/productType.js'
+// 接口
 import { productPriceChangeList, productPriceChangeExport, priceChangeEnabled } from '@/api/product'
 export default {
   name: 'PriceChangeRecordList',
@@ -129,8 +131,11 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
-      tableHeight: 0,
-      queryParam: { //  查询条件
+      tableHeight: 0, // 表格高度
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出loading
+      //  查询条件
+      queryParam: {
         beginDate: getDate.getThreeMonthDays().starttime,
         endDate: getDate.getCurrMonthDays().endtime,
         name: '', //  产品名称
@@ -139,23 +144,25 @@ export default {
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '', //  产品三级分类
-        enabledFlag: undefined
+        enabledFlag: undefined// 变更状态
       },
-      productType: [],
-      disabled: false, //  查询、重置按钮是否可操作
+      productType: [], // 产品分类
+      //  变更时间
       time: [
         moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
         moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
-      ], //  变更时间
-      exportLoading: false, // 导出loading
+      ],
+      total: 0, // 数据总条数
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
+        // 获取表格数据 有分页
         return productPriceChangeList(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
+            // 计算表格序号
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
@@ -167,8 +174,7 @@ export default {
           this.spinning = false
           return data
         })
-      },
-      total: 0
+      }
     }
   },
   computed: {
@@ -234,7 +240,7 @@ export default {
     }
   },
   methods: {
-    //  创建时间  change
+    //  变更时间 change
     dateChange (date) {
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
@@ -304,6 +310,7 @@ export default {
         }
       })
     },
+    // 导出配置
     download (data) {
       if (!data) { return }
       const url = window.URL.createObjectURL(new Blob([data]))
@@ -316,12 +323,14 @@ export default {
       document.body.appendChild(link)
       link.click()
     },
+    // 初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 225
@@ -346,6 +355,7 @@ export default {
     }
   },
   watch: {
+    // 展开/关闭 监听表格高度变化
     advanced (newValue, oldValue) {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调

+ 11 - 4
src/views/productManagement/productBrand/detailModal.vue

@@ -14,7 +14,13 @@
         <a-descriptions-item label="品牌分类:">{{ detailsData&&detailsData.brandTypeDictValue || '--' }}</a-descriptions-item>
         <a-descriptions-item label="排序字母:">{{ detailsData&&detailsData.sortChar || '--' }}</a-descriptions-item>
         <a-descriptions-item label="品牌图片:">
-          <img v-if="detailsData&&detailsData.imageUrl" :src="detailsData.imageUrl" title="点击查看大图" class="productPic" @click="getPreview(detailsData.imageUrl)" />
+          <img
+            id="productBrandDetail-imageUrl"
+            v-if="detailsData&&detailsData.imageUrl"
+            :src="detailsData.imageUrl"
+            title="点击查看大图"
+            class="productPic"
+            @click="getPreview(detailsData.imageUrl)" />
           <span v-else>--</span>
         </a-descriptions-item>
         <a-descriptions-item label="品牌介绍:">
@@ -31,6 +37,7 @@
 </template>
 
 <script>
+// 接口
 import { productBrandSnDetail } from '@/api/productBrand'
 export default {
   name: 'ProductBrandDetailModal',
@@ -39,7 +46,7 @@ export default {
       type: Boolean,
       default: false
     },
-    itemSn: {
+    itemSn: {// 当前产品品牌sn
       type: [Number, String],
       default: ''
     }
@@ -48,8 +55,8 @@ export default {
     return {
       isShow: this.openModal, //  是否打开弹框
       detailsData: null, //  详情数据
-      previewVisible: false,
-      previewImage: ''
+      previewVisible: false, // 打开品牌图片预览弹窗
+      previewImage: ''// 当前品牌预览图片
     }
   },
   methods: {

+ 17 - 11
src/views/productManagement/productBrand/editModal.vue

@@ -52,17 +52,19 @@
       </a-spin>
     </div>
     <div class="btn-cont">
-      <a-button id="product-brand-edit-modal-back" @click="isShow = false" style="margin-right: 15px;">取消</a-button>
-      <a-button type="primary" id="product-brand-edit-modal-save" @click="handleSave">保存</a-button>
+      <a-button id="productBrandEdit-back" @click="isShow = false" style="margin-right: 15px;">取消</a-button>
+      <a-button type="primary" id="productBrandEdit-save" @click="handleSave">保存</a-button>
     </div>
   </a-modal>
 </template>
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+// 组件
 import { VSelect, Upload } from '@/components'
 import Editor from '@/components/WEeditor'
 import dataList from '@/libs/commonData'
+// 接口
 import { productBrandSnDetail, productBrandSave } from '@/api/productBrand'
 export default {
   name: 'ProductBrandEditModal',
@@ -73,36 +75,40 @@ export default {
       type: Boolean,
       default: false
     },
-    itemSn: {
+    itemSn: {// 当前产品品牌sn
       type: [Number, String],
       default: ''
     },
-    nowData: {
+    nowData: {// 当前产品品牌信息
       type: Object,
       default: null
     }
   },
   computed: {
+    // 弹框标题
     modalTit () {
       return (this.itemSn ? '编辑' : '新增') + '产品品牌'
     }
   },
   data () {
     return {
-      sortCharList: dataList.sortCharList,
-      isShow: this.openModal, //  是否打开弹框
       spinning: false,
+      sortCharList: dataList.sortCharList, // 排序字符数据
+      isShow: this.openModal, //  是否打开弹框
+      // label 表单 布局设置
       formItemLayout: {
         labelCol: { span: 3 },
         wrapperCol: { span: 19 }
       },
+      // 表单数据
       form: {
         brandName: '', // 品牌名称
-        brandType: undefined,
-        sortChar: undefined,
-        imageUrl: '',
-        brandIntroduce: ''
+        brandType: undefined, // 品牌分类
+        sortChar: undefined, // 排序字母
+        imageUrl: '', // 品牌图片
+        brandIntroduce: ''// 品牌介绍
       },
+      // 表单验证规则
       rules: {
         brandName: [
           { required: true, message: '请输入品牌名称', trigger: 'blur' }
@@ -120,7 +126,7 @@ export default {
     }
   },
   methods: {
-    //  详情
+    //  获取详情数据
     getDetail () {
       productBrandSnDetail({ sn: this.itemSn }).then(res => {
         if (res.status == 200) {

+ 19 - 6
src/views/productManagement/productBrand/list.vue

@@ -3,7 +3,7 @@
     <a-card size="small" :bordered="false" class="productBrandList-wrap searchBoxNormal">
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
-        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-form layout="inline" id="productBrandList-form" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="品牌名称">
@@ -51,7 +51,13 @@
           bordered>
           <!-- 产品图片 -->
           <template slot="imageUrl" slot-scope="text, record">
-            <img :src="record.imageUrl+'?x-oss-process=image/resize,h_30,m_lfit' || ''" width="30" height="30" class="imageUrl" @click="lookPic(record.imageUrl)" />
+            <img
+              id="productBrandList-imageUrl"
+              :src="record.imageUrl+'?x-oss-process=image/resize,h_30,m_lfit' || ''"
+              width="30"
+              height="30"
+              class="imageUrl"
+              @click="lookPic(record.imageUrl)" />
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
@@ -108,10 +114,12 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+// 组件
 import { STable, VSelect } from '@/components'
 import dataList from '@/libs/commonData'
 import productBrandEditModal from './editModal.vue'
 import productBrandDetailModal from './detailModal.vue'
+// 接口
 import { productBrandList, productBrandDel } from '@/api/productBrand'
 export default {
   name: 'ProductBrandList',
@@ -120,14 +128,15 @@ export default {
   data () {
     return {
       spinning: false,
-      sortCharList: dataList.sortCharList,
-      tableHeight: 0,
-      queryParam: { //  查询条件
+      disabled: false, //  查询、重置按钮是否可操作
+      tableHeight: 0, // 表格高度
+      //  查询条件
+      queryParam: {
         brandName: '', //  品牌名称
         brandType: undefined,
         sortChar: undefined
       },
-      disabled: false, //  查询、重置按钮是否可操作
+      sortCharList: dataList.sortCharList, // 排序字母
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -141,10 +150,12 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
+        // 获取表格数据 有分页
         return productBrandList(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
+            // 计算表格序号
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
@@ -219,12 +230,14 @@ export default {
         }
       })
     },
+    // 初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 240

+ 10 - 3
src/views/productManagement/productCategory/editModal.vue

@@ -43,7 +43,9 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+// 组件
 import { STable } from '@/components'
+// 接口
 import { productTypeSave } from '@/api/productType'
 export default {
   name: 'ProductCategoryEditModal',
@@ -54,31 +56,35 @@ export default {
       type: Boolean,
       default: false
     },
-    itemSn: {
+    itemSn: {// 当前分类sn
       type: [Number, String],
       default: ''
     },
-    nowData: {
+    nowData: {// 当前分类数据信息
       type: Object,
       default: null
     }
   },
   computed: {
+    // 弹窗标题
     modalTit () {
       return (this.itemSn ? '编辑' : '新增') + '产品分类'
     }
   },
   data () {
     return {
-      isShow: this.openModal, //  是否打开弹框
       spinning: false,
+      isShow: this.openModal, //  是否打开弹框
+      // 表单布局设置
       formItemLayout: {
         labelCol: { span: 6 },
         wrapperCol: { span: 16 }
       },
+      // 表单数据
       form: {
         productTypeName: '' // 产品分类名称
       },
+      // 表单验证规则
       rules: {
         productTypeName: [
           { required: true, message: '请输入产品分类名称', trigger: 'blur' }
@@ -88,6 +94,7 @@ export default {
     }
   },
   methods: {
+    // 筛选符合格式的产品分类名称
     filterEmpty () {
       let str = this.form.productTypeName
       str = str.replace(/\ +/g, '')

+ 6 - 2
src/views/productManagement/productCategory/list.vue

@@ -61,9 +61,11 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { productTypeQuery, productTypeDel } from '@/api/productType'
+// 组件
 import { STable } from '@/components'
 import productCategoryEditModal from './editModal.vue'
+// 接口
+import { productTypeQuery, productTypeDel } from '@/api/productType'
 export default {
   name: 'ProductCategoryList',
   mixins: [commonMixin],
@@ -71,7 +73,8 @@ export default {
   data () {
     return {
       spinning: false,
-      tableHeight: 0,
+      tableHeight: 0, // 表格高度
+      // label 标签布局
       formItemLayout: {
         labelCol: { span: 6 },
         wrapperCol: { span: 16 }
@@ -87,6 +90,7 @@ export default {
         if (this.tableHeight == 0) {
           this.tableHeight = window.innerHeight - 190
         }
+        // 获取列表数据 无分页
         return productTypeQuery({}).then(res => {
           let data
           if (res.status == 200) {

+ 37 - 27
src/views/productManagement/productLaunchAudit/list.vue

@@ -3,7 +3,7 @@
     <a-card size="small" :bordered="false" class="searchBoxNormal">
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
-        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-form layout="inline" id="productLaunchAuditList-form" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="5" :sm="24">
               <a-form-item label="产品名称">
@@ -17,7 +17,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="提交时间">
-                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                <rangeDate ref="rangeDate" id="productLaunchAuditList-rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="4" :sm="24" v-if="queryParam.bizState == 'PASS'">
@@ -36,6 +36,7 @@
     <!-- 状态 -->
     <div style="background-color: #fff;">
       <v-select
+        id="productLaunchAuditList-bizState"
         v-model="queryParam.bizState"
         ref="state"
         showType="tabs"
@@ -47,7 +48,7 @@
       <a-spin :spinning="spinning" tip="Loading...">
         <!-- 列表 -->
         <div v-if="$hasPermissions('B_productLaunchAudit_batchAudit')&&queryParam.bizState == 'WAIT'">
-          <a-button type="primary" ghost id="productLaunchAudit-export" :loading="loading" @click="handleBatchAudit">批量审核</a-button>
+          <a-button type="primary" ghost id="productLaunchAudit-batchAudit" :loading="loading" @click="handleBatchAudit">批量审核</a-button>
           <span style="margin-left: 10px">
             <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
           </span>
@@ -99,9 +100,11 @@
 </template>
 
 <script>
-import rangeDate from '@/views/common/rangeDate.vue'
 import { commonMixin } from '@/utils/mixin'
+// 组件
+import rangeDate from '@/views/common/rangeDate.vue'
 import { STable, VSelect } from '@/components'
+// 接口
 import { productLogList, productLogAuditBatch, productLogAudit, updateShowFlag } from '@/api/product'
 export default {
   name: 'ProductLaunchAuditList',
@@ -110,27 +113,30 @@ export default {
   data () {
     return {
       spinning: false,
-      time: [],
-      queryParam: { //  查询条件
-        beginDate: '',
-        endDate: '',
+      time: [], // 提交时间
+      tableHeight: 0, // 表格高度
+      disabled: false, //  查询、重置按钮是否可操作
+      loading: false, // 表格加载状态
+      //  查询条件
+      queryParam: {
+        beginDate: '', // 提交开始时间
+        endDate: '', // 提交结束时间
         name: '', //  名称
         code: '', //  编码
         bizType: 'ONLINE', // 上线
         bizState: 'WAIT', //  状态
         newProductFlag: undefined// 是否新品
       },
-      tableHeight: 0,
-      disabled: false, //  查询、重置按钮是否可操作
-      loading: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
+        // 获取表格数据
         return productLogList(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
+            // 计算表格序号
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
@@ -139,11 +145,11 @@ export default {
             this.disabled = false
           }
           this.spinning = false
-          this.setTableH()
+          this.setTableH()// 计算表格高度
           return data
         })
       },
-      rowSelectionInfo: null
+      rowSelectionInfo: null// 选中列表数据
     }
   },
   computed: {
@@ -169,7 +175,7 @@ export default {
     }
   },
   methods: {
-    //  时间  change
+    //  提交时间  change
     dateChange (date) {
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
@@ -190,19 +196,6 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 单个审核
-    singAudit (row, state) {
-      const _this = this
-      _this.spinning = true
-      productLogAudit({ productLogSn: row.productLogSn, 'bizState': state }).then(res => {
-        if (res.status == 200) {
-          _this.$message.success(res.message)
-          _this.$refs.table.refresh()
-          _this.spinning = false
-        } else {
-          _this.spinning = false
-        }
-      })
-    },
     handleAudit (row) {
       const _this = this
       const modal = this.$confirm({
@@ -223,6 +216,20 @@ export default {
         }
       })
     },
+    // 单个审核 审核通过  审核不通过
+    singAudit (row, state) {
+      const _this = this
+      _this.spinning = true
+      productLogAudit({ productLogSn: row.productLogSn, 'bizState': state }).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$refs.table.refresh()
+          _this.spinning = false
+        } else {
+          _this.spinning = false
+        }
+      })
+    },
     // 批量审核
     batchAudit (state) {
       const _this = this
@@ -244,6 +251,7 @@ export default {
         }
       })
     },
+    // 批量审核 先判断是否有勾选数据再审核
     handleBatchAudit () {
       const _this = this
       if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
@@ -283,6 +291,7 @@ export default {
         this.spinning = false
       })
     },
+    // 初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -291,6 +300,7 @@ export default {
       this.rowSelectionInfo = null
       this.$refs.table.clearTable()
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - (this.queryParam.bizState == 'WAIT' ? 280 : 250)

+ 7 - 4
src/views/productManagement/productLevel/editModal.vue

@@ -39,7 +39,9 @@
 </template>
 
 <script>
+// 组件
 import { VSelect } from '@/components'
+// 接口
 import { productLevelSave } from '@/api/product'
 export default {
   name: 'ProductLevelEditModal',
@@ -49,11 +51,11 @@ export default {
       type: Boolean,
       default: false
     },
-    itemId: {
+    itemId: {// 当前产品级别id
       type: [Number, String],
       default: ''
     },
-    nowData: {
+    nowData: {// 当前产品级别信息
       type: Object,
       default: () => {
         return {}
@@ -62,14 +64,15 @@ export default {
   },
   data () {
     return {
-      isShow: this.openModal, //  是否打开弹框
       spinning: false,
+      isShow: this.openModal, //  是否打开弹框
+      // label 标签布局
       formItemLayout: {
         labelCol: { span: 4 },
         wrapperCol: { span: 16 }
       },
       form: {
-        level: undefined
+        level: undefined// 产品级别
       },
       rules: {
         level: [

+ 18 - 33
src/views/productManagement/productLevel/list.vue

@@ -3,7 +3,7 @@
     <a-card size="small" :bordered="false" class="productLevelList-wrap searchBoxNormal">
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
-        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-form layout="inline" id="productLevelList-form" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="产品名称">
@@ -16,9 +16,9 @@
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="产品分类">
+              <a-form-item label="产品分类">
                 <ProductType id="productLevelList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
-              </a-form-model-item>
+              </a-form-item>
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
@@ -44,11 +44,6 @@
         </a-form>
       </div>
     </a-card>
-    <!-- 操作按钮 -->
-    <!-- <div class="table-operator" style="margin-bottom: 10px;">
-      <a-button id="productLevelList-import" type="primary" @click="handleImport">导入</a-button>
-      <a-button style="margin-left: 5px" id="productLevelList-export" type="danger" @click="handleExport" :loading="exportLoading">导出</a-button>
-    </div> -->
     <!-- 列表 -->
     <a-card size="small" :bordered="false">
       <s-table
@@ -81,13 +76,7 @@
         </template>
       </s-table>
       <!-- 编辑价格 -->
-      <product-level-edit-modal
-        v-drag
-        :openModal="openModal"
-        :itemId="itemId"
-        :nowData="nowData"
-        @close="closeModal"
-        @ok="$refs.table.refresh()" />
+      <product-level-edit-modal v-drag :openModal="openModal" :itemId="itemId" :nowData="nowData" @close="closeModal" @ok="$refs.table.refresh()" />
     </a-card>
   </div>
 </template>
@@ -95,10 +84,12 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import moment from 'moment'
+//组件
 import { STable, VSelect } from '@/components'
 import productLevelEditModal from './editModal.vue'
 import ProductBrand from '@/views/common/productBrand.js'
 import ProductType from '@/views/common/productType.js'
+//接口
 import { productLevelList } from '@/api/product'
 export default {
   name: 'ProductLevelList',
@@ -107,19 +98,20 @@ export default {
   data () {
     return {
       advanced: true, // 高级搜索 展开/关闭
-      tableHeight: 0,
-      queryParam: { //  查询条件
+      tableHeight: 0,//表格高度
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出loading
+      //  查询条件
+      queryParam: { 
         name: '', //  产品名称
         queryWord: '', // 产品编码/原厂编码
         productBrandSn: undefined, //  产品品牌
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '', //  产品三级分类
-        level: undefined
+        level: undefined //产品级别
       },
-      productType: [],
-      disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false, // 导出loading
+      productType: [],//产品分类
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '产品名称', dataIndex: 'name', align: 'left', width: '25%', ellipsis: true, customRender: function (text) { return text || '--' } },
@@ -158,7 +150,7 @@ export default {
       itemId: '', //  当前产品id
       productBrandList: [], //  品牌下拉数据
       productTypeList: [], //  分类下拉数据
-      nowData: null
+      nowData: null //当前行数据
     }
   },
   methods: {
@@ -192,17 +184,7 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    // 导入
-    handleImport () {},
-    //  导出
-    handleExport () {
-      const params = this.queryParam
-      this.exportLoading = true
-      // customerBundleExportDelay(params).then(res => {
-      //   this.exportLoading = false
-      //   this.download(res)
-      // })
-    },
+    //导出配置
     download (data) {
       if (!data) { return }
       const url = window.URL.createObjectURL(new Blob([data]))
@@ -215,18 +197,21 @@ export default {
       document.body.appendChild(link)
       link.click()
     },
+    //初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
     },
+    //计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 200
     }
   },
   watch: {
+    //展开关闭 监听表格高度变化
     advanced (newValue, oldValue) {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调

+ 36 - 26
src/views/productManagement/productNotOnline/list.vue

@@ -1,50 +1,50 @@
 <template>
   <div>
-    <a-card size="small" :bordered="false" class="productPricingList-wrap searchBoxNormal">
+    <a-card size="small" :bordered="false" class="productNotOnline-wrap searchBoxNormal">
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="searchForm">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="产品名称">
-                <a-input id="productPricingList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
+                <a-input id="productNotOnline-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="产品编码/原厂编码">
-                <a-input id="productPricingList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
+                <a-input id="productNotOnline-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="品牌">
-                <ProductBrand id="productPricingList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
+                <ProductBrand id="productNotOnline-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="产品分类">
-                  <ProductType id="productPricingList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
-                </a-form-model-item>
+                <a-form-item label="产品分类">
+                  <ProductType id="productNotOnline-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
+                </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="定价时间">
-                  <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                  <rangeDate ref="rangeDate" id="productNotOnline-rangeDate" :value="time" @change="dateChange" />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="定价状态">
-                  <v-select code="PRICING_STATUS" id="productPricingList-pricingState" v-model="queryParam.pricingState" allowClear placeholder="请选择定价状态"></v-select>
+                  <v-select code="PRICING_STATUS" id="productNotOnline-pricingState" v-model="queryParam.pricingState" allowClear placeholder="请选择定价状态"></v-select>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="产品状态">
-                  <v-select code="PRODUCT_STATUS" id="productInfoList-state" v-model="queryParam.state" allowClear placeholder="请选择产品状态"></v-select>
+                  <v-select code="PRODUCT_STATUS" id="productNotOnline-state" v-model="queryParam.state" allowClear placeholder="请选择产品状态"></v-select>
                 </a-form-item>
               </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-              <a-button type="primary" @click="searchForm" :disabled="disabled" id="productPricingList-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productPricingList-reset">重置</a-button>
+              <a-button type="primary" @click="searchForm" :disabled="disabled" id="productNotOnline-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productNotOnline-reset">重置</a-button>
               <a-button
                 style="margin-left: 5px"
                 type="primary"
@@ -52,8 +52,8 @@
                 @click="handleExport"
                 :disabled="disabled"
                 v-if="$hasPermissions('M_productOnlineExport')"
-                id="productInfoList-export">导出</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
+                id="productNotOnline-export">导出</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px" id="productNotOnline-advanced">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
               </a>
@@ -66,7 +66,7 @@
       <a-spin :spinning="spinning" tip="Loading...">
         <!-- 操作按钮 -->
         <div class="table-operator" style="text-align:right;">
-          <a-checkbox v-model="zeroQtyFlag" id="inventoryQueryList-zeroQtyFlag" @change="handleChangeQty">仅显示有库存</a-checkbox>
+          <a-checkbox v-model="zeroQtyFlag" id="productNotOnline-zeroQtyFlag" @change="handleChangeQty">仅显示有库存</a-checkbox>
         </div>
         <!-- 列表 -->
         <s-table
@@ -94,12 +94,14 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+import { exportExcel } from '@/libs/JGPrint.js'
+// 组件
 import rangeDate from '@/views/common/rangeDate.vue'
 import { STable, VSelect } from '@/components'
-import { exportExcel } from '@/libs/JGPrint.js'
-import { queryOnlinePage, excelOnlineList } from '@/api/product'
 import ProductType from '@/views/common/productType.js'
 import ProductBrand from '@/views/common/productBrand.js'
+// 接口
+import { queryOnlinePage, excelOnlineList } from '@/api/product'
 export default {
   name: 'ProductNotOnlineList',
   mixins: [commonMixin],
@@ -108,9 +110,11 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
-      tableHeight: 0,
-      time: [],
-      queryParam: { //  查询条件
+      disabled: false, //  查询、重置按钮是否可操作
+      tableHeight: 0, // 表格高度
+      time: [], // 定价时间
+      //  查询条件
+      queryParam: {
         name: '', //  产品名称
         queryWord: '', // 产品编码/原厂编码
         productBrandSn: undefined, //  产品品牌
@@ -118,22 +122,23 @@ export default {
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '', //  产品三级分类
         pricingState: undefined, //  定价状态
-        pricingTimeBegin: undefined, // 定价时间
-        pricingTimeEnd: undefined,
+        pricingTimeBegin: undefined, // 定价开始时间
+        pricingTimeEnd: undefined, // 定价结束时间
         state: undefined, // 产品状态
-        stockFlag: undefined
+        stockFlag: undefined// 仅显示有库存 1是 0否
       },
-      zeroQtyFlag: false,
-      productType: [],
-      disabled: false, //  查询、重置按钮是否可操作
+      zeroQtyFlag: false, // 仅显示有库存 true是 false否
+      productType: [], // 产品分类
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
+        // 获取表格数据 有分页
         return queryOnlinePage(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
+            // 计算表格序号
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
@@ -192,6 +197,7 @@ export default {
       this.queryParam.pricingTimeBegin = date[0]
       this.queryParam.pricingTimeEnd = date[1]
     },
+    // 仅显示有库存
     handleChangeQty (e) {
       this.zeroQtyFlag = e.target.checked
       this.queryParam.stockFlag = e.target.checked ? '1' : undefined
@@ -218,6 +224,7 @@ export default {
       this.$refs.table.clearSelected() // 清空表格选中项
       this.$refs.table.refresh(true)
     },
+    // 查询
     searchForm () {
       this.$refs.table.clearSelected() // 清空表格选中项
       this.$refs.table.refresh(true)
@@ -239,18 +246,21 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
+    // 初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 226
     }
   },
   watch: {
+    // 展开/关闭 监听表格高度变化
     advanced (newValue, oldValue) {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调

+ 28 - 20
src/views/productManagement/productOfflineAudit/list.vue

@@ -3,7 +3,7 @@
     <a-card size="small" :bordered="false" class="searchBoxNormal">
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
-        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-form layout="inline" id="productOfflineAuditList-form" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="产品名称">
@@ -39,14 +39,14 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="提交时间">
-                  <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                  <rangeDate ref="rangeDate" id="productOfflineAuditList-rangeDate" :value="time" @change="dateChange" />
                 </a-form-item>
               </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productOfflineAuditList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productOfflineAuditList-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
+              <a @click="advanced=!advanced" style="margin-left: 5px" id="productOfflineAuditList-advanced">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
               </a>
@@ -58,6 +58,7 @@
     <!-- 状态 -->
     <div style="background-color: #fff;">
       <v-select
+        id="productOfflineAuditList-bizState"
         v-model="queryParam.bizState"
         ref="state"
         showType="tabs"
@@ -69,7 +70,7 @@
     <a-card size="small" :bordered="false">
       <a-spin :spinning="spinning" tip="Loading...">
         <div style="margin-bottom: 10px" v-if="$hasPermissions('B_productOfflineAudit_batchAudit')&&queryParam.bizState == 'WAIT'" >
-          <a-button type="primary" ghost id="productOfflineAudit-export" :loading="loading" @click="handleBatchAudit">批量审核</a-button>
+          <a-button type="primary" ghost id="productOfflineAuditList-export" :loading="loading" @click="handleBatchAudit">批量审核</a-button>
           <span style="margin-left: 10px">
             <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
           </span>
@@ -113,11 +114,13 @@
 </template>
 
 <script>
-import rangeDate from '@/views/common/rangeDate.vue'
 import { commonMixin } from '@/utils/mixin'
+// 组件
+import rangeDate from '@/views/common/rangeDate.vue'
 import { STable, VSelect } from '@/components'
 import ProductBrand from '@/views/common/productBrand.js'
 import productTypeAll from '@/views/common/productTypeAll.js'
+// 组件
 import { productLogList, productLogAudit, productLogAuditBatch } from '@/api/product'
 export default {
   name: 'ProductOfflineAuditList',
@@ -127,13 +130,16 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
-      tableHeight: 0,
-      time: [],
-      queryParam: { //  查询条件
-        beginDate: '',
-        endDate: '',
+      tableHeight: 0, // 表格高度
+      disabled: false, //  查询、重置按钮是否可操作
+      loading: false, // 表格加载状态
+      time: [], // 提交时间
+      //  查询参数
+      queryParam: {
+        beginDate: '', // 提交开始时间
+        endDate: '', // 提交结束时间
         name: '', //  产品名称
-        queryWord: '',
+        queryWord: '', // 产品编码/通用编码
         productBrandSn: undefined, //  产品品牌
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
@@ -142,13 +148,12 @@ export default {
         bizType: 'OFFLINE', // 下线
         bizState: 'WAIT' //  状态
       },
-      productType: [],
-      disabled: false, //  查询、重置按钮是否可操作
-      loading: false,
+      productType: [], // 产品分类
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
+        // 获取列表数据  有分页
         return productLogList(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {
@@ -156,13 +161,12 @@ export default {
             this.disabled = false
           }
           this.spinning = false
+          // 计算表格高度
           this.setTableH()
           return data
         })
       },
-      productBrandList: [], //  品牌下拉数据
-      productTypeList: [], //  分类下拉数据
-      rowSelectionInfo: null
+      rowSelectionInfo: null// 表格选中数据
     }
   },
   computed: {
@@ -188,7 +192,7 @@ export default {
     }
   },
   methods: {
-    //  时间  change
+    //   提交时间  change
     dateChange (date) {
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
@@ -213,7 +217,7 @@ export default {
       this.productType = []
       this.$refs.table.refresh(true)
     },
-    // 单个审核
+    // 单个审核接口
     singAudit (row, state) {
       const _this = this
       _this.spinning = true
@@ -227,6 +231,7 @@ export default {
         }
       })
     },
+    // 单个审核弹窗提示
     handleAudit (row) {
       const _this = this
       const modal = this.$confirm({
@@ -268,7 +273,7 @@ export default {
         }
       })
     },
-    // 批量审核
+    // 批量审核弹窗提示
     handleBatchAudit () {
       const _this = this
       if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
@@ -299,6 +304,7 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
+    // 初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -307,12 +313,14 @@ export default {
       this.rowSelectionInfo = null
       this.$refs.table.clearTable()
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - (this.queryParam.bizState == 'WAIT' ? 283 : 250)
     }
   },
   watch: {
+    // 展开/关闭  监听表格高度变化
     advanced (newValue, oldValue) {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调

+ 7 - 5
src/views/productManagement/productSourcePath/chooseImportModal.vue

@@ -82,6 +82,7 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { hdExportExcel } from '@/libs/exportExcel'
+// 接口
 import { codeExportImportError } from '@/api/reportData'
 export default {
   name: 'ChooseImportModal',
@@ -91,7 +92,7 @@ export default {
       type: Boolean,
       default: false
     },
-    paramsData: {
+    paramsData: {// 导入数据
       type: Object,
       default: () => {
         return {}
@@ -108,7 +109,7 @@ export default {
         { title: '业务单号', dataIndex: 'bizCode', width: '21%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '工厂出库单号', dataIndex: 'factoryOutNo', width: '26%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
-      loadData: [],
+      loadData: [], // 可导入信息
       nowUnColumns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '产品编码', dataIndex: 'productCode', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -117,9 +118,9 @@ export default {
         { title: '工厂出库单号', dataIndex: 'factoryOutNo', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '备注', dataIndex: 'errorDesc', width: '27%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
-      unLoadData: [],
-      loading: false,
-      countData: []
+      unLoadData: [], // 不可导入信息
+      loading: false, // 表格加载状态
+      countData: []// 导入条数统计
     }
   },
   methods: {
@@ -156,6 +157,7 @@ export default {
         this.countData = mergedObjects
       }
     },
+    // 获取 重复导入数据 有重复true  没有返回false
     compareObjects (obj1, obj2) {
       return Object.keys(obj1).every(key => obj1[key] === obj2[key])
     },

+ 8 - 7
src/views/productManagement/productSourcePath/importGuideModal.vue

@@ -21,7 +21,7 @@
             <li>4) 业务单号需是系统中已审核通过的销售单和调拨单</li>
             <li>5) “工厂出库单号”非必填,可重复,可为空</li>
             <li>
-              <a :href="filePath" style="margin: 5px 0 0;display: block;">
+              <a id="importGuide-download" :href="filePath" style="margin: 5px 0 0;display: block;">
                 <a-icon type="download" style="padding-right: 5px;" />下载导入模板
               </a>
             </li>
@@ -70,6 +70,7 @@
 </template>
 
 <script>
+// 组件
 import ChooseImportModal from './chooseImportModal.vue'
 import { Upload } from '@/components'
 export default {
@@ -88,14 +89,14 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
-      openImportModal: false, //  导入
-      attachAction: process.env.VUE_APP_API_BASE_URL + '/report/tracecode/importParse',
-      paramsData: null,
-      uploadParams: {
+      openImportModal: false, //  下一步  打开导入详情预览弹窗
+      attachAction: process.env.VUE_APP_API_BASE_URL + '/report/tracecode/importParse', // 上传地址
+      paramsData: null, // 导入数据
+      uploadParams: {// 上传数据
         savePathType: 'local'
       },
-      exportLoading: false,
-      filePath: location.protocol + '//' + location.host + '/templ/唯一码导入模板.xlsx'
+      exportLoading: false, // 导出按钮加载状态
+      filePath: location.protocol + '//' + location.host + '/templ/唯一码导入模板.xlsx'// 下载模板地址
     }
   },
   methods: {

+ 51 - 43
src/views/productManagement/productSourcePath/list.vue

@@ -1,10 +1,10 @@
 <template>
   <div>
-    <a-card size="small" :bordered="false" class="tireSalesReportList-wrap searchBox">
+    <a-card size="small" :bordered="false" class="productSourceList-wrap searchBox">
       <!-- 搜索条件 -->
       <div class="table-page-search-wrapper" ref="tableSearch">
-        <a-form-model
-          id="tireSalesReportList-form"
+        <a-form
+          id="productSourceList-form"
           ref="ruleForm"
           class="form-model-con"
           layout="inline"
@@ -12,9 +12,9 @@
           @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="审核时间">
-                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
-              </a-form-model-item>
+              <a-form-item label="审核时间">
+                <rangeDate ref="rangeDate" id="productSourceList-time" :value="time" @change="dateChange" />
+              </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="业务单号">
@@ -45,8 +45,8 @@
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="单据类型">
-                  <a-select @change="handleBizStatus" v-model="queryParam.bizStatus" placeholder="请选择单据类型" allowClear>
+                <a-form-item label="单据类型">
+                  <a-select @change="handleBizStatus" id="productSourceList-bizStatus" v-model="queryParam.bizStatus" placeholder="请选择单据类型" allowClear>
                     <a-select-option value="XS">
                       销售单
                     </a-select-option>
@@ -54,7 +54,7 @@
                       调拨单
                     </a-select-option>
                   </a-select>
-                </a-form-model-item>
+                </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="产品名称">
@@ -66,24 +66,17 @@
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="客户名称">
+                <a-form-item label="客户名称">
                   <a-input
                     id="productSourceList-buyerName"
                     v-model.trim="queryParam.buyerName"
                     allowClear
                     placeholder="请输入客户名称" />
-                </a-form-model-item>
+                </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="质保状态">
-                  <!-- <v-select
-                    v-model="queryParam.dealerLevel"
-                    ref="dealerLevel"
-                    id="productSourceList-dealerLevel"
-                    code="DEALER_LEVEL"
-                    placeholder="请选择质保状态"
-                    allowClear></v-select> -->
-                  <a-select v-model="queryParam.warrantyState" placeholder="请选择质保状态" allowClear>
+                <a-form-item label="质保状态">
+                  <a-select v-model="queryParam.warrantyState" id="productSourceList-warrantyState" placeholder="请选择质保状态" allowClear>
                     <a-select-option value="NOTSTART">
                       未开始
                     </a-select-option>
@@ -94,7 +87,7 @@
                       已过期
                     </a-select-option>
                   </a-select>
-                </a-form-model-item>
+                </a-form-item>
               </a-col>
             </template>
             <a-col :md="24" :sm="24" style="text-align: center;">
@@ -118,14 +111,14 @@
                 :loading="exportLoading"
                 v-if="$hasPermissions('B_productSourceExport')"
                 id="productSourceList-export">导出</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
+              <a @click="advanced=!advanced" style="margin-left: 5px" id="productSourceList-advanced">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'" />
               </a>
             </a-col>
           </a-row>
-        </a-form-model>
-      </div>
+          </a-form-model>
+        </a-form></div>
     </a-card>
     <a-card size="small" :bordered="false">
       <a-spin :spinning="spinning" tip="Loading...">
@@ -133,7 +126,7 @@
         <div style="display:flex;align-items:center;margin-bottom:10px;">
           <a-button
             type="primary"
-            id="outboundOrder-export"
+            id="productSourceList-import-btn"
             :loading="loading"
             v-if="$hasPermissions('B_productSourceImport')"
             @click="openGuideModal = true">导入</a-button>
@@ -163,7 +156,13 @@
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button v-if="$hasPermissions('B_productSourceSeeInfo')&&record.warrantyState!='NOTSTART'" size="small" type="link" class="button-warning" @click="handleInfoModal(record)">质保信息</a-button>
+            <a-button
+              id="productSourceList-info"
+              v-if="$hasPermissions('B_productSourceSeeInfo')&&record.warrantyState!='NOTSTART'"
+              size="small"
+              type="link"
+              class="button-warning"
+              @click="handleInfoModal(record)">质保信息</a-button>
             <span v-else>--</span>
           </template>
         </s-table>
@@ -178,12 +177,14 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
 import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import warrantyInfoModal from './warrantyInfoModal.vue'
 import importGuideModal from './importGuideModal.vue'
-import { hdExportExcel } from '@/libs/exportExcel'
+// 接口
 import { traceCodeInsertBatch, traceCodeQueryCount, traceCodeList, excelOnlineList } from '@/api/reportData'
 export default {
   name: 'ProductSourceList',
@@ -191,24 +192,27 @@ export default {
   components: { STable, VSelect, rangeDate, warrantyInfoModal, importGuideModal },
   data () {
     return {
-      loading: false,
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
-      tableHeight: 0,
+      tableHeight: 0, // 表格高度
+      loading: false, // 表格加载状态
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出按钮加载状态
+      // 审核时间
       time: [
         getDate.getThreeMonthDays().starttime,
         getDate.getCurrMonthDays().endtime
       ],
       queryParam: { //  查询条件
-        beginDate: getDate.getThreeMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
-        productCode: '',
-        productName: '',
-        bizCode: undefined,
-        traceCode: undefined,
-        buyerName: undefined,
-        bizStatus: undefined,
-        warrantyState: undefined
+        beginDate: getDate.getThreeMonthDays().starttime, // 审核开始时间
+        endDate: getDate.getCurrMonthDays().endtime, // 审核结束时间
+        productCode: '', // 产品编码
+        productName: '', // 产品名称
+        bizCode: undefined, // 业务单号
+        traceCode: undefined, // 唯一码
+        buyerName: undefined, // 客户名称
+        bizStatus: undefined, // 单据类型
+        warrantyState: undefined// 质保状态
       },
       openInfoModal: false, // 质保信息弹窗
       columns: [{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
@@ -223,18 +227,19 @@ export default {
         { title: '质保时间', scopedSlots: { customRender: 'warrantyTime' }, width: '10%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
       ],
-      disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
         const params = Object.assign(parameter, this.queryParam)
+        // 获取表格数据 有分页
         return traceCodeList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
+            // 获取统计数据
             this.getCount(params)
+            // 计算表格序号
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
@@ -245,13 +250,14 @@ export default {
           return data
         })
       },
-      totalData: null,
+      totalData: null, // 统计数据
       openGuideModal: false, // 导入弹窗
-      warrantyInfoId: null,
-      productCodeInfo: null
+      warrantyInfoId: null, // 质保信息id
+      productCodeInfo: null// 当前行产品编码
     }
   },
   watch: {
+    // 展开/关闭 监听表格高度变化
     advanced (newValue, oldValue) {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -338,12 +344,14 @@ export default {
         _this.spinning = false
       })
     },
+    // 初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 247

+ 2 - 3
src/views/productManagement/productSourcePath/warrantyInfoModal.vue

@@ -36,9 +36,8 @@
               </a-descriptions-item>
             </a-descriptions>
           </div>
-          <div class="imgBox">
+          <div class="imgBox" v-if="detailsData&&detailsData.productMsg">
             <img
-              v-if="detailsData.productMsg"
               style="margin-bottom:6px;object-fit: cover;border:1px dashed #ccc;"
               :src="detailsData.productMsg"
               alt="图片走丢啦"
@@ -102,7 +101,7 @@
     </a-spin>
     <!-- 查看图片 -->
     <a-modal v-model="openImgModal" :title="null" :footer="null" :width="600" centered>
-      <div class="viewImg">
+      <div class="viewImg" v-if="detailsData&&detailsData.productMsg">
         <img
           :src="detailsData.productMsg"
           alt="图片走丢啦"

+ 18 - 11
src/views/productManagement/productUniversal/editModal.vue

@@ -19,13 +19,13 @@
           :wrapper-col="formItemLayout.wrapperCol"
         >
           <a-form-model-item label="产品编码" prop="productSn">
-            <productCodeList ref="productCodeList" @change="productCodeChange" />
+            <productCodeList id="productUniversalEdit-productSn" ref="productCodeList" @change="productCodeChange" />
           </a-form-model-item>
           <a-form-model-item label="产品名称">
             {{ productName || '--' }}
           </a-form-model-item>
           <a-form-model-item label="通用产品编码" prop="productCommonSn">
-            <productCodeList ref="productUniversalCodeList" @change="productUniversalCodeChange" />
+            <productCodeList id="productUniversalEdit-productCommonSn" ref="productUniversalCodeList" @change="productUniversalCodeChange" />
           </a-form-model-item>
           <a-form-model-item label="通用产品名称">
             {{ productCommonName || '--' }}
@@ -41,8 +41,10 @@
 </template>
 
 <script>
+// 组件
 import { VSelect } from '@/components'
 import productCodeList from '@/views/common/productCodeList.vue'
+// 接口
 import { productUniversalCodeSave, productUniversalCodeDetail } from '@/api/productUniversalCode'
 export default {
   name: 'ProductLevelEditModal',
@@ -52,30 +54,33 @@ export default {
       type: Boolean,
       default: false
     },
-    itemId: {
+    itemId: {// 通用产品id
       type: [Number, String],
       default: ''
     }
   },
   computed: {
+    // 弹窗标题
     modalTit () {
       return (this.itemId ? '编辑' : '新增') + '通用产品'
     }
   },
   data () {
     return {
-      isShow: this.openModal, //  是否打开弹框
       spinning: false,
+      isShow: this.openModal, //  是否打开弹框
+      // 表单布局
       formItemLayout: {
         labelCol: { span: 4 },
         wrapperCol: { span: 16 }
       },
       form: {
-        productCode: undefined,
-        productSn: undefined,
-        productCommonCode: undefined,
-        productCommonSn: undefined
+        productCode: undefined, // 产品列表
+        productSn: undefined, // 产品sn
+        productCommonCode: undefined, // 通用产品编码
+        productCommonSn: undefined// 通用产品sn
       },
+      // 表单验证规则
       rules: {
         productSn: [
           { required: true, message: '请选择产品编码', trigger: 'change' }
@@ -84,22 +89,24 @@ export default {
           { required: true, message: '请选择通用产品编码', trigger: 'change' }
         ]
       },
-      productName: '',
-      productCommonName: ''
+      productName: '', // 产品名称
+      productCommonName: ''// 通用产品名称
     }
   },
   methods: {
+    // 产品编码 change
     productCodeChange (val) {
       this.form.productSn = val.key || undefined
       this.form.productCode = val.row && val.row.code ? val.row.code : undefined
       this.productName = val.row && val.row.name ? val.row.name : undefined
     },
+    // 通用产品编码 change
     productUniversalCodeChange (val) {
       this.form.productCommonSn = val.key || undefined
       this.form.productCommonCode = val.row && val.row.code ? val.row.code : undefined
       this.productCommonName = val.row && val.row.name ? val.row.name : undefined
     },
-    // 详情
+    // 获取详情数据
     getDetail () {
       productUniversalCodeDetail({ id: this.itemId }).then(res => {
         if (res.status == 200) {

+ 22 - 14
src/views/productManagement/productUniversal/list.vue

@@ -3,7 +3,7 @@
     <a-card size="small" :bordered="false" class="productUniversalList-wrap searchBoxNormal">
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
-        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-form layout="inline" if="productUniversalList-form" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="产品编码">
@@ -106,9 +106,11 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import moment from 'moment'
+import { exportExcel } from '@/libs/JGPrint.js'
+// 组件
 import { STable, VSelect } from '@/components'
 import productUniversalEditModal from './editModal.vue'
-import { exportExcel } from '@/libs/JGPrint.js'
+// 接口
 import { productUniversalCodeList, productUniversalCodeDel, productUniversalExport } from '@/api/productUniversalCode'
 export default {
   name: 'ProductUniversalList',
@@ -118,17 +120,19 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
-      tableHeight: 0,
-      queryParam: { //  查询条件
-        productCode: '',
-        productName: '',
-        productState: undefined,
-        productCommonName: '',
-        productCommonCode: ''
-      },
-      productType: [],
+      tableHeight: 0, // 表格高度
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
+      queryParam: { //  查询条件
+        productCode: '', // 产品名称
+        productName: '', // 产品名称
+        productState: undefined, // 产品状态
+        productCommonName: '', // 通用产品名称
+        productCommonCode: ''// 通用产品编码
+      },
+      productType: [], // 产品分类
+      openModal: false, //  编辑  弹框
+      itemId: '', //  当前id
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -145,10 +149,12 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
+        // 获取表格数据 有分页
         return productUniversalCodeList(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
+            // 计算表格序号
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
@@ -158,9 +164,7 @@ export default {
           this.spinning = false
           return data
         })
-      },
-      openModal: false, //  编辑  弹框
-      itemId: '' //  当前id
+      }
     }
   },
   methods: {
@@ -217,6 +221,7 @@ export default {
         _this.spinning = false
       })
     },
+    // 配置导出参数
     download (data) {
       if (!data) { return }
       const url = window.URL.createObjectURL(new Blob([data]))
@@ -229,18 +234,21 @@ export default {
       document.body.appendChild(link)
       link.click()
     },
+    // 初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 240
     }
   },
   watch: {
+    // 展开/关闭 监听表格高度变化
     advanced (newValue, oldValue) {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调

+ 13 - 1
src/views/purchasingManagement/purchaseReceipt/edit.vue

@@ -61,7 +61,7 @@
             type="primary"
             class="button-warning"
             :loading="loading"
-            @click="handleQueryQty">第三方库存</a-button>
+            @click="handleThirdQty">第三方库存</a-button>
           <a-alert type="info">
             <div slot="message" class="total-bar">
               <span>采购数量:{{ statisticsObj && (statisticsObj.qty || statisticsObj.qty == 0) ? statisticsObj.qty : '--' }};</span>
@@ -149,6 +149,7 @@ import {
   sparePartsReturnInfo,
   sparePartsReturnDetailSaveBatch
 } from '@/api/sparePartsReturn'
+import { getThirdStockQty } from '@/api/salesNew'
 export default {
   name: 'PurchaseReturnEdit',
   mixins: [commonMixin],
@@ -286,6 +287,17 @@ export default {
     }
   },
   methods: {
+    // 第三方库存
+    handleThirdQty () {
+      const params = {
+        sparePartsSn: this.sparePartsSn
+      }
+      getThirdStockQty(params).then(res => {
+        if (res.status == 200) {
+
+        }
+      })
+    },
     // 编辑基础信息
     handleEditBase () {
       this.openBasicInfoModal = true