添加新的需求

feature/0423
fanfan 10 months ago
parent 9c0da9844a
commit 910cbb3e9b
  1. 2
      src/common/model/goods/Index.js
  2. 35
      src/views/goods/Create.vue
  3. 41
      src/views/goods/Update.vue

@ -95,7 +95,7 @@ export default {
'status', 'spec_type', 'deduct_stock_type', 'is_restrict', 'content',
'selling_point', 'serviceIds', 'sales_initial', 'is_points_gift',
'is_points_discount', 'is_enable_grade', 'is_alone_grade', 'is_ind_dealer',
'dealer_money_type', 'first_money', 'second_money', 'third_money'
'dealer_money_type', 'first_money', 'second_money', 'third_money', 'cmmdty_model','is_check','goods_source','delivery_time'
])
return {
...goodsFormData,

@ -24,6 +24,12 @@
v-decorator="['goods_name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"
/>
</a-form-item>
<a-form-item label="商品型号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
placeholder="请输入商品型号"
v-decorator="['cmmdty_model', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"
/>
</a-form-item>
<a-form-item label="商品分类" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-tree-select
placeholder="请选择商品分类"
@ -51,7 +57,28 @@
v-decorator="['imagesIds', { rules: [{ required: true, message: '请至少上传1张商品图片' }] }]"
/>
</a-form-item>
<a-form-item label="商品来源" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group v-decorator="['goods_source', { initialValue: 0, rules: [{ required: true }] }]">
<a-radio :value="0">京东</a-radio>
<a-radio :value="1">苏宁</a-radio>
<a-radio :value="2">天猫</a-radio>
<a-radio :value="3">工厂</a-radio>
<a-radio :value="4">仓配</a-radio>
<a-radio :value="5">自采</a-radio>
<a-radio :value="6">店内</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="发货时效" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group v-decorator="['delivery_time', { initialValue: 0, rules: [{ required: true }] }]">
<a-radio :value="0">24小时</a-radio>
<a-radio :value="1">48小时</a-radio>
<a-radio :value="2">72小时</a-radio>
<a-radio :value="3">7天内</a-radio>
<a-radio :value="4">15天内</a-radio>
<a-radio :value="5">30天内</a-radio>
<a-radio :value="6">45天内</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="是否大牌正品" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group v-decorator="['is_brand', { initialValue: 0, rules: [{ required: true }] }]">
<a-radio :value="0"></a-radio>
@ -65,6 +92,12 @@
<a-radio :value="1"></a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="是否审单" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group v-decorator="['is_check', { initialValue: 0, rules: [{ required: true }] }]">
<a-radio :value="0"></a-radio>
<a-radio :value="1"></a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="是否店内" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group v-decorator="['is_in_store', { initialValue: 0, rules: [{ required: true }] }]">
<a-radio :value="0"></a-radio>

@ -25,6 +25,12 @@
v-decorator="['goods_name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"
/>
</a-form-item>
<a-form-item label="商品型号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
placeholder="请输入商品型号"
v-decorator="['cmmdty_model', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"
/>
</a-form-item>
<a-form-item label="商品分类" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-tree-select
placeholder="请选择商品分类"
@ -53,7 +59,28 @@
v-decorator="['imagesIds', { rules: [{ required: true, message: '请至少上传1张商品图片' }] }]"
/>
</a-form-item>
<a-form-item label="商品来源" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group v-decorator="['goods_source', { initialValue: 0, rules: [{ required: true }] }]">
<a-radio :value="0">京东</a-radio>
<a-radio :value="1">苏宁</a-radio>
<a-radio :value="2">天猫</a-radio>
<a-radio :value="3">工厂</a-radio>
<a-radio :value="4">仓配</a-radio>
<a-radio :value="5">自采</a-radio>
<a-radio :value="6">店内</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="发货时效" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group v-decorator="['delivery_time', { initialValue: 0, rules: [{ required: true }] }]">
<a-radio :value="0">24小时</a-radio>
<a-radio :value="1">48小时</a-radio>
<a-radio :value="2">72小时</a-radio>
<a-radio :value="3">7天内</a-radio>
<a-radio :value="4">15天内</a-radio>
<a-radio :value="5">30天内</a-radio>
<a-radio :value="6">45天内</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="是否大牌正品" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group v-decorator="['is_brand', { initialValue: 0, rules: [{ required: true }] }]">
<a-radio :value="0"></a-radio>
@ -67,6 +94,12 @@
<a-radio :value="1"></a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="是否审单" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group v-decorator="['is_check', { initialValue: 0, rules: [{ required: true }] }]">
<a-radio :value="0"></a-radio>
<a-radio :value="1"></a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="是否店内" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group v-decorator="['is_in_store', { initialValue: 0, rules: [{ required: true }] }]">
<a-radio :value="0"></a-radio>
@ -529,7 +562,7 @@ export default {
Ueditor,
InputNumberGroup,
MultiSpec,
AreasModal
AreasModal,
},
data() {
return {
@ -650,7 +683,8 @@ export default {
e.preventDefault()
//
const {
form: { validateFields },ruleList
form: { validateFields },
ruleList,
} = this
validateFields((errors, values) => {
// tab
@ -792,4 +826,3 @@ export default {
<style lang="less" scoped>
@import './style.less';
</style>

Loading…
Cancel
Save