Commit f2c1724e authored by qinj's avatar qinj

Merge branch 'dev' of http://120.25.63.219:6088/rex/portalhtml into dev

parents c3b8615b a10c5ec3
......@@ -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({
......@@ -38,6 +40,15 @@ export function customerCreate(data) {
})
}
// 查询单条代理商信息
export function customerGetOne(data) {
return request({
url: '/customer/getOne',
method: 'post',
data
})
}
// 查询省
export function provinceSearch(data) {
return request({
......@@ -47,7 +58,6 @@ export function provinceSearch(data) {
})
}
// 查询市
export function citySearch(data){
return request({
......
......@@ -145,7 +145,7 @@ export default {
},
data() {
return {
getDeepFormDesc: null
getDeepFormDesc: null,
}
},
computed: {
......
......@@ -118,14 +118,14 @@
/>
</div>
<el-dropdown-menu slot="dropdown">
<router-link to="/profile/index">
<router-link to="/">
<el-dropdown-item>
{{ $t('navbar.profile') }}
{{ $t('navbar.dashboard') }}
</el-dropdown-item>
</router-link>
<router-link to="/">
<router-link to="/profile/index">
<el-dropdown-item>
{{ $t('navbar.dashboard') }}
{{ $t('navbar.profile') }}
</el-dropdown-item>
</router-link>
<router-link to="/changePass/index">
......
......@@ -27,12 +27,12 @@ const customersRouter = {
meta: {title: '代理商新增'},
hidden: true,
},
{
path: '/potential',
component: () => import('@/views/customers/potential-customers'),
name: 'PotentialCustomers',
meta: { title: 'potentialCustomers' }
},
// {
// path: '/potential',
// component: () => import('@/views/customers/potential-customers'),
// name: 'PotentialCustomers',
// meta: { title: 'potentialCustomers' }
// },
{
path: '/potential-list',
component: () => import('@/views/customers/potential-list'),
......@@ -40,13 +40,6 @@ const customersRouter = {
meta: {title: '省级代理商审批'},
hidden: true,
},
{
path: '/citypotential-list',
component: () => import('@/views/customers/citypotenial-list'),
name: 'CityPotenialList',
meta: {title: '城市代理商审批'},
hidden: true,
},
{
path: '/Provincial-agentList',
component: () => import('@/views/customers/provincial-agentList'),
......@@ -57,7 +50,25 @@ const customersRouter = {
path: '/Municipal-agentList',
component: () => import('@/views/customers/municipal-agentList'),
name: 'MunicipalAgentList',
meta: { title: '市级代理商' }
meta: { title: '城市代理商' }
},
{
path: '/potential',
component: () => import('@/views/customers/potential-customers'),
name: 'PotentialCustomers',
meta: { title: 'potentialCustomers' }
},
{
path: '/citypotential-list',
component: () => import('@/views/customers/citypotenial-list'),
name: 'CityPotenialList',
meta: {title: '城市代理商审批'},
hidden: true,
}, {
path: '/Personal-customers',
component: () => import('@/views/customers/personal-customers'),
name: 'PersonalCustomers',
meta: { title: '代理商信息' }
},
// {
// path: 'resource',
......
......@@ -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
<template>
<div class="form-container">
<Title :title="title">
<span>*</span>为必填项
</Title>
<div class="basic-info">
<ele-form-section
v-model="formData"
:request-fn="handleSubmit"
:rules="rules"
:sections="sections"
@request-success="handleSuccess"
/>
</div>
<PersonalInFo :objectId='objectId'/>
</div>
</template>
<script>
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,
districtSearch,
qccGetOne,
customerGetOne
},
data () {
return {
title: '代理商新增',
addBtnStart: false,
objectId: '',
formData: {},
isShowSubmitBtn: false,
isShowBackBtn: false,
sections: [
{
title: '基本信息',
formDesc: {
Name: {
type: 'input',
label: '公司全称',
layout: 16,
// code: 'qcc',
// displayKey:'Name',
disabled: true,
// btnTitle: '获取企查查信息',
// returnFn: function(row) {
// return {
// Name: row.Name,
// ExtSocialUnifiedCreditCode_SDK: row.CreditCode,
// ExtCorporateName_SDK: row.OperName
// }
// },
},
ExtSecondName_SDK: {
type: 'input',
label: '公司全称曾用名',
layout: 12,
disabled: true,
},
ExtSocialUnifiedCreditCode_SDK: {
type: 'input',
label: '社会统一信用代码',
layout: 12,
disabled: true
},
ExtRegisteredCapital_SDK: {
type: 'input',
label: '注册资本(万元)',
layout: 12,
default: '',
disabled: true,
},
ExtCorporateName_SDK: {
type: 'input',
label: '法人',
layout: 12,
disabled: true,
},
// Ext_QuoteOppotunity_KUT: {
// type: 'input',
// label: '税务登记编号',
// layout: 10
// },
}
},
{
title: '地址信息',
formDesc: {
ExtProvince_SDK: {
type: 'select',
label: '省份',
layout: 12,
disabled: true,
options: async data => {
const res = await provinceSearch({})
var result = res.results.map(item => {
return {
text: item.Name,
value: item.Code
}
})
return result
},
},
ExtCity_SDK: {
type: 'select',
label: '地市',
layout: 12,
isOptions: true,
disabled: true,
optionsLinkageFields: ['ExtProvince_SDK'],
options: async data => {
if (!data.ExtProvince_SDK) {
return []
}
const res = await citySearch({
provinceCode: data.ExtProvince_SDK
})
var result = res.results.map(item => {
return {
text: item.Name,
value: item.Code
}
})
return result
},
},
ExtDistrict_SDK: {
type: 'select',
label: '县市',
layout: 12,
isOptions: true,
disabled: true,
optionsLinkageFields: ['ExtProvince_SDK', 'ExtCity_SDK'],
options: async data => {
if (!data.ExtCity_SDK) {
return []
}
const res = await districtSearch({
cityCode: data.ExtCity_SDK
})
var result = res.results.map(item => {
return {
text: item.Name,
value: item.Code
}
})
return result
},
},
ExtAddressDetail_SDK: {
type: 'input',
label: '详细经营地址',
layout: 12,
disabled: true,
},
}
},
{
title: '联系信息',
formDesc: {
ExtLeader_SDK: {
type: 'input',
label: '公司负责人姓名',
disabled: true,
layout: 12
},
ExtLeaderPhone_SDK: {
type: 'input',
label: '公司负责人联系方式',
disabled: true,
layout: 12
},
ExtLeaderEmail_SDK: {
type: 'input',
label: '公司负责人邮箱',
layout: 12,
disabled: true
},
ExtUnis_SDK: {
type: 'input',
layout: 12,
label: 'Unis业务负责人姓名',
disabled: true
},
ExtUnisPhone_SDK: {
type: 'input',
layout: 12,
label: 'Unis业务负责人联系方式',
disabled: true
},
ExtUnisEmail_SDK: {
type: 'input',
label: 'Unis业务负责人邮箱',
layout: 12,
disabled: true
},
ExtBusiness_SDK: {
type: 'input',
layout: 12,
label: '商务负责人姓名',
disabled: true
},
ExtBusinessPhone_SDK: {
type: 'input',
layout: 12,
label: '商务负责人联系方式',
disabled: true
},
ExtBusinessEmail_SDK: {
type: 'input',
label: '商务负责人邮箱',
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)
// })
// }
// }
// },
created() {
this.getOneData()
},
methods: {
handleSubmit (data) {},
handleSuccess () {},
// 对象格式转化为键值对
paramsToFormData(obj) {
const formData = new FormData();
Object.keys(obj).forEach((key) => {
if (obj[key] instanceof Array) {
obj[key].forEach((item) => {
formData.append(key, item);
});
return;
}
formData.append(key, obj[key]);
});
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>
<style lang="scss" scoped>
::v-deep .el-row--flex {
display: -webkit-box;
.el-col-14 {
width: 90%;
}
}
::v-deep .ele-form-btns{
display: none;
}
.basic-info {
::v-deep .ele-form-btns{
.el-form-item__content {
margin-left: 40% !important;
}
}
}
.btn {
display: none;
}
</style>
......@@ -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')
......
......@@ -103,7 +103,6 @@
<el-button
:loading="loading"
type="primary"
icon="el-icon-check"
@click="handleNext"
>确定</el-button>
</div>
......@@ -337,6 +336,7 @@ export default {
})
} else {
this.$message.error('确认密码出错!!')
this.loading = false
}
},
......
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