Просмотр исходного кода

维修工单新增添加附件

HD_wangm 4 месяцев назад
Родитель
Сommit
785f4ede25

+ 12 - 1
ygtx-gxt/src/main/java/com/ygtx/gxt/domain/GxtRepairOrder.java

@@ -162,6 +162,9 @@ public class GxtRepairOrder extends BaseEntity
     /** 挂起其他说明 */
     private String suspendExplain;
     
+    /** 工单附件 */
+    private String orderAttachment;
+    
     /** 审批状态 */
     private String approvalStatus;
 
@@ -617,7 +620,15 @@ public class GxtRepairOrder extends BaseEntity
     public void setSuspendExplain(String suspendExplain) {
         this.suspendExplain = suspendExplain;
     }
-
+        
+    public String getOrderAttachment() {
+        return orderAttachment;
+    }
+        
+    public void setOrderAttachment(String orderAttachment) {
+        this.orderAttachment = orderAttachment;
+    }
+        
     public String getApprovalStatus() {
         return approvalStatus;
     }

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

@@ -79,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="appealTime"    column="appeal_time"    />
         <result property="appealReason"    column="appeal_reason"    />
         <result property="suspendExplain"    column="suspend_explain"    />
+        <result property="orderAttachment"    column="order_attachment"    />
     </resultMap>
 
     <resultMap type="GxtRepairOrder" id="GxtRepairOrderWithPersonResult" extends="GxtRepairOrderResult">
@@ -138,7 +139,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 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 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>
@@ -303,6 +304,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="appealReason != null and appealReason != ''">appeal_reason,</if>
             <if test="suspendExplain != null and suspendExplain != ''">suspend_explain,</if>
             <if test="orderEntryType != null and orderEntryType != ''">order_entry_type,</if>
+            <if test="orderAttachment != null and orderAttachment != ''">order_attachment,</if>
             </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="workOrderProjectNo != null and workOrderProjectNo != ''">#{workOrderProjectNo},</if>
@@ -378,6 +380,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="appealReason != null and appealReason != ''">#{appealReason},</if>
             <if test="suspendExplain != null and suspendExplain != ''">#{suspendExplain},</if>
             <if test="orderEntryType != null and orderEntryType != ''">#{orderEntryType},</if>
+            <if test="orderAttachment != null and orderAttachment != ''">#{orderAttachment},</if>
         </trim>
     </insert>
 
@@ -457,6 +460,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="appealReason != null and appealReason != ''">appeal_reason = #{appealReason},</if>
             <if test="suspendExplain != null and suspendExplain != ''">suspend_explain = #{suspendExplain},</if>
             <if test="orderEntryType != null and orderEntryType != ''">order_entry_type = #{orderEntryType},</if>
+            <if test="orderAttachment != null and orderAttachment != ''">order_attachment = #{orderAttachment},</if>
         </trim>
         where id = #{id}
     </update>
@@ -598,6 +602,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             t1.remark,
             t1.return_type,
             t1.return_reason,
+            t1.order_attachment,
             t2.id as person_id,
             t2.user_id as person_user_id,
             t2.nick_name as person_nick_name,

+ 10 - 1
ygtx-ui/src/components/repairOrder/view.vue

@@ -150,7 +150,16 @@
         </el-col>
       </el-row>
     </el-form>
-
+    <div class="info-section" v-if="formData.orderAttachment">
+      <h3 class="section-title">工单附件</h3>
+      <el-row>
+        <el-col :span="24">
+          <el-form-item label="附件">
+            <preview :limit="8" v-model="formData.orderAttachment" :filesize="5" disabled></preview>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </div>
     <!-- 附件信息 -->
     <div class="info-section" v-if="formData.attachmentUrls">
       <h3 class="section-title">结单附件</h3>

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

@@ -477,6 +477,11 @@
             </el-form-item>
           </el-col>
         </el-row>
+        <el-col :span="24">
+          <el-form-item label="附件(可选)">
+            <preview :limit="8" v-model="form.orderAttachment" :filesize="5"></preview>
+          </el-form-item>
+        </el-col>
 <!--        <el-row>
           <el-col :span="24">
             <el-form-item label="故障描述" prop="faultDesc">
@@ -1045,33 +1050,6 @@
               <el-input v-model="restartForm.workPermitNum" disabled />
             </el-form-item>
           </el-col>
-<!--          <el-col :span="12">-->
-<!--            <el-form-item label="检修类型">-->
-<!--              <el-select v-model="restartForm.maintenanceType" style="width: 100%" disabled>-->
-<!--                <el-option-->
-<!--                    v-for="dict in gxt_maintenance_type"-->
-<!--                    :key="dict.value"-->
-<!--                    :label="dict.label"-->
-<!--                    :value="dict.value"-->
-<!--                />-->
-<!--              </el-select>-->
-<!--            </el-form-item>-->
-<!--          </el-col>-->
-<!--          <el-col :span="24">-->
-<!--            <el-form-item label="维修总结">-->
-<!--              <el-input-->
-<!--                v-model="restartForm.content"-->
-<!--                type="textarea"-->
-<!--                :rows="3"-->
-<!--                disabled-->
-<!--              />-->
-<!--            </el-form-item>-->
-<!--          </el-col>-->
-<!--          <el-col :span="24">-->
-<!--            <el-form-item label="附件">-->
-<!--              <preview :limit="8" v-model="restartForm.attachmentUrls" :filesize="5" disabled></preview>-->
-<!--            </el-form-item>-->
-<!--          </el-col>-->
           <el-col :span="12">
             <el-form-item label="恢复运行时间" prop="restartTime">
               <el-date-picker