调整
This commit is contained in:
@@ -60,9 +60,10 @@
|
||||
<el-form-item label="商品来源:" v-show="false" style="width: 100%;" prop="type" :rules="[{ required: true, message: '请选择商品来源', trigger: 'blur' }]">
|
||||
<el-radio-group v-model="form.type" size="medium">
|
||||
<el-radio :label="1">TEMU</el-radio>
|
||||
<el-radio :label="2">速卖通</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="TEMU商品地址:" style="width: 100%;" prop="url" :rules="[{ required: true, message: '请输入TEMU商品地址', trigger: 'blur' }]">
|
||||
<el-form-item label="商品地址:" style="width: 100%;" prop="url" :rules="[{ required: true, message: '请输入商品地址', trigger: 'blur' }]">
|
||||
<el-input type="textarea" v-model="form.url"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="店铺:" style="width: 100%;" prop="targetMallId" :rules="[{ required: true, message: '请选择店铺', trigger: 'blur' }]">
|
||||
@@ -461,19 +462,7 @@ const ImageEditor = require('tui-image-editor')
|
||||
}}).then((res) => {
|
||||
if (res.errorCode == 1000000) {
|
||||
Message.success("成功添加到草稿箱")
|
||||
let mallInfo = this.$store.state.mallList.filter(item => {
|
||||
return item.mallId == this.form.targetMallId
|
||||
})
|
||||
this.$http.post('/api/copyProduct/add', {
|
||||
mallId: mallInfo[0].mallId,
|
||||
mallName: mallInfo[0].mallName,
|
||||
url: this.form.url,
|
||||
type: this.form.type
|
||||
}).then(res1 => {
|
||||
if (res1.code == 0) {
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
this.saveInfo()
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
this.createProduct(content)
|
||||
@@ -496,6 +485,22 @@ const ImageEditor = require('tui-image-editor')
|
||||
this.getSpecId(data)
|
||||
}
|
||||
})
|
||||
},
|
||||
saveInfo() {
|
||||
let mallInfo = this.$store.state.mallList.filter(item => {
|
||||
return item.mallId == this.form.targetMallId
|
||||
})
|
||||
this.$http.post('/api/copyProduct/add', {
|
||||
mallId: mallInfo[0].mallId,
|
||||
mallName: mallInfo[0].mallName,
|
||||
url: this.form.url,
|
||||
type: this.form.type
|
||||
}).then(res1 => {
|
||||
if (res1.code == 0) {
|
||||
this.$store.dispatch('getUserInfo')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user