shish 2 лет назад
Родитель
Сommit
480665db53

+ 36 - 20
ghsApp/src/pagesPurchase/details.vue

@@ -47,11 +47,8 @@
 
 					<tui-list-cell class="line-cell" :arrow="true">
 						<div class="tui-title">采购人</div>
-						<picker mode="selector" :value="form.cgStaffId" :range="staffList" range-key="name" @change="cgManChange" class="tui-input" >
-						<input v-model="form.cgStaffId" name="cgStaffId" type="text" hidden />
-						<div style="padding:6upx 0 6upx 0;color:#ccc;" v-if="form.cgStaffName==''">请选择</div>
-						<div style="padding:6upx 0 6upx 0;" v-else>{{form.cgStaffName}}</div>
-						</picker>
+						<view @click="changeCgStaff()" style="width:240upx;">{{ form.cgStaffName==''?'请选择':form.cgStaffName }}</view>
+						<button @click="getMySelf()" class="admin-button-com middle blue" style="margin-left:20upx;">我自己</button>
 					</tui-list-cell>
 
 					<tui-list-cell class="line-cell" :hover="false" :arrow="true">
@@ -189,9 +186,22 @@ class="admin-button-com middle" :class="form.needPrint == 2? 'blue' : 'default'"
 				</text>
 			</view>
 			<button v-if="location == 0" class="admin-button-com blue big" @click="formSubmit(0)">下一步</button>
-			<button v-else class="admin-button-com blue big" @click="formSubmit(1)">提交入库</button>
+			<button v-else class="admin-button-com blue big" @click="formSubmit(1)">确认提交</button>
 		</view>
 	</view>
+
+	<uni-popup ref="staffRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
+			<view style="max-height:90vh;overflow: scroll;">
+				<view style="margin-left:30upx;margin-top:19upx;font-size:27upx;font-weight:bold;">请选择:</view>
+				<view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
+					<view v-for="(item, index) in staffList" :key="index" @tap.stop="getCgStaff(item)" style="margin-bottom:20upx;margin-left:3upx;">
+						<view style="margin-top:8upx;overflow: hidden;white-space: nowrap;width:120upx;text-align:center;font-weight:bold;font-size:30upx;">{{item.name}}</view>
+					</view>
+				</view>
+				<view style="text-align:center;padding:10upx 0 10upx 0;"><button class="admin-button-com big blue" @click="closeCgStaff()">关闭</button></view>
+			</view>
+    </uni-popup>
+
 </view>
 </template>
 
@@ -282,6 +292,7 @@ export default {
 				that.cgUnitType = res.data.shopInfo && res.data.shopInfo.cgUnitType ? res.data.shopInfo.cgUnitType : 0
 			}
 		})
