|
|
@ -196,6 +196,18 @@ |
|
|
|
<el-radio :label="0">{{ $t('common.notallow') }}</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="$t('product.ifnew_tips')" prop="ifNew"> |
|
|
|
<el-radio-group v-model="form.ifNew"> |
|
|
|
<el-radio :label="1">{{ $t('common.yes') }}</el-radio> |
|
|
|
<el-radio :label="0">{{ $t('common.no') }}</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="$t('product.iffirst_tips')" prop="ifFirst"> |
|
|
|
<el-radio-group v-model="form.ifFirst"> |
|
|
|
<el-radio :label="1">{{ $t('common.yes') }}</el-radio> |
|
|
|
<el-radio :label="0">{{ $t('common.no') }}</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="hitem"> |
|
|
@ -207,19 +219,26 @@ |
|
|
|
</el-radio-group> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item :label="$t('product.iflowprice_tips')" prop="ifLowPrice"> |
|
|
|
<el-radio-group v-model="form.ifLowPrice"> |
|
|
|
<el-radio :label="1">{{ $t('common.yes') }}</el-radio> |
|
|
|
<el-radio :label="0">{{ $t('common.no') }}</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item :label="$t('product.creditsexchange')" prop="ifCredit"> |
|
|
|
<el-radio-group v-model="form.ifCredit"> |
|
|
|
<el-radio :label="1">{{ $t('common.allow') }}</el-radio> |
|
|
|
<el-radio :label="0">{{ $t('common.notallow') }}</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
<p style="color: #cf0f0f">开启积分兑换后,积分所抵扣的金额由商户承担</p> |
|
|
|
<p style="color: #cf0f0f">{{$t('product.credit_tips_1')}}</p> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-if="form.ifCredit" class="form-item-long" label="单笔最大抵扣积分" prop="creditLimit"> |
|
|
|
<el-form-item v-if="form.ifCredit" class="form-item-long" :label="$t('product.credit_tips')" prop="creditLimit"> |
|
|
|
<!-- <el-input v-model="form.creditLimit" type="number" placeholder="请输入单笔最大抵扣" /> --> |
|
|
|
<el-input-number v-model="form.creditLimit" :controls="false" :max="999999999" :min="0" :precision="0" |
|
|
|
placeholder="请输入单笔最大抵扣" /> |
|
|
|
<p style="color: #cf0f0f; height: 25px; line-height: 25px;margin-top: 10px">限制一笔订单中该商品最多抵扣多少积分</p> |
|
|
|
<p style="color: #cf0f0f; height: 25px; line-height: 25px">( 注:1积分 = {{ integralProportion }}元 请输入整数 )</p> |
|
|
|
:placeholder="$t('product.credit_limit_hint')" /> |
|
|
|
<p style="color: #cf0f0f; height: 25px; line-height: 25px;margin-top: 10px">{{$t('product.credit_tips_2')}}</p> |
|
|
|
<p style="color: #cf0f0f; height: 25px; line-height: 25px">( {{$t('product.credit_tips_3', {integralProportion:integralProportion} )}} )</p> |
|
|
|
</el-form-item> |
|
|
|
<!-- <el-form-item label="花呗分期">--> |
|
|
|
<!-- <el-radio-group v-model="form.ifHuabei">--> |
|
|
@ -341,6 +360,9 @@ export default { |
|
|
|
ifCredit: '', // 是否支持积分兑换 1-是 0-否 |
|
|
|
creditLimit: '', // 单笔订单限制使用多少积分 |
|
|
|
ifHuabei: 1, // 是否支持花呗分期 1-是 0-否 |
|
|
|
ifNew: '', // 是否新品 1-是 0-否 |
|
|
|
ifFirst: '', // 是否首发 1-是 0-否 |
|
|
|
ifLowPrice: '', //是否低价 1-是 0-否 |
|
|
|
productText_ZH: '', // 商品描述(富文本) |
|
|
|
productText_EN: '', // 商品描述(富文本) |
|
|
|
attrStyle: 1,//单款式还是多款式,0为单款式,1为多款式 |
|
|
@ -419,17 +441,20 @@ export default { |
|
|
|
editSkuAttrDialogVisible:false, |
|
|
|
//校验规则 |
|
|
|
rules: { |
|
|
|
shopId: [{ required: true, message: '请选择所属店铺', trigger: 'change' }], |
|
|
|
shopId: [{ required: true, message: this.$t('product.ownedshop_hint'), trigger: 'change' }], |
|
|
|
// productName: [{ required: true, message: '请输入商品名称', trigger: 'blur' }], |
|
|
|
shopGroupId: [{ required: true, message: '请选择商家商品分组', trigger: 'change' }], |
|
|
|
classifyId: [{ required: true, message: '请选择商家商品分类', trigger: 'change' }], |
|
|
|
shopGroupId: [{ required: true, message: this.$t('product.group_hint'), trigger: 'change' }], |
|
|
|
classifyId: [{ required: true, message: this.$t('product.category_hint'), trigger: 'change' }], |
|
|
|
// shopPlatformGroupId: [{ required: true, message: '请选择平台商品分组', trigger: 'change' }], |
|
|
|
// classifyBusinessId: [{ required: true, message: '请选择平台商品分类', trigger: 'change' }], |
|
|
|
ifLogistics: [{ required: true, message: '请选择是否需要物流', trigger: 'change' }], |
|
|
|
shelveState: [{ required: true, message: '请选择是否上架', trigger: 'change' }], |
|
|
|
ifOversold: [{ required: true, message: '请选择是否允许超卖', trigger: 'change' }], |
|
|
|
ifCredit: [{ required: true, message: '请选择是否支持积分兑换', trigger: 'change' }], |
|
|
|
creditLimit: [{ required: true, message: '请输入单笔最大抵扣', trigger: 'blur' }] |
|
|
|
ifLogistics: [{ required: true, message: this.$t('product.logistics_hint'), trigger: 'change' }], |
|
|
|
shelveState: [{ required: true, message: this.$t('product.shelve_state_hint'), trigger: 'change' }], |
|
|
|
ifOversold: [{ required: true, message: this.$t('product.ifoversold_hint'), trigger: 'change' }], |
|
|
|
ifFirst: [{ required: true, message: this.$t('product.iffirst_hint'), trigger: 'change' }], |
|
|
|
ifNew: [{ required: true, message: this.$t('product.ifnew_hint'), trigger: 'change' }], |
|
|
|
ifLowPrice: [{ required: true, message: this.$t('product.iflowprice_hint'), trigger: 'change' }], |
|
|
|
ifCredit: [{ required: true, message: this.$t('product.credit_hint'), trigger: 'change' }], |
|
|
|
creditLimit: [{ required: true, message: this.$t('product.credit_limit_hint'), trigger: 'blur' }] |
|
|
|
}, |
|
|
|
integralList: [], |
|
|
|
integralProportion: '' // 积分兑换金额比例 |
|
|
@ -581,7 +606,7 @@ export default { |
|
|
|
this.addForm.productName_EN == undefined) |
|
|
|
) { |
|
|
|
this.$message({ |
|
|
|
message: "请输入商品名称", |
|
|
|
message: this.$t('product.productname_hint'), |
|
|
|
type: "error", |
|
|
|
}); |
|
|
|
return; |
|
|
@ -590,7 +615,7 @@ export default { |
|
|
|
this.doSave(); |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
message: '请填写正确的信息', |
|
|
|
message: this.$t('common.inoutsuccess_hint'), |
|
|
|
type: 'warning' |
|
|
|
}) |
|
|
|
return false |
|
|
@ -699,7 +724,7 @@ export default { |
|
|
|
if (res.code === '') { |
|
|
|
this.$message({ |
|
|
|
type: 'success', |
|
|
|
message: '成功!' |
|
|
|
message: this.$t('common.successful') |
|
|
|
}) |
|
|
|
this.back() |
|
|
|
} |
|
|
@ -708,7 +733,7 @@ export default { |
|
|
|
if (res.code === '') { |
|
|
|
this.$message({ |
|
|
|
type: 'success', |
|
|
|
message: '成功!' |
|
|
|
message: this.$t('common.addsuccessful') |
|
|
|
}) |
|
|
|
|
|
|
|
this.reset() |
|
|
|