qymljy 2 年之前
父節點
當前提交
26a1a9f12e

+ 2 - 1
src/HDrpManagement/contractManage/components/editContract.vue

@@ -203,7 +203,7 @@
                   trigger="manual"
                   v-model="projectVisible"
                   width="600">
-                  <seleteProject type="1" @onSelect="projectChange" @onCanel="projectVisible=false"></seleteProject>
+                  <seleteProject ref="project" type="1" @onSelect="projectChange" @onCanel="projectVisible=false"></seleteProject>
                   <el-input readonly type="text" slot="reference" size="small" @focus="showChange('projectVisible')" v-model="form.projectname"></el-input>
                 </el-popover>
               </el-form-item>
@@ -748,6 +748,7 @@ export default {
       }*/
       if (key === 'projectVisible'){
         if (this.form.sys_enterpriseid !== ''){
+          console.log("执行",key)
           this.$refs.project.params.content.sys_enterpriseid = this.form.sys_enterpriseid
           this.$refs.project.queryEnterpriseArchives()
           key ? this[key] = true : ''

+ 83 - 11
src/HDrpManagement/contractManage/components/productList/addProduct.vue

@@ -67,9 +67,9 @@
           <div style="display:flex;align-items:center">
             <el-input size="small" style="width:200px" v-model="params.content.where.condition" placeholder="输入搜索内容" @clear="getProductList(params.content.pageNumber = 1)" @keyup.native.enter="getProductList(params.content.pageNumber = 1)" clearable></el-input>
           </div>
-          <el-button type="primary" size="small" :disabled="selectProductLength == 0" @click="batchSelects">批 量 添 加</el-button>
+          <el-button type="primary" size="small" :disabled="selectProductLength == 0" @click="queryProuctAdds">批 量 添 加</el-button>
         </div>
-        <Table  ref="table" fixedName="operation" v-model="itemno"  :data="productList" :custom="true" height="500px"   @selection="selectArr" @onSelect="batchSelect">
+        <Table  ref="table" fixedName="operation" v-model="itemno"  :data="productList" :custom="true" height="500px"   @selection="selectArr" @onSelect="queryProuctAdd">
         </Table>
         <div style="display:flex;justify-content:space-between;align-items:center;margin-top:10px">
           <span>已添加产品数:{{addProductLength}}</span>
@@ -204,6 +204,7 @@ export default {
       },300)()
     },
     async addProduct (data) {
+      console.log(data,'data1111')
       let res = await this.$api.requested({
         "id": 20221123164402,
         "content": {
@@ -213,7 +214,8 @@ export default {
                 "itemid": data.itemid,
                 "price": data.price,
                 "qty": data.qty,
-                "marketprice":data.marketprice
+                "marketprice":data.marketprice,
+                "discountrate":data.discountrate
               }
             ]
         },
@@ -230,14 +232,6 @@ export default {
     },
     async onSumit () {
       console.log(this.$refs.table.tableSelectData);
-      let item = this.$refs.table.tableSelectData.map(item => {
-        return {
-          "itemid": item.itemid,
-          "price": item.price,
-          "qty": item.qty,
-          "marketprice":item.marketprice
-        }
-      })
       let res = await this.$api.requested({
         "id": 20221123164402,
         "content": {
@@ -251,6 +245,84 @@ export default {
         this.getProductList()
       })
     },
+    /*查询商品是否已添加*/
+    async queryProuctAdds(){
+      let item = this.$refs.table.tableSelectData.map(item => {
+        return {
+          "itemid": item.itemid,
+          "price": item.price,
+          "qty": item.qty,
+          "marketprice":item.marketprice,
+          "discountrate":item.discountrate
+        }
+      })
+      console.log(item,'批量添加')
+      let checkItem = []
+      item.forEach((item,index)=>{
+        checkItem[index] = item.itemid
+      })
+      console.log(checkItem,'校验id')
+      const res = await this.$api.requested({
+        "id": 20230221151903,
+        "content": {
+          "sa_contractid": this.$route.query.id,
+          "itemids":checkItem
+        },
+      })
+      console.log(res,'是否重复')
+      if (!res.data){
+        this.batchSelects(item)
+      }else {
+        this.checkItems(item)
+      }
+    },
+    async queryProuctAdd(data){
+      const res = await this.$api.requested({
+        "id": 20230221151903,
+        "content": {
+          "sa_contractid": this.$route.query.id,
+          "itemids":[data.itemid]
+        },
+      })
+      console.log(res,'是否重复')
+      if (!res.data){
+        console.log(data,'不重复的数据')
+        this.batchSelect(data)
+      }else {
+        this.checkItem(data)
+      }
+
+    },
+    checkItem(data) {
+      this.$confirm('商品已存在, 是否更新最新价格?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        closeOnClickModal:false,
+        type: 'warning'
+      }).then(() => {
+        this.batchSelect(data)
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消添加'
+        });
+      });
+    },
+    checkItems(data) {
+      this.$confirm('商品已存在, 是否更新最新价格?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        closeOnClickModal:false,
+        type: 'warning'
+      }).then(() => {
+        this.batchSelects(data)
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消添加'
+        });
+      });
+    },
     upDateData (data) {
       this.selectProductLength = data.length
     },

