diff --git a/src/api/hard/hard-spu-repertory.ts b/src/api/hard/hard-spu-repertory.ts
index 9aaca89..4519dc6 100644
--- a/src/api/hard/hard-spu-repertory.ts
+++ b/src/api/hard/hard-spu-repertory.ts
@@ -1,5 +1,13 @@
import request from "/@/utils/request"
+export function select(query?: Object) {
+ return request({
+ url: "/hard/hard-spu-repertory/select",
+ method: "get",
+ params: query,
+ })
+}
+
export function fetchList(query?: Object) {
return request({
url: "/hard/hard-spu-repertory/page",
diff --git a/src/api/hard/hard-spu.ts b/src/api/hard/hard-spu.ts
index b11df26..6459a29 100644
--- a/src/api/hard/hard-spu.ts
+++ b/src/api/hard/hard-spu.ts
@@ -1,5 +1,13 @@
import request from "/@/utils/request"
+export function select(query?: Object) {
+ return request({
+ url: "/hard/hard-spu/select",
+ method: "get",
+ params: query,
+ })
+}
+
export function pageJoin(query?: Object) {
return request({
url: "/hard/hard-spu/page-join",
diff --git a/src/components/Select/SelectHardSpu.vue b/src/components/Select/SelectHardSpu.vue
new file mode 100644
index 0000000..bafec4c
--- /dev/null
+++ b/src/components/Select/SelectHardSpu.vue
@@ -0,0 +1,115 @@
+
+ e && getOptions()"
+ @change="change"
+ >
+
+
+
+
+
+
+
diff --git a/src/components/index.ts b/src/components/index.ts
index fe17499..ef3866c 100644
--- a/src/components/index.ts
+++ b/src/components/index.ts
@@ -27,6 +27,7 @@ import SelectSupplier from "/@/components/Select/SelectSupplier.vue"
import SelectMchRule from "/@/components/Select/SelectMchRule.vue"
import SelectHardSpuCategory from "/@/components/Select/SelectHardSpuCategory.vue"
import SelectHard from "/@/components/Select/SelectHard.vue"
+import SelectHardSpu from "/@/components/Select/SelectHardSpu.vue"
import TreeMultipleSelect from "/@/components/TreeMultipleSelect/index.vue"
// 第三方组件
@@ -67,6 +68,7 @@ export default {
app.component("TreeMultipleSelect", TreeMultipleSelect)
app.component("SelectHard", SelectHard)
app.component("SelectHardSpuCategory", SelectHardSpuCategory)
+ app.component("SelectHardSpu", SelectHardSpu)
app.component("SelectUser", SelectUser)
app.component("SelectWalletType", SelectWalletType)
diff --git a/src/views/hard/hard-spu-repertory/form.vue b/src/views/hard/hard-spu-repertory/form.vue
index b830c66..60127b4 100644
--- a/src/views/hard/hard-spu-repertory/form.vue
+++ b/src/views/hard/hard-spu-repertory/form.vue
@@ -1,28 +1,15 @@
-
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
@@ -40,7 +27,6 @@
import { useDict } from "/@/hooks/dict"
import { useMessage } from "/@/hooks/message"
import { getObj, addObj, putObj } from "/@/api/hard/hard-spu-repertory"
-import { rule } from "/@/utils/validate"
const emit = defineEmits(["refresh"])
// 定义变量内容
@@ -59,7 +45,10 @@ const form = reactive({
})
// 定义校验规则
-const dataRules = ref({})
+const dataRules = ref({
+ spuId: [{ required: true, message: "请选择商品", trigger: "change" }],
+ count: [{ required: true, message: "请输入库存量", trigger: "blur" }],
+})
// 打开弹窗
const openDialog = (id: string) => {