diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectCheckedServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectCheckedServiceImpl.java
index 2da2ecff..063e610e 100644
--- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectCheckedServiceImpl.java
+++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectCheckedServiceImpl.java
@@ -119,7 +119,9 @@ public class ProProjectCheckedServiceImpl implements IProProjectCheckedService
@Override
public int updateProProjectChecked(ProProjectChecked proProjectChecked)
{
- proProjectChecked.setMainImage(proProjectChecked.getImageUrls().split(",")[0]);
+ if(StringUtils.isNotBlank(proProjectChecked.getImageUrls())) {
+ proProjectChecked.setMainImage(proProjectChecked.getImageUrls().split(",")[0]);
+ }
proProjectChecked.setUpdateBy(SecurityContextHolder.getUserName());
proProjectChecked.setUpdateTime(DateUtils.getNowDate());
int rows = proProjectCheckedMapper.updateProProjectChecked(proProjectChecked);
diff --git a/yanzhu-ui-app/miniprogram/images/svg/add.svg b/yanzhu-ui-app/miniprogram/images/svg/add.svg
index aee93118..ca26a0c6 100644
--- a/yanzhu-ui-app/miniprogram/images/svg/add.svg
+++ b/yanzhu-ui-app/miniprogram/images/svg/add.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/images/svg/add2.svg b/yanzhu-ui-app/miniprogram/images/svg/add2.svg
deleted file mode 100644
index ca26a0c6..00000000
--- a/yanzhu-ui-app/miniprogram/images/svg/add2.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/images/svg/approve.svg b/yanzhu-ui-app/miniprogram/images/svg/approve.svg
new file mode 100644
index 00000000..e3d0d887
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/images/svg/approve.svg
@@ -0,0 +1,14 @@
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.js b/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.js
index 80e50b85..f388a85f 100644
--- a/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.js
+++ b/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.js
@@ -34,7 +34,7 @@ Page({
technicianUserName: "",
supervise: '',
superviseUser: "", //监理专员
- superviseUserName: ""
+ superviseUserName: "",
},
projectUserInfo: {},
projectId: "",
@@ -44,6 +44,10 @@ Page({
pageSize: 10,
total: 0,
listData: [],
+ //驳回信息
+ checkResult: -1,
+ approveStatus: -1,
+ checkImgs: [],
//任务计划
picker: false,
planOptions: [],
@@ -283,8 +287,12 @@ Page({
form.technicianUserName = data.technicianUserName;
form.superviseUser = data.superviseUser;
form.superviseUserName = data.superviseUserName;
+ let checkImgs = (data.checkingFiles ? data.checkingFiles.split(",") : []).map(img => config.baseImgUrl + img);
this.setData({
+ checkResult: data.checkResult,
+ checkImgs: checkImgs,
imageInfoData: imgs,
+ approveStatus: data.approveStatus,
form: {
...form
}
@@ -337,8 +345,8 @@ Page({
}
let taskInfo = {
id: form.task.id,
- name: form.task.taskName,
- full: form.task.fullPath
+ name: form.task.taskName || form.task.name,
+ full: form.task.fullPath || form.task.full
}
postData.workingPosition = JSON.stringify(taskInfo);
let fileUrls = await uploadFiles(this.data.imageInfoData);
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.json b/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.json
index 965b8e80..05d6cede 100644
--- a/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.json
+++ b/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.json
@@ -1,4 +1,5 @@
{
"usingComponents": {},
- "navigationStyle": "custom"
+ "navigationStyle": "custom",
+ "styleIsolation": "apply-shared"
}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.less b/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.less
index a6b31fdb..c4684b0d 100644
--- a/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.less
+++ b/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.less
@@ -1,47 +1,36 @@
-/* pageage/project_checked/add/index.wxss */
-.project-checked-add {
- .max_content_scroll {
- color: #89a4eb;
- font-size: 28rpx;
- padding: 60rpx 30rpx 30rpx;
- width: calc(100% - 60rpx);
- position: relative;
- top: 140rpx;
+.mt40 {
+ margin-top: 40rpx;
+}
- .mt40 {
- margin-top: 40rpx;
- }
+.mt20 {
+ margin-top: 20rpx;
+}
- .add-info {
- background-color: #514f4f8a;
- color: #888;
- margin-top: 16rpx;
- line-height: 60rpx;
- border-radius: 30rpx;
- padding: 0rpx 30rpx;
- }
+.gd_max {
+ padding: 10rpx 20rpx 0;
+}
- .rectifier_title {
- position: relative;
- background: #27304f;
- border-radius: 15rpx;
- text-align: center;
- padding: 20rpx 15rpx;
- }
+.add-info {
+ background-color: #514f4f8a;
+ color: #888;
+ margin-top: 16rpx;
+ line-height: 60rpx;
+ border-radius: 30rpx;
+ padding: 0rpx 30rpx;
+}
- .rectifier_close {
- position: absolute;
- width: 50rpx;
- height: 50rpx;
- right: 20rpx;
- top: 12rpx;
- line-height: 60rpx;
- text-align: center;
- }
+.h80 {
+ height: 80rpx;
+}
- .add_textarea {
- height: 60rpx;
- }
+.approve-status {
+ position: absolute;
+ top: 0rpx;
+ right: 50rpx;
+ z-index: 99;
+ .code_label {
+ font-size: 40rpx;
+ padding: 4rpx 20rpx;
}
}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.wxml
index 87ca061f..3500571c 100644
--- a/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.wxml
+++ b/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.wxml
@@ -1,27 +1,35 @@
-
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.wxss
index c5916259..6939b5f9 100644
--- a/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.wxss
+++ b/yanzhu-ui-app/miniprogram/pageage/project_checked/add/index.wxss
@@ -1,16 +1,13 @@
-/* pageage/project_checked/add/index.wxss */
-.project-checked-add .max_content_scroll {
- color: #89a4eb;
- font-size: 28rpx;
- padding: 60rpx 30rpx 30rpx;
- width: calc(100% - 60rpx);
- position: relative;
- top: 140rpx;
-}
-.project-checked-add .max_content_scroll .mt40 {
+.mt40 {
margin-top: 40rpx;
}
-.project-checked-add .max_content_scroll .add-info {
+.mt20 {
+ margin-top: 20rpx;
+}
+.gd_max {
+ padding: 10rpx 20rpx 0;
+}
+.add-info {
background-color: #514f4f8a;
color: #888;
margin-top: 16rpx;
@@ -18,22 +15,16 @@
border-radius: 30rpx;
padding: 0rpx 30rpx;
}
-.project-checked-add .max_content_scroll .rectifier_title {
- position: relative;
- background: #27304f;
- border-radius: 15rpx;
- text-align: center;
- padding: 20rpx 15rpx;
+.h80 {
+ height: 80rpx;
}
-.project-checked-add .max_content_scroll .rectifier_close {
+.approve-status {
position: absolute;
- width: 50rpx;
- height: 50rpx;
- right: 20rpx;
- top: 12rpx;
- line-height: 60rpx;
- text-align: center;
+ top: 0rpx;
+ right: 50rpx;
+ z-index: 99;
}
-.project-checked-add .max_content_scroll .add_textarea {
- height: 60rpx;
+.approve-status .code_label {
+ font-size: 40rpx;
+ padding: 4rpx 20rpx;
}
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_checked/info/index.js b/yanzhu-ui-app/miniprogram/pageage/project_checked/info/index.js
index fa96c570..e01be930 100644
--- a/yanzhu-ui-app/miniprogram/pageage/project_checked/info/index.js
+++ b/yanzhu-ui-app/miniprogram/pageage/project_checked/info/index.js
@@ -4,6 +4,9 @@ import fmt from "../../../utils/date.js";
import { getToken, getUserInfo } from "../../../utils/auth";
import { uploadFiles } from "../../../utils/upload.js";
import { tryToJson } from '../../../utils/tools'
+import {
+ findDictCache,
+} from '../../../api/publics'
import {
getProjectChecked,
findPlanDatas,
@@ -24,6 +27,9 @@ Page({
projectId: "",
projectName: "",
initData: {},
+ isApprove: false,
+ checkResult: null,
+ checkingFiles: [],
},
/**
@@ -44,7 +50,28 @@ Page({
id: app.globalData.useProjectId,
text: app.globalData.useProjectName,
},
+ isApprove: options.type == "approve",
});
+ if (options.id) {
+ //加载数据
+ this.loadData(options.id);
+
+ } else {
+ app.toast("参数错误!");
+ this.doBack(false)
+ }
+ },
+ onCheckResultChange(e) {
+ this.setData({
+ checkResult: e.detail
+ })
+
+ },
+ // 上传图片
+ onImagesArr(e) {
+ this.setData({
+ imageInfoData: e.detail
+ })
},
doBack(isRefresh) {
/*返回列表页面并刷新*/
@@ -58,56 +85,65 @@ Page({
})
}
},
- returnToPage: function (isRefresh) {
+ //展示图片
+ showImg: function (e) {
+ let img = e.target.dataset.set;
+ wx.previewImage({
+ urls: img.split(','),
+ current: 0
+ })
+ },
+ /**
+ *加载数据
+ */
+ loadData(id) {
+ wx.showLoading({
+ title: '加载中...',
+ })
+ getProjectChecked(id).then(res => {
+ let data = res.data || {};
+ let task = tryToJson(data.workingPosition, {});
+ let imgs = (data.imageUrls ? data.imageUrls.split(",") : []).map(img => config.baseImgUrl + img);
+ let checkImgs = (data.checkingFiles ? data.checkingFiles.split(",") : []).map(img => config.baseImgUrl + img);
+ data.images = imgs;
+ data.taskName = task.full;
+ data.checkImgs = checkImgs;
+ this.setData({
+ rowData: data,
+ imageInfoData: checkImgs,
+ })
+ wx.hideLoading()
+ });
+ },
+ returnToPage: function (isRefresh) {
this.doBack(false)
},
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
-
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
-
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
-
+ async submitSave(e) {
+ let approveStatus = e.target.dataset.set;
+ if (!this.data.checkResult) {
+ app.toast("请选择审批结果!");
+ return false;
+ }
+ if (this.data.imageInfoData.length == 0) {
+ app.toast("请上传图片!");
+ return;
+ }
+ let fileUrls = await uploadFiles(this.data.imageInfoData);
+ debugger
+ let postData = {
+ id: this.data.rowData.id,
+ approveStatus: approveStatus,
+ checkResult: this.data.checkResult,
+ checkingFiles: fileUrls.join(","),
+ };
+ try {
+ await updateProjectChecked(postData);
+ app.toast("保存成功!");
+ this.doBack(true);
+ } catch (error) {
+ console.error('保存失败:', error);
+ app.toast("保存失败,请重试");
+ }
}
})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_checked/info/index.json b/yanzhu-ui-app/miniprogram/pageage/project_checked/info/index.json
index 965b8e80..05d6cede 100644
--- a/yanzhu-ui-app/miniprogram/pageage/project_checked/info/index.json
+++ b/yanzhu-ui-app/miniprogram/pageage/project_checked/info/index.json
@@ -1,4 +1,5 @@
{
"usingComponents": {},
- "navigationStyle": "custom"
+ "navigationStyle": "custom",
+ "styleIsolation": "apply-shared"
}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_checked/info/index.less b/yanzhu-ui-app/miniprogram/pageage/project_checked/info/index.less
new file mode 100644
index 00000000..2ed33098
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_checked/info/index.less
@@ -0,0 +1,49 @@
+.mt40 {
+ margin-top: 40rpx;
+}
+
+.mt20 {
+ margin-top: 20rpx;
+}
+
+.gd_max {
+ padding: 10rpx 20rpx 0;
+}
+
+.add-info {
+ background-color: #514f4f8a;
+ color: #888;
+ margin-top: 16rpx;
+ line-height: 60rpx;
+ border-radius: 30rpx;
+ padding: 0rpx 30rpx;
+}
+
+.h80 {
+ height: 80rpx;
+}
+
+.approve-status {
+ position: absolute;
+ top: 120rpx;
+ right: 50rpx;
+
+ .code_label {
+ font-size: 40rpx;
+ padding: 4rpx 20rpx;
+ }
+}
+
+.radio-group {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+
+ .radio-item {
+ width: 40%;
+ }
+}
+
+.problem_submit_to {
+ padding: 40rpx 0rpx;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_checked/info/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_checked/info/index.wxml
index fe4f64cd..53de754b 100644
--- a/yanzhu-ui-app/miniprogram/pageage/project_checked/info/index.wxml
+++ b/yanzhu-ui-app/miniprogram/pageage/project_checked/info/index.wxml
@@ -1,17 +1,116 @@
-
-
+
+
+ 验收结果
+
+
+
+
+
+
+ 审批结果
+
+ 合格
+
+ 不合格
+
+
+
+
+ 三方验收照片
+
+
+
+
+
+
+ 返回
+ 驳回
+ 审批通过
+
+
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_checked/info/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_checked/info/index.wxss
index 01ad0f4e..fca28d2a 100644
--- a/yanzhu-ui-app/miniprogram/pageage/project_checked/info/index.wxss
+++ b/yanzhu-ui-app/miniprogram/pageage/project_checked/info/index.wxss
@@ -1 +1,40 @@
-/* pageage/project_checked/info/index.wxss */
\ No newline at end of file
+.mt40 {
+ margin-top: 40rpx;
+}
+.mt20 {
+ margin-top: 20rpx;
+}
+.gd_max {
+ padding: 10rpx 20rpx 0;
+}
+.add-info {
+ background-color: #514f4f8a;
+ color: #888;
+ margin-top: 16rpx;
+ line-height: 60rpx;
+ border-radius: 30rpx;
+ padding: 0rpx 30rpx;
+}
+.h80 {
+ height: 80rpx;
+}
+.approve-status {
+ position: absolute;
+ top: 120rpx;
+ right: 50rpx;
+}
+.approve-status .code_label {
+ font-size: 40rpx;
+ padding: 4rpx 20rpx;
+}
+.radio-group {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+}
+.radio-group .radio-item {
+ width: 40%;
+}
+.problem_submit_to {
+ padding: 40rpx 0rpx;
+}
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_checked/list/index.js b/yanzhu-ui-app/miniprogram/pageage/project_checked/list/index.js
index 32cb31fc..fef901c3 100644
--- a/yanzhu-ui-app/miniprogram/pageage/project_checked/list/index.js
+++ b/yanzhu-ui-app/miniprogram/pageage/project_checked/list/index.js
@@ -86,21 +86,26 @@ Page({
lordSent,
recheckSend
} = e.currentTarget.dataset.set
- if ((checkState == 0 || checkState == 3) && lordSent == this.data.projectUserInfo.userId) {
- //整改页面(状态时待整改&&整改人是当前登录人)
- wx.redirectTo({
- url: `../modify/index?type=${this.data.type}&id=${id}`,
- })
- } else if (checkState == 1 && recheckSend == this.data.projectUserInfo.userId) {
- //复检页面 (状态时待复检&&复检人是当前登录人)
- wx.redirectTo({
- url: `../check/index?type=${this.data.type}&id=${id}`,
- })
- } else {
- wx.redirectTo({
- url: `../info/index?type=${this.data.type}&id=${id}`,
- })
- }
+
+ wx.redirectTo({
+ url: `../info/index?type=${this.data.type}&id=${id}`,
+ })
+ /*
+ if ((checkState == 0 || checkState == 3) && lordSent == this.data.projectUserInfo.userId) {
+ //整改页面(状态时待整改&&整改人是当前登录人)
+ wx.redirectTo({
+ url: `../modify/index?type=${this.data.type}&id=${id}`,
+ })
+ } else if (checkState == 1 && recheckSend == this.data.projectUserInfo.userId) {
+ //复检页面 (状态时待复检&&复检人是当前登录人)
+ wx.redirectTo({
+ url: `../check/index?type=${this.data.type}&id=${id}`,
+ })
+ } else {
+ wx.redirectTo({
+ url: `../info/index?type=${this.data.type}&id=${id}`,
+ })
+ }*/
},
/**
@@ -119,7 +124,8 @@ Page({
it.workingPositionName = task.name;
it.workingPositionFull = task.full;
it.taskId = task.id;
- it.canEdit = it.approveStatus == 1 && it.groupDeptUser == this.data.projectUserInfo.userPhone;
+ it.canEdit = (it.approveStatus == 1 || it.approveStatus == 3) && it.groupDeptUser == this.data.projectUserInfo.userPhone;
+ it.canApprove = (it.approveStatus == 1 || it.approveStatus == 3) && it.technicianUser == this.data.projectUserInfo.userPhone;
return it;
});
this.setData({
@@ -149,7 +155,14 @@ Page({
}
});
},
-
+ //审批
+ approveClick(e) {
+ let item = e.currentTarget.dataset.set
+ wx.navigateTo({
+ url: `../info/index?id=${item.id}&type=approve`,
+ })
+ },
+ //编辑
editClick(e) {
let item = e.currentTarget.dataset.set
wx.navigateTo({
@@ -180,13 +193,6 @@ Page({
this.getListData(nav);
},
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
-
- },
-
/**
* 生命周期函数--监听页面显示
*/
@@ -224,38 +230,4 @@ Page({
}
},
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
-
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
-
- }
})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_checked/list/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_checked/list/index.wxml
index 38ff514d..6a2b476e 100644
--- a/yanzhu-ui-app/miniprogram/pageage/project_checked/list/index.wxml
+++ b/yanzhu-ui-app/miniprogram/pageage/project_checked/list/index.wxml
@@ -30,9 +30,13 @@
-
+
+
+
+
+
{{
index < 10 ? "0" + (index + 1) : index + 1 }}