Pārlūkot izejas kodu

Merge branch 'develop_yh6' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into pre-release

# Conflicts:
#	public/version.json
lilei 2 gadi atpakaļ
vecāks
revīzija
f12eee6345

+ 1 - 1
public/version.json

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

+ 2 - 2
src/config/router.config.js

@@ -2062,7 +2062,7 @@ export const asyncRouterMap = [
             meta: {
               title: '费用汇总报表(按承担方)',
               icon: 'profile',
-              permission: 'M_expenseAccountBearerReportList1'
+              permission: 'M_expenseAccountBearerReportList'
             },
             hideChildrenInMenu: true,
             children: [
@@ -2087,7 +2087,7 @@ export const asyncRouterMap = [
             meta: {
               title: '费用汇总报表(按品类)',
               icon: 'profile',
-              permission: 'M_expenseAccountCategoryReportList1'
+              permission: 'M_expenseAccountCategoryReportList'
             },
             hideChildrenInMenu: true,
             children: [

+ 2 - 4
src/views/allocationManagement/transferOut/edit.vue

@@ -617,11 +617,9 @@ export default {
     handleOpen () {
       if (this.localDataSource.length) {
         // 待提交
-        if (this.basicInfoData.state == 'WAIT_SUBMIT') {
+        if (this.basicInfoData.state == 'WAIT_SUBMIT' && !this.basicInfoData.sendNo) {
           this.showDsModal = true
-        }
-        // 待审核或审核不通过时
-        if (this.basicInfoData.state == 'AUDIT_REJECT' || this.basicInfoData.state == 'WAIT_AUDIT') {
+        } else {
           this.handleSubmit()
         }
       } else {

+ 1 - 0
src/views/allocationManagement/transferReturn/edit.vue

@@ -24,6 +24,7 @@
                   id="allocateEdit-allocateReturnTypeSn"
                   style="width: 220px;"
                   v-model="allocateTypeVal"
+                  :allowClear="false"
                   placeholder="请选择费用/调拨退货类型"
                   @change="changeAllocateType"></AllocateType>
               </a-descriptions-item>

+ 2 - 1
src/views/allocationManagement/transfersPrint/recordModal.vue

@@ -15,7 +15,8 @@
             {{ tipData&&tipData.allocateNo }}
           </a-descriptions-item>
           <a-descriptions-item label="调拨类型">
-            {{ tipData&&tipData.allocateTypeName }}
+            <span v-if="tipData&&tipData.allocateSortName">{{ tipData.allocateSortName || '--' }}</span>
+            <span v-if="tipData&&tipData.allocateTypeName">/{{ tipData.allocateTypeName || '--' }}</span>
           </a-descriptions-item>
           <a-descriptions-item label="调往对象">
             {{ tipData&&tipData.targetName }}

+ 5 - 1
src/views/common/allocateType.js

@@ -3,7 +3,7 @@ const AllocateType = {
   template: `
       <a-cascader
         :value="defaultVal"
-        allowClear
+        :allowClear="allowClear"
         :change-on-select="changeOnSelect"
         @change="handleChange"
         :options="list"
@@ -31,6 +31,10 @@ const AllocateType = {
       type: Boolean,
       default: false
     },
+    allowClear:{
+      type: Boolean,
+      default: true
+    },
     level:{
       type: [String,Number],
       default: ''

+ 203 - 147
src/views/reportData/allocationPresentation/list.vue

@@ -92,42 +92,66 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :defaultLoadData="false"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1840 }"
-        bordered>
-        <template slot="footer">
-          <a-row>
-            <a-col span="2">合计:</a-col>
-            <a-col span="22">
-              <a-row>
-                <a-col span="4">配送品调拨:{{ (totalData && (totalData.pspdb || totalData.pspdb==0)) ? totalData.pspdb : '--' }}</a-col>
-                <a-col span="4">有偿调拨:{{ (totalData && (totalData.ycdb || totalData.ycdb==0)) ? totalData.ycdb : '--' }}</a-col>
-                <a-col span="4">促销调拨:{{ (totalData && (totalData.cxdb || totalData.cxdb==0)) ? totalData.cxdb : '--' }}</a-col>
-                <a-col span="4">退换品调拨:{{ (totalData && (totalData.thpdb || totalData.thpdb==0)) ? totalData.thpdb : '--' }}</a-col>
-                <a-col span="4">样品调拨:{{ (totalData && (totalData.ypdb || totalData.ypdb==0)) ? totalData.ypdb : '--' }}</a-col>
-                <a-col span="4">仓库误差调拨:{{ (totalData && (totalData.ckwcdb || totalData.ckwcdb==0)) ? totalData.ckwcdb : '--' }}</a-col>
-                <a-col span="4">TBU刹车片配送品调拨:{{ (totalData && (totalData.tbudb || totalData.tbudb==0)) ? totalData.tbudb : '--' }}</a-col>
-                <a-col span="4">NGK配送品调拨:{{ (totalData && (totalData.ngkdb || totalData.ngkdb==0)) ? totalData.ngkdb : '--' }}</a-col>
-                <a-col span="4">德路斯调拨:{{ (totalData && (totalData.dlsdb || totalData.dlsdb==0)) ? totalData.dlsdb : '--' }}</a-col>
-                <a-col span="4">新加盟商政策调拨:{{ (totalData && (totalData.xjmszcdb || totalData.xjmszcdb==0)) ? totalData.xjmszcdb : '--' }}</a-col>
-                <a-col span="4">特殊申请配送品调拨:{{ (totalData && (totalData.tssqpspdb || totalData.tssqpspdb==0)) ? totalData.tssqpspdb : '--' }}</a-col>
-                <a-col span="4">特殊申请促销调拨:{{ (totalData && (totalData.tssqcxdb || totalData.tssqcxdb==0)) ? totalData.tssqcxdb : '--' }}</a-col>
-                <a-col span="4">卡扣配送品调拨:{{ (totalData && (totalData.kkpspdb || totalData.kkpspdb==0)) ? totalData.kkpspdb : '--' }}</a-col>
-                <a-col span="4">客诉样品调拨:{{ (totalData && (totalData.ksypdb || totalData.ksypdb==0)) ? totalData.ksypdb : '--' }}</a-col>
-                <a-col span="6" v-if="$hasPermissions('B_isShowPrice')">调拨单合计金额:{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? totalData.totalCost : '--' }}</a-col>
-              </a-row>
-            </a-col>
-          </a-row>
-        </template>
-      </s-table>
+      <a-tabs>
+        <a-tab-pane key="1" tab="费用/调拨类型列表">
+          <!-- 列表 -->
+          <s-table
+            class="sTable"
+            ref="table"
+            size="small"
+            :defaultLoadData="false"
+            :rowKey="(record) => record.id"
+            :columns="columns"
+            :data="loadData"
+            :scroll="{ x: 680 + tableWidth }"
+            bordered>
+          </s-table>
+        </a-tab-pane>
+        <a-tab-pane key="2" tab="费用/调拨类型合计" force-render>
+          <div class="h-title">
+            <div><div>费用类型</div></div>
+            <div><div>调拨类别</div></div>
+            <div><div>调拨类型</div></div>
+          </div>
+          <div class="leve1" v-for="item in totalData" :key="item.name">
+            <div>
+              <div>
+                {{ item.name }}
+              </div>
+              <div>
+                {{ item.cost }}
+              </div>
+            </div>
+            <div>
+              <!-- 二级 -->
+              <div class="leve2" v-for="item2 in item.treeList" :key="item2.name">
+                <div>
+                  <div>
+                    {{ item2.name }}
+                  </div>
+                  <div>
+                    {{ item2.cost }}
+                  </div>
+                </div>
+                <div>
+                  <!-- 三级 -->
+                  <div class="leve3" v-for="item3 in item2.treeList" :key="item3.name">
+                    <div>
+                      <div>
+                        {{ item3.name }}
+                      </div>
+                      <div>
+                        {{ item3.cost }}
+                      </div>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+          <div v-if="!totalData" style="text-align: center;padding:100px 0;">暂无合计数据</div>
+        </a-tab-pane>
+      </a-tabs>
     </a-spin>
     <!-- 导出提示框 -->
     <reportModal :visible="showExport" @close="showExport=false"></reportModal>
@@ -140,6 +164,7 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import reportModal from '@/views/common/reportModal.vue'
 import subarea from '@/views/common/subarea.js'
+import { allocateTypeTreeList } from '@/api/allocateType'
 import { getArea } from '@/api/data'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { reportAllocateDbjdReportList, reportAllocateDbjdReportCount, reportAllocateDbjdReportExport } from '@/api/reportData'
@@ -194,129 +219,62 @@ export default {
       totalData: null,
       addrProvinceList: [], //  省下拉
       addrCityList: [], //  市下拉
-      addrDistrictList: [] //  区下拉
+      addrDistrictList: [], //  区下拉
+      allocateType: [], // 调拨类型
+      atypeColList: [],
+      tableWidth: 0
     }
   },
   computed: {
     columns () {
-      const arr = [
-        { title: '区域', dataIndex: 'dealerEntity.subareaNameSet', width: 100, align: 'center', customRender: function (text) { return (text && text.length > 0) ? text.join('/') : '--' } },
+      let arr = [
+        { title: '区域', dataIndex: 'subareaName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调拨单号', dataIndex: 'allocateNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '省份', dataIndex: 'dealerEntity.provinceName', width: 90, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'targetName',width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '客户级别', dataIndex: 'dealerEntity.dealerLevelDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调拨类型',
-          align: 'center',
-          children: [
-            {
-              title: '配送品调拨',
-              dataIndex: 'pspdb',
-              align: 'center',
-              width: 80,
-              customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
-            },
-            {
-              title: '有偿调拨',
-              dataIndex: 'ycdb',
-              align: 'center',
-              width: 80,
-              customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
-            },
-            {
-              title: '促销调拨',
-              dataIndex: 'cxdb',
-              align: 'center',
-              width: 80,
-              customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
-            },
-            {
-              title: '退换品调拨',
-              dataIndex: 'thpdb',
-              align: 'center',
-              width: 80,
-              customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
-            },
-            {
-              title: '样品调拨',
-              dataIndex: 'ypdb',
-              align: 'center',
-              width: 80,
-              customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
-            },
-            {
-              title: '仓库误差调拨',
-              dataIndex: 'ckwcdb',
-              align: 'center',
-              width: 80,
-              customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
-            },
-            {
-              title: 'TBU刹车片配送品调拨',
-              dataIndex: 'tbudb',
-              align: 'center',
-              width: 80,
-              customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
-            },
-            {
-              title: 'NGK配送品调拨',
-              dataIndex: 'ngkdb',
-              align: 'center',
-              width: 80,
-              customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
-            },
-            {
-              title: '德路斯调拨',
-              dataIndex: 'dlsdb',
-              align: 'center',
-              width: 80,
-              customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
-            },
-            {
-              title: '新加盟商政策调拨',
-              dataIndex: 'xjmszcdb',
-              align: 'center',
-              width: 80,
-              customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
-            },
-            {
-              title: '特殊申请配送品调拨',
-              dataIndex: 'tssqpspdb',
-              align: 'center',
-              width: 80,
-              customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
-            },
-            {
-              title: '特殊申请促销调拨',
-              dataIndex: 'tssqcxdb',
-              align: 'center',
-              width: 80,
-              customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
-            },
-            {
-              title: '卡扣配送品调拨',
-              dataIndex: 'kkpspdb',
-              align: 'center',
-              width: 80,
-              customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
-            },
-            {
-              title: '客诉样品调拨',
-              dataIndex: 'ksypdb',
-              align: 'center',
-              width: 80,
-              customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
-            }
-          ]
-        }
-        // { title: '调拨单合计金额', width: 90, dataIndex: 'totalCost', align: 'center', customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' } }
+        { title: '省份', dataIndex: 'provinceName', width: 90, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerName', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户级别', dataIndex: 'dealerLevelDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' } }
       ]
+      arr = arr.concat(this.atypeColList)
       if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
-        arr.splice(arr.length, 0, { title: '调拨单合计金额', width: 90, dataIndex: 'totalCost', align: 'center', customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' } })
+        arr.splice(arr.length, 0, { title: '调拨单合计金额', width: 90, dataIndex: 'totalCost', align: 'center', customRender: function (text) { return text || '--' } })
       }
       return arr
     }
   },
   methods: {
+    getCol (data, key) {
+      const ret = []
+      for (let i = 0; i < data.length; i++) {
+        const row = data[i]
+        row.paths = key ? (key + '_' + row.allocateTypeSn) : row.allocateTypeSn
+        const params = {
+          title: row.name
+        }
+        if (!row.sonList) {
+          params.dataIndex = row.paths
+          params.width = 100
+          params.align = 'center'
+          params.customRender = function (text) { return text || '--' }
+          this.tableWidth += 100
+        } else {
+          params.children = this.getCol(row.sonList, row.paths)
+        }
+        ret.push(params)
+      }
+      return ret
+    },
+    // 获取调拨类型
+    getAllocateType () {
+      allocateTypeTreeList({}).then(res => {
+        if (res.status == 200) {
+          this.allocateType = res.data
+          this.atypeColList = this.getCol(this.allocateType, '')
+          // console.log(JSON.stringify(this.atypeColList))
+        } else {
+          this.allocateType = []
+        }
+      })
+    },
     //  导出
     handleExport () {
       const _this = this
@@ -433,6 +391,7 @@ export default {
     },
     pageInit () {
       this.getArea('province')
+      this.getAllocateType()
     }
   },
   mounted () {
@@ -453,3 +412,100 @@ export default {
   }
 }
 </script>
+<style lang="less">
+  .allocationPresentationList-wrap{
+    .h-title{
+      display: flex;
+      align-items: center;
+      > div{
+        padding: 10px;
+        width: 33.3%;
+        background:#f8f8f8;
+        border-left:1px solid #eee;
+        > div{
+          width: 50%;
+          text-align: center;
+          font-weight:bold;
+          border-right:1px solid #eee;
+        }
+      }
+    }
+    .leve1{
+      border:1px solid #eee;
+      > div{
+        &:first-child{
+          width: 33.3%;
+          display: flex;
+          align-items: center;
+          > div{
+            width: 50%;
+            height: 100%;
+            text-align: center;
+            border-left:1px solid #eee;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+          }
+        }
+        &:last-child{
+          align-items: center;
+          width: 66.6%;
+        }
+      }
+    }
+    .leve2{
+      border-bottom:1px solid #eee;
+      > div{
+        &:first-child{
+          width: 50%;
+          display: flex;
+          align-items: center;
+          > div{
+            width: 50%;
+            height: 100%;
+            padding: 10px;
+            text-align: center;
+            border-left:1px solid #eee;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+          }
+        }
+        &:last-child{
+          align-items: center;
+          width: 50%;
+          border-left:1px solid #eee;
+        }
+      }
+      &:last-child{
+        border-bottom:0;
+      }
+    }
+    .leve3{
+      border-bottom:1px solid #eee;
+      > div{
+        width: 100%;
+        display: flex;
+        align-items: center;
+        > div{
+          width: 50%;
+          height: 100%;
+          padding: 10px;
+          text-align: center;
+          display: flex;
+          align-items: center;
+          justify-content: center;
+          &:last-child{
+            border-left:1px solid #eee;
+          }
+        }
+      }
+      &:last-child{
+        border-bottom:0;
+      }
+    }
+    .leve1,.leve2,.leve3{
+      display:flex;
+    }
+  }
+</style>

+ 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) {

+ 20 - 6
src/views/reportData/transferReturnDetailReport/list.vue

@@ -29,7 +29,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="调拨退货类型">
-                <AllocateType id="allocateReturnDetailReport-allocateReturnTypeSn" v-model="allocateTypeVal" @change="changeAllocatype"></AllocateType>
+                <AllocateType id="allocateReturnDetailReport-allocateReturnTypeSn" :changeOnSelect="true" v-model="allocateTypeVal" @change="changeAllocatype"></AllocateType>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -124,11 +124,20 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 2960 }"
+        :scroll="{ x: 3050 }"
         :defaultLoadData="false"
         bordered>
+        <!-- 调拨类型 -->
+        <template slot="allocateType" slot-scope="text, record">
+          <div>
+            <span v-if="record.allocateSortName">{{ record.allocateSortName }}</span>
+            <span v-if="record.allocateSortName&&record.allocateReturnTypeName">/</span>
+            <span v-if="record.allocateReturnTypeName">{{ record.allocateReturnTypeName }}</span>
+          </div>
+        </template>
         <template slot="footer">
           <a-row :gutter="15">
+            <a-col :md="4" :sm="24"></a-col>
             <a-col :md="4" :sm="24">退货总数量:{{ (totalData && (totalData.returnQty || totalData.returnQty==0)) ? totalData.returnQty : '--' }}</a-col>
             <a-col :md="4" :sm="24">坏件总数量:{{ (totalData && (totalData.badQty || totalData.badQty==0)) ? totalData.badQty : '--' }}</a-col>
             <a-col :md="4" :sm="24">返库总数量:{{ (totalData && (totalData.backStockQty || totalData.backStockQty==0)) ? totalData.backStockQty : '--' }}</a-col>
@@ -177,6 +186,8 @@ export default {
         productCode: '',
         productName: '',
         targetName: '',
+        costTypeSn: undefined,
+        allocateSortSn: undefined,
         allocateReturnTypeSn: undefined,
         targetType: undefined,
         productBrandTypeSn: undefined,
@@ -243,9 +254,10 @@ export default {
         { title: '调拨退货单号', dataIndex: 'allocateReturnNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '退货完成日期', dataIndex: 'financeAuditTime', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '省份', dataIndex: 'dealerEntity.provinceName', width: 90, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '调拨退货对象类型', dataIndex: 'targetTypeDictValue', width: 120, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调拨退货对象类型', dataIndex: 'targetTypeDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '调拨退货对象名称', dataIndex: 'targetName', width: 120, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '调拨退货类型', dataIndex: 'allocateReturnTypeName', width: 120, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '费用类型', dataIndex: 'costTypeName', width: 90, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调拨退货类型', scopedSlots: { customRender: 'allocateType' }, width: 120, align: 'center' },
         { title: '品牌', dataIndex: 'productEntity.productBrandName', width: 130, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '二级分类', dataIndex: 'productEntity.productTypeName2', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productEntity.name', width: 250, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
@@ -268,8 +280,8 @@ export default {
   methods: {
     changeAllocatype (val, opts) {
       this.allocateTypeVal = val || []
-      // this.queryParam.costTypeSn = val && val[0] ? val[0] : ''
-      // this.queryParam.allocateSortSn = val && val[1] ? val[1] : ''
+      this.queryParam.costTypeSn = val && val[0] ? val[0] : ''
+      this.queryParam.allocateSortSn = val && val[1] ? val[1] : ''
       this.queryParam.allocateReturnTypeSn = val && val[2] ? val[2] : ''
     },
     // 盘点库存日期
@@ -322,6 +334,8 @@ export default {
       this.queryParam.productCode = ''
       this.queryParam.productName = ''
       this.queryParam.targetName = ''
+      this.queryParam.costTypeSn = undefined
+      this.queryParam.allocateSortSn = undefined
       this.queryParam.allocateReturnTypeSn = undefined
       this.allocateTypeVal = []
       this.queryParam.targetType = undefined

+ 19 - 5
src/views/reportData/transferReturnReport/list.vue

@@ -30,7 +30,7 @@
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-item label="调拨退货类型">
-                  <AllocateType id="transferReturnReportList-allocateReturnTypeSn" v-model="allocateTypeVal" @change="changeAllocatype"></AllocateType>
+                  <AllocateType id="transferReturnReportList-allocateReturnTypeSn" :changeOnSelect="true" v-model="allocateTypeVal" @change="changeAllocatype"></AllocateType>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -86,8 +86,17 @@
         :scroll="{ x: 1100 }"
         :defaultLoadData="false"
         bordered>
+        <!-- 调拨类型 -->
+        <template slot="allocateType" slot-scope="text, record">
+          <div>
+            <span v-if="record.allocateSortName">{{ record.allocateSortName }}</span>
+            <span v-if="record.allocateSortName&&record.allocateReturnTypeName">/</span>
+            <span v-if="record.allocateReturnTypeName">{{ record.allocateReturnTypeName }}</span>
+          </div>
+        </template>
         <template slot="footer">
           <a-row :gutter="15">
+            <a-col :md="4" :sm="24"></a-col>
             <a-col :md="4" :sm="24">退货总数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</a-col>
             <a-col :md="4" :sm="24">坏件总数量:{{ (totalData && (totalData.totalBadQty || totalData.totalBadQty==0)) ? totalData.totalBadQty : '--' }}</a-col>
             <a-col :md="4" :sm="24">返库总数量:{{ (totalData && (totalData.totalBackStockQty || totalData.totalBackStockQty==0)) ? totalData.totalBackStockQty : '--' }}</a-col>
@@ -132,6 +141,8 @@ export default {
         endDate: getDate.getCurrMonthDays().endtime,
         allocateReturnNo: '',
         targetName: '',
+        costTypeSn: undefined,
+        allocateSortSn: undefined,
         allocateReturnTypeSn: undefined,
         targetType: undefined,
         subareaSn: undefined
@@ -170,9 +181,10 @@ export default {
       const arr = [
         { title: '退货单号', dataIndex: 'allocateReturnNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '退货完成日期', dataIndex: 'financeAuditTime', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调拨退货对象类型', dataIndex: 'targetTypeDictValue', width: 120, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调拨退货对象类型', dataIndex: 'targetTypeDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '调拨退货对象名称', dataIndex: 'targetName', width: 120, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '调拨退货类型', dataIndex: 'allocateReturnTypeName', width: 120, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '费用类型', dataIndex: 'costTypeName', width: 90, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调拨退货类型', scopedSlots: { customRender: 'allocateType' }, width: 120, align: 'center' },
         { title: '退货总数量', dataIndex: 'totalQty', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '坏件数量', dataIndex: 'totalBadQty', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '返库数量', dataIndex: 'totalBackStockQty', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -188,8 +200,8 @@ export default {
   methods: {
     changeAllocatype (val, opts) {
       this.allocateTypeVal = val || []
-      // this.queryParam.costTypeSn = val && val[0] ? val[0] : ''
-      // this.queryParam.allocateSortSn = val && val[1] ? val[1] : ''
+      this.queryParam.costTypeSn = val && val[0] ? val[0] : ''
+      this.queryParam.allocateSortSn = val && val[1] ? val[1] : ''
       this.queryParam.allocateReturnTypeSn = val && val[2] ? val[2] : ''
     },
     //  导出
@@ -256,6 +268,8 @@ export default {
       this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.allocateReturnNo = ''
       this.queryParam.targetName = ''
+      this.queryParam.costTypeSn = undefined
+      this.queryParam.allocateSortSn = undefined
       this.queryParam.allocateReturnTypeSn = undefined
       this.queryParam.targetType = undefined
       this.queryParam.subareaSn = undefined