采购页面调整 up by dh
This commit is contained in:
@@ -217,12 +217,12 @@
|
|||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div style="display: flex; align-items: center">
|
<div style="display: flex; align-items: center">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="scope.row.itemTable"
|
v-model="scope.row.itemId"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
@blur="handleBlur(scope.row, scope.$index)"
|
@blur="handleBlur(scope.row, scope.$index)"
|
||||||
>
|
>
|
||||||
<el-option label="单位1" value="单位1" />
|
<el-option label="项目1" value="1" />
|
||||||
<el-option label="单位2" value="单位2" />
|
<el-option label="项目2" value="2" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-tooltip content="该项目必填" placement="top">
|
<el-tooltip content="该项目必填" placement="top">
|
||||||
<el-icon style="color: red; margin-left: 5px"
|
<el-icon style="color: red; margin-left: 5px"
|
||||||
@@ -270,8 +270,8 @@
|
|||||||
placeholder="请选择计量单位"
|
placeholder="请选择计量单位"
|
||||||
@blur="handleBlur(scope.row, scope.$index)"
|
@blur="handleBlur(scope.row, scope.$index)"
|
||||||
>
|
>
|
||||||
<el-option label="单位1" value="单位1" />
|
<el-option label="单位1" value="1" />
|
||||||
<el-option label="单位2" value="单位2" />
|
<el-option label="单位2" value="2" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-tooltip content="该项目必填" placement="top">
|
<el-tooltip content="该项目必填" placement="top">
|
||||||
<el-icon style="color: red; margin-left: 5px"
|
<el-icon style="color: red; margin-left: 5px"
|
||||||
@@ -284,20 +284,20 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
label="仓库"
|
label="仓库"
|
||||||
align="center"
|
align="center"
|
||||||
key="purposeLocationStoreId"
|
key="purposeLocationId"
|
||||||
prop="purposeLocationStoreId"
|
prop="purposeLocationId"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
width="130"
|
width="130"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div style="display: flex; align-items: center">
|
<div style="display: flex; align-items: center">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="scope.row.purposeLocationStoreId"
|
v-model="scope.row.purposeLocationId"
|
||||||
placeholder="请选择仓库"
|
placeholder="请选择仓库"
|
||||||
@blur="handleBlur(scope.row, scope.$index)"
|
@blur="handleBlur(scope.row, scope.$index)"
|
||||||
>
|
>
|
||||||
<el-option label="仓库1" value="仓库1" />
|
<el-option label="仓库1" value="1" />
|
||||||
<el-option label="仓库2" value="仓库2" />
|
<el-option label="仓库2" value="2" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-tooltip content="该项目必填" placement="top">
|
<el-tooltip content="该项目必填" placement="top">
|
||||||
<el-icon style="color: red; margin-left: 5px"
|
<el-icon style="color: red; margin-left: 5px"
|
||||||
@@ -310,19 +310,19 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
label="货位"
|
label="货位"
|
||||||
align="center"
|
align="center"
|
||||||
key="applicantId"
|
key="purposeLocationStoreId"
|
||||||
prop="applicantId"
|
prop="purposeLocationStoreId"
|
||||||
width="130"
|
width="130"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div style="display: flex; align-items: center">
|
<div style="display: flex; align-items: center">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="scope.row.approverId"
|
v-model="scope.row.purposeLocationStoreId"
|
||||||
placeholder="请选择货位"
|
placeholder="请选择货位"
|
||||||
@blur="handleBlur(scope.row, scope.$index)"
|
@blur="handleBlur(scope.row, scope.$index)"
|
||||||
>
|
>
|
||||||
<el-option label="货位1" value="货位1" />
|
<el-option label="货位1" value="1" />
|
||||||
<el-option label="货位2" value="货位2" />
|
<el-option label="货位2" value="2" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-tooltip content="该项目必填" placement="top">
|
<el-tooltip content="该项目必填" placement="top">
|
||||||
<el-icon style="color: red; margin-left: 5px"
|
<el-icon style="color: red; margin-left: 5px"
|
||||||
@@ -521,18 +521,18 @@
|
|||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="Edit"
|
icon="Edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleBlur(scope.row, scope.$index)"
|
||||||
v-hasPermi="['system:user:edit']"
|
v-hasPermi="['system:user:edit']"
|
||||||
>编辑</el-button
|
>保存</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<!-- <el-button
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="View"
|
icon="View"
|
||||||
@click="handleView(scope.row)"
|
@click="handleView(scope.row)"
|
||||||
v-hasPermi="['system:user:remove']"
|
v-hasPermi="['system:user:remove']"
|
||||||
>查看</el-button
|
>查看</el-button
|
||||||
>
|
> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -589,7 +589,6 @@
|
|||||||
<script setup name="InventoryReceiptDialog">
|
<script setup name="InventoryReceiptDialog">
|
||||||
import {
|
import {
|
||||||
getPurchaseinventoryList,
|
getPurchaseinventoryList,
|
||||||
editPurchaseinventory,
|
|
||||||
addPurchaseinventory,
|
addPurchaseinventory,
|
||||||
getPurchaseinventoryOne,
|
getPurchaseinventoryOne,
|
||||||
getInit,
|
getInit,
|
||||||
@@ -702,6 +701,7 @@ const itemTypeOptions = ref(undefined); // 入库项目类型
|
|||||||
const practitionerListOptions = ref(undefined); // 查询经手人列表
|
const practitionerListOptions = ref(undefined); // 查询经手人列表
|
||||||
const supplierListOptions = ref(undefined); // 供应商列表
|
const supplierListOptions = ref(undefined); // 供应商列表
|
||||||
const selectedRows = ref([]); // 用于存储选中的行
|
const selectedRows = ref([]); // 用于存储选中的行
|
||||||
|
const emit = defineEmits(['new-item-added']);
|
||||||
|
|
||||||
const addNewRow = () => {
|
const addNewRow = () => {
|
||||||
if (data.isAdding) {
|
if (data.isAdding) {
|
||||||
@@ -764,24 +764,26 @@ const saveRow = (row, index) => {
|
|||||||
row.supplierId = receiptHeaderForm.value.supplierId;
|
row.supplierId = receiptHeaderForm.value.supplierId;
|
||||||
row.purposeTypeEnum = receiptHeaderForm.value.purposeTypeEnum;
|
row.purposeTypeEnum = receiptHeaderForm.value.purposeTypeEnum;
|
||||||
console.log(row, "rowabbbbbbbbbbbbbb");
|
console.log(row, "rowabbbbbbbbbbbbbb");
|
||||||
// try {
|
try {
|
||||||
// 调用 API 保存数据
|
// 调用 API 保存数据
|
||||||
// await savePurchaseInventory(row);
|
// await savePurchaseInventory(row);
|
||||||
|
|
||||||
|
// 保存成功后,更新本地数据
|
||||||
|
purchaseinventoryList.value[index] = row;
|
||||||
|
// 将表单数据发送给父组件
|
||||||
|
// emits("submit", row);
|
||||||
|
addPurchaseinventory(row).then((response) => {
|
||||||
|
reset();
|
||||||
|
data.isAdding = false; // 允许新增下一行
|
||||||
|
proxy.$message.success("保存成功!");
|
||||||
|
visible.value = false;
|
||||||
|
emit('new-item-added'); // 通知父组件
|
||||||
|
// getList();
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
proxy.$message.error("保存失败,请重试!");
|
||||||
|
}
|
||||||
|
|
||||||
// 保存成功后,更新本地数据
|
|
||||||
purchaseinventoryList.value[index] = row;
|
|
||||||
// 将表单数据发送给父组件
|
|
||||||
emits("submit", row);
|
|
||||||
// addPurchaseinventory(row).then((response) => {
|
|
||||||
// reset();
|
|
||||||
// data.isAdding = false; // 允许新增下一行
|
|
||||||
// proxy.$message.success("保存成功!");
|
|
||||||
// visible.value = false;
|
|
||||||
// // getList();
|
|
||||||
// });
|
|
||||||
// } catch (error) {
|
|
||||||
// proxy.$message.error("保存失败,请重试!");
|
|
||||||
// }
|
|
||||||
// proxy.$message.success("保存成功!");
|
// proxy.$message.success("保存成功!");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export function getPurchaseinventoryOne(id) {
|
|||||||
export function addPurchaseinventory(data) {
|
export function addPurchaseinventory(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/inventory-manage/purchase/inventory-receipt',
|
url: '/inventory-manage/purchase/inventory-receipt',
|
||||||
method: 'post',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -230,7 +230,6 @@
|
|||||||
<script setup name="Purchaseinventory">
|
<script setup name="Purchaseinventory">
|
||||||
import {
|
import {
|
||||||
getPurchaseinventoryList,
|
getPurchaseinventoryList,
|
||||||
editPurchaseinventory,
|
|
||||||
addPurchaseinventory,
|
addPurchaseinventory,
|
||||||
getPurchaseinventoryOne,
|
getPurchaseinventoryOne,
|
||||||
getInit,
|
getInit,
|
||||||
|
|||||||
Reference in New Issue
Block a user