Browse Source

提交巡检计划,以及海运费价格查询

caojunjie 4 years ago
parent
commit
51b3e65ff7

+ 2 - 0
common/http.interceptor.js

@@ -4,12 +4,14 @@ 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"

+ 2 - 2
manifest.json

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

+ 22 - 0
pages.json

@@ -212,6 +212,28 @@
 					"navigationBarTextStyle": "white"
 			    }
 			    
+			},
+			//巡检
+			{
+			    "path" : "/patrolInspection/index",
+			    "style" :                                                                                    
+			    {
+			        "navigationBarTitleText": "巡检",
+			        "enablePullDownRefresh": false,
+					"navigationBarTextStyle": "white"
+			    }
+			    
+			},
+			//巡检详情
+			{
+			    "path" : "/patrolInspection/patrolDetails",
+			    "style" :                                                                                    
+			    {
+			        "navigationBarTitleText": "巡检详情",
+			        "enablePullDownRefresh": false,
+					"navigationBarTextStyle": "white"
+			    }
+			    
 			}
 		]
 	}],

+ 17 - 13
pages/home/freightCalculation/freightCalculation.vue

@@ -107,6 +107,23 @@
 					text: '40RH'
 				}],
 			};
+		},
+		onLoad(option) {
+			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 => {
+				this.businessList = res.data.billType
+				this.shippingList = res.data.corpList
+				this.businessList.forEach(item => item.text = item.dictLabel)
+				this.shippingList.forEach(item => item.text = item.fName)
+				this.businessList.forEach(item => {
+					if (item.dictLabel == JSON.parse(option.form).fBilltype) {
+						this.form.fBilltype = item.dictValue
+						this.fBilltype = item.dictLabel
+					}
+				})
+			})
+			// this.submit()
 		},
 		created() {
 			this.$u.get('/shipping/address/list', {
@@ -129,19 +146,6 @@
 					})
 				}
 			})
