Commit 755af626 by Jianli Ou

对接切换企业所属分中心接口

parent b1b4ce2b
...@@ -49,6 +49,10 @@ const tycpdmfirmAudit = (params = {}) => { ...@@ -49,6 +49,10 @@ const tycpdmfirmAudit = (params = {}) => {
const tycpdmfirmChangeAuditList = (params = {}) => { const tycpdmfirmChangeAuditList = (params = {}) => {
return POST(`${Prefix}/office/tycpdmfirmchange/authApi/findlist`, params) return POST(`${Prefix}/office/tycpdmfirmchange/authApi/findlist`, params)
} }
// 切换所属分中心
const tycpdmfirmupdateSystem = (params = {}) => {
return POST(`${Prefix}/office/tycpdmfirm/authApi/updateSystem`, params)
}
export default { export default {
memberInfo, memberInfo,
saveMemberInfo, saveMemberInfo,
...@@ -60,5 +64,6 @@ export default { ...@@ -60,5 +64,6 @@ export default {
tycpdmfirmLogoutFlagCount, tycpdmfirmLogoutFlagCount,
tycpdmfirmAuditList, tycpdmfirmAuditList,
tycpdmfirmAudit, tycpdmfirmAudit,
tycpdmfirmChangeAuditList tycpdmfirmChangeAuditList,
tycpdmfirmupdateSystem
} }
...@@ -59,7 +59,7 @@ window.CodeTable.cascadeRegion = provinceList ...@@ -59,7 +59,7 @@ window.CodeTable.cascadeRegion = provinceList
// ADC4 - AdministrativeDivisionCode 行政区划代码前4位 // ADC4 - AdministrativeDivisionCode 行政区划代码前4位
// SDE - Exclusive(1) | Self-discipline(2) 排他(1) 或 自律(2) // SDE - Exclusive(1) | Self-discipline(2) 排他(1) 或 自律(2)
const ANCCBranches = {"head":[{"type":"string","label":"label"},{"type":"string","label":"value"},{"type":"string","label":"ADC4"},{"type":"int","label":"ESD"}],"body":[["北京分中心","1105"],["天津分中心","1201"],["河北分中心","1301"],["山西分中心","1405"],["内蒙古分中心","1505"],["辽宁分中心","2101"],["沈阳办事处","2105","2101",2],["大连办事处","2106","2102",1],["吉林分中心","2201"],["长春办事处","2205","2201",2],["黑龙江分中心","2301"],["哈尔滨办事处","2305","2301",1],["上海分中心","3101"],["江苏分中心","3201"],["南京办事处","3205","3201",1],["浙江分中心","3301"],["杭州分中心","3302","3301",2],["宁波分中心","3305","3302",1],["安徽分中心","3405"],["福建分中心","3501"],["厦门办事处","3505","3502",1],["江西分中心","3605"],["山东分中心","3701"],["青岛办事处","3705","3702",1],["烟台办事处","3706","3706",1],["河南分中心","4101"],["湖北分中心","4201"],["武汉分中心","4202","4201",1],["湖南分中心","4305"],["广东分中心","4401"],["深圳分中心","4402","4403",1],["广州分中心","4404","4401",2],["珠海办事处","4405","4404",1],["广西分中心","4505"],["海南分中心","4605"],["四川分中心","5101"],["成都办事处","5105","5101",2],["重庆分中心","5106",/^500\d{3}/],["贵州分中心","5205"],["云南分中心","5305"],["西藏分中心","5405"],["陕西分中心","6106"],["西安分中心","6107","6101",1],["甘肃分中心","6201"],["青海分中心","6305"],["宁夏分中心","6405"],["新疆分中心","6501"],["新疆分中心","0",/^(?:71|81|82)0{4}/]]} const ANCCBranches = {"head":[{"type":"string","label":"label"},{"type":"string","label":"value"},{"type":"string","label":"ADC4"},{"type":"int","label":"ESD"}],"body":[["北京分中心","1105"],["天津分中心","1201"],["河北分中心","1301"],["山西分中心","1405"],["内蒙古分中心","1505"],["辽宁分中心","2101"],["沈阳办事处","2105","2101",2],["大连办事处","2106","2102",1],["吉林分中心","2201"],["长春办事处","2205","2201",2],["黑龙江分中心","2301"],["哈尔滨办事处","2305","2301",1],["上海分中心","3101"],["江苏分中心","3201"],["南京办事处","3205","3201",1],["浙江分中心","3301"],["杭州分中心","3302","3301",2],["宁波分中心","3305","3302",1],["安徽分中心","3405"],["福建分中心","3501"],["厦门办事处","3505","3502",1],["江西分中心","3605"],["山东分中心","3701"],["青岛办事处","3705","3702",1],["烟台办事处","3706","3706",1],["河南分中心","4101"],["湖北分中心","4201"],["武汉分中心","4202","4201",1],["湖南分中心","4305"],["广东分中心","4401"],["深圳分中心","4402","4403",1],["广州分中心","4404","4401",2],["珠海办事处","4405","4404",1],["广西分中心","4505"],["海南分中心","4605"],["四川分中心","5101"],["成都办事处","5105","5101",2],["重庆分中心","5106",/^500\d{3}/],["贵州分中心","5205"],["云南分中心","5305"],["西藏分中心","5405"],["陕西分中心","6106"],["西安分中心","6107","6101",1],["甘肃分中心","6201"],["青海分中心","6305"],["宁夏分中心","6405"],["新疆分中心","6501"],["新疆分中心","0",/^(?:71|81|82)0{4}/]]}
window.CodeTable.ANCCBranches = ANCCBranches window.CodeTable.ANCCBranches = ANCCBranches.body.map(item => ({label: item[0], value: item[1]}))
window.CodeTable.getBranches = function (selectValue='') { window.CodeTable.getBranches = function (selectValue='') {
// console.log(selectValue) // console.log(selectValue)
const slice2Value = selectValue.slice(0, 2) const slice2Value = selectValue.slice(0, 2)
......
...@@ -2,7 +2,18 @@ ...@@ -2,7 +2,18 @@
<div class="gs-admin-certification-detail"> <div class="gs-admin-certification-detail">
<div class="to-sub-center" v-if="subCenter"> <div class="to-sub-center" v-if="subCenter">
企业所属分中心:{{ subCenterName }} 企业所属分中心:{{ subCenterName }}
<el-button type="primary" size="mini">切换企业所属分中心</el-button> <el-popover
placement="left"
width="300"
height="500"
trigger="manual"
v-model="visible">
<el-button slot="reference" @click="visible = !visible" type="primary" size="mini">切换企业所属分中心</el-button>
<el-select size="mini" v-model="branchCode" placeholder="请选择分中心">
<el-option v-for="item in branchList" :label="item.label" :value="item.value" :key="item.value"></el-option>
</el-select>
<el-button @click="updateSystem" type="primary" size="mini" style="margin-left: 15px;">确定</el-button>
</el-popover>
</div> </div>
<div class="card_wrapper"> <div class="card_wrapper">
<div class="title">{{ title }} <div class="title">{{ title }}
...@@ -57,6 +68,9 @@ export default { ...@@ -57,6 +68,9 @@ export default {
}, },
data() { data() {
return { return {
visible: false,
branchList: window.CodeTable.ANCCBranches,
branchCode: '',
subCenterName: '广东分中心', subCenterName: '广东分中心',
// 原静态页面定义数据 // 原静态页面定义数据
// entInfoFields: [ // entInfoFields: [
...@@ -371,6 +385,22 @@ export default { ...@@ -371,6 +385,22 @@ export default {
handleBack() { handleBack() {
this.$emit('back') this.$emit('back')
}, },
async updateSystem() {
const form = {
id: this.$route.query.type === 'new' ? this.detailInfo.fid : this.detailInfo.id,
status: this.$route.query.type === 'new' ? 1 : 2,
branchCode: this.branchCode
}
const result = await this.$api.myManage.tycpdmfirmupdateSystem(form)
console.log(result)
if (result.success) {
this.$message.success('请求成功')
this.subCenterName = (this.branchList.find(item => item.value === this.branchCode) || {label: '--'}).label
this.visible = false
} else {
this.$message.error('请求失败')
}
},
async auditEvent (auditStatus) { async auditEvent (auditStatus) {
const form = { const form = {
id: this.$route.query.type === 'new' ? this.detailInfo.fid : this.detailInfo.id, id: this.$route.query.type === 'new' ? this.detailInfo.fid : this.detailInfo.id,
......
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