Qukatie 1 yıl önce
ebeveyn
işleme
0595d93675

+ 44 - 2
src/components/tradeAgency/fee-info.vue

@@ -2,7 +2,7 @@
     <div>
         <avue-crud :option="optionD" :table-loading="loading" :data="form.feeCenterListD" id="out-table" ref="crudD"
             @selection-change="selectionDChange" @resetColumn="resetColumn('crudD', 'optionD', 'optionDBack', 381)"
-            @saveColumn="saveColumn('crudD', 'optionD', 'optionDBack', 381)">
+            @saveColumn="saveColumn('crudD', 'optionD', 'optionDBack', 381)" :row-class-name="tableRowClassName">
             <template slot="menuLeft">
                 <div style="display: inline-block;margin-right: 20px" class="disabledBox fontSize">
                     <i class="el-icon-coin"></i>
@@ -84,7 +84,7 @@
         <avue-crud style="margin-top: 10px;" :option="optionC" :table-loading="loading" :data="form.feeCenterListC"
             id="out-table" ref="crudC" @selection-change="selectionCChange"
             @resetColumn="resetColumn('crudC', 'optionC', 'optionCBack', 382)"
-            @saveColumn="saveColumn('crudC', 'optionC', 'optionCBack', 382)">
+            @saveColumn="saveColumn('crudC', 'optionC', 'optionCBack', 382)" :row-class-name="tableRowClassName">
             <template slot="menuLeft">
                 <div style="display: inline-block;margin-right: 20px" class="disabledBox fontSize">
                     <i class="el-icon-coin"></i>
@@ -321,6 +321,19 @@ export default {
                         }]
                     },
                     {
+                        label: "结算状态",
+                        prop: "stlStatus",
+                        width: '80',
+                        overHidden: true,
+                        dicData: [{
+                            label: '否',
+                            value: 0
+                        }, {
+                            label: '是',
+                            value: 1
+                        }]
+                    },
+                    {
                         label: "往来单位",
                         prop: "corpCnName",
                         width: '160',
@@ -493,6 +506,19 @@ export default {
                         }]
                     },
                     {
+                        label: "结算状态",
+                        prop: "stlStatus",
+                        width: '80',
+                        overHidden: true,
+                        dicData: [{
+                            label: '否',
+                            value: 0
+                        }, {
+                            label: '是',
+                            value: 1
+                        }]
+                    },
+                    {
                         label: "往来单位",
                         prop: "corpCnName",
                         width: '160',
@@ -1193,11 +1219,27 @@ export default {
                 this.$refs[ref].$refs.dialogColumn.columnBox = false;
             }
         },
+        tableRowClassName({ row }) {
+            if (row.stlStatus == 1) {
+                return 'class-row2';
+            } else if (row.accStatus == 1) {
+                return 'class-row1';
+            }
+            return '';
+        }
 
     },
 }
 </script>
+<style>
+.class-row1 {
+    color: #67C23A !important;
+}
 
+.class-row2 {
+    color: #F56C6C !important;
+}
+</style>
 <style scoped lang="scss">
 .disabledBox {
     display: flex;

+ 44 - 2
src/components/tradeAgency/fee-oceanFreight.vue

@@ -2,7 +2,7 @@
     <div>
         <avue-crud :option="optionD" :table-loading="loading" :data="form.feeCenterListD" id="out-table" ref="crudD"
             @selection-change="selectionDChange" @resetColumn="resetColumn('crudD', 'optionD', 'optionDBack', 392)"
-            @saveColumn="saveColumn('crudD', 'optionD', 'optionDBack', 392)">
+            @saveColumn="saveColumn('crudD', 'optionD', 'optionDBack', 392)" :row-class-name="tableRowClassName">
             <template slot="menuLeft">
                 <div style="display: inline-block;margin-right: 20px" class="disabledBox fontSize">
                     <i class="el-icon-coin"></i>
@@ -79,7 +79,7 @@
         <avue-crud style="margin-top: 10px;" :option="optionC" :table-loading="loading" :data="form.feeCenterListC"
             id="out-table" ref="crudC" @selection-change="selectionCChange"
             @resetColumn="resetColumn('crudC', 'optionC', 'optionCBack', 393)"
-            @saveColumn="saveColumn('crudC', 'optionC', 'optionCBack', 393)">
+            @saveColumn="saveColumn('crudC', 'optionC', 'optionCBack', 393)" :row-class-name="tableRowClassName">
             <template slot="menuLeft">
                 <div style="display: inline-block;margin-right: 20px" class="disabledBox fontSize">
                     <i class="el-icon-coin"></i>
@@ -399,6 +399,19 @@ export default {
                         }]
                     },
                     {
+                        label: "结算状态",
+                        prop: "stlStatus",
+                        width: '80',
+                        overHidden: true,
+                        dicData: [{
+                            label: '否',
+                            value: 0
+                        }, {
+                            label: '是',
+                            value: 1
+                        }]
+                    },
+                    {
                         label: "往来单位",
                         prop: "corpCnName",
                         width: '160',
@@ -577,6 +590,19 @@ export default {
                         }]
                     },
                     {
+                        label: "结算状态",
+                        prop: "stlStatus",
+                        width: '80',
+                        overHidden: true,
+                        dicData: [{
+                            label: '否',
+                            value: 0
+                        }, {
+                            label: '是',
+                            value: 1
+                        }]
+                    },
+                    {
                         label: "往来单位",
                         prop: "corpCnName",
                         width: '160',
@@ -1398,11 +1424,27 @@ export default {
                 this.$refs[ref].$refs.dialogColumn.columnBox = false;
             }
         },
