diff --git a/public/css/main.css b/public/css/main.css
index 9c78a10..8ba3684 100644
--- a/public/css/main.css
+++ b/public/css/main.css
@@ -1085,4 +1085,43 @@ td {
height: 100%;
width: 100%;
z-index: 10;
+}
+.popup-container{
+ display: none;
+ padding: 10px 20px;
+ position: absolute;
+ top: 25px;
+ right: 10px;
+ z-index: 999;
+ background: rgba(255, 255, 255, 0.3);
+ text-align: center;
+ color: #fff;
+ border-radius: 5px;
+}
+.popup-container>div:first-child{
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.popup-container>div:first-child>span{
+ width: 80px;
+}
+.popup-container>div:first-child>textarea{
+ resize: none;
+ border: none;
+ padding: 10px;
+ outline: none;
+}
+.popup-container>div:last-child{
+ padding-top: 10px;
+ text-align: right;
+}
+.reject-button{
+ display: inline-block;
+ padding: 0px 10px;
+ cursor: pointer;
+ border-radius: 3px;
+}
+#save-reject-btn{
+ background: #409eff;
}
\ No newline at end of file
diff --git a/public/js/editor.js b/public/js/editor.js
index fcdb4d1..40b871a 100644
--- a/public/js/editor.js
+++ b/public/js/editor.js
@@ -2104,6 +2104,11 @@ function Editor(editorUi, wrapperUi, editorCfg, data, name = "editor") {
// }
this.keydown = function (ev) {
+ const element = document.getElementById('reson');
+ const displayValue = window.getComputedStyle(element).display;
+ if (displayValue === 'block') {
+ return;
+ }
// if (this.keydownDisabled)
// return;
diff --git a/public/js/header.js b/public/js/header.js
index f7e0d93..93a91ca 100644
--- a/public/js/header.js
+++ b/public/js/header.js
@@ -229,10 +229,29 @@ var Header = function (
this.ui.querySelector("#save-pass").onclick = () => {
qc(1)
};
- // 打回
+ // 打回弹窗
this.ui.querySelector("#save-reject").onclick = () => {
- qc(0)
+ document.getElementById('popup').style.display = "block";
};
+ this.ui.addEventListener('click', (event) => {
+ const target = event.target;
+ // 处理确认打回按钮
+ if (target.id === 'save-reject-btn') {
+ const resonTextarea = this.ui.querySelector('#reson');
+ const resonValue = resonTextarea.value;
+ if(!resonValue || resonValue === ''){
+ alert('请填写打回理由');
+ }else{
+ qc(0);
+ }
+ }
+
+ // 处理取消打回按钮
+ if (target.id === 'cancel-reject-btn') {
+ const popup = this.ui.querySelector('#popup');
+ if (popup) popup.style.display = "none";
+ }
+ })
function qc(type){
const microData = window.microApp.getData()
var xhr = new XMLHttpRequest();
@@ -241,11 +260,12 @@ var Header = function (
// window.microApp.dispatch({ type: 'pointCloudBack', time: new Date() })
document.getElementById('save-pass').style.display = 'none'
document.getElementById('save-reject').style.display = 'none'
+ document.getElementById('popup').style.display = "none";
}
}
xhr.open(
"POST",
- `${http.requestHttp}/project/qc?id=${microData.dataId}&type=${type}&taskId=${microData.taskId}`,
+ `${http.requestHttp}/project/qc?id=${microData.dataId}&type=${type}&taskId=${microData.taskId}${type === 0 ? `&remark=${document.getElementById('reson').value}` : ''}`,
true
);
xhr.setRequestHeader('Content-Type', 'application/json');
+
+
+
+ 打回原因:
+
+
+
+ 取消
+ 确定
+
+
@@ -75,7 +87,7 @@
-