Browse Source

1.仓储业务:入、出、货转、调拨、通关、直装、仓储费,获取后端传递isCreate参数,实现谁创建,谁删除,非超级管理员无法删除非自己创建的数据
2.增加仓储协议、仓储费贸易方式开关,需要用到贸易方式核算仓储费时,开启则显示,不开启则不显示
3.改动调拨单,将库管改为与单上的调拨内容一致

nzf 3 years ago
parent
commit
5792d314b8

+ 5 - 4
src/views/Warehousing/cargoClearance/index.vue

@@ -439,7 +439,7 @@
               size="mini"
               type="text"
               icon="el-icon-delete"
-              v-if="scope.row.fItemsStatus == '计划'"
+              v-if="(scope.row.fItemsStatus == '待通关' || scope.row.fItemsStatus == '计划') && scope.row.isCreate == 1 || (scope.row.fItemsStatus == '待通关' || scope.row.fItemsStatus == '计划') && scope.row.isCreate == 0"
               @click="handleDelete(scope.row)"
               v-hasPermi="['warehouseBusiness:stockTransfer:remove']"
               >删除
@@ -989,9 +989,10 @@ export default {
         cancelButtonText: "取消",
         type: "warning",
       }).then(() => {
-        delStockTransfer(ids);
-        this.msgSuccess("删除成功");
-        this.getList();
+        delStockTransfer(ids).then(res => {
+          this.msgSuccess("删除成功");
+          this.getList();
+        });
       });
     },
     /** 导出按钮操作 */

+ 5 - 4
src/views/Warehousing/goodsTransfer/index.vue

@@ -438,7 +438,7 @@
               size="mini"
               type="text"
               icon="el-icon-delete"
-              v-if="scope.row.fItemsStatus == '计划'"
+              v-if="(scope.row.fItemsStatus == '待货转' || scope.row.fItemsStatus == '计划') && scope.row.isCreate == 1 || (scope.row.fItemsStatus == '待货转' || scope.row.fItemsStatus == '计划') && scope.row.isCreate == 0"
               @click="handleDelete(scope.row)"
               v-hasPermi="['warehouseBusiness:stockTransfer:remove']"
               >删除
@@ -1011,9 +1011,10 @@ export default {
         cancelButtonText: "取消",
         type: "warning",
       }).then(() => {
-        delGoodsTransfer(ids);
-        this.msgSuccess("删除成功");
-        this.getList();
+        delGoodsTransfer(ids).then(res => {
+          this.msgSuccess("删除成功");
+          this.getList();
+        });
       });
     },
     /** 导出按钮操作 */

+ 21 - 12
src/views/Warehousing/inAndOutStock/index.vue

@@ -464,9 +464,17 @@
               type="text"
               icon="el-icon-delete"
               v-if="
-                scope.row.fBillstatus == '录入' ||
+                (scope.row.fBillstatus == '录入' ||
                 scope.row.fBillstatus == '暂存' ||
-                scope.row.fBillstatus == '驳回'
+                scope.row.fBillstatus == '驳回')
+                &&
+                scope.row.isCreate == 0
+                ||
+                (scope.row.fBillstatus == '录入' ||
+                scope.row.fBillstatus == '暂存' ||
+                scope.row.fBillstatus == '驳回')
+                &&
+                scope.row.isCreate == 1
               "
               @click="handleDelete(scope.row)"
               v-hasPermi="['warehouseBusiness:outStock:remove']"
@@ -589,13 +597,13 @@ export default {
           checked: 0,
           width: 100,
         },
-        // {
-        //   surface: "3",
-        //   label: "fItemsStatus",
-        //   name: "出库状态",
-        //   checked: 0,
-        //   width: 100,
-        // },
+        {
+          surface: "3",
+          label: "fItemsStatus",
+          name: "直装状态",
+          checked: 0,
+          width: 100,
+        },
         {
           surface: "4",
           label: "fCorpid",
@@ -960,9 +968,10 @@ export default {
         cancelButtonText: "取消",
         type: "warning",
       }).then(() => {
-        delWarehousebills(ids);
-        this.msgSuccess("删除成功");
-        this.getList();
+        delWarehousebills(ids).then(res => {
+          this.msgSuccess("删除成功");
+          this.getList();
+        });
       });
     },
     /** 导出按钮操作 */

