Przeglądaj źródła

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

gjy 3 lat temu
rodzic
commit
cad83ff17f

+ 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": "运费结算审核",

+ 63 - 41
pages/erpbusiness/acquisitionInformation.vue

@@ -11,16 +11,19 @@
 			<view class="content-item">
 				<view class="left">收购信息</view>
 				<view class='row'>
-				<textarea placeholder="请输入仓库信息" class="textarea" maxlength="2000" v-model="textareaValue"></textarea>
+				<textarea placeholder="输入收购信息,不超过2000个字" class="textarea" maxlength="2000" v-model="textareaValue"></textarea>
+				<view class="textarea-left">
+					<view  class="clear" @click="clear()">清除全部</view>
+				</view>
 				<view class="textarea-bottom">{{textareaValue?textareaValue.length:'0'}}/2000字</view>
-			</view>
-			<view class='row row_css'>
-				显示在易粮易运收购信息中
-				<!-- <u-checkbox activeColor="#19be6b" v-model="value" @change="checkBoxChange">显示在易粮易运收购信息中</u-checkbox> -->
-				<view class="right">
-					<u-switch v-model="value" active-color="#19be6b" inactive-color="#eee" size='40' @change="checkBoxChange"></u-switch>
 				</view>
-			</view>
+				<view class='row row_css'>
+					显示在易粮易运收购信息中
+					<!-- <u-checkbox activeColor="#19be6b" v-model="value" @change="checkBoxChange">显示在易粮易运收购信息中</u-checkbox> -->
+					<view class="right">
+						<u-switch v-model="value" active-color="#19be6b" inactive-color="#eee" size='40' @change="checkBoxChange"></u-switch>
+					</view>
+				</view>
 			</view>
 			
 		</view>
@@ -122,40 +125,11 @@
 		},
 		methods: {
 			init() {
-				let _obj = {
-					commonId: this.sgId,
-					warehouseName:uni.getStorageSync("depotAcquisition_warehouseName")
-				}
-				this.$api.doRequest('get', '/acquisitionInfo/getInfo', _obj).then(res => {
-					if (res.data.code == 200) {
-						if (res.data.data) {
-							this.isEdit = true
-							this.value = res.data.data.checkFlag == '0' ? false : true
-							console.log(this.value)
-							this.warehouseName = res.data.data.warehouseName
-							this.textareaValue = res.data.data.acquisitionInformation
-							this.id = res.data.data.id
-						} else {
-							this.textareaValue = ''
-							this.isEdit = false
-							this.value = false
-						}
-					}
-				})
-
-
-
-				switch (this.status) {
-					case '已隐藏':
-						break;
-					case '显示中':
-
-						break;
-				}
+				var that = this
 				this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelfApp', {
 					compId: uni.getStorageSync('pcUserInfo').compId,
 				}).then(res => {
-					if (res.data.data.length != 0) {
+					if (res.data.data.length > 0) {
 						uni.hideLoading()
 						// let _showData = uni.getStorageSync("erpSelectWarehous")
 						// let _showCWData = uni.getStorageSync("erpSelectWarehousCW")
@@ -165,12 +139,39 @@
 							this.warehouseName = _storangewarehouseName
 						} else {
 							this.warehouseName = res.data.data[0].warehouseName
+							uni.setStorageSync("depotAcquisition_warehouseName", this.warehouseName)
 						}
+						that.$api.doRequest('get', '/acquisitionInfo/getInfo', {
+					commonId: uni.getStorageSync("userInfo").id,
+					warehouseName:uni.getStorageSync("depotAcquisition_warehouseName")
+				}).then(res1 => {
+							if (res1.data.code == 200) {
+								if (res1.data.data) {
+									that.isEdit = true
+									that.value = res1.data.data.checkFlag == '0' ? false : true
+									console.log(that.value)
+									that.warehouseName = res1.data.data.warehouseName
+									that.textareaValue = res1.data.data.acquisitionInformation
+									that.id = res1.data.data.id
+								} else {
+									that.textareaValue = ''
+									that.isEdit = false
+									that.value = false
+								}
+							}
+						})
 					} else {
 						this.warehouseList = []
 						this.warehouseName = '暂无仓库'
 					}
 				})
