Commit 852a9560 authored by jiangqihao's avatar jiangqihao

jqh

parent d1b2af3c
......@@ -21,6 +21,7 @@ export function getCustomer(data) {
data
})
}
// 查询全部代理商数据
export function getAllData(data) {
return request({
......@@ -29,6 +30,7 @@ export function getAllData(data) {
data
})
}
// 新增代理商
export function customerCreate(data) {
return request({
......
......@@ -145,7 +145,7 @@ export default {
},
data() {
return {
getDeepFormDesc: null
getDeepFormDesc: null,
}
},
computed: {
......
......@@ -3,7 +3,7 @@
<Title :title="title">
<span>*</span>为必填项
</Title>
<div class="basic-info">
<div class="basic-info" v-loading="loading">
<ele-form-section
v-model="formData"
:request-fn="handleSubmit"
......@@ -42,6 +42,7 @@ export default {
data () {
return {
title: '代理商新增',
loading: false,
addBtnStart: false,
objectId: '',
formData: {},
......@@ -67,28 +68,31 @@ export default {
ExtSecondName_SDK: {
type: 'input',
label: '公司全称曾用名',
layout: 10,
layout: 12,
},
ExtSocialUnifiedCreditCode_SDK: {
type: 'input',
label: '社会统一信用代码',
layout: 10
layout: 12,
disabled: true
},
ExtRegisteredCapital_SDK: {
type: 'input',
label: '注册资本(万元)',
layout: 10,
default: ''
layout: 12,
default: '',
disabled: true
},
ExtCorporateName_SDK: {
type: 'input',
label: '法人',
layout: 10,
layout: 12,
disabled: true
},
// Ext_QuoteOppotunity_KUT: {
// type: 'input',
// label: '税务登记编号',
// layout: 10
// layout: 12
// },
}
},
......@@ -98,7 +102,7 @@ export default {
ExtProvince_SDK: {
type: 'select',
label: '省份',
layout: 10,
layout: 12,
options: async data => {
const res = await provinceSearch({})
var result = res.results.map(item => {
......@@ -113,7 +117,7 @@ export default {
ExtCity_SDK: {
type: 'select',
label: '地市',
layout: 10,
layout: 12,
isOptions: true,
optionsLinkageFields: ['ExtProvince_SDK'],
options: async data => {
......@@ -135,7 +139,7 @@ export default {
ExtDistrict_SDK: {
type: 'select',
label: '县市',
layout: 10,
layout: 12,
isOptions: true,
optionsLinkageFields: ['ExtProvince_SDK', 'ExtCity_SDK'],
options: async data => {
......@@ -157,7 +161,7 @@ export default {
ExtAddressDetail_SDK: {
type: 'input',
label: '详细经营地址',
layout: 10,
layout: 12,
},
}
},
......@@ -167,47 +171,47 @@ export default {
ExtLeader_SDK: {
type: 'input',
label: '公司负责人姓名',
layout: 10
layout: 12
},
ExtLeaderPhone_SDK: {
type: 'input',
label: '公司负责人联系方式',
layout: 10
layout: 12
},
ExtLeaderEmail_SDK: {
type: 'input',
label: '公司负责人邮箱',
layout: 10
layout: 12
},
ExtUnis_SDK: {
type: 'input',
layout: 10,
layout: 12,
label: 'Unis业务负责人姓名'
},
ExtUnisPhone_SDK: {
type: 'input',
layout: 10,
layout: 12,
label: 'Unis业务负责人联系方式'
},
ExtUnisEmail_SDK: {
type: 'input',
label: 'Unis业务负责人邮箱',
layout: 10
layout: 12
},
ExtBusiness_SDK: {
type: 'input',
layout: 10,
layout: 12,
label: '商务负责人姓名'
},
ExtBusinessPhone_SDK: {
type: 'input',
layout: 10,
layout: 12,
label: '商务负责人联系方式'
},
ExtBusinessEmail_SDK: {
type: 'input',
label: '商务负责人邮箱',
layout: 10
layout: 12
},
}
}
......@@ -246,6 +250,7 @@ export default {
const formData = this.$translateToC4CData(data)
formData.extCustomerType_SDK = '121'
console.log(formData)
this.loading = true
customerCreate(this.paramsToFormData(formData)).then(res => {
this.addBtnStart = true
this.objectId = res.results
......@@ -255,6 +260,7 @@ export default {
query: { objectID: objectID, addBtnStart: false}
})
this.$message.success('创建成功')
this.loading = false
})
// return Promise.resolve()
},
......
......@@ -67,7 +67,7 @@ const tableConfig = {
icon: 'el-icon-edit-outline',
type: 'text'
}
}, i18n.t('table.edit')),
}, i18n.t('详情')),
// h('el-button', {
// on: {
// click: (e) => listeners.handleTakeEffect(scope.row, 'takeEffect')
......
......@@ -51,7 +51,7 @@ const tableConfig = {
icon: 'el-icon-edit-outline',
type: 'text'
}
}, i18n.t('table.edit')),
}, i18n.t('详情')),
// h('el-button', {
// on: {
// click: (e) => listeners.handleTakeEffect(scope.row, 'takeEffect')
......
<template>
<div>
<FileTable :type-code="typeCode" :objectID='objectId'/>
</div>
</template>
<script>
import { uploadCode } from '@/api/upload'
import FileTable from '@/views/public/file-info'
export default {
components: {
FileTable
},
props: {
// addBtnStart: {
// type: Boolean,
// default: false
// },
objectId: {
type: String,
default: ''
}
},
data() {
return {
typeCode: uploadCode.customer,
// addBtnStart: false
}
},
watch: {
// addBtnStart: {
// handler(newVal) {
// console.log(newVal)
// },
// immediate: true,
// deep: true
// },
objectId: {
handler(newVal) {
// constant.tableConfig.initialParams = {
// BusinessObjectID: newVal
// }
},
immediate: true,
deep: true
}
},
created() {
// this.addBtnStart = this.$route.query.addBtnStart
}
}
</script>
<style>
</style>
\ No newline at end of file
......@@ -12,8 +12,7 @@
@request-success="handleSuccess"
/>
</div>
<!-- <customerAddAddress :objectId='objectId' :form-data="$attrs['form-data']"/>
<customerAddAccessory :objectId='objectId' :form-data="$attrs['form-data']"/> -->
<PersonalInFo :objectId='objectId'/>
</div>
</template>
......@@ -21,10 +20,12 @@
import Title from '@/components/Title'
import { customerCreate, provinceSearch, citySearch, districtSearch, customerGetOne } from '@/api/customers';
import { qccGetOne } from '@/api/qcc'
import PersonalInFo from './conponents/personal-info'
export default {
components: {
Title,
PersonalInFo,
customerCreate,
provinceSearch,
citySearch,
......@@ -45,44 +46,44 @@ export default {
title: '基本信息',
formDesc: {
Name: {
type: 'lov',
type: 'input',
label: '公司全称',
layout: 16,
code: 'qcc',
displayKey:'Name',
// code: 'qcc',
// displayKey:'Name',
disabled: true,
btnTitle: '获取企查查信息',
returnFn: function(row) {
return {
Name: row.Name,
ExtSocialUnifiedCreditCode_SDK: row.CreditCode,
ExtCorporateName_SDK: row.OperName
}
},
// btnTitle: '获取企查查信息',
// returnFn: function(row) {
// return {
// Name: row.Name,
// ExtSocialUnifiedCreditCode_SDK: row.CreditCode,
// ExtCorporateName_SDK: row.OperName
// }
// },
},
ExtSecondName_SDK: {
type: 'input',
label: '公司全称曾用名',
layout: 10,
layout: 12,
disabled: true,
},
ExtSocialUnifiedCreditCode_SDK: {
type: 'input',
label: '社会统一信用代码',
layout: 10,
layout: 12,
disabled: true
},
ExtRegisteredCapital_SDK: {
type: 'input',
label: '注册资本(万元)',
layout: 10,
layout: 12,
default: '',
disabled: true,
},
ExtCorporateName_SDK: {
type: 'input',
label: '法人',
layout: 10,
layout: 12,
disabled: true,
},
// Ext_QuoteOppotunity_KUT: {
......@@ -98,7 +99,7 @@ export default {
ExtProvince_SDK: {
type: 'select',
label: '省份',
layout: 10,
layout: 12,
disabled: true,
options: async data => {
const res = await provinceSearch({})
......@@ -114,7 +115,7 @@ export default {
ExtCity_SDK: {
type: 'select',
label: '地市',
layout: 10,
layout: 12,
isOptions: true,
disabled: true,
optionsLinkageFields: ['ExtProvince_SDK'],
......@@ -137,7 +138,7 @@ export default {
ExtDistrict_SDK: {
type: 'select',
label: '县市',
layout: 10,
layout: 12,
isOptions: true,
disabled: true,
optionsLinkageFields: ['ExtProvince_SDK', 'ExtCity_SDK'],
......@@ -160,7 +161,7 @@ export default {
ExtAddressDetail_SDK: {
type: 'input',
label: '详细经营地址',
layout: 10,
layout: 12,
disabled: true,
},
}
......@@ -172,98 +173,125 @@ export default {
type: 'input',
label: '公司负责人姓名',
disabled: true,
layout: 10
layout: 12
},
ExtLeaderPhone_SDK: {
type: 'input',
label: '公司负责人联系方式',
disabled: true,
layout: 10
layout: 12
},
ExtLeaderEmail_SDK: {
type: 'input',
label: '公司负责人邮箱',
layout: 10,
layout: 12,
disabled: true
},
ExtUnis_SDK: {
type: 'input',
layout: 10,
layout: 12,
label: 'Unis业务负责人姓名',
disabled: true
},
ExtUnisPhone_SDK: {
type: 'input',
layout: 10,
layout: 12,
label: 'Unis业务负责人联系方式',
disabled: true
},
ExtUnisEmail_SDK: {
type: 'input',
label: 'Unis业务负责人邮箱',
layout: 10,
layout: 12,
disabled: true
},
ExtBusiness_SDK: {
type: 'input',
layout: 10,
layout: 12,
label: '商务负责人姓名',
disabled: true
},
ExtBusinessPhone_SDK: {
type: 'input',
layout: 10,
layout: 12,
label: '商务负责人联系方式',
disabled: true
},
ExtBusinessEmail_SDK: {
type: 'input',
label: '商务负责人邮箱',
layout: 10,
layout: 12,
disabled: true
},
}
},
{
title: "签约信息",
formDesc: {
ExtChannelType_SDK: {
type: 'input',
label: '签约渠道类型',
layout: 12,
disabled: true
},
ExtLockRsp_SDK: {
type: 'input',
label: '签约渠道类型',
layout: 12,
disabled: true
},
ExtLockCity_SDK: {
type: 'input',
label: '城市范围覆盖',
layout: 12,
disabled: true
},
}
},
{
title: "合作日期",
formDesc: {
ExtStartDate_SDK: {
type: 'input',
label: '初始合作开始时间',
layout: 12,
disabled: true
},
ExtAuthenticationDate_SDK: {
type: 'input',
label: '高级认证日期',
layout: 12,
disabled: true
},
ExtEndDate_SDK: {
type: 'input',
label: '合作终止日期',
layout: 12,
disabled: true
},
}
}
],
rules: {}
}
},
watch: {
'formData.ExtSocialUnifiedCreditCode_SDK': {
handler(newValue) {
console.log("单个属性监听", newValue)
qccGetOne({searchKey: newValue}).then(res =>{
this.sections[0].formDesc.ExtRegisteredCapital_SDK.default = res.results.Result.RegistCapi
console.log(this.sections[0].formDesc.ExtRegisteredCapital_SDK.default)
})
}
}
},
// watch: {
// 'formData.ExtSocialUnifiedCreditCode_SDK': {
// handler(newValue) {
// console.log("单个属性监听", newValue)
// qccGetOne({searchKey: newValue}).then(res =>{
// this.sections[0].formDesc.ExtRegisteredCapital_SDK.default = res.results.Result.RegistCapi
// console.log(this.sections[0].formDesc.ExtRegisteredCapital_SDK.default)
// })
// }
// }
// },
created() {
const perjectID = JSON.parse(localStorage.getItem('USERINFO'))
customerGetOne({objectID: perjectID.ObjectID}).then(res => {
console.log(res)
})
this.getOneData()
},
methods: {
handleSubmit (data) {
const formData = this.$translateToC4CData(data)
formData.extCustomerType_SDK = '121'
console.log(formData)
customerCreate(this.paramsToFormData(formData)).then(res => {
this.addBtnStart = true
this.objectId = res.results
const objectID = res.results
this.$router.push({
path: '/customersAdd',
query: { objectID: objectID, addBtnStart: false}
})
this.$message.success('创建成功')
})
// return Promise.resolve()
},
handleSuccess () {
// this.$message.success('创建成功')
},
handleSubmit (data) {},
handleSuccess () {},
// 对象格式转化为键值对
paramsToFormData(obj) {
const formData = new FormData();
......@@ -278,6 +306,13 @@ export default {
});
return formData;
},
getOneData() {
const dataId = JSON.parse(localStorage.getItem('USERINFO')).ExtCustomerObjectID_SDK
customerGetOne({ objectID: dataId }).then(res => {
this.formData = res.results[0]
console.log(res)
})
}
}
}
</script>
......@@ -289,6 +324,9 @@ export default {
width: 90%;
}
}
::v-deep .ele-form-btns{
display: none;
}
.basic-info {
::v-deep .ele-form-btns{
.el-form-item__content {
......
......@@ -51,7 +51,7 @@ const tableConfig = {
icon: 'el-icon-edit-outline',
type: 'text'
}
}, i18n.t('table.edit')),
}, i18n.t('详情')),
// h('el-button', {
// on: {
// click: (e) => listeners.handleTakeEffect(scope.row, 'takeEffect')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment