Procházet zdrojové kódy

Merge branch 'purchaseDev' of http://172.16.100.139/new-business/drp-web into purchaseDev

002390 před 1 rokem
rodič
revize
ac78001edd

+ 11 - 10
src/views/purchase/DemandSummary/add.vue

@@ -72,7 +72,6 @@
         <el-table-column show-overflow-tooltip label="供应仓库" align="center" prop="lastWarehouseName" width="150"/>
         <el-table-column show-overflow-tooltip label="供应货位" align="center" prop="lastAllocationName" width="150"/>
         <el-table-column show-overflow-tooltip label="业务类型" align="center" prop="billType" width="150"/>
-        <el-table-column show-overflow-tooltip label="行状态" align="center" prop="status" width="150"/>
         <el-table-column show-overflow-tooltip label="收货仓库" align="center" prop="deliveryWarehouseName" width="150"/>
         <el-table-column show-overflow-tooltip label="收货货位" align="center" prop="deliveryAllocationName" width="200">
           <template slot-scope="scope">
@@ -254,15 +253,17 @@ export default {
     },
     // 重取批量
     reloadBatch() {
-      let param = this.tableList.map(item => { return item.demandItemId})
-      reloadBatch(param).then(res => {
-        if (res.code === 200) {
-          this.$modal.msgSuccess("操作成功");
-          let param = JSON.parse(JSON.stringify(this.query))
-          param.sumFlag = this.row.sumFlag
-          this.getDetails(param)
-        }
-      })
+      this.$modal.confirm('是否更新明细的最小包装量,最小订货量,最小批量?').then(function () {}).then(() => {
+        let param = this.tableList.map(item => { return item.demandItemId })
+        reloadBatch(param).then(res => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("操作成功");
+            let param = JSON.parse(JSON.stringify(this.query))
+            param.sumFlag = this.row.sumFlag
+            this.getDetails(param)
+          }
+        })
+      }).catch(() =>{})
       
     },
     // 明细行选择货位

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

@@ -332,7 +332,7 @@
           <el-table-column show-overflow-tooltip label="中心仓可用量" align="center" prop="centralWarehouseAvailable" width="100px"/>
           <!-- <el-table-column label="物料类别" align="center" prop="materialCategory" width="150px"/> -->
           <!-- <el-table-column label="业务部门" align="center" prop="departmentName" width="150px"/> -->
-          <el-table-column show-overflow-tooltip label="需求单位" align="center" prop="demandUnit"/>
+          <!-- <el-table-column show-overflow-tooltip label="需求单位" align="center" prop="demandUnit"/> -->
           <el-table-column show-overflow-tooltip label="采购经理审核人" align="center" prop="puManagerAuditor" width="120px"/>
           <el-table-column
           fixed="right"

+ 72 - 10
src/views/purchase/transferOrder/add.vue

@@ -4,7 +4,7 @@
       <el-row :gutter="10">
         <el-col :span="1.5">
           <el-form-item label="调出库存组织">
-            <el-select clearable size="mini" v-model="basicForm.deliveryInventoryOrg" :disabled="sonDisable" @change="controlCk" @focus="chooseRefer('ORG_PARAM', true, '调出库存组织')" style="width: 200px">
+            <el-select clearable size="mini" v-model="basicForm.deliveryInventoryOrg" :disabled="sonDisable" @clear="clean('调出库存组织')" @change="controlCk" @focus="chooseRefer('ORG_PARAM', true, '调出库存组织')" style="width: 200px">
               <el-option v-for="item in chuOrgOptions" :key="item.id" :label="item.name" :value="item.id" />
             </el-select>
           </el-form-item>
@@ -74,14 +74,14 @@
          </el-col>
         <el-col :span="1.5">
             <el-form-item label="调入库存组织">
-              <el-select clearable size="mini" v-model="basicForm.storageInventoryOrg" :disabled="sonDisable" @change="controlCk" @focus="chooseRefer('ORG_PARAM', true, '调入库存组织')" style="width: 200px">
+              <el-select clearable size="mini" v-model="basicForm.storageInventoryOrg" :disabled="sonDisable" @clear="clean('调入库存组织')" @change="controlCk" @focus="chooseRefer('ORG_PARAM', true, '调入库存组织')" style="width: 200px">
                 <el-option v-for="item in ruOrgOptions" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
          </el-col>
         <el-col :span="1.5">
             <el-form-item label="调出业务员">
