jiaxing.zhou

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

......@@ -24,7 +24,7 @@ router.beforeEach((to, from, next) => {
store.dispatch('GetInfo').then((res) => {
// if (res.success) {
store.dispatch('GenerateRoutes').then(accessRoutes => {
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']);
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']);
// 根据roles权限生成可访问的路由表
router.addRoutes(accessRoutes) // 动态添加可访问路由表
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
......
......@@ -76,12 +76,6 @@
maxlength="4"
placeholder=""
>
<!-- <el-option
v-for="(item, index) in dict.orderRequester"
:key="index"
:label="item.name"
:value="item.value"
></el-option> -->
<el-option
v-for="(item, index) in $store.getters.dict.ORDER_DECLARATION_PARTY"
:key="index"
......@@ -91,7 +85,26 @@
</el-select>
</Formitem>
</el-col>
<!-- 加密方式 -->
<el-col :span="8">
<Formitem label="加密方式" prop="methodOfSignature" type="edit">
<el-select
type="text"
id="inputInner-edit-methodOfSignature"
v-model="formData.methodOfSignature"
clearable
maxlength="4"
placeholder=""
>
<el-option
v-for="(item, index) in $store.getters.dict.METHOD_OF_SIGNATURE"
:key="index"
:label="item.itemChineseName"
:value="item.itemValue"
></el-option>
</el-select>
</Formitem>
</el-col>
</el-row>
<div v-if="formData.orderRequester=='2'">
<div class="checkTitle">
......@@ -261,6 +274,8 @@
</Formitem>
</el-col>
</el-row>
</div>
<div v-if="isCipherMachine">
<section class="dlTitle">
<h3>密码机管理</h3>
</section>
......@@ -349,6 +364,7 @@
</el-row>
</div>
</el-form>
</div>
<div class="dialogOption entrySave">
......@@ -414,6 +430,7 @@ export default {
ecomEntEmail: "",
ecomEntName: "",
orderRequester: "",
methodOfSignature: this.getDefaultMethodOfSignature(), // 设置默认值
certificateSerialNumber: "",
certificateIndexNumber: "",
qingdaoKey: "",
......@@ -449,6 +466,13 @@ export default {
message: "订单申报方不能为空!",
},
],
methodOfSignature: [
{
required: true,
trigger: "change",
message: "加密方式不能为空!",
},
],
// declarationUnit18: [
// {
// required: true,
......@@ -515,8 +539,46 @@ export default {
}
}
},
type(newVal) {
if (newVal === "add") {
this.setDefaultMethodOfSignature(); // 确保默认值被设置
}
},
},
computed: {
isCipherMachine() {
console.log("11",this.formData.methodOfSignature === 'CIPHER_MACHINE')
return this.formData.methodOfSignature === 'CIPHER_MACHINE';
}
},
created() {
// 确保字典数据已加载
if (this.$store.getters.dict.METHOD_OF_SIGNATURE.length > 0) {
this.setDefaultMethodOfSignature();
} else {
// 监听字典数据变化
this.$store.watch(
(state) => state.dict.METHOD_OF_SIGNATURE,
(newVal) => {
if (newVal.length > 0) {
this.setDefaultMethodOfSignature();
}
}
);
}
},
methods: {
getDefaultMethodOfSignature() {
const methodOfSignatureDict = this.$store.getters.dict.METHOD_OF_SIGNATURE;
if (methodOfSignatureDict.length > 0) {
return methodOfSignatureDict[0].itemValue;
}
return "";
},
setDefaultMethodOfSignature() {
this.formData.methodOfSignature = this.getDefaultMethodOfSignature();
},
changeQDCheckBox(){
this.$forceUpdate()
if(!this.formData.qdCheck){
......@@ -797,6 +859,7 @@ export default {
ecomEntEmail: "",
ecomEntName: "",
orderRequester: "",
methodOfSignature: this.getDefaultMethodOfSignature(), // 重置默认值
certificateSerialNumber: "",
certificateIndexNumber: "",
qingdaoKey: "",
......
......@@ -286,8 +286,8 @@ export default {
})
},
dateChange(val){
this.formData.startTime = val[0]
this.formData.endTime = val[1]
this.formData.startTime = val[0] + ' 00:00:00'
this.formData.endTime = val[1] + ' 23:59:59'
},
getDeclareType(){
getDictData({
......