+ 1 - 1
src/views/Warehousing/inStock/index.vue

@@ -548,7 +548,7 @@
                 size="mini"
                 type="text"
                 icon="el-icon-delete"
-                v-if="scope.row.fItemsStatus == '计划' && scope.row.warehouseStatus < 4"
+                v-if="(scope.row.fItemsStatus == '待入库' || scope.row.fItemsStatus == '计划') && scope.row.warehouseStatus < 4 && scope.row.isCreate == 1 || (scope.row.fItemsStatus == '待入库' || scope.row.fItemsStatus == '计划') && scope.row.warehouseStatus < 4 && scope.row.isCreate == 0"
                 @click="handleDelete(scope.row)"
                 v-hasPermi="['warehouseBusiness:inStock:remove']"
               >删除

+ 1 - 1
src/views/Warehousing/outStock/index.vue

@@ -469,7 +469,7 @@
               size="mini"
               type="text"
               icon="el-icon-delete"
-              v-if="scope.row.fItemsStatus == '计划' && scope.row.warehouseStatus < 4"
+              v-if="(scope.row.fItemsStatus == '待出库' || scope.row.fItemsStatus == '计划') && scope.row.warehouseStatus < 4 && scope.row.isCreate == 1 || (scope.row.fItemsStatus == '待出库' || scope.row.fItemsStatus == '计划') && scope.row.warehouseStatus < 4 && scope.row.isCreate == 0"
               @click="handleDelete(scope.row)"
               v-hasPermi="['warehouseBusiness:outStock:remove']"
               >删除

+ 1 - 1
src/views/Warehousing/stockTransfer/AddOrUpdate.vue

@@ -3015,7 +3015,7 @@
         <div
           style="display: flex; justify-content: space-between; font-size: 12px"
         >
-          <div>库管:{{ form.fContacts }}</div>
+          <div>库管:{{ form.fStorekeeper }}</div>
           <div style="width: 100px">叉车:</div>
         </div>
       </div>

+ 7 - 4
src/views/Warehousing/stockTransfer/index.vue

@@ -439,7 +439,9 @@
               size="mini"
               type="text"
               icon="el-icon-delete"
-              v-if="scope.row.fItemsStatus == '计划' && scope.row.warehouseStatus < 4"
+              v-if="(scope.row.fItemsStatus == '待调拨' || scope.row.fItemsStatus == '计划') && scope.row.warehouseStatus < 4 && scope.row.isCreate == 1
+              ||
+              (scope.row.fItemsStatus == '待调拨' || scope.row.fItemsStatus == '计划') && scope.row.warehouseStatus < 4 && scope.row.isCreate == 0"
               @click="handleDelete(scope.row)"
               v-hasPermi="['warehouseBusiness:stockTransfer:remove']"
               >删除
@@ -1032,9 +1034,10 @@ export default {
         cancelButtonText: "取消",
         type: "warning",
       }).then(() => {
-        delStockTransfer(ids);
-        this.msgSuccess("删除成功");
-        this.getList();
+        delStockTransfer(ids).then(res => {
+          this.msgSuccess("删除成功");
+          this.getList();
+        });
       });
     },
     /** 导出按钮操作 */

+ 50 - 1
src/views/warehouseBusiness/agreement/index.vue

@@ -305,6 +305,23 @@
             ></el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="贸易方式"  prop="fTrademodeid" v-if="showTrademode == '0'">
+          <el-select
+            v-model="form.fTrademodeid"
+            :disabled="notChange"
+            placeholder="请选择贸易方式"
+            clearable
+            style="width: 210px"
+          >
+            <el-option
+              v-for="(item, index) in fTrademodeidOptions"
+              :key="index.dictValue"
+              :label="item.dictLabel"
+              :value="item.dictValue"
+              style="width: 210px;"
+            />
+          </el-select>
+        </el-form-item>
       </el-form>
       <el-button type="primary" @click="submit" :disabled="notChange">请 核</el-button>
 
