wfg 2 недель назад
Родитель
Сommit
a07a52a5e8
28 измененных файлов с 1525 добавлено и 611 удалено
  1. 7 4
      src/api/iosBasicData/accounts.js
  2. 10 0
      src/api/iosBasicData/bcountrys.js
  3. 10 0
      src/api/iosBasicData/reports.js
  4. 1 1
      src/api/system/dept.js
  5. 4 0
      src/enums/column-name.js
  6. 1 1
      src/util/configration.js
  7. 89 9
      src/util/date.js
  8. 2 1
      src/views/iosBasicData/AirtransportExport/bills/assembly/DocumentCenter.vue
  9. 3 1
      src/views/iosBasicData/AirtransportImport/bills/assembly/DocumentCenter.vue
  10. 2 1
      src/views/iosBasicData/SeafreightExportF/bills/assembly/DistributionBox/PackingBusiness.vue
  11. 22 6
      src/views/iosBasicData/SeafreightExportF/bills/assembly/DocumentCenter.vue
  12. 177 171
      src/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation.vue
  13. 11 2
      src/views/iosBasicData/SeafreightExportF/bills/assembly/edicode.vue
  14. 3 3
      src/views/iosBasicData/SeafreightExportF/bills/assembly/mbinformation.vue
  15. 51 13
      src/views/iosBasicData/SeafreightExportF/bills/assembly/reports.vue
  16. 175 53
      src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue
  17. 86 8
      src/views/iosBasicData/SeafreightExportF/bills/index.vue
  18. 2 2
      src/views/iosBasicData/SeafreightExportF/bills/updateBatchField.vue
  19. 158 31
      src/views/iosBasicData/accounts/index.vue
  20. 7 5
      src/views/iosBasicData/baccitemstype/baccitems.vue
  21. 89 7
      src/views/iosBasicData/baccitemstype/index.vue
  22. 388 254
      src/views/iosBasicData/bcorps/index.vue
  23. 5 0
      src/views/iosBasicData/bports/index.vue
  24. 25 2
      src/views/iosBasicData/bports/portsTerms.vue
  25. 74 4
      src/views/iosBasicData/editypes/index.vue
  26. 32 2
      src/views/iosBasicData/humanResources/employees/index.vue
  27. 89 28
      src/views/iosBasicData/psBcorps/index.vue
  28. 2 2
      src/views/system/post.vue

+ 7 - 4
src/api/iosBasicData/accounts.js

@@ -12,12 +12,13 @@ export const accountsList = (current, size, params) => {
   })
 }
 
