|
@@ -8,6 +8,15 @@
|
|
|
:inline="true"
|
|
|
label-width="68px"
|
|
|
>
|
|
|
+ <el-form-item label="供应商" prop="supplierId" v-if="ifAlone">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.supplierId"
|
|
|
+ placeholder="请输入供应商"
|
|
|
+ clearable
|
|
|
+ @keyup.enter="handleQuery"
|
|
|
+ class="!w-240px"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="产品名称" prop="productName">
|
|
|
<el-input
|
|
|
v-model="queryParams.productName"
|
|
@@ -104,8 +113,8 @@
|
|
|
</ContentWrap>
|
|
|
|
|
|
<!-- 表单弹窗:添加/修改 -->
|
|
|
- <CoreProductForm ref="formRef" :supplierId="{ receivedParam }" @success="getList" />
|
|
|
- <el-form>
|
|
|
+ <CoreProductForm ref="formRef" :supplierId="{ receivedParam }" :ifAlone="ifAlone" @success="getList" />
|
|
|
+ <el-form v-if="ifAlone!= null">
|
|
|
<el-form-item style="float: right">
|
|
|
<el-button type="primary" @click="close">返回</el-button>
|
|
|
</el-form-item>
|
|
@@ -122,6 +131,7 @@ import {SupplierVO} from "@/api/supplier/base";
|
|
|
import * as SupplierDetailApi from "@/api/supplier/product/supplierdetail";
|
|
|
import { propTypes } from '@/utils/propTypes'
|
|
|
import {useTagsViewStore} from "@/store/modules/tagsView";
|
|
|
+import {SupplierProductVo} from "@/api/supplier/product/supplierdetail";
|
|
|
const { delView } = useTagsViewStore() // 视图操作
|
|
|
const { push, currentRoute } = useRouter() // 路由
|
|
|
/** 供应商核心产品 列表 */
|
|
@@ -131,6 +141,7 @@ const message = useMessage() // 消息弹窗
|
|
|
const { t } = useI18n() // 国际化
|
|
|
const props = defineProps({
|
|
|
isDetail: propTypes.bool.def(false), // 是否作为详情组件
|
|
|
+ ifAlone: {type:Boolean, default:()=>null},
|
|
|
receivedParam: { type: undefined, default: () => null }
|
|
|
})
|
|
|
const loading = ref(true) // 列表的加载中
|
|
@@ -155,7 +166,9 @@ const getList = async () => {
|
|
|
supplierList.value = await SupplierBaseApi.Api.getAll()
|
|
|
loading.value = true
|
|
|
try {
|
|
|
- queryParams.supplierId = props.receivedParam === null?'0000000000':props.receivedParam
|
|
|
+ if (props.ifAlone!=null) {
|
|
|
+ queryParams.supplierId = props.receivedParam === null?'0000000000':props.receivedParam
|
|
|
+ }
|
|
|
const data = await CoreProductApi.getCoreProductPage(queryParams)
|
|
|
list.value = data.list
|
|
|
total.value = data.total
|
|
@@ -217,6 +230,7 @@ onMounted(async () => {
|
|
|
await getList()
|
|
|
supplierList.value = await SupplierBaseApi.Api.getAll()
|
|
|
productList.value = await SupplierDetailApi.getAll()
|
|
|
+ debugger;
|
|
|
})
|
|
|
const close = () => {
|
|
|
delView(unref(currentRoute))
|