Browse Source

no message

linwenxin 5 months ago
parent
commit
f1ffc9f6d6

+ 2 - 2
src/views/setting/departmentManage/index.vue

@@ -460,8 +460,8 @@ export default {
         attr: '',
         level: '',
         insureType: [],
-        belongCompanyCode: '',
-        belongCompany: '',
+        belongCompanyCode: JSON.parse(localStorage.getItem('greemall_user'))?.companyWechatId || '',
+        belongCompany: JSON.parse(localStorage.getItem('greemall_user'))?.companyName || '',
         payInsureCodeId: ''
       },
       mainFormRules: {

+ 16 - 13
src/views/setting/organizationManagement/paymentMerchantManagement/index.vue

@@ -119,7 +119,7 @@ export default {
           formItemAttributes: {
             label: '电子商户名称',
             prop: 'payMerchantName',
-            rules: required
+            rules: [...required]
           }
         },
         {
@@ -136,7 +136,7 @@ export default {
           formItemAttributes: {
             label: '商户属性',
             prop: 'attr',
-            rules: required
+            rules: [...required]
           }
         },
         {
@@ -149,7 +149,7 @@ export default {
           formItemAttributes: {
             label: 'appid',
             prop: 'appId',
-            rules: required
+            rules: [...required]
           }
         },
         {
@@ -175,7 +175,7 @@ export default {
           formItemAttributes: {
             label: 'mchid',
             prop: 'mchId',
-            rules: required
+            rules: [...required]
           }
         },
         {
@@ -201,7 +201,7 @@ export default {
           formItemAttributes: {
             label: 'key',
             prop: 'mchKey',
-            rules: required
+            rules: [...required]
           }
         },
         {
@@ -218,7 +218,7 @@ export default {
           formItemAttributes: {
             label: '状态',
             prop: 'status',
-            rules: required
+            rules: [...required]
           }
         },
         {
@@ -231,7 +231,7 @@ export default {
           formItemAttributes: {
             label: '小程序appid',
             prop: 'appletAppid',
-            rules: required
+            rules: [...required]
           }
         },
         {
@@ -244,7 +244,7 @@ export default {
           formItemAttributes: {
             label: '小程序密钥',
             prop: 'appletSecret',
-            rules: required
+            rules: [...required]
           }
         },
         {
@@ -288,7 +288,7 @@ export default {
               id: row.id
             }).then(res => {
               this.formDialogType = 1
-              this.formData = { ...res.data }
+              this.formData = { ...res.data, attr: res.data?.attr ? res.data?.attr?.split(',') : [] }
               this.formDialog = true
               this.$refs.pageRef.refreshList()
             })
@@ -299,7 +299,7 @@ export default {
             adminCompanyPayConfigDetail({
               id: row.id
             }).then(res => {
-              this.formData = { ...res.data }
+              this.formData = { ...res.data, attr: res.data?.attr ? res.data?.attr?.split(',') : [] }
               this.formDialog = true
               this.$refs.pageRef.refreshList()
             })
@@ -321,7 +321,8 @@ export default {
         subAppId: '',
         subMchId: '',
         appletAppid: '',
-        appletSecret: ''
+        appletSecret: '',
+        attr: []
       }
       this.formDialog = false
     },
@@ -338,14 +339,16 @@ export default {
         subAppId: '',
         subMchId: '',
         appletAppid: '',
-        appletSecret: ''
+        appletSecret: '',
+        attr: []
       })
     },
     save() {
       this.$refs.formRef.validate(valid => {
         if (valid) {
           adminCompanyPayConfigSave({
-            ...this.formData
+            ...this.formData,
+            attr: attr.join(',')
           }).then(res => {
             this.$message({
               type: 'success',