chenrui 2 lat temu
rodzic
commit
4155584e3b

+ 4 - 4
src/views/purchasingManagement/purchaseReturn/detailModal.vue

@@ -52,7 +52,7 @@
 <script>
 import { STable } from '@/components'
 import { sparePartsReturnQueryPage, queryPageCount, sparePartsReturnInfo } from '@/api/sparePartsReturn'
-import { toFixedDecimal } from '@/libs/tools.js'
+import { toThousands } from '@/libs/tools.js'
 export default {
   name: 'ConfirmationDetailModal',
   components: { STable },
@@ -107,8 +107,8 @@ export default {
         { title: '申请退货数量', dataIndex: 'qty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       if (this.$hasPermissions('B_isShowCost')) { //  售价权限
-        arr.splice(7, 0, { title: '退货单价', dataIndex: 'cost', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text, 2) : '--') } })
-        arr.splice(9, 0, { title: '退货金额', dataIndex: 'totalCost', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text, 2) : '--') } })
+        arr.splice(7, 0, { title: '退货单价', dataIndex: 'cost', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } })
+        arr.splice(9, 0, { title: '退货金额', dataIndex: 'totalCost', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } })
       }
       return arr
     }
@@ -128,7 +128,7 @@ export default {
       queryPageCount({ sparePartsReturnSn: this.itemSn }).then(res => {
         if (res.status == 200) {
           if (res.data) {
-            res.data.totalCost = (res.data && (res.data.totalCost || res.data.totalCost == 0)) ? toFixedDecimal(res.data.totalCost, 2) : '--'
+            res.data.totalCost = (res.data && (res.data.totalCost || res.data.totalCost == 0)) ? toThousands(res.data.totalCost, 2) : '--'
             this.statisticsObj = res.data
           } else {
             this.statisticsObj = null

+ 4 - 4
src/views/purchasingManagement/purchaseReturn/list.vue

@@ -151,7 +151,7 @@ import chooseDepartUserModal from './chooseDepartUserModal.vue'
 import reviewProgressModal from './reviewProgressModal.vue'
 import reportModal from '@/views/common/reportModal.vue'
 import { hdExportExcel } from '@/libs/exportExcel'
-import { toFixedDecimal } from '@/libs/tools.js'
+import { toThousands } from '@/libs/tools.js'
 import supplier from '@/views/common/supplier.js'
 import { sparePartsReturnList, sparePartsReturnDelete, sparePartsReturnExportDetail, againSubmit } from '@/api/sparePartsReturn'
 export default {
@@ -203,17 +203,17 @@ export default {
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '创建时间', dataIndex: 'createDate', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '采购退货单号', scopedSlots: { customRender: 'sparePartsReturnNo' }, width: '15%', align: 'center' },
         { title: '供应商名称', dataIndex: 'supplier.supplierName', align: 'center', width: '15%', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '退货原因', dataIndex: 'returnReasonDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '申请退货数量', dataIndex: 'totalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核时间', dataIndex: 'auditDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'auditDate', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审核状态', dataIndex: 'stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '9%', align: 'center' }
       ]
       if (this.$hasPermissions('B_isShowCost')) { //  售价权限
-        arr.splice(6, 0, { title: '退货金额', dataIndex: 'totalCost', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text, 2) : '--') } })
+        arr.splice(6, 0, { title: '退货金额', dataIndex: 'totalCost', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } })
       }
       return arr
     }

+ 8 - 8
src/views/purchasingManagement/purchaseReturn/purchaseReturnDeatil.vue

@@ -146,7 +146,7 @@ import {
   sparePartsReturnInfo,
   sparePartsReturnDetailSaveBatch
 } from '@/api/sparePartsReturn'
