| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <template>
- <ele-modal
- custom-class="ele-dialog-form long-dialog-form"
- :centered="true"
- :visible.sync="paymentDialogFlag"
- :title="title"
- :append-to-body="false"
- :close-on-click-modal="false"
- width="60%"
- :before-close="cancel"
- :maxable="true"
- :resizable="true"
- >
- <info-table ref="feeRelatedInfoTable" v-if="form.id" :form.sync="form"></info-table>
- <div slot="footer">
- <el-button type="primary" @click="handleSave(0)">保存</el-button>
- <el-button @click="cancel">返回</el-button>
- </div>
- </ele-modal>
- </template>
- <script>
- import infoTable from "./infoTable.vue";
- import {finPayableSaveAPI, getFinPayableInfoAPI, finPayableUpdateAmountAPI} from "@/api/financialManage/payableManage";
- export default {
- name: "collectionDialog",
- components: {
- infoTable
- },
- props: {
- paymentDialogFlag: {
- type: Boolean,
- default: false
- },
- },
- computed: {},
- data() {
- return {
- dialogType: '',
- title: '',
- form: {
- id: '',
- },
- rules: {}
- }
- },
- created() {
- },
- methods: {
- //初始化
- async init(row = {}, type) {
- this.title = '付款'
- this.dialogType = type
- await this.getInfo(row.id)
- },
- //获取详情
- async getInfo(id) {
- this.form = await getFinPayableInfoAPI(id)
- },
- //
- async handleSave() {
-
- let data = await this.$refs.feeRelatedInfoTable.getTableValidate()
- console.log('data~~~', data)
- let detailList = data[0]
- let payableTotalPrice = data[1]
- await finPayableUpdateAmountAPI(this.form.id, {
- payableTotalPrice: payableTotalPrice
- })
- await finPayableSaveAPI(detailList)
- this.$message.success('操作成功')
- this.done()
- this.cancel()
- },
- //刷新主列表数据
- done() {
- this.$emit('reload')
- },
- //关闭弹窗
- cancel() {
- this.$emit('update:paymentDialogFlag', false)
- }
- }
- }
- </script>
- <style scoped lang="scss">
- </style>
|