feat:禅道244

This commit is contained in:
shijing 2025-12-29 14:57:24 +08:00
parent 478e0d04a3
commit 1c93ad1514
1 changed files with 40 additions and 5 deletions

View File

@ -17,10 +17,21 @@
</div> </div>
</el-header> </el-header>
<el-main id="mlogbwMain"> <el-main id="mlogbwMain">
<div style="margin-top: -5px;margin-bottom: 5px;position: relative;">
<el-button type="primary" v-if="!isSubmit" @click="check_add">新增</el-button> <el-button type="primary" v-if="!isSubmit" @click="check_add">新增</el-button>
<el-button type="primary" v-if="!isSubmit&&processType=='20'" @click="check_start">检验</el-button> <el-button type="primary" v-if="!isSubmit&&processType=='20'" @click="check_start">检验</el-button>
<el-button type="primary" v-if="multipleSet" @click="check_set" style="position: relative;left: 210px;">批量操作</el-button> <el-button type="primary" v-if="multipleSet" @click="check_set" style="position: absolute;left: 210px;">批量操作</el-button>
<el-input v-if="multipleSet" v-model="wprInputText" @change="wprinputChange" style="width:200px;position: relative;left: 308px;"></el-input> <el-input v-if="multipleSet" v-model="wprInputText" @change="wprinputChange" style="width:200px;position: absolute;left: 308px;"></el-input>
<div style="width:100px;position: absolute;right: 40px;display: inline-block;">
<scFileImport
v-if="project_code=='tcerp'&&processType=='20'&&!isSubmit"
:name = "'上传检验附件'"
accept=".xlsx"
:apiObj="$API.common.upload"
@success="upSuccess"
></scFileImport><!-- :templateUrl="checkTemplate" -->
</div>
</div>
<table id="mlogbwlist" class="tables"> <table id="mlogbwlist" class="tables">
<thead> <thead>
<tr> <tr>
@ -246,7 +257,10 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { ElLoading } from "element-plus";
import scFileImport from "@/components/scFileImport";
export default { export default {
components: {scFileImport},
props: { props: {
qct: { qct: {
type: String, type: String,
@ -331,6 +345,7 @@ export default {
wprNumber:"", wprNumber:"",
route_code:"", route_code:"",
wprInputText:"", wprInputText:"",
project_code:"",
canMultiple:false, canMultiple:false,
selectedAll:false, selectedAll:false,
checkAll: false, checkAll: false,
@ -376,7 +391,8 @@ export default {
qct_defects_origin:[], qct_defects_origin:[],
tableHeight:500, tableHeight:500,
apiObjPrint:this.$API.cm.labelmat.fromWm, apiObjPrint:this.$API.cm.labelmat.fromWm,
printer_name:localStorage.getItem("printer_name") printer_name:localStorage.getItem("printer_name"),
// checkTemplate: " /media/default/template/material.xlsx",
}; };
}, },
watch: {}, watch: {},
@ -384,6 +400,8 @@ export default {
let that = this; let that = this;
that.route_code = that.$route.path.split("/")[2]; that.route_code = that.$route.path.split("/")[2];
that.currentDate = that.$TOOL.dateFormat2(new Date()); that.currentDate = that.$TOOL.dateFormat2(new Date());
that.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code;
that.checkTemplate = this.checkTemplate+"?t=" + new Date().getTime();
if(that.processType=='20'){ if(that.processType=='20'){
that.canMultiple = true; that.canMultiple = true;
} }
@ -981,6 +999,23 @@ export default {
// item.value = false; // item.value = false;
// }); // });
}, },
upSuccess(res, close){
let that = this;
close();
const loading = ElLoading.service({
fullscreen: true,
text: "解析中...请稍等",
});
console.log(res);
this.$API.wpm.mlog.change.req(that.mlogId,{ test_file: res.path }).then((res) => {
loading.close();
this.$message.success("导入成功");
this.getList();
}).catch((err) => {
loading.close();
this.$message.error("导入失败,请重新尝试");
});
},
}, },
}; };
</script> </script>