shish 1 год назад
Родитель
Сommit
4a4f4b43f4

+ 4 - 0
ghsPad/src/api/item/index.js

@@ -9,3 +9,7 @@ export const showList = async (data) => {
 export const checkRefresh = data => {
 	return https.get("/item/check-refresh", data);
 };
+
+export const changeHalf = data => {
+	return https.post('/item/change-half', data)
+}

+ 20 - 0
ghsPad/src/pages/home/components/selectNumPrice.vue

@@ -31,6 +31,11 @@
                 <image @tap="changeUnitType" class="change-unit" :src="`${constant.imgUrl}/icon/switch/switch128.png`"></image>
             </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 class="keyboard-body_box">
          <VKeyboard ref="keyboard" :pointIsShow="true" :digital="true" :disorderly="false" @typing="typing" @enter="enter" @cancel="cancel"> </VKeyboard>
@@ -39,6 +44,7 @@
 </template>
 <script>
 import VKeyboard from '@/components/vKeyboard/VKeyboard.vue'
+import { changeHalf } from "@/api/item"
 export default {
     name:'selectNumPrice',
     components:{ VKeyboard },
@@ -102,6 +108,20 @@ export default {
 		}
 	},
     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('减少成功')
+            })
+		},
         checkCurrent(n){
             this.checkType = n
             this.fillType = n

+ 4 - 0
hdPad/src/api/item/index.js

@@ -9,3 +9,7 @@ export const showList = async (data) => {
 export const checkRefresh = data => {
 	return https.get("/item/check-refresh", data);
 };
+
+export const changeHalf = data => {
+	return https.post('/item/change-half', data)
+}

+ 20 - 0
hdPad/src/pages/home/components/selectNum.vue

@@ -25,6 +25,11 @@
                 <image @tap="changeUnitType" class="change-unit" :src="`${constant.imgUrl}/icon/switch/switch128.png`"></image>
             </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 class="keyboard-body_box">
          <VKeyboard ref="keyboard" :pointIsShow="true" :digital="true" :disorderly="false" @typing="typing" @enter="enter" @cancel="cancel"> </VKeyboard>
@@ -33,6 +38,7 @@
 </template>
 <script>
 import VKeyboard from '@/components/vKeyboard/VKeyboard.vue'
+import { changeHalf } from "@/api/item"
 export default {
     name:'selectNum',
     components:{ VKeyboard },
@@ -78,6 +84,20 @@ export default {
 		}
 	},
     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('减少成功')
+            })
+		},
         checkCurrent(n){
             this.checkType = n
             this.fillType = n

+ 19 - 0
hdPad/src/pages/home/components/selectNumPrice.vue

@@ -34,6 +34,10 @@
             <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>
             </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 class="keyboard-body_box">
@@ -43,6 +47,7 @@
 </template>
 <script>
 import VKeyboard from '@/components/vKeyboard/VKeyboard.vue'
+import { changeHalf } from "@/api/item"
 export default {
     name:'selectNumPrice',
     components:{ VKeyboard },
@@ -106,6 +111,20 @@ export default {
 		}
 	},
     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(){
             if(Number(this.currentNum)  <= 0) {
                 this.$msg('请填写数量')