+ 4 - 3
src/HDrpManagement/contractManage/components/seleteProject.vue

@@ -21,10 +21,11 @@
             width="180">
           </el-table-column>
           <el-table-column
-            prop="status"
-            label="状态">
+            prop="projecttype"
+            label="项目类型">
           </el-table-column>
-          <el-table-column>
+          <el-table-column
+              label="操作">
             <template slot-scope="scope">
               <el-button size="mini" type="text" @click="rowClick(scope.row)">选 择</el-button>
             </template>

+ 3 - 3
src/HDrpManagement/contractManage/modules/detail.vue

@@ -8,7 +8,7 @@
         turnPageId="20221121201502"
         idname="sa_contractid"
         ownertable="sa_contract"
-        :tabs="mainData.type === '项目' ? ['产品清单','产品类别折扣','合同条款','详细信息'] : mainData.type === '框架' ? ['产品明细折扣','产品类别折扣','业绩目标','详细信息'] : mainData.type === '居间' ? ['详细信息'] : ['工具清单','合同条款','详细信息']"
+        :tabs="mainData.type === '项目' ? ['产品清单','产品类别折扣','详细信息'] : mainData.type === '框架' ? ['产品明细折扣','产品类别折扣','业绩目标','详细信息'] : mainData.type === '居间' ? ['详细信息'] : ['工具清单','合同条款','详细信息']"
 
         :statusCheck="[{key:'status',value:'已提交'},{key:'status',value:'审核'},{key:'status',value:'已终止'}]"
         @pageChange="pageChange"
@@ -103,8 +103,8 @@
       </div>
       <div slot="slot2">
         <!--合同条款-->
-        <contractClause :sys_enterpriseid="mainData.sys_enterpriseid" :disabled="mainData.status != '新建' || !isLeader" ref="Claus" v-if="mainData.type == '项目' ">
-        </contractClause>
+<!--        <contractClause :sys_enterpriseid="mainData.sys_enterpriseid" :disabled="mainData.status != '新建' || !isLeader" ref="Claus" v-if="mainData.type == '项目' ">
+        </contractClause>-->
         <!--业绩目标-->
         <taskTarget ref="taskTarget" v-if="Object.keys(mainData).length > 0 && mainData.type == '框架'" :data="mainData">
           <template v-slot:addTarget="scope">

+ 19 - 2
src/HDrpManagement/projectChange/modules/detail.vue

@@ -27,10 +27,10 @@
         <div class="flex-align-center-wrap" style="">
           <div v-for="item in stageList" :key="item.stagename">
             <div class="stage__panel normal-panel"  v-if="item.rowindex === selectRowindex" :style="selectColor">
-              <div style="transform: skewX(20deg);!important;color: #ffffff">{{item.stagename}}</div>
+              <div style="transform: skewX(20deg);!important;color: #ffffff" @click="setClick(item)">{{item.stagename}}</div>
             </div>
             <div class="stage__panel normal-panel"  v-else :style="unselectColor">
-              <div style="transform: skewX(20deg);!important;color: #000000" >{{item.stagename}}</div>
+              <div style="transform: skewX(20deg);!important;color: #000000" @click="setClick(item)">{{item.stagename}}</div>
             </div>
           </div>
         </div>
