zhongtianhaoyuan 1 rok pred
rodič
commit
25fce0eb54

+ 183 - 128
pages/task/audit/warehouse_warrant.vue

@@ -37,8 +37,10 @@
 				<view class="right" style='width:33.3333%;text-align:center;'>金额(元)</view>
 			</view>
 			<view class="row" v-for='item in auditInfo.goodNameList'>
-				<view class="left" style='width:33.3333%;text-align:center;border-right:1px solid #ccc;'>{{item.goodsName}}</view>
-				<view class="right" style='width:33.3333%;text-align:center;border-right:1px solid #ccc;'>{{item.inWarehouseWeight}}</view>
+				<view class="left" style='width:33.3333%;text-align:center;border-right:1px solid #ccc;'>
+					{{item.goodsName}}</view>
+				<view class="right" style='width:33.3333%;text-align:center;border-right:1px solid #ccc;'>
+					{{item.inWarehouseWeight}}</view>
 				<view class="right" style='width:33.3333%;text-align:center;'>{{item.requestFunds}}</view>
 			</view>
 			<view class="row">
@@ -66,6 +68,14 @@
 				<view class="right">{{auditInfo.count}}</view>
 			</view> -->
 		</view>
+		<view class="content1" v-if="auditInfo.warehousingOrderList[0].remark">
+			<view class="title ">
+				备注信息
+			</view>
+			<view style="margin-top: 20rpx;">
+				{{auditInfo.warehousingOrderList[0].remark}}
+			</view>
+		</view>
 
 		<view class="content1">
 			<view class="title ">
@@ -129,14 +139,14 @@
 				<view class="row" v-if='item.desc!="_PLACEHOLDER_"'>
 					<view class="left">
 						<view class="item1">
-							<view class="item-content">{{item.operatorTitle}}</view> 
+							<view class="item-content">{{item.operatorTitle}}</view>
 							<view v-if="item.status=='success'" class='status success'>
 								<u-icon name="checkmark" color="#2979ff" size="24"></u-icon>
 							</view>
 							<view v-if="item.status=='error'" class='status error'>
 								<u-icon name="close" color="rgb(245, 108, 108)" size="24"></u-icon>
 							</view>
-							<view  v-if="item.status=='question'" class='status question'>
+							<view v-if="item.status=='question'" class='status question'>
 								<u-icon name="question" color="#f9ae3d" size="24"></u-icon>
 							</view>
 						</view>
@@ -147,14 +157,22 @@
 								<view class="name">{{item.desc}}
 								</view>
 								<!-- <view class='time'>{{item.updateDate}}</view> -->
-								<view  v-if="item.status=='success'" class="status success">{{item.commonStaffs1?item.staffscontent:item.operatorName}}<text v-if='!item.commonStaffs1&&index!=0'>已审核</text></view>
-								<view  v-if="item.status=='error'" class="status error">{{item.commonStaffs1?item.staffscontent:item.operatorName}}<text v-if='!item.commonStaffs1'>{{item.workflowHistoricTasks ? "已驳回":''}}</text></view>
-								<view  v-if="item.status=='question'" class="status question">{{item.commonStaffs1?item.staffscontent:''}}<text v-if='!item.commonStaffs1'>未审核</text></view>
+								<view v-if="item.status=='success'" class="status success">
+									{{item.commonStaffs1?item.staffscontent:item.operatorName}}<text
+										v-if='!item.commonStaffs1&&index!=0'>已审核</text></view>
+								<view v-if="item.status=='error'" class="status error">
+									{{item.commonStaffs1?item.staffscontent:item.operatorName}}<text
+										v-if='!item.commonStaffs1'>{{item.workflowHistoricTasks ? "已驳回":''}}</text>
+								</view>
+								<view v-if="item.status=='question'" class="status question">
+									{{item.commonStaffs1?item.staffscontent:''}}<text
+										v-if='!item.commonStaffs1'>未审核</text></view>
 								<!-- <view  class="status success">吕波(已审核)</view> -->
-								
+
 							</view>
