From ba15d76ff0ec80ee759913511158d4333f6e6c59 Mon Sep 17 00:00:00 2001 From: cuijian <cuijian@xalxzn.com> Date: 星期五, 29 八月 2025 18:21:22 +0800 Subject: [PATCH] 日常业务问题修改、工具参数查询增加 --- src/views/flowable/workflow/lossBound/lossBoundHandle.vue | 134 +++++++++++++++++++++++++++++++++++--------- 1 files changed, 106 insertions(+), 28 deletions(-) diff --git a/src/views/flowable/workflow/lossBound/lossBoundHandle.vue b/src/views/flowable/workflow/lossBound/lossBoundHandle.vue index a9e2cfd..56e4eda 100644 --- a/src/views/flowable/workflow/lossBound/lossBoundHandle.vue +++ b/src/views/flowable/workflow/lossBound/lossBoundHandle.vue @@ -36,44 +36,45 @@ <a-row> <a-col :span="span"> <a-form-model-item label="鎶ユ崯鍗曞崟鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outNum"> - <a-input :readOnly="inputReadOnly" v-model="tableRowRecord.orderCode"></a-input> + <a-input disabled v-model="tableRowRecord.orderCode"></a-input> </a-form-model-item> </a-col> <a-col :span="span"> - <a-form-model-item label="鎶ユ崯浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" - prop="outStorehouseType"> - <j-dict-select-tag :readOnly="inputReadOnly" - v-model="tableRowRecord.losser" dictCode="sys_user,realname,id" + <a-form-model-item label="缁忔墜浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="handler"> + <j-dict-select-tag disabled + v-model="tableRowRecord.handler" dictCode="sys_user,realname,id" placeholder="璇烽�夋嫨" /> </a-form-model-item> </a-col> + <!-- <a-col :span="span"> + <a-form-model-item label="鎶ユ崯浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" + prop="outStorehouseType"> + <j-dict-select-tag disabled + v-model="tableRowRecord.losser" dictCode="sys_user,realname,id" + placeholder="璇烽�夋嫨" /> + </a-form-model-item> + </a-col> --> </a-row> <a-row> <a-col :span="span"> <a-form-model-item label="鎶ユ崯鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outboundTime"> - <j-date :readOnly="inputReadOnly" v-model="tableRowRecord.lossTime" :show-time="true" + <j-date disabled v-model="tableRowRecord.lossTime" :show-time="true" dateFormat="YYYY-MM-DD HH:mm" style="width: 100%" /> </a-form-model-item> </a-col> <a-col :span="span"> <a-form-model-item label="鎶ユ崯鍘熷洜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="subjectMatter"> - <a-input :readOnly="inputReadOnly" v-model="tableRowRecord.lossReason"></a-input> + <a-input disabled v-model="tableRowRecord.lossReason"></a-input> </a-form-model-item> </a-col> </a-row> <a-row> - <a-col :span="span"> - <a-form-model-item label="缁忔墜浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="handler"> - <j-dict-select-tag :readOnly="inputReadOnly" - v-model="tableRowRecord.handler" dictCode="sys_user,realname,id" - placeholder="璇烽�夋嫨" /> - </a-form-model-item> - </a-col> - <a-col :span="span"> - <a-form-model-item label="澶囨敞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> - <a-textarea :readOnly="inputReadOnly" v-model="tableRowRecord.remark" rows="4" /> + + <a-col :span="24"> + <a-form-model-item label="澶囨敞" :labelCol="{span:2}" :wrapperCol="{span:20}" prop="remark"> + <a-textarea disabled v-model="tableRowRecord.remark" rows="2" /> </a-form-model-item> </a-col> </a-row> @@ -118,8 +119,8 @@ <a-form-model ref="form" :model="approveData" :rules="validatorRules" slot="detail"> <a-row> <a-col ::span="span"> - <a-form-model-item label="鐢宠浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="handler_dictText"> - <a-input :readOnly="inputReadOnly" v-model="tableRowRecord.handler_dictText"></a-input> + <a-form-model-item label="鐢宠浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="handlePerson"> + <a-input :readOnly="inputReadOnly" v-model="tableRowRecord.handlePerson"></a-input> </a-form-model-item> </a-col> <a-col ::span="span"> @@ -143,8 +144,20 @@ </a-col> </a-row> <div class="table-operator" style="text-align: right;"> - <a-button @click="handleQueXiaoTask" type="primary" icon="close">鍙栨秷</a-button> - <a-button :disabled="disableSubmit" @click="submitForm">鎻愪氦</a-button> + <a-button + @click="handleQueXiaoTask" + icon="close" + :disabled="isSubmitting" + :class="{'disabled-btn': isSubmitting}" + >鍙栨秷</a-button> + <a-button + @click="submitForm" + type="primary" + :disabled="isSubmitting" + :loading="isSubmitting" + > + 鎻� 浜� + </a-button> </div> </a-form-model> </div> @@ -223,7 +236,7 @@ { title: '鍒�鍏风紪鍙�', align: 'center', - dataIndex: 'toolCode' + dataIndex: 'toolId' }, { title: '宸ュ叿绫诲瀷', @@ -304,7 +317,8 @@ }, dictOptions: {}, superFieldList: [], - workflowSource: [] + workflowSource: [], + isSubmitting: false, } }, created() { @@ -339,11 +353,27 @@ } }, handleQueXiaoTask() { - this.visible = false - this.routeReload() + // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈠彇娑堟搷浣� + if (this.isSubmitting) return; + this.visible = false; + this.routeReload(); }, submitForm() { - const that = this + // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈤噸澶嶇偣鍑� + if (this.isSubmitting) return; + + // 寮�鍚叏灞�绂侀�� + this.isSubmitting = true; + document.body.classList.add('submitting'); + + const that = this; + + // 瀹氫箟涓�涓仮澶嶇姸鎬佺殑鍑芥暟 + const resetState = () => { + that.isSubmitting = false; + document.body.classList.remove('submitting'); + }; + if (!that.assignFileStream.status == null || that.assignFileStream.status === undefined) { this.$message.warning('璇烽�夋嫨瀹℃壒鐘舵�侊紒') return false @@ -354,6 +384,10 @@ } // 瑙﹀彂琛ㄥ崟楠岃瘉 this.form.validateFields((err, values) => { + if (err) { + resetState(); // 楠岃瘉澶辫触锛屾仮澶嶇姸鎬� + return; + } if (!err) { that.confirmLoading = true let url = this.url.approve @@ -379,9 +413,15 @@ } else { that.$message.warning(res.message) } - }).finally(() => { - that.confirmLoading = false }) + .catch((error) => { + console.error(error); + that.$message.error('鎻愪氦澶辫触'); + }) + .finally(() => { + that.confirmLoading = false; + resetState(); // 璇锋眰缁撴潫锛屾仮澶嶇姸鎬� + }); } }) @@ -424,6 +464,44 @@ } </script> <style scoped> +/* 鍏ㄥ眬绂侀�夋牱寮� - 浣滅敤浜庢暣涓〉闈� */ +html.submitting, +html.submitting body { + pointer-events: none !important; + cursor: wait !important; +} + +/* 钂欏眰鏁堟灉澧炲己 */ +html.submitting::before { + content: ''; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(255, 255, 255, 0.5); + z-index: 9998; +} + +/* 鍔犺浇鎸囩ず鍣� - 鏇存槑鏄剧殑瑙嗚鍙嶉 */ +html.submitting::after { + content: '鎻愪氦涓�...'; + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + background: #1890ff; + color: white; + padding: 10px 20px; + border-radius: 4px; + z-index: 9999; +} + +/* 绂佺敤鐘舵�佹寜閽牱寮� */ +.disabled-btn { + opacity: 0.6; + cursor: not-allowed !important; +} .shallow-hr { border: 0; height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */ -- Gitblit v1.9.3