Explorar o código

Merge branches 'dev' and 'dev' of http://39.101.143.165:8090/dong_k/tenant-Platform into dev

@dongkboy hai 3 meses
pai
achega
b17b0b49c5
Modificáronse 1 ficheiros con 23 adicións e 1 borrados
  1. 23 1
      src/views/quoteConfig/agreement/agreementDetails.vue

+ 23 - 1
src/views/quoteConfig/agreement/agreementDetails.vue

@@ -624,6 +624,28 @@ const processArray = (array: any[]) => {
     }
   });
 };
+//添加车牌和车牌地区
+const processArray1 = (array: any[]) => {
+  return array.map((val) => {
+    switch (val.attrType) {
+      case 'inputNumber':
+      case 'datetime':
+        if (!val.operator) {
+          val.operator = '1'; // 设置默认值
+        }
+        break;
+      default:
+        break;
+    }
+    if (val.attrCode == 'LicenseNo') {
+      val.dictLabal = licensePlateNumber.value;
+    }
+    if (val.attrCode == 'LicenseArea') {
+      val.dictLabal = licensePlateRegion.value;
+    }
+    return val;
+  });
+};
 //删除规则
 const ruleDel = (id: string) => {
   ElMessageBox.confirm(
@@ -778,7 +800,7 @@ const costitemEdit = (id: string, item: any, index: number, costindex: number) =
   RulesInfo.value = item;
   api.agreementApi.AgreementFeeById(id).then((res: any) => {
     if (res.code == '200') {
-      res.data.ruleConditions = processArray(res.data.ruleConditions);
+      res.data.ruleConditions = processArray1(res.data.ruleConditions);
       ruleFeeHeaderTitle.value = res.data.productName;
       costitemEditInfo.value = res.data;
       ruleFeeEditVisible.value = true;