|
|
@@ -282,6 +282,17 @@
|
|
|
v-hasPermi="['store:storeProduct:sync']"
|
|
|
>同步</el-button>
|
|
|
</el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ plain
|
|
|
+ icon="el-icon-close"
|
|
|
+ size="mini"
|
|
|
+ :disabled="multiple"
|
|
|
+ @click="handleBatchOff"
|
|
|
+ v-hasPermi="['store:storeProduct:updateIsShow']"
|
|
|
+ >批量下架</el-button>
|
|
|
+ </el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
@@ -927,7 +938,8 @@ import {
|
|
|
exportStoreProduct,
|
|
|
importTemplate,
|
|
|
batchModify,
|
|
|
- sync580
|
|
|
+ sync580,
|
|
|
+ updateIsShow
|
|
|
} from "@/api/hisStore/storeProduct";
|
|
|
import { getAllStoreProductCategory } from "@/api/hisStore/storeProductCategory";
|
|
|
import { getAllStoreProductRule } from "@/api/hisStore/storeProductRule";
|
|
|
@@ -1710,6 +1722,20 @@ export default {
|
|
|
this.getList();
|
|
|
this.msgSuccess("同步成功");
|
|
|
}).catch(function() {});
|
|
|
+ },
|
|
|
+ /** 批量下架按钮操作 */
|
|
|
+ handleBatchOff (row) {
|
|
|
+ const productIds = (row && row.productId) || this.ids;
|
|
|
+ this.$confirm('是否确认批量下架商品编号为"' + productIds + '"的数据项?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ return updateIsShow(productIds);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.msgSuccess("下架成功");
|
|
|
+ }).catch(function() {});
|
|
|
}
|
|
|
}
|
|
|
};
|