Browse Source

Merge branch 'mergeBranch' of http://124.70.211.186:3000/zhangqi/yos_web into mergeBranch

zhangqi 2 years ago
parent
commit
f25756ff44

+ 41 - 10
src/Form/QuotedPrice/edit.vue

@@ -1,6 +1,7 @@
 <template>
   <div>
-    <el-button size="mini" :disabled="data.status !== '新建'"  :type="btnType?btnType:'text'"  @click="onShow" >编 辑</el-button>
+<!--    <el-button size="mini" :disabled="data.status !== '新建'"  :type="btnType?btnType:'text'"  @click="onShow" >编 辑</el-button>-->
+    <el-button size="mini" :disabled="data.status !== '新建'"  :type="data.status === '新建'?primary:text"  @click="onShow" >编 辑</el-button>
     <el-drawer
         title="编辑报价单"
         :visible.sync="drawer"
@@ -243,7 +244,7 @@
         <el-divider></el-divider>
       </div>
       <div style="margin:10px 20px 20px 20px">
-        <quotedPriceProduct :id="form.sa_projectid" ref="quoterPrice" @checkForm="onSubmit" @totalPrice="queryTotalPrice"></quotedPriceProduct>
+        <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">
         <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
@@ -254,16 +255,18 @@
 </template>
 
 <script>
