Commit 92d7b941 by cwq0219

修改

1 parent e0bda91f
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
> >
</div> </div>
<template> <template>
<div v-if="formData[item.name].length && ((item.maxPhotoNum === 1 && formData[item.name].content) || (item.maxPhotoNum > 1))"> <div v-if="formData[item.name].length">
<span <span
class="muti-imgs" class="muti-imgs"
v-for="(subItem, subIndex) in formData[item.name]" v-for="(subItem, subIndex) in formData[item.name]"
...@@ -427,16 +427,10 @@ export default { ...@@ -427,16 +427,10 @@ export default {
// console.log(base64) // console.log(base64)
uploadImg({ file: base64 }).then(res => { uploadImg({ file: base64 }).then(res => {
console.log(res) console.log(res)
// this.formData[targetItem.name].push()
// if (!Array.isArray(this.formData[targetItem.name])) {
// console.log(targetItem)
// this.formData[targetItem.name] = res
// } else {
if (targetItem.maxPhotoNum === 1) { if (targetItem.maxPhotoNum === 1) {
this.formData[targetItem.name] = [{ this.formData[targetItem.name] = [{
content: res content: res
}] }]
// this.$nextTick(() => { })
return true return true
} }
if (targetItem.name === 'goodsImgList') { if (targetItem.name === 'goodsImgList') {
...@@ -444,7 +438,6 @@ export default { ...@@ -444,7 +438,6 @@ export default {
} else { } else {
this.formData[targetItem.name][subIndex].content = res this.formData[targetItem.name][subIndex].content = res
} }
// }
console.log(this.formData[targetItem.name]) console.log(this.formData[targetItem.name])
}) })
} }
......
...@@ -172,8 +172,7 @@ export default { ...@@ -172,8 +172,7 @@ export default {
} }
}, { }, {
label: '创建时间', label: '创建时间',
parentProp: 'goodsInfo', prop: 'createDateStr'
prop: 'createdDate'
}] }]
}, },
// 查看门店 // 查看门店
......
...@@ -108,8 +108,10 @@ export default { ...@@ -108,8 +108,10 @@ export default {
if (this.addOrEdit === 'edit') { if (this.addOrEdit === 'edit') {
this.show = false this.show = false
this.editData = _.cloneDeep(this.$route.params.form) this.editData = _.cloneDeep(this.$route.params.form)
this.editData.thumbUrlList = [] this.editData.thumbUrlList = [{
this.editData.thumbUrlList[0] = { content: this.editData.thumbUrl } content: ''
}]
this.editData.thumbUrlList[0].content = this.editData.thumbUrl
console.log(this.editData) console.log(this.editData)
this.$nextTick(() => { this.$nextTick(() => {
this.show = true this.show = true
......
...@@ -186,6 +186,10 @@ export default { ...@@ -186,6 +186,10 @@ export default {
}, },
handleRelateStoreConfirm(selectedData) { handleRelateStoreConfirm(selectedData) {
console.log(selectedData) console.log(selectedData)
if (!selectedData.length) {
this.notice.warningTips('请选择关联门店')
return true
}
addServiceMerchant({ list: selectedData }).then(res => { addServiceMerchant({ list: selectedData }).then(res => {
this.relateStoreVisible = false this.relateStoreVisible = false
this.$refs.serviceStoreTable.refreshTable() this.$refs.serviceStoreTable.refreshTable()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!