linwenxin il y a 5 mois
Parent
commit
19e175e82e
1 fichiers modifiés avec 213 ajouts et 20 suppressions
  1. 213 20
      src/views/setting/departmentManage/index.vue

+ 213 - 20
src/views/setting/departmentManage/index.vue

@@ -82,7 +82,7 @@
             </div>
           </div>
         </div>
-        <div v-if="~['add', 'edit'].indexOf(activeKey)">
+        <div v-if="~['add', 'edit'].indexOf(activeKey)" style="box-sizing: border-box; padding-bottom: 50px">
           <el-form ref="mainForm" :model="mainForm" :rules="mainFormRules" label-width="130px">
             <el-row :gutter="20" justify="start">
               <el-col :span="6">
@@ -99,8 +99,26 @@
                   </el-cascader>
                 </el-form-item>
               </el-col>
+
+              <el-col :span="6">
+                <el-form-item label="所属公司" prop="belongCompanyCode">
+                  <el-select v-model="mainForm.belongCompanyCode" placeholder="请选择">
+                    <el-option v-for="item in BELONG_COMPANY" :key="item.value" :label="item.label" :value="item.value">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="保险支付商户" prop="payInsureCodeId">
+                  <el-select v-model="mainForm.payInsureCodeId" placeholder="请选择">
+                    <el-option v-for="item in PayConfigList" :key="item.value" :label="item.label" :value="item.value">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+
               <el-col :span="6">
-                <el-form-item label="名称" prop="name">
+                <el-form-item label="网点名称" prop="name">
                   <el-input placeholder="请输入网点名称" v-model="mainForm.name"></el-input>
                 </el-form-item>
               </el-col>
@@ -114,17 +132,88 @@
                 </el-form-item>
               </el-col>
               <el-col :span="6">
+                <el-form-item label="网点属性" prop="attr">
+                  <el-radio-group v-model="mainForm.attr">
+                    <el-radio label="SELF">自建网点</el-radio>
+                    <el-radio label="MAJOR">第三方专业网点</el-radio>
+                    <el-radio label="MERCHANT">第三方经销商家网点</el-radio>
+                  </el-radio-group>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="网点级别" prop="level">
+                  <el-radio-group v-model="mainForm.level">
+                    <el-radio :label="1">一级网点</el-radio>
+                    <el-radio :label="2">二级网点</el-radio>
+                  </el-radio-group>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="保险类型" prop="insureType">
+                  <el-checkbox-group v-model="mainForm.insureType">
+                    <el-checkbox label="意外险">意外险</el-checkbox>
+                    <el-checkbox label="雇主险">雇主险</el-checkbox>
+                    <el-checkbox label="工伤险">工伤险</el-checkbox>
+                  </el-checkbox-group>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="企业法人" prop="legalName">
+                  <el-input placeholder="请输入" v-model="mainForm.legalName"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="法人手机" prop="legalMobile">
+                  <el-input placeholder="请输入" v-model="mainForm.legalMobile"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="法人身份证" prop="legalIdCard">
+                  <el-input placeholder="请输入" v-model="mainForm.legalIdCard"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="办公电话" prop="websitPhone">
+                  <el-input placeholder="请输入" v-model="mainForm.websitPhone"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="开户银行" prop="openBank">
+                  <el-input placeholder="请输入" v-model="mainForm.openBank"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="银行账号" prop="bankAccount">
+                  <el-input placeholder="请输入" v-model="mainForm.bankAccount"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="邮箱" prop="email">
+                  <el-input placeholder="请输入" v-model="mainForm.email"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="传真" prop="fax">
+                  <el-input placeholder="请输入" v-model="mainForm.fax"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="邮编" prop="zipCode">
+                  <el-input placeholder="请输入" v-model="mainForm.zipCode"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
                 <el-form-item label="联系人" prop="linkName">
                   <el-input placeholder="请输入联系人名称" v-model="mainForm.linkName"></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="6">
-                <el-form-item label="联系人电话" prop="websitPhone">
+                <el-form-item label="联系人电话" prop="linkMobile">
                   <el-input
                     placeholder="请输入联系人电话"
                     maxlength="11"
                     type="number"
-                    v-model="mainForm.websitPhone"
+                    v-model="mainForm.linkMobile"
                   ></el-input>
                 </el-form-item>
               </el-col>
@@ -137,6 +226,14 @@
                 </el-form-item>
               </el-col>
               <el-col :span="6">
