lhl 1 year ago
parent
commit
a5aa5a4085

File diff suppressed because it is too large
+ 329 - 146
package-lock.json


+ 41 - 40
package.json

@@ -1,41 +1,42 @@
 {
-  "name": "jzpc",
-  "version": "0.1.0",
-  "private": true,
-  "scripts": {
-    "serve": "vue-cli-service serve",
-    "build": "vue-cli-service build",
-    "dev": "npm run serve"
-  },
-  "dependencies": {
-    "axios": "^0.21.1",
-    "core-js": "^2.6.5",
-    "element-china-area-data": "^6.0.2",
-    "element-ui": "^2.15.6",
-    "qrcode": "^1.5.3",
-    "save": "^2.9.0",
-    "vue": "^2.6.10",
-    "vue-clipboard2": "^0.3.3",
-    "vue-monoplasty-slide-verify": "^1.3.1",
-    "vue-qr": "^4.0.9",
-    "vue-qrcode": "^2.2.0",
-    "vue-router": "^3.0.3",
-    "vuex": "^3.0.1"
-  },
-  "devDependencies": {
-    "@vue/cli-plugin-babel": "^3.12.0",
-    "@vue/cli-service": "^3.12.0",
-    "node-sass": "^4.12.0",
-    "sass-loader": "^8.0.0",
-    "vue-template-compiler": "^2.6.10"
-  },
-  "postcss": {
-    "plugins": {
-      "autoprefixer": {}
-    }
-  },
-  "browserslist": [
-    "> 1%",
-    "last 2 versions"
-  ]
-}
+	"name": "jzpc",
+	"version": "0.1.0",
+	"private": true,
+	"scripts": {
+		"serve": "vue-cli-service serve",
+		"build": "vue-cli-service build",
+		"dev": "npm run serve",
+		"qianger": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve"
+	},
+	"dependencies": {
+		"axios": "^0.21.1",
+		"core-js": "^2.6.5",
+		"element-china-area-data": "^6.0.2",
+		"element-ui": "^2.15.6",
+		"qrcode": "^1.5.3",
+		"save": "^2.9.0",
+		"vue": "^2.6.10",
+		"vue-clipboard2": "^0.3.3",
+		"vue-monoplasty-slide-verify": "^1.3.1",
+		"vue-qr": "^4.0.9",
+		"vue-qrcode": "^2.2.0",
+		"vue-router": "^3.0.3",
+		"vuex": "^3.0.1"
+	},
+	"devDependencies": {
+		"@vue/cli-plugin-babel": "^3.12.0",
+		"@vue/cli-service": "^3.12.0",
+		"node-sass": "^4.12.0",
+		"sass-loader": "^8.0.0",
+		"vue-template-compiler": "^2.6.10"
+	},
+	"postcss": {
+		"plugins": {
+			"autoprefixer": {}
+		}
+	},
+	"browserslist": [
+		"> 1%",
+		"last 2 versions"
+	]
+}

+ 2 - 2
src/components/navTop/navTop.vue

@@ -15,8 +15,8 @@
 					<div class="hand u-name" @click="navto('/user/setUserinfo')">
 						{{userInfo.username}}
 					</div>
-					<div class="hand u-name" v-if="userInfo.address">
-						{{userInfo.address}}
+					<div class="hand u-name" @click="navto('/user/setUserinfo')">
+						余额:{{(userInfo.money*1).toFixed(2)}}
 					</div>
 					<div class="hand u-name" @click="logout" style="color: #ff4d4f;">
 						退出

+ 79 - 67
src/views/order/orderList.vue

@@ -80,7 +80,8 @@
 				</el-table-column>
 				<el-table-column fixed="right" label="操作" width="250">
 					<template slot-scope="scope">
-						<div class="flex" style="width: 250px;justify-content: center;align-items: center;flex-direction: column;">
+						<div class="flex"
+							style="width: 250px;justify-content: center;align-items: center;flex-direction: column;">
 							<i class="el-icon-loading" style="font-size: 30px;" v-if="scope.row.loading"></i>
 							<div class="flex">
 								<el-button v-if="scope.row.status > 2"
@@ -89,16 +90,16 @@
 								<template v-if="scope.row.status <= 4">
 									<el-button v-if="showBtn(scope.row.refund_time_check) && scope.row.status > 2"
 										@click="handleOrder('您确定立即申请退货?',scope.row)" type="primary">退货</el-button>
