|
@@ -115,6 +115,19 @@
|
|
style="width: 100%;" />
|
|
style="width: 100%;" />
|
|
</div>
|
|
</div>
|
|
</template> -->
|
|
</template> -->
|
|
|
|
+ <!-- 本次可退数量 -->
|
|
|
|
+ <template slot="returnNumber" slot-scope="text, record,index">
|
|
|
|
+ <a-input-number
|
|
|
|
+ v-if="record.refundableQty!=0"
|
|
|
|
+ size="small"
|
|
|
|
+ v-model="record.returnableQty"
|
|
|
|
+ :precision="0"
|
|
|
|
+ :min="0"
|
|
|
|
+ :max="record.refundableQty"
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ style="width: 100%;" />
|
|
|
|
+ <span v-else>0</span>
|
|
|
|
+ </template>
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
<a-button
|
|
<a-button
|
|
@@ -192,18 +205,6 @@
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
style="width: 100%;" />
|
|
style="width: 100%;" />
|
|
</template> -->
|
|
</template> -->
|
|
- <!-- 退货数量 -->
|
|
|
|
- <template slot="returnQty" slot-scope="text, record,index">
|
|
|
|
- <a-input-number
|
|
|
|
- size="small"
|
|
|
|
- v-model="record.returnQty"
|
|
|
|
- @blur="e => returnQtyChange(e.target.value, record,index)"
|
|
|
|
- :precision="0"
|
|
|
|
- :min="0"
|
|
|
|
- :max="record.returnQty"
|
|
|
|
- placeholder="请输入"
|
|
|
|
- style="width: 100%;" />
|
|
|
|
- </template>
|
|
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
<a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="editGrap-del-btn">删除</a-button>
|
|
<a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="editGrap-del-btn">删除</a-button>
|
|
@@ -304,6 +305,7 @@ export default {
|
|
data.list[i].no = no + i + 1
|
|
data.list[i].no = no + i + 1
|
|
data.list[i].returnPrice = data.list[i].price
|
|
data.list[i].returnPrice = data.list[i].price
|
|
data.list[i].oldPrice = data.list[i].price
|
|
data.list[i].oldPrice = data.list[i].price
|
|
|
|
+ data.list[i].returnableQty = undefined
|
|
}
|
|
}
|
|
this.loadDataSource = data.list || []
|
|
this.loadDataSource = data.list || []
|
|
this.disabled = false
|
|
this.disabled = false
|
|
@@ -350,6 +352,7 @@ export default {
|
|
{ title: '剩余可退数量', dataIndex: 'refundableQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '剩余可退数量', dataIndex: 'refundableQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '退货单价', dataIndex: 'returnPrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '退货单价', dataIndex: 'returnPrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '退货数量', dataIndex: 'returnQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '退货数量', dataIndex: 'returnQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '本次可退数量', scopedSlots: { customRender: 'returnNumber' }, width: '8%', align: 'center' },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
]
|
|
]
|
|
arr.splice(5, 0, { title: '调拨单价', dataIndex: 'price', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
arr.splice(5, 0, { title: '调拨单价', dataIndex: 'price', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
@@ -364,7 +367,7 @@ export default {
|
|
{ title: '产品名称', dataIndex: 'product.name', align: 'center', width: '29%', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '产品名称', dataIndex: 'product.name', align: 'center', width: '29%', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '单位', dataIndex: 'product.unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '单位', dataIndex: 'product.unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '退货单价', dataIndex: 'price', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '退货单价', dataIndex: 'price', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
- { title: '退货数量', scopedSlots: { customRender: 'returnQty' }, width: '10%', align: 'center' },
|
|
|
|
|
|
+ { title: '退货数量', dataIndex: 'returnQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
]
|
|
]
|
|
arr.splice(7, 0, { title: '退货金额', dataIndex: 'totalReturnPrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
arr.splice(7, 0, { title: '退货金额', dataIndex: 'totalReturnPrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
@@ -508,13 +511,17 @@ export default {
|
|
},
|
|
},
|
|
// 添加/编辑
|
|
// 添加/编辑
|
|
handleAdd (row, isEdit, isRefresh) {
|
|
handleAdd (row, isEdit, isRefresh) {
|
|
|
|
+ if (!row.returnableQty) {
|
|
|
|
+ this.$message.error('本次可退数量不能为空!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
const params = {
|
|
const params = {
|
|
allocateReturnSn: this.allocateReturnSn,
|
|
allocateReturnSn: this.allocateReturnSn,
|
|
productSn: row.productSn,
|
|
productSn: row.productSn,
|
|
price: isEdit ? row.price : row.returnPrice,
|
|
price: isEdit ? row.price : row.returnPrice,
|
|
allocateNo: row.allocateNo,
|
|
allocateNo: row.allocateNo,
|
|
allocateSn: row.allocateSn,
|
|
allocateSn: row.allocateSn,
|
|
- returnableQty: row.returnQty
|
|
|
|
|
|
+ returnableQty: row.returnableQty
|
|
}
|
|
}
|
|
const fun = isEdit ? allocReturnDetailUpdate : allocReturnDetailInsert
|
|
const fun = isEdit ? allocReturnDetailUpdate : allocReturnDetailInsert
|
|
if (isEdit) { // 编辑
|
|
if (isEdit) { // 编辑
|