Commit 301f8c2a by zhangquan

开放出售

1 parent 7396befd
...@@ -195,6 +195,13 @@ const getShortLinkUUID = params => { ...@@ -195,6 +195,13 @@ const getShortLinkUUID = params => {
returnAll: true returnAll: true
}) })
} }
const openSaleApi = params => {
params.method = 'scrm.api.equity.goods.update.allow.sale'
return http({
data: params
})
}
export default { export default {
getBalanceList, getBalanceList,
getOrderList, getOrderList,
...@@ -221,4 +228,5 @@ export default { ...@@ -221,4 +228,5 @@ export default {
exportGasList, exportGasList,
createShortLink, createShortLink,
getShortLinkUUID, getShortLinkUUID,
openSaleApi
} }
...@@ -29,6 +29,11 @@ ...@@ -29,6 +29,11 @@
<div class="table_point" :style="{ background: colors[scope.scope.status] }"></div> <div class="table_point" :style="{ background: colors[scope.scope.status] }"></div>
<span>{{ ['待上架', '上架', '下架'][scope.scope.status] }}</span> <span>{{ ['待上架', '上架', '下架'][scope.scope.status] }}</span>
</div> </div>
<div slot="openSaleSlot" slot-scope="scope">
<el-switch
:value="scope.scope.allowSaleFlag==1" :active-text="scope.scope.allowSaleFlag==1 ? '开放': '关闭'" @change="openSaleFn(scope.scope)">
</el-switch>
</div>
<div slot="table-btns" slot-scope="scope"> <div slot="table-btns" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton> <GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div> </div>
...@@ -168,6 +173,9 @@ export default { ...@@ -168,6 +173,9 @@ export default {
type: 'text', type: 'text',
fn: '编辑商品' fn: '编辑商品'
}, },
// condition: row => {
// return true
// },
listeners: { listeners: {
click: row => this.jump(row.scope) click: row => this.jump(row.scope)
} }
...@@ -295,6 +303,11 @@ export default { ...@@ -295,6 +303,11 @@ export default {
// } // }
}, },
{ {
label: '销售状态',
width: 140,
addHtml: 'openSaleSlot'
},
{
label: '操作', label: '操作',
width: 170, width: 170,
fixed: 'right', fixed: 'right',
...@@ -384,6 +397,19 @@ export default { ...@@ -384,6 +397,19 @@ export default {
item.optionList = res.data item.optionList = res.data
}) })
}, },
openSaleFn(row){
const params = {
id: row.id,
allowSaleFlag: row.allowSaleFlag == 1 ? 2: 1
}
this.$apis.orderApi.openSaleApi(params).then(res => {
console.log(res)
if(res) {
this.$message.success('操作成功')
this.handleSearch()
}
})
},
jump({ id, status }, copy) { jump({ id, status }, copy) {
// let params = {} // let params = {}
// if (id) params.id = id // if (id) params.id = id
...@@ -549,6 +575,9 @@ export default { ...@@ -549,6 +575,9 @@ export default {
box-sizing: border-box; box-sizing: border-box;
padding: 16px 20px; padding: 16px 20px;
border-radius: 0 4px 4px 4px; border-radius: 0 4px 4px 4px;
/deep/ .el-switch__label{
color: #666;
}
} }
.con-wrap { .con-wrap {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!