|
|
@@ -29,7 +29,7 @@
|
|
|
<block v-if="!$util.isEmpty(globalItemData)">
|
|
|
<view class="item_list_bx selectAll">
|
|
|
<view v-if="!$util.isEmpty(globalItemData)">
|
|
|
- <template v-for="(productItem, productIndex) in globalItemData" :key="productIndex">
|
|
|
+ <template v-for="(productItem) in globalItemData">
|
|
|
<view class="item_list_title" v-if="productItem.className && productItem.className!=''">{{ productItem.className }}</view>
|
|
|
<view style="height: 175upx">
|
|
|
<Commondity
|
|
|
@@ -38,7 +38,6 @@
|
|
|
:info="productItem"
|
|
|
@showAddModelFn="showAddModelFn"
|
|
|
@replaceItemFn="replaceItemFn"
|
|
|
- @goToSpecialVariety="goToSpecialVariety"
|
|
|
@delProduct="delProduct"
|
|
|
></Commondity>
|
|
|
</view>
|
|
|
@@ -123,7 +122,6 @@ import FooterCart from "@/components/module/app-footer-cart";
|
|
|
import ModalModule from "@/components/plugin/modal";
|
|
|
import { COMMODITY_TYPE } from "@/utils/declare";
|
|
|
import hsMins from "@/mixins/hs";
|
|
|
-import { delStatusUpdate } from '@/api/product';
|
|
|
import { mapGetters } from "vuex";
|
|
|
export default {
|
|
|
name: "hs",
|
|
|
@@ -150,27 +148,8 @@ export default {
|
|
|
...mapGetters(["getLoginInfo"]),
|
|
|
},
|
|
|
onShow() {
|
|
|
- //小菊等多颜色
|
|
|
- if(this.xjData.hasUpdate == 1){
|
|
|
- this.customData = this.xjDataInfo
|
|
|
- if(this.xjData.cancel == 1){
|
|
|
- this.customData.bigCount = 0
|
|
|
- this.customData.smallCount = 0
|
|
|
- this.replaceItemFn(this.customData,1)
|
|
|
- }else{
|
|
|
- this.customData.bigCount = this.xjData.stock
|
|
|
- this.customData.smallCount = 0
|
|
|
- this.customData.bigPrice = this.xjData.price
|
|
|
- this.customData.price = this.xjData.price
|
|
|
- this.customData.itemPrice = this.xjData.price
|
|
|
- this.customData.userPrice = this.xjData.price
|
|
|
- this.confirmAddItemModel(this.customData)
|
|
|
- }
|
|
|
- }
|
|
|
- this.xjData = {}
|
|
|
},
|
|
|
onLoad () {
|
|
|
- let that = this
|
|
|
if(this.option.customName){
|
|
|
uni.setNavigationBarTitle({ title: this.option.customName })
|
|
|
}
|
|
|
@@ -195,27 +174,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- delProduct(info){
|
|
|
- let that = this
|
|
|
- that.$util.confirmModal({content:'确认删除?'},() => {
|
|
|
- delStatusUpdate({id:info.id,delStatus:1}).then(res=>{
|
|
|
- if(res.code == 1){
|
|
|
- that.$msg('删除成功')
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
- //小菊多颜色选择页
|
|
|
- goToSpecialVariety(info){
|
|
|
- this.xjDataInfo = info
|
|
|
- if(info.stock <= 0){
|
|
|
- uni.showToast({title:"没有库存",icon:"none"})
|
|
|
- }else{
|
|
|
- let userPrice = info.userPrice ? parseFloat(info.userPrice) : 0
|
|
|
- let price = info.price ? parseFloat(info.price) : 0
|
|
|
- this.$util.pageTo({url: "/admin/item/xj?stock="+info.stock+"&price="+price+"&customId="+this.option.customId+"&userPrice="+userPrice+"&productId="+info.id+"&ptItemId="+info.itemId})
|
|
|
- }
|
|
|
- },
|
|
|
selectFlowerNumFn(){
|
|
|
this.$refs.globalClassImgRef.open('top')
|
|
|
},
|