HD_wangm 4 місяців тому
батько
коміт
fa043284e9

+ 22 - 0
ygtx-gxt/src/main/java/com/ygtx/gxt/domain/GxtRepairOrder.java

@@ -279,6 +279,12 @@ public class GxtRepairOrder extends BaseEntity
     /** 额外工作总结 */
     private String extraWork;
 
+    /** 接单退回原因 */
+    private String acceptReturnType;
+    
+    /** 接单退回说明 */
+    private String acceptReturnReason;
+
     public void setId(Long id) 
     {
         this.id = id;
@@ -958,6 +964,22 @@ public class GxtRepairOrder extends BaseEntity
         this.extraWork = extraWork;
     }
 
+    public String getAcceptReturnType() {
+        return acceptReturnType;
+    }
+
+    public void setAcceptReturnType(String acceptReturnType) {
+        this.acceptReturnType = acceptReturnType;
+    }
+
+    public String getAcceptReturnReason() {
+        return acceptReturnReason;
+    }
+
+    public void setAcceptReturnReason(String acceptReturnReason) {
+        this.acceptReturnReason = acceptReturnReason;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 12 - 1
ygtx-gxt/src/main/resources/mapper/gxt/GxtRepairOrderMapper.xml

@@ -81,6 +81,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="suspendExplain"    column="suspend_explain"    />
         <result property="orderAttachment"    column="order_attachment"    />
         <result property="extraWork"    column="extra_work"    />
+        <result property="acceptReturnType"    column="accept_return_type"    />
+        <result property="acceptReturnReason"    column="accept_return_reason"    />
         <result property="scoreReturnReason"    column="score_return_reason"    />
     </resultMap>
 
@@ -143,7 +145,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                review_content, maintenance_type, occur_time, fault_barcode, suspend_reason, suspend_description, approval_status,
                rejection_reason, modify_reason, finalization_remark, related_order_code, related_order_content, mis_order_no, restart_time,
                scoring_status, pcs_station_pid, attachment_urls, review_score_num, final_coefficient, order_type, repair_method, reset_method, invalid_reason, return_type, return_reason, feedback_reason, confirm_status,
-                wwry_num, wlry_num, work_area, info_entry, real_failure_reason, lost_power, work_permit_num, appeal_user_name, appeal_user_id, appeal_time, appeal_reason, suspend_explain, order_entry_type, order_attachment, extra_work, score_return_reason from gxt_repair_order t
+                wwry_num, wlry_num, work_area, info_entry, real_failure_reason, lost_power, work_permit_num, appeal_user_name, appeal_user_id, appeal_time, appeal_reason, suspend_explain, order_entry_type, order_attachment, extra_work, accept_return_type, accept_return_reason, score_return_reason from gxt_repair_order t
         left join sys_user u on u.user_name = t.create_by
         left join sys_dept d on u.dept_id = d.dept_id
     </sql>
@@ -310,6 +312,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderEntryType != null and orderEntryType != ''">order_entry_type,</if>
             <if test="orderAttachment != null and orderAttachment != ''">order_attachment,</if>
             <if test="extraWork != null and extraWork != ''">extra_work,</if>
+            <if test="acceptReturnType != null and acceptReturnType != ''">accept_return_type,</if>
+            <if test="acceptReturnReason != null and acceptReturnReason != ''">accept_return_reason,</if>
             <if test="scoreReturnReason != null and scoreReturnReason != ''">score_return_reason,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -388,6 +392,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderEntryType != null and orderEntryType != ''">#{orderEntryType},</if>
             <if test="orderAttachment != null and orderAttachment != ''">#{orderAttachment},</if>
             <if test="extraWork != null and extraWork != ''">#{extraWork},</if>
+            <if test="acceptReturnType != null and acceptReturnType != ''">#{acceptReturnType},</if>
+            <if test="acceptReturnReason != null and acceptReturnReason != ''">#{acceptReturnReason},</if>
             <if test="scoreReturnReason != null and scoreReturnReason != ''">#{scoreReturnReason},</if>
         </trim>
     </insert>
@@ -470,6 +476,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderEntryType != null and orderEntryType != ''">order_entry_type = #{orderEntryType},</if>
             <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>
             <if test="scoreReturnReason != null and scoreReturnReason != ''">score_return_reason = #{scoreReturnReason},</if>
         </trim>
         where id = #{id}
@@ -614,6 +622,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             t1.return_reason,
             t1.order_attachment,
             t1.extra_work,
+            t1.accept_return_type,
+            t1.accept_return_reason,
+            t1.score_return_reason,
             t2.id as person_id,
             t2.user_id as person_user_id,
             t2.nick_name as person_nick_name,

+ 49 - 7
ygtx-ui/src/components/repairOrder/return.vue

@@ -50,8 +50,8 @@
             <el-input v-model="formData.teamLeaderName" disabled />
           </el-form-item>
         </el-col>
-        <el-col :span="12">
-          <el-form-item label="退回类型" prop="returnType">
+        <el-col :span="12" v-if="formData.workOrderStatus == 'return' || formData.workOrderStatus == 'to_finish'">
+          <el-form-item label="退回原因" prop="returnType">
             <el-select
               v-model="formData.returnType"
               placeholder="请选择退回类型"
@@ -67,18 +67,44 @@
             </el-select>
           </el-form-item>
         </el-col>
+        <el-col :span="12" v-if="formData.workOrderStatus == 'assigned'">
+          <el-form-item label="退回原因" prop="acceptReturnType">
+            <el-select
+                v-model="formData.acceptReturnType"
+                placeholder="请选择退回类型"
+                style="width: 100%"
+            >
+              <el-option
+                  v-for="dict in returnTypeOptions"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+              />
+            </el-select>
+          </el-form-item>
+        </el-col>
       </el-row>
-      <el-form-item label="退回原因" prop="returnReason">
+      <el-form-item label="其他说明" prop="returnReason" v-if="formData.returnType == '0' && (formData.workOrderStatus == 'return' || formData.workOrderStatus == 'to_finish')">
         <el-input
           v-model="formData.returnReason"
           type="textarea"
-          placeholder="请输入退回原因"
+          placeholder="请输入其他说明"
           maxlength="100"
           show-word-limit
           :rows="3"
           :disabled="formData.workOrderStatus === 'return'"
         />
       </el-form-item>
+      <el-form-item label="其他说明" prop="acceptReturnReason" v-if="formData.acceptReturnType == '0' && formData.workOrderStatus == 'assigned'">
+        <el-input
+            v-model="formData.acceptReturnReason"
+            type="textarea"
+            placeholder="请输入其他说明"
+            maxlength="100"
+            show-word-limit
+            :rows="3"
+        />
+      </el-form-item>
     </el-form>
     <template #footer>
       <div class="dialog-footer">
@@ -116,7 +142,7 @@ const props = defineProps({
   onSubmit: {
     type: Function,
     default: null
-  }
+  },
 })
 
 // 定义事件
