|
@@ -100,7 +100,6 @@ import { STable, VSelect } from '@/components'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import supplier from '@/views/common/supplier.js'
|
|
|
import { hdExportExcel } from '@/libs/exportExcel'
|
|
|
-import { toThousands } from '@/libs/tools.js'
|
|
|
import reportModal from '@/views/common/reportModal.vue'
|
|
|
import { sparePartsReturnReportList, sparePartsReturnReportStat, sparePartsReturnReportExport } from '@/api/reportData'
|
|
|
export default {
|
|
@@ -150,6 +149,7 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
columns () {
|
|
|
+ const _this = this
|
|
|
const arr = [
|
|
|
{ title: '采购退货单号', dataIndex: 'sparePartsReturnNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '退货完成日期', dataIndex: 'auditDate', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
|
|
@@ -162,7 +162,7 @@ export default {
|
|
|
{ title: '操作员', dataIndex: 'submitorName', width: 130, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
|
|
|
]
|
|
|
if (this.$hasPermissions('B_isShowCost')) { // 售价权限
|
|
|
- arr.splice(8, 0, { title: '退货金额', dataIndex: 'totalCost', width: 60, align: 'right', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } })
|
|
|
+ arr.splice(8, 0, { title: '退货金额', dataIndex: 'totalCost', width: 60, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
|
|
|
}
|
|
|
return arr
|
|
|
}
|
|
@@ -191,7 +191,7 @@ export default {
|
|
|
getCount (params) {
|
|
|
sparePartsReturnReportStat(params).then(res => {
|
|
|
if (res.status == 200 && res.data) {
|
|
|
- res.data.totalCost = res.data && (res.data.totalCost || res.data.totalCost == 0) ? toThousands(res.data.totalCost, 2) : '--'
|
|
|
+ res.data.totalCost = res.data && (res.data.totalCost || res.data.totalCost == 0) ? this.toThousands(res.data.totalCost, 2) : '--'
|
|
|
this.totalData = res.data
|
|
|
} else {
|
|
|
this.totalData = null
|