Browse Source

bug修复

qymljy 2 years ago
parent
commit
31ff149d3e
22 changed files with 296 additions and 121 deletions
  1. 1 1
      src/Form/QuotedPrice/edit.vue
  2. 1 1
      src/Form/QuotedPrice/editCopy.vue
  3. 7 1
      src/HDrpManagement/contractManage/components/productClassList/productClassList.vue
  4. 7 26
      src/HDrpManagement/contractManage/components/productDetailList/addProduct.vue
  5. 7 26
      src/HDrpManagement/contractManage/components/productList/addProduct.vue
  6. 30 10
      src/HDrpManagement/contractManage/components/productList/productBillno.vue
  7. 3 2
      src/HDrpManagement/contractManage/components/taskTarget/addTarget.vue
  8. 2 0
      src/HDrpManagement/contractManage/components/taskTarget/editTarget.vue
  9. 2 0
      src/HDrpManagement/contractManage/components/taskTarget/taskTarget.vue
  10. 35 2
      src/HDrpManagement/contractManage/index.vue
  11. 5 1
      src/HDrpManagement/contractManage/modules/detail.vue
  12. 21 23
      src/HDrpManagement/projectChange/index.vue
  13. 5 5
      src/HDrpManagement/projectChange/modules/detail.vue
  14. 4 4
      src/HDrpManagement/projectChange/modules/modules/contract/components/add.vue
  15. 7 3
      src/SDrpManagement/QuotedPrice/components/delProduct.vue
  16. 6 4
      src/SDrpManagement/QuotedPrice/components/edit/quotedPriceProduct.vue
  17. 1 1
      src/SDrpManagement/QuotedPrice/components/productTable.vue
  18. 7 5
      src/SDrpManagement/QuotedPrice/components/quotedPriceProduct.vue
  19. 1 1
      src/SDrpManagement/QuotedPrice/detail/index.vue
  20. 6 4
      src/SDrpManagement/QuotedPrice/detail/modules/productInventory/index.vue
  21. 1 1
      src/SDrpManagement/QuotedPrice/modules/ProjectQuotationAdd.vue
  22. 137 0
      src/components/productTable/index.vue

+ 1 - 1
src/Form/QuotedPrice/edit.vue

@@ -243,7 +243,7 @@
       <div >
         <el-divider></el-divider>
       </div>
-      <div style="margin:10px 20px 20px 20px">
+      <div style="margin:20px 20px 20px 20px">
         <quotedPriceProduct :sa_quotedpriceid="form.sa_quotedpriceid" :sa_projectid="form.sa_projectid" :quotedpricetype="form.quotedpricetype" ref="quoterPrice" @checkForm="onSubmit" @productData="productDataChange"></quotedPriceProduct>
       </div>
       <div class="fixed__btn__panel">

+ 1 - 1
src/Form/QuotedPrice/editCopy.vue

@@ -236,7 +236,7 @@
     <div >
       <el-divider></el-divider>
     </div>
-    <div style="margin:10px 20px 20px 20px">
+    <div style="margin:20px 20px 20px 20px">
       <quotedPriceProduct :sa_quotedpriceid="form.sa_quotedpriceid" :sa_projectid="form.sa_projectid" :quotedpricetype="form.quotedpricetype" ref="quoterPrice" @checkForm="onSubmit" @productData="productDataChange"></quotedPriceProduct>
     </div>
     <div class="fixed__btn__panel">

+ 7 - 1
src/HDrpManagement/contractManage/components/productClassList/productClassList.vue

