update: 更新常用应用分页以及非空校验
This commit is contained in:
parent
26e2e82669
commit
1dc643ca8a
|
@ -7,9 +7,10 @@
|
||||||
ref="form"
|
ref="form"
|
||||||
:labelWidth="100"
|
:labelWidth="100"
|
||||||
:labelStyle="{ padding: '0rpx 10rpx' }"
|
:labelStyle="{ padding: '0rpx 10rpx' }"
|
||||||
|
:errorType="'border-bottom'"
|
||||||
>
|
>
|
||||||
<u-form-item
|
<u-form-item
|
||||||
:prop="`formData[${item.key}]`"
|
:prop="`formData.${item.key}`"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:required="item.required"
|
:required="item.required"
|
||||||
v-for="(item, index) in formAttrList"
|
v-for="(item, index) in formAttrList"
|
||||||
|
@ -53,7 +54,6 @@
|
||||||
:closeOnClickAction="true"
|
:closeOnClickAction="true"
|
||||||
:scroll="true"
|
:scroll="true"
|
||||||
></u-action-sheet>
|
></u-action-sheet>
|
||||||
|
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn-box">
|
<view class="btn-box">
|
||||||
|
@ -71,16 +71,40 @@ const model1 = reactive<any>({
|
||||||
formData: {},
|
formData: {},
|
||||||
});
|
});
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
"userInfo.userName": {
|
"formData.reProductsName": {
|
||||||
type: "string",
|
type: "string",
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入手机号",
|
message: "请输入货产品",
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
"userInfo.password": {
|
"formData.reCategoryName": {
|
||||||
type: "string",
|
type: "string",
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入密码",
|
message: "请选择收货分类",
|
||||||
|
trigger: ["blur", "change"],
|
||||||
|
},
|
||||||
|
"formData.substationName": {
|
||||||
|
type: "string",
|
||||||
|
required: true,
|
||||||
|
message: "请输入所属分站",
|
||||||
|
trigger: ["blur", "change"],
|
||||||
|
},
|
||||||
|
"formData.minPrice": {
|
||||||
|
type: "string",
|
||||||
|
required: true,
|
||||||
|
message: "请输入最低价",
|
||||||
|
trigger: ["blur", "change"],
|
||||||
|
},
|
||||||
|
"formData.maxPrice": {
|
||||||
|
type: "string",
|
||||||
|
required: true,
|
||||||
|
message: "请输入最高价",
|
||||||
|
trigger: ["blur", "change"],
|
||||||
|
},
|
||||||
|
"formData.commonPrice": {
|
||||||
|
type: "string",
|
||||||
|
required: true,
|
||||||
|
message: "请输入常用价格",
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -150,7 +174,32 @@ const handleSelect = (key: string, v: any) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const form = ref();
|
||||||
|
const check = () => {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
form.value
|
||||||
|
.validate()
|
||||||
|
.then((res: boolean) => {
|
||||||
|
resolve(res);
|
||||||
|
})
|
||||||
|
.catch((errors: any) => {
|
||||||
|
resolve(false);
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: errors[0].message || "校验失败",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const save = () => {
|
const save = () => {
|
||||||
|
check().then((res) => {
|
||||||
|
if (res) {
|
||||||
|
startSave();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const startSave = () => {
|
||||||
if (model1.formData.id) {
|
if (model1.formData.id) {
|
||||||
GoodsApi.EditReceiveProduct(model1.formData).then((res) => {
|
GoodsApi.EditReceiveProduct(model1.formData).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
|
|
@ -7,9 +7,10 @@
|
||||||
ref="form"
|
ref="form"
|
||||||
:labelWidth="100"
|
:labelWidth="100"
|
||||||
:labelStyle="{ padding: '0rpx 10rpx' }"
|
:labelStyle="{ padding: '0rpx 10rpx' }"
|
||||||
|
:errorType="'border-bottom'"
|
||||||
>
|
>
|
||||||
<u-form-item
|
<u-form-item
|
||||||
:prop="`formData[${item.key}]`"
|
:prop="`formData.${item.key}`"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:required="item.required"
|
:required="item.required"
|
||||||
v-for="(item, index) in formAttrList"
|
v-for="(item, index) in formAttrList"
|
||||||
|
@ -69,16 +70,10 @@ const model1 = reactive<any>({
|
||||||
formData: {},
|
formData: {},
|
||||||
});
|
});
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
"userInfo.userName": {
|
"formData.reCategoryName": {
|
||||||
type: "string",
|
type: "string",
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入手机号",
|
message: "请输入收货分类",
|
||||||
trigger: ["blur", "change"],
|
|
||||||
},
|
|
||||||
"userInfo.password": {
|
|
||||||
type: "string",
|
|
||||||
required: true,
|
|
||||||
message: "请输入密码",
|
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -86,14 +81,17 @@ const contrlModalParams = reactive<any>({
|
||||||
cardType: {
|
cardType: {
|
||||||
isShow: false,
|
isShow: false,
|
||||||
title: "标题",
|
title: "标题",
|
||||||
list: [{
|
list: [
|
||||||
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: '出库卡'
|
name: "出库卡",
|
||||||
},{
|
},
|
||||||
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
name: '入库卡'
|
name: "入库卡",
|
||||||
}],
|
},
|
||||||
}
|
],
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const formAttrList = reactive<any>([
|
const formAttrList = reactive<any>([
|
||||||
|
@ -112,8 +110,32 @@ const handleSelect = (key: string, v: any) => {
|
||||||
model1.formData.type = v.id;
|
model1.formData.type = v.id;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const form = ref();
|
||||||
|
const check = () => {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
form.value
|
||||||
|
.validate()
|
||||||
|
.then((res: boolean) => {
|
||||||
|
resolve(res);
|
||||||
|
})
|
||||||
|
.catch((errors: any) => {
|
||||||
|
resolve(false);
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: errors[0].message || "校验失败",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const save = () => {
|
const save = () => {
|
||||||
|
check().then((res) => {
|
||||||
|
if (res) {
|
||||||
|
startSave();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const startSave = () => {
|
||||||
if (model1.formData.id) {
|
if (model1.formData.id) {
|
||||||
GoodsApi.editReceiveCategory(model1.formData).then((res) => {
|
GoodsApi.editReceiveCategory(model1.formData).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
@ -133,15 +155,14 @@ const save = () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
// 接收传递的标题参数
|
// 接收传递的标题参数
|
||||||
const title = (option as any).title;
|
const title = (option as any).title;
|
||||||
model1.formData = JSON.parse((option as any).item);
|
model1.formData = JSON.parse((option as any).item);
|
||||||
if (model1.formData.type === 1) {
|
if (model1.formData.type === 1) {
|
||||||
model1.formData.typeName = '出库卡'
|
model1.formData.typeName = "出库卡";
|
||||||
} else if (model1.formData.type === 2) {
|
} else if (model1.formData.type === 2) {
|
||||||
model1.formData.typeName = '入库卡'
|
model1.formData.typeName = "入库卡";
|
||||||
}
|
}
|
||||||
// 设置页面标题
|
// 设置页面标题
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
|
|
|
@ -7,9 +7,10 @@
|
||||||
ref="form"
|
ref="form"
|
||||||
:labelWidth="100"
|
:labelWidth="100"
|
||||||
:labelStyle="{ padding: '0rpx 10rpx' }"
|
:labelStyle="{ padding: '0rpx 10rpx' }"
|
||||||
|
:errorType="'border-bottom'"
|
||||||
>
|
>
|
||||||
<u-form-item
|
<u-form-item
|
||||||
:prop="`formData[${item.key}]`"
|
:prop="`formData.${item.key}`"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:required="item.required"
|
:required="item.required"
|
||||||
v-for="(item, index) in formAttrList"
|
v-for="(item, index) in formAttrList"
|
||||||
|
@ -96,18 +97,12 @@ const model1 = reactive<any>({
|
||||||
formData: {},
|
formData: {},
|
||||||
});
|
});
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
"userInfo.userName": {
|
"formData.roleName": {
|
||||||
type: "string",
|
type: "string",
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入手机号",
|
message: "请输入角色名称",
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
}
|
||||||
"userInfo.password": {
|
|
||||||
type: "string",
|
|
||||||
required: true,
|
|
||||||
message: "请输入密码",
|
|
||||||
trigger: ["blur", "change"],
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
const contrlModalParams = reactive<any>({
|
const contrlModalParams = reactive<any>({
|
||||||
checkedMap: {},
|
checkedMap: {},
|
||||||
|
@ -121,6 +116,7 @@ const formAttrList = reactive<any>([
|
||||||
name: "角色名称",
|
name: "角色名称",
|
||||||
key: "roleName",
|
key: "roleName",
|
||||||
type: "input",
|
type: "input",
|
||||||
|
required: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "权限配置",
|
name: "权限配置",
|
||||||
|
@ -138,8 +134,32 @@ const formAttrList = reactive<any>([
|
||||||
// model1.formData.roleIds = [v.id];
|
// model1.formData.roleIds = [v.id];
|
||||||
// }
|
// }
|
||||||
// };
|
// };
|
||||||
|
const form = ref();
|
||||||
|
const check = () => {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
form.value
|
||||||
|
.validate()
|
||||||
|
.then((res: boolean) => {
|
||||||
|
resolve(res);
|
||||||
|
})
|
||||||
|
.catch((errors: any) => {
|
||||||
|
resolve(false);
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: errors[0].message || "校验失败",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const save = () => {
|
const save = () => {
|
||||||
|
check().then((res) => {
|
||||||
|
if (res) {
|
||||||
|
startSave();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const startSave = () => {
|
||||||
let list: any = [];
|
let list: any = [];
|
||||||
contrlModalParams.menu.list.forEach((item: any) => {
|
contrlModalParams.menu.list.forEach((item: any) => {
|
||||||
item.childrenList.forEach((c: any) => {
|
item.childrenList.forEach((c: any) => {
|
||||||
|
@ -149,13 +169,15 @@ const save = () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
if (model1.formData.id) {
|
if (model1.formData.id) {
|
||||||
ProfileApi.updateRole({...deleteBaseKey(model1.formData), list}).then((res) => {
|
ProfileApi.updateRole({ ...deleteBaseKey(model1.formData), list }).then(
|
||||||
|
(res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: "/pagesApp/role", // 要跳转到的页面路径
|
url: "/pagesApp/role", // 要跳转到的页面路径
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
ProfileApi.addRole({ ...model1.formData, list }).then((res) => {
|
ProfileApi.addRole({ ...model1.formData, list }).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
|
|
@ -7,9 +7,10 @@
|
||||||
ref="form"
|
ref="form"
|
||||||
:labelWidth="100"
|
:labelWidth="100"
|
||||||
:labelStyle="{ padding: '0rpx 10rpx' }"
|
:labelStyle="{ padding: '0rpx 10rpx' }"
|
||||||
|
:errorType="'border-bottom'"
|
||||||
>
|
>
|
||||||
<u-form-item
|
<u-form-item
|
||||||
:prop="`formData[${item.key}]`"
|
:prop="`formData.${item.key}`"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:required="item.required"
|
:required="item.required"
|
||||||
v-for="(item, index) in formAttrList"
|
v-for="(item, index) in formAttrList"
|
||||||
|
@ -81,21 +82,21 @@ import { formatDate } from "@/utils";
|
||||||
import { DeviceType, ImagesType, OrderType } from "@/utils/enum";
|
import { DeviceType, ImagesType, OrderType } from "@/utils/enum";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import _ from "underscore";
|
import _ from "underscore";
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy }: any = getCurrentInstance();
|
||||||
const model1 = reactive<any>({
|
const model1 = reactive<any>({
|
||||||
formData: {},
|
formData: {},
|
||||||
});
|
});
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
"userInfo.userName": {
|
"formData.shmProductsName": {
|
||||||
type: "string",
|
type: "string",
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入手机号",
|
message: "请输入出货产品",
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
"userInfo.password": {
|
"formData.reCategoryName": {
|
||||||
type: "string",
|
type: "string",
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入密码",
|
message: "请选择出货分类",
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -154,21 +155,45 @@ const handleChange = (e: any) => {
|
||||||
|
|
||||||
const confirm = (e: any) => {
|
const confirm = (e: any) => {
|
||||||
if (e.value[1]) {
|
if (e.value[1]) {
|
||||||
model1.formData.shmCategoryId = e.value[1].id
|
model1.formData.shmCategoryId = e.value[1].id;
|
||||||
model1.formData.reCategoryName = e.value[1].shmCategoryName
|
model1.formData.reCategoryName = e.value[1].shmCategoryName;
|
||||||
contrlModalParams['reCategory'].isShow = false
|
contrlModalParams["reCategory"].isShow = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const form = ref();
|
||||||
|
const check = () => {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
form.value
|
||||||
|
.validate()
|
||||||
|
.then((res: boolean) => {
|
||||||
|
resolve(res);
|
||||||
|
})
|
||||||
|
.catch((errors: any) => {
|
||||||
|
resolve(false);
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: errors[0].message || "校验失败",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const save = () => {
|
const save = () => {
|
||||||
|
check().then((res) => {
|
||||||
|
if (res) {
|
||||||
|
startSave();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const startSave = () => {
|
||||||
if (model1.formData.id) {
|
if (model1.formData.id) {
|
||||||
// GoodsApi.EditReceiveProduct(model1.formData).then((res) => {
|
GoodsApi.editShipmentProduct(model1.formData).then((res) => {
|
||||||
// if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
// uni.redirectTo({
|
uni.redirectTo({
|
||||||
// url: "/pagesApp/shipmentProduct", // 要跳转到的页面路径
|
url: "/pagesApp/shipmentProduct", // 要跳转到的页面路径
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
} else {
|
} else {
|
||||||
GoodsApi.addShipmentProduct(model1.formData).then((res) => {
|
GoodsApi.addShipmentProduct(model1.formData).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
|
|
@ -7,9 +7,10 @@
|
||||||
ref="form"
|
ref="form"
|
||||||
:labelWidth="100"
|
:labelWidth="100"
|
||||||
:labelStyle="{ padding: '0rpx 10rpx' }"
|
:labelStyle="{ padding: '0rpx 10rpx' }"
|
||||||
|
:errorType="'border-bottom'"
|
||||||
>
|
>
|
||||||
<u-form-item
|
<u-form-item
|
||||||
:prop="`formData[${item.key}]`"
|
:prop="`formData.${item.key}`"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:required="item.required"
|
:required="item.required"
|
||||||
v-for="(item, index) in formAttrList"
|
v-for="(item, index) in formAttrList"
|
||||||
|
@ -69,16 +70,16 @@ const model1 = reactive<any>({
|
||||||
formData: {},
|
formData: {},
|
||||||
});
|
});
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
"userInfo.userName": {
|
"formData.parentName": {
|
||||||
type: "string",
|
type: "string",
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入手机号",
|
message: "请选择上级菜单",
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
"userInfo.password": {
|
"formData.shmCategoryName": {
|
||||||
type: "string",
|
type: "string",
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入密码",
|
message: "请输入出货分类",
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -86,11 +87,13 @@ const contrlModalParams = reactive<any>({
|
||||||
parent: {
|
parent: {
|
||||||
isShow: false,
|
isShow: false,
|
||||||
title: "标题",
|
title: "标题",
|
||||||
list: [{
|
list: [
|
||||||
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
name: '主分类'
|
name: "主分类",
|
||||||
}],
|
},
|
||||||
}
|
],
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const formAttrList = reactive<any>([
|
const formAttrList = reactive<any>([
|
||||||
|
@ -120,8 +123,32 @@ const handleSelect = (key: string, v: any) => {
|
||||||
model1.formData.parentId = v.id;
|
model1.formData.parentId = v.id;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const form = ref();
|
||||||
|
const check = () => {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
form.value
|
||||||
|
.validate()
|
||||||
|
.then((res: boolean) => {
|
||||||
|
resolve(res);
|
||||||
|
})
|
||||||
|
.catch((errors: any) => {
|
||||||
|
resolve(false);
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: errors[0].message || "校验失败",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const save = () => {
|
const save = () => {
|
||||||
|
check().then((res) => {
|
||||||
|
if (res) {
|
||||||
|
startSave();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const startSave = () => {
|
||||||
if (model1.formData.id) {
|
if (model1.formData.id) {
|
||||||
GoodsApi.editReceiveCategory(model1.formData).then((res) => {
|
GoodsApi.editReceiveCategory(model1.formData).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
@ -141,7 +168,6 @@ const save = () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
// 接收传递的标题参数
|
// 接收传递的标题参数
|
||||||
const title = (option as any).title;
|
const title = (option as any).title;
|
||||||
|
|
|
@ -7,9 +7,10 @@
|
||||||
ref="form"
|
ref="form"
|
||||||
:labelWidth="100"
|
:labelWidth="100"
|
||||||
:labelStyle="{ padding: '0rpx 10rpx' }"
|
:labelStyle="{ padding: '0rpx 10rpx' }"
|
||||||
|
:errorType="'border-bottom'"
|
||||||
>
|
>
|
||||||
<u-form-item
|
<u-form-item
|
||||||
:prop="`formData[${item.key}]`"
|
:prop="`formData.${item.key}`"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:required="item.required"
|
:required="item.required"
|
||||||
v-for="(item, index) in formAttrList"
|
v-for="(item, index) in formAttrList"
|
||||||
|
@ -60,7 +61,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { StockCardApi } from "@/services";
|
import { StockCardApi } from "@/services";
|
||||||
import { formatDate } from "@/utils";
|
import { deleteBaseKey, formatDate } from "@/utils";
|
||||||
import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
|
import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import _ from "underscore";
|
import _ from "underscore";
|
||||||
|
@ -69,31 +70,34 @@ const model1 = reactive<any>({
|
||||||
formData: {},
|
formData: {},
|
||||||
});
|
});
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
"userInfo.userName": {
|
"formData.cardCode": {
|
||||||
type: "string",
|
type: "string",
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入手机号",
|
message: "请输入卡号",
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
"userInfo.password": {
|
"formData.typeName": {
|
||||||
type: "string",
|
type: "string",
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入密码",
|
message: "请选择类型",
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
const contrlModalParams = reactive<any>({
|
const contrlModalParams = reactive<any>({
|
||||||
cardType: {
|
cardType: {
|
||||||
isShow: false,
|
isShow: false,
|
||||||
title: "标题",
|
title: "标题",
|
||||||
list: [{
|
list: [
|
||||||
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: '出库卡'
|
name: "出库卡",
|
||||||
},{
|
},
|
||||||
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
name: '入库卡'
|
name: "入库卡",
|
||||||
}],
|
},
|
||||||
}
|
],
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const formAttrList = reactive<any>([
|
const formAttrList = reactive<any>([
|
||||||
|
@ -123,10 +127,34 @@ const handleSelect = (key: string, v: any) => {
|
||||||
model1.formData.type = v.id;
|
model1.formData.type = v.id;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const form = ref();
|
||||||
|
const check = () => {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
form.value
|
||||||
|
.validate()
|
||||||
|
.then((res: boolean) => {
|
||||||
|
resolve(res);
|
||||||
|
})
|
||||||
|
.catch((errors: any) => {
|
||||||
|
resolve(false);
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: errors[0].message || "校验失败",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const save = () => {
|
const save = () => {
|
||||||
|
check().then((res) => {
|
||||||
|
if (res) {
|
||||||
|
startSave();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const startSave = () => {
|
||||||
if (model1.formData.id) {
|
if (model1.formData.id) {
|
||||||
StockCardApi.updateStockCard(model1.formData).then((res) => {
|
StockCardApi.updateStockCard({...deleteBaseKey(model1.formData)}).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: "/pagesApp/stockCard", // 要跳转到的页面路径
|
url: "/pagesApp/stockCard", // 要跳转到的页面路径
|
||||||
|
@ -144,15 +172,14 @@ const save = () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
// 接收传递的标题参数
|
// 接收传递的标题参数
|
||||||
const title = (option as any).title;
|
const title = (option as any).title;
|
||||||
model1.formData = JSON.parse((option as any).item);
|
model1.formData = JSON.parse((option as any).item);
|
||||||
if (model1.formData.type === 1) {
|
if (model1.formData.type === 1) {
|
||||||
model1.formData.typeName = '出库卡'
|
model1.formData.typeName = "出库卡";
|
||||||
} else if (model1.formData.type === 2) {
|
} else if (model1.formData.type === 2) {
|
||||||
model1.formData.typeName = '入库卡'
|
model1.formData.typeName = "入库卡";
|
||||||
}
|
}
|
||||||
// 设置页面标题
|
// 设置页面标题
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
|
|
|
@ -7,9 +7,10 @@
|
||||||
ref="form"
|
ref="form"
|
||||||
:labelWidth="100"
|
:labelWidth="100"
|
||||||
:labelStyle="{ padding: '0rpx 10rpx' }"
|
:labelStyle="{ padding: '0rpx 10rpx' }"
|
||||||
|
:errorType="'border-bottom'"
|
||||||
>
|
>
|
||||||
<u-form-item
|
<u-form-item
|
||||||
:prop="`formData[${item.key}]`"
|
:prop="`formData.${item.key}`"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:required="item.required"
|
:required="item.required"
|
||||||
v-for="(item, index) in formAttrList"
|
v-for="(item, index) in formAttrList"
|
||||||
|
@ -69,31 +70,28 @@ const model1 = reactive<any>({
|
||||||
formData: {},
|
formData: {},
|
||||||
});
|
});
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
"userInfo.userName": {
|
"formData.name": {
|
||||||
type: "string",
|
type: "string",
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入手机号",
|
message: "请输入供应商分类",
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
}
|
||||||
"userInfo.password": {
|
|
||||||
type: "string",
|
|
||||||
required: true,
|
|
||||||
message: "请输入密码",
|
|
||||||
trigger: ["blur", "change"],
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
const contrlModalParams = reactive<any>({
|
const contrlModalParams = reactive<any>({
|
||||||
cardType: {
|
cardType: {
|
||||||
isShow: false,
|
isShow: false,
|
||||||
title: "标题",
|
title: "标题",
|
||||||
list: [{
|
list: [
|
||||||
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: '出库卡'
|
name: "出库卡",
|
||||||
},{
|
},
|
||||||
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
name: '入库卡'
|
name: "入库卡",
|
||||||
}],
|
},
|
||||||
}
|
],
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const formAttrList = reactive<any>([
|
const formAttrList = reactive<any>([
|
||||||
|
@ -113,7 +111,33 @@ const handleSelect = (key: string, v: any) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const form = ref();
|
||||||
|
const check = () => {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
form.value
|
||||||
|
.validate()
|
||||||
|
.then((res: boolean) => {
|
||||||
|
resolve(res);
|
||||||
|
})
|
||||||
|
.catch((errors: any) => {
|
||||||
|
resolve(false);
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: errors[0].message || "校验失败",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const save = () => {
|
const save = () => {
|
||||||
|
check().then((res) => {
|
||||||
|
if (res) {
|
||||||
|
startSave();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const startSave = () => {
|
||||||
if (model1.formData.id) {
|
if (model1.formData.id) {
|
||||||
SupplierApi.updateSupplierType(model1.formData).then((res) => {
|
SupplierApi.updateSupplierType(model1.formData).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
@ -133,15 +157,14 @@ const save = () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
// 接收传递的标题参数
|
// 接收传递的标题参数
|
||||||
const title = (option as any).title;
|
const title = (option as any).title;
|
||||||
model1.formData = JSON.parse((option as any).item);
|
model1.formData = JSON.parse((option as any).item);
|
||||||
if (model1.formData.type === 1) {
|
if (model1.formData.type === 1) {
|
||||||
model1.formData.typeName = '出库卡'
|
model1.formData.typeName = "出库卡";
|
||||||
} else if (model1.formData.type === 2) {
|
} else if (model1.formData.type === 2) {
|
||||||
model1.formData.typeName = '入库卡'
|
model1.formData.typeName = "入库卡";
|
||||||
}
|
}
|
||||||
// 设置页面标题
|
// 设置页面标题
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
|
|
|
@ -7,9 +7,10 @@
|
||||||
ref="form"
|
ref="form"
|
||||||
:labelWidth="100"
|
:labelWidth="100"
|
||||||
:labelStyle="{ padding: '0rpx 10rpx' }"
|
:labelStyle="{ padding: '0rpx 10rpx' }"
|
||||||
|
:errorType="'border-bottom'"
|
||||||
>
|
>
|
||||||
<u-form-item
|
<u-form-item
|
||||||
:prop="`formData[${item.key}]`"
|
:prop="`formData.${item.key}`"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:required="item.required"
|
:required="item.required"
|
||||||
v-for="(item, index) in formAttrList"
|
v-for="(item, index) in formAttrList"
|
||||||
|
@ -70,13 +71,13 @@ const model1 = reactive<any>({
|
||||||
formData: {},
|
formData: {},
|
||||||
});
|
});
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
"userInfo.userName": {
|
"formData.userName": {
|
||||||
type: "string",
|
type: "string",
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入手机号",
|
message: "请输入用户名",
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
"userInfo.password": {
|
"formData.password": {
|
||||||
type: "string",
|
type: "string",
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入密码",
|
message: "请输入密码",
|
||||||
|
@ -92,14 +93,16 @@ const contrlModalParams = reactive<any>({
|
||||||
gender: {
|
gender: {
|
||||||
isShow: false,
|
isShow: false,
|
||||||
title: "标题",
|
title: "标题",
|
||||||
list: [{
|
list: [
|
||||||
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: '男'
|
name: "男",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
name: '女'
|
name: "女",
|
||||||
}],
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -160,7 +163,33 @@ const handleSelect = (key: string, v: any) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const form = ref();
|
||||||
|
const check = () => {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
form.value
|
||||||
|
.validate()
|
||||||
|
.then((res: boolean) => {
|
||||||
|
resolve(res);
|
||||||
|
})
|
||||||
|
.catch((errors: any) => {
|
||||||
|
resolve(false);
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: errors[0].message || "校验失败",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const save = () => {
|
const save = () => {
|
||||||
|
check().then((res) => {
|
||||||
|
if (res) {
|
||||||
|
startSave();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const startSave = () => {
|
||||||
if (model1.formData.id) {
|
if (model1.formData.id) {
|
||||||
ProfileApi.updateUserById(model1.formData).then((res) => {
|
ProfileApi.updateUserById(model1.formData).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
|
|
@ -13,6 +13,17 @@
|
||||||
<view class="btn" @click="add"> 新增 </view>
|
<view class="btn" @click="add"> 新增 </view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<page-view
|
||||||
|
@loadList="
|
||||||
|
(v) => {
|
||||||
|
getList(v);
|
||||||
|
}
|
||||||
|
"
|
||||||
|
:noMoreData="pageList.noMoreData"
|
||||||
|
:list="pageList.list"
|
||||||
|
:height="100"
|
||||||
|
:isLoading="pageList.isLoading"
|
||||||
|
>
|
||||||
<view class="box" v-for="(item, index) in pageList.list" :key="index">
|
<view class="box" v-for="(item, index) in pageList.list" :key="index">
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
|
@ -25,11 +36,13 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</page-view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { GoodsApi } from "@/services";
|
import { GoodsApi } from "@/services";
|
||||||
import { UsersType } from "@/utils/enum";
|
import { UsersType } from "@/utils/enum";
|
||||||
|
import PageView from "@/components/PageView/index.vue";
|
||||||
const state = reactive<any>({
|
const state = reactive<any>({
|
||||||
name: "",
|
name: "",
|
||||||
supplierTypeId: -1,
|
supplierTypeId: -1,
|
||||||
|
@ -41,24 +54,33 @@ const pageList: PageResult<{
|
||||||
minPrice: number;
|
minPrice: number;
|
||||||
maxPrice: number;
|
maxPrice: number;
|
||||||
}> = reactive({
|
}> = reactive({
|
||||||
|
isLoading: false,
|
||||||
|
noMoreData: false,
|
||||||
total: 0,
|
total: 0,
|
||||||
list: [],
|
list: [],
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
});
|
});
|
||||||
|
const resetPageList = () => {
|
||||||
|
pageList.noMoreData = false;
|
||||||
|
pageList.total = 0;
|
||||||
|
pageList.list = [];
|
||||||
|
pageList.pageNum = 1;
|
||||||
|
pageList.pageSize = 10;
|
||||||
|
};
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
|
resetPageList();
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
|
|
||||||
const update = (item: any) => {
|
const update = (item: any) => {
|
||||||
GoodsApi.EditReceiveProduct({ isDeleted: true, id: item.id }).then(
|
|
||||||
(res) => {
|
GoodsApi.EditReceiveProduct({ isDeleted: true, id: item.id }).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
resetPageList();
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const edit = (item: any) => {
|
const edit = (item: any) => {
|
||||||
|
@ -68,17 +90,28 @@ const edit = (item: any) => {
|
||||||
JSON.stringify(item), // 要跳转到的页面路径
|
JSON.stringify(item), // 要跳转到的页面路径
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const getList = () => {
|
const getList = (v?: boolean) => {
|
||||||
|
if (v) {
|
||||||
|
if (Math.ceil(pageList.total / pageList.pageSize) > pageList.pageNum) {
|
||||||
|
pageList.pageNum++;
|
||||||
|
} else {
|
||||||
|
pageList.noMoreData = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
let params: any = {
|
let params: any = {
|
||||||
pageSize: 10,
|
pageSize: pageList.pageSize,
|
||||||
pageNum: 1,
|
pageNum: pageList.pageNum,
|
||||||
reProductsName: state.name,
|
reProductsName: state.name,
|
||||||
};
|
};
|
||||||
GoodsApi.getReceiveProductListByPage(params).then((res) => {
|
pageList.isLoading = true;
|
||||||
|
GoodsApi.getReceiveProductListByPage(params).then((res:any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
if (res.code === 200) {
|
pageList.isLoading = false;
|
||||||
(pageList as any).list = (res.data as any).list;
|
(pageList as any).list = (pageList as any).list = pageList.list.concat(
|
||||||
}
|
res.data.list
|
||||||
|
);
|
||||||
|
pageList.total = (res.data as any).total;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,6 +12,17 @@
|
||||||
></u-search>
|
></u-search>
|
||||||
<view class="btn" @click="add"> 新增 </view>
|
<view class="btn" @click="add"> 新增 </view>
|
||||||
</view>
|
</view>
|
||||||
|
<page-view
|
||||||
|
@loadList="
|
||||||
|
(v) => {
|
||||||
|
getList(v);
|
||||||
|
}
|
||||||
|
"
|
||||||
|
:noMoreData="pageList.noMoreData"
|
||||||
|
:list="pageList.list"
|
||||||
|
:height="100"
|
||||||
|
:isLoading="pageList.isLoading"
|
||||||
|
>
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view v-for="(item, index) in pageList.list" :key="index">
|
<view v-for="(item, index) in pageList.list" :key="index">
|
||||||
<view>
|
<view>
|
||||||
|
@ -23,23 +34,32 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</page-view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { GoodsApi } from "@/services";
|
import { GoodsApi } from "@/services";
|
||||||
import { StockCardType } from "@/utils/enum";
|
import { StockCardType } from "@/utils/enum";
|
||||||
|
import PageView from "@/components/PageView/index.vue";
|
||||||
const keyword = ref("");
|
|
||||||
|
|
||||||
const state = reactive<any>({
|
const state = reactive<any>({
|
||||||
name: "",
|
name: "",
|
||||||
});
|
});
|
||||||
const pageList: PageResult<{ reCategoryName: string }> = reactive({
|
const pageList: PageResult<{ reCategoryName: string }> = reactive({
|
||||||
|
isLoading: false,
|
||||||
|
noMoreData: false,
|
||||||
total: 0,
|
total: 0,
|
||||||
list: [],
|
list: [],
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
});
|
});
|
||||||
|
const resetPageList = () => {
|
||||||
|
pageList.noMoreData = false;
|
||||||
|
pageList.total = 0;
|
||||||
|
pageList.list = [];
|
||||||
|
pageList.pageNum = 1;
|
||||||
|
pageList.pageSize = 10;
|
||||||
|
};
|
||||||
const add = () => {
|
const add = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pagesApp/components/addReceiveType", // 要跳转到的页面路径
|
url: "/pagesApp/components/addReceiveType", // 要跳转到的页面路径
|
||||||
|
@ -55,27 +75,40 @@ const edit = (item: any) => {
|
||||||
const deleteType = (item: any) => {
|
const deleteType = (item: any) => {
|
||||||
GoodsApi.editReceiveCategory({ isDeleted: true, id: item.id }).then((res) => {
|
GoodsApi.editReceiveCategory({ isDeleted: true, id: item.id }).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
resetPageList();
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
|
resetPageList();
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
const getList = () => {
|
const getList = (v?: boolean) => {
|
||||||
|
if (v) {
|
||||||
|
if (Math.ceil(pageList.total / pageList.pageSize) > pageList.pageNum) {
|
||||||
|
pageList.pageNum++;
|
||||||
|
} else {
|
||||||
|
pageList.noMoreData = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
let params: any = {
|
let params: any = {
|
||||||
pageSize: 10,
|
pageSize: pageList.pageSize,
|
||||||
pageNum: 1,
|
pageNum: pageList.pageNum,
|
||||||
reCategoryName: state.name,
|
reCategoryName: state.name,
|
||||||
};
|
};
|
||||||
if (state.supplierTypeId > -1) {
|
if (state.supplierTypeId > -1) {
|
||||||
params.supplierTypeId = state.supplierTypeId;
|
params.supplierTypeId = state.supplierTypeId;
|
||||||
}
|
}
|
||||||
GoodsApi.getPage(params).then((res) => {
|
pageList.isLoading = true;
|
||||||
|
GoodsApi.getPage(params).then((res:any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
if (res.code === 200) {
|
pageList.isLoading = false;
|
||||||
(pageList as any).list = (res.data as any).list;
|
(pageList as any).list = (pageList as any).list = pageList.list.concat(
|
||||||
}
|
res.data.list
|
||||||
|
);
|
||||||
|
pageList.total = (res.data as any).total;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
:noMoreData="pageList.noMoreData"
|
:noMoreData="pageList.noMoreData"
|
||||||
|
:list="pageList.list"
|
||||||
|
:height="100"
|
||||||
|
:isLoading="pageList.isLoading"
|
||||||
>
|
>
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view v-for="(item, index) in pageList.list" :key="index">
|
<view v-for="(item, index) in pageList.list" :key="index">
|
||||||
|
@ -27,7 +30,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="op-box">
|
<view class="op-box">
|
||||||
<view class="btn" @click="edit(item)"> 编辑 </view>
|
<view class="btn" @click="edit(item)"> 编辑 </view>
|
||||||
<view class="btn" @click="deleteCustomer(item)"> 删除 </view>
|
<view class="btn" @click="deleteRole(item)"> 删除 </view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -52,6 +55,13 @@ const pageList: PageResult<{
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
});
|
});
|
||||||
|
const resetPageList = () => {
|
||||||
|
pageList.noMoreData = false;
|
||||||
|
pageList.total = 0;
|
||||||
|
pageList.list = [];
|
||||||
|
pageList.pageNum = 1;
|
||||||
|
pageList.pageSize = 10;
|
||||||
|
};
|
||||||
const add = () => {
|
const add = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pagesApp/components/addRole", // 要跳转到的页面路径
|
url: "/pagesApp/components/addRole", // 要跳转到的页面路径
|
||||||
|
@ -64,14 +74,16 @@ const edit = (item: any) => {
|
||||||
JSON.stringify(item), // 要跳转到的页面路径
|
JSON.stringify(item), // 要跳转到的页面路径
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const deleteCustomer = (item: any) => {
|
const deleteRole = (item: any) => {
|
||||||
StockCardApi.updateStockCard({ isDeleted: true, id: item.id }).then((res) => {
|
ProfileApi.updateRole({ isDeleted: true, id: item.id }).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
resetPageList()
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
|
resetPageList()
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
const getList = (v?: boolean) => {
|
const getList = (v?: boolean) => {
|
||||||
|
@ -92,7 +104,6 @@ const getList = (v?: boolean) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
pageList.isLoading = false;
|
pageList.isLoading = false;
|
||||||
(pageList as any).list = res.data as any;
|
(pageList as any).list = res.data as any;
|
||||||
pageList.total = (res.data as any).total
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -13,11 +13,24 @@
|
||||||
<view class="btn" @click="add"> 新增 </view>
|
<view class="btn" @click="add"> 新增 </view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<page-view
|
||||||
|
@loadList="
|
||||||
|
(v) => {
|
||||||
|
getList(v);
|
||||||
|
}
|
||||||
|
"
|
||||||
|
:noMoreData="pageList.noMoreData"
|
||||||
|
:list="pageList.list"
|
||||||
|
:height="100"
|
||||||
|
:isLoading="pageList.isLoading"
|
||||||
|
>
|
||||||
<view class="box" v-for="(item, index) in pageList.list" :key="index">
|
<view class="box" v-for="(item, index) in pageList.list" :key="index">
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
<view>{{ item.shmProductsName }}</view>
|
<view>{{ item.shmProductsName }}</view>
|
||||||
<view>分类:{{ item.parentName }} / {{ item.shmCategoryName }} </view>
|
<view
|
||||||
|
>分类:{{ item.parentName }} / {{ item.shmCategoryName }}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="op-box">
|
<view class="op-box">
|
||||||
<view class="btn" @click="edit(item)"> 编辑 </view>
|
<view class="btn" @click="edit(item)"> 编辑 </view>
|
||||||
|
@ -25,11 +38,13 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</page-view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { GoodsApi } from "@/services";
|
import { GoodsApi } from "@/services";
|
||||||
import { UsersType } from "@/utils/enum";
|
import { UsersType } from "@/utils/enum";
|
||||||
|
import PageView from "@/components/PageView/index.vue";
|
||||||
const state = reactive<any>({
|
const state = reactive<any>({
|
||||||
name: "",
|
name: "",
|
||||||
supplierTypeId: -1,
|
supplierTypeId: -1,
|
||||||
|
@ -41,24 +56,32 @@ const pageList: PageResult<{
|
||||||
parentName: string;
|
parentName: string;
|
||||||
shmCategoryName: string;
|
shmCategoryName: string;
|
||||||
}> = reactive({
|
}> = reactive({
|
||||||
|
isLoading: false,
|
||||||
|
noMoreData: false,
|
||||||
total: 0,
|
total: 0,
|
||||||
list: [],
|
list: [],
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
});
|
});
|
||||||
|
const resetPageList = () => {
|
||||||
|
pageList.noMoreData = false;
|
||||||
|
pageList.total = 0;
|
||||||
|
pageList.list = [];
|
||||||
|
pageList.pageNum = 1;
|
||||||
|
pageList.pageSize = 10;
|
||||||
|
};
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
|
resetPageList();
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
|
|
||||||
const update = (item: any) => {
|
const update = (item: any) => {
|
||||||
GoodsApi.EditReceiveProduct({ isDeleted: true, id: item.id }).then(
|
GoodsApi.EditReceiveProduct({ isDeleted: true, id: item.id }).then((res) => {
|
||||||
(res) => {
|
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
resetPageList();
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const edit = (item: any) => {
|
const edit = (item: any) => {
|
||||||
|
@ -68,17 +91,26 @@ const edit = (item: any) => {
|
||||||
JSON.stringify(item), // 要跳转到的页面路径
|
JSON.stringify(item), // 要跳转到的页面路径
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const getList = () => {
|
const getList = (v?: boolean) => {
|
||||||
|
if (v) {
|
||||||
|
if (Math.ceil(pageList.total / pageList.pageSize) > pageList.pageNum) {
|
||||||
|
pageList.pageNum++;
|
||||||
|
} else {
|
||||||
|
pageList.noMoreData = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
let params: any = {
|
let params: any = {
|
||||||
pageSize: 10,
|
pageSize: pageList.pageSize,
|
||||||
pageNum: 1,
|
pageNum: pageList.pageNum,
|
||||||
name: state.name,
|
name: state.name,
|
||||||
};
|
};
|
||||||
GoodsApi.getShipmentProductByPage(params).then((res) => {
|
GoodsApi.getShipmentProductByPage(params).then((res: any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
if (res.code === 200) {
|
(pageList as any).list = (pageList as any).list = pageList.list.concat(
|
||||||
(pageList as any).list = (res.data as any).list;
|
res.data.list
|
||||||
}
|
);
|
||||||
|
pageList.total = (res.data as any).total;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
:noMoreData="pageList.noMoreData"
|
:noMoreData="pageList.noMoreData"
|
||||||
|
:list="pageList.list"
|
||||||
|
:height="100"
|
||||||
|
:isLoading="pageList.isLoading"
|
||||||
>
|
>
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view v-for="(item, index) in pageList.list" :key="index">
|
<view v-for="(item, index) in pageList.list" :key="index">
|
||||||
|
@ -38,19 +41,26 @@
|
||||||
import { GoodsApi } from "@/services";
|
import { GoodsApi } from "@/services";
|
||||||
import PageView from "@/components/PageView/index.vue";
|
import PageView from "@/components/PageView/index.vue";
|
||||||
|
|
||||||
|
|
||||||
const keyword = ref("");
|
const keyword = ref("");
|
||||||
|
|
||||||
const state = reactive<any>({
|
const state = reactive<any>({
|
||||||
name: "",
|
name: "",
|
||||||
});
|
});
|
||||||
const pageList: PageResult<{ reCategoryName: string }> = reactive({
|
const pageList: PageResult<{ reCategoryName: string }> = reactive({
|
||||||
|
isLoading: false,
|
||||||
noMoreData: false,
|
noMoreData: false,
|
||||||
total: 0,
|
total: 0,
|
||||||
list: [],
|
list: [],
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
});
|
});
|
||||||
|
const resetPageList = () => {
|
||||||
|
pageList.noMoreData = false;
|
||||||
|
pageList.total = 0;
|
||||||
|
pageList.list = [];
|
||||||
|
pageList.pageNum = 1;
|
||||||
|
pageList.pageSize = 10;
|
||||||
|
};
|
||||||
const add = () => {
|
const add = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pagesApp/components/addShipmentType", // 要跳转到的页面路径
|
url: "/pagesApp/components/addShipmentType", // 要跳转到的页面路径
|
||||||
|
@ -71,19 +81,20 @@ const deleteType = (item: any) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
|
resetPageList()
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
|
|
||||||
const getList = (v?: boolean) => {
|
const getList = (v?: boolean) => {
|
||||||
if (v) {
|
if (v) {
|
||||||
if (Math.ceil(pageList.total / pageList.pageSize) > pageList.pageNum) {
|
if (Math.ceil(pageList.total / pageList.pageSize) > pageList.pageNum) {
|
||||||
pageList.pageNum ++
|
pageList.pageNum++;
|
||||||
if (Math.ceil(pageList.total / pageList.pageSize) <= pageList.pageNum) {
|
if (Math.ceil(pageList.total / pageList.pageSize) <= pageList.pageNum) {
|
||||||
pageList.noMoreData = true
|
pageList.noMoreData = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pageList.noMoreData = true
|
pageList.noMoreData = true;
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let params: any = {
|
let params: any = {
|
||||||
|
@ -96,8 +107,10 @@ const getList = (v?: boolean) => {
|
||||||
}
|
}
|
||||||
GoodsApi.getPage(params).then((res) => {
|
GoodsApi.getPage(params).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
(pageList as any).list = (pageList as any).list.concat((res.data as any).list);
|
(pageList as any).list = (pageList as any).list.concat(
|
||||||
pageList.total = (res.data as any).total
|
(res.data as any).list
|
||||||
|
);
|
||||||
|
pageList.total = (res.data as any).total;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,12 +12,31 @@
|
||||||
></u-search>
|
></u-search>
|
||||||
<view class="btn" @click="add"> 新增 </view>
|
<view class="btn" @click="add"> 新增 </view>
|
||||||
</view>
|
</view>
|
||||||
|
<page-view
|
||||||
|
@loadList="
|
||||||
|
(v) => {
|
||||||
|
getList(v);
|
||||||
|
}
|
||||||
|
"
|
||||||
|
:noMoreData="pageList.noMoreData"
|
||||||
|
:list="pageList.list"
|
||||||
|
:height="100"
|
||||||
|
:isLoading="pageList.isLoading"
|
||||||
|
>
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view v-for="(item, index) in pageList.list" :key="index">
|
<view v-for="(item, index) in pageList.list" :key="index">
|
||||||
<view>
|
<view>
|
||||||
<view>{{item.type === StockCardType.Shipment ? '客户' : '供应商'}}:{{ item.name }}</view>
|
<view
|
||||||
|
>{{
|
||||||
|
item.type === StockCardType.Shipment ? "客户" : "供应商"
|
||||||
|
}}:{{ item.name }}</view
|
||||||
|
>
|
||||||
<view>卡号:{{ item.cardCode }}</view>
|
<view>卡号:{{ item.cardCode }}</view>
|
||||||
<view>类型:{{ item.type === StockCardType.Shipment ? '出库卡' : '入库卡' }}</view>
|
<view
|
||||||
|
>类型:{{
|
||||||
|
item.type === StockCardType.Shipment ? "出库卡" : "入库卡"
|
||||||
|
}}</view
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
<view class="op-box">
|
<view class="op-box">
|
||||||
<view class="btn" @click="edit(item)"> 编辑 </view>
|
<view class="btn" @click="edit(item)"> 编辑 </view>
|
||||||
|
@ -25,13 +44,13 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</page-view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { StockCardApi } from "@/services";
|
import { StockCardApi } from "@/services";
|
||||||
import { StockCardType } from "@/utils/enum";
|
import { StockCardType } from "@/utils/enum";
|
||||||
|
import PageView from "@/components/PageView/index.vue";
|
||||||
const keyword = ref("");
|
|
||||||
|
|
||||||
const state = reactive<any>({
|
const state = reactive<any>({
|
||||||
name: "",
|
name: "",
|
||||||
|
@ -42,6 +61,13 @@ const pageList: PageResult<StockCard> = reactive({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
});
|
});
|
||||||
|
const resetPageList = () => {
|
||||||
|
pageList.noMoreData = false;
|
||||||
|
pageList.total = 0;
|
||||||
|
pageList.list = [];
|
||||||
|
pageList.pageNum = 1;
|
||||||
|
pageList.pageSize = 10;
|
||||||
|
};
|
||||||
const add = () => {
|
const add = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pagesApp/components/addStockCard", // 要跳转到的页面路径
|
url: "/pagesApp/components/addStockCard", // 要跳转到的页面路径
|
||||||
|
@ -57,18 +83,28 @@ const edit = (item: any) => {
|
||||||
const deleteCustomer = (item: any) => {
|
const deleteCustomer = (item: any) => {
|
||||||
StockCardApi.updateStockCard({ isDeleted: true, id: item.id }).then((res) => {
|
StockCardApi.updateStockCard({ isDeleted: true, id: item.id }).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
resetPageList();
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
|
resetPageList();
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
const getList = () => {
|
const getList = (v?: boolean) => {
|
||||||
|
if (v) {
|
||||||
|
if (Math.ceil(pageList.total / pageList.pageSize) > pageList.pageNum) {
|
||||||
|
pageList.pageNum++;
|
||||||
|
} else {
|
||||||
|
pageList.noMoreData = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
let params: any = {
|
let params: any = {
|
||||||
pageSize: 10,
|
pageSize: pageList.pageSize,
|
||||||
pageNum: 1,
|
pageNum: pageList.pageNum,
|
||||||
name: state.name,
|
cardCode: state.name,
|
||||||
};
|
};
|
||||||
if (state.supplierTypeId > -1) {
|
if (state.supplierTypeId > -1) {
|
||||||
params.supplierTypeId = state.supplierTypeId;
|
params.supplierTypeId = state.supplierTypeId;
|
||||||
|
|
|
@ -76,11 +76,11 @@ const resetPageList = () => {
|
||||||
};
|
};
|
||||||
const handleSelect = (v: any) => {
|
const handleSelect = (v: any) => {
|
||||||
state.supplierTypeId = v.id;
|
state.supplierTypeId = v.id;
|
||||||
resetPageList()
|
resetPageList();
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
resetPageList()
|
resetPageList();
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ const update = (item: any) => {
|
||||||
SupplierApi.updateSupplierUser({ isDeleted: true, id: item.id }).then(
|
SupplierApi.updateSupplierUser({ isDeleted: true, id: item.id }).then(
|
||||||
(res) => {
|
(res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
resetPageList()
|
resetPageList();
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,10 +120,12 @@ const getList = (v?: boolean) => {
|
||||||
params.supplierTypeId = state.supplierTypeId;
|
params.supplierTypeId = state.supplierTypeId;
|
||||||
}
|
}
|
||||||
pageList.isLoading = true;
|
pageList.isLoading = true;
|
||||||
SupplierApi.getSupplierUserPage(params).then((res) => {
|
SupplierApi.getSupplierUserPage(params).then((res: any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
pageList.isLoading = false;
|
pageList.isLoading = false;
|
||||||
(pageList as any).list = (res.data as any).list;
|
(pageList as any).list = (pageList as any).list = pageList.list.concat(
|
||||||
|
res.data.list
|
||||||
|
);
|
||||||
pageList.total = (res.data as any).total;
|
pageList.total = (res.data as any).total;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -131,7 +133,7 @@ const getList = (v?: boolean) => {
|
||||||
const getSupplierTypeList = () => {
|
const getSupplierTypeList = () => {
|
||||||
SupplierApi.getSupplierTypeList().then((res: any) => {
|
SupplierApi.getSupplierTypeList().then((res: any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
state.typeList = [{id: -1, name: '全部'}].concat(res.data);
|
state.typeList = [{ id: -1, name: "全部" }].concat(res.data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
:noMoreData="pageList.noMoreData"
|
:noMoreData="pageList.noMoreData"
|
||||||
|
:list="pageList.list"
|
||||||
|
:height="100"
|
||||||
|
:isLoading="pageList.isLoading"
|
||||||
>
|
>
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view v-for="(item, index) in pageList.list" :key="index">
|
<view v-for="(item, index) in pageList.list" :key="index">
|
||||||
|
@ -50,6 +53,13 @@ const pageList: PageResult<StockCard> = reactive({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
});
|
});
|
||||||
|
const resetPageList = () => {
|
||||||
|
pageList.noMoreData = false;
|
||||||
|
pageList.total = 0;
|
||||||
|
pageList.list = [];
|
||||||
|
pageList.pageNum = 1;
|
||||||
|
pageList.pageSize = 10;
|
||||||
|
};
|
||||||
const add = () => {
|
const add = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pagesApp/components/addSupplierType", // 要跳转到的页面路径
|
url: "/pagesApp/components/addSupplierType", // 要跳转到的页面路径
|
||||||
|
@ -66,12 +76,14 @@ const deleteType = (item: any) => {
|
||||||
SupplierApi.updateSupplierType({ isDeleted: true, id: item.id }).then(
|
SupplierApi.updateSupplierType({ isDeleted: true, id: item.id }).then(
|
||||||
(res) => {
|
(res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
resetPageList();
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
|
resetPageList();
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
const getList = (v?: boolean) => {
|
const getList = (v?: boolean) => {
|
||||||
|
@ -79,7 +91,7 @@ const getList = (v?: boolean) => {
|
||||||
if (Math.ceil(pageList.total / pageList.pageSize) > pageList.pageNum) {
|
if (Math.ceil(pageList.total / pageList.pageSize) > pageList.pageNum) {
|
||||||
pageList.pageNum++;
|
pageList.pageNum++;
|
||||||
if (Math.ceil(pageList.total / pageList.pageSize) <= pageList.pageNum) {
|
if (Math.ceil(pageList.total / pageList.pageSize) <= pageList.pageNum) {
|
||||||
pageList.noMoreData = true
|
pageList.noMoreData = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pageList.noMoreData = true;
|
pageList.noMoreData = true;
|
||||||
|
@ -94,10 +106,14 @@ const getList = (v?: boolean) => {
|
||||||
if (state.supplierTypeId > -1) {
|
if (state.supplierTypeId > -1) {
|
||||||
params.supplierTypeId = state.supplierTypeId;
|
params.supplierTypeId = state.supplierTypeId;
|
||||||
}
|
}
|
||||||
SupplierApi.getSupplierTypePage(params).then((res) => {
|
pageList.isLoading = true;
|
||||||
|
SupplierApi.getSupplierTypePage(params).then((res: any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
(pageList as any).list = (res.data as any).list;
|
pageList.isLoading = false;
|
||||||
|
(pageList as any).list = (pageList as any).list = pageList.list.concat(
|
||||||
|
res.data.list
|
||||||
|
);
|
||||||
pageList.total = (res.data as any).total;
|
pageList.total = (res.data as any).total;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,6 +168,15 @@ export const addShipmentProduct = (data: any) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 出货产品编辑
|
||||||
|
export const editShipmentProduct = (data: any) => {
|
||||||
|
return http({
|
||||||
|
method: 'POST',
|
||||||
|
url: '/api/shmproducts/edit',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 出货产品分页查询
|
// 出货产品分页查询
|
||||||
export const getShipmentProductByPage = (data: any) => {
|
export const getShipmentProductByPage = (data: any) => {
|
||||||
return http({
|
return http({
|
||||||
|
|
|
@ -59,10 +59,10 @@ export const addRole = (data: { roleCode: string; roleName: string }) => {
|
||||||
};
|
};
|
||||||
// 修改角色
|
// 修改角色
|
||||||
export const updateRole = (data: {
|
export const updateRole = (data: {
|
||||||
id: string;
|
id?: string;
|
||||||
roleCode: string;
|
roleCode?: string;
|
||||||
roleName: string;
|
roleName?: string;
|
||||||
isDeleted: string;
|
isDeleted?: boolean;
|
||||||
}) => {
|
}) => {
|
||||||
return http({
|
return http({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
|
Loading…
Reference in New Issue