Authored by htoooth

fix

... ... @@ -16,7 +16,7 @@ export default () => {
productName: '',
phrase: '',
factoryCode: '',
goodsYears: '',
goodsYears: new Date().getFullYear().toString(),
goodsSeason: '',
gender: '',
seasons: '',
... ...
... ... @@ -148,6 +148,11 @@ export default {
return api.getBrand().then((result) => {
if (result.code === 200) {
this.brands = result.data;
if (this.brands.length === 1) {
this.product.brandId = this.brands[0].brandId;
this.product.brandName = this.brands[0].brandName;
}
}
});
},
... ...
... ... @@ -44,7 +44,7 @@
<Row>
<Col span="8">
<Form-item label="商品卖点" prop="phrase">
<Form-item label="商品卖点">
<Input v-model="product.phrase" type="textarea" :rows="4" placeholder="请输入..."/>
</Form-item>
</Col>
... ... @@ -244,7 +244,9 @@ export default {
}
if (!Number.isInteger(value)) {
callback(new Error('请输入数字值'));
callback(new Error('请输入整数,不能有小数点'));
} else if (value > 100000) {
callback(new Error('价格不能大于6位'));
} else {
callback();
... ... @@ -383,9 +385,6 @@ export default {
productName: [
{ required: true, message: '商品名不能为空', trigger: 'blur'}
],
phrase: [
{ required: true, message: '商品卖点不能为空', trigger: 'blur'}
],
goodsYears: [
{ required: true, message: '货品年不能为空', trigger: 'change', type: 'string'}
],
... ... @@ -410,7 +409,8 @@ export default {
salesPrice: [
{ required: true, trigger: 'blur', validator: validateMustLessRetailPrice},
]
}
},
years: 2018
};
},
mounted: function() {
... ...
... ... @@ -43,7 +43,7 @@
<Row>
<Col span="8">
<Form-item label="商品卖点" prop="phrase">
<Form-item label="商品卖点">
<Input v-model="product.phrase" type="textarea" :rows="4" placeholder="请输入..." style="width: 350px;"/>
</Form-item>
</Col>
... ... @@ -772,7 +772,6 @@ export default {
},
beforeSave: function() {
let newProduct = makeSaveProduct();
this.refreshTable();
newProduct.productSkn = this.product.productSkn;
... ...
... ... @@ -9,9 +9,11 @@ const handleRelation = (oneValuesObj = []) => {
let str = _.isArray(r.model) ? r.model.join(',') : r.model;
if (str) {
let valObj = _.find(r.idNameList, {id: str});
total.push({
standardId: r.attributeId,
standardVal: r.attributeName,
standardVal: valObj.text || '',
parameterMakeId: str
});
}
... ...