@@ -94,7 +94,7 @@ export default {
       
     },
     discountrateChange (num,data) {
-      this.form.discountrate = num      
+      this.form.discountrate = num
       this.form.price = this.form.discountrate * data.marketprice
     },
     priceChange (num,data) {
@@ -104,6 +104,12 @@ export default {
       
     },
     async save (data) {
+      if (data.discountrate > 100){
+        data.discountrate = 100
+      }else if (data.discountrate < 0){
+        data.discountrate = 1
+      }
+      data.discountrate = Math.round(data.discountrate *100)/100
       let res = await this.$api.requested({
         "id":20221124110202,
         "content": {

+ 7 - 26
src/HDrpManagement/contractManage/components/productDetailList/addProduct.vue

@@ -8,27 +8,7 @@
           <el-input size="small" style="width:200px;margin-bottom:10px" v-model="params.content.where.condition" placeholder="输入搜索内容" @clear="getProductList(params.content.pageNumber = 1)" @keyup.native.enter="getProductList(params.content.pageNumber = 1)" clearable></el-input>
           <el-button type="primary" size="small" :disabled="selectProductLength == 0" @click="onSumit">批 量 添 加</el-button>
         </div>
-        <Table @selectArr="selectArr" ref="table" v-model="itemno" :layout="tablecols" :data="productList" :custom="true" height="500px"  @upDateData="upDateData">
-          <template v-slot:customcol="scope">
-            <div v-if="scope.column.columnname == 'attinfos'">
-              <previewImage 
-                v-if="scope.column.data.attinfos[0]" 
-                style="width:38px;height:38px;margin:0px" 
-                class="image" 
-                :image="scope.column.data.attinfos[0]" 
-                :list="scope.column.data.attinfos" 
-                :deletebtn="false"
-              ></previewImage>
-            </div>
-            <div v-else-if="scope.column.columnname == 'brand'">
-              {{scope.column.data[scope.column.columnname][0] ? scope.column.data[scope.column.columnname][0].brandname : '--'}}
-            </div>
-            <div v-else>{{scope.column.data[scope.column.columnname]}}</div>
-            <span v-if="!scope.column.data[scope.column.columnname] && scope.column.data[scope.column.columnname] !== 0 && scope.column.columnname != 'operation'">--</span>
-          </template>
-          <template v-slot:opreation="scope">
-            <el-button type="text" size="mini" @click="addProduct(scope.data)">添 加</el-button>
-          </template>
+        <Table @selectArr="selectArr" ref="table" v-model="itemno" :layout="tablecols" :data="productList" :custom="true" height="500px"  @upDateData="upDateData" @selection="selectArr" @onSelect="addProduct">
         </Table>
         <div style="display:flex;justify-content:space-between;align-items:center;margin-top:10px">
           <span>已添加产品数:{{addProductLength}}</span>
@@ -50,7 +30,8 @@
 </template>
 
 <script>
-import Table from '@/HDrpManagement/ProductGroupMag/modules/table'
+// import Table from '@/HDrpManagement/ProductGroupMag/modules/table'
+import Table from '@/components/productTable/index'
 import previewImage from '@/components/previewImage/index'
 import { log } from '@antv/g2plot/lib/utils';
 export default {
@@ -131,8 +112,8 @@ export default {
       })
     },
     async onSumit () {
-      console.log(this.$refs.table.allArr);
-      let item = this.$refs.table.allArr.map(item => {
+      console.log(this.$refs.table.tableSelectData);
+      let item = this.$refs.table.tableSelectData.map(item => {
         return {
           "itemid": item.itemid,
           "price": '0',
@@ -147,9 +128,9 @@ export default {
         },
       })
       this.tool.showMessage(res,() => {
-        this.drawer = false
         this.$emit('onSuccess')
-        this.$refs.table.allArr = []
+        this.$refs.table.tableSelectData = []
+        this.getProductList()
 
       })
     },

+ 7 - 26
src/HDrpManagement/contractManage/components/productList/addProduct.vue

@@ -62,27 +62,7 @@
           </div>
           <el-button type="primary" size="small" :disabled="selectProductLength == 0" @click="onSumit">批 量 添 加</el-button>
         </div>
-        <Table @selectArr="selectArr" ref="table" fixedName="operation" v-model="itemno" :layout="tablecols" :data="productList" :custom="true" height="500px"  @upDateData="upDateData">
-          <template v-slot:customcol="scope">
-            <div v-if="scope.column.columnname == 'attinfos'">
-              <previewImage 
-                v-if="scope.column.data.attinfos[0]" 
-                style="width:38px;height:38px;margin:0px" 
-                class="image" 
-                :image="scope.column.data.attinfos[0]" 
-                :list="scope.column.data.attinfos" 
-                :deletebtn="false"
-              ></previewImage>
-            </div>
-            <div v-else-if="scope.column.columnname == 'itemclass'">
-              {{scope.column.data[scope.column.columnname][0] && scope.column.data[scope.column.columnname][0].itemclassname}}
-            </div>
-            <div v-else>{{scope.column.data[scope.column.columnname]}}</div>
-            <span v-if="!scope.column.data[scope.column.columnname] && scope.column.data[scope.column.columnname] !== 0 && scope.column.columnname != 'operation'">--</span>
-          </template>
-          <template v-slot:opreation="scope">
-            <el-button type="text" size="mini" @click="addProduct(scope.data)">添 加</el-button>
-          </template>
+        <Table  ref="table" fixedName="operation" v-model="itemno"  :data="productList" :custom="true" height="500px"   @selection="selectArr" @onSelect="addProduct">
         </Table>
         <div style="display:flex;justify-content:space-between;align-items:center;margin-top:10px">
           <span>已添加产品数:{{addProductLength}}</span>
@@ -104,7 +84,8 @@
 </template>
 
 <script>
-import Table from '@/HDrpManagement/ProductGroupMag/modules/table'
+// import Table from '@/HDrpManagement/ProductGroupMag/modules/table'
+import Table from '@/components/productTable/index'
 import previewImage from '@/components/previewImage/index'
 export default {
   props:['disabled','data'],
@@ -223,8 +204,8 @@ export default {
       })
     },
     async onSumit () {
-      console.log(this.$refs.table.allArr);
-      let item = this.$refs.table.allArr.map(item => {
+      console.log(this.$refs.table.tableSelectData);
+      let item = this.$refs.table.tableSelectData.map(item => {
         return {
           "itemid": item.itemid,
           "price": '0',
@@ -239,9 +220,9 @@ export default {
         },
       })
       this.tool.showMessage(res,() => {
-        this.drawer = false
         this.$emit('onSuccess')
-        this.$refs.table.allArr = []
+        this.$refs.table.tableSelectData = []
+        this.getProductList()
       })
     },
     upDateData (data) {

+ 30 - 10
src/HDrpManagement/contractManage/components/productList/productBillno.vue

@@ -22,15 +22,15 @@
             ></previewImage>
           </div>
           <div v-else-if="scope.column.columnname == 'discountrate'">
-            <el-input size="mini" v-if="editIndex == scope.column.data.sa_contract_itemsid" v-model="form.discountrate" @input="discountrateChange($event,scope.column.data)"></el-input>
+            <el-input size="mini" v-if="editIndex == scope.column.data.sa_contract_itemsid" v-model="form.discountrate" @change="discountrateChange($event,scope.column.data,scope.column.data.index)"></el-input>
             <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
           </div>
           <div v-else-if="scope.column.columnname == 'price'">
-            <el-input size="mini" v-if="editIndex == scope.column.data.sa_contract_itemsid" v-model="form.price" @input="priceChange($event,scope.column.data)"></el-input>
+            <el-input size="mini" v-if="editIndex == scope.column.data.sa_contract_itemsid" v-model="form.price" @change="priceChange($event,scope.column.data,scope.column.data.index)"></el-input>
             <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
           </div>
           <div v-else-if="scope.column.columnname == 'countPrice'">
-            <p>{{scope.column.data.price * scope.column.data.qty}}</p>
+            <p>{{Math.round((scope.column.data.price * scope.column.data.qty)*100)/100}}</p>
           </div>
           <div v-else-if="scope.column.columnname == 'brand'">
             {{scope.column.data[scope.column.columnname][0] && scope.column.data[scope.column.columnname][0].brandname}}
@@ -104,6 +104,9 @@ export default {
     async listData(){
       this.params.content.sa_contractid = this.$route.query.id
       const res = await this.$api.requested(this.params)
+      res.data.forEach((e,index)=>{
+        res.data[index].discountrate = Math.round((res.data[index].discountrate *100)*100)/100
+      })
       this.list = res.data
       this.total = res.total
       this.$emit('priceChange')
@@ -111,23 +114,40 @@ export default {
     qtyChange (num) {
       this.form.qty = num
       console.log(num);
-      
     },
     handleChange(num) {
       console.log(num);
       
     },
-    discountrateChange (num,data) {
-      this.form.discountrate = num      
-      this.form.price = this.form.discountrate / 100 * data.marketprice
+    discountrateChange (num,data,index) {
+      console.log(num,data,index)
+      if (num>100){
+        this.form.discountrate = 100
+      }else if (num < 0){
+        this.form.discountrate = 1
+      }else {
+        this.form.discountrate = Math.round(num *100)/100
+      }
+      this.form.price = Math.round((this.form.discountrate / 100 * data.marketprice)*100)/100
+      data.price = this.form.price
+      this.$set(this.list,index,data)
     },
-    priceChange (num,data) {
-      this.form.price = num
-      this.form.discountrate = this.form.price / data.marketprice * 100
+    priceChange (num,data,index) {
+      if (num > data.marketprice){
+        this.form.price = data.marketprice
+      }else if (num < data.marketprice * 0.01){
+        this.form.price = data.marketprice * 0.01
+      }else {
+        this.form.price = Math.round(num * 100)/100
+      }
+      this.form.discountrate = Math.round((this.form.price / data.marketprice * 100)*100)/100
+      data.price = this.form.price
+      this.$set(this.list,index,data)
       console.log(this.form.price,data.marketprice);
       
     },
     async save () {
+      this.form.discountrate = (this.form.discountrate/100).toFixed(4)
       let res = await this.$api.requested({
         "id": 20221122200302,
         "content": {

+ 3 - 2
src/HDrpManagement/contractManage/components/taskTarget/addTarget.vue

@@ -54,12 +54,13 @@ export default {
         "content": {
             "year": this.form.year,
             "sa_salestargetbillid": 0, //新建年度是为0,添加人员时为具体的数据id
-            "sys_enterpriseid": this.data.sys_enterpriseid
+            "sys_enterpriseid": this.data.sys_enterpriseid,
+            "sa_contractid":this.$route.query.id
         },
       })
       this.tool.showMessage(res,() => {
         this.visible = false
-        this.$emit('onSuccess')
+        this.$emit('onSuccess',this.form.year)
       })
     }
   },

+ 2 - 0
src/HDrpManagement/contractManage/components/taskTarget/editTarget.vue

@@ -103,6 +103,7 @@ export default {
     return {
       dialogTableVisible:false,
       form:{
+        "sa_contractid":1
       },
       date:{
         year:'',
@@ -136,6 +137,7 @@ export default {
       }
       this.form.y1l = this.form.s1l + this.form.s2l + this.form.s3l + this.form.s4l
       this.form.y1h = this.form.s1h + this.form.s2h + this.form.s3h + this.form.s4h
+      this.form.sa_contractid = this.$route.query.id
       const res = await this.$api.requested({
         "id": 20221229111502,
         "content": this.form

+ 2 - 0
src/HDrpManagement/contractManage/components/taskTarget/taskTarget.vue

@@ -360,6 +360,7 @@ export default {
         "content": {
             "nocache":true,
             "sys_enterpriseid": 0,//企业id
+            "sa_contractid":1,
             "where": {
                 // "year": 2022
             }
@@ -373,6 +374,7 @@ export default {
     },
     async queryData () {
       this.param.content.where.year = this.year
+      this.param.content.sa_contractid = this.$route.query.id
       this.param.content.sys_enterpriseid = this.data.sys_enterpriseid
       /*this.param.content.where.condition = this.condition*/
       const res = await this.$api.requested(this.param)

+ 35 - 2
src/HDrpManagement/contractManage/index.vue

@@ -66,6 +66,21 @@
             <el-option label="已终止" value="已终止" ></el-option>
           </el-select>
         </div>
+        <div class="mt-10">
+          <label class="search__label" >创建日期:</label>
+          <el-date-picker
+              style="margin-right: 24px !important;"
+              size="small"
+              @change="selectChange"
+              value-format="yyyy-MM-dd"
+              v-model="dateSelect"
+              type="daterange"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+              clearable>
+          </el-date-picker>
+        </div>
       </template>
 
       <template v-slot:tbList="scope">
@@ -115,6 +130,7 @@ export default {
   data () {
     return {
       options:[],
+      dateSelect:'',
       areaList:[
         {
           title: '我负责的',
@@ -142,7 +158,13 @@ export default {
       tabIndex:"1",
       type:'',
       condition:'',
-      status:''
+      status:'',
+      selectParam: {
+        status: "",
+        type: "",
+        begindate:"",
+        enddate:""
+      },
     }
   },
   created () {
@@ -201,7 +223,18 @@ export default {
       this.$refs.list.param.content.pageNumber=1;
       this.$refs.list.param.content.type=this.area;
       this.$refs.list.listData()
-    }
+    },
+    selectChange () {
+      if (this.dateSelect !== '' && this.dateSelect !== null){
+        this.selectParam.begindate = this.dateSelect[0]
+        this.selectParam.enddate = this.dateSelect[1]
+      }else {
+        this.selectParam.begindate = ''
+        this.selectParam.enddate = ''
+      }
+      this.$refs.list.param.content.where = this.selectParam
+      this.$refs.list.listData()
+    },
   }
 }
 

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

@@ -129,7 +129,7 @@
         <!--业绩目标-->
         <taskTarget ref="taskTarget" v-if="Object.keys(mainData).length > 0 && mainData.type == '框架'" :data="mainData">
           <template v-slot:addTarget="scope">
-              <add-target :disabled="mainData.status != '新建' || !isLeader" v-if="tool.checkAuth($route.name,'taskTargetManage')" :data="mainData" @onSuccess="$refs.taskTarget.queryData()"></add-target>
+              <add-target :disabled="mainData.status != '新建' || !isLeader" v-if="tool.checkAuth($route.name,'taskTargetManage')" :data="mainData" @onSuccess="successYear"></add-target>
           </template>
           <template v-slot:edit="scope">
             <edit-target class="inline-16" :disabled="mainData.status != '新建' || !isLeader" v-if="tool.checkAuth($route.name,'taskTargetManage')" :data="scope.data" :salerId="mainData" @onSuccess="$refs.taskTarget.queryData()"/>
@@ -1038,6 +1038,10 @@ export default {
       this.queryMainData(this.$route.query.id)
       this.$emit('onSuccess')
     },
+    successYear(year){
+      this.$refs.taskTarget.year = year
+      this.$refs.taskTarget.queryData()
+    }
     // async getModelList () {
     //   let res = await this.$api.requested({
     //     "id": 20221121155801,

+ 21 - 23
src/HDrpManagement/projectChange/index.vue

@@ -59,9 +59,9 @@
           <el-select class="inline-24" v-model="selectParam.stagename" placeholder="请选择项目阶段" @change="selectChange" size="small" clearable>
             <el-option
                 v-for="item in option.stageList"
-                :key="item.value"
-                :label="item.value"
-                :value="item.value">
+                :key="item.stagename"
+                :label="item.stagename"
+                :value="item.stagename">
             </el-option>
           </el-select>
         </div>
@@ -162,26 +162,7 @@ export default {
           }
         ],
         stageList:[
-          {
-            value:"阶段一",
-            label:"阶段一"
-          },
-          {
-            value:"阶段二",
-            label:"阶段二"
-          },
-          {
-            value:"阶段三",
-            label:"阶段三"
-          },
-          {
-            value:"阶段四",
-            label:"阶段四"
-          },
-          {
-            value:"阶段五",
-            label:"阶段五"
-          }
+
         ]
       },
       tabName:"1",
@@ -222,6 +203,7 @@ export default {
     this.getEnterprise()
     this.getSysetms()
     this.queryUserInfo()
+    this.stageData()
   },
   methods: {
     /* 获取联系人:负责人列表 */
@@ -322,6 +304,22 @@ export default {
       console.log(JSON.parse(window.sessionStorage.getItem('userInfo')));
 
     },
+    /*获取阶段*/
+    async stageData(){
+      const res = await this.$api.requested({
+        "id": 20221128143604,
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 99,
+          "where": {
+            "condition": "",
+            "allprojecttype":"",
+            "projecttype":""
+          }
+        }
+      })
+      this.option.stageList = res.data
+    }
     /*onChangeTab(val){
       console.log(val)
       this.tabIndex = val

+ 5 - 5
src/HDrpManagement/projectChange/modules/detail.vue

@@ -19,15 +19,16 @@
       <div  style="display: inline-block !important;">
         <putPeople @putSuccess="putSuccess" v-if="flagTag !== ''" :rowData="mainData" :flagTag="flagTag" :disabled="disabled" style="width:100%;"/>
       </div>
-      <div class="inline-16">
-        <Del :id="mainData.sa_projectid" :nameId="20221020144302" nameKey="sa_projectids" v-if="tool.checkAuth($route.name,'toVoid') " :disabled="disabled" @deleteSuccess="deleteSuccess"/>
-      </div>
       <div class="inline-16">
         <finish v-if="tool.checkAuth($route.name,'finish')  && mainData.status === '跟进中'" :disabled="disabled" @onFinish="onSuccess"></finish>
       </div>
       <div class="inline-16">
+        <Del :id="mainData.sa_projectid" :nameId="20221020144302" nameKey="sa_projectids" v-if="tool.checkAuth($route.name,'toVoid') " :disabled="disabled" @deleteSuccess="deleteSuccess"/>
+      </div>
+      <div >
         <recovery v-if="tool.checkAuth($route.name,'recovery')  && mainData.status === '已失败'" :disabled="disabled" @onRecovery="onSuccess"></recovery>
       </div>
+
     </div>
     <template #customBefore>
       <div class="flex-align-start normal-panel mt-10 flex-between"  style="flex-wrap:nowrap;border-radius: 5px;padding:10px 10px 0 10px">
@@ -348,8 +349,6 @@ export default {
         systemInfo: [
           {label:'创建人',value:this.mainData.createby ? this.mainData.createby : '--'},
           {label:'创建时间',value:this.mainData.createdate ? this.mainData.createdate : '--'},
-          {label:'最近跟进人',value:this.mainData.followby ? this.mainData.followby : '--'},
-          {label:'最近跟进时间',value:this.mainData.followdate ? this.mainData.followdate : '--'},
           {label:'项目报备人',value:this.mainData.reportby?this.mainData.reportby:'--'},
           {label:'项目报备时间',value:this.mainData.reportdate?this.mainData.reportdate:'--'},
           {label:'报备审核人',value:this.mainData.reportcheckby?this.mainData.reportcheckby:'--'},
@@ -497,4 +496,5 @@ export default {
 .stage__panel > div {
   transform: skewX(45deg);
 }
+
 </style>

+ 4 - 4
src/HDrpManagement/projectChange/modules/modules/contract/components/add.vue

@@ -401,12 +401,12 @@ export default {
         }
       })
       console.log(res,"标签数据")
-      if (res.data.datatag.length !== 0){
-        for (let i=0;i<res.data.datatag.length;i++){
-          if (res.data.datatag[i] === '经销'){
+      if (res.data.systemtag.length !== 0){
+        for (let i=0;i<res.data.systemtag.length;i++){
+          if (res.data.systemtag[i] === '经销'){
             this.flag = 1
             break
-          }else if (res.data.datatag[i] === '直销'){
+          }else if (res.data.systemtag[i] === '直销'){
             this.flag = 2
             break
           }

+ 7 - 3
src/SDrpManagement/QuotedPrice/components/delProduct.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button type="primary" size="small" @click="dialogVisible = true">删 除</el-button>
+    <el-button type="primary" size="small" :disabled="length === 0" @click="dialogVisible = true">删 除</el-button>
     <el-dialog
         title="提示"
         :visible.sync="dialogVisible"
@@ -22,7 +22,8 @@ export default {
   props:['data'],
   data(){
     return {
-      dialogVisible:false
+      dialogVisible:false,
+      length:0
     }
   },
   methods:{
@@ -38,7 +39,10 @@ export default {
         this.dialogVisible = false
         this.$emit('delSuccess')
       })
-    }
+    },
+  },
+  mounted() {
+    console.log(this.data)
   }
 }
 </script>

+ 6 - 4
src/SDrpManagement/QuotedPrice/components/edit/quotedPriceProduct.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <div style="padding-bottom: 40px">
+    <div style="padding-bottom: 35px">
       <el-input
           size="small"
           style="width: 200px;float: left"
@@ -11,11 +11,11 @@
           @clear="productData(param.content.pageNumber = 1)"
           clearable>
       </el-input>
-
-      <importExcel style="float: right" v-if="quotedpricetype === '客户报价'" :sa_quotedpriceid="sa_quotedpriceid" @onSuccess="onSuccess"></importExcel>
+      <delProduct style="float: right;" ref="delProduct" :data="selectDel" @delSuccess="delSuccess"></delProduct>
+      <importExcel style="float: right;margin-right: 10px" v-if="quotedpricetype === '客户报价'" :sa_quotedpriceid="sa_quotedpriceid" @onSuccess="onSuccess"></importExcel>
       <productTableProject style="float: right;margin-right: 10px;margin-bottom: 10px" :id="sa_projectid" :sa_quotedpriceid="sa_quotedpriceid" :quotedpricetype="quotedpricetype" ref="quoterPriceProject" @productAdd="productData" v-if="quotedpricetype === '项目报价'"></productTableProject>
       <productTable style="float: right;margin-right: 10px;margin-bottom: 10px" :id="sa_projectid" :sa_quotedpriceid="sa_quotedpriceid" :quotedpricetype="quotedpricetype"  ref="quoterPrice" @productAdd="productData"></productTable>
-      <delProduct style="float: right;margin-right: 10px" :data="selectDel" @delSuccess="delSuccess"></delProduct>
+
     </div>
     <div class="produtMag-panel" >
       <el-table
@@ -295,9 +295,11 @@ export default {
       this.productData()
     },
     selectionChange(val){
+      this.selectDel = []
       for (let i=0;i<val.length;i++){
         this.selectDel[i] = val[i].sa_quotedprice_itemsid
       }
+      this.$refs.delProduct.length = this.selectDel.length
     },
     checkForm(){
       this.$emit('checkForm')

+ 1 - 1
src/SDrpManagement/QuotedPrice/components/productTable.vue

@@ -108,7 +108,7 @@
                 label="牌价"
                 width="100">
               <template slot-scope="scope">
-                  <span >{{scope.row.marketprice?scope.row.marketprice+',':'--'}}</span>
+                  <span >{{scope.row.marketprice?scope.row.marketprice:'--'}}</span>
               </template>
             </el-table-column>
             <el-table-column

+ 7 - 5
src/SDrpManagement/QuotedPrice/components/quotedPriceProduct.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <div >
+    <div style="padding-bottom: 35px">
       <el-input
           size="small"
           style="width: 200px;float: left"
@@ -11,11 +11,11 @@
           @clear="productData(param.content.pageNumber = 1)"
           clearable>
       </el-input>
+      <delProduct style="float: right;" ref="delProduct" :data="selectDel" @delSuccess="delSuccess"></delProduct>
+      <importExcel style="float: right;margin-right: 10px" @onSuccess="onSuccess" v-if="type === '客户报价'" ref="quoterImport" @checkForm="checkFormImport"></importExcel>
+      <productTableProject style="float: right;margin-right: 10px;" :id="sa_projectid" @checkFormProject="checkFormProject" ref="quoterPriceProject" @productAdd="productAddF" v-if="type === '项目报价'"></productTableProject>
+      <productTable style="float: right;margin-right: 10px;" :id="sa_projectid" @checkForm="checkForm" ref="quoterPrice" @productAdd="productAddS"></productTable>
 
-      <importExcel style="float: right" @onSuccess="onSuccess" v-if="type === '客户报价'" ref="quoterImport" @checkForm="checkFormImport"></importExcel>
-      <productTableProject style="float: right;margin-right: 10px;margin-bottom: 10px" :id="sa_projectid" @checkFormProject="checkFormProject" ref="quoterPriceProject" @productAdd="productAddF" v-if="type === '项目报价'"></productTableProject>
-      <productTable style="float: right;margin-right: 10px;margin-bottom: 10px" :id="sa_projectid" @checkForm="checkForm" ref="quoterPrice" @productAdd="productAddS"></productTable>
-      <delProduct style="float: right;margin-right: 10px" :data="selectDel" @delSuccess="delSuccess"></delProduct>
     </div>
     <div class="produtMag-panel" >
       <el-table
@@ -294,9 +294,11 @@ export default {
       this.productData()
     },
     selectionChange(val){
+      this.selectDel = []
       for (let i=0;i<val.length;i++){
         this.selectDel[i] = val[i].sa_quotedprice_itemsid
       }
+      this.$refs.delProduct.length = this.selectDel.length
     },
     checkForm(){
       this.$emit('checkForm')

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

@@ -22,10 +22,10 @@
       <div slot="customOperation">
         <!-- 此区域提供了自定义操作按钮 -->
         <submit_to class="inline-16" v-if="tool.checkAuth($route.name,'submit') && mainData.status === '新建'" :disabled="disabled" :sa_quotedpriceid="mainData.sa_quotedpriceid" @onSubmit="onSuccess"></submit_to>
-        <toVoid class="inline-16" v-if="tool.checkAuth($route.name,'toVoid') && mainData.status === '新建'" :disabled="disabled" :data="mainData.sa_quotedpriceid" ></toVoid>
         <examine_to class="inline-16" v-if="tool.checkAuth($route.name,'toExamine') && mainData.status === '提交'" :disabled="disabled" :sa_quotedpriceid="mainData.sa_quotedpriceid" @onExamine="onSuccess"></examine_to>
         <deApprove class="inline-16" v-if="tool.checkAuth($route.name,'deApprove') && mainData.status !== '新建'" :disabled="disabled" :data="mainData" @onDeApprove="onSuccess"></deApprove>
         <copyTo class="inline-16" v-if="tool.checkAuth($route.name,'copyTo') " :data="mainData.sa_quotedpriceid" :disabled="disabled"></copyTo>
+        <toVoid class="inline-16" v-if="tool.checkAuth($route.name,'toVoid') && mainData.status === '新建'" :disabled="disabled" :data="mainData.sa_quotedpriceid" ></toVoid>
       </div>
       <div slot="slot1" class=" normal-panel">
         <detailed :data="mainData"  v-if="flag"></detailed>

+ 6 - 4
src/SDrpManagement/QuotedPrice/detail/modules/productInventory/index.vue

@@ -1,9 +1,9 @@
 <template>
   <div>
-    <div >
+    <div style="margin-bottom: 15px">
       <el-input
           size="small"
-          style="width: 200px;float: left"
+          style="width: 200px;"
           suffix-icon="el-icon-search"
           v-model="param.content.where.condition"
           placeholder="产品名称,编号"
@@ -319,14 +319,16 @@ export default {
 
 <style scoped>
 .produtMag-panel{
-  margin-top: 35px;
+  /* margin: 30px; */
+  padding:0 10px 10px 10px;
   background: #fff;
   border-radius:5px;
+  overflow: hidden;
   border:1px solid rgb(0 0 0 / 5%)
   /* box-shadow: 0 5px 5px rgb(0 0 0 / 10%);
   transform: translate3d(0,-2px,0); */
 }
 .image {
-  width:40px;height:40px;margin:0px auto;
+  width:38px;height:38px;margin:0px auto;
 }
 </style>

+ 1 - 1
src/SDrpManagement/QuotedPrice/modules/ProjectQuotationAdd.vue

@@ -242,7 +242,7 @@
       <div >
         <el-divider></el-divider>
       </div>
-      <div style="margin:30px 20px 20px 20px">
+      <div style="margin:20px 20px 20px 20px">
         <quoted_price_product :sa_projectid="form.sa_projectid" :type="form.type" ref="quoterPrice" @checkFormImport="onCheckFormImport" @checkForm="onSubmit" @checkFormProject="onSubmit" @productData="productDataChange"></quoted_price_product>
       </div>
       <div class="fixed__btn__panel">

+ 137 - 0
src/components/productTable/index.vue

@@ -0,0 +1,137 @@
+<template>
+  <div>
+    <el-table
+        ref="multipleTable"
+        :data="data"
+        style="width: 100%"
+        :header-cell-style="{height:'50px',color:'#606266',fontWeight:'400'}"
+        :cell-style="{height:'50px',color:'#666666',fontWeight:'400'}"
+        @selection-change="selectionChange">
+      <el-table-column
+          type="selection"
+          width="55">
+      </el-table-column>
+      <el-table-column
+          align="center"
+          label="产品图"
+          width="80">
+        <template slot-scope="scope">
+          <div v-if="scope.row.attinfos[0]">
+            <previewImage class="image" :image="scope.row.attinfos[0]" :list="scope.row.attinfos" :deletebtn="false"></previewImage>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+          prop="itemno"
+          label="产品编号"
+          width="180">
+      </el-table-column>
+      <el-table-column
+          prop="itemname"
+          label="产品名称"
+          width="180">
+      </el-table-column>
+      <el-table-column
+          label="型号/规格"
+          width="180">
+        <template slot-scope="scope">
+          <p><span>{{scope.row.model}}</span>&nbsp;/&nbsp;<span>{{scope.row.spec}}</span></p>
+        </template>
+      </el-table-column>
+      <el-table-column
+          prop="caliber"
+          label="口径"
+          width="180">
+      </el-table-column>
+      <el-table-column
+          prop="pressure"
+          label="压力"
+          width="180">
+      </el-table-column>
+      <el-table-column
+          prop="material"
+          label="材质"
+          width="180">
+      </el-table-column>
+      <el-table-column
+          prop="brand"
+          label="品牌"
+          width="180">
+        <template slot-scope="scope">
+          <p v-for="(item,index) in scope.row.brand">
+            <span style="float: left" v-if="index === scope.row.brand.length -1">{{item?item.brandname+'':'--'}}</span>
+            <span style="float: left" v-else>{{item?item.brandname+',':'--'}}</span>
+          </p>
+        </template>
+      </el-table-column>
+      <el-table-column
+          prop="itemclass"
+          label="类别"
+          width="0">
+        <template slot-scope="scope">
+          <p v-for="(item,index) in scope.row.itemclass">
+            <span style="float: left" v-if="index === scope.row.itemclass.length -1">{{item?item.itemclassname+'':'--'}}</span>
+            <span style="float: left" v-else>{{item?item.itemclassname+',':'--'}}</span>
+          </p>
+        </template>
+      </el-table-column>
+      <el-table-column
+          prop="unitid"
+          label="计量单位"
+          width="100">
+        <template slot-scope="scope">
+          <el-tag size="mini" type="info" effect="plain">{{scope.row.unitname}}/{{scope.row.axunitname}}</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column
+          prop="marketprice"
+          label="牌价"
+          width="100">
+        <template slot-scope="scope">
+          <span >{{scope.row.marketprice?scope.row.marketprice:'--'}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+          prop="totalPrice"
+          fixed="right"
+          label="操作"
+          width="80">
+        <template slot-scope="scope">
+          <el-button type="text" @click="onSelect(scope.row)">添 加</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+import previewImage from "@/components/previewImage";
+import uploadFile from "@/components/upload/hw_obs_upload";
+export default {
+  name: "index",
+  components:{uploadFile, previewImage},
+  props:["data"],
+  data(){
+    return {
+      tableSelectData:[],
+    }
+  },
+  methods:{
+    selectionChange(val){
+      this.tableSelectData = []
+      console.log(val)
+      this.tableSelectData = val
+      this.$emit("selection",val)
+    },
+    onSelect(val){
+      this.$emit("onSelect",val)
+    }
+  }
+}
+</script>
+
+<style scoped>
+.image {
+  width:38px;height:38px;margin:0px auto;
+}
+</style>