|
|
@@ -31,7 +31,7 @@
|
|
|
|
|
|
<template v-for="(productItem, productIndex) in classItem.child">
|
|
|
<view style="height:230upx" :id="`class_${classIndex}`" :key="productIndex">
|
|
|
- <ItemComponent v-if="classItem.isActive" :isPrice="false" :info="productItem" @savePrice="savePrice" ></ItemComponent>
|
|
|
+ <ItemComponent v-if="classItem.isActive" :isPrice="false" :info="productItem" @savePrice="savePrice" @cancelDiscountFn="cancelDiscountFn"></ItemComponent>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -66,7 +66,7 @@ import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import ItemComponent from "./components/Item";
|
|
|
import productMins from "@/mixins/product";
|
|
|
import { mapGetters } from "vuex";
|
|
|
-import { batchChangePrice,generatePriceTable } from '@/api/product/index'
|
|
|
+import { batchChangePrice,generatePriceTable,cancelDiscountPrice } from '@/api/product/index'
|
|
|
export default {
|
|
|
name: "item_list",
|
|
|
components: {
|
|
|
@@ -90,6 +90,16 @@ export default {
|
|
|
this.initProduct()
|
|
|
},
|
|
|
methods: {
|
|
|
+ cancelDiscountFn(item){
|
|
|
+ let that = this
|
|
|
+ this.$util.confirmModal({content:'确认取消?'},() => {
|
|
|
+ cancelDiscountPrice({id:item.id}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.$msg(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
downloadTable(){
|
|
|
let level = 0
|
|
|
let levelList = ['散客价', '花店价']
|