@@ -131,10 +157,16 @@ const submitLoading = ref(false)
 // 表单验证规则
 const returnRules = ref({
   returnType: [
-    { required: true, message: "请选择退回类型", trigger: "change" }
+    { required: true, message: "请选择退回原因", trigger: "change" }
   ],
   returnReason: [
-    { required: true, message: "请输入退回原因", trigger: "change" }
+    { required: true, message: "请输入其他说明", trigger: "change" }
+  ],
+  acceptReturnType: [
+    { required: true, message: "请选择退回原因", trigger: "change" }
+  ],
+  acceptReturnReason: [
+    { required: true, message: "请输入其他说明", trigger: "change" }
   ]
 })
 
@@ -171,11 +203,21 @@ watch(visible, (val) => {
 // 关闭对话框
 const handleClose = () => {
   visible.value = false
+  returnFormRef.value.clearValidate()
+  formData.value.returnType = undefined
+  formData.value.returnReason = ''
+  formData.value.acppetReturnType = undefined
+  formData.value.acceptReturnReason = ''
 }
 
 // 取消操作
 const handleCancel = () => {
   visible.value = false
+  returnFormRef.value.clearValidate()
+  formData.value.returnType = undefined
+  formData.value.returnReason = ''
+  formData.value.acppetReturnType = undefined
+  formData.value.acceptReturnReason = ''
 }
 
 // 提交操作

+ 15 - 3
ygtx-ui/src/components/repairOrder/view.vue

@@ -69,12 +69,20 @@
                   <el-form-item label="检修人员">{{ formData.workGroupMemberName || '-' }}</el-form-item>
                 </el-col>
                 <el-col :span="24" v-if="formData.returnType">
-                  <el-form-item label="退回类型">
+                  <el-form-item label="结单退回原因">
                     <dict-tag :options="returnTypeOptions" :value="formData.returnType" />
                   </el-form-item>
                 </el-col>
-                <el-col :span="24" v-if="formData.returnType">
-                  <el-form-item label="退回原因">{{ formData.returnReason || '-' }}</el-form-item>
+                <el-col :span="24" v-if="formData.returnReason">
+                  <el-form-item label="结单退回说明">{{ formData.returnReason || '-' }}</el-form-item>
+                </el-col>
+                <el-col :span="24" v-if="formData.acceptReturnType">
+                  <el-form-item label="接单退回原因">
+                    <dict-tag :options="acceptReturnTypeOptions" :value="formData.acceptReturnType" />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="24" v-if="formData.acceptReturnReason">
+                  <el-form-item label="接单退回说明">{{ formData.acceptReturnReason || '-' }}</el-form-item>
                 </el-col>
                 <template v-if="formData.repairMethod !== '2'">
                   <el-col :span="24">
@@ -226,6 +234,10 @@ const props = defineProps({
     type: Array,
     default: () => ([])
   },
+  acceptReturnTypeOptions: {
+    type: Array,
+    default: () => ([])
+  },
 })
 
 // 定义事件

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

@@ -1244,7 +1244,7 @@
         v-model="returnDialogVisible"
         :data="returnForm"
         :work-order-status-options="gxt_work_order_status"
-        :return-type-options="gxt_return_type"
+        :return-type-options="returnForm.workOrderStatus == 'assigned' ? gxt_accept_return_reason : gxt_return_type "
         :on-submit="submitReturnFromParent"
         @success="handleReturnSuccess"
     />
@@ -1481,7 +1481,8 @@ const {
   gxt_reset_method,
   gxt_info_entry,
   gxt_work_area,
-  gxt_return_type
+  gxt_return_type,
+  gxt_accept_return_reason
 } = proxy.useDict(
   "gxt_maintenance_type",
   "gxt_work_order_status",
@@ -1494,7 +1495,8 @@ const {
   "gxt_reset_method",
   "gxt_info_entry",
   "gxt_work_area",
-    "gxt_return_type"
+    "gxt_return_type",
+    "gxt_accept_return_reason"
 );
 
 // 表单验证规则

+ 7 - 2
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="gxt_return_type"
+        :return-type-options="returnForm.workOrderStatus == 'assigned' ? gxt_accept_return_type : gxt_return_type "
         :on-submit="submitReturnFromParent"
         @success="handleReturnSuccess"
     />
@@ -1247,6 +1247,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"
     />
 
     <!-- 审批对话框组件 -->
@@ -1358,7 +1359,10 @@ import SuspendDialog from '@/components/repairOrder/suspend.vue'
 import ViewDialog from '@/components/repairOrder/view.vue'
 import ApproveDialog from '@/components/repairOrder/approve.vue'
 const { proxy } = getCurrentInstance()
-const { gxt_maintenance_type, gxt_work_order_status, gxt_order_priority_type,gxt_repair_order_flow_action_type,gxt_order_suspend_reason,gxt_repair_method,gxt_reset_method,gxt_return_type,gxt_info_entry,gxt_work_area } = proxy.useDict("gxt_maintenance_type", "gxt_work_order_status", "gxt_order_priority_type","gxt_repair_order_flow_action_type","gxt_order_suspend_reason","gxt_repair_method","gxt_reset_method","gxt_return_type","gxt_info_entry","gxt_work_area")
+const { gxt_maintenance_type, gxt_work_order_status, gxt_order_priority_type,gxt_repair_order_flow_action_type,
+  gxt_order_suspend_reason,gxt_repair_method,gxt_reset_method,gxt_return_type,gxt_info_entry,gxt_work_area, gxt_accept_return_type }
+    = proxy.useDict("gxt_maintenance_type", "gxt_work_order_status", "gxt_order_priority_type","gxt_repair_order_flow_action_type",
+    "gxt_order_suspend_reason","gxt_repair_method","gxt_reset_method","gxt_return_type","gxt_info_entry","gxt_work_area","gxt_accept_return_type")
 
 // 数据列表相关
 const repairOrderList = ref([])
@@ -3045,6 +3049,7 @@ function handleReturn(row) {
       returnForm.value.returnReason = undefined
     }
     returnDialogVisible.value = true
+
   })
 }