|
|
|
|
@ -15,7 +15,7 @@ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-table :data="tableData" ref="multipleTable" style="width: 100%;" height="41vw" @row-click="rowClick" border @selection-change="selectionChangeProject" @select="selectChange"> |
|
|
|
|
<el-table :data="tableData" ref="multipleTable" style="width: 100%;" height="570" @row-click="rowClick" border @selection-change="selectionChangeProject" @select="selectChange"> |
|
|
|
|
<!-- type="selection" --> |
|
|
|
|
<el-table-column align="center" width="55px" > |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
@ -218,6 +218,10 @@ export default { |
|
|
|
|
this.$refs.multipleTable.toggleRowSelection(row); |
|
|
|
|
}, |
|
|
|
|
changeSale(val){ |
|
|
|
|
this.addForm = { |
|
|
|
|
...this.addForm, |
|
|
|
|
customerId:'' |
|
|
|
|
} |
|
|
|
|
getCustomer({createUserId:val}).then(res =>{ |
|
|
|
|
this.customerData = res.data.data |
|
|
|
|
}) |
|
|
|
|
@ -290,7 +294,7 @@ export default { |
|
|
|
|
let noIdArr = arr.filter(item => !item.id) |
|
|
|
|
let idArr = arr.filter(item => item.id && item.id != '') |
|
|
|
|
if(idArr.length != 0){ |
|
|
|
|
deleteProduct({ids:idArr.map(item => item.id).join(',')}).then(res =>{ |
|
|
|
|
deleteProduct({ids:idArr.map(item => item.id).join(','),catalogId:this.subcategoryId}).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
this.$message.success('删除成功') |
|
|
|
|
getProduct({current:1,size:9999,catalogId:this.subcategoryId}).then(result =>{ |
|
|
|
|
@ -325,7 +329,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
deleteProduct({ids:row.id}).then(res =>{ |
|
|
|
|
deleteProduct({ids:row.id,catalogId:this.subcategoryId}).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
this.$message.success('删除成功') |
|
|
|
|
getProduct({current:1,size:9999,catalogId:this.subcategoryId}).then(result =>{ |
|
|
|
|
@ -500,18 +504,21 @@ export default { |
|
|
|
|
saleUserId:this.saleData.length != 0 ? this.saleData[0].id : '', |
|
|
|
|
customerId:this.customerData != 0 ? this.customerData[0].id : '' |
|
|
|
|
} |
|
|
|
|
this.addDialog = true |
|
|
|
|
getCustomer({createUserId:this.addForm.saleUserId}).then(res =>{ |
|
|
|
|
this.customerData = res.data.data |
|
|
|
|
this.addDialog = true |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
this.addForm.productId = row.id |
|
|
|
|
this.addForm.bizPrice = row.standardPrice && row.standardPrice != 0 ? row.standardPrice.replace(/,/g, '') : row.standardPrice |
|
|
|
|
this.addForm.bizPrice = row.standardPrice && row.standardPrice != 0 ? (row.standardPrice + '').replace(/,/g, '') : row.standardPrice |
|
|
|
|
if(row.bizType == 2){ |
|
|
|
|
this.addForm = { |
|
|
|
|
...this.addForm, |
|
|
|
|
saleUserId:row.saleUserId, |
|
|
|
|
customerId:row.customerId, |
|
|
|
|
productId:row.id, |
|
|
|
|
id:row.bizPriceId, |
|
|
|
|
bizPrice:row.bizPrice && row.bizPrice != 0 ? row.bizPrice.replace(/,/g, '') : row.bizPrice |
|
|
|
|
} |
|
|
|
|
@ -519,10 +526,15 @@ export default { |
|
|
|
|
this.addForm = { |
|
|
|
|
...this.addForm, |
|
|
|
|
saleUserId:this.saleData.length != 0 ? this.saleData[0].id : '', |
|
|
|
|
customerId:this.customerData != 0 ? this.customerData[0].id : '' |
|
|
|
|
customerId:this.customerData != 0 ? this.customerData[0].id : '', |
|
|
|
|
productId:row.id, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.addDialog = true |
|
|
|
|
getCustomer({createUserId:this.addForm.saleUserId}).then(res =>{ |
|
|
|
|
this.customerData = res.data.data |
|
|
|
|
this.addDialog = true |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
submit(){ |
|
|
|
|
@ -643,7 +655,7 @@ export default { |
|
|
|
|
<style scoped lang="scss"> |
|
|
|
|
.container { |
|
|
|
|
width: 99%; |
|
|
|
|
height: 99%; |
|
|
|
|
// height: 99%; |
|
|
|
|
background: rgb(255, 255, 255); |
|
|
|
|
margin: 0 auto; |
|
|
|
|
margin-top: 8px; |
|
|
|
|
|