-              <el-select clearable size="mini" v-model="basicForm.businessPersonal" :disabled="sonDisable" @focus="chooseRefer('CONTACTS_PARAM', true, '调出业务员')" style="width: 200px">
+              <el-select clearable size="mini" v-model="basicForm.businessPersonal" :disabled="sonDisable" @clear="clean('调出业务员')" @focus="chooseRefer('CONTACTS_PARAM', true, '调出业务员')" style="width: 200px">
                 <el-option v-for="item in manOptions" :key="item.id" :label="item.name" :value="item.code" />
               </el-select>
             </el-form-item>
@@ -160,14 +160,14 @@
          </el-col>
         <el-col :span="1.5">
             <el-form-item label="调入仓库">
-              <el-select clearable size="mini" v-model="basicForm.storageWarehouse" :disabled="sonDisable || isOrg" @change="controlDRHW" @focus="chooseRefer('WAREHOUSE_PARAM', true, '调入仓库', basicForm.storageInventoryOrg, 'N', 'N')" style="width: 200px">
+              <el-select clearable size="mini" v-model="basicForm.storageWarehouse" :disabled="sonDisable || isOrg" @clear="clean('调入仓库')" @change="controlDRHW" @focus="chooseRefer('WAREHOUSE_PARAM', true, '调入仓库', basicForm.storageInventoryOrg, 'N', 'N')" style="width: 200px">
                 <el-option v-for="item in ruHouseOptions" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
          </el-col>
         <el-col :span="1.5">
             <el-form-item label="调出仓库">
-              <el-select clearable size="mini" v-model="basicForm.deliveryWarehouse" :disabled="sonDisable || isOrg" @change="controlDCHW" @focus="chooseRefer('WAREHOUSE_PARAM', true, '调出仓库', basicForm.deliveryInventoryOrg, 'N', 'N')" style="width: 200px">
+              <el-select clearable size="mini" v-model="basicForm.deliveryWarehouse" :disabled="sonDisable || isOrg" @clear="clean('调出仓库')" @change="controlDCHW" @focus="chooseRefer('WAREHOUSE_PARAM', true, '调出仓库', basicForm.deliveryInventoryOrg, 'N', 'N')" style="width: 200px">
                 <el-option v-for="item in chuHouseOptions" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
@@ -182,7 +182,7 @@
          </el-col>
         <el-col :span="1.5">
             <el-form-item label="利润中心">
-              <el-select clearable size="mini" v-model="basicForm.liacenter" :disabled="sonDisable" @focus="chooseTreeRefer('LIACENTER_PARAM', false, '利润中心')" style="width: 200px">
+              <el-select clearable size="mini" v-model="basicForm.liacenter" :disabled="sonDisable" @clear="clean('利润中心')" @focus="chooseTreeRefer('LIACENTER_PARAM', false, '利润中心')" style="width: 200px">
                 <el-option v-for="item in liacenterOptions" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
@@ -256,7 +256,7 @@
           <el-table-column show-overflow-tooltip label="物料编码" align="center" prop="materialCode" width="230px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.materialCode" @focus="chooseMaterial(scope.$index)">
+                <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.materialCode" @clear="cleanMx(scope.$index, '物料编码')" @focus="chooseMaterial(scope.$index)">
                   <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseMaterial(scope.$index)"></el-button>
                 </el-input>
               </el-form-item>
@@ -291,7 +291,7 @@
           <el-table-column show-overflow-tooltip label="调出货位" align="center" prop="deliveryAllocationName" width="230px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-input clearable :disabled="sonDisable || isDCCk" size="mini" v-model="scope.row.deliveryAllocationName" @focus="chooseMxHW(scope.$index, 'ALLOCATION_PARAM', true, '调出货位', basicForm.deliveryWarehouse)">
+                <el-input clearable :disabled="sonDisable || isDCCk" size="mini" v-model="scope.row.deliveryAllocationName" @clear="cleanMx(scope.$index, '调出货位')" @focus="chooseMxHW(scope.$index, 'ALLOCATION_PARAM', true, '调出货位', basicForm.deliveryWarehouse)">
                   <el-button size="mini" :disabled="sonDisable || isDCCk" slot="append" icon="el-icon-more" @click="chooseMxHW(scope.$index, 'ALLOCATION_PARAM', true, '调出货位', basicForm.deliveryWarehouse)"></el-button>
                 </el-input>
               </el-form-item>
