Przeglądaj źródła

装箱与取消装箱

shish 2 lat temu
rodzic
commit
82332fa8a2

+ 15 - 6
ghsApp/src/admin/book/custom.vue

@@ -23,11 +23,11 @@
 						<template v-if="!$util.isEmpty(bookCustomData)">
 							<view v-for="(item, index) in bookCustomData" :key="index" @click="goAction(item)">
 								<t-tr>
-									<t-td><view style="color:#333333;font-size:26upx;color:black;">{{item.name}}</view></t-td>
-									<t-td><view style="color:#333333;font-size:26upx;color:black;">{{item.bookNum?parseFloat(item.bookNum):0}}</view></t-td>
-									<t-td><view style="color:#333333;font-size:26upx;color:black;">{{item.onNum?parseFloat(item.onNum):0}}</view></t-td>
-									<t-td><view style="color:#333333;font-size:26upx;color:black;">{{item.roadNum?parseFloat(item.roadNum):0}}</view></t-td>
-									<t-td><view style="color:#333333;font-size:26upx;color:black;">{{item.needCgNum?parseFloat(item.needCgNum):0}}</view></t-td>
+									<t-td><view class="num" :class="[item.bookNum == item.onNum ? 'finish' : 'normal']">{{item.name}}</view></t-td>
+									<t-td><view class="num" :class="[item.bookNum == item.onNum ? 'finish' : 'normal']">{{item.bookNum?parseFloat(item.bookNum):0}}</view></t-td>
+									<t-td><view class="num" :class="[item.bookNum == item.onNum ? 'finish' : 'normal']">{{item.onNum?parseFloat(item.onNum):0}}</view></t-td>
+									<t-td><view class="num" :class="[item.bookNum == item.onNum ? 'finish' : 'normal']">{{item.roadNum?parseFloat(item.roadNum):0}}</view></t-td>
+									<t-td><view class="num" :class="[item.bookNum == item.onNum ? 'finish' : 'normal']">{{item.needCgNum?parseFloat(item.needCgNum):0}}</view></t-td>
 								</t-tr>
 							</view>
 						</template>