+                <el-form-item label="状态" prop="status">
+                  <el-radio-group v-model="mainForm.status">
+                    <el-radio :label="true">启用</el-radio>
+                    <el-radio :label="false">禁用</el-radio>
+                  </el-radio-group>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
                 <el-form-item label="电子支付商户" prop="payWorkerCodeId">
                   <el-select v-model="mainForm.payWorkerCodeId" placeholder="请选择">
                     <el-option v-for="item in PayConfigList" :key="item.value" :label="item.label" :value="item.value">
@@ -148,15 +245,6 @@
                 </el-form-item>
               </el-col>
               <el-col :span="6">
-                <el-form-item label="状态" prop="status">
-                  <el-radio-group v-model="mainForm.status">
-                    <el-radio :label="true">启用</el-radio>
-                    <el-radio :label="false">禁用</el-radio>
-                  </el-radio-group>
-                </el-form-item>
-              </el-col>
-
-              <el-col :span="6">
                 <el-form-item label="配件网点编号" prop="partsWebsitId">
                   <el-input placeholder="请填写" v-model="mainForm.partsWebsitId"></el-input>
                 </el-form-item>
@@ -317,6 +405,8 @@ import {
 import geographicalPosi from '@/components/geographicalPosi/index.vue'
 import { adminCompanyPayConfigList } from '@/api/paymentMerchantManagement'
 import { commonTemplateDownload } from '@/api/common.js'
+import { dictListDict } from '@/api/dataDictionary.js'
+import { getDataDictionary } from '@/api/dataDictionary.js'
 export default {
   components: { geographicalPosi },
   data() {
@@ -357,7 +447,22 @@ export default {
         type: '',
         partsWebsitId: '',
         partsWebsitAttr: '',
-        partsIsCash: ''
+        partsIsCash: '',
+        legalName: '',
+        legalMobile: '',
+        legalIdCard: '',
+        openBank: '',
+        bankAccount: '',
+        email: '',
+        fax: '',
+        zipCode: '',
+        linkMobile: '',
+        attr: '',
+        level: '',
+        insureType: [],
+        belongCompanyCode: '',
+        belongCompany: '',
+        payInsureCodeId: ''
       },
       mainFormRules: {
         name: [{ required: true, message: '请填写网点名称', trigger: 'blur' }],
@@ -365,9 +470,23 @@ export default {
         websitId: [{ required: true, message: '请填写网点编号', trigger: 'blur' }],
         websitPhone: [{ required: true, message: '请填写联系人电话', trigger: 'blur' }],
         address: [{ required: true, message: '请选择GPS地址', trigger: 'blur' }],
-        payWorkerCodeId: [{ required: true, message: '请选择电子支付商户', trigger: 'blur' }]
+        payWorkerCodeId: [{ required: true, message: '请选择电子支付商户', trigger: 'blur' }],
+        legalName: [{ required: true, message: '请输入', trigger: 'blur' }],
+        legalMobile: [{ required: true, message: '请输入', trigger: 'blur' }],
+        legalIdCard: [{ required: true, message: '请输入', trigger: 'blur' }],
+        openBank: [{ required: true, message: '请输入', trigger: 'blur' }],
+        bankAccount: [{ required: true, message: '请输入', trigger: 'blur' }],
+        email: [{ required: true, message: '请输入', trigger: 'blur' }],
+        zipCode: [{ required: true, message: '请输入', trigger: 'blur' }],
+
+        attr: [{ required: true, message: '请输入', trigger: 'blur' }],
+        level: [{ required: true, message: '请输入', trigger: 'blur' }],
+        insureType: [{ required: true, message: '请输入', trigger: 'blur' }],
+        belongCompanyCode: [{ required: true, message: '请输入', trigger: 'blur' }],
+        payInsureCodeId: [{ required: true, message: '请输入', trigger: 'blur' }]
       },
-      indexs: [0]
+      indexs: [0],
+      BELONG_COMPANY: []
     }
   },
 
@@ -544,6 +663,20 @@ export default {
         label: { edit: '编辑', add: '新增' }[type],
         // 打开时事件
         triggerEvent: () => {
+          getDataDictionary({
+            pageNum: 1,
+            pageSize: -1,
+            params: [
+              { param: 'a.status', compare: '=', value: 'ON' },
+              { param: 'a.dict_type', compare: '=', value: 'BELONG_COMPANY' }
+            ]
+          }).then(res => {
+            this.BELONG_COMPANY = res.data.records.map(item => ({
+              value: item.dictCode,
+              label: item.dictValue
+            }))
+          })
+
           adminCompanyPayConfigList({ pageNum: 1, pageSize: -1, params: [] }).then(res => {
             this.PayConfigList = res.data.records.map(item => ({
               label: item.payMerchantName,
@@ -579,7 +712,22 @@ export default {
                   payConfigList: res.data.payConfigList || [],
                   isIncre: res.data.isIncre,
                   joinCode: res.data.joinCode,
-                  type: res.data.type
+                  type: res.data.type,
+                  legalName: res.data.legalName,
+                  legalMobile: res.data.legalMobile,
+                  legalIdCard: res.data.legalIdCard,
+                  openBank: res.data.openBank,
+                  bankAccount: res.data.bankAccount,
+                  email: res.data.email,
+                  fax: res.data.fax,
+                  zipCode: res.data.zipCode,
+                  linkMobile: res.data.linkMobile,
+                  attr: res.data.attr,
+                  level: res.data.level,
+                  insureType: res.data.insureType ? res.data.insureType.split(',') : [],
+                  belongCompanyCode: res.data.belongCompanyCode,
+                  belongCompany: res.data.belongCompany,
+                  payInsureCodeId: res.data.payInsureCodeId
                 }
               })
             }
@@ -624,7 +772,22 @@ export default {
             partsWebsitAttr: this.mainForm.partsWebsitAttr,
             partsIsCash: this.mainForm.partsIsCash,
             payConfigList: this.mainForm.payConfigList,
-            joinCode: this.mainForm.joinCode
+            joinCode: this.mainForm.joinCode,
+            legalName: this.mainForm.legalName,
+            legalMobile: this.mainForm.legalMobile,
+            legalIdCard: this.mainForm.legalIdCard,
+            openBank: this.mainForm.openBank,
+            bankAccount: this.mainForm.bankAccount,
+            email: this.mainForm.email,
+            fax: this.mainForm.fax,
+            zipCode: this.mainForm.zipCode,
+            linkMobile: this.mainForm.linkMobile,
+            attr: this.mainForm.attr,
+            level: this.mainForm.level,
+            insureType: (this.mainForm.insureType || []).join(','),
+            belongCompanyCode: this.mainForm.belongCompanyCode,
+            belongCompany: this.mainForm.belongCompany,
+            payInsureCodeId: this.mainForm.payInsureCodeId
           }
           if (this.mainFormType == 'edit') {
             params.websitId = this.editId
@@ -671,7 +834,22 @@ export default {
             payConfigList: res.data.payConfigList || [],
             isIncre: res.data.isIncre,
             joinCode: res.data.joinCode,
-            type: res.data.type
+            type: res.data.type,
+            legalName: res.data.legalName,
+            legalMobile: res.data.legalMobile,
+            legalIdCard: res.data.legalIdCard,
+            openBank: res.data.openBank,
+            bankAccount: res.data.bankAccount,
+            email: res.data.email,
+            fax: res.data.fax,
+            zipCode: res.data.zipCode,
+            linkMobile: res.data.linkMobile,
+            attr: res.data.attr,
+            level: res.data.level,
+            insureType: res.data.insureType ? res.data.insureType.split(',') : [],
+            belongCompanyCode: res.data.belongCompanyCode,
+            belongCompany: res.data.belongCompany,
+            payInsureCodeId: res.data.payInsureCodeId
           }
           this.$successMsg('保存成功')
           if (data.$index > 0) {
@@ -705,7 +883,22 @@ export default {
             payConfigList: res.data.payConfigList || [],
             isIncre: res.data.isIncre,
             joinCode: res.data.joinCode,
-            type: res.data.type
+            type: res.data.type,
+            legalName: res.data.legalName,
+            legalMobile: res.data.legalMobile,
+            legalIdCard: res.data.legalIdCard,
+            openBank: res.data.openBank,
+            bankAccount: res.data.bankAccount,
+            email: res.data.email,
+            fax: res.data.fax,
+            zipCode: res.data.zipCode,
+            linkMobile: res.data.linkMobile,
+            attr: res.data.attr,
+            level: res.data.level,
+            insureType: res.data.insureType ? res.data.insureType.split(',') : [],
+            belongCompanyCode: res.data.belongCompanyCode,
+            belongCompany: res.data.belongCompany,
+            payInsureCodeId: res.data.payInsureCodeId
           }
           this.$successMsg('删除成功')
           if (data.$index > 0) {