Browse Source

Merge branch 'purchaseDev' into 'dev'

Purchase dev

See merge request new-business/drp-web!305
黄梓星 1 year ago
parent
commit
8c08faf3d6

+ 1 - 1
src/views/purchase/DemandSummary/add.vue

@@ -36,7 +36,7 @@
         <el-table-column show-overflow-tooltip label="规格" align="center" prop="specification"/>
         <el-table-column show-overflow-tooltip label="规格" align="center" prop="specification"/>
         <el-table-column show-overflow-tooltip label="单位" align="center" prop="unit"/>
         <el-table-column show-overflow-tooltip label="单位" align="center" prop="unit"/>
         <el-table-column show-overflow-tooltip label="生产厂家/代理人" align="center" prop="manufacturerName" width="230"/>
         <el-table-column show-overflow-tooltip label="生产厂家/代理人" align="center" prop="manufacturerName" width="230"/>
-        <el-table-column show-overflow-tooltip label="末级供应仓库存量" align="center" prop="lastWarehouseQty" width="150"/>
+        <!-- <el-table-column show-overflow-tooltip label="末级供应仓库存量" align="center" prop="lastWarehouseQty" width="150"/> -->
         <el-table-column show-overflow-tooltip label="月销量" align="center" prop="totalMonthlySales"/>
         <el-table-column show-overflow-tooltip label="月销量" align="center" prop="totalMonthlySales"/>
         <el-table-column show-overflow-tooltip label="采购周期" align="center" prop="puPeriod"/>
         <el-table-column show-overflow-tooltip label="采购周期" align="center" prop="puPeriod"/>
         <el-table-column show-overflow-tooltip label="最终净需求量" align="center" prop="resDemandQty" width="120"/>
         <el-table-column show-overflow-tooltip label="最终净需求量" align="center" prop="resDemandQty" width="120"/>

+ 12 - 5
src/views/purchase/PurchaseDemandList/add.vue

@@ -161,7 +161,7 @@
         <span>明细信息</span>
         <span>明细信息</span>
         <div>
         <div>
         <el-button type="primary" size="mini" @click="addLine" v-if="!sonDisable">增行</el-button>
         <el-button type="primary" size="mini" @click="addLine" v-if="!sonDisable">增行</el-button>
-        <el-button type="primary" size="mini" v-if="!sonDisable" @click="adjustPl">批量调整</el-button>
+        <el-button type="primary" size="mini" v-if="!sonDisable" @click.stop="adjustPl">批量调整</el-button>
         <el-button type="primary" size="mini" v-if="sonPageStu == 'check' || sonPageStu == 'edit'" @click="showReserved">货权预留单</el-button>
         <el-button type="primary" size="mini" v-if="sonPageStu == 'check' || sonPageStu == 'edit'" @click="showReserved">货权预留单</el-button>
         </div>
         </div>
       </div>
       </div>
@@ -181,8 +181,9 @@
           style="font-size: 12px;"
           style="font-size: 12px;"
           @selection-change="handleSelectionChange"
           @selection-change="handleSelectionChange"
           :cell-class-name="cellClassName"
           :cell-class-name="cellClassName"
+          :row-key="getRowKeys"
         >
         >
-          <el-table-column show-overflow-tooltip type="selection"/>
+          <el-table-column show-overflow-tooltip type="selection" :reserve-selection="true"/>
           <el-table-column show-overflow-tooltip label="序号" type="index" align="center" width="50px"/>
           <el-table-column show-overflow-tooltip label="序号" type="index" align="center" width="50px"/>
           <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowNo">
           <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowNo">
             <template slot-scope="scope">
             <template slot-scope="scope">
@@ -1130,7 +1131,7 @@ export default {
       }
       }
       if(this.referCondition.type == 'ADDRESS_PARAM' && this.referCondition.title == '收货地址') {
       if(this.referCondition.type == 'ADDRESS_PARAM' && this.referCondition.title == '收货地址') {
         this.adjust.deliveryAddressName = selection[0].name
         this.adjust.deliveryAddressName = selection[0].name
-        this.adjust.deliveryAddress = selection[0].id
+        this.adjust.deliveryAddress = selection[0].code
         this.adjust.contacts = selection[0].contactsName
         this.adjust.contacts = selection[0].contactsName
         this.adjust.contactsPhone = selection[0].contactsPhone
         this.adjust.contactsPhone = selection[0].contactsPhone
         this.adjust.address = selection[0].address
         this.adjust.address = selection[0].address
@@ -1156,7 +1157,7 @@ export default {
       }
       }
       if(this.referCondition.title == '选择收货地址') {
       if(this.referCondition.title == '选择收货地址') {
         this.basicForm.puDemandItemList[this.tableIndex].deliveryAddressName = selection[0].name
         this.basicForm.puDemandItemList[this.tableIndex].deliveryAddressName = selection[0].name
-        this.basicForm.puDemandItemList[this.tableIndex].deliveryAddress = selection[0].id
+        this.basicForm.puDemandItemList[this.tableIndex].deliveryAddress = selection[0].code
         this.basicForm.puDemandItemList[this.tableIndex].contacts = selection[0].contactsName
         this.basicForm.puDemandItemList[this.tableIndex].contacts = selection[0].contactsName
         this.basicForm.puDemandItemList[this.tableIndex].contactsPhone = selection[0].contactsPhone
         this.basicForm.puDemandItemList[this.tableIndex].contactsPhone = selection[0].contactsPhone
         this.basicForm.puDemandItemList[this.tableIndex].address = selection[0].address
         this.basicForm.puDemandItemList[this.tableIndex].address = selection[0].address
@@ -1743,6 +1744,7 @@ export default {
         h('span', ' ' + column.label)
         h('span', ' ' + column.label)
       ];
       ];
     },
     },
+    // 表格表头标星
     anotherRedStar(h, { column }) {
     anotherRedStar(h, { column }) {
       if(this.isBDXQ) {
       if(this.isBDXQ) {
       return [
       return [
@@ -1755,13 +1757,18 @@ export default {
         ]; 
         ]; 
       }
       }
     },
     },
+    // 审批
     jumpOA() {
     jumpOA() {
       toOA(this.$store.state.user.name, this.basicForm.flowId).then(res => {
       toOA(this.$store.state.user.name, this.basicForm.flowId).then(res => {
         if(res.code === 200) {
         if(res.code === 200) {
           window.open(res.oaUrl)
           window.open(res.oaUrl)
         }
         }
       })
       })
-    }
+    },
+    // 解决表格选中了又自动取消的问题
+    getRowKeys(row) {
+      return row.id
+    },
   }
   }
 }
 }
 </script>
 </script>