Procházet zdrojové kódy

Merge branch 'greenUrgent' into allTestUrgent

qymljy před 9 měsíci
rodič
revize
13df05dd03

+ 7 - 3
src/HDrpManagement/dispatch/details/index.vue

@@ -22,9 +22,9 @@
         <Edit class="inline-16" style="margin-left: -10px" v-if="tool.checkAuth($route.name,'update') && mainData.status == '新建'" :data="mainData" @onSuccess="onSuccess" />
         <el-button class="inline-16" :type="mainData.status !== '复核'?'':'primary'" size="mini"  v-if="tool.checkAuth($route.name,'createBill') && (mainData.status == '新建' || mainData.status == '提交' || mainData.status == '复核')" :disabled="mainData.status !== '复核'" @click="addLogistics">{{$t(`生成物流单`)}}</el-button>
 <!--        <confirmSelection class="inline-16" v-if="tool.checkAuth($route.name,'submit') && mainData.status == '新建'" btnTitle="提交" :disabled="mainData.status !== '新建'" btnType="primary" content="是否确定提交发货单" confirmButtonText="确定" cancelButtonText="取消" paramId="2024120915192102" idName="sa_dispatchid" @onSuccess="onSuccess"></confirmSelection>-->
-        <dialogTemplate v-if="tool.checkAuth($route.name,'submit') && mainData.status == '新建'" class="inline-16" btnTitle="提交" :disabled="mainData.status !== '新建'" btnType="primary" :mainAData="mainAreaData" content="是否确定提交发货单" paramId="2024120915192102" idName="sa_dispatchid" @onSuccess="onSuccess"></dialogTemplate>
+        <dialogTemplate ref="submitRef" v-if="tool.checkAuth($route.name,'submit') && mainData.status == '新建'" class="inline-16" btnTitle="提交" :disabled="mainData.status !== '新建'" btnType="primary" :mainAData="mainAreaData" content="是否确定提交发货单" paramId="2024120915192102" idName="sa_dispatchid" @onSuccess="onSuccess" @submitSuccess="submitSuccess"></dialogTemplate>
         <confirmSelection class="inline-16" v-if="tool.checkAuth($route.name,'revocation') && mainData.status == '提交'" btnTitle="撤回" :disabled="mainData.status !== '提交'" btnType="primary" content="是否确定撤回发货单" confirmButtonText="确定" cancelButtonText="取消" paramId="2024120915580002" idName="sa_dispatchid" @onSuccess="onSuccess"></confirmSelection>
-        <el-button type="primary" v-if="tool.checkAuth($route.name,'verificationCheck') && (mainData.status == '新建' || mainData.status == '提交')" size="mini" @click="onVerificationCheck"  class="inline-16" >{{$t('校验审核')}}</el-button>
+        <el-button type="primary" v-if="tool.checkAuth($route.name,'verificationCheck') && (mainData.status == '新建')" size="mini" @click="onVerificationCheck"  class="inline-16" >{{$t('校验提交')}}</el-button>
         <el-button style="margin-left: 0px" type="primary"  class="inline-16" size="mini"  v-if="tool.checkAuth($route.name,'check') && mainData.status !== '审核' && mainData.status !== '复核' && mainData.status !== '关闭'"  @click="onCheck">{{mainData.status === '审核'?$t('反审核'):mainData.status === '复核'?$t('反审核'):$t('审核')}}</el-button>
         <dialogTemplateNew ref="dialogTemplateNew" class="inline-16" v-if="tool.checkAuth($route.name,'check') && mainData.status == '审核'" btnTitle="反审核" btnType="primary" content="确定反审核该发货单" @onCancel="form.uncheckreason = ''" @onSubmit="onSubmit">
           <template slot="formRule">
@@ -347,7 +347,11 @@ import dialogTemplateNew from '@/components/dialogTemplate/index1'
         });
 
       },
