Browse Source

修改运营端小程序页面bug

oyq28 2 years ago
parent
commit
35298e0fa6

+ 17 - 5
imcs-bt-fe/imcs-bt-fe/uni-mall/pages/material/cup.vue

@@ -15,8 +15,9 @@
 								:style="{ height: Math.round(item.mtrResidue) + '%', backgroundColor:'#ff0000'}" v-else>
 								<view class="progress-view"></view>
 							</view>
-							<text class="errMsg" v-if="item.exprStatus==='1'">即将到期</text>
-							<text class="errMsg" v-if="item.mtrResidue <= item.residueWarn">原料不足</text>
+							{{item.mtrResidue}} {{item.residueWarn}}
+							<text class="expMsg" v-if="item.exprCloseStatus==='1' && item.exprStatus==='0' ">即将到期</text>							
+							<text class="errMsg" v-if="parseInt(item.mtrResidue) <= parseInt(item.residueWarn)">原料不足</text>
 							<text class="tip">{{parseInt(item.mtrResidue) || '0'}}个</text>
 						</view>
 
@@ -475,11 +476,22 @@
 
 	.grid-item-box .errMsg {
 		position: absolute;
-		left: 30%;
-		top: 120rpx;
+		left: 28%;
+		top: 180rpx;
+		font-size: 36rpx;
+		width: 80rpx;
+		color: #f0ad4e;
+		z-index: 9999;
+		margin: 0 auto;
+	}
+	
+	.grid-item-box .expMsg {
+		position: absolute;
+		left: 28%;
+		top: 60rpx;
 		font-size: 36rpx;
 		width: 80rpx;
-		color: #ff0000;
+		color: #f0ad4e;
 		z-index: 9999;
 		margin: 0 auto;
 	}

+ 32 - 12
imcs-bt-fe/imcs-bt-fe/uni-mall/pages/material/material.vue

@@ -7,17 +7,17 @@
 						@click="inputDialogToggle(item)">
 						<text class="text">{{item.mtrName||'空'}}</text>
 						<view class="progressContainer">
-							<view class="progress" :style="{ height: Math.round(item.mtrResidue) + '%' }"
+							<view class="progress" :style="{ height: Math.round(item.mtrResidue/20) + '%' }"
 								v-if="item.exprStatus==='0'">
 								<view class="progress-view"></view>
 							</view>
 							<view class="progress"
-								:style="{ height: Math.round(item.mtrResidue) + '%', backgroundColor:'#ff0000'}" v-else>
+								:style="{ height: Math.round(item.mtrResidue/20) + '%', backgroundColor:'#ff0000'}" v-else>
 								<view class="progress-view"></view>
 							</view>
-							<text class="errMsg" v-if="item.exprStatus==='1'">即将到期</text>
-							<text class="errMsg" v-if="item.mtrResidue <= item.residueWarn">原料不足</text>
-							<text class="tip">{{item.mtrResidue || '0'}}ml</text>
+							<text class="expMsg" v-if="item.exprCloseStatus==='1' && item.exprStatus==='0' ">即将到期</text>
+							<text class="errMsg" v-if="parseInt(item.mtrResidue) <= parseInt(item.residueWarn)">原料不足</text>
+							<text class="tip">{{parseInt(item.mtrResidue) || '0'}}ml</text>
 						</view>
 
 						<view class="num">
@@ -96,7 +96,7 @@
 						</uni-col>
 						<uni-col :span="12">
 							<view class="uni-col light">{{material.mtrResidue || '0'}}ml
-								({{material.mtrResidue > material.residueWarn?'原料充足':'原料不足' }})</view>
+								({{parseInt(material.mtrResidue) > parseInt(material.residueWarn)?'原料充足':'原料不足' }})</view>
 						</uni-col>
 					</uni-row>
 					<uni-row class="uni-row">
@@ -143,7 +143,7 @@
 							<text style="line-height: 25px;height:25px;">{{form.mtName||'空'}}</text>
 						</uni-forms-item>
 						<uni-forms-item class="form-item" label="余量" name="surplus">
