Commit 3fe1f073 authored by verestrasz's avatar verestrasz

update

parent 3d5918c8
...@@ -57,6 +57,14 @@ export const addGood = { ...@@ -57,6 +57,14 @@ export const addGood = {
return form return form
} }
} }
// 存为草稿
export const draftGood = {
url: '/goods/releaseGoods/draft',
method: 'POST',
dealReqData: (form) => {
return form
}
}
// 获取商品列表 // 获取商品列表
export const getGoodList = { export const getGoodList = {
url: '/goodsList/page', url: '/goodsList/page',
......
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
:style="uploadStyle" :style="uploadStyle"
> >
<template v-if="item.status === 'finished'"> <template v-if="item.status === 'finished'">
<img :src="getImgUrl(item)" />{{ item.url }} <video :src="item.url" v-if="type==='video'"></video>
<img :src="getImgUrl(item)" v-else/>
{{ item.url }}
<div class="demo-upload-list-cover" v-show="!readonly || showWatch"> <div class="demo-upload-list-cover" v-show="!readonly || showWatch">
<Icon <Icon
v-if="showWatch && type != 'apk'" v-if="showWatch && type != 'apk'"
...@@ -310,6 +312,11 @@ export default { ...@@ -310,6 +312,11 @@ export default {
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
} }
.demo-upload-list video {
width: 100%;
height: 100%;
object-fit: cover;
}
.demo-upload-list-cover { .demo-upload-list-cover {
display: none; display: none;
position: absolute; position: absolute;
......
...@@ -7,7 +7,8 @@ export const OffShelfType = { ...@@ -7,7 +7,8 @@ export const OffShelfType = {
AUDIT: 5, AUDIT: 5,
CHECK_FAIL: 6, CHECK_FAIL: 6,
OFFERING: 7, OFFERING: 7,
CANCELED: 8 CANCELED: 8,
DRAFT: 9
} }
export const OffShelfTypeObj = { export const OffShelfTypeObj = {
...@@ -46,6 +47,10 @@ export const OffShelfTypeObj = { ...@@ -46,6 +47,10 @@ export const OffShelfTypeObj = {
[OffShelfType.CANCELED]: { [OffShelfType.CANCELED]: {
label: '已取消', label: '已取消',
color: 'default' color: 'default'
},
[OffShelfType.DRAFT]: {
label: '草稿',
color: 'default'
} }
} }
export const IsAppendType = { export const IsAppendType = {
......
...@@ -208,6 +208,18 @@ export default [{ ...@@ -208,6 +208,18 @@ export default [{
import ('@/view/good-mgr/add-good') import ('@/view/good-mgr/add-good')
}, },
{ {
path: 'draft_good',
name: 'draft_good',
meta: {
icon: 'ios-appstore-outline',
title: '编辑商品',
hideInMenu: true,
notCache: true
},
component: () =>
import ('@/view/good-mgr/add-good')
},
{
path: 'commodity_add_good', path: 'commodity_add_good',
name: 'commodity_add_good', name: 'commodity_add_good',
meta: { meta: {
......
...@@ -78,9 +78,9 @@ ...@@ -78,9 +78,9 @@
<div class="item"> <div class="item">
<label class="label">所属类目:</label> <label class="label">所属类目:</label>
<Input <Input
v-if="isEdit || isDetail" v-if="isDetail"
v-model="data.categoryId" v-model="data.categoryId"
:readonly="isDetail || isEdit" :readonly="isDetail"
/> />
<Cascader v-else :data="categoryList" v-model="data.categoryId" @on-change="handleChange"></Cascader> <Cascader v-else :data="categoryList" v-model="data.categoryId" @on-change="handleChange"></Cascader>
</div> </div>
......
This diff is collapsed.
This diff is collapsed.
...@@ -164,6 +164,10 @@ export default { ...@@ -164,6 +164,10 @@ export default {
{ {
series_id: 8, series_id: 8,
series_name: '已取消' series_name: '已取消'
},
{
series_id: 9,
series_name: '草稿'
} }
], ],
...@@ -335,12 +339,29 @@ export default { ...@@ -335,12 +339,29 @@ export default {
style: { style: {
margin: '5px', margin: '5px',
// display: this.isBrand ? 'inline-block' : 'none' // display: this.isBrand ? 'inline-block' : 'none'
display: status == OffShelfType.OFFERING ? 'inline-block' : 'none' display: status == OffShelfType.SHELVES ? 'inline-block' : 'none'
}
},
'编 辑'
)
let draftBtn = h(
'Button',
{
props: {
type: 'primary',
size: 'small'
},
on: {
click: this.handleDraft(params.row)
},
style: {
margin: '5px',
// display: this.isBrand ? 'inline-block' : 'none'
display: (status == OffShelfType.DRAFT || status == OffShelfType.OFFERING || status == OffShelfType.CHECK_FAIL || status == OffShelfType.FAIL) ? 'inline-block' : 'none'
} }
}, },
'编 辑' '编 辑'
) )
let offShelfBtn = h( let offShelfBtn = h(
'Button', 'Button',
{ {
...@@ -409,7 +430,7 @@ export default { ...@@ -409,7 +430,7 @@ export default {
}, },
'重新发布' '重新发布'
) )
return h('div', [detailBtn, !this.platform && editBtn, offShelfBtn, !this.platform && cancelBtn, !this.platform && againBtn, !this.platform && delBtn]) return h('div', [detailBtn, !this.platform && editBtn, offShelfBtn, !this.platform && cancelBtn, !this.platform && againBtn, !this.platform && draftBtn, !this.platform && delBtn])
} }
} }
], ],
...@@ -532,6 +553,13 @@ export default { ...@@ -532,6 +553,13 @@ export default {
this.$router.push({ name: row.commodityPass == 3 ? 'commodity_again_good' : 'again_good', query }) this.$router.push({ name: row.commodityPass == 3 ? 'commodity_again_good' : 'again_good', query })
} }
}, },
handleDraft (row) {
return () => {
console.log(row)
let query = { goodsId: row.goodsId }
this.$router.push({ name: row.commodityPass == 3 ? 'commodity_draft_good' : 'draft_good', query })
}
},
handleDetail (row) { handleDetail (row) {
return () => { return () => {
let query = { goodsId: row.goodsId } let query = { goodsId: row.goodsId }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment