Browse Source

采购需求单去掉默认组织编码字段,双击选择参照

黄梓星 1 năm trước cách đây
mục cha
commit
025b753b88

+ 9 - 2
src/components/Refers/refers.vue

@@ -18,7 +18,7 @@
           </el-header>
           <el-main>
             <el-table :data="dataList" v-loading="loading" size="small" border ref="contractTable"
-              @select="handleSelectionChange" @row-click="rowSelect" height="calc(100% - 40px)">
+              @select="handleSelectionChange" @row-dblclick="choose"  @row-click="rowSelect" height="calc(100% - 40px)">
               <el-table-column show-overflow-tooltip type="selection" header-align="center" align="center" width="50"/>
               <!-- <el-table-column show-overflow-tooltip prop="id" header-align="center" align="center" min-width="90" :label="reciveForm.title + 'id'"/> -->
               <el-table-column show-overflow-tooltip prop="code" header-align="center" align="center" min-width="90" label="编码"/>
@@ -134,9 +134,13 @@ export default {
         // 仓库里面加组织
         if(res.rows.length !== 0 && res.rows[0].orgName) {
           this.orgName = true
-          this.warehouseAttributes = true
         } else {
           this.orgName = false
+        }
+        // 仓库里面加仓库属性
+        if(res.rows.length !== 0 && res.rows[0].warehouseAttributes) {
+          this.warehouseAttributes = true
+        } else {
           this.warehouseAttributes = false
         }
         // 人员内加部门
@@ -231,6 +235,9 @@ export default {
       console.log('选择的数据?', this.dataListAllSelections)
       this.$emit("doSubmit", this.dataListAllSelections);
     },
+    choose() {
+      this.doSubmit()
+    }
   },
 };
 </script>

+ 1 - 50
src/views/purchase/PurchaseDemandList/add.vue

@@ -23,15 +23,6 @@
             </el-form-item>
          </el-col>
 
-         <!-- <el-col :span="1.5">
-            <el-form-item label="需求处理方式">
-              <el-select disabled v-model="basicForm.demandBusinessType" size="mini" style="width: 200px">
-                <el-option v-for="dict in dict.type.sys_processing_mode" :key="dict.value" :label="dict.label" :value="dict.value">
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col> -->
-
          <el-col :span="1.5">
             <el-form-item label="单据状态">
               <el-select disabled v-model="basicForm.status" size="mini" style="width: 200px">
