|
@@ -3,14 +3,8 @@
|
|
|
<a-card size="small" :bordered="false" class="tireSalesReportList-wrap searchBox">
|
|
|
<!-- 搜索条件 -->
|
|
|
<div class="table-page-search-wrapper" ref="tableSearch">
|
|
|
- <a-form-model
|
|
|
- id="tireSalesReportList-form"
|
|
|
- ref="ruleForm"
|
|
|
- class="form-model-con"
|
|
|
- layout="inline"
|
|
|
- :model="queryParam"
|
|
|
- :rules="rules"
|
|
|
- @keyup.enter.native="handleSearch">
|
|
|
+ <a-form-model id="tireSalesReportList-form" ref="ruleForm" class="form-model-con" layout="inline"
|
|
|
+ :model="queryParam" :rules="rules" @keyup.enter.native="handleSearch">
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="审核时间">
|
|
@@ -19,71 +13,61 @@
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="业务单号">
|
|
|
- <a-input id="productSourceList-bizCode" v-model.trim="queryParam.bizCode" allowClear placeholder="请输入业务单号"/>
|
|
|
+ <a-input id="productSourceList-bizCode" v-model.trim="queryParam.bizCode" allowClear
|
|
|
+ placeholder="请输入业务单号" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="产品编码">
|
|
|
- <a-input id="productSourceList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
|
|
|
+ <a-input id="productSourceList-productCode" v-model.trim="queryParam.productCode" allowClear
|
|
|
+ placeholder="请输入产品编码" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="唯一码">
|
|
|
- <a-input id="productSourceList-traceCode" v-model.trim="queryParam.traceCode" allowClear placeholder="请输入唯一码"/>
|
|
|
+ <a-input id="productSourceList-traceCode" v-model.trim="queryParam.traceCode" allowClear
|
|
|
+ placeholder="请输入唯一码" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<template v-if="advanced">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="单据类型">
|
|
|
+ <a-select @change="handleBizStatus" v-model="queryParam.bizStatus" placeholder="请选择单据类型" allowClear>
|
|
|
+ <a-select-option value="XS">
|
|
|
+ 销售单
|
|
|
+ </a-select-option>
|
|
|
+ <a-select-option value="DB">
|
|
|
+ 调拨单
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="产品名称">
|
|
|
- <a-input id="productSourceList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
|
|
|
+ <a-input id="productSourceList-productName" v-model.trim="queryParam.productName" allowClear
|
|
|
+ placeholder="请输入产品名称" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="客户名称">
|
|
|
- <a-input
|
|
|
- id="productSourceList-buyerName"
|
|
|
- v-model.trim="queryParam.buyerName"
|
|
|
- allowClear
|
|
|
+ <a-input id="productSourceList-buyerName" v-model.trim="queryParam.buyerName" allowClear
|
|
|
placeholder="请输入客户名称" />
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="当前所在客户">
|
|
|
- <a-input id="productSourceList-productOrigCode" v-model.trim="queryParam.productOrigCode" allowClear placeholder="请输入客户名称"/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="质保状态">
|
|
|
- <v-select
|
|
|
- v-model="queryParam.dealerLevel"
|
|
|
- ref="dealerLevel"
|
|
|
- id="productSourceList-dealerLevel"
|
|
|
- code="DEALER_LEVEL"
|
|
|
- placeholder="请选择业务状态"
|
|
|
- allowClear></v-select>
|
|
|
+ <v-select v-model="queryParam.dealerLevel" ref="dealerLevel" id="productSourceList-dealerLevel"
|
|
|
+ code="DEALER_LEVEL" placeholder="请选择业务状态" allowClear></v-select>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
|
<a-col :md="24" :sm="24" style="text-align: center;">
|
|
|
- <a-button
|
|
|
- style="margin-left: 5px"
|
|
|
- type="primary"
|
|
|
- @click="handleSearch"
|
|
|
- :disabled="disabled"
|
|
|
+ <a-button style="margin-left: 5px" type="primary" @click="handleSearch" :disabled="disabled"
|
|
|
id="productSourceList-refresh">查询</a-button>
|
|
|
- <a-button
|
|
|
- style="margin-left: 8px"
|
|
|
- @click="resetSearchForm"
|
|
|
- :disabled="disabled"
|
|
|
+ <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled"
|
|
|
id="productSourceList-reset">重置</a-button>
|
|
|
- <a-button
|
|
|
- style="margin-left: 10px"
|
|
|
- type="primary"
|
|
|
- class="button-warning"
|
|
|
- @click="handleExport"
|
|
|
- :disabled="disabled"
|
|
|
- :loading="exportLoading"
|
|
|
- v-if="$hasPermissions('B_salesOrderTotalExport')"
|
|
|
+ <a-button style="margin-left: 10px" type="primary" class="button-warning" @click="handleExport"
|
|
|
+ :disabled="disabled" :loading="exportLoading" v-if="$hasPermissions('B_salesOrderTotalExport')"
|
|
|
id="productSourceList-export">导出</a-button>
|
|
|
<a @click="advanced=!advanced" style="margin-left: 5px">
|
|
|
{{ advanced ? '收起' : '展开' }}
|
|
@@ -98,37 +82,20 @@
|
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
|
<!-- 统计 -->
|
|
|
<div style="display:flex;align-items:center;margin-bottom:10px;">
|
|
|
- <a-button
|
|
|
- type="primary"
|
|
|
- id="outboundOrder-export"
|
|
|
- :loading="loading"
|
|
|
+ <a-button type="primary" id="outboundOrder-export" :loading="loading"
|
|
|
@click="openGuideModal = true">导入</a-button>
|
|
|
<div class="tongji-bar" style="margin-left:10px;">
|
|
|
- 产品总款数:<strong>{{ totalData&&(totalData.totalCategory || totalData.totalCategory==0) ? totalData.totalCategory : '0' }}</strong>;
|
|
|
- 产品总数量:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
|
|
|
+ 产品总款数:<strong>{{ totalData&&(totalData.productTypeNum || totalData.productTypeNum==0) ? totalData.productTypeNum : '0' }}</strong>;
|
|
|
+ 产品总数量:<strong>{{ totalData&&(totalData.productNum || totalData.productNum==0) ? totalData.productNum : '--' }}</strong>;
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 列表 -->
|
|
|
- <s-table
|
|
|
- class="sTable fixPagination"
|
|
|
- ref="table"
|
|
|
- size="small"
|
|
|
- :rowKey="(record) => record.salesBillNo"
|
|
|
- :style="{ height: tableHeight+70+'px' }"
|
|
|
- rowKeyName="salesBillNo"
|
|
|
- :columns="columns"
|
|
|
- :data="loadData"
|
|
|
- :scroll="{ y: tableHeight-10 }"
|
|
|
- :defaultLoadData="false"
|
|
|
- bordered>
|
|
|
+ <s-table class="sTable fixPagination" ref="table" size="small" :rowKey="(record) => record.salesBillNo"
|
|
|
+ :style="{ height: tableHeight+70+'px' }" rowKeyName="salesBillNo" :columns="columns" :data="loadData"
|
|
|
+ :scroll="{ y: tableHeight-10 }" :defaultLoadData="false" bordered>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- class="button-warning"
|
|
|
- @click="openInfoModal = true"
|
|
|
- >质保信息</a-button>
|
|
|
+ <a-button size="small" type="link" class="button-warning" @click="openInfoModal = true">质保信息</a-button>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</a-spin>
|
|
@@ -141,244 +108,333 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {
|
|
|
- commonMixin
|
|
|
-} from '@/utils/mixin'
|
|
|
-import getDate from '@/libs/getDate.js'
|
|
|
-import {
|
|
|
- STable,
|
|
|
- VSelect
|
|
|
-} from '@/components'
|
|
|
-import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
-import custList from '@/views/common/custList.vue'
|
|
|
-import reportModal from '@/views/common/reportModal.vue'
|
|
|
-import AreaList from '@/views/common/areaList.js'
|
|
|
-import warrantyInfoModal from './warrantyInfoModal.vue'
|
|
|
-import importGuideModal from './importGuideModal.vue'
|
|
|
-import {
|
|
|
- hdExportExcel
|
|
|
-} from '@/libs/exportExcel'
|
|
|
-import {
|
|
|
- userQueryList
|
|
|
-} from '@/api/power-user'
|
|
|
-import {
|
|
|
- traceCodeInsertBatch,
|
|
|
- reportSalesBillCount,
|
|
|
- reportSalesBillExport,
|
|
|
- traceCodeList
|
|
|
-} from '@/api/reportData'
|
|
|
-export default {
|
|
|
- name: 'ProductSourceList',
|
|
|
- mixins: [commonMixin],
|
|
|
- components: {
|
|
|
+ import {
|
|
|
+ commonMixin
|
|
|
+ } from '@/utils/mixin'
|
|
|
+ import getDate from '@/libs/getDate.js'
|
|
|
+ import {
|
|
|
STable,
|
|
|
- VSelect,
|
|
|
- rangeDate,
|
|
|
- custList,
|
|
|
- reportModal,
|
|
|
- AreaList,
|
|
|
- warrantyInfoModal,
|
|
|
- importGuideModal
|
|
|
- },
|
|
|
- data () {
|
|
|
- return {
|
|
|
- loading: false,
|
|
|
- spinning: false,
|
|
|
- advanced: true, // 高级搜索 展开/关闭
|
|
|
- tableHeight: 0,
|
|
|
- showExport: false,
|
|
|
- isReturnedTires: false,
|
|
|
- time: [
|
|
|
- getDate.getCurrMonthDays().starttime,
|
|
|
- getDate.getCurrMonthDays().endtime
|
|
|
- ],
|
|
|
- queryParam: { // 查询条件
|
|
|
- beginDate: getDate.getCurrMonthDays().starttime,
|
|
|
- endDate: getDate.getCurrMonthDays().endtime,
|
|
|
- productCode: '',
|
|
|
- productName: '',
|
|
|
- bizCode: undefined,
|
|
|
- traceCode: undefined,
|
|
|
- buyerName: undefined
|
|
|
- },
|
|
|
- openInfoModal: false, // 质保信息弹窗
|
|
|
- openRecordModal: false, // 流转记录弹窗
|
|
|
- columns: [
|
|
|
- { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
|
- { title: '业务单号', dataIndex: 'bizCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '审核时间', dataIndex: 'auditDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '导入时间', dataIndex: 'importDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品编码', dataIndex: 'productCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '唯一码', dataIndex: 'traceCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品名称', dataIndex: 'productName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '客户名称', dataIndex: 'buyerName', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '质保状态', dataIndex: 'giftQty4', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '质保时间', dataIndex: 'giftQty3', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
|
|
|
- ],
|
|
|
-
|
|
|
- disabled: false, // 查询、重置按钮是否可操作
|
|
|
- exportLoading: false,
|
|
|
- // 加载数据方法 必须为 Promise 对象
|
|
|
- loadData: parameter => {
|
|
|
- this.disabled = true
|
|
|
- this.spinning = true
|
|
|
- const params = Object.assign(parameter, this.queryParam)
|
|
|
- return traceCodeList(params).then(res => {
|
|
|
- let data
|
|
|
- if (res.status == 200) {
|
|
|
- data = res.data
|
|
|
- this.getCount(params)
|
|
|
- const no = (data.pageNo - 1) * data.pageSize
|
|
|
- for (var i = 0; i < data.list.length; i++) {
|
|
|
- data.list[i].no = no + i + 1
|
|
|
+ VSelect
|
|
|
+ } from '@/components'
|
|
|
+ import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
+ import custList from '@/views/common/custList.vue'
|
|
|
+ import reportModal from '@/views/common/reportModal.vue'
|
|
|
+ import AreaList from '@/views/common/areaList.js'
|
|
|
+ import warrantyInfoModal from './warrantyInfoModal.vue'
|
|
|
+ import importGuideModal from './importGuideModal.vue'
|
|
|
+ import {
|
|
|
+ hdExportExcel
|
|
|
+ } from '@/libs/exportExcel'
|
|
|
+ import {
|
|
|
+ userQueryList
|
|
|
+ } from '@/api/power-user'
|
|
|
+ import {
|
|
|
+ traceCodeInsertBatch,
|
|
|
+ traceCodeQueryCount,
|
|
|
+ reportSalesBillExport,
|
|
|
+ traceCodeList
|
|
|
+ } from '@/api/reportData'
|
|
|
+ export default {
|
|
|
+ name: 'ProductSourceList',
|
|
|
+ mixins: [commonMixin],
|
|
|
+ components: {
|
|
|
+ STable,
|
|
|
+ VSelect,
|
|
|
+ rangeDate,
|
|
|
+ custList,
|
|
|
+ reportModal,
|
|
|
+ AreaList,
|
|
|
+ warrantyInfoModal,
|
|
|
+ importGuideModal
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ loading: false,
|
|
|
+ spinning: false,
|
|
|
+ advanced: true, // 高级搜索 展开/关闭
|
|
|
+ tableHeight: 0,
|
|
|
+ showExport: false,
|
|
|
+ isReturnedTires: false,
|
|
|
+ time: [
|
|
|
+ getDate.getCurrMonthDays().starttime,
|
|
|
+ getDate.getCurrMonthDays().endtime
|
|
|
+ ],
|
|
|
+ queryParam: { // 查询条件
|
|
|
+ beginDate: getDate.getCurrMonthDays().starttime,
|
|
|
+ endDate: getDate.getCurrMonthDays().endtime,
|
|
|
+ productCode: '',
|
|
|
+ productName: '',
|
|
|
+ bizCode: undefined,
|
|
|
+ traceCode: undefined,
|
|
|
+ buyerName: undefined,
|
|
|
+ bizStatus: undefined
|
|
|
+ },
|
|
|
+ openInfoModal: false, // 质保信息弹窗
|
|
|
+ openRecordModal: false, // 流转记录弹窗
|
|
|
+ columns: [{
|
|
|
+ title: '序号',
|
|
|
+ dataIndex: 'no',
|
|
|
+ width: '5%',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '业务单号',
|
|
|
+ dataIndex: 'bizCode',
|
|
|
+ width: '10%',
|
|
|
+ align: 'center',
|
|
|
+ customRender: function(text) {
|
|
|
+ return text || '--'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '审核时间',
|
|
|
+ dataIndex: 'auditDate',
|
|
|
+ width: '10%',
|
|
|
+ align: 'center',
|
|
|
+ customRender: function(text) {
|
|
|
+ return text || '--'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '导入时间',
|
|
|
+ dataIndex: 'importDate',
|
|
|
+ width: '10%',
|
|
|
+ align: 'center',
|
|
|
+ customRender: function(text) {
|
|
|
+ return text || '--'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '产品编码',
|
|
|
+ dataIndex: 'productCode',
|
|
|
+ width: '10%',
|
|
|
+ align: 'center',
|
|
|
+ customRender: function(text) {
|
|
|
+ return text || '--'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '唯一码',
|
|
|
+ dataIndex: 'traceCode',
|
|
|
+ width: '10%',
|
|
|
+ align: 'center',
|
|
|
+ customRender: function(text) {
|
|
|
+ return text || '--'
|
|
|
}
|
|
|
- this.disabled = false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '产品名称',
|
|
|
+ dataIndex: 'productName',
|
|
|
+ width: '15%',
|
|
|
+ align: 'center',
|
|
|
+ customRender: function(text) {
|
|
|
+ return text || '--'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '客户名称',
|
|
|
+ dataIndex: 'buyerName',
|
|
|
+ width: '15%',
|
|
|
+ align: 'center',
|
|
|
+ customRender: function(text) {
|
|
|
+ return text || '--'
|
|
|
+ },
|
|
|
+ ellipsis: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '质保状态',
|
|
|
+ dataIndex: 'giftQty4',
|
|
|
+ width: '10%',
|
|
|
+ align: 'center',
|
|
|
+ customRender: function(text) {
|
|
|
+ return text || '--'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '质保时间',
|
|
|
+ dataIndex: 'giftQty3',
|
|
|
+ width: '10%',
|
|
|
+ align: 'center',
|
|
|
+ customRender: function(text) {
|
|
|
+ return text || '--'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ scopedSlots: {
|
|
|
+ customRender: 'action'
|
|
|
+ },
|
|
|
+ width: '12%',
|
|
|
+ align: 'center'
|
|
|
}
|
|
|
- this.spinning = false
|
|
|
- return data
|
|
|
+ ],
|
|
|
+
|
|
|
+ disabled: false, // 查询、重置按钮是否可操作
|
|
|
+ exportLoading: false,
|
|
|
+ // 加载数据方法 必须为 Promise 对象
|
|
|
+ loadData: parameter => {
|
|
|
+ this.disabled = true
|
|
|
+ this.spinning = true
|
|
|
+ const params = Object.assign(parameter, this.queryParam)
|
|
|
+ return traceCodeList(params).then(res => {
|
|
|
+ let data
|
|
|
+ if (res.status == 200) {
|
|
|
+ data = res.data
|
|
|
+ this.getCount(params)
|
|
|
+ const no = (data.pageNo - 1) * data.pageSize
|
|
|
+ for (var i = 0; i < data.list.length; i++) {
|
|
|
+ data.list[i].no = no + i + 1
|
|
|
+ }
|
|
|
+ this.disabled = false
|
|
|
+ }
|
|
|
+ this.spinning = false
|
|
|
+ return data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ totalData: null,
|
|
|
+ operatorList: [], // 操作员下拉数据
|
|
|
+ addrProvinceList: [], // 省下拉
|
|
|
+ openGuideModal: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ advanced(newValue, oldValue) {
|
|
|
+ const _this = this
|
|
|
+ this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
+ _this.setTableH()
|
|
|
})
|
|
|
},
|
|
|
- totalData: null,
|
|
|
- operatorList: [], // 操作员下拉数据
|
|
|
- addrProvinceList: [], // 省下拉
|
|
|
- openGuideModal: false
|
|
|
- }
|
|
|
- },
|
|
|
- watch: {
|
|
|
- advanced (newValue, oldValue) {
|
|
|
- const _this = this
|
|
|
- this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
- _this.setTableH()
|
|
|
- })
|
|
|
- },
|
|
|
- '$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
|
|
|
- this.setTableH()
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- handleGuideOk (resData) {
|
|
|
- traceCodeInsertBatch(resData).then(res => {
|
|
|
- if (res.status == 200 && res.data) {
|
|
|
- this.resetSearchForm()
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- onTiresChange (e) {
|
|
|
- console.log(`checked = ${e.target.checked}`)
|
|
|
- },
|
|
|
- // 盘点库存日期
|
|
|
- handleStock () {
|
|
|
- this.$message.info('无盘点区间的起始/终止时间,请自行选择日期区间查询!')
|
|
|
- },
|
|
|
- // 总计
|
|
|
- getCount (params) {
|
|
|
- reportSalesBillCount(params).then(res => {
|
|
|
- if (res.status == 200 && res.data) {
|
|
|
- this.totalData = res.data
|
|
|
- } else {
|
|
|
- this.totalData = null
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- handleSearch () {
|
|
|
- const _this = this
|
|
|
- this.$refs.ruleForm.validate(valid => {
|
|
|
- if (valid) {
|
|
|
- _this.$refs.table.refresh(true)
|
|
|
- } else {
|
|
|
- _this.$message.error('请选择审核时间')
|
|
|
- return false
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- // 创建时间 change
|
|
|
- dateChange (date) {
|
|
|
- if (date[0] && date[1]) {
|
|
|
- this.queryParam.time = date
|
|
|
- } else {
|
|
|
- this.queryParam.time = []
|
|
|
+ '$store.state.app.winHeight'(newValue, oldValue) { // 窗口变更时,需同时更改表格高度
|
|
|
+ this.setTableH()
|
|
|
}
|
|
|
- this.queryParam.beginDate = date[0] || ''
|
|
|
- this.queryParam.endDate = date[1] || ''
|
|
|
- },
|
|
|
- custChange (val) {
|
|
|
- this.queryParam.dealerSn = val.key
|
|
|
},
|
|
|
- // 重置
|
|
|
- resetSearchForm () {
|
|
|
- this.time = [
|
|
|
- getDate.getCurrMonthDays().starttime,
|
|
|
- getDate.getCurrMonthDays().endtime
|
|
|
- ]
|
|
|
- this.$refs.rangeDate.resetDate(this.time)
|
|
|
- this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
|
|
|
- this.queryParam.endDate = getDate.getCurrMonthDays().endtime
|
|
|
- this.totalData = null
|
|
|
- this.$refs.table.refresh(true)
|
|
|
- },
|
|
|
- // 导出
|
|
|
- handleExport () {
|
|
|
- const _this = this
|
|
|
- this.$refs.ruleForm.validate(valid => {
|
|
|
- if (valid) {
|
|
|
- const params = _this.queryParam
|
|
|
- _this.$store.state.app.curActionPermission = 'B_salesOrderTotalExport'
|
|
|
- _this.showExport = true
|
|
|
- _this.exportLoading = true
|
|
|
- _this.spinning = true
|
|
|
- hdExportExcel(reportSalesBillExport, params, '销售(开单统计)报表', function () {
|
|
|
- _this.exportLoading = false
|
|
|
- _this.spinning = false
|
|
|
- _this.$store.state.app.curActionPermission = ''
|
|
|
- })
|
|
|
+ methods: {
|
|
|
+ handleBizStatus(val){
|
|
|
+ this.queryParam.bizStatus= val
|
|
|
+ },
|
|
|
+ handleGuideOk(resData) {
|
|
|
+ traceCodeInsertBatch(resData).then(res => {
|
|
|
+ if (res.status == 200 && res.data) {
|
|
|
+ this.resetSearchForm()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onTiresChange(e) {
|
|
|
+ console.log(`checked = ${e.target.checked}`)
|
|
|
+ },
|
|
|
+ // 盘点库存日期
|
|
|
+ handleStock() {
|
|
|
+ this.$message.info('无盘点区间的起始/终止时间,请自行选择日期区间查询!')
|
|
|
+ },
|
|
|
+ // 总计
|
|
|
+ getCount(params) {
|
|
|
+ traceCodeQueryCount(params).then(res => {
|
|
|
+ if (res.status == 200 && res.data) {
|
|
|
+ this.totalData = res.data
|
|
|
+ } else {
|
|
|
+ this.totalData = null
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleSearch() {
|
|
|
+ const _this = this
|
|
|
+ this.$refs.ruleForm.validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ _this.$refs.table.refresh(true)
|
|
|
+ } else {
|
|
|
+ _this.$message.error('请选择审核时间')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 创建时间 change
|
|
|
+ dateChange(date) {
|
|
|
+ if (date[0] && date[1]) {
|
|
|
+ this.queryParam.time = date
|
|
|
} else {
|
|
|
- return false
|
|
|
+ this.queryParam.time = []
|
|
|
}
|
|
|
- })
|
|
|
- },
|
|
|
- filterOption (input, option) {
|
|
|
- return (
|
|
|
- option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
- )
|
|
|
+ this.queryParam.beginDate = date[0] || ''
|
|
|
+ this.queryParam.endDate = date[1] || ''
|
|
|
+ },
|
|
|
+ custChange(val) {
|
|
|
+ this.queryParam.dealerSn = val.key
|
|
|
+ },
|
|
|
+ // 重置
|
|
|
+ resetSearchForm() {
|
|
|
+ this.time = [
|
|
|
+ getDate.getCurrMonthDays().starttime,
|
|
|
+ getDate.getCurrMonthDays().endtime
|
|
|
+ ]
|
|
|
+ this.$refs.rangeDate.resetDate(this.time)
|
|
|
+ this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
|
|
|
+ this.queryParam.endDate = getDate.getCurrMonthDays().endtime
|
|
|
+ this.totalData = null
|
|
|
+ this.queryParam.bizStatus = undefined
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ },
|
|
|
+ // 导出
|
|
|
+ handleExport() {
|
|
|
+ const _this = this
|
|
|
+ this.$refs.ruleForm.validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ const params = _this.queryParam
|
|
|
+ _this.$store.state.app.curActionPermission = 'B_salesOrderTotalExport'
|
|
|
+ _this.showExport = true
|
|
|
+ _this.exportLoading = true
|
|
|
+ _this.spinning = true
|
|
|
+ hdExportExcel(reportSalesBillExport, params, '销售(开单统计)报表', function() {
|
|
|
+ _this.exportLoading = false
|
|
|
+ _this.spinning = false
|
|
|
+ _this.$store.state.app.curActionPermission = ''
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ filterOption(input, option) {
|
|
|
+ return (
|
|
|
+ option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ )
|
|
|
+ },
|
|
|
+ // 操作员
|
|
|
+ getUserList() {
|
|
|
+ userQueryList({}).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.operatorList = res.data
|
|
|
+ } else {
|
|
|
+ this.operatorList = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ pageInit() {
|
|
|
+ const _this = this
|
|
|
+ _this.getUserList()
|
|
|
+ this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
+ _this.setTableH()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ setTableH() {
|
|
|
+ const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
+ this.tableHeight = window.innerHeight - tableSearchH - 252
|
|
|
+ }
|
|
|
},
|
|
|
- // 操作员
|
|
|
- getUserList () {
|
|
|
- userQueryList({}).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- this.operatorList = res.data
|
|
|
- } else {
|
|
|
- this.operatorList = []
|
|
|
- }
|
|
|
- })
|
|
|
+ mounted() {
|
|
|
+ if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
|
+ this.pageInit()
|
|
|
+ this.resetSearchForm()
|
|
|
+ }
|
|
|
},
|
|
|
- pageInit () {
|
|
|
- const _this = this
|
|
|
- _this.getUserList()
|
|
|
- this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
- _this.setTableH()
|
|
|
- })
|
|
|
+ activated() {
|
|
|
+ // 如果是新页签打开,则重置当前页面
|
|
|
+ if (this.$store.state.app.isNewTab) {
|
|
|
+ this.pageInit()
|
|
|
+ this.resetSearchForm()
|
|
|
+ }
|
|
|
},
|
|
|
- setTableH () {
|
|
|
- const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
- this.tableHeight = window.innerHeight - tableSearchH - 252
|
|
|
- }
|
|
|
- },
|
|
|
- mounted () {
|
|
|
- if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
|
- this.pageInit()
|
|
|
- this.resetSearchForm()
|
|
|
- }
|
|
|
- },
|
|
|
- activated () {
|
|
|
- // 如果是新页签打开,则重置当前页面
|
|
|
- if (this.$store.state.app.isNewTab) {
|
|
|
- this.pageInit()
|
|
|
- this.resetSearchForm()
|
|
|
+ beforeRouteEnter(to, from, next) {
|
|
|
+ next(vm => {})
|
|
|
}
|
|
|
- },
|
|
|
- beforeRouteEnter (to, from, next) {
|
|
|
- next(vm => {})
|
|
|
}
|
|
|
-}
|
|
|
-</script>
|
|
|
+</script>
|