|
@@ -143,7 +143,7 @@
|
|
|
|
|
|
<!-- 上传 报废5 时 -->
|
|
<!-- 上传 报废5 时 -->
|
|
<el-button
|
|
<el-button
|
|
- v-show="activeTab == 5 && update == 1 && abandonAble"
|
|
|
|
|
|
+ v-show="activeTab == 5 && update == 1 && abandonAble && moldDetail.managerId == user.id"
|
|
size="mini"
|
|
size="mini"
|
|
type="primary"
|
|
type="primary"
|
|
style="float: right;"
|
|
style="float: right;"
|
|
@@ -411,7 +411,7 @@
|
|
<!-- 操作记录 -->
|
|
<!-- 操作记录 -->
|
|
<el-col :span="24" class="title">
|
|
<el-col :span="24" class="title">
|
|
{{activeTab == 4?"更新":"操作"}}记录
|
|
{{activeTab == 4?"更新":"操作"}}记录
|
|
- <el-button v-if="(user.subordinateType == 0 || user.subordinateType == 1 || user.id == moldDetail.managerId) && activeTab != 4" size="mini" type="primary" style="float: right;" @click="centerDialog5Visible = true">导出</el-button>
|
|
|
|
|
|
+ <el-button v-if="(user.subordinateType == 0 || user.subordinateType == 1 || user.id == moldDetail.managerId) && activeTab != 4" size="mini" type="primary" style="float: right;" @click="centerDialog5Visible = true;recordTime=''">导出</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-table v-show="activeTab != 4" :data="operations" highlight-current-row v-loading="listLoading" style="width: 100%;">
|
|
<el-table v-show="activeTab != 4" :data="operations" highlight-current-row v-loading="listLoading" style="width: 100%;">
|
|
<el-table-column type="index" width="40"></el-table-column>
|
|
<el-table-column type="index" width="40"></el-table-column>
|
|
@@ -897,7 +897,7 @@
|
|
checkUpdateState(){
|
|
checkUpdateState(){
|
|
this.updateAble = true;
|
|
this.updateAble = true;
|
|
this.documents.update.forEach(item => {
|
|
this.documents.update.forEach(item => {
|
|
- if(item.state != "-1" || item.state != "-2"){
|
|
|
|
|
|
+ if(item.state != "-1" && item.state != "-2"){
|
|
//有进行中的更新申请 现在不能再申请更新了
|
|
//有进行中的更新申请 现在不能再申请更新了
|
|
this.updateAble = false;
|
|
this.updateAble = false;
|
|
}
|
|
}
|
|
@@ -908,7 +908,7 @@
|
|
checkAbandonState(){
|
|
checkAbandonState(){
|
|
this.abandonAble = true;
|
|
this.abandonAble = true;
|
|
this.documents.abandon.forEach(item => {
|
|
this.documents.abandon.forEach(item => {
|
|
- if(item.state != "-1" || item.state != "-2"){
|
|
|
|
|
|
+ if(item.state != "-1" && item.state != "-2"){
|
|
//有进行中的报废申请 现在不能再申请报废了
|
|
//有进行中的报废申请 现在不能再申请报废了
|
|
this.abandonAble = false;
|
|
this.abandonAble = false;
|
|
}
|
|
}
|
|
@@ -1496,20 +1496,22 @@
|
|
});
|
|
});
|
|
}else{
|
|
}else{
|
|
this.centerDialog5Visible = false;
|
|
this.centerDialog5Visible = false;
|
|
- this.http.post( this.port.mold.exportOperationExcel, {
|
|
|
|
- mouldId: this.detailId,
|
|
|
|
- startTime: this.recordTime[0],
|
|
|
|
- endTime: this.recordTime[1]
|
|
|
|
- },
|
|
|
|
|
|
+ this.http.get( this.port.mold.exportOperationExcel+ "?mouldId=" + this.detailId
|
|
|
|
+ + "&startTime=" + util.formatDate.format(new Date(this.recordTime[0]), 'yyyy-MM-dd')
|
|
|
|
+ + "&endTime=" + util.formatDate.format(new Date(this.recordTime[1]), 'yyyy-MM-dd'),
|
|
res => {
|
|
res => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
- let aTag = document.createElement('a');
|
|
|
|
- let blob = new Blob([res.data]);
|
|
|
|
- var arr = res.data.split("/");
|
|
|
|
- aTag.download = arr.pop();
|
|
|
|
- aTag.href = URL.createObjectURL(blob);
|
|
|
|
- aTag.click();
|
|
|
|
- URL.revokeObjectURL(blob);
|
|
|
|
|
|
+ // let aTag = document.createElement('a');
|
|
|
|
+ // let blob = new Blob([res.data]);
|
|
|
|
+ // var arr = res.data.split("/");
|
|
|
|
+ // aTag.download = arr.pop();
|
|
|
|
+ // aTag.href = URL.createObjectURL(blob);
|
|
|
|
+ // aTag.click();
|
|
|
|
+ // URL.revokeObjectURL(blob);
|
|
|
|
+ let a = document.createElement('a')
|
|
|
|
+ a.setAttribute('download', res.data.split("/")[2]);
|
|
|
|
+ a.setAttribute("href", res.data);
|
|
|
|
+ a.click();
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
message: res.msg,
|
|
message: res.msg,
|