Przeglądaj źródła

修改核价单

yusheng 1 rok temu
rodzic
commit
d646bd6599

+ 39 - 0
src/views/bpm/handleTask/components/inquiryManage/inquiryTable.vue

@@ -343,6 +343,8 @@
   import { copyObj } from '@/utils/util';
   import { getFile } from '@/api/system/file';
   import fileMain from '@/components/addDoc/index.vue';
+  import { getInventoryTotalAPI } from '@/api/bpm/components/wms';
+
   // import headList from '@/views/saleManage/businessOpportunity/components/headList.vue';
   const defaultColumns = [
     {
@@ -455,6 +457,25 @@
       headerSlot: 'isRequired',
       align: 'center'
     },
+    {
+      minWidth: 80,
+      prop: 'availableCountBase',
+      label: '库存数量',
+      slot: 'availableCountBase',
+      align: 'center'
+    },
+    {
+      minWidth: 80,
+      prop: 'doneTotalCount',
+      label: '已采数量',
+      align: 'center'
+    },
+    {
+      minWidth: 80,
+      prop: 'waitTotalCount',
+      label: '待采数量',
+      align: 'center'
+    },
     {
       minWidth: 80,
       prop: 'measuringUnit',
@@ -624,6 +645,8 @@
       this.getSpanArr();
       this.setDeliveryDays();
       this.setIsInquiry();
+      this.getInventoryTotalAPI();
+
     },
     methods: {
       //计算交期
@@ -656,6 +679,22 @@
           colspan: 1
         };
       },
+      async getInventoryTotalAPI() {
+        let codeList = this.form.resultList.map((item) => item.productCode);
+        //获取仓库库存
+        let inventoryTotalList = await getInventoryTotalAPI(codeList);
+        this.form.resultList.forEach((item, index) => {
+          let find =
+            inventoryTotalList.find((key) => key.code == item.productCode) ||
+            {};
+          // item.availableCountBase = find.availableCountBase;
+          this.$set(
+            this.form.resultList[index],
+            'availableCountBase',
+            find.availableCountBase
+          );
+        });
+      },
       getSpanArr() {
         let pos = 0;
         this.spanArr = [];

+ 6 - 12
src/views/bpm/handleTask/components/inquiryManage/inventoryTable.vue

@@ -202,7 +202,7 @@
 
       <!-- <template v-for="item in supplierList"> -->
       <!-- {{ slot }} -->
-      <template v-slot:[item.slot]="scope" v-for="item in supplierList">
+      <!-- <template v-slot:[item.slot]="scope" v-for="item in supplierList">
         <el-form-item
           style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.' + item.prop"
@@ -218,21 +218,15 @@
             placeholder="请输入"
           ></el-input>
         </el-form-item>
-      </template>
-      <template v-slot:[item.headerSlot]="scope" v-for="item in supplierList">
+      </template> -->
+      <!-- <template v-slot:[item.headerSlot]="scope" v-for="item in supplierList">
         <el-form-item style="margin-bottom: 20px">
-          <!-- <div style="display: flex"> -->
+
           <span>{{ item.label }}</span>
           <fileMain v-model="item.files"></fileMain>
-          <!--          <fileUpload-->
-          <!--            v-model="item.files"-->
-          <!--            module="main"-->
-          <!--            :showLib="false"-->
-          <!--            :limit="1"-->
-          <!--          />-->
-          <!-- </div> -->
+
         </el-form-item>
-      </template>
+      </template> -->
       <!-- </template> -->
       <template v-slot:add="scope">
         <el-form-item style="margin-bottom: 20px">