|
|
@@ -165,6 +165,10 @@
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<view class="tui-title">每人限购</view>
|
|
|
<input v-model="form.limitBuy" style="width:300upx;" @focus="form.limitBuy=''" placeholder-class="phcolor" class="tui-input" name="limitBuy" placeholder="请填写,填0不限购" maxlength="50" type="number" />
|
|
|
+
|
|
|
+ <button v-if="productData.id > 0 && form.limitBuy>0" class="admin-button-com blue middle" @click.stop="clearBuyCache()" style="width:150upx;">清已购</button>
|
|
|
+ <button v-else class="admin-button-com default middle" style="width:150upx;" @click.stop="">清已购</button>
|
|
|
+
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
@@ -399,7 +403,7 @@
|
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
|
const form = require("@/utils/formValidation.js");
|
|
|
import { getAllItemClass } from "@/api/item-class";
|
|
|
-import { applyAuth,modifyCgStaff,setLosing,modifyUnit,modifyRatio,modifyWeight } from '@/api/item';
|
|
|
+import { applyAuth,modifyCgStaff,setLosing,modifyUnit,modifyRatio,modifyWeight,clearLimitBuy } from '@/api/item';
|
|
|
import { delCpItem,addCpItem } from '@/api/cp'
|
|
|
import { getAllUnit } from "@/api/unit";
|
|
|
import { addProduct,updateProduct,getProductDetail,py,print,modifyOnStockFn,delStatusUpdate,changeBelongCost } from "@/api/product";
|
|
|
@@ -532,6 +536,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ clearBuyCache(){
|
|
|
+ let that = this
|
|
|
+ that.$util.confirmModal({content:'确认清除已购?清除后客户可再次下单'},() => {
|
|
|
+ clearLimitBuy({id:this.productData.id}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ this.$msg('已清除')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
notAllowChange(){
|
|
|
if(this.productData.hasRightChangeReason!=''){
|
|
|
this.$msg(this.productData.hasRightChangeReason)
|