Selaa lähdekoodia

新增采购已经审核

caojunjie 3 vuotta sitten
vanhempi
commit
6970a9e45e

BIN
.DS_Store


+ 73 - 50
common/http.interceptor.js

@@ -1,20 +1,22 @@
 // 这里的vm,就是我们在vue文件里面的this,所以我们能在这里获取vuex的变量,比如存放在里面的token
 // 同时,我们也可以在此使用getApp().globalData,如果你把token放在getApp().globalData的话,也是可以使用的
-const install = (Vue, vm) => {
-	let baseURL;
-	if(process.env.NODE_ENV === 'development'){
-        baseURL = "https://test.wms.tubaosoft.com/prod-api"
-		// baseURL = "https://zd.tubaosoft.com/prod-api"
-		// baseURL = "http://192.168.1.143:9010"
-		// baseURL = "https://dmu.tubaosoft.com/prod-api"
-		// baseURL = "http://jingang.tubaosoft.com/prod-api"
-		// baseURL = "https://jiyong.tubaosoft.com/prod-api"
-	}
-	if (process.env.NODE_ENV === 'production') {
-		// baseURL = "https://zd.tubaosoft.com/prod-api"
-		baseURL = "https://jiyong.tubaosoft.com/prod-api"
-		// baseURL = "http://jingang.tubaosoft.com/prod-api"
-		// baseURL = "https://dmu.tubaosoft.com/prod-api"
+const install = (Vue, vm) => {
+	let baseURL;
+	if (process.env.NODE_ENV === 'development') {
+		// baseURL = "https://test.wms.tubaosoft.com/prod-api"
+		// baseURL = "https://zd.tubaosoft.com/prod-api"
+		// baseURL = "http://192.168.1.177:9020"
+		baseURL = "https://ap.tubaosoft.com/prod-api"
+		// baseURL = "https://dmu.tubaosoft.com/prod-api"
+		// baseURL = "https://jingang.tubaosoft.com/prod-api"
+		// baseURL = "https://jiyong.tubaosoft.com/prod-api"
+	}
+	if (process.env.NODE_ENV === 'production') {
+		// baseURL = "https://zd.tubaosoft.com/prod-api"
+		// baseURL = "https://jiyong.tubaosoft.com/prod-api"
+		// baseURL = "https://jingang.tubaosoft.com/prod-api"
+		baseURL = "https://ap.tubaosoft.com/prod-api"
+		// baseURL = "https://dmu.tubaosoft.com/prod-api"
 	}
 	Vue.prototype.$u.http.setConfig({
 		baseUrl: baseURL,
@@ -27,58 +29,79 @@ const install = (Vue, vm) => {
 		// }
 	});
 	// 请求拦截,配置Token等参数
-	Vue.prototype.$u.http.interceptor.request = (config) => {
-		if(vm.vuex_token){
-			config.header.Authorization = "Bearer" + " " + vm.vuex_token;
+	Vue.prototype.$u.http.interceptor.request = (config) => {
+		// console.log(config)
+		uni.getNetworkType({
+			success: function(res) {
+				// console.log(res.networkType);
+				if (res.networkType == 'none') {
+					return uni.showModal({
+						title: '警告⚠️',
+						content: '当前无网络请检查网络信号',
+						confirmText:'关闭',
+						showCancel:false
+					});
+				}
+			}
+		});
+		if (vm.vuex_token) {
+			config.header.Authorization = "Bearer" + " " + vm.vuex_token;
 		}
 		// 方式一,存放在vuex的token,假设使用了uView封装的vuex方式,见:https://uviewui.com/guide/globalVariable.html
 		// config.header.token = vm.token;
-		
+
 		// 方式二,如果没有使用uView封装的vuex方法,那么需要使用$store.state获取
 		// config.header.token = vm.$store.state.token;
-		
+
 		// 方式三,如果token放在了globalData,通过getApp().globalData获取
 		// config.header.token = getApp().globalData.username;
-		
+
 		// 方式四,如果token放在了Storage本地存储中,拦截是每次请求都执行的,所以哪怕您重新登录修改了Storage,下一次的请求将会是最新值
 		// const token = uni.getStorageSync('token');
 		// config.header.token = token;
-		
-		return config; 
+
+		return config;
 	}
 	// 响应拦截,判断状态码是否通过
-	Vue.prototype.$u.http.interceptor.response = res => {
-		// console.log(res.code)
+	Vue.prototype.$u.http.interceptor.response = res => {
+		// console.log(res)
 		// 如果把originalData设置为了true,这里得到将会是服务器返回的所有的原始数据
 		// 判断可能变成了res.statueCode,或者res.data.code之类的,请打印查看结果
-		if(res.code == 200) {
-			// 如果把originalData设置为了true,这里return回什么,this.$u.post的then回调中就会得到什么
+		// 如果把originalData设置为了true,这里return回什么,this.$u.post的then回调中就会得到什么
+		if (res.code == 200) {
 			return res;
-		}else if(res.code == 401){
-			uni.showModal({
-				title: '提示',
-				content: '登录状态失效,点击确定重新登录',
-				showCancel: false,
-				success: function(res) {
-					if (res.confirm) {
-						uni.redirectTo({
-							url: '/pages/login/login'
-						});
-					}
-				}
-			});
-			return false
-		} else if(res.code == 500){
-			uni.showToast({
-				icon: 'none',
-				title: res.msg,
-				position: "bottom"
-			})
-			return false
-		}else return false;
+		} else if (res.code == 401) {
+			uni.showModal({
+				title: '提示',
+				content: '登录状态失效,点击确定重新登录',
+				showCancel: false,
+				success: function(res) {
+					if (res.confirm) {
+						uni.redirectTo({
+							url: '/pages/login/login'
+						});
+					}
+				}
+			});
+			return false
+		} else if (res.code == 500) {
+			uni.showToast({
+				icon: 'none',
+				title: res.msg,
+				position: "bottom"
+			})
+			return false
+		} else {
+			uni.showToast({
+				icon: 'none',
+				title: res.msg,
+				position: "bottom"
+			})
+			return false;
+		}
 	}
 }
 
 export default {
 	install
-}
+}

+ 10 - 13
components/yzhua006-update/app-update.vue

@@ -29,8 +29,7 @@
 							<view class="sche-bg-jindu" :style="lengthWidth">
 								<view class="sche-bg-round">
 									<text class="sche-bg-round-text" v-if="schedule">{{schedule}}%</text>
-									<text class="sche-bg-round-text"
-										v-else>{{(downloadedSize/1024/1024).toFixed(2)}}M</text>
+									<text class="sche-bg-round-text" v-else>{{(downloadedSize/1024/1024).toFixed(2)}}M</text>
 								</view>
 							</view>
 						</view>
@@ -114,7 +113,7 @@
 				plus.runtime.getProperty(plus.runtime.appid, function(inf) {
 					vm.version = inf.version
 				});
-				console.log('当前版本', vm.version);
+				// console.log('当前版本', vm.version);
 				vm.getUpdateInfo(); //获取更新信息
 				// #endif
 			},
@@ -130,19 +129,19 @@
 						integer = '2'
 						break;
 					default:
-						console.log('运行在开发者工具上')
+						console.log('运行在其他设备上')
 						break;
 				}
 				vm.$u.get('/appVersion/version/getAppVersion', {
 					integer: integer
 				}).then(res => {
-					console.log(res)
+					// console.log(res)
 					// 这里的返回的数据跟后台约定
 					vm.update_info = {
 						os: uni.getSystemInfoSync().platform,
 						version: res.data.version, //最新版本
 						note: res.data.plus_msg, //升级提示
-						download_url: res.data.url, //下载地址 (微信测试)
+						download_url: res.data.url, //下载地址
 						minimum_Version: res.data.minimum_Version //最低版本
 					};
 					// 循环获取当前设备对应的更新数据
@@ -157,7 +156,7 @@
 					if (!vm.update_info.os) {
 						// 后台未配置当前系统的升级数据
 					} else {
-						console.log('后台返回的当前系统的升级参数', vm.update_info);
+						// console.log('后台返回的当前系统的升级参数', vm.update_info);
 						vm.checkUpdate(); ///检查是否更新
 					}
 				})
@@ -165,7 +164,7 @@
 			// 检查是否更新
 			checkUpdate() {
 				vm.need_update = vm.compareVersion(vm.version, vm.update_info.version); // 检查是否需要升级
-				console.log(vm.need_update)
+				// console.log(vm.need_update)
 				if (vm.need_update) {
 					vm.popup_show = true; //线上版本号大于当前安装的版本号  显示升级框
 					if (vm.tabbar) {
@@ -211,7 +210,7 @@
 					vm.download_wgt() // 安装包/升级包更新
 				} else {
 					plus.runtime.openURL(vm.update_info.download_url, function() { //调用外部浏览器打开更新地址
-						plus.nativeUI.toast("打开错误");
+						plus.nativeUI.toast("升级地址有误,请联系管理员修改");
 					});
 				}
 			},
@@ -222,15 +221,13 @@
 					method: "get"
 				};
 				let dtask = plus.downloader.createDownload(vm.update_info.download_url, options, function(d, status) {
-
 				});
-
 				dtask.addEventListener("statechanged", function(task, status) {
 					if (status === null) {} else if (status == 200) {
 						//在这里打印会不停的执行,请注意,正式上线切记不要在这里打印东西///////////////////////////////////////////////////
 						vm.downstatus = task.state;
 						switch (task.state) {
-							case 3: // 已接收到数据  
+							case 3: // 已接收到数据
 								vm.downloadedSize = task.downloadedSize;
 								let totalSize = 0;
 								if (task.totalSize) {
@@ -239,7 +236,7 @@
 								vm.schedule = parseInt(100 * task.downloadedSize / totalSize);
 								break;
 							case 4:
-								vm.installWgt(task.filename); // 安装wgt包  
+								vm.installWgt(task.filename); // 安装wgt包
 								break;
 						}
 					} else {

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "TuBaoSoft",
     "appid" : "__UNI__38FA993",
     "description" : "",
-    "versionName" : "1.0.7",
-    "versionCode" : 7,
+    "versionName" : "1.0.10",
+    "versionCode" : 10,
     "transformPx" : false,
     "app-plus" : {
         // APP-VUE分包,可提APP升启动速度,2.7.12开始支持,兼容微信小程序分包方案,默认关闭

+ 33 - 0
pages.json

@@ -234,6 +234,39 @@
 					"navigationBarTextStyle": "white"
 			    }
 			    
+			},
+			//我的审核
+			{
+			    "path" : "/myReview/index",
+			    "style" :                                                                                    
+			    {
+			        "navigationBarTitleText": "我的审核",
+			        "enablePullDownRefresh": false,
+					"navigationBarTextStyle": "white"
+			    }
+			    
+			},
+			//采购申请
+			{
+			    "path" : "/procurementApplicationApproval/index",
+			    "style" :                                                                                    
+			    {
+			        "navigationBarTitleText": "采购申请",
+			        "enablePullDownRefresh": false,
+					"navigationBarTextStyle": "white"
+			    }
+			    
+			},
+			//采购申请详情页
+			{
+			    "path" : "/procurementApplicationApproval/detailsOrUpdates",
+			    "style" :                                                                                    
+			    {
+			        "navigationBarTitleText": "采购申请详情页",
+			        "enablePullDownRefresh": false,
+					"navigationBarTextStyle": "white"
+			    }
+			    
 			}
 		]
 	}],

+ 2 - 2
pages/home/delivery/detailed.vue

@@ -48,8 +48,8 @@
 				<view>{{item.goodsName}}/{{item.fWarehouseInformation}}</view>
 			</view>
 			<view class="basic">
-				<view>箱型/箱量</view>
-				<view>{{item.cntrtypes}}/{{item.fCntqty}}</view>
+				<view>箱型/箱量/箱号</view>
+				<view>{{item.fCntrtypes}}/{{item.fCntqty}}/{{item.fCntrno}}</view>
 			</view>
 			<view class="basic" @tap="call_phone(item.fDriverTel)">
 				<view>车号/司机电话</view>

+ 3 - 0
pages/home/delivery/index.vue

@@ -88,6 +88,9 @@
 				}, {
 					text: '出库中',
 					value: '3'
+				}, {
+					text: '已出库',
+					value: '4'
 				}],
 				show: false,
 				suitcase: false,

+ 5 - 0
pages/home/freightCalculation/freightCalculation.vue

@@ -109,6 +109,11 @@
 			};
 		},
 		onLoad(option) {
+			console.log(JSON.parse(option.form))
+			if(JSON.parse(option.form).fLineName) this.fLineName = JSON.parse(option.form).fLineName
+			if(JSON.parse(option.form).fLineid) this.form.fLineid = JSON.parse(option.form).fLineid
+			if(JSON.parse(option.form).fBookagentid) this.form.fBookagentid = JSON.parse(option.form).fBookagentid
+			if(JSON.parse(option.form).fBookagentName) this.fBookagentName = JSON.parse(option.form).fBookagentName
 			if(JSON.parse(option.form).fCorpName) this.fCorpid = JSON.parse(option.form).fCorpName
 			if(JSON.parse(option.form).fCorpid) this.form.fCorpid = JSON.parse(option.form).fCorpid
 			this.$u.get('/warehouse/seaprice/appBasicInformation').then(res => {

+ 1 - 1
pages/home/freightCalculation/shippingInformation.vue

@@ -98,7 +98,7 @@
 			}
 		},
 		onLoad(option) {
-			// this.form = JSON.parse(option.form)
+			this.form = JSON.parse(option.form)
 			this.list = JSON.parse(option.list)
 			this.submit()
 		},

+ 11 - 1
pages/home/home.vue

@@ -16,7 +16,7 @@
 					<u-icon name="order" color="#fff" size="60"></u-icon>
 					<view style="margin-top: 10rpx;color: #FFFFFF;">我的数据</view>
 				</view>
-				<view style="width: 120rpx;text-align: center;" @click="myData">
+				<view style="width: 120rpx;text-align: center;" @click="myReview">
 					<u-icon name="edit-pen" color="#fff" size="60"></u-icon>
 					<view style="margin-top: 10rpx;color: #FFFFFF;">我的审核</view>
 				</view>
@@ -55,6 +55,10 @@
 					<u-grid-item @click="jumpPath(7)">
 						<u-icon name="camera" :size="46"></u-icon>
 						<view class="grid-text">巡检</view>
+					</u-grid-item>
+					<u-grid-item @click="jumpPath(8)">
+						<u-icon name="checkmark-circle" :size="46"></u-icon>
+						<view class="grid-text">我的采购</view>
 					</u-grid-item>
 					<u-grid-item @click="jumpPath('null')">
 						<u-icon name="grid" :size="46"></u-icon>
@@ -121,6 +125,9 @@
 					case 7:
 						this.$u.route('/pages/home/patrolInspection/index');
 						break;
+					case 8:
+						this.$u.route('/pages/home/procurementApplicationApproval/index');
+						break;
 					default:
 						uni.showToast({
 							icon: 'none',
@@ -129,6 +136,9 @@
 						})
 						break;
 				}
