Procházet zdrojové kódy

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

zhongtianhaoyuan před 3 roky
rodič
revize
7cea3f9de2

+ 7 - 7
pages/erp/deliveryfeedback/details.vue

@@ -250,14 +250,14 @@
 				<view v-if="item.shipType == '集装箱'" class="row">
 					<view class="left">集装箱-{{index+1}}</view>
 					<view v-if="item.status == '未装车'">未装船</view>
-					<view v-if="item.status == '已装车'">已装船</view>
-					<view v-if="item.status == '已送达'">{{item.status}}</view>
+					<view v-if="item.status == '已装车'">未卸船</view>
+					<view v-if="item.status == '已送达'">已卸船</view>
 				</view>
 				<view v-if="item.shipType == '散船'" class="row">
 					<view class="left">仓位号-{{index+1}}</view>
 					<view v-if="item.status == '未装车'">未装船</view>
-					<view v-if="item.status == '已装车'">已装船</view>
-					<view v-if="item.status == '已送达'">{{item.status}}</view>
+					<view v-if="item.status == '已装车'">未卸船</view>
+					<view v-if="item.status == '已送达'">已卸船</view>
 				</view>
 				<view v-if="item.shipType == '集装箱'" class="row">
 					<view class="left">箱号</view>
@@ -302,9 +302,9 @@
 						</u-picker>
 					</view>
 				</view>
-				<view style='text-align:right;' v-if="item.status == '已装车'">未装船</view>
-				<view style='text-align:right;' v-else-if="item.status == '已送达'">已装船</view>
-				<u-button v-else @click='submit(index,3)' type="success">保存</u-button>
+			<!-- 	<view style='text-align:right;' v-if="item.status == '已装车'">未装船</view>
+				<view style='text-align:right;' v-else-if="item.status == '已送达'">已装船</view> -->
+				<u-button v-if="item.status == '未装车'" @click='submit(index,3)' type="success">保存</u-button>
 			</view>
 			<view class="row">
 				<view style='margin-left:10px;' class="left">运单</view>

+ 4 - 4
pages/erp/receivingfeedback/details.vue

@@ -220,8 +220,8 @@
 				<view class="row">
 					<view class="left">卸车日期</view>
 					<view>
-						<view v-if="item.status == '装车' || item.status == '已送达'">{{item.receiveDateEnd}}</view>
-						<view v-else @click='train(index)'>{{item.receiveDateEnd?item.receiveDateEnd:'请选择日期'}}</view>
+						<view v-if="item.status == '装车' || item.status == '已送达'">{{item.receiveDateEnd}}</view>
+						<view @click='train(index)'>{{item.receiveDateEnd?item.receiveDateEnd:'请选择日期'}}</view>
 						<u-picker v-model="item.show2" mode="time"  @cancel='datecancel()' @confirm='dateChange2($event,index)' :params="params">
 						</u-picker>
 					</view>
@@ -313,8 +313,8 @@
 						</u-picker>
 					</view>
 				</view>
-				<view style='text-align:right;' v-if="item.status == '未装车' || item.status == '已送达'">{{item.status}}</view>
-				<u-button v-else @click='submit(index,3)' type="success">保存</u-button>
+				<!-- <view style='text-align:right;' v-if="item.status == '未装车' || item.status == '已送达'">{{item.status}}</view> -->
+				<u-button v-if="item.status == '已装车'" @click='submit(index,3)' type="success">保存</u-button>
 			</view>
 			<view class="row">
 				<view style='margin-left:10px;' class="left">运单</view>

+ 72 - 73
pages/task/audit/freight_settlement_approval.vue

@@ -4,51 +4,49 @@
 			<view class="topInfo-item">
 				<view class="flex info">
 					<view class="logo">
-						<image src="../../../static/img/reject.png" mode="" v-if="list[0].approveStatus == '已驳回'"
+						<image src="../../../static/img/reject.png" mode="" v-if="list.approveStatus == '已驳回'"
 							style="height: 40rpx;"></image><!-- 驳回 -->
-						<image src="../../../static/img/tongguo.png" mode="" v-if="list[0].approveStatus == '已通过'"
+						<image src="../../../static/img/tongguo.png" mode="" v-if="list.approveStatus == '已通过'"
 							style="height: 40rpx;"></image><!-- 通过 -->
-						<image src="../../../static/img/daishenhe.png" mode="" v-if="list[0].approveStatus == '待决策人审核'|| list[0].approveStatus == '待财务审核'"
+						<image src="../../../static/img/daishenhe.png" mode="" v-if="list.approveStatus == '待决策人审核'|| list.approveStatus == '待财务审核'"
 							style="height: 40rpx;"></image><!-- 待审核 -->
 					</view>
