From ddd7b9af964842f308530907dc009a289fdf9ce6 Mon Sep 17 00:00:00 2001 From: chenrui <1187576398@qq.com> Date: 星期一, 09 六月 2025 17:22:06 +0800 Subject: [PATCH] 开票台账删除 --- src/views/basicData/supplierManage/index.vue | 33 +++++++++++++++++++++++++-------- 1 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/views/basicData/supplierManage/index.vue b/src/views/basicData/supplierManage/index.vue index e9932c6..47b4a36 100644 --- a/src/views/basicData/supplierManage/index.vue +++ b/src/views/basicData/supplierManage/index.vue @@ -20,7 +20,7 @@ </div> </div> <div class="table_list"> - <PIMTable :column="tableColumn" :tableData="tableData" :page="page" :handleSelectionChange="handleSelectionChange" + <PIMTable :column="tableColumn" :tableData="tableData" :page="page" :isSelection="true" :handleSelectionChange="handleSelectionChange" :tableLoading="tableLoading" @pagination="pagination" :total="total"></PIMTable> </div> <el-dialog v-model="dialogFormVisible" :title="operationType === 'add' ? '鏂板渚涘簲鍟嗕俊鎭�' : '缂栬緫渚涘簲鍟嗕俊鎭�'" width="70%" @close="closeDia"> @@ -76,7 +76,7 @@ <el-row :gutter="30"> <el-col :span="12"> <el-form-item label="缁存姢浜猴細" prop="maintainUserId"> - <el-select v-model="form.maintainUserId" placeholder="璇烽�夋嫨" clearable> + <el-select v-model="form.maintainUserId" placeholder="璇烽�夋嫨" clearable disabled> <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName" :value="item.userId"/> </el-select> </el-form-item> @@ -91,6 +91,7 @@ type="date" placeholder="璇烽�夋嫨" clearable + disabled /> </el-form-item> </el-col> @@ -112,17 +113,21 @@ import { delSupplier} from "@/api/basicData/supplierManageFile.js"; import {ElMessageBox } from "element-plus"; import {userListNoPage} from "@/api/system/user.js"; -import {addSupplier,getSupplier,listSupplier,updateSupplier} from "../../../api/basicData/supplierManageFile.js"; +import {addSupplier,getSupplier,listSupplier,updateSupplier} from "@/api/basicData/supplierManageFile.js"; +import useUserStore from "@/store/modules/user" const { proxy } = getCurrentInstance() +const userStore = useUserStore() const tableColumn = ref([ { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName', + width: 250, }, { label: '鍏徃鍦板潃', - prop: 'companyAddress' + prop: 'companyAddress', + width: 220, }, { label: '鑱旂郴鏂瑰紡', @@ -218,9 +223,9 @@ page.current = 1 getList() } -const pagination = ({ current, limit }) => { - page.current = current; - page.size = limit; +const pagination = (obj) => { + page.current = obj.page; + page.size = obj.limit; getList() } const getList = () => { @@ -228,7 +233,7 @@ listSupplier({...searchForm.value, ...page}).then(res => { tableLoading.value = false tableData.value = res.data.records - total.value = res.total + total.value = res.data.total }) } // 琛ㄦ牸閫夋嫨鏁版嵁 @@ -239,6 +244,8 @@ const openForm = (type, row) => { operationType.value = type form.value = {} + form.value.maintainUserId = userStore.id + form.value.maintainTime = getCurrentDate(); userListNoPage().then(res => { userList.value = res.data }) @@ -325,6 +332,16 @@ proxy.$modal.msg("宸插彇娑�") }) } + +// 鑾峰彇褰撳墠鏃ユ湡骞舵牸寮忓寲涓� YYYY-MM-DD +function getCurrentDate() { + const today = new Date(); + const year = today.getFullYear(); + const month = String(today.getMonth() + 1).padStart(2, '0'); // 鏈堜唤浠�0寮�濮� + const day = String(today.getDate()).padStart(2, '0'); + return `${year}-${month}-${day}`; +} + getList() </script> -- Gitblit v1.9.3