+			},
+			myReview(){
+				this.$u.route('/pages/home/myReview/index');
 			},
 			myData() {
 				uni.showToast({

+ 279 - 0
pages/home/myReview/index.vue

@@ -0,0 +1,279 @@
+<template>
+	<view>
+		<view v-for="(item,index) in dataList" :key="index"
+			style="box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);width: 96%;border-top-right-radius: 10rpx;margin: 10rpx auto;padding-top: 10rpx;">
+			<span
+				style="width: 10rpx;height: 40rpx;background-color: #2979ff;display: block;float: left;margin-top: 10rpx;"></span>
+			<h4
+				style="width: 140rpx;border-radius: 200rpx;text-align: center;color: #2979ff;border: 2rpx solid #1785FF;float: right;margin-right: 10rpx;margin-top: 10rpx;">
+				{{item.audit}}
+			</h4>
+			<view style="width: 90%;margin: 0 auto;margin: 0 auto;">
+				<view
+					style="display: flex;justify-content: space-between;height: 60rpx;line-height: 60rpx;border-bottom: 1rpx solid #eff4ff;">
+					<h4>委托方:{{item.refno3}}</h4>
+				</view>
+				<view>
+					<view style="width: 100%;height: 60rpx;line-height: 60rpx;">
+						<view style="float: left;">业务类型</view>
+						<view style="float: right;">{{item.refno2}}</view>
+					</view>
+					<view style="width: 100%;height: 60rpx;line-height: 60rpx;">
+						<view style="float: left;">日期</view>
+						<view style="float: right;">{{item.sendTime}}</view>
+					</view>
+					<view style="width: 100%;height: 60rpx;line-height: 60rpx;">
+						<view style="float: left;">审核人</view>
+						<view style="float: right;">{{item.auditUserName}}</view>
+					</view>
+					<view style="width: 100%;height: 60rpx;line-height: 60rpx;">
+						<view style="float: left;">审核日期</view>
+						<view style="float: right;">
+							{{item.auditOpTime ? item.auditOpTime.slice(0,10) : item.auditOpTime}}
+						</view>
+					</view>
+					<view style="width: 100%;height: 60rpx;line-height: 60rpx;">
+						<view style="float: left;">提交人</view>
+						<view style="float: right;">{{item.sendName}}</view>
+					</view>
+				</view>
+				<view
+					style="width: 100%;margin: 0 auto;height: 80rpx;margin: 0 auto;line-height: 80rpx;border-top: 1rpx solid #eff4ff;"
+					@click="expenseDetails(item)">
+					<view style="float: left;">
+						<h3>立即审核业务</h3>
+					</view>
+					<view style="float: right;">
+						<u-icon name="arrow-right"></u-icon>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				dataList: []
+			}
+		},
+		// created() {
+		// 	this.$u.get('/warehouse/paths/selectAuditItems').then(res => {
+		// 		res.data.map((e) => {
+		// 			if (e.sendTime) {
+		// 				e.sendTime = e.sendTime.slice(0, 10);
+		// 			}
+		// 			if (e.refno2) {
+		// 				switch (e.refno2) {
+		// 					case "SJRK": {
+		// 						e.refno2 = "入库"
+		// 						break;
+		// 					}
+		// 					case "SJCK": {
+		// 						e.refno2 = "出库"
+		// 						break;
+		// 					}
+		// 					case "HQZY": {
+		// 						e.refno2 = "货转"
+		// 						break;
+		// 					}
+		// 					case "CKDB": {
+		// 						e.refno2 = "调拨"
+		// 						break;
+		// 					}
+		// 					case "HWTG": {
+		// 						e.refno2 = "货物通关"
+		// 						break;
+		// 					}
+		// 					case "JSCCF": {
+		// 						e.refno2 = "计算仓储费"
+		// 						break;
+		// 					}
+		// 					case "CCF": {
+		// 						e.refno2 = "仓储费"
+		// 						break;
+		// 					}
+		// 					case "ZYF": {
+		// 						e.refno2 = "作业费"
+		// 						break;
+		// 					}
+		// 					case "SF": {
+		// 						e.refno2 = "收费"
+		// 						break;
+		// 					}
+		// 					case "DZ": {
+		// 						e.refno2 = "对账"
+		// 						break;
+		// 					}
+		// 					case "FF": {
+		// 						e.refno2 = "付费"
+		// 						break;
+		// 					}
+		// 					case "SE": {
+		// 						e.refno2 = "下单配船"
+		// 						break;
+		// 					}
+		// 					case "ApplyFP": {
+		// 						e.refno2 = "凯合开票申请"
+		// 						break;
+		// 					}
+		// 					case "KHDZ": {
+		// 						e.refno2 = "凯合对账"
+		// 						break;
+		// 					}
+		// 					case "KHSF": {
+		// 						e.refno2 = "凯合收费"
+		// 						break;
+		// 					}
+		// 					case "KHFF": {
+		// 						e.refno2 = "凯合付费"
+		// 						break;
+		// 					}
+		// 					case "KHDD": {
+		// 						e.refno2 = "凯合订单"
+		// 						break;
+		// 					}
+		// 					case "XS": {
+		// 						e.refno2 = "销售出库"
+		// 						break;
+		// 					}
+		// 					case "SQ": {
+		// 						e.refno2 = "采购申请"
+		// 						break;
+		// 					}
+		// 					case "XMGL": {
+		// 						e.refno2 = "项目管理"
+		// 						break;
+		// 					}
+		// 					default: {
+		// 						return this.$message.error("未知错误,无状态");
+		// 					}
+		// 				}
+		// 			}
+		// 		})
+		// 		this.dataList = res.data
+		// 	})
+		// },
+		onShow() {
+			this.$u.get('/warehouse/paths/selectAuditItems').then(res => {
+				res.data.map((e) => {
+					if (e.sendTime) {
+						e.sendTime = e.sendTime.slice(0, 10);
+					}
+					if (e.refno2) {
+						switch (e.refno2) {
+							case "SJRK": {
+								e.refno2 = "入库"
+								break;
+							}
+							case "SJCK": {
+								e.refno2 = "出库"
+								break;
+							}
+							case "HQZY": {
+								e.refno2 = "货转"
+								break;
+							}
+							case "CKDB": {
+								e.refno2 = "调拨"
+								break;
+							}
+							case "HWTG": {
+								e.refno2 = "货物通关"
+								break;
+							}
+							case "JSCCF": {
+								e.refno2 = "计算仓储费"
+								break;
+							}
+							case "CCF": {
+								e.refno2 = "仓储费"
+								break;
+							}
+							case "ZYF": {
+								e.refno2 = "作业费"
+								break;
+							}
+							case "SF": {
+								e.refno2 = "收费"
+								break;
+							}
+							case "DZ": {
+								e.refno2 = "对账"
+								break;
+							}
+							case "FF": {
+								e.refno2 = "付费"
+								break;
+							}
+							case "SE": {
+								e.refno2 = "下单配船"
+								break;
+							}
+							case "ApplyFP": {
+								e.refno2 = "凯合开票申请"
+								break;
+							}
+							case "KHDZ": {
+								e.refno2 = "凯合对账"
+								break;
+							}
+							case "KHSF": {
+								e.refno2 = "凯合收费"
+								break;
+							}
+							case "KHFF": {
+								e.refno2 = "凯合付费"
+								break;
+							}
+							case "KHDD": {
+								e.refno2 = "凯合订单"
+								break;
+							}
+							case "XS": {
+								e.refno2 = "销售出库"
+								break;
+							}
+							case "SQ": {
+								e.refno2 = "采购申请"
+								break;
+							}
+							case "XMGL": {
+								e.refno2 = "项目管理"
+								break;
+							}
+							default: {
+								return this.$message.error("未知错误,无状态");
+							}
+						}
+					}
+				})
+				this.dataList = res.data
+			})
+		},
+		methods: {
+			expenseDetails(item) {
+				switch (item.refno4) {
+					case 'SQ':
+						this.$u.route('/pages/home/procurementApplicationApproval/detailsOrUpdates', {
+							form: JSON.stringify(item),
+							toExamine: JSON.stringify(true)
+						});
+						break
+					default:
+						return uni.showToast({
+							icon: 'none',
+							title: '该单据暂不能在APP上审核',
+							position: "center"
+						})
+						break
+				}
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+</style>

+ 2 - 2
pages/home/myorder/detailed.vue

@@ -48,8 +48,8 @@
 				<view>{{item.goodsName}}/{{item.fWarehouseInformation}}</view>
 			</view>
 			<view class="basic">
-				<view>箱型/箱量</view>
-				<view>{{item.fCntrtypes}}/{{item.fCntqty}}</view>
+				<view>箱型/箱量/箱号</view>
+				<view>{{item.fCntrtypes}}/{{item.fCntqty}}/{{item.fCntrno}}</view>
 			</view>
 			<view class="basic" @tap="call_phone(item.fDriverTel)">
 				<view>车号/司机电话</view>

+ 4 - 1
pages/home/myorder/index.vue

@@ -89,6 +89,9 @@
 				}, {
 					text: '入库中',
 					value: '3'
+				}, {
+					text: '已入库',
+					value: '4'
 				}],
 				show: false,
 				suitcase: false,
@@ -201,7 +204,7 @@
 			},
 			query() {
 				this.$u.get('/warehouseBusiness/applets/inStockList', this.queryParams).then(res => {
-					console.log(res)
+					// console.log(res)
 					if (res.code == 500) {
 						uni.showToast({
 							icon: 'none',

+ 1 - 1
pages/home/patrolInspection/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<view style="box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);margin-bottom: 20rpx;">
+		<view style="box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);margin-bottom: 20rpx">
 			<u-tabs :list="list" :is-scroll="false" :current="current" @change="changetwo"></u-tabs>
 		</view>
 		<view v-for="(item,index) in dataList" :key="index"

+ 234 - 0
pages/home/procurementApplicationApproval/detailsOrUpdates.vue

@@ -0,0 +1,234 @@
+<template>
+	<view>
+		<u-table style="margin-bottom: 100rpx;" v-if="dataList.length > 0">
+			<u-tr>
+				<u-th width="80rpx">序号</u-th>
+				<u-th>品名</u-th>
+				<u-th>规格</u-th>
+				<u-th>采购数量</u-th>
+				<u-th>计量单位</u-th>
+				<u-th>备注</u-th>
+			</u-tr>
+			<u-tr v-for="(item,index) in dataList" :key="index">
+				<u-td class="fixedList" width="80rpx">{{index+1}}</u-td>
+				<u-td class="fixedList"><text @click="tips(item.feeName)">{{item.feeName}}</text></u-td>
+				<u-td class="fixedList"><text @click="tips(item.fCurrencyName)">{{item.fCurrencyName}}</text></u-td>
+				<u-td class="fixedList"><text @click="tips(item.fPurchase)">{{item.fPurchase}}</text></u-td>
+				<u-td class="fixedList"><text @click="tips(item.fFeeunitName)">{{item.fFeeunitName}}</text></u-td>
+				<u-td class="fixedList"><text @click="tips(item.remark)">{{item.remark}}</text></u-td>
+			</u-tr>
+		</u-table>
+		<u-empty v-else style="width: 50%;
+			margin: 0 auto;
+			height: 220rpx;
+			align-items: center;
+			position: absolute;
+			top: 45%;
+			left: 50%;
+			transform:translate(-50%,-50%)" text="列表为空" mode="data"></u-empty>
+		<view v-if="toExamine == true"
+			style="width: 100%;position:fixed; bottom:0rpx;background-color: #FFFFFF;padding-left: 40rpx;padding-right: 40rpx;margin-bottom: 30rpx;margin-top: 100rpx;">
+			<view style="float: left;width: 49%;">
+				<u-button type="primary" @click="appToExamine(true)">审核通过</u-button>
+			</view>
+			<view style="float: right;width: 49%;">
+				<u-button type="primary" @click="appToExamine(false)">审核拒绝</u-button>
+			</view>
+		</view>
+		<view v-else-if="this.deptName == '外部用户'"
+			style="width: 100%;position:fixed; bottom:0rpx;background-color: #FFFFFF;padding-left: 40rpx;padding-right: 40rpx;margin-bottom: 30rpx;margin-top: 100rpx;">
+			<view style="float: left;width: 49%;">
+				<u-button type="primary" @click="appCheckCode(true)">接单</u-button>
+			</view>
+			<view style="float: right;width: 49%;">
+				<u-button type="primary" @click="appCheckCode(false)">拒绝</u-button>
+			</view>
+		</view>
+		<u-modal v-model="show" :title="title" :show-cancel-button="true" :content-style="{margin: '40rpx auto'}"
+			@confirm="confirm">
+			<view class="slot-content">
+				<rich-text v-if="tpye == true && dataList.length > 0" :nodes="content" style="text-align: center;">
+				</rich-text>
+				<u-form v-else style="width: 90%;margin: 0 auto;">
+					<u-form-item label="拒绝理由:" label-width="130rpx">
+						<u-input height="20rpx" :clearable="false" type="textarea" v-model="value" />
+					</u-form-item>
+				</u-form>
+			</view>
+		</u-modal>
+		<u-modal v-model="showTwo" :title="titleTwo" :show-cancel-button="true" :content-style="{margin: '40rpx auto'}"
+			@confirm="confirmTwo">
+			<view class="slot-content">
+				<!-- <rich-text v-if="ToExamineType == true && dataList.length > 0" :nodes="content" style="text-align: center;"></rich-text> -->
+				<u-form v-if="ToExamineType == true && dataList.length > 0" style="width: 90%;margin: 0 auto;">
+					<u-form-item label="同意意见:" label-width="130rpx">
+						<u-input height="20rpx" :clearable="false" type="textarea" v-model="valueTwo" />
+					</u-form-item>
+				</u-form>
+				<u-form v-else style="width: 90%;margin: 0 auto;">
+					<u-form-item label="拒绝理由:" label-width="130rpx">
+						<u-input height="20rpx" :clearable="false" type="textarea" v-model="valueTwo" />
+					</u-form-item>
+				</u-form>
+			</view>
+		</u-modal>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				show: false,
+				showTwo: false,
+				title: '',
+				titleTwo: '',
+				value: '',
+				valueTwo: '',
+				content: `是否接单`,
+				dataList: [],
+				form: {},
+				textw: false,
+				deptName: '',
+				tpye: '',
+				ToExamineType: '',
+				toExamine: false,
+			};
+		},
+		onLoad(option) {
+			this.deptName = uni.getStorageSync('deptName')
+			// console.log(uni.getStorageSync('deptName'))
+			this.toExamine = JSON.parse(option.toExamine)
+			console.log(JSON.parse(option.form))
+			this.formData = JSON.parse(option.form)
+			let data = this.toExamine == true ? JSON.parse(option.form).billId : JSON.parse(option.form).fId
+			this.$u.get('/anPin/anPinApp/' + data).then(res => {
+				// console.log(res)
+				this.form = res.data.warehouseBills
+				this.dataList = res.data.tWarehousebillsfees
+			})
+		},
+		methods: {
+			tips(text) {
+				console.log(this.textw)
+				uni.showToast({
+					icon: 'none',
+					title: text,
+					position: "center"
+				})
+			},
+			appCheckCode(tpye) {
+				this.tpye = tpye
+				this.show = true
+				if (tpye == true) {
+					this.title = '提示'
+				} else {
+					this.title = '是否拒绝'
+				}
+			},
+			confirm() {
+				if (this.tpye == false) {
+					if (this.value) {
+						this.operationSucceeded()
+					} else {
+						this.show = true
+						uni.showToast({
+							icon: 'none',
+							title: '请填写拒绝理由',
+							position: "center"
+						})
+					}
+				} else {
+					this.operationSucceeded()
+				}
+			},
+			appToExamine(ToExamineType) {
+				console.log(ToExamineType)
+				this.ToExamineType = ToExamineType
+				this.showTwo = true
+				if (ToExamineType == true) {
+					this.titleTwo = '确认同意'
+				} else {
+					this.titleTwo = '确认拒绝'
+				}
+			},
+			confirmTwo() {
+				if (this.ToExamineType == false) {
+					if (this.valueTwo) {
+						this.$u.post('/warehouse/paths/approvalRejected', {
+							actId: 520,
+							auditItem: new Date().getFullYear() + '-' + Number(new Date().getMonth()+1) + '-' + new Date().getDate(),
+							auditMsg: this.valueTwo,
+							auditUserId: uni.getStorageSync('userId'),
+							billId: this.form.fId,
+							id: this.form.fId
+						}).then(res => {
+							uni.navigateBack();
+						})
+					} else {
+						this.showTwo = true
+						uni.showToast({
+							icon: 'none',
+							title: '请填写拒绝理由',
+							position: "center"
+						})
+					}
+				} else {
+					// let tiem = moment(Date.parse(new Date())).format('YYYY-MM-DD')
+					if (this.valueTwo) {
+						this.$u.post('/warehouse/paths/approved', {
+							actId: 520,
+							auditItem: new Date().getFullYear() + '-' + Number(new Date().getMonth()+1) + '-' + new Date().getDate(),
+							auditMsg: this.valueTwo,
+							auditUserId: uni.getStorageSync('userId'),
+							billId: this.form.fId,
+							id: this.form.fId
+						}).then(res => {
+							uni.navigateBack();
+						})
+					} else {
+						this.showTwo = true
+						uni.showToast({
+							icon: 'none',
+							title: '请填写同意意见',
+							position: "center"
+						})
+					}
+				}
+			},
+			approve(type) {
+				if (type == true) {} else {
+					this.$u.post('/warehouse/paths/approvalRejected', {}).then(res => {
+						console.log(res)
+						// uni.navigateBack();
+					})
+				}
+			},
+			operationSucceeded() {
+				this.$u.post('/anPin/anPinApp/updateMessage', {
+					fTakeOrders: this.tpye == true ? 1 : 2,
+					fId: this.form.fId,
+					fReason: this.value,
+				}).then(res => {
+					uni.showToast({
+						icon: 'none',
+						title: '操作成功',
+						position: "center"
+					})
+					uni.navigateBack();
+				})
+			}
+		}
+	};
+</script>
+
+<style scoped lang="scss">
+	.fixedList {
+		height: 62rpx;
+		white-space: nowrap;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		display: block;
+		z-index: 1;
+	}
+</style>

+ 200 - 0
pages/home/procurementApplicationApproval/index.vue

@@ -0,0 +1,200 @@
+<template>
+	<view>
+		<view style="box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);margin-bottom: 20rpx">
+			<u-tabs :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
+		</view>
+		<u-action-sheet :list="whetherList" v-model="whetherShow" @click="whetherClick" @close="whetherClose">
+		</u-action-sheet>
+		<u-calendar v-model="timeInterval" mode="range" max-date="2050" @change="timeIntervalChange" :mask-close-able="false" :closeable="false"></u-calendar>
+		<view v-for="(item,index) in dataList" :key="index" style="box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);width: 96%;border-top-right-radius: 10rpx;margin: 10rpx auto;padding-top: 10rpx;">
+			<span style="width: 10rpx;height: 40rpx;background-color: #2979ff;display: block;float: left;margin-top: 10rpx;"></span>
+			<h4 style="width: 140rpx;border-radius: 200rpx;text-align: center;color: #2979ff;border: 2rpx solid #1785FF;float: right;margin-right: 10rpx;margin-top: 10rpx;">
+				{{item.fBillstatusName}}
+			</h4>
+			<view style="width: 90%;margin: 0 auto;margin: 0 auto;">
+				<view style="display: flex;justify-content: space-between;height: 60rpx;line-height: 60rpx;border-bottom: 1rpx solid #eff4ff;">
+					<h4>系统编号:{{item.fBillno}}</h4>
+				</view>
+				<view>
+					<view style="width: 100%;height: 60rpx;line-height: 60rpx;">
+						<view style="float: left;">提货日期</view>
+						<view style="float: right;">{{item.fBsdate}}</view>
+					</view>
+					<view style="width: 100%;height: 60rpx;line-height: 60rpx;">
+						<view style="float: left;">项目名称</view>
+						<view style="float: right;">{{item.projectName}}</view>
+					</view>
+					<view style="width: 100%;height: 60rpx;line-height: 60rpx;">
+						<view style="float: left;">申请人</view>
+						<view style="float: right;">{{item.createBy}}</view>
+					</view>
+					<view style="width: 100%;height: 60rpx;line-height: 60rpx;">
+						<view style="float: left;">申请日期</view>
+						<view style="float: right;">{{item.createTime}}</view>
+					</view>
+					<view style="width: 100%;height: 60rpx;line-height: 60rpx;">
+						<view style="float: left;">是否接单</view>
+						<view style="float: right;">{{item.fTakeOrders==0?'待接单':item.fTakeOrders==1?'已接单':'已拒绝'}}</view>
+					</view>
+					<view style="width: 100%;height: 60rpx;line-height: 60rpx;" v-if="item.fTakeOrders == '2'">
+						<view style="float: left;">拒绝理由</view>
+						<view style="float: right;">{{item.fReason}}</view>
+					</view>
+					<view style="width: 100%;height: 60rpx;line-height: 60rpx;">
+						<view style="float: left;">备注</view>
+						<view style="float: right;">{{item.remark}}</view>
+					</view>
+				</view>
+				<view
+					style="width: 100%;margin: 0 auto;height: 80rpx;margin: 0 auto;line-height: 80rpx;border-top: 1rpx solid #eff4ff;"
+					@click="expenseDetails(item)">
+					<view style="float: left;">
+						<h3>查看详情</h3>
+					</view>
+					<view style="float: right;">
+						<u-icon name="arrow-right"></u-icon>
+					</view>
+				</view>
+			</view>
+		</view>
+		<u-loadmore v-if="total > 0" :status="status" :icon-type="iconType" :load-text="loadText" />
+		<u-empty v-else style="width: 50%;
+			margin: 0 auto;
+			height: 220rpx;
+			align-items: center;
+			position: absolute;
+			top: 45%;
+			left: 50%;
+			transform:translate(-50%,-50%)" text="无申请数据" mode="data"></u-empty>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				timeInterval: false,
+				whetherList: [{
+					text: '待接单',
+					value: 0
+				}, {
+					text: '已接单',
+					value: 1
+				}, {
+					text: '已拒绝',
+					value: 2
+				}],
+				whetherShow: false,
+				list: [{
+					name: '全部'
+				}, {
+					name: '是否接单'
+				}, {
+					name: '提货日期'
+				}],
+				current: 0,
+				dataList: [],
+				status: 'loadmore',
+				total: 0,
+				loadText: {
+					loadmore: '轻轻上拉',
+					loading: '努力加载中',
+					nomore: '实在没有了'
+				},
+				form: {
+					pageNum: 1,
+					pageSize: 5,
+				},
+				iconType: 'flower',
+				deptName: ''
+			}
+		},
+		created() {
+			this.deptName = uni.getStorageSync('deptName')
+			if (this.deptName == '外部用户') {
+				this.$u.get('/anPin/anPinApp/supplier', this.form).then(res => {
+					this.dataList = res.rows
+					this.total = res.total
+				})
+			} else {
+				this.$u.get('/anPin/anPinApp/list', this.form).then(res => {
+					this.dataList = res.rows
+					this.total = res.total
+				})
+			}
+		},
+		methods: {
+			change(index) {
+				this.current = index
+				if (index == 1) {
+					this.whetherShow = true
+				} else if (index == 2) {
+					this.timeInterval = true
+				} else if (index == 0) {
+					this.form = {
+						pageNum: 1,
+						pageSize: 10,
+					}
+					this.dataList = []
+					this.query()
+				}
+			},
+			timeIntervalChange(e) {
+				this.form = {
+					pageNum: 1,
+					pageSize: 10,
+					timeInterval:[e.startDate,e.endDate]
+				}
+				this.dataList = []
+				this.current = null;
+				this.query()
+			},
+			whetherClick(index) {
+				this.form = {
+					pageNum: 1,
+					pageSize: 10,
+					fTakeOrders: this.whetherList[index].value
+				}
+				this.dataList = []
+				this.current = null;
+				this.query()
+			},
+			whetherClose() {
+				this.current = null;
+			},
+			onReachBottom() {
+				this.status = 'loading'
+				if (this.dataList.length < this.total) {
+					this.form.pageNum++
+					this.query()
+				} else {
+					this.status = 'nomore'
+				}
+			},
+			query() {
+				if (this.deptName == '外部用户') {
+					this.$u.get('/anPin/anPinApp/supplier', this.form).then(res => {
+						this.dataList = this.dataList.concat(res.rows)
+						this.total = res.total
+						if (res.total === 0) this.status = 'nomore'
+					})
+				} else {
+					this.$u.get('/anPin/anPinApp/list', this.form).then(res => {
+						this.dataList = this.dataList.concat(res.rows)
+						this.total = res.total
+						if (res.total === 0) this.status = 'nomore'
+					})
+				}
+			},
+			expenseDetails(item) {
+				this.$u.route('/pages/home/procurementApplicationApproval/detailsOrUpdates', {
+					form: JSON.stringify(item),
+					toExamine: JSON.stringify(false)
+				})
+			}
+		}
+	}
+</script>
+
+<style>
+</style>

