ソースを参照

Merge branch 'purchaseDev' into 'dev'

Purchase dev

See merge request new-business/drp-web!69
黄梓星 2 年 前
コミット
87b7e79fe6

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

@@ -263,11 +263,12 @@
           :data="tableList" 
           fit
           show-summary
+          :summary-method="getSummaries"
           max-height="480"
           @selection-change="handleSelectionChange"
           :key="isUpdate"
         >
-          <el-table-column type="selection" width="55" />
+          <el-table-column type="selection" width="60" />
           <el-table-column label="行状态" align="center" prop="status" width="120px" :formatter="hangStatus"/>
           <el-table-column label="一级品类" align="center" prop="materialClassifyOneName" width="120px"/>
           <el-table-column label="物料编码" align="center" prop="materialCode" width="180px"/>
@@ -499,6 +500,31 @@ export default {
     this.getList(this.queryParams)
   },
   methods: {
+    // 指定列合计
+    getSummaries(param) {
+      const { columns, data } = param;
+      const sums = [];
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = '合计';
+          return;
+        }
+        const values = data.map(item => Number(item[column.property]));
+        if (column.property === 'demandNum' || column.property === 'netDemandNum' || column.property === 'artificialAdjust' || column.property === 'suggestBuyQty' || column.property === 'finalBuyQty') {
+          sums[index] = values.reduce((prev, curr) => {
+            const value = Number(curr);
+            if (!isNaN(value)) {
+              return prev + curr;
+            } else {
+              return prev;
+            }
+          }, 0);
+          sums[index];
+
+        }
+      });
+      return sums
+    },
     // 搜索
     search() {
       this.getList(this.queryParams)

+ 40 - 14
src/views/purchase/PurchaseDemandList/add.vue

@@ -219,7 +219,7 @@
           <el-table-column label="预留数量" align="center"  prop="reservedQty" width="150px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-input clearable :readonly="sonDisable" size="small" v-model="scope.row.reservedQty"/>
+                <el-input readonly size="small" v-model="scope.row.reservedQty"/>
               </el-form-item>
             </template>
           </el-table-column>
@@ -332,7 +332,7 @@
           <el-table-column label="收货仓库" align="center"  prop="deliveryWarehouseName" width="200px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.deliveryWarehouseName" @focus="chooseDept(scope.$index, 'WAREHOUSE_PARAM', true, '选择收货仓库')">
+                <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.deliveryWarehouseName" @clear="clearHang(scope.$index, '选择收货仓库')" @focus="chooseDept(scope.$index, 'WAREHOUSE_PARAM', true, '选择收货仓库')">
                   <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>
@@ -341,7 +341,7 @@
           <el-table-column label="收货货位" align="center"  prop="deliveryAllocationName" width="200px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.deliveryAllocationName" @focus="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)">
+                <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.deliveryAllocationName" @clear="clearHang(scope.$index, '选择收货货位')" @focus="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)">
                   <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>
@@ -364,7 +364,7 @@
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column label="默认采购组织" align="center"  prop="purOrgName" width="200px"/>
+          <el-table-column label="默认采购组织" align="center"  prop="purOrgName" width="200px"/>yu
           <el-table-column label="默认采购组织编码" align="center"  prop="puOrg" width="200px"/>
           <!-- <el-table-column label="末级供应调拨待入量" align="center"  prop="lastStockQty" width="150px"/> -->
           <!-- <el-table-column label="上级供应中心现存量" align="center"  prop="superiorCenterQty" width="200px"/> -->
@@ -387,8 +387,8 @@
           <el-table-column label="补单供应商编码" align="center"  prop="additionalSupplier" width="200px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.additionalSupplier" @focus="chooseDept(scope.$index, 'SUPPLIER_PARAM', true, '选择补单供应商')">
-                  <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'SUPPLIER_PARAM', true, '选择补单供应商')"></el-button>
+                <el-input clearable :disabled="sonDisable || BDZT" size="small" v-model="scope.row.additionalSupplier" @focus="chooseDept(scope.$index, 'SUPPLIER_PARAM', true, '选择补单供应商')">
+                  <el-button size="small" :disabled="sonDisable || BDZT" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'SUPPLIER_PARAM', true, '选择补单供应商')"></el-button>
                 </el-input>
               </el-form-item>
             </template>
@@ -416,7 +416,7 @@
           <el-table-column label="收货地址" align="center"  prop="deliveryAddressName" width="200px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.deliveryAddressName" @focus="chooseDept(scope.$index, 'ADDRESS_PARAM', true, '选择收货地址')">
+                <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.deliveryAddressName" @clear="clearHang(scope.$index, '选择收货地址')" @focus="chooseDept(scope.$index, 'ADDRESS_PARAM', true, '选择收货地址')">
                   <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'ADDRESS_PARAM', true, '选择收货地址')"></el-button>
                 </el-input>
               </el-form-item>
