浏览代码

no message

xiaoxin 1 年之前
父节点
当前提交
b0fdcb8572
共有 3 个文件被更改,包括 97 次插入2 次删除
  1. 2 1
      manifest.json
  2. 93 0
      pagesRepairs/management/management.vue
  3. 2 1
      pagesRepairs/util/api.js

+ 2 - 1
manifest.json

@@ -96,5 +96,6 @@
 	},
 	"uniStatistics": {
 		"enable": false
-	}
+	},
+	"sassImplementationName": "node-sass"
 }

+ 93 - 0
pagesRepairs/management/management.vue

@@ -239,6 +239,8 @@
 					>
 						接单
 					</view>
+
+					<view class="btn_box type" v-if="item.state === '待支付'" @click.stop="handleAskToPay(item)">催缴</view>
 					<!-- 转单操作按钮 -->
 					<view
 						class="btn_box type2"
@@ -361,6 +363,9 @@
 			<img src="../../pagesClockIn/static/imgs/nodata.png" />
 			<view>暂无数据</view>
 		</view>
+
+		<!-- 批量催缴悬浮按钮区域 -->
+		<view class="float_btn" hover-class="float_btn_hover" v-if="state == 9" @click="handleAskToPayAll">批量催缴</view>
 	</scroll-view>
 </template>
 
@@ -697,6 +702,61 @@ export default {
 				}
 			})
 		},
+
+		// 催缴按钮回调
+		handleAskToPay(item) {
+			uni.showModal({
+				content: '确定发送催缴信息吗?',
+				title: '提示',
+				success: async (res) => {
+					if (res.confirm) {
+						const res = await this.$myRequest_repairs({
+							url: '/repairCall/singleCall',
+							data: {
+								id: item.id
+							}
+						})
+						// console.log(res)
+						if (res.code === '200') {
+							uni.showToast({
+								title: '催缴成功',
+								icon: 'success',
+								mask: true
+							})
+							// setTimeout(() => {
+							// 	this.handleResetData()
+							// }, 1500)
+						}
+					}
+				}
+			})
+		},
+		// 批量催缴按钮回调
+		handleAskToPayAll() {
+			uni.showModal({
+				content: '确定发送批量催缴信息吗?',
+				title: '提示',
+				success: async (res) => {
+					if (res.confirm) {
+						const res = await this.$myRequest_repairs({
+							url: '/repairCall/batchCall',
+							method: 'post'
+						})
+						// console.log(res)
+						if (res.code === '200') {
+							uni.showToast({
+								title: '催缴成功',
+								icon: 'success',
+								mask: true
+							})
+							// setTimeout(() => {
+							// 	this.handleResetData()
+							// }, 1500)
+						}
+					}
+				}
+			})
+		},
 		// 关闭图标点击回调
 		handleClose(item) {
 			this.orderId = item.id
@@ -1493,5 +1553,38 @@ export default {
 			height: 456rpx;
 		}
 	}
+
+	.float_btn {
+		position: fixed;
+		right: 100rpx;
+		bottom: 200rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		width: 120rpx;
+		height: 120rpx;
+		border-radius: 50%;
+		color: #fff;
+		font-size: 24rpx;
+		border: 2rpx solid #b3b3b3;
+		background-color: #6fb6b8;
+	}
+
+	.float_btn_hover {
+		position: fixed;
+		right: 100rpx;
+		bottom: 200rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		width: 120rpx;
+		height: 120rpx;
+		border-radius: 50%;
+		color: #fff;
+		font-size: 24rpx;
+		border: 2rpx solid #b3b3b3;
+		background-color: #6fb6b8;
+		transform: scale(0.95);
+	}
 }
 </style>

+ 2 - 1
pagesRepairs/util/api.js

@@ -1,8 +1,9 @@
 // 正式服务器
-const BASE_URL = "https://chtech.ncjti.edu.cn/campusMaintenance/repair-api/repair/api"
+// const BASE_URL = "https://chtech.ncjti.edu.cn/campusMaintenance/repair-api/repair/api"
 
 // 测试服务器
 // const BASE_URL = "https://chtech.ncjti.edu.cn/testingServer/repairTest/repair/api"
+const BASE_URL = "https://chtech.ncjti.edu.cn/alumnus/repairTest/repair/api/"
 export const myRequest_repairs = (options) => {
 	uni.showLoading({
 		title: "加载中",