Переглянути джерело

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

002201 1 рік тому
батько
коміт
58dfaeec15

+ 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"

+ 18 - 2
src/views/purchase/purchase-order/add/column.js

@@ -148,6 +148,7 @@ export const Columns = [
     title: "价税合计", 
     inputType: "InputNumber",
     controlsPosition: "right", 
+    precision:2,
     isShow:true, 
     disabled:true,
   },
@@ -156,6 +157,7 @@ export const Columns = [
     title: "原始总金额", 
     inputType: "InputNumber",
     controlsPosition: "right", 
+    precision:2,
     isShow:true, 
     disabled:true,
   },
@@ -164,6 +166,7 @@ export const Columns = [
     title: "无税金额", 
     inputType: "InputNumber",  
     controlsPosition: "right",
+    precision:2,
     isShow:true, 
     disabled:true,
   },
@@ -225,6 +228,7 @@ export const Columns = [
     title: "订单使用返利金额", 
     inputType: "InputNumber",
     controlsPosition: "right",
+    precision:2,
     isShow:true, 
   },
   { 
@@ -232,6 +236,7 @@ export const Columns = [
     title: "订单抵扣余款金额", 
     inputType: "InputNumber",
     controlsPosition: "right",
+    precision:2,
     isShow:true, 
   },
   { 
@@ -355,6 +360,7 @@ export const Columns = [
     title: "累计付款申请金额", 
     inputType: "InputNumber", 
     controlsPosition: "right",
+    precision:2,
     isShow:true,
     disabled:true,
   },
@@ -363,6 +369,7 @@ export const Columns = [
     title: "累计付款金额", 
     inputType: "InputNumber", 
     controlsPosition: "right",
+    precision:2,
     isShow:true,
   },
   { 
@@ -370,6 +377,7 @@ export const Columns = [
     title: "发票金额", 
     inputType: "InputNumber",
     controlsPosition: "right",
+    precision:2,
     isShow:true,
    },
   {
@@ -577,7 +585,6 @@ export const TabColumns = [
         key: "isMedcine",
         title: "医药物料", 
         inputType: "Checkbox", 
-        width: 180,
         disabled:true,
         readonly:true,
         },
@@ -635,6 +642,7 @@ export const TabColumns = [
         title: "含税单价", 
         inputType: "InputNumber",
         controlsPosition: "right",
+        precision:2,
         require: true,
         disabled:true,
         width: 180,
@@ -644,13 +652,17 @@ export const TabColumns = [
         title: "价税合计", 
         inputType: "InputNumber",
         controlsPosition: "right",
+        precision:2,
         disabled:true,
         width: 180,
        },
       { //materialRate  materialRateName
         key: "tax", 
         title: "税率",
-        inputType: "Input",
+        // inputType: "Input",
+        inputType: "InputNumber",
+        controlsPosition: "right",
+        precision:2,
         disabled:true,
         width: 180,
       },
@@ -659,6 +671,7 @@ export const TabColumns = [
         title: "折扣金额", 
         inputType: "InputNumber",
         controlsPosition: "right",
+        precision:2,
         disabled:true,
         width: 180,
        },
@@ -683,6 +696,7 @@ export const TabColumns = [
         title: "无税单价",
         inputType: "InputNumber",
         controlsPosition: "right",
+        precision:2,
         disabled:true,
         width: 180,
       },
@@ -691,6 +705,7 @@ export const TabColumns = [
         title: "无税金额", 
         inputType: "InputNumber", 
         controlsPosition: "right",
+        precision:2,
         disabled:true,
         width: 180,
       },
@@ -793,6 +808,7 @@ export const TabColumns = [
         title: "原始金额", 
         inputType: "InputNumber", 
         controlsPosition: "right",
+        precision:2,
         disabled:true,
         width: 180,
       },

+ 2 - 0
src/views/purchase/purchase-order/add/index.vue

@@ -564,6 +564,7 @@ export default {
               <el-input-number
                 v-if="column.inputType === 'InputNumber'"
                 v-model="params[column.key]"
+                :precision="column.precision"
                 :controls-position="column.controlsPosition"
                 :placeholder="column.placeholder"
                 :clearable="column.clearable"
@@ -708,6 +709,7 @@ export default {
                     <el-input-number
                       v-if="cColumn.inputType === 'InputNumber'"
                       v-model="scope.row[cColumn.key]"
+                      :precision="cColumn.precision"
                       :controls-position="cColumn.controlsPosition"
                       :placeholder="cColumn.placeholder"
                       @change="handleInputChange(scope.row, cColumn.key)"

+ 2 - 0
src/views/purchase/purchase-order/edit/index.vue

@@ -462,6 +462,7 @@ export default {
                 ></el-input>
               <el-input-number v-if="column.inputType === 'InputNumber'" 
                 v-model="params[column.key]"
+                :precision="column.precision"
                 :max="handleIsRevise(params.status) ? params[column.key] : Infinity"
                 :controls-position="column.controlsPosition" 
                 :placeholder="column.placeholder"
@@ -619,6 +620,7 @@ export default {
                   ></el-checkbox>
                   <el-input-number v-if="cColumn.inputType === 'InputNumber'" 
                     v-model="scope.row[cColumn.key]"
+                    :precision="cColumn.precision"
                     :controls-position="cColumn.controlsPosition"
                     :max="handleIsRevise(params.status) ? scope.row[cColumn.key] : Infinity"
                     @change="handleInputChange(scope.row, cColumn.key)" 

+ 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>