|
|
|
@ -143,6 +143,9 @@ |
|
|
|
</el-date-picker> |
|
|
|
<!-- <el-input v-model="detailData.shiftno" style="width: 130px" :disabled="detailData.updateFlag"></el-input>--> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'班次'"> |
|
|
|
<el-input v-model="detailData.shiftno" style="width: 130px" :disabled="detailData.updateFlag"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'总工作时间'"> |
|
|
|
<el-input v-model="detailData.allTime" style="width: 130px" disabled></el-input> |
|
|
|
</el-form-item> |
|
|
|
@ -151,7 +154,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
<div > |
|
|
|
<div class="rq"> |
|
|
|
<el-table |
|
|
|
height="250" |
|
|
|
:data="detailList" |
|
|
|
@ -222,7 +225,7 @@ |
|
|
|
}, |
|
|
|
currentRow:{ |
|
|
|
site:'', |
|
|
|
OperatorGroupId:'' |
|
|
|
operatorGroupId:'' |
|
|
|
}, |
|
|
|
currentRow2:{ |
|
|
|
site:'', |
|
|
|
@ -439,7 +442,7 @@ |
|
|
|
methods: { |
|
|
|
changeData(row){ |
|
|
|
this.currentRow.site=row.site |
|
|
|
this.currentRow.OperatorGroupId=row.operatorID |
|
|
|
this.currentRow.operatorGroupId=row.operatorID |
|
|
|
this.getGroupPlanHeaderData(); |
|
|
|
}, |
|
|
|
getData(){ |
|
|
|
@ -478,9 +481,9 @@ |
|
|
|
let number1=0 |
|
|
|
let number2=0 |
|
|
|
for (let i = 0; i < this.detailList.length; i++) { |
|
|
|
number1+=this.detailList[i].workTime?this.detailList[i].workTime:0 |
|
|
|
number1+=Number( this.detailList[i].workTime?this.detailList[i].workTime:0) |
|
|
|
if(this.detailList[i].workTime!=null&&this.detailList[i].workTime!==0&&this.detailList[i].wagesRate!=null&&this.detailList[i].wagesRate!==0){ |
|
|
|
number2+=this.detailList[i].workTime*this.detailList[i].wagesRate |
|
|
|
number2+=Number( this.detailList[i].workTime*this.detailList[i].wagesRate) |
|
|
|
} |
|
|
|
} |
|
|
|
this.detailData.allTime=number1 |
|
|
|
@ -510,7 +513,7 @@ |
|
|
|
this. detailData={ |
|
|
|
updateFlag:true, |
|
|
|
id:data.id, |
|
|
|
operatorGroupId:this.currentRow.operatorID, |
|
|
|
operatorGroupId:this.currentRow.operatorGroupId, |
|
|
|
workDate:data.workDate, |
|
|
|
shiftno:data.shiftno, |
|
|
|
allTime:data.allTime, |
|
|
|
@ -520,7 +523,7 @@ |
|
|
|
this.detailModelFlag=true |
|
|
|
}, |
|
|
|
newDetail(){ |
|
|
|
if(!this.currentRow){ |
|
|
|
if(!this.currentRow|| this.currentRow.site==""){ |
|
|
|
this.$alert("请先选择操作组", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
@ -529,10 +532,10 @@ |
|
|
|
this. detailData={ |
|
|
|
site:this.currentRow.site, |
|
|
|
id:null, |
|
|
|
operatorGroupId:this.currentRow.operatorID, |
|
|
|
operatorGroupId:this.currentRow.operatorGroupId, |
|
|
|
updateFlag:false, |
|
|
|
workDate:this.dayjs().format("YYYY-MM-DD"), |
|
|
|
shiftno:"", |
|
|
|
shiftno:'', |
|
|
|
allTime:0, |
|
|
|
wagesTime:0, |
|
|
|
detailList:[], |
|
|
|
@ -546,20 +549,20 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
saveDetail(){ |
|
|
|
if(this.detailData.workDate==""||this.detailData.workDate==null){ |
|
|
|
if(this.detailData.workDate===""||this.detailData.workDate==null){ |
|
|
|
this.$alert("请先选择日期", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.detailData.workDate==""||this.detailData.workDate==null){ |
|
|
|
this.$alert("请先选择日期", '错误', { |
|
|
|
if(this.detailData.shiftno===""||this.detailData.shiftno==null){ |
|
|
|
this.$alert("请先选择班次", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.detailData.detailList=this.detailList |
|
|
|
saveOperatorGroupDetail(this.currentRow).then(({data}) => { |
|
|
|
saveOperatorGroupDetail(this.detailData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getGroupPlanHeaderData(); |
|
|
|
this.detailModelFlag=false |
|
|
|
|