瀏覽代碼

采购需求单bug修改

黄梓星 2 年之前
父節點
當前提交
04c77ea2e8
共有 2 個文件被更改,包括 39 次插入62 次删除
  1. 35 58
      src/views/purchase/PurchaseDemandList/add.vue
  2. 4 4
      src/views/purchase/PurchaseDemandList/index.vue

+ 35 - 58
src/views/purchase/PurchaseDemandList/add.vue

@@ -166,22 +166,9 @@
           <el-table-column label="序号" type="index" align="center"/>
           <el-table-column label="行状态" align="center" prop="status" :formatter="hangStatus"/>
           <el-table-column label="行号" align="center" prop="rowNo" />
-          <el-table-column label="业务部门名称" align="center" width="180px">
-            <template slot-scope="scope">
-              <el-form-item class="hang">
-                <el-input readonly size="small" v-model="scope.row.businessDeptName"/>
-              </el-form-item>
-            </template>
-          </el-table-column>
-          <el-table-column label="业务部门" align="center" width="180px">
-            <template slot-scope="scope">
-              <el-form-item class="hang">
-                <el-input readonly size="small" v-model="scope.row.businessDept">
-                <!-- <el-button :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'DEPT_PARAM', true, '选择部门')"></el-button> -->
-                </el-input>
-              </el-form-item>
-            </template>
-          </el-table-column>
+          <!-- <el-table-column label="业务部门名称" align="center" width="180px"/> -->
+          <!-- <el-table-column label="业务部门" align="center" width="180px"/> -->
+          <el-table-column label="需求客户" align="center"  prop="customerName"/>
           <el-table-column label="一级品类" align="center" prop="materialClassifyOneName" width="180px">
             <template slot-scope="scope">
               <el-form-item class="hang">
@@ -340,15 +327,6 @@
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column label="末级供应仓库" align="center"  prop="lastWarehouseName" width="200px">
-            <template slot-scope="scope">
-              <el-form-item class="hang">
-                <el-input readonly size="small" v-model="scope.row.lastWarehouseName">
-                  <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'WAREHOUSE_PARAM', true, '选择末级供应仓库')"></el-button>
-                </el-input>
-              </el-form-item>
-            </template>
-          </el-table-column>
           <el-table-column label="收货仓库" align="center"  prop="deliveryWarehouseName" width="200px">
             <template slot-scope="scope">
               <el-form-item class="hang">
@@ -358,25 +336,18 @@
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column label="末级供应货位" align="center"  prop="lastAllocationName" width="200px">
-            <template slot-scope="scope">
-              <el-form-item class="hang">
-                <el-input readonly size="small" v-model="scope.row.lastAllocationName">
-                  <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'ALLOCATION_PARAM', true, '选择末级供应货位')"></el-button>
-                </el-input>
-              </el-form-item>
-            </template>
-          </el-table-column>
-          <el-table-column label="收货货位编码" align="center"  prop="deliveryAllocation" width="200px"/>
           <el-table-column label="收货货位" align="center"  prop="deliveryAllocationName" width="200px">
             <template slot-scope="scope">
               <el-form-item class="hang">
                 <el-input readonly size="small" v-model="scope.row.deliveryAllocationName">
-                  <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位')"></el-button>
+                  <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)"></el-button>
                 </el-input>
               </el-form-item>
             </template>
           </el-table-column>
+          <!-- <el-table-column label="收货货位编码" align="center"  prop="deliveryAllocation" width="200px"/> -->
+          <el-table-column label="末级供应仓库" align="center"  prop="lastWarehouseName" width="200px"/>
+          <el-table-column label="末级供应货位" align="center"  prop="lastAllocationName" width="200px"/>
           <el-table-column label="紧急标识" align="center" prop="isUrgency" width="100px">
             <template slot-scope="scope">
               <el-form-item class="hang">
@@ -444,13 +415,6 @@
               </el-form-item>
             </template>
           </el-table-column>
-          <!-- <el-table-column label="需求客户" align="center"  prop="customer">
-            <template slot-scope="scope">
-              <el-form-item class="hang">
-                <el-input v-model="scope.row.customer"/>
-              </el-form-item>
-            </template>
-          </el-table-column> -->
           <el-table-column label="末级供应库存组织" align="center" prop="superiorStockOrgName" width="200px"></el-table-column>
           <el-table-column label="中心仓可用量" align="center"  prop="updateTime" width="200px"></el-table-column>
           <el-table-column label="调拨单号" align="center"  prop="allotCode"></el-table-column>