-									<el-button v-else
-										type="danger">退货</el-button>
+									<el-button v-else type="danger">退货</el-button>
 								</template>
 							</div>
-							
-							
-							<el-tag type="danger" v-if="scope.row.tag" style="margin-top: 10px;">{{scope.row.tag}}</el-tag>	
-								
+
+
+							<el-tag type="danger" v-if="scope.row.tag"
+								style="margin-top: 10px;">{{scope.row.tag}}</el-tag>
+
 						</div>
-						
+
 					</template>
 				</el-table-column>
 			</el-table>
@@ -123,20 +124,12 @@
 				<el-button type="primary" @click="goBuy">确 定</el-button>
 			</div>
 		</el-dialog>
-		<el-dialog
-		  title="物流进度"
-		  :visible.sync="logProgDialogVisible"
-		  width="30%"
-		>
-		  <el-timeline>
-		    <el-timeline-item
-		      v-for="(activity, index) in logProgInfo"
-		      :key="index"
-		      :timestamp="activity.time"
-		    >
-		      {{ activity.context }}
-		    </el-timeline-item>
-		  </el-timeline>
+		<el-dialog title="物流进度" :visible.sync="logProgDialogVisible" width="30%">
+			<el-timeline>
+				<el-timeline-item v-for="(activity, index) in logProgInfo" :key="index" :timestamp="activity.time">
+					{{ activity.context }}
+				</el-timeline-item>
+			</el-timeline>
 		</el-dialog>
 		<div class="mb" v-if="yjloading"></div>
 	</div>
