Просмотр исходного кода

Merge branch 'blueBranch' into allTestUrgent

qymljy 1 год назад
Родитель
Сommit
c400cf00f7

+ 3 - 3
src/HDrpManagement/competitor/detail/index.vue

@@ -2,7 +2,7 @@
   <div>
     <basicDetails
         ref="details"
-        :titleText="mainData.brandname"
+        :titleText="mainData.enterprisename"
         formPath="competitor"
         :editData="mainData"
         :mainAreaData="mainAreaData"
@@ -13,7 +13,7 @@
         column="4"
         :tabs="['详细信息','参与竞争项目','联系人','地址管理']"
         @pageChange="pageChange"
-        @onEditSuccess="queryMainData($route.query.id)">
+        @onEditSuccess="queryMainData($route.query.id);$refs.detailed.basicData()">
       <div slot="tags">
         <!-- 使用此插槽可不传[tags] -->
         <!-- :tabs="['经销商团队','代理区域','营销类别','账户余额']" -->
@@ -24,7 +24,7 @@
         <toVoid :id="$route.query.id" class="inline-16"></toVoid>
       </div>
       <div slot="slot0" >
-        <detailed  v-if="flag"></detailed>
+        <detailed ref="detailed" v-if="flag"></detailed>
       </div>
       <div slot="slot1" class=" normal-panel">
         <compete_projects :data="mainData" v-if="flag"></compete_projects>

+ 27 - 41
src/HDrpManagement/contractManage/components/editContract.vue

@@ -468,7 +468,7 @@
 
                   <el-input readonly type="text" slot="reference" size="small" @focus="showChange('accountVisible')" v-model="form.enterprisename">
                     <template slot="append">
-                      <el-button size="small" @click="accountVisible = false;form.enterprisename = '';agentListPrams.content.where.condition = '';$refs.member.selected = []" style="width:100%" type="primary">{{$t('清空')}}</el-button>
+                      <el-button size="small" @click="accountVisible = false;form.enterprisename = '';agentListPrams.content.where.condition = '';$refs.member.selected = [];form.sys_enterpriseid = 0" style="width:100%" type="primary">{{$t('清空')}}</el-button>
                     </template>
                   </el-input>
                 </el-popover>
@@ -819,49 +819,34 @@ export default {
           if(this.$route.query.type == '居间') {
             /* 当合同关系发生改变时 */
             if (!this.form.sys_enterpriseid &&(this.form.sys_enterpriseid != this.data.sys_enterpriseid || this.form.ascription_contractid != this.data.ascription_contractid)) {
-              /* 项目商机中是否存在该居间商 */
-              let isChange = this.$refs.projectContract.ENlist
-                .find(item => item.sa_contractid == this.form.ascription_contractid).parties
-                .some(item2 => item2.sys_enterpriseid == this.form.sys_enterpriseid),
 
-                contract = this.$refs.projectContract.ENlist
-                .find(item => item.sa_contractid == this.form.ascription_contractid)
-              if (isChange) {
-                this.$confirm(this.$t('当前项目已存在此居间商,不可编辑'),this.$t('提示'),{
-                  cancelButtonText:this.$t('取消'),
-                  showConfirmButton:false
-                }).then(() => {
-                  this.$store.commit('setLoading',false)
-                })
+              if (this.$route.query.type == '直销项目') {
+                this.form.type = '项目'
+                this.form.typemx = '直销'
+              } else if (this.$route.query.type == '经销项目') {
+                this.form.type = '项目'
+                this.form.typemx = '经销'
               } else {
-                if (this.$route.query.type == '直销项目') {
-                  this.form.type = '项目'
-                  this.form.typemx = '直销'
-                } else if (this.$route.query.type == '经销项目') {
-                  this.form.type = '项目'
-                  this.form.typemx = '经销'
-                } else {
-                  this.form.type = this.$route.query.type
-                }
-                this.form.discountrate ? this.form.discountrate =  (parseFloat(this.form.discountrate) / 100).toFixed(4) : ''
-                this.form.productdiscount ? this.form.productdiscount =  (parseFloat(this.form.productdiscount) / 100).toFixed(4) : ''
-                this.form.orderratio ? this.form.orderratio =  (parseFloat(this.form.orderratio) / 100).toFixed(4) : ''
-                let res = await this.$api.requested({
-                  "id":20221121185302,
-                  "content": this.form
-                })
-                if (res.code == 0){
-                  this.form.discountrate = this.form.discountrate * 100
-                  this.form.productdiscount = this.form.productdiscount * 100
-                  this.form.orderratio = this.form.orderratio * 100
-                }
-                this.tool.showMessage(res,() => {
-                  this.$store.commit('setLoading',false)
-                  this.$refs.form.resetFields()
-                  this.drawer = false
-                  this.$emit('onSuccess')
-                })
+                this.form.type = this.$route.query.type
               }
+              this.form.discountrate ? this.form.discountrate =  (parseFloat(this.form.discountrate) / 100).toFixed(4) : ''
+              this.form.productdiscount ? this.form.productdiscount =  (parseFloat(this.form.productdiscount) / 100).toFixed(4) : ''
+              this.form.orderratio ? this.form.orderratio =  (parseFloat(this.form.orderratio) / 100).toFixed(4) : ''
+              let res = await this.$api.requested({
+                "id":20221121185302,
+                "content": this.form
+              })
+              if (res.code == 0){
+                this.form.discountrate = this.form.discountrate * 100
+                this.form.productdiscount = this.form.productdiscount * 100
+                this.form.orderratio = this.form.orderratio * 100
+              }
+              this.tool.showMessage(res,() => {
+                this.$store.commit('setLoading',false)
+                this.$refs.form.resetFields()
+                this.drawer = false
+                this.$emit('onSuccess')
+              })
 
             } else {
               this.form.orderratio ? this.form.orderratio =  (parseFloat(this.form.orderratio) / 100).toFixed(4) : ''
@@ -882,6 +867,7 @@ export default {
                 this.$emit('onSuccess')
               })
             }
+
           } else {
             if (this.$route.query.type == '直销项目') {
               this.form.type = '项目'

+ 3 - 0
src/HDrpManagement/orderManage/index.vue

@@ -171,6 +171,9 @@ export default {
   methods:{
     list (data) {
       console.log(data,'返回的数据data内容');
+      if (!data) {
+        this.$refs.basicLayout.listData()
+      }
     },
     change () {
       this.$refs.basicLayout.param.content.pageNumber = 1