Bladeren bron

金额样式

chenrui 2 jaren geleden
bovenliggende
commit
2aedbc0811

+ 1 - 0
src/views/allocationManagement/chainTransferIn/list.vue

@@ -156,6 +156,7 @@ export default {
         settleState: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
+      countData: null, // 统计
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true

+ 2 - 1
src/views/allocationManagement/chainTransferOut/list.vue

@@ -209,7 +209,8 @@ export default {
         })
       },
       openModal: false, //  新增编辑  弹框
-      itemId: '' //  当前品牌id
+      itemId: '', //  当前品牌id
+      countData: null // 统计
     }
   },
   computed: {

+ 2 - 1
src/views/allocationManagement/storeTransferOut/list.vue

@@ -208,7 +208,8 @@ export default {
       },
       storeCallOutTypeList: [], //  调拨类型
       openModal: false, //  新增编辑  弹框
-      itemId: '' //  当前品牌id
+      itemId: '', //  当前品牌id
+      countData: null // 统计
     }
   },
   computed: {

+ 9 - 8
src/views/numsGoodsShelves/customerAnalysis/list.vue

@@ -89,15 +89,15 @@
               <div>
                 货架数量:<strong>{{ statisticsObj.shelfCount }}</strong>;
                 铺货数量合计:<strong>{{ statisticsObj.totalShelfMaxQty }}</strong>;
-                铺货金额合计:<strong>{{ statisticsObj.totalShelfMaxCost }}</strong>;
+                铺货金额合计:<strong>{{ statisticsObj&&(statisticsObj.totalShelfMaxCost||statisticsObj.totalShelfMaxCost==0)?toThousands(statisticsObj.totalShelfMaxCost,2):'--' }}</strong>;
                 货架取货数量合计:<strong>{{ statisticsObj.totalOrderQty }}</strong>;
-                货架取货金额合计:<strong>{{ statisticsObj.totalOrderAmount }}</strong>;
+                货架取货金额合计:<strong>{{ statisticsObj&&(statisticsObj.totalOrderAmount||statisticsObj.totalOrderAmount==0)?toThousands(statisticsObj.totalOrderAmount,2):'--'  }}</strong>;
               </div>
               <div>
                 急送数量合计:<strong>{{ statisticsObj.tempOrderQty }}</strong>;
-                急送金额合计:<strong>{{ statisticsObj.tempOrderAmount }}</strong>;
+                急送金额合计:<strong>{{ statisticsObj&&(statisticsObj.tempOrderAmount||statisticsObj.tempOrderAmount==0)?toThousands(statisticsObj.tempOrderAmount,2):'--' }}</strong>;
                 销售数量合计:<strong>{{ statisticsObj.saleOrderQty }}</strong>;
-                销售金额合计:<strong>{{ statisticsObj.saleOrderAmount }}</strong>;
+                销售金额合计:<strong>{{ statisticsObj&&(statisticsObj.saleOrderAmount||statisticsObj.saleOrderAmount==0)?toThousands(statisticsObj.saleOrderAmount,2) :'--' }}</strong>;
               </div>
             </div>
           </a-alert>
@@ -140,6 +140,7 @@ export default {
   components: { STable, VSelect, rangeDate, shelfSList },
   data () {
     return {
+      toThousands,
       spinning: false,
       // advanced: false,
       tableHeight: 0,
@@ -168,28 +169,28 @@ export default {
           slots: { title: 'customTitle' },
           children: [
             { title: '铺货数量', dataIndex: 'totalShelfMaxQty', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
-            { title: '铺货金额', dataIndex: 'totalShelfMaxCost', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } }
+            { title: '铺货金额', dataIndex: 'totalShelfMaxCost', width: '8%', align: 'right', customRender: function (text) { return (text || text == 0) ? toThousands(text,2) : '--' } }
           ]
         },
         {
           title: '货架订单',
           children: [
             { title: '取货数量', dataIndex: 'totalOrderQty', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
-            { title: '取货金额', dataIndex: 'totalOrderAmount', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } }
+            { title: '取货金额', dataIndex: 'totalOrderAmount', width: '8%', align: 'right', customRender: function (text) { return (text || text == 0) ? toThousands(text,2) : '--' } }
           ]
         },
         {
           title: '急送订单',
           children: [
             { title: '急送数量', dataIndex: 'tempOrderQty', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
-            { title: '急送金额', dataIndex: 'tempOrderAmount', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } }
+            { title: '急送金额', dataIndex: 'tempOrderAmount', width: '8%', align: 'right', customRender: function (text) { return (text || text == 0) ? toThousands(text,2) : '--' } }
           ]
         },
         {
           title: '销售单',
           children: [
             { title: '销售数量', dataIndex: 'saleOrderQty', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
-            { title: '销售金额', dataIndex: 'saleOrderAmount', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } }
+            { title: '销售金额', dataIndex: 'saleOrderAmount', width: '8%', align: 'right', customRender: function (text) { return (text || text == 0) ? toThousands(text,2) : '--' } }
           ]
         }
       ],

+ 3 - 2
src/views/numsGoodsShelves/replenishmentManagement/replenishmentDetail.vue

@@ -23,7 +23,7 @@
           <div slot="message">
             总款数:<strong>{{ detailData&&(detailData.totalCategory || detailData.totalCategory==0) ? detailData.totalCategory : '--' }}</strong>;
             总数量:<strong>{{ detailData&&(detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--' }}</strong>;
-            总成本:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? detailData.totalCost : '--' }}</strong>;
+            总成本:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost,2) : '--' }}</strong>;
           </div>
         </a-alert>
         <!-- 列表 -->
@@ -58,6 +58,7 @@ export default {
     }
   },
   data () {
+    const _this = this
     return {
       showPage: false,
       spinning: false,
@@ -70,7 +71,7 @@ export default {
         { title: '补货实发数量', dataIndex: 'confirmQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'product.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         // { title: '成本价', dataIndex: 'product.unit', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '成本小计', dataIndex: 'totalCost', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本小计', dataIndex: 'totalCost', width: '15%', align: 'center', customRender: function (text) { return (text || text == 0) ? _this.toThousands(text, 2) : '--' } },
         { title: '是否急件', dataIndex: 'oosFlag', width: '15%', align: 'center', customRender: function (text) { return text == 1 ? '是' : '否' } }
       ],
       // 加载数据方法 必须为 Promise 对象

+ 4 - 3
src/views/numsGoodsShelves/shelfOrder/detail.vue

@@ -29,7 +29,7 @@
             <div>
               总款数:<strong>{{ countDetail&&(countDetail.productCategory || countDetail.productCategory==0) ? countDetail.productCategory : '--' }}</strong>;
               总数量:<strong>{{ countDetail&&(countDetail.totalQty || countDetail.totalQty==0) ? countDetail.totalQty : '--' }}</strong>;
-              总结算金额:<strong>{{ countDetail&&(countDetail.settleAmount || countDetail.settleAmount==0) ? countDetail.settleAmount : '--' }}</strong>;
+              总结算金额:<strong>{{ countDetail&&(countDetail.settleAmount || countDetail.settleAmount==0) ? toThousands(countDetail.settleAmount,2) : '--' }}</strong>;
             </div>
           </div>
         </a-alert>
@@ -75,14 +75,15 @@ export default {
   },
   computed: {
     columns () {
+      let _this=this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '货位号', dataIndex: 'shelfPlaceCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'productCode', width: '15%', scopedSlots: { customRender: 'productCode' }, align: 'center' },
         { title: '产品名称', dataIndex: 'productName', width: '40%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '结算价', dataIndex: 'settlePrice', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '结算价', dataIndex: 'settlePrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text,2) : '--') } },
         { title: '下单数量', dataIndex: 'totalQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '结算金额小计', dataIndex: 'settleAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '结算金额小计', dataIndex: 'settleAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ?  _this.toThousands(text,2) : '--') } }
       ]
       return arr
     }

+ 3 - 2
src/views/numsGoodsShelves/shelfOrder/list.vue

@@ -40,7 +40,7 @@
       </div>
       <!-- 提示 -->
       <a-alert type="info" style="margin-bottom: 10px" v-if="countData">
-        <div slot="message">总款数:{{ countData.productCategory }};总数量:{{ countData.totalQty }};总结算金额:{{ countData.settleAmount }};</div>
+        <div slot="message">总款数:{{ countData.productCategory }};总数量:{{ countData.totalQty }};总结算金额:{{ countData&&(countData.settleAmount||countData.settleAmount==0)?toThousands(countData.settleAmount,2):'--' }};</div>
       </a-alert>
       <!-- 列表 -->
       <s-table
@@ -76,6 +76,7 @@ export default {
   components: { STable, VSelect, shelfSList, rangeDate },
   mixins: [commonMixin],
   data () {
+    const _this = this
     return {
       spinning: false,
       tableHeight: 0,
@@ -94,7 +95,7 @@ export default {
         { title: '货架名称', dataIndex: 'shelfName', width: '34%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '总款数', dataIndex: 'productCategory', align: 'center', width: '8%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'totalQty', align: 'center', width: '8%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总结算金额', dataIndex: 'settleAmount', align: 'center', width: '8%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总结算金额', dataIndex: 'settleAmount', align: 'right', width: '8%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
         { title: '下单时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '订单状态', dataIndex: 'billStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
       ],

+ 7 - 4
src/views/numsGoodsShelves/shelfSet/chooseImportModal.vue

@@ -60,6 +60,7 @@
 
 <script>
 import { shelfProductParseProducts } from '@/api/shelf'
+import { toThousands } from '@/libs/tools.js'
 export default {
   name: 'ChooseImportModal',
   props: {
@@ -75,15 +76,17 @@ export default {
     }
   },
   data () {
+    const _this = this
     return {
+      toThousands,
       isShow: this.openModal, //  是否打开弹框
       nowColumns: [ //  可导入
         { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
         { title: '货位号', dataIndex: 'shelfPlaceCode', width: '19%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '绑定产品编码', dataIndex: 'productCode', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '绑定产品名称', dataIndex: 'productName', width: '26%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '销售价', dataIndex: 'price', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '结算价', dataIndex: 'cost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '销售价', dataIndex: 'price', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
+        { title: '结算价', dataIndex: 'cost', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
         { title: '最大库容', dataIndex: 'maxQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       nowUnColumns: [ //  不可导入
@@ -91,8 +94,8 @@ export default {
         { title: '货位号', dataIndex: 'shelfPlaceCode', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '绑定产品编码', dataIndex: 'productCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '绑定产品名称', dataIndex: 'productName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '销售价', dataIndex: 'price', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '结算价', dataIndex: 'cost', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '销售价', dataIndex: 'price', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
+        { title: '结算价', dataIndex: 'cost', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
         { title: '最大库容', dataIndex: 'maxQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '错误原因', dataIndex: 'remarks', width: '17%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true }
       ],

+ 7 - 4
src/views/numsGoodsShelves/shelfSet/chooseShelfImportModal.vue

@@ -71,6 +71,7 @@
 <script>
 import { hdExportExcel } from '@/libs/exportExcel'
 import { shelfPlaceReadExcel, shelfSaveBatchExcel, shelfPlaceFailExcel } from '@/api/shelf'
+import { toThousands } from '@/libs/tools.js'
 export default {
   name: 'ChooseImportModal',
   props: {
@@ -86,15 +87,17 @@ export default {
     }
   },
   data () {
+    const _this = this
     return {
+      toThousands,
       isShow: this.openModal, //  是否打开弹框
       nowColumns: [
         { title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
         { title: '货位号', dataIndex: 'shelfPlaceCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', width: '45%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售价', dataIndex: 'price', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '结算价', dataIndex: 'cost', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '销售价', dataIndex: 'price', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
+        { title: '结算价', dataIndex: 'cost', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
         { title: '最大库容', dataIndex: 'maxQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       loadData: [],
@@ -103,8 +106,8 @@ export default {
         { title: '货位号', dataIndex: 'shelfPlaceCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', width: '30%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售价', dataIndex: 'price', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '结算价', dataIndex: 'cost', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '销售价', dataIndex: 'price', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
+        { title: '结算价', dataIndex: 'cost', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
         { title: '最大库容', dataIndex: 'maxQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '错误原因', dataIndex: 'remarks', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
       ],

+ 3 - 2
src/views/numsGoodsShelves/shelfSet/set.vue

@@ -162,6 +162,7 @@ export default {
   components: { STable, VSelect, commonModal, bindProductModal, addHwModal, ImportGuideModal, basicInfoModal, importHuoweiModal },
   mixins: [commonMixin],
   data () {
+    const _this = this
     return {
       spinning: false,
       disabled: false, //  查询、重置按钮是否可操作
@@ -176,8 +177,8 @@ export default {
         { title: '货位号', dataIndex: 'shelfPlaceCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '绑定产品编码', dataIndex: 'shelfProductApiEntity.productCode', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '绑定产品名称', dataIndex: 'shelfProductApiEntity.productName', width: '23%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '销售价', dataIndex: 'shelfProductApiEntity.price', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '结算价', dataIndex: 'shelfProductApiEntity.cost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '销售价', dataIndex: 'shelfProductApiEntity.price', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
+        { title: '结算价', dataIndex: 'shelfProductApiEntity.cost', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
         { title: '最大库容', dataIndex: 'shelfProductApiEntity.maxQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '当前库存', dataIndex: 'shelfProductApiEntity.qty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }

+ 2 - 1
src/views/numsGoodsShelves/withdrawalManagement/applyWithdrawal.vue

@@ -29,7 +29,7 @@
             allowClear />
         </a-form-model-item>
         <a-form-model-item label="实际扣除金额">
-          <span>{{ serviceCharge }}元 </span><span style="color: #999;">(申请提现金额+提现手续费)</span>
+          <span>{{ (serviceCharge||serviceCharge==0)?toThousands(serviceCharge,2):'--' }}元 </span><span style="color: #999;">(申请提现金额+提现手续费)</span>
         </a-form-model-item>
         <a-form-model-item label="提现账户">
           <span style="display: block;" v-if="pageInfo">{{ pageInfo.merchantBankAccountEntity?pageInfo.merchantBankAccountEntity.bankAccount:'' }}{{ ' ( '+ pageInfo.dealerName +' ) ' }}</span>
@@ -46,6 +46,7 @@
 
 <script>
 import { saveMerchantCashOut, merchantCashOutDetail } from '@/api/merchant'
+import { toThousands } from '@/libs/tools.js'
 export default {
   props: {
     isOpenModal: {