浏览代码

企业档案调整

qymljy 2 年之前
父节点
当前提交
665ef3a652

+ 4 - 4
src/Form/EnterpriseArchives/add.vue

@@ -128,19 +128,19 @@ export default {
           { required: true, message: '输入企业名称', trigger: 'blur' },
           { required: true, message: '输入企业名称', trigger: 'blur' },
         ],
         ],
         contact: [
         contact: [
-          { required: true, message: '输入企业联系人', trigger: 'blur' },
+          { required: false, message: '输入企业联系人', trigger: 'blur' },
         ],
         ],
         phonenumber: [
         phonenumber: [
-          { required: true, message: '输入联系电话', trigger: 'blur' },
+          { required: false, message: '输入联系电话', trigger: 'blur' },
         ],
         ],
         taxno: [
         taxno: [
           { required: true, message: '输入税号', trigger: 'blur' },
           { required: true, message: '输入税号', trigger: 'blur' },
         ],
         ],
         province: [
         province: [
-          { required: true, message: '选择省市县', trigger: 'change' },
+          { required: false, message: '选择省市县', trigger: 'change' },
         ],
         ],
         address:[
         address:[
-          { required: true, message: '输入详细地址', trigger: 'blur' },
+          { required: false, message: '输入详细地址', trigger: 'blur' },
         ],
         ],
         freefreightamount:[
         freefreightamount:[
           {type:'number',message:'请输入数字',trigger:'blur'}
           {type:'number',message:'请输入数字',trigger:'blur'}

+ 5 - 5
src/Form/marketing2/agent/edit.vue

@@ -146,7 +146,7 @@
               <el-checkbox v-model="form.isorder" :true-label="1" :false-label="0"></el-checkbox>
               <el-checkbox v-model="form.isorder" :true-label="1" :false-label="0"></el-checkbox>
             </el-form-item>
             </el-form-item>
           </el-col> -->
           </el-col> -->
-            
+
           </el-form>
           </el-form>
         </el-row>
         </el-row>
       </div>
       </div>
@@ -259,7 +259,7 @@ export default {
           this.radio = 1
           this.radio = 1
           break;
           break;
       }
       }
-     
+
     },
     },
     async queryEnterpriseArchives () {
     async queryEnterpriseArchives () {
       const res = await this.$api.requested({
       const res = await this.$api.requested({
@@ -366,9 +366,9 @@ export default {
       const res = await this.$store.dispatch('optiontypeselect','tradefield')
       const res = await this.$store.dispatch('optiontypeselect','tradefield')
       this.field = res.data
       this.field = res.data
     },
     },
-   
+
   },
   },
-  
+
 }
 }
 
 
 </script>
 </script>
@@ -398,4 +398,4 @@ export default {
   display: flex;
   display: flex;
   flex-wrap: wrap;
   flex-wrap: wrap;
 }
 }
-</style>
+</style>

+ 38 - 31
src/HManagement/marketing2/agent/details/index.vue

@@ -1,11 +1,11 @@
 <template>
 <template>
-  <basicDetails 
+  <basicDetails
     style="min-width:80vw"
     style="min-width:80vw"
     ref="details"
     ref="details"
     :titleText="mainData.enterprisename"
     :titleText="mainData.enterprisename"
     formPath="marketing2/agent"
     formPath="marketing2/agent"
     :editData="mainData"
     :editData="mainData"
-    :mainAreaData="mainAreaData" 
+    :mainAreaData="mainAreaData"
     turnPageId="20221011144903"
     turnPageId="20221011144903"
     idname="sa_agentsid"
     idname="sa_agentsid"
     :tags="[]"
     :tags="[]"
@@ -18,7 +18,7 @@
     </div>
     </div>
     <div slot="customOperation">
     <div slot="customOperation">
       <!-- 此区域提供了自定义操作按钮 -->
       <!-- 此区域提供了自定义操作按钮 -->
-      <customBtn 
+      <customBtn
           btnName="启 用"
           btnName="启 用"
           message="确认启用当前经销商吗?"
           message="确认启用当前经销商吗?"
           idName="20230212101703"
           idName="20230212101703"
@@ -29,7 +29,7 @@
           :paramData="[{key:'status',value:'启用'}]"
           :paramData="[{key:'status',value:'启用'}]"
           v-if="mainData.status == '禁用' && tool.checkAuth($route.name,'handleused')"
           v-if="mainData.status == '禁用' && tool.checkAuth($route.name,'handleused')"
         />
         />
-        <customBtn 
+        <customBtn
           btnName="禁 用"
           btnName="禁 用"
           message="确认禁用当前经销商吗?"
           message="确认禁用当前经销商吗?"
           idName="20230212101703"
           idName="20230212101703"
