Parcourir la source

补卡页面优化

cyy il y a 8 mois
Parent
commit
467c288229

+ 8 - 0
src/components/ibps-date-picker/index.vue

@@ -3,6 +3,7 @@
   <van-field
   <van-field
     ref="input"
     ref="input"
     v-model="inputValue"
     v-model="inputValue"
+    class="cellSty"
     :label="label"
     :label="label"
     :name="name"
     :name="name"
     :size="size"
     :size="size"
@@ -222,4 +223,11 @@ export default {
   }
   }
 }
 }
 </script>
 </script>
+<style lang="scss" scoped>
+.cellSty{
+  .van-field__clear{
+    padding-left: 0;
+  }
+}
+</style>
 
 

+ 15 - 5
src/views/platform/bpmn/my-reissue/components/reissueDialog.vue

@@ -289,7 +289,7 @@ export default {
           scheduleData.forEach((item, i) => {
           scheduleData.forEach((item, i) => {
             const diff = this.getDaysDifference(item.start_date_, val)
             const diff = this.getDaysDifference(item.start_date_, val)
             const dateName = item['d' + diff + '_']
             const dateName = item['d' + diff + '_']
-            console.log(diff, item)
+            console.log(diff, dateName, item)
             const dateArr = dateName.split(',')
             const dateArr = dateName.split(',')
 
 
             if (dateArr.length > 1) {
             if (dateArr.length > 1) {
@@ -306,16 +306,23 @@ export default {
               this.list.push({ text: dateArr[0], config: midObj, approver: approver })
               this.list.push({ text: dateArr[0], config: midObj, approver: approver })
             }
             }
           })
           })
-          console.log(midData)
+          console.log(this.list, midData)
         }
         }
       },
       },
       immediate: true
       immediate: true
     },
     },
+    'form.buKaRiQi': {
+      handler: async function(val, oldVal) {
+        this.form.buKaBanCi = ''
+      },
+      immediate: true
+    },
     'form.buKaBanCi': {
     'form.buKaBanCi': {
       handler: async function(val, oldVal) {
       handler: async function(val, oldVal) {
+        this.form.buKaShiJian = ''
+        this.form.buKaLeiXing = ''
         if (val === '') {
         if (val === '') {
           this.xuanzeTime = null
           this.xuanzeTime = null
-          this.form.buKaShiJian = ''
           this.typeList = [
           this.typeList = [
             { text: '上班' },
             { text: '上班' },
             { text: '下班' }
             { text: '下班' }
@@ -424,6 +431,9 @@ export default {
       const time = this.$common.getFormatDate('string', 10, e)
       const time = this.$common.getFormatDate('string', 10, e)
       this.form.buKaRiQi = time
       this.form.buKaRiQi = time
       this.dateShow = false
       this.dateShow = false
+      if (this.list.length === 0) {
+        this.$toast(`当前日期没有可选班次`)
+      }
     },
     },
     timeShowCallback(e) {
     timeShowCallback(e) {
       // const nowDate = new Date(e.getTime() + 8 * 60 * 60 * 1000)
       // const nowDate = new Date(e.getTime() + 8 * 60 * 60 * 1000)
@@ -438,8 +448,8 @@ export default {
       this.timeShow = true
       this.timeShow = true
     },
     },
     getDaysDifference(date1, date2) {
     getDaysDifference(date1, date2) {
-      const d1 = new Date(date1)
-      const d2 = new Date(date2)
+      const d1 = new Date(this.$common.getFormatDate('string', 10, date1))
+      const d2 = new Date(this.$common.getFormatDate('string', 10, date2))
       const diffTime = Math.abs(d2.getTime() - d1.getTime())
       const diffTime = Math.abs(d2.getTime() - d1.getTime())
       const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24))
       const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24))
 
 

+ 7 - 4
src/views/platform/bpmn/my-reissue/index.vue

@@ -7,7 +7,7 @@
               left-arrow
               left-arrow
               @click-left="$router.push({ name: 'dashboard' })"
               @click-left="$router.push({ name: 'dashboard' })"
           />
           />
-          <van-search v-model="twoParam" show-action placeholder="请填写补卡时间" @search="onSearch">
+          <van-search v-model="twoParam" show-action placeholder="请填写补卡班次" @search="onSearch">
               <template #action>
               <template #action>
                   <van-icon name="filter-o" :class="{'ibps-active':stateActive}" @click="clickMoreSearch" />
                   <van-icon name="filter-o" :class="{'ibps-active':stateActive}" @click="clickMoreSearch" />
               </template>
               </template>
@@ -104,7 +104,8 @@ export default {
       stateActive: false,
       stateActive: false,
       searchForms: {
       searchForms: {
         forms: [
         forms: [
-          { prop: 'Q^bu_ka_ri_qi_^DL', label: '补卡日期', fieldType: 'datePicker' },
+          // { prop: 'Q^bu_ka_ri_qi_^D', label: '补卡日期', fieldType: 'datePicker' },
+          { prop: ['Q^bu_ka_ri_qi_^DL', 'Q^bu_ka_ri_qi_^DG'], label: '补卡日期', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }},
           { prop: 'Q^zhuang_tai_^S', label: '状态', fieldType: 'checker', cols: 3, options: [
           { prop: 'Q^zhuang_tai_^S', label: '状态', fieldType: 'checker', cols: 3, options: [
             {
             {
               value: '全部',
               value: '全部',
@@ -217,8 +218,7 @@ export default {
     getSearcFormData() {
     getSearcFormData() {
       let params = {}
       let params = {}
       if (this.$utils.isNotEmpty(this.twoParam)) {
       if (this.$utils.isNotEmpty(this.twoParam)) {
-        params['Q^bu_ka_ri_qi_^DL'] = this.twoParam
-        params['Q^bu_ka_ri_qi_^DG'] = this.twoParam
+        params['Q^bu_ka_ban_ci_^SL'] = this.twoParam
       }
       }
       if (this.$utils.isNotEmpty(this.moreParams)) {
       if (this.$utils.isNotEmpty(this.moreParams)) {
         params = Object.assign(params, this.moreParams)
         params = Object.assign(params, this.moreParams)
@@ -256,6 +256,9 @@ export default {
      * 高级查询
      * 高级查询
      */
      */
     onMoreSearch(params) {
     onMoreSearch(params) {
+      if (params.hasOwnProperty('Q^zhuang_tai_^S') && params['Q^zhuang_tai_^S'] === '全部') {
+        params['Q^zhuang_tai_^S'] = ''
+      }
       this.moreParams = params
       this.moreParams = params
       this.onSearch()
       this.onSearch()
       if (this.$utils.isNotEmpty(params)) {
       if (this.$utils.isNotEmpty(params)) {