|
|
@@ -978,20 +978,23 @@
|
|
|
methods: {
|
|
|
handleTabClick(tab){
|
|
|
if(this.chooseIndex != tab.index ){
|
|
|
- this.chooseIndex = tab.index
|
|
|
+ this.chooseIndex = Number(tab.index)
|
|
|
const chooseItem = this.tabList[this.chooseIndex]
|
|
|
this.chooseItem = this.tabList[this.chooseIndex].taskTypeName
|
|
|
this.activeName = tab.index
|
|
|
this.taskCode = chooseItem.taskCode || ''
|
|
|
this.reload({workOrderId:this.workOrderId, taskCode:this.taskCode})
|
|
|
this.getReportCount()
|
|
|
- this.request.completeNum = this.tabList[this.chooseIndex].number
|
|
|
- if(this.chooseIndex==this.tabList.length-1){
|
|
|
- this.request.isLast = 1
|
|
|
- }else{
|
|
|
- this.request.isLast = 0
|
|
|
- this.request.nextCompleteNum = this.tabList[this.chooseIndex+1].number
|
|
|
- }
|
|
|
+ this.setData()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ setData(){
|
|
|
+ this.request.completeNum = this.tabList[this.chooseIndex].number
|
|
|
+ if(this.chooseIndex==this.tabList.length-1){
|
|
|
+ this.request.isLast = 1
|
|
|
+ }else{
|
|
|
+ this.request.isLast = 0
|
|
|
+ this.request.nextCompleteNum = this.tabList[this.chooseIndex+1].number
|
|
|
}
|
|
|
},
|
|
|
datasource({ page, limit,where }) {
|
|
|
@@ -1018,6 +1021,7 @@
|
|
|
this.chooseIndex = 0
|
|
|
this.reload({workOrderId:this.workOrderId, taskCode:this.taskCode})
|
|
|
this.getReportCount()
|
|
|
+ this.setData()
|
|
|
},
|
|
|
async getReportCount () {
|
|
|
const res = await reportCount({
|
|
|
@@ -1051,10 +1055,10 @@
|
|
|
...this.request
|
|
|
}
|
|
|
writeOffWork(data).then(res=>{
|
|
|
- if(res){
|
|
|
+ if(res==1){
|
|
|
this.$message.success('冲销成功');
|
|
|
this.reload({workOrderId:this.workOrderId, taskCode:this.taskCode})
|
|
|
- }else{
|
|
|
+ }else if(res==0){
|
|
|
this.$confirm('', {
|
|
|
message:h('div',null, [
|
|
|
h('i',{ class:'el-icon-question',style:'color:#f90;font-size:30px;' }),
|
|
|
@@ -1067,6 +1071,8 @@
|
|
|
.then(() => {
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
+ }else{
|
|
|
+ this.$message.error('接口异常');
|
|
|
}
|
|
|
})
|
|
|
})
|