-      async onVerificationCheck(){
+      onVerificationCheck(){
+        this.$refs.submitRef.dialogTableVisible = true
+        this.$refs.submitRef.isParamId = false
+      },
+      async submitSuccess(){
         const res = await this.$api.requested({
           "id": 2025071615130202,
           "content": {

+ 34 - 4
src/SManagement/orderclue_detail/components/changeCustomer.vue

@@ -471,12 +471,8 @@ export default {
       this.form = Object.assign({},this.form,this.data)
       this.form.phonenumber = ''
       this.form.source = this.form.cluesource
-      this.value = [this.form.province,this.form.city,this.form.county]
       this.form.contactsinfo.name = this.data.name
       this.form.enterprisename = this.form.enterprisename_customer
-      this.form.taxno = this.data.co_taxno
-      this.form.contact = this.data.co_name
-      this.form.phonenumber = this.data.co_phonenumber
       /*this.form.contactsinfo.phonenumber = this.data.phonenumber*/
       if (this.data.phonenumber.indexOf('-') != '-1'){
         this.isPhone = false
@@ -496,6 +492,40 @@ export default {
       this.typeList()
       // this.queryCustomerGrade()
       this.enterpriseContactList()
+      this.businessData(this.form.enterprisename)
+    },
+    /*工商查询*/
+    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 {
+        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]
+        }
+      }
     },
     /*查重检查*/
     onCheck(){

+ 12 - 7
src/components/dialogTemplate/index.vue

@@ -26,6 +26,7 @@ export default {
   data(){
     return {
       dialogTableVisible:false,
+      isParamId:true,
       param:{
         "id": 20221010164602,
         "content": {
@@ -41,14 +42,18 @@ export default {
       console.log(this.mainAData,'mainAData')
     },
     async onSubmit(){
-      this.param.id = this.paramId
-      this.param.content = {
-        [this.idName]:this.$route.query.id
+      if (this.isParamId){
+        this.param.id = this.paramId
+        this.param.content = {
+          [this.idName]:this.$route.query.id
+        }
+        const res = await this.$api.requested(this.param)
+        this.tool.showMessage(res,()=>{
+          this.$emit('onSuccess')
+        })
+      }else {
+        this.$emit('submitSuccess')
       }
-      const res = await this.$api.requested(this.param)
-      this.tool.showMessage(res,()=>{
-        this.$emit('onSuccess')
-      })
     }
   }
 }

+ 11 - 53
src/components/duplicatesCheck/customerChangeCheck.vue

@@ -187,60 +187,18 @@ export default {
         this.data.contactsinfo.phonenumber = this.data.contactsinfo.telephone;
         this.data.contactsinfo.telephone = "";
       }
-      if (this.siteid == 'HY' && this.$route.path == '/orderclue_detail'){
-        const res = await this.$api.requested({
-          "id": "20221208103601",
-          "content": {
-            "keyword":this.data.enterprisename_customer,
-            "pageNumber":1,
-            "pageSize":5
-          },
-        })
-        console.log(res.data)
-        if (res.code == 0){
-          this.tool.showMessage(res,()=>{})
-        }else {
-          this.data.province  = res.data[0].regProvince
-          const res1 = await this.$api.requested({
-            "id": "2024060715002601",
-            "content": {
-              "companyName":res.data[0].companyName
-            },
-          })
-          if (res1.code == 0){
-            this.tool.showMessage(res1,()=>{})
-          }else {
-            this.data.city = res1.data.regCity
-            this.data.county = res1.data.regArea
-            this.data.address = res1.data.address === "-" ? '' : res1.data.address;
-            const res = await this.$api.requested({
-              id: 20221216184302,
-              content: this.data,
-            });
-            this.tool.showMessage(res, () => {
-              if (this.duplicates) {
-                this.setTag(res.data.sa_customersid, "疑似重复");
-              } else {
-                this.$emit("onSuccess");
-                /* this.setTag(res.data.sa_customersid,'')*/
-              }
-            });
-          }
+      const res = await this.$api.requested({
+        id: 20221216184302,
+        content: this.data,
+      });
+      this.tool.showMessage(res, () => {
+        if (this.duplicates) {
+          this.setTag(res.data.sa_customersid, "疑似重复");
+        } else {
+          this.$emit("onSuccess");
+          /* this.setTag(res.data.sa_customersid,'')*/
         }
-      }else {
-        const res = await this.$api.requested({
-          id: 20221216184302,
-          content: this.data,
-        });
-        this.tool.showMessage(res, () => {
-          if (this.duplicates) {
-            this.setTag(res.data.sa_customersid, "疑似重复");
-          } else {
-            this.$emit("onSuccess");
-            /* this.setTag(res.data.sa_customersid,'')*/
-          }
-        });
-      }
+      });
 
     },
     async setTag(id, data) {