|
@@ -1,10 +1,10 @@
|
|
<template>
|
|
<template>
|
|
<div class="stockPrint-wrap">
|
|
<div class="stockPrint-wrap">
|
|
<div style="background-color: #fff;">
|
|
<div style="background-color: #fff;">
|
|
- <a-tabs default-active-key="2">
|
|
|
|
- <a-tab-pane key="1" tab="全部">
|
|
|
|
|
|
+ <a-tabs v-model="currentTab" @change="changeTab">
|
|
|
|
+ <a-tab-pane :key="1" tab="全部">
|
|
</a-tab-pane>
|
|
</a-tab-pane>
|
|
- <a-tab-pane key="2" tab="待打印">
|
|
|
|
|
|
+ <a-tab-pane :key="2" tab="待打印">
|
|
</a-tab-pane>
|
|
</a-tab-pane>
|
|
</a-tabs>
|
|
</a-tabs>
|
|
</div>
|
|
</div>
|
|
@@ -51,17 +51,28 @@
|
|
allowClear></v-select>
|
|
allowClear></v-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
|
|
+ <a-col :md="6" :sm="24" v-if="currentTab == 1">
|
|
<a-form-item label="单据状态">
|
|
<a-form-item label="单据状态">
|
|
<v-select
|
|
<v-select
|
|
- v-model="queryParam.billStatus"
|
|
|
|
- ref="billStatus"
|
|
|
|
- id="stockPrint-billStatus"
|
|
|
|
- code="DISPATCH_BILL_STATUS"
|
|
|
|
|
|
+ v-model="queryParam.voidFlag"
|
|
|
|
+ ref="voidFlag"
|
|
|
|
+ id="pushOrder-voidFlag"
|
|
|
|
+ code="VOID_FLAG"
|
|
placeholder="请选择单据状态"
|
|
placeholder="请选择单据状态"
|
|
allowClear></v-select>
|
|
allowClear></v-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
|
|
+ <a-col :md="6" :sm="24" v-if="currentTab == 1">
|
|
|
|
+ <a-form-item label="备货打印状态">
|
|
|
|
+ <v-select
|
|
|
|
+ v-model="queryParam.printStatus"
|
|
|
|
+ ref="printStatus"
|
|
|
|
+ id="pushOrder-printStatus"
|
|
|
|
+ code="PRINT_STATUS"
|
|
|
|
+ placeholder="请选择备货打印状态"
|
|
|
|
+ allowClear></v-select>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-model-item label="所在区域">
|
|
<a-form-model-item label="所在区域">
|
|
<subarea id="stockPrint-subarea" v-model="queryParam.subareaSn"></subarea>
|
|
<subarea id="stockPrint-subarea" v-model="queryParam.subareaSn"></subarea>
|
|
@@ -97,7 +108,7 @@
|
|
:rowKey="(record) => record.id"
|
|
:rowKey="(record) => record.id"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
- :scroll="{ y:tableHeight }"
|
|
|
|
|
|
+ :scroll="{ y:tableHeight, x: 1600 }"
|
|
:defaultLoadData="false"
|
|
:defaultLoadData="false"
|
|
bordered>
|
|
bordered>
|
|
<!-- 销售单号 -->
|
|
<!-- 销售单号 -->
|
|
@@ -110,6 +121,14 @@
|
|
<span class="link-bule" v-if="$hasPermissions('B_dispatchDetail')" @click="handleDetail(record,1)">{{ record.dispatchBillNo }}</span>
|
|
<span class="link-bule" v-if="$hasPermissions('B_dispatchDetail')" @click="handleDetail(record,1)">{{ record.dispatchBillNo }}</span>
|
|
<span v-else>{{ record.dispatchBillNo }}</span>
|
|
<span v-else>{{ record.dispatchBillNo }}</span>
|
|
</template>
|
|
</template>
|
|
|
|
+ <div slot="costTitle">
|
|
|
|
+ <a-tooltip placement="top">
|
|
|
|
+ <template slot="title">
|
|
|
|
+ 如果收货客户名称不为空,则按照收货客户的价格级别计算得到。
|
|
|
|
+ </template>
|
|
|
|
+ <span style="margin-right: 5px;">实际总售价</span> <a-icon type="question-circle" />
|
|
|
|
+ </a-tooltip>
|
|
|
|
+ </div>
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
<a-button
|
|
<a-button
|
|
@@ -137,8 +156,6 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
-import moment from 'moment'
|
|
|
|
-import getDate from '@/libs/getDate.js'
|
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import subarea from '@/views/common/subarea.js'
|
|
import subarea from '@/views/common/subarea.js'
|
|
@@ -146,7 +163,7 @@ import Area from '@/views/common/area.js'
|
|
import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
import sendTypeModal from '@/views/salesManagement/pushOrderManagement/sendTypeModal.vue'
|
|
import sendTypeModal from '@/views/salesManagement/pushOrderManagement/sendTypeModal.vue'
|
|
import recordModal from './recordModal.vue'
|
|
import recordModal from './recordModal.vue'
|
|
-import { dispatchlList, dispatchQueryCount, dispatchDetailPrint } from '@/api/dispatch'
|
|
|
|
|
|
+import { dispatchlList, dispatchDetailPrint } from '@/api/dispatch'
|
|
export default {
|
|
export default {
|
|
name: 'PushOrderManagementList',
|
|
name: 'PushOrderManagementList',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
@@ -157,25 +174,21 @@ export default {
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
tableHeight: 0,
|
|
tableHeight: 0,
|
|
- time: [
|
|
|
|
- moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
|
|
|
|
- moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
|
|
|
|
- ],
|
|
|
|
|
|
+ time: [],
|
|
|
|
+ currentTab: 2,
|
|
// 查询参数
|
|
// 查询参数
|
|
queryParam: {
|
|
queryParam: {
|
|
- beginDate: getDate.getThreeMonthDays().starttime,
|
|
|
|
- endDate: getDate.getCurrMonthDays().endtime,
|
|
|
|
|
|
+ beginDate: '',
|
|
|
|
+ endDate: '',
|
|
buyerSn: undefined, // 客户名称
|
|
buyerSn: undefined, // 客户名称
|
|
|
|
+ receiverSn: undefined, // 收货客户名称
|
|
salesBillNo: '', // 销售单号
|
|
salesBillNo: '', // 销售单号
|
|
dispatchBillNo: '', // 备货单号
|
|
dispatchBillNo: '', // 备货单号
|
|
billStatus: undefined, // 业务状态
|
|
billStatus: undefined, // 业务状态
|
|
subareaSn: undefined,
|
|
subareaSn: undefined,
|
|
- shippingAddrProvinceSn: undefined
|
|
|
|
- },
|
|
|
|
- totalData: {
|
|
|
|
- totalAmount: 0,
|
|
|
|
- totalQty: 0,
|
|
|
|
- totalRecord: 0
|
|
|
|
|
|
+ shippingAddrProvinceSn: undefined,
|
|
|
|
+ voidFlag: undefined,
|
|
|
|
+ printStatus: undefined
|
|
},
|
|
},
|
|
showTipModal: false,
|
|
showTipModal: false,
|
|
showRecordModal: false,
|
|
showRecordModal: false,
|
|
@@ -184,10 +197,6 @@ export default {
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
this.spinning = true
|
|
this.spinning = true
|
|
- // 查询总计
|
|
|
|
- dispatchQueryCount(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
|
- this.totalData = Object.assign(this.totalData, res.data || {})
|
|
|
|
- })
|
|
|
|
return dispatchlList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
return dispatchlList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
@@ -207,29 +216,36 @@ export default {
|
|
computed: {
|
|
computed: {
|
|
columns () {
|
|
columns () {
|
|
const arr = [
|
|
const arr = [
|
|
- { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
|
- { title: '创建时间', dataIndex: 'createDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '14%', align: 'center' },
|
|
|
|
- { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '14%', align: 'center' },
|
|
|
|
- { title: '发货编号', dataIndex: 'buyerName1', width: '6%', align: 'center' },
|
|
|
|
- { title: '客户名称', dataIndex: 'buyerName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '收货客户名称', dataIndex: 'buyerName2', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '产品款数', dataIndex: 'totalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '产品数量', dataIndex: 'totalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '总售价', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '电池售价', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '机油售价', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '汽配售价', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '业务状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '单据状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '备货打印状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '打印次数', dataIndex: 'totalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
|
|
|
|
|
|
+ { title: '序号', dataIndex: 'no', width: '60px', align: 'center' },
|
|
|
|
+ { title: '创建时间', dataIndex: 'createDate', width: '120px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '120px', align: 'center' },
|
|
|
|
+ { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '120px', align: 'center' },
|
|
|
|
+ { title: '发货编号', dataIndex: 'sendNo', width: '70px', align: 'center' },
|
|
|
|
+ { title: '客户名称', dataIndex: 'buyerName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '收货客户名称', dataIndex: 'receiverName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '产品款数', dataIndex: 'totalCategory', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '产品数量', dataIndex: 'totalQty', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ // { slots: { title: 'costTitle' }, dataIndex: 'totalAmount', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '易损件售价', dataIndex: 'receiveYsjTotalAmount', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '电池售价', dataIndex: 'receiveDcTotalAmount', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '机油售价', dataIndex: 'receiveJyTotalAmount', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '业务状态', dataIndex: 'billStatusDictValue', width: '70px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '单据状态', dataIndex: 'voidFlagDictValue', width: '70px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '备货打印状态', dataIndex: 'printStatusDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '打印次数', dataIndex: 'stockUpPrintTimes', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '100px', align: 'center', fixed: 'right' }
|
|
]
|
|
]
|
|
|
|
+ if (this.$hasPermissions('B_isShowPrice')) { // 售价权限
|
|
|
|
+ arr.splice(9, 0, { slots: { title: 'costTitle' }, dataIndex: 'totalAmount', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
|
+ }
|
|
return arr
|
|
return arr
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ changeTab (v) {
|
|
|
|
+ this.currentTab = v
|
|
|
|
+ this.resetSearchForm()
|
|
|
|
+ },
|
|
// 时间 change
|
|
// 时间 change
|
|
dateChange (date) {
|
|
dateChange (date) {
|
|
this.queryParam.beginDate = date[0]
|
|
this.queryParam.beginDate = date[0]
|
|
@@ -239,7 +255,7 @@ export default {
|
|
this.queryParam.buyerSn = val.key
|
|
this.queryParam.buyerSn = val.key
|
|
},
|
|
},
|
|
shcustChange (val) {
|
|
shcustChange (val) {
|
|
- this.queryParam.buyerSn = val.key
|
|
|
|
|
|
+ this.queryParam.receiverSn = val.key
|
|
},
|
|
},
|
|
// 详情
|
|
// 详情
|
|
handleDetail (row, type) {
|
|
handleDetail (row, type) {
|
|
@@ -296,16 +312,20 @@ export default {
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
|
|
+ this.time = []
|
|
this.$refs.rangeDate.resetDate(this.time)
|
|
this.$refs.rangeDate.resetDate(this.time)
|
|
- this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
|
|
|
|
- this.queryParam.endDate = getDate.getCurrMonthDays().endtime
|
|
|
|
|
|
+ this.queryParam.beginDate = ''
|
|
|
|
+ this.queryParam.endDate = ''
|
|
this.queryParam.buyerSn = undefined
|
|
this.queryParam.buyerSn = undefined
|
|
|
|
+ this.queryParam.receiverSn = undefined
|
|
this.$refs.dealerSubareaScopeList.resetForm()
|
|
this.$refs.dealerSubareaScopeList.resetForm()
|
|
this.queryParam.salesBillNo = ''
|
|
this.queryParam.salesBillNo = ''
|
|
this.queryParam.dispatchBillNo = ''
|
|
this.queryParam.dispatchBillNo = ''
|
|
this.queryParam.billStatus = undefined
|
|
this.queryParam.billStatus = undefined
|
|
this.queryParam.subareaSn = undefined
|
|
this.queryParam.subareaSn = undefined
|
|
this.queryParam.shippingAddrProvinceSn = undefined
|
|
this.queryParam.shippingAddrProvinceSn = undefined
|
|
|
|
+ this.queryParam.voidFlag = undefined
|
|
|
|
+ this.queryParam.printStatus = undefined
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
pageInit () {
|
|
pageInit () {
|