|
@@ -21,7 +21,8 @@
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
:header-cell-style="{height:'50px',color:'#606266',fontWeight:'400'}"
|
|
:header-cell-style="{height:'50px',color:'#606266',fontWeight:'400'}"
|
|
:cell-style="{height:'50px',color:'#666666',fontWeight:'400'}"
|
|
:cell-style="{height:'50px',color:'#666666',fontWeight:'400'}"
|
|
- @selection-change="selectionChange">
|
|
|
|
|
|
+ @selection-change="selectionChange"
|
|
|
|
+ >
|
|
<el-table-column
|
|
<el-table-column
|
|
type="selection"
|
|
type="selection"
|
|
width="55">
|
|
width="55">
|
|
@@ -117,40 +118,34 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="marketprice"
|
|
prop="marketprice"
|
|
- label="牌价"
|
|
|
|
|
|
+ label="牌价(元)"
|
|
width="100">
|
|
width="100">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<p><span>{{scope.row.marketprice?scope.row.marketprice:'--'}}</span></p>
|
|
<p><span>{{scope.row.marketprice?scope.row.marketprice:'--'}}</span></p>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="num"
|
|
|
|
|
|
+ prop="qty"
|
|
label="数量"
|
|
label="数量"
|
|
|
|
+ fixed="right"
|
|
width="180">
|
|
width="180">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <p><span>{{scope.row.qty !== ''?scope.row.qty:'--'}}</span></p>
|
|
|
|
|
|
+ <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>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="amount"
|
|
prop="amount"
|
|
- label="总金额"
|
|
|
|
|
|
+ label="总金额(元)"
|
|
|
|
+ fixed="right"
|
|
width="100">
|
|
width="100">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<p><span>{{scope.row.amount?scope.row.amount:'--'}}</span></p>
|
|
<p><span>{{scope.row.amount?scope.row.amount:'--'}}</span></p>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
-<!-- <el-table-column
|
|
|
|
- prop="status"
|
|
|
|
- label="操作"
|
|
|
|
- width="90">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <delete_product :id="scope.row.sa_project_itemsid" @delSuccess="onSuccess"></delete_product>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>-->
|
|
|
|
</el-table>
|
|
</el-table>
|
|
<div style="margin-top:16px;">
|
|
<div style="margin-top:16px;">
|
|
<div style="float: left">
|
|
<div style="float: left">
|
|
- <span>金额:{{totalPrice}}</span>
|
|
|
|
|
|
+ <span>总金额(元):{{totalPrice}}</span>
|
|
</div>
|
|
</div>
|
|
<div style="float: right">
|
|
<div style="float: right">
|
|
<el-pagination
|
|
<el-pagination
|
|
@@ -220,13 +215,11 @@ export default {
|
|
this.totalPrice = 0
|
|
this.totalPrice = 0
|
|
this.params.content.sa_projectid = this.data.sa_projectid
|
|
this.params.content.sa_projectid = this.data.sa_projectid
|
|
const res = await this.$api.requested(this.params)
|
|
const res = await this.$api.requested(this.params)
|
|
- console.log(res,'____________________________')
|
|
|
|
this.list = res.data
|
|
this.list = res.data
|
|
res.data.forEach((e,index)=>{
|
|
res.data.forEach((e,index)=>{
|
|
this.totalPrice = this.totalPrice + e.amount
|
|
this.totalPrice = this.totalPrice + e.amount
|
|
})
|
|
})
|
|
this.total = res.total
|
|
this.total = res.total
|
|
- console.log(this.list)
|
|
|
|
},
|
|
},
|
|
handleSizeChange(val) {
|
|
handleSizeChange(val) {
|
|
// console.log(`每页 ${val} 条`);
|
|
// console.log(`每页 ${val} 条`);
|
|
@@ -243,7 +236,6 @@ export default {
|
|
this.$emit("productSetSuccess")
|
|
this.$emit("productSetSuccess")
|
|
},
|
|
},
|
|
clearData(){
|
|
clearData(){
|
|
- console.log("执行")
|
|
|
|
this.search = ""
|
|
this.search = ""
|
|
this.params.content.where.condition = this.search
|
|
this.params.content.where.condition = this.search
|
|
this.listData()
|
|
this.listData()
|
|
@@ -253,12 +245,10 @@ export default {
|
|
this.listData()
|
|
this.listData()
|
|
},
|
|
},
|
|
selectionChange(val){
|
|
selectionChange(val){
|
|
- console.log(val)
|
|
|
|
this.delProductData = []
|
|
this.delProductData = []
|
|
val.forEach((item,index) => {
|
|
val.forEach((item,index) => {
|
|
this.delProductData[index] = item.sa_project_itemsid
|
|
this.delProductData[index] = item.sa_project_itemsid
|
|
})
|
|
})
|
|
- console.log(this.delProductData)
|
|
|
|
},
|
|
},
|
|
onDelProduct() {
|
|
onDelProduct() {
|
|
this.$confirm('此操作将删除这些商品, 是否继续?', '提示', {
|
|
this.$confirm('此操作将删除这些商品, 是否继续?', '提示', {
|
|
@@ -288,6 +278,30 @@ export default {
|
|
this.listData()
|
|
this.listData()
|
|
this.$emit("delSuccess")
|
|
this.$emit("delSuccess")
|
|
})
|
|
})
|
|
|
|
+ },
|
|
|
|
+ /*修改商品数量*/
|
|
|
|
+ numChange(val,index,data){
|
|
|
|
+ data.qty = val.toFixed(2)
|
|
|
|
+ data.amount = (data.marketprice * data.qty).toFixed(2)
|
|
|
|
+ this.$set(this.list,index,data)
|
|
|
|
+ this.onChangQty(data,data.qty)
|
|
|
|
+ },
|
|
|
|
+ async onChangQty(data,val){
|
|
|
|
+ const res = await this.$api.requested({
|
|
|
|
+ "id": 20221021145502,
|
|
|
|
+ "content": {
|
|
|
|
+ "sa_projectid": this.data.sa_projectid,
|
|
|
|
+ "items": [
|
|
|
|
+ {
|
|
|
|
+ "sa_project_itemsid":data.sa_project_itemsid,
|
|
|
|
+ "itemid": data.itemid,
|
|
|
|
+ "qty": val,
|
|
|
|
+ "remarks": ""
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ this.listData()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|