@@ -180,8 +171,6 @@
               {{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"/>
           <el-table-column show-overflow-tooltip label="一级品类" align="center" prop="materialClassifyOneName" width="180px"/>
           <el-table-column show-overflow-tooltip label="二级品类" align="center" prop="materialClassifyTwoName" width="180px"/>
@@ -230,7 +219,6 @@
                     <el-option v-for=" dict in dict.type.sys_reserve_ratio" :key="dict.value" :label="dict.label" :value="dict.value">
                     </el-option>
                   </el-select>
-                  <!-- <el-input v-model="scope.row.reservedProportion"/> -->
                 </el-form-item>
               </template>
             </el-table-column>
@@ -327,7 +315,6 @@
             </template>
           </el-table-column>
           <el-table-column show-overflow-tooltip label="采购备注" align="center"  prop="updateCause" width="150px"/>
-          <!-- <el-table-column show-overflow-tooltip label="末级供应仓库存量" align="center"  prop="lastWarehouseQty" /> -->
           <el-table-column show-overflow-tooltip label="调拨占有量" align="center"  prop="allotQty" width="150px"/>
           <el-table-column show-overflow-tooltip label="最终净需求量" align="center"  prop="resDemandQty" width="150px">
             <template slot-scope="scope">
@@ -359,7 +346,6 @@
               </el-form-item>
             </template>
           </el-table-column>
-          <!-- <el-table-column show-overflow-tooltip label="收货货位编码" align="center"  prop="deliveryAllocation" width="200px"/> -->
           <el-table-column show-overflow-tooltip label="末级供应仓库" align="center"  prop="lastWarehouseName" width="200px"/>
           <el-table-column show-overflow-tooltip label="末级供应货位" align="center"  prop="lastAllocationName" width="200px"/>
           <el-table-column show-overflow-tooltip label="紧急标识" align="center" prop="isUrgency" width="100px">
@@ -376,11 +362,7 @@
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="默认采购组织" align="center"  prop="purOrgName" width="200px"/>yu
-          <el-table-column show-overflow-tooltip label="默认采购组织编码" align="center"  prop="puOrg" width="200px"/>
-          <!-- <el-table-column show-overflow-tooltip label="末级供应调拨待入量" align="center"  prop="lastStockQty" width="150px"/> -->
-          <!-- <el-table-column show-overflow-tooltip label="上级供应中心现存量" align="center"  prop="superiorCenterQty" width="200px"/> -->
-          <!-- <el-table-column show-overflow-tooltip label="上级库存被调拨占用量" align="center"  prop="superiorAllotQty" width="200px"/> -->
+          <el-table-column show-overflow-tooltip label="默认采购组织" align="center"  prop="purOrgName" width="200px"/>
           <el-table-column show-overflow-tooltip label="可用量" align="center"  prop="availableQty"/>
           <el-table-column show-overflow-tooltip label="调拨状态" align="center"  prop="statusAllot" width="100px">
             <template slot-scope="scope">
@@ -405,23 +387,6 @@
               </el-form-item>
             </template>
           </el-table-column>
-          <!-- <el-table-column show-overflow-tooltip label="补单供应商名称" align="center"  prop="additionalSupplierName" width="200px">
-            <template slot-scope="scope">
-              <el-form-item class="hang">
-                <el-input readonly size="mini" v-model="scope.row.additionalSupplierName"/>
-              </el-form-item>
-            </template>
-          </el-table-column> -->
-          <!-- <el-table-column show-overflow-tooltip label="周期单位" align="center"  prop="periodUnit" width="150px">
-            <template slot-scope="scope">
-              <el-form-item class="hang">
-                <el-select clearable :disabled="sonDisable" size="mini" v-model="scope.row.periodUnit">
-                  <el-option v-for=" dict in dict.type.sys_period_unit" :key="dict.value" :label="dict.label" :value="dict.value">
-                  </el-option>
-                </el-select>
-              </el-form-item>
-            </template>
-          </el-table-column> -->
           <el-table-column show-overflow-tooltip label="末级供应库存组织" align="center" prop="lastStockOrgName" width="200px"></el-table-column>
           <el-table-column show-overflow-tooltip label="中心仓可用量" align="center"  prop="centralWarehouseQty" width="200px"/>
           <el-table-column show-overflow-tooltip label="调拨单号" align="center"  prop="allotCode"></el-table-column>
@@ -434,7 +399,6 @@
               </el-form-item>
             </template>
           </el-table-column>
-          <!-- <el-table-column show-overflow-tooltip label="收货地址编码" align="center" prop="deliveryAddress" width="200px"></el-table-column> -->
           <el-table-column show-overflow-tooltip label="联系人" align="center"  prop="contacts"/>
           <el-table-column show-overflow-tooltip label="联系人电话" align="center"  prop="contactsPhone" width="200px"/>
           <el-table-column show-overflow-tooltip label="详细地址" align="center"  prop="address" width="200px"/>
@@ -445,7 +409,6 @@
                   <el-option v-for=" dict in dict.type.sys_price_type" :key="dict.value" :label="dict.label" :value="dict.value">
                   </el-option>
                 </el-select>
-                <!-- <el-input v-model="scope.row.periodUnit"/> -->
               </el-form-item>
             </template>
           </el-table-column>
@@ -981,11 +944,7 @@ export default {
     delLine(index, row) {
       console.log('删除行:', index)
       console.log('改变行:', row)
-      // this.basicForm.puDemandItemList = this.basicForm.puDemandItemList.filter(item => {
-      //   return item.id !== row.id
-      // })
       row.delFlag = '2'
-      // this.basicForm.puDemandItemList.splice(index,1)
       let delList = []
       delList = this.basicForm.puDemandItemList.filter(item => {
         return item.delFlag == '2'
@@ -998,10 +957,6 @@ export default {
     },
     back() {
       this.$emit('jugislist', true)
-      // let queryParams = {
-      //   pageNum: 1,
-      //   pageSize: 10
-      // }
       this.$emit('refresh')
     },
     // 如果需要回显则调用详情接口
@@ -1159,10 +1114,6 @@ export default {
         this.deptOptions = selection
         this.basicForm.demandDept = selection[0].id
       }
-      // if(this.referCondition.type == 'DEPT_PARAM') {
-      //   this.basicForm.puDemandItemList[this.tableIndex].businessDept = selection[0].code
-      //   this.basicForm.puDemandItemList[this.tableIndex].businessDeptName = selection[0].name
-      // }
       if(this.referCondition.title == '选择收货仓库') {
         this.basicForm.puDemandItemList[this.tableIndex].deliveryWarehouse = selection[0].id
         this.basicForm.puDemandItemList[this.tableIndex].deliveryWarehouseName = selection[0].name