+ 21 - 16
pages/login/login.vue

@@ -39,15 +39,15 @@
 			return {
 				phone: '', //手机号码
 				pwd: '', //密码
-				checked: false,
-				lifeData:{}
+				checked: false,
+				lifeData: {}
 			}
 		},
 		onShow() {
 			//清除本地缓存
-			// uni.clearStorageSync();
-			uni.removeStorageSync('lifeData');
-			this.$u.vuex('vuex_token', '');
+			// uni.clearStorageSync();
+			uni.removeStorageSync('lifeData');
+			this.$u.vuex('vuex_token', '');
 			console.log(uni.getStorageSync('lifeData'))
 			this.phone = uni.getStorageSync('username')
 			this.pwd = uni.getStorageSync('password')
@@ -60,7 +60,7 @@
 				console.log(e)
 			},
 			//当前登录按钮操作
-			login() {
+			login() {
 				let this_ = this
 				this_.$u.post('/login', {
 					username: this_.phone,
@@ -73,8 +73,8 @@
 							uni.setStorageSync('password', this_.pwd);
 						}
 						this_.lifeData = {
-							vuex_token:res.token,
-							vuex_user:this_.phone
+							vuex_token: res.token,
+							vuex_user: this_.phone
 						}
 						uni.setStorage({
 							key: 'lifeData',
@@ -91,14 +91,19 @@
 						// console.log(uni.getStorageSync('lifeData'))
 					}
 				})
-			},
-			cacheData(){
-				this.$u.vuex('vuex_token', this.lifeData.vuex_token);
-				// console.log(this.vuex_token)
-				//跳转页面为tabBar页面
-				uni.switchTab({
-					url: '/pages/home/home'
-				})
+			},
+			cacheData() {
+				this.$u.vuex('vuex_token', this.lifeData.vuex_token);
+				// console.log(this.vuex_token)
+				this.$u.get('/getInfo').then(res => {
+					// console.log(res)
+					uni.setStorageSync('deptName', res.user.dept.deptName);
+					uni.setStorageSync('userId', res.user.userId);
+					//跳转页面为tabBar页面
+					uni.switchTab({
+						url: '/pages/home/home'
+					})
+				})
 			}
 		}
 	};

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 1
unpackage/dist/build/app-plus/app-config-service.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
unpackage/dist/build/app-plus/app-service.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
unpackage/dist/build/app-plus/app-view.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
unpackage/dist/build/app-plus/manifest.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
unpackage/dist/build/app-plus/pages/home/app-sub-service.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 1
unpackage/dist/dev/app-plus/app-config-service.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
unpackage/dist/dev/app-plus/app-service.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 122 - 37
unpackage/dist/dev/app-plus/app-view.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
unpackage/dist/dev/app-plus/manifest.json


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 26 - 5
unpackage/dist/dev/app-plus/pages/home/app-sub-service.js


+ 1 - 1
uview-ui/libs/request/index.js

@@ -109,7 +109,7 @@ class Request {
 			dataType: 'json',
 			// 此参数无需处理,因为5+和支付宝小程序不支持,默认为text即可
 			responseType: 'text',
-			showLoading: false, // 是否显示请求中的loading
+			showLoading: true, // 是否显示请求中的loading
 			loadingText: '加载中...',
 			loadingTime: 800, // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
 			timer: null, // 定时器

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä