|
@@ -1,107 +1,120 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <a-modal class="modalBox" title="详情" v-model="isshow" @cancle="cancel" :footer="null" width="60%" :centered="true">
|
|
|
- <s-table ref="table" size="default" :rowKey="(record) => record.id" bordered :columns="columns" :data="loadData">
|
|
|
- </s-table>
|
|
|
- </a-modal>
|
|
|
- </div>
|
|
|
+ <div>
|
|
|
+ <a-modal
|
|
|
+ class="modalBox"
|
|
|
+ title="详情"
|
|
|
+ v-model="isshow"
|
|
|
+ @cancle="cancel"
|
|
|
+ :footer="null"
|
|
|
+ width="60%"
|
|
|
+ :centered="true">
|
|
|
+ <s-table
|
|
|
+ ref="table"
|
|
|
+ size="default"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
+ bordered
|
|
|
+ :columns="columns"
|
|
|
+ :data="loadData">
|
|
|
+ </s-table>
|
|
|
+ </a-modal>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { STable } from '@/components'
|
|
|
- import { SettlementRecordsDetailsList } from '@/api/FinancialManagement'
|
|
|
- export default {
|
|
|
- name: 'SettlementRecordsDetailsModal',
|
|
|
- components: {
|
|
|
- STable
|
|
|
- },
|
|
|
- props: {
|
|
|
- openModalDetails: {
|
|
|
- type: Boolean,
|
|
|
- default: false
|
|
|
- },
|
|
|
- itemId: {
|
|
|
- type: String,
|
|
|
- default: ''
|
|
|
- }
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- loadData: parameter => {
|
|
|
- return SettlementRecordsDetailsList({
|
|
|
- settleNo: this.itemId,
|
|
|
- pageNo: 1,
|
|
|
- pageSize: 10
|
|
|
- }).then(res => {
|
|
|
- const no = (res.data.pageNo - 1) * res.data.pageSize
|
|
|
- for (let i = 0; i < res.data.list.length; i++) {
|
|
|
- const _item = res.data.list[i]
|
|
|
- _item.no = no + i + 1
|
|
|
- }
|
|
|
- return res.data
|
|
|
- })
|
|
|
- },
|
|
|
- isshow: this.openModalDetails,
|
|
|
- settleId: '', // 套餐名称
|
|
|
- openWriteOffModal: false, // 核销弹窗默认关闭
|
|
|
- columns: [
|
|
|
- {
|
|
|
- title: '序号',
|
|
|
- dataIndex: 'no',
|
|
|
- width: '60px',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '订单号',
|
|
|
- dataIndex: 'orderBundleNo',
|
|
|
- width: '150px',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '下单时间',
|
|
|
- dataIndex: 'orderDate',
|
|
|
- width: '150px',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '套餐名称',
|
|
|
- dataIndex: 'bundleName',
|
|
|
- width: '150px',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '结算金额',
|
|
|
- dataIndex: 'settleAmount',
|
|
|
- align: 'center',
|
|
|
- width: '150px'
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- // 关闭弹窗
|
|
|
- cancel(e) {
|
|
|
- this.$emit('close')
|
|
|
- }
|
|
|
- },
|
|
|
- watch: {
|
|
|
- openModalDetails(newValue, oldValue) {
|
|
|
- this.isshow = newValue
|
|
|
- console.log(this.isshow)
|
|
|
- },
|
|
|
- isshow(val) {
|
|
|
- if (!val) {
|
|
|
- this.$emit('close')
|
|
|
- }
|
|
|
- },
|
|
|
- itemId(newValue, oldValue) {
|
|
|
- console.log(newValue)
|
|
|
- if (newValue && this.isshow) {
|
|
|
- this.$refs.table.refresh(newValue)
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+import { STable } from '@/components'
|
|
|
+import { SettlementRecordsDetailsList } from '@/api/FinancialManagement'
|
|
|
+export default {
|
|
|
+ name: 'SettlementRecordsDetailsModal',
|
|
|
+ components: {
|
|
|
+ STable
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ openModalDetails: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ },
|
|
|
+ itemId: {
|
|
|
+ type: String,
|
|
|
+ default: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ loadData: parameter => {
|
|
|
+ return SettlementRecordsDetailsList({
|
|
|
+ settleNo: this.itemId,
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 10
|
|
|
+ }).then(res => {
|
|
|
+ const no = (res.data.pageNo - 1) * res.data.pageSize
|
|
|
+ for (let i = 0; i < res.data.list.length; i++) {
|
|
|
+ const _item = res.data.list[i]
|
|
|
+ _item.no = no + i + 1
|
|
|
+ }
|
|
|
+ return res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ isshow: this.openModalDetails,
|
|
|
+ settleId: '', // 套餐名称
|
|
|
+ openWriteOffModal: false, // 核销弹窗默认关闭
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ title: '序号',
|
|
|
+ dataIndex: 'no',
|
|
|
+ width: '60px',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '订单号',
|
|
|
+ dataIndex: 'orderBundleNo',
|
|
|
+ width: '150px',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '下单时间',
|
|
|
+ dataIndex: 'orderDate',
|
|
|
+ width: '150px',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '套餐名称',
|
|
|
+ dataIndex: 'bundleName',
|
|
|
+ width: '150px',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '结算金额',
|
|
|
+ dataIndex: 'settleAmount',
|
|
|
+ align: 'center',
|
|
|
+ width: '150px'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 关闭弹窗
|
|
|
+ cancel (e) {
|
|
|
+ this.$emit('close')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ openModalDetails (newValue, oldValue) {
|
|
|
+ this.isshow = newValue
|
|
|
+ console.log(this.isshow)
|
|
|
+ },
|
|
|
+ isshow (val) {
|
|
|
+ if (!val) {
|
|
|
+ this.$emit('close')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ itemId (newValue, oldValue) {
|
|
|
+ console.log(newValue)
|
|
|
+ if (newValue && this.isshow) {
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style>
|