Forráskód Böngészése

Merge branch 'purchaseDev' into 'dev'

Purchase dev

See merge request new-business/drp-web!147
黄梓星 2 éve
szülő
commit
017ca86635

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

@@ -18,7 +18,11 @@
         >
         <el-table-column show-overflow-tooltip type="selection" width="55" />
         <el-table-column show-overflow-tooltip label="序号" align="center" type="index"/>
-        <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">
+            {{ scope.$index + 1 + '0' }}
+          </template>
+        </el-table-column>
         <el-table-column show-overflow-tooltip label="行状态" align="center" prop="status" width="120px" :formatter="hangStatus"/>
         <el-table-column show-overflow-tooltip label="物料编码" align="center" prop="materialCode" width="150px"/>
         <el-table-column show-overflow-tooltip label="品名" align="center" prop="materialName" width="180"/>

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

@@ -169,7 +169,11 @@
           <el-table-column show-overflow-tooltip type="selection"/>
           <el-table-column show-overflow-tooltip label="序号" type="index" align="center"/>
           <el-table-column show-overflow-tooltip label="行状态" align="center" prop="status" :formatter="hangStatus" width="150px"/>
-          <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">
+              {{scope.$index + 1 + '0'}}
+            </template>
+          </el-table-column>
           <!-- <el-table-column show-overflow-tooltip label="业务部门名称" align="center" width="180px"/> -->
           <!-- <el-table-column show-overflow-tooltip label="业务部门" align="center" width="180px"/> -->
           <el-table-column show-overflow-tooltip label="需求客户" align="center"  prop="demandCustomerName" width="200px"/>
@@ -484,7 +488,7 @@
     </div>
 
     <!-- 批量调整参数 -->
-    <el-dialog title="批量调整" :visible.sync="adjust.open" width="400px">
+    <el-dialog title="批量调整" :visible.sync="adjust.open" @close="closeEvent" width="400px">
       <el-row style="margin-bottom: 10px;">
         <el-col :span="6">价格类型</el-col>
         <el-col :span="14">
@@ -635,6 +639,7 @@ export default {
       //   title: '',
       // },
       tableIndex: null,
+      ids: [],
       orgOptions: [],
       manOptions: [],
       personOptions: [],
@@ -653,7 +658,7 @@ export default {
       },
       isBDXQ: false,
       isYl: false,
-      // 批量调整擦拭
+      // 批量调整参数
       adjust: {
         open: false,
         priceType: '',
@@ -990,7 +995,12 @@ export default {
         }
       })
     },
-    handleSelectionChange() {},
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item =>{
+        return item.id
+      })
+      console.log('选中数组', this.ids)
+    },
     // 点击预留单展示
     showReserved() {
       this.dialog.config = true
@@ -1238,11 +1248,49 @@ export default {
     },
     // 批量调整
     adjustPl() {
-      this.adjust.open = true
+      if(this.ids.length == 0) {
+        this.$modal.msgWarning('请至少选择一项数据进行操作!')
+      } else {
+        this.adjust.open = true
+      }
     },
     // 批量调整确认
     confirmAdjust() {
       console.log('data', this.adjust)
+      this.basicForm.puDemandItemList.forEach(item => {
+        this.ids.some(val => {
+          if(val == item.id) {
+            if(this.adjust.purchaseMan) {
+              item.buyer = this.adjust.purchaseMan
+              item.buyerName = this.adjust.purchaseManName
+            }
+            if(this.adjust.priceType) {
+              item.priceType = this.adjust.priceType
+            }
+            if(this.adjust.warehouseName) {
+              item.deliveryWarehouse = this.adjust.warehouse
+              item.deliveryWarehouseName = this.adjust.warehouseName
+              item.deliveryAllocation = this.adjust.allocation
+              item.deliveryAllocationName = this.adjust.allocationName
+            }
+            // if(this.adjust.allocationName) {
+            //   item.deliveryAllocation = this.adjust.allocation
+            //   item.deliveryAllocationName = this.adjust.allocationName
+            // }
+            if(this.adjust.remark) {
+              item.remark = this.adjust.remark
+            }
+            if(this.adjust.deliveryAddressName) {
+              item.deliveryAddressName = this.adjust.deliveryAddressName
+              item.deliveryAddress = this.adjust.deliveryAddress
+              item.contacts = this.adjust.contacts
+              item.contactsPhone = this.adjust.contactsPhone
+              item.address = this.adjust.address
+            }
+          }
+          this.adjust.open = false
+        })
+      })
     },
     // 批量调整选择货位
     adjustHuoWei(type, isPage, title, stordocId) {
@@ -1257,6 +1305,25 @@ export default {
         this.$modal.msgWarning("请先选择收货仓库");
       }
     },
+    // 关闭清空批量调整数据
+    closeEvent() {
+      this.adjust =  {
+        open: false,
+        priceType: '',
+        purchaseMan: '',
+        purchaseManName: '',
+        warehouse: '',
+        warehouseName: '',
+        allocation: '',
+        allocationName: '',
+        remark: '',
+        deliveryAddress: '',
+        deliveryAddressName: '',
+        contacts: '',
+        contactsPhone: '',
+        address: ''
+      }
+    },
   }
 }
 </script>

+ 20 - 1
src/views/purchase/transferOrder/add.vue

@@ -206,6 +206,19 @@
             </el-form-item>
         </el-col>
       </el-row>
+      
+      <el-row>
+        <el-col :span="1.5">
+          <el-form-item label="NC单据号">
+            <el-input
+              v-model="basicForm.ncCode"
+              size="small"
+              disabled
+              style="width: 200px"
+            />
+          </el-form-item>
+        </el-col>
+      </el-row>
 
       <el-row>
         <el-col :span="20">
@@ -232,7 +245,11 @@
           fit
           max-height="480"
           >
-          <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">
+                {{ scope.$index + 1 + '0' }}
+              </template>
+          </el-table-column>
           <el-table-column show-overflow-tooltip label="采购需求单单号" align="center" prop="demandCode" width="200px"/>
           <el-table-column show-overflow-tooltip label="物料编码" align="center" prop="materialCode" width="230px">
             <template slot-scope="scope">
@@ -656,6 +673,8 @@ export default {
         liacenter: '',
         liacenterName: '',
         sourceIdentification: '',
+        remark:'',
+        ncCode: '',
         isSendWms: '',
         status: '0',
         tenantId: '',