|
@@ -197,6 +197,7 @@ const formConfig = reactive([
|
|
|
type: "select",
|
|
|
prop: "type",
|
|
|
label: "仓库类型",
|
|
|
+
|
|
|
required: true,
|
|
|
data: [],
|
|
|
},
|
|
@@ -209,6 +210,7 @@ const formConfig = reactive([
|
|
|
type: "select",
|
|
|
prop: "keeperId",
|
|
|
label: "仓管员",
|
|
|
+ multiple: true,
|
|
|
isLoad: {
|
|
|
url: `/tenantUser/list?pageNum=1&pageSize=9999&tenantId=${
|
|
|
useUserStore().user.tenantId
|
|
@@ -241,14 +243,18 @@ const getList = async (req) => {
|
|
|
const openModal = () => {
|
|
|
dialogVisible.value = true;
|
|
|
modalType.value = "add";
|
|
|
- formData.data = {};
|
|
|
+ formData.data = {
|
|
|
+ keeperId: [],
|
|
|
+ };
|
|
|
};
|
|
|
|
|
|
const submitForm = () => {
|
|
|
console.log(byform.value);
|
|
|
byform.value.handleSubmit((valid) => {
|
|
|
submitLoading.value = true;
|
|
|
- proxy.post("/warehouse/" + modalType.value, formData.data).then(
|
|
|
+ const submitData = { ...formData.data };
|
|
|
+ submitData.keeperId = submitData.keeperId.join(",");
|
|
|
+ proxy.post("/warehouse/" + modalType.value, submitData).then(
|
|
|
(res) => {
|
|
|
ElMessage({
|
|
|
message: modalType.value == "add" ? "添加成功" : "编辑成功",
|
|
@@ -267,10 +273,12 @@ const getDtl = (row) => {
|
|
|
modalType.value = "edit";
|
|
|
proxy.post("/warehouse/detail", { id: row.id }).then((res) => {
|
|
|
res.type = res.type + "";
|
|
|
+ res.keeperId = res.keeperId.split(",");
|
|
|
dialogVisible.value = true;
|
|
|
formData.data = res;
|
|
|
});
|
|
|
};
|
|
|
+
|
|
|
const warehouseType = ref([]);
|
|
|
const getDict = () => {
|
|
|
// // 币种数据
|