whj 1 жил өмнө
parent
commit
db3b1ede3b

+ 18 - 8
src/views/preparation/preparation/modules/BaseForm.vue

@@ -117,7 +117,7 @@
             </a-tree-select>
           </a-form-item>
         </row-item>
-        <row-item>
+        <row-item v-if="modalTitle != '添加工单'">
           <a-form-item
             label="费用金额"
             :labelCol="BaseTool.Constant.labelCol"
@@ -131,7 +131,7 @@
               v-decorator="['fee']" />
           </a-form-item>
         </row-item>
-        <row-item>
+        <row-item v-if="modalTitle != '添加工单'">
           <a-form-item
             label="实际费用"
             :labelCol="BaseTool.Constant.labelCol"
@@ -162,10 +162,11 @@
       <row-list :col="1">
         <row-item>
           <a-form-item
-            label="相关图片"
+            label=""
             :labelCol="BaseTool.Constant.labelCol2"
             :wrapperCol="BaseTool.Constant.wrapperCol2"
           >
+            <span class="required">相关图片:</span>
             <a-upload
               :action="uploadUrl"
               :multiple="true"
@@ -381,11 +382,6 @@ export default {
           this.confirmLoading = false
           return
         }
-        if (this.fileList.length === 0) {
-          this.$message.error('请上传相关文件')
-          this.confirmLoading = false
-          return
-        }
         values.imageList = this.repairFileList
         values.fileList = this.fileList // 维修文件
         values.applyTime = this.BaseTool.Date.formatter(values.applyTime, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)
@@ -423,3 +419,17 @@ export default {
   }
 }
 </script>
+<style lang="less" scoped>
+.required{
+  padding-left: 60px;
+  &::before{
+        display: inline-block;
+    margin-right: 4px;
+    color: #f5222d;
+    font-size: 14px;
+    font-family: SimSun, sans-serif;
+    line-height: 1;
+    content: '*';
+  }
+}
+</style>

+ 1 - 1
src/views/preparation/preparation/modules/FeeForm.vue

@@ -42,7 +42,7 @@
             :labelCol="BaseTool.Constant.labelCol2"
             :wrapperCol="BaseTool.Constant.wrapperCol2"
           >
-            <a-textarea v-decorator="['repairContent']"/>
+            <a-textarea v-decorator="['repairContent', {rules: [{required: true, message: '执行描述不能为空'}]}]"/>
           </a-form-item>
         </row-item>
       </row-list>