商城联调

This commit is contained in:
qsh
2024-06-06 14:13:56 +08:00
parent 94943df4f9
commit 86ffb5a9c9
10 changed files with 510 additions and 185 deletions

View File

@@ -67,9 +67,9 @@
>
<el-option
v-for="item in warehouseOptions"
:key="item.value"
:label="item.label"
:value="item.value"
:key="item.warehouseId"
:label="item.warehouseName"
:value="item.warehouseId"
/>
</el-select>
</el-form-item>
@@ -94,6 +94,11 @@
<script setup>
import * as PurchaseApi from '@/api/mall/purchase'
import * as WarehouseApi from '@/api/mall/warehouse'
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
const props = defineProps({
opts: {
type: Object,
@@ -101,7 +106,8 @@ const props = defineProps({
return {
product: [],
spec: [],
supplier: []
supplier: [],
warehouse: []
}
}
}
@@ -129,13 +135,16 @@ const rules = {
unitPrice: { required: true, message: '采购单价不可为空', trigger: 'change,blur' }
}
const warehouseOptions = ref([
{ label: '自营仓', value: 1 },
{ label: '供应商仓', value: 2 }
])
const warehouseOptions = ref([])
function getOptions() {
WarehouseApi.getSimpleWarehouseList().then((data) => {
warehouseOptions.value = data
})
}
const open = (val) => {
dialogVisible.value = true
getOptions()
form.value = { ...val } || {
productId: undefined,
specsId: undefined,