Explorar o código

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

achao %!s(int64=2) %!d(string=hai) anos
pai
achega
b4974b0e16

+ 3 - 1
main.js

@@ -224,9 +224,11 @@ const doRequest = (method, url, data, header) => {
 				'content-type': contentheader //'application/x-www-form-urlencoded; charset=UTF-8',
 			},
 			success: function(result) {
+				// console.log(result,111111111111)
 				uni.hideLoading()
+					resolve(result)
 				// resolve调用后,即可传递到调用方使用then或者async+await同步方式进行处理逻辑
-				resolve(result)
+				
 			},
 			fail: function(e) {
 				uni.hideLoading()

+ 19 - 9
pageD/identity/companyIdentityThree.vue

@@ -394,6 +394,10 @@
 														content: '该手机号已认证过个人粮商,再次认证将覆盖之前的认证信息,是否确定认证?',
 														success: function(res) {
 															if (res.confirm) {
+																console.log(that
+																	.identityAuthenticationInfo,that
+																	.identityAuthenticationInfo
+																	.id)
 																if (that
 																	.identityAuthenticationInfo
 																	.id) {
@@ -404,18 +408,17 @@
 																			.identityAuthenticationInfo,
 																			'application/json;charset=UTF-8'
 																		).then(res => {
-																			console
-																				.log(
-																					"成功连接"
-																				)
+																			
+																			if(res.data.code=='22004'){
+																				that.$api.msg(res1.message)
+																				return
+																			}
+																			console.log("成功连接")
 																			if (!that
 																				.identityAuthenticationInfo
 																				.goodsName
 																			) {
-																				that.$api
-																					.msg(
-																						'修改成功!'
-																					)
+																				that.$api.msg('修改成功!')
 																				uni.navigateTo({
 																					url: `/pages/attestation/index`
 																				})
@@ -425,6 +428,7 @@
 
 																		})
 																		.catch(res => {
+																			console.log(res)
 																			if (res
 																				.errmsg
 																			) {
@@ -492,9 +496,15 @@
 																						2000
 																					);
 																				
+																			}else if (res.data&&res.data.message!=''&&res.data.message!=null){
+																				uni.showToast({
+																					title: res.data.message,
+																					icon: 'none',
+																					duration: 2000
+																				})
 																			}
 																		})
-																}
+																	}
 															}
 														}
 													});

+ 7 - 96
pages/task/audit/warehouse_warrant.vue

@@ -53,10 +53,6 @@
 				<view class="left">合计金额(元)</view>
 				<view class="right">{{auditInfo.requestFundsTotal}}</view>
 			</view>
-			<view class="row">
-				<view class="left">收购名头</view>
-				<view class="right">{{auditInfo.purchaser}}</view>
-			</view>
 			<!-- 	<view class="row">
 				<view class="left">仓库名称</view>
 				<view class="right">{{auditInfo.warehouseName}}</view>
@@ -164,11 +160,6 @@
 						<view v-if='item.auditMind' class="right-content">
 							{{item.auditMind}}
 						</view>
-						<view class="flex audit_img">
-							<view v-for="(items,indexs) in item.fileUrl" class="url_css">
-								<image :src="items" mode="" class="url_img" @click="auditFile(items)"></image>
-							</view>
-						</view>
 					</view>
 					<view v-if='item.commonStaffs1' class="right">
 						<u-icon @click='showcontent(item)' :name="item.showflow?'arrow-up':'arrow-down'"  size="28"></u-icon>
@@ -200,15 +191,9 @@
 					<view class="right-bottom">
 						{{auditMind.length}}/1000个字
 					</view>
-					<u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="250"
+					<u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
 						maxlength="1000" />
 				</view>
-				<view class="upload_css">
-					上传附件
-					<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="2"
-						:size-type="['compressed']" @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
-						@on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
-				</view>
 				<view @click='close()' class="cancel">取消</view>
 				<view @click='passSubmit()' class="confirm">确定</view>
 			</view>
@@ -223,14 +208,10 @@
 
 <script>
 	import helper from '@/common/helper.js';
