|
@@ -0,0 +1,166 @@
|
|
|
+<template>
|
|
|
+ <div class="companyCollectionPaymentDetail-wrap">
|
|
|
+ <a-page-header :ghost="false" @back="handleBack" >
|
|
|
+ <!-- 自定义的二级文字标题 -->
|
|
|
+ <template slot="subTitle">
|
|
|
+ <a id="companyCollectionPaymentDetail-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
|
|
|
+ </template>
|
|
|
+ <!-- 操作区,位于 title 行的行尾 -->
|
|
|
+ <template slot="extra">
|
|
|
+ <a-button key="2" id="companyCollectionPaymentDetail-preview-btn">打印预览</a-button>
|
|
|
+ <a-button key="1" type="primary" id="companyCollectionPaymentDetail-print-btn">快速打印</a-button>
|
|
|
+ </template>
|
|
|
+ </a-page-header>
|
|
|
+ <!-- 内容 -->
|
|
|
+ <a-page-header title="客户:监管营销中心" ></a-page-header>
|
|
|
+ <a-card>
|
|
|
+ <!-- 搜索条件 -->
|
|
|
+ <div class="table-page-search-wrapper">
|
|
|
+ <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
+ <a-row :gutter="15">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="单据号">
|
|
|
+ <a-input id="companyReceivablePayableDetail-purchaseNo" v-model.trim="queryParam.purchaseNo" allowClear placeholder="请输入单据号"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="审核时间">
|
|
|
+ <a-range-picker v-model="queryParam.creatDate" id="companyCollectionPaymentDetail-creatDate"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <span class="table-page-search-submitButtons">
|
|
|
+ <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="companyReceivablePayableDetail-refresh">查询</a-button>
|
|
|
+ <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="companyReceivablePayableDetail-reset">重置</a-button>
|
|
|
+ <a-button type="danger" style="margin-left: 8px" @click="handleExport" :disabled="disabled" :loading="exportLoading" id="companyReceivablePayableDetail-export-btn">导出</a-button>
|
|
|
+ </span>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </div>
|
|
|
+ <!-- alert -->
|
|
|
+ <a-alert type="info" showIcon style="margin-bottom:15px">
|
|
|
+ <div slot="message">共 <strong>6</strong> 条明细,金额合计 <strong>¥14</strong> ,余额合计 <strong>¥14</strong> </div>
|
|
|
+ </a-alert>
|
|
|
+ <!-- 列表 -->
|
|
|
+ <s-table
|
|
|
+ class="sTable"
|
|
|
+ ref="table"
|
|
|
+ size="default"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
+ :columns="columns"
|
|
|
+ :data="loadData"
|
|
|
+ bordered>
|
|
|
+ <!-- 采购数量 -->
|
|
|
+ <template slot="purchaseNum" slot-scope="text, record">
|
|
|
+ <span>{{record.purchaseNum}}</span>
|
|
|
+ </template>
|
|
|
+ <!-- 缺货数量 -->
|
|
|
+ <template slot="outOfStockNum" slot-scope="text, record">
|
|
|
+ <span>{{record.outOfStockNum}}</span>
|
|
|
+ </template>
|
|
|
+ </s-table>
|
|
|
+ </a-card>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import { STable, VSelect } from '@/components'
|
|
|
+ export default{
|
|
|
+ components: { STable, VSelect },
|
|
|
+ data(){
|
|
|
+ return{
|
|
|
+ disabled: false, // 查询、重置按钮是否可操作
|
|
|
+ // 查询参数
|
|
|
+ queryParam: {},
|
|
|
+ exportLoading: false, // 导出loading
|
|
|
+ // 表头
|
|
|
+ columns: [
|
|
|
+ { title: '序号', dataIndex: 'no', align: 'center' },
|
|
|
+ { title: '单据号', dataIndex: 'creatDate', align: 'center' },
|
|
|
+ { title: '类型', dataIndex: 'custName', align: 'center' },
|
|
|
+ { title: '审核时间', dataIndex: 'totalP', align: 'center' },
|
|
|
+ { title: '金额', scopedSlots: { customRender: 'purchaseNum' }, align: 'center' },
|
|
|
+ { title: '余额', scopedSlots: { customRender: 'purchasesNum' }, align: 'center' },
|
|
|
+ ],
|
|
|
+ // 加载数据方法 必须为 Promise 对象
|
|
|
+ loadData: parameter => {
|
|
|
+ this.disabled = true
|
|
|
+ // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
|
|
|
+ // const data = res.data
|
|
|
+ // const no = (data.pageNo - 1) * data.pageSize
|
|
|
+ // for (var i = 0; i < data.list.length; i++) {
|
|
|
+ // data.list[i].no = no + i + 1
|
|
|
+ // }
|
|
|
+ // this.disabled = false
|
|
|
+ // return data
|
|
|
+ // })
|
|
|
+ const _this = this
|
|
|
+ return new Promise(function(resolve, reject){
|
|
|
+ const data = {
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ list: [
|
|
|
+ { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
|
|
|
+ ],
|
|
|
+ count: 10
|
|
|
+ }
|
|
|
+ const no = (data.pageNo - 1) * data.pageSize
|
|
|
+ for (var i = 0; i < data.list.length; i++) {
|
|
|
+ data.list[i].no = no + i + 1
|
|
|
+ }
|
|
|
+ _this.disabled = false
|
|
|
+ resolve(data)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 返回列表
|
|
|
+ handleBack(){
|
|
|
+ this.$router.push({ path: '/financialManagement/companyCollectionPayment/list'})
|
|
|
+ },
|
|
|
+ // 导出
|
|
|
+ handleExport () {
|
|
|
+ const params = this.queryParam
|
|
|
+ if (this.oldTime && this.oldTime.length > 0) {
|
|
|
+ params.beginOldExpiryDate = moment(this.oldTime[0]).format('YYYY-MM-DD')
|
|
|
+ params.endOldExpirydDate = moment(this.oldTime[1]).format('YYYY-MM-DD')
|
|
|
+ } else {
|
|
|
+ params.beginOldExpiryDate = ''
|
|
|
+ params.endOldExpirydDate = ''
|
|
|
+ }
|
|
|
+ if (this.newTime && this.newTime.length > 0) {
|
|
|
+ params.beginDate = moment(this.newTime[0]).format('YYYY-MM-DD')
|
|
|
+ params.endDate = moment(this.newTime[1]).format('YYYY-MM-DD')
|
|
|
+ } else {
|
|
|
+ params.beginDate = ''
|
|
|
+ params.endDate = ''
|
|
|
+ }
|
|
|
+ this.exportLoading = true
|
|
|
+ customerBundleExportDelay(params).then(res => {
|
|
|
+ this.exportLoading = false
|
|
|
+ this.download(res)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ download (data) {
|
|
|
+ if (!data) { return }
|
|
|
+ const url = window.URL.createObjectURL(new Blob([data]))
|
|
|
+ const link = document.createElement('a')
|
|
|
+ link.style.display = 'none'
|
|
|
+ link.href = url
|
|
|
+ const a = moment().format('YYYYMMDDHHmmss')
|
|
|
+ const fname = '仓库调拨' + a
|
|
|
+ link.setAttribute('download', fname + '.xlsx')
|
|
|
+ document.body.appendChild(link)
|
|
|
+ link.click()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less">
|
|
|
+ .companyCollectionPaymentDetail-cont{
|
|
|
+ margin-bottom: 15px;
|
|
|
+ }
|
|
|
+</style>
|