修复成本价不显示的问题

feature/0423
陈伟 9 months ago
parent 8fd6691bb2
commit 61573fbf95
  1. 2
      src/common/model/goods/Index.js
  2. 16
      src/views/goods/Update.vue

@ -114,7 +114,7 @@ export default {
} }
// 单规格数据 // 单规格数据
if (goodsInfo.spec_type == 10) { if (goodsInfo.spec_type == 10) {
const skuOne = _.pick(goodsInfo.skuList[0], ['goods_price', 'line_price', 'stock_num', 'goods_weight']) const skuOne = _.pick(goodsInfo.skuList[0], ['goods_price', 'line_price', 'cost_price', 'stock_num', 'goods_weight'])
goodsFormData = { ...goodsFormData, ...skuOne } goodsFormData = { ...goodsFormData, ...skuOne }
} }
// 商品限购数据 // 商品限购数据

@ -56,7 +56,7 @@
<a-form-item label="是否大牌正品" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="是否大牌正品" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group <a-radio-group
v-decorator="['is_brand', { initialValue: 0, rules: [{ required: true }] }]" v-decorator="['is_brand', { initialValue: 0, rules: [{ required: true }] }]"
> >
<a-radio :value="0"></a-radio> <a-radio :value="0"></a-radio>
<a-radio :value="1"></a-radio> <a-radio :value="1"></a-radio>
@ -65,7 +65,7 @@
<a-form-item label="是否新品首发" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="是否新品首发" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group <a-radio-group
v-decorator="['is_new', { initialValue: 0, rules: [{ required: true }] }]" v-decorator="['is_new', { initialValue: 0, rules: [{ required: true }] }]"
> >
<a-radio :value="0"></a-radio> <a-radio :value="0"></a-radio>
<a-radio :value="1"></a-radio> <a-radio :value="1"></a-radio>
@ -199,7 +199,11 @@
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
extra="成本价仅用于商品页展示" extra="成本价仅用于商品页展示"
> >
<a-input-number :min="0" :precision="2" v-decorator="['cost_price']" /> <a-input-number
:min="0.01"
:precision="2"
v-decorator="['cost_price']"
/>
<span class="ml-10"></span> <span class="ml-10"></span>
</a-form-item> </a-form-item>
<a-form-item <a-form-item
@ -406,8 +410,8 @@
addonAfter="折" addonAfter="折"
:inputProps="{ min: 0, max: 9.9 }" :inputProps="{ min: 0, max: 9.9 }"
v-decorator="[`alone_grade_equity[grade_id:${item.grade_id}]`, { v-decorator="[`alone_grade_equity[grade_id:${item.grade_id}]`, {
initialValue: formData.defaultUserGradeValue[item.grade_id], rules: [{ required: true, message: '折扣率不能为空'}] initialValue: formData.defaultUserGradeValue[item.grade_id], rules: [{ required: true, message: '折扣率不能为空'}]
}]" }]"
/> />
</a-form-item> </a-form-item>
</div> </div>
@ -610,7 +614,7 @@ export default {
// tabKey // tabKey
// //
const tabsFieldsMap = [ const tabsFieldsMap = [
['goods_type', 'goods_name', 'categorys', 'imagesIds', 'delivery_id', 'is_ind_delivery_type', 'delivery_type','is_brand', 'is_in_store'], ['goods_type', 'goods_name', 'categorys', 'imagesIds', 'delivery_id', 'is_ind_delivery_type', 'delivery_type', 'is_brand', 'is_in_store'],
['spec_type', 'goods_price', 'is_restrict', 'restrict_total', 'restrict_single', 'cost_price'], ['spec_type', 'goods_price', 'is_restrict', 'restrict_total', 'restrict_single', 'cost_price'],
['content'], ['content'],
['alone_grade_equity', 'first_money', 'second_money', 'third_money'] ['alone_grade_equity', 'first_money', 'second_money', 'third_money']

Loading…
Cancel
Save