Bläddra i källkod

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

achao 2 år sedan
förälder
incheckning
d07d5a6e30

+ 2 - 2
App.vue

@@ -202,7 +202,7 @@
 				// 	channelId: "task1" //渠道id
 				// });
 				//注意:开启服务之后,配置后台运行,白名单,自启动,即可实现长时间保活,黑屏传数据
-				this.goStartService();
+				// this.goStartService();
 				// !!!如果在设置后台运行的情况下,黑屏不发送数据,请使用setInterval代替 定时任务回调
 				var globalEvent = uni.requireNativePlugin('globalEvent');
 				globalEvent.addEventListener('doJobEvent', function() {
@@ -296,7 +296,7 @@
 			// #endif
 			// this.$socket.initWebIM(this.$ws, true, true)
 			let userInfo = uni.getStorageSync('userInfo') || '';
-			if (userInfo.id) {
+			if (userInfo&&userInfo.id) {
 				//更新登陆状态
 				uni.getStorage({
 					key: 'userInfo',

+ 17 - 1
common/helper.js

@@ -141,7 +141,22 @@ const getNowFormatDate = () => {
 	var currentdate = year + seperator1 + month + seperator1 + strDate;
 	return currentdate;
 }
-
+//获取当天+N日期
+const getNowNumFormatDate = (num) => {
+	var date = new Date();
+	var seperator1 = "-";
+	var year = date.getFullYear();
+	var month = date.getMonth() + 1;
+	var strDate = date.getDate()+num;
+	if (month >= 1 && month <= 9) {
+		month = "0" + month;
+	}
+	if (strDate >= 0 && strDate <= 9) {
+		strDate = "0" + strDate;
+	}
+	var currentdate = year + seperator1 + month + seperator1 + strDate;
+	return currentdate;
+}
 const convertCurrency = (money) => {
 	//汉字的数字
 	var cnNums = new Array('零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖');
@@ -325,6 +340,7 @@ export default {
 	getListByUserId,
 	setAudit,
 	getNowFormatDate,
+	getNowNumFormatDate,
 	getProvinceAbbreviation,
 	convertCurrency,
 	filterUrban,

+ 2 - 2
config/index.js

@@ -1,13 +1,13 @@
 const dev = {
 	baseUrl: 'https://www.zthymaoyi.com',
 	// baseUrl: 'http://localhost:8080/',
-	baseUrlNew: 'http://192.168.110.67:9100/',
+	// baseUrlNew: 'http://192.168.110.67:9888/',
 	// baseUrlNew: 'http://192.168.1.118:8090/',
 	// baseUrlNew: 'http://192.168.110.9:9100/',
 	// baseUrlNew: 'http://192.168.110.138:8090/',
 	// baseUrlNew: 'http://192.168.110.82:8099/',
 	 // baseUrlNew: 'http://192.168.110.82:8090/',
-	// baseUrlNew: 'http://192.168.110.202:8090/',
+	baseUrlNew: 'http://192.168.110.202:8090/',
 	// baseUrlNew: 'http://192.168.110.138:8090/',
 	// 上传图片的
 	// baseUrlNew: 'https://api2.eliangeyun.com/',

+ 1 - 1
pageD/identity/companyIdentityThree.vue

@@ -440,7 +440,7 @@
 																				})
 																			} else {
 																				uni.showToast({
-																					title: "系统异常,请联系管理员",
+																					title: res.data.message?res.data.message:"系统异常,请联系管理员",
 																					icon: 'none',
 																					duration: 2000
 																				})

+ 23 - 10
pages/dataReport/Inventoryentrydetails.vue

@@ -1,8 +1,8 @@
 <template>
 	<view>
 		<view class='search'>
-			<u-search v-model='searchKeyWord' placeholder='可按货源查找' search-icon-color='#AFB3BF' bg-color='#F5F6F9'
-				:shape='"round"' :clearabled="true" :show-action='false'></u-search>
+			<u-search @custom='search' v-model='searchKeyWord' placeholder='可按货源查找' search-icon-color='#AFB3BF' bg-color='#F5F6F9'
+				:shape='"round"' :clearabled="true" ></u-search>
 		</view>
 
 		<view style='justify-content: space-between;background:#fff;padding:20rpx;' class='flex'>
@@ -10,7 +10,7 @@
 			<view @click='show1=true'>{{warehouse?warehouse:'全部仓库'}}></view>
 		</view>
 		<u-picker mode="selector" @confirm='confirm' v-model="show1" range-key='warehouseName' :default-selector="[0]"
-			:range="warehouseList"></u-picker>
+			:range="warehouseList1"></u-picker>
 		<u-calendar @change='calendarchange' v-model="show" :mode="mode"></u-calendar>
 		<view>
 			<view class='contractwrap' v-for='(item,index) in warehouseList'>
@@ -54,6 +54,8 @@
 				warehouse: '',
 				searchKeyWord: '',
 				warehouseList: [],
+				warehouseList1:[],
+				searchKeyWord:'',
 				isLoadMore: false
 			}
 		},
@@ -63,7 +65,7 @@
 			}).then(res => {
 				if (res.data.code == 200) {
 					// uni.hideLoading()
-					this.warehouseList = res.data.data
+					this.warehouseList1 = res.data.data
 				} else {
 					// uni.hideLoading()
 					uni.showToast({
@@ -101,16 +103,23 @@
 			// this.endDate=date.getFullYear()+'-'+((date.getMonth()+1)<10?('0'+(date.getMonth()+1)):(date.getMonth()+1))+'-'+date.getDate()
 			this.getList()
 		},
-		onReachBottom() { //上拉触底函数
+		onReachBottom() { 
+			//上拉触底函数
 			// if (this.statusFlag == 3) {
-			if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
-				this.pageSize += 1
+			if (!this.show2) { //此处判断,上锁,防止重复请求
 				this.currentPage += 1
 				this.getList()
 			}
 			// }
 		},
 		methods: {
+			search(e){
+				this.searchKeyWord=e
+				this.show2=false
+				this.warehouseList=[]
+				this.currentPage=1
+				this.getList()
+			},
 			format(format) {
 				var o = {
 					"M+": this.getMonth() + 1, //month
@@ -131,9 +140,12 @@
 				return format;
 			},
 			confirm(e) {
+				this.show2=false
 				console.log(e)
-				this.warehouse = this.warehouseList[e[0]].warehouseName
-				this.baseId = this.warehouseList[e[0]].id
+				this.warehouseList=[]
+				this.currentPage=1
+				this.warehouse = this.warehouseList1[e[0]].warehouseName
+				this.baseId = this.warehouseList1[e[0]].id
 				this.getList()
 			},
 			calendarchange(e) {
@@ -155,7 +167,8 @@
 					compId: uni.getStorageSync('pcUserInfo').compId,
 					baseId: this.baseId,
 					startDate: this.startDate,
-					endDate: this.endDate
+					endDate: this.endDate,
+					searchKeyWord:this.searchKeyWord
 				}).then(res => {
 					if (res.data.code == 200) {
 

+ 14 - 4
pages/dataReport/breakdownofprofit.vue

@@ -2,8 +2,8 @@
 	<view>
 		<view class='fixedbox'>
 			<view class='search'>
-				<u-search placeholder='可按合同编号或买方、卖方名称查找' search-icon-color='#AFB3BF' bg-color='#F5F6F9' :shape='"round"'
-					:clearabled="true" :show-action='false'></u-search>
+				<u-search @custom='search' placeholder='可按合同编号或买方、卖方名称查找' search-icon-color='#AFB3BF' bg-color='#F5F6F9' :shape='"round"'
+					:clearabled="true"></u-search>
 			</view>
 			<view style='background:#fff;'>
 				<view class='contracttypewrap'>
@@ -61,6 +61,7 @@
 				agreementType: '销售合同',
 				currentPage: 1,
 				pageSize: 10,
+				searchKeyWord:'',
 				show: false,
 				contractList: []
 			}
@@ -120,7 +121,7 @@
 		},
 		onReachBottom() { //上拉触底函数
 			// if (this.statusFlag == 3) {
-			if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
+			if (!this.show2) { //此处判断,上锁,防止重复请求
 				this.pageSize += 1
 				this.currentPage += 1
 				this.getList()
@@ -128,7 +129,15 @@
 			// }
 		},
 		methods: {
+			search(e){
+				this.searchKeyWord=e
+				this.show=false
+				this.contractList=[]
+				this.currentPage=1
+				this.getList()
+			},
 			contractclick(status) {
+				this.show=false
 				this.contractList = []
 				this.currentPage = 1
 				this.agreementType = status
@@ -139,9 +148,10 @@
 					title: '数据加载中'
 				})
 				this.$api.doRequest('get', '/contractManagementInfo/selectContractInfo', {
-					searchContractType: this.searchContractType,
+					agreementType: this.agreementType,
 					currentPage: this.currentPage,
 					pageSize: this.pageSize,
+					searchKeyWord:this.searchKeyWord,
 				}).then(res => {
 					if (res.data.code) {
 						uni.hideLoading()

+ 16 - 3
pages/dataReport/contractdetails/contractdetails.vue

@@ -2,8 +2,8 @@
 	<view>
 		<view class='fixedbox'>
 			<view class='search'>
-				<u-search placeholder='可按合同编号或买方、卖方名称查找' search-icon-color='#AFB3BF' bg-color='#F5F6F9' :shape='"round"'
-					:clearabled="true" :show-action='false'></u-search>
+				<u-search @custom='search' placeholder='可按合同编号或买方、卖方名称查找' search-icon-color='#AFB3BF' bg-color='#F5F6F9' :shape='"round"'
+					:clearabled="true" ></u-search>
 			</view>
 			<view style='background:#fff;'>
 				<view class='contracttypewrap'>
@@ -85,6 +85,7 @@
 				currentPage: 1,
 				pageSize: 10,
 				searchType: '',
+				searchKeyWord:'',
 				show: false,
 				contractList: []
 			}
@@ -144,7 +145,7 @@
 		},
 		onReachBottom() { //上拉触底函数
 			// if (this.statusFlag == 3) {
-			if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
+			if (!this.show) { //此处判断,上锁,防止重复请求
 				this.pageSize += 1
 				this.currentPage += 1
 				this.getList()
@@ -152,14 +153,25 @@
 			// }
 		},
 		methods: {
+			search(e){
+				this.searchKeyWord=e
+				this.show=false
+				this.contractList=[]
+				this.currentPage=1
+				this.getList()
+			},
 			contractclick(status) {
+				this.show=false
 				this.currentPage = 1
 				this.agreementType = status
+				this.contractList=[]
 				this.getList()
 			},
 			searchTypeclick(status) {
+				this.show=false
 				this.currentPage = 1
 				this.searchType = status
+				this.contractList=[]
 				this.getList()
 			},
 			getList() {
@@ -173,6 +185,7 @@
 					currentPage: this.currentPage,
 					pageSize: this.pageSize,
 					searchType: this.searchType,
+					searchKeyWord:this.searchKeyWord,
 					appFlag: 1,
 				}).then(res => {
 					if (res.data.code) {

+ 3 - 1
pages/dataReport/costbreakdown.vue

@@ -159,7 +159,7 @@
 		},
 		onReachBottom() { //上拉触底函数
 			// if (this.statusFlag == 3) {
-			if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
+			if (!this.show) { //此处判断,上锁,防止重复请求
 				this.pageSize += 1
 				this.currentPage += 1
 				this.getList()
@@ -181,11 +181,13 @@
 				this.getList()
 			},
 			costTypeclick(status) {
+				this.show=false
 				this.currentPage = 1
 				this.costType = status
 				this.getList()
 			},
 			expenseclick(status) {
+				this.show=false
 				this.currentPage = 1
 				this.expensesPurpose = status
 				this.getList()

+ 89 - 10
pages/erp/receivingfeedback/details.vue

@@ -1,7 +1,16 @@
 <template>
 	<view class="wrap">
 		<view>
-			<view style='margin-left:10px;'>任务详情</view>
+			<view class='flex' style='margin-left:10px;justify-content: space-between;align-items: center;'>
+				<view>任务详情</view>
+				<view>
+					<u-search placeholder="输入车牌号" bg-color='#F2F6FA ' shape='square' v-model="carNo" @change='carchange' @custom='search' @clear='clearsearch' :show-action="true"></u-search></view>
+			</view>
+			<view class='flex' style='margin-left:10px;align-items: center;'>
+				<view :class='status1=="0"?"active":""' class='statusitem' @click='statuschange1("0")'>全部</view>
+				<view :class='status1=="1"?"active":""' class='statusitem' @click='statuschange1("1")'>已反馈</view>
+				<view :class='status1=="2"?"active":""' class='statusitem' @click='statuschange1("2")'>未反馈</view>
+			</view>
 			<view class="content">
 				<view class="row">
 					<view class="left">任务编号</view>
@@ -179,7 +188,7 @@
 						<view v-else>暂无图片</view>
 					</view>
 					<view v-else class="pound_list">
-						<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9" :file-list="imgUrl"
+						<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9" :file-list="imgUrl[index]"
 							:size-type="['compressed']" :imgIndex='index' @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
 							@on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
 					</view>
@@ -253,7 +262,7 @@
 						<view v-else>暂无图片</view>
 					</view>
 					<view v-else class="pound_list">
-						<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9" :file-list="imgUrl"
+						<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9" :file-list="imgUrl[index]"
 							:size-type="['compressed']" :imgIndex='index' @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
 							@on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
 					</view>
@@ -350,7 +359,7 @@
 					<image v-for='item in pictureTotal'  @click='shadeshow(item)' style='width:100px;height:100px;' :src="item" mode=""></image>
 				</view>
 				<view v-else>
-					<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9" :file-list="imgUrl"
+					<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9" :file-list="imgUrl[index]"
 						:size-type="['compressed']"  @on-success="getImgUrl1" @on-error="onError" @on-remove="onRemove"
 						@on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
 				</view>
@@ -386,6 +395,7 @@
 				id:'',
 				show1: false,
 				show2: false,
+				carNo:'',
 				currentPage: 1,
 				pageSize: 10,
 				show1:false,
@@ -393,6 +403,7 @@
 				binNumber: "",
 				maxSize: 50 * 1024 * 1024,
 				status: '执行中',
+				status1:'0',
 				positionName: '',
 				statusList: [
 					{name:'执行中',value:1},
@@ -438,6 +449,41 @@
 		    },
 		 },
 		methods: {
+			search(e){
+				this.getList()
+			},
+			clearsearch(){            
+				
+			},
+			carchange(){
+				if(this.carNo==''){
+					this.freightspace=this.detailData.tranCarInfoList
+				}
+			},
+			statuschange1(status){
+				this.status1=status
+				if(status==0){
+					if(this.carNo==''){
+						this.freightspace=this.detailData.tranCarInfoList
+					}else{
+						this.freightspace=this.detailData.carInfoList
+					}
+				}else if(status==1){
+					if(this.carNo==''){
+						var arr=this.detailData.tranCarInfoList
+					}else{
+						var arr=this.detailData.carInfoList
+					}
+					this.freightspace=arr.filter((item)=>{return item.status=='已送达'})
+				}else if(status==2){
+					if(this.carNo==''){
+						var arr=this.detailData.tranCarInfoList
+					}else{
+						var arr=this.detailData.carInfoList
+					}
+					this.freightspace=arr.filter((item)=>{return item.status!='已送达'})
+				}
+			},
 			shadeshow(url){
 				this.imgShow=true
 				this.url=url
@@ -825,10 +871,15 @@
 				}
 			},
 			getList() {
+				uni.showLoading({
+					title:'加载中'
+				})
 				this.$api.doRequest('get', '/tranProcessInfo/getTranProcess', {
-					id:this.id
+					id:this.id,
+					carNo:this.carNo,
 				}).then(res => {
 					if (res.data.code == 200) {
+						uni.hideLoading()
 						this.detailData = res.data.data
 						if(res.data.data.tranType=='火运'){
 							if(res.data.data.tranCarInfoList.length>0){
@@ -843,16 +894,32 @@
 								this.detailData.receiveDateEnd =
 								            res.data.data.tranCarInfoList[0].receiveDateEnd
 								this.detailData.carModel = res.data.data.tranCarInfoList[0].carModel
-								this.freightspace=res.data.data.tranCarInfoList
+								if(this.carNo){
+									this.freightspace=res.data.data.carInfoList
+								}else{
+									this.freightspace=res.data.data.tranCarInfoList
+								}
 							}
 						}else if(res.data.data.tranType=='汽运'){
 							for (var i = 0; i < res.data.data.tranCarInfoList.length; i++) {
+								this.imgUrl[i]=[]
 								res.data.data.tranCarInfoList[i].show2=false
 								if(res.data.data.tranCarInfoList[i].unloadPoundImg){
-									this.imgUrl.push({url:res.data.data.tranCarInfoList[i].unloadPoundImg.split(",")[i]})
+									if(res.data.data.tranCarInfoList[i].unloadPoundImg){
+										var arr=res.data.data.tranCarInfoList[i].unloadPoundImg.split(",")
+										for (var q = 0; q < arr.length; q++) {
+											if(arr[q]!=''){
+												this.imgUrl[i].push({url:arr[q]})
+											}
+										}
+									}
 								}
 							}
-							this.freightspace=res.data.data.tranCarInfoList
+							if(this.carNo){
+								this.freightspace=res.data.data.carInfoList
+							}else{
+								this.freightspace=res.data.data.tranCarInfoList
+							}
 						}else if(res.data.data.tranType=='船运'){
 							if (res.data.data.tranCarInfoList.length > 0) {
 								for (var i = 0; i < res.data.data.tranCarInfoList.length; i++) {
@@ -876,11 +943,16 @@
 							            if(this.detailData.tranCarInfoList[0].unloadPoundImg){
 							              this.pictureTotal =  this.detailData.tranCarInfoList[0].unloadPoundImg.split(",")
 							            }
-							            this.freightspace = res.data.data.tranCarInfoList
+							            if(this.carNo){
+							            	this.freightspace=res.data.data.carInfoList
+							            }else{
+							            	this.freightspace=res.data.data.tranCarInfoList
+							            }
 							          }
 						}
 						
 					}
+					// console.log(this.imgUrl)
 				})
 			},
 			getImgUrl(res1,res2,res3,res4) {
@@ -968,7 +1040,7 @@
 			position: fixed;
 			bottom:0;
 			display: flex;
-			z-index: 2;
+			z-index: 11;
 			left: 0;
 			background-color: #f8f8f8;
 			flex-direction: column;
@@ -1075,4 +1147,11 @@
 	// 	display: flex;
 	// 	z-index: 9999;
 	// }
+	.statusitem{
+		padding:10rpx;
+	}
+	.statusitem.active{
+		background:#19be6b;
+		color:#fff;
+	}
 </style>

+ 22 - 2
pages/reimbursement/request_funds.vue

@@ -22,6 +22,17 @@
 					</view>
 				</view>
 			</view>
+			<view class="c-row" v-if="detailData.purpose == '库点费用'&&reType == 2">
+				<view class="title">仓储费</view>
+				<view class="con-list">
+					<view @click='show3=true'>{{detailData.flag}}
+						<u-icon name="arrow-right" color=""></u-icon>
+					</view>
+				</view>
+			</view>
+			<u-picker :range="typeList1" range-key="value" @confirm='typeCheck1($event)' v-model="show3"
+				mode="selector">
+			</u-picker>
 			<view class="c-row" v-if="detailData.purpose == '库点费用'">
 				<view class="title">类型</view>
 				<view class="con-list">
@@ -146,6 +157,7 @@
 				show2:false,
 				showWare: false,
 				detailData: {
+					flag:'否',
 					purpose: '库点费用',
 					remark: "",
 					wareExpenseType:'杂费',
@@ -166,6 +178,7 @@
 				warehouseType: '1',
 				typeRemark: 'textarea',
 				border: true,
+				show3:false,
 				imglist: [], //存
 				imglist2: [], //展示
 				height: 150,
@@ -180,14 +193,18 @@
 						purpose: "经营性费用"
 					},
 				],
+				typeList1:[
+					{value: "是"},
+					{value: "否"},
+				],
 				typeList:[
 					{value: "杂费"},
 					{value: "电费"},
 					{value: "煤费"},
 					{value: "人工费"},
 				],
-				namelist:[{
-						name: "黑龙江中天昊元贸易有限公司"},
+				namelist:[
+					{name: "黑龙江中天昊元贸易有限公司"},
 					{name: "中天昊元-建发合营"},
 					{name: "中天昊元-六水香合营"},
 					{name: "中天昊元-昊友合营"},
@@ -274,6 +291,9 @@
 			typeCheck(e){
 				this.detailData.wareExpenseType=this.typeList[e[0]].value
 			},
+			typeCheck1(e){
+				this.detailData.flag=this.typeList1[e[0]].value
+			},
 			afterRead(e) {
 				console.log(e)
 			},

+ 7 - 3
pages/user/contractLook/inventoryCost.vue

@@ -3,7 +3,7 @@
 		<view @click='goposition(item)' class="cost-list" v-for="(item,index) in costList">
 			<view style="display: flex;justify-content: space-between;">
 				<view class="title">{{item.warehouseName}}</view>
-				<view class="button" @click="toDetail(item.warehouseName)">详细记录</view>
+				<!-- <view class="button" @click="toDetail(item.warehouseName)">详细记录</view> -->
 			</view>
 
 			<view class="goods-table">
@@ -96,9 +96,13 @@
 		},
 		onNavigationBarButtonTap() {
 			this.parameter.warehouseName = this.costList[0].warehouseName
-		   this.parameter.startDate = helper.getNowFormatDate()
+		   this.parameter.startDate = helper.getNowNumFormatDate(-1)
+		   console.log(this.parameter.startDate)
 		   this.parameter.endDate = helper.getNowFormatDate()
-		   this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelf', {
+		   uni.showLoading({
+		   	title: '正在加载'
+		   })
+		   this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelfApp', {
 		   	compId: uni.getStorageSync('pcUserInfo').compId,
 		   }).then(res => {
 				this.warehouseList=res.data.data

+ 5 - 1
pages/user/newReport.vue

@@ -1700,7 +1700,10 @@
 		display: flex;
 		align-items: center;
 		justify-content: space-evenly;
-		position: relative;
+		position: fixed;
+		top:0;
+		width:100%;
+		z-index:1;
 	}
 
 	.back {
@@ -1770,6 +1773,7 @@
 	}
 
 	.content1 {
+		margin-top:100rpx;
 		.content1-wrap {}
 
 		.row1 {