Browse Source

修改bug

Qukatie 1 year ago
parent
commit
baa735a5c5

+ 19 - 0
src/page/index/tags.vue

@@ -445,6 +445,25 @@ export default {
         if(tag.label == "采购退货(L)"){
             this.$store.commit("CGTH_OUT_DETAIL")
         }
+        if(tag.label == "海运出口(F)"){
+          console.log(1111,this.$store.getters.seaFEStatus)
+            this.$store.commit("OUT_SEAFE_DETAIL")
+        }
+        if(tag.label == "SEAMEND"){
+            this.$store.commit("OUT_SFE_DETAIL")
+        }
+        if(tag.label == "海运进口(F)"){
+            this.$store.commit("OUT_OCEANFI_DETAIL")
+        }
+        if(tag.label == "SIAMEND"){
+            this.$store.commit("OUT_OFI_DETAIL")
+        }
+        if(tag.label == "付费申请(F)"){
+            this.$store.commit("OUT_PAYAPP_DETAIL")
+        }
+        if(tag.label == "销项发票(F)"){
+            this.$store.commit("OUT_FINOUT_DETAIL")
+        }
         this.$store.commit("DEL_TAG", tag);
         if (tag.value === this.tag.value) {
           tag = this.tagList[key === 0 ? key : key - 1]; //如果关闭本标签让前推一个

+ 6 - 1
src/store/getters.js

@@ -80,6 +80,11 @@ const getters = {
   SIreportClose: state => state.ifdetail.SIreportClose, // 海运进口报关
   AEreportClose: state => state.ifdetail.AEreportClose, // 空运出口报关
   AIreportClose: state => state.ifdetail.AIreportClose, // 空运进口报关
-
+  seaFEStatus:state => state.ifdetail.seaFEStatus,//货代海运出口
+  SFEStatus:state => state.ifdetail.SFEStatus,//货代海运出口seamend
+  OceanFIStatus:state => state.ifdetail.OceanFIStatus,//货代海运进口
+  OFIStatus:state => state.ifdetail.OFIStatus,//货代海运出口seamend
+  payAppStatus:state => state.ifdetail.payAppStatus,//货代海运进口
+  finOutStatus:state => state.ifdetail.finOutStatus,//货代海运出口seamend
 }
 export default getters

+ 87 - 21
src/store/modules/ifdetail.js

@@ -12,8 +12,8 @@ const ifdetail = {
     mainItemStatus: false, //主营业务明细
     settleStatus: false, //结算明细
     domSaleStatus: false, // 内贸销售
-    inventoryAccount:false,//库存账明细
-    inboundAndOutbound:false,//出入库工单明细账
+    inventoryAccount: false,//库存账明细
+    inboundAndOutbound: false,//出入库工单明细账
     domPurchaseOrder: false,
     domStockDetail: false, // 国内库存账
     domPurStatus: false, // 内贸采购
@@ -23,8 +23,8 @@ const ifdetail = {
     entranceXsStatus: false, //进口销售,
     xsStatus: false, //出口销售
     ltxsStatus: false,//轮胎销售
-    purchaseStatus:false,//轮胎采购
-    Inventory:false, // 轮胎盘点
+    purchaseStatus: false,//轮胎采购
+    Inventory: false, // 轮胎盘点
     bjStatus: false, //出口报价
     cgStatus: false, //出口采购
     officePurchaseStatus: false, // 办公采购
@@ -40,26 +40,80 @@ const ifdetail = {
     maritimeExport: false,
     collectionSettlement: false,
     // 销售政策
-    xiaoshozhengce:false,
-    approvalDetails:false, // 海运出口 审批详情
-    Allocateandtransfer:false, // 调拨L
-    CorrespondenceUnitslos:false, // 海运出口 往来单位
-    paidapplication:false, // 付费申请(F)
-    ReconciliationCenterF:false, // 对账中心(F)
-    SettlementCenterF:false, // 结算中心(F)
-    seamendF:false, // SEAMEND
-    siamendF:false, // SIAMEND
-    aeamendF:false, // AEAMEND
-    aiamendF:false, // AIAMEND
-    SEreportClose:false, // 海运出口报关
-    SIreportClose:false, // 海运进口报关
-    AEreportClose:false, // 空运出口报关
-    AIreportClose:false, // 空运进口报关
-    xsthStatus:false,//销售退货
-    cgthStatus:false,//采购退货
+    xiaoshozhengce: false,
+    approvalDetails: false, // 海运出口 审批详情
+    Allocateandtransfer: false, // 调拨L
+    CorrespondenceUnitslos: false, // 海运出口 往来单位
+    paidapplication: false, // 付费申请(F)
+    ReconciliationCenterF: false, // 对账中心(F)
+    SettlementCenterF: false, // 结算中心(F)
+    seamendF: false, // SEAMEND
+    siamendF: false, // SIAMEND
+    aeamendF: false, // AEAMEND
+    aiamendF: false, // AIAMEND
+    SEreportClose: false, // 海运出口报关
+    SIreportClose: false, // 海运进口报关
+    AEreportClose: false, // 空运出口报关
+    AIreportClose: false, // 空运进口报关
+    xsthStatus: false,//销售退货
+    cgthStatus: false,//采购退货
+    seaFEStatus: false,//货代海运出口
+    SFEStatus: false,//货代海运出口seamend
+    OceanFIStatus: false,//货代海运进口
+    OFIStatus: false,//货代海运出口seamend
+    payAppStatus: false,
+    finOutStatus: false,
   },
   actions: {},
   mutations: {
+    //开启付费申请(F)
+    IN_PAYAPP_DETAIL(state) {
+      state.payAppStatus = true
+    },
+    //关闭付费申请(F)
+    OUT_PAYAPP_DETAIL(state) {
+      state.payAppStatus = false
+    },
+    //开启销项发票(F)
+    IN_FINOUT_DETAIL(state) {
+      state.finOutStatus = true
+    },
+    //关闭销项发票(F)
+    OUT_FINOUT_DETAIL(state) {
+      state.finOutStatus = false
+    },
+    //开启海运出口(F)
+    IN_SEAFE_DETAIL(state) {
+      state.seaFEStatus = true
+    },
+    //关闭海运出口(F)
+    OUT_SEAFE_DETAIL(state) {
+      state.seaFEStatus = false
+    },
+    //开启海运出口(F)
+    IN_SFE_DETAIL(state) {
+      state.SFEStatus = true
+    },
+    //关闭海运出口(F)
+    OUT_SFE_DETAIL(state) {
+      state.SFEStatus = false
+    },
+    //开启海运出口(F)
+    IN_OCEANFI_DETAIL(state) {
+      state.OceanFIStatus = true
+    },
+    //关闭海运出口(F)
+    OUT_OCEANFI_DETAIL(state) {
+      state.OceanFIStatus = false
+    },
+    //开启海运出口(F)
+    IN_OFI_DETAIL(state) {
+      state.OFIStatus = true
+    },
+    //关闭海运出口(F)
+    OUT_OFI_DETAIL(state) {
+      state.OFIStatus = false
+    },
     // 审批数据里加的 销售政策开
     XIAO_SHO_ZHENG_CEKAI(state) {
       state.xiaoshozhengce = true
@@ -639,6 +693,18 @@ const ifdetail = {
       if (tag.label == '采购退货(F)') {
         state.cgthStatus = true
       }
+      if (tag.label == '海运出口(F)') {
+        state.seaFEStatus = true
+      }
+      if (tag.label == 'SEAMEND') {
+        state.SFEStatus = true
+      }
+      if (tag.label == '海运进口(F)') {
+        state.OceanFIStatus = true
+      }
+      if (tag.label == 'SIAMEND') {
+        state.OFIStatus = true
+      }
     }
   }
 

+ 1 - 1
src/views/exportTrade/salesContract/components/goodsInfo.vue

@@ -221,7 +221,7 @@
       <template slot="partsDescribeForm" slot-scope="{type,disabled}">
         <el-input type="textarea" :rows="2" v-model="goodsForm.partsDescribe" size="small" placeholder=""
           @change="editChange(goodsForm)">
-        </el-input>outFactoryPrice
+        </el-input>
       </template>
       //英文名称
       <template slot="enameForm" slot-scope="{type,disabled}">

+ 4 - 0
src/views/iosBasicData/AirtransportExport/bills/index.vue

@@ -358,6 +358,7 @@
                               <span slot="label" style="color: #d86363">退舱</span>
                           </el-tab-pane>
                           <el-tab-pane label="完成" name="3"></el-tab-pane>
+                          <el-tab-pane label="全部" name="4"></el-tab-pane>
                       </el-tabs>
                   </div>
               </template>
@@ -1429,6 +1430,9 @@ import { getDeptTree } from "@/api/system/dept";
 
         // tabs切换筛选
           handleClick(tab, event){
+            if(this.query.billStatus==4){
+                this.query.billStatus=null
+             }
               this.onLoad(this.page, this.query);
           },
           // 获取委托人数据

+ 4 - 0
src/views/iosBasicData/AirtransportImport/bills/index.vue

@@ -358,6 +358,7 @@
                               <span slot="label" style="color: #d86363">退舱</span>
                           </el-tab-pane>
                           <el-tab-pane label="完成" name="3"></el-tab-pane>
+                          <el-tab-pane label="全部" name="4"></el-tab-pane>
                       </el-tabs>
                   </div>
               </template>
@@ -1429,6 +1430,9 @@ import { getDeptTree } from "@/api/system/dept";
 
         // tabs切换筛选
           handleClick(tab, event){
+             if(this.query.billStatus==4){
+                this.query.billStatus=null
+             }
               this.onLoad(this.page, this.query);
           },
           // 获取委托人数据

+ 43 - 5
src/views/iosBasicData/ComputationCenter/index.vue

@@ -340,11 +340,49 @@ export default {
         },
         // 编辑
         editfun(row) {
-            this.isShow = false
-            this.editSave = true
-            this.$nextTick(() => {
-                this.$refs.settlementDetailsRef.finstlbillsDetailfun(row.id)
-            })
+            console.log(this.tabsValue)
+            if (this.tabsValue == 'C') {
+                if (this.$store.getters.payAppStatus) {
+                    this.$alert("付费申请页面已存在,请关闭付费申请再进行操作", "温馨提示", {
+                        confirmButtonText: "确定",
+                        type: 'warning',
+                        callback: action => {
+                        }
+                    });
+                } else {
+                    this.$router.push({
+                        path: `/iosBasicData/PaymentApplication/index`,
+                        query: {
+                            id: row.id
+                        }
+                    })
+                }
+
+            } else if (this.tabsValue == 'D') {
+                if (this.$store.getters.finOutStatus) {
+                    this.$alert("销项发票页面已存在,请关闭销项发票再进行操作", "温馨提示", {
+                        confirmButtonText: "确定",
+                        type: 'warning',
+                        callback: action => {
+                        }
+                    });
+                } else {
+                    this.$router.push({
+                        path: `/iosBasicData/fininvoicesOutput/index`,
+                        query: {
+                            id: row.id
+                        }
+                    })
+                }
+
+            } else {
+                this.isShow = false
+                this.editSave = true
+                this.$nextTick(() => {
+                    this.$refs.settlementDetailsRef.finstlbillsDetailfun(row.id)
+                })
+            }
+
         },
         // 编辑
         editfun2(row) {

+ 17 - 10
src/views/iosBasicData/OceanFreightImport/bills/index.vue

@@ -319,16 +319,6 @@
                     </el-button>
                     <el-button type="warning" size="small" @click="outExport">导 出
                     </el-button>
-                    <!--<el-dropdown style="line-height: 0">-->
-                    <!--    <el-button size="small" type="success" style="margin-right: 8px" :disabled="selectionList.length == 0" >-->
-                    <!--        发送 EDI<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
-                    <!--    </el-button>-->
-                    <!--    <el-dropdown-menu slot="dropdown">-->
-                    <!--        <el-dropdown-item v-for="item in ediData" :key="item.id"-->
-                    <!--                          @click.native="editypesSendingEdifun(item)" >{{item.cnName}}-->
-                    <!--        </el-dropdown-item>-->
-                    <!--    </el-dropdown-menu>-->
-                    <!--</el-dropdown>-->
                     <div style="margin-top: 10px">
                         <el-tabs type="card" v-model="query.billStatus" @tab-click="handleClick">
                             <el-tab-pane label="接单" name="0">
@@ -338,6 +328,7 @@
                                 <span slot="label" style="color: #d86363">退舱</span>
                             </el-tab-pane>
                             <el-tab-pane label="完成" name="3"></el-tab-pane>
+                            <el-tab-pane label="全部" name="4"></el-tab-pane>
                         </el-tabs>
                     </div>
                 </template>
@@ -1374,6 +1365,15 @@ export default {
         this.statusWorkDictsfun() // 业务审核类型
         this.editypesListfun() // edi 数据获取
     },
+    activated() {
+        if (this.$route.query.id) {
+            if (!this.$store.getters.OceanFIStatus) {
+                setTimeout(() => {
+                    this.rowCellfun(this.$route.query.id)
+                }, 200);
+            }
+        }
+    },
     methods: {
         //导出
         outExport() {
@@ -1436,6 +1436,9 @@ export default {
 
         // tabs切换筛选
         handleClick(tab, event) {
+            if(this.query.billStatus==4){
+                this.query.billStatus=null
+            }
             this.onLoad(this.page, this.query);
         },
         // 获取委托人数据
@@ -1655,11 +1658,13 @@ export default {
             }
             this.isShow = true;
             this.onLoad(this.page, this.search);
+            this.$store.commit("OUT_OCEANFI_DETAIL");
         },
         // 新增弹窗开启
         addbtnfun() {
             this.detailData.seeDisabled = false
             this.isShow = false
+            this.$store.commit("IN_OCEANFI_DETAIL");
         },
         // 复制单据
         CopyDocumentsfun() {
@@ -1674,6 +1679,7 @@ export default {
                 this.$refs.billsDetails.pageLoading = true
                 this.$refs.billsDetails.billsCopyBillsfun(this.selectionList[0].id)
             })
+            this.$store.commit("IN_OCEANFI_DETAIL");
         },
         // 编辑详情打开
         rowCellfun(id, row) {
@@ -1694,6 +1700,7 @@ export default {
                 this.$refs.billsDetails.pageLoading = true
                 this.$refs.billsDetails.billsDetailfun(id)
             })
+            this.$store.commit("IN_OCEANFI_DETAIL");
         },
 
         rowSave(row, done, loading) {

+ 11 - 4
src/views/iosBasicData/PaymentApplication/index.vue

@@ -376,11 +376,15 @@ export default {
     this.$store.commit('FFQSF_IN_DETAIL')
     // this.dictionaryfun() // 获取字典数据
     this.getRateListfun() // 币别数据
- 
+
   },
-  activated(){
-   if (this.$route.query.id) {
-      this.editFun(this.$route.query)
+  activated() {
+    if (this.$route.query.id) {
+      setTimeout(() => {
+        if (!this.$store.getters.payAppStatus) {
+          this.editFun(this.$route.query)
+        }
+      }, 200);
     }
   },
   methods: {
@@ -416,6 +420,7 @@ export default {
       this.isShow = false
       this.editSave = false
       // this.$refs.finstlbillsDetails
+      this.$store.commit("IN_PAYAPP_DETAIL");
     },
     // 编辑
     editFun(row) {
@@ -424,6 +429,7 @@ export default {
       this.$nextTick(() => {
         this.$refs.finstlbillsDetails.finstlbillsDetailfun(row.id)
       })
+      this.$store.commit("IN_PAYAPP_DETAIL");
     },
     // 详情的返回列表
     goBack() {
@@ -437,6 +443,7 @@ export default {
       }
       this.isShow = true;
       this.onLoad(this.page, this.search);
+      this.$store.commit("OUT_PAYAPP_DETAIL");
     },
     // 添加
     rowSave(row, done, loading) {

+ 21 - 4
src/views/iosBasicData/SeafreightExportF/bills/index.vue

@@ -339,6 +339,7 @@
                                 <span slot="label" style="color: #d86363">退舱</span>
                             </el-tab-pane>
                             <el-tab-pane label="完成" name="3"></el-tab-pane>
+                            <el-tab-pane label="全部" name="4"></el-tab-pane>
                         </el-tabs>
                     </div>
                 </template>
@@ -1202,7 +1203,7 @@ export default {
                         prop: "status",
                         type: 'select',
                         dicData: [],
-                        width:'120',
+                        width: '120',
                         props: {
                             label: "dictValue",
                             value: "dictKey"
@@ -1368,9 +1369,9 @@ export default {
         if (this.$route.query.home) {
             this.addbtnfun()
         }
-        if (this.$route.query.id) {
-            this.rowCellfun(this.$route.query.id)
-        }
+        // if (this.$route.query.id) {
+        //     this.rowCellfun(this.$route.query.id)
+        // }
         this.option = await this.getColumnData(this.getColumnName(309), this.optionBack);
         this.mawbOption = await this.getColumnData(this.getColumnName(309.7), this.mawbOptionBack); // 主单列表
         this.billStatusWorkDictsfun() // 获取业务状态字典数据
@@ -1388,6 +1389,15 @@ export default {
         this.statusWorkDictsfun() // 业务审核类型
         this.editypesListfun() // edi 数据获取
     },
+    activated() {
+        if (this.$route.query.id) {
+            if (!this.$store.getters.seaFEStatus) {
+                setTimeout(() => {
+                    this.rowCellfun(this.$route.query.id)
+                }, 200);
+            }
+        }
+    },
     methods: {
         //导出
         outExport() {
@@ -1450,6 +1460,9 @@ export default {
 
         // tabs切换筛选
         handleClick(tab, event) {
+            if(this.query.billStatus==4){
+                this.query.billStatus=null
+            }
             this.onLoad(this.page, this.query);
         },
         // 获取委托人数据
@@ -1692,11 +1705,13 @@ export default {
             }
             this.isShow = true;
             this.onLoad(this.page, this.search);
+            this.$store.commit("OUT_SEAFE_DETAIL");
         },
         // 新增弹窗开启
         addbtnfun() {
             this.detailData.seeDisabled = false
             this.isShow = false
+            this.$store.commit("IN_SEAFE_DETAIL");
         },
         // 复制单据
         CopyDocumentsfun() {
@@ -1711,6 +1726,7 @@ export default {
                 this.$refs.billsDetails.pageLoading = true
                 this.$refs.billsDetails.billsCopyBillsfun(this.selectionList[0].id)
             })
+            this.$store.commit("IN_SEAFE_DETAIL");
         },
         // 编辑详情打开
         rowCellfun(id, row) {
@@ -1731,6 +1747,7 @@ export default {
                 this.$refs.billsDetails.pageLoading = true
                 this.$refs.billsDetails.billsDetailfun(id)
             })
+            this.$store.commit("IN_SEAFE_DETAIL");
         },
 
         rowSave(row, done, loading) {

+ 79 - 0
src/views/iosBasicData/decisionAnalysis/index.vue

@@ -15,6 +15,13 @@
                     <template slot="header">
                         <avue-crud :data="commodityData" :table-loading="itemLoading" :option="itemOption"></avue-crud>
                     </template>
+                    <template slot="corpCnName" slot-scope="{row}">
+                        <span
+                            style="color: #1e9fff;cursor: pointer;width: 100%;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;"
+                            @click.stop="rowCell(row)">
+                            {{ row.corpCnName }}
+                        </span>
+                    </template>
                 </avue-crud>
             </el-tab-pane>
             <el-tab-pane label="图表" name="second">
@@ -212,6 +219,8 @@ export default {
                         overHidden: true,
                         filterable: true,
                         type: 'select',
+                        multiple: true,
+                        dataType: "string",
                         dicUrl: '/api/blade-system/dict-biz/dictionary?code=decisionAnalysis_business_type',
                         props: {
                             label: "dictValue",
@@ -656,6 +665,76 @@ export default {
         this.option.height = window.innerHeight - 370;
     },
     methods: {
+        rowCell(row) {
+            if (row.businessType == 'SE') {
+                if (this.$store.getters.seaFEStatus) {
+                    this.$alert("海运出口页面已存在,请关闭海运出口再进行操作", "温馨提示", {
+                        confirmButtonText: "确定",
+                        type: 'warning',
+                        callback: action => {
+                        }
+                    });
+                } else {
+                    this.$router.push({
+                        path: `/iosBasicData/SeafreightExportF/bills/index`,
+                        query: {
+                            id: row.id
+                        }
+                    })
+                }
+            }
+            if (row.businessType == 'ASE') {
+                if (this.$store.getters.SFEStatus) {
+                    this.$alert("SEAMEND页面已存在,请关闭SEAMEND再进行操作", "温馨提示", {
+                        confirmButtonText: "确定",
+                        type: 'warning',
+                        callback: action => {
+                        }
+                    });
+                } else {
+                    this.$router.push({
+                        path: `/iosBasicData/seamends/index`,
+                        query: {
+                            id: row.id
+                        }
+                    })
+                }
+            }
+            if (row.businessType == 'SI') {
+                if (this.$store.getters.OceanFIStatus) {
+                    this.$alert("海运进口页面已存在,请关闭海运进口再进行操作", "温馨提示", {
+                        confirmButtonText: "确定",
+                        type: 'warning',
+                        callback: action => {
+                        }
+                    });
+                } else {
+                    this.$router.push({
+                        path: `/iosBasicData/OceanFreightImport/bills/index`,
+                        query: {
+                            id: row.id
+                        }
+                    })
+                }
+            }
+            if (row.businessType == 'ASI') {
+                if (this.$store.getters.OFIStatus) {
+                    this.$alert("SIAMEND页面已存在,请关闭SIAMEND再进行操作", "温馨提示", {
+                        confirmButtonText: "确定",
+                        type: 'warning',
+                        callback: action => {
+                        }
+                    });
+                } else {
+                    this.$router.push({
+                        path: `/iosBasicData/siamends/index`,
+                        query: {
+                            id: row.id
+                        }
+                    })
+                }
+            }
+        },
         handleClick() {
             if (this.activeName == 'first') {
                 this.query = this.search

+ 10 - 1
src/views/iosBasicData/fininvoicesOutput/index.vue

@@ -720,7 +720,11 @@ export default {
     },
     activated() {
         if (this.$route.query.id) {
-            this.editFun(this.$route.query)
+            setTimeout(() => {
+                if (!this.$store.getters.finOutStatu) {
+                    this.editFun(this.$route.query)
+                }
+            }, 200);
         }
     },
     methods: {
@@ -737,6 +741,7 @@ export default {
             this.$nextTick(() => {
                 this.$refs.fininvoicesDetails.fininvoicesGenerateFinInvoicesfun(row.id)
             })
+            this.$store.commit("IN_FINOUT_DETAIL");
         },
         // 多个开票
         multipleInvoicing() {
@@ -754,10 +759,12 @@ export default {
             this.$nextTick(() => {
                 this.$refs.fininvoicesDetails.fininvoicesGenerateFinInvoicesfun(arrId.join(','))
             })
+            this.$store.commit("IN_FINOUT_DETAIL");
         },
         // 新建发票
         newbillFun() {
             this.isShow = false;
+            this.$store.commit("IN_FINOUT_DETAIL");
         },
         // 编辑
         editFun(row) {
@@ -766,6 +773,7 @@ export default {
             this.$nextTick(() => {
                 this.$refs.fininvoicesDetails.fininvoicesDetailfun(row.id)
             })
+            this.$store.commit("IN_FINOUT_DETAIL");
         },
         // 详情的返回列表
         goBack() {
@@ -779,6 +787,7 @@ export default {
             }
             this.isShow = true;
             this.onLoad(this.page, this.search);
+            this.$store.commit("OUT_FINOUT_DETAIL");
         },
 
         rowDel(row) {

+ 38 - 32
src/views/iosBasicData/rateManagement/index.vue

@@ -38,14 +38,14 @@
           <!--  删除-->
           <!--</el-button>-->
 
-            <el-button v-if="row.status == 1" type="text" icon="el-icon-turn-off" style="color: #85e967" size="small"
-                       @click.stop="statusfun(row.id,0)">
-                启用
-            </el-button>
-            <el-button v-if="row.status == 0" type="text" icon="el-icon-turn-off" style="color: #e83c3a" size="small"
-                       @click.stop="statusfun(row.id,1)">
-                停用
-            </el-button>
+          <el-button v-if="row.status == 1" type="text" icon="el-icon-turn-off" style="color: #85e967" size="small"
+            @click.stop="statusfun(row.id, 0)">
+            启用
+          </el-button>
+          <el-button v-if="row.status == 0" type="text" icon="el-icon-turn-off" style="color: #e83c3a" size="small"
+            @click.stop="statusfun(row.id, 1)">
+            停用
+          </el-button>
         </template>
       </avue-crud>
     </basic-container>
@@ -55,7 +55,7 @@
 
 <script>
 import detailPage from "./detailsPage";
-import {getRateList, deleteDetails, dataDetail,typeSave} from "@/api/iosBasicData/rateManagement";
+import { getRateList, deleteDetails, dataDetail, typeSave } from "@/api/iosBasicData/rateManagement";
 
 export default {
   name: "index",
@@ -92,9 +92,9 @@ export default {
         searchIndex: 3,
         calcHeight: 30,
         addBtnText: "新建币别及汇率",
-        addBtn:false,
+        addBtn: false,
         stripe: true,
-        menuWidth:140,
+        menuWidth: 140,
         column: [
           {
             label: "编码",
@@ -121,6 +121,7 @@ export default {
             label: "国际三字码",
             prop: "unCode",
             overHidden: true,
+            width: "100",
             search: true
           },
           {
@@ -143,6 +144,7 @@ export default {
           {
             label: "对本币汇率",
             prop: "exrate",
+            width: "100",
             overHidden: true
           },
           {
@@ -188,35 +190,35 @@ export default {
     }
     this.getmesageList()
   },
-  mounted(){
+  mounted() {
     this.getmesageList()
   },
   methods: {
     //表格错行
-    getmesageList(){
+    getmesageList() {
       this.$refs.crud.refreshTable();
       this.$refs.crud.doLayout();
     },
-      // 禁用启用按钮
-      statusfun(id,status){
-          this.$confirm("确定将选择数据更改状态?", {
-              confirmButtonText: "确定",
-              cancelButtonText: "取消",
-              type: "warning"
-          }).then(()=>{
-              dataDetail(id).then(res=>{
-                  let obj = res.data.data;
-                  obj.status = status
-                  typeSave(obj).then(()=>{
-                      this.onLoad(this.page);
-                      this.$message({
-                          type: "success",
-                          message: "操作成功!"
-                      });
-                  })
-              })
+    // 禁用启用按钮
+    statusfun(id, status) {
+      this.$confirm("确定将选择数据更改状态?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        dataDetail(id).then(res => {
+          let obj = res.data.data;
+          obj.status = status
+          typeSave(obj).then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
           })
-      },
+        })
+      })
+    },
     searchCriteriaSwitch(type) {
       if (type) {
         this.option.height = this.option.height - 46;
@@ -259,6 +261,10 @@ export default {
         .then(res => {
           this.dataList = res.data.data.records ? res.data.data.records : [];
           this.page.total = res.data.data.total;
+          this.$nextTick(() => {
+            this.$refs.crud.refreshTable()
+            this.$refs.crud.doLayout();
+          })
         })
         .finally(() => {
           this.loading = false;

+ 436 - 451
src/views/iosBasicData/seamends/index.vue

@@ -1,495 +1,480 @@
 <template>
   <div>
-      <basic-container v-if="isShow">
-          <avue-crud :option="option"
-                     :table-loading="loading"
-                     :data="data"
-                     :page.sync="page"
-                     :permission="permissionList"
-                     :before-open="beforeOpen"
-                     v-model="form"
-                     id="out-table"
-                     :header-cell-class-name="headerClassName"
-                     ref="crud"
-                     @row-update="rowUpdate"
-                     @row-save="rowSave"
-                     @row-del="rowDel"
-                     @search-change="searchChange"
-                     @search-reset="searchReset"
-                     @selection-change="selectionChange"
-                     @current-change="currentChange"
-                     @size-change="sizeChange"
-                     @refresh-change="refreshChange"
-                     @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 322)"
-                     @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 322)"
-                     @on-load="onLoad">
-              <template slot="menuLeft">
-                  <el-button type="primary"
-                             size="small"
-                             icon="el-icon-plus"
-                             @click="addbtnfun()">新建AMEND
-                  </el-button>
-                  <el-button type="danger"
-                             size="small"
-                             icon="el-icon-delete"
-                             plain
-                             @click="handleDelete">批量删除
-                  </el-button>
-              </template>
-              <template slot="menu" slot-scope="{ row }">
-                  <el-button
-                      type="text"
-                      size="small"
-                      icon="el-icon-edit"
-                      @click.stop="rowEdit(row)">修改
-                  </el-button>
-                  <!--:disabled="saberUserInfo.role_name.indexOf('允许修改他人业务') == -1?saberUserInfo.user_id != row.createUser:false"-->
-                  <el-button
-                      type="text"
-                      size="small"
-                      v-if="saberUserInfo.role_name.indexOf('admin') == -1?saberUserInfo.role_name.indexOf('允许修改他人业务') == -1?saberUserInfo.user_id == row.createUser:true:true"
-                      :disabled="row.status == 1 || row.status == 2 || row.status == 3"
-                      @click.stop="rowDel(row)"
-                      icon="el-icon-delete" >删除
-                  </el-button>
-              </template>
-              <template slot="billNo" slot-scope="{ row }">
-                  <span style="color: #1e9fff;cursor:pointer;"
-                        @click="rowEdit(row)">{{row.billNo}}
-                  </span>
-              </template>
-          </avue-crud>
-      </basic-container>
-      <amends-details ref="amendsDetails" v-if="!isShow" @goBack="goBack"></amends-details>
+    <basic-container v-if="isShow">
+      <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
+        :before-open="beforeOpen" v-model="form" id="out-table" :header-cell-class-name="headerClassName" ref="crud"
+        @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel" @search-change="searchChange"
+        @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
+        @size-change="sizeChange" @refresh-change="refreshChange"
+        @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 322)"
+        @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 322)" @on-load="onLoad">
+        <template slot="menuLeft">
+          <el-button type="primary" size="small" icon="el-icon-plus" @click="addbtnfun()">新建AMEND
+          </el-button>
+          <el-button type="danger" size="small" icon="el-icon-delete" plain @click="handleDelete">批量删除
+          </el-button>
+        </template>
+        <template slot="menu" slot-scope="{ row }">
+          <el-button type="text" size="small" icon="el-icon-edit" @click.stop="rowEdit(row)">修改
+          </el-button>
+          <!--:disabled="saberUserInfo.role_name.indexOf('允许修改他人业务') == -1?saberUserInfo.user_id != row.createUser:false"-->
+          <el-button type="text" size="small"
+            v-if="saberUserInfo.role_name.indexOf('admin') == -1 ? saberUserInfo.role_name.indexOf('允许修改他人业务') == -1 ? saberUserInfo.user_id == row.createUser : true : true"
+            :disabled="row.status == 1 || row.status == 2 || row.status == 3" @click.stop="rowDel(row)"
+            icon="el-icon-delete">删除
+          </el-button>
+        </template>
+        <template slot="billNo" slot-scope="{ row }">
+          <span style="color: #1e9fff;cursor:pointer;" @click="rowEdit(row)">{{ row.billNo }}
+          </span>
+        </template>
+      </avue-crud>
+    </basic-container>
+    <amends-details ref="amendsDetails" v-if="!isShow" @goBack="goBack"></amends-details>
   </div>
 </template>
 
 <script>
-  import {amendsList, amendsDetail, amendsSubmit, amendsRemove} from "@/api/iosBasicData/amends";
-  import amendsDetails from "@/views/iosBasicData/seamends/amendsDetails.vue";
-  import {mapGetters} from "vuex";
-  import {getWorkDicts} from "@/api/system/dictbiz";
-  import {getBcorpslistByType} from "@/api/iosBasicData/bcorps";
+import { amendsList, amendsDetail, amendsSubmit, amendsRemove } from "@/api/iosBasicData/amends";
+import amendsDetails from "@/views/iosBasicData/seamends/amendsDetails.vue";
+import { mapGetters } from "vuex";
+import { getWorkDicts } from "@/api/system/dictbiz";
+import { getBcorpslistByType } from "@/api/iosBasicData/bcorps";
 
-  export default {
-    components:{amendsDetails},
-    data() {
-      return {
-        isShow:true,
-        form: {},
-        query: {},
-        loading: true,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        selectionList: [],
-        option:{},
-        optionBack: {
-          height:'auto',
-          calcHeight: 30,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          viewBtn: true,
-          selection: true,
-          dialogClickModal: false,
-            menuWidth:'140',
-            searchIcon:true,
-            searchIndex:3,
-          column: [
-              {
-                  label: "客户名称",
-                  prop: "corpCnName",
-                  search:true,
-                  overHidden:true,
-                  type:'select',
-                  filterable:true,
-                  remote:true,
-                  dicUrl: "/api/blade-los/bcorps/listByType?cnName={{key}}",
-                  dicData:[],
-                  props: {
-                      label: 'cnName',
-                      value: 'cnName',
-                      res:'data.records'
-                  },
-              },
-              {
-                  label: "单据编号",
-                  prop: "billNo",
-                  search:true,
-                  overHidden:true,
-              },
-              {
-                  label: "所属团队",
-                  prop: "teamName",
-                  overHidden:true,
-              },
-              {
-                  label: "原MB/L NO",
-                  prop: "mblno",
-                  search:true,
-                  overHidden:true,
-              },
-              {
-                  label: "原HB/L NO",
-                  prop: "hblno",
-                  search:true,
-                  overHidden:true,
-              },
-              {
-                  label: "BOOKING NO",
-                  prop: "bookingNo",
-                  searchLabelWidth:100,
-                  search:true,
-                  overHidden:true,
-              },
-              {
-                  label: "原船名",
-                  prop: "vesselCnName",
-                  overHidden:true,
-              },
-              {
-                  label: "原航次",
-                  prop: "voyageNo",
-                  overHidden:true,
-              },
-              {
-                  label: "原外提单号",
-                  prop: "refno",
-                  search:true,
-                  overHidden:true,
-              },
-              {
-                  label: "单据日期",
-                  prop: "billDate",
-                  overHidden:true,
-              },
-            {
-              label: "原单据编号",
-              prop: "origBillNo",
-              search:true,
-              overHidden:true,
-            },
-            {
-              label: "单据类型",
-              prop: "origBillType",
-              overHidden:true,
-              rules: [{
-                required: true,
-                message: "请输入单据类型, DD=直单(默认) MM=主单 MH=主分单 HH=从分单",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "状态",
-              prop: "status",
-              search:true,
-              type: "select",
-              dicUrl: "/api/blade-system/dict-biz/dictionary?code=ameno_status",
-              dicData:[],
-              props: {
-                  label: "dictValue",
-                  value: "dictKey"
-              },
-              overHidden:true,
+export default {
+  components: { amendsDetails },
+  data() {
+    return {
+      isShow: true,
+      form: {},
+      query: {},
+      loading: true,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      selectionList: [],
+      option: {},
+      optionBack: {
+        height: 'auto',
+        calcHeight: 30,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        border: true,
+        index: true,
+        viewBtn: true,
+        selection: true,
+        dialogClickModal: false,
+        menuWidth: '140',
+        searchIcon: true,
+        searchIndex: 3,
+        column: [
+          {
+            label: "客户名称",
+            prop: "corpCnName",
+            search: true,
+            overHidden: true,
+            type: 'select',
+            filterable: true,
+            remote: true,
+            dicUrl: "/api/blade-los/bcorps/listByType?cnName={{key}}",
+            dicData: [],
+            props: {
+              label: 'cnName',
+              value: 'cnName',
+              res: 'data.records'
             },
-              {
-                  label: "单据开始日期",
-                  prop: "billDateStart",
-                  search:true,
-                  overHidden:true,
-                  hide:true,
-                  searchLabelWidth:'100',
-                  type: "date",
-                  format: "yyyy-MM-dd",
-                  valueFormat: "yyyy-MM-dd HH:mm:ss",
-              },
-              {
-                  label: "单据结束日期",
-                  prop: "billDateEnd",
-                  search:true,
-                  overHidden:true,
-                  hide:true,
-                  searchLabelWidth:'100',
-                  type: "date",
-                  format: "yyyy-MM-dd",
-                  valueFormat: "yyyy-MM-dd HH:mm:ss",
-              },
-            {
-              label: "备注",
-              prop: "remarks",
-                overHidden:true,
+          },
+          {
+            label: "单据编号",
+            prop: "billNo",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "所属团队",
+            prop: "teamName",
+            overHidden: true,
+          },
+          {
+            label: "原MB/L NO",
+            prop: "mblno",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "原HB/L NO",
+            prop: "hblno",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "BOOKING NO",
+            prop: "bookingNo",
+            searchLabelWidth: 100,
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "原船名",
+            prop: "vesselCnName",
+            overHidden: true,
+          },
+          {
+            label: "原航次",
+            prop: "voyageNo",
+            overHidden: true,
+          },
+          {
+            label: "原外提单号",
+            prop: "refno",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "单据日期",
+            prop: "billDate",
+            overHidden: true,
+          },
+          {
+            label: "原单据编号",
+            prop: "origBillNo",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "单据类型",
+            prop: "origBillType",
+            overHidden: true,
+            rules: [{
+              required: true,
+              message: "请输入单据类型, DD=直单(默认) MM=主单 MH=主分单 HH=从分单",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "状态",
+            prop: "status",
+            search: true,
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=ameno_status",
+            dicData: [],
+            props: {
+              label: "dictValue",
+              value: "dictKey"
             },
-          ]
-        },
-        data: [],
-        saberUserInfo:{}, // 当前登录人个人信息
+            overHidden: true,
+          },
+          {
+            label: "单据开始日期",
+            prop: "billDateStart",
+            search: true,
+            overHidden: true,
+            hide: true,
+            searchLabelWidth: '100',
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
+          },
+          {
+            label: "单据结束日期",
+            prop: "billDateEnd",
+            search: true,
+            overHidden: true,
+            hide: true,
+            searchLabelWidth: '100',
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
+          },
+          {
+            label: "备注",
+            prop: "remarks",
+            overHidden: true,
+          },
+        ]
+      },
+      data: [],
+      saberUserInfo: {}, // 当前登录人个人信息
+    };
+  },
+  computed: {
+    ...mapGetters(["permission"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permission.amends_add, false),
+        viewBtn: this.vaildData(this.permission.amends_view, false),
+        delBtn: this.vaildData(this.permission.amends_delete, false),
+        editBtn: this.vaildData(this.permission.amends_edit, false)
       };
     },
-    computed: {
-      ...mapGetters(["permission"]),
-      permissionList() {
-        return {
-          addBtn: this.vaildData(this.permission.amends_add, false),
-          viewBtn: this.vaildData(this.permission.amends_view, false),
-          delBtn: this.vaildData(this.permission.amends_delete, false),
-          editBtn: this.vaildData(this.permission.amends_edit, false)
-        };
-      },
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
+    ids() {
+      let ids = [];
+      this.selectionList.forEach(ele => {
+        ids.push(ele.id);
+      });
+      return ids.join(",");
+    }
+  },
+  async created() {
+    // 获取当前登录人个人信息
+    this.saberUserInfo = JSON.parse(localStorage.getItem('saber-userInfo')).content
+    this.option = await this.getColumnData(this.getColumnName(322), this.optionBack);
+    // 首页快捷跳转进来的
+    if (this.$route.query.home) {
+      this.addbtnfun()
+    }
+    if (this.$route.query.billId) {
+      // 从审批里查看跳进来的
+      this.rowEdit({ id: this.$route.query.billId })
+    }
+    this.$store.commit('SEA_IN_DETAIL')
+    this.getWorkDictsfun()
+  },
+  activated() {
+    if (this.$route.query.id) {
+      if (!this.$store.getters.SFEStatus) {
+        setTimeout(() => {
+          this.rowEdit(this.$route.query)
+        }, 200);
+      }
+
+    }
+  },
+  methods: {
+    getWorkDictsfun() {
+      getBcorpslistByType(1, 10).then(res => {
+        this.findObject(this.option.column, "corpCnName").dicData = res.data.data.records
+      })
+      // 状态
+      getWorkDicts('ameno_status').then(res => {
+        this.findObject(this.option.column, "status").dicData = res.data.data
+      })
+    },
+    // 新建amend
+    addbtnfun() {
+      this.isShow = false
+      this.$store.commit("IN_SFE_DETAIL");
+    },
+    // 编辑
+    rowEdit(row) {
+      this.isShow = false
+      this.$nextTick(() => {
+        this.$refs.amendsDetails.amendsDetailfun(row.id)
+      })
+      this.$store.commit("IN_SFE_DETAIL");
+    },
+    // 详情的返回列表
+    goBack() {
+      // 初始化数据
+      if (JSON.stringify(this.$route.query) != "{}") {
+        this.$router.$avueRouter.closeTag();
+        this.$router.push({
+          path: "/iosBasicData/seamends/index"
         });
-        return ids.join(",");
       }
+      this.isShow = true;
+      this.onLoad(this.page, this.search);
+      this.$store.commit("OUT_SFE_DETAIL");
     },
-    async created() {
-        // 获取当前登录人个人信息
-        this.saberUserInfo = JSON.parse(localStorage.getItem('saber-userInfo')).content
-      this.option = await this.getColumnData(this.getColumnName(322), this.optionBack);
-        // 首页快捷跳转进来的
-        if(this.$route.query.home) {
-            this.addbtnfun()
-        }
-        if (this.$route.query.billId) {
-            // 从审批里查看跳进来的
-            this.rowEdit({id:this.$route.query.billId})
-        }
-        this.$store.commit('SEA_IN_DETAIL')
-        this.getWorkDictsfun()
+    rowSave(row, done, loading) {
+      amendsSubmit(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        window.console.log(error);
+      });
     },
-    methods: {
-        getWorkDictsfun(){
-            getBcorpslistByType(1,10).then(res=>{
-                this.findObject(this.option.column, "corpCnName").dicData = res.data.data.records
-            })
-            // 状态
-            getWorkDicts('ameno_status').then(res=>{
-                this.findObject(this.option.column, "status").dicData = res.data.data
-            })
-        },
-      // 新建amend
-      addbtnfun(){
-          this.isShow = false
-      },
-      // 编辑
-      rowEdit(row) {
-          this.isShow = false
-          this.$nextTick(()=>{
-              this.$refs.amendsDetails.amendsDetailfun(row.id)
-          })
-      },
-      // 详情的返回列表
-      goBack() {
-          // 初始化数据
-          if (JSON.stringify(this.$route.query) != "{}") {
-              this.$router.$avueRouter.closeTag();
-              this.$router.push({
-                  path: "/iosBasicData/seamends/index"
-              });
-          }
-          this.isShow = true;
-          this.onLoad(this.page, this.search);
-      },
-      rowSave(row, done, loading) {
-        amendsSubmit(row).then(() => {
+    rowUpdate(row, index, done, loading) {
+      amendsSubmit(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        console.log(error);
+      });
+    },
+    rowDel(row) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return amendsRemove(row.id);
+        })
+        .then(() => {
           this.onLoad(this.page);
           this.$message({
             type: "success",
             message: "操作成功!"
           });
-          done();
-        }, error => {
-          loading();
-          window.console.log(error);
         });
-      },
-      rowUpdate(row, index, done, loading) {
-        amendsSubmit(row).then(() => {
+    },
+    // 批量删除
+    handleDelete() {
+      if (this.selectionList.length === 0) {
+        this.$message.warning("请选择至少一条数据");
+        return;
+      }
+      // 判断是否可以编辑别人业务 true 就没有权限
+      if (this.ModifyOthersfun()) return;
+      // 判断是否请核过
+      for (let item of this.selectionList) {
+        if (item.status == 1 || item.status == 2 || item.status == 3) {
+          return this.$message.warning('请选择还未请核的数据')
+        }
+      }
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return amendsRemove(this.ids);
+        })
+        .then(() => {
           this.onLoad(this.page);
           this.$message({
             type: "success",
             message: "操作成功!"
           });
-          done();
-        }, error => {
-          loading();
-          console.log(error);
+          this.$refs.crud.toggleSelection();
         });
-      },
-      rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return amendsRemove(row.id);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-          });
-      },
-      // 批量删除
-      handleDelete() {
-        if (this.selectionList.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
-        }
-        // 判断是否可以编辑别人业务 true 就没有权限
-        if (this.ModifyOthersfun()) return;
-        // 判断是否请核过
-        for (let item of this.selectionList) {
-            if (item.status == 1 || item.status == 2 || item.status == 3) {
-                return this.$message.warning('请选择还未请核的数据')
-            }
+    },
+    // 判断是否可以编辑别人业务
+    ModifyOthersfun() {
+      let sumArr = []
+      const h = this.$createElement
+      // 判断是否有权限
+      if (this.saberUserInfo.role_name.indexOf('允许修改他人业务') != -1) return false
+      // 当前登录人和选择的创建人对比是不是一个人
+      for (let item of this.selectionList) {
+        if (this.saberUserInfo.user_id != item.createUser) {
+          sumArr.push(h('p', `你没有"允许修改他人业务"权限,请重新选择数据`))
         }
-        this.$confirm("确定将选择数据删除?", {
+      }
+      if (sumArr.length != 0) {
+        this.$confirm('提示', {
+          message: h('div', sumArr),
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
+        }).catch(err => { })
+        return true
+      }
+    },
+    beforeOpen(done, type) {
+      if (["edit", "view"].includes(type)) {
+        amendsDetail(this.form.id).then(res => {
+          this.form = res.data.data;
+        });
+      }
+      done();
+    },
+    searchReset() {
+      this.query = {};
+      this.onLoad(this.page);
+    },
+    searchChange(params, done) {
+      this.query = params;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    selectionClear() {
+      this.selectionList = [];
+      this.$refs.crud.toggleSelection();
+    },
+    currentChange(currentPage) {
+      this.page.currentPage = currentPage;
+    },
+    sizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.query);
+    },
+    onLoad(page, params = {}) {
+      this.loading = true;
+      amendsList(page.currentPage, page.pageSize, { ...Object.assign(params, this.query), businessType: 'SEA' }).then(res => {
+        const data = res.data.data;
+        this.page.total = data.total;
+        this.data = data.records.map(item => {
+          item.status = item.status + ''
+          return item
         })
-          .then(() => {
-            return amendsRemove(this.ids);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-          });
-      },
-      // 判断是否可以编辑别人业务
-      ModifyOthersfun(){
-          let sumArr = []
-          const h = this.$createElement
-          // 判断是否有权限
-          if (this.saberUserInfo.role_name.indexOf('允许修改他人业务') != -1) return false
-          // 当前登录人和选择的创建人对比是不是一个人
-          for (let item of this.selectionList) {
-              if (this.saberUserInfo.user_id != item.createUser) {
-                  sumArr.push(h('p', `你没有"允许修改他人业务"权限,请重新选择数据`))
-              }
-          }
-          if(sumArr.length != 0) {
-              this.$confirm('提示', {
-                  message:h('div', sumArr),
-                  confirmButtonText: "确定",
-                  cancelButtonText: "取消",
-                  type: "warning"
-              }).catch(err=>{})
-              return true
-          }
-      },
-      beforeOpen(done, type) {
-        if (["edit", "view"].includes(type)) {
-          amendsDetail(this.form.id).then(res => {
-            this.form = res.data.data;
-          });
+        this.loading = false;
+        this.selectionClear();
+      });
+    },
+    //自定义列保存
+    async saveColumnTwo(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列重置
+    async resetColumnTwo(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    // 更改表格颜色
+    headerClassName(tab) {
+      //颜色间隔
+      let back = ""
+      if (tab.columnIndex >= 0 && tab.column.level === 1) {
+        if (tab.columnIndex % 2 === 0) {
+          back = "back-one"
+        } else if (tab.columnIndex % 2 === 1) {
+          back = "back-two"
         }
-        done();
-      },
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      currentChange(currentPage){
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize){
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        this.loading = true;
-        amendsList(page.currentPage, page.pageSize, {...Object.assign(params, this.query),businessType: 'SEA'}).then(res => {
-          const data = res.data.data;
-          this.page.total = data.total;
-          this.data = data.records.map(item=>{
-              item.status = item.status + ''
-              return item
-          })
-          this.loading = false;
-          this.selectionClear();
-        });
-      },
-        //自定义列保存
-      async saveColumnTwo(ref, option, optionBack, code) {
-          /**
-           * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
-           * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
-           * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
-           */
-          const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
-          if (inSave) {
-              this.$message.success("保存成功");
-              //关闭窗口
-              this.$refs[ref].$refs.dialogColumn.columnBox = false;
-          }
-      },
-      //自定义列重置
-      async resetColumnTwo(ref, option, optionBack, code) {
-          this[option] = this[optionBack];
-          const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
-          if (inSave) {
-              this.$message.success("重置成功");
-              this.$refs[ref].$refs.dialogColumn.columnBox = false;
-          }
-      },
-      // 更改表格颜色
-      headerClassName(tab){
-          //颜色间隔
-          let back = ""
-          if (tab.columnIndex >= 0 && tab.column.level === 1) {
-              if (tab.columnIndex % 2 === 0) {
-                  back = "back-one"
-              } else if (tab.columnIndex % 2 === 1) {
-                  back = "back-two"
-              }
-          }
-          return back;
-      },
+      }
+      return back;
+    },
 
-    }
-  };
+  }
+};
 </script>
 
 <style scoped>
 ::v-deep#out-table .back-one {
-    background: #ecf5ff !important;
-    text-align: center;
+  background: #ecf5ff !important;
+  text-align: center;
 }
+
 ::v-deep#out-table .back-two {
-    background: #ecf5ff !important;
-    text-align: center;
+  background: #ecf5ff !important;
+  text-align: center;
 }
+
 /deep/ .el-col-md-8 {
-    width: 24.33333%;
+  width: 24.33333%;
 }
 </style>

+ 434 - 450
src/views/iosBasicData/siamends/index.vue

@@ -1,494 +1,478 @@
 <template>
   <div>
-      <basic-container v-if="isShow">
-          <avue-crud :option="option"
-                     :table-loading="loading"
-                     :data="data"
-                     :page.sync="page"
-                     :permission="permissionList"
-                     :before-open="beforeOpen"
-                     v-model="form"
-                     id="out-table"
-                     :header-cell-class-name="headerClassName"
-                     ref="crud"
-                     @row-update="rowUpdate"
-                     @row-save="rowSave"
-                     @row-del="rowDel"
-                     @search-change="searchChange"
-                     @search-reset="searchReset"
-                     @selection-change="selectionChange"
-                     @current-change="currentChange"
-                     @size-change="sizeChange"
-                     @refresh-change="refreshChange"
-                     @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 322)"
-                     @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 322)"
-                     @on-load="onLoad">
-              <template slot="menuLeft">
-                  <el-button type="primary"
-                             size="small"
-                             icon="el-icon-plus"
-                             @click="addbtnfun()">新建AMEND
-                  </el-button>
-                  <el-button type="danger"
-                             size="small"
-                             icon="el-icon-delete"
-                             plain
-                             @click="handleDelete">批量删除
-                  </el-button>
-              </template>
-              <template slot="menu" slot-scope="{ row }">
-                  <el-button
-                      type="text"
-                      size="small"
-                      icon="el-icon-edit"
-                      @click.stop="rowEdit(row)">修改
-                  </el-button>
-                  <!--:disabled="saberUserInfo.role_name.indexOf('允许修改他人业务') == -1?saberUserInfo.user_id != row.createUser:false"-->
-                  <el-button
-                      type="text"
-                      size="small"
-                      v-if="saberUserInfo.role_name.indexOf('admin') == -1?saberUserInfo.role_name.indexOf('允许修改他人业务') == -1?saberUserInfo.user_id == row.createUser:true:true"
-                      :disabled="row.status == 1 || row.status == 2 || row.status == 3"
-                      @click.stop="rowDel(row)"
-                      icon="el-icon-delete" >删除
-                  </el-button>
-              </template>
-              <template slot="billNo" slot-scope="{ row }">
-                  <span style="color: #1e9fff;cursor: pointer;"
-                        @click="rowEdit(row)">{{row.billNo}}
-                  </span>
-              </template>
-          </avue-crud>
-      </basic-container>
-      <amends-details ref="amendsDetails" v-if="!isShow" @goBack="goBack"></amends-details>
+    <basic-container v-if="isShow">
+      <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
+        :before-open="beforeOpen" v-model="form" id="out-table" :header-cell-class-name="headerClassName" ref="crud"
+        @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel" @search-change="searchChange"
+        @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
+        @size-change="sizeChange" @refresh-change="refreshChange"
+        @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 322)"
+        @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 322)" @on-load="onLoad">
+        <template slot="menuLeft">
+          <el-button type="primary" size="small" icon="el-icon-plus" @click="addbtnfun()">新建AMEND
+          </el-button>
+          <el-button type="danger" size="small" icon="el-icon-delete" plain @click="handleDelete">批量删除
+          </el-button>
+        </template>
+        <template slot="menu" slot-scope="{ row }">
+          <el-button type="text" size="small" icon="el-icon-edit" @click.stop="rowEdit(row)">修改
+          </el-button>
+          <!--:disabled="saberUserInfo.role_name.indexOf('允许修改他人业务') == -1?saberUserInfo.user_id != row.createUser:false"-->
+          <el-button type="text" size="small"
+            v-if="saberUserInfo.role_name.indexOf('admin') == -1 ? saberUserInfo.role_name.indexOf('允许修改他人业务') == -1 ? saberUserInfo.user_id == row.createUser : true : true"
+            :disabled="row.status == 1 || row.status == 2 || row.status == 3" @click.stop="rowDel(row)"
+            icon="el-icon-delete">删除
+          </el-button>
+        </template>
+        <template slot="billNo" slot-scope="{ row }">
+          <span style="color: #1e9fff;cursor: pointer;" @click="rowEdit(row)">{{ row.billNo }}
+          </span>
+        </template>
+      </avue-crud>
+    </basic-container>
+    <amends-details ref="amendsDetails" v-if="!isShow" @goBack="goBack"></amends-details>
   </div>
 </template>
 
 <script>
-  import {amendsList, amendsDetail, amendsSubmit, amendsRemove} from "@/api/iosBasicData/amends";
-  import amendsDetails from "@/views/iosBasicData/siamends/amendsDetails.vue";
-  import {mapGetters} from "vuex";
-  import {getWorkDicts} from "@/api/system/dictbiz";
-  import {getBcorpslistByType} from "@/api/iosBasicData/bcorps";
+import { amendsList, amendsDetail, amendsSubmit, amendsRemove } from "@/api/iosBasicData/amends";
+import amendsDetails from "@/views/iosBasicData/siamends/amendsDetails.vue";
+import { mapGetters } from "vuex";
+import { getWorkDicts } from "@/api/system/dictbiz";
+import { getBcorpslistByType } from "@/api/iosBasicData/bcorps";
 
-  export default {
-    components:{amendsDetails},
-    data() {
-      return {
-        isShow:true,
-        form: {},
-        query: {},
-        loading: true,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        selectionList: [],
-        option:{},
-        optionBack: {
-          height:'auto',
-          calcHeight: 30,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          viewBtn: true,
-          selection: true,
-          dialogClickModal: false,
-            menuWidth:'140',
-            searchIcon:true,
-            searchIndex:3,
-          column: [
-              {
-                  label: "客户名称",
-                  prop: "corpCnName",
-                  search:true,
-                  overHidden:true,
-                  type:'select',
-                  filterable:true,
-                  remote:true,
-                  dicUrl: "/api/blade-los/bcorps/listByType?cnName={{key}}",
-                  dicData:[],
-                  props: {
-                      label: 'cnName',
-                      value: 'cnName',
-                      res:'data.records'
-                  },
-              },
-              {
-                  label: "单据编号",
-                  prop: "billNo",
-                  search:true,
-                  overHidden:true,
-              },
-              {
-                  label: "所属团队",
-                  prop: "teamName",
-                  overHidden:true,
-              },
-              {
-                  label: "原MB/L NO",
-                  prop: "mblno",
-                  search:true,
-                  overHidden:true,
-              },
-              {
-                  label: "原HB/L NO",
-                  prop: "hblno",
-                  search:true,
-                  overHidden:true,
-              },
-              {
-                  label: "BOOKING NO",
-                  prop: "bookingNo",
-                  searchLabelWidth:100,
-                  search:true,
-                  overHidden:true,
-              },
-              {
-                  label: "原船名",
-                  prop: "vesselCnName",
-                  overHidden:true,
-              },
-              {
-                  label: "原航次",
-                  prop: "voyageNo",
-                  overHidden:true,
-              },
-              {
-                  label: "原外提单号",
-                  prop: "refno",
-                  search:true,
-                  overHidden:true,
-              },
-              {
-                  label: "单据日期",
-                  prop: "billDate",
-                  overHidden:true,
-              },
-            {
-              label: "原单据编号",
-              prop: "origBillNo",
-              search:true,
-              overHidden:true,
-            },
-            {
-              label: "单据类型",
-              prop: "origBillType",
-              overHidden:true,
-              rules: [{
-                required: true,
-                message: "请输入单据类型, DD=直单(默认) MM=主单 MH=主分单 HH=从分单",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "状态",
-              prop: "status",
-              search:true,
-              type: "select",
-              dicUrl: "/api/blade-system/dict-biz/dictionary?code=ameno_status",
-              dicData:[],
-              props: {
-                  label: "dictValue",
-                  value: "dictKey"
-              },
-              overHidden:true,
+export default {
+  components: { amendsDetails },
+  data() {
+    return {
+      isShow: true,
+      form: {},
+      query: {},
+      loading: true,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      selectionList: [],
+      option: {},
+      optionBack: {
+        height: 'auto',
+        calcHeight: 30,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        border: true,
+        index: true,
+        viewBtn: true,
+        selection: true,
+        dialogClickModal: false,
+        menuWidth: '140',
+        searchIcon: true,
+        searchIndex: 3,
+        column: [
+          {
+            label: "客户名称",
+            prop: "corpCnName",
+            search: true,
+            overHidden: true,
+            type: 'select',
+            filterable: true,
+            remote: true,
+            dicUrl: "/api/blade-los/bcorps/listByType?cnName={{key}}",
+            dicData: [],
+            props: {
+              label: 'cnName',
+              value: 'cnName',
+              res: 'data.records'
             },
-              {
-                  label: "单据开始日期",
-                  prop: "billDateStart",
-                  search:true,
-                  overHidden:true,
-                  hide:true,
-                  searchLabelWidth:'100',
-                  type: "date",
-                  format: "yyyy-MM-dd",
-                  valueFormat: "yyyy-MM-dd HH:mm:ss",
-              },
-              {
-                  label: "单据结束日期",
-                  prop: "billDateEnd",
-                  search:true,
-                  overHidden:true,
-                  hide:true,
-                  searchLabelWidth:'100',
-                  type: "date",
-                  format: "yyyy-MM-dd",
-                  valueFormat: "yyyy-MM-dd HH:mm:ss",
-              },
-            {
-              label: "备注",
-              prop: "remarks",
-                overHidden:true,
+          },
+          {
+            label: "单据编号",
+            prop: "billNo",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "所属团队",
+            prop: "teamName",
+            overHidden: true,
+          },
+          {
+            label: "原MB/L NO",
+            prop: "mblno",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "原HB/L NO",
+            prop: "hblno",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "BOOKING NO",
+            prop: "bookingNo",
+            searchLabelWidth: 100,
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "原船名",
+            prop: "vesselCnName",
+            overHidden: true,
+          },
+          {
+            label: "原航次",
+            prop: "voyageNo",
+            overHidden: true,
+          },
+          {
+            label: "原外提单号",
+            prop: "refno",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "单据日期",
+            prop: "billDate",
+            overHidden: true,
+          },
+          {
+            label: "原单据编号",
+            prop: "origBillNo",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "单据类型",
+            prop: "origBillType",
+            overHidden: true,
+            rules: [{
+              required: true,
+              message: "请输入单据类型, DD=直单(默认) MM=主单 MH=主分单 HH=从分单",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "状态",
+            prop: "status",
+            search: true,
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=ameno_status",
+            dicData: [],
+            props: {
+              label: "dictValue",
+              value: "dictKey"
             },
-          ]
-        },
-        data: [],
-        saberUserInfo:{}, // 当前登录人个人信息
+            overHidden: true,
+          },
+          {
+            label: "单据开始日期",
+            prop: "billDateStart",
+            search: true,
+            overHidden: true,
+            hide: true,
+            searchLabelWidth: '100',
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
+          },
+          {
+            label: "单据结束日期",
+            prop: "billDateEnd",
+            search: true,
+            overHidden: true,
+            hide: true,
+            searchLabelWidth: '100',
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
+          },
+          {
+            label: "备注",
+            prop: "remarks",
+            overHidden: true,
+          },
+        ]
+      },
+      data: [],
+      saberUserInfo: {}, // 当前登录人个人信息
+    };
+  },
+  computed: {
+    ...mapGetters(["permission"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permission.amends_add, false),
+        viewBtn: this.vaildData(this.permission.amends_view, false),
+        delBtn: this.vaildData(this.permission.amends_delete, false),
+        editBtn: this.vaildData(this.permission.amends_edit, false)
       };
     },
-    computed: {
-      ...mapGetters(["permission"]),
-      permissionList() {
-        return {
-          addBtn: this.vaildData(this.permission.amends_add, false),
-          viewBtn: this.vaildData(this.permission.amends_view, false),
-          delBtn: this.vaildData(this.permission.amends_delete, false),
-          editBtn: this.vaildData(this.permission.amends_edit, false)
-        };
-      },
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
+    ids() {
+      let ids = [];
+      this.selectionList.forEach(ele => {
+        ids.push(ele.id);
+      });
+      return ids.join(",");
+    }
+  },
+  async created() {
+    // 获取当前登录人个人信息
+    this.saberUserInfo = JSON.parse(localStorage.getItem('saber-userInfo')).content
+    this.option = await this.getColumnData(this.getColumnName(322), this.optionBack);
+    // 首页快捷跳转进来的
+    if (this.$route.query.home) {
+      this.addbtnfun()
+    }
+    if (this.$route.query.billId) {
+      // 从审批里查看跳进来的
+      this.rowEdit({ id: this.$route.query.billId })
+    }
+    this.$store.commit('SIA_IN_DETAIL')
+    this.getWorkDictsfun()
+  },
+  activated() {
+    if (this.$route.query.id) {
+      if (!this.$store.getters.OFIStatus) {
+        setTimeout(() => {
+          this.rowEdit(this.$route.query)
+        }, 200);
+      }
+    }
+  },
+  methods: {
+    getWorkDictsfun() {
+      getBcorpslistByType(1, 10).then(res => {
+        this.findObject(this.option.column, "corpCnName").dicData = res.data.data.records
+      })
+      // 状态
+      getWorkDicts('ameno_status').then(res => {
+        this.findObject(this.option.column, "status").dicData = res.data.data
+      })
+    },
+    // 新建amend
+    addbtnfun() {
+      this.isShow = false
+      this.$store.commit("IN_OFI_DETAIL");
+    },
+    // 编辑
+    rowEdit(row) {
+      this.isShow = false
+      this.$nextTick(() => {
+        this.$refs.amendsDetails.amendsDetailfun(row.id)
+      })
+      this.$store.commit("IN_OFI_DETAIL");
+    },
+    // 详情的返回列表
+    goBack() {
+      // 初始化数据
+      if (JSON.stringify(this.$route.query) != "{}") {
+        this.$router.$avueRouter.closeTag();
+        this.$router.push({
+          path: "/iosBasicData/siamends/index"
         });
-        return ids.join(",");
       }
+      this.isShow = true;
+      this.onLoad(this.page, this.search);
+      this.$store.commit("OUT_OFI_DETAIL");
     },
-    async created() {
-      // 获取当前登录人个人信息
-      this.saberUserInfo = JSON.parse(localStorage.getItem('saber-userInfo')).content
-      this.option = await this.getColumnData(this.getColumnName(322), this.optionBack);
-        // 首页快捷跳转进来的
-        if(this.$route.query.home) {
-            this.addbtnfun()
-        }
-        if (this.$route.query.billId) {
-            // 从审批里查看跳进来的
-            this.rowEdit({id:this.$route.query.billId})
-        }
-        this.$store.commit('SIA_IN_DETAIL')
-        this.getWorkDictsfun()
+    rowSave(row, done, loading) {
+      amendsSubmit(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        window.console.log(error);
+      });
     },
-    methods: {
-        getWorkDictsfun(){
-            getBcorpslistByType(1,10).then(res=>{
-                this.findObject(this.option.column, "corpCnName").dicData = res.data.data.records
-            })
-            // 状态
-            getWorkDicts('ameno_status').then(res=>{
-                this.findObject(this.option.column, "status").dicData = res.data.data
-            })
-        },
-      // 新建amend
-      addbtnfun(){
-          this.isShow = false
-      },
-      // 编辑
-      rowEdit(row) {
-          this.isShow = false
-          this.$nextTick(()=>{
-              this.$refs.amendsDetails.amendsDetailfun(row.id)
-          })
-      },
-      // 详情的返回列表
-      goBack() {
-          // 初始化数据
-          if (JSON.stringify(this.$route.query) != "{}") {
-              this.$router.$avueRouter.closeTag();
-              this.$router.push({
-                  path: "/iosBasicData/siamends/index"
-              });
-          }
-          this.isShow = true;
-          this.onLoad(this.page, this.search);
-      },
-      rowSave(row, done, loading) {
-        amendsSubmit(row).then(() => {
+    rowUpdate(row, index, done, loading) {
+      amendsSubmit(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        console.log(error);
+      });
+    },
+    rowDel(row) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return amendsRemove(row.id);
+        })
+        .then(() => {
           this.onLoad(this.page);
           this.$message({
             type: "success",
             message: "操作成功!"
           });
-          done();
-        }, error => {
-          loading();
-          window.console.log(error);
         });
-      },
-      rowUpdate(row, index, done, loading) {
-        amendsSubmit(row).then(() => {
+    },
+    // 批量删除
+    handleDelete() {
+      if (this.selectionList.length === 0) {
+        this.$message.warning("请选择至少一条数据");
+        return;
+      }
+      // 判断是否可以编辑别人业务 true 就没有权限
+      if (this.ModifyOthersfun()) return;
+      for (let item of this.selectionList) {
+        if (item.status == 1 || item.status == 2 || item.status == 3) {
+          return this.$message.warning('请选择还未请核的数据')
+        }
+      }
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return amendsRemove(this.ids);
+        })
+        .then(() => {
           this.onLoad(this.page);
           this.$message({
             type: "success",
             message: "操作成功!"
           });
-          done();
-        }, error => {
-          loading();
-          console.log(error);
+          this.$refs.crud.toggleSelection();
         });
-      },
-      rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return amendsRemove(row.id);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-          });
-      },
-      // 批量删除
-      handleDelete() {
-        if (this.selectionList.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
-        }
-        // 判断是否可以编辑别人业务 true 就没有权限
-        if (this.ModifyOthersfun()) return;
-        for (let item of this.selectionList) {
-            if (item.status == 1 || item.status == 2 || item.status == 3) {
-                return this.$message.warning('请选择还未请核的数据')
-            }
+    },
+    // 判断是否可以编辑别人业务
+    ModifyOthersfun() {
+      let sumArr = []
+      const h = this.$createElement
+      // 判断是否有权限
+      if (this.saberUserInfo.role_name.indexOf('允许修改他人业务') != -1) return false
+      // 当前登录人和选择的创建人对比是不是一个人
+      for (let item of this.selectionList) {
+        if (this.saberUserInfo.user_id != item.createUser) {
+          sumArr.push(h('p', `你没有"允许修改他人业务"权限,请重新选择数据`))
         }
-        this.$confirm("确定将选择数据删除?", {
+      }
+      if (sumArr.length != 0) {
+        this.$confirm('提示', {
+          message: h('div', sumArr),
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
+        }).catch(err => { })
+        return true
+      }
+    },
+    beforeOpen(done, type) {
+      if (["edit", "view"].includes(type)) {
+        amendsDetail(this.form.id).then(res => {
+          this.form = res.data.data;
+        });
+      }
+      done();
+    },
+    searchReset() {
+      this.query = {};
+      this.onLoad(this.page);
+    },
+    searchChange(params, done) {
+      this.query = params;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    selectionClear() {
+      this.selectionList = [];
+      this.$refs.crud.toggleSelection();
+    },
+    currentChange(currentPage) {
+      this.page.currentPage = currentPage;
+    },
+    sizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.query);
+    },
+    onLoad(page, params = {}) {
+      this.loading = true;
+      amendsList(page.currentPage, page.pageSize, { ...Object.assign(params, this.query), businessType: 'SIA' }).then(res => {
+        const data = res.data.data;
+        this.page.total = data.total;
+        this.data = data.records.map(item => {
+          item.status = item.status + ''
+          return item
         })
-          .then(() => {
-            return amendsRemove(this.ids);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-          });
-      },
-      // 判断是否可以编辑别人业务
-      ModifyOthersfun(){
-          let sumArr = []
-          const h = this.$createElement
-          // 判断是否有权限
-          if (this.saberUserInfo.role_name.indexOf('允许修改他人业务') != -1) return false
-          // 当前登录人和选择的创建人对比是不是一个人
-          for (let item of this.selectionList) {
-              if (this.saberUserInfo.user_id != item.createUser) {
-                  sumArr.push(h('p', `你没有"允许修改他人业务"权限,请重新选择数据`))
-              }
-          }
-          if(sumArr.length != 0) {
-              this.$confirm('提示', {
-                  message:h('div', sumArr),
-                  confirmButtonText: "确定",
-                  cancelButtonText: "取消",
-                  type: "warning"
-              }).catch(err=>{})
-              return true
-          }
-      },
-      beforeOpen(done, type) {
-        if (["edit", "view"].includes(type)) {
-          amendsDetail(this.form.id).then(res => {
-            this.form = res.data.data;
-          });
+        this.loading = false;
+        this.selectionClear();
+      });
+    },
+    //自定义列保存
+    async saveColumnTwo(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列重置
+    async resetColumnTwo(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    // 更改表格颜色
+    headerClassName(tab) {
+      //颜色间隔
+      let back = ""
+      if (tab.columnIndex >= 0 && tab.column.level === 1) {
+        if (tab.columnIndex % 2 === 0) {
+          back = "back-one"
+        } else if (tab.columnIndex % 2 === 1) {
+          back = "back-two"
         }
-        done();
-      },
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      currentChange(currentPage){
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize){
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        this.loading = true;
-        amendsList(page.currentPage, page.pageSize, {...Object.assign(params, this.query),businessType: 'SIA'}).then(res => {
-          const data = res.data.data;
-          this.page.total = data.total;
-          this.data = data.records.map(item=>{
-              item.status = item.status + ''
-              return item
-          })
-          this.loading = false;
-          this.selectionClear();
-        });
-      },
-        //自定义列保存
-      async saveColumnTwo(ref, option, optionBack, code) {
-          /**
-           * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
-           * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
-           * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
-           */
-          const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
-          if (inSave) {
-              this.$message.success("保存成功");
-              //关闭窗口
-              this.$refs[ref].$refs.dialogColumn.columnBox = false;
-          }
-      },
-      //自定义列重置
-      async resetColumnTwo(ref, option, optionBack, code) {
-          this[option] = this[optionBack];
-          const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
-          if (inSave) {
-              this.$message.success("重置成功");
-              this.$refs[ref].$refs.dialogColumn.columnBox = false;
-          }
-      },
-      // 更改表格颜色
-      headerClassName(tab){
-          //颜色间隔
-          let back = ""
-          if (tab.columnIndex >= 0 && tab.column.level === 1) {
-              if (tab.columnIndex % 2 === 0) {
-                  back = "back-one"
-              } else if (tab.columnIndex % 2 === 1) {
-                  back = "back-two"
-              }
-          }
-          return back;
-      },
+      }
+      return back;
+    },
 
-    }
-  };
+  }
+};
 </script>
 
 <style scoped>
 ::v-deep#out-table .back-one {
-    background: #ecf5ff !important;
-    text-align: center;
+  background: #ecf5ff !important;
+  text-align: center;
 }
+
 ::v-deep#out-table .back-two {
-    background: #ecf5ff !important;
-    text-align: center;
+  background: #ecf5ff !important;
+  text-align: center;
 }
+
 /deep/ .el-col-md-8 {
-    width: 24.33333%;
+  width: 24.33333%;
 }
 </style>

+ 2 - 6
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/index.vue

@@ -226,12 +226,8 @@ export default {
             res: 'data.records'
           },
           dicUrl: '/api/blade-sales-part/corpsDesc/page?current=1&size=20&corpType=GYS,KH&cname={{key}}',
-          // props: {
-          //   label: "account",
-          //   value: "id",
-          //   res: 'data.records'
-          // }
-        }, {
+        },
+        {
           label: "仓库",
           prop: "storageName",
           search: true,