Procházet zdrojové kódy

修改货代报表删除 轮胎一键删除

Qukatie před 5 měsíci
rodič
revize
4f85236f6b

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

@@ -31,6 +31,15 @@ export const reportsRemove = (ids) => {
     }
   })
 }
+export const reportsRemove2 = (ids) => {
+  return request({
+    url: '/api/blade-los/reports/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
 
 export const add = (row) => {
   return request({

+ 9 - 0
src/api/tirePartsMall/purchasingManagement/warehouseEntryOrder.js

@@ -26,6 +26,15 @@ export const tradingBox = (id) => {
     }
   })
 }
+export const removeItem = (ids) => {
+  return request({
+    url: '/api/blade-sales-part/shipItems/remove',
+    method: 'get',
+    params: {
+      ids
+    }
+  })
+}
 export const getDetails = (data) => {
   return request({
     url: '/api/blade-sales-part/ship/detail',

+ 9 - 0
src/api/tirePartsMall/salesService/outboundWorkOrder.js

@@ -26,6 +26,15 @@ export const tradingBox = (ids) => {
     }
   })
 }
+export const removeItem = (ids) => {
+  return request({
+    url: '/api/blade-sales-part/shipItems/remove',
+    method: 'get',
+    params: {
+      ids
+    }
+  })
+}
 export const getDetails = (data) => {
   return request({
     url: '/api/blade-sales-part/shipReturns/detail',

+ 3 - 3
src/components/tradeAgency/reports.vue

@@ -45,7 +45,7 @@
 </template>
 
 <script>
-import { getList, reportsDetail, add, update, reportsRemove } from "@/api/iosBasicData/reports";
+import { getList, reportsDetail, add, update, reportsRemove2 } from "@/api/iosBasicData/reports";
 import { getUserApprovalList } from "@/api/approval/processConfig";
 import { mapGetters } from "vuex";
 import { billsDetail } from '@/api/iosBasicData/bills'
@@ -1043,7 +1043,7 @@ export default {
         type: "warning"
       })
         .then(() => {
-          return reportsRemove(row.id);
+          return reportsRemove2(row.id);
         })
         .then(() => {
           this.onLoad(this.page);
@@ -1064,7 +1064,7 @@ export default {
         type: "warning"
       })
         .then(() => {
-          return reportsRemove(this.ids);
+          return reportsRemove2(this.ids);
         })
         .then(() => {
           this.onLoad(this.page);

+ 3 - 3
src/components/tradeAgency/reportsJK.vue

@@ -45,7 +45,7 @@
 </template>
 
 <script>
-import { getList, reportsDetail, add, update, reportsRemove } from "@/api/iosBasicData/reports";
+import { getList, reportsDetail, add, update, reportsRemove2 } from "@/api/iosBasicData/reports";
 import { getUserApprovalList } from "@/api/approval/processConfig";
 import { mapGetters } from "vuex";
 import { billsDetail } from '@/api/iosBasicData/bills'
@@ -1044,7 +1044,7 @@ export default {
         type: "warning"
       })
         .then(() => {
-          return reportsRemove(row.id);
+          return reportsRemove2(row.id);
         })
         .then(() => {
           this.onLoad(this.page);
@@ -1065,7 +1065,7 @@ export default {
         type: "warning"
       })
         .then(() => {
-          return reportsRemove(this.ids);
+          return reportsRemove2(this.ids);
         })
         .then(() => {
           this.onLoad(this.page);

+ 34 - 28
src/util/date.js

@@ -241,32 +241,38 @@ export function verifySymbol(str) {
 }
 // 匹配常见全角符号的正则表达式(包括标点、字母、数字等)
 export function checkFullWidthSymbols(text) {
-  const fullWidthRegex = /[\u3000-\u303F\uFF01-\uFF5E\uFFE0-\uFFE5]/g;
-  const matchesItem = [];
-  // const matches = [];
-  let lines = text.split('\n')
-  let match;
-  lines.forEach((ln, index, array) => {
-    while ((match = fullWidthRegex.exec(ln)) !== null) {
-      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                // 符号的详细位置和内容
-  };
-
+  if (text) {
+    const fullWidthRegex = /[\u3000-\u303F\uFF01-\uFF5E\uFFE0-\uFFE5]/g;
+    const matchesItem = [];
+    let lines = text.split('\n')
+    let match;
+    lines.forEach((ln, index, array) => {
+      while ((match = fullWidthRegex.exec(ln)) !== null) {
+        matchesItem.push({
+          row: index + 1,         // 行号
+          index: match.index,     // 符号的位置
+          symbol: match[0]        // 符号本身
+        });
+      }
+    })
+    let matches = [];
+    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                // 符号的详细位置和内容
+    };
+  } else {
+    return {
+      hasFullWidth: false, // 是否包含全角符号
+      positions: []                // 符号的详细位置和内容
+    };
+  }
 }

+ 3 - 3
src/views/iosBasicData/AirtransportExport/bills/assembly/reports.vue

@@ -65,7 +65,7 @@
 </template>
 
 <script>
-  import {getList, reportsDetail, add, update, reportsRemove,reportsGetReportData} from "@/api/iosBasicData/reports";
+  import {getList, reportsDetail, add, update, reportsRemove2,reportsGetReportData} from "@/api/iosBasicData/reports";
   import {getUserApprovalList} from "@/api/approval/processConfig";
   import {mapGetters} from "vuex";
   import {billsDetail} from '@/api/iosBasicData/bills'
@@ -1045,7 +1045,7 @@
           type: "warning"
         })
           .then(() => {
-            return reportsRemove(row.id);
+            return reportsRemove2(row.id);
           })
           .then(() => {
             this.onLoad(this.page);
@@ -1066,7 +1066,7 @@
           type: "warning"
         })
           .then(() => {
-            return reportsRemove(this.ids);
+            return reportsRemove2(this.ids);
           })
           .then(() => {
             this.onLoad(this.page);

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

@@ -65,7 +65,7 @@
 </template>
 
 <script>
-  import {getList, reportsDetail, add, update, reportsRemove,reportsGetReportData} from "@/api/iosBasicData/reports";
+  import {getList, reportsDetail, add, update, reportsRemove2,reportsGetReportData} from "@/api/iosBasicData/reports";
   import {getUserApprovalList} from "@/api/approval/processConfig";
   import {mapGetters} from "vuex";
   import {billsDetail} from '@/api/iosBasicData/bills'
@@ -1045,7 +1045,7 @@
           type: "warning"
         })
           .then(() => {
-            return reportsRemove(row.id);
+            return reportsRemove2(row.id);
           })
           .then(() => {
             this.onLoad(this.page);
@@ -1066,7 +1066,7 @@
           type: "warning"
         })
           .then(() => {
-            return reportsRemove(this.ids);
+            return reportsRemove2(this.ids);
           })
           .then(() => {
             this.onLoad(this.page);

+ 3 - 3
src/views/iosBasicData/OceanFreightImport/bills/assembly/reports.vue

@@ -66,7 +66,7 @@
 </template>
 
 <script>
-  import {getList, reportsDetail, add, update, reportsRemove,reportsGetReportData} from "@/api/iosBasicData/reports";
+  import {getList, reportsDetail, add, update, reportsRemove2,reportsGetReportData} from "@/api/iosBasicData/reports";
   import {getUserApprovalList} from "@/api/approval/processConfig";
   import {mapGetters} from "vuex";
   import {billsDetail} from '@/api/iosBasicData/bills'
@@ -1046,7 +1046,7 @@
           type: "warning"
         })
           .then(() => {
-            return reportsRemove(row.id);
+            return reportsRemove2(row.id);
           })
           .then(() => {
             this.onLoad(this.page);
@@ -1067,7 +1067,7 @@
           type: "warning"
         })
           .then(() => {
-            return reportsRemove(this.ids);
+            return reportsRemove2(this.ids);
           })
           .then(() => {
             this.onLoad(this.page);

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

@@ -66,7 +66,7 @@
 </template>
 
 <script>
-  import {getList, reportsDetail, add, update, reportsRemove,reportsGetReportData} from "@/api/iosBasicData/reports";
+  import {getList, reportsDetail, add, update, reportsRemove2,reportsGetReportData} from "@/api/iosBasicData/reports";
   import {getUserApprovalList} from "@/api/approval/processConfig";
   import {mapGetters} from "vuex";
   import {billsDetail} from '@/api/iosBasicData/bills'
@@ -1051,7 +1051,7 @@
           type: "warning"
         })
           .then(() => {
-            return reportsRemove(row.id);
+            return reportsRemove2(row.id);
           })
           .then(() => {
             this.onLoad(this.page);
@@ -1072,7 +1072,7 @@
           type: "warning"
         })
           .then(() => {
-            return reportsRemove(this.ids);
+            return reportsRemove2(this.ids);
           })
           .then(() => {
             this.onLoad(this.page);

+ 120 - 29
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -87,7 +87,7 @@
                                                                 @click="applyforfun(item[0].label)">{{ item[0].label }}
                                                             </span>
                                                             <span v-else style="color: #1e9fff">{{ item[0].label
-                                                            }}</span>
+                                                                }}</span>
                                                         </span>
                                                         <span v-if="item[0].type == 'button'"></span>
                                                         <!--<el-button v-if="item[0].type == 'button'" :disabled="detailData.seeDisabled || item[0].disabled"-->
@@ -313,7 +313,7 @@ import { getDeptLazyTree, getDeptTree, getLazyList } from "@/api/system/dept";
 import {
     billsCheckBills, billsCopyBills,
     billsDetail,
-    billsGetBillNo,removeHblNo,
+    billsGetBillNo, removeHblNo,
     billsListAll, billsRevokeCheckBills, editypesSendingEdi,
     billsSubmit,
     billsAdd,
@@ -327,9 +327,10 @@ import businessReports from "@/views/iosBasicData/SeafreightExportF/bills/assemb
 import { popupReminder } from "@/util/messageReminder";
 import editypes from "@/views/iosBasicData/editypes/index.vue";
 import { editypesList } from "@/api/iosBasicData/editypes";
-import { verifyEnglish, verifySymbol, checkFullWidthSymbols } from "@/util/date";
+import { verifyEnglish, checkFullWidthSymbols } from "@/util/date";
 import { contrastObj, contrastList } from "@/util/contrastData";
 import { selectListLos } from "@/api/approval/processConfig";
+import { isProcurement } from "@/api/basicData/configuration";
 import _ from "lodash";
 export default {
     components: {
@@ -358,6 +359,7 @@ export default {
     },
     data() {
         return {
+            verifySymbolStatus: 0,
             showLock: false,
             ediData: [], // edi 列表数据
             previewDialog: false, // 预览报表弹窗开启
@@ -825,6 +827,9 @@ export default {
         this.saberTenantId = Obj ? Obj.content : 0;
         this.saberUserInfo = JSON.parse(localStorage.getItem('saber-userInfo')).content
         this.roleName = localStorage.getItem('roleName').split(',')
+        isProcurement({ "param": "verify.symbol" }).then(res => {
+            this.verifySymbolStatus = res.data.data
+        })
         // 判断是否员id, 有id 就不显示
         if (!this.form.id) {
             this.deptGetDetailPolfun() // 收货地 装货港 当前登录人的默认
@@ -1611,9 +1616,9 @@ export default {
                     cancelButtonText: "取消",
                     type: "warning"
                 }).then(res => {
-                    
-                    removeHblNo({id:this.form.id}).then(res=>{
-                        this.form.hblno=null
+
+                    removeHblNo({ id: this.form.id }).then(res => {
+                        this.form.hblno = null
                         this.billsSubmitfun()
                     })
                 })
@@ -1820,30 +1825,116 @@ export default {
                         })
                         return;
                     }
+                    if (this.verifySymbolStatus == 1) {
+                        let msgsList = []
+                        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}"`)
+                            }
+                            if (msg.length > 0) {
+                                this.$message({
+                                    dangerouslyUseHTMLString: true,
+                                    message: `发货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
+                                    type: 'error'
+                                });
+                                return
+                            }
+                        }
 
-                    // let msgsList = []
-                    // if (!verifyEnglish(this.form.hshipperDetails)) {
-                    //     msgsList.push('发货人')
-                    // }
-                    // if (!verifyEnglish(this.form.hconsigneeDetails)) {
-                    //     msgsList.push('收货人')
-                    // }
-                    // if (!verifyEnglish(this.form.hnotifyDetails)) {
-                    //     msgsList.push('通知人')
-                    // }
-                    // if (!verifyEnglish(this.form.marks)) {
-                    //     msgsList.push('唛头')
-                    // }
-                    // if (!verifyEnglish(this.form.commodityDescr)) {
-                    //     msgsList.push('货描')
-                    // }
-                    // if (!verifyEnglish(this.form.forwarding)) {
-                    //     msgsList.push('FORWARDING')
-                    // }
-                    // if (msgsList.length > 0) {
-                    //     this.$message.error(`请正确输入${msgsList.join(",")}的英文和英文符号`);
-                    //     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}"`)
+                            }
+                            if (msg.length > 0) {
+                                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}"`)
+                            }
+                            if (msg.length > 0) {
+                                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}"`)
+                            }
+                            if (msg.length > 0) {
+                                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}"`)
+                            }
+                            if (msg.length > 0) {
+                                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}"`)
+                            }
+                            if (msg.length > 0) {
+                                this.$message({
+                                    dangerouslyUseHTMLString: true,
+                                    message: `FORWARDING:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
+                                    type: 'error'
+                                });
+                                return
+                            }
+                        }
+                        if (!verifyEnglish(this.form.detail.hshipperDetails)) {
+                            msgsList.push('发货人')
+                        }
+                        if (!verifyEnglish(this.form.detail.hconsigneeDetails)) {
+                            msgsList.push('收货人')
+                        }
+                        if (!verifyEnglish(this.form.detail.hnotifyDetails)) {
+                            msgsList.push('通知人')
+                        }
+                        if (!verifyEnglish(this.form.marks)) {
+                            msgsList.push('唛头')
+                        }
+                        if (!verifyEnglish(this.form.commodityDescr)) {
+                            msgsList.push('货描')
+                        }
+                        if (!verifyEnglish(this.form.forwarding)) {
+                            msgsList.push('FORWARDING')
+                        }
+                        if (msgsList.length > 0) {
+                            this.$message.error(`请正确输入${msgsList.join(",")}的英文`);
+                            return;
+                        }
+                    }
                     this.form.detail.hshipperDetails = this.getTextTirim(this.form.detail.hshipperDetails)
                     this.form.detail.hconsigneeDetails = this.getTextTirim(this.form.detail.hconsigneeDetails)
                     this.form.detail.hnotifyDetails = this.getTextTirim(this.form.detail.hnotifyDetails)

+ 3 - 2
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/detailsPage.vue

@@ -128,7 +128,8 @@ import {
     goodsDetail,
     dotList,
     getWarehouseKeeper,
-    dotListAll
+    dotListAll,
+    removeItem
 } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
 import { dateFormat } from "@/util/date";
 import { getToken } from "@/util/auth";
@@ -1007,7 +1008,7 @@ export default {
                 })
                 // 有id 的处理
                 if (itemsWithId.length != 0) {
-                    tradingBox(arrIds.join(',')).then(res => {
+                    removeItem(arrIds.join(',')).then(res => {
                         this.$message.success("操作成功!");
                     });
                 }

+ 3 - 2
src/views/tirePartsMall/salesService/inStorage/detailsPage.vue

@@ -124,7 +124,8 @@ import {
     goodsDetail,
     dotList,
     getWarehouseKeeper,
-    dotListAll
+    dotListAll,
+    removeItem
 } from "@/api/tirePartsMall/salesService/outboundWorkOrder";
 import { dateFormat } from "@/util/date";
 import { getToken } from "@/util/auth";
@@ -998,7 +999,7 @@ export default {
                 })
                 // 有id 的处理
                 if (itemsWithId.length != 0) {
-                    tradingBox(arrIds.join(',')).then(res => {
+                    removeItem(arrIds.join(',')).then(res => {
                         this.$message.success("操作成功!");
                     });
                 }