Parcourir la source

外勤补卡详情领导添加意见备注从考勤统计进

wgl il y a 4 ans
Parent
commit
7b0eff1cc0

+ 10 - 0
src/projects/business/apis/Master/attendance.js

@@ -59,6 +59,7 @@ export function getVerifyList(params) {
 		method: 'post',
 	})
 }
+
 //补卡审批
 export function doVerify(params) {
 	return request({
@@ -124,3 +125,12 @@ export function getBusinessId(id) {
 		method: 'get',
 	})
 }
+
+//添加备注
+export function addRemark(params) {
+	return request({
+		url: '/mobile/workAttendance/addRemarkForAttendance',
+		data: Qs.stringify(params),
+		method: 'post',
+	})
+}

+ 50 - 0
src/projects/business/views/Master/Attendance/Info.vue

@@ -51,6 +51,10 @@
 							<img :src="item" v-viewer />
 						</div>
 					</li>
+					<li v-if="detail.remark" class="mui-table-view-cell mui-media">
+						<div class="mui-media-body">备注意见</div>
+						<span class="colorf8b155" v-text="detail.remark"></span>
+					</li>
 				</ul>
 			</div>
 			<div class="mui-content-padded vongi-wordcard-center">
@@ -69,6 +73,25 @@
 					</li>
 				</ul>
 			</div>
+
+			<div v-if="can_remark" class="fyy-scon-botton">
+				<div class="examine-btn examine-btn1" @click="openFromVisible=true">备注意见</div>
+			</div>
+		</div>
+
+
+		<!-- 审批弹窗 -->
+		<div v-show="openFromVisible" @click="openFromVisible=false" class="mui-backdrop mui-active"></div>
+		<div v-show="openFromVisible" class="mui-card fyy-popup">
+			<div class="mui-card-header mui-h3">备注意见</div>
+			<div class="mui-card-content">
+				<div class="mui-input-row">
+					<textarea v-model="remarkForm.remark" rows="5" placeholder="请输入"></textarea>
+				</div>
+			</div>
+			<div class="vongi-btn">
+				<button class="mui-btn mui-btn-primary" @click="addRemark">提交</button>
+			</div>
 		</div>
 
 		<loading :visible="isLoading"></loading>
@@ -101,6 +124,13 @@
 					id: this.$route.query.id
 				},
 				detail: {},
+
+				can_remark: this.$route.query.remark,
+				remarkForm: {
+					id: this.$route.query.id,
+					remark: ''
+				},
+				openFromVisible: false
 			}
 		},
 		created() {
@@ -114,12 +144,32 @@
 
 					this.detail = response;
 
+					this.remarkForm.remark = response.remark;
+
 					this.isLoading = false;
 				}).catch(error => {
 					this.isLoading = false;
 					mui.toast(error);
 				})
 			},
+			//领导添加备注
+			addRemark() {
+				if (!this.remarkForm.remark) {
+					mui.toast('请输入备注意见');
+				} else {
+					this.isLoading = true;
+					API_Attendance.addRemark(this.remarkForm).then(response => {
+						this.isLoading = false;
+
+						this.openFromVisible = false;
+						mui.toast('提交成功');
+						this.getDetail();
+					}).catch(error => {
+						this.isLoading = false;
+						mui.toast(error);
+					})
+				}
+			},
 			asynCallBack() {
 
 			},

+ 2 - 1
src/projects/business/views/Master/Attendance/StatisticList.vue

@@ -303,7 +303,8 @@
 						this.$router.push({
 							name: 'MasterAttendanceInfo',
 							query: {
-								id: id
+								id: id,
+								remark: 1,
 							}
 						})
 					}