From d8c563d7ce8e4541d614d5d6a889aa7b0c136adc Mon Sep 17 00:00:00 2001 From: sen <sen@qq.com> Date: 星期一, 18 八月 2025 10:22:05 +0800 Subject: [PATCH] 修改宽度 --- ui/admin-ui3/src/views/cwgl/estimatedReceivable/index.vue | 131 +++++++++++++++++++++++++++++++++++-------- 1 files changed, 105 insertions(+), 26 deletions(-) diff --git a/ui/admin-ui3/src/views/cwgl/estimatedReceivable/index.vue b/ui/admin-ui3/src/views/cwgl/estimatedReceivable/index.vue index e910b87..7ee0f59 100644 --- a/ui/admin-ui3/src/views/cwgl/estimatedReceivable/index.vue +++ b/ui/admin-ui3/src/views/cwgl/estimatedReceivable/index.vue @@ -8,7 +8,7 @@ <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> @@ -19,10 +19,10 @@ <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" @@ -31,15 +31,23 @@ </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 == 0" :underline="false" plain - @click="handleAffirm(row)" v-hasPermi="['cwgl:estimatedReceivable:confirm']"> 纭 + <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 == 1" :underline="false" plain - @click="handleInvalid(row)" v-hasPermi="['cwgl:estimatedReceivable:invalid']"> 浣滃簾 + <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 && 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']"> 鏃ュ織 @@ -107,7 +115,7 @@ </el-dialog> - <flowLog ref="flowLogIshow" :flowParams="flowParams" ></flowLog> + <flowLog ref="flowLogIshow" :flowParams="flowParams"></flowLog> </template> <script setup name="estimatedReceivable" lang="ts"> @@ -115,8 +123,11 @@ 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 { + getSelectCustomNam, +} from "@/api/cwgl/pendingSettlementBusiness"; import { listPendingSettlementBusiness, } from "@/api/cwgl/pendingSettlementBusiness"; @@ -142,11 +153,15 @@ const data = reactive({ form: <EstimatedReceivableI>{}, newTableData: [], + removeIshow: true, + editIshow: true, newForm: <EstimatedReceivableI>{ pageNum: 1, pageSize: 10 }, - queryParams: <EstimatedReceivableI & PageQueryInterface>{}, + queryParams: <EstimatedReceivableI & PageQueryInterface>{ + feeType: 0 + }, page: <PagesInterface>{ pageSize: 10, total: 0, @@ -157,7 +172,7 @@ 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', @@ -165,7 +180,9 @@ editDisplay: false, addBtn: true, - editBtn: true, + editBtn: false, + editBtnIcon: ' ', + delBtn: false, viewBtn: false, @@ -183,12 +200,14 @@ message: "璐圭敤绯荤粺缂栧彿涓嶈兘涓虹┖", trigger: "blur" } ], + minWidth: 140, search: true, addDisplay: false, editDisplay: false, }, dispatchNo: { label: '璋冨害鍗曞彿', + minWidth: 120, rules: [ { required: true, @@ -197,31 +216,43 @@ ], 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: '椤圭洰鍚嶇О', search: true, disabled: true, + minWidth: 150, }, orderDate: { label: '涓嬪崟鏃ユ湡', search: true, + minWidth: 180, type: 'datetime', // 鏀逛负 datetime 绫诲瀷 format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss', }, feeName: { label: '璐圭敤鍚嶇О', + minWidth: 120, rules: [ { required: true, @@ -246,13 +277,18 @@ }, relatedBillName: { label: '鍏宠仈璐﹀崟鍚嶇О', + minWidth: 120, + addDisplay: false, // 鏂板鏃朵笉鏄剧ず + editDisplay: false, // 淇敼鏃朵笉鏄剧ず }, relatedBillStatus: { label: '鍏宠仈璐﹀崟鐘舵��', search: true, + minWidth: 120, dataType: 'string', type: 'select', - + addDisplay: false, // 鏂板鏃朵笉鏄剧ず + editDisplay: false, // 淇敼鏃朵笉鏄剧ず dicUrl: '/system/dict/data/type/sys_related_status', // formatter: (row, value) => { // // 鑷畾涔夋牸寮忓寲閫昏緫锛堝鏋滈渶瑕侊級 @@ -262,13 +298,15 @@ isConfirmed: { label: '鏄惁纭', dataType: 'string', - + addDisplay: false, // 鏂板鏃朵笉鏄剧ず + editDisplay: false, // 淇敼鏃朵笉鏄剧ず search: true, type: 'select', dicUrl: '/system/dict/data/type/sys_affirm_status', }, remark: { label: '澶囨敞', + minWidth: 120, type: 'textarea', minRows: 3, maxRows: 5, }, @@ -354,7 +392,28 @@ }, 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; + return params + } + }) const dialog = reactive({ visible: false, @@ -444,8 +503,8 @@ newForm.value.pageSize = pageSize; getEstimatedReceivableCancel(); } -const newOnLoad = () => { - getEstimatedReceivableCancel() +const newOnLoad = (newPageF) => { + getEstimatedReceivableCancel(newPageF) } // 鍔犺浇闄勪欢鏁版嵁鐨勫嚱鏁� const loadAttachmentData = () => { @@ -548,4 +607,24 @@ }) } +const handleEditBtn = (row, index) => { + 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> -- Gitblit v1.8.0