瀏覽代碼

修改bug

chenrui 2 年之前
父節點
當前提交
dc51523c18
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      src/views/reportData/urchaseDetailReturn/detailList.vue

+ 4 - 4
src/views/reportData/urchaseDetailReturn/detailList.vue

@@ -210,7 +210,6 @@ import { productBrandQuery } from '@/api/productBrand'
 import { productTypeQuery } from '@/api/productType'
 import ProductBrand from '@/views/common/productBrand.js'
 import { hdExportExcel } from '@/libs/exportExcel'
-import { toThousands } from '@/libs/tools.js'
 import { sparePartsReturnDetailReportList, sparePartsReturnDetailReportStat, sparePartsReturnReportExportDetail } from '@/api/reportData'
 export default {
   name: 'UrchaseDetailReturnList',
@@ -276,6 +275,7 @@ export default {
   },
   computed: {
     columns () {
+      const _this = this
       const arr = [
         { title: '采购退货单号', dataIndex: 'sparePartsReturnNo', width: 90, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '省份', dataIndex: 'supplier.provinceName', width: 80, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
@@ -298,9 +298,9 @@ export default {
         { title: '操作员', dataIndex: 'submitorName', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
 
-      if (this.$hasPermissions('B_isShowCost')) {
-        arr.splice(15, 0, { title: '入库单价', dataIndex: 'cost', width: 60, align: 'right', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } })
-        arr.splice(19, 0, { title: '退货金额', dataIndex: 'totalCost', width: 60, align: 'right', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } })
+      if (_this.$hasPermissions('B_isShowCost')) {
+        arr.splice(15, 0, { title: '入库单价', dataIndex: 'cost', width: 60, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
+        arr.splice(19, 0, { title: '退货金额', dataIndex: 'totalCost', width: 60, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
       }
       return arr
     }