@@ -170,13 +170,22 @@ export default {
 	display: flex;
 	flex-direction:column;
 	.top-bar {
-
+		font-size:30upx;
 	}
 	.main-view {
 		flex: 1;
 		background-color: #f9fbfc;
 		.space-view {
 			background-color: #fff;
+			.num{
+				font-size:26upx;
+			}
+			.finish{
+				color:green;font-weight:bold;
+			}
+			.normal{
+				color:black;
+			}
 		}
 		.ex-info {
 			padding: 30upx;

+ 86 - 13
ghsApp/src/admin/book/itemCustom.vue

@@ -18,9 +18,16 @@
                             <t-th><view style="width:90upx;color:black;">客户</view></t-th>
                         </t-tr>
                         <template v-if="!$util.isEmpty(bookData)">
-                            <view v-for="(item, index) in bookData" :key="index" @click="goAction(item)">
+                            <view v-for="(item, index) in bookData" :key="index" @click="goAction(item)" style="position: relative;">
+								<text style="position: absolute;top:68upx;left:190upx;font-weight:bold;color:red;font-size:24upx;">小菊一箱凑数</text>
                                 <t-tr>
-                                    <t-td><view class="name" :class="[item.bookNum == item.onNum ? 'finish' : 'normal']">{{item.name}}</view></t-td>
+                                    <t-td>
+									<view class="name" :class="[item.bookNum == item.onNum ? 'finish' : 'normal']" style="width:170upx;position: relative;">
+										{{item.name}}
+										<image :src="`${constant.imgUrl}/ghs/book/box1.png`" style="width:35upx;height:35upx;display: inline-block;position: absolute;top:49upx;" 
+										mode="widthFix" v-if="item.box == 1"></image>
+									</view>
+									</t-td>
                                     <t-td><view class="num" :class="[item.bookNum == item.onNum ? 'finish' : 'normal']">{{item.bookNum?parseFloat(item.bookNum):0}}</view></t-td>
                                     <t-td><view class="num" :class="[item.bookNum == item.onNum ? 'finish' : 'normal']">{{item.onNum?parseFloat(item.onNum):0}}</view></t-td>
                                     <t-td><view class="num" :class="[item.bookNum == item.onNum ? 'finish' : 'normal']">{{item.roadNum?parseFloat(item.roadNum):0}}</view></t-td>
@@ -48,8 +55,8 @@
 					<input v-model="currentNum" type="number" @focus="currentNum=''" style="height:100upx;border:1upx solid #CCCCCC;text-align:center;font-size:38upx;width:420upx;" placeholder="数量" />
 				</view>
 				<view style="margin-top:6upx;">
-					<button class="admin-button-com big blue" style="margin-right:20upx;width:200upx;" @click="onNum()">上架</button>
-					<button class="admin-button-com big blue" style="width:200upx;" @click="outNum()">下架</button>
+					<button class="admin-button-com big blue" style="margin-right:20upx;width:200upx;" @click="addOnNum()">上架</button>
+					<button class="admin-button-com big blue" style="width:200upx;" @click="delOnNum()">下架</button>
 				</view>
 				<view style="margin-top:10upx;">
 					<button class="admin-button-com big blue" style="margin-right:15upx;width:200upx;" @click="toSj()">上齐</button>
@@ -91,7 +98,7 @@
 <script>
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import SelectList from "@/components/plugin/selectList";
-import { getBookItemCustomList } from "@/api/book"
+import { getBookItemCustomList,goOnFn,toBoxFn,goOffFn,cancelBoxFn } from "@/api/book"
 import { list } from "@/mixins";
 import ShopSelect from "@/components/module/shopSelect";
 import DateSelect from "@/components/module/dateSelect";
@@ -117,7 +124,8 @@ export default {
 			customName:'',
 			customId:0,
 			currentItem:null,
-			respond:{remainNum:0,remainName:''}
+			respond:{remainNum:0,remainName:''},
+			currentNum:''
 		};
 	},
 	onPullDownRefresh() {
@@ -162,20 +170,85 @@ export default {
 			this.currentItem = item
 			this.$refs.actRef.open('center')
 		},
-		onNum(){
-
+		addOnNum(){
+			if(Number(this.currentNum)<=0){
+				this.$msg('请填写数量')
+				return false
+			}
+			let that = this
+			this.$refs.actRef.close()
+			this.$util.confirmModal({content:'确认上架'+this.currentNum+'份'},() => {
+				goOnFn({id:this.currentItem.id,num:this.currentNum}).then(res=>{
+					if(res.code == 1){
+						that.$msg('操作成功')
+						setTimeout(() => {
+							that.getStatList()
+						}, 1000)
+						that.currentNum = ''
+					}
+				})
+			})
 		},
-		outNum(){
-
+		delOnNum(){
+			if(Number(this.currentNum)<=0){
+				this.$msg('请填写数量')
+				return false
+			}
+			let that = this
+			this.$refs.actRef.close()
+			this.$util.confirmModal({content:'确认下架'+this.currentNum+'份'},() => {
+				goOffFn({id:this.currentItem.id,num:this.currentNum}).then(res=>{
+					if(res.code == 1){
+						that.$msg('操作成功')
+						setTimeout(() => {
+							that.getStatList()
+						}, 1000)
+						that.currentNum = ''
+					}
+				})
+			})
 		},
 		toSj(){
-
+			let that = this
+			this.$refs.actRef.close()
+			this.$util.confirmModal({content:'确认上齐?'},() => {
+				goOnFn({id:this.currentItem.id,num:0}).then(res=>{
+					if(res.code == 1){
+						that.$msg('操作成功')
+						setTimeout(() => {
+							that.getStatList()
+						}, 1000)
+					}
+				})
+			})
 		},
 		toBox(){
-
+			let that = this
+			this.$refs.actRef.close()
+			this.$util.confirmModal({content:'确认已装箱?'},() => {
+				toBoxFn({id:this.currentItem.id}).then(res=>{
+					if(res.code == 1){
+						that.$msg('操作成功')
+						setTimeout(() => {
+							that.getStatList()
+						}, 1000)
+					}
+				})
+			})
 		},
 		cancelBox(){
-
+			let that = this
+			this.$refs.actRef.close()
+			this.$util.confirmModal({content:'确认取消装箱?'},() => {
+				cancelBoxFn({id:this.currentItem.id}).then(res=>{
+					if(res.code == 1){
+						that.$msg('操作成功')
+						setTimeout(() => {
+							that.getStatList()
+						}, 1000)
+					}
+				})
+			})
 		},
 		cancelAct(){
 			this.$refs.actRef.close()

+ 16 - 2
ghsApp/src/api/book/index.js

@@ -1,5 +1,21 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
+export const goOffFn = data => {
+	return https.get('/book-item-custom/go-off', data)
+}
+
+export const goOnFn = data => {
+	return https.get('/book-item-custom/go-on', data)
+}
+
+export const toBoxFn = data => {
+	return https.get('/book-item-custom/to-box', data)
+}
+
+export const cancelBoxFn = data => {
+	return https.get('/book-item-custom/cancel-box', data)
+}
+
 export const getCombineFn = data => {
 	return https.get('/book-io/get-combine', data)
 }
@@ -8,7 +24,6 @@ export const getIoList = data => {
 	return https.get('/book-io/get-io-list', data)
 }
 
-
 export const getGlobalBookChangeList = data => {
 	return https.get('/book-change-global/list', data)
 }
@@ -38,7 +53,6 @@ export const getCustomBookCgChangeList = data => {
 	return https.get('/book-custom-cg-change/list', data)
 }
 
-
 export const getBookChangeList = data => {
 	return https.get('/book-change/list', data)
 }

+ 1 - 1
ghsApp/src/pagesPurchase/info.vue

@@ -411,7 +411,7 @@ export default {
 			this.printNum = item.itemNum
 		},
 		changePrice(){
-			this.$util.pageTo({url: "/pagesPurchase/components/pageSuccess?orderSn="+this.detailInfo.orderSn+"&id="+this.detailInfo.id+"&status="+this.detailInfo.status})
+			this.$util.pageTo({url: "/pagesPurchase/components/pageSuccess?orderSn="+this.detailInfo.orderSn+"&id="+this.detailInfo.id+"&status="+this.detailInfo.status,type:2})
 		},
 		cancelIn(){
 			let that = this