From 43f105070cf75a057d1d0ce4ff330c3b19a21ab0 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期六, 12 七月 2025 13:45:52 +0800 Subject: [PATCH] 1.付款登记-优化:删除权限优化 --- src/views/inventoryManagement/issueManagement/index.vue | 44 +++++++++++++++++++++++++++++--------------- 1 files changed, 29 insertions(+), 15 deletions(-) diff --git a/src/views/inventoryManagement/issueManagement/index.vue b/src/views/inventoryManagement/issueManagement/index.vue index 7ed1f68..2ad9b5a 100644 --- a/src/views/inventoryManagement/issueManagement/index.vue +++ b/src/views/inventoryManagement/issueManagement/index.vue @@ -19,18 +19,19 @@ :summary-method="summarizeMainTable" height="calc(100vh - 18.5em)"> <el-table-column align="center" type="selection" width="55" /> <el-table-column align="center" label="搴忓彿" type="index" width="60" /> - <el-table-column label="鍏ュ簱鏃堕棿" prop="inboundTime" width="100" show-overflow-tooltip /> - <el-table-column label="鍏ュ簱鎵规" prop="inboundBatch" width="160" show-overflow-tooltip /> - <el-table-column label="渚涘簲鍟嗗悕绉�" prop="supplierName" width="160" show-overflow-tooltip /> - <el-table-column label="浜у搧澶х被" prop="productName" width="100" show-overflow-tooltip /> - <el-table-column label="瑙勬牸鍨嬪彿" prop="model" width="160" show-overflow-tooltip /> + <el-table-column label="鍏ュ簱鏃堕棿" prop="createTime" width="100" show-overflow-tooltip /> + <el-table-column label="鍏ュ簱鎵规" prop="inboundBatches" width="160" show-overflow-tooltip /> + <el-table-column label="渚涘簲鍟嗗悕绉�" prop="supplierName" width="240" show-overflow-tooltip /> + <el-table-column label="浜у搧澶х被" prop="productCategory" width="100" show-overflow-tooltip /> + <el-table-column label="瑙勬牸鍨嬪彿" prop="specificationModel" width="200" show-overflow-tooltip /> <el-table-column label="鍗曚綅" prop="unit" width="70" show-overflow-tooltip /> - <el-table-column label="鍏ュ簱鏁伴噺" prop="stockQuantity" width="90" show-overflow-tooltip /> + <el-table-column label="鍏ュ簱鏁伴噺" prop="inboundNum" width="90" show-overflow-tooltip /> + <el-table-column label="搴撳瓨鏁伴噺" prop="inboundNum0" width="90" show-overflow-tooltip /> <el-table-column label="鍚◣鍗曚环" prop="taxInclusiveUnitPrice" width="100" show-overflow-tooltip /> <el-table-column label="鍚◣鎬讳环" prop="taxInclusiveTotalPrice" width="100" show-overflow-tooltip /> <el-table-column label="绋庣巼(%)" prop="taxRate" width="80" show-overflow-tooltip /> <el-table-column label="涓嶅惈绋庢�讳环" prop="taxExclusiveTotalPrice" width="100" show-overflow-tooltip /> - <el-table-column label="鍏ュ簱浜�" prop="nickName" width="80" show-overflow-tooltip /> + <el-table-column label="鍏ュ簱浜�" prop="createBy" width="80" show-overflow-tooltip /> <el-table-column fixed="right" label="鎿嶄綔" min-width="60" align="center"> <template #default="scope"> <el-button link type="primary" size="small" @click="openForm(scope.row);">棰嗙敤</el-button> @@ -43,7 +44,7 @@ <el-dialog v-model="dialogFormVisible" :title="'鏂板鍑哄簱'" width="40%" @close="closeDia"> <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef"> <el-form-item label="鍑哄簱鏁伴噺锛�" prop="salesContractNo"> - <el-input v-model="form.inboundQuantity" placeholder="璇疯緭鍏�" clearable /> + <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.inboundQuantity" placeholder="璇疯緭鍏�" clearable /> </el-form-item> <el-form-item label="鍑哄簱鏃ユ湡锛�" prop="projectName"> <el-date-picker style="width: 100%" v-model="form.inboundTime" value-format="YYYY-MM-DD" format="YYYY-MM-DD" @@ -70,7 +71,10 @@ import { ref } from 'vue' import { ElMessageBox } from "element-plus"; import useUserStore from '@/store/modules/user' -import { userListNoPage } from "@/api/system/user.js"; +import { userListNoPageByTenantId } from "@/api/system/user.js"; +import { + getStockInPage +} from "@/api/inventoryManagement/stockIn.js"; import { getStockManagePage, delStockManage, @@ -124,7 +128,7 @@ } const getList = () => { tableLoading.value = true - getStockManagePage({ ...searchForm.value, ...page }).then(res => { + getStockInPage({ ...searchForm.value, ...page }).then(res => { tableLoading.value = false tableData.value = res.data.records console.log('res', res.data.records) @@ -161,10 +165,15 @@ }; const currentRowId = ref(null) // 鏂板锛氬瓨鍌ㄥ綋鍓嶆搷浣滅殑琛孖D +const currentRowNum = ref(0) +const salesLedgerProductId = ref(null); + // 鎵撳紑寮规 const openForm = async (row) => { dialogFormVisible.value = true currentRowId.value = row.id + currentRowNum.value = row.inboundNum0 + salesLedgerProductId.value = row.salesLedgerProductId form.value = {} // 鍒濆鍖栬〃鍗曟暟鎹� form.value = { @@ -176,7 +185,7 @@ console.log('form',form.value) // 鍔犺浇鐢ㄦ埛鍒楄〃 try { - const userLists = await userListNoPage() + const userLists = await userListNoPageByTenantId() userList.value = userLists.data } catch (error) { console.error('鍔犺浇鐢ㄦ埛鍒楄〃澶辫触:', error) @@ -185,13 +194,18 @@ // 鎻愪氦琛ㄥ崟 const submitForm = () => { + let num = Number(form.value.inboundQuantity) + if(num < 1 || num > currentRowNum.value){ + return proxy.$modal.msgWarning("璇峰~鍏ユ湁鏁堟暟瀛�") + } proxy.$refs["formRef"].validate(valid => { if (valid && currentRowId.value) { const outData = { id: currentRowId.value, // 鍘熷璁板綍ID - Quantity: form.value.inboundQuantity, // 鍑哄簱鏁伴噺 - Time: form.value.inboundTime, // 鍑哄簱鏃堕棿 - userId: form.value.userId // 鎿嶄綔浜� + salesLedgerProductId: salesLedgerProductId.value, + quantity: form.value.inboundQuantity, // 鍑哄簱鏁伴噺 + time: form.value.inboundTime, // 鍑哄簱鏃堕棿 + userId: form.value.nickName // 鎿嶄綔浜� } console.log(outData) @@ -221,7 +235,7 @@ type: 'warning', } ).then(() => { - proxy.download("/stockmanagement/export", {}, '鍏ュ簱鍙拌处.xlsx') + proxy.download("/stockin/export", {}, '鍏ュ簱鍙拌处.xlsx') }).catch(() => { proxy.$modal.msg("宸插彇娑�") }) -- Gitblit v1.9.3