-			this.$u.get('/warehouse/seaprice/appBasicInformation').then(res => {
-				console.log(res)
-				this.businessList = res.data.billType
-				this.shippingList = res.data.corpList
-				this.businessList.forEach(item => item.text = item.dictLabel)
-				this.shippingList.forEach(item => item.text = item.fName)
-				this.businessList.forEach(item => {
-					if (item.dictLabel == '进口') {
-						this.form.fBilltype = item.dictValue
-						this.fBilltype = item.dictLabel
-					}
-				})
-			})
 		},
 		methods: {
 			//查询运费和汇率

+ 38 - 6
pages/home/freightCalculation/shippingInformation.vue

@@ -22,6 +22,11 @@
 			style="width: 100%;position:fixed; bottom:0;background-color: #FFFFFF;padding-left: 20px;padding-right: 20px;padding-bottom: 30rpx;">
 			<u-button type="primary" @click="submit">重新查询</u-button>
 		</view>
+		<view
+		v-if="dataList.length === 0"
+		style="width: 96%;height: 650rpx;margin: 0 auto;border-radius: 10rpx;">
+			<u-empty text="无符合条件的航期" mode="search"></u-empty>
+		</view>
 		<view style="box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);width: 96%;border-top-right-radius: 10rpx;margin: 0 auto;padding-top: 10rpx;"
 		v-for="(item,index) in dataList" :key="index">
 			<span style="width: 10rpx;height: 40rpx;background-color: #2979ff;display: block;float: left;margin-top: 10rpx;"></span>
@@ -62,6 +67,7 @@
 				</view>
 			</view>
 		</view>
+		<u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" />
 	</view>
 </template>
 
@@ -69,7 +75,14 @@
 	export default {
 		data() {
 			return {
-				show: false,
+				show: false,
+				loadText: {
+					loadmore: '轻轻上拉',
+					loading: '努力加载中',
+					nomore: '实在没有了'
+				},
+				iconType: 'flower',
+				status: 'loadmore',
 				mode: 'range',
 				list:{},
 				form: {
@@ -80,7 +93,8 @@
 				dataList:[],
 				destination: false,
 				destinationtwo: false,
-				destinationList: []
+				destinationList: [],
+				total:0
 			}
 		},
 		onLoad(option) {
@@ -88,6 +102,15 @@
 			this.list = JSON.parse(option.list)
 			this.submit()
 		},
+		onReachBottom() {
+			this.status = 'loading'
+			if (this.dataList.length < this.total) {
+				this.form.pageNum++
+				this.query()
+			} else {
+				this.status = 'nomore'
+			}
+		},
 		created() {
 			this.destinationList = []
 			this.$u.get('/shipping/address/selectPortName').then(res => {
@@ -101,6 +124,13 @@
 			})
 		},
 		methods: {
+			query() {
+				this.$u.get('/warehouse/seaprice/queryApp',this.form).then(res=>{
+					this.dataList = this.dataList.concat(res.rows)
+					this.total = res.total
+					if (res.total === 0) this.status = 'nomore'
+				})
+			},
 			change(e) {
 				console.log(e)
 				this.form.fValiddateBegin = e.startDate
@@ -119,14 +149,16 @@
 				// if (!this.form.polId) return this.textTips('请选择起始港')
 				// if (!this.form.podId) return this.textTips('请选择目的港')
 				// if (!this.form.fValiddateBegin || !this.form.fValiddateEnd) return this.textTips('请选择开航日期')
+				this.dataList = []
 				this.$u.get('/warehouse/seaprice/queryApp',this.form).then(res=>{
-					console.log(res)
-					this.dataList = res.rows
+					// console.log(res)
+					this.dataList = this.dataList.concat(res.rows)
 				})
 			},
 			expenseDetails(item){
-				console.log(item)
-				// this.$u.route('/pages/home/freightCalculation/freightCalculation');
+				this.$u.route('/pages/home/freightCalculation/freightCalculation',{
+					form:JSON.stringify(item)
+				});
 			},
 			textTips(text){
 				uni.showToast({

+ 9 - 3
pages/home/home.vue

@@ -51,8 +51,12 @@
 					<u-grid-item @click="jumpPath(6)">
 						<u-icon name="lock" :size="46"></u-icon>
 						<view class="grid-text">海运费计算</view>
+					</u-grid-item>
+					<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(7)">
+					<u-grid-item @click="jumpPath('null')">
 						<u-icon name="grid" :size="46"></u-icon>
 						<view class="grid-text">其他</view>
 					</u-grid-item>
@@ -112,8 +116,10 @@
 						this.$u.route('/pages/home/delivery/index');
 						break;
 					case 6:
-						this.$u.route('/pages/home/freightCalculation/shipSchedule');
-						// this.$u.route('/pages/home/freightCalculation/freightCalculation');
+						this.$u.route('/pages/home/freightCalculation/shipSchedule');
+						break;
+					case 7:
+						this.$u.route('/pages/home/patrolInspection/index');
 						break;
 					default:
 						uni.showToast({

+ 165 - 0
pages/home/patrolInspection/index.vue

@@ -0,0 +1,165 @@
+<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="changetwo"></u-tabs>
+		</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.fInspectorName}}</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.fWarehouseName}}</h4>
+				</view>
+				<view>
+					<view style="width: 100%;height: 60rpx;line-height: 60rpx;">
+						<view style="float: left;">计划日期</view>
+						<view style="float: right;">{{item.fInspectionDatetime}}</view>
+					</view>
+					<view style="width: 100%;height: 60rpx;line-height: 60rpx;">
+						<view style="float: left;">最新巡查日期</view>
+						<view style="float: right;">{{item.fUpdateTime}}</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 :status="status" :icon-type="iconType" :load-text="loadText" />
+		<u-calendar :closeable="false" v-model="show" mode="date" @change="change" :mask-close-able="false"></u-calendar>
+		<u-action-sheet :list="warehouseList" @click="click" @close="close" :mask-close-able="false" v-model="warehouse"></u-action-sheet>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				show: false,
+				status: 'loadmore',
+				warehouseList:[],
+				warehouse:false,
+				loadText: {
+					loadmore: '轻轻上拉',
+					loading: '努力加载中',
+					nomore: '实在没有了'
+				},
+				iconType: 'flower',
+				dataList: [],
+				list: [{
+					name: '全部'
+				}, {
+					name: '仓库'
+				}, {
+					name: '计划日期'
+				}, {
+					name: '今日计划'
+				}],
+				form: {
+					pageNum: 1,
+					pageSize: 10,
+					fInspectionDatetime: new Date().toLocaleDateString().replace(/\//g,"-")
+				},
+				current: 3,
+				total: 0,
+			}
+		},
+		created() {
+			this.query()
+			this.$u.get('/warehouse/check/selectTWarehouseListInCheck').then(res=>{
+				console.log(res)
+				for(let item in res.rows){
+					this.warehouseList.push({
+						text:res.rows[item].fName,
+						fId:res.rows[item].fId
+					})
+				}
+				console.log(this.warehouseList)
+			})
+		},
+		onReachBottom() {
+			this.status = 'loading'
+			if (this.dataList.length < this.total) {
+				this.form.pageNum++
+				this.query()
+			} else {
+				this.status = 'nomore'
+			}
+		},
+		methods: {
+			close(){
+				this.current = null
+			},
+			click(index){
+				console.log(index)
+				this.form.fWarehouseFid = this.warehouseList[index].fId
+				this.dataList = []
+				this.current = null
+				this.query()
+			},
+			query() {
+				// this.current = null
+				this.$u.get('/warehouse/checkitems/listByUser', this.form).then(res => {
+					this.dataList = this.dataList.concat(res.rows)
+					this.total = res.total
+					if (res.total === 0) this.status = 'nomore'
+				})
+			},
+			change(e) {
+				// console.log(e)
+				this.current = null
+				this.form.fInspectionDatetime = e.result
+				this.dataList = []
+				this.query()
+			},
+			changetwo(index) {
+				console.log(index)
+				if (index === 1) this.warehouse = true
+				if (index === 2) this.show = true
+				if (index === 3){
+					this.form.fInspectionDatetime = new Date().toLocaleDateString().replace(/\//g,"-")
+					this.dataList = []
+					this.query()
+				}
+				if (index === 0) {
+					this.form = {
+						pageNum: 1,
+						pageSize: 10
+					}
+				this.query()
+				}
+				this.current = index;
+			},
+			expenseDetails(item) {
+				this.$u.route('/pages/home/patrolInspection/patrolDetails', {
+					form: JSON.stringify(item)
+				});
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.wrap {
+		padding: 24rpx;
+	}
+
+	.item {
+		padding: 24rpx 0;
+		color: $u-content-color;
+		font-size: 28rpx;
+	}
+</style>

+ 152 - 0
pages/home/patrolInspection/patrolDetails.vue

@@ -0,0 +1,152 @@
+<template>
+	<view>
+		<view
+			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: 20rpx;"></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;">2222222</h4> -->
+			<view style="width: 92%;margin: 0 auto;margin: 0 auto;">
+				<view
+					style="display: flex;justify-content: space-between;height: 80rpx;line-height: 80rpx;border-bottom: 1rpx solid #eff4ff;">
+					<h3>基本信息</h3>
+				</view>
+				<view>
+					<view style="width: 100%;height: 60rpx;line-height: 60rpx;">
+						<view style="float: left;">仓库</view>
+						<view style="float: right;">{{form.fWarehouseName}}</view>
+					</view>
+					<view style="width: 100%;height: 60rpx;line-height: 60rpx;">
+						<view style="float: left;">计划日期</view>
+						<view style="float: right;">{{form.fInspectionDatetime}}</view>
+					</view>
+					<view style="width: 100%;height: 60rpx;line-height: 60rpx;">
+						<view style="float: left;">最新巡查日期</view>
+						<view style="float: right;">{{form.fUpdateTime}}</view>
+					</view>
+					<view style="width: 100%;height: 60rpx;line-height: 60rpx;">
+						<view style="float: left;">巡检员</view>
+						<view style="float: right;">{{form.fInspectorName}}</view>
+					</view>
+					<view style="width: 100%;height: 60rpx;line-height: 60rpx;">
+						<view style="float: left;">备注</view>
+						<view style="float: right;">{{form.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>
+		<view
+			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: 20rpx;"></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;">2222222</h4> -->
+			<view style="width: 92%;margin: 0 auto;margin: 0 auto;">
+				<view
+					style="display: flex;justify-content: space-between;height: 80rpx;line-height: 80rpx;border-bottom: 1rpx solid #eff4ff;">
+					<h3>上传附件</h3>
+				</view>
+				<view>
+					<u-upload style="width: 100%;" :action="action" @on-success="success" :file-list="fileList" :header="headers"></u-upload>
+				</view>
+			</view>
+		</view>
+		<view
+			style="width: 100%;position:fixed; bottom:0;background-color: #FFFFFF;padding-left: 20px;padding-right: 20px;padding-bottom: 30rpx;">
+			<u-button type="primary" @click="submit">确认保存</u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				action: this.$u.http.config.baseUrl + '/common/upload',
+				headers: {
+					Authorization: 'Bearer ' + this.$store.state.vuex_token
+				},
+				form: {},
+				fileList: [],
+				pictureEist: [],
+				twarehousecheckdetailList: {}
+			}
+		},
+		onLoad(option) {
+			this.form = JSON.parse(option.form)
+			let scope = {
+				row:JSON.parse(option.form)
+			}
+			this.$u.get('/warehouse/checkitemsdetails/list', {
+				fItemFid: this.form.fId
+			}).then(res => {
+				console.log(res)
+				let data = res.rows
+				if (data.length === 0) {
+					this.twarehousecheckdetailList = {
+						fCheckFid: scope.row.fCheckFid,
+						fItemFid: scope.row.fId,
+						fWarehouseid: scope.row.fWarehouseFid, //仓库名称
+						fCreateTime: '',
+						fInspectorid: '',
+						fRemark: '',
+						fPhotoUrl: []
+					}
+				} else {
+					this.twarehousecheckdetailList = res.rows[0]
+					this.twarehousecheckdetailList.fWarehouseid = scope.row.fWarehouseFid
+					this.fileList = []
+					for (let item in JSON.parse(res.rows[0].fPhotoUrl)) {
+						this.fileList.push(JSON.parse(res.rows[0].fPhotoUrl)[item])
+					}
+				}
+			})
+		},
+		created() {},
+		methods: {
+			submit() {
+				console.log(this.twarehousecheckdetailList)
+				this.twarehousecheckdetailList.fPhotoUrl = []
+				for (let item in this.pictureEist) {
+					if (this.pictureEist[item].response) {
+						this.twarehousecheckdetailList.fPhotoUrl.push({
+							url: this.pictureEist[item].response.url
+						})
+					} else {
+						this.twarehousecheckdetailList.fPhotoUrl.push({
+							url: this.pictureEist[item].url
+						})
+					}
+				}
+				this.twarehousecheckdetailList.fPhotoUrl = JSON.stringify(this.twarehousecheckdetailList.fPhotoUrl)
+				if (!this.twarehousecheckdetailList.fId) {
+					this.$u.post('warehouse/checkitemsdetails', this.twarehousecheckdetailList).then(res => {
+						uni.showToast({
+							icon: 'none',
+							title: '保存成功',
+							position: "bottom"
+						})
+					})
+				} else {
+					this.$u.put('warehouse/checkitemsdetails', this.twarehousecheckdetailList).then(res => {
+						uni.showToast({
+							icon: 'none',
+							title: '保存成功',
+							position: "bottom"
+						})
+					})
+				}
+			},
+			success(data, index, lists, name) {
+				console.log(lists)
+				this.pictureEist = lists
+			}
+		}
+	}
+</script>
+
+<style>
+
+</style>

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/__uniappchooselocation.js


BIN
unpackage/dist/build/app-plus/__uniapperror.png


File diff suppressed because it is too large
+ 0 - 1
unpackage/dist/build/app-plus/app-config-service.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/app-service.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/app-view.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/manifest.json


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/pages/home/app-sub-service.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/view.css


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/view.umd.min.js


File diff suppressed because it is too large
+ 0 - 1
unpackage/dist/dev/app-plus/app-config-service.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/app-plus/app-service.js


File diff suppressed because it is too large
+ 143 - 46
unpackage/dist/dev/app-plus/app-view.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/app-plus/manifest.json


File diff suppressed because it is too large
+ 24 - 3
unpackage/dist/dev/app-plus/pages/home/app-sub-service.js


Some files were not shown because too many files changed in this diff