Merge remote-tracking branch 'origin/yagwly_fa_master' into yagwly_fa_master
| | |
| | | </template> |
| | | |
| | | |
| | | |
| | | |
| | | <template #menu="{ size, row, index }"> |
| | | <el-link class="link-btn" type="primary" v-if="row.isConfirmed == 1" :underline="false" plain :size="size" |
| | | @click="handleCancel(row)" v-hasPermi="['cwgl:estimatedReceivable:cancel']"> 取消确认 |
| | | <el-link class="link-btn" type="primary" :underline="false" plain :size="size" |
| | | @click="handleEditBtn(row, index)" v-if="[0, 1].includes(row.relatedBillStatus) && row.isConfirmed != 2" |
| | | v-hasPermi="['cwgl:estimatedReceivable:cancel']"> 编辑 |
| | | </el-link> |
| | | <el-link class="link-btn" type="primary" v-if="row.isConfirmed == 1" |
| | | :underline="false" plain :size="size" @click="handleCancel(row)" |
| | | v-hasPermi="['cwgl:estimatedReceivable:cancel']"> 取消确认 |
| | | </el-link> |
| | | <el-link class="link-btn" type="primary" v-if="row.isConfirmed == 0" :underline="false" plain |
| | | @click="handleAffirm(row)" v-hasPermi="['cwgl:estimatedReceivable:confirm']"> 确认 |
| | |
| | | |
| | | </el-dialog> |
| | | |
| | | <flowLog ref="flowLogIshow" :flowParams="flowParams" ></flowLog> |
| | | <flowLog ref="flowLogIshow" :flowParams="flowParams"></flowLog> |
| | | </template> |
| | | |
| | | <script setup name="estimatedReceivable" lang="ts"> |
| | |
| | | EstimatedReceivableI, addEstimatedReceivable, delEstimatedReceivable, exportEstimatedReceivable, getEstimatedReceivable, listEstimatedReceivable, updateEstimatedReceivable, |
| | | getEstimatedReceivableConfirm, getCwglEstimatedReceivableCancel, getEstimatedReceivableInvalid |
| | | } from "@/api/cwgl/estimatedReceivable"; |
| | | import { listEstimatedReceivableLog} from "@/api/cwgl/estimatedReceivableLog"; |
| | | import {listEstimatedReceivableBillLog} from "@/api/cwgl/estimatedReceivableBillLog"; |
| | | import { listEstimatedReceivableLog } from "@/api/cwgl/estimatedReceivableLog"; |
| | | import { listEstimatedReceivableBillLog } from "@/api/cwgl/estimatedReceivableBillLog"; |
| | | import { |
| | | listPendingSettlementBusiness, |
| | | } from "@/api/cwgl/pendingSettlementBusiness"; |
| | |
| | | pageNum: 1, |
| | | pageSize: 10 |
| | | }, |
| | | queryParams: <EstimatedReceivableI & PageQueryInterface>{}, |
| | | queryParams: <EstimatedReceivableI & PageQueryInterface>{ |
| | | feeType: 0 |
| | | }, |
| | | page: <PagesInterface>{ |
| | | pageSize: 10, |
| | | total: 0, |
| | |
| | | editDisplay: false, |
| | | |
| | | addBtn: true, |
| | | editBtn: true, |
| | | editBtn: false, |
| | | editBtnIcon: ' ', |
| | | |
| | | delBtn: false, |
| | | viewBtn: false, |
| | | |
| | |
| | | }, |
| | | relatedBillName: { |
| | | label: '关联账单名称', |
| | | addDisplay: false, // 新增时不显示 |
| | | editDisplay: false, // 修改时不显示 |
| | | }, |
| | | relatedBillStatus: { |
| | | label: '关联账单状态', |
| | | search: true, |
| | | dataType: 'string', |
| | | type: 'select', |
| | | |
| | | addDisplay: false, // 新增时不显示 |
| | | editDisplay: false, // 修改时不显示 |
| | | dicUrl: '/system/dict/data/type/sys_related_status', |
| | | // formatter: (row, value) => { |
| | | // // 自定义格式化逻辑(如果需要) |
| | |
| | | isConfirmed: { |
| | | label: '是否确认', |
| | | dataType: 'string', |
| | | |
| | | addDisplay: false, // 新增时不显示 |
| | | editDisplay: false, // 修改时不显示 |
| | | search: true, |
| | | type: 'select', |
| | | dicUrl: '/system/dict/data/type/sys_affirm_status', |
| | |
| | | }, |
| | | handleSelectionChangeFunc: (selection: any) => { |
| | | selectionList.value = selection; |
| | | }, |
| | | getBeginListFunc: (params = {}) => { |
| | | params.feeType = 0; |
| | | return params |
| | | |
| | | } |
| | | |
| | | }) |
| | | const dialog = reactive({ |
| | | visible: false, |
| | |
| | | newForm.value.pageSize = pageSize; |
| | | getEstimatedReceivableCancel(); |
| | | } |
| | | const newOnLoad = () => { |
| | | getEstimatedReceivableCancel() |
| | | const newOnLoad = (newPageF) => { |
| | | getEstimatedReceivableCancel(newPageF) |
| | | } |
| | | // 加载附件数据的函数 |
| | | const loadAttachmentData = () => { |
| | |
| | | |
| | | }) |
| | | } |
| | | const handleEditBtn = (row, index) => { |
| | | crudRef.value.rowEdit(row, index) |
| | | // option.value.editBtn = true; |
| | | } |
| | | </script> |
| | |
| | | // labelWidth: 120, |
| | | column: { |
| | | projectName: { |
| | | label: '项目名称1', |
| | | label: '项目名称', |
| | | }, |
| | | dispatchNo: { |
| | | label: '调度单号', |
| | |
| | | }, |
| | | handleSelectionChangeFunc: (selection: any) => { |
| | | selectionList.value = selection; |
| | | } |
| | | }, |
| | | |
| | | |
| | | }) |
| | | const dialog = reactive({ |
| | | visible: false, |
| | |
| | | |
| | | const handleAmend = (row) => { |
| | | newFormData.value.billId = row.id; |
| | | importForm.value.billId = row.id; |
| | | dispIshow.value = true; |
| | | newOption.value.menu = true; |
| | | listPendingSettlementBusiness({ billId: row.id }).then((res) => { |
| | |
| | | } |
| | | const newFormRef = ref(); |
| | | const submitForm = () => { |
| | | newFormRef.value!.validate(valid => { |
| | | if (valid) { |
| | | let data = { |
| | | billId: newForm.value.id, |
| | | fileName: newForm.value.attachment |
| | | } |
| | | addEstimatedReceivableLog(data).then((res1) => { |
| | | if (res1.code === 200) { |
| | | estimatedReceivableBillSettlement(newForm.value).then((res) => { |
| | | if (res.code === 200) { |
| | | proxy.$message.success('操作成功'); |
| | | dialog.visible = false; |
| | | newForm.value = {}; |
| | | |
| | | } |
| | | }) |
| | | if(newTableData.value.length == 0) { |
| | | proxy.$message.error('无关联明细,无法结算'); |
| | | }else { |
| | | newFormRef.value!.validate(valid => { |
| | | if (valid) { |
| | | let data = { |
| | | billId: newForm.value.id, |
| | | fileName: newForm.value.attachment |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | addEstimatedReceivableLog(data).then((res1) => { |
| | | if (res1.code === 200) { |
| | | estimatedReceivableBillSettlement(newForm.value).then((res) => { |
| | | if (res.code === 200) { |
| | | onLoad(page.value); |
| | | proxy.$message.success('操作成功'); |
| | | dialog.visible = false; |
| | | newForm.value = {}; |
| | | |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | |
| | | const submitFormTow = () => { |
| | | proxy.$modal.confirm(`是否确认修改账单名称?`).then(function () { |
| | | return updateEstimatedReceivableBillNmae(newForm.value); |
| | | return updateEstimatedReceivableBillNmae(importForm.value); |
| | | }).then((res) => { |
| | | onLoad(page.value); |
| | | proxy.$modal.msgSuccess(res.msg); |
| | | }) |
| | | |
| | |
| | | const flowParams = ref([]) |
| | | const handleFlow = (row: string) => { |
| | | let data = { |
| | | estimatedId: row.id, |
| | | billId: row.id, |
| | | } |
| | | listEstimatedReceivableBillLog(data).then((res) => { |
| | | flowParams.value = res.rows |
| | |
| | | projectName: { |
| | | fixed: 'left', |
| | | label: '项目名称', search: true, |
| | | minWidth: 150, |
| | | |
| | | }, |
| | | dispatchNo: { |
| | | label: '调度单号', |
| | | minWidth: 150, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | |
| | | customerName: { |
| | | label: '客户名称', |
| | | search: true, |
| | | minWidth: 220, |
| | | |
| | | type: 'select', // 设置为下拉框类型 |
| | | dicData: [], // 使用 selectCustomName 作为数据源 |
| | | disabled: false // 根据需要设置是否禁用 |
| | | }, |
| | | licensePlateNumber: { |
| | | label: '车牌', search: true, hide: true, |
| | | label: '车牌', search: true, |
| | | minWidth: 120, |
| | | |
| | | }, |
| | | vehicleType: { |
| | | label: '车型', search: true, hide: true, |
| | | label: '车型', search: true, |
| | | }, |
| | | createdTime: { |
| | | label: '下单时间', |
| | |
| | | search: true, |
| | | type: 'date', |
| | | format: 'YYYY-MM-DD', |
| | | searchSpan: 5, minWidth: 100, |
| | | searchSpan: 5, minWidth: 120, |
| | | valueFormat: 'YYYY-MM-DD', |
| | | }, |
| | | operationMode: { |
| | |
| | | |
| | | carrierName: { |
| | | label: '承运商', |
| | | minWidth: 210, |
| | | }, |
| | | departureLocation: { |
| | | label: '出发地', |
| | | minWidth: 200, |
| | | }, |
| | | arrivalLocation: { |
| | | label: '目的地', |
| | | minWidth: 200, |
| | | |
| | | }, |
| | | isCreate: { |
| | | label: '是否已入账', dataType: 'string', search: true, |
| | | label: '是否已入账', dataType: 'string', |
| | | type: 'select', |
| | | minWidth: 120, |
| | | dicUrl: '/system/dict/data/type/sys_whether_type', |
| | | }, |
| | | // vehicleId: { |
| | |
| | | // }, |
| | | |
| | | |
| | | // mainDriver: { |
| | | // label: '主驾驶员',hide: true, |
| | | // }, |
| | | // assistantDriver: { |
| | | // label: '副驾驶员',hide: true, |
| | | // }, |
| | | // pointNum: { |
| | | // label: '提送货点数',hide: true, |
| | | // }, |
| | | // businessContact: { |
| | | // label: '业务联系人',hide: true, |
| | | // }, |
| | | // estimatedTotalIncome: { |
| | | // label: '预估总收入', |
| | | // }, |
| | | // estimatedTotalCost: { |
| | | // label: '预估总成本', |
| | | // }, |
| | | // estimatedProfit: { |
| | | // label: '预估利润', |
| | | // }, |
| | | mainDriver: { |
| | | label: '主驾驶员', |
| | | minWidth: 120, |
| | | |
| | | }, |
| | | assistantDriver: { |
| | | label: '副驾驶员', |
| | | minWidth: 120, |
| | | |
| | | }, |
| | | pointNum: { |
| | | label: '提送货点数', |
| | | minWidth: 100, |
| | | |
| | | }, |
| | | businessContact: { |
| | | label: '业务联系人', |
| | | minWidth: 120, |
| | | }, |
| | | estimatedTotalIncome: { |
| | | label: '预估总收入', |
| | | minWidth: 120, |
| | | |
| | | }, |
| | | estimatedTotalCost: { |
| | | label: '预估总成本', |
| | | minWidth: 120, |
| | | |
| | | }, |
| | | estimatedProfit: { |
| | | label: '预估利润', |
| | | minWidth: 120, |
| | | |
| | | }, |
| | | |
| | | confirmedTotalIncome: { |
| | | label: '确认总收入', |
| | | minWidth: 120, |
| | | |
| | | }, |
| | | confirmedTotalCost: { |
| | | label: '确认总成本', |
| | | minWidth: 120, |
| | | |
| | | }, |
| | | isIncomeMatched: { |
| | | label: '是否匹配收入', |
| | | |
| | | type: 'select', |
| | | minWidth: 120, |
| | | dicUrl: '/system/dict/data/type/sys_matching_status', |
| | | }, |
| | | isCostMatched: { |
| | | label: '是否匹配成本', |
| | | type: 'select', |
| | | minWidth: 120, |
| | | dicUrl: '/system/dict/data/type/sys_matching_status', |
| | | }, |
| | | // electronicLock: { |
| | | // label: '电子锁', |
| | | // }, |
| | |
| | | const dispatchNo = ref(''); |
| | | const handleClick = (tab: TabsPaneContext, event: Event) => { |
| | | if (tab.props.name == 'first') { |
| | | getListVable(dispatchNo.value, 0); |
| | | } else if (tab.props.name == 'second') { |
| | | getListVable(dispatchNo.value, 1); |
| | | } else if (tab.props.name == 'second') { |
| | | getListVable(dispatchNo.value, 0); |
| | | } |
| | | } |
| | | |
| | | const handleFy = (row: any) => { |
| | | dispatchNo.value = row.dispatchNo; |
| | | dialog.title = '费用明细'; |
| | | if (activeName.value == 'first') { |
| | | listEstimatedReceivable({ dispatchNo: row.dispatchNo, feeType: 0 }).then((res) => { |
| | | listEstimatedReceivable({ dispatchNo: row.dispatchNo, feeType: 1 }).then((res) => { |
| | | if (res.code === 200) { |
| | | dialog.detail = true; |
| | | tableDataList.value = res.rows || []; |
| | |
| | | }) |
| | | } else if (activeName.value == 'second') { |
| | | // 这里可以添加查询收入相关的逻辑 |
| | | listEstimatedReceivable({ dispatchNo: row.dispatchNo, feeType: 1 }).then((res) => { |
| | | listEstimatedReceivable({ dispatchNo: row.dispatchNo, feeType: 0 }).then((res) => { |
| | | if (res.code === 200) { |
| | | dialog.detail = true; |
| | | tableDataList.value = res.rows || []; |