+				// switch (this.status) {
+				// 	case '已隐藏':
+				// 		break;
+				// 	case '显示中':
+
+				// 		break;
+				// }
 			},
 			warehousechange(e) {
 				this.warehouseName = this.warehouseList[e[0]].warehouseName
@@ -208,6 +209,10 @@
 				} else {
 					_flag = 0
 				}
+				if(!this.textareaValue){
+					this.$api.msg('收购信息不能为空!')
+					return
+				}
 				let _obj = {
 					warehouseName: this.warehouseName,
 					acquisitionInformation: this.textareaValue,
@@ -240,6 +245,9 @@
 				
 				// this.$api.msg('提交成功')
 				// this.$api.msg('提交失败')
+			},
+			clear(){
+				this.textareaValue=''
 			}
 		}
 	}
@@ -311,12 +319,17 @@
 		padding-bottom: 20rpx;
 		color: #AFB3BF ;
 	}
-
+    .textarea-left{
+		position: absolute;
+		bottom: 20rpx;
+		left: 20rpx;
+		color: #606266;
+	}
 	.textarea-bottom {
 		position: absolute;
 		bottom: 20rpx;
 		right: 20rpx;
-		color: #606266;
+		color: #AFB3BF;
 	}
 
 	.submit {
@@ -324,6 +337,15 @@
 		background: #22C572;
 		border-radius: 50rpx;
 	}
+	.clear {
+		/* width: 90%; */
+		background: #ffffff;
+		color: #22C572;
+		border:1px solid  #22C572;
+		border-radius: 50rpx;
+		font-size: 28rpx;
+		padding: 9rpx 24rpx;
+	}
 
 	.bottom-btn {
 		position: fixed;

+ 5 - 0
pages/erpbusiness/customer.vue

@@ -363,6 +363,10 @@
 				this.show = true
 				this.gridList = []
 				this.currentPage = 1
+				uni.showLoading({
+					title: '正在加载',
+					mask:true
+				})
 				this.getList()
 			},
 			getList() {
@@ -387,6 +391,7 @@
 				}
 				this.$api.doRequest('get', url, data).then(res => {
 					if (res.data.data) {
+							uni.hideLoading()
 						let data = res.data.data.records ? res.data.data.records : res.data.data
 						//采购信息
 						if (data.length > 0) {

+ 1 - 1
pages/erpbusiness/index.vue

@@ -14,8 +14,8 @@
 			<!-- 检斤员权限 -->
 			<!-- isShowAcquisitionInfo -->
 			<!-- 获取当前用户负责的仓库,如果无仓库隐藏收购信息 -->
+			<!-- &&sgId -->
 			<view class="content2" v-if="isShowAcquisitionInfo">
-			<!-- <view class="content2" v-if="isShowAcquisitionInfo&&sgId"> -->
 				<view>收购信息</view>
 				<view @click="navTo('/pages/erpbusiness/acquisitionInformation?status='+status+'&id='+sgId)">{{status}}>
 				</view>

+ 6 - 1
pages/task/audit/salecontract.vue

@@ -571,7 +571,12 @@
 		font-size: 28rpx;
 		padding: 10px;
 	}
-
+	.textCss {
+		display: flex;
+		justify-content: flex-end;
+		width: 100%;
+		text-align: right;
+	}
 	.u-textarea-style {
 		margin: 20rpx;
 		background: #F9F9FA;

+ 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

@@ -158,6 +158,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 == "入库任务") {
 
@@ -364,9 +370,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') {
@@ -413,6 +419,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) {
@@ -565,6 +575,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 == "入库任务") {
 

+ 1 - 1
pages/user/depotAcquisition/grainDeliveryRegistration.vue

@@ -168,7 +168,7 @@
 				warehouseId: this.warehouseId
 			}).then(res => {
 				if (res.data.code == 200) {
-					this.goodsName = res.data.data[0].goodsName
+					this.goodsName = res.data.data[0]?res.data.data[0].goodsName:''
 					this.goodsnameList = res.data.data
 				}
 			})