-							<view v-if='index==0||item.workflowHistoricTasks&&item.workflowHistoricTasks.length>0' class='time'>
-							{{item.updateDate}}
+							<view v-if='index==0||item.workflowHistoricTasks&&item.workflowHistoricTasks.length>0'
+								class='time'>
+								{{item.updateDate}}
 							</view>
 						</view>
 						<view v-if='item.auditMind' class="right-content">
@@ -162,7 +180,8 @@
 						</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>
+						<u-icon @click='showcontent(item)' :name="item.showflow?'arrow-up':'arrow-down'" size="28">
+						</u-icon>
 					</view>
 				</view>
 				<view v-if='item.showflow' style='padding:10px 0 0 50px;'>
@@ -171,8 +190,8 @@
 							<view class="item-content">
 								<u-icon v-if='item1.status' name="checkmark" color="#fff" size="14"></u-icon>
 								<u-icon v-if='!item1.status' name="question" color="#f9ae3d" size="14"></u-icon>
-							</view> 
-							<view class="name">{{item1.staffName}}</view> 
+							</view>
+							<view class="name">{{item1.staffName}}</view>
 						</view>
 					</view>
 				</view>
@@ -234,7 +253,7 @@
 				id: "",
 				auditList: [],
 				url: "11",
-				url2:""
+				url2: ""
 			}
 		},
 		onBackPress(e) {
@@ -258,19 +277,19 @@
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
-			detailed(data,status){
+			detailed(data, status) {
 				let obj
-				if(status==1){
-					 obj= JSON.stringify(this.auditInfo.warehousingOrderList)
-				}else{
+				if (status == 1) {
+					obj = JSON.stringify(this.auditInfo.warehousingOrderList)
+				} else {
 					obj = JSON.stringify([data])
 				}
-					uni.navigateTo({
-						url: '/pages/task/audit/viewDetail?data='+obj
-					});
+				uni.navigateTo({
+					url: '/pages/task/audit/viewDetail?data=' + obj
+				});
 			},
-			showcontent(item){
-				item.showflow=!item.showflow
+			showcontent(item) {
+				item.showflow = !item.showflow
 			},
 			openXls() {
 				if (this.url && this.url != "ng") {
@@ -311,7 +330,7 @@
 					title: "加载中...",
 					mask: true
 				})
-				var that =this
+				var that = this
 				// this.$api.doRequest('get', '/warehousingOrder/selectInfo', {
 				// 	currentPage: 1,
 				// 	pageSize: 100,
@@ -358,39 +377,44 @@
 				}).then(res1 => {
 					if (res1.data.code == 200) {
 						this.auditInfo = res1.data.data
-						var arr=[]
-						if(res1.data.data.warehousingOrderList){
-							var datalist=JSON.parse(JSON.stringify(res1.data.data.warehousingOrderList))
+						var arr = []
+						if (res1.data.data.warehousingOrderList) {
+							var datalist = JSON.parse(JSON.stringify(res1.data.data.warehousingOrderList))
 							for (var i = 0; i < datalist.length; i++) {
-								if(arr.length==0){
+								if (arr.length == 0) {
 									arr.push(datalist[i])
-								}else{
-									var arr1=arr.filter((item)=>{return item.goodsName==datalist[i].goodsName})
-									if(arr1.length>0){
+								} else {
+									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
-												arr[q].requestFunds+=datalist[i].requestFunds
+											if (arr[q].goodsName == datalist[i].goodsName) {
+												console.log(22222)
+												console.log(arr[q].inWarehouseWeight, datalist[i]
+													.inWarehouseWeight)
+												arr[q].inWarehouseWeight += datalist[i].inWarehouseWeight
+												arr[q].requestFunds += datalist[i].requestFunds
 											}
 										}
-									}else{
+									} else {
 										arr.push(datalist[i])
 									}
 								}
-								
+
 							}
 							for (var q = 0; q < arr.length; q++) {
-								arr[q].inWarehouseWeight=arr[q].inWarehouseWeight.toFixed(2)
-								arr[q].requestFunds=arr[q].requestFunds.toFixed(2)
+								arr[q].inWarehouseWeight = arr[q].inWarehouseWeight.toFixed(2)
+								arr[q].requestFunds = arr[q].requestFunds.toFixed(2)
 							}
 						}
-						console.log(arr,1111111)
-						this.auditInfo.goodNameList=arr
-						if(this.auditInfo.inWarehouseWeightTotal){
-							this.auditInfo.inWarehouseWeightTotal = this.auditInfo.inWarehouseWeightTotal.toFixed(2)
+						console.log(arr, 1111111)
+						this.auditInfo.goodNameList = arr
+						if (this.auditInfo.inWarehouseWeightTotal) {
+							this.auditInfo.inWarehouseWeightTotal = this.auditInfo.inWarehouseWeightTotal.toFixed(
+								2)
 						}
-						if(this.auditInfo.requestFundsTotal){
+						if (this.auditInfo.requestFundsTotal) {
 							this.auditInfo.requestFundsTotal = this.auditInfo.requestFundsTotal.toFixed(2)
 						}
 						this.auditInfo.amountIngPayableTotal1 = helper.convertCurrency(this.auditInfo
@@ -402,90 +426,121 @@
 							this.$api.doRequest('get', '/commonUser/getHis', {
 								workflowId: res1.data.data[0].id,
 								businessKey: this.id,
-								branch:that.auditInfo.jointVentureParties?that.auditInfo.jointVentureParties:'zt'
+								branch: that.auditInfo.jointVentureParties ? that.auditInfo
+									.jointVentureParties : 'zt'
 							}).then(response => {
 								uni.hideLoading()
 								for (let i = 0; i < response.data.data.length; i++) {
-									this.$set(response.data.data[i],'status','question')
-									console.log(response.data.data[i].workflowHistoricTasks,i)
-									if(response.data.data[i].commonStaffs){
-										response.data.data[i].showflow=false
-										response.data.data[i].operatorTitle=response.data.data[i].desc.substring(0,2)
-										response.data.data[i].operatorName=response.data.data[i].desc
-										response.data.data[i].staffscontent='共'+response.data.data[i].commonStaffs.length+'人,当前审核'+response.data.data[i].workflowHistoricTasks.length+'人'
-										if(response.data.data[i].workflowHistoricTasks&&response.data.data[i].workflowHistoricTasks.length>0){
-											if(response.data.data[i].workflowHistoricTasks.length!=response.data.data[i].commonStaffs.length){
+									this.$set(response.data.data[i], 'status', 'question')
+									console.log(response.data.data[i].workflowHistoricTasks, i)
+									if (response.data.data[i].commonStaffs) {
+										response.data.data[i].showflow = false
+										response.data.data[i].operatorTitle = response.data.data[i]
+											.desc.substring(0, 2)
+										response.data.data[i].operatorName = response.data.data[i]
+											.desc
+										response.data.data[i].staffscontent = '共' + response.data
+											.data[i].commonStaffs.length + '人,当前审核' + response.data
+											.data[i].workflowHistoricTasks.length + '人'
+										if (response.data.data[i].workflowHistoricTasks && response
+											.data.data[i].workflowHistoricTasks.length > 0) {
+											if (response.data.data[i].workflowHistoricTasks
+												.length != response.data.data[i].commonStaffs
+												.length) {
 												// response.data.data[i].status='question'
-												this.$set(response.data.data[i],'status','question')
-											}else{
-												this.$set(response.data.data[i],'status','success')
+												this.$set(response.data.data[i], 'status',
+													'question')
+											} else {
+												this.$set(response.data.data[i], 'status',
+													'success')
 												// response.data.data[i].status='success'
 											}
-											response.data.data[i].workflowlen=response.data.data[i].workflowHistoricTasks.length
-											var workflowdata=response.data.data[i].workflowHistoricTasks
-											var staffsdata=response.data.data[i].commonStaffs
+											response.data.data[i].workflowlen = response.data.data[
+												i].workflowHistoricTasks.length
+											var workflowdata = response.data.data[i]
+												.workflowHistoricTasks
+											var staffsdata = response.data.data[i].commonStaffs
 											for (let q = 0; q < staffsdata.length; q++) {
-												staffsdata[q].status=false
-												staffsdata[q].staffTitle=staffsdata[q].staffName
+												staffsdata[q].status = false
+												staffsdata[q].staffTitle = staffsdata[q].staffName
 												for (let k = 0; k < workflowdata.length; k++) {
-													if(staffsdata[q].staffId==workflowdata[k].operatorId){
-														staffsdata[q].status=true
+													if (staffsdata[q].staffId == workflowdata[k]
+														.operatorId) {
+														staffsdata[q].status = true
 													}
 												}
 											}
 										}
-										response.data.data[i].commonStaffs1=response.data.data[i].commonStaffs
-									}else{
-										if(response.data.data[i].workflowHistoricTasks&&response.data.data[i].workflowHistoricTasks.length>0){
-											var len =response.data.data[i].workflowHistoricTasks.length-1
-											if(response.data.data[i].workflowHistoricTasks[len].approved){
-												this.$set(response.data.data[i],'status','success')
-											}else{
-												this.$set(response.data.data[i],'status','error')
+										response.data.data[i].commonStaffs1 = response.data.data[i]
+											.commonStaffs
+									} else {
+										if (response.data.data[i].workflowHistoricTasks && response
+											.data.data[i].workflowHistoricTasks.length > 0) {
+											var len = response.data.data[i].workflowHistoricTasks
+												.length - 1
+											if (response.data.data[i].workflowHistoricTasks[len]
+												.approved) {
+												this.$set(response.data.data[i], 'status',
+													'success')
+											} else {
+												this.$set(response.data.data[i], 'status', 'error')
 											}
-											response.data.data[i].operatorTitle=response.data.data[i].workflowHistoricTasks[len].operatorName.substring(response.data.data[i].workflowHistoricTasks[0].operatorName.length - 2)
-											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
-										}else{
-											this.$set(response.data.data[i],'status','question')
+											response.data.data[i].operatorTitle = response.data
+												.data[i].workflowHistoricTasks[len].operatorName
+												.substring(response.data.data[i]
+													.workflowHistoricTasks[0].operatorName.length -
+													2)
+											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
+										} else {
+											this.$set(response.data.data[i], 'status', 'question')
 											// response.data.data[i].status='question'
-											if(response.data.data[i].desc=='总经理助理审核'){
-												response.data.data[i].operatorTitle='总助'
-											}else if(response.data.data[i].desc=='杜大光审核'){
-												response.data.data[i].operatorTitle='大光'
-											}else{
-												response.data.data[i].operatorTitle=response.data.data[i].desc.substring(0,2)
+											if (response.data.data[i].desc == '总经理助理审核') {
+												response.data.data[i].operatorTitle = '总助'
+											} else if (response.data.data[i].desc == '杜大光审核') {
+												response.data.data[i].operatorTitle = '大光'
+											} else {
+												response.data.data[i].operatorTitle = response.data
+													.data[i].desc.substring(0, 2)
 											}
-											
-											response.data.data[i].operatorName=response.data.data[i].desc
-											var time1=new Date(response.data.data[i].updateDate).getTime()
-											response.data.data[i].updateDate=this.$u.timeFormat(time1, 'mm.dd hh:MM')
-											response.data.data[i].auditMind=''
+
+											response.data.data[i].operatorName = response.data
+												.data[i].desc
+											var time1 = new Date(response.data.data[i].updateDate)
+												.getTime()
+											response.data.data[i].updateDate = this.$u.timeFormat(
+												time1, 'mm.dd hh:MM')
+											response.data.data[i].auditMind = ''
 										}
 									}
-									
+
 								}
 								console.log(response.data.data)
 								this.auditList = response.data.data
-								var time2=new Date(this.auditInfo.createDate).getTime()
-								var time3=this.$u.timeFormat(time2, 'mm.dd hh:MM')
+								var time2 = new Date(this.auditInfo.createDate).getTime()
+								var time3 = this.$u.timeFormat(time2, 'mm.dd hh:MM')
 								this.auditList.unshift({
-									operatorTitle:this.auditInfo.creater.substring(0,2),
-									operatorName:this.auditInfo.creater,
-									updateDate:time3,
-									auditMind:'',
-									desc:'发起申请',
-									showflow:false,
-									commonStaffs1:null,
-									commonStaffs:null,
-									workflowHistoricTasks:[],
-									status:'success'
+									operatorTitle: this.auditInfo.creater.substring(0, 2),
+									operatorName: this.auditInfo.creater,
+									updateDate: time3,
+									auditMind: '',
+									desc: '发起申请',
+									showflow: false,
+									commonStaffs1: null,
+									commonStaffs: null,
+									workflowHistoricTasks: [],
+									status: 'success'
 								})
 							})
 						})
-						
+
 					}
 				})
 				this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
@@ -757,17 +812,17 @@
 		margin: 20rpx 0;
 		border-radius: 20rpx;
 		padding: 20rpx;
-	
+
 		.row {
 			display: flex;
-	
+
 			.left {
 				display: flex;
 				align-items: center;
-	
+
 				.item1 {
 					position: relative;
-	
+
 					.item-content {
 						background: #617AE0;
 						width: 44px;
@@ -778,7 +833,7 @@
 						font-size: 15px;
 						color: #fff;
 					}
-	
+
 					.status {
 						position: absolute;
 						border-radius: 50%;
@@ -787,27 +842,27 @@
 						bottom: -3px;
 						background: #fff;
 					}
-	
+
 					.status.success {
 						border: 1px solid rgb(60, 156, 255);
 					}
-	
+
 					.status.error {
 						border: 1px solid rgb(245, 108, 108);
 					}
-	
+
 					.status.question {
 						border: 1px solid #f9ae3d;
 					}
 				}
-	
+
 			}
-	
+
 			.right {
 				width: 80%;
 				// color: #B0B1B5;
 				margin-top: 10px;
-	
+
 				.right-content {
 					background: #F2F3F7;
 					margin-left: 10px;
@@ -816,33 +871,33 @@
 					border-radius: 5px;
 					color: #B0B1B5;
 				}
-	
+
 				.right-item {
 					display: flex;
 					justify-content: space-between;
-	
+
 					.time {
 						color: #999;
 					}
-	
+
 					.item2 {
 						margin-left: 20rpx;
 						margin-top: -7px;
-	
+
 						.name {
 							font-size: 28rpx;
 							font-weight: 800;
 							margin-bottom: 4px;
 						}
-	
+
 						.status.success {
 							color: #6CC48C;
 						}
-	
+
 						.status.error {
 							color: rgb(245, 108, 108);
 						}
-	
+
 						.status.question {
 							color: #f9ae3d;
 						}
@@ -850,10 +905,10 @@
 				}
 			}
 		}
-	
+
 		.row2 {
 			display: flex;
-	
+
 			.item-content {
 				background: #22C572;
 				width: 30px;
@@ -866,22 +921,22 @@
 				padding: 0 2px;
 				margin: 0 auto;
 			}
-	
+
 			.status {
 				position: absolute;
 				top: 0;
 				right: 0;
 			}
 		}
-	
+
 		.row-line {
 			width: 1px;
 			height: 30px;
 			background: #F2F2F2;
 			margin: 10rpx 50rpx;
-	
+
 		}
-	
+
 		.audit {
 			margin-top: 20rpx;
 		}

+ 8 - 0
pages/task/audit/warehouse_warrant_detail.vue

@@ -72,6 +72,14 @@
 				<view class="right">{{auditInfo.count}}</view>
 			</view> -->
 		</view>
+		<view class="content1" v-if="auditInfo.warehousingOrderList[0].remark">
+			<view class="title ">
+				备注信息
+			</view>
+			<view style="margin-top: 20rpx;">
+				{{auditInfo.warehousingOrderList[0].remark}}
+			</view>
+		</view>
 
 		<view class="content1">
 			<view class="title ">