-import quotedPriceProduct from "@/SDrpManagement/QuotedPrice/components/quotedPriceProduct";
-
+import quotedPriceProduct from '@/SDrpManagement/QuotedPrice/components/edit/quotedPriceProduct'
 export default {
   name: "edit",
   props:['data','btnType'],
+  components:{quotedPriceProduct},
   data(){
     return {
       projectShow:false,
       customerShow:false,
       contactsShow:false,
+      primary:'primary',
+      text:'',
       projectParam:{
         "id": 20221020143502,
         "content": {
@@ -328,6 +331,7 @@ export default {
       isQuotedPrice:false,
       date:[],
       form:{
+        quotedpricetype:'',
         totalPrice:0,
         type:'',
         projectnum:'',
@@ -361,7 +365,6 @@ export default {
       },
     }
   },
-  components:{quotedPriceProduct},
   methods:{
     onShow(){
       this.drawer = true
@@ -375,9 +378,9 @@ export default {
       }else {
         this.isQuotedPrice = false
       }
-      this.$nextTick(()=>{
+      /*this.$nextTick(()=>{
         this.$refs.quoterPrice.productData(this.data.sa_quotedpriceid)
-      })
+      })*/
 
     },
     onClose(){
@@ -402,12 +405,12 @@ export default {
           "content": this.form
         })
         console.log(res,"报价单id一")
-        this.$refs.quoterPrice.quoterPrice(res.data.sa_quotedpriceid,res.data.quotedpricetype)
+        /*this.$refs.quoterPrice.quoterPrice(res.data.sa_quotedpriceid,res.data.quotedpricetype)*/
       })
     },
     getSubmit(){
       console.log(this.data)
-      if (this.date === '' && this.date === 'undefined'){
+      if (this.date.length === 0){
         this.form.begdate = ''
         this.form.enddate = ''
       }else {
@@ -424,10 +427,38 @@ export default {
         })
         this.tool.showMessage(res,() => {
           this.drawer = false
-          this.$emit('onSuccess')
+          this.changeData(this.productObj)
+
         })
       })
     },
+    /*修改后的产品数据*/
+    productDataChange(val){
+      console.log(val,"修改后的产品数据")
+      let obj = val.map(e=>{
+        return {
+          sa_quotedprice_itemsid:e.sa_quotedprice_itemsid,
+          itemid:e.itemid,
+          oldprice:e.marketprice,
+          price:e.price,
+          discountrate:(e.discountrate/100).toFixed(4),
+          qty:e.qty
+        }
+      })
+      this.productObj = obj
+    },
+    async changeData(obj){
+      console.log(this.productObj,"数据")
+      const res = await this.$api.requested({
+        "id": 20221021095403,
+        "content": {
+          "sa_quotedpriceid":this.form.sa_quotedpriceid,     //sat_notice_classid<=0时 为新增
+          "items":obj
+        }
+      })
+      console.log(res)
+      this.$emit('onSuccess')
+    },
     /*刷新总金额*/
     queryTotalPrice(val){
       console.log("总金额",val)

+ 1 - 0
src/Form/marketing2/saler/add.vue

@@ -7,6 +7,7 @@
         size="25%"
         direction="rtl"
         append-to-body
+        :show-close="false"
         @close="dialogVisible = false">
       <div class="drawer__panel">
         <el-row>

+ 18 - 11
src/Form/marketing2/saler/edit.vue

@@ -1,19 +1,20 @@
 <template>
   <div>
-    <el-button  size="mini" @click="onShow(dialogVisible = true)">编 辑</el-button>
+    <el-button  size="mini" type="primary"  @click="onShow(dialogVisible = true)">编 辑</el-button>
     <el-drawer
         title="编辑业务员"
         :visible.sync="dialogVisible"
-        size="20%"
+        size="25%"
         direction="rtl"
         append-to-body
+        :show-close="false"
         @close="dialogVisible = false">
       <div class="drawer__panel">
         <el-row>
-          <el-form :model="form"  :rules="rules" ref="form" label-position="right" label-width="75px" size="small">
-            <el-col :span="24">
-              <el-form-item label="业务员:" prop="hrid">
-                <selectMenber ref="salerName"  @selectMenber="selectMenbers"></selectMenber>
+          <el-form :model="form"  :rules="rules" ref="form" label-position="right" label-width="110px" size="small" disabled>
+            <el-col :span="24" >
+              <el-form-item label="业务员:" prop="hrid" >
+                <selectMenber ref="salerName"  @selectMenber="selectMenbers" ></selectMenber>
               </el-form-item>
             </el-col>
             <el-col :span="24">
@@ -47,10 +48,17 @@
               </el-form-item>
             </el-col>
           </el-form>
+          <el-form :model="form"  :rules="rules" ref="form" label-position="right" label-width="110px" size="small">
+            <el-col :span="24">
+              <el-form-item  label="最低授权折扣:" prop="discountrate">
+                <el-input  v-model="form.discountrate" placeholder="最低授权折扣" ></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form>
         </el-row>
       </div>
       <div class="fixed__btn__panel">
-        <el-button size="small" @click="drawer = false" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" @click="dialogVisible = false" class="normal-btn-width">取 消</el-button>
         <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
       </div>
     </el-drawer>
@@ -73,9 +81,8 @@ export default {
         "hrid":''
       },
       rules:{
-        hrid:[
-          { required: true, message: '请选择业务员', trigger: 'blur' },
-          { required: true, message: '请选择业务员', trigger: 'change' },
+        discountrate:[
+          {required: true, message: '请选择业务员', trigger: 'blur' }
         ]
       }
     }
@@ -94,7 +101,7 @@ export default {
       this.form = Object.assign({},this.form,data)
     },
     onSubmit(){
-
+      console.log(this.form)
     }
   }
 }

+ 3 - 1
src/Form/payvoucher/edit.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button v-if="data.status !== '审核'"  size="mini" :type="btnType?btnType:'text'" @click="onShow">编 辑</el-button>
+    <el-button :disabled="data.status !== '新建'"   size="mini" :type="data.status === '新建'?primary:text" @click="onShow">编 辑</el-button>
     <el-drawer
         title="编辑支出凭证"
         :visible.sync="dialogFormVisible"
@@ -96,6 +96,8 @@ export default {
     return {
       dialogFormVisible:false,
       visibleEnterprise:false,
+      primary:'primary',
+      text:'',
       form:{},
       enterprises:[],
       accountclass:[],

+ 3 - 1
src/Form/recvoucher/edit.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button  size="mini" :type="btnType?btnType:'text'" @click="onShow">编 辑</el-button>
+    <el-button  :disabled="data.status !== '新建'"   size="mini" :type="data.status === '新建'?primary:text" @click="onShow">编 辑</el-button>
     <el-drawer
         title="编辑收入凭证"
         :visible.sync="dialogFormVisible"
@@ -96,6 +96,8 @@ export default {
     return {
       dialogFormVisible:false,
       visibleEnterprise:false,
+      primary:'primary',
+      text:'',
       form:{},
       enterprises:[],
       accountclass:[],

+ 3 - 5
src/HDrpManagement/payvoucher/details/index.vue

@@ -7,10 +7,12 @@
         :editData="mainData"
         :mainAreaData="mainAreaData"
         :turnPageId="20221010102903"
+        :delApiId="20221009103203"
         idname="sa_cashbillid"
         ownertable="sa_cashbill"
         tags=""
         :tabs="['详细信息']"
+        :statusCheck="[{key:'status',value:'审核'}]"
         @pageChange="pageChange"
         @onEditSuccess="queryMainData($route.query.id)">
       <div slot="tags">
@@ -32,7 +34,7 @@
         </div>-->
       </div>
       <div slot="slot0" >
-        <detailed ref="detailed"></detailed>
+        <detailed :detailData="mainData"></detailed>
       </div>
     </basicDetails>
   </div>
@@ -61,9 +63,6 @@ export default {
       })
       this.mainData = res.data
       this.changeDataStructure()
-      console.log("支出凭证详情")
-      console.log(this.mainData)
-      this.$refs.detailed.detailedList(this.mainData)
     },
     changeDataStructure(){
       this.mainAreaData = [
@@ -112,7 +111,6 @@ export default {
       this.queryMainData(id)
     },
     onSuccess(){
-      console.log("执行")
       this.queryMainData(this.$route.query.id)
     }
   },

+ 1 - 9
src/HDrpManagement/payvoucher/details/modules/detailedData.vue

@@ -33,20 +33,12 @@
 <script>
 export default {
   name: "detailed",
+  props:["detailData"],
   data(){
     return {
-      detailData:{}
     }
   },
   methods:{
-    detailedList(data){
-      console.log("输出凭证信息")
-      console.log(data)
-      this.detailData = data
-      /*this.sa_customersid = data.sa_customersid
-      this.basicData(data.sa_customersid)
-      this.systemData(data.sa_customersid)*/
-    }
   }
 }
 </script>

+ 1 - 1
src/HDrpManagement/payvoucher/details/modules/examine.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="inline-16">
-    <el-button   size="mini" @click="onShow" >审核</el-button>
+    <el-button   size="mini" type="primary" @click="onShow" >审核</el-button>
     <el-dialog
         title="提示"
         :visible.sync="dialogVisible"

+ 3 - 5
src/HDrpManagement/recvoucher/details/index.vue

@@ -7,10 +7,12 @@
         :editData="mainData"
         :mainAreaData="mainAreaData"
         :turnPageId="20221010102903"
+        :delApiId="20221009103203"
         idname="sa_cashbillid"
         ownertable="sa_cashbill"
         tags=""
         :tabs="['详细信息']"
+        :statusCheck="[{key:'status',value:'审核'}]"
         @pageChange="pageChange"
         @onEditSuccess="queryMainData($route.query.id)">
       <div slot="tags">
@@ -32,7 +34,7 @@
         </div>-->
       </div>
       <div slot="slot0" >
-        <detailed ref="detailed"></detailed>
+        <detailed  :detailData="mainData"></detailed>
       </div>
     </basicDetails>
   </div>
@@ -61,9 +63,6 @@ export default {
       })
       this.mainData = res.data
       this.changeDataStructure()
-      console.log("支出凭证详情")
-      console.log(this.mainData)
-      this.$refs.detailed.detailedList(this.mainData)
     },
     changeDataStructure(){
       this.mainAreaData = [
@@ -112,7 +111,6 @@ export default {
       this.queryMainData(id)
     },
     onSuccess(){
-      console.log("执行")
       this.queryMainData(this.$route.query.id)
     }
   },

+ 1 - 9
src/HDrpManagement/recvoucher/details/modules/detailedData.vue

@@ -34,20 +34,12 @@
 <script>
 export default {
   name: "detailed",
+  props:["detailData"],
   data(){
     return {
-      detailData:{}
     }
   },
   methods:{
-    detailedList(data){
-      console.log("输出凭证信息")
-      console.log(data)
-      this.detailData = data
-      /*this.sa_customersid = data.sa_customersid
-      this.basicData(data.sa_customersid)
-      this.systemData(data.sa_customersid)*/
-    }
   }
 }
 </script>

+ 1 - 1
src/HDrpManagement/recvoucher/details/modules/examine.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="inline-16">
-    <el-button   size="mini" @click="onShow" >审核</el-button>
+    <el-button   size="mini" @click="onShow" type="primary" >审核</el-button>
     <el-dialog
         title="提示"
         :visible.sync="dialogVisible"

+ 285 - 0
src/SDrpManagement/QuotedPrice/components/edit/productTable.vue

@@ -0,0 +1,285 @@
+<template>
+  <div>
+    <el-button size="small"  type="primary" icon="el-icon-plus" @click="queryProduct">添加商品</el-button>
+    <el-drawer
+        title="选择商品"
+        :visible.sync="dialogProductVisible"
+        append-to-body
+        size="80%"
+        direction="rtl"
+        @close="onColes">
+      <div class="drawer__panel">
+        <div class="flex-align-center flex-between ">
+          <slot name="operation"></slot>
+          <div class="flex-align-center">
+            <el-input size="small"  suffix-icon="el-icon-search" v-model="params.content.where.condition" placeholder="产品名称,编号" @keyup.enter.native="productData(params.content.pageNumber = 1)" @clear="productData(params.content.pageNumber = 1)" clearable></el-input>&nbsp;
+          </div>
+        </div>
+        <div class="produtMag-panel">
+          <el-table
+              ref="multipleTable"
+              :data="list"
+              style="width: 100%"
+              :header-cell-style="{height:'50px',color:'#768093',fontWeight:'100'}"
+              :cell-style="{height:'50px',color:'#768093',fontWeight:'200'}"
+              @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>
+          <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>
+        </div>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button size="small" @click="onColes" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" type="primary" @click="onSubmit"  class="normal-btn-width">确 定</el-button>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import uploadFile from "@/components/upload/hw_obs_upload";
+import previewImage from "@/components/previewImage";
+
+export default {
+  name: "productTable",
+  props:["id","sa_quotedpriceid","quotedpricetype"],
+  components:{uploadFile, previewImage},
+  data(){
+    return {
+      dialogProductVisible:false,
+      type:'',
+      tablecols:[],
+      list:[],
+      total:0,
+      currentPage:0,
+      tableSelectData:[],
+      selectData:[],
+      params:{
+        "id": 20221020164903,
+        "version":1,
+        "content": {
+          "sa_projectid":'',
+          "sa_quotedpriceid":"",
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": ""
+          }
+
+        }
+      }
+    }
+  },
+  methods:{
+    onShow(){
+     /* this.dialogProjectVisible = true*/
+     /* console.log(this.id,"项目编号")
+      this.$emit('checkForm')*/
+      /*this.productData()*/
+
+    },
+    onColes(){
+      this.dialogProductVisible = false
+    },
+    async onSubmit(){
+      const res = await this.$api.requested({
+        "id": 20221021095403,
+        "content": {
+          "sa_quotedpriceid":this.sa_quotedpriceid,     //sat_notice_classid<=0时 为新增
+          "items":this.selectData
+        }
+      })
+      this.tool.showMessage(res,()=>{
+        console.log(res)
+        this.dialogProductVisible = false
+        this.$emit('productAdd')
+      })
+    },
+    /*获取产品信息*/
+    queryProduct(){
+      this.dialogProductVisible = true
+      console.log(this.id,this.sa_quotedpriceid,"接受传过来的数据")
+      this.params.content.sa_projectid = this.id
+      this.productData()
+    },
+    /*产品配置信息*/
+    async productData(){
+      console.log("执行")
+      this.params.content.sa_quotedpriceid = this.sa_quotedpriceid
+      const res = await this.$api.requested(this.params)
+      console.log(res,"产品配置")
+      this.list = res.data
+      this.total = res.total
+      console.log(res,'产品配置信息')
+      console.log(this.quotedpricetype)
+      this.$nextTick(()=>{
+        console.log(this.quotedpricetype)
+        if (this.quotedpricetype === '项目报价'){
+          for (let i=0;i<this.list.length;i++){
+            this.$refs.multipleTable.toggleRowSelection(this.list[i],true)
+          }
+        }
+      })
+
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.productData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.productData()
+    },
+    onSuccess(){
+      this.productData()
+    },
+    clearData(){
+      console.log("执行")
+      this.search = ""
+      this.param.content.where.condition = this.search
+      this.productData()
+    },
+    queryClick(){
+      this.param.content.where.condition = this.search
+      this.productData()
+    },
+    selectionChange(val){
+      console.log(val)
+      this.tableSelectData = val
+      if (this.type === '项目报价'){
+        let obj = this.tableSelectData.map(e=>{
+          return {
+            sa_quotedprice_itemsid:'0',
+            itemid:e.itemid,
+            oldprice:e.marketprice,
+            /*price:(e.marketprice * 100)/100,*/
+            price:0,
+            discountrate:0,
+            qty:e.qty
+          }
+        })
+        console.log(obj)
+        this.selectData = obj
+      }else {
+        let obj = this.tableSelectData.map(e=>{
+          return {
+            sa_quotedprice_itemsid:'0',
+            itemid:e.itemid,
+            oldprice:e.marketprice,
+            /*price:(e.marketprice * 100)/100,*/
+            price:0,
+            discountrate:0,
+            qty:1
+          }
+        })
+        console.log(obj)
+        this.selectData = obj
+      }
+    }
+  },
+  mounted() {
+  }
+}
+</script>
+
+<style scoped>
+.image {
+  width:38px;height:38px;margin:0px auto;
+}
+</style>

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

@@ -0,0 +1,443 @@
+<template>
+  <div>
+    <div >
+      <el-input
+          size="small"
+          style="width: 200px;float: left"
+          suffix-icon="el-icon-search"
+          v-model="param.content.where.condition"
+          placeholder="产品名称,编号"
+          @keyup.enter.native="productData(param.content.pageNumber = 1)"
+          @clear="productData(param.content.pageNumber = 1)"
+          clearable>
+      </el-input>
+
+<!--      <importExcel style="float: right" @onSuccess="onSuccess"></importExcel>-->
+      <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
+          ref="multipleTable"
+          :data="list"
+          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="100">
+          <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">
+          <template slot-scope="scope">
+            <p><span>{{scope.row.caliber?scope.row.caliber:'--'}}</span></p>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="pressure"
+            label="压力"
+            width="180">
+          <template slot-scope="scope">
+            <p><span>{{scope.row.pressure?scope.row.pressure:'--'}}</span></p>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="material"
+            label="材质"
+            width="180">
+          <template slot-scope="scope">
+            <p><span>{{scope.row.material?scope.row.material:'--'}}</span></p>
+          </template>
+        </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="180">
+          <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="num"
+            label="数量"
+            width="180">
+          <template slot-scope="scope">
+            <el-input-number  v-model="scope.row.qty" size="mini" :min="1" :step-strictly="true" :step="scope.row.orderaddqty !== 0?scope.row.orderaddqty:step" label="描述文字" @change="onChangeNum(scope.row.qty,scope.row,scope.$index,scope.row.orderaddqty)"></el-input-number>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="marketprice"
+            label="牌价"
+            width="100">
+          <template slot-scope="scope">
+            <p><span>{{scope.row.marketprice?scope.row.marketprice:'--'}}</span></p>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="discountrate"
+            label="折扣(%)"
+            width="100">
+          <template slot-scope="scope">
+            <el-input v-model="scope.row.discountrate" size="mini" placeholder="请输入折扣" @change="onChangeDiscountrate(scope.row.discountrate,scope.row,scope.$index)"></el-input>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="price"
+          label="单价"
+          width="100">
+          <template slot-scope="scope">
+            <el-input v-model="scope.row.price" size="mini" placeholder="请输入单价" @change="onChangePrice(scope.row.price,scope.row,scope.$index)"></el-input>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="amount"
+          label="金额"
+          width="100">
+          <template slot-scope="scope">
+            <p><span>{{scope.row.amount}}</span></p>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="specialoffer"
+          label="是否特价"
+          width="100">
+          <template slot-scope="scope">
+            <i class="el-icon-check" v-if="scope.row.specialoffer === 1"  style="color: red;font-size: 20px"></i>
+          </template>
+        </el-table-column>
+<!--        <el-table-column
+            prop="operation"
+            label="操作"
+            width="100">
+          <template slot-scope="scope">
+            <el-button size="mini" type="text" @click="deleteProduct(scope.row)">删除</el-button>
+          </template>
+        </el-table-column>-->
+      </el-table>
+      <div style="height: 35px;margin-top: 20px">
+        <div style="float: left">总金额:{{ totalPrice }}元</div>
+        <div style="float: right">
+          <el-pagination
+              background
+              small
+              style="text-align: right;"
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="currentPage"
+              :page-size="param.content.pageSize"
+              layout="total, prev, pager, next, jumper"
+              :total="total">
+          </el-pagination>
+        </div>
+
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import uploadFile from "@/components/upload/hw_obs_upload";
+import previewImage from "@/components/previewImage";
+import productTable from './productTable'
+/*import importExcel from '../modules/importQuotedPrice'*/
+import delProduct from "@/SDrpManagement/QuotedPrice/components/delProduct";
+
+export default {
+  props:["sa_projectid","sa_quotedpriceid","quotedpricetype"],
+  name: "quotedPriceProduct",
+  components:{uploadFile, previewImage,productTable,delProduct},
+  data(){
+    return {
+      selectDel:[],
+      totalPrice:0,
+      step:1,
+      tablecols:[],
+      list:[],
+      total:0,
+      currentPage:0,
+      changeList:[],
+      param:{
+        "id": 20221021095503,
+        "version":1,
+        "content": {
+          "sa_quotedpriceid":'',
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": ""
+          }
+
+        }
+      }
+    }
+  },
+  methods:{
+    /*/!*产品配置信息新增初始化*!/
+    async productInitialization(id){
+      this.param.content.sa_quotedpriceid = id
+      const res = await this.$api.requested(this.param)
+      this.list = res.data
+      this.total = res.total
+      this.totalPrice = 0
+
+      for (var i=0 ;i<this.list.length;i++){
+        this.list[i].discountrate = this.list[i].discountrate * 100
+        this.totalPrice = this.totalPrice + this.list[i].qty * this.list[i].price
+      }
+      this.$emit("queryTotalPrice",totalPrice)
+      console.log(this.list,totalPrice,'产品配置信息')
+    },*/
+    /*产品配置信息*/
+    async productData(){
+      console.log(this.id,"配置信息")
+      this.param.content.sa_quotedpriceid = this.sa_quotedpriceid
+      console.log(this.param,"param数据")
+      const res = await this.$api.requested(this.param)
+      this.list = res.data
+      this.total = res.total
+      this.totalPrice = 0
+      for (var i=0 ;i<this.list.length;i++){
+        this.list[i].discountrate = this.list[i].discountrate * 100
+        this.totalPrice = this.totalPrice + this.list[i].qty * this.list[i].price
+      }
+      console.log(this.list,'产品配置信息')
+      this.$emit('productData',this.list)
+    },
+   /* /!*修改折扣或单价的时候刷新*!/
+    async productDiscountrateData(id){
+      this.param.content.sa_quotedpriceid = id
+      const res = await this.$api.requested(this.param)
+      this.list = res.data
+      this.total = res.total
+      this.totalPrice = 0
+      for (var i=0 ;i<this.list.length;i++){
+        this.list[i].discountrate = this.list[i].discountrate * 100
+        this.totalPrice = this.totalPrice + this.list[i].qty * this.list[i].price
+      }
+      console.log(this.list,'产品配置信息')
+    },*/
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.productData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.productData()
+    },
+    /*批量删除*/
+    delSuccess(){
+      this.productData()
+    },
+    onSuccess(){
+      this.productData()
+    },
+    clearData(){
+      this.search = ""
+      this.param.content.where.condition = this.search
+      this.productData()
+    },
+    queryClick(){
+      this.param.content.where.condition = this.search
+      this.productData()
+    },
+    selectionChange(val){
+      console.log(val,'选择')
+      for (let i=0;i<val.length;i++){
+        this.selectDel[i] = val[i].sa_quotedprice_itemsid
+      }
+      console.log(this.selectDel)
+    },
+    checkForm(){
+      this.$emit('checkForm')
+    },
+    quoterPrice(sa_quotedpriceid,type){
+      this.sa_quotedpriceid = sa_quotedpriceid
+      console.log(sa_quotedpriceid,"报价单id")
+      console.log(type,"项目报价")
+      this.$refs.quoterPrice.queryProduct(sa_quotedpriceid,type)
+    },
+    onChangeNum (val,data,index,step) {
+      console.log("步长",this.step)
+      console.log(val,data,index,step)
+      data.amount = val * data.price
+
+      /*if (val <= data.orderminqty){
+        val = data.orderminqty
+      }else {
+        let m = val % data.orderaddqty
+        console.log(m)
+        if (m !== 0){
+          val = val + data.orderaddqty - m
+          console.log(val,"新的数量值")
+          data.qty = val
+        }
+      }*/
+      this.$set(this.list,index,data)
+      this.totalPrice = 0
+      for (var i=0 ;i<this.list.length;i++){
+        this.totalPrice = this.totalPrice + this.list[i].qty * this.list[i].price
+      }
+      this.$emit('productData',this.list)
+    },
+    onChangeDiscountrate(val,data,index) {
+      console.log(val,data,index)
+      if (val > 100){
+        data.discountrate = 100
+        val = 100
+      }else if (val <= 10){
+        data.discountrate = 10
+        val = 10
+      }
+      data.price = data.marketprice * (val / 100)
+      data.amount = (data.qty * data.price).toFixed(2)
+      this.$set(this.list,index,data)
+      this.totalPrice = 0
+      for (var i=0 ;i<this.list.length;i++){
+        this.totalPrice = this.totalPrice + this.list[i].qty * this.list[i].price
+      }
+      this.$emit('productData',this.list)
+    },
+    onChangePrice(val,data,index){
+      if (val > data.marketprice) {
+        data.price = data.marketprice
+        val = data.marketprice
+      }else if (val < 0){
+        data.price = data.marketprice * 0.1
+        val = data.marketprice * 0.1
+      }
+      data.discountrate = ((val / data.marketprice) * 100).toFixed(2)
+      data.amount = data.qty * data.price
+      this.$set(this.list,index,data)
+      this.totalPrice = 0
+      for (var i=0 ;i<this.list.length;i++){
+        this.totalPrice = this.totalPrice + this.list[i].qty * this.list[i].price
+      }
+      this.$emit('productData',this.list)
+    },
+    objSet(data){
+      let obj = data.map(e=>{
+        return {
+          sa_quotedprice_itemsid:e.sa_quotedprice_itemsid,
+          itemid:e.itemid,
+          oldprice:e.marketprice,
+          price:e.price,
+          discountrate:0,
+          qty:e.qty
+        }
+      })
+      this.changeDiscountrateData(obj)
+    },
+    async changeData(obj){
+      console.log(this.list,"数据")
+      const res = await this.$api.requested({
+        "id": 20221021095403,
+        "version":1,
+        "content": {
+          "sa_quotedpriceid":this.list[0].sa_quotedpriceid,     //sat_notice_classid<=0时 为新增
+          "items":obj
+        }
+      })
+      console.log(res)
+      this.productData(res.data[0].sa_quotedpriceid)
+    },
+    async changeDiscountrateData(obj){
+      console.log(this.list,"数据")
+      const res = await this.$api.requested({
+        "id": 20221021095403,
+        "version":1,
+        "content": {
+          "sa_quotedpriceid":this.list[0].sa_quotedpriceid,     //sat_notice_classid<=0时 为新增
+          "items":obj
+        }
+      })
+      console.log(res)
+      this.productDiscountrateData(res.data[0].sa_quotedpriceid)
+    },
+    async deleteProduct(val){
+      console.log(val)
+      const res = await this.$api.requested({
+        "id": 20221021095603,
+        "version":1,
+        "content": {
+          "sa_quotedprice_itemsids":[val.sa_quotedprice_itemsid]     //sat_notice_classid<=0时 为新增
+        }
+      })
+      this.tool.showMessage(res,()=>{
+        this.productData(val.sa_quotedpriceid)
+      })
+    }
+  },
+  mounted() {
+    this.productData()
+  }
+}
+</script>
+
+<style scoped>
+.produtMag-panel{
+   margin-top: 15px;
+  background: #fff;
+  border-radius:5px;
+
+  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:38px;height:38px;margin:0px auto;
+}
+</style>

+ 2 - 3
src/SDrpManagement/QuotedPrice/components/productTable.vue

@@ -179,16 +179,15 @@ export default {
     async onSubmit(){
       const res = await this.$api.requested({
         "id": 20221021095403,
-        "version":1,
         "content": {
-          "sa_quotedpriceid":this.params.content.sa_quotedpriceid,     //sat_notice_classid<=0时 为新增
+          "sa_quotedpriceid":this.sa_quotedpriceid,     //sat_notice_classid<=0时 为新增
           "items":this.selectData
         }
       })
       this.tool.showMessage(res,()=>{
         console.log(res)
         this.dialogProductVisible = false
-        this.$emit('productAdd',this.params.content.sa_quotedpriceid)
+        this.$emit('productAdd')
       })
     },
     /*获取产品信息*/

+ 57 - 55
src/SDrpManagement/QuotedPrice/components/quotedPriceProduct.vue

@@ -13,7 +13,7 @@
       </el-input>
 
 <!--      <importExcel style="float: right" @onSuccess="onSuccess"></importExcel>-->
-      <productTable style="float: right;margin-right: 10px;margin-bottom: 10px" :id="id" @checkForm="checkForm" ref="quoterPrice" @productAdd="productInitialization"></productTable>
+      <productTable style="float: right;margin-right: 10px;margin-bottom: 10px" :id="sa_projectid" @checkForm="checkForm" ref="quoterPrice" @productAdd="productData"></productTable>
       <delProduct style="float: right;margin-right: 10px" :data="selectDel" @delSuccess="delSuccess"></delProduct>
     </div>
     <div class="produtMag-panel" >
@@ -114,7 +114,7 @@
             label="数量"
             width="180">
           <template slot-scope="scope">
-            <el-input-number  v-model="scope.row.qty" size="mini" :min="1" :step="scope.row.orderaddqty?scope.row.orderaddqty:1" label="描述文字" @change="onChangeNum(scope.row.qty,scope.row,scope.$index)"></el-input-number>
+            <el-input-number  v-model="scope.row.qty" size="mini" :min="1" :step-strictly="true" :step="scope.row.orderaddqty !== 0?scope.row.orderaddqty:step" label="描述文字" @change="onChangeNum(scope.row.qty,scope.row,scope.$index,scope.row.orderaddqty)"></el-input-number>
           </template>
         </el-table-column>
         <el-table-column
@@ -195,7 +195,7 @@ import importExcel from '../modules/importQuotedPrice'
 import delProduct from "@/SDrpManagement/QuotedPrice/components/delProduct";
 
 export default {
-  props:["id"],
+  props:["sa_projectid"],
   name: "quotedPriceProduct",
   components:{uploadFile, previewImage,productTable,importExcel,delProduct},
   data(){
@@ -225,7 +225,7 @@ export default {
     }
   },
   methods:{
-    /*产品配置信息新增初始化*/
+    /*/!*产品配置信息新增初始化*!/
     async productInitialization(id){
       this.param.content.sa_quotedpriceid = id
       const res = await this.$api.requested(this.param)
@@ -239,12 +239,12 @@ export default {
       }
       this.$emit("queryTotalPrice",totalPrice)
       console.log(this.list,totalPrice,'产品配置信息')
-    },
+    },*/
     /*产品配置信息*/
-    async productData(id){
-      console.log(id,"配置信息")
-      this.sa_quotedpriceid = id
-      this.param.content.sa_quotedpriceid = id
+    async productData(){
+      console.log(this.id,"配置信息")
+      this.param.content.sa_quotedpriceid = this.sa_quotedpriceid
+      console.log(this.param,"param数据")
       const res = await this.$api.requested(this.param)
       this.list = res.data
       this.total = res.total
@@ -255,7 +255,7 @@ export default {
       }
       console.log(this.list,'产品配置信息')
     },
-    /*修改折扣或单价的时候刷新*/
+   /* /!*修改折扣或单价的时候刷新*!/
     async productDiscountrateData(id){
       this.param.content.sa_quotedpriceid = id
       const res = await this.$api.requested(this.param)
@@ -267,7 +267,7 @@ export default {
         this.totalPrice = this.totalPrice + this.list[i].qty * this.list[i].price
       }
       console.log(this.list,'产品配置信息')
-    },
+    },*/
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);
       this.param.content.pageSize = val
@@ -280,7 +280,7 @@ export default {
     },
     /*批量删除*/
     delSuccess(){
-      this.productInitialization(this.sa_quotedpriceid)
+      this.productData()
     },
     onSuccess(){
       this.productData()
@@ -304,19 +304,17 @@ export default {
     checkForm(){
       this.$emit('checkForm')
     },
-    quoterPrice(id,type){
-      console.log(id,"报价单id")
+    quoterPrice(sa_quotedpriceid,type){
+      this.sa_quotedpriceid = sa_quotedpriceid
+      console.log(sa_quotedpriceid,"报价单id")
       console.log(type,"项目报价")
-      this.$refs.quoterPrice.queryProduct(id,type)
+      this.$refs.quoterPrice.queryProduct(sa_quotedpriceid,type)
     },
-    onChangeNum (val,data,index) {
-      this.step = data.orderaddqty
-      console.log(val)
+    onChangeNum (val,data,index,step) {
       console.log("步长",this.step)
-      console.log("修改数量")
-      console.log(val,data,index)
-     /* data.amount = data.qty * data.price*/
-      console.log(data.orderaddqty)
+      console.log(val,data,index,step)
+      data.amount = val * data.price
+
       /*if (val <= data.orderminqty){
         val = data.orderminqty
       }else {
@@ -329,45 +327,46 @@ export default {
         }
       }*/
       this.$set(this.list,index,data)
-      this.$nextTick(()=>{
-        let obj = this.list.map(e=>{
-          return {
-            sa_quotedprice_itemsid:e.sa_quotedprice_itemsid,
-            itemid:e.itemid,
-            oldprice:e.marketprice,
-            price:e.price,
-            discountrate:(e.discountrate/100).toFixed(4),
-            qty:e.qty
-          }
-        })
-        this.changeData(obj)
-      })
+      this.totalPrice = 0
+      for (var i=0 ;i<this.list.length;i++){
+        this.totalPrice = this.totalPrice + this.list[i].qty * this.list[i].price
+      }
+      this.$emit('productData',this.list)
     },
     onChangeDiscountrate(val,data,index) {
-     /* data.price = data.marketprice * (data.discountrate / 100)
-      data.amount = (data.qty * data.price).toFixed(2)*/
+      console.log(val,data,index)
+      if (val > 100){
+        data.discountrate = 100
+        val = 100
+      }else if (val <= 10){
+        data.discountrate = 10
+        val = 10
+      }
+      data.price = data.marketprice * (val / 100)
+      data.amount = (data.qty * data.price).toFixed(2)
       this.$set(this.list,index,data)
-      this.$nextTick(()=>{
-        let obj = this.list.map(e=>{
-          return {
-            sa_quotedprice_itemsid:e.sa_quotedprice_itemsid,
-            itemid:e.itemid,
-            oldprice:e.marketprice,
-            price:0,
-            discountrate:(e.discountrate/100).toFixed(4),
-            qty:e.qty
-          }
-        })
-        this.changeDiscountrateData(obj)
-      })
+      this.totalPrice = 0
+      for (var i=0 ;i<this.list.length;i++){
+        this.totalPrice = this.totalPrice + this.list[i].qty * this.list[i].price
+      }
+      this.$emit('productData',this.list)
     },
     onChangePrice(val,data,index){
-      /*data.discountrate = ((data.price / data.marketprice) * 100).toFixed(2)
-      data.amount = data.qty * data.price*/
+      if (val > data.marketprice) {
+        data.price = data.marketprice
+        val = data.marketprice
+      }else if (val < 0){
+        data.price = data.marketprice * 0.1
+        val = data.marketprice * 0.1
+      }
+      data.discountrate = ((val / data.marketprice) * 100).toFixed(2)
+      data.amount = data.qty * data.price
       this.$set(this.list,index,data)
-      this.$nextTick(()=>{
-        this.objSet(this.list)
-      })
+      this.totalPrice = 0
+      for (var i=0 ;i<this.list.length;i++){
+        this.totalPrice = this.totalPrice + this.list[i].qty * this.list[i].price
+      }
+      this.$emit('productData',this.list)
     },
     objSet(data){
       let obj = data.map(e=>{
@@ -421,6 +420,9 @@ export default {
         this.productData(val.sa_quotedpriceid)
       })
     }
+  },
+  mounted() {
+    this.productData()
   }
 }
 </script>

+ 1 - 1
src/SDrpManagement/QuotedPrice/detail/components/examineTo.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button slot="reference" size="mini" style="width:100%" @click="onShow">审 核</el-button>
+    <el-button slot="reference" size="mini" style="width:100%" @click="onShow" type="primary">审 核</el-button>
     <el-dialog title="报价单审核" :visible.sync="draw" width="20%" append-to-body>
       <el-form :model="form">
         <el-form-item  :label-width="formLabelWidth">

+ 1 - 1
src/SDrpManagement/QuotedPrice/detail/components/submitTo.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <el-popconfirm title="确定提交该报价单吗?" @confirm="CheckRow()">
-      <el-button slot="reference" size="mini" style="width:100%">提 交</el-button>
+      <el-button slot="reference" size="mini" type="primary" style="width:100%">提 交</el-button>
     </el-popconfirm>
   </div>
 </template>

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

@@ -28,7 +28,7 @@
         <detailed :data="mainData"  v-if="flag"></detailed>
       </div>
       <div slot="slot0" class=" normal-panel">
-        <productInventory :data="mainData" v-if="flag"></productInventory>
+        <productInventory ref="productList" :data="mainData" v-if="flag"></productInventory>
       </div>
     </basicDetails>
   </div>
@@ -66,6 +66,10 @@ export default {
         }
       })
       this.mainData = res.data
+      /*this.$refs.productList.productData()*/
+      this.$nextTick(()=>{
+        this.$refs.productList.productData()
+      })
       this.productList()
 
      /* this.changeDataStructure()*/
@@ -140,6 +144,8 @@ export default {
     },
     onSuccess(){
       this.queryMainData(this.$route.query.id)
+      console.log("执行")
+
     }
   },
   mounted() {

+ 1 - 0
src/SDrpManagement/QuotedPrice/detail/modules/productInventory/index.vue

@@ -237,6 +237,7 @@ export default {
     },
     /*产品配置信息*/
     async productData(){
+      console.log(this.data,"输出产品数据")
       this.param.content.sa_quotedpriceid = this.data.sa_quotedpriceid
       const res = await this.$api.requested(this.param)
       this.list = res.data

+ 33 - 5
src/SDrpManagement/QuotedPrice/modules/ProjectQuotationAdd.vue

@@ -236,7 +236,7 @@
         <el-divider></el-divider>
       </div>
       <div style="margin:30px 20px 20px 20px">
-        <quoted_price_product :id="form.sa_projectid" ref="quoterPrice" @checkForm="onSubmit" ></quoted_price_product>
+        <quoted_price_product :sa_projectid="form.sa_projectid" ref="quoterPrice" @checkForm="onSubmit" @productData="productDataChange"></quoted_price_product>
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
@@ -322,6 +322,7 @@ export default {
       drawer:false,
       isQuotedPrice:false,
       date:[],
+      productObj:{},
       form:{
         totalPrice:'',
         type:'',
@@ -361,6 +362,7 @@ export default {
       this.drawer = false
       this.$emit('addSuccess')
     },
+    /*创建报价单,获取商品信息*/
     onSubmit(){
       console.log(this.date)
       if (this.date.length === 0){
@@ -382,11 +384,11 @@ export default {
         this.form.sa_quotedpriceid = res.data.sa_quotedpriceid
       })
     },
-    /*创建报价单,获取商品信息*/
+   /*提交*/
     getSubmit(){
       this.drawer = false
       console.log(this.data)
-      if (this.date === '' && this.date === 'undefined'){
+      if (this.date.length === 0){
         this.form.begdate = ''
         this.form.enddate = ''
       }else {
@@ -402,11 +404,37 @@ export default {
           "content": this.form
         })
         this.tool.showMessage(res,() => {
-          this.$emit('addSuccess')
+          this.changeData(this.productObj)
         })
       })
     },
-
+    /*修改后的产品数据*/
+    productDataChange(val){
+      console.log(val,"修改后的产品数据")
+      let obj = val.map(e=>{
+        return {
+          sa_quotedprice_itemsid:e.sa_quotedprice_itemsid,
+          itemid:e.itemid,
+          oldprice:e.marketprice,
+          price:e.price,
+          discountrate:(e.discountrate/100).toFixed(4),
+          qty:e.qty
+        }
+      })
+      this.productObj = obj
+    },
+    async changeData(obj){
+      console.log(this.productObj,"数据")
+      const res = await this.$api.requested({
+        "id": 20221021095403,
+        "content": {
+          "sa_quotedpriceid":this.form.sa_quotedpriceid,     //sat_notice_classid<=0时 为新增
+          "items":obj
+        }
+      })
+      console.log(res)
+      this.$emit('addSuccess')
+    },
     async projectList(){
       const res = await this.$api.requested(this.projectParam)
       console.log(res)