shish 3 лет назад
Родитель
Сommit
09ae36798c
2 измененных файлов с 38 добавлено и 38 удалено
  1. 0 38
      hdPad/src/pages/home/components/console.vue
  2. 38 0
      hdPad/src/pages/home/make.vue

+ 0 - 38
hdPad/src/pages/home/components/console.vue

@@ -9,7 +9,6 @@
 	 <view class="active" 
  style="position:fixed;left:36upx;bottom:13upx;width:84upx;height:50upx;line-height:30upx;font-size:13upx;" 
  @click="gatheringFn()">收款</view>
-	<view class="active" @click="breakFn">拆散</view>
     <view class="active" @click="toWastage">报损</view>
 	<view class="active" @click="selectCustom()">选客</view>
     <view class="active" @click="clearItemFn">清空</view>
@@ -27,10 +26,6 @@
         <uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认退出?" @confirm="confirmLogout"></uni-popup-dialog>
     </uni-popup>
 
-    <uni-popup ref="breakRef" type="dialog">
-        <uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认拆散?" @confirm="confirmBreak"></uni-popup-dialog>
-    </uni-popup>
-
     <uni-popup ref="wastageRef" type="dialog">
         <uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认报损?" @confirm="confirmWastage"></uni-popup-dialog>
     </uni-popup>
@@ -62,7 +57,6 @@
 import settlePop from './settlePop'
 import toPayWay from './toPay'
 import { wastageCreateOrder } from '@/api/home/index'
-import { partItem } from '@/api/part'
 import { createOrder} from '@/api/order'
 import {goodsWastage} from '@/api/wastage'
 import productMins from "@/mixins/product"
@@ -267,38 +261,6 @@ export default {
 		selectPayWayBack(price){
 			this.$util.hitVoice()
 		},
-		breakFn(){
-			this.$util.hitVoice()
-			if(this.$util.isEmpty(this.selectList)) {
-				this.$msg('请选择报损花材')
-				return false
-			}
-			this.$refs.breakRef.open('center')
-		},
-		confirmBreak(){
-			this.$util.hitVoice()
-			if(this.$util.isEmpty(this.selectList)) {
-				this.$msg('请选择要拆的花材')
-				return false
-			}
-			let hasGoods = this.selectList.some((item) => {
-			  return item.property  == 0
-			})
-			if(hasGoods){
-				this.$msg('商品不能拆散')
-				return false
-			}
-			let product = this.selectList.map(i=>({ 
-				productId:i.id, unitType: i.unitType||0, num: i.currentNum, property: i.property, unitPrice: i.unitPrice,
-			}))
-			partItem({ product: JSON.stringify(product) }).then(res=>{
-				if(res.code == 1){
-					this.removeFromSaveDirect()
-					this.$refs.breakRef.close()
-					this.$msg("拆散成功")
-				}
-			})
-		},
 		toWastage(){
 			this.$util.hitVoice()
 			if(this.$util.isEmpty(this.selectList)) {

+ 38 - 0
hdPad/src/pages/home/make.vue

@@ -17,6 +17,7 @@
 				<view class="button-area">
 					<view class="active" style="background-color:orange;color:white;border-color:orange;position:fixed;left:135upx;bottom:13upx;width:84upx;height:50upx;line-height:30upx;font-size:16upx;" 
 					@click="commit()">提交</view>
+					<view class="active" @click="breakFn">拆散</view>
 					<view class="active" @click="clearItemFn">清空</view>
 				</view>
             </view>
@@ -31,6 +32,10 @@
 				<uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认清空?" @confirm="confirmClearItem"></uni-popup-dialog>
 			</uni-popup>
 
+			<uni-popup ref="breakRef" type="dialog">
+				<uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认拆散?" @confirm="confirmBreak"></uni-popup-dialog>
+			</uni-popup>
+
         </view>
     </view>
 </template>
@@ -41,6 +46,7 @@ import leftItem from './components/leftArea.vue'
 import casherNav from './components/nav.vue'
 import productMins from "@/mixins/product"
 import createWork from './components/createWork.vue'
+import { partItem } from '@/api/part'
 export default {
 	name: "make",
 	components: { rightItem,leftItem, casherNav,createWork},
@@ -97,6 +103,38 @@ export default {
 		}
 	},
 	methods: {
+		breakFn(){
+			this.$util.hitVoice()
+			if(this.$util.isEmpty(this.selectList)) {
+				this.$msg('请选择报损花材')
+				return false
+			}
+			this.$refs.breakRef.open('center')
+		},
+		confirmBreak(){
+			this.$util.hitVoice()
+			if(this.$util.isEmpty(this.selectList)) {
+				this.$msg('请选择要拆的花材')
+				return false
+			}
+			let hasGoods = this.selectList.some((item) => {
+			  return item.property  == 0
+			})
+			if(hasGoods){
+				this.$msg('商品不能拆散')
+				return false
+			}
+			let product = this.selectList.map(i=>({ 
+				productId:i.id, unitType: i.unitType||0, num: i.currentNum, property: i.property, unitPrice: i.unitPrice,
+			}))
+			partItem({ product: JSON.stringify(product) }).then(res=>{
+				if(res.code == 1){
+					this.removeFromSaveDirect()
+					this.$refs.breakRef.close()
+					this.$msg("拆散成功")
+				}
+			})
+		},
 		cancelCreate(){
 			this.$refs.createWorkRef.close()
 		},