@@ -500,6 +500,8 @@ export default {
       // 不能直接改变props传来的值
       sonPageStu: this.pageStu,
       sonDisable: this.disable,
+      // BDZT是补单供应商是否可以编辑条件
+      BDZT: true,
       dialog: {
         config: false
       },
@@ -560,9 +562,15 @@ export default {
     // 更改业务类型调整明细行内补单或紧急标识
     changeBillType() {
       if (this.basicForm.billType == 'BDXQ' && this.basicForm.puDemandItemList.length != 0) {
+        this.BDZT = false
         this.basicForm.puDemandItemList.forEach(item => {item.isReplenishment = 'Y'})
       } else {
-        this.basicForm.puDemandItemList.forEach(item => { item.isReplenishment = 'N' })
+        this.BDZT = true
+        this.basicForm.puDemandItemList.forEach(item => { 
+          item.isReplenishment = 'N' 
+          item.additionalSupplier = null
+          item.additionalSupplierName = null
+        })
       }
       if (this.basicForm.billType == 'JJXQ' && this.basicForm.puDemandItemList.length != 0) {
         this.basicForm.puDemandItemList.forEach(item => {item.isUrgency = 'Y'})
@@ -650,8 +658,6 @@ export default {
         status: null,
         businessDept: null,
         businessDeptName: null,
-        customer: this.basicForm.customer,
-        customerName: this.basicForm.customerName,
         materialCategory: null,
         buyer: null,
         buyerName: null,
@@ -717,8 +723,8 @@ export default {
         additionalSupplier: null,
         additionalSupplierName: null,
         periodUnit: null,
-        demandCustomer: null,
-        demandCustomerName: null,
+        demandCustomer: this.basicForm.customer,
+        demandCustomerName: this.basicForm.customerName,
         lastStockOrg: null,
         lastStockOrgName: null,
         superiorStockOrg: null,
@@ -855,7 +861,7 @@ export default {
         this.basicForm.puDemandItemList[this.tableIndex].deliveryAllocationName = selection[0].name
       }
       if(this.referConditionMx.title == '选择补单供应商') {
-        this.basicForm.puDemandItemList[this.tableIndex].additionalSupplier = selection[0].id
+        this.basicForm.puDemandItemList[this.tableIndex].additionalSupplier = selection[0].code
         this.basicForm.puDemandItemList[this.tableIndex].additionalSupplierName = selection[0].name
       }
       if(this.referConditionMx.title == '选择收货地址') {
@@ -958,7 +964,27 @@ export default {
       } else {
         this.$modal.msgWarning("请先选择收货仓库");
       }
-    }
+    },
+    // 明细行清空收货仓库,货位,收货地址档案等
+    clearHang(index, title) {
+      if (title == '选择收货仓库') {
+        this.basicForm.puDemandItemList[index].deliveryWarehouseName = null
+        this.basicForm.puDemandItemList[index].deliveryWarehouse = null
+        this.basicForm.puDemandItemList[index].deliveryAllocationName = null
+        this.basicForm.puDemandItemList[index].deliveryAllocation = null
+      }
+      if (title == '选择收货货位') {
+        this.basicForm.puDemandItemList[index].deliveryAllocationName = null
+        this.basicForm.puDemandItemList[index].deliveryAllocation = null
+      }
+      if (title == '选择收货地址') {
+        this.basicForm.puDemandItemList[index].deliveryAddressName = null
+        this.basicForm.puDemandItemList[index].deliveryAddress = null
+        this.basicForm.puDemandItemList[index].contacts = null
+        this.basicForm.puDemandItemList[index].contactsPhone = null
+        this.basicForm.puDemandItemList[index].address = null
+      }
+    },
   }
 }
 </script>

+ 128 - 19
src/views/purchase/purchase-order/add/column.js

@@ -386,6 +386,20 @@ export const TabColumns = [
           material: "id",
           materialName: "name",
           materialCode: "code",
+          materialClassify:'classifyIdName',
+          materialManufacturersCode:'manufacturersMaterialCode',
+          specification:'specification',
+          model:'model',
+          isMedcine:'isMedicineValue',
+          manufacturer:'manufacturerIdName',
+          unit:'unitIdName',
+          tax:'materialRateName',
+          storageCondition:'storageCondition',
+          carriageCondition:'transportationCondition',
+          materialClassifyOneName:'threeClass',
+          materialClassifyTwoName:'twoClass',
+          materialClassifyThreeName:'threeClass',
+          materialClassifyFourName:'fourClass',
         },
         queryParams: () => ({}),
       },
@@ -395,14 +409,52 @@ export const TabColumns = [
         inputType: "Input",
         width: 180,
       },
-      { key: "materialClassify", title: "物料分类", inputType: "Input", width: 180 },
-      { key: "materialManufacturersCode", title: "厂家物料编码", inputType: "Input", width: 180 },
-      { key: "specification", title: "规格", inputType: "Input", width: 180 },
-      { key: "model", title: "型号", inputType: "Input", },
-      { key: "isMedcine", title: "医药物料", inputType: "Input", width: 180 },
-      { key: "manufacturer", title: "生产厂家代理人", inputType: "Input", width: 180 },
-      { key: "isDrug", title: "物料药品属性", inputType: "Input", width: 180 },
-      { key: "unit", title: "单位", inputType: "Input", },
+      { //classifyIdName   classifyId
+        key: "materialClassify",
+        title: "物料分类", 
+        inputType: "Input",
+        width: 180 
+      },
+      { // manufacturersMaterialCode  manufacturersMaterialName
+        key: "materialManufacturersCode",
+         title: "厂家物料编码", 
+         inputType: "Input",
+          width: 180
+         },
+      { //specification
+        key: "specification",
+         title: "规格", 
+         inputType: "Input",
+          width: 180 
+        },
+      { //model
+        key: "model",
+         title: "型号", 
+         inputType: "Input",
+         },
+      { //isMedicine  isMedicineValue
+        key: "isMedcine",
+         title: "医药物料", 
+         inputType: "Input", 
+         width: 180 
+        },
+      { // manufacturerId  manufacturerIdName
+        key: "manufacturer",
+        title: "生产厂家代理人",
+        inputType: "Input",
+        width: 180 
+      },
+      { 
+        key: "isDrug",
+         title: "物料药品属性", 
+         inputType: "Input", 
+         width: 180 
+        },
+      { //unitId  unitIdName
+        key: "unit", 
+        title: "单位", 
+        inputType: "Input",
+       },
       {
         key: "qty",
         title: "数量",
@@ -412,7 +464,11 @@ export const TabColumns = [
       },
       { key: "taxPrice", title: "含税单价", inputType: "Input", },
       { key: "money", title: "价税合计", inputType: "Input", },
-      { key: "tax", title: "税率", inputType: "Input", },
+      { //materialRate  materialRateName
+        key: "tax", 
+        title: "税率",
+         inputType: "Input",
+         },
       { key: "taxDeductMoneya", title: "折扣金额", inputType: "Input", },
       { key: "arrivalQty", title: "已到货数量", inputType: "Input", },
       { key: "unarrivedQty", title: "未到货数量", inputType: "Input", },
@@ -440,18 +496,33 @@ export const TabColumns = [
       { key: "address", title: "收货地址", inputType: "Input", width: 180 },
       { key: "productBatch", title: "产品批号", inputType: "Input", width: 180 },
       { key: "manufactureDate", title: "生产日期", inputType: "Input", width: 180 },
-      { key: "efficacyLoseDate", title: "有效期至/失效日期", inputType: "Input", width: 180 },
-      { key: "approvalNumber", title: "批准文号", inputType: "Input", width: 180 },
-      { key: "registration", title: "注册证号", inputType: "Input", width: 180 },
+      { 
+        key: "efficacyLoseDate", 
+        title: "有效期至/失效日期", 
+        inputType: "Input",
+         width: 180
+         },
+      { 
+        key: "approvalNumber",
+         title: "批准文号",
+          inputType: "Input", 
+          width: 180
+         },
+      { 
+        key: "registration",
+         title: "注册证号", 
+         inputType: "Input", 
+         width: 180 
+        },
 
-      {
+      { //storageCondition storageConditionName
         key: "storageCondition",
         title: "存储条件",
         inputType: "Select",
         referName: "sys_storage_condition", // 字典名
         width: 180
       },
-      {
+      { // transportationCondition  transportationConditionName
         key: "carriageCondition",
         title: "运输条件",
         inputType: "Select",
@@ -484,11 +555,35 @@ export const TabColumns = [
       { key: "isDistributionPrice", title: "配送价", inputType: "Input", },
       { key: "createByName", title: "创建人名称", inputType: "Input", },
       { key: "updateByName", title: "更新人名称", inputType: "Input", },
-      { key: "materialClassifyOneName", title: "物料一级分类名称", inputType: "Input", width: 180 },
-      { key: "materialClassifyTwoName", title: "物料二级分类名称", inputType: "Input", width: 180 },
-      { key: "materialClassifyThreeName", title: "物料三级分类名称", inputType: "Input", width: 180 },
-      { key: "materialClassifyFourName", title: "物料四级分类名称", inputType: "Input", width: 180 },
-      { key: "price", title: "无税单价", inputType: "Input", }
+      { //threeClass
+        key: "materialClassifyOneName", 
+        title: "物料一级分类名称", 
+        inputType: "Input",
+         width: 180 
+        },
+      { //twoClass
+        key: "materialClassifyTwoName",
+         title: "物料二级分类名称", 
+         inputType: "Input",
+          width: 180
+         },
+      { //threeClass
+        key: "materialClassifyThreeName", 
+        title: "物料三级分类名称", 
+        inputType: "Input", 
+        width: 180 
+      },
+      { //fourClass
+        key: "materialClassifyFourName", 
+        title: "物料四级分类名称",
+         inputType: "Input", 
+         width: 180 
+        },
+      { 
+        key: "price",
+        title: "无税单价",
+        inputType: "Input",
+      }
     ]
   },
   {
@@ -507,6 +602,20 @@ export const TabColumns = [
           material: "id",
           materialName: "name",
           materialCode: "code",
+          materialClassify:'classifyIdName',
+          materialManufacturersCode:'manufacturersMaterialCode',
+          specification:'specification',
+          model:'model',
+          isMedcine:'isMedicineValue',
+          manufacturer:'manufacturerIdName',
+          unit:'unitIdName',
+          tax:'materialRateName',
+          storageCondition:'storageCondition',
+          carriageCondition:'transportationCondition',
+          materialClassifyOneName:'threeClass',
+          materialClassifyTwoName:'twoClass',
+          materialClassifyThreeName:'threeClass',
+          materialClassifyFourName:'fourClass'
         },
         queryParams: () => ({}),
         width: 180

+ 169 - 70
src/views/purchase/purchase-order/add/index.vue

@@ -294,9 +294,22 @@ export default {
 };
 </script>
 <template>
-  <el-drawer direction="btt" size="100%" :with-header="false" :visible.sync="visible" @open="beforeOpen"
-    @close="$emit('close')">
-    <el-form size="mini" label-position="right" ref="orderAddForm" label-width="140px" :model="params" :rules="rules">
+  <el-drawer 
+    direction="btt" 
+    size="100%" 
+    :with-header="false" 
+    :visible.sync="visible"
+    @open="beforeOpen"
+    @close="$emit('close')"
+    >
+    <el-form 
+      size="mini" 
+      label-position="right" 
+      ref="orderAddForm" 
+      label-width="140px" 
+      :model="params" 
+      :rules="rules"
+      >
       <el-card :body-style="{
         padding: '20px',
         display: 'flex',
@@ -320,49 +333,99 @@ export default {
           <el-col v-for="(column, index) in columns" :key="index" :span="column.span || 6">
             <el-form-item :prop="column.key" :label="column.title" v-if="column.isShow">
 
-              <el-input v-if="column.inputType === 'Input'" v-model="params[column.key]" :placeholder="column.placeholder"
-                :clearable="column.clearable" :disabled="column.disabled" style="width: 100%">
+              <el-input v-if="column.inputType === 'Input'" 
+                v-model="params[column.key]" 
+                :placeholder="column.placeholder"
+                :clearable="column.clearable" 
+                :disabled="column.disabled" 
+                style="width: 100%"
+                >
               </el-input>
-              <dr-popover-select v-if="column.inputType === 'PopoverSelect'" v-model="params[column.key]"
-                :value-key="column.valueKey" :source.sync="params" :title="column.title" :type="column.referName"
-                :multiple="column.multiple" :placeholder="column.placeholder" :data-mapping="column.dataMapping"
-                :query-params="column.queryParams(params)">
-              </dr-popover-select>
-
-              <el-input v-if="column.inputType === 'Textarea'" v-model="params[column.key]" type="textarea"
-                :placeholder="column.placeholder" :clearable="column.clearable" :disabled="column.disabled"
-                style="width: 100%">
-              </el-input>
-
-              <el-input-number v-if="column.inputType === 'InputNumber'" v-model="params[column.key]"
-                :controls-position="column.controlsPosition" :placeholder="column.placeholder"
-                :clearable="column.clearable" :disabled="column.disabled" style="width: 100%">
-              </el-input-number>
-              <el-select v-if="column.inputType === 'Select'" v-model="params[column.key]" :disabled="column.disabled"
-                :clearable="column.clearable" :placeholder="column.placeholder" style="width: 100%">
-                <el-option v-for="item in dict.type[column.referName]" :key="item.value" :label="item.label"
-                  :value="item.value">
-                </el-option>
+              <dr-popover-select v-if="column.inputType === 'PopoverSelect'" 
+                v-model="params[column.key]"
+                :value-key="column.valueKey" 
+                :source.sync="params" 
+                :title="column.title" 
+                :type="column.referName"
+                :multiple="column.multiple" 
+                :placeholder="column.placeholder" 
+                :data-mapping="column.dataMapping"
+                :query-params="column.queryParams(params)"
+                ></dr-popover-select>
+
+              <el-input v-if="column.inputType === 'Textarea'" 
+                v-model="params[column.key]" 
+                type="textarea"
+                :placeholder="column.placeholder" 
+                :clearable="column.clearable" 
+                :disabled="column.disabled"
+                style="width: 100%"
+                ></el-input>
+
+              <el-input-number v-if="column.inputType === 'InputNumber'" 
+                v-model="params[column.key]"
+                :controls-position="column.controlsPosition" 
+                :placeholder="column.placeholder"
+                :clearable="column.clearable" 
+                :disabled="column.disabled" 
+                style="width: 100%"
+                > </el-input-number>
+              <el-select v-if="column.inputType === 'Select'" 
+                v-model="params[column.key]" 
+                :disabled="column.disabled"
+                :clearable="column.clearable" 
+                :placeholder="column.placeholder" 
+                style="width: 100%"
+                >
+                <el-option 
+                  v-for="item in dict.type[column.referName]" 
+                  :key="item.value" 
+                  :label="item.label"
+                  :value="item.value"
+                  ></el-option>
               </el-select>
-              <el-select v-if="column.inputType === 'TagSelect'" v-model="params[column.key]" multiple clearable
-                collapse-tags :placeholder="column.placeholder" :clearable="column.clearable" :disabled="column.disabled"
-                style="width: 100%">
+              <el-select v-if="column.inputType === 'TagSelect'" 
+                v-model="params[column.key]" 
+                multiple 
+                clearable
+                collapse-tags 
+                :placeholder="column.placeholder" 
+                :clearable="column.clearable" 
+                :disabled="column.disabled"
+                style="width: 100%"
+                >
                 <template #prefix>
-                  <el-icon class="el-icon-view" style="cursor: pointer" @click.stop="$message.info(234)"></el-icon>
+                  <el-icon 
+                    class="el-icon-view" 
+                    style="cursor: pointer" 
+                    @click.stop="$message.info(234)">
+                  </el-icon>
                 </template>
-                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
-                </el-option>
+                <el-option 
+                  v-for="item in options" 
+                  :key="item.value" 
+                  :label="item.label" 
+                  :value="item.value"
+                  ></el-option>
               </el-select>
-              <el-date-picker v-if="column.inputType === 'DatePicker'" v-model="params[column.key]" :type="column.type"
-                :placeholder="column.placeholder" :clearable="column.clearable" :disabled="column.disabled"
-                :picker-options="column.pickerOptions" style="width: 100%">
-              </el-date-picker>
-              <el-checkbox v-if="column.inputType === 'Checkbox'" v-model="params[column.key]" true-label="Y"
-                false-label="N">
-              </el-checkbox>
-              <file-upload-center v-if="column.inputType === 'Upload'" v-model="params[column.key]"
-                :file-type="column.fileType">
-              </file-upload-center>
+              <el-date-picker v-if="column.inputType === 'DatePicker'" 
+                v-model="params[column.key]" 
+                :type="column.type"
+                :placeholder="column.placeholder" 
+                :clearable="column.clearable" 
+                :disabled="column.disabled"
+                :picker-options="column.pickerOptions" 
+                style="width: 100%"
+                ></el-date-picker>
+              <el-checkbox v-if="column.inputType === 'Checkbox'" 
+                v-model="params[column.key]" 
+                true-label="Y"
+                false-label="N"
+                ></el-checkbox>
+              <file-upload-center v-if="column.inputType === 'Upload'" 
+                v-model="params[column.key]"
+                :file-type="column.fileType"
+                ></file-upload-center>
             </el-form-item>
           </el-col>
         </el-row>
@@ -375,45 +438,81 @@ export default {
         position: 'relative',
       }" style="margin: 10px">
         <el-tabs v-model="tabName" style="width: 100%">
-          <el-tab-pane v-for="(column, index) in tabColumns" :key="index" :label="column.title" :name="column.key">
+          <el-tab-pane 
+            v-for="(column, index) in tabColumns" 
+            :key="index" 
+            :label="column.title" 
+            :name="column.key"
+            >
             <el-table :data="params[column.key]" style="width: 100%">
-              <el-table-column v-for="(cColumn, cIndex) in column.tableColumns" :key="cIndex" :prop="cColumn.key"
-                :label="cColumn.title" :width="cColumn.width || 80">
+              <el-table-column 
+                v-for="(cColumn, cIndex) in column.tableColumns" 
+                :key="cIndex" 
+                :prop="cColumn.key"
+                :label="cColumn.title" 
+                :width="cColumn.width || 80"
+                >
                 <template slot-scope="scope">
                   <el-tag v-if="cColumn.key === 'index'">
                     {{ scope.$index + 1 }}
                   </el-tag>
-                  <el-input v-if="cColumn.inputType === 'Input'" v-model="scope.row[cColumn.key]"
-                    :placeholder="cColumn.placeholder" :clearable="cColumn.clearable" :disabled="cColumn.disabled"
-                    size="mini" style="width: 100%">
-                  </el-input>
+                  <el-input v-if="cColumn.inputType === 'Input'" 
+                    v-model="scope.row[cColumn.key]"
+                    :placeholder="cColumn.placeholder" 
+                    :clearable="cColumn.clearable" 
+                    :disabled="cColumn.disabled"
+                    size="mini" 
+                    style="width: 100%"
+                    ></el-input>
 
                   <!--  -->
-                  <dr-popover-select v-if="cColumn.inputType === 'PopoverSelect'" v-model="scope.row[cColumn.key]"
-                    :source.sync="scope.row" :title="cColumn.title" :value-key="cColumn.valueKey"
-                    :type="cColumn.referName" :multiple="cColumn.multiple" :placeholder="cColumn.placeholder"
-                    :data-mapping="cColumn.dataMapping" :query-params="cColumn.queryParams(scope.row)"
-                    @change="handleReferChange" size="mini">
-                  </dr-popover-select>
-
-                  <el-input-number v-if="cColumn.inputType === 'InputNumber'" v-model="scope.row[cColumn.key]"
-                    :controls-position="cColumn.controlsPosition" :placeholder="cColumn.placeholder"
-                    @change="handleInputChange(scope.row, cColumn.key)" :clearable="cColumn.clearable"
-                    :disabled="cColumn.disabled" size="mini" style="width: 100%">
-                  </el-input-number>
-
-                  <el-select v-if="cColumn.inputType === 'Select'" v-model="scope.row[cColumn.key]" size="mini"
-                    :disabled="cColumn.disabled" :clearable="cColumn.clearable" :placeholder="cColumn.placeholder"
-                    style="width: 100%">
-                    <el-option v-for="item in dict.type[cColumn.referName]" :key="item.value" :label="item.label"
-                      :value="item.value">
-                    </el-option>
+                  <dr-popover-select v-if="cColumn.inputType === 'PopoverSelect'" 
+                    v-model="scope.row[cColumn.key]"
+                    :source.sync="scope.row" 
+                    :title="cColumn.title" 
+                    :value-key="cColumn.valueKey"
+                    :type="cColumn.referName" 
+                    :multiple="cColumn.multiple" 
+                    :placeholder="cColumn.placeholder"
+                    :data-mapping="cColumn.dataMapping" 
+                    :query-params="cColumn.queryParams(scope.row)"
+                    @change="handleReferChange" 
+                    size="mini"
+                    > </dr-popover-select>
+
+                  <el-input-number v-if="cColumn.inputType === 'InputNumber'" 
+                    v-model="scope.row[cColumn.key]"
+                    :controls-position="cColumn.controlsPosition" 
+                    :placeholder="cColumn.placeholder"
+                    @change="handleInputChange(scope.row, cColumn.key)" 
+                    :clearable="cColumn.clearable"
+                    :disabled="cColumn.disabled" 
+                    size="mini" 
+                    style="width: 100%"
+                    ></el-input-number>
+
+                  <el-select v-if="cColumn.inputType === 'Select'" 
+                    v-model="scope.row[cColumn.key]" 
+                    size="mini"
+                    :disabled="cColumn.disabled" 
+                    :clearable="cColumn.clearable" 
+                    :placeholder="cColumn.placeholder"
+                    style="width: 100%"
+                    >
+                    <el-option 
+                      v-for="item in dict.type[cColumn.referName]" 
+                      :key="item.value" 
+                      :label="item.label"
+                      :value="item.value"
+                      ></el-option>
                   </el-select>
 
 
-                  <el-checkbox v-if="cColumn.inputType === 'Checkbox'" v-model="scope.row[cColumn.key]" true-label="Y"
-                    false-label="N">
-                  </el-checkbox>
+                  <el-checkbox v-if="cColumn.inputType === 'Checkbox'" 
+                    v-model="scope.row[cColumn.key]" 
+                    true-label="Y"
+                    false-label="N"
+                    ></el-checkbox>
 
                 </template>
               </el-table-column>

+ 181 - 73
src/views/purchase/purchase-order/edit/index.vue

@@ -52,14 +52,16 @@ export default {
     },
     'params.puOrderItemList': {
       handler(nVal, oVal) {
-        this.params.source == 3 && this.handleSynchronousMaterial('puOrderItemList', 'puOrderExecuteList');
+        this.params.source == 3 &&
+         this.handleSynchronousMaterial('puOrderItemList', 'puOrderExecuteList');
       },
       deep: true,
       immediate: true
     },
     'params.puOrderExecuteList': {
       handler(nVal, oVal) {
-        this.params.source == 3 && this.handleSynchronousMaterial('puOrderExecuteList', 'puOrderItemList');
+        this.params.source == 3 && 
+        this.handleSynchronousMaterial('puOrderExecuteList', 'puOrderItemList');
       },
       deep: true,
       immediate: true
@@ -230,10 +232,23 @@ export default {
 };
 </script>
 <template>
-  <el-drawer direction="btt" size="100%" :with-header="false" :visible.sync="visible" @open="beforeOpen"
-    @close="$emit('close')">
-    <el-form v-loading="loading" :size="size" ref="orderEditForm" label-position="right" label-width="140px"
-      :model="params" :rules="rules">
+  <el-drawer 
+    direction="btt" 
+    size="100%" 
+    :with-header="false" 
+    :visible.sync="visible" 
+    @open="beforeOpen"
+    @close="$emit('close')"
+    >
+    <el-form 
+      v-loading="loading" 
+      :size="size" 
+      ref="orderEditForm" 
+      label-position="right" 
+      label-width="140px"
+      :model="params" 
+      :rules="rules"
+      >
       <el-card :body-style="{
         padding: '20px',
         display: 'flex',
@@ -251,50 +266,104 @@ export default {
           </div>
         </div>
         <el-row style="display:flex; flex-wrap: wrap;">
-          <el-col v-for="(column, index) in columns" :key="index" :span="column.span || 6">
+          <el-col 
+            v-for="(column, index) in columns" 
+            :key="index" 
+            :span="column.span || 6"
+            >
             <el-form-item :prop="column.key" :label="column.title" v-if="column.isShow">
-              <el-input v-if="column.inputType === 'Input'" v-model="params[column.key]" :placeholder="column.placeholder"
-                :clearable="column.clearable" :disabled="column.disabled" style="width: 100%">
-              </el-input>
-              <dr-popover-select v-if="column.inputType === 'PopoverSelect'" v-model="params[column.key]" size="mini"
-                :value-key="column.valueKey" :source.sync="params" :title="column.title" :type="column.referName"
-                :multiple="column.multiple" :placeholder="column.placeholder" :data-mapping="column.dataMapping"
-                :disabled="column.disabled" :query-params="column.queryParams(params)">
-              </dr-popover-select>
-              <el-input v-if="column.inputType === 'Textarea'" v-model="params[column.key]" type="textarea"
-                :placeholder="column.placeholder" :clearable="column.clearable" :disabled="column.disabled"
-                style="width: 100%">
-              </el-input>
-              <el-input-number v-if="column.inputType === 'InputNumber'" v-model="params[column.key]"
+
+              <el-input v-if="column.inputType === 'Input'" 
+                v-model="params[column.key]" 
+                :placeholder="column.placeholder"
+                :clearable="column.clearable" 
+                :disabled="column.disabled" 
+                style="width: 100%"
+                ></el-input>
+              <dr-popover-select v-if="column.inputType === 'PopoverSelect'" 
+                v-model="params[column.key]" 
+                size="mini"
+                :value-key="column.valueKey" 
+                :source.sync="params" 
+                :title="column.title" 
+                :type="column.referName"
+                :multiple="column.multiple" 
+                :placeholder="column.placeholder" 
+                :data-mapping="column.dataMapping"
+                :disabled="column.disabled" 
+                :query-params="column.queryParams(params)"
+                ></dr-popover-select>
+              <el-input v-if="column.inputType === 'Textarea'" 
+                v-model="params[column.key]" 
+                type="textarea"
+                :placeholder="column.placeholder" 
+                :clearable="column.clearable" 
+                :disabled="column.disabled"
+                style="width: 100%"
+                ></el-input>
+              <el-input-number v-if="column.inputType === 'InputNumber'" 
+                v-model="params[column.key]"
                 :max="handleIsRevise(params.status) ? params[column.key] : Infinity"
-                :controls-position="column.controlsPosition" :placeholder="column.placeholder"
-                :clearable="column.clearable" :disabled="column.disabled" style="width: 100%">
-              </el-input-number>
-              <el-select v-if="column.inputType === 'Select'" v-model="params[column.key]" :disabled="column.disabled"
-                :clearable="column.clearable" :placeholder="column.placeholder" style="width: 100%">
-                <el-option v-for="item in dict.type[column.referName]" :key="item.value" :label="item.label"
-                  :value="item.value">
-                </el-option>
+                :controls-position="column.controlsPosition" 
+                :placeholder="column.placeholder"
+                :clearable="column.clearable" 
+                :disabled="column.disabled" 
+                style="width: 100%"
+                ></el-input-number>
+              <el-select v-if="column.inputType === 'Select'" 
+                v-model="params[column.key]" 
+                :disabled="column.disabled"
+                :clearable="column.clearable" 
+                :placeholder="column.placeholder" 
+                style="width: 100%"
+                >
+                <el-option 
+                  v-for="item in dict.type[column.referName]" 
+                  :key="item.value" 
+                  :label="item.label"
+                  :value="item.value"
+                  ></el-option>
               </el-select>
-              <el-select v-if="column.inputType === 'TagSelect'" v-model="params[column.key]" multiple clearable
-                collapse-tags :placeholder="column.placeholder" :clearable="column.clearable" :disabled="column.disabled"
-                style="width: 100%">
+              <el-select v-if="column.inputType === 'TagSelect'" 
+                v-model="params[column.key]" 
+                multiple 
+                clearable
+                collapse-tags 
+                :placeholder="column.placeholder" 
+                :clearable="column.clearable" 
+                :disabled="column.disabled"
+                style="width: 100%"
+                >
                 <template #prefix>
                   <el-icon class="el-icon-view" style="cursor: pointer" @click.stop="$message.info(234)"></el-icon>
                 </template>
-                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
-                </el-option>
+                <el-option 
+                  v-for="item in options" 
+                  :key="item.value" 
+                  :label="item.label" 
+                  :value="item.value"
+                  ></el-option>
               </el-select>
-              <el-date-picker v-if="column.inputType === 'DatePicker'" v-model="params[column.key]" :type="column.type"
-                :placeholder="column.placeholder" :clearable="column.clearable" :disabled="column.disabled"
-                :picker-options="column.pickerOptions" style="width: 100%">
-              </el-date-picker>
-              <el-checkbox v-if="column.inputType === 'Checkbox'" v-model="params[column.key]" :disabled="column.disabled"
-                true-label="Y" false-label="N">
-              </el-checkbox>
-              <file-upload-center v-if="column.inputType === 'Upload'" v-model="params[column.key]"
-                :file-type="column.fileType" :disabled="handleIsRevise(params.status)">
-              </file-upload-center>
+              <el-date-picker v-if="column.inputType === 'DatePicker'" 
+                v-model="params[column.key]" 
+                :type="column.type"
+                :placeholder="column.placeholder" 
+                :clearable="column.clearable" 
+                :disabled="column.disabled"
+                :picker-options="column.pickerOptions" 
+                style="width: 100%"
+                ></el-date-picker>
+              <el-checkbox v-if="column.inputType === 'Checkbox'" 
+                v-model="params[column.key]" 
+                :disabled="column.disabled"
+                true-label="Y"
+                false-label="N"
+                > </el-checkbox>
+              <file-upload-center v-if="column.inputType === 'Upload'" 
+                v-model="params[column.key]"
+                :file-type="column.fileType" 
+                :disabled="handleIsRevise(params.status)"
+                ></file-upload-center>
             </el-form-item>
           </el-col>
         </el-row>
@@ -306,50 +375,87 @@ export default {
         position: 'relative',
       }" style="margin: 10px">
         <el-tabs v-model="tabName" style="width: 100%">
-          <el-tab-pane v-for="(column, index) in tabColumns" :key="index" :label="column.title" :name="column.key">
+          <el-tab-pane 
+            v-for="(column, index) in tabColumns" 
+            :key="index" 
+            :label="column.title" 
+            :name="column.key"
+            >
             <el-table :data="params[column.key]" style="width: 100%">
               <el-table-column label="序号">
                 <template slot-scope="scope">
                   {{ scope.$index + 1 }}
                 </template>
               </el-table-column>
-              <el-table-column v-for="(cColumn, cIndex) in column.tableColumns" :key="cIndex" :prop="cColumn.key"
-                :label="cColumn.title" :width="cColumn.width">
+              <el-table-column 
+                v-for="(cColumn, cIndex) in column.tableColumns" 
+                :key="cIndex" 
+                :prop="cColumn.key"
+                :label="cColumn.title" 
+                :width="cColumn.width"
+                >
                 <template slot-scope="scope">
 
                   <span v-if="!cColumn.inputType">
                     {{ scope.row[cColumn.key] }}
                   </span>
 
-                  <el-input v-if="cColumn.inputType === 'Input'" v-model="scope.row[cColumn.key]"
-                    :placeholder="cColumn.placeholder" :clearable="cColumn.clearable" :disabled="cColumn.disabled"
-                    :size="size" style="width: 100%">
-                  </el-input>
+                  <el-input v-if="cColumn.inputType === 'Input'" 
+                    v-model="scope.row[cColumn.key]"
+                    :placeholder="cColumn.placeholder" 
+                    :clearable="cColumn.clearable" 
+                    :disabled="cColumn.disabled"
+                    :size="size" 
+                    style="width: 100%"
+                    ></el-input>
 
-                  <dr-popover-select v-if="cColumn.inputType === 'PopoverSelect'" v-model="scope.row[cColumn.key]"
-                    :source.sync="scope.row" :title="cColumn.title" :value-key="cColumn.valueKey"
-                    :disabled="cColumn.disabled" :type="cColumn.referName" :multiple="cColumn.multiple"
-                    :placeholder="cColumn.placeholder" :data-mapping="cColumn.dataMapping"
-                    :query-params="cColumn.queryParams(scope.row)" size="mini" @change="handleReferChange">
-                  </dr-popover-select>
+                  <dr-popover-select v-if="cColumn.inputType === 'PopoverSelect'" 
+                    v-model="scope.row[cColumn.key]"
+                    :source.sync="scope.row" 
+                    :title="cColumn.title" 
+                    :value-key="cColumn.valueKey"
+                    :disabled="cColumn.disabled" 
+                    :type="cColumn.referName" 
+                    :multiple="cColumn.multiple"
+                    :placeholder="cColumn.placeholder" 
+                    :data-mapping="cColumn.dataMapping"
+                    :query-params="cColumn.queryParams(scope.row)" 
+                    size="mini" 
+                    @change="handleReferChange"
+                  ></dr-popover-select>
 
-                  <el-select v-if="cColumn.inputType === 'Select'" v-model="scope.row[cColumn.key]" size="mini"
-                    :disabled="cColumn.disabled" :clearable="cColumn.clearable" :placeholder="cColumn.placeholder"
-                    style="width: 100%">
-                    <el-option v-for="item in dict.type[cColumn.referName]" :key="item.value" :label="item.label"
-                      :value="item.value">
-                    </el-option>
+                  <el-select v-if="cColumn.inputType === 'Select'" 
+                    v-model="scope.row[cColumn.key]" size="mini"
+                    :disabled="cColumn.disabled" 
+                    :clearable="cColumn.clearable" 
+                    :placeholder="cColumn.placeholder"
+                    style="width: 100%"
+                  >
+                    <el-option 
+                      v-for="item in dict.type[cColumn.referName]" 
+                      :key="item.value" 
+                      :label="item.label"
+                      :value="item.value"
+                    ></el-option>
                   </el-select>
 
-                  <el-checkbox v-if="cColumn.inputType === 'Checkbox'" v-model="scope.row[cColumn.key]"
-                    :disabled="cColumn.disabled" true-label="Y" false-label="N">
-                  </el-checkbox>
-                  <el-input-number v-if="cColumn.inputType === 'InputNumber'" v-model="scope.row[cColumn.key]"
+                  <el-checkbox v-if="cColumn.inputType === 'Checkbox'" 
+                    v-model="scope.row[cColumn.key]"
+                    :disabled="cColumn.disabled" 
+                    true-label="Y" 
+                    false-label="N"
+                  ></el-checkbox>
+                  <el-input-number v-if="cColumn.inputType === 'InputNumber'" 
+                    v-model="scope.row[cColumn.key]"
                     :controls-position="cColumn.controlsPosition"
                     :max="handleIsRevise(params.status) ? scope.row[cColumn.key] : Infinity"
-                    @change="handleInputChange(scope.row, cColumn.key)" :placeholder="cColumn.placeholder"
-                    :clearable="cColumn.clearable" :disabled="cColumn.disabled" :size="size" style="width: 100%">
-                  </el-input-number>
+                    @change="handleInputChange(scope.row, cColumn.key)" 
+                    :placeholder="cColumn.placeholder"
+                    :clearable="cColumn.clearable" 
+                    :disabled="cColumn.disabled" 
+                    :size="size" 
+                    style="width: 100%"
+                  ></el-input-number>
                 </template>
               </el-table-column>
 
@@ -358,10 +464,12 @@ export default {
               编辑:自制:可删可增 -->
               <el-table-column fixed="right" label="操作" width="120">
                 <template slot-scope="scope">
-                  <el-button v-if="params.source == '3' && !handleIsRevise(params.status)" @click.native.prevent="
-                    delTableRow(params[tabName], scope.$index)
-                    " type="text" size="small">
-                    删行
+                  <el-button 
+                    v-if="params.source == '3' && !handleIsRevise(params.status)" 
+                    @click.native.prevent="delTableRow(params[tabName], scope.$index)" 
+                    type="text" 
+                    size="small"
+                    > 删行
                   </el-button>
                 </template>
               </el-table-column>

+ 10 - 5
src/views/purchase/purchase-order/index.vue

@@ -171,18 +171,17 @@ export default {
     async handleSubmit(row) {
       try {
 
-        this.loading = true;
-
         let { code } = await orderApi.submit({ puOrderId: row.id });
 
-        if (code === 200) {
+        if (code == 200) {
+
           this.fetchList(this.params, this.page);
+
         }
 
       } catch (error) {
 
       } finally {
-        this.loading = false;
       }
     },
     // 判断“退回”按钮
@@ -276,7 +275,13 @@ export default {
     <AddDrawer ref="addDrawerFef" @close="handleRefreshList"></AddDrawer>
     <EditDrawer ref="editDrawerFef" @close="handleRefreshList"></EditDrawer>
 
-    <el-form size="mini" label-position="right" label-width="100px" :model="params" style="padding: 20px 0 0 0">
+    <el-form 
+      size="mini" 
+      label-position="right" 
+      label-width="100px" 
+      :model="params" 
+      style="padding: 20px 0 0 0"
+    >
       <el-row :gutter="24" style="display:flex; flex-wrap: wrap;">
         <el-col :span="20">
           <el-row :gutter="20">

+ 4 - 1
src/views/purchase/purchase-order/see/index.vue

@@ -76,7 +76,10 @@ export default {
 };
 </script>
 <template>
-  <el-drawer direction="btt" size="100%" :with-header="false" :visible.sync="visible" @open="beforeOpen"
+  <el-drawer 
+    direction="btt" 
+    size="100%" 
+    :with-header="false" :visible.sync="visible" @open="beforeOpen"
     @close="$emit('close')">
     <el-form size="mini" label-position="right" label-width="140px" :model="params" :rules="rules">
       <el-card :body-style="{

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

@@ -158,7 +158,7 @@
          </el-col>
         <el-col :span="1.5">
             <el-form-item label="调入仓库">
-              <el-select clearable size="small" v-model="basicForm.storageWarehouse" :disabled="sonDisable" @focus="chooseRefer('WAREHOUSE_PARAM', true, '调入仓库', basicForm.storageInventoryOrg, 'N', 'N')" style="width: 200px">
+              <el-select clearable size="small" v-model="basicForm.storageWarehouse" :disabled="sonDisable" @focus="chooseRefer('WAREHOUSE_PARAM', true, '调入仓库', basicForm.storageInventory, '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>
@@ -309,6 +309,19 @@
             </template>
           </el-table-column>
           <el-table-column label="有效期至/失效日期" align="center" prop="periodEndDate" width="150px"/>
+          <el-table-column label="调拨日期" align="center" prop="allotDate" width="230px">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-date-picker
+                  v-model="scope.row.allotDate"
+                  :readonly="sonDisable"
+                  type="date"
+                  size="small"
+                  value-format="yyyy-MM-dd">
+                </el-date-picker>
+              </el-form-item>
+            </template>
+          </el-table-column>
           <el-table-column label="批准文号" align="center" prop="ratifyCode" width="200px"/>
           <el-table-column label="注册证号" align="center" prop="registration" width="200px"/>
           <el-table-column label="商品名" align="center" prop="productCode" width="150px"/>
@@ -606,6 +619,7 @@ export default {
         deliveryCode: '',
         storageCode: '',
         storageInventoryOrg: '',
+        storageInventory: '',
         storageInventoryOrgName: '',
         businessPersonal: '',
         businessPersonalName: '',
@@ -805,6 +819,7 @@ export default {
         producBatch: null,
         manufactureDate: null,
         periodEndDate: null,
+        allotDate: null,
         ratifyCode: null,
         registration: null,
         productCode: null,
@@ -842,6 +857,7 @@ export default {
       if (this.referCondition.title == '调入库存组织') {
         this.ruOrgOptions = selection
         this.basicForm.storageInventoryOrg = selection[0].id
+        this.basicForm.storageInventory = selection[0].code
         this.basicForm.storageInventoryOrgName = selection[0].name
         this.basicForm.onRouteAffilliation = selection[0].name
         // 选择调入库存组织时判断调拨方式

+ 5 - 4
vue.config.js

@@ -46,6 +46,7 @@ module.exports = {
         // target: `http://172.16.13.47:8000/drp-admin`, //石杨本地
         // target: `http://172.16.13.113:8000/drp-admin`, //DWT本地
         // target: `http://172.16.13.77:8000/drp-admin`, //TQ本地
+        // target: `http://127.0.0.1:8000/drp-admin`, //
         changeOrigin: true,
         pathRewrite: {
           ["^" + process.env.VUE_APP_BASE_API]: "",
@@ -143,10 +144,10 @@ module.exports = {
         },
       });
       config.optimization.runtimeChunk("single"),
-        {
-          from: path.resolve(__dirname, "./public/robots.txt"), //防爬虫文件
-          to: "./", //到根目录下
-        };
+      {
+        from: path.resolve(__dirname, "./public/robots.txt"), //防爬虫文件
+        to: "./", //到根目录下
+      };
     });
   },
 };