Browse Source

修改bug

chenrui 2 months ago
parent
commit
653a5bf2e7

BIN
public/templ/产品批量导入模板.xlsx


BIN
public/templ/外贸产品查询模板.xlsx


+ 41 - 0
src/api/reportData.js

@@ -1464,6 +1464,47 @@ export const tireFeeListExport = (params) => {
   })
 }
 
+/*
+*  轮胎补贴配置   供应商轮胎补贴返利报表
+*/
+
+// 补贴返利列表   有分页
+export const subsidyTireList = (params) => {
+  const url = `/report/subsidyTire/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('列表查询')
+    }
+  })
+}
+
+// 补贴返利列表   统计
+export const subsidyTireCount = (params) => {
+  return axios({
+    url: '/report/subsidyTire/queryCount ',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 补贴返利列表   导出
+export const subsidyTireExport = (params) => {
+  return axios({
+    url: '/report/subsidyTire/export',
+    data: params,
+    method: 'post',
+    responseType: 'blob',
+    headers: {
+      'module': encodeURIComponent('导出')
+    }
+  })
+}
+
 // 促销销售单报表(统计)
 export const brandTypeReportList = (params) => {
   const url = `/report/brandTypeReport/queryPage/${params.pageNo}/${params.pageSize}`

+ 1 - 2
src/views/productManagement/foreignTradeGoods/chooseImportModal.vue

@@ -14,7 +14,6 @@
         class="sTable"
         ref="table"
         size="small"
-        rowClassName="red-text"
         :rowKey="(record) => record.allocateSn"
         :columns="nowColumns"
         :dataSource="loadData"
@@ -167,7 +166,7 @@ export default {
 
   .chooseImport-modal{
     .chooseImport-con{
-      /deep/.red-text{
+      /deep/.sTable td{
         white-space: pre-line;
       }
       .btn-con{

+ 2 - 4
src/views/productManagement/foreignTradeGoods/list.vue

@@ -41,9 +41,8 @@
       <a-spin :spinning="spinning" tip="Loading...">
         <!-- 操作按钮-->
         <div class="table-operator">
-          <!-- v-if="$hasPermissions('B_foreignTradeGood_search')" -->
           <a-button
-
+            v-if="$hasPermissions('B_foreignTradeGood_search')"
             id="foreignTradeGoods-batchAudit"
             type="primary"
             @click="openGuideModal = true"
@@ -52,7 +51,6 @@
         <s-table
           class="sTable fixPagination"
           ref="table"
-          rowClassName="red-text"
           :style="{ height: tableHeight+70+'px' }"
           size="small"
           :rowKey="(record) => record.no"
@@ -222,7 +220,7 @@ export default {
 }
 </script>
 <style lang="less" scoped>
-/deep/.red-text{
+    /deep/.sTable td{
         white-space: pre-line;
       }
 </style>

+ 2 - 2
src/views/productManagement/productInfo/chooseImportModal.vue

@@ -104,7 +104,7 @@ export default {
         { title: '是否箭冠产品', dataIndex: 'arrow', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '条形码', dataIndex: 'qrCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品尺寸', dataIndex: 'size', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '产品重量', dataIndex: 'weight', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品重量(g)', dataIndex: 'weight', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '颜色', dataIndex: 'color', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '产品内盒尺寸', dataIndex: 'boxSize', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '产品说明', dataIndex: 'description', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -129,7 +129,7 @@ export default {
         { title: '是否箭冠产品', dataIndex: 'arrow', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '条形码', dataIndex: 'qrCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品尺寸', dataIndex: 'size', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '产品重量', dataIndex: 'weight', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品重量(g)', dataIndex: 'weight', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '颜色', dataIndex: 'color', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '产品内盒尺寸', dataIndex: 'boxSize', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '产品说明', dataIndex: 'description', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },

+ 1 - 1
src/views/productManagement/productInfo/detailModal.vue

@@ -37,7 +37,7 @@
         <a-descriptions-item label="单位:">{{ detailsData&&detailsData.unit || '--' }}</a-descriptions-item>
         <a-descriptions-item label="产品尺寸:">{{ detailsData&&detailsData.size || '--' }}</a-descriptions-item>
         <a-descriptions-item label="产品内盒尺寸:">{{ detailsData&&detailsData.boxSize || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="产品重量:">{{ detailsData&&detailsData.weight || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="产品重量(g):">{{ detailsData&&detailsData.weight || '--' }}</a-descriptions-item>
         <a-descriptions-item label="颜色:" span="2">{{ detailsData&&detailsData.color || '--' }}</a-descriptions-item>
         <a-descriptions-item label="产品说明:" span="2">
           <div v-html="detailsData.description" v-if="detailsData&&detailsData.description" style="overflow-y: scroll;height: 300px;"></div>

+ 4 - 8
src/views/productManagement/productInfo/edit.vue

@@ -170,13 +170,9 @@
               </a-form-model-item>
             </a-col>
             <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-              <a-form-model-item label="产品重量" prop="weight">
-                <a-input
-                  v-model.trim="form.weight"
-                  id="productInfoEdit-weight"
-                  :maxLength="50"
-                  allowClear
-                  placeholder="请输入产品重量(最多50个字符)" />
+              <a-form-model-item label="产品重量(g)" prop="weight">
+                  <a-input-number style="width:80%;"  id="productInfoEdit-weight" v-model="form.weight" :min="1" :max="999999" placeholder="请输入产品重量,注意单位为g(正整数)"/>
+                  <span v-if="form.weight">({{form.weight/1000}}kg)</span>
               </a-form-model-item>
             </a-col>
             <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
@@ -264,7 +260,7 @@ export default {
         qrCode: '', // 条形码
         productMsg: '', //  产品图片
         size: '', // 产品尺寸
-        weight: '', // 产品重量
+        weight: undefined, // 产品重量
         color: undefined, // 颜色
         boxSize: '', // 内核尺寸
         description: '', // 产品说明

+ 72 - 107
src/views/reportData/tireSubsidyReport/supplierRebateList.vue

@@ -27,25 +27,25 @@
                   id="sRebateList-monthBox"
                   class="monthBox"
                   :disabled-date="disabledDate"
-                  v-model="monthVal"
+                  v-model="queryParam.queryDate"
                   placeholder="请选择月份"
                   @change="onChangeMonth" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="销售单号">
-                <a-input id="sRebateList-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入销售单号"/>
+                <a-input id="sRebateList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="备货单号">
-                <a-input id="sRebateList-bizNo1" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入备货单号"/>
+                <a-input id="sRebateList-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="客户名称">
-                  <custList id="sRebateList-custName" dataAuthFlag="0" placeholder="请输入客户名称" ref="custList" @change="custChange" />
+                  <custList id="sRebateList-dealerName" dataAuthFlag="0" placeholder="请输入客户名称" ref="custList" @change="custChange" />
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -66,7 +66,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="地区">
-                  <AreaList id="sRebateList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+                  <Area id="sRebateList-provinceSn" v-model="queryParam.provinceSn" placeholder="请选择省份"></Area>
                 </a-form-model-item>
               </a-col>
             </template>
@@ -112,18 +112,18 @@
           :columns="columns"
           :data="loadData"
           :pageSize="30"
-          :scroll="{ y: tableHeight-50}"
+          :scroll="{ x: 2200, y: tableHeight-50}"
           :defaultLoadData="false"
           bordered>
           <template slot="footer">
             <a-row :gutter="15">
-              <a-col :md="6" :sm="24">下推数量:{{ (totalData && (totalData.subsidyServiceAmount || totalData.subsidyServiceAmount==0)) ?totalData.subsidyServiceAmount: '--' }}</a-col>
-              <a-col :md="6" :sm="24" v-if="$hasPermissions('M_tireSubsidyList_salesPrice')">平均成本公斤单价:{{ (totalData && (totalData.subsidyServiceAmount || totalData.subsidyServiceAmount==0)) ? toThousands(totalData.subsidyServiceAmount): '--' }}</a-col>
-              <a-col :md="6" :sm="24" v-if="$hasPermissions('M_tireSubsidyList_salesPrice')">成本金额:{{ (totalData && (totalData.subsidyServiceAmount || totalData.subsidyServiceAmount==0)) ? toThousands(totalData.subsidyServiceAmount): '--' }}</a-col>
-              <a-col :md="6" :sm="24">合计重量:{{ (totalData && (totalData.subsidyServiceAmount || totalData.subsidyServiceAmount==0)) ?totalData.subsidyServiceAmount: '--' }}</a-col>
-              <a-col :md="6" :sm="24" v-if="$hasPermissions('M_tireSubsidyList_salesPrice')">实售金额:{{ (totalData && (totalData.subsidyServiceAmount || totalData.subsidyServiceAmount==0)) ? toThousands(totalData.subsidyServiceAmount): '--' }}</a-col>
-              <a-col :md="6" :sm="24" v-if="$hasPermissions('M_tireSubsidyList_salesPrice')">平均售价公斤单价:{{ (totalData && (totalData.subsidyServiceAmount || totalData.subsidyServiceAmount==0)) ? toThousands(totalData.subsidyServiceAmount): '--' }}</a-col>
-              <a-col :md="6" :sm="24" v-if="$hasPermissions('M_tireSubsidyList_salesPrice')">返利金额:{{ (totalData && (totalData.subsidyServiceAmount || totalData.subsidyServiceAmount==0)) ? toThousands(totalData.subsidyServiceAmount): '--' }}</a-col>
+              <a-col :md="6" :sm="24">下推数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ?totalData.totalQty: '--' }}</a-col>
+              <a-col :md="6" :sm="24" v-if="$hasPermissions('M_tireSubsidyList_costPrice')">平均成本公斤单价:{{ (totalData && (totalData.averageCost || totalData.averageCost==0)) ? toThousands(totalData.averageCost): '--' }}</a-col>
+              <a-col :md="6" :sm="24" v-if="$hasPermissions('M_tireSubsidyList_costPrice')">成本金额:{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost): '--' }}</a-col>
+              <a-col :md="6" :sm="24">合计重量(kg):{{ (totalData && (totalData.totalWeight || totalData.totalWeight==0)) ?totalData.totalWeight: '--' }}</a-col>
+              <a-col :md="6" :sm="24" v-if="$hasPermissions('M_tireSubsidyList_salesPrice')">实售金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? toThousands(totalData.totalRealAmount): '--' }}</a-col>
+              <a-col :md="6" :sm="24" v-if="$hasPermissions('M_tireSubsidyList_salesPrice')">平均售价公斤单价:{{ (totalData && (totalData.averageRealAmount || totalData.averageRealAmount==0)) ? toThousands(totalData.averageRealAmount): '--' }}</a-col>
+              <a-col :md="6" :sm="24" v-if="$hasPermissions('M_tireSubsidyList_costPrice')">返利金额:{{ (totalData && (totalData.totalFactoryRebate || totalData.totalFactoryRebate==0)) ? toThousands(totalData.totalFactoryRebate): '--' }}</a-col>
             </a-row>
           </template>
         </s-table>
@@ -136,60 +136,53 @@
 import { commonMixin } from '@/utils/mixin'
 import { hdExportExcel } from '@/libs/exportExcel'
 import moment from 'moment'
-import getDate from '@/libs/getDate.js'
 // 组件
 import { STable, VSelect } from '@/components'
-import rangeDate from '@/views/common/rangeDate.vue'
 import subarea from '@/views/common/subarea.js'
-import AreaList from '@/views/common/areaList.js'
+import Area from '@/views/common/area.js'
 import custList from '@/views/common/custList.vue'
 // 接口
-import { subsidyDetailList, subsidyDetailCount, subsidyDetailExport } from '@/api/reportData'
+import { subsidyTireList, subsidyTireCount, subsidyTireExport } from '@/api/reportData'
 export default {
-  name: 'ServiceFreightDetailList',
+  name: 'SupplierRebateList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, AreaList, custList },
+  components: { STable, VSelect, subarea, Area, custList },
   data () {
     return {
       spinning: false,
       disabled: false, //  查询、重置按钮是否可操作
-      advanced: false, // 高级搜索 展开/关闭
+      advanced: true, // 高级搜索 展开/关闭
       tableHeight: 0, // 表格高度
       exportLoading: false, // 导出按钮加载状态
-      monthVal: moment().format('YYYY-MM'), // 初始化月份值
       //  查询条件
       queryParam: {
+        beginDate: moment().startOf('month').format('YYYY-MM-DD') + ' 00:00:00', // 开始月份
+        endDate: moment().endOf('month').format('YYYY-MM-DD') + ' 23:59:59', // 结束月份
         queryDate: moment().format('YYYY-MM'), // 选择月份
-        bizNo: undefined, // 业务单号
-        bizType: undefined, // 业务类型
-        belongProvinceFlag: undefined, // 是否轮胎省仓
+        salesBillNo: undefined, // 销售单号
+        dispatchBillNo: undefined, // 备货单号
         subareaArea: {
           subareaSn: undefined, // 区域
           subareaAreaSn: undefined // 分区
         },
-        dealer: {
-          provinceSn: undefined,
-          citySn: undefined,
-          districtSn: undefined
-        },
-        belongDealerSn: undefined,
-        transferDealerSn: undefined,
-        bizDealerSn: undefined
+        provinceSn: undefined, // 省份sn
+        dealerName: undefined, // 客户名称
+        dealerSn: undefined, // 客户名称sn
+        dealerLevel: undefined// 客户等级
       },
       totalData: null, // 合计
-      showOutDetail: false, // 出库明细弹窗
       rules: {
-        'time': [{ required: true, message: '请选择查询日期', trigger: 'change' }]
+        'queryDate': [{ required: true, message: '请选择查询月份', trigger: 'change' }]
       },
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        const oldParams = Object.assign(parameter, this.queryParam)
-        const params = JSON.parse(JSON.stringify(oldParams))
-        delete params.time
+        const params = Object.assign(parameter, this.queryParam)
+        const newParams = JSON.parse(JSON.stringify(params))
+        delete newParams.queryDate
         // 获取列表数据  有分页
-        return subsidyDetailList(params).then(res => {
+        return subsidyTireList(newParams).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -200,7 +193,7 @@ export default {
             }
             this.disabled = false
             // 获取统计数据
-            this.getCount(params)
+            this.getCount(newParams)
           }
           this.spinning = false
           return data
@@ -226,25 +219,29 @@ export default {
         { title: '序号', dataIndex: 'no', width: '40px', align: 'center' },
         { title: '区域', dataIndex: 'subareaArea.subareaName', width: '90px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '90px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售单号', dataIndex: 'bizNo', width: '90px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '备货单号', dataIndex: 'bizNo1', width: '90px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '销售单号', dataIndex: 'salesBillNo', width: '110px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '备货单号', dataIndex: 'dispatchBillNo', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '省份', dataIndex: 'provinceName', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'bizDealerName', width: '150px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '客户级别', dataIndex: 'dealerLevel', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '下推时间', dataIndex: 'belongProvinceFlagDictValue', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '下推数量', dataIndex: 'bizQty3', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单重(kg)', dataIndex: 'bizQty2', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '合计重量', dataIndex: 'bizQty1', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '成本金额', dataIndex: 'subsidyServiceDiff1', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text * 100) + '%' : '--') } },
-        { title: '平均成本公斤单价', dataIndex: 'subsidyShippingDiff', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '实售金额', dataIndex: 'subsidyShippingAmount', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '平均售价公斤单价', dataIndex: 'subsidyShippingAmount', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '返利金额', dataIndex: 'subsidyShippingAmount', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+        { title: '客户名称', dataIndex: 'dealerName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户级别', dataIndex: 'dealerLevelDictValue', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '下推时间', dataIndex: 'pushedDate', width: '110px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '下推数量', dataIndex: 'totalQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单重(kg)', dataIndex: 'weight', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '合计重量(kg)', dataIndex: 'totalWeight', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
-      // if (_this.$hasPermissions('M_tireSubsidyList_salesPrice')) {
-      //   arr.splice(8, 0, { title: '销售金额', dataIndex: 'bizAmount', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-      //   arr.splice(10, 0, { title: '服务费金额', dataIndex: 'subsidyServiceAmount', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-      // }
+      // 成本权限
+      if (_this.$hasPermissions('M_tireSubsidyList_costPrice')) {
+        arr.push({ title: '成本金额', dataIndex: 'totalCost', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.push({ title: '平均成本公斤单价', dataIndex: 'averageCost', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+      }
+      // 售价权限
+      if (_this.$hasPermissions('M_tireSubsidyList_salesPrice')) {
+        arr.push({ title: '实售金额', dataIndex: 'totalRealAmount', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice({ title: '平均售价公斤单价', dataIndex: 'averageRealAmount', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+      }
+      if (_this.$hasPermissions('M_tireSubsidyList_costPrice')) {
+        arr.push({ title: '返利金额', dataIndex: 'totalFactoryRebate', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+      }
       return arr
     }
   },
@@ -257,9 +254,11 @@ export default {
     onChangeMonth (date, dateString) {
       this.monthVal = dateString
       if (date && dateString != '') {
-        this.queryParam.queryDate = dateString
+        this.queryParam.beginDate = moment(dateString).startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
+        this.queryParam.endDate = moment(dateString).endOf('month').format('YYYY-MM-DD') + ' 23:59:59'
       } else {
-        this.queryParam.queryDate = void 0
+        this.queryParam.beginDate = void 0
+        this.queryParam.endDate = void 0
       }
     },
     // 查询
@@ -269,36 +268,19 @@ export default {
         if (valid) {
           _this.$refs.table.refresh(true)
         } else {
-          _this.$message.error('请选择查询时间')
+          _this.$message.error('请选择查询月份')
           return false
         }
       })
     },
-    //  日期选择  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]
-    },
-    // 选择发货经销商
-    custTireChange (val) {
-      this.queryParam.transferDealerSn = val.key
-    },
-    // 记账主体
-    belongDealerChange (val) {
-      this.queryParam.belongDealerSn = val.key
-    },
     // 客户名称 change
     custChange (val) {
-      this.queryParam.bizDealerSn = val.key
+      this.queryParam.dealerSn = val.key
+      this.queryParam.dealerName = val && val.label ? val.label.replace(/\s+/g, '') : undefined
     },
     // 统计
     getCount (params) {
-      subsidyDetailCount(params).then(res => {
+      subsidyTireCount(params).then(res => {
         if (res.status == 200 && res.data) {
           this.totalData = res.data
         } else {
@@ -306,12 +288,6 @@ export default {
         }
       })
     },
-    // 地区省份
-    areaChange (val) {
-      this.queryParam.dealer.provinceSn = val[0] ? val[0] : undefined
-      this.queryParam.dealer.citySn = val[1] ? val[1] : undefined
-      this.queryParam.dealer.districtSn = val[2] ? val[2] : undefined
-    },
     // 区域分区  change
     subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
@@ -319,30 +295,19 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.queryParam.time = [
-        moment(getDate.getCurrMonthDays().starttime, 'YYYY-MM-DD'),
-        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
-      ]
-      this.$refs.rangeDate.resetDate(this.queryParam.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
-      this.queryParam.bizNo = undefined
-      this.queryParam.bizType = undefined
-      this.queryParam.belongDealerSn = undefined
-      this.queryParam.transferDealerSn = undefined
-      this.queryParam.bizDealerSn = undefined
-      this.queryParam.belongProvinceFlag = undefined
-      this.queryParam.dealer.provinceSn = undefined
-      this.queryParam.dealer.citySn = undefined
-      this.queryParam.dealer.districtSn = undefined
+      this.queryParam.beginDate = moment().startOf('month').format('YYYY-MM-DD') + ' 00:00:00' // 开始月份
+      this.queryParam.endDate = moment().endOf('month').format('YYYY-MM-DD') + ' 23:59:59' // 结束月份
+      this.queryParam.queryDate = moment().format('YYYY-MM')// 选择月份
+      this.queryParam.salesBillNo = undefined
+      this.queryParam.dispatchBillNo = undefined
       this.queryParam.subareaArea.subareaSn = undefined
-      this.queryParam.subareaArea.subareaAreaSn = undefined
-      this.$refs.belongDealer.resetForm()
+      this.queryParam.provinceSn = undefined
+      this.queryParam.dealerName = undefined
+      this.queryParam.dealerSn = undefined
+      this.queryParam.dealerLevel = undefined
       if (this.advanced) {
-        this.$refs.dealerTireScopeList.resetForm()
         this.$refs.custList.resetForm()
         this.$refs.subarea.clearData()
-        this.$refs.areaList.clearData()
       }
       this.totalData = null
       this.$refs.table.clearTable()
@@ -355,7 +320,7 @@ export default {
         if (valid) {
           _this.exportList()
         } else {
-          _this.$message.error('请选择查询时间')
+          _this.$message.error('请选择查询月份')
           return false
         }
       })
@@ -367,7 +332,7 @@ export default {
       _this.$store.state.app.curActionPermission = 'M_tireSubsidyExport'
       _this.exportLoading = true
       _this.spinning = true
-      hdExportExcel(subsidyDetailExport, params, '轮胎服务费运费明细报表-', function () {
+      hdExportExcel(subsidyTireExport, params, '供应商轮胎补贴返利报表-', function () {
         _this.exportLoading = false
         _this.spinning = false
         _this.$store.state.app.curActionPermission = ''

+ 2 - 2
src/views/salesManagement/pushOrderManagement/detail.vue

@@ -106,7 +106,7 @@
               本次下推市级价金额:<strong>{{ detailData&&(detailData.totalCityAmount || detailData.totalCityAmount==0) ? toThousands(detailData.totalCityAmount) : '--' }}</strong>;
             </span>
             <span v-if="$route.params.type!='stockOut'&&$hasPermissions('B_dispatchDetail_cityPrice')">
-              合计重量:<strong>{{ detailData&&(detailData.totalCityAmount || detailData.totalCityAmount==0) ? detailData.totalCityAmount : '--' }}</strong>;
+              合计重量(kg):<strong>{{ detailData&&(detailData.totalWeight || detailData.totalWeight==0) ? detailData.totalWeight/1000 : '--' }}</strong>;
             </span>
           </div>
         </a-alert>
@@ -239,7 +239,7 @@ export default {
         // { title: '市级销售价格', dataIndex: 'cityPrice', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '销售数量', dataIndex: 'salesQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '本次下推数', dataIndex: 'qty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '合计重量', dataIndex: 'qty1', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '合计重量(kg)', dataIndex: 'totalWeight', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
         // { title: '本次下推金额', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       if (this.$hasPermissions('B_dispatchDetail_salesPrice')) { //  售价权限

+ 9 - 7
src/views/salesManagement/salesQueryNew/detail.vue

@@ -72,26 +72,28 @@
         <a-alert type="info" style="margin-bottom: 10px;">
           <div slot="message">
             <div>
+              <span v-if="$hasPermissions(authCode + '_costPrice')">总成本:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost) : '--' }}</strong>;</span>
               总销售数量:<strong>{{ detailData&&(detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--' }}</strong>;
               已取消数量:<strong>{{ detailData&&(detailData.totalCancelQty || detailData.totalCancelQty==0) ? detailData.totalCancelQty : '--' }}</strong>;
               已下推数量:<strong>{{ detailData&&(detailData.totalPushedQty || detailData.totalPushedQty==0) ? detailData.totalPushedQty : '--' }}</strong>;
               待下推数量:<strong>{{ detailData&&(detailData.totalUnpushedQty || detailData.totalUnpushedQty==0) ? detailData.totalUnpushedQty : '--' }}</strong>;
               已发货数量:<strong>{{ detailData&&(detailData.totalDispatchQty || detailData.totalDispatchQty==0) ? detailData.totalDispatchQty : '--' }}</strong>;
-              待发货数量:<strong>{{ detailData&&(detailData.totalUndispatchQty || detailData.totalUndispatchQty==0) ? detailData.totalUndispatchQty : '--' }}</strong>;<br/>
-              <span v-if="$hasPermissions(authCode + '_salesPrice')">总售价:<strong>{{ detailData&&(detailData.totalAmount || detailData.totalAmount==0) ? toThousands(detailData.totalAmount) : '--' }}</strong>;</span>
-              <span v-if="$hasPermissions(authCode + '_costPrice')">总成本:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost) : '--' }}</strong>;</span>
+              待发货数量:<strong>{{ detailData&&(detailData.totalUndispatchQty || detailData.totalUndispatchQty==0) ? detailData.totalUndispatchQty : '--' }}</strong>;
+              单重:<strong>{{ detailData&&(detailData.weight || detailData.weight==0) ? detailData.weight : '--' }}</strong>;
+              <span>平均成本公斤单价:<strong>{{ detailData&&(detailData.averageCost || detailData.averageCost==0) ? toThousands(detailData.averageCost) : '--' }}</strong>;</span>
+              <span v-if="isCityPrice">市级总售价:<strong>{{ detailData&&(detailData.totalCityAmount || detailData.totalCityAmount==0) ? toThousands(detailData.totalCityAmount) : '--' }}</strong>;</span>
+              <br/>
               <span v-if="$hasPermissions(authCode + '_costPrice')">总毛利:<strong>{{ detailData&&(detailData.grossProfit || detailData.grossProfit==0) ? toThousands(detailData.grossProfit) : '--' }}</strong>;</span>
+              <span v-if="$hasPermissions(authCode + '_salesPrice')">总售价:<strong>{{ detailData&&(detailData.totalAmount || detailData.totalAmount==0) ? toThousands(detailData.totalAmount) : '--' }}</strong>;</span>
               <span v-if="$hasPermissions(authCode + '_salesPrice')">已取消金额:<strong>{{ detailData&&(detailData.totalCancelAmount || detailData.totalCancelAmount==0) ? toThousands(detailData.totalCancelAmount) : '--' }}</strong>;</span>
               <span v-if="$hasPermissions(authCode + '_salesPrice')">已下推金额:<strong>{{ detailData&&(detailData.totalPushedAmount || detailData.totalPushedAmount==0) ? toThousands(detailData.totalPushedAmount) : '--' }}</strong>;</span>
               <span v-if="$hasPermissions(authCode + '_salesPrice')">待下推金额:<strong>{{ detailData&&(detailData.totalUnpushedAmount || detailData.totalUnpushedAmount==0) ? toThousands(detailData.totalUnpushedAmount) : '--' }}</strong>;</span>
               <span v-if="$hasPermissions(authCode + '_salesPrice')">已发货金额:<strong>{{ detailData&&(detailData.totalDispatchAmount || detailData.totalDispatchAmount==0) ? toThousands(detailData.totalDispatchAmount) : '--' }}</strong>;</span>
               <span v-if="$hasPermissions(authCode + '_salesPrice')">待发货金额:<strong>{{ detailData&&(detailData.totalUndispatchAmount || detailData.totalUndispatchAmount==0) ? toThousands(detailData.totalUndispatchAmount) : '--' }}</strong>;</span>
-              <span v-if="isCityPrice">市级总售价:<strong>{{ detailData&&(detailData.totalCityAmount || detailData.totalCityAmount==0) ? toThousands(detailData.totalCityAmount) : '--' }}</strong>;</span>
+              <span>合计重量(kg):<strong>{{ detailData&&(detailData.totalWeight || detailData.totalWeight==0) ? detailData.totalWeight : '--' }}</strong>;</span>
+              <span>平均售价公斤单价:<strong>{{ detailData&&(detailData.averageRealAmount || detailData.averageRealAmount==0) ? toThousands(detailData.averageRealAmount) : '--' }}</strong>;</span>
               <span v-if="$hasPermissions(authCode + '_salesPrice')&&detailData&&detailData.totalDiscountAmount" style="color: red;">优惠金额:<strong>{{ Number(detailData.totalDiscountAmount).toFixed(2) }}</strong>;</span>
               <span v-if="$hasPermissions(authCode + '_salesPrice')&&detailData&&detailData.totalConvertPromoGiftsAmount" style="color: red;">促销产品转采购额金额:<strong>{{ Number(detailData.totalConvertPromoGiftsAmount).toFixed(2) }}</strong>;</span>
-              <span>合计重量:<strong>{{ detailData&&(detailData.totalUndispatchAmount || detailData.totalUndispatchAmount==0) ? toThousands(detailData.totalUndispatchAmount) : '--' }}</strong>;</span>
-              <span>平均成本公斤单价:<strong>{{ detailData&&(detailData.totalUndispatchAmount || detailData.totalUndispatchAmount==0) ? toThousands(detailData.totalUndispatchAmount) : '--' }}</strong>;</span>
-              <span>平均售价公斤单价:<strong>{{ detailData&&(detailData.totalUndispatchAmount || detailData.totalUndispatchAmount==0) ? toThousands(detailData.totalUndispatchAmount) : '--' }}</strong>;</span>
             </div>
           </div>
         </a-alert>

+ 3 - 3
src/views/salesManagement/salesQueryNew/detailAll.vue

@@ -83,9 +83,9 @@
               <span v-if="$hasPermissions(authCode + '_salesPrice')">待发货金额:<strong>{{ detailData&&(detailData.totalUndispatchAmount || detailData.totalUndispatchAmount==0) ? toThousands(detailData.totalUndispatchAmount) : '--' }}</strong>;</span>
               <span v-if="isCityPrice">市级总售价:<strong>{{ detailData&&(detailData.totalCityAmount || detailData.totalCityAmount==0) ? toThousands(detailData.totalCityAmount) : '--' }}</strong>;</span>
               <span v-if="$hasPermissions(authCode + '_salesPrice')&&detailData&&detailData.totalDiscountAmount" style="color: red;">优惠金额:<strong>{{ toThousands(detailData.totalDiscountAmount) }}</strong>;</span>
-              <span>合计重量:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost) : '--' }}</strong>;</span>
-              <span>平均成本公斤单价:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost) : '--' }}</strong>;</span>
-              <span>平均售价公斤单价:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost) : '--' }}</strong>;</span>
+              <span>合计重量(kg):<strong>{{ detailData&&(detailData.totalWeight || detailData.totalWeight==0) ? detailData.totalWeight/1000 : '--' }}</strong>;</span>
+              <span>平均成本公斤单价:<strong>{{ detailData&&(detailData.averageCost || detailData.averageCost==0) ? toThousands(detailData.averageCost) : '--' }}</strong>;</span>
+              <span>平均售价公斤单价:<strong>{{ detailData&&(detailData.averageRealAmount || detailData.averageRealAmount==0) ? toThousands(detailData.averageRealAmount) : '--' }}</strong>;</span>
             </div>
           </div>
         </a-alert>