Procházet zdrojové kódy

平台业务归属

LiFei před 4 roky
rodič
revize
545862b12a

+ 5 - 0
src/views/hlgplatform/HlgPlatformList.vue

@@ -109,6 +109,11 @@
             dataIndex: 'enterpriseName'
           },
           {
+            title:'业务归属',
+            align: 'left',
+            dataIndex: 'businessBelong'
+          },
+          {
             title:'状态',
             align:"left",
             dataIndex: 'isLock_dictText'

+ 56 - 3
src/views/hlgplatform/modules/HlgPlatformModal.vue

@@ -41,7 +41,14 @@
         <a-form-item label="固定电话" :labelCol="labelCol" :wrapperCol="wrapperCol">
           <a-input v-decorator="[ 'phone', validatorRules.phone]" placeholder="请输入固定电话" style="width: 100%" maxLength="15"></a-input>
         </a-form-item>
-        
+
+        <a-form-item label="业务归属" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-select type="list" v-decorator="['businessBelongId',validatorRules.businessBelongId]" :trigger-change="true" @change="changeBelong"
+                    :options="selectOption.options" placeholder="选择业务归属" style="width: 100%" :disabled="isDisabled"/>
+        </a-form-item>
+
+
+
       </a-form>
     </a-spin>
     <div class="drawer-bootom-button" v-show="!disableSubmit">
@@ -53,11 +60,13 @@
 
 <script>
 
-  import { httpAction } from '@/api/manage'
+  import { httpAction,putAction } from '@/api/manage'
   import pick from 'lodash.pick'
   import JDate from '@/components/jeecg/JDate'
   import data1 from '../../tools/area.json'
   import { duplicateCheck } from '@/api/api'
+  // 引入搜索服务商弹出框的组件
+  const findList = (params) => putAction('/hlgplatform/hlgPlatform/applicationSubList', params)
   
   export default {
     name: "HlgPlatformModal",
@@ -67,6 +76,12 @@
     data () {
       return {
         form: this.$form.createForm(this),
+        selectOption: {
+          options: [
+
+          ]
+        },
+        isDisabled:false,
         title:"操作",
         width:800,
         bodyStyle: {
@@ -105,6 +120,7 @@
         contactPerson:{},
         mobilePhone:{rules: [{ validator: this.validateMobilePhone }] },
         phone:{rules: [{ validator: this.validatePhone }] },
+        businessBelongId:{ rules: [{ required: true, message: '请选择业务归属' }] }
         },
         url: {
           add: "/hlgplatform/hlgPlatform/add",
@@ -147,11 +163,13 @@
         this.edit({});
       },
       edit (record) {
+        this.isDisabled=false;
         this.form.resetFields();
         this.model = Object.assign({}, record);
+        this.querySubcontratorList()
         this.visible = true;
         this.$nextTick(() => {
-          this.form.setFieldsValue(pick(this.model,'platformName','enterpriseName','provinceCode','cityCode','countryCode','provinceCityCountry','address','contactPerson','mobilePhone','phone','sysOrgCode','createTime','createBy','updateTime','updateBy','isLock'))
+          this.form.setFieldsValue(pick(this.model,'platformName','enterpriseName','provinceCode','cityCode','businessBelongId','businessBelong','isShare','countryCode','provinceCityCountry','address','contactPerson','mobilePhone','phone','sysOrgCode','createTime','createBy','updateTime','updateBy','isLock'))
         })
         //回显省市区
         this.arr=[]
@@ -266,6 +284,41 @@
         })
 
       },
+
+
+
+      changeBelong(val){
+        this.model.businessBelongId=val
+        for (let i = 0; i < this.selectOption.options.length ; i++) {
+          if(val==this.selectOption.options[i].value){
+            this.model.businessBelong=this.selectOption.options[i].label
+          }
+        }
+      },
+
+
+      //查询慧盈配置
+      querySubcontratorList() {
+        findList({}).then((res) => {
+          if (res.success) {
+            this.selectOption.options=[]
+            this.form.setFieldsValue({businessBelongId:null})
+            for(let i = 0;i<res.result.length;i++){
+              if(res.result[i].cpType==2){
+                this.selectOption.options.push({label: res.result[i].abbreviation, value:res.result[i].id })
+                if(this.model.businessBelongId){
+                  this.isDisabled=true
+                  this.$nextTick(() => {
+                    this.form.setFieldsValue({ businessBelongId:this.model.businessBelongId})
+                  })
+                }
+              }
+            }
+          }
+        })
+      },
+
+
       
     }
   }