|
|
@@ -26,8 +26,8 @@
|
|
|
<template slot="money" slot-scope="text, record">
|
|
|
<a-input-number v-model='record.money' @blur="handleBlur()" :max="record.oldPrice" :min="0"></a-input-number>
|
|
|
</template>
|
|
|
- <template slot="remark" slot-scope="text, record">
|
|
|
- <a-textarea v-model=record.remark></a-textarea>
|
|
|
+ <template slot="custorerOrderRemark" slot-scope="text, record">
|
|
|
+ <a-textarea v-model=record.custorerOrderRemark></a-textarea>
|
|
|
</template>
|
|
|
</a-table>
|
|
|
<a-table
|
|
|
@@ -44,14 +44,14 @@
|
|
|
<!-- <a-input-number v-model=record.money @blur="handleBlur()" :min="0"></a-input-number> -->
|
|
|
{{ record.money }}
|
|
|
</template>
|
|
|
- <template slot="num" slot-scope="text, record">
|
|
|
- <a-input-number v-model="record.num" :min="1" :max="record.feeGoodVo.num" @change="changeValue(record)"></a-input-number>
|
|
|
+ <template slot="returnNum" slot-scope="text, record">
|
|
|
+ <a-input-number v-model="record.returnNum" :min="0" :max="record.feeGoodVo.num" @change="changeValue(record)"></a-input-number>
|
|
|
</template>
|
|
|
<template slot="money" slot-scope="text, record">
|
|
|
<a-input-number v-model=record.money @blur="handleBlur()" :max="record.oldPrice" :min="0"></a-input-number>
|
|
|
</template>
|
|
|
- <template slot="remark" slot-scope="text, record">
|
|
|
- <a-textarea v-model=record.remark></a-textarea>
|
|
|
+ <template slot="custorerOrderRemark" slot-scope="text, record">
|
|
|
+ <a-textarea v-model=record.custorerOrderRemark></a-textarea>
|
|
|
</template>
|
|
|
</a-table>
|
|
|
</j-modal>
|
|
|
@@ -95,10 +95,10 @@ const columns = [
|
|
|
},
|
|
|
{
|
|
|
title: '备注',
|
|
|
- dataIndex: 'remark',
|
|
|
+ dataIndex: 'custorerOrderRemark',
|
|
|
width: 60,
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'remark'}
|
|
|
+ scopedSlots: { customRender: 'custorerOrderRemark'}
|
|
|
},
|
|
|
]
|
|
|
const columnstwo = [
|
|
|
@@ -139,10 +139,10 @@ const columns = [
|
|
|
},
|
|
|
{
|
|
|
title: '冲账数量',
|
|
|
- dataIndex: 'num',
|
|
|
+ // dataIndex: 'returnNum',
|
|
|
width: 60,
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'num'},
|
|
|
+ scopedSlots: { customRender: 'returnNum'}
|
|
|
// customRender: function (text, record) {
|
|
|
// return record.num = record.feeGoodVo.num
|
|
|
// }
|
|
|
@@ -156,10 +156,10 @@ const columns = [
|
|
|
},
|
|
|
{
|
|
|
title: '备注',
|
|
|
- dataIndex: 'remark',
|
|
|
+ dataIndex: 'custorerOrderRemark',
|
|
|
width: 60,
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'remark'}
|
|
|
+ scopedSlots: { customRender: 'custorerOrderRemark'}
|
|
|
},
|
|
|
]
|
|
|
export default {
|
|
|
@@ -185,7 +185,7 @@ export default {
|
|
|
// 冲账数量变化
|
|
|
changeValue(val) {
|
|
|
console.log(val);
|
|
|
- let tempvalue = val.oldPrice / val.feeGoodVo.num * val.num
|
|
|
+ let tempvalue = val.oldPrice / val.feeGoodVo.num * val.returnNum
|
|
|
return val.money = tempvalue
|
|
|
},
|
|
|
edit(record, map) {
|
|
|
@@ -204,6 +204,7 @@ export default {
|
|
|
this.feesList.forEach(e => {
|
|
|
e.roomName = map.get(e.roomId)
|
|
|
e.oldPrice = e.money
|
|
|
+ e.remark = '冲账' + this.getSubjectTypeText(e.subjectType)
|
|
|
e.money = 0
|
|
|
})
|
|
|
this.productList.forEach(e => {
|
|
|
@@ -211,7 +212,10 @@ export default {
|
|
|
e.oldPrice = e.money
|
|
|
e.money = 0
|
|
|
let tempnum = JSON.parse(JSON.stringify(e.feeGoodVo))
|
|
|
- this.$set(e,'num',tempnum.num)
|
|
|
+ e.remark = '冲账' + tempnum.name
|
|
|
+ if (e.returnNum == null) {
|
|
|
+ e.returnNum = 0
|
|
|
+ }
|
|
|
})
|
|
|
console.log(this.feesList);
|
|
|
console.log(this.productList);
|
|
|
@@ -227,6 +231,7 @@ export default {
|
|
|
this.$message.warning('冲账金额不能超过原金额,且不能小于0')
|
|
|
return
|
|
|
} else {
|
|
|
+ console.log(this.productList, "this.product")
|
|
|
this.productList.forEach(e => {
|
|
|
// 一条消费可能有多次冲账,所以传入后端的money是冲账的负数差值
|
|
|
if (e.oldPrice - e.money > 0) {
|