Commit 301f8c2a by zhangquan

开放出售

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