+        tableRowClassName({ row }) {
+            if (row.stlStatus == 1) {
+                return 'class-row2';
+            } else if (row.accStatus == 1) {
+                return 'class-row1';
+            }
+            return '';
+        }
 
     },
 }
 </script>
+<style>
+.class-row1 {
+    color: #67C23A !important;
+}
 
+.class-row2 {
+    color: #F56C6C !important;
+}
+</style>
 <style scoped lang="scss">
 .disabledBox {
     display: flex;

+ 0 - 1
src/views/iosBasicData/SeafreightExportF/bills/index.vue

@@ -362,7 +362,6 @@
                             {{ item.dictValue }}
                         </span>
                     </div>
-
                 </temolate>
                 <template slot="accountStatus" slot-scope="{ row }">
                     <div>

+ 19 - 36
src/views/system/lock/indexF.vue

@@ -1,30 +1,14 @@
 <template>
   <div>
     <basic-container>
-      <avue-crud
-        :option="option"
-        :data="dataList"
-        ref="crud"
-        v-model="form"
-        :page.sync="page"
-        :search.sync="search"
-        @search-change="searchChange"
-        @current-change="currentChange"
-        @size-change="sizeChange"
-        @refresh-change="refreshChange"
-        @on-load="onLoad"
-        @saveColumn="saveColumn"
-        @resetColumn="resetColumn"
-        :table-loading="loading"
-      >
+      <avue-crud :option="option" :data="dataList" ref="crud" v-model="form" :page.sync="page" :search.sync="search"
+        @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
+        @refresh-change="refreshChange" @on-load="onLoad" @saveColumn="saveColumn" @resetColumn="resetColumn"
+        :table-loading="loading">
         <template slot="moudleNameSearch">
           <el-select v-model="search.moudleName" clearable filterable>
-            <el-option
-              v-for="(item, index) in moudleOption"
-              :label="item.label"
-              :value="item.value"
-              :key="index"
-            ></el-option>
+            <el-option v-for="(item, index) in moudleOption" :label="item.dictValue" :value="item.dictKey"
+              :key="index"></el-option>
           </el-select>
         </template>
         <template slot-scope="scope" slot="moudleName">
@@ -33,13 +17,7 @@
           }}</span>
         </template>
         <template slot="menu" slot-scope="{ row, index }">
-          <el-button
-            type="text"
-            icon="el-icon-unlock"
-            size="small"
-            @click="rowUnlock(row, index)"
-            >解锁</el-button
-          >
+          <el-button type="text" icon="el-icon-unlock" size="small" @click="rowUnlock(row, index)">解锁</el-button>
         </template>
       </avue-crud>
     </basic-container>
@@ -49,7 +27,7 @@
 <script>
 import option from "./config/mainList.json";
 import { lockList, lockRemove } from "@/api/lock/lockF";
