From 6360dd45e33a54cc2d586fd87c27c3a953b6724b Mon Sep 17 00:00:00 2001 From: luwenlong Date: Sat, 29 Nov 2025 18:07:54 +0800 Subject: [PATCH] =?UTF-8?q?midea=E9=A6=96=E6=AC=A1=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 6 +- .env.prod | 1 + .env.production | 3 +- .env.sit | 1 + .env.uat | 1 + .env.ver | 1 + .eslintrc.js | 142 +--------------- .prettierrc | 2 +- src/views/excel/ExcelExportTaskList.vue | 14 -- src/views/excel/ExcelImportTaskList.vue | 13 -- .../modules/CNregulatoryConditions.vue | 10 +- .../modules/MergerGoodsForm.vue | 84 ++++++++-- .../productClassify/modules/additionCode.js | 42 +++++ .../modules/additionCodeDialog.vue | 158 ++++++++++++++++++ test.log | 6 - vue.config.js | 11 +- 16 files changed, 303 insertions(+), 192 deletions(-) create mode 100644 src/views/merger/mergeredConfig/productClassify/modules/additionCode.js create mode 100644 src/views/merger/mergeredConfig/productClassify/modules/additionCodeDialog.vue delete mode 100644 test.log diff --git a/.env.development b/.env.development index 200da7b..e491981 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ NODE_ENV=development -VUE_APP_API_BASE_URL=https://midea-test.egyun.com.cn/gcs +VUE_APP_API_BASE_URL=https://localhost.midea.com/gcs VUE_APP_API_BASE_SITE=http://localhost:9000 VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview -VUE_APP_LOGOUT_URL=https://lsitapi.midea.com/api-auth/ssoLogout -VUE_APP_API_AUTH=https://lsitapi.midea.com/api-auth \ No newline at end of file +VUE_APP_LOGOUT_BASE_URL=https://lsitapi.midea.com +VUE_APP_MIP_URL=https://muisit.midea.com/midea-selector-v2.0/mipPersonSelector.umd.js \ No newline at end of file diff --git a/.env.prod b/.env.prod index c578e08..81d84ad 100644 --- a/.env.prod +++ b/.env.prod @@ -1,5 +1,6 @@ NODE_ENV=prod VUE_APP_API_BASE_URL=https://lcapi.midea.com/api-iems-cn/gcs +VUE_APP_API_BASE_DOMAIN=https://lcapi.midea.com VUE_APP_API_BASE_SITE=https://lcapi.midea.com/api-iems-cn/gcs VUE_APP_CAS_BASE_URL=https://signin.midea.com/login VUE_APP_ONLINE_BASE_URL= diff --git a/.env.production b/.env.production index 390a4e7..5fe2263 100644 --- a/.env.production +++ b/.env.production @@ -1,8 +1,9 @@ NODE_ENV=production VUE_APP_API_BASE_URL=https://lcapi.midea.com/api-iems-cn/gcs +VUE_APP_API_BASE_DOMAIN=https://lcapi.midea.com VUE_APP_API_BASE_SITE=https://lcapi.midea.com/api-iems-cn/gcs VUE_APP_CAS_BASE_URL=https://signin.midea.com/login VUE_APP_ONLINE_BASE_URL= VUE_APP_LOGOUT_URL=https://lcapi.midea.com/api-auth/ssoLogout VUE_APP_SSO=true -VUE_APP_API_AUTH=https://lcapi.midea.com/api-auth \ No newline at end of file +VUE_APP_MIP_URL=https://mui.midea.com/midea-selector-v2.0/mipPersonSelector.umd.js \ No newline at end of file diff --git a/.env.sit b/.env.sit index 57170b4..5abc9a7 100644 --- a/.env.sit +++ b/.env.sit @@ -1,5 +1,6 @@ NODE_ENV=sit VUE_APP_API_BASE_URL=https://lsitapi.midea.com/api-iems-cn/gcs +VUE_APP_API_BASE_DOMAIN=https://lsitapi.midea.com VUE_APP_API_BASE_SITE=http://localhost:9000 VUE_APP_CAS_BASE_URL=https://signinuat.midea.com/login VUE_APP_ONLINE_BASE_URL= diff --git a/.env.uat b/.env.uat index 2075e5a..d16e9f6 100644 --- a/.env.uat +++ b/.env.uat @@ -1,5 +1,6 @@ NODE_ENV=uat VUE_APP_API_BASE_URL=https://luatapi.midea.com/api-iems-cn/gcs +VUE_APP_API_BASE_DOMAIN=https://luatapi.midea.com VUE_APP_API_BASE_SITE=http://localhost:9000 VUE_APP_CAS_BASE_URL=https://signinuat.midea.com/login VUE_APP_ONLINE_BASE_URL= diff --git a/.env.ver b/.env.ver index df80897..5987d40 100644 --- a/.env.ver +++ b/.env.ver @@ -1,5 +1,6 @@ NODE_ENV=ver VUE_APP_API_BASE_URL=https://lverapi.midea.com/api-iems-cn/gcs +VUE_APP_API_BASE_DOMAIN=https://lverapi.midea.com VUE_APP_API_BASE_SITE=http://localhost:9000 VUE_APP_CAS_BASE_URL=https://signinuat.midea.com/login VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview diff --git a/.eslintrc.js b/.eslintrc.js index ec0e817..434386c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -9,143 +9,7 @@ module.exports = { "ecmaVersion": 2020, "sourceType": "module" }, - extends: [ - // "eslint-config-md-js", - // "eslint-config-md-vue2", - // 加入 Vue 推荐的规则配置 - 'plugin:vue/recommended', - ], - rules: { - // 关闭多行属性间必须换行的规则 - 'vue/new-line-between-multi-line-attributes': 'off', - - // 关闭Vue模板缩进检查(关键:解决模板中的缩进提示) - 'vue/html-indent': 'off', - - // 强制使用分号(默认) - 'semi': ['warn', 'always'], - - // 警告但不报错(提醒清理) - 'no-console': 'warn', - - // 单行标签属性个数 - 'vue/max-attributes-per-line': ['warn', { - 'singleline': 10, - 'multiline': { - 'max': 10, - 'allowFirstLine': false - } - }], - - // 关闭v-html的XSS风险提示 - 'vue/no-v-html': 'off', - - // 关闭属性必须使用连字符命名的规则 - 'vue/attribute-hyphenation': 'off', - - // 关闭组件选项顺序校验规则 - 'vue/order-in-components': 'off', - - // 关闭 Vue 属性顺序强制校验规则 - 'vue/attributes-order': 'off', - - // 允许单行里展示标签和文本 - 'vue/singleline-html-element-content-newline': 'off', - - // 要求使用严格相等(!==/===) - eqeqeq: ['error', 'always'], - - // 允许在 @@ -576,10 +592,12 @@ import CNattachmentCode from './CNattachmentCode'; import CNregulatoryConditions from './CNregulatoryConditions'; import CNtaxrateDesc from './CNtaxrateDesc'; import ApprovalProgressTemplate from '@/components/ApprovalProgressTemplate/index'; +import additionCodeDialog from './additionCodeDialog'; export default { name: 'MideaMergerGoodsForm', components: { + additionCodeDialog, WorkflowList, ModifyRecord, devClassify, @@ -624,6 +642,7 @@ export default { }, confirmLoading: false, validatorRules: { + additionalCode: [{ required: true, message: '请选择附加编码!', trigger: 'blur' }], hsCode: [{ required: true, message: '请输入HSCode!', trigger: 'blur' }], gname: [{ required: true, message: '请输入商品名称!', trigger: 'blur' }], }, @@ -694,6 +713,10 @@ export default { formDisabled() { return this.disabled; }, + showAdditionCode() { + // 国家为泰国才展示附加编码 + return this.model.country && this.model.country === 'TH'; + }, controlMaQuanType() { if (this.model.controlMa && this.model.quanType) { return this.model.controlMa + ',' + this.model.quanType; @@ -711,6 +734,13 @@ export default { this.modelDefault = JSON.parse(JSON.stringify(this.model)); }, methods: { + showAdditionCodeHandle() { + this.$refs.additionCodeDialogRef.show({ data: this.model }); + }, + confirmAdditionCode(data) { + this.model.additionalCode = data.additionalCode; + this.getOtherCountry(); + }, timestampToDate(timestamp) { if (!timestamp) { return ''; @@ -733,7 +763,7 @@ export default { return; // 直接return,不执行后续代码 } } else if (!['GC', 'CN'].includes(this.model.country)) { - if (this.model.hsCode.length < 6) { + if (this.model.hsCode && this.model.hsCode.length < 6) { this.$message.error('国家为海外时,HSCode必须大于等于6位'); return; // 直接return,不执行后续代码 } @@ -783,7 +813,7 @@ export default { id: this.model.id, }); if (resp.success) { - if (this.model.country === 'ID') { + if (this.model.country === 'ID' || this.model.country === 'TH') { this.SubmitValid(); } else { this.$refs.ApprovalProgressTemplate.show({ @@ -820,11 +850,15 @@ export default { } }, async auditFlow() { - if (this.model.country === 'ID') { - const valid = await getAction(this.url.regulationValid, { + if (this.model.country === 'ID' || this.model.country === 'TH') { + const data = { countryCode: this.model.country, - hscode: this.model.hsCode, - }); + hscode: this.model.hsCode + }; + if ( this.model.country === 'TH' ) { + data.additionalCode = this.model.additionalCode; + } + const valid = await getAction(this.url.regulationValid, data); if (valid.success) { this.$refs.ApprovalProgressTemplate.show({ id: this.model.id, @@ -888,6 +922,9 @@ export default { flag: this.flag, }); } + if (this.model.country === 'TH' && value) { + this.initAdditionalCode(); + } }, filterOption(input, option) { return option.componentOptions.children[0].text.indexOf(input) !== -1; @@ -895,10 +932,20 @@ export default { closeModal(record) { if (record) { this.model.hsCode = record.codeTS || record.hscode; + if (this.model.country === 'TH') { + this.initAdditionalCode(); + } this.queryByIdHscode('enter'); } this.CNhSCodeModalShow = false; }, + initAdditionalCode(){ + this.model.additionalCode = ''; + this.regulatoryConditionsDataSource = []; + if (this.activeKeyBottom === 'regulatoryConditions') { + this.$refs.CNregulatoryConditions.show(this.regulatoryConditionsDataSource); + } + }, // 展示HSCode showHsCode() { if (this.formDisabled) { @@ -1087,6 +1134,7 @@ export default { const resp = await getAction(this.url.hscodDetail, { hscode: this.model.hsCode, countryCode: this.model.country, + additionalCode: this.model.country === 'TH' ? this.model.additionalCode : undefined }); if (resp.success) { const result = JSON.parse(resp.result); @@ -1251,6 +1299,8 @@ export default { } } }); + } else { + that.$message.warning('请检查必填项'); } }); }, @@ -1358,10 +1408,14 @@ export default { }); }, async SubmitValid() { - const valid = await getAction(this.url.regulationValid, { + const data = { countryCode: this.model.country, - hscode: this.model.hsCode, - }); + hscode: this.model.hsCode + }; + if ( this.model.country === 'TH' ) { + data.additionalCode = this.model.additionalCode; + } + const valid = await getAction(this.url.regulationValid, data); if (valid.success) { this.$refs.ApprovalProgressTemplate.show({ id: this.model.id, @@ -1435,7 +1489,15 @@ export default { } } } - +.merger-good-form-box { + .plus-box { + width: 26px; + height: 26px; + background-color: #0f69ff; + line-height: 26px; + text-align: center; + } +} /deep/ .md-form-item__label { width: 120px; } diff --git a/src/views/merger/mergeredConfig/productClassify/modules/additionCode.js b/src/views/merger/mergeredConfig/productClassify/modules/additionCode.js new file mode 100644 index 0000000..17f2162 --- /dev/null +++ b/src/views/merger/mergeredConfig/productClassify/modules/additionCode.js @@ -0,0 +1,42 @@ +export default { + searchFields: [ + { + name: '附加编码', + value: 'additionalCode', + type: 'input', + isFixed: true, + span: 3 + }, + { + name: '语言类别', + value: 'cultureCode', + type: 'select', + optionsKey: 'GLOBAL_TARIFF_LANGUAGE_TYPE', + isFixed: true, + span: 3 + } + ], + columns:[ + { + label: '附加编码', + prop: 'additionalCode', + 'width': 130, + }, + { + label: '附加编码类型', + prop: 'additionalCodeType', + 'width': 130, + }, + { + label: '附加编码说明', + prop: 'codeDescription', + 'min-width': 160, + }, + { + label: '语言类别', + prop: 'cultureCode', + 'width': 130, + }, + ] + +} \ No newline at end of file diff --git a/src/views/merger/mergeredConfig/productClassify/modules/additionCodeDialog.vue b/src/views/merger/mergeredConfig/productClassify/modules/additionCodeDialog.vue new file mode 100644 index 0000000..38e701a --- /dev/null +++ b/src/views/merger/mergeredConfig/productClassify/modules/additionCodeDialog.vue @@ -0,0 +1,158 @@ + + + \ No newline at end of file diff --git a/test.log b/test.log deleted file mode 100644 index 3c5424b..0000000 --- a/test.log +++ /dev/null @@ -1,6 +0,0 @@ -1dddssssdf -sa -df -asg -asggs - diff --git a/vue.config.js b/vue.config.js index 962c69e..795110a 100644 --- a/vue.config.js +++ b/vue.config.js @@ -23,10 +23,10 @@ module.exports = { // } // }, //打包app时放开该配置 - // publicPath:'/iems-winlink/', + publicPath:'/iems-winlink/', configureWebpack: (config) => { //生产环境取消 console.log - if (process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'sit' || process.env.NODE_ENV === 'prod' || process.env.NODE_ENV === 'uat') { + if (process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'sit' || process.env.NODE_ENV === 'uat') { config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true config.plugins.push(new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 20 })) } @@ -101,7 +101,7 @@ module.exports = { pathRewrite: { '^/gcs': '', }, - cookieDomainRewrite: 'localhost', + // cookieDomainRewrite: 'localhost', }, '/sitMuiProxy': { target: 'https://imipsit.midea.com', @@ -118,6 +118,11 @@ module.exports = { changeOrigin: true, pathRewrite: { '^/muiProxy': '' }, }, + '/lsitProxy': { + target: process.env.VUE_APP_LOGOUT_BASE_URL, + changeOrigin: true, + pathRewrite: { '^/lsitProxy': '' }, + }, }, }, // 将 lintOnSave 设置为 false 以关闭 ESLint 检查