| | |
| | | <el-link size="small" type="primary" v-if="row.status != 2" |
| | | @click="handleJs(row)" class="link-btn" :underline="false" |
| | | icon="el-icon-tickets">结算 |
| | | </el-link><el-link size="small" type="primary" |
| | | </el-link> |
| | | <el-link size="small" type="primary" |
| | | @click="handleEdit(row)" class="link-btn" :underline="false" |
| | | icon="el-icon-edit">修改 |
| | | </el-link> |
| | | <el-link size="small" type="primary" |
| | | @click="handleLog(row)" class="link-btn" :underline="false" |
| | | icon="el-icon-tickets">日志 |
| | | </el-link> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | |
| | | <el-dialog :title="pageF.title" v-model="pageF.open" class="avue-dialog avue-dialog--top" width="80%"> |
| | | |
| | | <avue-form v-model="boxForm" ref="boxFormRef" |
| | | <avue-form v-if="opt == 'js'" v-model="boxForm" ref="boxFormRef" |
| | | :option="boxFormOption"> |
| | | <template #settleAmount> |
| | | <avue-input-number :min="0" :max="form.actualSettlementAmount" v-model="boxForm.settleAmount" placeholder="请输入结算金额"></avue-input-number> |
| | | |
| | | </template> |
| | | </avue-form> |
| | | <el-descriptions :column="3" title="账单基本信息" border> |
| | | <el-descriptions-item label="账单系统编号">{{form.systemNo}}</el-descriptions-item> |
| | |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="客户名称">{{form.customerName}}</el-descriptions-item> |
| | | <el-descriptions-item label="应结算金额">{{form.settleAmount}}</el-descriptions-item> |
| | | <el-descriptions-item label="减免金额"> |
| | | <div v-if="opt === 'edit'"> |
| | | <el-input-number :min="0" :max="form.settleAmount" v-model="form.deductionAmount" placeholder="请输入减免金额" @change="deductionAmountChange" /> |
| | | </div> |
| | | <div v-else>{{form.deductionAmount}}</div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="实际结算金额" v-if="opt == 'edit'">{{form.actualSettlementAmount}}</el-descriptions-item> |
| | | <el-descriptions-item label="减免原因" v-if="opt == 'edit'"> |
| | | <div v-if="opt === 'edit'"> |
| | | <el-input v-model="form.reasonReduction" placeholder="请输入减免原因" /> |
| | | </div> |
| | | <div v-else>{{form.reasonReduction}}</div></el-descriptions-item> |
| | | <el-descriptions-item label="已结算金额" v-if="opt == 'js'">{{form.settledAmount}}</el-descriptions-item> |
| | | <el-descriptions-item label="待结算金额" v-if="opt == 'js'">{{Number(form.settleAmount) - Number(form.settledAmount)}}</el-descriptions-item> |
| | | </el-descriptions> |
| | |
| | | :option="YSGenerateTableOption" ref="itemsTableRef" |
| | | :data="form.items" |
| | | > |
| | | <template #menu="{row}"> |
| | | <el-link size="small" type="primary" |
| | | @click="handleCancel(row)" class="link-btn" :underline="false" |
| | | icon="el-icon-close">取消关联 |
| | | </el-link> |
| | | </template> |
| | | |
| | | </avue-crud> |
| | | |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog :title="pageF.title" v-model="open2" class="avue-dialog avue-dialog--top" width="80%"> |
| | | |
| | | <avue-crud |
| | | :option="logTableOption" ref="itemsTableRef2" |
| | | :data="logTable" |
| | | > |
| | | |
| | | </avue-crud> |
| | | |
| | | |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button @click="open2 = false">取 消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | |
| | | </basicContainer> |
| | |
| | | exportTmsArBill, |
| | | getTmsArBill, |
| | | listTmsArBill, |
| | | updateTmsArBill |
| | | updateTmsArBill,cancelArBill |
| | | } from "@/api/tms/tmsArBill"; |
| | | import useCurrentInstance from "@/utils/useCurrentInstance"; |
| | | import {computed, reactive, ref, toRefs} from "vue"; |
| | | import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface"; |
| | | import {usePagePlus} from "@/hooks/usePagePlus"; |
| | | import {hasPermission} from "@/utils/permissionUtils"; |
| | | import {addTmsArSettlement} from "@/api/tms/tmsArSettlement"; |
| | | import {addTmsArSettlement, listTmsArSettlement} from "@/api/tms/tmsArSettlement"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import {confirmFinance} from "@/api/tms/tmsFinance"; |
| | | |
| | | const {proxy} = useCurrentInstance(); |
| | | const crudRef = ref(); |
| | |
| | | }, |
| | | selectionList: [], |
| | | opt: '', |
| | | boxForm:<any> {} |
| | | boxForm:<any> {}, |
| | | open2: false |
| | | }) |
| | | const {queryParams, form, page, selectionList,opt,boxForm} = toRefs(data); |
| | | const {queryParams, form, page, selectionList,opt,boxForm,open2} = toRefs(data); |
| | | const option = ref({ |
| | | pageKey: 'TmsArBill', |
| | | rowKey: 'id', |
| | |
| | | }, |
| | | settleAmount: { |
| | | label: '应结算金额', |
| | | addDisplay: true,minWidth:120, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: false, |
| | | }, |
| | | deductionAmount: { |
| | | label: '减免金额', |
| | | addDisplay: true,minWidth:120, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: false, |
| | | }, |
| | | actualSettlementAmount: { |
| | | label: '实际结算金额', |
| | | addDisplay: true,minWidth:120, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | |
| | | } |
| | | }) |
| | | const YSGenerateTableOption= ref({ |
| | | menu: false, |
| | | menu: true, |
| | | add: false, |
| | | header:false, |
| | | selection: false, |
| | | rowKey:'id', |
| | | |
| | | editBtn:false, |
| | | viewBtn:false, |
| | | delBtn: false, |
| | | column:{ |
| | | |
| | | projectName:{ |
| | |
| | | } |
| | | }) |
| | | } |
| | | const logTableOption= ref({ |
| | | menu: false, |
| | | add: false, |
| | | header:false, |
| | | selection: false, |
| | | rowKey:'id', |
| | | |
| | | column:{ |
| | | |
| | | settleAmount:{ |
| | | label: '结算金额', |
| | | }, |
| | | createBy:{ |
| | | label: '处理人员', |
| | | }, |
| | | attachment:{ |
| | | label: '附件下载', |
| | | dataType: 'string', |
| | | type: 'img' |
| | | }, |
| | | |
| | | remark:{ |
| | | label: '备注', |
| | | }, |
| | | createTime:{ |
| | | label: '提交时间', |
| | | }, |
| | | } |
| | | }) |
| | | const logTable = ref<any>() |
| | | |
| | | const handleLog = (row:any)=>{ |
| | | listTmsArSettlement({billId:row.id}).then(res=>{ |
| | | logTable.value = res.rows||[]; |
| | | open2.value = true; |
| | | pageF.title = '结算日志'; |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | const deductionAmountChange = (e:any) => { |
| | | form.value.actualSettlementAmount =(Number(form.value.settleAmount) || 0) -( Number(form.value.deductionAmount) || 0); |
| | | } |
| | | |
| | | const handleCancel = (row:any) => { |
| | | ElMessageBox.confirm("是否对调度单号" + row.dispatchNo + "的应收费用取消关联?", '系统提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | return cancelArBill(row.id); |
| | | }).then(() => { |
| | | onLoad(page.value); |
| | | ElMessage({ |
| | | message: "操作成功!", |
| | | type: 'success' |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | </script> |