@@ -169,7 +162,7 @@
 		data() {
 			return {
 				newTime: new Date().getTime(),
-				yjloading:false,
+				yjloading: false,
 				logProgInfo: [],
 				logProgDialogVisible: false,
 				loading: false,
@@ -192,15 +185,15 @@
 		},
 		created() {
 			// this.getList()
-			
+
 		},
 		computed: {
 			...mapState(['orderToken'])
 		},
 		mounted() {
-			if(this.orderToken.length == 0) {
-				
-			}else {
+			if (this.orderToken.length == 0) {
+
+			} else {
 				this.queryInfo.token = this.orderToken.join(',')
 				this.getList()
 			}
@@ -245,14 +238,14 @@
 			...mapMutations(['setOrderToken']),
 			showTime,
 			showBtn(time) {
-				return this.newTime >= time*1000
+				return this.newTime >= time * 1000
 			},
 			//加载token文件
 			readTxtFile(refs) {
 				let that = this
 				const input = this.$refs[refs]
 				const file = input.files[0]
-			
+
 				const reader = new FileReader()
 				reader.onload = (e) => {
 					let srt = e.target.result.replace(/\n\r/g, ',').replace(/\r\n/g, ',')
@@ -269,38 +262,52 @@
 					sn: item.delivery_sn
 				}).then(res => {
 					console.log(res);
-					this.logProgInfo = res.data.data
+					this.logProgInfo = res.data.data.map(item => {
+						item.time = item.time.split(' ')[1]
+						return item
+					})
 					this.logProgDialogVisible = true
 				})
 			},
 			handleOrder(tit, item) {
-				batchOrder({
-					id: item.id,
-					status: item.status
-				}).then(res => {
-					// console.log(res);
-					item.tag = res.msg
-				})
-				// this.$confirm(tit, '提示', {
-				// 	confirmButtonText: '确定',
-				// 	cancelButtonText: '取消',
-				// 	callback: action => {
-				// 		if(action == 'confirm') {
-				// 			batchOrder({
-				// 				id: item.id,
-				// 				status: item.status
-				// 			}).then(res => {
-				// 				// console.log(res);
-				// 				this.$msg.success('已提交,请等待审核处理')
-				// 			})
-				// 		}
-				// 	}
-				// });
+				// batchOrder({
+				// 	id: item.id,
+				// 	status: item.status
+				// }).then(res => {
+				// 	// console.log(res);
+				// 	item.tag = res.msg
+				// })
+				if (item.loading || this.loading) {
+					return
+				}
+				
+				this.$confirm(tit, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					callback: action => {
+						if (action == 'confirm') {
+							item.loading = true
+							this.loading = true
+							batchOrder({
+								id: item.id,
+							}).then(res => {
+								// console.log(res);
+								item.loading = false
+								item.tag = res.msg
+								this.$msg.success('已提交,请等待审核处理')
+								this.loading = false
+							}).catch(err => {
+								item.loading = false
+								this.loading = false
+							})
+						}
+					}
+				});
 			},
 			sqlp(item) {
 
 			},
-			oneWork(arr,i = 0) {
+			oneWork(arr, i = 0) {
 				// batchOrder({
 				// 	id: 0
 				// }).then(res => {
@@ -309,30 +316,30 @@
 				// })
 				let that = this
 				that.yjloading = true
-				if(i < arr.length) {
-					
-					if(arr[i].loaded) {
-						that.oneWork(arr,++i)
-					}else {
+				if (i < arr.length) {
+
+					if (arr[i].loaded) {
+						that.oneWork(arr, ++i)
+					} else {
 						arr[i].loading = true
-						setTimeout(()=> {
+						setTimeout(() => {
 							batchOrder({
-								id:arr[i].id,
+								id: arr[i].id,
 								status: arr[i].status
 							}).then(res => {
 								arr[i].tag = res.msg
 								arr[i].loading = false
 								arr[i].loaded = true
-								that.oneWork(arr,++i)
+								that.oneWork(arr, ++i)
 							}).catch(err => {
 								console.log(i);
 								arr[i].loading = false
 								that.yjloading = false
 							})
-						},2000)
+						}, 2000)
 					}
-					
-				}else {
+
+				} else {
 					that.yjloading = false
 				}
 			},
@@ -410,6 +417,7 @@
 		margin: auto;
 		position: relative;
 	}
+
 	.dr-wrap {
 		width: 140px;
 		height: 125px;
@@ -426,21 +434,22 @@
 		justify-content: center;
 		align-items: center;
 		font-size: 12px;
-	
+
 		.dr-icon {
 			font-size: 32px;
 			color: #007aff;
 		}
-	
+
 		.dr-tit {
 			margin-top: 20px;
 		}
-	
+
 		// .dr-int {
 		// 	width: 140px;
 		// 	height: 125px;
 		// }
 	}
+
 	.dr-int {
 		position: absolute;
 		top: 0;
@@ -453,10 +462,12 @@
 		opacity: 0;
 		filter: alpha(opacity=0);
 	}
+
 	.redr {
 		position: relative;
 		margin-right: 20px;
 	}
+
 	.mb {
 		position: absolute;
 		top: 0;
@@ -466,6 +477,7 @@
 		width: 100%;
 		height: 100%;
 	}
+
 	/deep/ .el-table__cell {
 		button {
 			padding: 6px 10px;

+ 65 - 19
src/views/settle/settleOrder.vue

@@ -17,7 +17,7 @@
 				</div> -->
 			</div>
 			<div class="order-wrap" style="padding: 20px;">
-				<div>
+				<!-- <div>
 					<el-date-picker v-model="value1" type="daterange" format="yyyy 年 M 月 d 日" value-format="yyyy-M-d"
 						range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
 					</el-date-picker>
@@ -25,14 +25,47 @@
 					<div class="redr">
 						<el-button>重新导入</el-button>
 						<input type="file" ref="fileInputt" @change="readTxtFile('fileInputt')" class="dr-int" />
+					</div>s
+				</div> -->
+				<template  v-if="js && js.loaded">
+					<div style="padding-top: 20px;">
+						<el-button>订单总数:{{js.order_count || 0}}</el-button>
+						<el-button>结算订单数:{{js.settlement_count || 0}}</el-button>
+						<el-button>卡单数量:{{js.prohibit_refund || 0}}</el-button>
 					</div>
-				</div>
-				<div style="padding-top: 20px;">
-					<el-button>已结算订单:{{total}}</el-button>
-					<el-button>未结算订单:{{not_out_time}}</el-button>
-					<el-button>卡单数量:{{prohibit_refund}}</el-button>
-				</div>
-				<el-table :data="list" border style="width: 100%" max-height="520">
+					<div style="padding-top: 20px;">
+						<el-button>赔付金额:{{js.compensation_sum || 0}}</el-button>
+					</div>
+					<div style="padding-top: 20px;">
+						<el-button>物流费:{{js.expenses_sum || 0}}</el-button>
+					</div>
+					<!-- commission_sum -->
+					<div style="padding-top: 20px;">
+						<el-button>手续费:{{js.ommission_sum || 0}}</el-button>
+					</div>
+					<div style="padding-top: 20px;">
+						<el-button>赔付金额10块的订单数:{{js.compensation_10_count || 0}}</el-button>
+					</div>
+					<div style="padding-top: 20px;">
+						<el-button>赔付金额11块的订单数:{{js.compensation_11_count || 0}}</el-button>
+					</div>
+					<div style="padding-top: 20px;">
+						<el-button>赔付金额12块的订单数:{{js.compensation_12_count || 0}}</el-button>
+					</div>
+					<div style="padding-top: 20px;">
+						<el-button>赔付金额13块的订单数:{{js.compensation_13_count || 0}}</el-button>
+					</div>
+					<div style="padding-top: 20px;">
+						<el-button>赔付金额14块的订单数:{{js.compensation_14_count || 0}}</el-button>
+					</div>
+					<div style="padding-top: 20px;">
+						<el-button>赔付金额15块的订单数:{{js.compensation_15_count || 0}}</el-button>
+					</div>
+				</template>
+				
+				
+				<!-- settlement_count -->
+				<!-- <el-table :data="list" border style="width: 100%" max-height="520">
 					<el-table-column prop="id" label="id" width="80">
 					</el-table-column>
 					<el-table-column prop="createtime" label="提交时间" width="200">
@@ -54,12 +87,12 @@
 							<span>理赔:{{scope.row.compensation}}</span>
 						</template>
 					</el-table-column>
-				</el-table>
+				</el-table> -->
 				<!-- 分页区域 -->
-				<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+				<!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
 					:current-page="queryInfo.page" :page-sizes="[10, 20, 50, 100]" :page-size="queryInfo.pagesize"
 					layout="total, sizes, prev, pager, next, jumper" :total="total">
-				</el-pagination>
+				</el-pagination> -->
 			</div>
 		</div>
 
@@ -93,6 +126,9 @@
 					token: ''
 				},
 				total: 0,
+				js: {
+					loaded: false
+				}
 			}
 		},
 		watch: {
@@ -127,30 +163,40 @@
 				const file = input.files[0]
 
 				const reader = new FileReader()
+				console.log('zhe');
 				reader.onload = (e) => {
 					let srt = e.target.result.replace(/\n\r/g, ',').replace(/\r\n/g, ',')
 					let arr = srt.split(',').filter(item => item !== '')
 					that.setJsOrderToken(arr)
 					that.queryInfo.token = that.jsOrderToken.join(',')
-					that.getList()
+					that.getList('reload')
 				}
 				reader.readAsText(file)
 			},
 			getList(type) {
+				console.log('ks');
 				let that = this
 				if (type == 'reload') {
 					that.queryInfo.page = 1
 					// that.queryInfo.date
 				}
+				that.js = {}
+				that.js.loaded = false
+				
 				settlement(that.queryInfo).then(res => {
 					console.log(res);
-					that.total = res.data.count
-					that.not_out_time = res.data.not_out_time
-					that.prohibit_refund = res.data.prohibit_refund
-					that.list = res.data.data
-					if(that.total == 0) {
-						that.$msg.error('订单结算时间还未到')
-					}
+					setTimeout((item) => {
+						that.js = res.data
+						that.js.loaded = true
+					},1000)
+					
+					// that.total = res.data.count
+					// that.not_out_time = res.data.not_out_time
+					// that.prohibit_refund = res.data.prohibit_refund
+					// that.list = res.data.data
+					// if(that.total == 0) {
+					// 	that.$msg.error('订单结算时间还未到')
+					// }
 				})
 			}
 		}

+ 7 - 1
src/views/user/transferList.vue

@@ -16,6 +16,12 @@
 				<el-table-column prop="transfer_num" label="转账金额(元)" width="250"></el-table-column>
 				<el-table-column prop="to_user_code" label="收款人" width="150">
 				</el-table-column>
+				<el-table-column prop="user_id" label="转入/转出">
+					<template slot-scope="scope">
+						<el-tag v-if="scope.row.user_id == userInfo.id">转出</el-tag>
+						<el-tag type="success" v-else>转入</el-tag>
+					</template>
+				</el-table-column>
 				<el-table-column prop="status" label="创建时间">
 					<template slot-scope="scope">
 						{{showTime(scope.row.createtime)}}
@@ -23,7 +29,7 @@
 				</el-table-column>
 				<el-table-column prop="balance" label="转账后用户余额">
 					<template slot-scope="scope">
-						{{userInfo.id == scope.row.to_user_id ? scope.row.balance: ''}}
+						{{userInfo.id == scope.row.user_id ? scope.row.balance: ''}}
 					</template>
 				</el-table-column>
 			</el-table>

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