Переглянути джерело

Merge branch 'develop_12' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into develop_yh12

chenrui 2 роки тому
батько
коміт
a61d677ef4

+ 12 - 11
src/views/productManagement/priceChangeRecord/list.vue

@@ -86,27 +86,27 @@
       </template>
       <!-- 省级价变更后 -->
       <template slot="afterProvincePrice" slot-scope="text, record">
-        <span v-if="record.afterProvincePrice || record.afterProvincePrice==0" :class="record.beforeProvincePrice != record.afterProvincePrice ? 'red' : ''">{{ record.afterProvincePrice }}</span>
+        <span v-if="record.afterProvincePrice || record.afterProvincePrice==0" :class="record.beforeProvincePrice != record.afterProvincePrice ? 'red' : ''">{{ toThousands(record.afterProvincePrice) }}</span>
         <span v-else>--</span>
       </template>
       <!-- 市级价变更后 -->
       <template slot="afterCityPrice" slot-scope="text, record">
-        <span v-if="record.afterCityPrice || record.afterCityPrice==0" :class="record.beforeCityPrice != record.afterCityPrice ? 'red' : ''">{{ record.afterCityPrice }}</span>
+        <span v-if="record.afterCityPrice || record.afterCityPrice==0" :class="record.beforeCityPrice != record.afterCityPrice ? 'red' : ''">{{ toThousands(record.afterCityPrice) }}</span>
         <span v-else>--</span>
       </template>
       <!-- 特约价变更后 -->
       <template slot="afterSpecialPrice" slot-scope="text, record">
-        <span v-if="record.afterSpecialPrice || record.afterSpecialPrice==0" :class="record.beforeSpecialPrice != record.afterSpecialPrice ? 'red' : ''">{{ record.afterSpecialPrice }}</span>
+        <span v-if="record.afterSpecialPrice || record.afterSpecialPrice==0" :class="record.beforeSpecialPrice != record.afterSpecialPrice ? 'red' : ''">{{ toThousands(record.afterSpecialPrice) }}</span>
         <span v-else>--</span>
       </template>
       <!-- 终端价变更后 -->
       <template slot="afterTerminalPrice" slot-scope="text, record">
-        <span v-if="record.afterTerminalPrice || record.afterTerminalPrice==0" :class="record.beforeTerminalPrice != record.afterTerminalPrice ? 'red' : ''">{{ record.afterTerminalPrice }}</span>
+        <span v-if="record.afterTerminalPrice || record.afterTerminalPrice==0" :class="record.beforeTerminalPrice != record.afterTerminalPrice ? 'red' : ''">{{ toThousands(record.afterTerminalPrice) }}</span>
         <span v-else>--</span>
       </template>
       <!-- 车主价变更后 -->
       <template slot="afterCarOwnersPrice" slot-scope="text, record">
-        <span v-if="record.afterCarOwnersPrice || record.afterCarOwnersPrice==0" :class="record.beforeCarOwnersPrice != record.afterCarOwnersPrice ? 'red' : ''">{{ record.afterCarOwnersPrice }}</span>
+        <span v-if="record.afterCarOwnersPrice || record.afterCarOwnersPrice==0" :class="record.beforeCarOwnersPrice != record.afterCarOwnersPrice ? 'red' : ''">{{ toThousands(record.afterCarOwnersPrice) }}</span>
         <span v-else>--</span>
       </template>
     </s-table>
@@ -181,6 +181,7 @@ export default {
     },
     // 设置表头
     getColumns () {
+      const _this = this
       this.columns = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '变更时间', dataIndex: 'updateDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -196,7 +197,7 @@ export default {
           dataIndex: 'hterminaldsdPrice',
           align: 'center',
           children: [
-            { title: '变更前', dataIndex: 'beforeTerminalPrice', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更前', dataIndex: 'beforeTerminalPrice', width: '4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
             { title: '变更后', scopedSlots: { customRender: 'afterTerminalPrice' }, width: '4%', align: 'center' }
           ]
         },
@@ -205,7 +206,7 @@ export default {
           dataIndex: 'sterminaldsdPrice',
           align: 'center',
           children: [
-            { title: '变更前', dataIndex: 'beforeCarOwnersPrice', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更前', dataIndex: 'beforeCarOwnersPrice', width: '4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
             { title: '变更后', scopedSlots: { customRender: 'afterCarOwnersPrice' }, width: '4%', align: 'center' }
           ]
         },
@@ -219,7 +220,7 @@ export default {
               dataIndex: 'sdtermindfaldsdPrice',
               align: 'center',
               children: [
-                { title: '变更前', dataIndex: 'beforeProvincePrice', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+                { title: '变更前', dataIndex: 'beforeProvincePrice', width: '4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
                 { title: '变更后', scopedSlots: { customRender: 'afterProvincePrice' }, width: '4%', align: 'center' }
               ]
             },
@@ -228,7 +229,7 @@ export default {
               dataIndex: 'sdterminaldsdPrice',
               align: 'center',
               children: [
-                { title: '变更前', dataIndex: 'beforeCityPrice', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+                { title: '变更前', dataIndex: 'beforeCityPrice', width: '4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
                 { title: '变更后', scopedSlots: { customRender: 'afterCityPrice' }, width: '4%', align: 'center' }
               ]
             })
@@ -238,7 +239,7 @@ export default {
               dataIndex: 'sdterminaldsdPrice',
               align: 'center',
               children: [
-                { title: '变更前', dataIndex: 'beforeCityPrice', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+                { title: '变更前', dataIndex: 'beforeCityPrice', width: '4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
                 { title: '变更后', scopedSlots: { customRender: 'afterCityPrice' }, width: '4%', align: 'center' }
               ]
             })
@@ -249,7 +250,7 @@ export default {
               dataIndex: 'gterminaldsdPrice',
               align: 'center',
               children: [
-                { title: '变更前', dataIndex: 'beforeSpecialPrice', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+                { title: '变更前', dataIndex: 'beforeSpecialPrice', width: '4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
                 { title: '变更后', scopedSlots: { customRender: 'afterSpecialPrice' }, width: '4%', align: 'center' }
               ]
             })

+ 7 - 6
src/views/productManagement/productInfoJg/list.vue

@@ -218,6 +218,7 @@ export default {
     },
     // 设置表头
     getColumns () {
+      const _this = this
       this.columns = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '产品编码', dataIndex: 'code', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -225,8 +226,8 @@ export default {
         { title: '原厂编码', dataIndex: 'origCode', width: '17%', align: 'center', customRender: function (text) { return (!text || text == ' ') ? '--' : text } }
       ]
       const cArr = [
-        { 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: '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: '状态', scopedSlots: { customRender: 'enabledFlag' }, width: '7%', align: 'center' },
         { title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: '6%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
@@ -235,16 +236,16 @@ export default {
         if (res.status == 200) {
           if (res.data.dealerLevel && res.data.dealerLevel == 'PROVINCE') { //  省级
             this.columns.push(
-              { 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: '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) : '--') } }
             )
           } else if (res.data.dealerLevel && res.data.dealerLevel == 'CITY') { //  市级
             this.columns.push(
-              { title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+              { title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
             )
           }
           if (res.data.isShowSpecialPrice && res.data.isShowSpecialPrice == '1') { //  是否展示特约价
-            this.columns.push({ title: '特约价', dataIndex: 'specialPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+            this.columns.push({ title: '特约价', dataIndex: 'specialPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
           }
           this.columns = [...this.columns, ...cArr]
         }