lilei 2 gadi atpakaļ
vecāks
revīzija
b0ba99f975

+ 1 - 1
public/version.json

@@ -1,4 +1,4 @@
 {
-    "version": "2.1.56",
+    "version": "2.1.57",
     "message": "发现有新版本发布,确定更新系统?"
 }

+ 46 - 57
src/views/reportData/priceDifferenceDetailReport/list.vue

@@ -13,13 +13,14 @@
           @keyup.enter.native="handleSearch">
           <a-row :gutter="15">
             <a-col :md="4" :sm="24">
-              <a-form-model-item label="所在区域">
-                <subarea v-model="queryParam.subareaSn"></subarea>
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="日期" prop="time">
-                <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
+              <a-form-model-item label="月份" prop="month">
+                <a-month-picker
+                  placeholder="请选择月份"
+                  locale="zh-cn"
+                  v-model="queryParam.month"
+                  @change="onChange"
+                  :disabled-date="disabledDate"
+                  style="width: 100%;"/>
               </a-form-model-item>
             </a-col>
             <a-col :md="3" :sm="24">
@@ -34,13 +35,11 @@
                 <custList id="priceDifferenceDetailList-rebateDealer" ref="rebateDealerList" @change="rebateDealerChange"></custList>
               </a-form-model-item>
             </a-col>
-            <template v-if="advanced">
-              <a-col :md="5" :sm="24">
-                <a-form-model-item label="客户名称">
-                  <custList id="priceDifferenceDetailList-custList" ref="custList" :itemSn="queryParam.dealerSn" @change="custChange"></custList>
-                </a-form-model-item>
-              </a-col>
-            </template>
+            <a-col :md="5" :sm="24">
+              <a-form-model-item label="客户名称">
+                <custList id="priceDifferenceDetailList-custList" ref="custList" :itemSn="queryParam.dealerSn" @change="custChange"></custList>
+              </a-form-model-item>
+            </a-col>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="priceDifferenceDetailList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="priceDifferenceDetailList-reset">重置</a-button>
@@ -53,10 +52,6 @@
                 :loading="exportLoading"
                 v-if="$hasPermissions('B_priceDifferenceDetail_Export')"
                 id="allocationDetailsList-export">导出</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
-                {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
-              </a>
             </a-col>
           </a-row>
         </a-form-model>
@@ -72,11 +67,21 @@
         :defaultLoadData="false"
         bordered>
         <template slot="footer">
-          <a-row :gutter="15">
-            <a-col :md="6" :sm="24" v-if="$hasPermissions('B_isShowPrice')">实售金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? totalData.totalRealAmount : '--' }}</a-col>
-            <a-col :md="6" :sm="24" v-if="$hasPermissions('B_isShowPrice')">开单金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? totalData.totalAmount : '--' }}</a-col>
-            <a-col :md="6" :sm="24" v-if="$hasPermissions('B_isShowPrice')">直接差额:{{ (totalData && (totalData.rebateAmount || totalData.rebateAmount==0)) ? totalData.rebateAmount : '--' }}</a-col>
-          </a-row>
+          <table>
+            <tr>
+              <td width="51%" colspan="4"></td>
+              <td width="8%">
+                <div v-if="$hasPermissions('B_isShowPrice')">实售金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? totalData.totalRealAmount : '--' }}</div>
+              </td>
+              <td width="8%">
+                <div v-if="$hasPermissions('B_isShowPrice')">开单金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? totalData.totalAmount : '--' }}</div>
+              </td>
+              <td width="8%">
+                <div v-if="$hasPermissions('B_isShowPrice')">差价金额:{{ (totalData && (totalData.rebateAmount || totalData.rebateAmount==0)) ? totalData.rebateAmount : '--' }}</div>
+              </td>
+              <td width="25%" colspan="2"></td>
+            </tr>
+          </table>
         </template>
       </s-table>
     </a-spin>
@@ -87,7 +92,7 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import getDate from '@/libs/getDate.js'
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import custList from '@/views/common/custList.vue'
 import { getArea } from '@/api/data'
@@ -107,20 +112,14 @@ export default {
       exportLoading: false,
       showExport: false,
       queryParam: { //  查询条件
-        time: [
-          getDate.getCurrMonthDays().starttime,
-          getDate.getCurrMonthDays().endtime
-        ],
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
+        month: moment().format('YYYY-MM'),
         provinceSn: undefined,
         rebateDealerSn: undefined,
-        dealerSn: undefined,
-        subareaSn: undefined
+        dealerSn: undefined
       },
       rules: {
-        'time': [{ required: true, message: '请选择日期', trigger: 'change' }]
-        // 'provinceSn': [{ required: true, message: '请选择省份', trigger: 'change' }]
+        'month': [{ required: true, message: '请选择月份', trigger: 'change' }],
+        'provinceSn': [{ required: true, message: '请选择省份', trigger: 'change' }]
       },
       disabled: false, //  查询、重置按钮是否可操作
       addrProvinceList: [], //  省下拉
@@ -128,7 +127,9 @@ export default {
       loadData: parameter => {
         this.disabled = true
         const params = Object.assign(parameter, this.queryParam)
-        delete params.time
+        if (params.month) {
+          params.month = params.month + '-01'
+        }
         this.spinning = true
         return reportRebateReportList(params).then(res => {
           let data
@@ -152,8 +153,7 @@ export default {
   computed: {
     columns () {
       const arr = [
-        { title: '区域', dataIndex: 'dealerSubareaNameSet', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '日期', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '月份', dataIndex: 'month', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '省份', dataIndex: 'provinceName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '记账门店', dataIndex: 'rebateDealerName', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '客户名称', dataIndex: 'dealerName', width: '16%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
@@ -161,23 +161,19 @@ export default {
         { title: '类型', dataIndex: 'bizType', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
-        arr.splice(5, 0, { title: '实售金额', dataIndex: 'totalRealAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-        arr.splice(6, 0, { title: '开单金额', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-        arr.splice(7, 0, { title: '直接差额', dataIndex: 'rebateAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(4, 0, { title: '实售金额', dataIndex: 'totalRealAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(5, 0, { title: '开单金额', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(6, 0, { title: '差价金额', dataIndex: 'rebateAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       return arr
     }
   },
   methods: {
-    //  创建时间  change
-    dateChange (date) {
-      if (date[0] && date[1]) {
-        this.queryParam.time = date
-      } else {
-        this.queryParam.time = []
-      }
-      this.queryParam.beginDate = date[0] || ''
-      this.queryParam.endDate = date[1] || ''
+    onChange (date, dateString) {
+      this.queryParam.month = dateString
+    },
+    disabledDate (current) {
+      return current && current > moment().endOf('day')
     },
     // 合计
     getCount (params) {
@@ -237,17 +233,10 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.queryParam.time = [
-        getDate.getCurrMonthDays().starttime,
-        getDate.getCurrMonthDays().endtime
-      ]
-      this.$refs.rangeDate.resetDate(this.queryParam.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      this.queryParam.month = moment().format('YYYY-MM')
       this.queryParam.provinceSn = undefined
       this.queryParam.rebateDealerSn = undefined
       this.queryParam.dealerSn = undefined
-      this.queryParam.subareaSn = undefined
       this.$refs.rebateDealerList.resetForm()
       this.totalData = null
       if (this.advanced) {