Commit 3fe1f073 authored by verestrasz's avatar verestrasz

update

parent 3d5918c8
......@@ -57,6 +57,14 @@ export const addGood = {
return form
}
}
// 存为草稿
export const draftGood = {
url: '/goods/releaseGoods/draft',
method: 'POST',
dealReqData: (form) => {
return form
}
}
// 获取商品列表
export const getGoodList = {
url: '/goodsList/page',
......
......@@ -7,7 +7,9 @@
:style="uploadStyle"
>
<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">
<Icon
v-if="showWatch && type != 'apk'"
......@@ -310,6 +312,11 @@ export default {
height: 100%;
object-fit: cover;
}
.demo-upload-list video {
width: 100%;
height: 100%;
object-fit: cover;
}
.demo-upload-list-cover {
display: none;
position: absolute;
......
......@@ -7,7 +7,8 @@ export const OffShelfType = {
AUDIT: 5,
CHECK_FAIL: 6,
OFFERING: 7,
CANCELED: 8
CANCELED: 8,
DRAFT: 9
}
export const OffShelfTypeObj = {
......@@ -46,6 +47,10 @@ export const OffShelfTypeObj = {
[OffShelfType.CANCELED]: {
label: '已取消',
color: 'default'
},
[OffShelfType.DRAFT]: {
label: '草稿',
color: 'default'
}
}
export const IsAppendType = {
......
......@@ -208,6 +208,18 @@ export default [{
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',
name: 'commodity_add_good',
meta: {
......
......@@ -78,9 +78,9 @@
<div class="item">
<label class="label">所属类目:</label>
<Input
v-if="isEdit || isDetail"
v-if="isDetail"
v-model="data.categoryId"
:readonly="isDetail || isEdit"
:readonly="isDetail"
/>
<Cascader v-else :data="categoryList" v-model="data.categoryId" @on-change="handleChange"></Cascader>
</div>
......
This diff is collapsed.
This diff is collapsed.
......@@ -164,6 +164,10 @@ export default {
{
series_id: 8,
series_name: '已取消'
},
{
series_id: 9,
series_name: '草稿'
}
],
......@@ -335,12 +339,29 @@ export default {
style: {
margin: '5px',
// 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(
'Button',
{
......@@ -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 {
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) {
return () => {
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