|
@@ -204,17 +204,74 @@ export default {
|
|
|
columns () {
|
|
|
const arr = [
|
|
|
{ title: '序号', dataIndex: 'no', align: 'center', width: '4%' },
|
|
|
- { title: '入库单号', dataIndex: 'sparePartsNo', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品编码', dataIndex: 'product.code', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品名称', dataIndex: 'product.name', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '单位', dataIndex: 'product.unit', align: 'center', width: '6%', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '批次号', dataIndex: 'stockBatchNo', align: 'center', width: '18%', customRender: function (text) { return text || '--' } },
|
|
|
+ {
|
|
|
+ title: '入库单号',
|
|
|
+ dataIndex: 'sparePartsNo',
|
|
|
+ width: '18%',
|
|
|
+ align: 'center',
|
|
|
+ customRender: function (text) {
|
|
|
+ return text || '--'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '产品编码',
|
|
|
+ dataIndex: 'product.code',
|
|
|
+ width: '18%',
|
|
|
+ align: 'center',
|
|
|
+ customRender: function (text) {
|
|
|
+ return text || '--'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '产品名称',
|
|
|
+ dataIndex: 'product.name',
|
|
|
+ width: '25%',
|
|
|
+ align: 'left',
|
|
|
+ customRender: function (text) {
|
|
|
+ return text || '--'
|
|
|
+ },
|
|
|
+ ellipsis: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '单位',
|
|
|
+ dataIndex: 'product.unit',
|
|
|
+ align: 'center',
|
|
|
+ width: '6%',
|
|
|
+ customRender: function (text) {
|
|
|
+ return text || '--'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '批次号',
|
|
|
+ dataIndex: 'stockBatchNo',
|
|
|
+ align: 'center',
|
|
|
+ width: '18%',
|
|
|
+ customRender: function (text) {
|
|
|
+ return text || '--'
|
|
|
+ }
|
|
|
+ },
|
|
|
{ title: '申请退货数量', align: 'center', width: '13%', scopedSlots: { customRender: 'qty' } },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
|
]
|
|
|
if (this.$hasPermissions('B_isShowCost')) {
|
|
|
- arr.splice(6, 0, { title: '退货单价', dataIndex: 'cost', align: 'center', width: '8%', customRender: function (text) { return text || text == 0 ? toFixedDecimal(text, 2) : '--' } })
|
|
|
- arr.splice(8, 0, { title: '退款金额', dataIndex: 'totalCost', align: 'center', width: '13%', customRender: function (text) { return text || text == 0 ? toFixedDecimal(text, 2) : '--' } })
|
|
|
+ arr.splice(6, 0, {
|
|
|
+ title: '退货单价',
|
|
|
+ dataIndex: 'cost',
|
|
|
+ align: 'center',
|
|
|
+ width: '8%',
|
|
|
+ customRender: function (text) {
|
|
|
+ return text || text == 0 ? toFixedDecimal(text, 2) : '--'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ arr.splice(8, 0, {
|
|
|
+ title: '退款金额',
|
|
|
+ dataIndex: 'totalCost',
|
|
|
+ align: 'center',
|
|
|
+ width: '13%',
|
|
|
+ customRender: function (text) {
|
|
|
+ return text || text == 0 ? toFixedDecimal(text, 2) : '--'
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
return arr
|
|
|
}
|
|
@@ -353,7 +410,7 @@ export default {
|
|
|
.then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.getStatisticsData()
|
|
|
- this.resetSearchForm(true)
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
}
|
|
|
this.isInster = false
|
|
|
this.spinning = false
|
|
@@ -369,7 +426,7 @@ export default {
|
|
|
.then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.getStatisticsData()
|
|
|
- this.resetSearchForm(true)
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
}
|
|
|
this.isInster = false
|
|
|
this.spinning = false
|