yusheng 10 miesięcy temu
rodzic
commit
2865c4e39d

+ 25 - 9
src/BIZComponents/product-list.vue

@@ -150,7 +150,7 @@
             </template>
             <template v-slot:cz="{ row }">
               <el-button type="text" @click="handleDoubleClick(row)"
-                >选择Bom</el-button
+                >选择PBom</el-button
               >
             </template>
           </ele-pro-table>
@@ -270,13 +270,13 @@
           size: 10
         },
         datasourceList: [],
-        columnsVersion:1
+        columnsVersion: 1
       };
     },
     watch: {},
     computed: {
       columns() {
-        let columnsVersion=this.columnsVersion
+        let columnsVersion = this.columnsVersion;
 
         let data = null;
         if (this.currentIndex != -1) {
@@ -509,8 +509,24 @@
           this.$refs.cBomRef.open(row);
         });
       },
-      getSelectionCbom(rows = []) {
-        this.$emit('getSelectionCbom', rows);
+      async getSelectionCbom(rows = []) {
+        console.log(rows);
+        let list = rows;
+        //获取供应商
+        if (this.isSupplier) {
+          let supplierList = await this.getSupplierObj(list, 'categoryId');
+          list.forEach((item) => {
+            item['supplierList'] = supplierList[item.id];
+            item['entrustedEnterpriseIdList'] = supplierList[item.id];
+            if (supplierList[item.id]?.length) {
+              item['entrustedEnterpriseId'] = supplierList[item.id][0].id;
+              item['supplierCode'] = supplierList[item.id][0].code;
+              item['supplierId'] = supplierList[item.id][0].id;
+              item['supplierName'] = supplierList[item.id][0].name;
+            }
+          });
+        }
+        this.$emit('getSelectionCbom', list);
         this.handleClose();
       },
       handleClose() {
@@ -523,11 +539,11 @@
       async getSupplierObj(productList, queryName) {
         try {
           let categoryIds = productList
-            .filter((item) => item.id)
-            .map((item) => item.id);
+            .filter((item) => item[queryName])
+            .map((item) => item[queryName]);
           if (categoryIds.length > 0) {
             return await contactQueryByCategoryIdsAPI({
-              categoryIds,
+              categoryIds
             });
           } else {
             return Promise.resolve({});
@@ -572,7 +588,7 @@
         }
         //获取供应商
         if (this.isSupplier) {
-          let supplierList = await this.getSupplierObj(list);
+          let supplierList = await this.getSupplierObj(list, 'id');
           list.forEach((item) => {
             item['supplierList'] = supplierList[item.id];
             item['entrustedEnterpriseIdList'] = supplierList[item.id];

+ 10 - 2
src/views/purchasingManage/purchaseOrder/invoice/index.vue

@@ -195,7 +195,8 @@
       addReturnGoodsDialog,
       orderDetailDialog,
       addInvoiceDialog,
-      detailDialog,printTemplateWl
+      detailDialog,
+      printTemplateWl
     },
     data() {
       return {
@@ -246,7 +247,7 @@
             showOverflowTooltip: true,
             minWidth: 150
           },
-          
+
           {
             prop: 'productNames',
             label: '产品名称',
@@ -310,6 +311,13 @@
               return reviewStatus[_row.reviewStatus];
             }
           },
+          {
+            prop: 'createUserName',
+            label: '创建人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 170
+          },
           {
             prop: 'createTime',
             label: '创建时间',

+ 28 - 10
src/views/saleManage/saleOrder/index.vue

@@ -19,13 +19,18 @@
         <div v-if="activeComp == 'saleorder'">
           <div class="ele-border-lighter form-content" v-loading="loading">
             <search-table @search="reload"></search-table>
-
+            <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+              <el-tab-pane label="全部" name="all"></el-tab-pane>
+              <el-tab-pane label="未发货" name="700"></el-tab-pane>
+              <el-tab-pane label="部分发货" name="701"></el-tab-pane>
+              <el-tab-pane label="已发货" name="800"></el-tab-pane>
+            </el-tabs>
             <!-- 数据表格 -->
             <ele-pro-table
               ref="table"
               :columns="columns"
               :datasource="datasource"
-              height="calc(100vh - 350px)"
+              height="calc(100vh - 400px)"
               style="margin-bottom: 10px"
               full-height="calc(100vh - 116px)"
               tool-class="ele-toolbar-form"
@@ -183,7 +188,9 @@
                   icon="el-icon-plus"
                   @click="handleCommand('saleOrderReminder', row)"
                   v-if="
-                    [2].includes(row.orderStatus) && clientEnvironmentId != 5
+                    [2].includes(row.orderStatus) &&
+                    clientEnvironmentId != 5 &&
+                    row.progress < 800
                   "
                 >
                   催单
@@ -364,6 +371,7 @@
     },
     data() {
       return {
+        activeName: 'all',
         activeComp: 'saleorder',
         tabOptions: [
           { key: 'saleorder', name: '销售订单' },
@@ -387,7 +395,7 @@
         cacheKeyUrl: 'eos-c2e9664a-saleManage-saleOrder',
         isRequired: true,
         isTotalCount: '0',
-        columnsVersion:1,
+        columnsVersion: 1
       };
     },
 
@@ -404,7 +412,7 @@
       parameterGetByCode({
         code: 'saleOrder_invoice_productList_totalCount'
       }).then((res) => {
-        this.isTotalCount ='1';
+        this.isTotalCount == res.value;
       });
       // if (!('Notification' in window)) {
       //   console.log('此浏览器不支持桌面通知');
@@ -429,7 +437,7 @@
         return this.$store.state.user.info.clientEnvironmentId;
       },
       columns() {
-        let columnsVersion=this.columnsVersion
+        let columnsVersion = this.columnsVersion;
         return [
           {
             width: 45,
@@ -554,7 +562,7 @@
             showOverflowTooltip: true,
             minWidth: 140,
             formatter: (_row, _column, cellValue) => {
-              return _row.inventoryQuantity>0 ? '有库存' : '无库存';
+              return _row.inventoryQuantity > 0 ? '有库存' : '无库存';
             }
           },
           {
@@ -727,8 +735,12 @@
           return this.$message.warning('请选择相同销售类型的订单!');
         }
         let processObj = this.selection.filter((item) => item.progress == 800);
-        if (processObj?.length&&this.isTotalCount=='1') {
-          return this.$message.warning('订单'+processObj.map(item=>item.orderNo).toString()+'已全部发货,不能创建发货单');
+        if (processObj?.length && this.isTotalCount == '1') {
+          return this.$message.warning(
+            '订单' +
+              processObj.map((item) => item.orderNo).toString() +
+              '已全部发货,不能创建发货单'
+          );
         }
         if (
           this.selection.filter((item) => item.needProduce == 4)?.length &&
@@ -767,7 +779,13 @@
       reload(where) {
         this.$refs.table.reload({ page: 1, where });
       },
-
+      handleClick() {
+        this.activeName;
+        this.$refs.table.reload({
+          page: 1,
+          where: { progress: this.activeName == 'all' ? '' : this.activeName }
+        });
+      },
       //新增编辑
       openEdit(type, row) {
         this.$refs.addDialogRef.open(type, row, row.id);