瀏覽代碼

市场活动,销售线索转化客户

qymljy 4 月之前
父節點
當前提交
2d3e013fb5

+ 27 - 2
src/HManagement/clueManage/m_activity/modules/details.vue

@@ -11,7 +11,6 @@
         turnPageId="20221101095102"
         idname="sat_campaignid"
         ownertable="sat_campaign"
-        :isAdmin="true"
         :tabs="[$t('活动线索'),$t('详细信息')]"
         @pageChange="pageChange"
         @onEditSuccess="queryMainData($route.query.id)"
@@ -21,7 +20,8 @@
       <div slot="customOperation">
         <relase class="inline-16" v-if="tool.checkAuth($route.name,'relase') && mainData.status != '结束'" :data="mainData" @onSuccess="queryMainData"></relase>
         <finish class="inline-16" v-if="tool.checkAuth($route.name,'finish')  && mainData.status != '结束' && mainData.status != '新建'" :data="mainData" @onSuccess="queryMainData"></finish>
-        <el-button size="mini" :disabled="mainData.ordercluecount > 0" class="inline-16" :type="mainData.ordercluecount === 0?'primary':''" @click="onDel" v-if="tool.checkAuth($route.name,'onDelete')  && mainData.status != '发布' && mainData.status != '结束' && mainData.disabled">{{$t('删 除')}}</el-button>
+        <el-button size="mini" :disabled="mainData.ordercluecount > 0"  :type="mainData.ordercluecount === 0?'primary':''" @click="onDel" v-if="tool.checkAuth($route.name,'onDelete')  && mainData.status != '发布' && mainData.status != '结束' && mainData.disabled">{{$t('删 除')}}</el-button>
+        <el-button size="mini" class="inline-16" type="primary" @click="onDeManage" v-if="tool.checkAuth($route.name,'deleteManage')">{{$t('删除(管理)')}}</el-button>
       </div>
       <div slot="slot0" class="container normal-panel">
         <DetailTable ref="DetailTable">
@@ -55,6 +55,7 @@ export default {
       },
       mainAreaData:{},
       detailInfo:{},
+      accountno: JSON.parse(sessionStorage.getItem('active_account')).accountno
     }
   },
   provide () {
@@ -250,6 +251,30 @@ export default {
           message: this.$t('已取消删除')
         });
       });
+    },
+    onDeManage(){
+      this.$confirm(this.$t('此操作将永久删除该活动,是否继续')+'?', this.$t('提示'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: 'warning'
+      }).then(async() => {
+        const res = await this.$api.requested({
+          "id": 2025080513201702,
+          "content": {
+            "sat_campaignid":this.$route.query.id
+          }
+        })
+        this.tool.showMessage(res,()=>{
+          console.log(res)
+          this.$store.dispatch('changeDetailDrawer',false)
+          this.$emit('onSuccess')
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: this.$t('已取消删除')
+        });
+      });
     }
   },
   mounted () {

+ 27 - 16
src/SManagement/orderclue_detail/components/changeCustomer.vue

@@ -507,24 +507,35 @@ export default {
       if (res.code == 0){
         this.tool.showMessage(res,()=>{})
       }else {
-        const res1 = await this.$api.requested({
-          "id": "2024060715002601",
-          "content": {
-            "companyName":res.data[0].companyName
-          },
-        })
-        if (res1.code == 0){
-          this.tool.showMessage(res1,()=>{})
+        if (keyWord === res.data[0].companyName){
+          const res1 = await this.$api.requested({
+            "id": "2024060715002601",
+            "content": {
+              "companyName":res.data[0].companyName
+            },
+          })
+          if (res1.code == 0){
+            this.tool.showMessage(res1,()=>{})
+          }else {
+            this.form.taxno = res1.data.taxNum
+            this.form.contact = res.data[0].legalPerson
+            this.form.phonenumber = res1.data.phone
+            this.form.province = res.data[0].regProvince
+            this.form.city = res1.data.regCity;
+            this.form.county = res1.data.regArea;
+            this.form.address = res1.data.address === "-" ? '' : res1.data.address;
+            this.value = [this.form.province,this.form.city,this.form.county]
+          }
         }else {
-          this.form.taxno = res1.data.taxNum
-          this.form.contact = res.data[0].legalPerson
-          this.form.phonenumber = res1.data.phone
-          this.form.province = res.data[0].regProvince
-          this.form.city = res1.data.regCity;
-          this.form.county = res1.data.regArea;
-          this.form.address = res1.data.address === "-" ? '' : res1.data.address;
-          this.value = [this.form.province,this.form.city,this.form.county]
+          this.$confirm(this.$t('请完善客户名称,该客户名称无法匹配工商信息,不可转化!'), this.$t('提示') , {
+            confirmButtonText: this.$t('确定'),
+            showCancelButton:false,
+            type: 'warning'
+          }).then(() => {
+          }).catch(() => {
+          });
         }
+
       }
     },
     /*查重检查*/

+ 28 - 1
src/components/duplicatesCheck/customerChangeCheck.vue

@@ -149,7 +149,8 @@ export default {
           this.$emit("isDuplicate", "重复");
         } else {
           if (this.creatShow) {
-            this.onSubmit();
+            this.businessData(this.data.enterprisename)
+            // this.onSubmit();
           } else {
             this.$message({
               message: this.$t("无重复数据"),
@@ -199,7 +200,33 @@ export default {
           /* this.setTag(res.data.sa_customersid,'')*/
         }
       });
+    },
+    /*工商查询*/
+    async businessData(keyWord){
+      const res = await this.$api.requested({
+        "id": "20221208103601",
+        "content": {
+          "keyword":keyWord,
+          "pageNumber":1,
+          "pageSize":5
+        },
+      })
+      if (res.code == 0){
+        this.tool.showMessage(res,()=>{})
+      }else {
+        if (keyWord === res.data[0].companyName){
+         this.onSubmit()
+        }else {
+          this.$confirm(this.$t('请完善客户名称,该客户名称无法匹配工商信息,不可转化!'), this.$t('提示'), {
+            confirmButtonText: this.$t('确定'),
+            showCancelButton:false,
+            type: 'warning'
+          }).then(() => {
+          }).catch(() => {
+          });
+        }
 
+      }
     },
     async setTag(id, data) {
       const res = await this.$api.requested({