|
@@ -1,11 +1,11 @@
|
|
|
<template>
|
|
|
- <basicDetails
|
|
|
+ <basicDetails
|
|
|
style="min-width:80vw"
|
|
|
ref="details"
|
|
|
:titleText="mainData.enterprisename"
|
|
|
formPath="marketing2/agent"
|
|
|
:editData="mainData"
|
|
|
- :mainAreaData="mainAreaData"
|
|
|
+ :mainAreaData="mainAreaData"
|
|
|
turnPageId="20221011144903"
|
|
|
idname="sa_agentsid"
|
|
|
:tags="[]"
|
|
@@ -18,7 +18,7 @@
|
|
|
</div>
|
|
|
<div slot="customOperation">
|
|
|
<!-- 此区域提供了自定义操作按钮 -->
|
|
|
- <customBtn
|
|
|
+ <customBtn
|
|
|
btnName="启 用"
|
|
|
message="确认启用当前经销商吗?"
|
|
|
idName="20230212101703"
|
|
@@ -29,7 +29,7 @@
|
|
|
:paramData="[{key:'status',value:'启用'}]"
|
|
|
v-if="mainData.status == '禁用' && tool.checkAuth($route.name,'handleused')"
|
|
|
/>
|
|
|
- <customBtn
|
|
|
+ <customBtn
|
|
|
btnName="禁 用"
|
|
|
message="确认禁用当前经销商吗?"
|
|
|
idName="20230212101703"
|
|
@@ -40,7 +40,7 @@
|
|
|
:paramData="[{key:'status',value:'禁用'}]"
|
|
|
v-if="mainData.status == '启用' && tool.checkAuth($route.name,'handleused')"
|
|
|
/>
|
|
|
- <customBtn
|
|
|
+ <customBtn
|
|
|
btnName="作 废"
|
|
|
:dialog="true"
|
|
|
message="确认删除当前经销商吗?"
|
|
@@ -159,12 +159,13 @@ export default {
|
|
|
"classname": "webmanage.sale.agents.agents",
|
|
|
"method": "query_agentMain",
|
|
|
"content": {
|
|
|
+ "nocache":true,
|
|
|
"sa_agentsid": this.$route.query.id
|
|
|
}
|
|
|
})
|
|
|
this.mainData = res.data
|
|
|
console.log(this.mainData);
|
|
|
-
|
|
|
+
|
|
|
this.$refs['details'].param.content.containssub = 1
|
|
|
this.$refs['details'].param.content.sa_saleareaids = [this.mainData.sa_saleareaid]
|
|
|
this.changeDataStructure()
|
|
@@ -226,7 +227,7 @@ export default {
|
|
|
label:'企业名称',
|
|
|
value: this.mainData.enterprisename
|
|
|
},*/
|
|
|
-
|
|
|
+
|
|
|
{
|
|
|
label:'省市县',
|
|
|
value: `${this.mainData.province}-${this.mainData.city}-${this.mainData.county}`
|
|
@@ -266,30 +267,36 @@ export default {
|
|
|
]
|
|
|
},
|
|
|
createAgentAccount () {
|
|
|
- this.$confirm('是否继续创建团队账户?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(async () => {
|
|
|
- const res = await this.$api.requested({
|
|
|
- "id": 20220920084301,
|
|
|
- "content": {
|
|
|
- "sys_enterpriseid":this.mainData.sys_enterpriseid
|
|
|
- }
|
|
|
- })
|
|
|
- this.tool.showMessage(res,()=>{
|
|
|
- this.queryMainData()
|
|
|
- })
|
|
|
- /*this.$message({
|
|
|
- type: 'success',
|
|
|
- message: '创建成功!'
|
|
|
- });*/
|
|
|
- }).catch(() => {
|
|
|
- this.$message({
|
|
|
- type: 'info',
|
|
|
- message: '取消创建'
|
|
|
+ console.log(this.mainData)
|
|
|
+ if (this.mainData.contact && this.mainData.phonenumber){
|
|
|
+ this.$confirm('是否继续创建团队账户?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20220920084301,
|
|
|
+ "content": {
|
|
|
+ "sys_enterpriseid":this.mainData.sys_enterpriseid
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.queryMainData()
|
|
|
+ })
|
|
|
+ /*this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '创建成功!'
|
|
|
+ });*/
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '取消创建'
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
+ }else {
|
|
|
+ this.$message.error('联系人和手机号信息缺失,请去企业档案完善后再进行操作');
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
@@ -305,4 +312,4 @@ export default {
|
|
|
|
|
|
</script>
|
|
|
<style>
|
|
|
-</style>
|
|
|
+</style>
|