|
@@ -31,6 +31,7 @@
|
|
|
<script setup>
|
|
|
import { computed, ref } from "vue";
|
|
|
import byTable from "@/components/byTable/index";
|
|
|
+import useUserStore from "@/store/modules/user";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const props = defineProps({
|
|
@@ -48,24 +49,7 @@ const sourceList = ref({
|
|
|
id: "",
|
|
|
},
|
|
|
});
|
|
|
-const productType = ref([
|
|
|
- {
|
|
|
- label: "产品",
|
|
|
- value: "1",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "物料",
|
|
|
- value: "2",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "产品",
|
|
|
- value: "10",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "物料",
|
|
|
- value: "20",
|
|
|
- },
|
|
|
-]);
|
|
|
+const productType = ref([]);
|
|
|
const loading = ref(false);
|
|
|
const selectConfig = computed(() => {
|
|
|
if (props.warehouseId) {
|
|
@@ -165,6 +149,23 @@ const getDict = () => {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
+ proxy
|
|
|
+ .post("/dictTenantData/page", {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 999,
|
|
|
+ dictCode: "product_type",
|
|
|
+ tenantId: useUserStore().user.tenantId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.rows && res.rows.length > 0) {
|
|
|
+ productType.value = res.rows.map((item) => {
|
|
|
+ return {
|
|
|
+ label: item.dictValue,
|
|
|
+ value: item.dictKey,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
};
|
|
|
const getList = async (req) => {
|
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|