| | |
| | | <template> |
| | | <basicContainer> |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="pageF.loading" |
| | | :data="tableData" |
| | | :page="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | v-model="form" v-model:search="queryParams" |
| | | ref="crudRef" |
| | | @refresh-change="refreshChange" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @on-load="onLoad" |
| | | > |
| | | <avue-crud :option="option" :table-loading="pageF.loading" :data="tableData" :page="page" |
| | | :permission="permissionList" :before-open="beforeOpen" v-model="form" v-model:search="queryParams" ref="crudRef" |
| | | @refresh-change="refreshChange" @search-change="searchChange" @search-reset="searchReset" |
| | | @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" @on-load="onLoad"> |
| | | <template #remark="{ row }"> |
| | | <el-input v-model="row.remark" readonly placeholder="暂无备注" @click="handleRemarkClick(row)" |
| | | style="cursor: pointer;" /> |
| | | </template> |
| | | <template #menu-left> |
| | | |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="Download" |
| | | @click="handleExport" |
| | | v-hasPermi="['tms:tmsDriver:export']" |
| | | >导出 |
| | | <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['tms:tmsDriver:export']">导出 |
| | | </el-button> |
| | | </template> |
| | | <template #address="{row}"> |
| | |
| | | </el-descriptions> |
| | | <h3>费用明细</h3> |
| | | </div> |
| | | <avue-crud |
| | | :option="boxTableOption" ref="itemsTableRef" |
| | | :data="boxTableData" |
| | | > |
| | | <avue-crud :option="boxTableOption" ref="itemsTableRef" :data="boxTableData"> |
| | | <template #expand="{row}"> |
| | | <avue-crud |
| | | :option="boxItemTableOption" ref="itemsTableRef2" |
| | | :data="row.payableFeeItems" |
| | | > |
| | | <avue-crud :option="boxItemTableOption" ref="itemsTableRef2" :data="row.payableFeeItems"> |
| | | </avue-crud> |
| | | </template> |
| | | <template #receivableAmount="{row}"> |
| | |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | <el-dialog :title="remarkBox.title" v-model="remarkBox.open" width="500px"> |
| | | <div style="margin-bottom: 20px;"> |
| | | <el-input v-model="remarkBox.content" type="textarea" :rows="4" placeholder="请输入备注内容" /> |
| | | <div style="margin-top: 15px; text-align: right;"> |
| | | <el-button @click="remarkBox.open = false">取 消</el-button> |
| | | <el-button type="primary" @click="submitRemark">确 定</el-button> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-table :data="remarkBox.list" border stripe size="small"> |
| | | <el-table-column prop="createTime" label="操作时间" width="160" /> |
| | | <el-table-column prop="createBy" label="操作人" width="100" /> |
| | | <el-table-column prop="notes" label="备注内容" /> |
| | | </el-table> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script setup name="tmsDriver" lang="ts"> |
| | | import { |
| | | listTmsDispatchFeeSummaryVi,exportTmsDispatchFeeSummaryVi |
| | | listTmsDispatchFeeSummaryVi, exportTmsDispatchFeeSummaryVi, tmsDispatchFeeSummaryViNote |
| | | } from "@/api/tms/tmsDispatchFeeSummary"; |
| | | import useCurrentInstance from "@/utils/useCurrentInstance"; |
| | | import {computed, onMounted, reactive, ref, toRefs, watch} from "vue"; |
| | |
| | | import {listTmsTrip} from "@/api/tms/tmsTrip"; |
| | | import {getTmsReceivableFeeByDispatchNo} from "@/api/tms/tmsReceivableFee"; |
| | | import {getTmsPayableFeeByDispatchNo} from "@/api/tms/tmsPayableFee"; |
| | | |
| | | import { listDispatchFeeSummaryViLog } from "@/api/tms/dispatchFeeSummaryViLog"; |
| | | const {proxy} = useCurrentInstance(); |
| | | const crudRef = ref(); |
| | | |
| | |
| | | ] |
| | | }, |
| | | { |
| | | label: '备注', |
| | | prop: 'remark', |
| | | width: 120, |
| | | slot: true, // 开启自定义插槽 |
| | | }, |
| | | { |
| | | label: '派车信息', |
| | | children:[ |
| | | {label: '调度单号',prop: 'dispatchNo',width: 180,search: true,}, |
| | | {label: '状态',prop: 'status',width: 120, type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/tms_dispatch_order_status',search: true |
| | | { |
| | | label: '状态', prop: 'status', width: 120, type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/tms_dispatch_order_status', search: true |
| | | }, |
| | | {label: '承运商',prop: 'providerName',width: 180,search: true}, |
| | | {label: '车牌',prop: 'license',width: 120}, |
| | |
| | | |
| | | }) |
| | | } |
| | | // 控制备注弹窗显示 |
| | | const remarkBox = reactive({ |
| | | open: false, |
| | | title: '备注记录', |
| | | content: '', // 新增备注的内容 |
| | | list: [] // 备注历史列表 |
| | | }); |
| | | |
| | | const activeRow = ref({}); // 当前操作的行 |
| | | |
| | | // 点击备注列触发 |
| | | const handleRemarkClick = (row) => { |
| | | activeRow.value = row; |
| | | remarkBox.content = ''; // 清空输入框 |
| | | remarkBox.open = true; |
| | | remarkBox.list = [ |
| | | ]; |
| | | listDispatchFeeSummaryViLog({ headId: row.dispatchId }).then(res => remarkBox.list = res.rows || []); |
| | | // getRemarkHistory(row.id).then(res => remarkBox.list = res.data); |
| | | |
| | | }; |
| | | |
| | | // 弹窗点击确定的逻辑 |
| | | const submitRemark = () => { |
| | | if (!remarkBox.content) { |
| | | // return ElMessage.warning('请输入备注内容'); |
| | | return proxy.$modal.msgWarning("请输入备注内容"); |
| | | |
| | | } |
| | | // 更新前端表格显示(实际应调用保存接口后刷新) |
| | | |
| | | // 调用后端接口示例: |
| | | // saveRemark({ id: activeRow.value.id, remark: remarkBox.content }).then(...) |
| | | tmsDispatchFeeSummaryViNote({ dispatchId: activeRow.value.dispatchId, remark: remarkBox.content }).then((res) => { |
| | | if (res.code == 200) { |
| | | // remarkBox.open = false; |
| | | listDispatchFeeSummaryViLog({ headId: activeRow.value.dispatchId }).then((res1) => { |
| | | if (res1.code == 200) { |
| | | remarkBox.list = res1.rows || []; |
| | | remarkBox.content = ''; // 清空输入框 |
| | | proxy.$modal.msgSuccess(res.msg); |
| | | |
| | | } |
| | | }); |
| | | // activeRow.value.remark = remarkBox.content; // 更新表格显示 |
| | | } |
| | | // ElMessage.success('备注已更新'); |
| | | }); |
| | | }; |
| | | |
| | | </script> |
| | | <style scoped lang="scss"> |
| | |
| | | cursor: pointer; |
| | | text-align: left; |
| | | color: #409eff; |
| | | |
| | | &:hover{ |
| | | color: #f0ad4e; |
| | | } |