Преглед изворни кода

Merge branch 'master' of git.echepei.com:zhujiawei/Warehouse_management_ui

wengyuwen пре 4 година
родитељ
комит
bf7325c4cb

+ 5 - 5
src/views/basicdata/warehouse/index.vue

@@ -235,25 +235,25 @@
           <el-table-column type="index" label="序号" align="center"/>
 
           <el-table-column label="库区编号" align="center" prop="fNo" >
-            <template scope="scope">
+            <template slot-scope="scope">
               <el-input v-model="scope.row.fNo"  placeholder="库区编号" />
             </template>
           </el-table-column>
 
           <el-table-column label="库区名称" align="center" prop="fName" >
-            <template scope="scope">
+            <template slot-scope="scope">
               <el-input v-model="scope.row.fName"  placeholder="库区名称" />
             </template>
           </el-table-column>
 
           <el-table-column label="库区地址" align="center" prop="fAddr" >
-            <template scope="scope">
+            <template slot-scope="scope">
               <el-input v-model="scope.row.fAddr"  placeholder="库区地址" />
             </template>
           </el-table-column>
 
           <el-table-column label="备注" align="center" prop="remark" >
-            <template scope="scope">
+            <template slot-scope="scope">
               <el-input v-model="scope.row.remark"  placeholder="备注" />
             </template>
           </el-table-column>
@@ -281,7 +281,7 @@
 </template>
 
 <script>
-import { listWarehouse, getWarehouse, delWarehouse, addWarehouse, updateWarehouse,changeWareStatus, exportWarehouse,delCusCon } from "../../../api/basicdata/warehouse";
+import { listWarehouse, getWarehouse, delWarehouse, addWarehouse,changeWareStatus, exportWarehouse,delCusCon } from "@/api/basicdata/warehouse";
 
 export default {
   name: "Warehouse",

+ 10 - 1
src/views/finance/contrast/index.vue

@@ -314,7 +314,7 @@
         <el-table-column label="提单号" align="center" prop="fMblno" />
         <el-table-column label="业务日期" align="center" prop="fBsdate">
           <template slot-scope="scope">
-            <span>{{scope.row.fBsdate.slice(0,10)}}</span>
+            <span>{{scope.row.fBsdate.slice(0, 10)}}</span>
           </template>
         </el-table-column>
         <el-table-column label="费用名称" align="center" prop="fFeeName" />
@@ -335,6 +335,14 @@
             <span v-else>{{scope.row.fBilltype}}</span>
           </template>
         </el-table-column>
+        <el-table-column label="来源编号" align="center" prop="srcBillNo" />
+        <el-table-column label="提单号" align="center" prop="fMblno" />
+        <el-table-column label="货物品名" align="center" prop="fProductName" />
+        <el-table-column label="品牌" align="center" prop="fMarks" />
+        <el-table-column label="计费起始日期" align="center" prop="fChargedate" />
+        <el-table-column label="计费截止日期" align="center" prop="fBillingDeadline" />
+        <el-table-column label="计费天数" align="center" prop="fBillingDays" />
+        <el-table-column label="库存天数" align="center" prop="fInventoryDays" />
         <el-table-column label="备注" align="center" prop="fRemarks"/>
         <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
           <template slot-scope="scope">
@@ -1095,6 +1103,7 @@ export default {
             this.pass.fName = this.nothing[0] + "..."
           }
           this.DzfeeList = this.DzfeeList.concat(this.selection)
+          console.log(this.selection)
           this.queryParams.tMblno = this.pass.fMblno //提单号
           this.queryParams.fCorpid = this.TWareHouseFees.fToCorpid
           this.queryParams.fCtrlcorpid = this.pass.fName

+ 16 - 1
src/views/startApproval.vue

@@ -22,6 +22,18 @@
             </el-option>
           </el-select>
         </el-form-item>
+
+        <el-form-item disabled label="审批日期">
+                <el-date-picker
+                  v-model="dataForm.createTime"
+                  size="large"
+                  type="date"
+                  disabled
+                  value-format="timestamp"
+                  placeholder="审批日期"
+                >
+                </el-date-picker>
+              </el-form-item>
       </div>
     </el-form>
     <span slot="footer" class="dialog-footer">
@@ -44,7 +56,8 @@ import Global from '@/layout/components/global'
           id: null,
           actId: null,
           auditMsg: null,
-          auditUserId: null
+          auditUserId: null,
+          createTime: new Date
         },
         visible: false,
         optionsBranch: []
