|
@@ -14,106 +14,56 @@
|
|
|
<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="创建时间">
|
|
|
+ <a-col :md="8" :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-col :md="8" :sm="24">
|
|
|
+ <a-form-item label="收款单号">
|
|
|
+ <a-input id="salesCollectionList-bookNo" v-model.trim="queryParam.bookNo" allowClear placeholder="请输入备货单号"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="8" :sm="24">
|
|
|
<a-form-item label="客户名称">
|
|
|
- <dealerSubareaScopeList ref="settleClientName" id="salesCollectionList-settleClientName" @change="custChange" />
|
|
|
+ <dealerSubareaScopeList ref="payerName" id="salesCollectionList-payerName" @change="custChange" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="销售单号">
|
|
|
- <a-input id="salesCollectionList-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入销售单号"/>
|
|
|
+ <a-col :md="8" :sm="24" v-if="currentTab == 1">
|
|
|
+ <a-form-item label="收款打印状态">
|
|
|
+ <v-select
|
|
|
+ v-model="queryParam.printStatus"
|
|
|
+ ref="printStatus"
|
|
|
+ id="salesCollectionList-printStatus"
|
|
|
+ code="PRINT_STATUS"
|
|
|
+ placeholder="请选择打印状态"
|
|
|
+ allowClear
|
|
|
+ ></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <template v-if="advanced">
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="备货单号">
|
|
|
- <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="收货客户名称">
|
|
|
- <dealerSubareaScopeList ref="receiverName" id="salesCollectionList-receiverName" @change="receiverChange" />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="业务状态">
|
|
|
- <v-select
|
|
|
- v-model="queryParam.billStatus"
|
|
|
- ref="billStatus"
|
|
|
- id="salesCollectionList-billStatus"
|
|
|
- code="DISPATCH_BILL_STATUS"
|
|
|
- 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.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="RECEIPT_PRINT"
|
|
|
- placeholder="请选择打印状态"
|
|
|
- allowClear
|
|
|
- ></v-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="收款时间">
|
|
|
- <rangeDate ref="rangeSettleDate" :value="settleDate" @change="dateSettleChange" />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- <a-form-item label="所在区域">
|
|
|
- <subarea id="salesCollectionList-subarea" v-model="queryParam.subareaSn"></subarea>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- <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">
|
|
|
- <span class="table-page-search-submitButtons">
|
|
|
+ <a-col :offset="currentTab==2?8:0" :md="16" :sm="24">
|
|
|
+ <span style="float: right;" 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 @click="advanced=!advanced" style="margin-left: 8px">
|
|
|
- {{ advanced ? '收起' : '展开' }}
|
|
|
- <a-icon :type="advanced ? 'up' : 'down'"/>
|
|
|
- </a>
|
|
|
</span>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
+ <!-- 操作按钮 -->
|
|
|
+ <div class="table-operator" v-if="$hasPermissions('B_SkPrint')">
|
|
|
+ <a-button type="primary" :loading="spinning" @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+60.5+'px' }"
|
|
|
+ :style="{ height: tableHeight+80.5+'px' }"
|
|
|
+ :row-selection="$hasPermissions('B_SkPrint')?{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: (record.printStatus !== 'NO_PRINT'&&record.printStatus !== 'PRINT') } })}:null"
|
|
|
+ @rowSelection="rowSelectionFun"
|
|
|
size="small"
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
@@ -121,58 +71,45 @@
|
|
|
: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>
|
|
|
- <!-- 下推单号 -->
|
|
|
- <template slot="dispatchBillNo" slot-scope="text, record">
|
|
|
- <span v-if="$hasPermissions('B_dispatchDetail')" class="link-bule" @click="handleDetail(record,1)">{{ record.dispatchBillNo }}</span>
|
|
|
- <span v-else>{{ record.dispatchBillNo || '--' }}</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,0,record)"
|
|
|
+ >收款打印</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-success"
|
|
|
+ v-if="record.printStatus == 'PRINT'&&$hasPermissions('B_SKPrintRecord')"
|
|
|
+ @click="viewPrint(record)"
|
|
|
+ >打印记录</a-button>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
|
|
|
<!-- 收款打印 -->
|
|
|
- <commonModal
|
|
|
- modalTit="收款打印预览"
|
|
|
- bodyPadding="10px"
|
|
|
- width="1024px"
|
|
|
- :showFooter="false"
|
|
|
- :openModal="showTipModal"
|
|
|
- @cancel="closeTipModal">
|
|
|
- <printModel ref="printModel" @cancel="closeTipModal" @printOk="printOk"></printModel>
|
|
|
- </commonModal>
|
|
|
+ <printModel ref="printModel" @cancel="closeTipModal" @printOk="printOk"></printModel>
|
|
|
<!-- 打印记录 -->
|
|
|
<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>
|
|
@@ -183,46 +120,33 @@
|
|
|
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 { settleReceiptList } from '@/api/settleReceipt'
|
|
|
+import { financeBookDetailList, updateFinanceBookDetail, getBatchLastProcessInstance } 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: [],
|
|
|
- settleDate: [],
|
|
|
currentTab: 2,
|
|
|
// 查询参数
|
|
|
queryParam: {
|
|
|
beginDate: '',
|
|
|
endDate: '',
|
|
|
- beginDateSettle: '',
|
|
|
- endDateSettle: '',
|
|
|
- bizNo: '',
|
|
|
- dispatchBillNo: '',
|
|
|
- settleClientName: '',
|
|
|
- receiverName: '',
|
|
|
+ bookNo: '',
|
|
|
+ payerName: '',
|
|
|
subareaSn: undefined,
|
|
|
billStatus: undefined,
|
|
|
- voidFlag: 0,
|
|
|
dealerProvinceSn: undefined,
|
|
|
- printState: 'NO_PRINT'
|
|
|
+ printStatus: 'NO_PRINT'
|
|
|
},
|
|
|
totalData: {
|
|
|
totalAmount: 0,
|
|
@@ -231,11 +155,17 @@ export default {
|
|
|
},
|
|
|
showTipModal: false,
|
|
|
showRecordModal: false,
|
|
|
+ showPrintModal: false,
|
|
|
+ tipData: null,
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
- return settleReceiptList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ if (this.currentTab == 1) {
|
|
|
+ this.queryParam.isAll = '1'
|
|
|
+ this.queryParam.status = 'AUDIT_PASS'
|
|
|
+ }
|
|
|
+ return financeBookDetailList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
@@ -248,33 +178,31 @@ export default {
|
|
|
this.spinning = false
|
|
|
return data
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+ rowSelectionInfo: null // 批量选择的数据
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
columns () {
|
|
|
const arr = [
|
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
- { 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: 'settleTime', width: '9%', 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: 'allowPrintTime', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '收款单号', dataIndex: 'bookNo', width: '10%', 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: '14%', 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 : '--') } },
|
|
|
+ { title: '余款抵扣', dataIndex: 'balanceAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '户名', dataIndex: 'bankAccount', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { 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: 'explainInfo', width: '6%', align: 'center', customRender: function (text) { return 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' }
|
|
|
]
|
|
|
-
|
|
|
- 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
|
|
|
}
|
|
|
},
|
|
@@ -284,78 +212,139 @@ export default {
|
|
|
this.pageInit()
|
|
|
this.resetSearchForm()
|
|
|
},
|
|
|
- // 时间 change
|
|
|
- dateChange (date) {
|
|
|
- this.queryParam.beginDate = date[0] ? date[0] : ''
|
|
|
- this.queryParam.endDate = date[1] ? date[1] : ''
|
|
|
- },
|
|
|
- // 收款时间 change
|
|
|
- dateSettleChange (date) {
|
|
|
- this.queryParam.beginDateSettle = date[0] ? date[0] : ''
|
|
|
- this.queryParam.endDateSettle = date[1] ? date[1] : ''
|
|
|
- },
|
|
|
- custChange (val) {
|
|
|
- this.queryParam.settleClientName = val.name
|
|
|
- },
|
|
|
- receiverChange (val) {
|
|
|
- this.queryParam.receiverName = val.name
|
|
|
+ // 表格选中项
|
|
|
+ rowSelectionFun (obj) {
|
|
|
+ this.rowSelectionInfo = obj || null
|
|
|
},
|
|
|
- handleDetail (row, type) {
|
|
|
- this.detailType = type
|
|
|
- this.bizSn = type == 0 ? row.bizSn : row.dispatchBillSn
|
|
|
- this.showDetailModal = true
|
|
|
+ // 批量打印
|
|
|
+ async handlePlPrint () {
|
|
|
+ const _this = this
|
|
|
+ const rows = _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRows || []
|
|
|
+ const slen = rows.length
|
|
|
+ if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && slen < 1)) {
|
|
|
+ _this.$message.warning('请在列表勾选后再进行批量操作!')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ this.spinning = true
|
|
|
+ const bookSns = []
|
|
|
+ rows.map(item => {
|
|
|
+ if (bookSns.indexOf(item.bookSn) < 0) {
|
|
|
+ bookSns.push(item.bookSn)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ const retArr = []
|
|
|
+ const auditInfo = await getBatchLastProcessInstance({ 'businessType': 'FINANCE_BOOK', 'businessSnList': bookSns }).then(res => res.data)
|
|
|
+ console.log(auditInfo)
|
|
|
+ bookSns.map(item => {
|
|
|
+ // 授信明细
|
|
|
+ const rs = rows.filter(a => a.bookSn == item)
|
|
|
+ let detailItemUseStr = ''
|
|
|
+ rs.map(b => {
|
|
|
+ if (b.detailItemUseList) {
|
|
|
+ b.detailItemUseList.map((k, i) => {
|
|
|
+ detailItemUseStr = detailItemUseStr + k.itemName + '(' + k.itemAmount + ')' + (i == b.detailItemUseList.length - 1 ? '。' : ';')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // 审核信息
|
|
|
+ const auditStr = this.getAuditInfo(auditInfo[item])
|
|
|
+ retArr.push({ audit: auditStr, detail: detailItemUseStr, subList: rs })
|
|
|
+ })
|
|
|
+ console.log(retArr, '------------')
|
|
|
+ this.handlePrint(retArr, 1, rows, bookSns)
|
|
|
},
|
|
|
- cancelDetail () {
|
|
|
- this.showDetailModal = false
|
|
|
- this.detailType = 2
|
|
|
- this.bizSn = null
|
|
|
+ // 获取审核信息
|
|
|
+ getAuditInfo (auditList) {
|
|
|
+ let auditStr = ''
|
|
|
+ if (auditList && auditList.taskVOList) {
|
|
|
+ const auditLists = auditList.taskVOList.filter(item => item.userType == '审批人')
|
|
|
+ auditLists.map((a, i) => {
|
|
|
+ auditStr = auditStr + a.userName + '(' + a.state + ')' + (i == auditLists.length - 1 ? '。' : ';')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return auditStr
|
|
|
},
|
|
|
// 收款打印
|
|
|
- handlePrint (row) {
|
|
|
+ async handlePrint (row, type, list, bookSns) {
|
|
|
+ this.spinning = true
|
|
|
this.showTipModal = true
|
|
|
+ let detailItemUseStr = ''
|
|
|
+ let auditInfo = null
|
|
|
+ if (type == 0) {
|
|
|
+ auditInfo = await getBatchLastProcessInstance({ 'businessType': 'FINANCE_BOOK', 'businessSnList': [list.bookSn] }).then(res => res.data)
|
|
|
+ }
|
|
|
+ console.log(auditInfo)
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.printModel.getData(row)
|
|
|
+ if (type == 0 && row.detailItemUseList) {
|
|
|
+ row.detailItemUseList.map(k => {
|
|
|
+ detailItemUseStr = detailItemUseStr + k.itemName + '(' + k.itemAmount + ');'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // 审核信息
|
|
|
+ const auditStr = auditInfo ? this.getAuditInfo(auditInfo[list.bookSn]) : ''
|
|
|
+ this.$refs.printModel.getData(type ? row : [{ audit: auditStr, detail: detailItemUseStr, subList: [row] }], type ? list : [list])
|
|
|
})
|
|
|
},
|
|
|
printOk () {
|
|
|
+ this.spinning = false
|
|
|
this.$refs.table.refresh()
|
|
|
},
|
|
|
+ // 时间 change
|
|
|
+ dateChange (date) {
|
|
|
+ this.queryParam.beginDate = date[0] ? date[0] : ''
|
|
|
+ this.queryParam.endDate = date[1] ? date[1] : ''
|
|
|
+ },
|
|
|
+ custChange (val) {
|
|
|
+ this.queryParam.payerName = val.name
|
|
|
+ },
|
|
|
+ handlePrintStatus (row) {
|
|
|
+ this.tipData = row
|
|
|
+ this.showPrintModal = true
|
|
|
+ },
|
|
|
+ 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()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
closeTipModal () {
|
|
|
this.showTipModal = false
|
|
|
+ this.spinning = false
|
|
|
this.$refs.printModel.clearData()
|
|
|
},
|
|
|
// 打印记录
|
|
|
viewPrint (row) {
|
|
|
this.showRecordModal = true
|
|
|
this.$refs.recordModal.setData(row, {
|
|
|
- billType: 'SETTLE_RECEIPT',
|
|
|
- billSn: row.accountReceiptSn
|
|
|
+ billType: 'FINANCE_BOOK_DETAIL',
|
|
|
+ billSn: row.bookDetailSn,
|
|
|
+ billNo: row.bookNo
|
|
|
})
|
|
|
},
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
this.time = []
|
|
|
- if (this.advanced) {
|
|
|
- this.$refs.rangeDate.resetDate(this.time)
|
|
|
- this.$refs.receiverName.resetForm()
|
|
|
- this.settleDate = []
|
|
|
- this.$refs.rangeSettleDate.resetDate()
|
|
|
- }
|
|
|
- this.$refs.settleClientName.resetForm()
|
|
|
+ this.$refs.rangeDate.resetDate(this.time)
|
|
|
+ this.$refs.payerName.resetForm()
|
|
|
this.queryParam = {
|
|
|
beginDate: '',
|
|
|
endDate: '',
|
|
|
- bizNo: '',
|
|
|
- dispatchBillNo: '',
|
|
|
- settleClientName: '',
|
|
|
- receiverName: '',
|
|
|
+ bookNo: '',
|
|
|
+ payerName: '',
|
|
|
subareaSn: undefined,
|
|
|
billStatus: undefined,
|
|
|
- voidFlag: this.currentTab == 2 ? '0' : undefined,
|
|
|
dealerProvinceSn: undefined,
|
|
|
- printState: this.currentTab == 2 ? 'NO_PRINT' : undefined
|
|
|
+ printStatus: this.currentTab == 2 ? 'NO_PRINT' : undefined
|
|
|
}
|
|
|
this.$refs.table.refresh(true)
|
|
|
+ this.$refs.table.clearSelected()
|
|
|
},
|
|
|
pageInit () {
|
|
|
const _this = this
|
|
@@ -365,16 +354,10 @@ export default {
|
|
|
},
|
|
|
setTableH () {
|
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
- this.tableHeight = window.innerHeight - tableSearchH - 228
|
|
|
+ this.tableHeight = window.innerHeight - tableSearchH - 250
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
- advanced (newValue, oldValue) {
|
|
|
- const _this = this
|
|
|
- this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
- _this.setTableH()
|
|
|
- })
|
|
|
- },
|
|
|
'$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
|
|
|
this.setTableH()
|
|
|
}
|