Ver Fonte

修改bug

chenrui há 1 ano atrás
pai
commit
6a82abc68b

+ 7 - 7
src/views/reportData/promotionSalesRealTimeReport/index.vue

@@ -250,15 +250,15 @@ export default {
         { title: '销售审核时间', dataIndex: 'auditDate', width: '120px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '数量(非促)', dataIndex: 'notGiftQty', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '数量(促)', dataIndex: 'giftQty', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '实售金额', dataIndex: 'totalRealAmount', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '开单金额', dataIndex: 'totalAmount', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '成本金额', dataIndex: 'totalRealCost', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '损失成本', dataIndex: 'lossCost', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '损失费用', dataIndex: 'lossAmount', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '实售金额', dataIndex: 'totalRealAmount', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '开单金额', dataIndex: 'totalAmount', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '成本金额', dataIndex: 'totalRealCost', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '损失成本', dataIndex: 'lossCost', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '损失费用', dataIndex: 'lossAmount', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: <a-tooltip placement='top' title='即在下推时促销产品已转采购额的数量'>转采购额数量&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'convertPromoGiftsQty', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: <a-tooltip placement='top' title='即促销产品转采购额金额,促销产品转采购额数量*销售价'>转采购额金额&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'convertPromoGiftsAmount', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '采购额结余', dataIndex: 'surplusPromoGiftsAmount', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '采购额超出', dataIndex: 'outPromoGiftsAmount', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '采购额结余', dataIndex: 'surplusPromoGiftsAmount', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '采购额超出', dataIndex: 'outPromoGiftsAmount', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '促销品费用归属品牌', dataIndex: 'promoProductBrandName', width: '120px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '促销品费用归属分类', dataIndex: 'promoProductTypeName', width: '120px', align: 'center', customRender: function (text) { return text || '--' } }
       ],

+ 42 - 42
src/views/reportData/promotionSalesRealTimeReport/list.vue

@@ -3,34 +3,34 @@
     <div class="productInfoList-wrap">
       <a-card size="small" :bordered="false" class="searchBoxNormal">
         <div ref="tableSearch" class="table-page-search-wrapper newTableSearchName">
-        <a-form-model layout="inline" ref="ruleForm" :rules="rules" :model="newQueryParam">
-          <a-row :gutter="15">
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="下推时间" prop="salesDate">
-                <rangeDate ref="rangeDate" :value="newQueryParam.salesDate" @change="salesDateChange" />
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <!-- :disabledDate="disabledDate" -->
-              <a-form-model-item label="促销开始时间">
-                <a-range-picker
-                  style="width:100%"
-                  v-model="time"
-                  :format="dateFormat"
-                  :placeholder="['开始时间', '结束时间']"
-                  @change="dateChange"></a-range-picker>
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="促销名称">
-                <a-input
-                  id="promotionSalesRealTimeReport-title"
-                  v-model.trim="newQueryParam.promoRuleReport.title"
-                  allowClear
-                  placeholder="请输入促销名称" />
-              </a-form-model-item>
-            </a-col>
-            <template v-if="advanced">
+          <a-form-model layout="inline" ref="ruleForm" :rules="rules" :model="newQueryParam">
+            <a-row :gutter="15">
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="下推时间" prop="salesDate">
+                  <rangeDate ref="rangeDate" :value="newQueryParam.salesDate" @change="salesDateChange" />
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <!-- :disabledDate="disabledDate" -->
+                <a-form-model-item label="促销开始时间">
+                  <a-range-picker
+                    style="width:100%"
+                    v-model="time"
+                    :format="dateFormat"
+                    :placeholder="['开始时间', '结束时间']"
+                    @change="dateChange"></a-range-picker>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="促销名称">
+                  <a-input
+                    id="promotionSalesRealTimeReport-title"
+                    v-model.trim="newQueryParam.promoRuleReport.title"
+                    allowClear
+                    placeholder="请输入促销名称" />
+                </a-form-model-item>
+              </a-col>
+              <template v-if="advanced">
                 <a-col :md="6" :sm="24">
                   <a-form-model-item label="促销类型">
                     <v-select
