|
@@ -34,6 +34,10 @@
|
|
|
<view style="text-align:center;" v-if="customData.property==0">
|
|
<view style="text-align:center;" v-if="customData.property==0">
|
|
|
<button class="admin-button-com mini-btn blue" style="font-size:20upx;" @click="clear()">扫码付</button>
|
|
<button class="admin-button-com mini-btn blue" style="font-size:20upx;" @click="clear()">扫码付</button>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view v-if="unitType == 1">
|
|
|
|
|
+ <button class="admin-button-com mini-btn" style="font-size:14upx;float:left;" @click="addHalf">加半扎</button>
|
|
|
|
|
+ <button class="admin-button-com mini-btn blue" style="font-size:14upx;float:right;" @click="subHalf">减半扎</button>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
|
<view class="keyboard-body_box">
|
|
<view class="keyboard-body_box">
|
|
@@ -43,6 +47,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
import VKeyboard from '@/components/vKeyboard/VKeyboard.vue'
|
|
import VKeyboard from '@/components/vKeyboard/VKeyboard.vue'
|
|
|
|
|
+import { changeHalf } from "@/api/item"
|
|
|
export default {
|
|
export default {
|
|
|
name:'selectNumPrice',
|
|
name:'selectNumPrice',
|
|
|
components:{ VKeyboard },
|
|
components:{ VKeyboard },
|
|
@@ -106,6 +111,20 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ addHalf(){
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ let remark = "收银机上,花材加半扎"
|
|
|
|
|
+ changeHalf({productId:that.customData.id,add:1,remark:remark}).then((res) => {
|
|
|
|
|
+ that.$msg('增加成功')
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ subHalf(){
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ let remark = "收银机上,花材减半扎"
|
|
|
|
|
+ changeHalf({productId:that.customData.id,add:0,remark:remark}).then((res) => {
|
|
|
|
|
+ that.$msg('减少成功')
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
clear(){
|
|
clear(){
|
|
|
if(Number(this.currentNum) <= 0) {
|
|
if(Number(this.currentNum) <= 0) {
|
|
|
this.$msg('请填写数量')
|
|
this.$msg('请填写数量')
|