HD_wangm 3 месяцев назад
Родитель
Сommit
834d72f4f4

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

@@ -458,7 +458,7 @@ 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="workOrderStatus != null and (workOrderStatus == 'return' or workOrderStatus == 'accept_return')">
+            <if test="workOrderStatus != null and workOrderStatus == 'return'">
                 return_reason = #{returnReason},
             </if>
             <if test="feedbackReason != null and feedbackReason != ''">feedback_reason = #{feedbackReason},</if>
@@ -479,7 +479,9 @@ 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>
-            accept_return_reason = #{acceptReturnReason},
+            <if test="workOrderStatus != null and workOrderStatus == 'accept_return'">
+                accept_return_reason = #{acceptReturnReason},
+            </if>
             <if test="scoreReturnReason != null and scoreReturnReason != ''">score_return_reason = #{scoreReturnReason},</if>
         </trim>
         where id = #{id}

+ 4 - 4
ygtx-ui/src/components/repairOrder/return.vue

@@ -50,7 +50,7 @@
             <el-input v-model="formData.teamLeaderName" disabled />
           </el-form-item>
         </el-col>
-        <el-col :span="12" v-if="formData.workOrderStatus == 'return' || formData.workOrderStatus == 'to_finish'">
+        <el-col :span="12" v-if="formData.workOrderStatus == 'to_finish'">
           <el-form-item label="退回原因" prop="returnType">
             <el-select
               v-model="formData.returnType"
@@ -68,7 +68,7 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="12" v-if="formData.workOrderStatus == 'assigned'">
+        <el-col :span="12" v-if="formData.workOrderStatus == 'assigned' || formData.workOrderStatus == 'return'">
           <el-form-item label="退回原因" prop="acceptReturnType">
             <el-select
                 v-model="formData.acceptReturnType"
@@ -86,7 +86,7 @@
           </el-form-item>
         </el-col>
       </el-row>
-      <el-form-item label="退回说明" prop="returnReason" v-if="formData.returnType == '0' && (formData.workOrderStatus == 'return' || formData.workOrderStatus == 'to_finish')">
+      <el-form-item label="退回说明" prop="returnReason" v-if="formData.returnType == '0' && formData.workOrderStatus == 'to_finish'">
         <el-input
           v-model="formData.returnReason"
           type="textarea"
@@ -97,7 +97,7 @@
           :disabled="formData.workOrderStatus === 'return'"
         />
       </el-form-item>
-      <el-form-item label="退回说明" prop="acceptReturnReason" v-if="formData.acceptReturnType == '0' && formData.workOrderStatus == 'assigned'">
+      <el-form-item label="退回说明" prop="acceptReturnReason" v-if="formData.acceptReturnType == '0' && (formData.workOrderStatus == 'assigned' || formData.workOrderStatus == 'return')">
         <el-input
             v-model="formData.acceptReturnReason"
             type="textarea"

+ 8 - 5
ygtx-ui/src/views/gxt/orderMyTodo/index.vue

@@ -296,6 +296,7 @@
         :repair-order-flow-action-type-options="gxt_repair_order_flow_action_type"
         :work-area-options="gxt_work_area"
         :return-type-options="gxt_return_type"
+        :accept-return-type-options="gxt_accept_return_type"
     />
 
     <!-- 维保工单详情对话框 -->
@@ -1244,7 +1245,7 @@
         v-model="returnDialogVisible"
         :data="returnForm"
         :work-order-status-options="gxt_work_order_status"
-        :return-type-options="returnForm.workOrderStatus == 'assigned' ? gxt_accept_return_reason : gxt_return_type "
+        :return-type-options="returnForm.workOrderStatus == 'to_finish' ? gxt_return_type : gxt_accept_return_type"
         :on-submit="submitReturnFromParent"
         @success="handleReturnSuccess"
     />
@@ -1482,7 +1483,7 @@ const {
   gxt_info_entry,
   gxt_work_area,
   gxt_return_type,
-  gxt_accept_return_reason
+  gxt_accept_return_type
 } = proxy.useDict(
   "gxt_maintenance_type",
   "gxt_work_order_status",
@@ -1496,7 +1497,7 @@ const {
   "gxt_info_entry",
   "gxt_work_area",
     "gxt_return_type",
-    "gxt_accept_return_reason"
+    "gxt_accept_return_type"
 );
 
 // 表单验证规则
@@ -2686,10 +2687,12 @@ async function submitFinalizeFromParent(data) {
 function handleReturn(row) {
   getRepairOrder(row.id).then(response => {
     returnForm.value = response.data
-    if (row.workOrderStatus != 'return') {
+    // if (row.workOrderStatus != 'return') {
       returnForm.value.returnType = undefined
       returnForm.value.returnReason = undefined
-    }
+      returnForm.value.acceptReturnType = undefined
+      returnForm.value.acceptReturnReason = undefined
+    // }
     returnDialogVisible.value = true
   })
 }

+ 8 - 5
ygtx-ui/src/views/gxt/repairOrder/index.vue

@@ -837,7 +837,7 @@
         v-model="returnDialogVisible"
         :data="returnForm"
         :work-order-status-options="gxt_work_order_status"
-        :return-type-options="returnForm.workOrderStatus == 'assigned' ? gxt_accept_return_type : gxt_return_type "
+        :return-type-options="returnForm.workOrderStatus == 'to_finish' ?gxt_return_type : gxt_accept_return_type "
         :on-submit="submitReturnFromParent"
         @success="handleReturnSuccess"
     />
@@ -3044,12 +3044,15 @@ function handleApprove(row) {
 function handleReturn(row) {
   getRepairOrder(row.id).then(response => {
     returnForm.value = response.data
-    if (row.workOrderStatus != 'return') {
+    if (row.workOrderStatus == 'to_finish') {
+      returnForm.value.returnType = '1'
+    } else {
       returnForm.value.returnType = undefined
-      returnForm.value.returnReason = undefined
-      returnForm.value.acceptReturnType = undefined
-      returnForm.value.acceptReturnReason = undefined
     }
+    returnForm.value.returnReason = undefined
+    returnForm.value.acceptReturnType = undefined
+    returnForm.value.acceptReturnReason = undefined
+    // }
     returnDialogVisible.value = true
     // proxy.resetForm("returnFormRef")
   })