Преглед на файлове

Merge remote-tracking branch 'origin/demo_' into demo_

hfxc226 преди 2 години
родител
ревизия
9408eb909c

+ 30 - 1
src/api/repair/application-form.js

@@ -153,7 +153,36 @@ export function exportRepairApplicationForm (parameter) {
     responseType: 'blob'
   })
 }
-
+/**
+ * export file
+ * parameter: { }
+ * @param parameter :
+ * @returns {*}
+ */
+export function joinHoliday (parameter) {
+  return axios({
+    url: `/repair/application-forms/join/${parameter}`,
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+/**
+ * export file
+ * parameter: { }
+ * @param parameter :
+ * @returns {*}
+ */
+export function cancelHoliday (parameter) {
+  return axios({
+    url: `/repair/application-forms/cancel/${parameter}`,
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
 /**
  * finish func
  * parameter: { }

+ 2 - 1
src/utils/dict.js

@@ -309,7 +309,8 @@ DictCache.TYPE = {
   CUSTOMIZE_REPORT_INTER_TYPE: 'CUSTOMIZE_REPORT_INTER_TYPE',
   CUSTOM_FIELD_TEMPLATE_TYPE: 'CUSTOM_FIELD_TEMPLATE_TYPE',
   CUSTOM_FIELD_TEMPLATE_FILED_TYPE: 'CUSTOM_FIELD_TEMPLATE_FILED_TYPE',
-  PARAMETER_TYPE: 'PARAMETER_TYPE'
+  PARAMETER_TYPE: 'PARAMETER_TYPE',
+  REPAIR_HOLIDAY: 'REPAIR_HOLIDAY' // 节假日列表
 
 }
 DictCache.CODE = {

+ 23 - 5
src/views/calendar/Calendar.vue

@@ -9,19 +9,37 @@
   </a-card>
 </template>
 <script>
+import { configData } from '@/api/upms/config'
+import {
+  joinHoliday,
+  cancelHoliday
+} from '@/api/repair/application-form'
 export default {
   data () {
     return {
-      date: []
+      date: [],
+      configMap: null
     }
   },
+  created () {
+    configData().then(res => {
+      this.configMap = res.data['config:open:value']
+      this.date = JSON.parse(this.configMap[this.DictCache.TYPE.REPAIR_HOLIDAY])
+      console.log(this.date)
+    })
+  },
   methods: {
     handleSelect (value) {
-      const info = this.BaseTool.Date.formatter(value, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
-      if (this.date.includes(info)) {
-        this.date = this.date.filter(item => item !== info)
+      const that = this
+      const info = that.BaseTool.Date.formatter(value, that.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+      if (that.date.includes(info)) {
+        cancelHoliday(info).then(res => {
+          that.date = that.date.filter(item => item !== info)
+        })
       } else {
-        this.date.push(info)
+        joinHoliday(info).then(res => {
+          that.date.push(info)
+        })
       }
     }
   }

+ 5 - 3
src/views/repair/application-form/modules/AssignForm.vue

@@ -8,7 +8,7 @@
   >
     <a-form :form="form">
       <row-list :col="1">
-        <row-item v-show='transferFlag'>
+        <row-item v-show="transferFlag">
           <a-form-item
             label="转派备注"
             :labelCol="BaseTool.Constant.labelCol"
@@ -16,8 +16,8 @@
           >
             <a-textarea
               :rows="2"
-              disabled='disabled'
-              :value='remarkTwo'/>
+              disabled="disabled"
+              :value="remarkTwo"/>
           </a-form-item>
         </row-item>
         <row-item>
@@ -113,6 +113,8 @@ export default {
         values.sbCph = this.record.sbCph
         values.content = this.record.content
         values.actualUser = this.record.actualUser
+        values.category = this.record.category
+
         dispatchModelByDTO(values)
           .then(() => {
             this.handleCancel(values)

+ 1 - 0
src/views/repair/application-form/modules/CheckForm.vue

@@ -154,6 +154,7 @@ export default {
           this.confirmLoading = false
           return
         }
+        values.category = this.model.category
         values.verifyImages = this.verifyImages
         values.verifyFiles = this.fileList // 维修文件
         values.category = this.model.category

+ 3 - 0
src/views/repair/application-form/modules/DetailRepair.vue

@@ -1048,6 +1048,7 @@ export default {
       params.sbCph = this.model.sbCph
       params.actualUser = this.model.actualUser
       params.content = this.model.content
+      params.category = this.model.category
       params.repairUserId = this.model.repairUserId
       params.remark = this.model.remark
       params.reportHandleType = 2 // 维修上报
@@ -1068,6 +1069,7 @@ export default {
       params.sbCph = this.model.sbCph
       params.actualUser = this.model.actualUser
       params.content = this.model.content
+      params.category = this.model.category
       params.repairUserId = this.model.repairUserId
       params.remark = this.model.remarkTwo
       params.reportHandleType = 1 // 处理维修上报
@@ -1157,6 +1159,7 @@ export default {
           params.content = this.model.content
           params.repairUserId = this.model.repairUserId
           params.remark = this.model.remarkTwo
+          params.category = this.model.category
           params.reportHandleType = 1 // 处理维修上报
           params.roleType = 4
           modal.base(params)

+ 1 - 0
src/views/repair/application-form/modules/FinishForm.vue

@@ -260,6 +260,7 @@ export default {
           return
         }
         // 日期处理
+        values.category = this.model.category
         values.repairFileList = this.repairFileList
         values.opinionFileList = this.fileList // 维修文件
         values.repairEndTime = this.BaseTool.Date.formatter(values.repairEndTime, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)

+ 2 - 1
src/views/repair/application-form/modules/TransferForm.vue

@@ -76,7 +76,7 @@ export default {
       this.record = record
       this.roleType = roleType
       // 转派工程师集合查询
-      const params = { roleType: this.roleType, deptId: record.repairDeptId, queryType: 1 }
+      const params = { roleType: this.roleType, deptId: record.repairDeptId, queryType: 3 }
       this.getUsers(params)
     },
     save () {
@@ -94,6 +94,7 @@ export default {
         values.sbCph = this.record.sbCph
         values.status = this.record.status
         values.content = this.record.content
+        values.category = this.record.category
         values.actualUser = this.record.actualUser
         values.roleType = this.roleType
         transferApplyByDTO(values)