Browse Source

修改金额

chenrui 2 years ago
parent
commit
755db4d883

+ 6 - 5
src/views/productManagement/priceChangeRecord/list.vue

@@ -169,6 +169,7 @@ export default {
   },
   computed: {
     columns () {
+      const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: 50, align: 'center', fixed: 'left' },
         { title: '变更时间', dataIndex: 'updateDate', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
@@ -185,7 +186,7 @@ export default {
           dataIndex: 'sdtermindfaldsdPrice',
           align: 'center',
           children: [
-            { title: '变更前', dataIndex: 'beforeProvincePrice', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更前', dataIndex: 'beforeProvincePrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
             { title: '变更后', scopedSlots: { customRender: 'afterProvincePrice' }, width: 70, align: 'center' }
           ]
         })
@@ -194,7 +195,7 @@ export default {
           dataIndex: 'sdterminaldsdPrice',
           align: 'center',
           children: [
-            { title: '变更前', dataIndex: 'beforeCityPrice', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更前', dataIndex: 'beforeCityPrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
             { title: '变更后', scopedSlots: { customRender: 'afterCityPrice' }, width: 70, align: 'center' }
           ]
         })
@@ -203,7 +204,7 @@ export default {
           dataIndex: 'gterminaldsdPrice',
           align: 'center',
           children: [
-            { title: '变更前', dataIndex: 'beforeSpecialPrice', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更前', dataIndex: 'beforeSpecialPrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
             { title: '变更后', scopedSlots: { customRender: 'afterSpecialPrice' }, width: 70, align: 'center' }
           ]
         })
@@ -212,7 +213,7 @@ export default {
           dataIndex: 'hterminaldsdPrice',
           align: 'center',
           children: [
-            { title: '变更前', dataIndex: 'beforeTerminalPrice', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更前', dataIndex: 'beforeTerminalPrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
             { title: '变更后', scopedSlots: { customRender: 'afterTerminalPrice' }, width: 70, align: 'center' }
           ]
         })
@@ -221,7 +222,7 @@ export default {
           dataIndex: 'sterminaldsdPrice',
           align: 'center',
           children: [
-            { title: '变更前', dataIndex: 'beforeCarOwnersPrice', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更前', dataIndex: 'beforeCarOwnersPrice', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
             { title: '变更后', scopedSlots: { customRender: 'afterCarOwnersPrice' }, width: 70, align: 'center' }
           ]
         })

+ 13 - 11
src/views/productManagement/productPricing/auditModal.vue

@@ -14,38 +14,38 @@
         <a-descriptions bordered :column="1">
           <a-descriptions-item label="成本价">
             <div v-if="detailsData && detailsData.supplierProductList" style="margin-top: 8px;">
-              <p v-for="(item, index) in detailsData.supplierProductList" :key="index" style="margin: 0;">{{ ((item.cost || item.cost==0) ? item.cost.toFixed(2) : '--') + ' -- ' + (item.supplierName||'') + ';' }}</p>
+              <p v-for="(item, index) in detailsData.supplierProductList" :key="index" style="margin: 0;">{{ ((item.cost || item.cost==0) ? toThousands(item.cost) : '--') + ' -- ' + (item.supplierName||'') + ';' }}</p>
             </div>
             <span v-else>--</span>
           </a-descriptions-item>
           <a-descriptions-item label="省级价">
-            {{ detailsData && (detailsData.afterProvincePrice || detailsData.afterProvincePrice==0) ? detailsData.afterProvincePrice : '--' }}
+            {{ detailsData && (detailsData.afterProvincePrice || detailsData.afterProvincePrice==0) ? toThousands(detailsData.afterProvincePrice) : '--' }}
             <span v-if="detailsData && (detailsData.afterProvincePrice != detailsData.beforeProvincePrice)">
-              (原{{ (detailsData.beforeProvincePrice || detailsData.beforeProvincePrice==0) ? detailsData.beforeProvincePrice : '--' }})
+              (原{{ (detailsData.beforeProvincePrice || detailsData.beforeProvincePrice==0) ? toThousands(detailsData.beforeProvincePrice) : '--' }})
             </span>
           </a-descriptions-item>
           <a-descriptions-item label="市级价">
-            {{ detailsData && (detailsData.afterCityPrice || detailsData.afterCityPrice==0) ? detailsData.afterCityPrice : '--' }}
+            {{ detailsData && (detailsData.afterCityPrice || detailsData.afterCityPrice==0) ? toThousands(detailsData.afterCityPrice) : '--' }}
             <span v-if="detailsData && (detailsData.afterCityPrice != detailsData.beforeCityPrice)">
-              (原{{ (detailsData.beforeCityPrice || detailsData.beforeCityPrice==0) ? detailsData.beforeCityPrice : '--' }})
+              (原{{ (detailsData.beforeCityPrice || detailsData.beforeCityPrice==0) ? toThousands(detailsData.beforeCityPrice) : '--' }})
             </span>
           </a-descriptions-item>
           <a-descriptions-item label="特约价">
-            {{ detailsData && (detailsData.afterSpecialPrice || detailsData.afterSpecialPrice==0) ? detailsData.afterSpecialPrice : '--' }}
+            {{ detailsData && (detailsData.afterSpecialPrice || detailsData.afterSpecialPrice==0) ? toThousands(detailsData.afterSpecialPrice) : '--' }}
             <span v-if="detailsData && (detailsData.afterSpecialPrice != detailsData.beforeSpecialPrice)">
-              (原{{ (detailsData.beforeSpecialPrice || detailsData.beforeSpecialPrice==0) ? detailsData.beforeSpecialPrice : '--' }})
+              (原{{ (detailsData.beforeSpecialPrice || detailsData.beforeSpecialPrice==0) ? toThousands(detailsData.beforeSpecialPrice) : '--' }})
             </span>
           </a-descriptions-item>
           <a-descriptions-item label="终端价">
-            {{ detailsData && (detailsData.afterTerminalPrice || detailsData.afterTerminalPrice==0) ? detailsData.afterTerminalPrice : '--' }}
+            {{ detailsData && (detailsData.afterTerminalPrice || detailsData.afterTerminalPrice==0) ? toThousands(detailsData.afterTerminalPrice) : '--' }}
             <span v-if="detailsData && (detailsData.afterTerminalPrice != detailsData.beforeTerminalPrice)">
-              (原{{ (detailsData.beforeTerminalPrice || detailsData.beforeTerminalPrice==0) ? detailsData.beforeTerminalPrice : '--' }})
+              (原{{ (detailsData.beforeTerminalPrice || detailsData.beforeTerminalPrice==0) ? toThousands(detailsData.beforeTerminalPrice) : '--' }})
             </span>
           </a-descriptions-item>
           <a-descriptions-item label="车主价">
-            {{ detailsData && (detailsData.afterCarOwnersPrice || detailsData.afterCarOwnersPrice==0) ? detailsData.afterCarOwnersPrice : '--' }}
+            {{ detailsData && (detailsData.afterCarOwnersPrice || detailsData.afterCarOwnersPrice==0) ? toThousands(detailsData.afterCarOwnersPrice) : '--' }}
             <span v-if="detailsData && (detailsData.afterCarOwnersPrice != detailsData.beforeCarOwnersPrice)">
-              (原{{ (detailsData.beforeCarOwnersPrice || detailsData.beforeCarOwnersPrice==0) ? detailsData.beforeCarOwnersPrice : '--' }})
+              (原{{ (detailsData.beforeCarOwnersPrice || detailsData.beforeCarOwnersPrice==0) ? toThousands(detailsData.beforeCarOwnersPrice) : '--' }})
             </span>
           </a-descriptions-item>
           <a-descriptions-item label="变更原因">{{ detailsData && detailsData.changeReason || '--' }}</a-descriptions-item>
@@ -61,6 +61,7 @@
 
 <script>
 import { productPricingSnDetail, productPricingAudit } from '@/api/product'
+import { toThousands } from '@/libs/tools.js'
 export default {
   name: 'ProductPricingAuditModal',
   props: {
@@ -75,6 +76,7 @@ export default {
   },
   data () {
     return {
+      toThousands,
       isShow: this.openModal, //  是否打开弹框
       spinning: false,
       detailsData: null //  详情数据

+ 12 - 10
src/views/productManagement/productPricing/chooseImportModal.vue

@@ -68,6 +68,7 @@
 <script>
 import { hdExportExcel } from '@/libs/exportExcel'
 import { productPriceImport, productPriceFailExcel } from '@/api/product'
+import { toThousands } from '@/libs/tools.js'
 export default {
   name: 'ChooseImportModal',
   props: {
@@ -83,17 +84,18 @@ export default {
     }
   },
   data () {
+    const _this = this
     return {
       isShow: this.openModal, //  是否打开弹框
       nowColumns: [
         { title: '序号', dataIndex: 'no', width: '10%', align: 'center' },
         { title: '产品名称', dataIndex: 'name', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'code', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '省级价', dataIndex: 'provincePrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '特约价', dataIndex: 'specialPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '终端价', dataIndex: 'terminalPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '车主价', dataIndex: 'carOwnersPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '省级价', dataIndex: 'provincePrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '特约价', dataIndex: 'specialPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '终端价', dataIndex: 'terminalPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '车主价', dataIndex: 'carOwnersPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '变更原因', dataIndex: 'changeReason', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       loadData: [],
@@ -101,11 +103,11 @@ export default {
         { title: '序号', dataIndex: 'no', width: '9%', align: 'center' },
         { title: '产品名称', dataIndex: 'name', width: '21%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'code', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '省级价', dataIndex: 'provincePrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '特约价', dataIndex: 'specialPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '终端价', dataIndex: 'terminalPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '车主价', dataIndex: 'carOwnersPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '省级价', dataIndex: 'provincePrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '特约价', dataIndex: 'specialPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '终端价', dataIndex: 'terminalPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '车主价', dataIndex: 'carOwnersPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '变更原因', dataIndex: 'changeReason', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '备注', dataIndex: 'errorMsg', width: '14%', align: 'center', customRender: function (text) { return text || '--' } }
       ],

+ 10 - 9
src/views/productManagement/productPricing/list.vue

@@ -203,6 +203,7 @@ export default {
       return this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys ? this.rowSelectionInfo.selectedRowKeys.length : 0
     },
     columns () {
+      let _this=this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '3%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -216,32 +217,32 @@ export default {
         // { title: '成本价', scopedSlots: { customRender: 'sterminaldsdPrice' }, width: '7%', align: 'center' },
         // { title: '省级价', dataIndex: 'provincePrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '市级价', dataIndex: 'cityPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '特约价', dataIndex: 'specialPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '终端价', dataIndex: 'terminalPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '车主价', dataIndex: 'carOwnersPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '特约价', dataIndex: 'specialPrice', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '终端价', dataIndex: 'terminalPrice', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '车主价', dataIndex: 'carOwnersPrice', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
       if (this.$hasPermissions('B_isShowCost')) {
         arr.splice(9, 0, { title: '成本价', scopedSlots: { customRender: 'sterminaldsdPrice' }, width: '7%', align: 'center' })
         if (this.$hasPermissions('B_isShowProvincePrice')) {
-          arr.splice(10, 0, { title: '省级价', dataIndex: 'provincePrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+          arr.splice(10, 0, { title: '省级价', dataIndex: 'provincePrice', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
           if (this.$hasPermissions('B_isShowCityPrice')) {
-            arr.splice(11, 0, { title: '市级价', dataIndex: 'cityPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+            arr.splice(11, 0, { title: '市级价', dataIndex: 'cityPrice', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
           }
         } else {
           if (this.$hasPermissions('B_isShowCityPrice')) {
-            arr.splice(10, 0, { title: '市级价', dataIndex: 'cityPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+            arr.splice(10, 0, { title: '市级价', dataIndex: 'cityPrice', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
           }
         }
       } else {
         if (this.$hasPermissions('B_isShowProvincePrice')) {
-          arr.splice(9, 0, { title: '省级价', dataIndex: 'provincePrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+          arr.splice(9, 0, { title: '省级价', dataIndex: 'provincePrice', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
           if (this.$hasPermissions('B_isShowCityPrice')) {
-            arr.splice(10, 0, { title: '市级价', dataIndex: 'cityPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+            arr.splice(10, 0, { title: '市级价', dataIndex: 'cityPrice', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
           }
         } else {
           if (this.$hasPermissions('B_isShowCityPrice')) {
-            arr.splice(9, 0, { title: '市级价', dataIndex: 'cityPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+            arr.splice(9, 0, { title: '市级价', dataIndex: 'cityPrice', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
           }
         }
       }

+ 8 - 5
src/views/promotionRulesManagement/orderStatistics/detailModal.vue

@@ -28,11 +28,13 @@
 </template>
 
 <script>
+import { commonMixin } from '@/utils/mixin'
 import { STable } from '@/components'
 import { getOperationalPrecision } from '@/libs/tools.js'
 import { salesDetailList } from '@/api/salesDetail'
 export default {
   name: 'OrderStatisticsDetailModal',
+  mixins: [commonMixin],
   components: { STable },
   props: {
     openModal: { //  弹框显示状态
@@ -75,6 +77,7 @@ export default {
   },
   computed: {
     columns () {
+      const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '产品编码', dataIndex: 'productEntity.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -89,11 +92,11 @@ export default {
         { title: '促销类型', dataIndex: 'promotionRulesName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
-        arr.splice(3, 0, { title: '原价', dataIndex: 'origPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-        arr.splice(4, 0, { title: '促销价', dataIndex: 'price', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-        arr.splice(7, 0, { title: '原价小计', dataIndex: 'priceSubtotal', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-        arr.splice(8, 0, { title: '促销价小计', dataIndex: 'totalAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-        arr.splice(9, 0, { title: '节省金额小计', dataIndex: 'totalEconomizeAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(3, 0, { title: '原价', dataIndex: 'origPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(4, 0, { title: '促销价', dataIndex: 'price', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(7, 0, { title: '原价小计', dataIndex: 'priceSubtotal', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(8, 0, { title: '促销价小计', dataIndex: 'totalAmount', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(9, 0, { title: '节省金额小计', dataIndex: 'totalEconomizeAmount', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       return arr
     }

+ 7 - 6
src/views/promotionRulesManagement/orderStatistics/list.vue

@@ -55,9 +55,9 @@
       <!-- alert -->
       <a-alert type="info" style="margin-bottom:10px">
         <div slot="message">
-          <span v-if="$hasPermissions('B_isShowPrice')">促销品原价总额:<strong>{{ productTotal && (productTotal.totalOrigAmount || productTotal.totalOrigAmount==0) ? productTotal.totalOrigAmount : '--' }}</strong>,</span>
-          <span v-if="$hasPermissions('B_isShowPrice')">促销品促销价总额:<strong>{{ productTotal && (productTotal.totalAmount || productTotal.totalAmount==0) ? productTotal.totalAmount : '--' }}</strong>,</span>
-          <span v-if="$hasPermissions('B_isShowPrice')">节省总额:<strong>{{ productTotal && (productTotal.totalEconomizeAmount || productTotal.totalEconomizeAmount==0) ? productTotal.totalEconomizeAmount : '--' }}</strong>,</span>
+          <span v-if="$hasPermissions('B_isShowPrice')">促销品原价总额:<strong>{{ productTotal && (productTotal.totalOrigAmount || productTotal.totalOrigAmount==0) ? toThousands(productTotal.totalOrigAmount) : '--' }}</strong>,</span>
+          <span v-if="$hasPermissions('B_isShowPrice')">促销品促销价总额:<strong>{{ productTotal && (productTotal.totalAmount || productTotal.totalAmount==0) ? toThousands(productTotal.totalAmount) : '--' }}</strong>,</span>
+          <span v-if="$hasPermissions('B_isShowPrice')">节省总额:<strong>{{ productTotal && (productTotal.totalEconomizeAmount || productTotal.totalEconomizeAmount==0) ? toThousands(productTotal.totalEconomizeAmount) : '--' }}</strong>,</span>
           总单数:<strong>{{ productTotal && (productTotal.totalRecord || productTotal.totalRecord==0) ? productTotal.totalRecord : '--' }}</strong>,
           总款数:<strong>{{ productTotal && (productTotal.totalCategory || productTotal.totalCategory==0) ? productTotal.totalCategory : '--' }}</strong>,
           总数量:<strong>{{ productTotal && (productTotal.totalQty || productTotal.totalQty==0) ? productTotal.totalQty : '--' }}</strong>
@@ -157,6 +157,7 @@ export default {
   },
   computed: {
     columns () {
+      const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -173,9 +174,9 @@ export default {
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '4%', align: 'center' }
       ]
       if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
-        arr.splice(8, 0, { title: '原价总额', dataIndex: 'promoTotal', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-        arr.splice(9, 0, { title: '促销品总额', dataIndex: 'totalPromoAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-        arr.splice(10, 0, { title: '节省总额', dataIndex: 'totalEconomizeAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(8, 0, { title: '原价总额', dataIndex: 'promoTotal', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(9, 0, { title: '促销品总额', dataIndex: 'totalPromoAmount', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(10, 0, { title: '节省总额', dataIndex: 'totalEconomizeAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       return arr
     }

+ 8 - 5
src/views/promotionRulesManagement/productStatistics/detailModal.vue

@@ -30,11 +30,13 @@
 </template>
 
 <script>
+import { commonMixin } from '@/utils/mixin'
 import { STable } from '@/components'
 import { getOperationalPrecision } from '@/libs/tools.js'
 import { salesDetailPromoProductList } from '@/api/salesDetail'
 export default {
   name: 'OrderStatisticsDetailModal',
+  mixins: [commonMixin],
   components: { STable },
   props: {
     openModal: { //  弹框显示状态
@@ -77,6 +79,7 @@ export default {
   },
   computed: {
     columns () {
+      const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '采购单号', dataIndex: 'purchaseBillNo', align: 'center', width: '26%', customRender: function (text) { return text || '--' } },
@@ -90,11 +93,11 @@ export default {
         { title: '促销类型', dataIndex: 'promotionRulesName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
-        arr.splice(2, 0, { title: '原价', dataIndex: 'origPrice', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-        arr.splice(3, 0, { title: '促销价', dataIndex: 'price', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-        arr.splice(6, 0, { title: '原价小计', dataIndex: 'priceSubtotal', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-        arr.splice(7, 0, { title: '促销价小计', dataIndex: 'totalAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-        arr.splice(8, 0, { title: '节省金额小计', dataIndex: 'totalEconomizeAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(2, 0, { title: '原价', dataIndex: 'origPrice', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(3, 0, { title: '促销价', dataIndex: 'price', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(6, 0, { title: '原价小计', dataIndex: 'priceSubtotal', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(7, 0, { title: '促销价小计', dataIndex: 'totalAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(8, 0, { title: '节省金额小计', dataIndex: 'totalEconomizeAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       return arr
     }

+ 3 - 2
src/views/promotionRulesManagement/productStatistics/list.vue

@@ -55,7 +55,7 @@
       <!-- alert -->
       <a-alert type="info" style="margin-bottom:10px">
         <div slot="message">
-          <span v-if="$hasPermissions('B_isShowPrice')">节省总金额:<strong>{{ productTotal && (productTotal.totalEconomizeAmount || productTotal.totalEconomizeAmount==0) ? productTotal.totalEconomizeAmount : '--' }}</strong>,</span>
+          <span v-if="$hasPermissions('B_isShowPrice')">节省总金额:<strong>{{ productTotal && (productTotal.totalEconomizeAmount || productTotal.totalEconomizeAmount==0) ? toThousands(productTotal.totalEconomizeAmount) : '--' }}</strong>,</span>
           总数量:<strong>{{ productTotal && (productTotal.totalQty || productTotal.totalQty==0) ? productTotal.totalQty : '--' }}</strong>
         </div>
       </a-alert>
@@ -153,6 +153,7 @@ export default {
   },
   computed: {
     columns () {
+      const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '品牌', dataIndex: 'productEntity.productBrandName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
@@ -164,7 +165,7 @@ export default {
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
       if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
-        arr.splice(6, 0, { title: '节省金额', dataIndex: 'totalEconomizeAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(6, 0, { title: '节省金额', dataIndex: 'totalEconomizeAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       return arr
     }