|
@@ -1,501 +0,0 @@
|
|
-<template>
|
|
|
|
- <a-card size="small" :bordered="false" class="promotionSalesOrderReport-wrap">
|
|
|
|
- <a-spin :spinning="spinning" tip="Loading...">
|
|
|
|
- <!-- 搜索条件 -->
|
|
|
|
- <div ref="tableSearch" class="table-page-search-wrapper">
|
|
|
|
- <a-form layout="inline">
|
|
|
|
- <a-row :gutter="15">
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-item label="销售日期">
|
|
|
|
- <rangeDate ref="rangeDate" :value="salesDate" @change="salesDateChange" />
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-item label="促销时间">
|
|
|
|
- <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-item label="促销名称">
|
|
|
|
- <a-input id="promotionSalesOrderReport-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入促销名称"/>
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- <template v-if="advanced">
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-item label="促销类型">
|
|
|
|
- <v-select
|
|
|
|
- v-model="queryParam.printStatus"
|
|
|
|
- ref="printStatus"
|
|
|
|
- id="promotionSalesOrderReport-printStatus"
|
|
|
|
- code="PRINT_STATUS"
|
|
|
|
- placeholder="请选择促销类型"
|
|
|
|
- allowClear></v-select>
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-item label="销售单号">
|
|
|
|
- <a-input id="promotionSalesOrderReport-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" 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="actualSalesReportList-allocateTypeSn"
|
|
|
|
- code="DEALER_LEVEL"
|
|
|
|
- placeholder="请选择客户级别"
|
|
|
|
- allowClear></v-select>
|
|
|
|
- </a-form-model-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-item label="客户名称">
|
|
|
|
- <a-input id="promotionSalesOrderReport-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入客户名称"/>
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-model-item label="所在区域">
|
|
|
|
- <subarea ref="subarea" id="promotionSalesOrderReport-subarea" @change="subareaChange"></subarea>
|
|
|
|
- </a-form-model-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-model-item label="地区" prop="shippingAddrProvinceSn">
|
|
|
|
- <Area id="promotionSalesOrderReport-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
|
|
|
|
- </a-form-model-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-model-item label="操作员">
|
|
|
|
- <a-select
|
|
|
|
- id="promotionSalesOrderReport-creatorId"
|
|
|
|
- allowClear
|
|
|
|
- v-model="queryParam.creatorId"
|
|
|
|
- placeholder="请选择操作员"
|
|
|
|
- :showSearch="true"
|
|
|
|
- option-filter-prop="children"
|
|
|
|
- :filter-option="filterOption">
|
|
|
|
- <a-select-option v-for="item in operatorList" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
|
|
|
|
- </a-select>
|
|
|
|
- </a-form-model-item>
|
|
|
|
- </a-col>
|
|
|
|
- </template>
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <span class="table-page-search-submitButtons">
|
|
|
|
- <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
|
|
|
|
- <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
|
|
|
|
- <a-button
|
|
|
|
- style="margin-left: 10px"
|
|
|
|
- type="primary"
|
|
|
|
- class="button-warning"
|
|
|
|
- @click="handleExport"
|
|
|
|
- :disabled="disabled"
|
|
|
|
- :loading="exportLoading"
|
|
|
|
- v-if="$hasPermissions('B_sales_export')"
|
|
|
|
- >导出</a-button>
|
|
|
|
- <a @click="advanced=!advanced" style="margin-left: 8px">
|
|
|
|
- {{ advanced ? '收起' : '展开' }}
|
|
|
|
- <a-icon :type="advanced ? 'up' : 'down'"/>
|
|
|
|
- </a>
|
|
|
|
- </span>
|
|
|
|
- </a-col>
|
|
|
|
- </a-row>
|
|
|
|
- </a-form>
|
|
|
|
- </div>
|
|
|
|
- <!-- 列表 -->
|
|
|
|
- <s-table
|
|
|
|
- class="sTable fixPagination"
|
|
|
|
- ref="table"
|
|
|
|
- :style="{ height: tableHeight+75+'px'}"
|
|
|
|
- size="small"
|
|
|
|
- :rowKey="(record) => record.id"
|
|
|
|
- :columns="columns"
|
|
|
|
- :data="loadData"
|
|
|
|
- :scroll="{ x:1890, y: tableHeight}"
|
|
|
|
- :defaultLoadData="false"
|
|
|
|
- bordered>
|
|
|
|
- <!-- 销售单号 -->
|
|
|
|
- <template slot="salesBillNo" slot-scope="text, record">
|
|
|
|
- <div v-if="$hasPermissions('B_salesDetail')">
|
|
|
|
- <a-badge :count="'改'+record.changeTimes" :offset="[16,-13]" v-if="record.changeTimes>0" class="badge-con-t">
|
|
|
|
- <span class="link-bule" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
|
|
|
|
- </a-badge>
|
|
|
|
- <span v-else class="link-bule" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
|
|
|
|
- </div>
|
|
|
|
- <div v-else>{{ record.salesBillNo }}</div>
|
|
|
|
- </template>
|
|
|
|
- <template slot="footer">
|
|
|
|
- <a-row>
|
|
|
|
- <a-col span="2">合计:</a-col>
|
|
|
|
- <a-col span="22">
|
|
|
|
- <a-row>
|
|
|
|
- <a-col span="3">数量:{{ (totalData && (totalData.beginQty || totalData.beginQty==0)) ? totalData.beginQty : '--' }}</a-col>
|
|
|
|
- <a-col span="3">实售价:{{ (totalData && (totalData.beginAmount || totalData.beginAmount==0)) ? toThousands(totalData.beginAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="3">开单价:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="3">成本:{{ (totalData && (totalData.outAmount || totalData.outAmount==0)) ? toThousands(totalData.outAmount) : '--' }}</a-col>
|
|
|
|
- <a-col span="3">毛利:{{ (totalData && (totalData.endQty || totalData.endQty==0)) ? toThousands(totalData.endQty) : '--' }}</a-col>
|
|
|
|
- <a-col span="4">返利:{{ (totalData && (totalData.endPrice || totalData.endPrice==0)) ? toThousands(totalData.endPrice) : '--' }}</a-col>
|
|
|
|
- <a-col span="3">损失总费用:{{ (totalData && (totalData.endAmount || totalData.endAmount==0)) ? toThousands(totalData.endAmount) : '--' }}</a-col>
|
|
|
|
- </a-row>
|
|
|
|
- </a-col>
|
|
|
|
- </a-row>
|
|
|
|
- </template>
|
|
|
|
- </s-table>
|
|
|
|
- </a-spin>
|
|
|
|
- <!-- 导出提示框 -->
|
|
|
|
- <reportModal :visible="showExport" @close="showExport=false"></reportModal>
|
|
|
|
- </a-card>
|
|
|
|
-</template>
|
|
|
|
-
|
|
|
|
-<script>
|
|
|
|
-import { commonMixin } from '@/utils/mixin'
|
|
|
|
-import moment from 'moment'
|
|
|
|
-import getDate from '@/libs/getDate.js'
|
|
|
|
-import subarea from '@/views/common/subarea.js'
|
|
|
|
-import Area from '@/views/common/area.js'
|
|
|
|
-import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
|
-import { STable, VSelect } from '@/components'
|
|
|
|
-import commonModal from '@/views/common/commonModal.vue'
|
|
|
|
-// import chooseCustomModal from './chooseCustomModal.vue'
|
|
|
|
-import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
|
|
-import reportModal from '@/views/common/reportModal.vue'
|
|
|
|
-import { salesList, salesDel, salesCount } from '@/api/sales'
|
|
|
|
-import { hdExportExcel } from '@/libs/exportExcel'
|
|
|
|
-import chooseWarehouse from '@/views/common/chooseWarehouse'
|
|
|
|
-import { findBySalesBillSn, dispatchBatchPrintStatus, queryBySalesBillSn } from '@/api/dispatch'
|
|
|
|
-import { salesDetailExport } from '@/api/salesBillReport'
|
|
|
|
-export default {
|
|
|
|
- name: 'SalesQueryList',
|
|
|
|
- mixins: [commonMixin],
|
|
|
|
- components: { STable, VSelect, dealerSubareaScopeList, Area, rangeDate, subarea, commonModal, reportModal, chooseWarehouse },
|
|
|
|
- data () {
|
|
|
|
- return {
|
|
|
|
- spinning: false,
|
|
|
|
- advanced: true, // 高级搜索 展开/关闭
|
|
|
|
- disabled: false, // 查询、重置按钮是否可操作
|
|
|
|
- openModal: false, // 选择客户弹框是否显示
|
|
|
|
- showTipModal: false, // 备货打印弹框
|
|
|
|
- showExport: false,
|
|
|
|
- exportLoading: false,
|
|
|
|
- tableHeight: 0,
|
|
|
|
- salesDate: [
|
|
|
|
- moment(getDate.getCurrMonthDays().starttime, 'YYYY-MM-DD'),
|
|
|
|
- moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
|
|
|
|
- ],
|
|
|
|
- time: [
|
|
|
|
- moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
|
|
|
|
- moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
|
|
|
|
- ],
|
|
|
|
- // 查询参数
|
|
|
|
- queryParam: {
|
|
|
|
- beginDate: getDate.getThreeMonthDays().starttime,
|
|
|
|
- endDate: getDate.getCurrMonthDays().endtime,
|
|
|
|
- buyerSn: undefined, // 客户名称
|
|
|
|
- salesBillNo: '', // 销售单号
|
|
|
|
- purchaseBillNo: '',
|
|
|
|
- printStatus: undefined,
|
|
|
|
- billStatus: undefined, // 业务状态
|
|
|
|
- financialStatus: undefined, // 财务状态
|
|
|
|
- salesBillSource: undefined,
|
|
|
|
- dealerLevel: undefined,
|
|
|
|
- subareaArea: {
|
|
|
|
- subareaSn: undefined,
|
|
|
|
- subareaAreaSn: undefined
|
|
|
|
- },
|
|
|
|
- shippingAddrProvinceSn: undefined,
|
|
|
|
- warehouseSn: undefined
|
|
|
|
- },
|
|
|
|
- totalData: {
|
|
|
|
- totalAmount: 0,
|
|
|
|
- totalCategory: 0,
|
|
|
|
- totalQty: 0,
|
|
|
|
- totalRecord: 0,
|
|
|
|
- totalPushedQty: 0,
|
|
|
|
- totalDispatchQty: 0,
|
|
|
|
- totalCancelQty: 0,
|
|
|
|
- totalUnpushedQty: 0,
|
|
|
|
- totalPushedAmount: 0,
|
|
|
|
- totalCancelAmount: 0,
|
|
|
|
- totalUnpushedAmount: 0,
|
|
|
|
- totalDispatchAmount: 0
|
|
|
|
- },
|
|
|
|
- // 加载数据方法 必须为 Promise 对象
|
|
|
|
- loadData: parameter => {
|
|
|
|
- this.disabled = true
|
|
|
|
- this.spinning = true
|
|
|
|
- delete parameter.tableId
|
|
|
|
- delete parameter.index
|
|
|
|
- // 查询总计
|
|
|
|
- salesCount(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
|
- this.totalData = Object.assign(this.totalData, res.data || {})
|
|
|
|
- })
|
|
|
|
- return salesList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
|
- let data
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- data = res.data
|
|
|
|
- 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
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- showCancelNum: false, // 是否显示取消数量和待下推数量
|
|
|
|
- tipData: null, // 备货单信息
|
|
|
|
- tempSalesBillSn: null,
|
|
|
|
- // 允许备货打印
|
|
|
|
- selectedRowKeys: []
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- computed: {
|
|
|
|
- columns () {
|
|
|
|
- const _this = this
|
|
|
|
- const arr = [
|
|
|
|
- { title: '促销名称', dataIndex: 'buyerName', width: '160px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left', ellipsis: true },
|
|
|
|
- { title: '促销时间', dataIndex: 'createDate', width: '100px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' },
|
|
|
|
- { title: '费用所属部门', dataIndex: 'submitDate', width: '180px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true, fixed: 'left' },
|
|
|
|
- { title: '促销类型', dataIndex: 'auditDate', width: '80px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' },
|
|
|
|
- { title: '规则', scopedSlots: { customRender: 'warehouseBox' }, width: '160px', align: 'center', fixed: 'left' },
|
|
|
|
- { title: '销售单号', scopedSlots: { customRender: 'warehouseBox' }, width: '100px', align: 'center', fixed: 'left' },
|
|
|
|
- { title: '客户名称', dataIndex: 'buyerName', width: '100px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '客户级别', dataIndex: 'buyerName', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '销售日期', dataIndex: 'buyerName', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '总数量', dataIndex: 'totalPushedQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '开单金额', dataIndex: 'totalAmount', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '成本金额', dataIndex: 'totalAmount', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '实售金额', dataIndex: 'totalAmount', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '损失费用', dataIndex: 'totalAmount', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '毛利', dataIndex: 'totalAmount', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '操作员', dataIndex: 'auditDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '箭牌', dataIndex: 'lastStockUpDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '促销品费用归属品牌', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '促销品费用归属分类', dataIndex: 'financialStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
|
- ]
|
|
|
|
- return arr
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- methods: {
|
|
|
|
- // 导出
|
|
|
|
- handleExport () {
|
|
|
|
- const _this = this
|
|
|
|
- _this.$store.state.app.curActionPermission = 'B_sales_export'
|
|
|
|
- _this.exportLoading = true
|
|
|
|
- _this.spinning = true
|
|
|
|
- hdExportExcel(salesDetailExport, _this.queryParam, '销售明细', function () {
|
|
|
|
- _this.exportLoading = false
|
|
|
|
- _this.spinning = false
|
|
|
|
- _this.showExport = true
|
|
|
|
- _this.$store.state.app.curActionPermission = ''
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- salesDateChange (date) {
|
|
|
|
- this.queryParam.beginDate = date[0]
|
|
|
|
- this.queryParam.endDate = date[1]
|
|
|
|
- },
|
|
|
|
- // 时间 change
|
|
|
|
- dateChange (date) {
|
|
|
|
- this.queryParam.beginDate = date[0]
|
|
|
|
- this.queryParam.endDate = date[1]
|
|
|
|
- },
|
|
|
|
- custChange (val) {
|
|
|
|
- this.queryParam.buyerSn = val.key
|
|
|
|
- },
|
|
|
|
- subareaChange (val) {
|
|
|
|
- this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
|
|
|
|
- this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
|
|
|
|
- },
|
|
|
|
- // 新增
|
|
|
|
- handleAdd () {
|
|
|
|
- this.openModal = true
|
|
|
|
- },
|
|
|
|
- // 选择客户成功
|
|
|
|
- chooseCustomOk (data) {
|
|
|
|
- this.$router.push({ name: 'salesAdd', params: { sn: data.salesBillSn } })
|
|
|
|
- },
|
|
|
|
- // 下推
|
|
|
|
- handleDispatch (row) {
|
|
|
|
- this.spinning = true
|
|
|
|
- findBySalesBillSn({ salesBillSn: row.salesBillSn }).then(res => {
|
|
|
|
- this.spinning = false
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- this.$router.push({ name: 'waitDispatch', params: { salesBillSn: row.salesBillSn } })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- // 详情
|
|
|
|
- handleDetail (row) {
|
|
|
|
- this.$router.push({ name: 'salesDetail', params: { sn: row.salesBillSn } })
|
|
|
|
- },
|
|
|
|
- // 审核
|
|
|
|
- handleDetailAudit (row) {
|
|
|
|
- this.$router.push({ name: 'salesDetailAudit', params: { sn: row.salesBillSn } })
|
|
|
|
- },
|
|
|
|
- // 编辑
|
|
|
|
- handleEdit (row) {
|
|
|
|
- this.$router.push({ name: 'salesEdit', params: { sn: row.salesBillSn } })
|
|
|
|
- },
|
|
|
|
- // 删除
|
|
|
|
- handleDel (row) {
|
|
|
|
- const _this = this
|
|
|
|
- this.$confirm({
|
|
|
|
- title: '提示',
|
|
|
|
- content: row.salesBillSource == 'PURCHASE' ? '确认要取消吗?' : '确认要删除吗?',
|
|
|
|
- centered: true,
|
|
|
|
- closable: true,
|
|
|
|
- onOk () {
|
|
|
|
- _this.spinning = true
|
|
|
|
- salesDel({ salesBillSn: row.salesBillSn }).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- _this.$message.success(res.message)
|
|
|
|
- _this.$refs.table.refresh()
|
|
|
|
- _this.spinning = false
|
|
|
|
- } else {
|
|
|
|
- _this.spinning = false
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- // 允许备货打印
|
|
|
|
- handlePrint (row) {
|
|
|
|
- // 获取关联的下推单
|
|
|
|
- this.tempSalesBillSn = row.salesBillSn
|
|
|
|
- queryBySalesBillSn({ salesBillSn: row.salesBillSn }).then(res => {
|
|
|
|
- this.tipData = res.data || []
|
|
|
|
- this.tipData.map(item => {
|
|
|
|
- item.key = item.dispatchBillSn
|
|
|
|
- if (item.printStatus == 'UNABLE_PRINT') {
|
|
|
|
- this.selectedRowKeys.push(item.dispatchBillSn)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- this.showTipModal = true
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- canselModal () {
|
|
|
|
- this.tipData = null
|
|
|
|
- this.showTipModal = false
|
|
|
|
- this.tempSalesBillSn = null
|
|
|
|
- this.selectedRowKeys = []
|
|
|
|
- },
|
|
|
|
- onSelectChange (selectedRowKeys) {
|
|
|
|
- this.selectedRowKeys = selectedRowKeys
|
|
|
|
- },
|
|
|
|
- // 允许备货打印状态
|
|
|
|
- updatePrintStatus () {
|
|
|
|
- const isOne = this.tipData.length
|
|
|
|
- if (isOne > 1 && this.selectedRowKeys.length == 0) {
|
|
|
|
- this.$message.info('请选择备货单!')
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- const dispatchBillSnList = []
|
|
|
|
- this.tipData.map(item => {
|
|
|
|
- dispatchBillSnList.push(item.dispatchBillSn)
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- const params = {
|
|
|
|
- 'salesBillSn': this.tempSalesBillSn,
|
|
|
|
- 'dispatchBillSnList': isOne > 1 ? this.selectedRowKeys : dispatchBillSnList,
|
|
|
|
- 'printStatus': 'NO_PRINT'
|
|
|
|
- }
|
|
|
|
- dispatchBatchPrintStatus(params).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- this.canselModal()
|
|
|
|
- this.$message.info(res.message)
|
|
|
|
- this.$refs.table.refresh()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- // 重置
|
|
|
|
- resetSearchForm () {
|
|
|
|
- this.$refs.rangeDate.resetDate(this.time)
|
|
|
|
- this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
|
|
|
|
- this.queryParam.endDate = getDate.getCurrMonthDays().endtime
|
|
|
|
- this.$refs.dealerSubareaScopeList.resetForm()
|
|
|
|
- this.queryParam.buyerSn = undefined
|
|
|
|
- this.queryParam.salesBillNo = ''
|
|
|
|
- this.queryParam.purchaseBillNo = ''
|
|
|
|
- this.queryParam.printStatus = undefined
|
|
|
|
- this.queryParam.billStatus = undefined
|
|
|
|
- this.queryParam.financialStatus = undefined
|
|
|
|
- this.queryParam.salesBillSource = undefined
|
|
|
|
- this.queryParam.subareaArea.subareaSn = undefined
|
|
|
|
- this.queryParam.subareaArea.subareaAreaSn = undefined
|
|
|
|
- this.queryParam.shippingAddrProvinceSn = undefined
|
|
|
|
- this.queryParam.warehouseSn = undefined
|
|
|
|
- if (this.advanced) {
|
|
|
|
- this.$refs.subarea.clearData()
|
|
|
|
- }
|
|
|
|
- this.$refs.table.refresh(true)
|
|
|
|
- },
|
|
|
|
- pageInit () {
|
|
|
|
- const _this = this
|
|
|
|
- this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
|
- _this.setTableH()
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- setTableH () {
|
|
|
|
- const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
|
- this.tableHeight = window.innerHeight - tableSearchH - 290
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- watch: {
|
|
|
|
- advanced (newValue, oldValue) {
|
|
|
|
- const _this = this
|
|
|
|
- this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
|
- _this.setTableH()
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- '$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
|
|
|
|
- console.log(newValue)
|
|
|
|
- this.setTableH()
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- mounted () {
|
|
|
|
- if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
|
|
- this.pageInit()
|
|
|
|
- this.resetSearchForm()
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- activated () {
|
|
|
|
- // 如果是新页签打开,则重置当前页面
|
|
|
|
- if (this.$store.state.app.isNewTab) {
|
|
|
|
- this.pageInit()
|
|
|
|
- this.resetSearchForm()
|
|
|
|
- }
|
|
|
|
- // 仅刷新列表,不重置页面
|
|
|
|
- if (this.$store.state.app.updateList) {
|
|
|
|
- this.pageInit()
|
|
|
|
- this.$refs.table.refresh()
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- beforeRouteEnter (to, from, next) {
|
|
|
|
- next(vm => {})
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-</script>
|
|
|
|
-<style lang="less" scoped>
|
|
|
|
- .promotionSalesOrderReport-wrap{
|
|
|
|
- .sTable{
|
|
|
|
- margin-top: 10px;
|
|
|
|
- .badge-con-t{
|
|
|
|
- .ant-badge-count{
|
|
|
|
- transform: scale(0.8);
|
|
|
|
- font-size: 13px;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .warehouse_box{
|
|
|
|
- width: 100%;
|
|
|
|
- overflow: hidden;
|
|
|
|
- white-space: nowrap;
|
|
|
|
- text-overflow: ellipsis;
|
|
|
|
- }
|
|
|
|
- // .warehouse_box>span::after{
|
|
|
|
- // content:',';
|
|
|
|
- // }
|
|
|
|
- // .warehouse_box>span:last-child::after{
|
|
|
|
- // content:'';
|
|
|
|
- // }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-</style>
|
|
|