From fe631515b71782a10a750874f6d4582fe027cd22 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 03 十一月 2025 09:32:49 +0800
Subject: [PATCH] 公司-所有的表格添加斑马纹
---
src/views/inventoryManagement/issueManagement/index.vue | 47 +++++++++++++++++++++++++++++++----------------
1 files changed, 31 insertions(+), 16 deletions(-)
diff --git a/src/views/inventoryManagement/issueManagement/index.vue b/src/views/inventoryManagement/issueManagement/index.vue
index 7ed1f68..cc4d8e1 100644
--- a/src/views/inventoryManagement/issueManagement/index.vue
+++ b/src/views/inventoryManagement/issueManagement/index.vue
@@ -16,21 +16,22 @@
<div class="table_list">
<el-table :data="tableData" border v-loading="tableLoading" @selection-change="handleSelectionChange"
:expand-row-keys="expandedRowKeys" :row-key="row => row.id" show-summary style="width: 100%"
- :summary-method="summarizeMainTable" height="calc(100vh - 18.5em)">
+ :summary-method="summarizeMainTable" height="calc(100vh - 18.5em)" stripe>
<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,9 +128,10 @@
}
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
+ total.value = res.data.total
console.log('res', res.data.records)
}).catch(() => {
tableLoading.value = false
@@ -161,10 +166,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 +186,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 +195,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 +236,7 @@
type: 'warning',
}
).then(() => {
- proxy.download("/stockmanagement/export", {}, '鍏ュ簱鍙拌处.xlsx')
+ proxy.download("/stockin/export", {}, '鍏ュ簱鍙拌处.xlsx')
}).catch(() => {
proxy.$modal.msg("宸插彇娑�")
})
--
Gitblit v1.9.3