|
|
@@ -61,7 +61,10 @@
|
|
|
<a-input v-decorator="[ 'contactPhone', validatorRules.contactPhone]" placeholder="请输入联系电话"></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>
|
|
|
|
|
|
|
|
|
|
|
|
@@ -78,7 +81,7 @@
|
|
|
|
|
|
<script>
|
|
|
|
|
|
- import { httpAction } from '@/api/manage'
|
|
|
+ import { httpAction,putAction } from '@/api/manage'
|
|
|
import pick from 'lodash.pick'
|
|
|
import JDate from '@/components/jeecg/JDate'
|
|
|
import JDictSelectTag from '@/components/dict/JDictSelectTag'
|
|
|
@@ -87,6 +90,8 @@
|
|
|
import { duplicateCheck } from '@/api/api'
|
|
|
import Vue from 'vue'
|
|
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
|
|
+ // 引入搜索服务商弹出框的组件
|
|
|
+ const findList = (params) => putAction('/platmanager/hwPlatform/applicationSubList', params)
|
|
|
|
|
|
export default {
|
|
|
name: 'HwPlatformModal',
|
|
|
@@ -96,6 +101,12 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ selectOption: {
|
|
|
+ options: [
|
|
|
+
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ isDisabled:false,
|
|
|
disableSubmit:false,
|
|
|
arr:[], //存放回显默认省市区code
|
|
|
provArray: [], //存放省
|
|
|
@@ -144,7 +155,8 @@
|
|
|
isDataShare: { rules: [{ required: true, message: '请输入是否数据共享' }] },
|
|
|
startDate: { rules: [{ required: true, message: '请输入开始时间!' }] },
|
|
|
endDate: { rules: [{ required: true, message: '请输入结束时间!' }] },
|
|
|
- status: { rules: [{ required: true, message: '请输入状态' }] }
|
|
|
+ status: { rules: [{ required: true, message: '请输入状态' }] },
|
|
|
+ businessBelongId:{ rules: [{ required: true, message: '请选择业务归属' }] }
|
|
|
},
|
|
|
url: {
|
|
|
add: '/platmanager/hwPlatform/add',
|
|
|
@@ -208,14 +220,16 @@
|
|
|
this.edit({})
|
|
|
},
|
|
|
edit(record) {
|
|
|
+ this.isDisabled=false;
|
|
|
this.form.resetFields()
|
|
|
this.model = Object.assign({}, record)
|
|
|
+ this.querySubcontratorList()
|
|
|
if (record.hasOwnProperty('id')) {
|
|
|
this.picUrl = 'Has no pic url yet'
|
|
|
}
|
|
|
this.visible = true
|
|
|
this.$nextTick(() => {
|
|
|
- this.form.setFieldsValue(pick(this.model, 'id','platformName', 'enterpriseName', 'provinceCode', 'cityCode', 'countryCode', 'provinceCityCountry', 'address', 'contactPerson', 'contactPhone', 'isDataShare', 'startDate', 'endDate', 'status','dutyParagraph','businessLicense'))
|
|
|
+ this.form.setFieldsValue(pick(this.model, 'id','platformName', 'enterpriseName', 'provinceCode','businessBelongId','businessBelong','isShare', 'cityCode', 'countryCode', 'provinceCityCountry', 'address', 'contactPerson', 'contactPhone', 'isDataShare', 'startDate', 'endDate', 'status','dutyParagraph','businessLicense'))
|
|
|
this.form.setFieldsValue({ status:this.model.status!=null? String(this.model.status):''})
|
|
|
})
|
|
|
//回显省市区
|
|
|
@@ -357,6 +371,39 @@
|
|
|
return this.url.imgerver + this.model.businessLicense
|
|
|
},
|
|
|
|
|
|
+ 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})
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</script>
|