|
@@ -32,10 +32,10 @@
|
|
|
<a-col :md="8" :sm="24" v-if="currentTab == 1">
|
|
|
<a-form-item label="收款打印状态">
|
|
|
<v-select
|
|
|
- v-model="queryParam.printState"
|
|
|
- ref="printState"
|
|
|
- id="salesCollectionList-printState"
|
|
|
- code="RECEIPT_PRINT"
|
|
|
+ v-model="queryParam.printStatus"
|
|
|
+ ref="printStatus"
|
|
|
+ id="salesCollectionList-printStatus"
|
|
|
+ code="PRINT_STATUS"
|
|
|
placeholder="请选择打印状态"
|
|
|
allowClear
|
|
|
></v-select>
|
|
@@ -49,12 +49,21 @@
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
+ <!-- 操作按钮 -->
|
|
|
+ <div class="table-operator">
|
|
|
+ <a-button type="primary" @click="handlePlPrint()" class="button-error">批量打印</a-button>
|
|
|
+ <span style="margin-left: 8px">
|
|
|
+ <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<!-- 列表 -->
|
|
|
<s-table
|
|
|
class="sTable fixPagination"
|
|
|
ref="table"
|
|
|
:style="{ height: tableHeight+80.5+'px' }"
|
|
|
+ :row-selection="{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: (record.printStatus !== 'NO_PRINT'&&record.printStatus !== 'PRINT') } })}"
|
|
|
+ @rowSelection="rowSelectionFun"
|
|
|
size="small"
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
@@ -62,28 +71,29 @@
|
|
|
:scroll="{ y:tableHeight }"
|
|
|
:defaultLoadData="false"
|
|
|
bordered>
|
|
|
- <!-- 单号 -->
|
|
|
- <template slot="bizNo" slot-scope="text, record">
|
|
|
- <span v-if="$hasPermissions('B_salesDetail')" class="link-bule" @click="handleDetail(record,0)">{{ record.bizNo }}</span>
|
|
|
- <span v-else>{{ record.bizNo }}</span>
|
|
|
+ <!-- 打印状态 -->
|
|
|
+ <template slot="printStatus" slot-scope="text, record">
|
|
|
+ <span v-if="record.printStatus=='NO_PRINT'" class="link-bule" @click="handlePrintStatus(record)">{{ record.printStatusDictValue }}</span>
|
|
|
+ <span v-else>{{ record.printStatusDictValue }}</span>
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- v-if="record.voidFlag == 0 && record.printState == 'NO_PRINT'&&$hasPermissions('B_SkPrint')"
|
|
|
- class="button-warning"
|
|
|
- @click="handlePrint(record)"
|
|
|
- >收款打印</a-button>
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- class="button-warning"
|
|
|
- v-else-if="record.printState == 'PRINT'&&$hasPermissions('B_SKPrintRecord')"
|
|
|
- @click="viewPrint(record)"
|
|
|
- >打印记录</a-button>
|
|
|
- <span v-else>--</span>
|
|
|
+ <div>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ v-if="(record.printStatus == 'NO_PRINT'||record.printStatus == 'PRINT')&&$hasPermissions('B_SkPrint')"
|
|
|
+ class="button-warning"
|
|
|
+ @click="handlePrint(record)"
|
|
|
+ >收款打印</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-warning"
|
|
|
+ v-if="record.printStatus == 'PRINT'&&$hasPermissions('B_SKPrintRecord')"
|
|
|
+ @click="viewPrint(record)"
|
|
|
+ >打印记录</a-button>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
|
|
@@ -99,16 +109,15 @@
|
|
|
</commonModal>
|
|
|
<!-- 打印记录 -->
|
|
|
<recordModal v-drag ref="recordModal" modalTit="打印记录" :openModal="showRecordModal" @cancel="showRecordModal=false"></recordModal>
|
|
|
- <!-- 查看销售单或备货单详情 -->
|
|
|
- <commonModal
|
|
|
- :modalTit="detailType?'备货单详情':'销售单详情'"
|
|
|
- bodyPadding="10px"
|
|
|
- width="70%"
|
|
|
- :showFooter="false"
|
|
|
- :openModal="showDetailModal"
|
|
|
- @cancel="cancelDetail">
|
|
|
- <salesDetail v-if="detailType==0" ref="salesDetail" :bizSn="bizSn"></salesDetail>
|
|
|
- <dispatchDetail v-if="detailType==1" ref="dispatchDetail" :bizSn="bizSn"></dispatchDetail>
|
|
|
+ <!-- 操作提示 -->
|
|
|
+ <commonModal modalTit="操作提示" okText="暂不打印" :openModal="showPrintModal" @cancel="canselModal" @ok="updatePrintStatus">
|
|
|
+ <div style="text-align: center;">
|
|
|
+ <div style="margin-bottom: 15px;font-size: 14px;">如需将打印状态回退至<strong>【暂不打印】</strong>,请点击下方按钮</div>
|
|
|
+ <div style="line-height: 24px;">
|
|
|
+ <div>收款单号:{{ tipData&&tipData.bookNo }}</div>
|
|
|
+ <div>客户名称:{{ tipData&&tipData.payerName }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</commonModal>
|
|
|
</a-spin>
|
|
|
</a-card>
|
|
@@ -119,27 +128,20 @@
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
-import subarea from '@/views/common/subarea.js'
|
|
|
-import Area from '@/views/common/area.js'
|
|
|
import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
|
import commonModal from '@/views/common/commonModal.vue'
|
|
|
-import salesDetail from '@/views/salesManagement/salesQuery/detail.vue'
|
|
|
-import dispatchDetail from '@/views/salesManagement/pushOrderManagement/detail.vue'
|
|
|
import recordModal from './recordModal.vue'
|
|
|
import printModel from './printModel.vue'
|
|
|
-import { financeBookDetailList } from '@/api/financeBook'
|
|
|
+import { financeBookDetailList, updateFinanceBookDetail } from '@/api/financeBook'
|
|
|
export default {
|
|
|
name: 'ReceiptPrintList',
|
|
|
mixins: [commonMixin],
|
|
|
- components: { STable, VSelect, dealerSubareaScopeList, rangeDate, subarea, commonModal, recordModal, Area, printModel, salesDetail, dispatchDetail },
|
|
|
+ components: { STable, VSelect, dealerSubareaScopeList, rangeDate, commonModal, recordModal, printModel },
|
|
|
data () {
|
|
|
return {
|
|
|
spinning: false,
|
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
- showDetailModal: false,
|
|
|
- detailType: 2,
|
|
|
- bizSn: null,
|
|
|
tableHeight: 0,
|
|
|
time: [],
|
|
|
currentTab: 2,
|
|
@@ -147,15 +149,12 @@ export default {
|
|
|
queryParam: {
|
|
|
beginDate: '',
|
|
|
endDate: '',
|
|
|
- beginDateSettle: '',
|
|
|
- endDateSettle: '',
|
|
|
bookNo: '',
|
|
|
payerName: '',
|
|
|
subareaSn: undefined,
|
|
|
billStatus: undefined,
|
|
|
- voidFlag: 0,
|
|
|
dealerProvinceSn: undefined,
|
|
|
- printState: 'NO_PRINT'
|
|
|
+ printStatus: 'NO_PRINT'
|
|
|
},
|
|
|
totalData: {
|
|
|
totalAmount: 0,
|
|
@@ -164,6 +163,8 @@ export default {
|
|
|
},
|
|
|
showTipModal: false,
|
|
|
showRecordModal: false,
|
|
|
+ showPrintModal: false,
|
|
|
+ tipData: null,
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
@@ -181,18 +182,19 @@ export default {
|
|
|
this.spinning = false
|
|
|
return data
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+ rowSelectionInfo: null // 批量选择的数据
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
columns () {
|
|
|
const arr = [
|
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
- { title: '允许打印时间', dataIndex: 'auditDate', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '允许打印时间', dataIndex: 'allowPrintTime', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '收款单号', dataIndex: 'bookNo', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '收款日期', dataIndex: 'receiptDate', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '客户名称', dataIndex: 'payerName', align: 'left', width: '10%', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '财务编码', dataIndex: 'kdMidCustomerFnumber', align: 'left', width: '10%', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '财务编码', dataIndex: 'dealerEntity.kdMidCustomerFnumber', align: 'left', width: '10%', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '订单金额', dataIndex: 'orderAmount', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '收款金额', dataIndex: 'receiptAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '使用授信', dataIndex: 'useCreditAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
@@ -201,8 +203,8 @@ export default {
|
|
|
{ title: '汇入银行', dataIndex: 'bankName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '足额打款', dataIndex: 'fullPaymentFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '说明', dataIndex: 'remarks', 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: '收款打印状态', dataIndex: 'printStatusDictValue', width: '6%', align: 'center', scopedSlots: { customRender: 'printStatus' } },
|
|
|
+ { title: '打印次数', dataIndex: 'printNum', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
|
|
|
]
|
|
|
return arr
|
|
@@ -214,6 +216,17 @@ export default {
|
|
|
this.pageInit()
|
|
|
this.resetSearchForm()
|
|
|
},
|
|
|
+ // 表格选中项
|
|
|
+ rowSelectionFun (obj) {
|
|
|
+ this.rowSelectionInfo = obj || null
|
|
|
+ },
|
|
|
+ handlePlPrint () {
|
|
|
+ const _this = this
|
|
|
+ const slen = _this.rowSelectionInfo.selectedRowKeys.length
|
|
|
+ if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && slen < 1)) {
|
|
|
+ _this.$message.warning('请在列表勾选后再进行批量操作!')
|
|
|
+ }
|
|
|
+ },
|
|
|
// 时间 change
|
|
|
dateChange (date) {
|
|
|
this.queryParam.beginDate = date[0] ? date[0] : ''
|
|
@@ -222,15 +235,22 @@ export default {
|
|
|
custChange (val) {
|
|
|
this.queryParam.payerName = val.name
|
|
|
},
|
|
|
- handleDetail (row, type) {
|
|
|
- this.detailType = type
|
|
|
- this.bizSn = type == 0 ? row.bizSn : row.dispatchBillSn
|
|
|
- this.showDetailModal = true
|
|
|
+ handlePrintStatus (row) {
|
|
|
+ this.tipData = row
|
|
|
+ this.showPrintModal = true
|
|
|
},
|
|
|
- cancelDetail () {
|
|
|
- this.showDetailModal = false
|
|
|
- this.detailType = 2
|
|
|
- this.bizSn = null
|
|
|
+ canselModal () {
|
|
|
+ this.tipData = null
|
|
|
+ this.showPrintModal = false
|
|
|
+ },
|
|
|
+ updatePrintStatus () {
|
|
|
+ updateFinanceBookDetail({ id: this.tipData.id, printStatus: 'UNABLE_PRINT' }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.canselModal()
|
|
|
+ this.$message.info(res.message)
|
|
|
+ this.$refs.table.refresh()
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
// 收款打印
|
|
|
handlePrint (row) {
|
|
@@ -251,7 +271,7 @@ export default {
|
|
|
this.showRecordModal = true
|
|
|
this.$refs.recordModal.setData(row, {
|
|
|
billType: 'SETTLE_RECEIPT',
|
|
|
- billSn: row.accountReceiptSn
|
|
|
+ billSn: row.bookSn
|
|
|
})
|
|
|
},
|
|
|
// 重置
|
|
@@ -266,9 +286,8 @@ export default {
|
|
|
payerName: '',
|
|
|
subareaSn: undefined,
|
|
|
billStatus: undefined,
|
|
|
- voidFlag: this.currentTab == 2 ? '0' : undefined,
|
|
|
dealerProvinceSn: undefined,
|
|
|
- printState: this.currentTab == 2 ? 'NO_PRINT' : 'AUDIT_PASS'
|
|
|
+ printStatus: this.currentTab == 2 ? 'NO_PRINT' : undefined
|
|
|
}
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|