@@ -130,17 +130,18 @@
           bordered>
           <!-- 促销时间 -->
           <template slot="promotionTime" slot-scope="text, record">
-            <span>{{ record.promotion.promotionDateStart }}-{{ record.promotion.promotionDateEnd }}</span>
+            <span v-if="record.promotion && record.promotion.promotionDateStart">{{ record.promotion.promotionDateStart }}-{{ record.promotion.promotionDateEnd }}</span>
+            <span v-else>--</span>
           </template>
           <!-- 规则 -->
-          <!-- <template slot="promotionDesc" slot-scope="text, record">
-          <span v-if="record.promotionRule.promotionRuleType=='PROMO_PROD'">{{ record.promotionRule.promotionRuleTypeDictValue }}</span>
-          <span v-else-if="record.promotionRule.promotionRuleType=='RATIO_AMOUNT'">{{ record.promotionRule.regularSameFlag==1?'同款':'不同款' }}产品购买满{{ record.promotionRule.regularQty }}个正价产品,送{{ record.promotionQty }}个促销产品</span>
-          <span v-else>购买满{{ record.promotionRule.regularAmount }}元正价产品,送{{ record.promotionRule.giveAmount }}元促销品采购额{{ record.promotionRule.accrualFlag&&record.promotionRule.accrualFlag==1?'(金额叠加)':'(金额不叠加)' }}</span>
-        </template> -->
+          <template slot="promotionDesc" slot-scope="text, record">
+            <div v-if="record.promotionRule.ruleInfo" v-html="record.promotionRule.ruleInfo"></div>
+            <span v-else>--</span>
+          </template>
           <!-- 地区 -->
           <template slot="addressInfo" slot-scope="text, record">
-            <span>{{ record.provinceName }}{{ record.cityName?'/'+record.cityName:'' }}{{ record.districtName?'/'+record.districtName :'' }}</span>
+            <span v-if="record.provinceName">{{ record.provinceName }}{{ record.cityName?'/'+record.cityName:'' }}{{ record.districtName?'/'+record.districtName :'' }}</span>
+            <span v-else>--</span>
           </template>
           <template slot="footer">
             <a-row>
@@ -288,8 +289,7 @@ export default {
           return text || '--'
         },
         fixed: 'left'
-      },
-      { title: '规则', dataIndex: 'promotionRule.ruleInfo', width: '180px', align: 'left', customRender: function (text) { return text || '--' }, fixed: 'left' },
+      }, { title: '规则', dataIndex: 'promotionRule.ruleInfo', width: '180px', align: 'left', scopedSlots: { customRender: 'promotionDesc' }, fixed: 'left' },
       {
         title: '销售单号',
         dataIndex: 'salesBillNo',
@@ -375,7 +375,7 @@ export default {
         title: '实时实售金额',
         dataIndex: 'totalRealAmount',
         width: '100px',
-        align: 'center',
+        align: 'right',
         customRender: function (text) {
           return ((text || text == 0) ? _this.toThousands(text) : '--')
         }
@@ -384,7 +384,7 @@ export default {
         title: '实时开单金额',
         dataIndex: 'totalAmount',
         width: '100px',
-        align: 'center',
+        align: 'right',
         customRender: function (text) {
           return ((text || text == 0) ? _this.toThousands(text) : '--')
         }
@@ -393,7 +393,7 @@ export default {
         title: '实时成本金额',
         dataIndex: 'totalRealCost',
         width: '100px',
-        align: 'center',
+        align: 'right',
         customRender: function (text) {
           return ((text || text == 0) ? _this.toThousands(text) : '--')
         }
@@ -402,7 +402,7 @@ export default {
         title: '实时损失成本',
         dataIndex: 'lossCost',
         width: '100px',
-        align: 'center',
+        align: 'right',
         customRender: function (text) {
           return ((text || text == 0) ? _this.toThousands(text) : '--')
         }
@@ -411,7 +411,7 @@ export default {
         title: '实时损失费用',
         dataIndex: 'lossAmount',
         width: '100px',
-        align: 'center',
+        align: 'right',
         customRender: function (text) {
           return ((text || text == 0) ? _this.toThousands(text) : '--')
         }