|
@@ -46,6 +46,7 @@ import SalesTable from '@/components/SalesTable/SalesTable'
|
|
import {
|
|
import {
|
|
addFrontOrder, detailRefund,
|
|
addFrontOrder, detailRefund,
|
|
getFrontOrderDetail,
|
|
getFrontOrderDetail,
|
|
|
|
+ addRefund,
|
|
getFrontOrderList,
|
|
getFrontOrderList,
|
|
sbumitFrontOrder,
|
|
sbumitFrontOrder,
|
|
sendRefund,
|
|
sendRefund,
|
|
@@ -122,10 +123,12 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- if (this.$parent.pageType == 2 || this.detailsId) {
|
|
|
|
|
|
+ if (this.detailsId) {
|
|
detailRefund({id:this.detailsId}).then(res=>{
|
|
detailRefund({id:this.detailsId}).then(res=>{
|
|
this.dataList = res.data.orders
|
|
this.dataList = res.data.orders
|
|
this.details = res.data
|
|
this.details = res.data
|
|
|
|
+ this.details.customerOrderNo = this.dataList[0].id
|
|
|
|
+ this.customerNumber=this.dataList[0].customerNumber
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -138,9 +141,9 @@ export default {
|
|
console.log(selected)
|
|
console.log(selected)
|
|
// console.log(selected)
|
|
// console.log(selected)
|
|
this.dataList = selected
|
|
this.dataList = selected
|
|
- console.log(this.dataList,selected,this.$refs.header)
|
|
|
|
this.details = this.dataList[0]
|
|
this.details = this.dataList[0]
|
|
- this.details.id = this.dataList[0].id
|
|
|
|
|
|
+ this.details.customerOrderNo = this.dataList[0].id
|
|
|
|
+ this.details.id = ''
|
|
this.customerNumber=this.dataList[0].customerNumber
|
|
this.customerNumber=this.dataList[0].customerNumber
|
|
// this.$refs.header.details.customerName = this.dataList[0].customerName
|
|
// this.$refs.header.details.customerName = this.dataList[0].customerName
|
|
// this.$refs.header.details.customerNumber = this.dataList[0].customerNumber
|
|
// this.$refs.header.details.customerNumber = this.dataList[0].customerNumber
|
|
@@ -185,7 +188,6 @@ export default {
|
|
this.$errorMsg('请添加产品')
|
|
this.$errorMsg('请添加产品')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- const id = this.dataList[0].id
|
|
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
this.dataList[i].id = ''
|
|
this.dataList[i].id = ''
|
|
this.dataList[i].directFlag = this.dataList[i].flag
|
|
this.dataList[i].directFlag = this.dataList[i].flag
|
|
@@ -198,12 +200,12 @@ export default {
|
|
const params = {
|
|
const params = {
|
|
...this.$refs.header.details,
|
|
...this.$refs.header.details,
|
|
orders: this.dataList,
|
|
orders: this.dataList,
|
|
- customerOrderNo:id,
|
|
|
|
|
|
+ customerOrderNo:this.details.customerOrderNo,
|
|
status
|
|
status
|
|
}
|
|
}
|
|
if (type===1){
|
|
if (type===1){
|
|
params.id = ''
|
|
params.id = ''
|
|
- addFrontOrder(params).then(res => {
|
|
|
|
|
|
+ addRefund(params).then(res => {
|
|
this.$successMsg('新增成功')
|
|
this.$successMsg('新增成功')
|
|
this.$parent.pageType = 0
|
|
this.$parent.pageType = 0
|
|
this.dis =false
|
|
this.dis =false
|