-	import upload from '@/components/upload.vue';
 	import {
 		mapState
 	} from 'vuex';
 	export default {
-		components: {
-			upload
-		},
 		data() {
 			return {
 				src: '../../../static/img/myimg/LiangShang@2x.png',
@@ -253,12 +234,7 @@
 				id: "",
 				auditList: [],
 				url: "11",
-				url2:"",
-				// 上传附件、
-				action: this.$uploadUrl,
-				maxSize: 50 * 1024 * 1024, //限制文件大小 50M
-				isAdd: true,
-				fileUrl: []
+				url2:""
 			}
 		},
 		onBackPress(e) {
@@ -282,35 +258,6 @@
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
-			auditFile(src) {
-				uni.downloadFile({
-					url: src,
-					success: function(res) {
-						var filePath = res.tempFilePath;
-						uni.openDocument({
-							filePath: filePath,
-							showMenu: true,
-							success: function(res) {
-								console.log('打开文档成功');
-							}
-						});
-					}
-				});
-			},
-			getImgUrl(res) {
-				this.fileUrl.push(res)
-			},
-			onError(error) {
-				alert(error)
-				console.log('------------error-----------')
-				console.log(error)
-			},
-			onProgress(e) {
-				console.log(e)
-			},
-			onRemove(index) {
-				this.fileUrl.splice(index, 1)
-			},
 			detailed(data,status){
 				let obj
 				if(status==1){
@@ -421,7 +368,6 @@
 									var arr1=arr.filter((item)=>{return item.goodsName==datalist[i].goodsName})
 									if(arr1.length>0){
 										for (var q = 0; q < arr.length; q++) {
-											
 											if(arr[q].goodsName==datalist[i].goodsName){console.log(22222)
 												console.log(arr[q].inWarehouseWeight,datalist[i].inWarehouseWeight)
 												arr[q].inWarehouseWeight+=datalist[i].inWarehouseWeight
@@ -501,14 +447,7 @@
 											response.data.data[i].operatorName=response.data.data[i].workflowHistoricTasks[len].operatorName
 											var time=new Date(response.data.data[i].workflowHistoricTasks[len].claimTime).getTime()
 											response.data.data[i].updateDate=this.$u.timeFormat(time, 'mm.dd hh:MM')
-											// response.data.data[i].auditMind=response.data.data[i].workflowHistoricTasks[len].auditMind
-											// 显示附件和审核意见
-											if (response.data.data[i].workflowHistoricTasks[len].auditMind && response.data.data[i].workflowHistoricTasks[len].auditMind.indexOf("##") !=-1) {
-												response.data.data[i].auditMind = response.data.data[i].workflowHistoricTasks[len].auditMind.split("##")[0]
-												response.data.data[i].fileUrl = response.data.data[i].workflowHistoricTasks[len].auditMind.split("##")[1].split(",")
-											}else{
-												response.data.data[i].auditMind = response.data.data[i].workflowHistoricTasks[len].auditMind
-											}
+											response.data.data[i].auditMind=response.data.data[i].workflowHistoricTasks[len].auditMind
 										}else{
 											this.$set(response.data.data[i],'status','question')
 											// response.data.data[i].status='question'
@@ -560,12 +499,12 @@
 					}).then(response => {
 						// uni.hideLoading()
 						this.auditList = response.data.data
+
 					})
 				})
 			},
 			close() {
 				this.show = false
-				this.fileUrl = []//清除附件
 			},
 			pass() {
 				this.show = true
@@ -617,14 +556,10 @@
 									})
 									var count = 0
 									// for (let num = 0; num < that.List.length; num++) {
-										var info = that.auditMind
-										if (that.fileUrl.length > 0) {
-											info = that.auditMind + "##" + that.fileUrl.toString()
-										}
 									that.$api.doRequest('post', '/newWorkflow/api/handle', {
 										taskId: that.auditInfo.taskId,
 										approved: false,
-										auditMind: info?info:"",
+										auditMind: that.auditMind ? that.auditMind : "",
 										needReapply: true
 									}).then(res => {
 										// count++
@@ -656,14 +591,10 @@
 								})
 								// for (let num = 0; num < that.List.length; num++) {
 								// 	var tmp = 0
-								var info = that.auditMind
-								if (that.fileUrl.length > 0) {
-									info = that.auditMind + "##" + that.fileUrl.toString()
-								}
 								that.$api.doRequest('post', '/newWorkflow/api/handle', {
 									taskId: that.auditInfo.taskId,
 									approved: true,
-									auditMind: info?info:"",
+									auditMind: that.auditMind ? that.auditMind : "",
 									needReapply: false
 								}).then(res => {
 									// tmp++
@@ -915,23 +846,6 @@
 						.status.question {
 							color: #f9ae3d;
 						}
-					}	
-				}
-				.audit_img {
-					flex-wrap: wrap;
-					margin: 0 20rpx;
-				
-					.url_css {
-						border: 1px solid #999999;
-						border-radius: 10px;
-						margin-top: 10px;
-						margin-right: 10px;
-				
-						.url_img {
-							width: 80px;
-							height: 80px;
-							border-radius: 10px;
-						}
 					}
 				}
 			}
@@ -1049,7 +963,7 @@
 			margin: auto;
 			background: #fff;
 			width: calc(100% - 198rpx);
-			height: 840rpx;
+			height: 700rpx;
 			border-radius: 20rpx;
 
 			.alert-top {
@@ -1070,9 +984,6 @@
 				position: absolute;
 				right: 33rpx;
 			}
-			.upload_css {
-				margin-left: 20rpx;
-			}
 		}
 	}
 

+ 1 - 0
pages/user/user.vue

@@ -396,6 +396,7 @@
 			this.scrollTop = e.scrollTop;
 		},
 		onShow() {
+			
 			// uni.showLoading({
 			// 	title: '加载中',
 			// 	mask: true

+ 0 - 1
util/util.js

@@ -108,7 +108,6 @@ const utils = {
 				method: method, //'GET','POST'
 				dataType: 'json',
 				success: (res) => {
-					uni.hideLoading()
 					if (loadding && !hideLoading) {
 						uni.hideLoading()
 					}