xiongchao 3 years ago
parent
commit
1735af4312

+ 10 - 1
src/views/repair/application-form/RepairApplicationForm.vue

@@ -198,7 +198,7 @@ export default {
           width: '120px',
           dataIndex: 'repairUserName'
         },
-        {
+      /*  {
           title: '报修来源',
           checked: true,
           width: '100px',
@@ -206,6 +206,15 @@ export default {
           customRender: (text, record, index) => {
             return this.BaseTool.Object.getField(this.sourceMap, text)
           }
+        },*/
+        {
+          title: '维修类型',
+          checked: true,
+          width: '100px',
+          dataIndex: 'category',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Object.getField(this.planFlagMap, text)
+          }
         },
         {
           title: '报修时间',

+ 10 - 1
src/views/repair/application-form/RepairCheckForm.vue

@@ -176,7 +176,7 @@ export default {
           width: '120px',
           dataIndex: 'repairUserName'
         },
-        {
+        /*{
           title: '报修来源',
           checked: true,
           width: '100px',
@@ -184,6 +184,15 @@ export default {
           customRender: (text, record, index) => {
             return this.BaseTool.Object.getField(this.sourceMap, text)
           }
+        },*/
+        {
+          title: '维修类型',
+          checked: true,
+          width: '100px',
+          dataIndex: 'category',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Object.getField(this.planFlagMap, text)
+          }
         },
         {
           title: '报修时间',

+ 10 - 1
src/views/repair/application-form/RepairForm.vue

@@ -209,7 +209,7 @@ export default {
           width: '120px',
           dataIndex: 'repairUserName'
         },
-        {
+        /*{
           title: '报修来源',
           checked: true,
           width: '100px',
@@ -217,6 +217,15 @@ export default {
           customRender: (text, record, index) => {
             return this.BaseTool.Object.getField(this.sourceMap, text)
           }
+        },*/
+        {
+          title: '维修类型',
+          checked: true,
+          width: '100px',
+          dataIndex: 'category',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Object.getField(this.planFlagMap, text)
+          }
         },
         {
           title: '报修时间',

+ 11 - 2
src/views/repair/application-form/RepairOut.vue

@@ -136,13 +136,22 @@ export default {
           checked: true,
           dataIndex: 'repairUserName'
         },
-        {
+      /*  {
           title: '报修来源',
           // checked: true,
           dataIndex: 'source',
           customRender: (text, record, index) => {
             return this.BaseTool.Object.getField(this.sourceMap, text)
           }
+        },*/
+        {
+          title: '维修类型',
+          checked: true,
+          width: '100px',
+          dataIndex: 'category',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Object.getField(this.planFlagMap, text)
+          }
         },
         {
           title: '报修时间',
@@ -190,7 +199,7 @@ export default {
       levelMap: {},
       statusMap: {},
       needStopMap: {},
-      needStopMap: {},
+      planFlagMap: {},
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         parameter = {

+ 3 - 2
src/views/repair/application-form/modules/BaseForm.vue

@@ -105,7 +105,7 @@
               v-decorator="['no', {rules: [{required: false, message: '报修单号不能为空'}]}]" />
           </a-form-item>
         </row-item>
-        <row-item>
+<!--        <row-item>
           <a-form-item
             label="报修来源"
             :labelCol="BaseTool.Constant.labelCol"
@@ -120,7 +120,7 @@
               </a-select-option>
             </a-select>
           </a-form-item>
-        </row-item>
+        </row-item>-->
         <row-item>
           <a-form-item
             label="报修人"
@@ -361,6 +361,7 @@ export default {
           'partId',
           'repairUserId',
           'no',
+          'category',
           'limitDate',
           'limitHours',
           'source',

+ 20 - 3
src/views/repair/application-form/modules/FinishForm.vue

@@ -15,13 +15,13 @@
       <row-list :col="2">
         <row-item>
           <a-form-item
-            label="计划性维修"
+            label="维修类别"
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
-            <a-select v-decorator="['needStop']" placeholder="请选择">
+            <a-select @change="changePlanFlag" v-decorator="['category', {rules: [{required: true, message: '计划性维修不能为空'}]}]" placeholder="请选择">
               <a-select-option
-                v-for="(label,value) in needStopMap"
+                v-for="(label,value) in planFlagMap"
                 :key="value"
                 :label="label"
                 :value="parseInt(value)">{{ label }}
@@ -159,6 +159,8 @@ export default {
       modalTitle: null,
       form: this.$form.createForm(this),
       visible: false,
+      category: 0,
+      planFlagMap: {},
       // 下拉框map
       treeData: [],
       descripitionMap: {},
@@ -187,6 +189,7 @@ export default {
     this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_STATUS)
     this.needStopMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
     this.descripitionMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIRE_ACTION)
+    this.planFlagMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_CATEGORY)
   },
   methods: {
     base (record) {
@@ -207,6 +210,7 @@ export default {
           'id',
           'needStop',
           'level',
+          'category',
           'repairErrorTypeId',
           'repairEndTime'
         ])))
@@ -217,6 +221,19 @@ export default {
         this.userList = res.data
       })
     },
+    changePlanFlag (value) {
+      this.category = value
+      const { form: { setFieldsValue } } = this
+      if (this.category === 1) {
+        this.$nextTick(() => {
+          setFieldsValue({ needStop: 1 })
+        })
+      } else {
+        this.$nextTick(() => {
+          setFieldsValue({ needStop: 0 })
+        })
+      }
+    },
     handleRepairFileChange (info) {
       this.defaultRepairFileList = info.fileList
       this.repairFileList = this.setFileList(info, 12)