-export const getAccountsLazyTree = (parentId) => {
+export const getAccountsLazyTree = (parentId, branchId) => {
   return request({
     url: '/api/blade-los/accounts/lazy-tree',
     method: 'get',
     params: {
-      parentId
+      parentId,
+      branchId
     }
   })
 }
@@ -59,18 +60,20 @@ export const getAccountsCode = (params) => {
 }
 
 // 科目平衡检查
-export const balanceCheck = () => {
+export const balanceCheck = (params) => {
   return request({
     url: '/api/blade-los/accounts/balanceCheck',
     method: 'get',
+    params: params
   })
 }
 
 // 科目入账
-export const accountsPost = () => {
+export const accountsPost = (params) => {
   return request({
     url: '/api/blade-los/accounts/post',
     method: 'get',
+    params: params
   })
 }
 

+ 10 - 0
src/api/iosBasicData/bcountrys.js

@@ -13,6 +13,16 @@ export const bcountrysList = (current, size, params) => {
   })
 }
 
+export const bcountrysListAll = (params) => {
+  return request({
+    url: '/api/blade-los/bcountrys/list',
+    method: 'get',
+    params: {
+      ...params,
+    }
+  })
+}
+
 export const bcountrysDetail = (id) => {
   return request({
     url: '/api/blade-los/bcountrys/detail',

+ 10 - 0
src/api/iosBasicData/reports.js

@@ -120,3 +120,13 @@ export const buildExportFileName = (report, form) => {
 
     return fmt;
 }
+
+export const copyToBranch = (branchId) => {
+  return request({
+    url: '/api/blade-los/reports/copyToBranch',
+    method: 'get',
+    params: {
+      branchId
+    }
+  })
+}

+ 1 - 1
src/api/system/dept.js

@@ -74,7 +74,7 @@ export const getDeptLazyTree = (parentId) => {
     url: '/api/blade-system/dept/lazy-tree',
     method: 'get',
     params: {
-      parentId
+      parentId,
     }
   })
 }

+ 4 - 0
src/enums/column-name.js

@@ -1387,6 +1387,10 @@ const columnName = [{
   name: '货运代理-基础资料-客户类别'
 },
 {
+  code: 304.2,
+  name: '货运代理-基础资料-PS客户'
+},
+{
   code: 305,
   name: '货运代理-基础资料-币别及汇率'
 },

+ 1 - 1
src/util/configration.js

@@ -2,6 +2,6 @@
  * 浏览器判断是否全屏
  */
 export const getDefaultExtendedDataNames = () => {
-    var a = "INTTRA,MAEU,OOCL,APL,PIL,HJ,HMM,ESL,ZIM,PO,MSC,EP,QQCT,CTM,SML,VOLTA,CMA,ONE".split(",");
+    var a = "INTTRA,MAEU,OOCL,APL,PIL,HJ,HMM,ESL,ZIM,PO,MSC,EP,QQCT,CTM,SML,VOLTA,CMA,ONE,HLAG".split(",");
     return a.sort((a, b) => a.localeCompare(b));
 };

+ 89 - 9
src/util/date.js

@@ -233,6 +233,15 @@ function addZero(num) {
   }
   return num;
 }
+export function customToUpper(str) {
+  if(str == null || typeof str === "undefined") {
+    return "";
+  }else{
+    return str.replace(/[a-z]/g, function (match) {
+      return match.toUpperCase();
+    });
+  }
+}
 //验证英文,允许 TAB 存在
 export function verifyEnglish(str) {
   const regex = /^[A-Za-z0-9\r\n\t .,!?:()|/+-_;'"$&@%*#]+$/;
@@ -280,16 +289,14 @@ export function checkFullWidthSymbols_bak(text) {
     };
   }
 }
+
 // wfg
-export function checkFullWidthSymbols(text) {
+export function checkFullWidthSymbols_back2(text) {
   if (text) {
     const fullWidthRegex = /[\u4e00-\u9fa5\u3000-\u303f\uff00-\uffef\u3400-\u4dbf]/g;
     const matchesItem = [];
     // TAB 键转为空格
-    let lines = text
-      .trimEnd()
-      .replaceAll("\t", " ")
-      .split("\n");
+    let lines = text.trimEnd().replaceAll("\t", " ").split("\n");
     let match;
     lines.forEach((ln, index, array) => {
       ln = ln.trimEnd();
@@ -299,14 +306,14 @@ export function checkFullWidthSymbols(text) {
           row: index + 1, // 行号
           index: match.index, // 符号的位置
           symbol: match[0], // 符号本身
-          input: match.input // 行
+          input: match.input, // 行
         });
       }
     });
     let resetText = lines.join("\n");
     let isResetText = resetText != text;
     let message = [];
-    matchesItem.forEach(m => {
+    matchesItem.forEach((m) => {
       message.push(`第 ${m.row} 行第 ${m.index} 个字符 ${m.symbol} 不符合要求,存在全角字符或汉字等!`);
     });
     return {
@@ -314,7 +321,7 @@ export function checkFullWidthSymbols(text) {
       positions: matchesItem, // 符号的详细位置和内容
       message: message.join("<br>"),
       isResetText: isResetText, // 是否重设文本
-      resetText: resetText // 重设的文本
+      resetText: resetText, // 重设的文本
     };
   } else {
     return {
@@ -322,10 +329,83 @@ export function checkFullWidthSymbols(text) {
       positions: [], // 符号的详细位置和内容
       message: "",
       isResetText: false, // 是否重设文本
-      resetText: "" // 重设的文本
+      resetText: "", // 重设的文本
     };
   }
 }
+
+/**
+ * 检测文本中是否存在不符合 ETD 传输规范的字符
+ * @param {string} text - 待检测的文本
+ * @param {RegExp} [allowedPattern=/[\x20-\x7E\r\n]/] - 匹配允许字符的正则表达式(默认允许可打印 ASCII 及 \r \n)
+ * @returns {Array<{char: string, line: number, column: number}>}
+ *          返回非法字符信息数组,每个元素包含非法字符本身、行号、列号;若无非法字符则返回空数组
+ */
+export function checkFullWidthSymbols(text) {
+  if (text) {
+    const invalidChars = [];
+    let allowedPattern = /[\x20-\x7E\r\n]/;
+
+    // TAB 键转为空格
+    let lines = text.trimEnd().replaceAll("\t", " ").split("\n");
+    lines.forEach((ln, index, array) => {
+      ln = ln.trimEnd();
+      lines[index] = ln;
+
+      let column = 1;
+      // 使用 for...of 遍历每个 Unicode 字符(正确处理代理对)
+      for (const ch of ln) {
+        // 判断当前字符是否允许
+        if (!allowedPattern.test(ch)) {
+          invalidChars.push({ char: ch, line: index + 1, column });
+        }
+
+        column++;
+      }
+    });
+
+    let resetText = lines.join("\n");
+    let isResetText = resetText != text;
+    let message = [];
+    invalidChars.forEach((m) => {
+      let cc = m.char.charCodeAt(0), ch=m.char
+      if(cc<32 || cc===127){
+        ch = "#" + cc.toString(16).toUpperCase()
+      }
+      message.push(`第 ${m.line} 行第 ${m.column} 个字符 <span style="color:limegreen">${ch}</span> 不符合要求,存在全角字符或汉字等!`);
+    });
+    return {
+      hasFullWidth: invalidChars.length > 0, // 是否包含全角符号
+      positions: invalidChars, // 符号的详细位置和内容
+      message: message.join("<br>"),
+      isResetText: isResetText, // 是否重设文本
+      resetText: resetText, // 重设的文本
+    };
+  } else {
+    return {
+      hasFullWidth: false, // 是否包含全角符号
+      positions: [], // 符号的详细位置和内容
+      message: "",
+      isResetText: false, // 是否重设文本
+      resetText: "", // 重设的文本
+    };
+  }
+}
+
+// 示例用法
+/*
+const sampleText = "Hello, 世界!\nThis is a test.\x01End.";
+const result = findInvalidETDChars(sampleText);
+if (result.length > 0) {
+  console.log("发现非法字符:");
+  result.forEach(({ char, line, column }) => {
+    console.log(`字符 "${char}" (Unicode: ${char.charCodeAt(0)}) 位于第 ${line} 行,第 ${column} 列`);
+  });
+} else {
+  console.log("未发现非法字符");
+}
+*/
+
 //判断是否超过设置天数
 export function overdueJudgment(date1, date2) {
   let lockTermGlobal = localStorage.getItem("lockTermGlobal");

+ 2 - 1
src/views/iosBasicData/AirtransportExport/bills/assembly/DocumentCenter.vue

@@ -609,7 +609,8 @@ export default {
             this.loading = true;
             reportslogList(documentPage.currentPage, documentPage.pageSize, {
                 ...Object.assign(params, this.query),
-                billId: this.assemblyForm.id
+                billId: this.assemblyForm.id,
+                branchId: this.assemblyForm.branchId,
             }).then(res => {
                 const data = res.data.data;
                 this.documentPage.total = data.total;

+ 3 - 1
src/views/iosBasicData/AirtransportImport/bills/assembly/DocumentCenter.vue

@@ -470,6 +470,7 @@ export default {
                 obj.remarks = this.assemblyForm.remarks
                 obj.businessType = this.assemblyForm.businessType
                 obj.billId = this.assemblyForm.id
+                obj.branchId = this.assemblyForm.branchId;
                 obj.billNo = this.assemblyForm.billNo
                 obj.mblno = this.assemblyForm.mblno
                 obj.hblno = this.assemblyForm.hblno
@@ -609,7 +610,8 @@ export default {
             this.loading = true;
             reportslogList(documentPage.currentPage, documentPage.pageSize, {
                 ...Object.assign(params, this.query),
-                billId: this.assemblyForm.id
+                billId: this.assemblyForm.id,
+                branchId: this.assemblyForm.branchId
             }).then(res => {
                 const data = res.data.data;
                 this.documentPage.total = data.total;

+ 2 - 1
src/views/iosBasicData/SeafreightExportF/bills/assembly/DistributionBox/PackingBusiness.vue

@@ -80,7 +80,7 @@
                 {{ Number(scope.row.measurement).toFixed(2) }}
               </template>
             </el-table-column>
-            <el-table-column label="操作" width="100">
+            <el-table-column v-if="showAllocationButtons" label="操作" width="100">
               <template slot-scope="scope">
                 <el-button
                   type="text"
@@ -412,6 +412,7 @@ export default {
   },
   data() {
     return {
+      showAllocationButtons: false,
       // 商品 HS-CODE
       commodityData: [],
       // HSCODE

+ 22 - 6
src/views/iosBasicData/SeafreightExportF/bills/assembly/DocumentCenter.vue

@@ -23,10 +23,10 @@
             @search-change="searchChange"
             @search-reset="searchReset"
             @refresh-change="refreshChange"
-            @on-load="reportslogListfun"
             @resetColumn="resetColumnTwo('documentCrud', 'documentOption', 'documentOptionBack', 312.1)"
             @saveColumn="saveColumnTwo('documentCrud', 'documentOption', 'documentOptionBack', 312.1)"
           >
+<!--            @on-load="reportslogListfun"-->
             <template slot="menuLeft">
               <!--                            :disabled="disabled"-->
               <el-button type="primary" size="small" icon="el-icon-plus" @click="addbtnfun()">新增 </el-button>
@@ -595,7 +595,7 @@ export default {
         this.textareaNumber = res.data.data;
       }
     });
-    this.reportsListfun();
+    // this.reportsListfun();
   },
   methods: {
     // 打印预览按钮
@@ -714,7 +714,9 @@ export default {
     },
     // 打印预览弹窗数据
     async PreviewOnLoad(page, params = {}) {
-      const res = await reportsList(page.currentPage, page.pageSize, Object.assign(params, this.PreviewQuery));
+      let obj = Object.assign(params, this.PreviewQuery);
+      obj.branchId = this.assemblyForm.branchId;
+      const res = await reportsList(page.currentPage, page.pageSize, obj);
       const data = res.data.data;
       this.PreviewPage.total = data.total;
       this.PreviewData = data.records;
@@ -1043,6 +1045,7 @@ export default {
         // obj.remarks = this.assemblyForm.remarks
         obj.businessType = this.assemblyForm.businessType;
         obj.billId = this.assemblyForm.id;
+        obj.branchId = this.assemblyForm.branchId;
         obj.billNo = this.assemblyForm.billNo;
         obj.mblno = this.assemblyForm.mblno;
         obj.hblno = this.assemblyForm.hblno;
@@ -1183,10 +1186,12 @@ export default {
       };
       this.businesstypeData = {};
       this.businesstypeData = data;
+      this.documentPage.currentPage=1
       this.reportslogListfun(this.documentPage, { reportsType: data.reportsType });
     },
     // 左侧数据获取
-    reportsListfun() {
+    reportsListfun(form) {
+      this.assemblyForm = form;
       // reportsList(1,20,{
       //     businessType:'HYCK',
       //     classifyCode:'单证',
@@ -1204,7 +1209,8 @@ export default {
             })
              */
       getDocumentTypesListAll({
-        businessType: "HYCK"
+        businessType: "HYCK",
+        branchId: this.assemblyForm.branchId,
       }).then(res => {
         res.data.data.forEach(r => {
           r.label = r.typeName;
@@ -1219,6 +1225,15 @@ export default {
         });
         // console.log("bdocumentTypes.listAll", res.data.data)
         this.reportTypeData = res.data.data;
+
+        this.editData = {};
+        this.documentForm = {
+          dept:{},
+          user: {},
+        };
+        this.documentPage.currentPage=1
+        this.businesstypeData = {}
+        this.reportslogListfun(this.documentPage, this.query);
       });
     },
     // 类别弹窗关闭
@@ -1264,7 +1279,8 @@ export default {
       }
       reportslogList(documentPage.currentPage, documentPage.pageSize, {
         ...Object.assign(params, this.query),
-        billId: this.assemblyForm.id
+        billId: this.assemblyForm.id,
+        branchId: this.assemblyForm.branchId,
       }).then(res => {
         const data = res.data.data;
         this.documentPage.total = data.total;

Разница между файлами не показана из-за своего большого размера
+ 177 - 171
src/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation.vue


+ 11 - 2
src/views/iosBasicData/SeafreightExportF/bills/assembly/edicode.vue

@@ -390,6 +390,7 @@
 import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
 import { getWorkDicts } from "@/api/system/dictbiz";
 import { bportsList } from "@/api/iosBasicData/bports";
+import { customToUpper } from "@/util/date";
 
 export default {
   components: { SearchQuery },
@@ -783,6 +784,7 @@ export default {
             rows: 5,
             disabled: this.disabled,
             ensFillingFlags: "CD",
+            // fontFamily: "'Courier New', Courier, monospace;",
           },
           {
             label: "卖方",
@@ -793,6 +795,7 @@ export default {
             disabled: this.disabled,
             row: true,
             ensFillingFlags: "BCD",
+            // fontFamily: "'Courier New', Courier, monospace;",
           },
           {
             label: "HBL发货联系人",
@@ -861,6 +864,7 @@ export default {
             rows: 5,
             disabled: this.disabled,
             ensFillingFlags: "CD",
+            // fontFamily: "'Courier New', Courier, monospace;",
           },
           {
             label: "买方",
@@ -871,6 +875,7 @@ export default {
             row: true,
             disabled: this.disabled,
             ensFillingFlags: "BCD",
+            // fontFamily: "'Courier New', Courier, monospace;",
           },
           {
             label: "HBL收货联系人",
@@ -932,6 +937,7 @@ export default {
             disabled: this.disabled,
             rows: 5,
             ensFillingFlags: "CD",
+            // fontFamily: "'Courier New', Courier, monospace;",
           },
           {
             label: "海关申报货物明细",
@@ -942,6 +948,7 @@ export default {
             rows: 5,
             row: true,
             ensFillingFlags: "BCD",
+            // fontFamily: "'Courier New', Courier, monospace;",
           },
           {
             label: "HBL通知联系人",
@@ -1046,6 +1053,7 @@ export default {
             type: "textarea",
             disabled: this.disabled,
             rows: 5,
+            // fontFamily: "'Courier New', Courier, monospace;",
           },
           {
             label: "买方",
@@ -1055,6 +1063,7 @@ export default {
             rows: 5,
             disabled: this.disabled,
             row: true,
+            // fontFamily: "'Courier New', Courier, monospace;",
           },
 
           {
@@ -1165,7 +1174,7 @@ export default {
       return regex.test(input);
     },
     upperCas(name, str) {
-      this.assemblyForm.hmmEdi[name] = str.toUpperCase();
+      this.assemblyForm.hmmEdi[name] = customToUpper(str);
     },
     submitHmm(res, done) {
       done();
@@ -1388,7 +1397,7 @@ export default {
               row: true,
               change: ({ value, column, item, dic }) => {
                 let that = this;
-                that.$set(that.assemblyForm.hmmEdi, "applicant", value.toUpperCase());
+                that.$set(that.assemblyForm.hmmEdi, "applicant", customToUpper(value));
               },
             },
             {

+ 3 - 3
src/views/iosBasicData/SeafreightExportF/bills/assembly/mbinformation.vue

@@ -291,7 +291,7 @@ import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
 import { getBvesselsList } from "@/api/iosBasicData/bvessels";
 import { getBcorpsList, getBcorpslistByType } from "@/api/iosBasicData/bcorps";
 import { blinesList, getReceiptUrl } from "@/api/iosBasicData/blines";
-import { NdayDate } from "@/util/date";
+import { customToUpper, NdayDate } from "@/util/date";
 import dicSelect from "@/components/dicSelect/main";
 import _ from "lodash";
 export default {
@@ -358,12 +358,12 @@ export default {
             // }
             let arr = ['mshipperDetails', 'mconsigneeDetails', 'mnotifyDetails', 'mnotify2Details', 'mcommodityDescr', 'mmarks']
             if (arr.indexOf(name) != -1) {
-                this.assemblyForm.detail[name] = _.toUpper(this.assemblyForm.detail[name])
+                this.assemblyForm.detail[name] = customToUpper(this.assemblyForm.detail[name])
 
             }
             let arr2 = ['bookingRemarks', 'siRemarks']
             if (arr2.indexOf(name) != -1) {
-                this.assemblyForm[name] = _.toUpper(this.assemblyForm[name])
+                this.assemblyForm[name] = customToUpper(this.assemblyForm[name])
 
             }
             // this.assemblyForm[name] = textareaWrap(this.assemblyForm[name])

+ 51 - 13
src/views/iosBasicData/SeafreightExportF/bills/assembly/reports.vue

@@ -24,14 +24,15 @@
       @current-change="currentChange"
       @size-change="sizeChange"
       @refresh-change="refreshChange"
-      @on-load="onLoad"
     >
+      <!--      @on-load="onLoad"-->
       <template slot-scope="{ type, disabled }" slot="urlForm">
         <el-button size="small" :disabled="bbDisabled" @click="reportDesignButton(form.url)">设计报表</el-button>
       </template>
       <template slot="menuLeft">
         <el-button type="primary" size="small" icon="el-icon-plus" @click="addedData(3)">新 增 </el-button>
         <el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.reports_delete" @click="handleDelete">删 除 </el-button>
+        <el-button type="primary" size="small" icon="el-icon-plus" @click="copyToTJ">复制到天津</el-button>
       </template>
       <template slot="authorizedUsersIdForm">
         <dic-select
@@ -111,7 +112,7 @@
 </template>
 
 <script>
-import { getList, reportsDetail, add, update, reportsRemove2, reportsGetReportData } from "@/api/iosBasicData/reports";
+import { getList, reportsDetail, add, update, reportsRemove2, reportsGetReportData, copyToBranch } from "@/api/iosBasicData/reports";
 import { getUserApprovalList } from "@/api/approval/processConfig";
 import { mapGetters } from "vuex";
 import { billsDetail } from "@/api/iosBasicData/bills";
@@ -156,7 +157,7 @@ export default {
       },
       formReport: {},
       query: {},
-      loading: true,
+      loading: false,
       page: {
         pageSize: 10,
         currentPage: 1,
@@ -1070,6 +1071,20 @@ export default {
       // }
     },
 
+    copyToTJ() {
+      copyToBranch("1712348552115621890").then(
+        () => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!",
+          });
+        },
+        (error) => {
+          window.console.log(error);
+        }
+      );
+    },
     addedData(type, scope) {
       var defRpt = {
         ReportGuid: "048d8ba656989354e05fbb23708a7004",
@@ -1130,6 +1145,7 @@ export default {
         this.$refs.crud.rowEdit(scope.row, scope.$index);
       } else if (type == 3) {
         this.form.url = JSON.stringify(defRpt);
+        this.form.branchId = this.assemblyForm.branchId;
         this.bbDisabled = false;
         this.$refs.crud.rowAdd();
       }
@@ -1244,19 +1260,41 @@ export default {
     refreshChange() {
       this.onLoad(this.page, this.query);
     },
+    getData(form) {
+      this.assemblyForm = form;
+      this.onLoad(this.page);
+    },
     onLoad(page, params = {}) {
-      this.loading = true;
-      params.businessType = this.businessValue;
-      if (this.groupCode) {
-        params.groupCode = this.groupCode;
+      console.log("report.onLoad");
+      if (!page) {
+        page = {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0,
+        };
       }
-      getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => {
-        const data = res.data.data;
-        this.page.total = data.total;
-        this.data = data.records;
-        this.loading = false;
+
+      if (this.assemblyForm.id) {
+        this.loading = true;
+        params.businessType = this.businessValue;
+        if (this.groupCode) {
+          params.groupCode = this.groupCode;
+        }
+        params.branchId = this.assemblyForm.branchId;
+        console.log("report.assemblyForm", this.assemblyForm);
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      } else {
+        this.page.currentPage = 1;
+        this.page.total = 0;
+        this.data = [];
         this.selectionClear();
-      });
+      }
     },
     //自定义列保存
     async saveColumnTwo(ref, option, optionBack, code) {

+ 175 - 53
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -341,12 +341,14 @@
                 <el-tab-pane label="MB/L信息" name="third">
                   <mbinformation :assemblyForm="form" :detailData="detailData" :disabled="showLock"> </mbinformation>
                 </el-tab-pane>
-                <el-tab-pane
-                  label="报表管理"
-                  name="fourth"
-                  v-if="roleName.indexOf('admin') != -1 ? true : roleName.indexOf('报表管理') != -1 ? true : false"
-                >
-                  <reports :id="form.id" :assemblyForm="form" :disabled="detailData.seeDisabled || showLock" businessValue="HYCK"></reports>
+                <el-tab-pane label="报表管理" name="fourth" v-if="roleName.indexOf('admin') >= 0 || roleName.indexOf('报表管理') >= 0">
+                  <reports
+                    ref="reports"
+                    :id="form.id"
+                    :assemblyForm="form"
+                    :disabled="detailData.seeDisabled || showLock"
+                    businessValue="HYCK"
+                  ></reports>
                 </el-tab-pane>
                 <el-tab-pane label="EDI 及其他" name="sixth">
                   <edicode :assemblyForm="form" :detailData="detailData" :disabled="detailData.seeDisabled || showLock"> </edicode>
@@ -482,14 +484,7 @@
       </div>
     </el-dialog>
 
-    <el-dialog
-      title="EDI 发送确认"
-      append-to-body
-      v-dialogDrag
-      :visible.sync="ediFilesConfirm"
-      class="avue-dialog avue-dialog--top"
-      width="30%"
-    >
+    <el-dialog title="EDI 发送确认" append-to-body v-dialogDrag :visible.sync="ediFilesConfirm" class="avue-dialog avue-dialog--top" width="30%">
       <span>请确认是否继续发送 EDI!</span>
       <br />
       <br />
@@ -591,7 +586,7 @@ import {
   createAndAdd,
   beforeSendingEdi,
 } from "@/api/iosBasicData/bills";
-import { dateFormat, getCurrentDate } from "@/util/date";
+import { customToUpper, dateFormat, getCurrentDate } from "@/util/date";
 import checkSchedule from "@/components/checkH/checkSchedule.vue";
 import { auditProcessListHD } from "@/api/check/check";
 import { getBvesselsList } from "@/api/iosBasicData/bvessels";
@@ -1198,13 +1193,10 @@ export default {
     this.getLazylistfun(); // 获取审核数据
     this.mpaymodeWorkDictsfun(); // 获取 付款方式字典
     this.srcTypeWorkDictsfun();
-    // 获取EDI 数据
-    this.editypesListfun();
+    // 获取EDI 数据,提取详情后列出
+    // this.editypesListfun();
     // 获取所属团队数据
     this.postSelectByUserfun();
-
-    // console.log("sysitemData", localStorage.getItem('sysitemData'))
-    // console.log("created", "form", this.form)
   },
   methods: {
     async lastPage() {
@@ -1321,7 +1313,12 @@ export default {
     },
     // 主要信息是否更改
     mainDataChanged() {
-      console.log("mainDataChanged", contrastObj(this.form.preContainersList, this.oldForm.preContainersList), this.form.preContainersList, this.oldForm.preContainersList)
+      // console.log(
+      //   "mainDataChanged",
+      //   contrastObj(this.form.preContainersList, this.oldForm.preContainersList),
+      //   this.form.preContainersList,
+      //   this.oldForm.preContainersList
+      // );
       let changed = {
         changed: false,
         main: false,
@@ -1361,10 +1358,6 @@ export default {
         }
       }
 
-      console.log(changed);
-      console.log(this.form.hmmEdi);
-      console.log(this.oldForm.hmmEdi);
-
       return changed;
     },
     addEdit() {
@@ -1437,6 +1430,21 @@ export default {
           }
         });
 
+        // ICS2
+        if (this.form.hmmEdi) {
+          fldNames = "sellerDetails,buyerDetails,hblShipperDetails,hblConsigneeDetails,hblNotifyDetails".split(",");
+          fldDescs = "卖方,买方,HBL 发货人,HBL 收货人,HBL 通知人".split(",");
+          fldNames.forEach((fld, idx) => {
+            const cfs = checkFullWidthSymbols(this.form.hmmEdi[fld]);
+            if (cfs.hasFullWidth) {
+              if (cfs.isResetText) {
+                this.$set(this.form.hmmEdi, fld, cfs.resetText);
+              }
+              msgsList.push("ICS2 " + fldDescs[idx] + ": " + cfs.message);
+            }
+          });
+        }
+
         if (msgsList.length > 0) {
           this.$message({
             dangerouslyUseHTMLString: true,
@@ -1480,6 +1488,18 @@ export default {
         if (!verifyEnglish(this.form.forwarding)) {
           msgsList.push("FORWARDING");
         }
+
+        // ICS2
+        if (this.form.hmmEdi) {
+          fldNames = "sellerDetails,buyerDetails,hblShipperDetails,hblConsigneeDetails,hblNotifyDetails".split(",");
+          fldDescs = "卖方,买方,HBL 发货人,HBL 收货人,HBL 通知人".split(",");
+          fldNames.forEach((fld, idx) => {
+            if (!verifyEnglish(this.form.hmmEdi[fld])) {
+              msgsList.push("ICS2 " + fldDescs[idx]);
+            }
+          });
+        }
+
         if (msgsList.length > 0) {
           // this.$message.error(`请正确输入${msgsList.join(",")}的英文`);
           this.$message.error(`${msgsList.join(",")}存在非英文字符,如汉字等,请修正后再保存!`);
@@ -1494,6 +1514,13 @@ export default {
       this.form.detail.mmarks = this.getTextTrim(this.form.detail.mmarks);
       this.form.detail.mcommodityDescr = this.getTextTrim(this.form.detail.mcommodityDescr);
       this.form.forwarding = this.getTextTrim(this.form.forwarding);
+      // ICS2
+      if (this.form.hmmEdi) {
+        let s = "sellerDetails,buyerDetails,hblShipperDetails,hblConsigneeDetails,hblNotifyDetails".split(",");
+        s.forEach((fld, idx) => {
+          this.form.hmmEdi[fld] = this.getTextTrim(this.form.hmmEdi[fld]);
+        });
+      }
       // 赋值 ETD 日期
       this.form.billDate = this.form.etd ? this.form.etd.slice(0, 10) + " 00:00:00" : null; // 单据日期
       // 调用保存接口
@@ -1507,8 +1534,9 @@ export default {
         }
         // 3 用户选择保存,收发通校验
         if (rb.status == 3) {
+          let changed = false;
           this.sftVerifyData = {
-            status: status,
+            status: rb.status,
             remark: rb.remark, // .replaceAll("<br />", "\n"),
             hshipperId: rb.hshipperId == 1,
             hshipperDetails: rb.hshipperDetails,
@@ -1520,37 +1548,98 @@ export default {
             marks: rb.marks,
             reserve2: rb.reserve2 == "1",
             commodityDescr: rb.commodityDescr,
+            reserve3: rb.reserve3 == "1",
+            bookingRemarks: rb.bookingRemarks,
+            reserve4: rb.reserve4 == "1",
+            siRemarks: rb.siRemarks,
+            // ICS2
+            ics2_sellerFlag: rb.hmmEdi ? rb.hmmEdi.sellerFlag == "1" : false,
+            ics2_sellerDetails: rb.hmmEdi ? rb.hmmEdi.sellerDetails : "",
+            ics2_buyerFlag: rb.hmmEdi ? rb.hmmEdi.buyerFlag == "1" : false,
+            ics2_buyerDetails: rb.hmmEdi ? rb.hmmEdi.buyerDetails : "",
+            ics2_hblShipperFlag: rb.hmmEdi ? rb.hmmEdi.hblShipperFlag == "1" : false,
+            ics2_hblShipperDetails: rb.hmmEdi ? rb.hmmEdi.hblShipperDetails : "",
+            ics2_hblConsigneeFlag: rb.hmmEdi ? rb.hmmEdi.hblConsigneeFlag == "1" : false,
+            ics2_hblConsigneeDetails: rb.hmmEdi ? rb.hmmEdi.hblConsigneeDetails : "",
+            ics2_hblNotifyFlag: rb.hmmEdi ? rb.hmmEdi.hblNotifyFlag == "1" : false,
+            ics2_hblNotifyDetails: rb.hmmEdi ? rb.hmmEdi.hblNotifyDetails : "",
           };
-          console.log(this.sftVerifyData);
           if (this.sftVerifyData.hshipperId === true) {
             this.form.detail.hshipperDetails = this.sftVerifyData.hshipperDetails;
+            changed = true;
           }
           if (this.sftVerifyData.mshipperId === true) {
             this.form.detail.mshipperDetails = this.sftVerifyData.mshipperDetails;
+            changed = true;
           }
           if (this.sftVerifyData.hconsigneeId === true) {
             this.form.detail.hconsigneeDetails = this.sftVerifyData.hconsigneeDetails;
+            changed = true;
           }
           if (this.sftVerifyData.mconsigneeId === true) {
             this.form.detail.mconsigneeDetails = this.sftVerifyData.mconsigneeDetails;
+            changed = true;
           }
           if (this.sftVerifyData.hnotifyId === true) {
             this.form.detail.hnotifyDetails = this.sftVerifyData.hnotifyDetails;
+            changed = true;
           }
           if (this.sftVerifyData.mnotifyId === true) {
             this.form.detail.mnotifyDetails = this.sftVerifyData.mnotifyDetails;
+            changed = true;
           }
           if (this.sftVerifyData.reserve1 === true) {
             this.form.marks = this.sftVerifyData.marks;
+            changed = true;
           }
           if (this.sftVerifyData.reserve2 === true) {
             this.form.commodityDescr = this.sftVerifyData.commodityDescr;
+            changed = true;
+          }
+          if (this.sftVerifyData.reserve3 === true) {
+            this.form.bookingRemarks = this.sftVerifyData.bookingRemarks;
+            changed = true;
+          }
+          if (this.sftVerifyData.reserve4 === true) {
+            this.form.siRemarks = this.sftVerifyData.siRemarks;
+            changed = true;
+          }
+          if (this.sftVerifyData.ics2_sellerFlag === true) {
+            this.form.hmmEdi.sellerDetails = this.sftVerifyData.ics2_sellerDetails;
+            changed = true;
+          }
+          if (this.sftVerifyData.ics2_buyerFlag === true) {
+            this.form.hmmEdi.buyerDetails = this.sftVerifyData.ics2_buyerDetails;
+            changed = true;
+          }
+          if (this.sftVerifyData.ics2_hblShipperFlag === true) {
+            this.form.hmmEdi.hblShipperDetails = this.sftVerifyData.ics2_hblShipperDetails;
+            changed = true;
+          }
+          if (this.sftVerifyData.ics2_hblConsigneeFlag === true) {
+            this.form.hmmEdi.hblConsigneeDetails = this.sftVerifyData.ics2_hblConsigneeDetails;
+            changed = true;
+          }
+          if (this.sftVerifyData.ics2_hblNotifyFlag === true) {
+            this.form.hmmEdi.hblNotifyDetails = this.sftVerifyData.ics2_hblNotifyDetails;
+            changed = true;
           }
 
-          if (this.form.id) {
+          if (rb.reserve10) {
+            this.$alert(rb.reserve10, "温馨提示", {
+              confirmButtonText: "确定",
+              type: "warning",
+              dangerouslyUseHTMLString: true,
+            });
+          }
+
+          if (changed && this.form.id) {
             await this.billsSubmitfun();
           }
         }
+        // 错误提示
+        if (rb.status == 4) {
+        }
       });
     },
     CopyDocumentsfun() {
@@ -1694,7 +1783,7 @@ export default {
     },
     // 获取EDI列表数据
     editypesListfun() {
-      editypesList(1, 1000, { type: "HYCK", status: 0 }).then((res) => {
+      editypesList(1, 1000, { type: "HYCK", status: 0, branchId: this.form.branchId }).then((res) => {
         this.ediData = res.data.data.records;
         this.ediData_SO = res.data.data.records
           .filter((r) => r.groupName == "SO")
@@ -1718,7 +1807,7 @@ export default {
     },
 
     async editypesSendingEdifun(row) {
-      let ret = await this.editCustomer("goto");
+      let ret = await this.editCustomer(""); // goto
       if (!ret) return;
 
       let sendToRemote = 1;
@@ -2231,7 +2320,6 @@ export default {
         //   this.columnforfun("srcCnName").dicData = res.data.data;
         // });
         selectSalesNames({ positionType: "业务员", status: 0, whetherEmployedOrNot: "1" }).then((res) => {
-          console.log(res.data.data.records);
           res.data.data.records.forEach((record) => {
             record.name = record.cname;
           });
@@ -2276,7 +2364,6 @@ export default {
     },
     // 下拉多选弹窗的确认
     eldialogConfirm(name) {
-      console.log("eldialogConfirm", name, this.$refs.bcorps[0].isShow);
       if (name == "bcorps") {
         if (this.$refs.bcorps[0].isShow) {
           this.form.corpCnName = this.$refs.bcorps[0].selectionList[0].cnName;
@@ -2370,7 +2457,6 @@ export default {
     // 下拉多选弹窗数据多选回调
     eldialogMultipleChoice(list, name) {
       if (name == "bcorps") {
-        console.log("eldialogMultipleChoice", list);
         let arr = [];
         if (list.length > 1) {
           this.$refs.bcorps[0].$refs.crud.toggleSelection(); // 先清空所以选择的数据
@@ -2994,14 +3080,18 @@ export default {
       this.detailData.seeDisabled = false;
     },
     //去除文本框的空格
-    getTextTrim(data) {
+    getTextTrim(data, up) {
       if (data) {
         let obj = data.split("\n");
         let res = [];
         obj.forEach((item) => {
           res.push(_.trimEnd(item));
         });
-        return res.join("\n");
+        if (up === true) {
+          return customToUpper(res.join("\n"));
+        } else {
+          return res.join("\n");
+        }
       } else {
         return null;
       }
@@ -3053,7 +3143,6 @@ export default {
             await this.billsDetailfun(this.form.id);
           }
           ret = true;
-          console.log("set ret", ret);
           return true;
         }
 
@@ -3302,10 +3391,10 @@ export default {
           let msgsList = [];
           fldNames.forEach((fld, idx) => {
             const cfs = checkFullWidthSymbols(this.form.detail[fld]);
+            if (cfs.isResetText) {
+              this.$set(this.form.detail, fld, cfs.resetText);
+            }
             if (cfs.hasFullWidth) {
-              if (cfs.isResetText) {
-                this.$set(this.form.detail, fld, cfs.resetText);
-              }
               msgsList.push(fldDescs[idx] + ": " + cfs.message);
             }
           });
@@ -3336,14 +3425,29 @@ export default {
           fldDescs = "收货地,装货港,卸货港,目的地,交货地,中转港".split(",");
           fldNames.forEach((fld, idx) => {
             const cfs = checkFullWidthSymbols(this.form[fld]);
+            if (cfs.isResetText) {
+              this.$set(this.form, fld, cfs.resetText);
+            }
             if (cfs.hasFullWidth) {
-              if (cfs.isResetText) {
-                this.$set(this.form, fld, cfs.resetText);
-              }
               msgsList.push(fldDescs[idx] + ": " + cfs.message);
             }
           });
 
+          // ICS2
+          if (this.form.hmmEdi) {
+            fldNames = "sellerDetails,buyerDetails,hblShipperDetails,hblConsigneeDetails,hblNotifyDetails".split(",");
+            fldDescs = "卖方,买方,HBL 发货人,HBL 收货人,HBL 通知人".split(",");
+            fldNames.forEach((fld, idx) => {
+              const cfs = checkFullWidthSymbols(this.form.hmmEdi[fld]);
+              if (cfs.isResetText) {
+                this.$set(this.form.hmmEdi, fld, cfs.resetText);
+              }
+              if (cfs.hasFullWidth) {
+                msgsList.push("ICS2 " + fldDescs[idx] + ": " + cfs.message);
+              }
+            });
+          }
+
           if (msgsList.length > 0) {
             this.$message({
               dangerouslyUseHTMLString: true,
@@ -3387,6 +3491,18 @@ export default {
           if (!verifyEnglish(this.form.forwarding)) {
             msgsList.push("FORWARDING");
           }
+
+          // ICS2
+          if (this.form.hmmEdi) {
+            fldNames = "sellerDetails,buyerDetails,hblShipperDetails,hblConsigneeDetails,hblNotifyDetails".split(",");
+            fldDescs = "卖方,买方,HBL 发货人,HBL 收货人,HBL 通知人".split(",");
+            fldNames.forEach((fld, idx) => {
+              if (!verifyEnglish(this.form.hmmEdi[fld])) {
+                msgsList.push("ICS2 " + fldDescs[idx]);
+              }
+            });
+          }
+
           if (msgsList.length > 0) {
             // this.$message.error(`请正确输入${msgsList.join(",")}的英文`);
             this.$message.error(`${msgsList.join(",")}存在非英文字符,如汉字等,请修正后再保存!`);
@@ -3401,6 +3517,14 @@ export default {
         this.form.detail.mmarks = this.getTextTrim(this.form.detail.mmarks);
         this.form.detail.mcommodityDescr = this.getTextTrim(this.form.detail.mcommodityDescr);
         this.form.forwarding = this.getTextTrim(this.form.forwarding);
+        // ICS2
+        if (this.form.hmmEdi) {
+          let s = "sellerDetails,buyerDetails,hblShipperDetails,hblConsigneeDetails,hblNotifyDetails".split(",");
+          s.forEach((fld, idx) => {
+            this.form.hmmEdi[fld] = this.getTextTrim(this.form.hmmEdi[fld], true);
+          });
+        }
+
         // 赋值 ETD 日期
         this.form.billDate = this.form.etd ? this.form.etd.slice(0, 10) + " 00:00:00" : null; // 单据日期
         // 调用保存接口
@@ -3448,7 +3572,6 @@ export default {
                 reserve2: rb.reserve2 == "1",
                 commodityDescr: rb.commodityDescr,
               };
-              console.log(this.sftVerifyData);
               this.sftVerifyDataCallback = callback;
               this.showSftVerifyDlg = true;
               /*
@@ -3484,7 +3607,6 @@ export default {
           await this.billsSubmitfun(status, undefined, callback);
 
           ret = true;
-          console.log("set ret", ret);
           return true;
         }
       } else {
@@ -3493,7 +3615,6 @@ export default {
       }
       // });
 
-      console.log("ret 1", ret);
       return ret;
     },
     // 主表保存接口大保存
@@ -3662,7 +3783,6 @@ export default {
           this.pageLoading = false;
 
           // 保存箱号
-          console.log(this.form.containersList, this.oldForm.containersList);
           if (contrastList(this.form.containersList, this.oldForm.containersList)) {
             await containersSubmitList(this.form.containersList);
           }
@@ -3904,7 +4024,6 @@ export default {
     },
     // 详情接口
     async billsDetailfun(id, status, callback) {
-      // console.log("bills.billsDetailfun", id, status);
       const res = await billsDetail(id);
 
       if (status === "containersList") {
@@ -3917,6 +4036,8 @@ export default {
       // this.form = res.data.data;
       this.$set(this, "form", res.data.data);
 
+      this.editypesListfun();
+
       if (this.form.hmmEdi) {
         if (!this.form.hmmEdi.emsDeclarationIdentification) {
           this.form.hmmEdi.emsDeclarationIdentification = "B";
@@ -3943,8 +4064,6 @@ export default {
         }
       }
 
-      console.log(this.form);
-
       // 如果已经请核就禁用按钮
       if (this.form.status == 1 || this.form.status == 2 || this.form.status == 3) {
         this.detailData.seeDisabled = true;
@@ -3955,7 +4074,6 @@ export default {
       }
       // if (res.data.data.etd && this.overdueJudgment(res.data.data.locked == 0 ? res.data.data.etd : res.data.data.lockedDate)) {
       if (res.data.data.etd && this.overdueJudgment(res.data.data.etd, res.data.data.lockedDate)) {
-        console.log(res.data.data.etd, res.data.data.locked, res.data.data.lockedDate);
         this.detailData.seeDisabled = true;
         this.$message.error("已锁账,请申请解锁");
         this.lockBtn = true;
@@ -4057,11 +4175,18 @@ export default {
         }
         item.edit = false;
       }
+
+      if (this.$refs.reports) {
+        this.$refs.reports.getData(res.data.data);
+      }
       // 文件中心
       this.$refs.filescenter.getData(res.data.data);
       for (let item of this.form.filesList) {
         this.$set(item, "edit", false);
       }
+      // 文件
+      this.$refs.documentCenter.reportsListfun(res.data.data);
+
       if (status == "toAddEdit") {
         this.$emit(status);
       }
@@ -4089,10 +4214,7 @@ export default {
         });
       }
 
-      console.log("detailData.seeDisabled", this.detailData.seeDisabled, "showLock", this.showLock);
-
       if (typeof callback === "function") {
-        console.log("do callback", callback);
         callback();
       }
 

+ 86 - 8
src/views/iosBasicData/SeafreightExportF/bills/index.vue

@@ -164,7 +164,7 @@
             </span>
           </div>
         </template>
-        <template slot="corpCnName" slot-scope="scope">
+        <template slot="shortName" slot-scope="scope">
           <span
             style="color: #1e9fff;cursor: pointer;width: 100%;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;"
             @click.stop="rowCellfun(scope.row.id, scope.row)"
@@ -172,6 +172,22 @@
             {{ scope.row.shortName }}
           </span>
         </template>
+        <template slot="mblno" slot-scope="scope">
+          <span
+            style="color: #1e9fff;cursor: pointer;width: 100%;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;"
+            @click.stop="rowCellfun(scope.row.id, scope.row)"
+          >
+            {{ scope.row.mblno }}
+          </span>
+        </template>
+        <template slot="bookingNo" slot-scope="scope">
+          <span
+            style="color: #1e9fff;cursor: pointer;width: 100%;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;"
+            @click.stop="rowCellfun(scope.row.id, scope.row)"
+          >
+            {{ scope.row.bookingNo }}
+          </span>
+        </template>
         <template slot="billNo" slot-scope="scope">
           <span
             style="color: #1e9fff;cursor: pointer;width: 100%;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;"
@@ -653,6 +669,16 @@ export default {
           // },
           {
             label: "客户简称",
+            prop: "shortName",
+            width: 160,
+            overHidden: true,
+            filterable: true,
+            filters: true,
+            sortable: true,
+            align: "left",
+          },
+          {
+            label: "客户简称",
             prop: "corpCnName",
             width: 160,
             overHidden: true,
@@ -669,21 +695,24 @@ export default {
               res: "data.records"
             },
             span: 6,
-            searchOrder: 1
+            searchOrder: 1,
+            hide: true,
           },
           {
             label: "客户英文",
             prop: "corpEnName",
-            width: 160,
+            width: 220,
+            align: "left",
             filterable: true,
             filters: true,
             sortable: true,
-            overHidden: true
+            overHidden: true,
           },
           {
             label: "MB/L NO",
             prop: "mblno",
             width: 160,
+            align: "left",
             overHidden: true,
             search: true,
             span: 6,
@@ -696,6 +725,7 @@ export default {
             label: "booking NO",
             prop: "bookingNo",
             width: 160,
+            align: "left",
             overHidden: true,
             search: true,
             span: 6,
@@ -708,6 +738,7 @@ export default {
             label: "HB/L NO",
             prop: "hblno",
             width: 160,
+            align: "left",
             overHidden: true,
             search: true,
             span: 6,
@@ -735,12 +766,34 @@ export default {
             overHidden: true
           },
           {
+            label: "船司约号",
+            prop: "carrierArgreementNo",
+            width: 160,
+            align: "left",
+            overHidden: true,
+            span: 6,
+            filterable: true,
+            filters: true,
+            sortable: true,
+          },
+          {
+            label: "客户约号",
+            prop: "corpArgreementNo",
+            width: 160,
+            align: "left",
+            overHidden: true,
+            span: 6,
+            filterable: true,
+            filters: true,
+            sortable: true,
+          },
+          {
             label: "单据类型",
             prop: "billType",
             type: "select",
             search: true,
             span: 6,
-            width: 140,
+            width: 120,
             filterable: true,
             filters: true,
             sortable: true,
@@ -765,6 +818,7 @@ export default {
             label: "单据编号",
             prop: "billNo",
             width: 120,
+            align: "left",
             overHidden: true,
             search: true,
             span: 6,
@@ -776,6 +830,7 @@ export default {
           {
             label: "船名",
             prop: "vesselCnName",
+            align: "left",
             overHidden: true,
             type: "select",
             filterable: true,
@@ -791,12 +846,14 @@ export default {
             search: true,
             span: 6,
             searchOrder: 5,
-            hide: true
+            hide: true,
+            width: 120,
             // showColumn: false
           },
           {
             label: "船名",
             prop: "vesselEnName",
+            align: "left",
             overHidden: true,
             width: 120,
             filterable: true,
@@ -807,6 +864,7 @@ export default {
             label: "航次",
             prop: "voyageNo",
             width: 100,
+            align: "left",
             overHidden: true,
             search: true,
             span: 6,
@@ -819,6 +877,7 @@ export default {
             label: "REF MBLNO",
             prop: "refno",
             width: 120,
+            align: "left",
             overHidden: true,
             search: true,
             span: 6,
@@ -870,6 +929,7 @@ export default {
           {
             label: "船公司",
             prop: "carrierCnName",
+            align: "left",
             overHidden: true,
             type: "select",
             remote: true,
@@ -891,6 +951,7 @@ export default {
           {
             label: "船公司",
             prop: "carrierShortName",
+            align: "left",
             overHidden: true,
             width: 140,
             filterable: true,
@@ -901,6 +962,7 @@ export default {
             label: "装货港",
             prop: "polEnName",
             width: 140,
+            align: "left",
             filterable: true,
             filters: true,
             sortable: true,
@@ -910,6 +972,7 @@ export default {
             label: "卸货港",
             prop: "podEnName",
             width: 140,
+            align: "left",
             filterable: true,
             filters: true,
             sortable: true,
@@ -919,6 +982,7 @@ export default {
             label: "目的港",
             prop: "destinationName",
             width: 120,
+            align: "left",
             overHidden: true,
             type: "select",
             filterable: true,
@@ -945,6 +1009,7 @@ export default {
             label: "航线",
             prop: "lineCnName",
             width: 120,
+            align: "left",
             overHidden: true,
             type: "select",
             filterable: true,
@@ -965,6 +1030,7 @@ export default {
             label: "场站",
             prop: "cyCnName",
             width: 160,
+            align: "left",
             overHidden: true,
             type: "select",
             filterable: true,
@@ -986,6 +1052,7 @@ export default {
           {
             label: "场站",
             prop: "cyShortName",
+            align: "left",
             filterable: true,
             filters: true,
             sortable: true,
@@ -996,6 +1063,7 @@ export default {
             label: "箱型/箱量",
             prop: "quantityCntrDescr",
             width: 140,
+            align: "left",
             filterable: true,
             filters: true,
             sortable: true,
@@ -1038,6 +1106,7 @@ export default {
             label: "来源详情",
             prop: "srcCnName",
             width: 140,
+            align: "left",
             overHidden: true,
             search: true,
             span: 6,
@@ -1094,6 +1163,7 @@ export default {
             label: "创建部门",
             prop: "createDeptName",
             width: 140,
+            align: "left",
             overHidden: true,
             type: "tree",
             dicUrl: "/api/blade-system/dept/tree",
@@ -1113,6 +1183,7 @@ export default {
             label: "订舱代理",
             prop: "bookingAgentCnName",
             width: 120,
+            align: "left",
             overHidden: true,
             type: "select",
             filterable: true,
@@ -1133,6 +1204,7 @@ export default {
             label: "收货人",
             prop: "hconsigneeCnName",
             width: 120,
+            align: "left",
             overHidden: true,
             type: "select",
             filterable: true,
@@ -1172,6 +1244,7 @@ export default {
             label: "唛头",
             prop: "marks",
             width: 180,
+            align: "left",
             filterable: true,
             filters: true,
             sortable: true,
@@ -1341,6 +1414,7 @@ export default {
             label: "合计应收(CNY )",
             prop: "amountDrLoc",
             width: 160,
+            align: "right",
             filterable: true,
             filters: true,
             sortable: true,
@@ -1350,6 +1424,7 @@ export default {
             label: "合计应付(CNY)",
             prop: "amountCrLoc",
             width: 160,
+            align: "right",
             filterable: true,
             filters: true,
             sortable: true,
@@ -1359,6 +1434,7 @@ export default {
             label: "合计利润(CNY)",
             prop: "amountProfitLoc",
             width: 160,
+            align: "right",
             filterable: true,
             filters: true,
             sortable: true,
@@ -1473,6 +1549,7 @@ export default {
             prop: "operatorName",
             width: 140,
             overHidden: true,
+            align: "left",
             search: true,
             type: "select",
             remote: true,
@@ -1496,6 +1573,7 @@ export default {
           {
             label: "创建人",
             prop: "createUserName",
+            align: "left",
             search: true,
             width: 140,
             rules: [
@@ -1521,7 +1599,7 @@ export default {
             overHidden: true
           },
           {
-            label: "edi发送状态",
+            label: "EDI发送状态",
             prop: "ediStatus",
             type: "select",
             filterable: true,
@@ -1590,6 +1668,7 @@ export default {
           {
             label: "备注",
             prop: "remarks",
+            align: "left",
             overHidden: true
           },
           {
@@ -2586,7 +2665,6 @@ export default {
       this.detailData.billType = type;
       // this.detailData.copyId=this.selectionList[0].id
       this.isShow = false;
-      this.isShow = false;
       this.$store.commit("IN_SEAFE_DETAIL");
       if (this.selectionList.length == 1 && this.selectionList[0].billType == "MM" && type == "MH") {
         this.$nextTick(() => {

+ 2 - 2
src/views/iosBasicData/SeafreightExportF/bills/updateBatchField.vue

@@ -220,7 +220,7 @@ import { getWorkDicts } from "@/api/system/dictbiz";
 import { getDeptLazyTree } from "@/api/system/dept";
 import { getList as userGetList } from "@/api/system/user";
 import { selectListLos, selectSalesNames } from "@/api/approval/processConfig";
-import { getCurrentDate } from "@/util/date";
+import { customToUpper, getCurrentDate } from "@/util/date";
 
 export default {
   components: { SearchQuery },
@@ -281,7 +281,7 @@ export default {
   },
   methods: {
     mblNoInput(value) {
-      this.formData.mblno = value.toUpperCase();
+      this.formData.mblno = customToUpper(value);
     },
     handleSubmit() {
       const isEmptyForm = Object.values(this.formData).every((value) => value === "" || value === null || value === undefined);

+ 158 - 31
src/views/iosBasicData/accounts/index.vue

@@ -2,10 +2,17 @@
   <div>
     <el-row>
       <el-col :span="5">
+        <div>
+          <el-scrollbar>
+            <basic-container>
+              <avue-tree ref="deptTree" :option="treeOptionDept" :data="treeDataDept" @node-click="nodeDeptClick" />
+            </basic-container>
+          </el-scrollbar>
+        </div>
         <div class="box">
           <el-scrollbar>
             <basic-container>
-              <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" />
+              <avue-tree v-if="showAccountsTree" ref="treeAccounts" :option="treeOption" :data="treeData" @node-click="nodeClick" />
             </basic-container>
           </el-scrollbar>
         </div>
@@ -13,6 +20,7 @@
       <el-col :span="19">
         <basic-container v-show="isShow">
           <!--      :page.sync="page"-->
+          <!--          @on-load="onLoad"-->
           <avue-crud
             :option="option"
             :table-loading="loading"
@@ -38,7 +46,6 @@
             @refresh-change="refreshChange"
             @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 323)"
             @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 323)"
-            @on-load="onLoad"
             @tree-load="treeLoad"
           >
             <template slot="menuLeft">
@@ -122,14 +129,14 @@
 
 <script>
 import {
-  accountsList,
   accountsDetail,
-  accountsSubmit,
+  accountsList,
+  accountsPost,
   accountsRemove,
+  accountsSubmit,
+  balanceCheck,
   getAccountsCode,
   getAccountsLazyTree,
-  balanceCheck,
-  accountsPost,
   getItemClassifyList,
 } from "@/api/iosBasicData/accounts";
 import { mapGetters } from "vuex";
@@ -147,6 +154,7 @@ export default {
       isShow: true,
       form: {},
       query: {
+        branchId: undefined,
         property: "0",
       },
       loading: true,
@@ -156,6 +164,25 @@ export default {
         total: 0,
       },
 
+      // 分公司
+      treeOptionDept: {
+        nodeKey: "id",
+        lazy: true,
+        treeLoad: function (node, resolve) {},
+        addBtn: false,
+        menu: false,
+        size: "small",
+        filter: false,
+        props: {
+          labelText: "标题",
+          label: "title",
+          value: "id",
+          children: "children",
+        },
+      },
+      treeDataDept: [],
+
+      showAccountsTree: false,
       treeAccProperty: undefined,
       treeAccCode: undefined,
       treeData: [],
@@ -163,21 +190,7 @@ export default {
         nodeKey: "id",
         lazy: true,
         iconClassField: "icon",
-        treeLoad: function (node, resolve) {
-          const parentId = node.level === 0 ? 0 : node.data.id;
-          getAccountsLazyTree(parentId).then((res) => {
-            resolve(
-              res.data.data.map((item) => {
-                let n = {
-                  ...item,
-                  leaf: !item.hasChildren,
-                  icon: "el-icon-document",
-                };
-                return n;
-              })
-            );
-          });
-        },
+        treeLoad: this.accountsTreeLoad,
         addBtn: false,
         menu: false,
         size: "small",
@@ -654,7 +667,22 @@ export default {
     this.option.column.forEach((col) => {
       this.setColumnFormat(col);
     });
-    this.propertyWorkDictsfun();
+    await this.propertyWorkDictsfun();
+
+    this.showAccountsTree = false
+    this.treeAccProperty = undefined
+    this.treeAccCode = undefined
+    this.treeData = []
+
+    this.$nextTick(() => {
+      if (this.query.branchId) {
+        this.$refs.deptTree.setCurrentKey(this.query.branchId);
+      }
+
+      this.showAccountsTree = true
+
+      this.onLoad(this.page, this.query);
+    });
   },
   methods: {
     formatAmt(row, value, d) {
@@ -675,7 +703,50 @@ export default {
         }
       }
     },
-    balanceCheck,
+    async accountsTreeLoad(node, resolve) {
+      if (!this.query.branchId) {
+        this.query.branchId = undefined;
+        // 只提第一级
+        await getDeptLazyTree(0).then((res) => {
+          res.data.data.forEach((item, index) => {
+            item.hasChildren = false;
+            item.leaf = true;
+
+            if (index === 0) {
+              this.query.branchId = item.value;
+            }
+          });
+          this.treeDataDept = res.data.data;
+        });
+      }
+
+      const parentId = node.level === 0 ? 0 : node.data.id;
+      await getAccountsLazyTree(parentId, this.query.branchId).then((res) => {
+        resolve(
+          res.data.data.map((item) => {
+            return {
+              ...item,
+              leaf: !item.hasChildren,
+              icon: "el-icon-document",
+            };
+          })
+        );
+      });
+    },
+    nodeDeptClick(node) {
+      this.query.branchId = node.value;
+
+      this.showAccountsTree = false
+      this.treeAccProperty = undefined
+      this.treeAccCode = undefined
+      this.treeData = []
+
+      this.$nextTick(() => {
+        this.showAccountsTree = true
+
+        this.onLoad(this.page, this.query);
+      })
+    },
     nodeClick(data) {
       this.treeAccCode = data.code;
       this.treeAccProperty = data.property;
@@ -688,23 +759,43 @@ export default {
       this.sopenblcVisible = false;
     },
     // 核算项目数据
-    propertyWorkDictsfun(cnName) {
-      getWorkDicts("account_propertys").then((res) => {
+    async propertyWorkDictsfun(cnName) {
+      await getWorkDicts("account_propertys").then((res) => {
         this.propertyData = res.data.data;
       });
 
       // itemClassifyList
-      getItemClassifyList().then((res) => {
+      await getItemClassifyList().then((res) => {
         this.itemClassifyList = res.data.data.records;
       });
+
+      if (!this.query.branchId) {
+        this.query.branchId = undefined;
+        // 只提第一级
+        await getDeptLazyTree(0).then((res) => {
+          res.data.data.forEach((item, index) => {
+            item.hasChildren = false;
+            item.leaf = true;
+
+            if (index === 0) {
+              this.query.branchId = item.value;
+            }
+          });
+          this.treeDataDept = res.data.data;
+        });
+      }
     },
     // 添加
     addAccountsfun() {
+      if(!this.query.branchId){
+        return this.$message.warning("请首先选择分公司!");
+      }
       if (this.selectionList.length > 1) {
         return this.$message.warning("只能选择一条数据");
       }
       let property = this.query.property ? this.query.property : this.propertyData[0].dictKey;
       this.form = {
+        branchId: this.query.branchId,
         property: property + "",
         isCorp: 0,
         isDept: 0,
@@ -726,12 +817,12 @@ export default {
         }
         this.$set(this.form, "property", this.selectionList[0].property + "");
         this.$set(this.form, "dc", this.selectionList[0].dc);
-        getAccountsCode({ code: this.selectionList[0].code }).then((res) => {
+        getAccountsCode({ code: this.selectionList[0].code, branchId: this.query.branchId }).then((res) => {
           this.$set(this.form, "code", res.data.data);
         });
       }
       if (this.selectionList.length == 0) {
-        getAccountsCode({ code: 0 }).then((res) => {
+        getAccountsCode({ code: 0, branchId: this.query.branchId }).then((res) => {
           this.$set(this.form, "code", res.data.data);
         });
       }
@@ -767,10 +858,23 @@ export default {
         });
         return;
       }
+      if(!this.form.branchId) {
+        if(!this.query.branchId){
+          return this.$message.warning("请首先选择分公司!");
+        }
+        this.form.branchId = this.query.branchId
+      }
       this.accountsSubmitfun();
     },
     // 保存
     accountsSubmitfun() {
+      if(!this.form.branchId) {
+        if(!this.query.branchId){
+          return this.$message.warning("请首先选择分公司!");
+        }
+        this.form.branchId = this.query.branchId
+      }
+
       accountsSubmit(this.form).then((res) => {
         this.$message.success("操作成功!");
         this.accountsVisible = false;
@@ -788,6 +892,12 @@ export default {
     },
     // 添加
     rowSave(row, done, loading) {
+      if(!row.branchId) {
+        if(!this.query.branchId){
+          return this.$message.warning("请首先选择分公司!");
+        }
+        row.branchId = this.query.branchId
+      }
       accountsSubmit(row).then(
         () => {
           this.onLoad(this.page);
@@ -805,6 +915,12 @@ export default {
     },
     // 编辑操作
     rowUpdate(row, index, done, loading) {
+      if(!row.branchId) {
+        if(!this.query.branchId){
+          return this.$message.warning("请首先选择分公司!");
+        }
+        row.branchId = this.query.branchId
+      }
       accountsSubmit(row).then(
         () => {
           this.onLoad(this.page);
@@ -851,7 +967,11 @@ export default {
     },
     // 添加子项
     addChildfun(row) {
+      if(!this.query.branchId){
+        return this.$message.warning("请首先选择分公司!");
+      }
       this.form = {
+        branchId: this.query.branchId,
         parentId: row.id,
         parentCode: row.code,
         parentCnName: row.cnName,
@@ -912,9 +1032,13 @@ export default {
     },
     // 平衡检查
     async handleBalanceCheck() {
+      if(!this.query.branchId){
+        return this.$message.warning("请首先选择分公司!");
+      }
+
       this.loading = true;
       try {
-        await balanceCheck().then((res) => {
+        await balanceCheck({branchId: this.query.branchId}).then((res) => {
           if (res.data.msg === "success") {
             this.$message.success("账户全部符合平衡检查!");
           } else {
@@ -930,9 +1054,13 @@ export default {
     },
     // 科目入账
     async handleAccountsPost() {
+      if(!this.query.branchId){
+        return this.$message.warning("请首先选择分公司!");
+      }
+
       this.loading = true;
       try {
-        await accountsPost().then((res) => {
+        await accountsPost({branchId: this.query.branchId}).then((res) => {
           let postedAccounts = Array.isArray(res.data.data) ? res.data.data : [];
           if (postedAccounts.length > 0) {
             this.$message.success(`本次入账 ${postedAccounts.length} 个科目!`);
@@ -990,7 +1118,6 @@ export default {
       this.onLoad(this.page, this.query);
     },
     onLoad(page, params = {}, tag) {
-      // console.log(this.treeAccProperty, this.treeAccCode, this.query.property, "v", this.treeAccProperty || this.treeAccProperty==0 ? this.treeAccProperty : this.query.property );
       this.loading = true;
       console.log(this.query);
       let qry = JSON.parse(JSON.stringify(Object.assign(params, this.query)));

+ 7 - 5
src/views/iosBasicData/baccitemstype/baccitems.vue

@@ -43,13 +43,13 @@
         </div>
 
         <div class="customer-main margintop">
-            <containerTitle title="科目列表信息"></containerTitle>
+            <containerTitle title="核算项目明细"></containerTitle>
             <basic-container>
                 <div style="margin-bottom: 10px">
                     <el-button type="primary"
                                size="small"
                                :disabled="detailData.seeDisabled"
-                               @click="accItemspingCompanyAdd">新增数据
+                               @click="accItemspingCompanyAdd">新增核算项目明细
                     </el-button>
                 </div>
                 <el-table
@@ -95,7 +95,7 @@
 
         <!--科目列表添加弹窗-->
         <el-dialog
-            title="科目列表"
+            title="核算项目明细列表"
             :visible.sync="accItemsVisible"
             width="50%"
             append-to-body
@@ -348,8 +348,10 @@ export default {
 
 }
 .customer-main {
-//margin-top: 20px;
-//width: calc(100% - 140px);
+/*
+margin-top: 20px;
+width: calc(100% - 140px);
+ */
     margin-bottom: 15px;
 }
 .margintop {

+ 89 - 7
src/views/iosBasicData/baccitemstype/index.vue

@@ -1,5 +1,16 @@
 <template>
   <div>
+    <el-row v-show="isShow">
+      <el-col :span="4">
+        <div>
+          <el-scrollbar>
+            <basic-container>
+              <avue-tree ref="deptTree" :option="treeOptionDept" :data="treeDataDept" @node-click="nodeDeptClick" />
+            </basic-container>
+          </el-scrollbar>
+        </div>
+      </el-col>
+      <el-col :span="20">
     <basic-container v-show="isShow">
       <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
         id="out-table" :header-cell-class-name="headerClassName" :before-open="beforeOpen" :search.sync="search"
@@ -8,6 +19,7 @@
         @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange"
         @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 300)"
         @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 300)" @on-load="onLoad">
+        <!--
         <template slot="code" slot-scope="scope">
           <avue-text-ellipsis :text="scope.row.code" :height="30" use-tooltip placement="top">
             <small slot="more">...</small>
@@ -28,6 +40,7 @@
             <small slot="more">...</small>
           </avue-text-ellipsis>
         </template>
+        -->
         <template slot="menuLeft">
           <el-button type="primary" size="small" icon="el-icon-plus" @click="addbtnfun()">新增核算项目
           </el-button>
@@ -56,6 +69,8 @@
 
       </avue-crud>
     </basic-container>
+      </el-col>
+    </el-row>
 
     <bacc-items ref="baccitems" v-if="!isShow" :detailData="detailData" @goBack="goBack"></bacc-items>
 
@@ -83,6 +98,7 @@ import { mapGetters } from "vuex";
 import baccItems from "@/views/iosBasicData/baccitemstype/baccitems.vue";
 
 import { getToken } from "@/util/auth";
+import { getDeptLazyTree } from "@/api/system/dept";
 
 export default {
   components: { baccItems },
@@ -93,6 +109,7 @@ export default {
       isShow: true, // 详情和列表切换
 
       form: {},
+      branchId: "",
       query: {},
       loading: true,
       excelBox: false,
@@ -130,6 +147,26 @@ export default {
         total: 0,
           pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
       },
+
+      // 分公司
+      treeOptionDept: {
+        nodeKey: "id",
+        lazy: true,
+        treeLoad: function (node, resolve) {
+        },
+        addBtn: false,
+        menu: false,
+        size: "small",
+        filter: false,
+        props: {
+          labelText: "标题",
+          label: "title",
+          value: "id",
+          children: "children",
+        },
+      },
+      treeDataDept: [],
+
       selectionList: [],
       option: {},
       optionBack: {
@@ -147,7 +184,7 @@ export default {
           {
             label: "编码",
             prop: "code",
-            width: "180",
+            width: 180,
             search: true,
             rules: [{
               required: true,
@@ -158,7 +195,7 @@ export default {
           {
             label: "中文名称",
             prop: "cnName",
-            width: "180",
+            width: 180,
             search: true,
             rules: [{
               required: true,
@@ -169,7 +206,7 @@ export default {
           {
             label: "英文名称",
             prop: "enName",
-            width: "180",
+            width: 180,
             search: true,
             rules: [{
               required: true,
@@ -181,12 +218,14 @@ export default {
             label: "版本",
             prop: "version",
             hide: true,
+            width: 60,
             display: false,
           },
           {
             label: "状态",
             prop: "status",
             type: 'select',
+            width: 60,
             dicData: [{
               label: '启用',
               value: 0
@@ -203,28 +242,31 @@ export default {
           {
             label: "创建人",
             prop: "createUserName",
+            width: 100,
             display: false,
           },
           {
             label: "创建部门",
             prop: "createDeptName",
+            width: 100,
             display: false,
           },
           {
             label: "创建时间",
             prop: "createTime",
-            width: "160",
+            width: 160,
             display: false,
           },
           {
             label: "修改人",
             prop: "updateUserName",
+            width: 100,
             display: false,
           },
           {
             label: "修改时间",
             prop: "updateTime",
-            width: "160",
+            width: 160,
             display: false,
           },
           {
@@ -238,7 +280,7 @@ export default {
             prop: "remarks",
             span: 24,
             type: 'textarea',
-            width: "180",
+            width: 180,
             slot: true,
             minRows: 3,
           },
@@ -267,8 +309,37 @@ export default {
   },
   async created() {
     this.option = await this.getColumnData(this.getColumnName(300), this.optionBack);
+
+    this.branchId = undefined
+    this.query.branchId = undefined;
+
+    // 只提第一级
+    await getDeptLazyTree(0).then((res) => {
+      res.data.data.forEach((item, index) => {
+        item.hasChildren = false;
+        item.leaf = true
+
+        if(index === 0){
+          this.query.branchId = item.value;
+        }
+      });
+      this.treeDataDept = res.data.data;
+    });
+
+    this.$nextTick(() => {
+      if(this.query.branchId){
+        this.$refs.deptTree.setCurrentKey(this.query.branchId);
+      }
+
+      this.onLoad(this.page, this.query)
+    })
   },
   methods: {
+    nodeDeptClick(node) {
+      this.branchId = node.value;
+      this.query.branchId = node.value;
+      this.onLoad(this.page, this.query);
+    },
       // 禁用启用按钮
       statusfun(id,status){
           this.$confirm("确定将选择数据更改状态?", {
@@ -349,10 +420,18 @@ export default {
     },
     // 添加弹窗开启
     addbtnfun() {
+      if(!this.query.branchId){
+        return this.$message.warning("请首先选择分公司!");
+      }
+
       this.detailData = {
+        branchId: this.branchId,
         seeDisabled: false,
       };
       this.isShow = false
+      this.$nextTick(() => {
+        this.$refs.baccitems.form.branchId = this.query.branchId;
+      })
     },
     // 编辑详情打开
     rowCellfun(row, index) {
@@ -454,11 +533,14 @@ export default {
       done();
     },
     searchReset() {
-      this.query = {};
+      this.query = {
+        branchId: this.branchId
+      };
       this.onLoad(this.page);
     },
     searchChange(params, done) {
       this.query = params;
+      this.query.branchId = this.branchId;
       this.page.currentPage = 1;
       this.onLoad(this.page, params);
       done();

Разница между файлами не показана из-за своего большого размера
+ 388 - 254
src/views/iosBasicData/bcorps/index.vue


+ 5 - 0
src/views/iosBasicData/bports/index.vue

@@ -334,6 +334,11 @@ export default {
                 prop: "SML",
                 overHidden: true,
             },
+          {
+            label: "HLAG",
+            prop: "HLAG",
+            overHidden: true,
+          },
             {
             label: "版本",
             prop: "version",

+ 25 - 2
src/views/iosBasicData/bports/portsTerms.vue

@@ -161,6 +161,7 @@ import bserviceterms from "@/views/iosBasicData/bserviceterms/index.vue";
 import { getBcorpsList } from "@/api/iosBasicData/bcorps";
 import { getBservicetermsList } from "@/api/iosBasicData/bserviceterms";
 import {getDefaultExtendedDataNames} from "@/util/configration";
+import { bcountrysListAll } from "@/api/iosBasicData/bcountrys";
 export default {
     components: { bcorps, SearchQuery, bserviceterms },
     props: {
@@ -191,6 +192,8 @@ export default {
                 extendedDataArr: [],
                 bportsTermsList: [],
             },
+          countryCodeData:[],
+          countryNameData:[],
             // 基础资料数据
             basicData: {
                 column: [
@@ -228,10 +231,14 @@ export default {
                     {
                         label: "国家代码",
                         prop: "cntyCode",
+                        // type: "select",
+                        // dicData: this.countryCodeData,
                     },
                     {
                         label: "国家名称",
                         prop: "cntyName",
+                        // type: "select",
+                        // dicData: this.countryNameData,
                     },
                     {
                         label: "是否海港",
@@ -349,10 +356,25 @@ export default {
         })
         this.$set(this.form, "extendedDataArr", ed);
 
+        this.getCountrysLists();
+
         this.getBcorpsListfun()
         this.getBservicetermsListfun()
     },
     methods: {
+        // bcountrysListAll
+        getCountrysLists() {
+          bcountrysListAll().then(res => {
+            let list1 = [], list2 = []
+            res.data.data.records.forEach(record => {
+              list1.push({value: record.code, label: record.code, code: record.code, name: record.enName});
+              list2.push({value: record.enName, label: record.enName, code: record.code, name: record.enName});
+            })
+
+            this.countryCodeData = list1
+            this.countryNameData = list2
+          })
+        },
         // 获取客户(船公司)数据
         getBcorpsListfun(cnName) {
             getBcorpsList(1, 10, { cnName }).then(res => {
@@ -537,8 +559,9 @@ export default {
 }
 
 .customer-main {
-    //margin-top: 20px;
-    //width: calc(100% - 140px);
+    /*margin-top: 20px;
+    width: calc(100% - 140px);
+     */
     margin-bottom: 15px;
 }
 

+ 74 - 4
src/views/iosBasicData/editypes/index.vue

@@ -1,5 +1,17 @@
 <template>
   <div>
+    <el-row>
+      <el-col :span="3">
+        <div class="box">
+          <el-scrollbar>
+            <basic-container>
+              <avue-tree ref="deptTree" :option="treeOptionDept" :data="treeDataDept" @node-click="nodeDeptClick"
+                         style="height: 80vh;" />
+            </basic-container>
+          </el-scrollbar>
+        </div>
+      </el-col>
+      <el-col :span="21">
     <basic-container>
       <avue-crud
         :option="option"
@@ -23,8 +35,8 @@
         @refresh-change="refreshChange"
         @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 325)"
         @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 325)"
-        @on-load="onLoad"
       >
+<!--        @on-load="onLoad"-->
         <template slot="menuLeft">
           <el-button type="success" size="small" icon="el-icon-plus" plain @click="addfun">新建 </el-button>
           <el-button type="danger" size="small" icon="el-icon-delete" plain @click="handleDelete">删除 </el-button>
@@ -131,6 +143,8 @@
         </template>
       </avue-crud>
     </basic-container>
+      </el-col>
+    </el-row>
     <el-dialog
       title="配置发送数据"
       :visible.sync="ressVisible"
@@ -181,6 +195,7 @@ import { getBcorpslistByType } from "@/api/iosBasicData/bcorps";
 import { getList as getRoleList } from "@/api/system/role";
 import { bbusinesstypeList } from "@/api/iosBasicData/bbusinesstype";
 import dicSelect from "@/components/dicSelect/main";
+import { getDeptLazyTree } from "@/api/system/dept";
 export default {
   components: { SearchQuery, dicSelect },
   props: {},
@@ -189,6 +204,7 @@ export default {
       form: {
         userlist: [],
       },
+      branchId: "",
       query: {},
       loading: true,
       page: {
@@ -196,6 +212,26 @@ export default {
         currentPage: 1,
         total: 0,
       },
+
+      // 分公司
+      treeOptionDept: {
+        nodeKey: "id",
+        lazy: true,
+        treeLoad: function (node, resolve) {
+        },
+        addBtn: false,
+        menu: false,
+        size: "small",
+        filter: false,
+        props: {
+          labelText: "标题",
+          label: "title",
+          value: "id",
+          children: "children",
+        },
+      },
+      treeDataDept: [],
+
       selectionList: [],
       option: {},
       optionBack: {
@@ -356,7 +392,7 @@ export default {
             prop: "status",
             type: "select",
             width: 60,
-            search: true,
+            // search: true,
             dicData: [
               {
                 label: "启用",
@@ -536,10 +572,39 @@ export default {
   },
   async created() {
     this.option = await this.getColumnData(this.getColumnName(325), this.optionBack);
-    this.getRoleListfun();
+    // this.getRoleListfun();
     this.bbusinesstypeListfun(); // 业务类型
+
+    this.branchId = undefined
+    this.query.branchId = undefined;
+
+    // 只提第一级
+    await getDeptLazyTree(0).then((res) => {
+      res.data.data.forEach((item, index) => {
+        item.hasChildren = false;
+        item.leaf = true
+
+        if(index === 0){
+          this.query.branchId = item.value;
+        }
+      });
+      this.treeDataDept = res.data.data;
+    });
+
+    this.$nextTick(() => {
+      if(this.query.branchId){
+        this.$refs.deptTree.setCurrentKey(this.query.branchId);
+      }
+
+      this.onLoad(this.page, this.query)
+    })
   },
   methods: {
+    nodeDeptClick(node) {
+      this.branchId = node.value;
+      this.query.branchId = node.value;
+      this.onLoad(this.page, this.query);
+    },
     // 获取业务类型接口
     bbusinesstypeListfun() {
       // 获取业务类型
@@ -718,15 +783,20 @@ export default {
           this.form.teamlist = JSON.parse(this.form.teamlist);
           this.form.excludelist = JSON.parse(this.form.excludelist);
         });
+      }else{
+        this.form.branchId = this.branchId
       }
       done();
     },
     searchReset() {
-      this.query = {};
+      this.query = {
+        branchId: this.branchId
+      };
       this.onLoad(this.page);
     },
     searchChange(params, done) {
       this.query = params;
+      this.query.branchId = this.branchId;
       this.page.currentPage = 1;
       this.onLoad(this.page, params);
       done();

+ 32 - 2
src/views/iosBasicData/humanResources/employees/index.vue

@@ -13,12 +13,13 @@
                     </div>
                 </el-col>
                 <el-col :span="19">
+<!--                  @on-load="onLoad"-->
                     <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page"
                         :search.sync="query" v-model="form" id="out-table" :header-cell-class-name="headerClassName"
                         ref="crud" @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
                         @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
                         @refresh-change="refreshChange" @resetColumn="resetColumn('crud', 'option', 'optionBack', 441)"
-                        @saveColumn="saveColumn('crud', 'option', 'optionBack', 441)" @on-load="onLoad">
+                        @saveColumn="saveColumn('crud', 'option', 'optionBack', 441)" >
                         <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"
@@ -53,6 +54,8 @@ export default {
             isShow: true,
             form: {},
             query: {},
+            query_accountingDepartmentId: undefined,
+            query_administrativeDepartmentName: undefined,
             loading: false,
             page: {
                 pageSize: 10,
@@ -64,7 +67,8 @@ export default {
             treeOption: {
                 nodeKey: 'id',
                 lazy: true,
-                treeLoad: function (node, resolve) {
+                treeLoad: this.onTreeLoad,
+                treeLoad_bak: function (node, resolve) {
                     const parentId = (node.level === 0) ? 0 : node.data.id;
                     getDeptLazyTree(parentId).then(res => {
                         resolve(res.data.data.map(item => {
@@ -270,6 +274,27 @@ export default {
         }, 100);
     },
     methods: {
+        onTreeLoad(node, resolve) {
+          const parentId = (node.level === 0) ? 0 : node.data.id;
+          getDeptLazyTree(parentId).then(res => {
+            resolve(res.data.data.map(item => {
+              return {
+                ...item,
+                leaf: !item.hasChildren
+              }
+            }))
+
+            if(res.data.data.length > 0) {
+              if(!this.query_accountingDepartmentId){
+                this.query_accountingDepartmentId=res.data.data[0].id
+                this.query_administrativeDepartmentName=res.data.data[0].title
+                this.query.accountingDepartmentId=res.data.data[0].id
+                this.query.administrativeDepartmentName=res.data.data[0].title
+                this.onLoad(this.page)
+              }
+            }
+          });
+        },
         outExport() {
             this.$confirm('是否导出当前所有数据?', '提示', {
                 confirmButtonText: '确定',
@@ -292,6 +317,9 @@ export default {
             })
         },
         nodeClick(data) {
+            this.query_accountingDepartmentId = data.id;
+            this.query_administrativeDepartmentName = data.title;
+            this.query.accountingDepartmentId = data.id;
             this.query.administrativeDepartmentName = data.title;
             this.page.currentPage = 1;
             this.onLoad(this.page, this.query);
@@ -324,6 +352,8 @@ export default {
         },
         searchReset() {
             this.query = this.$options.data().query;
+            this.query.accountingDepartmentId = this.query_accountingDepartmentId;
+            this.query.administrativeDepartmentName = this.query_administrativeDepartmentName;
             this.onLoad(this.page);
         },
         // 搜索按钮点击

+ 89 - 28
src/views/iosBasicData/psBcorps/index.vue

@@ -1,7 +1,16 @@
 <template>
   <div>
     <el-row v-show="isShow">
-      <!-- <el-col :span="5">
+      <el-col :span="4">
+        <div>
+          <el-scrollbar>
+            <basic-container>
+              <avue-tree ref="deptTree" :option="treeOptionDept" :data="treeDataDept" @node-click="nodeDeptClick" />
+            </basic-container>
+          </el-scrollbar>
+        </div>
+      </el-col>
+      <!-- <el-col :span="4">
         <div class="box">
           <el-scrollbar>
             <basic-container>
@@ -17,7 +26,7 @@
           </el-scrollbar>
         </div>
       </el-col> -->
-      <el-col :span="24">
+      <el-col :span="20">
         <basic-container class="page-crad">
           <!-- :on-change="handleChange" -->
           <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
@@ -25,8 +34,9 @@
             v-model="form" 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', 304)"
-            @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 304)" @on-load="onLoad">
+            @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 304.2)"
+            @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 304.2)" >
+<!--            @on-load="onLoad"-->
             <template slot="cnName" slot-scope="scope">
                 <div v-if="permission.edit" style="color: #1e9fff;cursor: pointer;" @click.stop="editOpen(scope.row)">
                     {{scope.row.cnName}}
@@ -110,6 +120,7 @@ import bcorpstypedefine from "@/views/iosBasicData/bcorps/bcorpstypedefine.vue"
 import reportContainer from "@/views/iosBasicData/report-container/report-container.vue"
 import {getWorkDicts} from "@/api/system/dictbiz";
 import {bcountrysList} from "@/api/iosBasicData/bcountrys";
+import { getDeptLazyTree } from "@/api/system/dept";
 
 export default {
   components: {
@@ -165,6 +176,24 @@ export default {
           }
         ]
       },
+      // 分公司
+      treeOptionDept: {
+        nodeKey: "id",
+        lazy: true,
+        treeLoad: function (node, resolve) {
+        },
+        addBtn: false,
+        menu: false,
+        size: "small",
+        filter: false,
+        props: {
+          labelText: "标题",
+          label: "title",
+          value: "id",
+          children: "children",
+        },
+      },
+      treeDataDept: [],
       // 客户类别数据
       customTypeData: [],
       excelBox: false,
@@ -174,7 +203,7 @@ export default {
       },
       detailData: {},
       isShow: true,
-      loading: true,
+      loading: false,
       page: {
         pageSize: 20,
         currentPage: 1,
@@ -197,12 +226,12 @@ export default {
         selection: true,
         addBtnText: '新建 PS 客户',
         dialogClickModal: false,
-          menuWidth: 220,
+        menuWidth: 220,
         column: [
           {
             label: "编码",
             prop: "code",
-            width: "180",
+            width: 180,
             search: true,
             rules: [{
               required: true,
@@ -214,7 +243,7 @@ export default {
           {
             label: "中文名称",
             prop: "cnName",
-            width: "180",
+            width: 180,
             search: true,
             rules: [{
               required: true,
@@ -226,7 +255,7 @@ export default {
           {
             label: "英文名称",
             prop: "enName",
-            width: "180",
+            width: 180,
             search: true,
             rules: [{
               required: true,
@@ -258,7 +287,7 @@ export default {
           {
             label: "简称",
             prop: "shortName",
-            width: "180",
+            width: 180,
             rules: [{
               required: true,
               message: "请输入简称",
@@ -295,7 +324,7 @@ export default {
           {
             label: "中文地址",
             prop: "cnAddr",
-            width: "200",
+            width: 200,
             search: true,
             rules: [{
               required: false,
@@ -307,7 +336,7 @@ export default {
           {
             label: "英文地址",
             prop: "enAddr",
-            width: "200",
+            width: 200,
             search: true,
             rules: [{
               required: false,
@@ -319,7 +348,7 @@ export default {
           {
             label: "电话",
             prop: "tel",
-            width: "120",
+            width: 120,
             search: true,
             rules: [{
               required: true,
@@ -364,7 +393,7 @@ export default {
           {
             label: "客户类型",
             prop: "corpTypeName",
-            width: "140",
+            width: 140,
             rules: [{
               required: true,
               message: "请输入客户类型",
@@ -375,7 +404,7 @@ export default {
           {
             label: "分管员",
             prop: "adminProfilesName",
-            width: "100",
+            width: 100,
             rules: [{
               required: true,
               message: "请输入分管员",
@@ -387,6 +416,7 @@ export default {
             label: "状态",
             prop: "status",
             type: 'select',
+            width: 60,
             search: true,
             dicData: [{
               label: '启用',
@@ -407,7 +437,7 @@ export default {
             prop: "remarks",
             span: 24,
             type: 'textarea',
-            width: "180",
+            width: 180,
             slot: true,
             minRows: 3,
               overHidden:true,
@@ -469,7 +499,7 @@ export default {
     this.permission.edit = this.roleName.indexOf('PS 客户修改')>=0
     this.permission.delete = this.roleName.indexOf('PS 客户删除')>=0
 
-    this.option = await this.getColumnData(this.getColumnName(304), this.optionBack);
+    this.option = await this.getColumnData(this.getColumnName(304.2), this.optionBack);
     // 这个是从海运出口跳进来的
     if (this.$route.query.corpType) {
         this.isShow = false
@@ -487,9 +517,17 @@ export default {
 
     }
     this.$store.commit("DOMIO_IN_CUL");
-    this.bcountrysListfun() // 获取国家数据
-    this.bcorpstypedefineListfun() // 获取客户类别
-    this.ifInvoiceGetWorkDictsfun() // 字典状态
+    await this.bcountrysListfun() // 获取国家数据
+    await this.bcorpstypedefineListfun() // 获取客户类别
+    await this.ifInvoiceGetWorkDictsfun() // 字典状态
+
+    this.onLoad(this.page, this.query);
+
+    this.$nextTick(() => {
+      if(this.query.branchId){
+        this.$refs.deptTree.setCurrentKey(this.query.branchId);
+      }
+    })
   },
   activated(){
       this.$store.commit("DOMIO_OUT_CUL");
@@ -506,14 +544,14 @@ export default {
           })
       },
       // 获取国家数据
-      bcountrysListfun(){
-          bcountrysList(1,10).then(res=>{
+      async bcountrysListfun(){
+          await bcountrysList(1,10).then(res=>{
               this.findObject(this.option.column, "cntyName").dicData = res.data.data.records
           })
       },
       // 获取状态字典数据
-      ifInvoiceGetWorkDictsfun(){
-          getWorkDicts('ifInvoice').then(res=>{
+      async ifInvoiceGetWorkDictsfun(){
+          await getWorkDicts('ifInvoice').then(res=>{
               this.ifInvoiceData = res.data.data
           })
       },
@@ -605,6 +643,10 @@ export default {
       var data = err.match(/{(\S*)}/)[1]
       this.$message.error(data.split("msg\":")[1]);
     },
+    nodeDeptClick(node) {
+      this.query.branchId = node.value;
+      this.onLoad(this.page, this.query);
+    },
     // 左侧点击回调
     nodeClick(data) {
       // var reqiestData = this.search;
@@ -619,8 +661,22 @@ export default {
       // this.onLoad(this.page, reqiestData);
     },
     // 获取客户类别
-    bcorpstypedefineListfun() {
-      bcorpstypedefineList(1,30,{type: 1, cnName:'PS客户'}).then(res => {
+    async bcorpstypedefineListfun() {
+      this.query.branchId = undefined;
+      // 只提第一级
+      await getDeptLazyTree(0).then((res) => {
+        res.data.data.forEach((item, index) => {
+          item.hasChildren = false;
+          item.leaf = true
+
+          if(index === 0){
+            this.query.branchId = item.value;
+          }
+        });
+        this.treeDataDept = res.data.data;
+      });
+
+      await bcorpstypedefineList(1,30,{type: 1, cnName:'PS客户'}).then(res => {
         this.customTypeData = res.data.data.records
       })
     },
@@ -705,10 +761,13 @@ export default {
     },
     beforeOpen(done, type) {
       this.detailData = {};
+      if (this.query.branchId != null) {
+        this.detailData.branchId = this.query.branchId;
+      }
       if (this.query.corpType != null) {
         this.detailData.corpType = this.query.corpType
       }
-      console.log("beforeOpen", this.detailData)
+      console.log("pscorp.beforeOpen", this.detailData)
       this.isShow = false;
       // if (["edit", "view"].includes(type)) {
       //   getBcorpsDetail(this.form.id).then(res => {
@@ -718,7 +777,9 @@ export default {
       // done();
     },
     searchReset() {
-      this.query = {};
+      this.query = {
+        branchId: this.query.branchId
+      };
       this.onLoad(this.page);
     },
     searchChange(params, done) {

+ 2 - 2
src/views/system/post.vue

@@ -1,6 +1,6 @@
 <template>
   <el-row>
-    <el-col :span="5">
+    <el-col :span="4">
       <div class="box">
         <el-scrollbar>
           <basic-container>
@@ -9,7 +9,7 @@
         </el-scrollbar>
       </div>
     </el-col>
-    <el-col :span="19">
+    <el-col :span="20">
       <basic-container>
         <avue-crud
           :option="option"

Некоторые файлы не были показаны из-за большого количества измененных файлов