jiaxing.zhou

Merge remote-tracking branch 'origin/dev-jiaxing.zhou'

...@@ -8,7 +8,7 @@ const whiteList = ['/login', '/auth-redirect', '/bind', '/register', '/relogin'] ...@@ -8,7 +8,7 @@ const whiteList = ['/login', '/auth-redirect', '/bind', '/register', '/relogin']
8 8
9 9
10 router.beforeEach((to, from, next) => { 10 router.beforeEach((to, from, next) => {
11 - 11 +
12 if (to.path == '/relogin') { 12 if (to.path == '/relogin') {
13 next() 13 next()
14 } else { 14 } else {
...@@ -24,7 +24,7 @@ router.beforeEach((to, from, next) => { ...@@ -24,7 +24,7 @@ router.beforeEach((to, from, next) => {
24 store.dispatch('GetInfo').then((res) => { 24 store.dispatch('GetInfo').then((res) => {
25 // if (res.success) { 25 // if (res.success) {
26 store.dispatch('GenerateRoutes').then(accessRoutes => { 26 store.dispatch('GenerateRoutes').then(accessRoutes => {
27 - store.dispatch("GetDict", ['DECLARE_F_FLAG', 'MEASUREMENT_UNIT','TEMPLATE_TYPE','PACKAGE_TYPE_CODE', 'RECEIPT_STATUS', 'DECLARE_APPTYPE', 'CURRENCY','COUNTRY_REGION_CODE', 'DECLARE_STATISTICS_FLAG', 'ORDER_DECLARATION_PARTY','APP_STATUS']); 27 + store.dispatch("GetDict", ['DECLARE_F_FLAG', 'MEASUREMENT_UNIT','TEMPLATE_TYPE','PACKAGE_TYPE_CODE', 'RECEIPT_STATUS', 'DECLARE_APPTYPE', 'CURRENCY','COUNTRY_REGION_CODE', 'DECLARE_STATISTICS_FLAG', 'ORDER_DECLARATION_PARTY','APP_STATUS','METHOD_OF_SIGNATURE']);
28 // 根据roles权限生成可访问的路由表 28 // 根据roles权限生成可访问的路由表
29 router.addRoutes(accessRoutes) // 动态添加可访问路由表 29 router.addRoutes(accessRoutes) // 动态添加可访问路由表
30 next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 30 next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
......
...@@ -76,12 +76,6 @@ ...@@ -76,12 +76,6 @@
76 maxlength="4" 76 maxlength="4"
77 placeholder="" 77 placeholder=""
78 > 78 >
79 - <!-- <el-option
80 - v-for="(item, index) in dict.orderRequester"
81 - :key="index"
82 - :label="item.name"
83 - :value="item.value"
84 - ></el-option> -->
85 <el-option 79 <el-option
86 v-for="(item, index) in $store.getters.dict.ORDER_DECLARATION_PARTY" 80 v-for="(item, index) in $store.getters.dict.ORDER_DECLARATION_PARTY"
87 :key="index" 81 :key="index"
...@@ -91,13 +85,32 @@ ...@@ -91,13 +85,32 @@
91 </el-select> 85 </el-select>
92 </Formitem> 86 </Formitem>
93 </el-col> 87 </el-col>
94 - 88 + <!-- 加密方式 -->
89 + <el-col :span="8">
90 + <Formitem label="加密方式" prop="methodOfSignature" type="edit">
91 + <el-select
92 + type="text"
93 + id="inputInner-edit-methodOfSignature"
94 + v-model="formData.methodOfSignature"
95 + clearable
96 + maxlength="4"
97 + placeholder=""
98 + >
99 + <el-option
100 + v-for="(item, index) in $store.getters.dict.METHOD_OF_SIGNATURE"
101 + :key="index"
102 + :label="item.itemChineseName"
103 + :value="item.itemValue"
104 + ></el-option>
105 + </el-select>
106 + </Formitem>
107 + </el-col>
95 </el-row> 108 </el-row>
96 <div v-if="formData.orderRequester=='2'"> 109 <div v-if="formData.orderRequester=='2'">
97 <div class="checkTitle"> 110 <div class="checkTitle">
98 <el-checkbox v-model="formData.qdCheck" @change="changeQDCheckBox()"></el-checkbox>青岛 111 <el-checkbox v-model="formData.qdCheck" @change="changeQDCheckBox()"></el-checkbox>青岛
99 - </div> 112 + </div>
100 - <el-row :gutter="5"> 113 + <el-row :gutter="5">
101 <!-- 公服DXPID --> 114 <!-- 公服DXPID -->
102 <el-col :span="8"> 115 <el-col :span="8">
103 <Formitem label="公服DXPID" prop="qingdaoUserDxpid" type="edit"> 116 <Formitem label="公服DXPID" prop="qingdaoUserDxpid" type="edit">
...@@ -220,7 +233,7 @@ ...@@ -220,7 +233,7 @@
220 class="el-icon-user-solid" 233 class="el-icon-user-solid"
221 icon-class="exl" 234 icon-class="exl"
222 style="font-size: 18px; color: #de002e" 235 style="font-size: 18px; color: #de002e"
223 - /> 236 + />
224 <Tooltip 237 <Tooltip
225 :content="formData.qingdaoFile ? formData.qingdaoFile.name : formData.qingdaoCertificatePath.split('/').pop()" 238 :content="formData.qingdaoFile ? formData.qingdaoFile.name : formData.qingdaoCertificatePath.split('/').pop()"
226 :refName="formData.qingdaoFile ? formData.qingdaoFile.name : formData.qingdaoCertificatePath.split('/').pop()" 239 :refName="formData.qingdaoFile ? formData.qingdaoFile.name : formData.qingdaoCertificatePath.split('/').pop()"
...@@ -261,6 +274,8 @@ ...@@ -261,6 +274,8 @@
261 </Formitem> 274 </Formitem>
262 </el-col> 275 </el-col>
263 </el-row> 276 </el-row>
277 + </div>
278 + <div v-if="isCipherMachine">
264 <section class="dlTitle"> 279 <section class="dlTitle">
265 <h3>密码机管理</h3> 280 <h3>密码机管理</h3>
266 </section> 281 </section>
...@@ -348,7 +363,8 @@ ...@@ -348,7 +363,8 @@
348 </el-col> 363 </el-col>
349 364
350 </el-row> 365 </el-row>
351 - </div> 366 + </div>
367 +
352 </el-form> 368 </el-form>
353 </div> 369 </div>
354 <div class="dialogOption entrySave"> 370 <div class="dialogOption entrySave">
...@@ -414,6 +430,7 @@ export default { ...@@ -414,6 +430,7 @@ export default {
414 ecomEntEmail: "", 430 ecomEntEmail: "",
415 ecomEntName: "", 431 ecomEntName: "",
416 orderRequester: "", 432 orderRequester: "",
433 + methodOfSignature: this.getDefaultMethodOfSignature(), // 设置默认值
417 certificateSerialNumber: "", 434 certificateSerialNumber: "",
418 certificateIndexNumber: "", 435 certificateIndexNumber: "",
419 qingdaoKey: "", 436 qingdaoKey: "",
...@@ -440,7 +457,7 @@ export default { ...@@ -440,7 +457,7 @@ export default {
440 trigger: "blur", 457 trigger: "blur",
441 message: "电商企业名称不能为空!", 458 message: "电商企业名称不能为空!",
442 }, 459 },
443 - 460 +
444 ], 461 ],
445 orderRequester: [ 462 orderRequester: [
446 { 463 {
...@@ -449,6 +466,13 @@ export default { ...@@ -449,6 +466,13 @@ export default {
449 message: "订单申报方不能为空!", 466 message: "订单申报方不能为空!",
450 }, 467 },
451 ], 468 ],
469 + methodOfSignature: [
470 + {
471 + required: true,
472 + trigger: "change",
473 + message: "加密方式不能为空!",
474 + },
475 + ],
452 // declarationUnit18: [ 476 // declarationUnit18: [
453 // { 477 // {
454 // required: true, 478 // required: true,
...@@ -515,8 +539,46 @@ export default { ...@@ -515,8 +539,46 @@ export default {
515 } 539 }
516 } 540 }
517 }, 541 },
542 + type(newVal) {
543 + if (newVal === "add") {
544 + this.setDefaultMethodOfSignature(); // 确保默认值被设置
545 + }
546 + },
547 + },
548 + computed: {
549 + isCipherMachine() {
550 + console.log("11",this.formData.methodOfSignature === 'CIPHER_MACHINE')
551 + return this.formData.methodOfSignature === 'CIPHER_MACHINE';
552 + }
553 + },
554 +
555 + created() {
556 + // 确保字典数据已加载
557 + if (this.$store.getters.dict.METHOD_OF_SIGNATURE.length > 0) {
558 + this.setDefaultMethodOfSignature();
559 + } else {
560 + // 监听字典数据变化
561 + this.$store.watch(
562 + (state) => state.dict.METHOD_OF_SIGNATURE,
563 + (newVal) => {
564 + if (newVal.length > 0) {
565 + this.setDefaultMethodOfSignature();
566 + }
567 + }
568 + );
569 + }
518 }, 570 },
519 methods: { 571 methods: {
572 + getDefaultMethodOfSignature() {
573 + const methodOfSignatureDict = this.$store.getters.dict.METHOD_OF_SIGNATURE;
574 + if (methodOfSignatureDict.length > 0) {
575 + return methodOfSignatureDict[0].itemValue;
576 + }
577 + return "";
578 + },
579 + setDefaultMethodOfSignature() {
580 + this.formData.methodOfSignature = this.getDefaultMethodOfSignature();
581 + },
520 changeQDCheckBox(){ 582 changeQDCheckBox(){
521 this.$forceUpdate() 583 this.$forceUpdate()
522 if(!this.formData.qdCheck){ 584 if(!this.formData.qdCheck){
...@@ -557,7 +619,7 @@ export default { ...@@ -557,7 +619,7 @@ export default {
557 fileUpload({ file }) { 619 fileUpload({ file }) {
558 620
559 const reader = new FileReader(); 621 const reader = new FileReader();
560 - reader.readAsDataURL(file); 622 + reader.readAsDataURL(file);
561 reader.onload = (e) => { 623 reader.onload = (e) => {
562 console.log(e); 624 console.log(e);
563 let obj = { 625 let obj = {
...@@ -566,12 +628,12 @@ export default { ...@@ -566,12 +628,12 @@ export default {
566 }; 628 };
567 this.formData.file = obj; 629 this.formData.file = obj;
568 }; 630 };
569 - 631 +
570 }, 632 },
571 qingdaoFileUpload({ file }) { 633 qingdaoFileUpload({ file }) {
572 634
573 const reader = new FileReader(); 635 const reader = new FileReader();
574 - reader.readAsDataURL(file); 636 + reader.readAsDataURL(file);
575 reader.onload = (e) => { 637 reader.onload = (e) => {
576 console.log(e); 638 console.log(e);
577 let obj = { 639 let obj = {
...@@ -580,7 +642,7 @@ export default { ...@@ -580,7 +642,7 @@ export default {
580 }; 642 };
581 this.formData.qingdaoFile = obj; 643 this.formData.qingdaoFile = obj;
582 }; 644 };
583 - 645 +
584 }, 646 },
585 fileChange(val) {}, 647 fileChange(val) {},
586 qingdaoFileChange(val) {}, 648 qingdaoFileChange(val) {},
...@@ -695,13 +757,13 @@ export default { ...@@ -695,13 +757,13 @@ export default {
695 if (res.code === "200") { 757 if (res.code === "200") {
696 if (this.formData.file) { 758 if (this.formData.file) {
697 this.uploadCertificate(val.ecomEntCode, this.base64ConvertFile(this.formData.file.file,this.formData.file.name)); 759 this.uploadCertificate(val.ecomEntCode, this.base64ConvertFile(this.formData.file.file,this.formData.file.name));
698 - } 760 + }
699 if (this.formData.qingdaoFile) { 761 if (this.formData.qingdaoFile) {
700 this.uploadQingdaoCertificate(val.ecomEntCode, this.base64ConvertFile(this.formData.qingdaoFile.file,this.formData.qingdaoFile.name)); 762 this.uploadQingdaoCertificate(val.ecomEntCode, this.base64ConvertFile(this.formData.qingdaoFile.file,this.formData.qingdaoFile.name));
701 - } 763 + }
702 this.msgSuccess("客户添加成功!"); 764 this.msgSuccess("客户添加成功!");
703 this.close(); 765 this.close();
704 - 766 +
705 } else { 767 } else {
706 this.alertWarningMsg(res.message); 768 this.alertWarningMsg(res.message);
707 this.loadings.dialogLoading = false; 769 this.loadings.dialogLoading = false;
...@@ -713,7 +775,7 @@ export default { ...@@ -713,7 +775,7 @@ export default {
713 }); 775 });
714 }, 776 },
715 uploadCertificate(ecomEntCode, file) { 777 uploadCertificate(ecomEntCode, file) {
716 - 778 +
717 uploadCertificate(ecomEntCode, file) 779 uploadCertificate(ecomEntCode, file)
718 .then((uploadRes) => { 780 .then((uploadRes) => {
719 if (uploadRes.code === "200") { 781 if (uploadRes.code === "200") {
...@@ -731,7 +793,7 @@ export default { ...@@ -731,7 +793,7 @@ export default {
731 }, 793 },
732 794
733 uploadQingdaoCertificate(ecomEntCode, file) { 795 uploadQingdaoCertificate(ecomEntCode, file) {
734 - 796 +
735 uploadQingdaoCertificate(ecomEntCode, file) 797 uploadQingdaoCertificate(ecomEntCode, file)
736 .then((uploadRes) => { 798 .then((uploadRes) => {
737 if (uploadRes.code === "200") { 799 if (uploadRes.code === "200") {
...@@ -762,7 +824,7 @@ export default { ...@@ -762,7 +824,7 @@ export default {
762 } 824 }
763 this.msgSuccess("客户修改成功!"); 825 this.msgSuccess("客户修改成功!");
764 this.close(); 826 this.close();
765 - 827 +
766 } else { 828 } else {
767 this.alertWarningMsg(res.message); 829 this.alertWarningMsg(res.message);
768 this.loadings.dialogLoading = false; 830 this.loadings.dialogLoading = false;
...@@ -785,7 +847,7 @@ export default { ...@@ -785,7 +847,7 @@ export default {
785 this.formData.qdCheck=checkboxStateBooleans[0]; 847 this.formData.qdCheck=checkboxStateBooleans[0];
786 this.formData.bjCheck=checkboxStateBooleans[1]; 848 this.formData.bjCheck=checkboxStateBooleans[1];
787 } 849 }
788 - 850 +
789 }, 851 },
790 close() { 852 close() {
791 this.formData = { 853 this.formData = {
...@@ -797,6 +859,7 @@ export default { ...@@ -797,6 +859,7 @@ export default {
797 ecomEntEmail: "", 859 ecomEntEmail: "",
798 ecomEntName: "", 860 ecomEntName: "",
799 orderRequester: "", 861 orderRequester: "",
862 + methodOfSignature: this.getDefaultMethodOfSignature(), // 重置默认值
800 certificateSerialNumber: "", 863 certificateSerialNumber: "",
801 certificateIndexNumber: "", 864 certificateIndexNumber: "",
802 qingdaoKey: "", 865 qingdaoKey: "",
......
...@@ -286,8 +286,8 @@ export default { ...@@ -286,8 +286,8 @@ export default {
286 }) 286 })
287 }, 287 },
288 dateChange(val){ 288 dateChange(val){
289 - this.formData.startTime = val[0] 289 + this.formData.startTime = val[0] + ' 00:00:00'
290 - this.formData.endTime = val[1] 290 + this.formData.endTime = val[1] + ' 23:59:59'
291 }, 291 },
292 getDeclareType(){ 292 getDeclareType(){
293 getDictData({ 293 getDictData({
......