Sfoglia il codice sorgente

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-app

gjy 3 anni fa
parent
commit
02ca96835a

+ 29 - 30
pages/task/audit/purchase_settlement_approval.vue

@@ -20,15 +20,15 @@
 		<view class="content">
 			<view class="content-item">
 				<view class="top">
-				<view>{{contractNo}} ({{goodsName}})</view>
-				<view>{{unitPrice}}元/吨</view>
-			    </view>
-			<view class="top1">
-				<view>客户</view>
-				<view style="font-size: 30rpx;">{{customerName}}</view>
-			</view>
+					<view>{{contractNo}} ({{goodsName}})</view>
+					<view>{{unitPrice}}元/吨</view>
+				</view>
+				<view class="top1">
+					<view>客户</view>
+					<view style="font-size: 30rpx;">{{customerName}}</view>
+				</view>
 			</view>
-			
+
 			<view class="content-item">
 				<view class="car-container" v-for="(item,index) in list">
 					<view class="car-num title">{{item.carNo}}</view>
@@ -101,15 +101,15 @@
 				border: false,
 				unitPrice: "",
 				goodsName: "",
-				customerName:""//客户
+				customerName: "" //客户
 			}
 		},
 		onBackPress(e) {
-			if(this.everyCheck){
-			uni.navigateTo({
-				url: "/pages/task/my_task"
-			})
-			return true;
+			if (this.everyCheck) {
+				uni.navigateTo({
+					url: "/pages/task/my_task"
+				})
+				return true;
 			}
 		},
 		onLoad(options) {
@@ -126,7 +126,7 @@
 					this.contractNo = res.data.data.contractNo
 					this.unitPrice = res.data.data.price
 					this.goodsName = res.data.data.goodsName
-					this.customerName = res.data.data.customer//客户
+					this.customerName = res.data.data.customer //客户
 					if (res.data.code == 200) {
 						this.$api.doRequest('get', '/stockPurchaseReceiptReport/selectPurchaseOrder', {
 							compId: "2710b21efc1e4393930c5dc800010dc4",
@@ -181,21 +181,18 @@
 				if (this.title == '驳回原因(驳回)') {
 					this.rejectSubmit()
 				} else {
-					if (!this.rejectInfo1) {
-						this.$api.msg('审核意见不能为空!')
-					} else {
-						that.show2 = false
-						uni.showModal({
-							content: "是否确定通过?",
-							showCancel: true,
-							confirmText: '确定',
-							success: function(res) {
-								if (res.confirm) {
-									that.audit(that.list[0], 0, true, 2)
-								}
+					that.show2 = false
+					uni.showModal({
+						content: "是否确定通过?",
+						showCancel: true,
+						confirmText: '确定',
+						success: function(res) {
+							if (res.confirm) {
+								that.audit(that.list[0], 0, true, 2)
 							}
-						})
-					}
+						}
+					})
+
 				}
 			},
 			//审核方法
@@ -246,6 +243,7 @@
 			margin-top: 10rpx;
 			margin-bottom: 30rpx;
 		}
+
 		.top1 {
 			display: flex;
 			justify-content: space-between;
@@ -424,6 +422,7 @@
 		right: 0;
 		color: #22C572;
 	}
+
 	.u-textarea-style {
 		margin: 20rpx;
 		background: #F9F9FA;
@@ -431,7 +430,7 @@
 		border: 1px solid #EEEEEE;
 		padding: 10rpx 20rpx;
 		position: relative;
-	
+
 		.right-bottom {
 			position: absolute;
 			right: 20rpx;

+ 51 - 52
pages/task/audit/warehouse_approval.vue

@@ -86,7 +86,7 @@
 					<u-input class="" v-model='rejectInfo' placeholder="请在此输入审核意见" type="textarea" height="414"
 						maxlength="100" />
 				</view>
-			<!-- 	<u-button @click="show1 = false"  class="cancel">取消</u-button>
+				<!-- 	<u-button @click="show1 = false"  class="cancel">取消</u-button>
 				<u-button @click="reject()" class="confirm">确定</u-button> -->
 				<view @click='show1 = false' class="cancel">取消</view>
 				<view @click='reject()' class="confirm">确定</view>
@@ -151,11 +151,11 @@
 			...mapState(['hasLogin', 'userInfo'])
 		},
 		onBackPress(e) {
-			if(this.everyCheck){
-			uni.navigateTo({
-				url: "/pages/task/my_task"
-			})
-			return true;
+			if (this.everyCheck) {
+				uni.navigateTo({
+					url: "/pages/task/my_task"
+				})
+				return true;
 			}
 		},
 		onLoad(options) {
@@ -170,7 +170,7 @@
 			})
 		},
 		methods: {
-			close(){
+			close() {
 				this.show1 = false
 				this.show2 = false
 			},
@@ -188,51 +188,48 @@
 				this.list.contractNo = item[0].value
 			},
 			audit() {
-				if (!this.rejectInfo1) {
-					this.$api.msg('审核意见不能为空!')
-				} else {
-					var that = this
-					that.show2 = false
-					uni.showModal({
-						content: "是否确定通过审核?",
-						showCancel: true,
-						confirmText: '确定',
-						success: function(res) {
-							if (res.confirm) {
-								uni.showLoading({
-									title: "审核中"
+				var that = this
+				that.show2 = false
+				uni.showModal({
+					content: "是否确定通过审核?",
+					showCancel: true,
+					confirmText: '确定',
+					success: function(res) {
+						if (res.confirm) {
+							uni.showLoading({
+								title: "审核中"
+							})
+							that.$api.doRequest('post', '/purchasePrice/purchasePriceEdit', that.list)
+								.then(res => {
+									if (res.data.code == 200) {
+										that.$api.doRequest('post', '/workflow/api/handle', {
+											approved: true,
+											auditMind: that.rejectInfo1,
+											needReapply: true,
+											taskId: that.list.taskId,
+										}).then(res1 => {
+											if (res1.data.code == 200) {
+												that.$api.msg('审核成功');
+												setTimeout(function() {
+													if (this.everyCheck) {
+														helper.setAudit(that.list)
+													} else {
+														uni.navigateBack()
+													}
+													uni.hideLoading()
+												}, 1000);
+											} else {
+												that.$api.msg(res1.data.message);
+											}
+										})
+									} else {
+										that.$api.msg('系统异常,请联系管理员');
+									}
 								})
-								that.$api.doRequest('post', '/purchasePrice/purchasePriceEdit', that.list)
-									.then(res => {
-										if (res.data.code == 200) {
-											that.$api.doRequest('post', '/workflow/api/handle', {
-												approved: true,
-												auditMind: that.rejectInfo1,
-												needReapply: true,
-												taskId: that.list.taskId,
-											}).then(res1 => {
-												if (res1.data.code == 200) {
-													that.$api.msg('审核成功');
-													setTimeout(function() {
-														if (this.everyCheck) {
-															helper.setAudit(that.list)
-														} else {
-															uni.navigateBack()
-														}
-														uni.hideLoading()
-													}, 1000);
-												} else {
-													that.$api.msg(res1.data.message);
-												}
-											})
-										} else {
-											that.$api.msg('系统异常,请联系管理员');
-										}
-									})
-							}
 						}
-					})
-				}
+					}
+				})
+
 			},
 			reject() {
 				if (!this.rejectInfo) {
@@ -456,9 +453,11 @@
 			color: #AFB3BF;
 		}
 	}
+
 	/deep/.u-input__textarea {
 		height: 300rpx !important;
 	}
+
 	.cancel,
 	.confirm {
 		position: absolute;
@@ -470,13 +469,13 @@
 		border-top: 1px solid #eee;
 		font-size: 34rpx;
 	}
-	
+
 	.cancel {
 		left: 0;
 		border-right: 1px solid #eee;
 		color: #AFB3BF;
 	}
-	
+
 	.confirm {
 		right: 0;
 		color: #22C572;