+
 	},
 	onShow(){
 		if(!this.$util.isEmpty(uni.getStorageSync("newGhs"))){
@@ -366,6 +377,23 @@ export default {
 		}
 	},
 	methods: {
+		getCgStaff(staff){
+			this.$refs.staffRef.close()
+			this.form.cgStaffName = staff.name
+			this.form.cgStaffId = staff.id
+		},
+		closeCgStaff(){
+			this.$refs.staffRef.close()
+    	},
+		changeCgStaff(){
+			this.$refs.staffRef.open('center')
+		},
+		getMySelf(){
+			let staffId = this.getLoginInfo && this.getLoginInfo.staff.id ? this.getLoginInfo.staff.id : 0
+			let staffName = this.getLoginInfo && this.getLoginInfo.staff.name ? this.getLoginInfo.staff.name:''
+			this.form.cgStaffName = staffName
+			this.form.cgStaffId = staffId
+		},
 		bindEntryTimeChange(e){
 			let date = e.detail.value
 			this.form.entryTime = date
@@ -373,15 +401,6 @@ export default {
 		isCostChange(e){
 			this.form.isCost = e.detail.value
 		},
-		cgManChange(e){
-			let index = e.detail.value
-			if(!this.$util.isEmpty(this.staffList)){
-				if(this.staffList[index]){
-					this.form.cgStaffName = this.staffList[index].name
-					this.form.cgStaffId = this.staffList[index].id
-				}
-			}
-		},
 		changeYfPayWay(index){
 			this.form.yfPayWay = index
 			this.inputFn()
@@ -467,10 +486,7 @@ export default {
 		},
 		formSubmitFun(inType){
 			let that = this;
-			let title = '确认入库?'
-			if(inType == 0){
-				title = '确认提交?'
-			}
+			let title = '确认提交?'
 			that.$util.confirmModal({content:title},() => {
 				that.confirmFn(inType);
 			})
@@ -507,7 +523,7 @@ export default {
 					if(that.location == 0){
 						that.$util.pageTo({url: "/pagesPurchase/components/pageSuccess?orderSn="+res.data.orderSn+"&id="+res.data.id+"&status="+res.data.status,type:2})
 					}else{
-						that.$msg('入库成功')
+						that.$msg('提交成功')
 						setTimeout(function(){
 							that.$util.pageTo({url: "/pagesPurchase/info?orderSn="+res.data.orderSn+'&refresh=1',type:2})
 						},900)

+ 4 - 3
ghsApp/src/pagesPurchase/info.vue

@@ -47,7 +47,7 @@
 				</view>
 				<view class="order-info_box">
 					<view>入库状态:</view>
-					<view>{{ detailInfo.status==1?'待确认' :detailInfo.status==2?'待发货' :detailInfo.status==3?'待收货' :detailInfo.status==4?'已入库' :'已取消' }}</view>
+					<view>{{ detailInfo.status==1?'待确认' :detailInfo.status==2?'待发货' :detailInfo.status==3?'待入库' :detailInfo.status==4?'已入库' :'已取消' }}</view>
 				</view>
 
 				<view v-if="detailInfo.refund == 2" class="order-info_box">
@@ -366,6 +366,7 @@ export default {
 	},	
 	methods: {
 		printBillFn(info){
+			let that = this
 			if(this.wcPrintNum > 1){
 				let arr = ['请选择','机器1']
 				if(this.wcPrintNum == 2){
@@ -383,14 +384,14 @@ export default {
 						let order = res.tapIndex
 						printBill({id:info.id,order:order}).then((res) => {
 							info.printNum++
-							this.$msg('打印成功')
+							that.$msg('打印成功')
 						})
 					}
 				})
 			}else{
 				printBill({id:info.id}).then((res) => {
 					info.printNum++
-					this.$msg('打印成功')
+					that.$msg('打印成功')
 				})
 			}
 		},

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

@@ -25,7 +25,7 @@
 						<text style="margin-left:10upx;">{{res.bigUnit}}</text>
 						<text style="color:green;margin-left:20upx;">可退{{Number(res.itemNum)-Number(res.refundNum)}}{{res.bigUnit}}</text>
 					</view>
-					<view v-if="orderInfo.inBooking && orderInfo.inBooking == 1" style="border:1upx solid #CCCCCC;font-size:25upx;margin:8upx 0 5upx 0;padding:5upx 0 5upx 0;">
+					<view v-if="orderInfo.inBooking && orderInfo.inBooking == 1" style="border:1upx solid #6795da;font-size:25upx;margin:8upx 0 5upx 0;padding:5upx 0 5upx 0;">
 						<view v-for="(send,sendIndex) in res.sendList" style="padding:5upx 5upx 5upx 8upx;" :key="sendIndex">
 							<view>{{ send.customName }}({{ send.seatSn }}) 上架数 {{ send.num }}{{res.bigUnit}}</view>
 							<view style="border-bottom:1upx solid #77a977;padding-bottom:6upx;padding-top:4upx;display: flex;align-items: center;margin-top:3upx;">