-							<uni-number-box :min="0" :max="100" v-model="form.surplus" :disabled="true">
+							<uni-number-box :min="0" :max="2000" v-model="form.surplus" :disabled="true">
 							</uni-number-box>
 						</uni-forms-item>
 						<uni-forms-item class="form-item" label="换料原料" name="replaceMaterial">
@@ -161,7 +161,7 @@
 							</picker>
 						</uni-forms-item>
 						<uni-forms-item class="form-item" label="换料规格" name="specs">
-							<uni-number-box :min="0" :max="100" v-model="form.specs"></uni-number-box>
+							<uni-number-box :min="0" :max="2000" v-model="form.specs"></uni-number-box>
 						</uni-forms-item>
 					</uni-forms>
 					<uni-row class="uni-row" style="margin-top: 200rpx">
@@ -385,7 +385,8 @@
 					'surplus': row.mtrResidue,
 					'date': row.exprTime,
 					'barrelCode': row.barrelCode,
-					'equId': row.equId
+					'equId': row.equId,
+					'replaceMaterial': row.mtrId
 				}
 				console.log(this.form)
 				this.$refs.editDialog.open()
@@ -400,6 +401,7 @@
 					});
 				}				
 				//console.log(this.form)
+				this.equMaterials.unshift({id:'', mtName: '请选择'});
 			},
 			editClose() {
 				this.editShow = false
@@ -446,6 +448,13 @@
 				let page = pages[pages.length - 1].$page.fullPath;
 				let equId = page.split('equId=')[1]
 				equId = equId? equId: ""
+				if(this.form.replaceMaterial==null || this.form.replaceMaterial==""){
+					return uni.showModal({
+						title: '提示',
+						content: '修正物料不能为空',
+						showCancel: false
+					});
+				}				
 				util.request(api.RecordAdd, this.form, "POST", "application/json").then(function(res) {
 					if (res.code === 0) {
 						uni.showToast({
@@ -515,11 +524,22 @@
 
 	.grid-item-box .errMsg {
 		position: absolute;
-		left: 30%;
-		top: 120rpx;
+		left: 28%;
+		top: 180rpx;
+		font-size: 36rpx;
+		width: 80rpx;
+		color: #f0ad4e;
+		z-index: 9999;
+		margin: 0 auto;
+	}
+	
+	.grid-item-box .expMsg {
+		position: absolute;
+		left: 28%;
+		top: 60rpx;
 		font-size: 36rpx;
 		width: 80rpx;
-		color: #ff0000;
+		color: #f0ad4e;
 		z-index: 9999;
 		margin: 0 auto;
 	}

+ 6 - 3
imcs-bt-fe/imcs-bt-fe/uni-mall/pages/ucenter/order/order.vue

@@ -1,11 +1,11 @@
 <template>
 	<view class="container">
 
-		<picker @change="bindPickerChange" v-model="index" :range="array">
+		<picker @change="bindPickerChange" v-model="index" :range="array" :range-key="'name'">
 			<view class="picker">
 				<view class="label">状态</view>
 				<view class="fb-type">
-					<view class="type-label">{{array[index]}}</view>
+					<view class="type-label">{{array[index].name}}</view>
 					<image class="type-icon"
 						src="/static/images/icon_select.png">
 					</image>
@@ -98,7 +98,10 @@
 				}],
 				orderCount: 2,
 				orderSum: 0.0,
-				array: ['全部', '开门', '关门'],
+				array: [{
+					id: '',
+					name: '全部'
+				},{id:1, name: '已支付'},{id:2, name:'生产中'},{id:3, name:'生产完成'}],
 				orderList: [
 					/*{
 					name: '美式咖啡',

+ 2 - 1
imcs-bt-fe/imcs-bt-fe/uni-mall/utils/util.js

@@ -448,7 +448,8 @@ const utils = {
 	},
 	loginH5: function(data){
 		data.interfaceUrl = "/"
-		return utils.request("anno/token", data, "post", "application/json");
+		//return utils.request("api/oauth/anno/token", data, "post", "application/json");
+	    return utils.request("anno/token", data, "post", "application/json");
 	},
 	randomNum: function(len, radix) {
 	  const chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('')