刘翔宇-旅管家 3 years ago
parent 0ca0ded33f
commit e4363d1e82

@ -220,7 +220,6 @@ import addCommonServiceProduct from '@/views/productService/components/common/ad
}) })
this.total = res.total this.total = res.total
this.list = res.rows this.list = res.rows
console.log(res)
}, },
destroyProduct(row) { destroyProduct(row) {

@ -268,7 +268,7 @@ export default {
fee:'', fee:'',
sharing:'', sharing:'',
maxQuantity:'', maxQuantity:'',
limitQuantity:'', limitQuantity:'1',
pretendQuantity:0, pretendQuantity:0,
time:[], time:[],
sortnumber:0, sortnumber:0,
@ -342,7 +342,7 @@ export default {
this.typeChange(res?.product_type_pid) this.typeChange(res?.product_type_pid)
this.form = { this.form = {
name:res?.name, name:res?.name,
poster:res?.poster_url, poster:res?.poster,
merchantId:{ merchantId:{
label:res.merchant.name, label:res.merchant.name,
value:res.merchant.id value:res.merchant.id

@ -164,7 +164,8 @@
</template> </template>
<template v-slot:set_list> <template v-slot:set_list>
<div class="xy-table-item"> <div class="xy-table-item-label"> <div class="xy-table-item">
<div class="xy-table-item-label">
明细 明细
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
@ -186,23 +187,17 @@
<template v-slot:picture_list> <template v-slot:picture_list>
<div class="xy-table-item"> <div class="xy-table-item-label"> <div class="xy-table-item">
<div class="xy-table-item-label">
图集 图集
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<el-upload <el-upload class="upload-demo" :action="action" :before-upload="pichandleBefore"
class="upload-demo" :on-success="pichandleSuccess" :on-preview="pichandlePreview" :before-remove="pichandleBeforeRemove"
:action="action" :on-remove="pichandleRemove" :file-list="picfileList" list-type="picture" multiple>
:before-upload="pichandleBefore"
:on-success="pichandleSuccess"
:on-preview="pichandlePreview"
:before-remove="pichandleBeforeRemove"
:on-remove="pichandleRemove"
:file-list="picfileList"
list-type="picture" multiple>
<el-button size="small" type="primary">点击上传</el-button> <el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件或者视频文件且不超过2M</div> <div slot="tip" class="el-upload__tip">只能上传jpg/png文件或者视频文件且不超过10M</div>
</el-upload> </el-upload>
</div> </div>
</div> </div>
@ -218,7 +213,9 @@
import { import {
store, store,
show, show,
save save,
getPicture,
getCombo
} from "@/api/productService/commonServiceProduct" } from "@/api/productService/commonServiceProduct"
import { import {
index as clubIndex index as clubIndex
@ -242,16 +239,27 @@
isShow: false, isShow: false,
type: '', type: '',
listCombo: [], listCombo: [],
tableCombo:[ tableCombo: [{
{
label: '名称', label: '名称',
sortable: false, sortable: false,
minWidth: 220, minWidth: 220,
customFn: (row) => { customFn: (row) => {
return ( return ( <
<div> div >
<el-input size='small' placeholder="请输入名称" value={row.name} on={{['input']:(e)=>{row.name = e}}}/> <el-input size = 'small'
</div> placeholder = "请输入名称"
value = {
row.name
}
on = {
{
['input']: (e) => {
row.name = e
}
}
}
/> < /
div >
) )
} }
}, },
@ -260,10 +268,22 @@
sortable: false, sortable: false,
minWidth: 420, minWidth: 420,
customFn: (row) => { customFn: (row) => {
return ( return ( <
<div> div >
<el-input size='small' placeholder="请输入内容" value={row.content} on={{['input']:(e)=>{row.content = e}}}/> <el-input size = 'small'
</div> placeholder = "请输入内容"
value = {
row.content
}
on = {
{
['input']: (e) => {
row.content = e
}
}
}
/> < /
div >
) )
} }
} }
@ -320,7 +340,7 @@
if ((file.size / 1000) > 10240) { if ((file.size / 1000) > 10240) {
Message({ Message({
type: 'warning', type: 'warning',
message:'上传文件大小超过2M' message: '上传文件大小超过10M'
}) })
return false return false
} }
@ -444,7 +464,9 @@
coverPicture: res?.cover_picture, coverPicture: res?.cover_picture,
timeLimit: res?.time_limit?.split(','), timeLimit: res?.time_limit?.split(','),
content: res?.content, content: res?.content,
video: res?.video video: res?.video,
set_list: [],
picture_list: []
} }
this.$refs['tinymce'].setContent(this.form.content) this.$refs['tinymce'].setContent(this.form.content)
}, },
@ -453,6 +475,32 @@
this.clubSelect.page++ this.clubSelect.page++
this.getClubs() this.getClubs()
}, },
async getCombo() {
let list = []
const res = await getCombo({
common_products_id: this.id
})
list.push(...res);
return list;
},
async getPic() {
let list = []
const res = await getPicture({
common_products_id: this.id
})
list.push(...res.map(item => {
return {
url: item.picture,
name: item.name || item.picture,
id: item.id
}
}))
return list;
},
submit() { submit() {

Loading…
Cancel
Save