@@ -817,6 +834,7 @@ export default {
       tPackagesOptions: [],
       // 贸易方式,对应t_trademodels 字典
       fTrademodeidOptions: [],
+      showTrademode: null,
       // 仓储费收款明细表表格数据
       agreementitemsList: [],
       //仓储费付款明细表表格数据
@@ -869,6 +887,9 @@ export default {
         fWarehouseid: [
           { required: true, message: ' ', trigger: 'blur' }
         ],
+        fTrademodeid: [
+          { required: true, message: ' ', trigger: 'blur' }
+        ],
       },
       // 附件上传数组
       relevantAttachments: [],
@@ -895,7 +916,7 @@ export default {
     })
     this.getDicts('data_trademodes').then(response => {
       this.fTrademodeidOptions = response.data
-    })
+    });
     this.getDicts('data_goods_category').then(response => {
       this.fTypeidOptions = response.data
     })
@@ -905,6 +926,9 @@ export default {
     this.getConfigKey("agreement.warehouse").then((response) => {
       this.showWarehouse = response.msg;
     });
+    this.getConfigKey("agreement.trademode").then((response) => {
+      this.showTrademode = response.msg;
+    });
     this.register()
   },
   activated(){
@@ -1027,6 +1051,7 @@ export default {
       this.register()
       getAgreement(row.fId).then(response => {
         // this.$set(this,'fMblnoOptions',response.data.corps)
+        this.TFformdata(response.data.tWarehouseAgreement);
         if (response.data.dept) {
           this.deptName = response.data.dept.deptName
         }
@@ -1058,6 +1083,12 @@ export default {
         this.open = true
       })
     },
+    TFformdata(data) {
+      this.form = data;
+      if (this.form.fTrademodeid) {
+        this.$set(this.form, "fTrademodeid", this.form.fTrademodeid.toString());
+      }
+    },
     // 查看按钮
     check(row, res) {
       this.notChange = true
@@ -1066,10 +1097,26 @@ export default {
       getAgreement(row.fId).then(response => {
         // this.fMblnoOptions = response.data.corps
         // this.deptName = response.data.dept.deptName
+        this.TFformdata(response.data.tWarehouseAgreement);
         this.deptName = response.data.dept?response.data.dept.deptName: ''
         this.form = response.data.tWarehouseAgreement
+        if (response.data.attachList) {
+          this.relevantAttachments = response.data.attachList
+        } else {
+          this.relevantAttachments = []
+        }
         this.operator = this.form.createBy
         this.agreementitemsList = response.data.tWarehouseAgreementitems
+        if (response.data.tWarehouseAgreement.tPackages) {
+          // this.form.tPackages = this.form.tPackages
+          //   .replace(/\[|]/g, "")
+          //   .replace(/\"/g, "")
+          //   .split(",");
+          this.form.tPackages = JSON.parse(this.form.tPackages)
+        }
+        if (response.data.tWarehouseAgreement.fWarehouseid) {
+          this.form.fWarehouseid = JSON.parse(this.form.fWarehouseid)
+        }
         for (let item in this.agreementitemsList) {
           this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
         }
@@ -1380,6 +1427,7 @@ export default {
         this.notChange = false
         getAgreement(this.idCopy).then(response => {
           // this.deptName = response.data.dept.deptName
+          this.TFformdata(response.data.tWarehouseAgreement);
           this.deptName = response.data.dept?response.data.dept.deptName: ''
           this.form = response.data.tWarehouseAgreement
           this.form.fId = null
@@ -1409,6 +1457,7 @@ export default {
         this.browseStatus = false
         const fId = row.fId || this.ids
         getAgreement(fId).then(response => {
+          this.TFformdata(response.data.tWarehouseAgreement);
           // this.deptName = response.data.dept.deptName
           this.deptName = response.data.dept?response.data.dept.deptName: ''
           this.form = response.data.tWarehouseAgreement

+ 98 - 13
src/views/warehouseBusiness/storageFeeCalculation/index.vue

@@ -88,7 +88,22 @@
           <el-option label="审核通过" value="6"></el-option>
         </el-select>
       </el-form-item>
-
+      <el-form-item label="贸易方式"  prop="fTrademodeid" v-if="showTrademode == '0'">
+        <el-select
+          v-model="queryParams.fTrademodeid"
+          placeholder="请选择贸易方式"
+          clearable
+          style="width: 210px"
+        >
+          <el-option
+            v-for="(item, index) in fTrademodeidOptions"
+            :key="index.dictValue"
+            :label="item.dictLabel"
+            :value="item.dictValue"
+            style="width: 210px;"
+          />
+        </el-select>
+      </el-form-item>
       <el-form-item label="计费日期" prop="timeInterval2">
         <el-date-picker
             v-model="queryParams.timeInterval2"
@@ -282,10 +297,18 @@
           prop="remark"
       />
       <el-table-column
+        v-if="showTrademode == '0'"
+        label="计费方式"
+        align="center"
+        prop="fTrademodeName"
+        width="160"
+      />
+      <el-table-column
           label="单据状态"
           align="center"
           sortable
           prop="fBillstatus"
+          width="160"
       >
         <!--        <template slot-scope="scope">
                   <span v-if="scope.row.fBillstatus === 1">新建</span>
@@ -356,11 +379,21 @@
               type="text"
               icon="el-icon-delete"
               v-if="
-              scope.row.fBillstatus == '录入' ||
+              (scope.row.fBillstatus == '录入' ||
               scope.row.fBillstatus == '暂存'  ||
               scope.row.fBillstatus == '审核驳回' ||
               scope.row.fBillstatus == '保存' ||
-              scope.row.fBillstatus == '请核驳回'
+              scope.row.fBillstatus == '请核驳回')
+              &&
+              scope.row.isCreate == 0
+              ||
+              (scope.row.fBillstatus == '录入' ||
+              scope.row.fBillstatus == '暂存'  ||
+              scope.row.fBillstatus == '审核驳回' ||
+              scope.row.fBillstatus == '保存' ||
+              scope.row.fBillstatus == '请核驳回')
+              &&
+              scope.row.isCreate == 1
             "
               @click="handleDelete(scope.row)"
               v-hasPermi="['warehouseBusiness:storageFeeCalculation:remove']"
@@ -546,13 +579,44 @@
               </el-select>
             </el-form-item>
           </el-col>
+          <el-col :span="8" v-if="showTrademode == '0'">
+            <el-form-item label="贸易方式"  prop="fTrademodeid">
+              <el-select
+                v-model="form.fTrademodeid"
+                :disabled="notChange"
+                placeholder="请选择贸易方式"
+                clearable
+                style="width: 210px"
+              >
+                <el-option
+                  v-for="(item, index) in fTrademodeidOptions"
+                  :key="index.dictValue"
+                  :label="item.dictLabel"
+                  :value="item.dictValue"
+                  style="width: 210px;"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8" v-if="showTrademode == '1'">
+            <el-form-item disabled label="备注" prop="remark">
+              <el-input
+                style="width:80%"
+                :disabled="browseStatus"
+                v-model="form.remark"
+                placeholder="请输入备注"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row v-if="showTrademode == '0'">
           <el-col :span="8">
             <el-form-item disabled label="备注" prop="remark">
               <el-input
-                  style="width:80%"
-                  :disabled="browseStatus"
-                  v-model="form.remark"
-                  placeholder="请输入备注"
+                style="width:80%"
+                :disabled="browseStatus"
+                v-model="form.remark"
+                placeholder="请输入备注"
               />
             </el-form-item>
           </el-col>
@@ -1118,7 +1182,7 @@
       append-to-body
     >
       <div style="display: flex;padding: 4% 0;">
-        <el-table border :data="contractnoList" @selection-change="handleSelectionChange" style="width: 30%;float:left;flex: 1;">
+        <el-table border :data="contractnoList" @selection-change="handleSelectionChange" style="width: 30%;float:left;flex: 1;" @cell-click="selectShow">
           <el-table-column
             prop="fContractno"
             header-align="center"
@@ -1127,7 +1191,7 @@
             label="合同编号"
           >
             <template slot-scope="scope">
-              <el-link type="primary" @click="selectShow(scope.row)">{{ scope.row.fContractno }}</el-link>
+              <el-link :underline="false">{{ scope.row.fContractno }}</el-link>
             </template>
           </el-table-column>
           <el-table-column
@@ -1156,7 +1220,7 @@
           </el-table-column>
           <el-table-column label="有效期至" sortable align="center" prop="fEnddate" width="120">
             <template slot-scope="scope">
-              <span>{{ parseTime(scope.row.fEnddate, '{y}-{m}-{d}') }}</span>
+              <el-link :underline="false">{{ parseTime(scope.row.fEnddate, '{y}-{m}-{d}') }}</el-link>
             </template>
           </el-table-column>
         </el-table>
@@ -1256,11 +1320,10 @@
                 filterable
                 remote
                 :disabled="true"
-                :remote-method="fWRemoteMethod"
                 placeholder="费用名称"
               >
                 <el-option
-                  v-for="(dict, index) in fWbuOptions"
+                  v-for="(dict, index) in fWbuOptionsN"
                   :key="index.fId"
                   :label="dict.fName"
                   :value="dict.fId"
@@ -1564,6 +1627,7 @@ export default {
       fTaxrate: 0,
       // 费用名称
       fWbuOptions: [],
+      fWbuOptionsN: [],
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -1647,6 +1711,9 @@ export default {
           }
         }]
       },
+      // 贸易方式,对应t_trademodels 字典
+      fTrademodeidOptions: [],
+      showTrademode: null,
     };
   },
 
@@ -1685,9 +1752,15 @@ export default {
     this.getDicts('data_unitfees').then((response) => {
       this.fFeetunitOptions = response.data
     })
+    this.getDicts('data_trademodes').then(response => {
+      this.fTrademodeidOptions = response.data
+    });
     this.getConfigKey("agreement.warehouse").then((response) => {
       this.showWarehouse = response.msg;
     });
+    this.getConfigKey("agreement.trademode").then((response) => {
+      this.showTrademode = response.msg;
+    });
     this.register()
     listWarehousesss({fStatus: 0, delFlag: 0}).then((response) => {
       this.warehouseOptions = response.rows;
@@ -2087,7 +2160,11 @@ export default {
         for (let item in this.agreementitemsList) {
           this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
         }
-        this.fWbuOptions = response.data.feesList
+        this.fWbuOptionsN = response.data.feesList
+        let queryParams = { fName: name }
+        listFees(queryParams).then((response) => {
+          this.fWbuOptionsN = response.rows
+        })
       })
       this.getDicts("data_unitfees").then(response => {
         this.jFeetunitOptions = response.data;
@@ -2225,6 +2302,12 @@ export default {
       this.relevantAttachments = [];
       this.title = "出库单";
     },
+    TFformdata(data) {
+      this.form = data;
+      if (this.form.fTrademodeid) {
+        this.$set(this.form, "fTrademodeid", this.form.fTrademodeid.toString());
+      }
+    },
     handleUpdate_s(row, status) {
       const queryParams = {fName: ''};
       listGoods(queryParams).then((response) => {
@@ -2245,6 +2328,7 @@ export default {
           this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
           this.$set(this.form, 'fBillingDeadline', Date.parse(this.form.fBillingDeadline))
         }
+        this.TFformdata(response.data.warehouse)
         if (response.data.warehouseItemsList) {
           this.dataList = response.data.warehouseItemsList
           for (let li in this.dataList) {
@@ -2295,6 +2379,7 @@ export default {
           this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
           this.$set(this.form, 'fBillingDeadline', Date.parse(this.form.fBillingDeadline))
         }
+        this.TFformdata(response.data.warehouse)
         if (response.data.warehouseItemsList) {
           this.dataList = response.data.warehouseItemsList
           for (let li in this.dataList) {