|
@@ -13,7 +13,7 @@
|
|
<div v-if="!detailsId">
|
|
<div v-if="!detailsId">
|
|
<el-button type="primary" :disabled="!dis" size="mini" @click="handelSubmit(1)">提交</el-button>
|
|
<el-button type="primary" :disabled="!dis" size="mini" @click="handelSubmit(1)">提交</el-button>
|
|
<el-button size="mini" @click="onReset">重置</el-button>
|
|
<el-button size="mini" @click="onReset">重置</el-button>
|
|
- <el-button size="mini" :disabled="dis" @click="handleInform(2)">通知发货</el-button>
|
|
|
|
|
|
+ <el-button size="mini" :disabled="dis" @click="handleInform(2)">退货通知</el-button>
|
|
</div>
|
|
</div>
|
|
<div v-else>
|
|
<div v-else>
|
|
<el-button type="primary" size="mini" @click="handelSubmit(2)">保存</el-button>
|
|
<el-button type="primary" size="mini" @click="handelSubmit(2)">保存</el-button>
|
|
@@ -22,6 +22,9 @@
|
|
|
|
|
|
</template>
|
|
</template>
|
|
<template v-slot:custom="{item:{row,$index}}">
|
|
<template v-slot:custom="{item:{row,$index}}">
|
|
|
|
+ <div>{{diffQty(row)}}</div>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-slot:custom="{item:{row,$index}}">
|
|
<el-radio label="1" v-model="row.flag">增加</el-radio>
|
|
<el-radio label="1" v-model="row.flag">增加</el-radio>
|
|
<el-radio label="-1" v-model="row.flag">减少</el-radio>
|
|
<el-radio label="-1" v-model="row.flag">减少</el-radio>
|
|
</template>
|
|
</template>
|
|
@@ -89,19 +92,24 @@ export default {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
prop: 'qty',
|
|
prop: 'qty',
|
|
|
|
+ align:'left',
|
|
label: '发货数量',
|
|
label: '发货数量',
|
|
width: '180'
|
|
width: '180'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
prop: 'refundQty',
|
|
prop: 'refundQty',
|
|
|
|
+ align:'left',
|
|
|
|
+
|
|
label: '退货数量',
|
|
label: '退货数量',
|
|
width: '180',
|
|
width: '180',
|
|
isInput: true
|
|
isInput: true
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- prop: 'qty',
|
|
|
|
|
|
+ prop: 'diffQty',
|
|
|
|
+ align:'left',
|
|
label: '已退数量',
|
|
label: '已退数量',
|
|
width: '180',
|
|
width: '180',
|
|
|
|
+
|
|
},
|
|
},
|
|
// {
|
|
// {
|
|
// prop: 'volume',
|
|
// prop: 'volume',
|
|
@@ -125,6 +133,13 @@ export default {
|
|
salesId:""
|
|
salesId:""
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ computed:{
|
|
|
|
+ diffQty(){
|
|
|
|
+ return (row)=>{
|
|
|
|
+ return Number(row.qty) - Number(row.refundQty)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
created() {
|
|
created() {
|
|
if (this.detailsId) {
|
|
if (this.detailsId) {
|
|
detailRefund({id:this.detailsId}).then(res=>{
|
|
detailRefund({id:this.detailsId}).then(res=>{
|
|
@@ -150,19 +165,15 @@ export default {
|
|
return listOrder(...p)
|
|
return listOrder(...p)
|
|
},
|
|
},
|
|
confirm(selected) {
|
|
confirm(selected) {
|
|
- console.log(selected)
|
|
|
|
// console.log(selected)
|
|
// console.log(selected)
|
|
|
|
+ selected.forEach(k=>{
|
|
|
|
+ k.diffQty = Number(k.qty) - Number(k.refundQty)
|
|
|
|
+ })
|
|
this.dataList = [...this.dataList,...selected]
|
|
this.dataList = [...this.dataList,...selected]
|
|
this.details = this.dataList[0]
|
|
this.details = this.dataList[0]
|
|
this.details.customerOrderNo = this.dataList[0].id
|
|
this.details.customerOrderNo = this.dataList[0].id
|
|
- this.details.id = ''
|
|
|
|
|
|
+ this.detailsId = this.detailsId
|
|
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.customerNumber = this.dataList[0].customerNumber
|
|
|
|
- // this.$refs.header.details.customerNumber = this.dataList[0].pickTime
|
|
|
|
- // this.$refs.header.details.customerNumber = this.dataList[0].userName
|
|
|
|
- // this.$refs.header.details.customerNumber = this.dataList[0].phone
|
|
|
|
- // this.$refs.header.details.customerNumber = this.dataList[0].stockType
|
|
|
|
this.dialogVisible = false
|
|
this.dialogVisible = false
|
|
this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.$refs.tableView.clearSelection()
|
|
this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.$refs.tableView.clearSelection()
|
|
|
|
|
|
@@ -234,7 +245,7 @@ export default {
|
|
},
|
|
},
|
|
handleInform(status=2){
|
|
handleInform(status=2){
|
|
sendRefund({id:this.salesId,status}).then(res=>{
|
|
sendRefund({id:this.salesId,status}).then(res=>{
|
|
- this.$successMsg('通知发货')
|
|
|
|
|
|
+ this.$successMsg('退货通知')
|
|
this.$parent.pageType = 0
|
|
this.$parent.pageType = 0
|
|
})
|
|
})
|
|
},
|
|
},
|