|
@@ -602,6 +602,11 @@
|
|
|
item.goods = {...ress.data,oldPrice:ress.data.price}
|
|
|
item.goodsList = ress.data ? [{...ress.data,oldPrice:ress.data.price}] : []
|
|
|
}
|
|
|
+ var ress = await that.getAttachmentList(res.data.websitId)
|
|
|
+ for(var item of res.data.websitPartsRetOldRecordList){
|
|
|
+ item.goods = {goodsId: item.goodsId}
|
|
|
+ item.goodsList = ress.data ? ress.data : []
|
|
|
+ }
|
|
|
this.dataList = res.data.websitPartsRetItemList
|
|
|
this.oldList = res.data.websitPartsRetOldRecordList
|
|
|
})
|
|
@@ -737,10 +742,21 @@
|
|
|
})
|
|
|
this.getAttachmentList()
|
|
|
},
|
|
|
- getAttachmentList(){
|
|
|
- getAttachmentList({pageNum: 1,pageSize: -1,params: [{param: 'a.websit_id',compare: '=',value: this.formData.websitId}]}).then(res => {
|
|
|
- this.oldList[this.isEdit].goodsList = res.data.records
|
|
|
- })
|
|
|
+ async getAttachmentList(websit_id){
|
|
|
+ const that = this
|
|
|
+ if(websit_id){
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ getAttachmentList({pageNum: 1,pageSize: -1,params: [{param: 'a.websit_id',compare: '=',value: this.formData.websitId}]}).then(res => {
|
|
|
+ resolve({
|
|
|
+ data: res.data.records
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ getAttachmentList({pageNum: 1,pageSize: -1,params: [{param: 'a.websit_id',compare: '=',value: this.formData.websitId}]}).then(res => {
|
|
|
+ this.oldList[this.isEdit].goodsList = res.data.records
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
async checkForm(){
|
|
|
let is_save = true
|
|
@@ -774,6 +790,7 @@
|
|
|
});
|
|
|
},
|
|
|
async submit(){
|
|
|
+ console.log(this.oldList)
|
|
|
let is_save = await this.checkForm()
|
|
|
if(!is_save){return false}
|
|
|
this.$confirm(`请确定是否提交, 是否继续?`, '提示', {
|
|
@@ -781,6 +798,7 @@
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
+ console.log(2)
|
|
|
edit({
|
|
|
flag: 'SUBMIT',
|
|
|
salesId: this.formData.salesId,
|