| | |
| | | |
| | | <template #dispatchNo-form="{ row, size, }"> |
| | | <div style="cursor: pointer;"> |
| | | <el-input v-model="form.dispatchNo" @click="handleFormSearch" readonly placeholder="请输入调度单号"> |
| | | <el-input v-model="form.dispatchNo" @click="handleFormSearch" readonly placeholder="请输入 调度单号"> |
| | | <template #append> |
| | | <el-button icon="Search" style="cursor: pointer;" @click="handleFormSearch"></el-button> |
| | | </template> |
| | |
| | | |
| | | |
| | | <template #menu-left> |
| | | <el-button type="success" icon="Edit" :disabled="pageF.single" v-hasPermi="['cwgl:estimatedReceivable:edit']" |
| | | <el-button type="success" icon="Edit" :disabled="editIshow" v-hasPermi="['cwgl:estimatedReceivable:edit']" |
| | | @click="handleUpdate">修改 |
| | | </el-button> |
| | | <el-button type="danger" icon="Delete" :disabled="pageF.multiple" @click="handleDelete" |
| | | <el-button type="danger" icon="Delete" :disabled="removeIshow" @click="handleDelete" |
| | | v-hasPermi="['cwgl:estimatedReceivable:remove']">删除 |
| | | </el-button> |
| | | <el-button type="warning" plain icon="Download" @click="handleExport" |
| | |
| | | |
| | | |
| | | <template #menu="{ size, row, index }"> |
| | | <el-link class="link-btn" type="primary" :underline="false" plain :size="size" |
| | | <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 class="link-btn" type="primary" |
| | | v-if="row.isConfirmed == 1 && row.relatedBillStatus != 2 && row.relatedBillStatus != 3" :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-link class="link-btn" type="primary" v-if="row.isConfirmed == 0 && ![2, 3].includes(row.relatedBillStatus)" |
| | | :underline="false" plain @click="handleAffirm(row)" v-hasPermi="['cwgl:estimatedReceivable:confirm']"> 确认 |
| | | </el-link> |
| | | <el-link class="link-btn" type="primary" v-if="row.isConfirmed == 1" :underline="false" plain |
| | | @click="handleInvalid(row)" v-hasPermi="['cwgl:estimatedReceivable:invalid']"> 作废 |
| | | <el-link class="link-btn" type="primary" |
| | | v-if="row.isConfirmed == 1 && row.relatedBillStatus != 2 && row.relatedBillStatus != 3" :underline="false" |
| | | plain @click="handleInvalid(row)" v-hasPermi="['cwgl:estimatedReceivable:invalid']"> 作废 |
| | | </el-link> |
| | | <el-link class="link-btn" type="primary" :underline="false" plain @click="handleFlow(row)" |
| | | v-hasPermi="['cwgl:estimatedReceivable:flog']"> 日志 |
| | |
| | | import { listEstimatedReceivableLog } from "@/api/cwgl/estimatedReceivableLog"; |
| | | import { listEstimatedReceivableBillLog } from "@/api/cwgl/estimatedReceivableBillLog"; |
| | | import { |
| | | getSelectCustomNam, |
| | | } from "@/api/cwgl/pendingSettlementBusiness"; |
| | | import { |
| | | listPendingSettlementBusiness, |
| | | } from "@/api/cwgl/pendingSettlementBusiness"; |
| | | import useCurrentInstance from "@/utils/useCurrentInstance"; |
| | |
| | | const data = reactive({ |
| | | form: <EstimatedReceivableI>{}, |
| | | newTableData: [], |
| | | removeIshow: true, |
| | | editIshow: true, |
| | | newForm: <EstimatedReceivableI>{ |
| | | pageNum: 1, |
| | | pageSize: 10 |
| | |
| | | itemTableLoading1: false, |
| | | itemTableLoading2: false, |
| | | }) |
| | | const { queryParams, form, page, selectionList, newForm, newTableData, newSelectionList, itemTableLoading1, itemTableLoading2 } = toRefs(data); |
| | | const { queryParams, form, page, selectionList, newForm, newTableData, newSelectionList, itemTableLoading1, itemTableLoading2, removeIshow, editIshow } = toRefs(data); |
| | | const option = ref({ |
| | | pageKey: 'EstimatedReceivable', |
| | | rowKey: 'id', |
| | |
| | | ], |
| | | search: true, |
| | | }, |
| | | // customerName: { |
| | | // label: '客户名称', |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "客户名称不能为空", trigger: "blur" |
| | | // } |
| | | // ], |
| | | // search: true, |
| | | // disabled: true, |
| | | // }, |
| | | customerName: { |
| | | label: '客户名称', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "客户名称不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | search: true, |
| | | disabled: true, |
| | | minWidth: 220, |
| | | |
| | | type: 'select', // 设置为下拉框类型 |
| | | dicData: [], // 使用 selectCustomName 作为数据源 |
| | | disabled: false // 根据需要设置是否禁用 |
| | | }, |
| | | projectName: { |
| | | label: '项目名称', |
| | |
| | | }, |
| | | handleSelectionChangeFunc: (selection: any) => { |
| | | selectionList.value = selection; |
| | | console.log(selection); |
| | | |
| | | // 根据选中项数量和状态设置编辑按钮是否可用 |
| | | if (selection.length === 1 && [0, 1].includes(selection[0].relatedBillStatus)) { |
| | | editIshow.value = false; |
| | | } else { |
| | | editIshow.value = true; |
| | | } |
| | | |
| | | if (selection.length === 1 && [0].includes(selection[0].isConfirmed)) { |
| | | removeIshow.value = false; |
| | | } else { |
| | | removeIshow.value = true; |
| | | } |
| | | |
| | | }, |
| | | getBeginListFunc: (params = {}) => { |
| | | params.feeType = 0; |
| | |
| | | crudRef.value.rowEdit(row, index) |
| | | // option.value.editBtn = true; |
| | | } |
| | | |
| | | /* */ |
| | | const selectCustomName = ref([]); |
| | | const getSelectCustomName = () => { |
| | | getSelectCustomNam().then((res) => { |
| | | if (res.code === 200) { |
| | | // selectCustomName.value = res.data; |
| | | selectCustomName.value = res.data.map(item => ({ |
| | | dictLabel: item, |
| | | dictValue: item |
| | | })); |
| | | option.value.column.customerName.dicData = selectCustomName.value || []; |
| | | } |
| | | }) |
| | | } |
| | | getSelectCustomName() |
| | | </script> |