Commit c53ad255 authored by qinj's avatar qinj

城市代理商审批

parent 4f3cadd4
......@@ -99,6 +99,14 @@ export function ProcessApproval(data){
data
})
}
//审批流程历史记录
export function processHistory(data){
return request({
url: '/processHistory/searchAll',
method: 'post',
data
})
}
// // 客户发布记录
// export const releaseRecord = {
// createUrl: '/releaserecord/create',
......
......@@ -37,7 +37,14 @@ const customersRouter = {
path: '/potential-list',
component: () => import('@/views/customers/potential-list'),
name: 'PotentialList',
meta: {title: '代理商审批'},
meta: {title: '省级代理商审批'},
hidden: true,
},
{
path: '/citypotential-list',
component: () => import('@/views/customers/citypotenial-list'),
name: 'CityPotenialList',
meta: {title: '城市代理商审批'},
hidden: true,
},
{
......
<template>
<div class="form-container">
<Title :title="title">
<span>*</span>为必填项
</Title>
<div class="basic-info">
<ele-form-section
v-model="formData"
:rules="rules"
:sections="sections"
/>
<div class="table-contain">
<div class="form-container">审批意见</div>
<div class="btn">
<el-button type="primary" @click="approve">审批</el-button>
<el-button type="" @click="reject">退回</el-button>
</div>
<el-table :data="tableData"
border
style="width: 100%">
<el-table-column prop="Status"
label="审批节点">
</el-table-column>
<el-table-column prop="Name"
label="审批结果">
</el-table-column>
<el-table-column prop="OperName"
label="审批时间">
</el-table-column>
<el-table-column prop="CreditCode"
label="备注">
</el-table-column>
</el-table>
<pagination v-show="TotalRecords>0"
:total="TotalRecords"
:page.sync="page.currentPage"
:limit.sync="page.pageSize"
@pagination="getList" />
</div>
<el-dialog title="审批意见" :visible.sync="dialogFormVisible">
<el-form :model="form">
<el-form-item label-width=500>
<el-input v-model="form.note" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
<el-button type="primary" @click="approveClick">确 定</el-button>
</div>
</el-dialog>
</div>
</div>
</template>
<script>
import Title from '@/components/Title'
import { getCustomer,typeSearch,lockRsp,ProcessApproval,processHistory } from '@/api/customers';
import Pagination from '@/components/Pagination'
export default {
components: {
Pagination,
Title,
},
data () {
return {
form:{},
dialogFormVisible:false,
title: '城市代理商审批',
addBtnStart: false,
objectId: '',
id:'',
status:0,
formData: {},
province: [],
sections: [
{
title: '基本信息',
formDesc: {
Name: {
type: 'input',
label: '公司全称',
layout: 24,
code: 'qcc',
disabled:true,
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: '社会统一信用代码',
disabled:true,
layout: 12
},
ExtRegisteredCapital_SDK: {
type: 'input',
label: '注册资本(万元)',
disabled:true,
layout: 12,
},
ExtCorporateName_SDK: {
type: 'input',
label: '法人',
disabled:true,
layout: 12,
},
// Ext_QuoteOppotunity_KUT: {
// type: 'input',
// label: '税务登记编号',
// layout: 12
// },
}
},
{
title: '地址信息',
formDesc: {
ExtProvince_SDK: {
type: 'input',
label: '省份',
layout: 12,
disabled:true,
},
ExtCity_SDK: {
type: 'input',
label: '城市',
layout: 12,
isOptions: true,
disabled:true,
},
ExtDistrict_SDK: {
type: 'input',
label: '县市',
layout: 12,
isOptions: true,
disabled:true,
},
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: '公司负责人邮箱',
disabled:true,
layout: 12
},
ExtUnis_SDK: {
type: 'input',
layout: 12,
disabled:true,
label: 'Unis业务负责人姓名'
},
ExtUnisPhone_SDK: {
type: 'input',
layout: 12,
disabled:true,
label: 'Unis业务负责人联系方式'
},
ExtUnisEmail_SDK: {
type: 'input',
disabled:true,
label: 'Unis业务负责人邮箱',
layout: 12
},
ExtBusiness_SDK: {
type: 'input',
layout: 12,
disabled:true,
label: '商务负责人姓名'
},
ExtBusinessPhone_SDK: {
type: 'input',
layout: 12,
disabled:true,
label: '商务负责人联系方式'
},
ExtBusinessEmail_SDK: {
type: 'input',
disabled:true,
label: '商务负责人邮箱',
layout: 12
},
}
},
{
title: '签约信息',
formDesc: {
ExtChannelType_SDK : {
type: 'select',
label: '签约渠道类型',
layout: 12,
options: async data => {
const res = await typeSearch({code:'ExtChannelType_SDK',module:'Customer'})
var result = res.map(item => {
return {
text: item.content,
value: item.keyword
}
})
return result
},
},
ExtLockRsp_SDK: {
type: 'select',
label: '锁定RSP',
layout: 12,
isOptions: true,
},
ExtLockCity_SDK: {
type: 'select',
label: '覆盖范围(城市)',
layout: 12,
},
}
},
{
title: '合作日期',
formDesc: {
extStartDate_SDK: {
type: 'date',
label: '初始合作开始时间',
layout: 12
},
extAuthenticationDate_SDK: {
type: 'date',
label: '高级认证日期',
layout: 12
},
extEndDate_SDK: {
type: 'date',
label: '合作终止日期',
layout: 12
},
}
},
],
tableData:[],
TotalRecords:0,
page:{},
// 同 vue-ele-form
rules: {
Name: {required: true, message: '名称必填'},
ExtSocialUnifiedCreditCode_SDK: { required: true, message: '名称必填' },
ExtSocialUnifiedCreditCode_SDK: { required: true, message: '名称必填' },
ExtRegisteredCapital_SDK: {required: true, message: '名称必填' },
ExtCorporateName_SDK: { required: true, message: '名称必填' },
}
}
},
watch:{
},
created(){
this.id=this.$route.query.id
this.getList()
this.getHistoryList()
},
methods: {
getList(){
getCustomer({objectID:this.id}).then((resp)=>{
this.formData=resp.results[0]
})
},
getHistoryList(){
processHistory({businessObjectID:this.id}).then((resp)=>{
this.tableData=resp.results
})
},
selectList(){
lockRsp({ExtProvince_SDK: this.formData.ExtProvince_SDK}).then((resp)=>{
console.log('ddddd',resp)
})
},
handleSuccess () {
// this.$message.success('创建成功')
},
approve(){
this.dialogFormVisible=true
this.status=1
},
reject(){
this.dialogFormVisible=true
this.status=2
},
approveClick(){
const cc={extProcessNode_SDK:this.formData.ExtProcessNode_SDK,
extCustomerType_SDK:this.formData.ExtCustomerType_SDK,
extProvince_SDK:this.formData.ExtProvince_SDK,
objectID:this.formData.ObjectID,
extLockRsp_SDK:this.formData.extLockRsp_SDK,
extLockCity_SDK:this.formData.ExtLockCity_SDK,
extChannelType_SDK:this.formData.ExtChannelType_SDK}
if(this.status==1){
const add={customerDTO:cc,note:this.form.note,result:"approve"}
ProcessApproval(add).then((resp)=>{
this.$message.success("审批成功!")
this.dialogFormVisible=false
this.$router.back()
})
}else{
const bdd={customerDTO:cc,note:this.form.note,result:"reject"}
ProcessApproval(bdd).then((resp)=>{
this.$message.success("退回成功!")
this.dialogFormVisible=false
this.$router.back()
})
}
},
// 对象格式转化为键值对
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;
},
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-row--flex {
display: -webkit-box;
.el-col-14 {
width: 90%;
}
}
.basic-info {
::v-deep .ele-form-btns{
.el-form-item__content {
display: none;
}
}
}
.btn {
margin-left: 45%;
margin-bottom: 8px;
}
.table-contain {
padding: 0 80px 0 20px;
margin-left: 65px;
background: #fff;
border-radius: 2px;
}
</style>
......@@ -11,7 +11,6 @@
<ele-table
ref="eleTable"
v-bind="tableConfig"
:expand-params="expandParams"
:listeners="tableListeners"
/>
......@@ -27,7 +26,6 @@ export default {
inject: ['reload'],
data() {
return {
expandParams: {}, // 筛选条件
tableListeners: {}, // 事件监听对象,供ele-table内部调用
tableConfig: constant
}
......@@ -43,7 +41,12 @@ export default {
methods: {
// 编辑
handleEdit(val) {
this.$router.push({ path: '/potential-list',query:{id:val.ObjectID} })
if(val.ExtCustomerType_SDK=='101'){
this.$router.push({ path: '/potential-list',query:{id:val.ObjectID} })
}else{
this.$router.push({ path: '/citypotential-list',query:{id:val.ObjectID} })
}
},
}
......
......@@ -8,10 +8,46 @@
v-model="formData"
:rules="rules"
:sections="sections"
/>
<div class="btn">
>
<template v-slot:ExtLockCity_SDK="{ formData }">
<!-- 插槽内容有el-form-item组件包裹 -->
<el-select v-model="formData.ExtLockCity_SDK" style="width: 91%" multiple filterable placeholder="请选择" no-match-text="无匹配数据">
<el-option
v-for="item in province"
:key="item.AccountID"
:label="item.Name"
:value="item.ExtSocialUnifiedCreditCode_SDK"
/>
</el-select>
</template>
</ele-form-section>
<div class="table-contain">
<div class="form-container">审批意见</div>
<div class="btn">
<el-button type="primary" @click="approve">审批</el-button>
<el-button type="" @click="reject">退回</el-button>
</div>
<el-table :data="tableData"
border
style="width: 100%">
<el-table-column prop="Status"
label="审批节点">
</el-table-column>
<el-table-column prop="Name"
label="审批结果">
</el-table-column>
<el-table-column prop="OperName"
label="审批时间">
</el-table-column>
<el-table-column prop="CreditCode"
label="备注">
</el-table-column>
</el-table>
<pagination v-show="TotalRecords>0"
:total="TotalRecords"
:page.sync="page.currentPage"
:limit.sync="page.pageSize"
@pagination="getList" />
</div>
<el-dialog title="审批意见" :visible.sync="dialogFormVisible">
<el-form :model="form">
......@@ -31,22 +67,19 @@
<script>
import Title from '@/components/Title'
import { customerCreate, provinceSearch, citySearch, districtSearch,getCustomer,typeSearch,lockRsp,ProcessApproval } from '@/api/customers';
import { getCustomer,typeSearch,lockRsp,ProcessApproval,processHistory, province } from '@/api/customers';
import { Country } from '@/api/qcc'
import Pagination from '@/components/Pagination'
export default {
components: {
Pagination,
Title,
customerCreate,
provinceSearch,
citySearch,
districtSearch
},
data () {
return {
form:{},
dialogFormVisible:false,
title: '代理商审批',
title: '省级代理商审批',
addBtnStart: false,
objectId: '',
id:'',
......@@ -106,66 +139,27 @@ export default {
title: '地址信息',
formDesc: {
ExtProvince_SDK: {
type: 'select',
type: 'input',
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',
type: 'input',
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',
type: 'input',
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',
......@@ -238,51 +232,28 @@ export default {
title: '签约信息',
formDesc: {
ExtChannelType_SDK : {
type: 'select',
type: 'input',
label: '签约渠道类型',
layout: 12,
options: async data => {
const res = await typeSearch({code:'ExtChannelType_SDK',module:'Customer'})
var result = res.map(item => {
return {
text: item.content,
value: item.keyword
}
})
return result
},
disabled:true
},
ExtLockRsp_SDK: {
type: 'select',
label: '锁定RSP',
type: 'input',
label: '签约产品组',
layout: 12,
isOptions: true,
options: [
// async data => {
// const res = await lockRsp({
// ExtProvinceCode_SDK: data.ExtProvinceCode_SDK
// })
// var result = res.results.map(item => {
// return {
// text: item.Name,
// value: item.Code
// }
// })
// return result
// },
],
attrs: {
multiple: true
}
disabled:true
},
ExtTotalAgent_SDK: {
type: 'input',
label: '签约总代',
layout: 12,
disabled:true
},
ExtLockCity_SDK: {
type: 'select',
label: '覆盖范围(城市)',
layout: 12,
isOptions: true,
options: []
},
}
},
{
......@@ -292,22 +263,23 @@ export default {
extStartDate_SDK: {
type: 'date',
label: '初始合作开始时间',
layout: 12
},
extAuthenticationDate_SDK: {
type: 'date',
label: '高级认证日期',
layout: 12
layout: 12,
disabled:true
},
extEndDate_SDK: {
type: 'date',
label: '合作终止日期',
layout: 12
layout: 12,
disabled:true
},
}
},
],
tableData:[],
TotalRecords:0,
page:{},
// 同 vue-ele-form
rules: {
Name: {required: true, message: '名称必填'},
......@@ -320,23 +292,36 @@ export default {
}
},
watch:{
// province:{
// handler(newVal,oldVal){
// this.province=newVal
// },
// deep:true
// }
},
created(){
this.id=this.$route.query.id
this.getList()
// this.selectList()
this.getHistoryList()
},
methods: {
getList(){
getCustomer({objectID:this.id}).then((resp)=>{
this.formData=resp.results[0]
// lockRsp({extProvince_SDK: resp.results[0].ExtProvince_SDK}).then((resp)=>{
// this.province=resp.results
// })
const app={provinceCode:resp.results[0].ExtProvince_SDK}
this.$request(Country.searchCity,app).then((resp) => {
this.province=resp.results
})
})
},
selectList(){
lockRsp({ExtProvince_SDK: this.formData.ExtProvince_SDK}).then((resp)=>{
console.log('ddddd',resp)
getHistoryList(){
processHistory({businessObjectID:this.id}).then((resp)=>{
this.tableData=resp.results
})
},
handleSuccess () {
......@@ -363,12 +348,14 @@ extChannelType_SDK:this.formData.ExtChannelType_SDK}
ProcessApproval(add).then((resp)=>{
this.$message.success("审批成功!")
this.dialogFormVisible=false
this.$router.back()
})
}else{
const bdd={customerDTO:cc,note:this.form.note,result:"reject"}
ProcessApproval(bdd).then((resp)=>{
this.$message.success("退回成功!")
this.dialogFormVisible=false
this.$router.back()
})
}
......@@ -407,5 +394,12 @@ extChannelType_SDK:this.formData.ExtChannelType_SDK}
}
.btn {
margin-left: 45%;
margin-bottom: 8px;
}
.table-contain {
padding: 0 80px 0 20px;
margin-left: 65px;
background: #fff;
border-radius: 2px;
}
</style>
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