Ver Fonte

Signed-off-by: 1004749546@qq.com <1004749546@qq.com>
待办修改提交

1004749546@qq.com há 4 anos atrás
pai
commit
939ff4bc70

+ 8 - 0
api/backLog.js

@@ -28,4 +28,12 @@ export const saveBackLog = params => {
     method: 'post',
 	data: params
   })
+}
+// 待办详情 操作
+export const handleBackLog = params => {
+  return axios.request({
+    url: `backlog/handle`,
+    method: 'post',
+	data: params
+  })
 }

+ 1 - 2
pages/toDoList/addBacklog.vue

@@ -144,7 +144,6 @@
 			handleSave () {
 				this.$refs.uForm.validate(valid => {
 					if (valid) {
-						console.log('验证通过');
 						if (!this.form.storeName) {
 							this.toashMsg('请选择门店!')
 						} else if (!this.form.effectiveEndTime) {
@@ -177,7 +176,7 @@
 							"effectiveEndTime": this.form.effectiveEndTime,
 							"storeId" : this.form.storeId
 						}
-						console.log(params,'ppppppppp')
+						// console.log(params,'ppppppppp')
 						this.loading = true
 						uni.showLoading({
 							title: '保存中,请稍后...', 

+ 59 - 22
pages/toDoList/backlogDetail.vue

@@ -14,19 +14,14 @@
 		<view class="back-text">
 			<!-- 门店 -->
 			<view class="text-item">
-				{{infoData.storeName}}
-			</view>
-			<!-- 处理人 -->
-			<view class="text-item">
-				<view>
-					<text>处理人</text>
-					<text class="margin-left ellipsis-one">{{infoData.receiveUserName}}</text>
+				<view class="ellipsis-one">
+					{{infoData.storeName}}
 				</view>
 				<view class="time ">
 					{{infoData.effectiveEndTime}} 到期
 				</view>
 			</view>
-			<!-- 创建人 -->
+			<!-- 创建人 --> 
 			<view class="text-item">
 				<view>
 					<text>创建人</text>
@@ -60,35 +55,43 @@
 		</view>
 		<view class="footer">
 			<!-- receiveFlag   接收人/责任人标记 只有处理人可以整改-->
-			<u-button v-if="infoData.receiveFlag && infoData.receiveFlag == 1 && infoData.status=='PENDING'" type="primary">整改完成</u-button>
+			<!-- 目前版本不做 -->
+			<!-- <u-button @click="handleSubmit(0)" v-if="infoData.receiveFlag && infoData.receiveFlag == 1 && infoData.statusDictValue=='待整改'" type="primary">整改完成</u-button> -->
 			<!-- putFlag  创建人标记 只有创建人可以审核-->
-			<view v-if="infoData.putFlag && infoData.putFlag == 1 && infoData.status=='CHECK_PENDING'" class="check-pending">
-				<u-button class="act-btn" type="error">整改不通过</u-button>
-				<u-button class="act-btn" type="success">整改通过</u-button>
+			<view v-if="infoData.putFlag && infoData.putFlag == 1 && infoData.statusDictValue=='待审核'" class="check-pending">
+				<u-button @click="handleSubmit(1)" class="act-btn" type="error">整改不通过</u-button>
+				<u-button @click="handleSubmit(2)" class="act-btn" type="success">整改通过</u-button>
 			</view>
 			<!-- copyFlag    抄送标识  只有抄送人可以评论-->
 			<view v-if="infoData.copyFlag && infoData.copyFlag==1" class="comment-input">
-				<input type="text" v-model="comment" @confirm="sendComment" placeholder="请输入评论..."/>
-				<view>整改状态:<text :class="clsStatus()">{{infoData.status}}</text></view>
+				<view class="input-cont">
+					<textarea auto-height :class="[isFocus?'active':'']" v-model="comment" @focus="sendComment" placeholder="请输入评论..."/>
+					<u-button @click="handleSubmit(3)" class="input-btn" v-if="isFocus" size="mini" type="warning">发送</u-button>
+				</view>
+				<view>整改状态:<text :class="clsStatus(infoData.statusDictValue)">{{infoData.statusDictValue}}</text></view>
 			</view>
-		</view>
+		</view>  
 	</view>
 </template>
 
 <script>
-	import { getBackLogDetail, getBackLogRecord } from '@/api/backLog.js'
+	import { getBackLogDetail, getBackLogRecord, handleBackLog } from '@/api/backLog.js'
 	export default {
 		components: {
-		},
+		}, 
 		data() {
 			return {
+				backlogId: '', // 待办id
 				infoData:{}, // 详情数据
 				numList: [],
-				 comment: '' // 评论
+				comment: '', // 评论
+				isFocus: false,  // 评论键盘是否弹起
+				handleType: ['SOLVE','AUDIT_NO','AUDIT_YES','COMMENTS'] //SOLVE("SOLVE", "整改问题"),AUDIT_YES("AUDIT_YES", "审核通过"),AUDIT_NO("AUDIT_NO", "审核不通过"),COMMENTS("COMMENTS", "发表评论");
 			}
 		},
 		onLoad(option) {
 			console.log(option.id)
+			this.backlogId = option.id
 			this.getData(option.id)
 			this.getRecordData(option.id)
 		},
@@ -112,7 +115,7 @@
 						res.data.map(item=>{
 							const p = {}
 							const k = '\xa0\xa0\xa0\xa0\xa0\xa0'
-							p.name = item.handleTime + k + item.handleType + k + (item.handleDesc ? item.handleDesc : '')
+							p.name = item.handleTime + k + item.handleTypeDictValue + k + (item.handleDesc ? item.handleDesc : '')
 							arr.push(p)
 						})
 						this.numList = arr
@@ -123,7 +126,24 @@
 				})
 			},
 			sendComment (v) {
-				
+				console.log(v,'vvvvvvvvvv')
+				this.isFocus = true
+			},
+			// 提交处理
+			handleSubmit(index) {
+				const params = {
+					backlogId: this.backlogId,
+					handleDesc: this.comment,
+					handleType: this.handleType[index]
+				}
+				handleBackLog(params).then(res=>{
+					if(res.status==200){
+						this.comment = ''
+						this.isFocus = false
+						this.getRecordData(this.backlogId)
+					}
+					this.toashMsg(res.message)
+				})
 			},
 			// 状态颜色处理
 			clsStatus(status){
@@ -210,10 +230,27 @@
 			.comment-input{
 				width: 100%;
 				padding: 20upx;
-				input{
+				.input-cont{
+					width: 100%;
 					background-color: #f4f4f4;
-					padding: 20upx;
 					border-radius: 10upx;
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+					padding: 0 20upx;
+					textarea{
+						padding: 20upx;
+						height: 100%; 
+						flex: 1;
+					}
+					.active{
+						background-color: #fff;
+						margin: 20upx;
+					}
+					.input-btn{
+						padding: 20upx;
+						height: 60upx;
+					}
 				}
 				view{
 					margin-top: 20upx;

+ 0 - 1
pages/toDoList/searchModal.vue

@@ -28,7 +28,6 @@
 				<button type="primary" @click="handleSearch">查询</button>
 				<button type="info" @click="resetForm">重置</button>
 			</view>
-			<!-- <mx-date-picker class="date-picker" :show="showPicker" type="range" format="yyyy-mm-dd" :value="form.time" :show-tips="true" @confirm="onSelected" @cancel="showPicker=false" /> -->
 		</u-popup>
 		<!-- 时间选择器 -->
 		<w-picker

+ 1 - 1
pages/toDoList/toDoList.vue

@@ -71,7 +71,7 @@
 				</swiper>
 		</view>
 		<!-- 待办单查询弹框 -->
-		<search-modal :visible="showSearch" @openPicke="openPicker" @refresh="refresh" @close="showSearch=false"></search-modal>
+		<search-modal :visible="showSearch" @refresh="refresh" @close="showSearch=false"></search-modal>
 	</view>
 </template>