Browse Source

Merge remote-tracking branch 'origin/mergeBranch' into mergeBranch

qymljy 2 năm trước cách đây
mục cha
commit
65fa9dd89e

+ 0 - 1
src/HDrpManagement/contractManage/components/addContract.vue

@@ -550,7 +550,6 @@ export default {
                     }
                   })
                 })
-                
               })
             } else {
               if (this.$route.query.type == '直销项目') {

+ 75 - 23
src/HDrpManagement/contractManage/components/editContract.vue

@@ -275,7 +275,7 @@
                   trigger="manual"
                   v-model="accountVisible"
                   width="400">
-                  <selectAgent ref="member" :param="agentListPrams" :radio="true" @onSelect="accountChange" @onCancel="agentVisible = false"></selectAgent>
+                  <selectAgent ref="member" :param="agentListPrams" :radio="true" @onSelect="accountChange" @onCancel="accountVisible = false"></selectAgent>
                   <el-input readonly type="text" slot="reference" size="small" @focus="showChange('accountVisible')" v-model="form.enterprisename"></el-input>
                 </el-popover>
               </el-form-item>
@@ -287,7 +287,7 @@
                   trigger="manual"
                   v-model="concratVisible"
                   width="600">
-                  <seleteProjectContract ref="project" @onSelect="concratChange" @onCanel="concratVisible=false"></seleteProjectContract>
+                  <seleteProjectContract ref="projectContract" @onSelect="concratChange" @onCanel="concratVisible=false"></seleteProjectContract>
                   <el-input readonly type="text" slot="reference" size="small" @focus="showChange('concratVisible')" v-model="form.ascription_title"></el-input>
                 </el-popover>
               </el-form-item>
@@ -399,7 +399,6 @@ export default {
       modelVisible:false,
       concratVisible:false,
       /* 新建居间项目时 所关联的居间商 */
-      centerEnterpriseList:[],
       form: {
         "sa_contractid": 0,
         "sys_enterpriseid": "",
@@ -537,28 +536,82 @@ export default {
     async onSubmit () {
       this.$refs.form.validate(async val => {
         if (val) {
-          if (this.$route.query.type == '直销项目') {
-            this.form.type = '项目'
-            this.form.typemx = '直销'
-          } else if (this.$route.query.type == '经销项目') {
-            this.form.type = '项目'
-            this.form.typemx = '经销'
+          if(this.$route.query.type == '居间') {
+            /* 当合同关系发生改变时 */
+            if (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('当前项目已存在此居间商,请前往项目商机维护','提示',{
+                  confirmButtonText:'确定',
+                  cancelButtonText:'取消'
+                }).then(() => {
+                  JSON.parse(sessionStorage.getItem('module_info')).forEach(item1 => {
+                    item1.modules.forEach(item2 => {
+                      if(item2.systemmodulename == "项目管理") {
+                        sessionStorage.setItem('active_modules',JSON.stringify(item2))
+                        this.$store.dispatch('DrawerShowChange',false)
+                        this.$router.push({path:'/projectChangeDetail',query:{id:contract.sa_projectid}})
+                        return
+                      }
+                    })
+                  })
+                })
+              } 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 =  (parseInt(this.form.discountrate) / 100).toFixed(4) : ''
+                this.form.productdiscount ? this.form.productdiscount =  (parseInt(this.form.productdiscount) / 100).toFixed(4) : ''
+                this.form.orderratio ? this.form.orderratio =  (parseInt(this.form.orderratio) / 100).toFixed(4) : ''
+                let res = await this.$api.requested({
+                  "id":20221121185302,
+                  "content": this.form
+                })
+                this.tool.showMessage(res,() => {
+                  this.$refs.form.resetFields()
+                  this.drawer = false
+                  this.$emit('onSuccess')
+                })
+              }
+                                                                    
+            }
           } else {
-            this.form.type = this.$route.query.type
+            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 =  (parseInt(this.form.discountrate) / 100).toFixed(4) : ''
+            this.form.productdiscount ? this.form.productdiscount =  (parseInt(this.form.productdiscount) / 100).toFixed(4) : ''
+            this.form.orderratio ? this.form.orderratio =  (parseInt(this.form.orderratio) / 100).toFixed(4) : ''
+            let res = await this.$api.requested({
+              "id":20221121185302,
+              "content": this.form
+            })
+            this.tool.showMessage(res,() => {
+              this.$refs.form.resetFields()
+              this.drawer = false
+              this.$emit('onSuccess')
+            })
           }
-          this.form.discountrate ? this.form.discountrate =  (parseInt(this.form.discountrate) / 100).toFixed(4) : ''
-          this.form.productdiscount ? this.form.productdiscount =  (parseInt(this.form.productdiscount) / 100).toFixed(4) : ''
-          this.form.orderratio ? this.form.orderratio =  (parseInt(this.form.orderratio) / 100).toFixed(4) : ''
-          let res = await this.$api.requested({
-            "id":20221121185302,
-            "content": this.form
-          })
-          this.tool.showMessage(res,() => {
-            this.$refs.form.resetFields()
-            this.drawer = false
-            this.$emit('onSuccess')
-          })
         }
+        
       })
     },
     showChange (key) {
@@ -614,7 +667,6 @@ export default {
       this.modelVisible = false
     },
     concratChange (data) {
-      this.centerEnterpriseList = data.parties
       this.form.ascription_title = data.projectname
       this.form.ascription_contractid = data.sa_contractid
       this.form.projectname = data.projectname

+ 1 - 4
src/HDrpManagement/contractManage/modules/detail.vue

@@ -17,7 +17,7 @@
       <div slot="customOperation" >
         <editBtn :modelList="modelList" v-if="tool.checkAuth($route.name,'update')" :disabled="mainData.status != '新建' || !isLeader" @onSuccess="queryMainData();$refs.billno && $refs.billno.listData()" :data="mainData" class="inline-16"/>
         <submit-check :disabled="!isLeader" ref="submit" :data="mainData" @onSuccess="queryMainData" />
-        <reverseCheck @onSuccess="queryMainData()" :data="mainData" v-if="tool.checkAuth($route.name,'reverseCheck') && mainData.status == '审核'" />
+        <reverseCheck @onSuccess="queryMainData()" :data="mainData" v-if="tool.checkAuth($route.name,'reverseCheck') && mainData.status != '新建'" />
         <contractOver v-if="tool.checkAuth($route.name,'contractOver') && mainData.status != '已终止' && mainData.status != '审核' && isLeader" :disabled="!isLeader" :id="mainData.sa_contractid" @onSuccess="queryMainData"/>
         <Del :idName="20221121202502" :id="mainData.sa_contractid" idKey="sa_contractids" class="inline-16" v-if="tool.checkAuth($route.name,'delete') && mainData.type == '新建' && isLeader"/>
       </div>
@@ -184,10 +184,7 @@ export default {
     mainData: {
       handler (val) {
         if (Object.keys(JSON.parse(window.sessionStorage.getItem('userInfo'))).length > 0) {
-        console.log('负责人逻辑');
         this.isLeader = val.leader ? JSON.parse(window.sessionStorage.getItem('active_account')).userid == val.leader[0].userid : false
-        console.log(this.isLeader);
-        
         } else {
           this.isLeader = true
         }

+ 3 - 0
src/HManagement/clueManage/clue_import/detailPage/modules/add.vue

@@ -30,6 +30,9 @@
           <el-form-item label="地址" prop="address">
             <el-input v-model="form.address" autocomplete="off" placeholder="输入地址"></el-input>
           </el-form-item>
+          <el-form-item label="市场活动" prop="campaignName">
+            <el-input v-model="form.campaignName" autocomplete="off" placeholder="输入地址"></el-input>
+          </el-form-item>
           <el-form-item label="来源" prop="cluesource">
             <el-input v-model="form.cluesource" autocomplete="off" placeholder="输入来源"></el-input>
           </el-form-item>

+ 3 - 1
src/HManagement/clueManage/clue_import/detailPage/modules/billBody.vue

@@ -1,7 +1,7 @@
 
 <template>
   <div>
-    <add :data="list" @onSuccess="getList" :disabled="mainData.status !== '待审核'" v-if="tool.checkAuth($route.name,'update')"/>
+    <!-- <add :data="list" @onSuccess="getList" :disabled="mainData.status !== '待审核'" v-if="tool.checkAuth($route.name,'update')"/> -->
     <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true" height="40vh" fixedName="operation">
       <template v-slot:customcol="scope">
         <div v-if="scope.column.columnname === 'province'">
@@ -81,6 +81,8 @@ export default {
       let res = await this.$api.requested(this.params)
       this.list = res.data
       this.total = res.total
+      console.log(this.list);
+      
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);

+ 7 - 1
src/HManagement/clueManage/clue_import/detailPage/modules/edit.vue

@@ -43,6 +43,11 @@
               <el-input v-model="form.address" autocomplete="off"></el-input>
             </el-form-item>
           </el-col>
+          <el-col :span="24">
+            <el-form-item label="市场活动">
+              <el-input disabled v-model="form.campaignName" autocomplete="off"></el-input>
+            </el-form-item>
+          </el-col>
           <el-col :span="24">
             <el-form-item label="来源" prop="cluesource">
               <el-input v-model="form.cluesource" autocomplete="off"></el-input>
@@ -86,7 +91,8 @@ export default {
         "phonenumber":'',
         "address":'',
         "cluesource":'',
-        "province":''
+        "province":'',
+        "campaignName":''
       },
       arealist:[],
       options:[]

+ 91 - 21
src/HManagement/clueManage/clue_private/modules/detail.vue

@@ -8,7 +8,7 @@
         turnPageId="20221101094302"
         delApiId="20221101100502"
         idname="sat_orderclueid"
-        :tabs="['详细信息','跟进记录']"
+        :tabs="['跟进记录','详细信息']"
         @pageChange="pageChange"
         @onEditSuccess="queryMainData($route.query.id)">
       <div slot="tags">
@@ -18,12 +18,12 @@
         <distobutionOne v-if="tool.checkAuth($route.name,'distributionSaler') && mainData.allocationstatus == '待分配'" @onSuccess="$store.dispatch('changeDetailDrawer',false),$router.back()" />
         <recall class="inline-16" v-if="mainData.allocationstatus != '待分配' && mainData.status === '待跟进' || mainData.status === '跟进中' && mainData.isTeam !== '团队' && tool.checkAuth($route.name,'recall')" :data="mainData" @onSuccess="queryMainData"></recall>
       </div>
-      <div slot="slot0" class="container normal-panel">
+      <div slot="slot1" class="container normal-panel">
         <BaseInfo :detailInfo="detailInfo"/>
       </div>
-      <div slot="slot1" class="container normal-panel">
+      <div slot="slot0" class="container normal-panel">
         <el-descriptions>
-          <div slot="title">跟进记录<i @click="followRecord(isdesc === 1?isdesc = 0:isdesc =1)" :class="isdesc === 1?'fa fa-sort-amount-asc':'fa fa-sort-amount-desc'"></i></div>
+          <div slot="title">跟进记录 &nbsp;<i @click="followRecord(param.content.sort[0].reversed = param.content.sort[0].reversed == 1 ? 0 : 1)" :class="param.content.sort[0].reversed == 1?'fa fa-sort-amount-asc':'fa fa-sort-amount-desc'"></i></div>
         </el-descriptions>
         <div class="flex-align-center normal-margin">
           <p>日期:&nbsp;</p>
@@ -41,13 +41,36 @@
             clearable>
           </el-date-picker>
         </div>
-        <div v-for="(item,index) in recordlist" :key="item.index" class="follow-item">
-          <p>{{index + 1}}.&nbsp;{{item.createdate}},由经销商端<b>{{item.createby}}</b>{{item.logtype}},跟进方式:<b>{{item.followupmode}}</b>,跟进内容:</p>
-          <div class="content-panel">
-          <p>{{item.content}}</p>
-          <p>{{item.competitor}}</p> 
+        <div class="detail" v-if="recordlist.length > 0">
+          <div class="item" v-for="(item,index) in recordlist" :key="index">
+            <p>{{index + 1}}.{{item.createdate}},&nbsp;由<span style="font-weight:bold;margin:0 6px;font-size:13px">{{item.createby}}</span>开始跟进,跟进方式:<span style="font-weight:bold;margin:0 5px">{{item.followupmode}}</span>,{{handleTxt[item.logtype]}}</p>
+            <div class="content">
+              <div style="margin-bottom:10px">
+                <p v-if="item.competitor">已购买品牌:{{item.competitor}}</p>
+                {{item.content}}
+              </div>
+              <file-item 
+                :marginRight="10"
+                :rowCount="5"
+                :isDownLoad="true" 
+                :fileData="item.attinfo">
+              </file-item>
+            </div>
           </div>
         </div>
+        <el-empty title="暂无数据" v-else></el-empty>
+        <div style="margin-top:16px;text-align:right">
+          <el-pagination
+          background
+          small
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="param.content.pageNumber"
+          :page-size="param.content.pageSize"
+          layout="total, prev, pager, next"
+          :total="total">
+          </el-pagination>
+        </div>
       </div>
     </basicDetails>
   </div>
@@ -58,6 +81,7 @@ import BaseInfo from '@/HDrpManagement/projectChange/modules/modules/baseInfo/ba
 import recall from './recall.vue'
 import edit from './edit'
 import distobutionOne from './distobutionOne'
+import FileItem from '@/SManagement/orderclue/components/file/index2'
 export default {
   name: "detail",
   data() {
@@ -71,11 +95,35 @@ export default {
       dateParam:{
         "start": "",
         "end": ""
-      }
+      },
+      param: {
+        "id":20221101094602,
+        "content": {
+          "pageNumber":1,
+          "pageSize":20,
+          "sat_orderclueid": this.$route.query.id,
+          "where": this.dateParam,
+          "sort": [
+            {
+              "reversed":0,
+              "sorted":1,
+              "sortid":0,
+              "sortname":'默认'
+            }
+          ]
+        }
+      },
+      handleTxt:{
+        '跟进中':'跟进内容',
+        '成交':'成交操作,添加备注',
+        '丢单':'丢单操作,具体原因如下',
+        '无效':'无效操作,具体原因如下',
+      },
+      total:0
     }
   },
   components:{
-    BaseInfo,recall,edit,distobutionOne
+    BaseInfo,recall,edit,distobutionOne,FileItem
   },
   methods:{
     async followRecord () {
@@ -292,16 +340,17 @@ export default {
       this.queryMainData(id)
     },
     async followRecord () {
-      const res = await this.$api.requested({
-        "classname": "webmanage.saletool.orderclue.publicclue.PublicClue",
-        "method": "getFollowList",
-        "content": {
-          "sat_orderclueid": this.$route.query.id,
-          "isdesc": 1,
-          "where": this.dateParam
-        }
-      })
+      this.param.content.sat_orderclueid = this.$route.query.id
+      this.param.content.where = this.dateParam
+      const res = await this.$api.requested(this.param)
+      this.total = res.total
+      this.param.content.sort = res.sort
       this.recordlist = res.data
+      this.recordlist.forEach(item => {
+        item.attinfo = this.fileType.fileList(item.attinfo)
+      })
+      console.log(this.recordlist);
+      
     },
     dateChange (val) {
       console.log(val)
@@ -310,6 +359,16 @@ export default {
       this.dateParam.end = val[1]
       this.followRecord()
     },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.followRecord()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.followRecord()
+    },
   },
   mounted () {
     this.queryMainData(this.$route.query.id)
@@ -322,5 +381,16 @@ export default {
 </script>
 
 <style scoped>
-
+.content {
+  margin: 10px 0 16px 0;
+  background: #F2F2F2;
+  padding: 16px;
+  border-radius: 5px;
+  font-size: 14px;
+}
+.detail {
+  overflow-y: scroll;
+  height: calc(100vh - 400px);
+  padding-right: 10px;
+}
 </style>

+ 1 - 1
src/HManagement/clueManage/clue_private/modules/distobutionOne.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="inline-16">
-    <el-button size="mini" @click="getMatchAgentList">分 配</el-button>
+    <el-button type="primary" size="mini" @click="getMatchAgentList">分 配</el-button>
     <el-drawer title="匹配业务员" append-to-body :visible.sync="dialogTableVisible2" size="80%" top="30px">
       <div class="container">
         <div class="flex-align-center flex-between">

+ 1 - 1
src/HManagement/clueManage/clue_public/index.vue

@@ -19,7 +19,7 @@
     </div>
       <div slot="titleRight" style="display:flex;margin-left:10px">
         <!-- <distribution class="inline-16" v-if="tool.checkAuth($route.name,'distribution')" @onSuccess="$refs.basicLayout.listData()"></distribution> -->
-        <distributionSaler v-if="tool.checkAuth($route.name,'distribution')" @onSuccess="$refs.basicLayout.listData()"></distributionSaler>
+        <distributionSaler v-if="tool.checkAuth($route.name,'distributionSaler')" @onSuccess="$refs.basicLayout.listData()"></distributionSaler>
       </div>
       <template v-slot:tbList="scope">
         <div v-if="scope.data.column.columnname == 'status'">

+ 1 - 1
src/HManagement/clueManage/clue_public/modules/detail.vue

@@ -46,7 +46,7 @@
         </div>
         <div class="detail" v-if="recordlist.length > 0">
           <div class="item" v-for="(item,index) in recordlist" :key="index">
-            <p>{{index + 1}}.{{item.createdate}},由经销商端<span style="font-weight:bold;margin:0 6px;font-size:13px">{{item.createby}}</span>开始跟进,跟进方式:<span style="font-weight:bold;margin:0 5px">{{item.followupmode}}</span>,{{handleTxt[item.logtype]}}</p>
+            <p>{{index + 1}}.{{item.createdate}},&nbsp;由<span style="font-weight:bold;margin:0 6px;font-size:13px">{{item.createby}}</span>开始跟进,跟进方式:<span style="font-weight:bold;margin:0 5px">{{item.followupmode}}</span>,{{handleTxt[item.logtype]}}</p>
             <div class="content">
               <div style="margin-bottom:10px">
                 <p v-if="item.competitor">已购买品牌:{{item.competitor}}</p>

+ 4 - 1
src/SManagement/orderclue_detail/components/followDetail.vue

@@ -9,7 +9,7 @@
     </div>
     <div class="detail" v-if="follow.length > 0">
       <div class="item" v-for="(item,index) in follow" :key="index">
-        <p>{{index + 1}}.{{item.createdate}},由经销商端<span style="font-weight:bold;margin:0 6px;font-size:13px">{{item.createby}}</span>开始跟进,跟进方式:<span style="font-weight:bold;margin:0 5px">{{item.followupmode}}</span>,{{handleTxt[item.logtype]}}</p>
+        <p>{{index + 1}}.{{item.createdate}},&nbsp;由<span style="font-weight:bold;margin:0 6px;font-size:13px">{{item.createby}}</span>开始跟进,跟进方式:<span style="font-weight:bold;margin:0 5px">{{item.followupmode}}</span>,{{handleTxt[item.logtype]}}</p>
         <div class="content">
           <div style="margin-bottom:10px">
             <p v-if="item.competitor">已购买品牌:{{item.competitor}}</p>
@@ -180,4 +180,7 @@ export default {
     border-radius: 5px;
     font-size: 14px;
   }
+  /deep/.el-descriptions__header {
+    margin-bottom: 0 !important;
+  }
 </style>