|
@@ -373,28 +373,26 @@ export default {
|
|
|
for (const key in this.exData) {
|
|
|
if (this.form.hasOwnProperty(key)) {
|
|
|
let value = this.exData[key]
|
|
|
- if ((Array.isArray(value) && value.length > 0) || value) {
|
|
|
- if (key === 'product_img_url') {
|
|
|
- value = [value]
|
|
|
- }
|
|
|
- if (key === 'product_place' || key === 'product_status') {
|
|
|
- value = value.toString()
|
|
|
- }
|
|
|
- if (key === 'skus') {
|
|
|
- value = value.map(item => ({
|
|
|
- ...item,
|
|
|
- product_status: item.product_status === 1,
|
|
|
- product_price: fen2Yuan(item.product_price)
|
|
|
- }))
|
|
|
- }
|
|
|
- if (key === 'attachs') {
|
|
|
- value = value.map(item => ({
|
|
|
- ...item,
|
|
|
- attach_content: item.attach_content.split(',')
|
|
|
- }))
|
|
|
- }
|
|
|
- this.$set(this.form, key, value)
|
|
|
+ if (key === 'product_img_url') {
|
|
|
+ value = [value]
|
|
|
}
|
|
|
+ if (key === 'product_place' || key === 'product_status') {
|
|
|
+ value = value.toString()
|
|
|
+ }
|
|
|
+ if (key === 'skus') {
|
|
|
+ value = value.map(item => ({
|
|
|
+ ...item,
|
|
|
+ product_status: item.product_status === 1,
|
|
|
+ product_price: fen2Yuan(item.product_price)
|
|
|
+ }))
|
|
|
+ }
|
|
|
+ if (key === 'attachs') {
|
|
|
+ value = value.map(item => ({
|
|
|
+ ...item,
|
|
|
+ attach_content: item.attach_content.split(',')
|
|
|
+ }))
|
|
|
+ }
|
|
|
+ this.$set(this.form, key, value)
|
|
|
}
|
|
|
}
|
|
|
}
|