|
@@ -557,22 +557,22 @@ export default {
|
|
|
this.$data.formData = this.$options.data().formData
|
|
|
this.formDialog = false
|
|
|
},
|
|
|
- updateStatus(status){
|
|
|
+ updateStatus(stateEnum){
|
|
|
if(this.recordSelected.length == 0){
|
|
|
return this.$message.warning('请至少勾选一条数据!');
|
|
|
}
|
|
|
console.log(this.recordSelected)
|
|
|
- this.$confirm(`请确认是否${status=='OFF'?'下架':'上架'}该配件, 是否继续?`, '提示', {
|
|
|
+ this.$confirm(`请确认是否${stateEnum=='OFF'?'下架':'上架'}该配件, 是否继续?`, '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
updateStatus({
|
|
|
- status,
|
|
|
+ stateEnum,
|
|
|
ids: this.recordSelected.map(item=>{return item.goodsId}).join(',')
|
|
|
}).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
- this.$message({ type: 'success', message: `${status=='ON'?'上架':'下架'}成功!` })
|
|
|
+ this.$message({ type: 'success', message: `${stateEnum=='ON'?'上架':'下架'}成功!` })
|
|
|
this.$refs.pageRef.refreshList()
|
|
|
} else {
|
|
|
this.$message.error(res.msg);
|