Browse Source

修改达沃特 贸易代理

Qukatie 6 months ago
parent
commit
b43e1ef27a

+ 1 - 1
src/components/tradeAgency/fee-oceanFreight.vue

@@ -170,7 +170,7 @@
             :row-style="{ height: '16px' }" :cell-style="{ padding: '0px' }" :option="sumOption"
             :data="sumData"></avue-crud>
         <!--有admin 显示,有收和付各一个也显示出来-->
-        <div v-if="roleName.indexOf('admin') != -1 || ((roleName.indexOf('应收修改') != -1 || roleName.indexOf('应收查看') != -1) && (roleName.indexOf('应付修改') != -1 || roleName.indexOf('应付查看') != -1))"
+        <div v-if="roleName.indexOf('admin') != -1 ||roleName.indexOf('利润查看') != -1 || ((roleName.indexOf('应收修改') != -1 || roleName.indexOf('应收查看') != -1) && (roleName.indexOf('应付修改') != -1 || roleName.indexOf('应付查看') != -1))"
             style="display: flex;align-items: center;justify-content: space-around">
             <div style="width: 30%">
                 <div class="bottomFlex" style="justify-content: space-around">

+ 16 - 5
src/util/date.js

@@ -1,3 +1,5 @@
+import { conforms } from "lodash";
+
 export const calcDate = (date1, date2) => {
   let date3 = date2 - date1;
 
@@ -229,7 +231,7 @@ function addZero(num) {
 }
 //验证英文
 export function verifyEnglish(str) {
-  const regex = /^[A-Za-z0-9\n .,!?:()|/+-_;'"$&@%*#,。!?:()——]+$/;
+  const regex = /^[A-Za-z0-9\n .,!?:()|/+-_;'"$&@%*#]+$/;
   return regex.test(str ? str : null);
 }
 //验证符号
@@ -240,19 +242,28 @@ export function verifySymbol(str) {
 // 匹配常见全角符号的正则表达式(包括标点、字母、数字等)
 export function checkFullWidthSymbols(text) {
   const fullWidthRegex = /[\u3000-\u303F\uFF01-\uFF5E\uFFE0-\uFFE5]/g;
-  const matches = [];
+  const matchesItem = [];
+  // const matches = [];
   let lines = text.split('\n')
   let match;
-
-  lines.forEach((ln, index) => {
+  lines.forEach((ln, index, array) => {
     while ((match = fullWidthRegex.exec(ln)) !== null) {
-      matches.push({
+      matchesItem.push({
         row: index + 1,         // 行号
         index: match.index,     // 符号的位置
         symbol: match[0]        // 符号本身
       });
     }
   })
+  let matches = matchesItem.reduce((acc, item) => {
+    const existingItem = acc.find(i => i.row === item.row);
+    if (existingItem) {
+      existingItem.symbol += ` ${item.symbol}`; // 合并值
+    } else {
+      acc.push({ ...item }); // 添加新项
+    }
+    return acc;
+  }, []);
   return {
     hasFullWidth: matches.length > 0, // 是否包含全角符号
     positions: matches                // 符号的详细位置和内容

+ 1 - 0
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -2613,6 +2613,7 @@ export default {
         if (this.DLListSave[item].code == e.code) {
           console.log(this.DLListSave[item].code, e.code, e.salesPrice)
           this.$set(this.DLListSave[item], 'price', e.salesPrice);
+          this.$set(this.DLListSave[item], 'realSpecialOffer', e.realSpecialOffer)
         }
       })
     },

+ 2 - 2
src/views/exportTrade/customerInquiry/components/goodsInfo.vue

@@ -114,8 +114,8 @@
                         </el-option>
                     </el-select> -->
                     <dic-select v-model="goodsForm.cname" placeholder="产品名称" key="id" label="cname" res="records"
-                        :url="'/blade-mocha-item/pricebank/pageListAllV1?billType=CG&statusTime=' + statusTime"
-                        :filterable="true" :remote="true" dataName="cname"
+                        :url="'/blade-mocha-item/pricebank/pageListAllV1?current=1&size=30&billType=CG&statusTime=' + statusTime"
+                        :filterable="true" :remote="true" dataName="cname" style="width: 100%;"
                         @selectChange="cnameChange('cname', $event)"></dic-select>
                     <el-button icon="el-icon-search" size="small" @click="pickGoods"></el-button>
                 </span>

+ 3 - 3
src/views/exportTrade/customerInquiry/config/customerContact.json

@@ -22,7 +22,7 @@
             "prop": "cname",
             "index": 1,
             "width": 200,
-            "span": 8,
+            "span": 12,
             "overHidden": true
         },
         {
@@ -30,7 +30,7 @@
             "prop": "code",
             "index": 2,
             "width": 100,
-            "span": 8,
+            "span": 6,
             "disabled": true,
             "overHidden": true
         },
@@ -39,7 +39,7 @@
             "prop": "priceCategory",
             "index": 3,
             "width": 100,
-            "span": 8,
+            "span": 6,
             "disabled": true,
             "overHidden": true
         },

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

@@ -109,8 +109,8 @@
             <el-option v-for="item in goodsoptions" :key="item.itemId" :label="item.cname" :value="item.itemId">
             </el-option>
           </el-select> -->
-          <dic-select v-model="goodsForm.cname" placeholder="产品名称" key="id" label="cname" res="records"
-            :url="'/blade-mocha-item/pricebank/pageListAllV1?billType=CG&statusTime='+statusTime" :filterable="true" :remote="true" dataName="cname"
+          <dic-select v-model="goodsForm.cname" placeholder="产品名称" key="id" label="cname" res="records"  style="width: 100%;"
+            :url="'/blade-mocha-item/pricebank/pageListAllV1?current=1&size=30&billType=CG&statusTime='+statusTime" :filterable="true" :remote="true" dataName="cname"
             @selectChange="cnameChange('cname', $event)"></dic-select>
           <el-button icon="el-icon-search" size="small" @click="pickGoods"></el-button>
         </span>

+ 3 - 3
src/views/exportTrade/salesContract/config/customerContact.json

@@ -22,7 +22,7 @@
       "prop": "cname",
       "index": 1,
       "width": 200,
-      "span": 8,
+      "span": 12,
       "overHidden": true
     },
     {
@@ -30,7 +30,7 @@
       "prop": "code",
       "index": 2,
       "width": 100,
-      "span": 8,
+      "span": 6,
       "disabled": true,
       "overHidden": true
     },
@@ -39,7 +39,7 @@
       "prop": "priceCategory",
       "index": 3,
       "width": 100,
-      "span": 8,
+      "span": 6,
       "disabled": true,
       "overHidden": true
     },

+ 1 - 1
src/views/iosBasicData/SeafreightExportF/bills/assembly/feecenter.vue

@@ -317,7 +317,7 @@
             :row-style="{ height: '16px' }" :cell-style="{ padding: '0px' }" :option="sumOption"
             :data="sumData"></avue-crud>
         <!--有admin 显示,有收和付各一个也显示出来-->
-        <div v-if="roleName.indexOf('admin') != -1 || ((roleName.indexOf('应收修改') != -1 || roleName.indexOf('应收查看') != -1) && (roleName.indexOf('应付修改') != -1 || roleName.indexOf('应付查看') != -1))"
+        <div v-if="roleName.indexOf('admin') != -1 ||roleName.indexOf('利润查看') != -1|| ((roleName.indexOf('应收修改') != -1 || roleName.indexOf('应收查看') != -1) && (roleName.indexOf('应付修改') != -1 || roleName.indexOf('应付查看') != -1))"
             style="display: flex;align-items: center;justify-content: space-around">
             <div style="width: 30%">
                 <div class="bottomFlex" style="justify-content: space-around">

+ 72 - 24
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -992,8 +992,78 @@ export default {
         editypesSendingEdifun(row) {
             row.billId = this.form.id
             let msgsList = []
-            //     console.log( checkFullWidthSymbols(this.form.detail.hshipperDetails))
-            //    return
+            if (checkFullWidthSymbols(this.form.detail.hshipperDetails).hasFullWidth) {
+                let msg = []
+                for (let item of checkFullWidthSymbols(this.form.detail.hshipperDetails).positions) {
+                    msg.push(`第${item.row}行的"${item.symbol}"`)
+                }
+                this.$message({
+                    dangerouslyUseHTMLString: true,
+                    message: `发货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
+                    type: 'error'
+                });
+                return
+            }
+            if (checkFullWidthSymbols(this.form.detail.hconsigneeDetails).hasFullWidth) {
+                let msg = []
+                for (let item of checkFullWidthSymbols(this.form.detail.hconsigneeDetails).positions) {
+                    msg.push(`第${item.row}行的"${item.symbol}"`)
+                }
+                this.$message({
+                    dangerouslyUseHTMLString: true,
+                    message: `收货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
+                    type: 'error'
+                });
+                return
+            }
+            if (checkFullWidthSymbols(this.form.detail.hnotifyDetails).hasFullWidth) {
+                let msg = []
+                for (let item of checkFullWidthSymbols(this.form.detail.hnotifyDetails).positions) {
+                    msg.push(`第${item.row}行的"${item.symbol}"`)
+                }
+                this.$message({
+                    dangerouslyUseHTMLString: true,
+                    message: `通知人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
+                    type: 'error'
+                });
+                return
+            }
+            if (checkFullWidthSymbols(this.form.marks).hasFullWidth) {
+                let msg = []
+                for (let item of checkFullWidthSymbols(this.form.marks).positions) {
+                    msg.push(`第${item.row}行的"${item.symbol}"`)
+                }
+                this.$message({
+                    dangerouslyUseHTMLString: true,
+                    message: `唛头:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
+                    type: 'error'
+                });
+                return
+            }
+            if (checkFullWidthSymbols(this.form.commodityDescr).hasFullWidth) {
+                let msg = []
+                for (let item of checkFullWidthSymbols(this.form.commodityDescr).positions) {
+                    msg.push(`第${item.row}行的"${item.symbol}"`)
+                }
+                this.$message({
+                    dangerouslyUseHTMLString: true,
+                    message: `货描:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
+                    type: 'error'
+                });
+                return
+            }
+            if (checkFullWidthSymbols(this.form.forwarding).hasFullWidth) {
+                let msg = []
+                for (let item of checkFullWidthSymbols(this.form.forwarding).positions) {
+                    msg.push(`第${item.row}行的"${item.symbol}"`)
+                }
+                this.$message({
+                    dangerouslyUseHTMLString: true,
+                    message: `FORWARDING:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
+                    type: 'error'
+                });
+                return
+            }
             if (!verifyEnglish(this.form.detail.hshipperDetails)) {
                 msgsList.push('发货人')
             }
@@ -1016,28 +1086,6 @@ export default {
                 this.$message.error(`请正确输入${msgsList.join(",")}的英文`);
                 return;
             }
-            if (!verifySymbol(this.form.detail.hshipperDetails)) {
-                msgsList.push('发货人')
-            }
-            if (!verifySymbol(this.form.detail.hconsigneeDetails)) {
-                msgsList.push('收货人')
-            }
-            if (!verifySymbol(this.form.detail.hnotifyDetails)) {
-                msgsList.push('通知人')
-            }
-            if (!verifySymbol(this.form.marks)) {
-                msgsList.push('唛头')
-            }
-            if (!verifySymbol(this.form.commodityDescr)) {
-                msgsList.push('货描')
-            }
-            if (!verifySymbol(this.form.forwarding)) {
-                msgsList.push('FORWARDING')
-            }
-            if (msgsList.length > 0) {
-                this.$message.error(`请正确输入${msgsList.join(",")}的英文符号`);
-                return;
-            }
             this.saveLoading = true
             editypesSendingEdi(row).then(res => {
                 this.saveLoading = false

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

@@ -1,6 +1,6 @@
 <template>
     <div>
-        <basic-container v-if="isShow">
+        <basic-container v-show="isShow">
             <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"

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

@@ -1,6 +1,6 @@
 <template>
     <div>
-        <basic-container v-if="isShow">
+        <basic-container v-show="isShow">
             <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"

+ 24 - 23
src/views/tradeAgency/oceanFreightImport/detailsPage.vue

@@ -242,20 +242,20 @@
                             size="small"></el-input>
                         <span v-else>{{ row.boxNo }}</span>
                     </template>
-                    <template slot="hsCodeForm" slot-scope="{ row }">
-                        <dic-select v-if="row.$cellEdit" v-model="row.hsCode" placeholder="HSCODE" key="id"
-                            res="records" label="hsCode" url="/blade-los/bcommodity/list" :filterable="true"
-                            :remote="true" dataName="hsCode"
-                            @selectChange="rowDicChange('hsCode', $event, row)"></dic-select>
-                        <span v-else>{{ row.hsCode }}</span>
-                    </template>
-                    <template slot="goodsName" slot-scope="{ row }">
+                    <template slot="goodsNameForm" slot-scope="{ row }">
                         <dic-select v-if="row.$cellEdit && !row.srcId" v-model="row.goodsName" placeholder="品名" key="id"
                             res="records" label="cnName" url="/blade-los/bcommodity/list" :filterable="true"
                             :remote="true" dataName="cnName"
                             @selectChange="rowDicChange('goodsName', $event, row)"></dic-select>
                         <span v-else>{{ row.goodsName }}</span>
                     </template>
+                    <template slot="hsCode" slot-scope="{ row }">
+                        <dic-select v-if="row.$cellEdit" v-model="row.hsCode" placeholder="HSCODE" key="id"
+                            res="records" label="hsCode" url="/blade-los/bcommodity/list" :filterable="true"
+                            :remote="true" dataName="hsCode"
+                            @selectChange="rowDicChange('hsCode', $event, row)"></dic-select>
+                        <span v-else>{{ row.hsCode }}</span>
+                    </template>
                     <tempalte slot="goodsType" slot-scope="{ row }">
                         <dic-select v-if="row.$cellEdit && !row.srcId" v-model="row.goodsType" placeholder="类型"
                             key="dictKey" label="dictValue" url="/blade-system/dict-biz/dictionary?code=goods-type"
@@ -972,8 +972,8 @@ export default {
                         overHidden: true
                     },
                     {
-                        label: "HSCODE",
-                        prop: "hsCode",
+                        label: "品名",
+                        prop: "goodsName",
                         width: "100",
                         overHidden: true,
                         cell: true,
@@ -988,10 +988,11 @@ export default {
                         ]
                     },
                     {
-                        label: "品名",
-                        prop: "goodsName",
+                        label: "HSCODE",
+                        prop: "hsCode",
                         width: "100",
-                        overHidden: true
+                        overHidden: true,
+
                     },
                     {
                         label: "类型",
@@ -1941,20 +1942,20 @@ export default {
             }
         },
         rowDicChange(name, row, el) {
-            if (name == 'hsCode') {
-                if (row) {
-                    el.goodsName = row.cnName
-                } else {
-                    el.goodsName = null
-                }
-            }
-            // if (name == 'goodsName') {
+            // if (name == 'hsCode') {
             //     if (row) {
-            //         el.hsCode = row.hsCode
+            //         el.goodsName = row.cnName
             //     } else {
-            //         el.hsCode = null
+            //         el.goodsName = null
             //     }
             // }
+            if (name == 'goodsName') {
+                if (row) {
+                    el.hsCode = row.hsCode
+                } else {
+                    el.hsCode = null
+                }
+            }
             if (name == 'fleetName') {
                 if (row) {
                     el.fleetId = row.id

+ 8 - 2
src/views/tradeAgency/oceanFreightImport/index.vue

@@ -1,6 +1,6 @@
 <template>
     <div>
-        <basic-container v-if="isShow">
+        <basic-container v-show="isShow">
             <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"
@@ -326,12 +326,18 @@ export default {
                         overHidden: true
                     },
                     {
-                        label: "重",
+                        label: "重",
                         prop: "grossWeight",
                         width: "80",
                         overHidden: true
                     },
                     {
+                        label: "净重",
+                        prop: "netWeight",
+                        width: "80",
+                        overHidden: true
+                    },
+                    {
                         label: "装箱方式",
                         prop: "loadType",
                         type: 'select',

+ 15 - 15
src/views/tradeAgency/tradeAgency/detailsPage.vue

@@ -306,12 +306,12 @@
                             :filterable="true"></dic-select>
                         <span v-else>{{ row.orderReleaseMethod }}</span>
                     </tempalte>
-                    <template slot="hsCodeForm" slot-scope="{ row }">
-                        <dic-select v-if="row.$cellEdit" v-model="row.hsCode" placeholder="HSCODE" key="id"
-                            res="records" label="hsCode" url="/blade-los/bcommodity/list" :filterable="true"
-                            :remote="true" dataName="hsCode"
-                            @selectChange="rowDicChange('hsCode', $event, row)"></dic-select>
-                        <span v-else>{{ row.hsCode }}</span>
+                    <template slot="labelProductNameForm" slot-scope="{ row }">
+                        <dic-select v-if="row.$cellEdit" v-model="row.labelProductName" placeholder="标签品名" key="id"
+                            res="records" label="cnName" url="/blade-los/bcommodity/list" :filterable="true"
+                            :remote="true" dataName="cnName"
+                            @selectChange="rowDicChange('labelProductName', $event, row)"></dic-select>
+                        <span v-else>{{ row.labelProductName }}</span>
                     </template>
                     <tempalte slot="goodsTypeForm" slot-scope="{ row }">
                         <dic-select v-if="row.$cellEdit" v-model="row.goodsType" placeholder="商品类型" key="dictKey"
@@ -961,8 +961,8 @@ export default {
                         overHidden: true
                     },
                     {
-                        label: "HSCODE",
-                        prop: "hsCode",
+                        label: "标签品名",
+                        prop: "labelProductName",
                         width: "100",
                         overHidden: true,
                         cell: true,
@@ -971,16 +971,16 @@ export default {
                         rules: [
                             {
                                 required: true,
-                                message: '请输入HSCODE',
+                                message: '请输入标签品名',
                                 trigger: 'blur'
                             }
                         ]
                     },
                     {
-                        label: "标签品名",
-                        prop: "labelProductName",
+                        label: "HSCODE",
+                        prop: "hsCode",
                         width: "100",
-                        overHidden: true
+                        overHidden: true,
                     },
                     {
                         label: "商品类别",
@@ -1632,12 +1632,12 @@ export default {
             }
         },
         rowDicChange(name, row, el) {
-            if (name == 'hsCode') {
+            if (name == 'labelProductName') {
                 if (row) {
-                    el.labelProductName = row.cnName
+                    el.hsCode=row.hsCode
                     el.taxRate = row.taxRate
                 } else {
-                    el.labelProductName = null
+                    el.hsCode = null
                     el.taxRate = null
                 }
             }

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

@@ -1,6 +1,6 @@
 <template>
     <div>
-        <basic-container v-if="isShow">
+        <basic-container v-show="isShow">
             <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"