瀏覽代碼

退回非其他原因清空说明

HD_wangm 4 月之前
父節點
當前提交
556835b5dd

+ 4 - 2
ygtx-gxt/src/main/resources/mapper/gxt/GxtRepairOrderMapper.xml

@@ -458,7 +458,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="resetMethod != null and resetMethod != ''">reset_method = #{resetMethod},</if>
             <if test="invalidReason != null and invalidReason != ''">invalid_reason = #{invalidReason},</if>
             <if test="returnType != null and returnType != ''">return_type = #{returnType},</if>
-            <if test="returnReason != null and returnReason != ''">return_reason = #{returnReason},</if>
+            <if test="workOrderStatus != null and (workOrderStatus == 'return' or workOrderStatus == 'accept_return')">
+                return_reason = #{returnReason},
+            </if>
             <if test="feedbackReason != null and feedbackReason != ''">feedback_reason = #{feedbackReason},</if>
             <if test="confirmStatus != null">confirm_status = #{confirmStatus},</if>
             <if test="wwryNum != null">wwry_num = #{wwryNum},</if>
@@ -477,7 +479,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderAttachment != null and orderAttachment != ''">order_attachment = #{orderAttachment},</if>
             <if test="extraWork != null and extraWork != ''">extra_work = #{extraWork},</if>
             <if test="acceptReturnType != null and acceptReturnType != ''">accept_return_type = #{acceptReturnType},</if>
-            <if test="acceptReturnReason != null and acceptReturnReason != ''">accept_return_reason = #{acceptReturnReason},</if>
+            accept_return_reason = #{acceptReturnReason},
             <if test="scoreReturnReason != null and scoreReturnReason != ''">score_return_reason = #{scoreReturnReason},</if>
         </trim>
         where id = #{id}

+ 2 - 2
ygtx-ui/src/components/gxtOrder/suspend.vue

@@ -20,7 +20,7 @@
         </el-col>
         <el-col :span="12">
           <el-form-item label="挂起原因" prop="suspendReason">
-            <el-select v-model="formData.suspendReason" placeholder="请选择挂起原因" style="width: 100%">
+            <el-select v-model="formData.suspendReason" placeholder="请选择挂起原因" style="width: 100%" @change="handleSuspendReasonChange">
               <el-option
                 v-for="dict in suspendReasonOptions"
                 :key="dict.value"
@@ -170,7 +170,7 @@ const handleSubmit = async () => {
 
 // 挂起原因变化处理
 const handleSuspendReasonChange = (val) => {
-  // 选中4工作票编号时修改其他值
+  // 不为其他清空说明
   if (val != '4') {
     formData.value.suspendExplain = undefined
   }

+ 1 - 2
ygtx-ui/src/components/repairOrder/return.vue

@@ -257,8 +257,7 @@ const handleSubmit = async () => {
 
 // 退回原因变化处理
 const handleReturnTypeChange = (val) => {
-  // 选中2工作票编号时修改其他值
-  if (val != '0') {
+  if (val != '0') { // 不为其他清空说明
     formData.value.returnReason = undefined
     formData.value.acceptReturnReason = undefined
   }

+ 1 - 1
ygtx-ui/src/components/repairOrder/suspend.vue

@@ -170,7 +170,7 @@ const handleSubmit = async () => {
 
 // 挂起原因变化处理
 const handleSuspendReasonChange = (val) => {
-  // 选中4工作票编号时修改其他值
+  // 不为其他清空说明
   if (val != '4') {
     formData.value.suspendExplain = undefined
   }

+ 2 - 0
ygtx-ui/src/views/gxt/repairOrder/index.vue

@@ -3047,6 +3047,8 @@ function handleReturn(row) {
     if (row.workOrderStatus != 'return') {
       returnForm.value.returnType = undefined
       returnForm.value.returnReason = undefined
+      returnForm.value.acceptReturnType = undefined
+      returnForm.value.acceptReturnReason = undefined
     }
     returnDialogVisible.value = true
     // proxy.resetForm("returnFormRef")