|
@@ -11,50 +11,122 @@
|
|
:close-on-click-modal="false"
|
|
:close-on-click-modal="false"
|
|
:close-on-press-escape="false"
|
|
:close-on-press-escape="false"
|
|
:before-close="close"
|
|
:before-close="close"
|
|
- width="550px"
|
|
|
|
|
|
+ width="820px"
|
|
>
|
|
>
|
|
<el-form
|
|
<el-form
|
|
ref="productFormRef"
|
|
ref="productFormRef"
|
|
- style="width: 500px"
|
|
|
|
|
|
+ style="width: 780px"
|
|
:rules="rules"
|
|
:rules="rules"
|
|
:model="form"
|
|
:model="form"
|
|
- label-width="90px"
|
|
|
|
|
|
+ label-width="110px"
|
|
>
|
|
>
|
|
- <el-form-item
|
|
|
|
- :label="$t(prefix + 'label_category')"
|
|
|
|
- prop="category_id"
|
|
|
|
- >
|
|
|
|
- <el-cascader
|
|
|
|
- v-model="form.category_id"
|
|
|
|
- style="width: 410px"
|
|
|
|
- :options="categoryData"
|
|
|
|
- :props="{ label: 'name', value: 'id' }"
|
|
|
|
- ></el-cascader>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item
|
|
|
|
- :label="$t(prefix + 'label_name_en')"
|
|
|
|
- prop="product_name"
|
|
|
|
- >
|
|
|
|
- <el-input v-model="form.product_name"></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item
|
|
|
|
- :label="$t(prefix + 'label_name_cn')"
|
|
|
|
- prop="product_name_cn"
|
|
|
|
- >
|
|
|
|
- <el-input v-model="form.product_name_cn"></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item
|
|
|
|
- label="SKU"
|
|
|
|
- prop="product_sku"
|
|
|
|
- >
|
|
|
|
- <el-input v-model="form.product_sku"></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item :label="$t(prefix + 'lable_image_list')">
|
|
|
|
- <image-upload
|
|
|
|
- v-model:list="imageList"
|
|
|
|
- :disable-preview="true"
|
|
|
|
- ></image-upload>
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <div class="flex justify-between flex-wrap">
|
|
|
|
+ <el-form-item
|
|
|
|
+ :label="$t(prefix + 'label_category')"
|
|
|
|
+ prop="category_id"
|
|
|
|
+ >
|
|
|
|
+ <el-cascader
|
|
|
|
+ v-model="form.category_id"
|
|
|
|
+ style="width: 410px"
|
|
|
|
+ :options="categoryData"
|
|
|
|
+ :props="{ label: 'name', value: 'id' }"
|
|
|
|
+ ></el-cascader>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item
|
|
|
|
+ :label="$t(prefix + 'label_name_en')"
|
|
|
|
+ prop="product_name"
|
|
|
|
+ >
|
|
|
|
+ <el-input v-model="form.product_name"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item
|
|
|
|
+ :label="$t(prefix + 'label_name_cn')"
|
|
|
|
+ prop="product_name_cn"
|
|
|
|
+ >
|
|
|
|
+ <el-input v-model="form.product_name_cn"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="Primary SKU"
|
|
|
|
+ prop="product_sku"
|
|
|
|
+ >
|
|
|
|
+ <el-input v-model="form.product_sku"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="Primary Code"
|
|
|
|
+ prop="product_code"
|
|
|
|
+ >
|
|
|
|
+ <el-input v-model="form.product_code"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="SKU"
|
|
|
|
+ prop="sku"
|
|
|
|
+ >
|
|
|
|
+ <el-input v-model="form.sku"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="entity"
|
|
|
|
+ prop="entity"
|
|
|
|
+ >
|
|
|
|
+ <el-input v-model="form.entity"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="product_type"
|
|
|
|
+ prop="product_type"
|
|
|
|
+ >
|
|
|
|
+ <el-select v-model="form.product_type">
|
|
|
|
+ <el-option value="Express"></el-option>
|
|
|
|
+ <el-option value="indent"></el-option>
|
|
|
|
+ <el-option value="Stock"></el-option>
|
|
|
|
+ <el-option value="Other"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="Classification"
|
|
|
|
+ prop="classification"
|
|
|
|
+ >
|
|
|
|
+ <el-select v-model="form.classification">
|
|
|
|
+ <el-option value="Promo Collection"></el-option>
|
|
|
|
+ <el-option value="Primepac"></el-option>
|
|
|
|
+ <el-option value="Phoenixexhibit"></el-option>
|
|
|
|
+ <el-option value="Material"></el-option>
|
|
|
|
+ <el-option value="Test purpose"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="材质"
|
|
|
|
+ prop="material"
|
|
|
|
+ >
|
|
|
|
+ <el-input v-model="form.material"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="颜色"
|
|
|
|
+ prop="colour"
|
|
|
|
+ >
|
|
|
|
+ <el-input v-model="form.colour"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="尺寸"
|
|
|
|
+ prop="size"
|
|
|
|
+ >
|
|
|
|
+ <el-input v-model="form.size"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item
|
|
|
|
+ style="align-items: flex-start;"
|
|
|
|
+ label="关键词"
|
|
|
|
+ prop="keywords"
|
|
|
|
+ >
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="form.keywords"
|
|
|
|
+ type="textarea"
|
|
|
|
+ :rows="3"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item :label="$t(prefix + 'lable_image_list')">
|
|
|
|
+ <image-upload
|
|
|
|
+ v-model:list="imageList"
|
|
|
|
+ :disable-preview="true"
|
|
|
|
+ ></image-upload>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </div>
|
|
</el-form>
|
|
</el-form>
|
|
<template #footer>
|
|
<template #footer>
|
|
<div class="flex justify-center items-center">
|
|
<div class="flex justify-center items-center">
|
|
@@ -87,6 +159,8 @@ import {
|
|
ElInput,
|
|
ElInput,
|
|
ElNotification,
|
|
ElNotification,
|
|
ElCascader,
|
|
ElCascader,
|
|
|
|
+ ElSelect,
|
|
|
|
+ ElOption,
|
|
} from 'element-plus'
|
|
} from 'element-plus'
|
|
import type { FormInstance } from 'element-plus'
|
|
import type { FormInstance } from 'element-plus'
|
|
import cloneDeep from 'lodash.clonedeep'
|
|
import cloneDeep from 'lodash.clonedeep'
|
|
@@ -120,6 +194,7 @@ const form = ref({
|
|
category_id: [],
|
|
category_id: [],
|
|
images: '',
|
|
images: '',
|
|
status: 1,
|
|
status: 1,
|
|
|
|
+ size: '',
|
|
} as any)
|
|
} as any)
|
|
const rules = {
|
|
const rules = {
|
|
product_name: [
|
|
product_name: [
|
|
@@ -150,6 +225,41 @@ const rules = {
|
|
trigger: 'change',
|
|
trigger: 'change',
|
|
},
|
|
},
|
|
],
|
|
],
|
|
|
|
+ product_code: [
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ message: $t('text_please_input'),
|
|
|
|
+ trigger: 'change',
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ colour: [
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ message: $t('text_please_input'),
|
|
|
|
+ trigger: 'change',
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ material: [
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ message: $t('text_please_input'),
|
|
|
|
+ trigger: 'change',
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ size: [
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ message: $t('text_please_input'),
|
|
|
|
+ trigger: 'change',
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ sku: [
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ message: $t('text_please_input'),
|
|
|
|
+ trigger: 'change',
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
}
|
|
}
|
|
|
|
|
|
watch(
|
|
watch(
|
|
@@ -282,4 +392,8 @@ let close = (done = {} as any) => {
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scoped></style>
|
|
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
+.el-form-item {
|
|
|
|
+ width: 48%;
|
|
|
|
+}
|
|
|
|
+</style>
|