lilei 2 роки тому
батько
коміт
73f48a83d8

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1674962395610
+  "version": 1674973226795
 }

+ 6 - 1
src/utils/mixin.js

@@ -1,7 +1,7 @@
 // import Vue from 'vue'
 import { deviceEnquire, DEVICE_TYPE } from '@/utils/device'
+import { toThousands } from '@/libs/tools'
 import { mapState } from 'vuex'
-
 // const mixinsComputed = Vue.config.optionMergeStrategies.computed
 // const mixinsMethods = Vue.config.optionMergeStrategies.methods
 
@@ -77,6 +77,11 @@ const AppDeviceEnquire = {
 }
 // 所有页
 const commonMixin = {
+  data(){
+    return {
+      toThousands
+    }
+  },
   watch: {
     '$store.state.app.loadingStatus': function (a, b) {
       if (!a) {

+ 7 - 6
src/views/chainReportData/chainSalesDetailReport/list.vue

@@ -145,11 +145,11 @@
       <div class="ftext" slot="message">
         产品总数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
         <div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">
-          总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+totalData.totalCost : '--' }}</strong>;
+          总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+toThousands(totalData.totalCost) : '--' }}</strong>;
         </div>
-        总售价:<strong>{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? '¥'+totalData.totalPrice : '--' }}</strong>;
+        总售价:<strong>{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? '¥'+toThousands(totalData.totalPrice) : '--' }}</strong>;
         <div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">
-          总毛利:<strong>{{ (totalData && (totalData.totalProfit || totalData.totalProfit==0)) ? '¥'+totalData.totalProfit : '--' }}</strong>。
+          总毛利:<strong>{{ (totalData && (totalData.totalProfit || totalData.totalProfit==0)) ? '¥'+toThousands(totalData.totalProfit) : '--' }}</strong>。
         </div>
       </div>
     </a-alert>
@@ -256,6 +256,7 @@ export default {
   },
   computed: {
     columns () {
+      const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '销售单号', dataIndex: 'salesBillNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -266,13 +267,13 @@ export default {
         { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '数量', dataIndex: 'productQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '成本', dataIndex: 'productCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '售价', dataIndex: 'productPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '售价', dataIndex: 'productPrice', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         // { title: '毛利', dataIndex: 'productProfit', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '审核时间', dataIndex: 'salesAuditDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       if (this.$hasPermissions('M_ShowAllCost')) {
-        arr.splice(8, 0, { title: '成本', dataIndex: 'productCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-        arr.splice(10, 0, { title: '毛利', dataIndex: 'productProfit', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(8, 0, { title: '成本', dataIndex: 'productCost', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(10, 0, { title: '毛利', dataIndex: 'productProfit', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       return arr
     }

+ 7 - 6
src/views/chainReportData/chainSalesReport/list.vue

@@ -112,11 +112,11 @@
         总单数:<strong>{{ (totalData && (totalData.totalRowSize || totalData.totalRowSize==0)) ? totalData.totalRowSize : '--' }}</strong>;
         产品总数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
         <div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">
-          总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+totalData.totalCost : '--' }}</strong>;
+          总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+toThousands(totalData.totalCost) : '--' }}</strong>;
         </div>
-        总售价:<strong>{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? '¥'+totalData.totalPrice : '--' }}</strong>;
+        总售价:<strong>{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? '¥'+toThousands(totalData.totalPrice) : '--' }}</strong>;
         <div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">
-          总毛利:<strong>{{ (totalData && (totalData.totalProfit || totalData.totalProfit==0)) ? '¥'+totalData.totalProfit : '--' }}</strong>。
+          总毛利:<strong>{{ (totalData && (totalData.totalProfit || totalData.totalProfit==0)) ? '¥'+toThousands(totalData.totalProfit) : '--' }}</strong>。
         </div>
       </div>
     </a-alert>
@@ -204,6 +204,7 @@ export default {
   },
   computed: {
     columns () {
+      const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '销售单号', dataIndex: 'salesBillNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -212,14 +213,14 @@ export default {
         { title: '款数', dataIndex: 'totalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '数量', dataIndex: 'totalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '成本', dataIndex: 'totalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '售价', dataIndex: 'totalPrice', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '售价', dataIndex: 'totalPrice', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         // { title: '毛利', dataIndex: 'totalProfit', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '业务员', dataIndex: 'salesManName', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '审核时间', dataIndex: 'salesAuditDate', width: '13%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       if (this.$hasPermissions('M_ShowAllCost')) {
-        arr.splice(6, 0, { title: '成本', dataIndex: 'totalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-        arr.splice(8, 0, { title: '毛利', dataIndex: 'totalProfit', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(6, 0, { title: '成本', dataIndex: 'totalCost', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(8, 0, { title: '毛利', dataIndex: 'totalProfit', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       return arr
     }