|
@@ -1,10 +1,10 @@
|
|
|
<template>
|
|
|
<div class="receiptPrint-wrap">
|
|
|
<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 key="2" tab="待打印">
|
|
|
+ <a-tab-pane :key="2" tab="待打印">
|
|
|
</a-tab-pane>
|
|
|
</a-tabs>
|
|
|
</div>
|
|
@@ -20,19 +20,24 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
|
- <dealerSubareaScopeList ref="dealerSubareaScopeList" id="receiptPrint-buyerName" @change="custChange" />
|
|
|
+ <a-form-item label="客户名称">
|
|
|
+ <a-input id="salesCollectionList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入客户名称"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="销售单号">
|
|
|
- <a-input id="receiptPrint-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
|
|
|
+ <a-input id="salesCollectionList-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入销售单号"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<template v-if="advanced">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="备货单号">
|
|
|
- <a-input id="receiptPrint-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
|
|
|
+ <a-input id="salesCollectionList-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="收货客户名称">
|
|
|
+ <a-input id="salesCollectionList-receiverName" v-model.trim="queryParam.receiverName" allowClear placeholder="请输入收货客户名称"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -40,23 +45,50 @@
|
|
|
<v-select
|
|
|
v-model="queryParam.billStatus"
|
|
|
ref="billStatus"
|
|
|
- id="receiptPrint-billStatus"
|
|
|
+ id="salesCollectionList-billStatus"
|
|
|
code="DISPATCH_BILL_STATUS"
|
|
|
placeholder="请选择业务状态"
|
|
|
allowClear></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="所在区域">
|
|
|
- <subarea id="receiptPrint-subarea" v-model="queryParam.subareaSn"></subarea>
|
|
|
- </a-form-model-item>
|
|
|
+ <a-form-item label="单据状态">
|
|
|
+ <v-select
|
|
|
+ v-model="queryParam.voidFlag"
|
|
|
+ ref="voidFlag"
|
|
|
+ id="salesCollectionList-voidFlag"
|
|
|
+ code="VOID_FLAG"
|
|
|
+ placeholder="请选择单据状态"
|
|
|
+ allowClear></v-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24" v-if="currentTab == 1">
|
|
|
+ <a-form-item label="收款打印状态">
|
|
|
+ <v-select
|
|
|
+ v-model="queryParam.printState"
|
|
|
+ ref="printState"
|
|
|
+ id="salesCollectionList-printState"
|
|
|
+ code="PRINT_STATUS"
|
|
|
+ placeholder="请选择打印状态"
|
|
|
+ allowClear
|
|
|
+ ></v-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="所在区域">
|
|
|
+ <subarea id="salesCollectionList-subarea" v-model="queryParam.subareaSn"></subarea>
|
|
|
+ </a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="地区">
|
|
|
- <a-form-model-item prop="shippingAddrProvinceSn">
|
|
|
- <Area id="receiptPrint-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
|
|
|
- </a-form-model-item>
|
|
|
- </a-form-model-item>
|
|
|
+ <a-row>
|
|
|
+ <a-form-item label="地区">
|
|
|
+ <a-col span="24">
|
|
|
+ <a-form-item prop="dealerProvinceSn" style="margin: 0;">
|
|
|
+ <Area id="salesCollectionList-dealerProvinceSn" v-model="queryParam.dealerProvinceSn" placeholder="请选择省"></Area>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-form-item>
|
|
|
+ </a-row>
|
|
|
</a-col>
|
|
|
</template>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -76,7 +108,7 @@
|
|
|
<s-table
|
|
|
class="sTable fixPagination"
|
|
|
ref="table"
|
|
|
- :style="{ height: tableHeight+84.5+'px' }"
|
|
|
+ :style="{ height: tableHeight+60.5+'px' }"
|
|
|
size="small"
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
@@ -84,36 +116,39 @@
|
|
|
:scroll="{ y:tableHeight }"
|
|
|
:defaultLoadData="false"
|
|
|
bordered>
|
|
|
- <!-- 销售单号 -->
|
|
|
- <template slot="salesBillNo" slot-scope="text, record">
|
|
|
- <span class="link-bule" v-if="$hasPermissions('B_salesDetail')" @click="handleDetail(record,0)">{{ record.salesBillNo }}</span>
|
|
|
- <span v-else>{{ record.salesBillNo }}</span>
|
|
|
+ <!-- 单号 -->
|
|
|
+ <template slot="bizNo" slot-scope="text, record">
|
|
|
+ <span v-if="$hasPermissions('B_salesDetail')" class="link-bule" @click="handleDetail(record)">{{ record.bizNo }}</span>
|
|
|
+ <span v-else>{{ record.bizNo }}</span>
|
|
|
</template>
|
|
|
- <!-- 备货单号 -->
|
|
|
+ <!-- 下推单号 -->
|
|
|
<template slot="dispatchBillNo" slot-scope="text, record">
|
|
|
- <span class="link-bule" v-if="$hasPermissions('B_dispatchDetail')" @click="handleDetail(record,1)">{{ record.dispatchBillNo }}</span>
|
|
|
- <span v-else>{{ record.dispatchBillNo }}</span>
|
|
|
+ <span v-if="$hasPermissions('B_dispatchDetail')" class="link-bule" @click="handleBhDetail(record)">{{ record.dispatchBillNo }}</span>
|
|
|
+ <span v-else>{{ record.dispatchBillNo || '--' }}</span>
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
|
+ v-if="record.printState == 'NO_PRINT'"
|
|
|
class="button-warning"
|
|
|
- @click="viewPrint(record)"
|
|
|
- >打印记录</a-button>
|
|
|
+ @click="handlePrint(record)"
|
|
|
+ >收款打印</a-button>
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
|
class="button-warning"
|
|
|
- @click="handlePrint(record)"
|
|
|
- >收款打印</a-button>
|
|
|
+ v-else-if="record.printState == 'PRINT'"
|
|
|
+ @click="viewPrint(record)"
|
|
|
+ >打印记录</a-button>
|
|
|
+ <span v-else>--</span>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
|
|
|
<!-- 操作提示 -->
|
|
|
- <commonModal modalTit="收款打印" :openModal="showTipModal" @cancel="showTipModal=false">
|
|
|
- <div style="line-height: 30px;">
|
|
|
+ <<!-- commonModal modalTit="收款打印" :openModal="showTipModal" @cancel="showTipModal=false">
|
|
|
+ <div style="line-height: 30px;" v-if="tipData">
|
|
|
<div>销售单号:{{ tipData&&tipData.buyerName }}</div>
|
|
|
<div>备货单号:{{ tipData&&tipData.dispatchBillNo }}</div>
|
|
|
<div>发货编号:{{ tipData&&tipData.buyerName }}</div>
|
|
@@ -121,10 +156,10 @@
|
|
|
<div>收货客户名称:{{ tipData&&tipData.buyerName }}</div>
|
|
|
<div>产品分类:{{ tipData&&tipData.buyerName }}</div>
|
|
|
</div>
|
|
|
- </commonModal>
|
|
|
+ </commonModal> -->
|
|
|
|
|
|
- <!-- 打印记录 -->
|
|
|
- <recordModal modalTit="打印记录" :openModal="showRecordModal" @cancel="showRecordModal=false"></recordModal>
|
|
|
+ !-- 打印记录 -->
|
|
|
+ <recordModal ref="recordModal" modalTit="打印记录" :openModal="showRecordModal" @cancel="showRecordModal=false"></recordModal>
|
|
|
</a-spin>
|
|
|
</a-card>
|
|
|
</div>
|
|
@@ -133,7 +168,6 @@
|
|
|
<script>
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import moment from 'moment'
|
|
|
-import getDate from '@/libs/getDate.js'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import subarea from '@/views/common/subarea.js'
|
|
@@ -141,7 +175,7 @@ import Area from '@/views/common/area.js'
|
|
|
import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
|
import commonModal from '@/views/common/commonModal.vue'
|
|
|
import recordModal from './recordModal.vue'
|
|
|
-import { dispatchlList, dispatchQueryCount } from '@/api/dispatch'
|
|
|
+import { settleReceiptList } from '@/api/settleReceipt'
|
|
|
export default {
|
|
|
name: 'PushOrderManagementList',
|
|
|
mixins: [commonMixin],
|
|
@@ -152,20 +186,21 @@ export default {
|
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
tableHeight: 0,
|
|
|
- time: [
|
|
|
- moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
|
|
|
- moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
|
|
|
- ],
|
|
|
+ time: [],
|
|
|
+ currentTab: 2,
|
|
|
// 查询参数
|
|
|
queryParam: {
|
|
|
- beginDate: getDate.getThreeMonthDays().starttime,
|
|
|
- endDate: getDate.getCurrMonthDays().endtime,
|
|
|
- buyerSn: undefined, // 客户名称
|
|
|
- salesBillNo: '', // 销售单号
|
|
|
- dispatchBillNo: '', // 备货单号
|
|
|
- billStatus: undefined, // 业务状态
|
|
|
+ beginDate: '',
|
|
|
+ endDate: '',
|
|
|
+ bizNo: '',
|
|
|
+ dispatchBillNo: '',
|
|
|
+ settleClientName: '',
|
|
|
+ receiverName: '',
|
|
|
subareaSn: undefined,
|
|
|
- shippingAddrProvinceSn: undefined
|
|
|
+ billStatus: undefined,
|
|
|
+ voidFlag: undefined,
|
|
|
+ dealerProvinceSn: undefined,
|
|
|
+ printState: 'NO_PRINT'
|
|
|
},
|
|
|
totalData: {
|
|
|
totalAmount: 0,
|
|
@@ -175,16 +210,11 @@ export default {
|
|
|
showTipModal: false,
|
|
|
tipData: null,
|
|
|
showRecordModal: false,
|
|
|
- recordData: null,
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = 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 settleReceiptList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
@@ -204,24 +234,33 @@ export default {
|
|
|
columns () {
|
|
|
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: 'billStatusDictValue', width: '6%', align: 'center' },
|
|
|
- { title: '单据状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center' },
|
|
|
- { title: '财务打印状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center' },
|
|
|
- { title: '打印次数', dataIndex: 'totalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '创建时间', dataIndex: 'createDate', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '销售单号', scopedSlots: { customRender: 'bizNo' }, width: '9%', align: 'center' },
|
|
|
+ { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '9%', align: 'center' },
|
|
|
+ { title: '发货编号', dataIndex: 'sendNo', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '客户名称', dataIndex: 'settleClientName', align: 'left', width: '10%', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '收货客户名称', dataIndex: 'receiverName', align: 'left', width: '10%', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '产品款数', dataIndex: 'totalCategory', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品数量', dataIndex: 'qty', 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: 'voidFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '收款打印状态', dataIndex: 'printStateDictValue', width: '6%', align: 'center' },
|
|
|
+ { title: '打印次数', dataIndex: 'printCount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
|
|
|
]
|
|
|
+
|
|
|
+ if (this.$hasPermissions('B_isShowPrice')) { // 售价权限
|
|
|
+ arr.splice(9, 0, { title: '总售价', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ }
|
|
|
return arr
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ changeTab (v) {
|
|
|
+ this.currentTab = v
|
|
|
+ this.resetSearchForm()
|
|
|
+ },
|
|
|
// 时间 change
|
|
|
dateChange (date) {
|
|
|
this.queryParam.beginDate = date[0]
|
|
@@ -233,36 +272,46 @@ export default {
|
|
|
shcustChange (val) {
|
|
|
this.queryParam.buyerSn = val.key
|
|
|
},
|
|
|
- // 详情
|
|
|
- handleDetail (row, type) {
|
|
|
- if (type == 0) {
|
|
|
- this.$router.push({ name: 'salesDetail', params: { sn: row.salesBillSn, type: 'pushOrder' } })
|
|
|
- } else {
|
|
|
- this.$router.push({ name: 'pushOrderDetail', params: { sn: row.dispatchBillSn, type: 'pushOrder' } })
|
|
|
- }
|
|
|
+ // 销售单详情
|
|
|
+ handleDetail (row) {
|
|
|
+ this.$router.push({ name: 'salesDetail', params: { sn: row.bizSn, type: 'salesCollection' } })
|
|
|
},
|
|
|
- // 允许打印
|
|
|
+ // 备货单号
|
|
|
+ handleBhDetail (row) {
|
|
|
+ this.$router.push({ name: 'pushOrderDetail', params: { sn: row.dispatchBillSn, type: 'salesCollection' } })
|
|
|
+ },
|
|
|
+ // 收款打印
|
|
|
handlePrint (row) {
|
|
|
this.tipData = row
|
|
|
this.showTipModal = true
|
|
|
},
|
|
|
// 打印记录
|
|
|
viewPrint (row) {
|
|
|
- this.recordData = row
|
|
|
this.showRecordModal = true
|
|
|
+ this.$refs.recordModal.setData(row, {
|
|
|
+ billType: 'ALLOCATE',
|
|
|
+ billSn: row.accountReceiptSn
|
|
|
+ })
|
|
|
},
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
- this.$refs.rangeDate.resetDate(this.time)
|
|
|
- this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
|
|
|
- this.queryParam.endDate = getDate.getCurrMonthDays().endtime
|
|
|
- this.queryParam.buyerSn = undefined
|
|
|
- this.$refs.dealerSubareaScopeList.resetForm()
|
|
|
- this.queryParam.salesBillNo = ''
|
|
|
- this.queryParam.dispatchBillNo = ''
|
|
|
- this.queryParam.billStatus = undefined
|
|
|
- this.queryParam.subareaSn = undefined
|
|
|
- this.queryParam.shippingAddrProvinceSn = undefined
|
|
|
+ this.time = []
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.rangeDate.resetDate(this.time)
|
|
|
+ })
|
|
|
+ this.queryParam = {
|
|
|
+ beginDate: '',
|
|
|
+ endDate: '',
|
|
|
+ bizNo: '',
|
|
|
+ dispatchBillNo: '',
|
|
|
+ settleClientName: '',
|
|
|
+ receiverName: '',
|
|
|
+ subareaSn: undefined,
|
|
|
+ billStatus: undefined,
|
|
|
+ voidFlag: undefined,
|
|
|
+ dealerProvinceSn: undefined,
|
|
|
+ printState: this.currentTab == 2 ? 'NO_PRINT' : undefined
|
|
|
+ }
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
pageInit () {
|
|
@@ -273,7 +322,7 @@ export default {
|
|
|
},
|
|
|
setTableH () {
|
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
- this.tableHeight = window.innerHeight - tableSearchH - 250
|
|
|
+ this.tableHeight = window.innerHeight - tableSearchH - 270
|
|
|
}
|
|
|
},
|
|
|
watch: {
|