|
|
@@ -64,7 +64,7 @@
|
|
|
<van-field
|
|
|
required
|
|
|
label="补卡类型:"
|
|
|
- :placeholder="form.buKaBanCi!=''&&typeList.length>0&&(typeValue == 3 || typeValue == 4)?'请选择补卡类型':'请先选择补卡班次'"
|
|
|
+ :placeholder="form.buKaBanCi!=''&&typeList.length>0&&(typeValue == 3 || typeValue == 4)?'请选择补卡类型':typeList.length===0?'当前班次没有可选的补卡类型':'请先选择补卡班次'"
|
|
|
label-width="6em"
|
|
|
:value="form.buKaLeiXing"
|
|
|
:readonly="form.buKaBanCi==''||typeList.length===0 || typeValue != 3|| openType != 'reissue' ? true : false"
|
|
|
@@ -281,7 +281,6 @@ export default {
|
|
|
},
|
|
|
xuanzeDate: {
|
|
|
handler: async function(val, oldVal) {
|
|
|
- // console.log(val, 'valvalval')
|
|
|
if (val !== null && this.openType === 'reissue') {
|
|
|
const scheduleData = await this.schedule(val)
|
|
|
const midData = []
|
|
|
@@ -289,7 +288,6 @@ export default {
|
|
|
scheduleData.forEach((item, i) => {
|
|
|
const diff = this.getDaysDifference(item.start_date_, val)
|
|
|
const dateName = item['d' + diff + '_']
|
|
|
- console.log(diff, dateName, item)
|
|
|
const dateArr = dateName.split(',')
|
|
|
|
|
|
if (dateArr.length > 1) {
|
|
|
@@ -306,21 +304,24 @@ export default {
|
|
|
this.list.push({ text: dateArr[0], config: midObj, approver: approver })
|
|
|
}
|
|
|
})
|
|
|
- console.log(this.list, midData)
|
|
|
}
|
|
|
},
|
|
|
immediate: true
|
|
|
},
|
|
|
'form.buKaRiQi': {
|
|
|
handler: async function(val, oldVal) {
|
|
|
- this.form.buKaBanCi = ''
|
|
|
+ if (this.typeValue === 3 || this.typeValue === 4) {
|
|
|
+ this.form.buKaBanCi = ''
|
|
|
+ }
|
|
|
},
|
|
|
immediate: true
|
|
|
},
|
|
|
'form.buKaBanCi': {
|
|
|
handler: async function(val, oldVal) {
|
|
|
- this.form.buKaShiJian = ''
|
|
|
- this.form.buKaLeiXing = ''
|
|
|
+ if (this.typeValue === 3 || this.typeValue === 4) {
|
|
|
+ this.form.buKaShiJian = ''
|
|
|
+ this.form.buKaLeiXing = ''
|
|
|
+ }
|
|
|
if (val === '') {
|
|
|
this.xuanzeTime = null
|
|
|
this.typeList = [
|
|
|
@@ -334,6 +335,9 @@ export default {
|
|
|
const down = reissueDataIn.filter(t => t.bu_ka_ban_ci_.includes('下班'))
|
|
|
if (up.length > 0 && down.length > 0) {
|
|
|
this.typeList = []
|
|
|
+ if (this.typeValue === 3 || this.typeValue === 4) {
|
|
|
+ this.$toast(`当前班次没有可选的补卡类型!`)
|
|
|
+ }
|
|
|
} else if (up.length > 0) {
|
|
|
this.typeList = [{ text: '下班' }]
|
|
|
} else if (down.length > 0) {
|
|
|
@@ -432,7 +436,7 @@ export default {
|
|
|
this.form.buKaRiQi = time
|
|
|
this.dateShow = false
|
|
|
if (this.list.length === 0) {
|
|
|
- this.$toast(`当前日期没有可选班次`)
|
|
|
+ this.$toast(`当前日期没有可选班次!`)
|
|
|
}
|
|
|
},
|
|
|
timeShowCallback(e) {
|