Authored by htoooth

fix format

... ... @@ -4,7 +4,7 @@
import api from '../api';
function getProduct (skn) {
function getProduct(skn) {
return api.getProductAllInfo(skn).then((result) => {
return result.data;
});
... ...
... ... @@ -240,7 +240,7 @@ export default {
this.$Loading.finish();
if (result.code === 200) {
this.$Notice.success({title : '保存成功'});
this.$Notice.success({title: '保存成功'});
this.$router.push({name: 'product.offsale'});
} else {
this.$Notice.error({
... ...
... ... @@ -333,7 +333,7 @@ import MuliSelect from './views/muli-select';
import Age from './views/age';
import Season from './views/season';
import Gender from './views/gender';
import GoodsSeason from './views/goods-season'
import GoodsSeason from './views/goods-season';
import service from './service';
import api from './api';
... ... @@ -590,8 +590,9 @@ export default {
one.forEach((s) => {
let i = _.find(this.render.attributeProValuesOne, {attributeId: s.attributeId});
if (i) {
i.model = s.attributeValueIds.map(s => `${s}`);
i.model = s.attributeValueIds.map(id => `${id}`);
}
});
... ... @@ -599,7 +600,7 @@ export default {
let i = _.find(this.render.attributeProValuesTwo, {attributeId: s.attributeId});
if (i) {
i.model = s.attributeValueIds.map(s => `${s}`);
i.model = s.attributeValueIds.map(id => `${id}`);
}
});
});
... ... @@ -740,7 +741,7 @@ export default {
desc: '该商品保存成功!'
});
this.$router.push({name: 'product.offsale'})
this.$router.push({name: 'product.offsale'});
} else {
this.$Notice.error({
title: '保存错误',
... ... @@ -792,6 +793,7 @@ export default {
let sizeId = s.id;
let productSku = s.productSku;
let factoryCode = color.sizeCode[i].name;
return {sizeId, factoryCode, productSku};
});
},
... ...
... ... @@ -4,7 +4,7 @@
import api from '../api';
function getProduct (skn) {
function getProduct(skn) {
return api.getProductAllInfo(skn).then((result) => {
return result.data;
});
... ...
... ... @@ -23,13 +23,15 @@ export default {
props: ['value'],
data() {
let _this = this;
return {
handleValue: _this.value.split('|')
}
};
},
methods: {
updateValue(newValue) {
let nValue = newValue.join('|');
this.$emit('input', nValue);
}
},
... ... @@ -38,8 +40,8 @@ export default {
this.handleValue = newValue.split('|');
}
}
};
}
</script>
<style>
... ...
... ... @@ -13,17 +13,19 @@
</template>
<script>
export default {
export default {
props: ['value'],
data() {
let _this = this;
return {
handleValue: _this.value
}
};
},
methods: {
updateValue(newValue) {
let nValue = newValue;
this.$emit('input', nValue);
}
},
... ... @@ -33,7 +35,7 @@
}
}
}
};
</script>
<style>
... ...
... ... @@ -10,18 +10,20 @@
</template>
<script>
export default {
export default {
name: 'product-goods-season',
props: ['value'],
data() {
let _this = this;
return {
handleValue: _this.value
}
};
},
methods: {
updateValue(newValue) {
let nValue = newValue;
this.$emit('input', nValue);
}
},
... ... @@ -31,7 +33,7 @@
}
}
}
};
</script>
<style>
... ...
... ... @@ -24,14 +24,16 @@ export default {
},
data() {
let _this = this;
return {
handleValue: _this.value.map(s => `${s.id}`)
};
},
methods: {
updateValue: function(value) {
this.handleValue = value;
let newValue = value.map(s => ({id: s}));
this.handleValue = value;
this.$emit('input', newValue);
}
},
... ... @@ -41,7 +43,7 @@ export default {
}
}
}
};
</script>
<style>
... ...
... ... @@ -26,10 +26,11 @@ export default {
props: ['value', 'attr'],
data() {
let _this = this;
return {
handleSelectValue: _this.value[0],
handleCheckValue: _this.value
}
};
},
methods: {
updateSelectValue(value) {
... ... @@ -48,7 +49,7 @@ export default {
}
}
}
}
};
</script>
<style>
... ...
... ... @@ -16,17 +16,19 @@
</template>
<script>
export default {
export default {
props: ['value'],
data() {
let _this = this;
return {
handleValue: _this.value
}
};
},
methods: {
updateValue(newValue) {
let nValue = newValue;
this.$emit('input', nValue);
}
},
... ... @@ -36,7 +38,7 @@
}
}
}
};
</script>
<style>
... ...