@@ -573,15 +537,14 @@ export default {
       basicRules: {},
       tableList: [],
       referCondition: {
-        type: 'ORG_PARAM',
+        type: '',
         isPage: true,
-        title: '选择组织',
-        pkOrg: '',
+        title: '',
       },
       referConditionMx: {
-        type: 'DEPT_PARAM',
+        type: '',
         isPage: true,
-        title: '选择部门'
+        title: '',
       },
       tableIndex: null,
       orgOptions: [],
@@ -675,6 +638,8 @@ export default {
         status: null,
         businessDept: null,
         businessDeptName: null,
+        customer: this.basicForm.customer,
+        customerName: this.basicForm.customerName,
         materialCategory: null,
         buyer: null,
         buyerName: null,
@@ -769,6 +734,8 @@ export default {
         delFlag: null,
         // 新增字段
         model: null,
+        storageCondition: null,
+        transportationCondition: null,
       }
       this.basicForm.puDemandItemList.push(newLine)
     },
@@ -803,8 +770,8 @@ export default {
               if(this.basicForm.customer) { this.reBackRefer('CUSTOMER_PARAM', this.basicForm.customer) }
               if(this.basicForm.demandPersonal) { this.reBackRefer('CONTACTS_PARAM', this.basicForm.demandPersonal) }
               if(this.basicForm.demandDept) { this.reBackRefer('DEPT_PARAM', this.basicForm.demandDept) }
+              // 详情时将收货仓库id赋值给stordocId
             }
-            console.log('111')
           })
         }
       })
@@ -839,8 +806,6 @@ export default {
       this.referCondition.type = type
       this.referCondition.isPage = isPage
       this.referCondition.title = title
-      // 选择货位时要传入组织id
-      this.referCondition.pkOrg = this.basicForm.org
       this.$refs.refer.init(this.referCondition)
     },
     selectionsToInput(selection) {
@@ -867,17 +832,12 @@ export default {
       //   this.basicForm.puDemandItemList[this.tableIndex].businessDept = selection[0].code
       //   this.basicForm.puDemandItemList[this.tableIndex].businessDeptName = selection[0].name
       // }
-      if(this.referConditionMx.title == '选择末级供应仓库') {
-        this.basicForm.puDemandItemList[this.tableIndex].lastWarehouseName = selection[0].name
-      }
       if(this.referConditionMx.title == '选择收货仓库') {
+        this.basicForm.puDemandItemList[this.tableIndex].deliveryWarehouse = selection[0].id
         this.basicForm.puDemandItemList[this.tableIndex].deliveryWarehouseName = selection[0].name
       }
-      if(this.referConditionMx.title == '选择末级供应货位') {
-        this.basicForm.puDemandItemList[this.tableIndex].lastAllocationName = selection[0].name
-      }
       if(this.referConditionMx.title == '选择收货货位') {
-        this.basicForm.puDemandItemList[this.tableIndex].deliveryAllocation = selection[0].code
+        this.basicForm.puDemandItemList[this.tableIndex].deliveryAllocation = selection[0].id
         this.basicForm.puDemandItemList[this.tableIndex].deliveryAllocationName = selection[0].name
       }
       if(this.referConditionMx.title == '选择补单供应商') {
@@ -933,6 +893,9 @@ export default {
       this.basicForm.puDemandItemList[this.tableIndex].safeStock = selection[0].safeStock
       this.basicForm.puDemandItemList[this.tableIndex].purOrgName = selection[0].purchasingOrganizationName
       this.basicForm.puDemandItemList[this.tableIndex].puOrg = selection[0].purchasingOrganization
+      // 物料存储条件和运输条件
+      this.basicForm.puDemandItemList[this.tableIndex].transportationCondition = selection[0].transportationCondition
+      this.basicForm.puDemandItemList[this.tableIndex].storageCondition = selection[0].storageCondition
     },
     // 明细行选择业务部门参照带出业务部门数据
     chooseDept(index, type, isPage, title) {
@@ -941,6 +904,20 @@ export default {
       this.referConditionMx.isPage = isPage
       this.referConditionMx.title = title
       this.$refs.refer.init(this.referConditionMx)
+    },
+    // 明细行选择业务部门参照带出业务部门数据
+    choosehuoWei(index, type, isPage, title, stordocId) {
+      this.tableIndex = index
+      this.referConditionMx.type = type
+      this.referConditionMx.isPage = isPage
+      this.referConditionMx.title = title
+      // 选择收货货位前先选择收货仓库
+      if(stordocId) {
+        this.referConditionMx.stordocId = stordocId
+        this.$refs.refer.init(this.referConditionMx)
+      } else {
+        this.$modal.msgWarning("请先选择收货仓库");
+      }
     }
   }
 }

+ 4 - 4
src/views/purchase/PurchaseDemandList/index.vue

@@ -184,7 +184,7 @@
     </div>
 
     <!-- 用户导入对话框 -->
-    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px">
+    <el-dialog title="数据导入" :visible.sync="upload.open" width="400px">
       <el-upload
       ref="upload"
       :limit="1"
@@ -202,9 +202,9 @@
         将文件拖到此处,或
         <em>点击上传</em>
       </div>
-      <div class="el-upload__tip" slot="tip">
+      <!-- <div class="el-upload__tip" slot="tip">
         <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
-      </div>
+      </div> -->
       <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
       </el-upload>
       <div slot="footer" class="dialog-footer">
@@ -241,7 +241,7 @@ export default {
         // 是否显示弹出层(导入)
         open: false,
         // 弹出层标题(导入)
-        title: "",
+        title: "数据导入",
         // 是否禁用上传
         isUploading: false,
         // 是否更新已经存在的用户数据