|
|
@@ -71,7 +71,6 @@
|
|
|
:info="productItem"
|
|
|
:isChecked="isItemChecked(productItem.id)"
|
|
|
@checkChange="handleItemCheck(productItem, $event)"
|
|
|
- @hideChangeFn="hideChangeFn"
|
|
|
@cancelPreSellFn="cancelPreSellFn">
|
|
|
</ItemComponent>
|
|
|
</view>
|
|
|
@@ -91,7 +90,7 @@
|
|
|
<!-- 底部按钮 -->
|
|
|
<div class="app-footer">
|
|
|
<button class="admin-button-com big blue footer-btn-left" @click="commitShow">批量显示</button>
|
|
|
- <button class="admin-button-com big blue footer-btn-right" @click="commitPrice">批量隐藏</button>
|
|
|
+ <button class="admin-button-com big blue footer-btn-right" @click="commitHide">批量隐藏</button>
|
|
|
</div>
|
|
|
|
|
|
<!-- 分类选择弹窗 -->
|
|
|
@@ -114,7 +113,7 @@ import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import ItemComponent from "./components/changeHide";
|
|
|
import productMins from "@/mixins/product2";
|
|
|
import { mapGetters } from "vuex";
|
|
|
-import { changeFrontHide, batchStopItem } from "@/api/item";
|
|
|
+import { batchChangeFrontHide } from "@/api/item";
|
|
|
import { cancelPreSell } from '@/api/product'
|
|
|
|
|
|
export default {
|
|
|
@@ -221,54 +220,40 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
- },
|
|
|
-
|
|
|
- hideChangeFn(item,status){
|
|
|
- changeFrontHide({id:item.id,status:status}).then(res=>{
|
|
|
- if(res.code == 1){
|
|
|
- this.$msg('操作成功')
|
|
|
- item.frontHide = status
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
+ },
|
|
|
initProduct(){
|
|
|
this.globalRequestType = 'itemList'
|
|
|
this.initData()
|
|
|
uni.hideLoading()
|
|
|
},
|
|
|
|
|
|
- commitPrice(){
|
|
|
+ commitHide(){
|
|
|
if(this.selectedIdsSet.size === 0){
|
|
|
this.$msg('请选择花材')
|
|
|
return;
|
|
|
}
|
|
|
- this.$util.confirmModal({content:'确认批量隐藏 ' + this.selectedIdsSet.size + ' 个花材?'},() => {
|
|
|
+ this.$util.confirmModal({content:'确认隐藏 ' + this.selectedIdsSet.size + ' 个花材?'},() => {
|
|
|
this.commitChange(1)
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
commitShow(){
|
|
|
if(this.selectedIdsSet.size === 0){
|
|
|
this.$msg('请选择花材')
|
|
|
return;
|
|
|
}
|
|
|
- this.$util.confirmModal({content:'确认批量显示 ' + this.selectedIdsSet.size + ' 个花材?'},() => {
|
|
|
+ this.$util.confirmModal({content:'确认显示 ' + this.selectedIdsSet.size + ' 个花材?'},() => {
|
|
|
this.commitChange(0)
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
commitChange(hideStatus){
|
|
|
const ids = Array.from(this.selectedIdsSet);
|
|
|
- batchStopItem({ids:JSON.stringify(ids), status: hideStatus}).then(res=>{
|
|
|
+ batchChangeFrontHide({ids:JSON.stringify(ids), frontHide: hideStatus}).then(res=>{
|
|
|
if(res.code == 1){
|
|
|
- this.selectedIdsSet.clear()
|
|
|
this.$msg(res.msg)
|
|
|
- this.reGetGlobalProductList()
|
|
|
+ this.initData()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
currentSwitchClass(index,item){
|
|
|
this.globalSwitchClass(index,item)
|
|
|
},
|