-					<view class="infoText">{{list[0].approveStatus}}</view>
+					<view class="infoText">{{list.approveStatus}}</view>
 				</view>
-				<view class="infoData">{{list[0].updateDate}}</view>
+				<view class="infoData">{{list.updateDate}}</view>
 			</view>
 		</view>
 		<view class="content">
 			<view class="top">
 				<view>合同编号</view>
-				<view>{{list[0].contractNo}}</view>
+				<view>{{list.contractNo}}</view>
 			</view>
 			<view class="car-container">
-				<view v-for="(item,index) in list" style="border-bottom: 2rpx solid #EEEEEE;margin-top: 30rpx;">
-					<view class="car-num title">{{item.carNo}} ({{item.tranCarNo}})</view>
+					<view class="car-num title">{{list.carNo}} ({{list.tranCarNo}})</view>
 					<view class="car-type-item">
 						<view class="left">装</view>
-						<view class="textInfo">{{item.loadingWeight}}吨</view>
+						<view class="textInfo">{{list.loadingWeight}}吨</view>
 					</view>
 					<view class="car-type-item">
 						<view class="center">卸</view>
-						<view class="textInfo">{{item.unloadingWeight}}吨</view>
+						<view class="textInfo">{{list.unloadingWeight}}吨</view>
 					</view>
 					<view class="car-type-item">
 						<view class="right">结</view>
-						<view class="textInfo">{{item.settlementWeight}}吨</view>
+						<view class="textInfo">{{list.settlementWeight}}吨</view>
 					</view>
 					<view class="car-type-item">
 						<view class="left">运</view>
-						<view class="textInfo">{{item.transportPrice}}元/吨</view>
+						<view class="textInfo">{{list.transportPrice}}元/吨</view>
 					</view>
 					<view class="car-type-item">
 						<view class="center">扣</view>
-						<view class="textInfo">{{item.deductionAmount}}元</view>
+						<view class="textInfo">{{list.deductionAmount}}元</view>
 					</view>
 					<view class="car-type-item">
 						<view class="right">付</view>
-						<view class="textInfo">{{item.amountIngPayable}}元</view>
+						<view class="textInfo">{{list.amountIngPayable}}元</view>
 					</view>
-				</view>
 			</view>
 		</view>
 		<u-popup v-model="show1" mode="center">
@@ -101,92 +99,93 @@
 				border: false,
 			}
 		},