@@ -300,7 +300,7 @@
           <el-table-column show-overflow-tooltip label="调入部门" align="center" prop="storageDeptName" width="230px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.storageDeptName" @focus="chooseMxBM(scope.$index, 'DEPT_PARAM', true, '调入部门', basicForm.storageInventoryOrg)">
+                <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.storageDeptName" @clear="cleanMx(scope.$index, '调入部门')"  @focus="chooseMxBM(scope.$index, 'DEPT_PARAM', true, '调入部门', basicForm.storageInventoryOrg)">
                   <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseMxBM(scope.$index, 'DEPT_PARAM', true, '调入部门', basicForm.storageInventoryOrg)"></el-button>
                 </el-input>
               </el-form-item>
@@ -309,7 +309,7 @@
           <el-table-column show-overflow-tooltip label="调入货位" align="center" prop="storageAllocationName" width="230px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-input clearable :disabled="sonDisable || isDRCk" size="mini" v-model="scope.row.storageAllocationName" @focus="chooseMxHW(scope.$index, 'ALLOCATION_PARAM', true, '调入货位', basicForm.storageWarehouse)">
+                <el-input clearable :disabled="sonDisable || isDRCk" size="mini" v-model="scope.row.storageAllocationName" @clear="cleanMx(scope.$index, '调入货位')" @focus="chooseMxHW(scope.$index, 'ALLOCATION_PARAM', true, '调入货位', basicForm.storageWarehouse)">
                   <el-button size="mini" :disabled="sonDisable || isDRCk" slot="append" icon="el-icon-more" @click="chooseMxHW(scope.$index, 'ALLOCATION_PARAM', true, '调入货位', basicForm.storageWarehouse)"></el-button>
                 </el-input>
               </el-form-item>
@@ -1141,6 +1141,68 @@ export default {
       this.referCondition.pkOrg = pkOrg
       this.$refs.refer.init(this.referCondition)
     },
+    // 选择框彻底清空
+    clean(val) {
+      if (val == '调出库存组织') {
+        this.basicForm.deliveryInventoryOrg = ''
+        this.basicForm.deliveryInventoryOrgCode = ''
+        this.basicForm.deliveryInventoryOrgName = ''
+      }
+      if (val == '调入库存组织') {
+        this.basicForm.storageInventoryOrg = ''
+        this.basicForm.storageInventory = ''
+        this.basicForm.storageInventoryOrgName = ''
+      }
+      if (val == '调出业务员') {
+        this.basicForm.businessPersonal = ''
+        this.basicForm.businessPersonalName = ''
+      }
+      if (val == '调入仓库') {
+        this.basicForm.storageWarehouse = ''
+        this.basicForm.storageWarehouseName = ''
+      }
+      if (val == '调出仓库') {
+        this.basicForm.deliveryWarehouse = ''
+        this.basicForm.deliveryWarehouseCode = ''
+        this.basicForm.deliveryWarehouseName = ''
+      }
+      if (val == '利润中心') {
+        this.basicForm.liacenter = ''
+        this.basicForm.liacenterName = ''
+      }
+    },
+    // 明细选择框清空
+    cleanMx(index, val) {
+      if (val == '物料编码') {
+        this.materialInfo[index].material = ''
+        this.materialInfo[index].materialCode = ''
+        this.materialInfo[index].materialName = ''
+        this.materialInfo[index].specification = ''
+        this.materialInfo[index].model = ''
+        this.materialInfo[index].originPlace = ''
+        this.materialInfo[index].originPlaceName = ''
+        this.materialInfo[index].unit = ''
+        this.materialInfo[index].mainUnit = ''
+        this.materialInfo[index].unitName = ''
+        this.materialInfo[index].mainUnitName = ''
+        this.materialInfo[index].manufacturer = ''
+        this.materialInfo[index].marketingApprovalPersonal = ''
+        this.materialInfo[index].production = ''
+        this.materialInfo[index].unitCode = ''
+      }
+      if (val == '调出货位') {
+        this.materialInfo[index].deliveryAllocationName = ''
+        this.materialInfo[index].deliveryAllocation = ''
+      }
+      if (val == '调入部门') {
+        this.materialInfo[index].storageDeptName = ''
+        this.materialInfo[index].storageDept = ''
+      }
+      if (val == '调入货位') {
+        this.materialInfo[index].storageAllocationName = ''
+        this.materialInfo[index].storageAllocation = ''
+      }
+    },
   }
 }
 </script>