-
+import { getWorkDicts } from "@/api/system/dictbiz";
 export default {
   name: "index",
   data() {
@@ -66,12 +44,12 @@ export default {
       loading: false,
       moudleOption: [
         {
-          label: "海运出口",
-          value: "SE"
+          dictValue: "海运出口",
+          dictKey: "SE"
         },
         {
-          label: "海运进口",
-          value: "SI"
+          dictValue: "海运进口",
+          dictKey: "SI"
         }
       ]
     };
@@ -87,13 +65,18 @@ export default {
       this.option.searchMenuSpan = num * 8;
       this.option.searchMenuPosition = "right";
     }
+    getWorkDicts('moudleName').then(res => {
+      if(res.data.data.length){
+        this.moudleOption = res.data.data
+      }
+    })
   },
   filters: {
     moudleNameFormat(row, moudleOption) {
       let name;
       moudleOption.map(e => {
-        if (row == e.value) {
-          name = e.label;
+        if (row == e.dictKey) {
+          name = e.dictValue;
         }
       });
       return name;

+ 43 - 1
src/views/tradeAgency/exchangePurchasing/detailsPage.vue

@@ -26,7 +26,7 @@
                     :disabled="isSaveBtn || form.firstStatus == '审核通过'" @click="application">申请付款请核
                 </el-button>
                 <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
-                    v-if="editDisabled" @click="inEdit">编 辑
+                    v-if="editDisabled" @click="inEdit" :disabled="showLock">编 辑
                 </el-button>
                 <el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small"
                     @click="submit">保 存
@@ -193,6 +193,11 @@ export default {
                         disabled: true,
                     },
                     {
+                        label: '利润',
+                        prop: "profit",
+                        disabled: true,
+                    },
+                    {
                         label: '所属公司',
                         prop: "affiliatedCompanyName",
                         disabled: true,
@@ -300,6 +305,7 @@ export default {
                     }
                 ]
             },
+            showLock:false
         }
     },
     components: {
@@ -315,17 +321,45 @@ export default {
     async created() {
         this.option = await this.getColumnData(this.getColumnName(384), this.optionBack);
         if (this.detailData.id) {
+            this.showLock = true
             this.editDisabled = true
             this.getDetails(this.detailData.id)
         }
         if (this.$route.query.billNo) {
+            this.showLock = true
             this.getDetails(this.$route.query.billNo)
         }
         if (this.$route.query.params) {
+            this.showLock = true
             this.getDetails(this.$route.query.params)
         }
     },
     methods: {
+        inLock() {
+            const data = {
+                moduleName: "MYDL-C",
+                tableName: "MYDL-C_Detail",
+                billId: this.form.id,
+                no: localStorage.getItem("browserID"),
+                billNo: this.form.contractNo
+            };
+            this.inDetailsKey(this.$route.name, {
+                moduleName: "MYDL-C",
+                tableName: "MYDL-C_Detail",
+                billId: this.form.id,
+                billNo: this.form.contractNo
+
+            });
+            this.checkLock(data).then(res => {
+                if (res.data.code == 200) {
+                    this.onLock(data).then(res => {
+                        if (res.data.code == 200) {
+                            this.showLock = false
+                        }
+                    });
+                }
+            });
+        },
         getDetails(id) {
             const loading = this.$loading({
                 lock: true,
@@ -491,6 +525,14 @@ export default {
             }
         },
         goBack(type) {
+            if (this.form.id) {
+                this.unLock({
+                    moduleName: "MYDL-C",
+                    tableName: "MYDL-C_Detail",
+                    billId: this.form.id,
+                    billNo: this.form.contractNo
+                });
+            }
             this.$emit("goBack", type);
             this.$emit('updateKey')
         },

+ 42 - 1
src/views/tradeAgency/exchangePurchasing/index.vue

@@ -9,6 +9,8 @@
                 @saveColumn="saveColumn('crud', 'option', 'optionBack', 383)" @on-load="onLoad">
                 <template slot="menu" slot-scope="{ row, index }">
                     <el-button size="small" icon="el-icon-edit" type="text" @click="rowEdit(row)">编辑</el-button>
+                    <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
+                        :disabled="row.orderStatus != '录入'">删除</el-button>
                 </template>
                 <template slot="businessNo" slot-scope="{ row }">
                     <span style="color: #1e9fff;cursor: pointer;" @click="rowEdit(row)">{{ row.businessNo }}</span>
@@ -44,7 +46,7 @@ export default {
             optionBack: {
                 height: 'auto',
                 calcHeight: 30,
-                menuWidth: 80,
+                menuWidth: 120,
                 searchShow: true,
                 searchMenuSpan: 6,
                 border: true,
@@ -205,6 +207,31 @@ export default {
         }, 100);
     },
     methods: {
+         inLock() {
+            const data = {
+                moduleName: "MYDL-C",
+                tableName: "MYDL-C_Detail",
+                billId: this.form.id,
+                no: localStorage.getItem("browserID"),
+                billNo: this.form.contractNo
+            };
+            this.inDetailsKey(this.$route.name, {
+                moduleName: "MYDL-C",
+                tableName: "MYDL-C_Detail",
+                billId: this.form.id,
+                billNo: this.form.contractNo
+
+            });
+            this.checkLock(data).then(res => {
+                if (res.data.code == 200) {
+                    this.onLock(data).then(res => {
+                        if (res.data.code == 200) {
+                            this.showLock = false
+                        }
+                    });
+                }
+            });
+        },
         rowEdit(row) {
             this.detailData = {
                 id: row.id
@@ -215,6 +242,20 @@ export default {
         // 编辑
         inEdit(row) {
         },
+        // 删除
+        rowDel(row, index) {
+            this.$confirm("确定将选择数据删除?", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+            }).then(() => {
+                remove({ ids: row.id }).then(res => {
+                    this.onLoad(this.page, this.query);
+                    this.$message.success("成功删除");
+                })
+            })
+
+        },
         searchReset() {
             this.query = this.$options.data().query;
             this.onLoad(this.page);

+ 38 - 1
src/views/tradeAgency/firstSettlement/detailsPage.vue

@@ -20,7 +20,7 @@
                     :disabled="isSaveBtn || form.orderStatus != '已确认'" @click="revokeFee">撤销收款
                 </el-button>
                 <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
-                    v-if="editDisabled" @click="inEdit">编 辑
+                    v-if="editDisabled" :disabled="showLock" @click="inEdit">编 辑
                 </el-button>
                 <el-button v-if="!editDisabled" class="el-button--small-yh" style="margin-left: 6px;" type="primary"
                     size="small" :disabled="isSaveBtn" @click="submit">保 存
@@ -270,6 +270,7 @@ export default {
                     }
                 ]
             },
+            showLock:false,
         }
     },
     components: {
@@ -284,17 +285,45 @@ export default {
     async created() {
         this.option = await this.getColumnData(this.getColumnName(384), this.optionBack);
         if (this.detailData.id) {
+            this.showLock = true
             this.editDisabled = true
             this.getDetails(this.detailData.id)
         }
         if (this.$route.query.billNo) {
+            this.showLock = true
             this.getDetails(this.$route.query.billNo)
         }
         if (this.$route.query.params) {
+            this.showLock = true
             this.getDetails(this.$route.query.params)
         }
     },
     methods: {
+        inLock() {
+            const data = {
+                moduleName: "MYDL-D",
+                tableName: "MYDL-D_Detail",
+                billId: this.form.id,
+                no: localStorage.getItem("browserID"),
+                billNo: this.form.contractNo
+            };
+            this.inDetailsKey(this.$route.name, {
+                moduleName: "MYDL-D",
+                tableName: "MYDL-D_Detail",
+                billId: this.form.id,
+                billNo: this.form.contractNo
+
+            });
+            this.checkLock(data).then(res => {
+                if (res.data.code == 200) {
+                    this.onLock(data).then(res => {
+                        if (res.data.code == 200) {
+                            this.showLock = false
+                        }
+                    });
+                }
+            });
+        },
         getDetails(id) {
             const loading = this.$loading({
                 lock: true,
@@ -398,6 +427,14 @@ export default {
             }
         },
         goBack(type) {
+            if (this.form.id) {
+                this.unLock({
+                    moduleName: "MYDL-D",
+                    tableName: "MYDL-D_Detail",
+                    billId: this.form.id,
+                    billNo: this.form.contractNo
+                });
+            }
             this.$emit("goBack", type);
             this.$emit('updateKey')
         },

+ 17 - 1
src/views/tradeAgency/firstSettlement/index.vue

@@ -9,6 +9,8 @@
                 @saveColumn="saveColumn('crud', 'option', 'optionBack', 383.1)" @on-load="onLoad">
                 <template slot="menu" slot-scope="{ row, index }">
                     <el-button size="small" icon="el-icon-edit" type="text" @click="rowEdit(row)">编辑</el-button>
+                    <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
+                        :disabled="row.orderStatus != '录入'">删除</el-button>
                 </template>
                 <template slot="businessNo" slot-scope="{ row }">
                     <span style="color: #1e9fff;cursor: pointer;" @click="rowEdit(row)">{{ row.businessNo }}</span>
@@ -44,7 +46,7 @@ export default {
             optionBack: {
                 height: 'auto',
                 calcHeight: 30,
-                menuWidth: 80,
+                menuWidth: 120,
                 searchShow: true,
                 searchMenuSpan: 6,
                 border: true,
@@ -206,6 +208,20 @@ export default {
         // 编辑
         inEdit(row) {
         },
+        // 删除
+        rowDel(row, index) {
+            this.$confirm("确定将选择数据删除?", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+            }).then(() => {
+                remove({ ids: row.id }).then(res => {
+                    this.onLoad(this.page, this.query);
+                    this.$message.success("成功删除");
+                })
+            })
+
+        },
         searchReset() {
             this.query = this.$options.data().query;
             this.onLoad(this.page);

+ 73 - 29
src/views/tradeAgency/oceanFreightImport/detailsPage.vue

@@ -10,7 +10,7 @@
                 <el-button size="small" style="margin-right: 8px" :disabled="!form.id" @click="$refs.print.openDialog()">预 览
                 </el-button>
                 <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
-                    v-if="editButton" @click="inEdit">编 辑
+                    v-if="editButton" :disabled="showLock" @click="inEdit">编 辑
                 </el-button>
                 <el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small"
                     :disabled="isSaveBtn || form.status != 0" @click="submit">保 存
@@ -248,7 +248,12 @@
                         <el-button size="small" type="text"
                             :disabled="editDisabled || row.surplusQuantity == 0 || row.$cellEdit"
                             @click="rowCell('生成出库', row, index)">
-                            {{ row.whetherInOutStorage == 1 ? '撤销出库' : '出 库' }}
+                            出 库
+                        </el-button>
+                        <el-button size="small" type="text"
+                            :disabled="editDisabled || row.surplusQuantity == 0 || row.$cellEdit"
+                            @click="rowCell('撤销出库', row, index)">
+                            撤销出库
                         </el-button>
                         <!-- <el-button size="small" type="text"
                             :disabled="editDisabled || row.confirmDispatchVehicles == 1 || row.whetherInOutStorage == 1"
@@ -925,7 +930,7 @@ export default {
             optionBack3: {
                 height: 'auto',
                 calcHeight: 30,
-                menuWidth: 160,
+                menuWidth: 200,
                 tip: false,
                 border: true,
                 index: true,
@@ -1162,6 +1167,7 @@ export default {
                     }
                 ]
             },
+            showLock:false
         }
     },
     components: {
@@ -1179,12 +1185,14 @@ export default {
         this.option3 = await this.getColumnData(this.getColumnName(390), this.optionBack3);
         this.option4 = await this.getColumnData(this.getColumnName(391), this.optionBack4);
         if (this.detailData.id) {
+            this.showLock = true
             this.editButton = true
             this.editDisabled = true
             this.optionForm.disabled = true
             this.getDetails(this.detailData.id)
         }
         if (this.$route.query.billNo) {
+            this.showLock = true
             this.getDetaiByMblno(this.$route.query.billNo)
         }
         if (this.detailData.copyId) {
@@ -1192,6 +1200,31 @@ export default {
         }
     },
     methods: {
+        inLock() {
+            const data = {
+                moduleName: "SI",
+                tableName: "SI_Detail",
+                billId: this.form.id,
+                no: localStorage.getItem("browserID"),
+                billNo: this.form.mblno
+            };
+            this.inDetailsKey(this.$route.name, {
+                moduleName: "SI",
+                tableName: "SI_Detail",
+                billId: this.form.id,
+                billNo: this.form.mblno
+
+            });
+            this.checkLock(data).then(res => {
+                if (res.data.code == 200) {
+                    this.onLock(data).then(res => {
+                        if (res.data.code == 200) {
+                            this.showLock = false
+                        }
+                    });
+                }
+            });
+        },
         getDetaiByMblno(billNo) {
             this.editButton = true
             this.editDisabled = true
@@ -1625,33 +1658,36 @@ export default {
                 if (!row.warehouseName || !row.warehouseUnitPrice) {
                     return this.$message.error((!row.warehouseName ? "仓库," : '') + (!row.warehouseUnitPrice ? "仓储单价" : '') + "不能为空");
                 }
-                if (row.whetherInOutStorage == 1) {
-                    const loading = this.$loading({
-                        lock: true,
-                        text: '加载中',
-                        spinner: 'el-icon-loading',
-                        background: 'rgba(255,255,255,0.7)'
-                    });
-                    revokeOutbound(row).then(res => {
-                        this.$message.success("撤销成功");
-                        this.getDetails(this.form.id)
-                    }).finally(() => {
-                        loading.close()
-                    })
-                } else {
-                    const loading = this.$loading({
-                        lock: true,
-                        text: '加载中',
-                        spinner: 'el-icon-loading',
-                        background: 'rgba(255,255,255,0.7)'
-                    });
-                    generateOutbound(row).then(res => {
-                        this.$message.success("生成出库成功");
-                        this.getDetails(this.form.id)
-                    }).finally(() => {
-                        loading.close()
-                    })
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                generateOutbound(row).then(res => {
+                    this.$message.success("生成出库成功");
+                    this.getDetails(this.form.id)
+                }).finally(() => {
+                    loading.close()
+                })
+
+            }
+            if (name == '撤销出库') {
+                if (!row.warehouseName || !row.warehouseUnitPrice) {
+                    return this.$message.error((!row.warehouseName ? "仓库," : '') + (!row.warehouseUnitPrice ? "仓储单价" : '') + "不能为空");
                 }
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                revokeOutbound(row).then(res => {
+                    this.$message.success("撤销成功");
+                    this.getDetails(this.form.id)
+                }).finally(() => {
+                    loading.close()
+                })
 
             }
             if (name == '出库确认') {
@@ -1853,6 +1889,14 @@ export default {
             }
         },
         goBack(type) {
+            if (this.form.id) {
+                this.unLock({
+                    moduleName: "SI",
+                    tableName: "SI_Detail",
+                    billId: this.form.id,
+                    billNo: this.form.mblno
+                });
+            }
             this.$emit("goBack", type);
             this.$emit('updateKey')
         },

+ 24 - 0
src/views/tradeAgency/oceanFreightImport/index.vue

@@ -323,6 +323,30 @@ export default {
                         overHidden: true
                     },
                     {
+                        label: "创建人",
+                        prop: "createUserName",
+                        width: "80",
+                        overHidden: true
+                    },
+                    {
+                        label: "创建日期",
+                        prop: "createTime",
+                        width: "100",
+                        overHidden: true
+                    },
+                    {
+                        label: "修改人",
+                        prop: "updateUserName",
+                        width: "80",
+                        overHidden: true
+                    },
+                    {
+                        label: "修改日期",
+                        prop: "updateTime",
+                        width: "100",
+                        overHidden: true
+                    },
+                    {
                         label: "备注",
                         prop: "remarks",
                         width: "80",

+ 147 - 18
src/views/tradeAgency/tradeAgency/detailsPage.vue

@@ -11,7 +11,7 @@
                     @click="$refs.report.openDialog()">报表设计
                 </el-button>
                 <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
-                    v-if="editButton" @click="inEdit">编 辑
+                    v-if="editButton" :disabled="showLock" @click="inEdit">编 辑
                 </el-button>
                 <el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small"
                     :disabled="isSaveBtn || form.businessStatus != '录入'" @click="submit">保 存
@@ -37,6 +37,15 @@
         <div style="margin-top: 50px">
             <trade-card title="基础信息">
                 <avue-form :option="optionForm" v-model="form" ref="form">
+                    <template slot="corpNameLabel">
+                        <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">客户:</span>
+                    </template>
+                    <template slot="abroadConsignorCnameLabel">
+                        <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">国外发货人:</span>
+                    </template>
+                    <template slot="domesticConsigneeCnameLabel">
+                        <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">国内收货人:</span>
+                    </template>
                     <tempalte slot="corpName" slot-scope="{ row }">
                         <dic-select v-model="form.corpName" placeholder="客户" key="id" label="cnName" res="records"
                             url="/blade-los/bcorps/listByType?corpTypeName=客户" :filterable="true" :remote="true"
@@ -45,16 +54,17 @@
                     </tempalte>
                     <tempalte slot="contractNo" slot-scope="{ row }">
                         <el-input v-model="form.contractNo" placeholder="请输入 合同号"
-                            :disabled="editDisabled || form.agentItemsList.length"></el-input>
+                            :disabled="editDisabled || form.feeCenterListD.length || form.feeCenterListC.length"></el-input>
                     </tempalte>
                     <tempalte slot="contractDate" slot-scope="{ row }">
                         <el-date-picker v-model="form.contractDate" type="date" placeholder="请选择 合同日期" format="yyyy-MM-dd"
-                            valueFormat="yyyy-MM-dd 00:00:00" :disabled="editDisabled || form.agentItemsList.length">
+                            valueFormat="yyyy-MM-dd 00:00:00"
+                            :disabled="editDisabled || form.feeCenterListD.length || form.feeCenterListC.length">
                         </el-date-picker>
                     </tempalte>
                     <tempalte slot="prepaidAmount" slot-scope="{ row }">
                         <el-input v-model="form.prepaidAmount" placeholder="请输入 预付金额"
-                            :disabled="editDisabled || form.agentItemsList.length"></el-input>
+                            :disabled="editDisabled || form.feeCenterListD.length || form.feeCenterListC.length"></el-input>
                     </tempalte>
                     <tempalte slot="countryOfOrigin" slot-scope="{ row }">
                         <dic-select v-model="form.countryOfOrigin" placeholder="原产地" key="id" label="cnName" res="records"
@@ -123,6 +133,17 @@
                             @selectChange="dicChange('affiliatedCompanyName', $event)"
                             :disabled="editDisabled"></dic-select>
                     </tempalte>
+                    <tempalte slot="fundingParty" slot-scope="{ row }">
+                        <dic-select v-model="form.fundingParty" placeholder="资金方" key="id" label="cnName" res="records"
+                            url="/blade-los/bcorps/listByType?corpTypeName=客户" :filterable="true" :remote="true"
+                            dataName="cnName" @selectChange="dicChange('fundingParty', $event)"
+                            :disabled="editDisabled"></dic-select>
+                    </tempalte>
+                    <tempalte slot="transactionMethod" slot-scope="{ row }">
+                        <dic-select v-model="form.transactionMethod" placeholder="资金方" key="id" label="cnName" res="records"
+                            url="/blade-los/btrademodes/list" :filterable="true" :remote="true" dataName="cnName"
+                            @selectChange="dicChange('transactionMethod', $event)" :disabled="editDisabled"></dic-select>
+                    </tempalte>
                     <tempalte slot="sourceType" slot-scope="{ row }">
                         <div style="display: flex;">
                             <dic-select style="margin-right: 4px;" v-model="form.sourceType" placeholder="客户来源"
@@ -216,6 +237,11 @@
                             dataName="cnName"></dic-select>
                         <span v-else>{{ row.boxType }}</span>
                     </template>
+                    <template slot="boxNoForm" slot-scope="{ row }">
+                        <el-input v-if="row.$cellEdit" v-model="row.boxNo" placeholder="请输入 箱号" size="small"
+                            @change="boxChange(row)"></el-input>
+                        <span v-else>{{ row.boxNo }}</span>
+                    </template>
                     <tempalte slot="orderReleaseMethodForm" slot-scope="{ row }">
                         <dic-select v-if="row.$cellEdit" v-model="row.orderReleaseMethod" placeholder="放单方式" key="dictKey"
                             label="dictValue" url="/blade-system/dict-biz/dictionary?code=release_method"
@@ -253,7 +279,8 @@
                         <!-- <el-button size="small" :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" type="text"
                             :disabled="editDisabled" @click="rowCell(row, index)">{{ row.$cellEdit ? '保 存' : '编 辑'
                             }}</el-button> -->
-                        <el-button size="small" icon="el-icon-delete" type="text" :disabled="editDisabled"
+                        <el-button size="small" icon="el-icon-delete" type="text"
+                            :disabled="editDisabled || form.feeCenterListD.length || form.feeCenterListC.length"
                             @click="rowDel(row, index)">删 除</el-button>
                     </template>
                 </avue-crud>
@@ -291,9 +318,9 @@
                         <avue-crud :data="form.recordInvoiceList" :option="option2"></avue-crud>
                     </el-tab-pane>
 
-                    <!-- <el-tab-pane label="通关记录" name="5">
-                        <avue-crud :data="form.recordClearanceList" :option="option4"></avue-crud>
-                    </el-tab-pane> -->
+                    <el-tab-pane label="合同修改记录" name="5">
+                        <avue-crud :data="form.recordList" :option="option4"></avue-crud>
+                    </el-tab-pane>
                 </el-tabs>
             </trade-card>
             <containerTitle title="上传附件"></containerTitle>
@@ -419,7 +446,7 @@ export default {
                 feeCenterListC: [],
                 feeCenterListD: [],
                 filesCenterList: [],
-                recordClearanceList: [],
+                recordList: [],
                 recordInvoiceList: [],
                 recordListC: [],
                 recordListD: [],
@@ -550,6 +577,11 @@ export default {
                         disabled: false,
                     },
                     {
+                        label: '资金方',
+                        prop: "fundingParty",
+                        disabled: false,
+                    },
+                    {
                         label: '货值',
                         prop: "goodsValue",
                         disabled: true,
@@ -602,6 +634,11 @@ export default {
                         }],
                     },
                     {
+                        label: '成交方式',
+                        prop: "transactionMethod",
+                        disabled: false
+                    },
+                    {
                         label: '所属公司',
                         prop: "affiliatedCompanyName",
                         disabled: false,
@@ -646,7 +683,7 @@ export default {
                         prop: "remarks",
                         type: 'textarea',
                         disabled: false,
-                        span: 18,
+                        span: 12,
                         minRows: 2,
                     },
                 ]
@@ -707,6 +744,7 @@ export default {
                         prop: "boxNo",
                         width: "140",
                         cell: true,
+                        slot: true,
                         overHidden: true,
                         rules: [
                             {
@@ -840,8 +878,8 @@ export default {
                         ]
                     },
                     {
-                        label: "金额",
-                        prop: "amount(USD)",
+                        label: "金额(USD)",
+                        prop: "amount",
                         width: "100",
                         cell: true,
                         slot: true,
@@ -1007,6 +1045,10 @@ export default {
                 align: 'center',
                 column: [
                     {
+                        label: '结算单位',
+                        prop: "corpName",
+                    },
+                    {
                         label: '合同号',
                         prop: "contractNo",
                     },
@@ -1015,6 +1057,18 @@ export default {
                         prop: 'billNo'
                     },
                     {
+                        label: '金额',
+                        prop: 'amount'
+                    },
+                    {
+                        label: '金额(USD)',
+                        prop: 'amountUsd'
+                    },
+                    {
+                        label: '汇率',
+                        prop: 'exchangeRate'
+                    },
+                    {
                         label: '报关单号',
                         prop: 'customsDeclarationNo'
                     },
@@ -1040,20 +1094,33 @@ export default {
                 align: 'center',
                 column: [
                     {
+                        label: '提单号',
+                        prop: 'billNo'
+                    },
+                    {
                         label: '日期',
                         prop: 'date'
                     },
                     {
-                        label: '金额',
+                        label: '操作人',
+                        prop: 'createUserName'
+                    },
+                    {
+                        label: '原金额',
                         prop: 'amount'
                     },
                     {
+                        label: '修改金额',
+                        prop: 'amountUsd'
+                    },
+                    {
                         label: '备注',
                         prop: 'remarks'
                     }
                 ]
             },
-            itemIds: null
+            itemIds: null,
+            showLock: false
         }
     },
     components: {
@@ -1068,7 +1135,6 @@ export default {
     },
     async created() {
         this.option = await this.getColumnData(this.getColumnName(376), this.optionBack);
-        console.log(this.detailData.new)
         if (this.detailData.new) {
             getDicinit('get', '/blade-los/bports/list', { cnName: '青岛' }).then(res => {
                 res.data.data.records.forEach(e => {
@@ -1090,12 +1156,14 @@ export default {
             })
         }
         if (this.detailData.id) {
+            this.showLock = true;
             this.editButton = true
             this.editDisabled = true
             this.optionForm.disabled = true
             this.getDetails(this.detailData.id)
         }
         if (this.$route.query.params) {
+            this.showLock = true;
             this.getDetails(this.$route.query.params)
         }
         if (this.detailData.copyId) {
@@ -1103,6 +1171,34 @@ export default {
         }
     },
     methods: {
+        inLock() {
+            const data = {
+                moduleName: "MYDL",
+                tableName: "MYDL_Detail",
+                billId: this.form.id,
+                no: localStorage.getItem("browserID"),
+                billNo: this.form.contractNo
+            };
+            this.inDetailsKey(this.$route.name, {
+                moduleName: "MYDL",
+                tableName: "MYDL_Detail",
+                billId: this.form.id,
+                billNo: this.form.contractNo
+
+            });
+            this.checkLock(data).then(res => {
+                if (res.data.code == 200) {
+                    this.onLock(data).then(res => {
+                        if (res.data.code == 200) {
+                            this.showLock = false
+                        }
+                    });
+                }
+            });
+        },
+        inJump(name){
+
+        },
         dicChange(name, row) {
             if (name == 'corpName') {
                 if (row) {
@@ -1222,6 +1318,20 @@ export default {
                     this.form.domesticCurrency = null
                 }
             }
+            if (name == 'fundingParty') {
+                if (row) {
+                    this.form.fundingPartyId = row.id
+                } else {
+                    this.form.fundingPartyId = null
+                }
+            }
+            if (name == 'transactionMethod') {
+                if (row) {
+                    this.form.transactionMethodId = row.id
+                } else {
+                    this.form.transactionMethodId = null
+                }
+            }
         },
         rowDicChange(name, row, el) {
             if (name == 'hsCode') {
@@ -1234,6 +1344,16 @@ export default {
                 }
             }
         },
+        boxChange(row) {
+
+            getDicinit('get', '/blade-los/agentitems/selectBoxNo', { boxNo: row.boxNo }).then(res => {
+                if (res.data.data != 'true') {
+                    this.$alert(res.data.data, '提示', {
+                        confirmButtonText: '确定',
+                    });
+                }
+            })
+        },
         countChange(row) {
             row.amount = _.multiply(Number(row.netWeight ? row.netWeight : 0), Number(row.price ? row.price : 0))
         },
@@ -1417,6 +1537,7 @@ export default {
             });
             getDetail({ id: id }).then(res => {
                 this.form = res.data.data
+                this.inLock()
                 if (res.data.data.abroadConsignorId) {
                     this.$refs.abankCode.IdGetDicData({ id: res.data.data.abroadConsignorId })
                 }
@@ -1491,7 +1612,7 @@ export default {
                 }
             }
             if (name == '首款账单') {
-                if (!this.form.domesticConsigneeCname) return this.$message.error("请选择国内收货人");
+                // if (!this.form.domesticConsigneeCname) return this.$message.error("请选择国内收货人");
                 bcurrencyGetExrate({ date: this.form.contractDate, dc: 'D' }).then(res => {
                     res.data.data.forEach(e => {
                         if (this.form.currency == e.code) {
@@ -1517,7 +1638,7 @@ export default {
                 })
             }
             if (name == '尾款账单') {
-                if (!this.form.domesticConsigneeCname) return this.$message.error("请选择国内收货人");
+                // if (!this.form.domesticConsigneeCname) return this.$message.error("请选择国内收货人");
                 let obj = {}
                 obj = {
                     ...this.form,
@@ -1543,7 +1664,7 @@ export default {
                 this.wkType = name
             }
             if (name == '生成首款应付') {
-                if (this.form.applyForPayment == 1) return this.$message.error("请勿重复生成");
+                // if (this.form.applyForPayment == 1) return this.$message.error("请勿重复生成");
                 let obj = {}
                 obj = {
                     id: this.form.id,
@@ -1833,6 +1954,14 @@ export default {
             }
         },
         goBack(type) {
+            if (this.form.id) {
+                this.unLock({
+                    moduleName: "MYDL",
+                    tableName: "MYDL_Detail",
+                    billId: this.form.id,
+                    billNo: this.form.contractNo
+                });
+            }
             this.$emit("goBack", type);
             this.$emit('updateKey')
         },

+ 83 - 37
src/views/tradeAgency/tradeAgency/index.vue

@@ -27,6 +27,24 @@
                         @click="allClick('生成申请付款')">生成货款付款
                     </el-button>
                 </template>
+                <temolate slot="orderStatus" slot-scope="{row}">
+                    <div>
+                        <span v-if="row.orderStatus == item.dictKey" v-for="(item, index) in orderStatusData" :key="index"
+                            :style="{ 'background-color': item.colour }"
+                            style="color: #fff;border-radius: 30px;padding: 2px 8px;text-align: center;">
+                            {{ item.dictValue }}
+                        </span>
+                    </div>
+                </temolate>
+                <temolate slot="businessStatus" slot-scope="{row}">
+                    <div>
+                        <span v-if="row.businessStatus == item.dictKey" v-for="(item, index) in auditStatusData" :key="index"
+                            :style="{ 'background-color': item.colour }"
+                            style="color: #fff;border-radius: 30px;padding: 2px 8px;text-align: center;">
+                            {{ item.dictValue }}
+                        </span>
+                    </div>
+                </temolate>
                 <template slot="menu" slot-scope="{ row, index }">
                     <el-button size="small" icon="el-icon-edit" type="text" @click="rowEdit(row)">编辑</el-button>
                     <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
@@ -59,6 +77,7 @@
   
 <script>
 import { getList, remove, copyAgent, applyForPaymentList, generate } from "@/api/tradeAgency/tradeAgency";
+import { getWorkDicts } from "@/api/system/dictbiz";
 import detailsPage from "./detailsPage";
 import { getToken } from "@/util/auth";
 import _ from "lodash";
@@ -176,6 +195,7 @@ export default {
                 delBtn: false,
                 selection: true,
                 searchIcon: true,
+                align: 'center',
                 searchIndex: 3,
                 column: [
                     {
@@ -243,8 +263,16 @@ export default {
                     {
                         label: "订单状态",
                         prop: "orderStatus",
-                        width: "120",
+                        width: "150",
                         overHidden: true,
+                        search: true,
+                        searchOrder: 14,
+                        type: "select",
+                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=order_Status",
+                        props: {
+                            label: "dictValue",
+                            value: "dictValue"
+                        }
                     },
                     {
                         label: "审核状态",
@@ -252,6 +280,18 @@ export default {
                         width: "100",
                         overHidden: true,
                     },
+                    // {
+                    //     label: "收货款",
+                    //     prop: "whetherReceivedDownPayments",
+                    //     width: "120",
+                    //     overHidden: true,
+                    // },
+                    // {
+                    //     label: "付汇",
+                    //     prop: "whetherReceivedBalancePayment",
+                    //     width: "120",
+                    //     overHidden: true,
+                    // },
                     {
                         label: "审单状态",
                         prop: "reviewStatus",
@@ -340,36 +380,10 @@ export default {
                         overHidden: true,
                     },
                     {
-                        label: "收货款",
-                        prop: "whetherReceivedDownPayments",
-                        width: "120",
-                        overHidden: true,
-                        search: true,
-                        searchOrder: 15,
-                        type: "select",
-                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=received_down",
-                        props: {
-                            label: "dictValue",
-                            value: "dictValue"
-                        },
-                        hide: true,
-                        showColumn: false,
-                    },
-                    {
-                        label: "付汇",
-                        prop: "whetherReceivedBalancePayment",
-                        width: "120",
+                        label: '资金方',
+                        prop: "fundingParty",
+                        width: "100",
                         overHidden: true,
-                        search: true,
-                        searchOrder: 14,
-                        type: "select",
-                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=received_balance",
-                        props: {
-                            label: "dictValue",
-                            value: "dictValue"
-                        },
-                        hide: true,
-                        showColumn: false,
                     },
                     {
                         label: "付汇记录",
@@ -457,7 +471,7 @@ export default {
                         overHidden: true
                     },
                     {
-                        label: "预付比例",
+                        label: "付款方式",
                         prop: "advanceRatio",
                         width: "120",
                         overHidden: true
@@ -469,12 +483,6 @@ export default {
                         overHidden: true
                     },
                     {
-                        label: "铅封号",
-                        prop: "leadSealNo",
-                        width: "80",
-                        overHidden: true
-                    },
-                    {
                         label: "总金额(USD)",
                         prop: "goodsValue",
                         width: "100",
@@ -505,6 +513,36 @@ export default {
                         overHidden: true
                     },
                     {
+                        label: '成交方式',
+                        prop: "transactionMethod",
+                        width: "100",
+                        overHidden: true
+                    },
+                    {
+                        label: "创建人",
+                        prop: "createUserName",
+                        width: "80",
+                        overHidden: true
+                    },
+                    {
+                        label: "创建日期",
+                        prop: "createTime",
+                        width: "100",
+                        overHidden: true
+                    },
+                    {
+                        label: "修改人",
+                        prop: "updateUserName",
+                        width: "80",
+                        overHidden: true
+                    },
+                    {
+                        label: "修改日期",
+                        prop: "updateTime",
+                        width: "100",
+                        overHidden: true
+                    },
+                    {
                         label: "备注",
                         prop: "remarks",
                         width: "80",
@@ -523,6 +561,8 @@ export default {
                 ]
             },
             data: [],
+            orderStatusData: [],
+            auditStatusData:[]
         };
     },
     components: {
@@ -530,6 +570,12 @@ export default {
     },
     async created() {
         this.option = await this.getColumnData(this.getColumnName(375), this.optionBack);
+        getWorkDicts('order_Status').then(res => {
+            this.orderStatusData = res.data.data
+        })
+        getWorkDicts('Auditstatus(T)').then(res => {
+            this.auditStatusData = res.data.data
+        })
     },
     activated() {
         setTimeout(() => {