-		onLoad() {
+		onLoad(options) {
+			this.id = options.id
 			this.getList()
 		},
 		methods: {
 			getList() {
-				this.$api.doRequest('get', '/tranSettlementReport/selectTranSettlementReport', {
-					compId: "2710b21efc1e4393930c5dc800010dc4",
-					currentPage: this.currentPage,
-					pageSize: this.pageSize,
-					contractNo: "全部合同"
+				this.$api.doRequest('get', '/tranSettlementReport/getInfo', {
+					id: this.id
 				}).then(res => {
+					this.contractNo = res.data.data.contractNo
+					this.carId = res.data.data.carId
 					if (res.data.code == 200) {
-						this.list = res.data.data.records
+						this.$api.doRequest('get', '/tranSettlementReport/selectTranSettlementReport', {
+							compId: "2710b21efc1e4393930c5dc800010dc4",
+							currentPage: this.currentPage,
+							pageSize: this.pageSize,
+							contractNo: this.contractNo,
+							carId:this.carId,
+						}).then(res => {
+							if (res.data.code == 200) {
+								this.list= res.data.data.records[0]
+								console.log(this.list,124)
+							}
+						})
 					}
 				})
 			},
 			// 驳回
 			rejectSubmit() {
 				var that = this
-				if (this.list.length == 0) {
-						this.$api.msg('没有要审核的条目!')
-				} else {
-					if (!this.rejectInfo) {
-						this.$api.msg('驳回原因不能为空!')
-					}else{
-					this.show1 = false
-					uni.showModal({
-						content: "是否确定驳回?",
-						showCancel: true,
-						confirmText: '确定',
-						success: function(res) {
-							if (res.confirm) {
-								that.audit(that.list[0], 0, false, true, '已驳回')
-							}
+				if (!this.rejectInfo) {
+					this.$api.msg('驳回原因不能为空!')
+				}else{
+				this.show1 = false
+				uni.showModal({
+					content: "是否确定驳回?",
+					showCancel: true,
+					confirmText: '确定',
+					success: function(res) {
+						if (res.confirm) {
+							that.audit(that.list, 0, false, true, that.rejectInfo)
 						}
-					})
 					}
-				}
+				})
+			}
+
 			},
 			//通过
 			passSubmit() {
 				var that = this
-				if (this.list.length == 0) {
-					this.$api.msg('没有要审核的条目!')
-				} else {
-					if (!this.rejectInfo1) {
-						this.$api.msg('审核意见不能为空!')
-					}else{
-					this.show2 = false
-					uni.showModal({
-						content: "是否确定通过?",
-						showCancel: true,
-						confirmText: '确定',
-						success: function(res) {
-							if (res.confirm) {
-								that.audit(that.list[0], 0, true, 2)
-							}
+				if (!this.rejectInfo1) {
+					this.$api.msg('审核意见不能为空!')
+				}else{
+				this.show2 = false
+				uni.showModal({
+					content: "是否确定通过?",
+					showCancel: true,
+					confirmText: '确定',
+					success: function(res) {
+						if (res.confirm) {
+							that.audit(that.list, 0, true, 2,that.rejectInfo1)
 						}
-					})
 					}
-				}
-				
+				})
+			}
 			},
 			//审核方法
-			audit(item, index, status, status2, reason) {
-				if (index < this.list.length) {
+			audit(list, index, status, status2, reason) {
+				if (this.list) {
 					this.$api.doRequest('post', '/workflow/api/handle', {
-						taskId: item.taskId,
+						taskId: list.taskId,
 						approved: status,
 						auditMind: reason != undefined ? this.rejectInfo : this.rejectInfo1,
 						needReapply: status2 != undefined ? true : false,
 					}).then(res => {
-						this.audit(this.list[index + 1], index + 1, status)
+						if (status == true) {
+								this.$api.msg('通过成功')
+							setTimeout(function() {
+								uni.navigateBack()
+							}, 1000);
+						} else if (status == false) {
+								this.$api.msg('驳回成功')
+							setTimeout(function() {
+								uni.navigateBack()
+							}, 1000);
+						}
 					})
-				} else {
-					if (status == true) {
-							this.$api.msg('通过成功')
-						setTimeout(function() {
-							uni.navigateBack()
-						}, 1000);
-					} else if (status == false) {
-							this.$api.msg('驳回成功')
-						setTimeout(function() {
-							uni.navigateBack()
-						}, 1000);
-					}
 				}
 			},
 		}

+ 45 - 81
pages/task/audit/freight_settlement_details.vue

@@ -4,51 +4,47 @@
 			<view class="topInfo-item">
 				<view class="flex info">
 					<view class="logo">
-						<image src="../../../static/img/reject.png" mode="" v-if="list[0].approveStatus == '已驳回'"
+						<image src="../../../static/img/reject.png" mode="" v-if="list.status == '已驳回'"
 							style="height: 40rpx;"></image><!-- 驳回 -->
-						<image src="../../../static/img/tongguo.png" mode="" v-if="list[0].approveStatus == '已通过'"
+						<image src="../../../static/img/tongguo.png" mode="" v-if="list.status == '已通过'"
 							style="height: 40rpx;"></image><!-- 通过 -->
-						<image src="../../../static/img/daishenhe.png" mode="" v-if="list[0].approveStatus == '待决策人审核'"
-							style="height: 40rpx;"></image><!-- 待审核 -->
 					</view>
-					<view class="infoText">{{list[0].approveStatus}}</view>
+					<view class="infoText">{{list.status}}</view>
 				</view>
-				<view class="infoData">{{list[0].updateDate}}</view>
+				<view class="infoData">{{list.updateDate}}</view>
 			</view>
 		</view>
 		<view class="content">
 			<view class="top">
 				<view>合同编号</view>
-				<view>{{list[0].contractNo}}</view>
+				<view>{{list.contractNo}}</view>
 			</view>
 			<view class="car-container">
-				<view v-for="(item,index) in list" style="border-bottom: 2rpx solid #EEEEEE;margin-top: 30rpx;">
-					<view class="car-num title">{{item.carNo}} ({{item.tranCarNo}})</view>
+					<view class="car-num title">{{list.carNo}} ({{list.tranCarNo}})</view>
 					<view class="car-type-item">
 						<view class="left">装</view>
-						<view class="textInfo">{{item.loadingWeight}}吨</view>
+						<view class="textInfo">{{list.loadingWeight}}吨</view>
 					</view>
 					<view class="car-type-item">
 						<view class="center">卸</view>
-						<view class="textInfo">{{item.unloadingWeight}}吨</view>
+						<view class="textInfo">{{list.unloadingWeight}}吨</view>
 					</view>
 					<view class="car-type-item">
 						<view class="right">结</view>
-						<view class="textInfo">{{item.settlementWeight}}吨</view>
+						<view class="textInfo">{{list.settlementWeight}}吨</view>
 					</view>
 					<view class="car-type-item">
 						<view class="left">运</view>
-						<view class="textInfo">{{item.transportPrice}}元/吨</view>
+						<view class="textInfo">{{list.transportPrice}}元/吨</view>
 					</view>
 					<view class="car-type-item">
 						<view class="center">扣</view>
-						<view class="textInfo">{{item.deductionAmount}}元</view>
+						<view class="textInfo">{{list.deductionAmount}}元</view>
 					</view>
 					<view class="car-type-item">
 						<view class="right">付</view>
-						<view class="textInfo">{{item.amountIngPayable}}元</view>
+						<view class="textInfo">{{list.amountIngPayable}}元</view>
 					</view>
-				</view>
 			</view>
 		</view>
 		<u-toast ref="uToast" />
@@ -71,78 +67,31 @@
 				],
 			}
 		},
-		onLoad() {
+		onLoad(options) {
+			this.id = options.id
 			this.getList()
 		},
 		methods: {
 			getList() {
-				this.$api.doRequest('get', '/tranSettlementReport/selectTranSettlementReport', {
-					compId: "2710b21efc1e4393930c5dc800010dc4",
-					currentPage: this.currentPage,
-					pageSize: this.pageSize,
-					contractNo: "全部合同"
+				this.$api.doRequest('get', '/tranSettlementReport/getInfo', {
+					id: this.id
 				}).then(res => {
+					this.contractNo = res.data.data.contractNo
+					this.carId = res.data.data.carId
 					if (res.data.code == 200) {
-						this.list = res.data.data.records
-					}
-				})
-			},
-			// 驳回
-			rejectSubmit() {
-				var that = this
-				if (this.list.length == 0) {
-						this.$api.msg('没有要审核的条目!')
-				} else {
-					uni.showModal({
-						content: "是否确定驳回?",
-						showCancel: true,
-						confirmText: '确定',
-						success: function(res) {
-							if (res.confirm) {
-								that.audit(that.list[0], 0, false, true, '已驳回')
+						this.$api.doRequest('get', '/tranSettlementReport/selectTranSettlementReport', {
+							compId: "2710b21efc1e4393930c5dc800010dc4",
+							currentPage: this.currentPage,
+							pageSize: this.pageSize,
+							contractNo: this.contractNo,
+							carId:this.carId,
+						}).then(res => {
+							if (res.data.code == 200) {
+								this.list= res.data.data.records[0]
 							}
-						}
-					})
-				}
-			},
-			//通过
-			passSubmit() {
-				var that = this
-				if (this.list.length == 0) {
-					this.$api.msg('没有要审核的条目!')
-				} else {
-					uni.showModal({
-						content: "是否确定通过?",
-						showCancel: true,
-						confirmText: '确定',
-						success: function(res) {
-							if (res.confirm) {
-								that.audit(that.list[0], 0, true, 2)
-							}
-						}
-					})
-				}
-			},
-			//审核方法
-			audit(item, index, status, status2, reason) {
-				if (index < this.list.length) {
-					this.$api.doRequest('post', '/workflow/api/handle', {
-						taskId: item.taskId,
-						approved: status,
-						auditMind: reason != undefined ? '已驳回' : '34',
-						needReapply: status2 != undefined ? true : false,
-					}).then(res => {
-						this.audit(this.list[index + 1], index + 1, status)
-					})
-				} else {
-					if (status == true) {
-							that.$api.msg('通过成功')
-						this.getList()
-					} else if (status == false) {
-							that.$api.msg('驳回成功')
-						this.getList()
+						})
 					}
-				}
+				})
 			},
 			fanHui(){
 				uni.navigateBack()
@@ -154,7 +103,7 @@
 <style scoped lang="scss">
 	.container {
 		margin: 10rpx;
-		padding: 20rpx 20rpx 110rpx 20rpx;
+		padding: 20rpx 20rpx 230rpx 20rpx;
 	}
 
 	.content {
@@ -270,4 +219,19 @@
 			}
 		}
 	}
+	.rejectInfoCss {
+		border: 1px solid #ccc;
+		border-radius: 10rpx;
+		background-color: #F9F9FA;
+		// height: 100px;
+		overflow-y: auto;
+		margin: 30rpx;
+	}
+	.rejectText {
+		text-align: center;
+	}
+	/deep/.u-input__textarea{
+		height: 300rpx!important;
+	}
 </style>
+

+ 3 - 0
pages/task/audit/salecontract.vue

@@ -246,6 +246,9 @@
 				}).then(res => {
 					that.$api.msg('通过成功')
 					that.show=false
+					setTimeout(function() {
+						uni.navigateBack()
+					}, 1000);
 				})
 			},
 			//审核方法