qymljy 3 лет назад
Родитель
Сommit
ebb6f8ca61

+ 2 - 1
src/Form/projectChange/add.vue

@@ -7,6 +7,7 @@
         size="35%"
         direction="rtl"
         append-to-body
+        :show-close="false"
         @close="onClose">
       <div class="drawer__panel">
         <el-row :gutter="20">
@@ -41,7 +42,7 @@
             </el-col>
             <el-col :span="12">
               <el-form-item label="预计签约金额(元):" prop="signamount_due">
-                <el-input v-model="form.signamount_due" placeholder="请输入预计签约金额"></el-input>
+                <el-input v-model="form.signamount_due" placeholder="请输入预计签约金额" disabled></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="12">

+ 2 - 1
src/Form/projectChange/edit.vue

@@ -6,6 +6,7 @@
         :visible.sync="dialogFormVisible"
         size="35%"
         direction="rtl"
+        :show-close="false"
         append-to-body
         @close="onClose">
       <div class="drawer__panel">
@@ -41,7 +42,7 @@
             </el-col>
             <el-col :span="12">
               <el-form-item label="预计签约金额(元):" prop="signamount_due">
-                <el-input v-model="form.signamount_due" placeholder="请输入预计签约金额"></el-input>
+                <el-input v-model="form.signamount_due" placeholder="请输入预计签约金额" disabled></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="12">

+ 1 - 1
src/HDrpManagement/projectChange/components/putPeople.vue

