|
@@ -15,6 +15,26 @@
|
|
|
<a-input id="collectionDetail-bookNo" v-model.trim="queryParam.bookNo" allowClear placeholder="请输入收款单号"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="收款打印状态">
|
|
|
+ <v-select
|
|
|
+ v-model="queryParam.printStatus"
|
|
|
+ code="PRINT_STATUS"
|
|
|
+ placeholder="请选择收款打印状态"
|
|
|
+ allowClear
|
|
|
+ ></v-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="开票状态">
|
|
|
+ <v-select
|
|
|
+ v-model="queryParam.invoiceStatus"
|
|
|
+ code="FINANCE_BOOK_INVOICE_STATUS"
|
|
|
+ placeholder="请选择开票状态"
|
|
|
+ allowClear
|
|
|
+ ></v-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="申请人">
|
|
|
<employee style="width: 100%;" id="collectionDetail-Employee" placeholder="请选择申请人" v-model="queryParam.applyPersonSn"></employee>
|
|
@@ -78,18 +98,6 @@
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="开票状态">
|
|
|
- <a-select v-model="queryParam.invoiceDateType" style="width: 100%" placeholder="请选择开票状态">
|
|
|
- <a-select-option value="1">
|
|
|
- 已开票
|
|
|
- </a-select-option>
|
|
|
- <a-select-option value="0">
|
|
|
- 未开票
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="开票日期">
|
|
|
<rangeDate ref="invoiceDate" :value="invoiceDate" @change="invoiceDateChange" />
|
|
@@ -182,6 +190,7 @@
|
|
|
</a-spin>
|
|
|
<!-- 开票日期弹窗 -->
|
|
|
<invoiceModal v-drag :show="invoiceIsShow" :info="invoiceInfo" @cancel="cancel"></invoiceModal>
|
|
|
+ <plInvoiceModal v-drag :show="plinvoiceIsShow" @ok="plinvoiceOk" @cancel="cancel"></plInvoiceModal>
|
|
|
<!-- 备注弹窗 -->
|
|
|
<noteModal ref="remarksModal" v-drag :show="noteIsShow" @cancel="cancel"></noteModal>
|
|
|
<!-- 收款打印状态 -->
|
|
@@ -202,17 +211,19 @@ import { hdExportExcel } from '@/libs/exportExcel'
|
|
|
import employee from '../../expenseManagement/expenseReimbursement/employee.js'
|
|
|
import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
|
import invoiceModal from './invoiceModal.vue'
|
|
|
+import plInvoiceModal from './plInvoiceModal.vue'
|
|
|
import noteModal from './noteModal.vue'
|
|
|
import printModal from './printModal.vue'
|
|
|
-import { financeBookDetailQueryPage, financeBookDetailExport, financeBookReportDetailCount } from '@/api/financeBook.js'
|
|
|
+import { financeBookDetailQueryPage, financeBookDetailExport, financeBookReportDetailCount, financeBookDetailUpdateBatch } from '@/api/financeBook.js'
|
|
|
export default {
|
|
|
name: 'CollectionDetailStaticList',
|
|
|
mixins: [commonMixin],
|
|
|
- components: { STable, VSelect, rangeDate, employee, dealerSubareaScopeList, subarea, Area, invoiceModal, noteModal, printModal },
|
|
|
+ components: { STable, VSelect, rangeDate, employee, dealerSubareaScopeList, subarea, Area, invoiceModal, plInvoiceModal, noteModal, printModal },
|
|
|
data () {
|
|
|
return {
|
|
|
spinning: false,
|
|
|
exportLoading: false,
|
|
|
+ plinvoiceIsShow: false,
|
|
|
tableHeight: 0,
|
|
|
queryParam: { // 查询条件
|
|
|
bookNo: '',
|
|
@@ -229,6 +240,8 @@ export default {
|
|
|
bankName: undefined,
|
|
|
subareaSn: undefined,
|
|
|
provinceSn: undefined,
|
|
|
+ printStatus: undefined,
|
|
|
+ invoiceStatus: undefined,
|
|
|
invoiceDateType: undefined,
|
|
|
invoiceBeginDate: '',
|
|
|
invoiceEndDate: '',
|
|
@@ -240,6 +253,7 @@ export default {
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
receiptDate: [], // 收款时间
|
|
|
invoiceDate: [], // 开票日期
|
|
|
+ plinvoiceInfo: null,
|
|
|
auditDate: [
|
|
|
getDate.getCurrMonthDays().starttime,
|
|
|
getDate.getCurrMonthDays().endtime
|
|
@@ -329,11 +343,15 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
// 关闭弹窗刷新表格
|
|
|
- cancel () {
|
|
|
+ cancel (flag) {
|
|
|
+ console.log(flag)
|
|
|
this.invoiceIsShow = false
|
|
|
this.noteIsShow = false
|
|
|
this.printIsShow = false
|
|
|
- this.searchForm()
|
|
|
+ this.plinvoiceIsShow = false
|
|
|
+ if(flag === 1){
|
|
|
+ this.searchForm()
|
|
|
+ }
|
|
|
},
|
|
|
getCount (params) {
|
|
|
financeBookReportDetailCount(params).then(res => {
|
|
@@ -351,22 +369,55 @@ export default {
|
|
|
}
|
|
|
|
|
|
if(e.key == 1){ // 批量允许打印
|
|
|
- const dataList = rows.filter(item => item.printStatus=='NO_PRINT' || item.printStatus=='PRINT')
|
|
|
- this.$confirm({
|
|
|
- title: '批量允许打印',
|
|
|
- content: `已选有效数据 ${dataList.length} 条,确认将收款打印状态变更为允许打印吗?`,
|
|
|
- okText: '确定',
|
|
|
- centered: true,
|
|
|
- cancelText: '取消',
|
|
|
- onOk () {
|
|
|
- // 批量允许打印接口
|
|
|
+ const dataList = rows.filter(item => !(item.printStatus=='NO_PRINT' || item.printStatus=='PRINT'))
|
|
|
+ if(dataList.length){
|
|
|
+ this.$confirm({
|
|
|
+ title: '批量允许打印',
|
|
|
+ content: `已选有效数据 ${dataList.length} 条,确认将收款打印状态变更为允许打印吗?`,
|
|
|
+ okText: '确定',
|
|
|
+ centered: true,
|
|
|
+ cancelText: '取消',
|
|
|
+ onOk () {
|
|
|
+ // 批量允许打印接口
|
|
|
+ const data = []
|
|
|
+ dataList.map(item => {
|
|
|
+ data.push({id: item.id, printStatus: 'NO_PRINT' })
|
|
|
+ })
|
|
|
+ _this.plUpdateStatus(data)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ _this.$message.warning('没有可操作的有效数据!')
|
|
|
}
|
|
|
- })
|
|
|
}
|
|
|
+
|
|
|
if(e.key == 2){ // 批量开票
|
|
|
-
|
|
|
+ const data = []
|
|
|
+ rows.map(item => {
|
|
|
+ data.push({id: item.id, invoiceDate: '', remarks: '' })
|
|
|
+ })
|
|
|
+ _this.plinvoiceInfo = data
|
|
|
+ _this.plinvoiceIsShow = true
|
|
|
}
|
|
|
},
|
|
|
+ // 批量操作
|
|
|
+ plUpdateStatus(data){
|
|
|
+ this.spinning = true
|
|
|
+ financeBookDetailUpdateBatch(data).then(res => {
|
|
|
+ if(res.status == 200){
|
|
|
+ this.searchForm()
|
|
|
+ }
|
|
|
+ this.spinning = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 确定批量开票
|
|
|
+ plinvoiceOk(data){
|
|
|
+ this.plinvoiceInfo.map(item => {
|
|
|
+ item.invoiceDate = data.invoiceDate
|
|
|
+ item.remarks = data.remarks
|
|
|
+ })
|
|
|
+ this.plUpdateStatus(this.plinvoiceInfo)
|
|
|
+ },
|
|
|
// 表格选中项
|
|
|
rowSelectionFun (obj) {
|
|
|
this.rowSelectionInfo = obj || null
|
|
@@ -437,6 +488,8 @@ export default {
|
|
|
this.queryParam.provinceSn = undefined
|
|
|
this.queryParam.invoiceDateType = undefined
|
|
|
this.queryParam.invoiceDate = ''
|
|
|
+ this.queryParam.printStatus = undefined
|
|
|
+ this.queryParam.invoiceStatus = undefined
|
|
|
this.queryParam.payerType = undefined
|
|
|
this.searchForm()
|
|
|
},
|
|
@@ -460,8 +513,9 @@ export default {
|
|
|
},
|
|
|
setTableH () {
|
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
- this.tableHeight = window.innerHeight - tableSearchH - 205
|
|
|
+ this.tableHeight = window.innerHeight - tableSearchH - 310
|
|
|
},
|
|
|
+ // 开票操作
|
|
|
handleInvoice (con) {
|
|
|
const obj = {
|
|
|
no: con.bookNo,
|
|
@@ -487,6 +541,7 @@ export default {
|
|
|
_this.$refs.remarksModal.setData(JSON.stringify(obj))
|
|
|
})
|
|
|
},
|
|
|
+ // 允许打印
|
|
|
handlePrint (item) {
|
|
|
const obj = {
|
|
|
no: item.bookNo,
|