@@ -473,6 +473,23 @@ export default {
     },
     onSuccess(){
       this.queryMainData(this.$route.query.id)
+    },
+    setClick(row){
+      console.log(row,'选择阶段')
+      const message = '是否更换到'+ row.stagename + '阶段?'
+      this.$confirm(message, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        closeOnClickModal:false,
+        type: 'warning'
+      }).then(() => {
+        this.setStage(row.sa_project_stageid)
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消切换阶段'
+        });
+      });
     }
   },
   mounted () {

+ 43 - 13
src/HDrpManagement/publicCustomer/index.vue

@@ -42,17 +42,28 @@
           </el-option>
         </el-select>
       </div>
-      <div  class="mt-10">
-        <label class="search__label">客户等级:</label>
-        <el-select class="inline-16" v-model="selectParam.customergrade" size="small" placeholder="请选择" @change="selectChange" clearable>
-          <el-option
-              v-for="item in option.gradeData"
-              :key="item.value"
-              :label="item.value"
-              :value="item.value">
-          </el-option>
-        </el-select>
-      </div>
+        <div  class="mt-10">
+          <label class="search__label">客户分类:</label>
+          <el-select  class="inline-16" v-model="selectParam.customergrade" size="small" placeholder="请选择" @change="selectChange" clearable>
+            <el-option
+                v-for="item in option.customerClassification"
+                :key="item.value"
+                :label="item.value"
+                :value="item.value">
+            </el-option>
+          </el-select>
+        </div>
+        <div  class="mt-10">
+          <label class="search__label">客户等级:</label>
+          <el-select  class="inline-16" v-model="selectParam.grade" size="small" placeholder="请选择" @change="selectChange" clearable>
+            <el-option
+                v-for="item in option.customerGrade"
+                :key="item.value"
+                :label="item.value"
+                :value="item.value">
+            </el-option>
+          </el-select>
+        </div>
       <div  class="mt-10">
         <label class="search__label">客户行业:</label>
         <el-select class="inline-16" v-model="selectParam.industry" size="small" placeholder="请选择" @change="selectChange" clearable>
@@ -168,6 +179,8 @@ export default {
       tabIndex:"",
       option:{
         poolList:[],
+        customerClassification:[],
+        customerGrade:[],
         typeData:[],
         gradeData:[],
         industryData:[],
@@ -199,6 +212,7 @@ export default {
         status:'',
         type:'',
         customergrade:'',
+        grade:'',
         industry:'',
         startdate: "",
         enddate: "",
@@ -290,7 +304,7 @@ export default {
       this.option.typeData = res.data
 
     },
-    /*客户等级*/
+    /*客户分类*/
     async gradeList(){
       const res = await this.$api.requested({
         "classname": "sysmanage.develop.optiontype.optiontype",
@@ -304,7 +318,22 @@ export default {
           }
         }
       })
-      this.option.gradeData = res.data
+      console.log("客户等级",res.data)
+      /*for (var i=0;i<res.data.length; i++){
+        if (res.data[i].remarks !== ''){
+          this.options.gradeData[i] = res.data[i].value + "——" + res.data[i].remarks
+        }else{
+          this.options.gradeData[i] = res.data[i].value
+        }
+      }*/
+      this.option.customerClassification = res.data
+      console.log("处理后客户等级",this.options.customerClassification)
+    },
+    /*客户等级*/
+    queryCustomerGrade(){
+      this.$store.dispatch('optiontypeselect','agentgrade').then(res=>{
+        this.option.customerGrade = res.data
+      })
     },
     /*行业列表*/
     async industryList(){
@@ -387,6 +416,7 @@ export default {
     this.gradeList()
     this.industryList()
     this.queryPublicPool()
+    this.queryCustomerGrade()
   },
   mounted() {
 

+ 1 - 1
src/HDrpManagement/publicCustomer/modules/detail.vue

@@ -18,7 +18,7 @@
       </div>
       <div slot="customOperation">
         <!-- 此区域提供了自定义操作按钮 -->
-        <div class="inline-16" v-if="tool.checkAuth($route.name,'receive')  && length === 0 ">
+        <div class="inline-16" v-if="tool.checkAuth($route.name,'receive')  && length === 0 && mainData.freeget === 1">
           <receive  :id="mainData.sa_customersid" @receiveSuccess="receiveSuccess"></receive>
         </div>
         <div class="inline-16" v-if="tool.checkAuth($route.name,'distribution') && length === 0">

+ 4 - 0
src/SDrpManagement/QuotedPrice/components/productTable.vue

@@ -209,6 +209,10 @@ export default {
     },
     onColes(){
       this.dialogProductVisible = false
+      this.$refs.classShow.queryClass()
+      this.$refs.classShow.queryStandard()
+      this.$refs.classShow.queryBrands()
+      this.$refs.classShow.queryAgentiInfo()
     },
     async onSubmit(){
       const res = await this.$api.requested({

+ 5 - 0
src/SDrpManagement/QuotedPrice/components/productTableProject.vue

@@ -208,6 +208,11 @@ export default {
     },
     onColes(){
       this.dialogProductVisible = false
+      this.$refs.classShow.queryClass()
+      this.$refs.classShow.queryStandard()
+      this.$refs.classShow.queryBrands()
+      this.$refs.classShow.queryAgentiInfo()
+
     },
     async onSubmit(){
       console.log(this.selectData,"添加选择的商品")

+ 3 - 0
src/SDrpManagement/QuotedPrice/detail/modules/detailed/index.vue

@@ -19,6 +19,9 @@
         <el-descriptions-item label="报价日期">{{ basic.contactsphonenumber?basic.contactsphonenumber:"--" }}</el-descriptions-item>
         <el-descriptions-item label="有效期">{{ basic.begdate?basic.begdate + '至' + basic.enddate:"--" }}</el-descriptions-item>
         <el-descriptions-item label="总金额">{{ basic.remarks?basic.remarks:"--" }}</el-descriptions-item>
+        <el-descriptions-item label="品牌">{{ basic.brandname?basic.brandname:"--" }}</el-descriptions-item>
+        <el-descriptions-item label="领域">{{ basic.tradefields?basic.tradefields[0]:"--" }}</el-descriptions-item>
+
         <el-descriptions-item label="是否特价">{{ basic.specialoffer === 1?'是':'否' }}</el-descriptions-item>
         <el-descriptions-item label="状态" >
           <p :style="colorStyle">{{ basic.status?basic.status:"--" }}</p>

+ 27 - 7
src/SDrpManagement/salerPrivatecustomer/index.vue

@@ -33,10 +33,21 @@
           </el-select>
         </div>
         <div  class="mt-10">
-          <label class="search__label">客户等级:</label>
+          <label class="search__label">客户分类:</label>
           <el-select  class="inline-16" v-model="selectParam.customergrade" size="small" placeholder="请选择" @change="selectChange" clearable>
             <el-option
-                v-for="item in option.gradeData"
+                v-for="item in option.customerClassification"
+                :key="item.value"
+                :label="item.value"
+                :value="item.value">
+            </el-option>
+          </el-select>
+        </div>
+        <div  class="mt-10">
+          <label class="search__label">客户等级:</label>
+          <el-select  class="inline-16" v-model="selectParam.grade" size="small" placeholder="请选择" @change="selectChange" clearable>
+            <el-option
+                v-for="item in option.customerGrade"
                 :key="item.value"
                 :label="item.value"
                 :value="item.value">
@@ -176,7 +187,8 @@ export default {
       listData:[],
       option:{
         typeData:[],
-        gradeData:[],
+        customerClassification:[],
+        customerGrade:[],
         industryData:[],
         status:[
           {
@@ -204,11 +216,12 @@ export default {
       selectParam: {
         status:'',
         type:'',
+        grade:'',
         customergrade:'',
         industry:'',
         startdate:'',
         enddate:'',
-        tradingstatus:''
+        tradingstatus:'',
 
       },
       dateSelect:''
@@ -218,6 +231,7 @@ export default {
     this.queryData('1')
     this.typeList()
     this.gradeList()
+    this.queryCustomerGrade()
     this.industryList()
   },
   methods:{
@@ -262,7 +276,7 @@ export default {
       console.log(this.option.typeData)
 
     },
-    /*客户等级*/
+    /*客户分类*/
     async gradeList(){
       const res = await this.$api.requested({
         "classname": "sysmanage.develop.optiontype.optiontype",
@@ -284,8 +298,14 @@ export default {
           this.options.gradeData[i] = res.data[i].value
         }
       }*/
-      this.option.gradeData = res.data
-      console.log("处理后客户等级",this.option.gradeData)
+      this.option.customerClassification = res.data
+      console.log("处理后客户等级",this.options.customerClassification)
+    },
+    /*客户等级*/
+    queryCustomerGrade(){
+      this.$store.dispatch('optiontypeselect','agentgrade').then(res=>{
+        this.option.customerGrade = res.data
+      })
     },
     /*行业列表*/
     async industryList(){

+ 70 - 5
src/components/productTable/indexQty.vue

@@ -83,8 +83,18 @@
           <el-tag size="mini" type="info" effect="plain">{{scope.row.unitname}}/{{scope.row.axunitname}}</el-tag>
         </template>
       </el-table-column>
+      <el-table-column
+          prop="qty"
+          label="数量"
+          fixed="right"
+          width="100">
+        <template slot-scope="scope">
+          <span >{{scope.row.qty?scope.row.qty:'--'}}</span>
+        </template>
+      </el-table-column>
       <el-table-column
           prop="marketprice"
+          fixed="right"
           label="牌价"
           width="100">
         <template slot-scope="scope">
@@ -92,19 +102,68 @@
         </template>
       </el-table-column>
       <el-table-column
-          prop="qty"
-          label="数量"
-          width="100">
+          prop="discountrate"
+          fixed="right"
+          label="折扣(%)"
+          width="80">
         <template slot-scope="scope">
-          <span >{{scope.row.qty?scope.row.qty:'--'}}</span>
+          <div v-if="scope.row.discountDifferenceAmount > 0">
+            <p><span :style="[setTopColor]">{{Math.round((scope.row.discountrate * 100) * 100)/100}}</span></p>
+          </div>
+          <div v-else-if="scope.row.discountDifferenceAmount < 0 ">
+            <p><span :style="[setDownColor]">{{Math.round((scope.row.discountrate * 100) * 100)/100}}</span></p>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+          prop="mindiscountrate"
+          label="最低授权折扣(%)"
+          fixed="right"
+          width="80">
+        <template slot-scope="scope">
+          <span >{{scope.row.mindiscountrate?Math.round((scope.row.mindiscountrate * 100) * 100)/100:'--'}}</span>
         </template>
       </el-table-column>
       <el-table-column
           prop="price"
           label="单价"
+          fixed="right"
+          width="80">
+        <template slot-scope="scope">
+          <div v-if="(scope.row.discountDifferenceAmount > 0)">
+            <p><span :style="[setTopColor]">{{scope.row.price}}</span></p>
+          </div>
+          <div v-else-if="(scope.row.discountDifferenceAmount < 0 )" >
+            <p><span :style="[setDownColor]">{{scope.row.price}}</span></p>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+          prop="discountDifferenceAmount"
+          label="授权折扣差额"
+          fixed="right"
+          width="80">
+        <template slot-scope="scope">
+          <span >{{scope.row.discountDifferenceAmount?scope.row.discountDifferenceAmount:'--'}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+          prop="amount"
+          label="金额"
+          fixed="right"
+          width="80">
+        <template slot-scope="scope">
+          <span >{{scope.row.amount?scope.row.amount:'--'}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+          prop="specialoffer"
+          label="是否特价"
+          fixed="right"
           width="100">
         <template slot-scope="scope">
-          <span >{{scope.row.price?scope.row.price:'--'}}</span>
+          <i class="el-icon-check" v-if="scope.row.specialoffer === 1"  style="color: red;font-size: 20px"></i>
+          <p v-else>--</p>
         </template>
       </el-table-column>
       <el-table-column
@@ -130,6 +189,12 @@ export default {
   data(){
     return {
       tableSelectData:[],
+      setTopColor:{
+        color:'#79da56'
+      },
+      setDownColor:{
+        color:'#ef230c'
+      },
     }
   },
   methods:{