|
|
@@ -11,7 +11,10 @@
|
|
|
@clear="productData(param.content.pageNumber = 1)"
|
|
|
clearable>
|
|
|
</el-input>
|
|
|
- <productTable style="float: right" :id="id" @checkForm="checkForm" ref="quoterPrice" @productAdd="productInitialization"></productTable>
|
|
|
+
|
|
|
+<!-- <importExcel style="float: right" @onSuccess="onSuccess"></importExcel>-->
|
|
|
+ <productTable style="float: right;margin-right: 10px" :id="id" @checkForm="checkForm" ref="quoterPrice" @productAdd="productInitialization"></productTable>
|
|
|
+ <delProduct style="float: right;margin-right: 10px" :data="selectDel" @delSuccess="delSuccess"></delProduct>
|
|
|
</div>
|
|
|
<div class="produtMag-panel">
|
|
|
<el-table
|
|
|
@@ -111,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" 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="scope.row.orderaddqty?scope.row.orderaddqty:1" label="描述文字" @change="onChangeNum(scope.row.qty,scope.row,scope.$index)"></el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
@@ -154,26 +157,31 @@
|
|
|
<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
|
|
|
+<!-- <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-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="param.content.pageSize"
|
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
- :total="total">
|
|
|
- </el-pagination>
|
|
|
+ <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>
|
|
|
@@ -184,13 +192,16 @@ import uploadFile from "@/components/upload/hw_obs_upload";
|
|
|
import previewImage from "@/components/previewImage";
|
|
|
import productTable from '../components/productTable'
|
|
|
import importExcel from '../modules/importQuotedPrice'
|
|
|
+import delProduct from "@/SDrpManagement/QuotedPrice/components/delProduct";
|
|
|
|
|
|
export default {
|
|
|
props:["id"],
|
|
|
name: "quotedPriceProduct",
|
|
|
- components:{uploadFile, previewImage,productTable,importExcel},
|
|
|
+ components:{uploadFile, previewImage,productTable,importExcel,delProduct},
|
|
|
data(){
|
|
|
return {
|
|
|
+ selectDel:[],
|
|
|
+ totalPrice:0,
|
|
|
step:1,
|
|
|
tablecols:[],
|
|
|
list:[],
|
|
|
@@ -220,22 +231,27 @@ export default {
|
|
|
const res = await this.$api.requested(this.param)
|
|
|
this.list = res.data
|
|
|
this.total = res.total
|
|
|
- let totalPrice = 0
|
|
|
+ this.totalPrice = 0
|
|
|
+
|
|
|
for (var i=0 ;i<this.list.length;i++){
|
|
|
this.list[i].discountrate = this.list[i].discountrate * 100
|
|
|
- totalPrice = totalPrice + this.list[i].qty * this.list[i].price
|
|
|
+ this.totalPrice = this.totalPrice + this.list[i].qty * this.list[i].price
|
|
|
}
|
|
|
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
|
|
|
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,'产品配置信息')
|
|
|
},
|
|
|
@@ -245,8 +261,10 @@ export default {
|
|
|
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,'产品配置信息')
|
|
|
},
|
|
|
@@ -260,6 +278,10 @@ export default {
|
|
|
this.param.content.pageNumber = val
|
|
|
this.productData()
|
|
|
},
|
|
|
+ /*批量删除*/
|
|
|
+ delSuccess(){
|
|
|
+ this.productInitialization(this.sa_quotedpriceid)
|
|
|
+ },
|
|
|
onSuccess(){
|
|
|
this.productData()
|
|
|
},
|
|
|
@@ -272,7 +294,13 @@ export default {
|
|
|
this.param.content.where.condition = this.search
|
|
|
this.productData()
|
|
|
},
|
|
|
- selectionChange(){},
|
|
|
+ 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')
|
|
|
},
|
|
|
@@ -300,8 +328,8 @@ export default {
|
|
|
data.qty = val
|
|
|
}
|
|
|
}*/
|
|
|
- /*this.$set(this.list,index,data)*/
|
|
|
- /*this.$nextTick(()=>{
|
|
|
+ this.$set(this.list,index,data)
|
|
|
+ this.$nextTick(()=>{
|
|
|
let obj = this.list.map(e=>{
|
|
|
return {
|
|
|
sa_quotedprice_itemsid:e.sa_quotedprice_itemsid,
|
|
|
@@ -313,7 +341,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
this.changeData(obj)
|
|
|
- })*/
|
|
|
+ })
|
|
|
},
|
|
|
onChangeDiscountrate(val,data,index) {
|
|
|
/* data.price = data.marketprice * (data.discountrate / 100)
|
|
|
@@ -399,15 +427,15 @@ export default {
|
|
|
|
|
|
<style scoped>
|
|
|
.produtMag-panel{
|
|
|
- margin-top: 35px;
|
|
|
+ margin-top: 0px;
|
|
|
background: #fff;
|
|
|
border-radius:5px;
|
|
|
|
|
|
- border:1px solid rgb(0 0 0 / 5%)
|
|
|
+ border:1px solid rgb(0 0 0 / 1%)
|
|
|
/* box-shadow: 0 5px 5px rgb(0 0 0 / 10%);
|
|
|
transform: translate3d(0,-2px,0); */
|
|
|
}
|
|
|
.image {
|
|
|
- width:80px;height:80px;margin:0px auto;
|
|
|
+ width:38px;height:38px;margin:0px auto;
|
|
|
}
|
|
|
</style>
|