Browse Source

更新 sdy

zhongtianhaoyuan 3 years ago
parent
commit
c1195608f7

+ 17 - 1
pages.json

@@ -1041,7 +1041,23 @@
 				"enablePullDownRefresh": false
 			}
 
-		}, {
+		}, 
+		{
+			"path": "pages/task/audit/tradeServices_audit",
+			"style": {
+				"navigationBarTitleText": "贸易服务审核",
+				"enablePullDownRefresh": false
+			}
+		
+		},
+		{
+			"path": "pages/task/audit/tradeServices_audit_approval",
+			"style": {
+				"navigationBarTitleText": "贸易服务详情",
+				"enablePullDownRefresh": false
+			}
+		
+		},{
 			"path": "pages/task/audit/freight_settlement_approval",
 			"style": {
 				"navigationBarTitleText": "运费结算审核",

+ 388 - 0
pages/task/audit/tradeServices_audit.vue

@@ -0,0 +1,388 @@
+<template>
+	<view class="container">
+		<u-form ref="uForm">
+			<view class="form_item">
+				<view class="title">申请信息</view>
+				<!-- <u-divider ></u-divider> -->
+				<u-form-item label-width='260' label="业务编号" :borderBottom="false">
+					<u-input v-model="tradeList.billNo" input-align="right" placeholder="暂无" disabled />
+				</u-form-item>
+				<u-form-item label-width='260' label="名头" :borderBottom="false">
+					<u-input v-model="tradeList.renown" input-align="right" placeholder="暂无" disabled />
+				</u-form-item>
+				<u-form-item label-width='260' label="仓库名称" :borderBottom="false">
+					<u-input v-model="tradeList.warehouseName" input-align="right" placeholder="暂无" disabled />
+				</u-form-item>
+				<u-form-item label-width='260' label="仓位号" :borderBottom="false">
+					<u-input v-model="tradeList.warehouseNo" input-align="right" placeholder="暂无" disabled />
+				</u-form-item>
+				<u-form-item label-width='260' label="仓库地址" :borderBottom="false">
+					<u-input v-model="tradeList.warehouseAddress" input-align="right" placeholder="暂无" disabled />
+				</u-form-item>
+				<u-form-item label-width='260' label="货名" :borderBottom="false">
+					<u-input v-model="tradeList.goodsName" input-align="right" placeholder="暂无" disabled />
+				</u-form-item>
+				<u-form-item label-width='260' label="品级" :borderBottom="false">
+					<u-input v-model="tradeList.grade" input-align="right" placeholder="暂无" disabled />
+				</u-form-item>
+				<u-form-item label-width='260' label="现有储量(吨)" :borderBottom="false">
+					<u-input v-model="tradeList.nowWeight" input-align="right" placeholder="暂无" disabled />
+				</u-form-item>
+				<u-form-item label-width='260' label="可用储量(吨)" :borderBottom="false">
+					<u-input v-model="tradeList.useWeight" input-align="right" placeholder="暂无" disabled />
+				</u-form-item>
+				<u-form-item label-width='260' label="本单重量(吨)" :borderBottom="false">
+					<u-input v-model="tradeList.weight" input-align="right" placeholder="暂无" disabled />
+				</u-form-item>
+				<u-form-item label-width='260' label="单价(元/吨)" :borderBottom="false">
+					<u-input v-model="tradeList.unitPrice" input-align="right" placeholder="暂无" disabled />
+				</u-form-item>
+				<u-form-item label-width='260' label="总价值(元)" :borderBottom="false">
+					<u-input v-model="tradeList.totalValue" input-align="right" placeholder="暂无" disabled />
+				</u-form-item>
+				<u-form-item label-width='260' label="申请比例(%)" :borderBottom="false">
+					<u-input v-model="tradeList.applicationProportion" input-align="right" placeholder="暂无" disabled />
+				</u-form-item>
+				<u-form-item label-width='260' label="申请金额(元)" :borderBottom="false">
+					<u-input v-model="tradeList.interest" input-align="right" placeholder="暂无" disabled />
+				</u-form-item>
+			</view>
+			<view class="form_item">
+				<view class="title">附件</view>
+				<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="0"
+					:file-list="imgUrl" :size-type="['compressed']" @on-success="getImgUrl" :deletable="false"
+					:showProgress="false" @on-uploaded="isAdd = true" :before-upload="filterFileType"
+					@on-progress="onProgress"></upload>
+			</view>
+			<view class="form_item">
+				<view class="title">外审部门</view>
+				<u-form-item label-width='260' label="银行" :borderBottom="false">
+					<u-input v-model="tradeList.bank" input-align="right" placeholder="暂无" disabled />
+				</u-form-item>
+				<u-form-item label-width='260' label="第三方" :borderBottom="false">
+					<u-input v-model="tradeList.interest" input-align="right" placeholder="暂无" disabled />
+				</u-form-item>
+			</view>
+		</u-form>
+		<view class="form_item flex">
+			<view class="auditInfo flex" @click="auditInfo">
+				<view class="title1">审核记录</view>
+				<view class="img">
+					<image src="../../../static/img/myimg/gengduo1@3x.png"
+						style="width: 16rpx; height: 30rpx;top: 20rpx;margin-right: 0rpx;"></image>
+				</view>
+			</view>
+		</view>
+		<view style='padding:10px;' class='flex bottom-btn'>
+			<u-button  @click='reject' type="error" class="btn1" hover-class='none'>驳回</u-button>
+			<u-button  @click='pass' type="success" class="btn2">通过</u-button>
+		</view>
+		<!-- <u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
+			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal> -->
+			<view v-if="show" class="shade">
+				<view class="wrap">
+					<view class="alert-top">
+						<view class="titleAudit">
+							{{title}}
+						</view>
+						<u-icon name="close" class="close" color="#8890B1" @click="close()"></u-icon>
+					</view>
+					<view class="u-textarea-style">
+						<view class="right-bottom">
+							{{auditMind.length}}/100个字
+						</view>
+						<u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
+							maxlength="100" />
+					</view>
+					<view @click='close()' class="cancel">取消</view>
+					<view @click='passSubmit()' class="confirm">确定</view>
+				</view>
+			</view>
+	</view>
+</template>
+
+<script>
+	import upload from '@/components/upload.vue';
+	export default {
+		components: {
+			upload
+		},
+		data() {
+			return {
+				id: "",
+				action: this.$uploadUrl,
+				maxSize: 50 * 1024 * 1024, //限制文件大小 50M
+				btnLoading: false, //防止重复点击
+				imgUrl: [],
+				tradeList: {},
+				isShowAlert:false,
+				show:false,
+				content:"",
+				title:"",
+				auditMind:"",//审核意见
+			}
+		},
+		onLoad(options) {
+			this.id = options.id
+			this.getList()
+		},
+		onshow() {
+
+		},
+		methods: {
+			getList() {
+				var that = this
+				that.$api.doRequest('get', '/tradeWarehouseReceiptAppl/getTrageInfo', {
+					id: that.id
+				}).then(res => {
+					that.tradeList = res.data.data
+					//通过图片id找到地址
+					that.$api.doRequest('get', '/appendix/query/getFileList', {
+							appendixIds: that.tradeList.appendix
+						}).then(res => {
+							for (let i = 0; i < res.data.data.length; i++) {
+								that.imgUrl.push({
+									url: res.data.data[i].appendixPath
+								})
+							}
+						}).catch(res => {
+							if (res.errmsg) {
+								uni.showToast({
+									title: res.errmsg,
+									icon: 'none',
+									duration: 2000
+								})
+							}
+						});
+				})
+			},
+			reject(){
+				this.show = true
+				this.title = "驳回原因(驳回)"
+			},
+			pass(){
+				this.show = true
+				this.title = "审核意见(通过)"
+			},
+			close(){
+				this.show = false
+			},
+			passSubmit(){
+				if(this.title = "驳回原因(驳回)"){
+					if(!this.auditMind){
+						this.$api.msg('驳回意见不能为空')
+						return
+					}
+					this.$api.doRequest('post', '/workflow/api/handle', {
+						taskId: this.tradeList.taskId,
+						approved: false,
+						auditMind: this.auditMind,
+						needReapply: true,
+					}).then(res => {
+						if(res.data.code == 200){
+							uni.showToast({
+								title: "审核成功",
+								icon: 'none',
+								duration: 2000
+							})
+							uni.navigateBack()
+						}
+					}).catch(res => {
+								if (res.errmsg) {
+									uni.showToast({
+										title: res.errmsg,
+										icon: 'none',
+										duration: 2000
+									})
+								}
+							});
+					// }
+				}else{
+					this.$api.doRequest('post', '/workflow/api/handle', {
+					taskId: this.tradeList.taskId,
+					approved: true,
+					auditMind: this.auditMind ? this.auditMind : "审核通过",
+					needReapply: false,
+				}).then(res => {
+					if(res.data.code == 200){
+						uni.showToast({
+							title: "审核成功",
+							icon: 'none',
+							duration: 2000
+						})
+						uni.navigateBack()
+					}
+				}).catch(res => {
+							if (res.errmsg) {
+								uni.showToast({
+									title: res.errmsg,
+									icon: 'none',
+									duration: 2000
+								})
+							}
+						});
+				}
+				
+			},
+			auditInfo(){
+				// uni.navigateTo({
+				// 	url: '/pages/task/procurement_close_details?id=' + item.businessId + "&isShowbtn=true"
+				// })
+			},
+			filterFileType(index, lists) {
+				if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif' &&
+					lists[index].fileType != 'jpeg') {
+					lists.splice(index, 1);
+					// 当前文件不支持
+					uni.showModal({
+						title: '暂不支持当前图片类型',
+						showCancel: false
+					});
+				} else {
+					this.isAdd = false;
+				}
+			},
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.container {
+		padding: 20rpx 12rpx 250rpx 12rpx;
+	}
+
+	.title {
+		font-size: 34rpx;
+		font-weight: 600;
+		margin-top: 20rpx;
+		line-height: 70rpx;
+		border-bottom: 2rpx solid #EEEEEE;
+	}
+
+	.form_item {
+		background: #fff;
+		margin: 10px;
+		border-radius: 10px;
+		padding: 20rpx 30rpx;
+		// width: 100%;
+	}
+
+	.u-form-item {
+		padding: 12rpx 0 !important;
+	}
+
+	.auditInfo {
+		width: 100%;
+
+		.title1 {
+			width: 99%;
+			font-size: 34rpx;
+			font-weight: 600;
+			// margin-top: 20rpx;
+			line-height: 70rpx;
+		}
+	}
+	.bottom-btn {
+		width: 100%;
+		position: fixed;
+		bottom: 0;
+		display: flex;
+		z-index: 2;
+		left: 0;
+		background-color: #f8f8f8;
+		flex-direction: column;
+	
+		.btn1,
+		.btn2 {
+			width: 100%;
+			margin-bottom: 26rpx;
+			border-radius: 90rpx;
+		}
+	
+		.btn1 {
+			background: white;
+			color: #00C265;
+		}
+	}
+	.shade {
+		position: fixed;
+		top: 0;
+		left: 0;
+		height: 100%;
+		width: 100%;
+		background: rgba(0, 0, 0, 0.4);
+		z-index: 3;
+	
+		.wrap {
+			position: absolute;
+			left: 0;
+			top: 0;
+			right: 0;
+			bottom: 0;
+			margin: auto;
+			background: #fff;
+			width: calc(100% - 198rpx);
+			height: 700rpx;
+			border-radius: 20rpx;
+	
+			.alert-top {
+				padding: 33rpx;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				position: relative;
+			}
+	
+			.titleAudit {
+				font-size: 32rpx;
+				font-weight: 600;
+				color: #333333;
+			}
+	
+			.close {
+				position: absolute;
+				right: 33rpx;
+			}
+		}
+	}
+	.cancel,
+	.confirm {
+		position: absolute;
+		display: inline-block;
+		width: 50%;
+		text-align: center;
+		bottom: 0;
+		padding: 10px;
+		border-top: 1px solid #eee;
+		font-size: 34rpx;
+	}
+	
+	.cancel {
+		left: 0;
+		border-right: 1px solid #eee;
+		color: #AFB3BF;
+	}
+	.confirm {
+		right: 0;
+		color: #22C572;
+	}
+	.u-textarea-style {
+		margin: 20rpx;
+		background: #F9F9FA;
+		border-radius: 10px;
+		border: 1px solid #EEEEEE;
+		padding: 10rpx 20rpx;
+		position: relative;
+	
+		.right-bottom {
+			position: absolute;
+			right: 20rpx;
+			bottom: 20rpx;
+			color: #AFB3BF;
+		}
+	}
+	/deep/.u-list-item {
+		margin: 4rpx !important;
+	}
+</style>

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

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 23 - 3
pages/task/my_task.vue

@@ -157,6 +157,12 @@
 						} else {
 							item.itemUrl = `/pages/task/audit/acquisition_information_details?id=` + item.businessId
 						}
+					}else if (item.businessCode == 'TRADE-WAREHOUSE-REPORT') {//贸易服务
+						if (this.statusFlag == 1) {
+							item.itemUrl = `/pages/task/audit/tradeServices_audit?id=` + item.businessId
+						} else {
+							item.itemUrl = `/pages/task/audit/tradeServices_audit_approval?id=` + item.businessId
+						}
 					}
 					if (item.taskType == "入库任务") {
 
@@ -363,9 +369,9 @@
 							} else {
 								_str.showRow = true;
 							}
-							if(_str.businessType=='TRADE'){
-								_str.showRow = false
-							}
+							// if(_str.businessType=='TRADE'){
+							// 	_str.showRow = false
+							// }
 							this.taskInfo[i].department = this.taskInfo[i].messageContent.split(' ')[0]
 							if (this.taskInfo[i].businessType == 'WAREHOUSE') {
 								if (this.taskInfo[i].businessCode == 'INOUTTASK-TASK-APPROVE') {
@@ -412,6 +418,10 @@
 								if (this.taskInfo[i].businessCode == 'ACQUISITION-SETTLEMENT-APPRPVE') {
 									this.taskInfo[i].messageTitle = '收购信息审核'
 								}
+							}else if (this.taskInfo[i].businessType == 'TRADE') {
+								if (this.taskInfo[i].businessCode == 'TRADE-WAREHOUSE-REPORT') {
+									this.taskInfo[i].messageTitle = '贸易服务审核'
+								}
 							}
 						}
 						if (res.data.data.records.length == 0) {
@@ -564,6 +574,16 @@
 							url: `/pages/task/audit/acquisition_information_details?id=` + item.businessId + "&isShowbtn=true"
 						})
 					}
+				}else if (item.businessCode == 'TRADE-WAREHOUSE-REPORT') {
+					if (this.statusFlag == 1) {
+						uni.navigateTo({
+							url: `/pages/task/audit/tradeServices_audit?id=` + item.businessId 
+						})
+					} else {
+						uni.navigateTo({
+							url: `/pages/task/audit/tradeServices_audit_approval?id=` + item.businessId
+						})
+					}
 				}
 				if (item.taskType == "入库任务") {