@@ -75,6 +88,7 @@ import Global from '@/layout/components/global'
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
+          this.dataForm.createTime = ''
           return  listCharge(this.dataForm,'/warehouse/paths/approved')
           }).then(data => {
             if (data && data.code == 200) {
@@ -119,6 +133,7 @@ import Global from '@/layout/components/global'
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
+          this.dataForm.createTime = ''
           return listCharge(this.dataForm,'/warehouse/paths/approvalRejected')
           }).then(data => {
           if (data && data.code == 200) {

+ 24 - 17
src/views/warehouseBusiness/goodsTransfer/index.vue

@@ -998,6 +998,7 @@
               filterable
               remote
               :remote-method="fWRemoteMethod"
+              @change="changeFeeId(scope.row)"
               placeholder="费用名称"
             >
               <el-option
@@ -1274,6 +1275,7 @@
               remote
               :disabled="browseStatus"
               :remote-method="fWRemoteMethod"
+              @change="changeFeeId(scope.row)"
               placeholder="费用名称"
             >
               <el-option
@@ -1558,6 +1560,13 @@
           >
           </el-table-column>
           <el-table-column
+            prop="fWarehouseids"
+            header-align="center"
+            align="center"
+            label="仓库"
+          >
+          </el-table-column>
+          <el-table-column
             prop="fWarehouseLocationids"
             header-align="center"
             align="center"
@@ -1769,7 +1778,9 @@
         // 日期区间
         orgStorageDate: null,
         // 表单参数
-        form: {},
+        form: {
+          fFeetunit:2
+        },
         // 库存总账参数
         whgenlegParams: {
           pageNum: 1,
@@ -2281,23 +2292,9 @@
       },
       /** 新增按钮操作 */
       handleAdd() {
-        this.form = {
-          fCorpid:'',
-          fTocorpid:'',
-          fBillno:'',
-          fBsdate:'',
-          fChargedate:'',
-          fWarehouseid:'',
-          fStltypeid:'',
-          fFeetunit:'',
-          fTrademodeid:'',
-          fMblno:'',
-          fOriginalbillno:'',
-          orgStorageDate:''
-        }
+        this.reset()
         this.notChange = false
         this.browseStatus = false
-        this.reset()
         this.queryUser()
         this.open = true
         this.dataList = []
@@ -2394,9 +2391,9 @@
 
       /** 修改按钮操作 */
       handleUpdate(row, status) {
+        this.reset()
         this.notChange = false
         this.browseStatus = status
-        this.reset()
         const fId = row.fId || this.ids
         getGoodsTransfer(fId).then((response) => {
           this.form = response.data.warehousebills
@@ -2908,6 +2905,16 @@
           this.goodsOptions = response.rows
         })
       },
+      // 选择费用信息时获取计价单位
+      changeFeeId (row) {
+        for (let li in this.fWbuOptions) {
+          if (row.fFeeid === this.fWbuOptions[li].fId) {
+            this.$set(row, 'fFeeUnitid', this.fWbuOptions[li].fFeeunitid + '')
+            this.changeFeeUnit(row)
+            break
+          }
+        }
+      },
       // 远程模糊查询费用名称
       fWRemoteMethod(name) {
         if (name == null || name === '') {

+ 71 - 18
src/views/warehouseBusiness/inStock/index.vue

@@ -903,7 +903,7 @@
           <el-select
             v-model="form.fBusinessType"
             filterable
-            :disabled="browseStatus"
+            :disabled="contrOl"
           >
             <el-option
               v-for="(dict, index) in businessTypeOption"
@@ -1564,6 +1564,7 @@
               remote
               :disabled="browseStatus"
               :remote-method="fWRemoteMethod"
+              @change="changeFeeId(scope.row)"
               placeholder="费用名称"
             >
               <el-option
@@ -1856,6 +1857,7 @@
               :disabled="browseStatus"
               remote
               :remote-method="fWRemoteMethod"
+              @change="changeFeeId(scope.row)"
               placeholder="费用名称"
             >
               <el-option
@@ -2734,6 +2736,7 @@ export default {
       doNot:false,
       // 修改查看状态
       browseStatus: false,
+      contrOl:false,
       // 审批状态控制
       approvalStatus: false,
       detailsHidden: false,
@@ -2962,7 +2965,8 @@ export default {
       // 表单参数
       form: {
         fBusinessType: '常规入账',
-        fItemsStatus: null
+        fItemsStatus: null,
+        fFeetunit: '2'
       },
       // 表单校验
       rules: {
@@ -3358,6 +3362,13 @@ export default {
     },
     showEditDialog_sss() {
       if (this.Printinglist.length > 0) {
+        // if (!this.form.fId) {
+        //   this.form.fId = this.fid
+        // }
+        if (!this.form.fBusinessType) {
+          this.$message.error('请选择货物属性!')
+          return false
+        }
         for (let li in this.Printinglist) {
           if (!this.Printinglist[li].fBsdate) {
             this.$message.error('请选择入库日期')
@@ -3576,6 +3587,7 @@ export default {
         fBillstatus: 10,
       });
       this.weightList = false;
+      this.contrOl = true
     },
     // 导入付款信息
     whgenlegData() {
@@ -3829,6 +3841,11 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd(status) {
+      this.form = {
+        fBusinessType: '常规入账',
+          fItemsStatus: null,
+          fFeetunit: '2'
+      }
       this.browseStatus = status;
       this.queryUser();
       this.goodsRemoteMethod()
@@ -3845,6 +3862,9 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row, status) {
       this.reset();
+      if (this.dataList.length === 0){
+        this.contrOl = true
+      }
       this.browseStatus = status;
       this.detailsHidden = false;
       this.formBrowseStatus = false;
@@ -4097,6 +4117,20 @@ export default {
     // 入账
     creditClick() {
       this.$refs['form'].validate((valid) => {
+        for (let warehouseCr in this.Printinglist) {
+          if (!this.Printinglist[warehouseCr].fQty || this.Printinglist[warehouseCr].fQty === 0) {
+            this.$message.error("请维护入库件数");
+            return false;
+          }
+          if (!this.Printinglist[warehouseCr].fNetweight || this.Printinglist[warehouseCr].fNetweight === 0) {
+            this.$message.error("请维护入库净重");
+            return false;
+          }
+          if (!this.Printinglist[warehouseCr].fGrossweight || this.Printinglist[warehouseCr].fGrossweight === 0) {
+            this.$message.error("请维护入库毛重");
+            return false;
+          }
+        }
         for (let warehouseCr in this.dataListSelection) {
           if (this.dataListSelection[warehouseCr].fBillstatus === 20) {
             this.$message.error('请先卸货')
@@ -4238,18 +4272,18 @@ export default {
             this.$message.error("请勿重复卸货");
             return false;
           }
-          if (!this.Printinglist[warehouseCr].fQty || this.Printinglist[warehouseCr].fQty === 0) {
-            this.$message.error("请维护入库件数");
-            return false;
-          }
-          if (!this.Printinglist[warehouseCr].fNetweight || this.Printinglist[warehouseCr].fNetweight === 0) {
-            this.$message.error("请维护入库净重");
-            return false;
-          }
-          if (!this.Printinglist[warehouseCr].fGrossweight || this.Printinglist[warehouseCr].fGrossweight === 0) {
-            this.$message.error("请维护入库毛重");
-            return false;
-          }
+          // if (!this.Printinglist[warehouseCr].fQty || this.Printinglist[warehouseCr].fQty === 0) {
+          //   this.$message.error("请维护入库件数");
+          //   return false;
+          // }
+          // if (!this.Printinglist[warehouseCr].fNetweight || this.Printinglist[warehouseCr].fNetweight === 0) {
+          //   this.$message.error("请维护入库净重");
+          //   return false;
+          // }
+          // if (!this.Printinglist[warehouseCr].fGrossweight || this.Printinglist[warehouseCr].fGrossweight === 0) {
+          //   this.$message.error("请维护入库毛重");
+          //   return false;
+          // }
         }
         this.$refs["form"].validate((valid) => {
           if (valid) {
@@ -4312,12 +4346,16 @@ export default {
           this.form.fPlanvolumn = this.fPlanvolumn
           this.form.fGrossweight = this.fGrossweight
           this.form.fQty = this.fQty
-          if (!this.form.fId) {
-            this.form.fId = this.fid
-          }
+          // if (!this.form.fId) {
+          //   this.form.fId = this.fid
+          // }
+          // if (!this.form.fBusinessType) {
+          //   this.$message.error('请选择货物属性!')
+          //   return false
+          // }
           for (let list in this.dataList) {
             if (!this.dataList[list].fBusinessType) {
-              this.$message.error('请输入业务类型!')
+              this.$message.error('请输入库存明细的货物属性!')
               return false
             }
           }
@@ -4360,6 +4398,10 @@ export default {
           this.$message.error('请新增库存明细!')
           return false
         }
+        if (!this.form.fBusinessType) {
+          this.$message.error('请选择货物属性!')
+          return false
+        }
         for (let list in this.dataList) {
           if (!this.dataList[list].fGoodsid) {
             this.$message.error('请输入品名!')
@@ -4442,6 +4484,7 @@ export default {
       rows.splice(index, 1)
       if (this.dataList.length === 0) {
         this.formBrowseStatus = false
+        this.contrOl = false
         return false
       }
       let sum = 0
@@ -4506,6 +4549,16 @@ export default {
         this.goodsOptions = response.rows;
       });
     },
+    // 选择费用信息时获取计价单位
+    changeFeeId (row) {
+      for (let li in this.fWbuOptions) {
+        if (row.fFeeid === this.fWbuOptions[li].fId) {
+          this.$set(row, 'fFeeUnitid', this.fWbuOptions[li].fFeeunitid + '')
+          this.changeFeeUnit(row)
+          break
+        }
+      }
+    },
     // 远程模糊查询费用名称
     fWRemoteMethod(name) {
       if (name == null || name === "") {

+ 106 - 78
src/views/warehouseBusiness/outStock/index.vue

@@ -317,6 +317,7 @@
             size="mini"
             type="text"
             icon="el-icon-delete"
+            v-show="scope.row.fItemsStatus !== 4"
             v-if="scope.row.fBillstatus < 4"
             @click="handleDelete(scope.row)"
             v-hasPermi="['warehouseBusiness:outStock:remove']"
@@ -464,54 +465,7 @@
             </el-form-item>
           </el-col>
         </el-row>
-        <el-row>
-          <el-col :span="8">
-            <el-form-item label="单据编号" prop="fBillno">
-              <el-input
-                v-model="form.fBillno"
-                style="width: 80%"
-                disabled
-                placeholder="单据编号"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :span="8">
-            <el-form-item label="破损" prop="fifdamage">
-              <el-select
-                v-model="form.fIfdamage"
-                placeholder="请选择是否破损"
-                :disabled="browseStatus || formBrowseStatus"
-                clearable
-                style="width: 80%"
-              >
-                <el-option
-                  v-for="(dict, index) in fIfdamageOptions"
-                  :key="index.dictValue"
-                  :label="dict.dictLabel"
-                  :value="dict.dictValue"
-                />
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="8">
-            <el-form-item label="过磅" prop="fifweigh">
-              <el-select
-                v-model="form.fIfweigh"
-                placeholder="请选择是否过磅"
-                :disabled="browseStatus || formBrowseStatus"
-                clearable
-                style="width: 80%"
-              >
-                <el-option
-                  v-for="(dict, index) in fIfweighOptions"
-                  :key="index.dictValue"
-                  :label="dict.dictLabel"
-                  :value="dict.dictValue"
-                />
-              </el-select>
-            </el-form-item>
-          </el-col>
-        </el-row>
+
         <el-row>
           <el-col :span="8">
             <el-form-item label="计划件数">
@@ -551,24 +505,7 @@
           </el-col>
         </el-row>
         <el-row>
-          <el-col :span="8">
-            <el-form-item label="计费单位" prop="fFeetunit">
-              <el-select
-                v-model="form.fFeetunit"
-                placeholder="请选择计费单位"
-                :disabled="browseStatus || formBrowseStatus"
-                clearable
-                style="width: 80%"
-              >
-                <el-option
-                  v-for="(dict, index) in jFeetunitOptions"
-                  :key="index.dictValue"
-                  :label="dict.dictLabel"
-                  :value="dict.dictValue"
-                />
-              </el-select>
-            </el-form-item>
-          </el-col>
+
           <el-col :span="8">
             <el-form-item label="车号" prop="fTruckno">
               <el-input
@@ -631,6 +568,24 @@
                 />
             </el-form-item>
           </el-col>
+          <el-col :span="8">
+            <el-form-item label="计费单位" prop="fFeetunit">
+              <el-select
+                v-model="form.fFeetunit"
+                placeholder="请选择计费单位"
+                :disabled="browseStatus || formBrowseStatus"
+                clearable
+                style="width: 80%"
+              >
+                <el-option
+                  v-for="(dict, index) in jFeetunitOptions"
+                  :key="index.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
         </el-row>
         <el-row>
           <el-form-item label="备注" prop="remark">
@@ -684,6 +639,54 @@
               </el-form-item>
             </el-col>
           </el-row>
+                  <el-row>
+          <el-col :span="8">
+            <el-form-item label="单据编号" prop="fBillno">
+              <el-input
+                v-model="form.fBillno"
+                style="width: 80%"
+                disabled
+                placeholder="单据编号"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="破损" prop="fifdamage">
+              <el-select
+                v-model="form.fIfdamage"
+                placeholder="请选择是否破损"
+                :disabled="browseStatus || formBrowseStatus"
+                clearable
+                style="width: 80%"
+              >
+                <el-option
+                  v-for="(dict, index) in fIfdamageOptions"
+                  :key="index.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="过磅" prop="fifweigh">
+              <el-select
+                v-model="form.fIfweigh"
+                placeholder="请选择是否过磅"
+                :disabled="browseStatus || formBrowseStatus"
+                clearable
+                style="width: 80%"
+              >
+                <el-option
+                  v-for="(dict, index) in fIfweighOptions"
+                  :key="index.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
           <el-row>
             <el-col :span="8">
               <el-form-item label="制单人" prop="createBy">
@@ -775,7 +778,7 @@
           <el-select
             v-model="form.fBusinessType"
             filterable
-            :disabled="browseStatus"
+            :disabled="contrOl"
           >
             <el-option
               v-for="(dict, index) in businessTypeOption"
@@ -1344,6 +1347,7 @@
               remote
               :disabled="browseStatus"
               :remote-method="fWRemoteMethod"
+              @change="changeFeeId(scope.row)"
               placeholder="费用名称"
             >
               <el-option
@@ -1641,6 +1645,7 @@
               remote
               :disabled="browseStatus"
               :remote-method="fWRemoteMethod"
+              @change="changeFeeId(scope.row)"
               placeholder="费用名称"
             >
               <el-option
@@ -1941,6 +1946,13 @@
           >
           </el-table-column>
           <el-table-column
+            prop="fWarehouseids"
+            header-align="center"
+            align="center"
+            label="仓库"
+          >
+          </el-table-column>
+          <el-table-column
             prop="fWarehouseLocationids"
             header-align="center"
             align="center"
@@ -2528,6 +2540,7 @@ export default {
       warehouseDrList: [],
       printinglist: [],
       browseStatus: false,
+      contrOl:false,
       relevantAttachments: [],
       // 非单个禁用
       single: true,
@@ -2662,7 +2675,7 @@ export default {
         fCorpid: null,
         fTrademodeid: null,
         fWarehouseid: null,
-        fBusinessType: '出库装箱'
+        fBusinessType: '出库装箱',
       },
       // 表单校验
       rules: {
@@ -3137,7 +3150,6 @@ export default {
     },
     // 库存总账导出数据
     whgenlegData() {
-
       if (this.dialogWhgenlegList.length === 0) {
         this.$message({ message: "未勾选信息", type: "warning" });
         return false;
@@ -3190,6 +3202,7 @@ export default {
         });
       }
       this.whgenlegVisible = false;
+      this.contrOl = true
     },
     // 收货单打印界面
     showEditDialog_s() {
@@ -3235,14 +3248,14 @@ export default {
           this.$message.error("请先保存!");
           return false;
         }
-        if (!this.printinglist[li].fBusinessType) {
-          this.$message.error('请先维护业务类型!')
-          return false
-        }
-        if (!this.printinglist[li].fMarks) {
-          this.$message.error('请先维护业务详情!')
-          return false
-        }
+        // if (!this.printinglist[li].fBusinessType) {
+        //   this.$message.error('请先维护业务类型!')
+        //   return false
+        // }
+        // if (!this.printinglist[li].fMarks) {
+        //   this.$message.error('请先维护业务详情!')
+        //   return false
+        // }
         if (!this.printinglist[li].fTruckno || this.printinglist[li].fTruckno !== fTruckno) {
           this.$message.error('请填写车号或选择车相同车号')
           return false
@@ -3520,8 +3533,8 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd(status) {
-      this.browseStatus = status;
       this.reset();
+      this.browseStatus = status;
       this.queryUser();
       this.open = true;
       this.detailsHidden = false;
@@ -3531,10 +3544,14 @@ export default {
       this.relevantAttachments = [];
       this.title = "出库单";
       this.formBrowseStatus = false;
+      this.form.fFeetunit = 2
     },
     /** 修改按钮操作 */
     handleUpdate(row, status) {
       this.reset();
+      if (this.dataList.length === 0){
+        this.contrOl = true
+      }
       this.browseStatus = status;
       this.detailsHidden = false;
       this.formBrowseStatus = false;
@@ -4244,6 +4261,7 @@ export default {
       rows.splice(index, 1);
       if (this.dataList.length === 0) {
         this.formBrowseStatus = false
+        this.contrOl = false
         return false
       }
       for (let li in this.dataList) {
@@ -4274,6 +4292,16 @@ export default {
         this.goodsOptions = response.rows;
       });
     },
+    // 选择费用信息时获取计价单位
+    changeFeeId (row) {
+      for (let li in this.fWbuOptions) {
+        if (row.fFeeid === this.fWbuOptions[li].fId) {
+          this.$set(row, 'fFeeUnitid', this.fWbuOptions[li].fFeeunitid + '')
+          this.changeFeeUnit(row)
+          break
+        }
+      }
+    },
     // 远程模糊查询费用名称
     fWRemoteMethod(name) {
       if (name == null || name === "") {

+ 61 - 48
src/views/warehouseBusiness/stockTransfer/index.vue

@@ -315,8 +315,9 @@
             size="mini"
             type="text"
             icon="el-icon-delete"
+            v-show="scope.row.fItemsStatus !== 6"
             @click="handleDelete(scope.row)"
-            v-if="scope.row.fBillstatus <= 3"
+            v-if="scope.row.fBillstatus < 4"
             v-hasPermi="['warehouseBusiness:stockTransfer:remove']"
             >删除
           </el-button>
@@ -459,7 +460,7 @@
               />
             </el-form-item>
           </el-col>
-          <el-col :span="8">
+          <!-- <el-col :span="8">
             <el-form-item label="破损" prop="fifdamage">
               <el-select
                 v-model="form.fIfdamage"
@@ -514,51 +515,51 @@
                 />
               </el-select>
             </el-form-item>
-          </el-col>
+          </el-col> -->
           <el-col :span="8">
-            <el-form-item label="计划调拨件数">
+            <el-form-item label="品牌" prop="fMarks">
               <el-input
-                v-model="form.fPlanqty"
+                v-model="form.fMarks"
                 style="width: 80%"
-                placeholder="请输入计划调拨件数"
+                disabled
+                placeholder="品牌"
               />
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="计划调拨净重">
+            <el-form-item label="品名" prop="fProductName">
               <el-input
-                v-model="form.fPlannetweight"
+                v-model="form.fProductName"
                 style="width: 80%"
-                placeholder="请输入计划调拨净重"
+                disabled
+                placeholder="品名"
               />
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="计划调拨毛重">
+            <el-form-item label="计划调拨件数">
               <el-input
-                v-model="form.fPlangrossweight"
+                v-model="form.fPlanqty"
                 style="width: 80%"
-                placeholder="请输入计划调拨毛重"
+                placeholder="请输入计划调拨件数"
               />
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="品牌" prop="fMarks">
+            <el-form-item label="计划调拨净重">
               <el-input
-                v-model="form.fMarks"
+                v-model="form.fPlannetweight"
                 style="width: 80%"
-                disabled
-                placeholder="品牌"
+                placeholder="请输入计划调拨净重"
               />
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="品名" prop="fProductName">
+            <el-form-item label="计划调拨毛重">
               <el-input
-                v-model="form.fProductName"
+                v-model="form.fPlangrossweight"
                 style="width: 80%"
-                disabled
-                placeholder="品名"
+                placeholder="请输入计划调拨毛重"
               />
             </el-form-item>
           </el-col>
@@ -799,7 +800,7 @@
           header-align="center"
           width="150px"
           align="center"
-          label="*仓库"
+          label="*调拨仓库"
         >
         </el-table-column>
         <el-table-column
@@ -824,6 +825,7 @@
               filterable
               remote
               style="width: 80%"
+              @change="kqhouseRemoteMethod"
               :remote-method="kqhouseRemoteMethod"
               placeholder="请输入模糊查找"
             >
@@ -1309,6 +1311,7 @@
               remote
               :disabled="browseStatus"
               :remote-method="fWRemoteMethod"
+              @change="changeFeeId(scope.row)"
               placeholder="费用名称"
             >
               <el-option
@@ -1593,6 +1596,7 @@
               remote
               :disabled="browseStatus"
               :remote-method="fWRemoteMethod"
+              @change="changeFeeId(scope.row)"
               placeholder="费用名称"
             >
               <el-option
@@ -1876,6 +1880,13 @@
           >
           </el-table-column>
           <el-table-column
+            prop="fWarehouseids"
+            header-align="center"
+            align="center"
+            label="仓库"
+          >
+          </el-table-column>
+          <el-table-column
             prop="fWarehouseLocationids"
             header-align="center"
             align="center"
@@ -2403,6 +2414,7 @@ export default {
     Jump(){
       this.approval = this.$route.query.data
       if(this.approval){
+        this.reset()
         this.colseButton = false
         this.approval = JSON.parse(this.approval)
         this.hide = false
@@ -2412,8 +2424,6 @@ export default {
         this.approve = true
         this.disappear = true
         this.cancelButton = false
-
-        this.reset()
         getStockTransfer(this.approval.billId).then((response) => {
           if (response.data.warehousebills) {
             this.form = response.data.warehousebills;
@@ -2749,10 +2759,10 @@ export default {
         if (!this.form.fMblno || this.form.fMblno === "") {
           this.$set(this.form, "fMblno", this.dialogWhgenlegList[whgen].fMblno);
         }
-        let haveGoods = false
+        /*let haveGoods = false
         if (this.kqhouseOptions.length !== 0) {
-          for (let house in this.kqhouseOptions) {
-            if (this.kqhouseOptions[house].fId === this.dialogWhgenlegList[whgen].fWarehouseLocationid) {
+          for (let house in this.kqhouseOptions) {ku库区
+          if (this.kqhouseOptions[house].fId === this.dialogWhgenlegList[whgen].fWarehouseLocationid) {
               haveGoods = true
               break;
             }
@@ -2769,7 +2779,7 @@ export default {
               this.kqhouseOptions.push(response.rows[row])
             }
           });
-        }
+        }*/
         let fTruckno = null
         let fDriverTel = null
         let fDriverName = null
@@ -2819,7 +2829,7 @@ export default {
           fWarehouselocid: this.dialogWhgenlegList[whgen].fWarehouseLocationid,
           fWarehouselocids: this.dialogWhgenlegList[whgen].fWarehouseLocationids,
           fWarehouseLocationids: this.dialogWhgenlegList[whgen].fWarehouseLocationids,
-          fTransferWarehouselocid: this.dialogWhgenlegList[whgen].fWarehouseLocationid,
+          fTransferWarehouselocid: null,
           remark: null,
         });
       }
@@ -3093,23 +3103,9 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd(status) {
-      this.form = {
-        fCorpid: '',
-        fTocorpid: '',
-        fBillno: '',
-        fBsdate: '',
-        fChargedate: '',
-        fWarehouseid: '',
-        fStltypeid: '',
-        fFeetunit: '',
-        fTrademodeid: '',
-        fMblno: '',
-        fOriginalbillno: '',
-        orgStorageDate: ''
-      }
+      this.reset();
       this.browseStatus = status;
       this.notChange = false
-      this.reset();
       this.queryUser();
       this.open = true;
       this.detailsHidden = false;
@@ -3196,10 +3192,10 @@ export default {
     },
 
     check(row,status,res){
+      this.reset();
       this.disappear = false
       this.notChange = true
       this.browseStatus = status;
-      this.reset();
       this.detailsHidden = false;
       let data = row || this.ids;
       getStockTransfer(data.fId).then((response) => {
@@ -3535,13 +3531,17 @@ export default {
           } else if (!this.dataListSelection[warehouse].fTransferWarehouselocid) {
             this.$message.error("请选择调拨库区");
             return false;
+          } else if (this.dataListSelection[warehouse].fTransferWarehouselocid === this.dataListSelection[warehouse].fWarehouselocids) {
+            this.$message.error("调拨库区不得与原库区相同");
+            return false;
           } else if (!this.dataListSelection[warehouse].fNetweight) {
             this.$message.error("请选择调拨净重");
             return false;
-          } else if (!this.dataListSelection[warehouse].fQty) {
-            this.$message.error("请维护调拨件数");
-            return false;
           }
+          // else if (!this.dataListSelection[warehouse].fQty) {
+          //   this.$message.error("请维护调拨件数");
+          //   return false;
+          // }
         }
         if (valid) {
           let listSelection = JSON.parse(JSON.stringify(this.dataListSelection))
@@ -3652,7 +3652,8 @@ export default {
         } else if (this.dataListSelection[li].fBillstatus >= 30) {
           this.$message.error('请勿重复装货')
           return false
-        } else if (!this.dataListSelection[li].fQty || this.dataListSelection[li].fQty === 0) {
+        }
+        else if (!this.dataListSelection[li].fQty || this.dataListSelection[li].fQty === 0) {
           this.$message.error('请填写调拨件数')
           return false
         } else if (!this.dataListSelection[li].fNetweight) {
@@ -3968,6 +3969,16 @@ export default {
         this.goodsOptions = response.rows;
       });
     },
+    // 选择费用信息时获取计价单位
+    changeFeeId (row) {
+      for (let li in this.fWbuOptions) {
+        if (row.fFeeid === this.fWbuOptions[li].fId) {
+          this.$set(row, 'fFeeUnitid', this.fWbuOptions[li].fFeeunitid + '')
+          this.changeFeeUnit(row)
+          break
+        }
+      }
+    },
     // 远程模糊查询费用名称
     fWRemoteMethod(name) {
       if (name == null || name === "") {
@@ -4009,7 +4020,9 @@ export default {
         fWarehouseid: this.form.fWarehouseid,
         fName: name
       };
+      console.log(this.kqhouseOptions)
       listArea(queryParams).then((response) => {
+        console.log(response)
         this.kqhouseOptions = response.rows;
       });
     },

+ 63 - 47
src/views/warehouseBusiness/storageFeeCalculation/index.vue

@@ -425,7 +425,7 @@
             </template>
           </el-table-column>
           <el-table-column
-            prop="fBillno"
+            prop="srcBillNo"
             header-align="center"
             align="center"
             width="140px"
@@ -433,28 +433,12 @@
           >
           </el-table-column>
           <el-table-column
-            prop="fGoodsid"
+            prop="fProductName"
             header-align="center"
             align="center"
             width="140px"
             label="货物名称"
           >
-            <template slot-scope="scope">
-              <el-select
-                v-model="scope.row.fGoodsid"
-                filterable
-                disabled
-                remote
-                placeholder="请选择品名"
-              >
-                <el-option
-                  v-for="(dict, index) in goodsOptions"
-                  :key="index.fId"
-                  :label="dict.fName"
-                  :value="dict.fId"
-                ></el-option>
-              </el-select>
-            </template>
           </el-table-column>
           <el-table-column
             prop="fMarks"
@@ -788,6 +772,56 @@
             </template>
           </el-table-column>
           <el-table-column
+            prop="fMblno"
+            header-align="center"
+            align="center"
+            width="130px"
+            label="提单号"
+          >
+            <template slot-scope="scope">
+              <el-input
+                v-model="scope.row.fMblno"
+                :disabled="browseStatus"
+                placeholder="提单号"
+                show-word-limit
+              />
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            prop="fProductName"
+            header-align="center"
+            align="center"
+            width="140px"
+            label="品名"
+          >
+            <template slot-scope="scope">
+              <el-input
+                v-model="scope.row.fProductName"
+                :disabled="browseStatus"
+                placeholder="品名"
+                show-word-limit
+              />
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            prop="fMarks"
+            header-align="center"
+            align="center"
+            width="130px"
+            label="品牌"
+          >
+            <template slot-scope="scope">
+              <el-input
+                v-model="scope.row.fMarks"
+                :disabled="browseStatus"
+                placeholder="品牌"
+                show-word-limit
+              />
+            </template>
+          </el-table-column>
+          <el-table-column
             prop="remark"
             header-align="center"
             align="center"
@@ -821,12 +855,12 @@
         </el-table>
       </div>
       <div slot="footer" class="dialog-footer">
-        <el-button type="success" v-if="form.fBillstatus == '6'" @click="backrRconciliation">撤销请核</el-button>
+        <el-button type="success" v-if="form.fBillstatus === 6" @click="backrRconciliation">撤销请核</el-button>
         <el-button v-if="approve === true" @click="goApproval">审批</el-button>
         <el-button type="primary" v-if="notChange" @click="addOrUpdateHandle">查看审批流</el-button>
         <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
         <el-button v-if="cancelButton === false" @click="homePage">取 消</el-button>
-        <el-button type="danger" :disabled="disappear" v-if="form.fBillstatus == '4' && Operator == Lander" @click="backApproval">撤销审批</el-button>
+        <el-button type="danger" :disabled="disappear" v-if="form.fBillstatus === '4' && Operator === Lander" @click="backApproval">撤销审批</el-button>
         <el-button type="primary" :disabled="browseStatus" @click="submitForm(2)">保 存</el-button>
         <el-button
           :disabled="browseStatus"
@@ -1059,13 +1093,13 @@
       Jump(){
         this.approval = this.$route.query.data
         if (this.approval){
+          this.reset()
           this.Xbutton = false
           this.approval = JSON.parse(this.approval)
           // this.hide = false
           this.notChange = true
           this.approve = true
           this.cancelButton = false
-          this.reset()
           getStorageFeeCalculation(this.approval.billId).then(response => {
             this.fMblnoOptions = []
             if (response.data.corps) {
@@ -1084,14 +1118,10 @@
                 this.$set(this.dataList[li], 'fBillingDeadline', Date.parse(this.dataList[li].fBillingDeadline))
                 this.$set(this.dataList[li], 'fStorageFeeDeadline', Date.parse(this.dataList[li].fStorageFeeDeadline))
               }
-              console.log(this.dataList)
             }
             if (response.data.warehouseFeesList) {
               this.warehouseDrList = response.data.warehouseFeesList
             }
-            if (response.data.goodsList) {
-              this.goodsOptions = response.data.goodsList
-            }
             if (response.data.feesList) {
               this.fWbuOptions = response.data.feesList
             }
@@ -1136,7 +1166,6 @@
         this.addOrUpdateVisib = false
         let id = '448'
         let actId = '110'
-        console.log(this.form.fId)
         this.$nextTick(() => {
           this.$refs.addOrUpdate.init(this.form.fId,this.actId)
         })
@@ -1309,7 +1338,6 @@
         this.fWbuOptions = [];
         this.fMblnoOptions = [];
         this.disappear = false
-        this.cancelButton = false
         this.addOrUpdateVisib = false
         this.addOrUpdateVisible = false
         this.notChange = false
@@ -1336,8 +1364,8 @@
       },
       /** 新增按钮操作 */
       handleAdd(status) {
-        this.browseStatus = status;
         this.reset();
+        this.browseStatus = status;
         this.queryUser();
         this.open = true;
         this.dataList = [];
@@ -1347,13 +1375,11 @@
         this.title = "出库单";
       },
       handleUpdate_s(row, status) {
-        this.disappear = true
+        this.reset();
         this.notChange = true
         this.browseStatus = status;
-        this.reset();
         let data = row || this.ids;
         getStorageFeeCalculation(data.fId).then((response) => {
-
           this.fMblnoOptions = []
           if (response.data.corps) {
             this.fMblnoOptions.push(response.data.corps)
@@ -1372,35 +1398,27 @@
               this.$set(this.dataList[li], 'fBillingDeadline', Date.parse(this.dataList[li].fBillingDeadline))
               this.$set(this.dataList[li], 'fStorageFeeDeadline', Date.parse(this.dataList[li].fStorageFeeDeadline))
             }
-            console.log(this.dataList)
           }
           if (response.data.warehouseFeesList) {
             this.warehouseDrList = response.data.warehouseFeesList
           }
-          if (response.data.goodsList) {
-            this.goodsOptions = response.data.goodsList
-          }
           if (response.data.feesList) {
             this.fWbuOptions = response.data.feesList
           }
           this.userOptions = response.data.sysUser;
           this.open = true;
           this.title = "编辑仓储费计算";
-          console.log(this.Operator)
-          console.log(this.Lander)
         });
 
       },
-
       /** 修改按钮操作 */
       handleUpdate(row, status) {
+        this.reset();
         this.disappear = false
         this.notChange = true
         this.browseStatus = status;
-        this.reset();
         let data = row || this.ids;
         getStorageFeeCalculation(data.fId).then((response) => {
-
           this.fMblnoOptions = []
           if (response.data.corps) {
             this.fMblnoOptions.push(response.data.corps)
@@ -1419,22 +1437,16 @@
               this.$set(this.dataList[li], 'fBillingDeadline', Date.parse(this.dataList[li].fBillingDeadline))
               this.$set(this.dataList[li], 'fStorageFeeDeadline', Date.parse(this.dataList[li].fStorageFeeDeadline))
             }
-            console.log(this.dataList)
           }
           if (response.data.warehouseFeesList) {
             this.warehouseDrList = response.data.warehouseFeesList
           }
-          if (response.data.goodsList) {
-            this.goodsOptions = response.data.goodsList
-          }
           if (response.data.feesList) {
             this.fWbuOptions = response.data.feesList
           }
           this.userOptions = response.data.sysUser;
           this.open = true;
           this.title = "编辑仓储费计算";
-          console.log(this.Operator)
-          console.log(this.Lander)
         });
 
       },
@@ -1633,10 +1645,14 @@
             formData.append("warehouseFees", JSON.stringify(this.warehouseDrList));
             addStorageFeeCalculation(formData).then((response) => {
               this.msgSuccess("操作成功");
-              if (status === 2) {
+              if (status !== 2) {
                 this.open = false;
                 this.reset()
                 this.getList();
+              } else {
+                this.form = response.data
+                this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
+                this.$set(this.form, 'fBillingDeadline', Date.parse(this.form.fBillingDeadline))
               }
             })
           }