-import { toFixedDecimal } from '@/libs/tools.js'
+import { toThousands } from '@/libs/tools.js'
 export default {
   name: 'PurchaseReturnEdit',
   mixins: [commonMixin],
@@ -251,19 +251,19 @@ export default {
         arr.splice(6, 0, {
           title: '退货单价',
           dataIndex: 'cost',
-          align: 'center',
-          width: '8%',
+          width: '5%',
+          align: 'right',
           customRender: function (text) {
-            return text || text == 0 ? toFixedDecimal(text, 2) : '--'
+            return text || text == 0 ? toThousands(text, 2) : '--'
           }
         })
         arr.splice(8, 0, {
           title: '退款金额',
           dataIndex: 'totalCost',
-          align: 'center',
-          width: '13%',
+          width: '5%',
+          align: 'right',
           customRender: function (text) {
-            return text || text == 0 ? toFixedDecimal(text, 2) : '--'
+            return text || text == 0 ? toThousands(text, 2) : '--'
           }
         })
       }
@@ -469,7 +469,7 @@ export default {
       queryPageCount({ sparePartsReturnSn: this.sparePartsReturnSn }).then(res => {
         if (res.status == 200) {
           if (res.data) {
-            res.data.totalCost = res.data && (res.data.totalCost || res.data.totalCost == 0) ? toFixedDecimal(res.data.totalCost, 2) : '--'
+            res.data.totalCost = res.data && (res.data.totalCost || res.data.totalCost == 0) ? toThousands(res.data.totalCost, 2) : '--'
             this.statisticsObj = res.data
           } else {
             this.statisticsObj = null

+ 2 - 2
src/views/purchasingManagement/purchaseReturn/queryPart.vue

@@ -88,7 +88,7 @@ import { queryDetailStockPage } from '@/api/spareParts'
 import { queryDetailSnListBySn } from '@/api/sparePartsReturn'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { toFixedDecimal } from '@/libs/tools.js'
+import { toThousands } from '@/libs/tools.js'
 export default {
   name: 'QueryPart',
   components: { STable, VSelect, rangeDate },
@@ -158,7 +158,7 @@ export default {
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
       if (this.$hasPermissions('B_isShowCost')) {
-        arr.splice(6, 0, { title: '入库单价', dataIndex: 'productCost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text, 2) : '--') } })
+        arr.splice(6, 0, { title: '入库单价', dataIndex: 'productCost', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } })
       }
       return arr
     },

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

@@ -204,7 +204,7 @@ import { productBrandQuery } from '@/api/productBrand'
 import { productTypeQuery } from '@/api/productType'
 import ProductBrand from '@/views/common/productBrand.js'
 import { hdExportExcel } from '@/libs/exportExcel'
-import { toFixedDecimal } from '@/libs/tools.js'
+import { toThousands } from '@/libs/tools.js'
 import { sparePartsReturnDetailReportList, sparePartsReturnDetailReportStat, sparePartsReturnReportExportDetail } from '@/api/reportData'
 export default {
   name: 'UrchaseDetailReturnList',
@@ -293,8 +293,8 @@ export default {
       ]
 
       if (this.$hasPermissions('B_isShowCost')) {
-        arr.splice(15, 0, { title: '入库单价', dataIndex: 'cost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text, 2) : '--') } })
-        arr.splice(19, 0, { title: '退货金额', dataIndex: 'totalCost', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text, 2) : '--') } })
+        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) : '--') } })
       }
       return arr
     }

+ 3 - 3
src/views/reportData/urchaseReturn/list.vue

@@ -100,7 +100,7 @@ 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 { toFixedDecimal } from '@/libs/tools.js'
+import { toThousands } from '@/libs/tools.js'
 import reportModal from '@/views/common/reportModal.vue'
 import { sparePartsReturnReportList, sparePartsReturnReportStat, sparePartsReturnReportExport } from '@/api/reportData'
 export default {
@@ -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: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text, 2) : '--') } })
+        arr.splice(8, 0, { title: '退货金额', dataIndex: 'totalCost', width: 60, align: 'right', customRender: function (text) { return ((text || text == 0) ? 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) ? toFixedDecimal(res.data.totalCost, 2) : '--'
+          res.data.totalCost = res.data && (res.data.totalCost || res.data.totalCost == 0) ? toThousands(res.data.totalCost, 2) : '--'
           this.totalData = res.data
         } else {
           this.totalData = null