|
@@ -64,7 +64,7 @@
|
|
:disabled="sonDisable"
|
|
:disabled="sonDisable"
|
|
clearable
|
|
clearable
|
|
type="date"
|
|
type="date"
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
|
|
+ value-format="yyyy-MM-dd 00:00:00"
|
|
:picker-options="pickerOptionsStart"
|
|
:picker-options="pickerOptionsStart"
|
|
size="mini"
|
|
size="mini"
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
@@ -81,7 +81,7 @@
|
|
:disabled="sonDisable"
|
|
:disabled="sonDisable"
|
|
clearable
|
|
clearable
|
|
type="date"
|
|
type="date"
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
|
|
+ value-format="yyyy-MM-dd 00:00:00"
|
|
:picker-options="pickerOptionsEnd"
|
|
:picker-options="pickerOptionsEnd"
|
|
size="mini"
|
|
size="mini"
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
@@ -145,7 +145,7 @@
|
|
clearable
|
|
clearable
|
|
type="date"
|
|
type="date"
|
|
size="mini"
|
|
size="mini"
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
|
|
+ value-format="yyyy-MM-dd 00:00:00"
|
|
:picker-options="pickerOptions"
|
|
:picker-options="pickerOptions"
|
|
|
|
|
|
placeholder="选择日期"
|
|
placeholder="选择日期"
|
|
@@ -329,8 +329,13 @@ export default {
|
|
} else if (this.pageStu == 'edit') {
|
|
} else if (this.pageStu == 'edit') {
|
|
this.getDetails(this.row)
|
|
this.getDetails(this.row)
|
|
} else if (this.pageStu == 'add') {
|
|
} else if (this.pageStu == 'add') {
|
|
- //新增时默认带出7条明细行
|
|
|
|
- this.defaultDetailLine(7)
|
|
|
|
|
|
+ //新增时默认带出7条明细行
|
|
|
|
+ this.defaultDetailLine(7)
|
|
|
|
+ this.basicForm.startDate = this.basicForm.startDate + ' 00:00:00'
|
|
|
|
+ this.basicForm.deadlineTime = this.basicForm.deadlineTime + ' 00:00:00'
|
|
|
|
+ this.basicForm.mkBoPlanItemList.forEach(item => {
|
|
|
|
+ item.date = item.date + ' 00:00:00'
|
|
|
|
+ })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
@@ -342,6 +347,8 @@ export default {
|
|
// this.getDetails(this.row)
|
|
// this.getDetails(this.row)
|
|
this.basicForm.id = ''
|
|
this.basicForm.id = ''
|
|
this.basicForm.planCode = ''
|
|
this.basicForm.planCode = ''
|
|
|
|
+ this.basicForm.createBy = null
|
|
|
|
+ this.basicForm.createByName = null
|
|
this.basicForm.state = 0
|
|
this.basicForm.state = 0
|
|
//复制之后执行人和部门变为当前账号所有者
|
|
//复制之后执行人和部门变为当前账号所有者
|
|
this.basicForm.charger = this.$store.state.user.id,
|
|
this.basicForm.charger = this.$store.state.user.id,
|
|
@@ -377,7 +384,16 @@ export default {
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
// console.log('res', res)
|
|
// console.log('res', res)
|
|
this.basicForm = res.data
|
|
this.basicForm = res.data
|
|
|
|
+ this.basicForm.startDate = this.basicForm.startDate + ' 00:00:00'
|
|
|
|
+ this.basicForm.deadlineTime = this.basicForm.deadlineTime + ' 00:00:00'
|
|
|
|
+ this.basicForm.mkBoPlanItemList.forEach(item => {
|
|
|
|
+ item.date = item.date + ' 00:00:00'
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.loading = false
|
|
|
|
+ }).catch(err => {
|
|
|
|
+ this.loading = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
async save() {
|
|
async save() {
|
|
@@ -433,7 +449,8 @@ export default {
|
|
},
|
|
},
|
|
//拜访计划名称赋值
|
|
//拜访计划名称赋值
|
|
planNameAssignment() {
|
|
planNameAssignment() {
|
|
- this.basicForm.planName = this.basicForm.chargerName + '-' + '周计划拜访' + '(' + this.basicForm.startDate.substr(5) + '至' + this.basicForm.deadlineTime.substr(5) + ')'
|
|
|
|
|
|
+ console.log(this.basicForm.startDate.substr(5, 5))
|
|
|
|
+ this.basicForm.planName = this.basicForm.chargerName + '-' + '周计划拜访' + '(' + this.basicForm.startDate.substr(5, 5) + '至' + this.basicForm.deadlineTime.substr(5, 5) + ')'
|
|
},
|
|
},
|
|
// 增行
|
|
// 增行
|
|
addLine(date) {
|
|
addLine(date) {
|
|
@@ -494,10 +511,12 @@ export default {
|
|
this.isFlag = true;
|
|
this.isFlag = true;
|
|
this.sonPageStu = 'edit'
|
|
this.sonPageStu = 'edit'
|
|
this.sonDisable = false
|
|
this.sonDisable = false
|
|
|
|
+ this.basicForm.startDate = this.basicForm.startDate + ' 00:00:00'
|
|
|
|
+ this.basicForm.deadlineTime = this.basicForm.deadlineTime + ' 00:00:00'
|
|
this.basicForm.mkBoPlanItemList.forEach(item => {
|
|
this.basicForm.mkBoPlanItemList.forEach(item => {
|
|
item.planCode = this.basicForm.planCode
|
|
item.planCode = this.basicForm.planCode
|
|
|
|
+ item.date = item.date + ' 00:00:00'
|
|
})
|
|
})
|
|
- console.log(this.basicForm.startDate)
|
|
|
|
},
|
|
},
|
|
back() {
|
|
back() {
|
|
this.$emit('jugislist', true)
|
|
this.$emit('jugislist', true)
|
|
@@ -507,17 +526,6 @@ export default {
|
|
// }
|
|
// }
|
|
this.$emit('refresh')
|
|
this.$emit('refresh')
|
|
},
|
|
},
|
|
- // 如果需要回显则调用详情接口
|
|
|
|
- getDetails(row) {
|
|
|
|
- getPlanDetail(row.id).then(res => {
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.basicForm = res.data
|
|
|
|
- for (let i = 0; i < this.basicForm.mkBoPlanItemList.length; i++) {
|
|
|
|
- this.basicForm.mkBoPlanItemList[i].planCode = res.data.planCode
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
handleSelectionChange(selection) {
|
|
handleSelectionChange(selection) {
|
|
console.log('选中', selection)
|
|
console.log('选中', selection)
|
|
this.ids = selection.map(item => item.id)
|
|
this.ids = selection.map(item => item.id)
|
|
@@ -668,7 +676,11 @@ export default {
|
|
let Stamp = new Date();
|
|
let Stamp = new Date();
|
|
let num = 7 - Stamp.getDay() + 1 + i;
|
|
let num = 7 - Stamp.getDay() + 1 + i;
|
|
Stamp.setDate(Stamp.getDate() + num);
|
|
Stamp.setDate(Stamp.getDate() + num);
|
|
- week[i] = Stamp.getFullYear() + '-' + (Stamp.getMonth() + 1) + '-' + Stamp.getDate();
|
|
|
|
|
|
+ let Mmonth = Stamp.getMonth() + 1;
|
|
|
|
+ let MMmonth = Mmonth < 10 ? '0' + Mmonth : Mmonth;
|
|
|
|
+ let ddate = Stamp.getDate();
|
|
|
|
+ let dddate = ddate < 10 ? '0' + ddate : ddate;
|
|
|
|
+ week[i] = Stamp.getFullYear() + '-' + MMmonth + '-' + dddate;
|
|
}
|
|
}
|
|
return week[day - 1];
|
|
return week[day - 1];
|
|
},
|
|
},
|