@@ -33,7 +33,7 @@ export default {
         "id": 20221114163402,
         "content": {
           "sa_projectid": this.rowData.sa_projectid,
-          "tag": this.flag === 0?'报备中':'已报备' //报备中,已报备
+          "type": this.flag === 0?'1':'2' //报备中,已报备
         },
       })
       this.tool.showMessage(res,()=>{

+ 59 - 0
src/HDrpManagement/projectChange/components/setStage.vue

@@ -0,0 +1,59 @@
+<template>
+  <div>
+    <el-button size="mini" type="primary" plain @click="dialogVisible = true">变更阶段</el-button>
+    <el-dialog
+        title="提示"
+        :visible.sync="dialogVisible"
+        append-to-body
+        width="20%"
+    >
+      <el-row :gutter="20">
+        <el-form :model="form" :rules="rules" ref="form" label-width="120px" label-position="right" size="mini" >
+          <el-col :span="24">
+            <el-form-item label="切换阶段:" prop="brandname">
+              <el-select v-model="form.stageData" placeholder="请选择">
+                <el-option
+                    v-for="item in stage"
+                    :key="item.index"
+                    :label="item.stagename"
+                    :value="item.sa_project_stageid">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-form>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false" size="mini">取 消</el-button>
+        <el-button type="primary" @click="onSubmit" size="mini">确 定</el-button>
+       </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "setStage",
+  props:["stage"],
+  data(){
+    return {
+      dialogVisible:false,
+      form:{
+        stageData:'',
+      },
+      rules:{}
+    }
+  },
+  methods:{
+    onSubmit(){
+      console.log(this.form)
+      this.dialogVisible = false
+      this.$emit("setStage",this.form.stageData)
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 41 - 14
src/HDrpManagement/projectChange/modules/detail.vue

@@ -1,12 +1,12 @@
 
 <template>
-  <basicDetails 
+  <basicDetails
     ref="details"
     :titleText="mainData.projectname"
     formPath="projectChange"
     :editData="mainData"
-    :mainAreaData="mainAreaData" 
-    :turnPageId="20221020143502" 
+    :mainAreaData="mainAreaData"
+    :turnPageId="20221020143502"
     idname="sa_projectid"
     :tags="[]"
     :tabs="['详细信息','项目评估','关联客户','产品配置单','报价单','竞争对手','关联线索']"
@@ -24,14 +24,14 @@
             style="width:100%;"
         />
       </div>
-      <div style="margin-right: 10px" class="inline-16">
+<!--      <div style="margin-right: 10px" class="inline-16">
         <Check
 
             @checkSuccess="queryMainData"
             :rowData="mainData"
             style="width:100%;"
         />
-      </div>
+      </div>-->
       <div style="margin-right: 10px" class="inline-16">
         <Del
             :id="mainData.sa_projectid"
@@ -50,11 +50,11 @@
             <div style="transform: skewX(20deg);!important;color: #ffffff">{{item.stagename}}</div>
           </div>
           <div class="stage__panel normal-panel"  v-else :style="unselectColor">
-            <div style="transform: skewX(20deg);!important;color: #000000" @click="changeSelect(item)">{{item.stagename}}</div>
+            <div style="transform: skewX(20deg);!important;color: #000000" >{{item.stagename}}</div>
           </div>
         </div>
         <div style="float: right;margin-right:15px;">
-          <el-button size="mini" type="primary" plain @click="setStage">变更阶段</el-button>
+          <setStage :stage="stageList" @setStage="setStage"></setStage>
         </div>
       </div>
 
@@ -69,7 +69,7 @@
       <andEnterprise :rowData="mainData" v-if="flag === 1"/>
     </div>
     <div slot="slot3" class=" normal-panel" >
-      <product_set :data="mainData"  v-if="flag === 1"  />
+      <product_set :data="mainData"  v-if="flag === 1"  @productSetSuccess="queryMainData($route.query.id)" @delSuccess="queryMainData($route.query.id)"/>
     </div>
     <div slot="slot4" class="normal-panel" >
       <quotation :data="mainData" v-if="flag === 1" />
@@ -80,7 +80,6 @@
     <div slot="slot6" class=" normal-panel">
       <clue v-if="mainData" :data="mainData" />
     </div>
-
   </basicDetails>
 </template>
 
@@ -96,10 +95,13 @@ import Locked from '../components/Locked'
 import Del from '../components/del'
 import andEnterprise from './modules/andEnterprise/index'
 import clue from './modules/clue/index'
+import setStage from '../components/setStage'
 export default {
-  components:{Quotation,product_set,Rival,BaseInfo,StageTask,putPeople,Check,Locked,andEnterprise,Del,clue},
+  components:{Quotation,product_set,Rival,BaseInfo,StageTask,putPeople,Check,Locked,andEnterprise,Del,clue,setStage},
   data () {
     return {
+      totalPrice:0,
+      dialogVisible:false,
       nowStage:'',
       flagTag:0,
       flag:0,
@@ -142,6 +144,7 @@ export default {
       this.$emit('onSuccess')
     },
     async queryMainData (id) {
+      this.totalPrice = 0
       const res = await this.$api.requested({
         "id": "20221021103902",
         "version":1,
@@ -154,6 +157,7 @@ export default {
       /* 获取标签数据 */
       /*this.tagObj = await this.$store.dispatch('queryTagList',{table:'sa_project',id:this.mainData.sa_projectid})*/
       this.flag = 1
+      this.productSet()
       this.getProjectAddres()
       this.projectStage()
       this.tagData()
@@ -195,13 +199,13 @@ export default {
       console.log(this.flagTag,'报备标签状态')
     },
     /*修改项目阶段*/
-    async setStage(){
-      console.log(this.nowStage)
+    async setStage(val){
+      /*console.log(this.nowStage)*/
       const res = await this.$api.requested({
         "id": "20221024160102",
         "content": {
-          "sa_projectid":this.nowStage.sa_projectid,
-          "sa_project_stageid":this.nowStage.sa_project_stageid
+          "sa_projectid":this.mainData.sa_projectid,
+          "sa_project_stageid":val
         }
       })
       this.tool.showMessage(res,()=>{
@@ -366,6 +370,10 @@ export default {
           label:'负责人',
           value: this.mainData.name
         },
+        {
+          label:'预计签约金额',
+          value: this.totalPrice
+        },
       ]
     },
     /*获取项目阶段*/
@@ -389,6 +397,24 @@ export default {
       console.log(val)
       this.nowStage = val
       this.selectRowindex = val.rowindex
+    },
+    /*产品配置单*/
+    async productSet(){
+      const res = await this.$api.requested({
+        "id": 20221021145702,
+        "content": {
+          "sa_projectid": this.$route.query.id,
+          "pageNumber": 1,
+          "pageSize": 50,
+          "where": {
+            "condition": ""
+          }
+        },
+      })
+      console.log(res,"产品配置清单")
+      res.data.forEach(e=>{
+        this.totalPrice = this.totalPrice + e.amount
+      })
     }
   },
   mounted () {
@@ -401,6 +427,7 @@ export default {
     this.getSysetms()
     // 验证权限
     this.tool.checkAuth(this.$route.name,'update')?'':this.$router.go(-1)
+
   },
 }
 

+ 1 - 1
src/HDrpManagement/projectChange/modules/modules/andEnterprise/components/add.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="small" type="primary" @click="onshow">新增关联客户</el-button>
+    <el-button size="small" type="primary" @click="onshow">新</el-button>
     <el-drawer
         title="新增关联客户"
         :visible.sync="visible"

+ 4 - 1
src/HDrpManagement/projectChange/modules/modules/andEnterprise/index.vue

@@ -20,7 +20,10 @@
           <div v-if="scope.column.columnname === 'province'">
             <p>{{ scope.column.data.province + '-' + scope.column.data.city + '-' + scope.column.data.county}}</p>
           </div>
-          <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
+          <div v-else-if="scope.column.columnname === 'operation'">
+            <span>{{scope.column.data[scope.column.columnname]}}</span>
+          </div>
+          <p v-else>{{scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname]:'--'}}</p>
         </template>
         <template v-slot:opreation="scope">
           <edit class="inline-16" v-if="tool.checkAuth($route.name,'update')" :data="scope.data" @updateSuccess="onSuccess"></edit>

+ 24 - 3
src/HDrpManagement/projectChange/modules/modules/productSet/add.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="small" type="primary" @click="onShow" >创建产品配置单</el-button>
+    <el-button size="small" type="primary" @click="onShow" >新 建</el-button>
     <el-drawer
         title="创建产品配置单"
         :visible.sync="dialogFormVisible"
@@ -110,14 +110,22 @@
             <el-table-column
                 prop="marketprice"
                 label="牌价"
-                width="100">
+                width="150">
             </el-table-column>
             <el-table-column
                 prop="num"
                 label="数量"
                 width="150">
               <template slot-scope="scope">
-                <el-input-number v-model="scope.row.qty" size="mini" :min="1"  label="描述文字"></el-input-number>
+                <el-input-number v-model="scope.row.qty" size="mini" :min="1"  label="描述文字" @change="numChange(scope.row.qty,scope.$index,scope.row)"></el-input-number>
+              </template>
+            </el-table-column>
+            <el-table-column
+                prop="totalPrice"
+                label="金额"
+                width="150">
+              <template slot-scope="scope">
+                <span>{{scope.row.totalPrice}}</span>
               </template>
             </el-table-column>
 <!--            <el-table-column
@@ -231,9 +239,22 @@ export default {
       this.params.content.sa_projectid = this.$route.query.id
       const res = await this.$api.requested(this.params)
       this.tableData = res.data
+      this.tableData.forEach((item,index)=>{
+        this.tableData[index] = item
+        this.tableData[index].qty = 1
+        this.tableData[index].totalPrice = this.tableData[index].qty * this.tableData[index].marketprice
+      })
+      console.log(this.tableData,"报价表格数据")
       this.total = res.total
       this.currentPage = res.pageNumber
     },
+    /*修改商品数量*/
+    numChange(val,index,data){
+      console.log(val,index)
+      data.totalPrice = data.marketprice * val
+      console.log(data.marketprice,val,data.totalPrice)
+      this.$set(this.tableData,index,data)
+    },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);
       this.params.content.pageSize = val

+ 2 - 1
src/HDrpManagement/projectChange/modules/modules/productSet/deleteProduct.vue

@@ -4,7 +4,7 @@
         title="这是一段内容确定删除吗?"
         @confirm="onDel"
     >
-      <el-button type="text" size="mini" slot="reference">删除</el-button>
+      <el-button type="text" size="mini" slot="reference">删 除</el-button>
     </el-popconfirm>
   </div>
 </template>
@@ -19,6 +19,7 @@ export default {
         "id": 20221021145602,
         "content": {
           "deletereason": "",
+          "sa_projectid":'',
           "sa_project_itemsids": [this.id]
         },
       })

+ 49 - 12
src/HDrpManagement/projectChange/modules/modules/productSet/index.vue

@@ -3,7 +3,7 @@
   <div>
     <div style="margin-bottom: 15px">
       <add class="inline-16"  @addSuccess="onSuccess"></add>
-      <el-button class="inline-16" size="small" @click="delProduct" :disabled="delProductData.length === 0">删 除</el-button>
+      <el-button class="inline-16" size="small" @click="onDelProduct" :disabled="delProductData.length === 0">删 除</el-button>
       <el-input
           size="small"
           style="width: 200px;"
@@ -131,6 +131,14 @@
             <el-input-number disabled v-model="scope.row.qty" size="mini" :min="1"  label="描述文字"></el-input-number>
           </template>
         </el-table-column>
+        <el-table-column
+            prop="amount"
+            label="总金额"
+            width="100">
+          <template slot-scope="scope">
+            <p><span>{{scope.row.amount?scope.row.amount:'--'}}</span></p>
+          </template>
+        </el-table-column>
 <!--          <el-table-column
               prop="status"
               label="操作"
@@ -140,17 +148,24 @@
             </template>
           </el-table-column>-->
       </el-table>
-      <div style="margin-top:16px;text-align:right">
-        <el-pagination
-            background
-            small
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
-            :current-page="currentPage"
-            :page-size="params.content.pageSize"
-            layout="total, prev, pager, next, jumper"
-            :total="total">
-        </el-pagination>
+      <div style="margin-top:16px;">
+        <div style="float: left">
+          <span>金额:{{totalPrice}}</span>
+        </div>
+        <div style="float: right">
+          <el-pagination
+              style="text-align:right"
+              background
+              small
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="currentPage"
+              :page-size="params.content.pageSize"
+              layout="total, prev, pager, next, jumper"
+              :total="total">
+          </el-pagination>
+        </div>
+
       </div>
     </div>
   </div>
@@ -169,6 +184,7 @@ export default {
   data () {
     return {
       tableHieght:"600px",
+      totalPrice:0,
       tablecols:[],
       list:[],
       total:0,
@@ -201,10 +217,14 @@ export default {
     },*/
 
     async listData(){
+      this.totalPrice = 0
       this.params.content.sa_projectid = this.data.sa_projectid
       const res = await this.$api.requested(this.params)
       console.log(res,'____________________________')
       this.list = res.data
+      res.data.forEach((e,index)=>{
+        this.totalPrice = this.totalPrice + e.amount
+      })
       this.total = res.total
       console.log(this.list)
     },
@@ -220,6 +240,7 @@ export default {
     },
     onSuccess(){
       this.listData()
+      this.$emit("productSetSuccess")
     },
     clearData(){
       console.log("执行")
@@ -239,17 +260,33 @@ export default {
       })
       console.log(this.delProductData)
     },
+    onDelProduct() {
+      this.$confirm('此操作将删除这些商品, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.delProduct()
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '取消删除'
+        });
+      });
+    },
     /*批量删除商品*/
     async delProduct(){
       const res = await this.$api.requested({
         "id": 20221021145602,
         "content": {
           "deletereason": "",
+          "sa_projectid":this.data.sa_projectid,
           "sa_project_itemsids":this.delProductData
         },
       })
       this.tool.showMessage(res,()=>{
         this.listData()
+        this.$emit("delSuccess")
       })
     }
   },

+ 18 - 4
src/HDrpManagement/projectChange/modules/modules/quotation/index.vue

@@ -24,12 +24,13 @@
           <div v-else-if="scope.column.columnname === 'specialoffer'">
             <span>{{scope.column.data[scope.column.columnname] === 0?'否':'是'}}</span>
           </div>
-          <p v-else>{{scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname]:'--'}}</p>
+          <div v-else-if="scope.column.columnname === 'operation'">
+            <span>{{scope.column.data[scope.column.columnname]}}</span>
+          </div>
+          <p v-else>{{(scope.column.data[scope.column.columnname])?scope.column.data[scope.column.columnname]:'--'}}</p>
         </template>
         <template v-slot:opreation="scope">
-          <!--          <edit class="inline-16" v-if="tool.checkAuth($route.name,'update')" :data="scope.data" @updateSuccess="onSuccess"></edit>
-                    <to_del class="inline-16" :data="scope.data" @toDelSuccess="onSuccess"></to_del>-->
-          <!--          <toVoid v-if="tool.checkAuth($route.name,'toVoid')" :data="scope.data" @toVoidSuccess="onSuccess"></toVoid>-->
+          <el-button size="mini" type="text" @click="detailGo(scope.data)">详 情</el-button>
         </template>
       </tableLayout>
     </div>
@@ -99,6 +100,16 @@ export default {
   },
   components:{buillDetail,add},
   methods:{
+    detailGo(row){
+      console.log(row)
+      this.$router.push({
+        path:'/quotedPriceDetail',
+        query:{
+          id:row.sa_quotedpriceid,
+          rowindex:row.rowindex
+        }
+      })
+    },
     async submit (data) {
       let res = await this.$api.requested({
         "id": 20221020165303,
@@ -139,6 +150,9 @@ export default {
       this.params.content.sa_projectid = this.data.sa_projectid
       const res = await this.$api.requested(this.params)
       this.list = res.data
+      res.data.forEach((item,index)=>{
+        /*this.list[index].begdate = new Date(e.begdate).getFullYear() +*/
+      })
       this.total = res.total
       console.log(this.list,"报价单")
     },

+ 2 - 1
src/HDrpManagement/projectChange/modules/modules/stageTask/modules/edit.vue

@@ -22,7 +22,7 @@
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="drawer = false" class="normal-btn-width">取 消</el-button>
-        <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">下一步</el-button>
+        <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width" :disabled="selectData.length === 0">下一步</el-button>
       </div>
     </el-drawer>
 <!-- 编辑操作 -->
@@ -202,6 +202,7 @@ export default {
       this.form = res.data
     },
     checkboxCallBack(val){
+      this.selectData = []
       console.log(val)
       this.selectCustomer = val
       val.forEach((item,index) => {

+ 3 - 3
src/HDrpManagement/projectChange/modules/modules/stageTask/modules/evaluationRecord.vue

@@ -24,10 +24,10 @@
                 <div class="step__panel normal-margin">
                   <div class="flex-align-center flex-between" style="margin-bottom:10px">
                     <div  class="flex-align-center">
-                      <img class="inline-16" height="45" width="45" :src="i.head" alt="">
+                      <img class="inline-16" height="45" width="45" :src="i.user.headpic" alt="">
                       <div>
-                        <p >{{i.data[0].createby}}</p>
-                        <p style="font-size: 12px;color:#999">{{i.data[0].depname}}<span style="margin-left: 10px">{{i.data[0].position}}</span></p>
+                        <p >{{i.user.name}}</p>
+                        <p style="font-size: 12px;color:#999">{{i.user.depname}}<span style="margin-left: 10px">{{i.user.position}}</span></p>
                       </div>
 
                     </div>

+ 0 - 12
src/SDrpManagement/QuotedPrice/components/edit/quotedPriceProduct.vue

@@ -285,18 +285,6 @@ export default {
     onChangeNum (val,data,index,step) {
       console.log("步长",this.step)
       console.log(val,data,index,step)
-      if (val <= data.orderminqty){
-        val = data.orderminqty
-      }else {
-        val = val - data.orderminqty
-        let m = val % data.orderaddqty
-        console.log(m)
-        if (m !== 0){
-          val = val + data.orderaddqty
-          console.log(val,"新的数量值")
-          data.qty = val
-        }
-      }
       data.amount = val * data.price
 
 

+ 0 - 15
src/SDrpManagement/QuotedPrice/components/quotedPriceProduct.vue

@@ -318,22 +318,7 @@ export default {
       this.$refs.quoterPrice.queryProduct(sa_quotedpriceid,type)
     },
     onChangeNum (val,data,index,step) {
-      console.log("步长",this.step)
-      console.log(val,data,index,step)
-      if (val <= data.orderminqty){
-        val = data.orderminqty
-      }else {
-        val = val - data.orderminqty
-        let m = val % data.orderaddqty
-        console.log(m)
-        if (m !== 0){
-          val = val + data.orderaddqty
-          console.log(val,"新的数量值")
-          data.qty = val
-        }
-      }
       data.amount = val * data.price
-
       this.$set(this.list,index,data)
       this.totalPrice = 0
       for (var i=0 ;i<this.list.length;i++){

+ 1 - 1
src/SDrpManagement/QuotedPrice/index.vue

@@ -79,7 +79,7 @@
           {{issaler?'--':scope.data.column.data.createby}}
         </div>
         <div v-else-if="scope.data.column.columnname === 'distributor'">
-          {{issaler?scope.data.column.data.createby:'--'}}
+          {{issaler?scope.data.column.data.enterprisename:'--'}}
         </div>
         <div v-else>
           {{scope.data.column.data[[scope.data.column.columnname]]?scope.data.column.data[[scope.data.column.columnname]]:'--'}}

+ 1 - 0
src/SDrpManagement/salerPrivatecustomer/detail/modules/detailedData.vue

@@ -10,6 +10,7 @@
         <el-descriptions-item label-class-name="my-label" label="所属行业">{{ basic.industry?basic.industry:"--" }}</el-descriptions-item>
         <el-descriptions-item label-class-name="my-label" label="上级企业">{{ basic.superiorenterprisename?basic.superiorenterprisename:"--" }}</el-descriptions-item>
         <el-descriptions-item label-class-name="my-label" label="成交状态">{{ basic.tradingstatus?basic.tradingstatus:"--" }}</el-descriptions-item>
+        <el-descriptions-item label-class-name="my-label" label="成交次数">{{ basic.contact_signnum === 0?0:basic.contact_signnum }}</el-descriptions-item>
         <el-descriptions-item label-class-name="my-label" label="合作状态">{{ basic.status?basic.status:"--" }}</el-descriptions-item>
         <el-descriptions-item label-class-name="my-label" label="负责人">{{ basic.createby?basic.createby:"--" }}</el-descriptions-item>
         <el-descriptions-item label-class-name="my-label" label="来源">{{ basic.source?basic.source:"--" }}</el-descriptions-item>