jiaxing.zhou

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

...@@ -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,7 +85,26 @@ ...@@ -91,7 +85,26 @@
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">
...@@ -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>
...@@ -349,6 +364,7 @@ ...@@ -349,6 +364,7 @@
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: "",
...@@ -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){
...@@ -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({
......