@@ -40,7 +40,7 @@
           :paramData="[{key:'status',value:'禁用'}]"
           :paramData="[{key:'status',value:'禁用'}]"
           v-if="mainData.status == '启用' && tool.checkAuth($route.name,'handleused')"
           v-if="mainData.status == '启用' && tool.checkAuth($route.name,'handleused')"
         />
         />
-        <customBtn 
+        <customBtn
           btnName="作 废"
           btnName="作 废"
           :dialog="true"
           :dialog="true"
           message="确认删除当前经销商吗?"
           message="确认删除当前经销商吗?"
@@ -159,12 +159,13 @@ export default {
         "classname": "webmanage.sale.agents.agents",
         "classname": "webmanage.sale.agents.agents",
         "method": "query_agentMain",
         "method": "query_agentMain",
         "content": {
         "content": {
+          "nocache":true,
           "sa_agentsid": this.$route.query.id
           "sa_agentsid": this.$route.query.id
         }
         }
       })
       })
       this.mainData = res.data
       this.mainData = res.data
       console.log(this.mainData);
       console.log(this.mainData);
-      
+
       this.$refs['details'].param.content.containssub = 1
       this.$refs['details'].param.content.containssub = 1
       this.$refs['details'].param.content.sa_saleareaids = [this.mainData.sa_saleareaid]
       this.$refs['details'].param.content.sa_saleareaids = [this.mainData.sa_saleareaid]
       this.changeDataStructure()
       this.changeDataStructure()
@@ -226,7 +227,7 @@ export default {
           label:'企业名称',
           label:'企业名称',
           value: this.mainData.enterprisename
           value: this.mainData.enterprisename
         },*/
         },*/
-        
+
         {
         {
           label:'省市县',
           label:'省市县',
           value: `${this.mainData.province}-${this.mainData.city}-${this.mainData.county}`
           value: `${this.mainData.province}-${this.mainData.city}-${this.mainData.county}`
@@ -266,30 +267,36 @@ export default {
       ]
       ]
     },
     },
     createAgentAccount () {
     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 () {
   mounted () {
@@ -305,4 +312,4 @@ export default {
 
 
 </script>
 </script>
 <style>
 <style>
-</style>
+</style>

+ 11 - 11
src/HManagement/marketing2/agent/index.vue

@@ -4,10 +4,10 @@
     <areaTree ref="arealist" style="width:250px;flex:0 1 auto" @onClick="onClick">
     <areaTree ref="arealist" style="width:250px;flex:0 1 auto" @onClick="onClick">
     </areaTree>
     </areaTree>
     <div class="hm-info-panel">
     <div class="hm-info-panel">
-      <basicLayout 
-        ref="basicLayout" 
+      <basicLayout
+        ref="basicLayout"
         formPath="marketing2/agent"
         formPath="marketing2/agent"
-        tableName="agentTable" 
+        tableName="agentTable"
         idName="sa_agentsid"
         idName="sa_agentsid"
         :detailPath="{path:'/agent_detail'}"
         :detailPath="{path:'/agent_detail'}"
         :apiId="{query:20221011144903,del:20221011145003}"
         :apiId="{query:20221011144903,del:20221011145003}"
@@ -15,12 +15,12 @@
         :options="options"
         :options="options"
         @listCreate="list">
         @listCreate="list">
         <div slot="titleRight">
         <div slot="titleRight">
-          <importFile 
-            ref="importFile" 
-            class="inline-16" 
-            :bindData="{ownertable:'sa_agents',ownerid:$route.query.id,usetype:'default'}" 
-            :errorUrl="errorUrl" 
-            @clearUrl="errorUrl = null" 
+          <importFile
+            ref="importFile"
+            class="inline-16"
+            :bindData="{ownertable:'sa_agents',ownerid:$route.query.id,usetype:'default'}"
+            :errorUrl="errorUrl"
+            @clearUrl="errorUrl = null"
             @onSuccess="bindImportOrder"
             @onSuccess="bindImportOrder"
             v-if="tool.checkAuth($route.name,'export')"
             v-if="tool.checkAuth($route.name,'export')"
           ></importFile>
           ></importFile>
@@ -149,7 +149,7 @@ export default {
         this.$refs['basicLayout'].listData()
         this.$refs['basicLayout'].listData()
         this.$store.dispatch('sendDataToForm',data)
         this.$store.dispatch('sendDataToForm',data)
       }
       }
-      
+
     },
     },
     onSuccess () {
     onSuccess () {
       this.$refs.arealist.query_arealist()
       this.$refs.arealist.query_arealist()
@@ -193,4 +193,4 @@ export default {
 
 
   margin-right: 10px;
   margin-right: 10px;
 }
 }
-</style>
+</style>