parent
92d3564cae
commit
f2fcaf0eb3
|
@ -65,11 +65,6 @@ export const getPropertyPage = (params: PageParam) => {
|
|||
return request.get({ url: '/product/property/page', params })
|
||||
}
|
||||
|
||||
// 获得属性项列表
|
||||
export const getPropertyList = (params: any) => {
|
||||
return request.get({ url: '/product/property/list', params })
|
||||
}
|
||||
|
||||
// ------------------------ 属性值 -------------------
|
||||
|
||||
// 获得属性值分页
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="属性项" prop="propertyId">
|
||||
<el-select v-model="queryParams.propertyId" class="!w-240px">
|
||||
<el-select v-model="queryParams.propertyId" class="!w-240px" disabled>
|
||||
<el-option
|
||||
v-for="item in propertyOptions"
|
||||
:key="item.id"
|
||||
|
@ -158,6 +158,6 @@ const handleDelete = async (id: number) => {
|
|||
onMounted(async () => {
|
||||
await getList()
|
||||
// 属性项下拉框数据
|
||||
propertyOptions.value = await PropertyApi.getPropertyList({})
|
||||
propertyOptions.value.push(await PropertyApi.getProperty(queryParams.propertyId))
|
||||
})
|
||||
</script>
|
||||
|
|
|
@ -70,7 +70,7 @@ const validate = async () => {
|
|||
try {
|
||||
await unref(formRef)?.validate()
|
||||
// 校验通过更新数据
|
||||
Object.assign(props.propFormData, formData)
|
||||
Object.assign(props.propFormData, formData.value)
|
||||
} catch (e) {
|
||||
message.error('【商品详情】不完善,请填写相关信息')
|
||||
emit('update:activeName', 'description')
|
||||
|
|
|
@ -80,7 +80,7 @@ const validate = async () => {
|
|||
try {
|
||||
await unref(formRef)?.validate()
|
||||
// 校验通过更新数据
|
||||
Object.assign(props.propFormData, formData)
|
||||
Object.assign(props.propFormData, formData.value)
|
||||
} catch (e) {
|
||||
message.error('【其它设置】不完善,请填写相关信息')
|
||||
emit('update:activeName', 'other')
|
||||
|
|
|
@ -135,11 +135,10 @@ watch(
|
|||
/** 表单校验 */
|
||||
const emit = defineEmits(['update:activeName'])
|
||||
const validate = async () => {
|
||||
// 校验 sku
|
||||
skuListRef.value.validateSku()
|
||||
// 校验表单
|
||||
if (!formRef) return
|
||||
try {
|
||||
// 校验 sku
|
||||
skuListRef.value.validateSku()
|
||||
await unref(formRef).validate()
|
||||
// 校验通过更新数据
|
||||
Object.assign(props.propFormData, formData)
|
||||
|
|
Loading…
Reference in New Issue