HolidayForm.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. <template>
  2. <view>
  3. <cu-custom :backUrl="'/pages/index/index'" :isBack="true" bgColor="bg-gradual-blue" >
  4. <block slot="content">请假申请</block>
  5. </cu-custom>
  6. <u--form :model="inputForm" labelWidth="100px" class="u-form" labelPosition="left" :rules="rules" ref="inputForm" v-if="!nodeFlag">
  7. <u-form-item label="请假人" borderBottom prop="createName">
  8. <u--input placeholder='请填写请假人' v-model="inputForm.createName" disabled></u--input>
  9. </u-form-item>
  10. <u-form-item label="请假部门" borderBottom prop="officeName">
  11. <u--input placeholder='请填写请假部门' v-model="inputForm.officeName" disabled></u--input>
  12. </u-form-item>
  13. <u-form-item label="请假类型" borderBottom prop="type" >
  14. <jp-picker v-model="inputForm.type" rangeKey="label" rangeValue="value" :range="[
  15. { label: '年假', value: '1' },
  16. { label: '事假', value: '2' },
  17. { label: '病假', value: '3' },
  18. { label: '调休假', value: '4' },
  19. { label: '婚假', value: '5' },
  20. { label: '产假', value: '6' },
  21. { label: '陪产假', value: '7' },
  22. { label: '其他', value: '8' },
  23. ]"></jp-picker>
  24. </u-form-item>
  25. <u-form-item label="开始时间" borderBottom prop="startDay" :required="true">
  26. <el-date-picker
  27. v-model="inputForm.startDay"
  28. type="date"
  29. placeholder="请选择开始时间"
  30. style="width:100%"
  31. size="default"
  32. placement="bottom-start"
  33. @change="checkTime"
  34. clearable>
  35. </el-date-picker>
  36. <el-select v-model="inputForm.beginTime" style="width: 50%" placeholder="请选择开始时间" @change="checkTime">
  37. <el-option value="上午" label="上午"></el-option>
  38. <el-option value="下午" label="下午"></el-option>
  39. </el-select>
  40. </u-form-item>
  41. <u-form-item label="结束时间" borderBottom prop="endDay" :required="true">
  42. <el-date-picker
  43. v-model="inputForm.endDay"
  44. type="date"
  45. placeholder="请选择日期"
  46. style="width:100%"
  47. size="default"
  48. placement="bottom-start"
  49. @change="checkTime"
  50. clearable>
  51. </el-date-picker>
  52. <el-select v-model="inputForm.endTime" style="width: 50%" placeholder="请选择结束时间" @change="checkTime">
  53. <el-option value="上午" label="上午"></el-option>
  54. <el-option value="下午" label="下午"></el-option>
  55. </el-select>
  56. </u-form-item>
  57. <u-form-item label="请假天数" borderBottom prop="days" :required="true">
  58. <u--input placeholder='请填写请假天数' v-model="inputForm.days" disabled></u--input>
  59. </u-form-item>
  60. <u-form-item label="请假原因" borderBottom prop="reason">
  61. <u--textarea placeholder='请输入请假原因' :rows="5" :maxlength="500" v-model="inputForm.reason" ></u--textarea>
  62. </u-form-item>
  63. <u-form-item label="附件">
  64. <el-upload
  65. class="upload-demo"
  66. :action="`http://localhost:2800/api/public-modules-server/oss/file/webUpload/upload`"
  67. :on-remove="(file, fileList) => handleRemove(file, fileList, '','')"
  68. :file-list="inputForm.files"
  69. :on-success="(response, file, fileList) => handleUploadSuccess(response, file, fileList,'','')"
  70. :limit="3">
  71. <el-button size="small" type="primary">点击上传</el-button>
  72. <div slot="tip" class="el-upload__tip">只能上传不超过 3 个文件</div>
  73. </el-upload>
  74. </u-form-item>
  75. </u--form>
  76. <u--form :model="inputForm" labelWidth="100px" class="u-form" labelPosition="left" :rules="rules" ref="inputForm" v-else-if="nodeFlag">
  77. <u-form-item label="请假人" borderBottom prop="createName">
  78. <u--input placeholder='请填写请假人' v-model="inputForm.createName" disabled></u--input>
  79. </u-form-item>
  80. <u-form-item label="请假部门" borderBottom prop="officeName">
  81. <u--input placeholder='请填写请假部门' v-model="inputForm.officeName" disabled></u--input>
  82. </u-form-item>
  83. <u-form-item label="请假类型" borderBottom prop="type" >
  84. <jp-picker v-model="inputForm.type" rangeKey="label" rangeValue="value" disabled :range="[
  85. { label: '年假', value: '1' },
  86. { label: '事假', value: '2' },
  87. { label: '病假', value: '3' },
  88. { label: '调休假', value: '4' },
  89. { label: '婚假', value: '5' },
  90. { label: '产假', value: '6' },
  91. { label: '陪产假', value: '7' },
  92. { label: '其他', value: '8' },
  93. ]"></jp-picker>
  94. </u-form-item>
  95. <u-form-item label="开始时间" borderBottom prop="startDay" :required="true">
  96. <el-date-picker
  97. v-model="inputForm.startDay"
  98. type="date"
  99. placeholder="请选择开始时间"
  100. style="width:100%"
  101. size="default"
  102. placement="bottom-start"
  103. @change="checkTime"
  104. :disabled="true"
  105. clearable>
  106. </el-date-picker>
  107. <el-select v-model="inputForm.beginTime" style="width: 50%" disabled placeholder="请选择开始时间" @change="checkTime">
  108. <el-option value="上午" label="上午"></el-option>
  109. <el-option value="下午" label="下午"></el-option>
  110. </el-select>
  111. </u-form-item>
  112. <u-form-item label="结束时间" borderBottom prop="endDay" :required="true">
  113. <el-date-picker
  114. :disabled="true"
  115. v-model="inputForm.endDay"
  116. type="date"
  117. placeholder="请选择日期"
  118. style="width:100%"
  119. size="default"
  120. placement="bottom-start"
  121. @change="checkTime"
  122. clearable>
  123. </el-date-picker>
  124. <el-select v-model="inputForm.endTime" style="width: 50%" disabled placeholder="请选择结束时间" @change="checkTime">
  125. <el-option value="上午" label="上午"></el-option>
  126. <el-option value="下午" label="下午"></el-option>
  127. </el-select>
  128. </u-form-item>
  129. <u-form-item label="请假天数" borderBottom prop="days" :required="true">
  130. <u--input placeholder='请填写请假天数' v-model="inputForm.days" disabled></u--input>
  131. </u-form-item>
  132. <u-form-item label="请假原因" borderBottom prop="reason">
  133. <u--textarea placeholder='请输入请假原因' :rows="5" :maxlength="500" v-model="inputForm.reason" disabled></u--textarea>
  134. </u-form-item>
  135. <u-form-item label="附件">
  136. <el-upload
  137. :disabled="true"
  138. class="upload-demo"
  139. :action="`http://localhost:2800/api/public-modules-server/oss/file/webUpload/upload`"
  140. :on-remove="(file, fileList) => handleRemove(file, fileList, '','')"
  141. :file-list="inputForm.files"
  142. :on-success="(response, file, fileList) => handleUploadSuccess(response, file, fileList,'','')"
  143. :limit="3">
  144. <el-button size="small" :disabled="true" type="primary">点击上传</el-button>
  145. <div slot="tip" class="el-upload__tip">只能上传不超过 3 个文件</div>
  146. </el-upload>
  147. </u-form-item>
  148. </u--form>
  149. </view>
  150. </template>
  151. <script>
  152. import holidayService from '@/api/jy/HolidayService'
  153. import CommonApi from '@/api/common/CommonApi'
  154. import {mapState, mapMutations, mapActions} from 'vuex'
  155. export default {
  156. components: {
  157. },
  158. computed: mapState({
  159. userInfo: (state) => state.user.userInfo,
  160. avatar: (state) => state.user.avatar
  161. }),
  162. data () {
  163. return {
  164. nodeFlag: false,
  165. loading: false,
  166. listData: [],
  167. fileList3: [],
  168. goodsListData: [],
  169. materialList: [],
  170. searchForm: {
  171. wareHouseType: '',
  172. },
  173. inputForm: {
  174. createName:'',
  175. officeName:'',
  176. id: '',
  177. startDay:"",
  178. beginTime:'',
  179. reason: '',
  180. endDay:"",
  181. endTime:'',
  182. type:'',
  183. files: [], // 附件信息
  184. procInsId: '',
  185. days:'',
  186. },
  187. rules: {
  188. 'type': [
  189. {
  190. required: true,
  191. message: '请假类型不能为空',
  192. trigger: ['blur', 'change']
  193. }
  194. ],
  195. 'startDay': [
  196. {
  197. required: true,
  198. message: '开始时间不能为空',
  199. trigger: ['blur', 'change']
  200. }
  201. ],
  202. 'endDay': [
  203. {
  204. required: true,
  205. message: '结束时间不能为空',
  206. trigger: ['blur', 'change']
  207. }
  208. ]
  209. }
  210. }
  211. },
  212. commonApi: null,
  213. // 页面加载时执行
  214. created() {
  215. this.commonApi = new CommonApi()
  216. this.inputForm.createName = this.userInfo.name
  217. this.inputForm.officeName = this.userInfo.officeDTO.name
  218. },
  219. props: {
  220. businessId: {
  221. type: String,
  222. default: ''
  223. },
  224. formReadOnly: {
  225. type: Boolean,
  226. default: false
  227. }
  228. },
  229. watch: {
  230. 'businessId': {
  231. handler (newVal) {
  232. if (this.businessId) {
  233. this.init(this.businessId)
  234. } else {
  235. this.$nextTick(() => {
  236. // this.$refs.inputForm.reset()
  237. })
  238. }
  239. },
  240. immediate: true,
  241. deep: false
  242. }
  243. },
  244. methods: {
  245. init (id) {
  246. this.nodeFlag = true
  247. this.inputForm.id = id
  248. if (id) {
  249. holidayService.queryById(id).then((data) => {
  250. this.commonApi.getTaskNameByProcInsId(data.procInsId).then((data) => {
  251. if (this.isNotEmpty(data)) {
  252. if (data === '调整重新发起' || this.isEmpty(data)) {
  253. this.nodeFlag = false
  254. } else {
  255. this.nodeFlag = true
  256. }
  257. }
  258. })
  259. this.inputForm = this.recover(this.inputForm, data)
  260. })
  261. }
  262. },
  263. formatDate(date) {
  264. const dateNew = new Date(date); // 将日期字符串转换为 Date 对象
  265. const year = dateNew.getFullYear();
  266. const month = (dateNew.getMonth() + 1).toString().padStart(2, '0');
  267. const day = dateNew.getDate().toString().padStart(2, '0');
  268. return `${year}-${month}-${day}`;
  269. },
  270. isEmpty(value) {
  271. let result = false;
  272. if (value == null || value == undefined) {
  273. result = true;
  274. }
  275. if (typeof value == 'string' && (value.replace(/\s+/g, "") == "" || value == "")) {
  276. result = true;
  277. }
  278. if (typeof value == "object" && value instanceof Array && value.length === 0) {
  279. result = true;
  280. }
  281. return result;
  282. },
  283. isNotEmpty (value) {
  284. return !this.isEmpty(value)
  285. },
  286. /**
  287. * 判断是否为空
  288. */
  289. isNull(val) {
  290. if (val instanceof Array) {
  291. if (val.length === 0) return true;
  292. } else if (val instanceof Object) {
  293. if (JSON.stringify(val) === "{}") return true;
  294. } else {
  295. if (
  296. val === "null" ||
  297. val == null ||
  298. val === "undefined" ||
  299. val === undefined ||
  300. val === ""
  301. )
  302. return true;
  303. return false;
  304. }
  305. return false;
  306. },
  307. formatDateNew(date) {
  308. const year = date.getFullYear();
  309. const month = (date.getMonth() + 1).toString().padStart(2, '0');
  310. const day = date.getDate().toString().padStart(2, '0');
  311. const hours = date.getHours().toString().padStart(2, '0');
  312. const minutes = date.getMinutes().toString().padStart(2, '0');
  313. const seconds = date.getSeconds().toString().padStart(2, '0');
  314. return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  315. },
  316. handleUploadSuccess (res, file, fileList, index, type) {
  317. // 将 fileList 转换为你期望的格式
  318. const formattedFiles = fileList.map(fileItem => {
  319. return {
  320. name: fileItem.name,
  321. size: fileItem.size,
  322. url: '/' + fileItem.response.url,
  323. createBy: this.userInfo,
  324. by: this.userInfo.id,
  325. createTime: this.formatDateNew(new Date())
  326. };
  327. });
  328. this.inputForm.files = formattedFiles
  329. // 强制更新视图
  330. this.$forceUpdate();
  331. },
  332. handleRemove(file, fileList, index, type) {
  333. // 处理移除文件逻辑
  334. // file 是移除的文件
  335. // fileList 是当前文件列表
  336. const formattedFiles = fileList.map(fileItem => {
  337. return {
  338. name: fileItem.name,
  339. size: fileItem.size,
  340. url: '/' + fileItem.response.url,
  341. createBy: this.userInfo,
  342. by: this.userInfo.id,
  343. createTime: this.formatDateNew(new Date())
  344. };
  345. });
  346. this.inputForm.files = formattedFiles
  347. // 如果你想要更新文件列表,可以在这里更新 inputForm.fileInfoLost
  348. // this.inputForm.fileInfoLost = fileList;
  349. },
  350. saveForm(callback) {
  351. // 所有验证通过,执行保存操作
  352. if (this.isNotEmpty(this.inputForm.startDay)) {
  353. this.inputForm.startDay = this.formatDate(this.inputForm.startDay);
  354. }
  355. if (this.isNotEmpty(this.inputForm.endDay)) {
  356. this.inputForm.endDay = this.formatDate(this.inputForm.endDay);
  357. }
  358. return new Promise(async ( resolve, reject) => {
  359. let errors = [];
  360. if (this.isEmpty(this.inputForm.startDay) || this.isEmpty(this.inputForm.beginTime)){
  361. errors.push('请选择开始时间');
  362. }
  363. if (this.isEmpty(this.inputForm.endDay) || this.isEmpty(this.inputForm.endTime)){
  364. errors.push('请选择结束时间');
  365. }
  366. if (this.isEmpty(this.inputForm.type)){
  367. errors.push('请选择请假类型');
  368. }
  369. if (this.inputForm.type === '1'){
  370. if (this.isNotEmpty(this.inputForm.startDay) && this.isNotEmpty(this.inputForm.beginTime)
  371. && this.isNotEmpty(this.inputForm.endDay) && this.isNotEmpty(this.inputForm.endTime)) {
  372. await holidayService.checkType(this.inputForm).then((data)=>{
  373. let day=data.split(",")
  374. if (!day[0].includes(this.inputForm.days)){
  375. errors.push(data);
  376. }
  377. })
  378. }
  379. }
  380. if (errors.length > 0) {
  381. // 存在错误,显示提示信息
  382. errors.forEach(error => {
  383. uni.showToast({
  384. title: error,
  385. icon: 'none',
  386. duration: 1500
  387. });
  388. });
  389. reject('Form validation failed');
  390. } else {
  391. this.$refs.inputForm.validate().then(res => {
  392. this.inputForm.status = '2'
  393. this.inputForm.userId = this.userInfo.id
  394. holidayService.saveForm(this.inputForm).then((data) => {
  395. this.inputForm.id = data.businessId
  396. callback(data.businessTable, data.businessId, this.inputForm)
  397. this.$refs.inputForm.resetFields()
  398. this.loading = false
  399. }).catch(() => {
  400. this.$refs.inputForm.resetFields()
  401. }).catch((e) => {
  402. })
  403. })
  404. }
  405. });
  406. // this.$refs.inputForm.validate().then(() => {
  407. // uni.showLoading();
  408. // this.inputForm.status = '2';
  409. // this.holidayService.saveForm(this.inputForm).then(data => {
  410. // callback(data.businessTable, data.businessId,this.inputForm);
  411. // }).catch(error => {
  412. // });
  413. // }).catch(() => {
  414. // });
  415. },
  416. // 修改状态
  417. async updateStatusById (type, callback) {
  418. if (type === 'reject' || type === 'reback') {
  419. holidayService.queryById(this.inputForm.id).then((data) => {
  420. if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
  421. this.loading = false
  422. this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
  423. throw new Error()
  424. } else {
  425. if (type === 'reject') {
  426. // 驳回
  427. this.inputForm.status = '4'
  428. }
  429. if (type === 'reback') {
  430. // 撤回
  431. this.inputForm.status = '3'
  432. }
  433. if (type === 'reject' || type === 'reback') {
  434. let param = {status: this.inputForm.status, id: this.inputForm.id}
  435. holidayService.updateStatusById(param).then(() => {
  436. this.loading = false
  437. callback()
  438. })
  439. }
  440. }
  441. })
  442. } else if (type === 'hold') {
  443. holidayService.queryById(this.inputForm.id).then((data) => {
  444. if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
  445. this.loading = false
  446. this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
  447. throw new Error()
  448. } else {
  449. // 终止
  450. let param = {status: '1', id: this.inputForm.id}
  451. holidayService.updateStatusById(param).then(() => {
  452. this.loading = false
  453. callback()
  454. })
  455. }
  456. })
  457. }
  458. },
  459. reapplyForm (callback) {
  460. this.loading = true
  461. holidayService.queryById(this.inputForm.id).then((data) => {
  462. if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
  463. this.loading = false
  464. this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
  465. throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
  466. } else {
  467. this.startFormTrue(callback)
  468. }
  469. })
  470. },
  471. // 送审
  472. async startFormTrue (callback) {
  473. if (this.isNotEmpty(this.inputForm.startDay)) {
  474. this.inputForm.startDay = this.formatDate(this.inputForm.startDay);
  475. }
  476. if (this.isNotEmpty(this.inputForm.endDay)) {
  477. this.inputForm.endDay = this.formatDate(this.inputForm.endDay);
  478. }
  479. return new Promise((resolve, reject) => {
  480. let errors = [];
  481. if (this.isEmpty(this.inputForm.startDay) || this.isEmpty(this.inputForm.beginTime)){
  482. errors.push('请选择开始时间');
  483. }
  484. if (this.isEmpty(this.inputForm.endDay) || this.isEmpty(this.inputForm.endTime)){
  485. errors.push('请选择结束时间');
  486. }
  487. if (this.isEmpty(this.inputForm.type)){
  488. errors.push('请选择请假类型');
  489. }
  490. if (this.inputForm.type === '1'){
  491. holidayService.checkType(this.inputForm).then((data)=>{
  492. let day=data.split(",")
  493. if (!day[0].includes(this.inputForm.days)){
  494. errors.push(data);
  495. }
  496. })
  497. }
  498. if (errors.length > 0) {
  499. // 存在错误,显示提示信息
  500. errors.forEach(error => {
  501. uni.showToast({
  502. title: error,
  503. icon: 'none',
  504. duration: 2000
  505. });
  506. });
  507. reject('Form validation failed');
  508. } else {
  509. this.$refs.inputForm.validate().then(res => {
  510. this.inputForm.status = '2'
  511. holidayService.saveForm(this.inputForm).then((data) => {
  512. this.inputForm.id = data.businessId
  513. callback(data.businessTable, data.businessId, this.inputForm)
  514. this.$refs.inputForm.resetFields()
  515. this.loading = false
  516. }).catch(() => {
  517. this.$refs.inputForm.resetFields()
  518. }).catch((e) => {
  519. })
  520. })
  521. }
  522. });
  523. },
  524. // 通过
  525. async agreeForm (callback) {
  526. this.$refs.inputForm.validate().then(res => {
  527. if (this.inputForm.days >1) {
  528. this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
  529. if (this.isNotEmpty(data)) {
  530. if (data === '总经理审核') {
  531. this.inputForm.status = '5'
  532. } else {
  533. this.inputForm.status = '2'
  534. }
  535. }
  536. holidayService.saveForm(this.inputForm).then((data) => {
  537. callback(data.businessTable, data.businessId, this.inputForm)
  538. this.$refs.inputForm.resetFields()
  539. this.loading = false
  540. }).catch(() => {
  541. this.loading = false
  542. this.$refs.inputForm.resetFields()
  543. })
  544. })
  545. } else {
  546. this.inputForm.status = '5'
  547. holidayService.saveForm(this.inputForm).then((data) => {
  548. callback(data.businessTable, data.businessId, this.inputForm)
  549. this.$refs.inputForm.resetFields()
  550. this.loading = false
  551. }).catch(() => {
  552. this.loading = false
  553. this.$refs.inputForm.resetFields()
  554. })
  555. }
  556. })
  557. },
  558. checkType(){
  559. if (this.inputForm.type === '1'){
  560. holidayService.checkType(this.inputForm).then((data)=>{
  561. uni.showToast({
  562. title: data,
  563. icon: "none",
  564. duration:2000
  565. })
  566. })
  567. }
  568. },
  569. checkTime(){
  570. let differenceInDays =''
  571. let date1=new Date(this.inputForm.startDay)
  572. let date2=new Date(this.inputForm.endDay)
  573. if ((date2<date1) || (date2 === date1 && this.inputForm.beginTime === '下午' && this.inputForm.endTime === '上午')){
  574. uni.showToast({
  575. title: '开始时间不能小于结束时间',
  576. icon: "none",
  577. duration:2000
  578. })
  579. this.inputForm.startDay = ''
  580. this.inputForm.endDay = ''
  581. this.inputForm.beginTime = ''
  582. this.inputForm.endTime = ''
  583. }
  584. differenceInDays= Math.floor((date2 - date1) / (1000 * 60 * 60 * 24));
  585. if (differenceInDays === 0 || differenceInDays > 1){
  586. if ((this.inputForm.beginTime === '上午' && this.inputForm.endTime === '下午') ||(this.inputForm.beginTime === '下午' && this.inputForm.endTime === '上午') ){
  587. differenceInDays=differenceInDays+1
  588. }else if ((this.inputForm.beginTime === '上午' && this.inputForm.endTime === '上午') ||(this.inputForm.beginTime === '下午' && this.inputForm.endTime === '下午')){
  589. differenceInDays=differenceInDays+0.5
  590. }
  591. }else if (differenceInDays ===1){
  592. if ((this.inputForm.beginTime === '上午' && this.inputForm.endTime === '下午') ){
  593. differenceInDays=differenceInDays+1
  594. }else if ((this.inputForm.beginTime === '上午' && this.inputForm.endTime === '上午') ||(this.inputForm.beginTime === '下午' && this.inputForm.endTime === '下午')){
  595. differenceInDays=differenceInDays+0.5
  596. }else if (this.inputForm.beginTime === '下午' && this.inputForm.endTime === '上午'){
  597. differenceInDays
  598. }
  599. }
  600. if (this.isNotEmpty(this.inputForm.beginTime) && this.isNotEmpty(this.inputForm.endTime)){
  601. this.inputForm.days = differenceInDays
  602. this.checkType()
  603. }
  604. }
  605. }
  606. }
  607. </script>
  608. <style>
  609. .cu-form-group .title {
  610. min-width: calc(4em + 40px);
  611. }
  612. </style>