fix: merge
This commit is contained in:
parent
b0063b6052
commit
adeacb865e
|
@ -0,0 +1,101 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="left-panel">
|
||||||
|
<el-button type="primary" icon="el-icon-download" v-loading="exportLoading" @click="exportExcel">导出</el-button>
|
||||||
|
<el-button type="primary" @click="handlePrint">打印</el-button>
|
||||||
|
</div>
|
||||||
|
<div class="right-panel">
|
||||||
|
<el-date-picker v-model="query.test_date" type="date" value-format="YYYY-MM-DD" />
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable ref="table" :apiObj="apiObj" row-key="id" id="myTable" stripe :params="params" :query="query">
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="产品名称" prop="material_name" show-overflow-tooltip>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="批次号" prop="batch">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="总数" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="不合格数" prop="count_notok">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="抽样数量" prop="count_sampling">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="检验员" prop="test_user_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="检验日期" prop="test_date">
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
<el-dialog v-model="printVisible" width="850px" title="入司检验">
|
||||||
|
<div id="exportDiv">
|
||||||
|
<scTable
|
||||||
|
:apiObj="apiObj"
|
||||||
|
row-key="id" stripe
|
||||||
|
:params="params"
|
||||||
|
hidePagination
|
||||||
|
hideDo
|
||||||
|
style="width: 800px;"
|
||||||
|
:query="query">
|
||||||
|
<el-table-column label="产品名称" prop="material_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="批次号" prop="batch">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="总数" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="不合格数" prop="count_notok">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="抽样数量" prop="count_sampling" >
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="检验员" prop="test_user_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="检验日期" prop="test_date">
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "rparty",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
apiObj: this.$API.qm.ftestwork.list,
|
||||||
|
params: { type: 'purin', mb__isnull: false },
|
||||||
|
query: {
|
||||||
|
test_date:''
|
||||||
|
},
|
||||||
|
printVisible:false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//查看
|
||||||
|
table_show(row) {
|
||||||
|
this.dialog.save = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.saveDialog.open("show", 10).setData(row);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleQuery() {
|
||||||
|
this.$refs.table.queryData(this.query)
|
||||||
|
},
|
||||||
|
resetQuery() {
|
||||||
|
this.query = {};
|
||||||
|
},
|
||||||
|
exportExcel() {
|
||||||
|
this.exportLoading = true;
|
||||||
|
this.$XLSX('#myTable', "IQC检验")
|
||||||
|
this.exportLoading = false;
|
||||||
|
},
|
||||||
|
handlePrint(){
|
||||||
|
this.printVisible = true;
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$PRINT("#exportDiv");
|
||||||
|
}, 1000);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -0,0 +1,395 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="right-panel">
|
||||||
|
<el-input v-model="query.batch__contains"
|
||||||
|
placeholder="批次号"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
@click="handleExport"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
:params="params"
|
||||||
|
:query="params"
|
||||||
|
id="exportDiv"
|
||||||
|
stripe
|
||||||
|
>
|
||||||
|
<el-table-column label="批次编号" fixed="left" prop="batch">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="版型" prop="number" fixed="left">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.material_start_name }}{{ scope.row.material_start_model }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="扭转数" fixed="left">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.data.扭转检测_count_use }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="扭后内质" align="center" class-name="colorheader1">
|
||||||
|
<el-table-column label="合格" class-name="colorheader1">
|
||||||
|
<el-table-column label="数量" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢2mm不合格']?scope.row.data.扭转检测_count_use-scope.row.data['扭转检测_缺陷_放大率¢2mm不合格']:scope.row.data.扭转检测_count_use }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比例" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢2mm不合格_比例']?100-scope.row.data['扭转检测_缺陷_放大率¢2mm不合格_比例']:100 }}%</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="可加工" class-name="colorheader1">
|
||||||
|
<el-table-column label="数量" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢2mm不合格']?scope.row.data.扭转检测_count_use-scope.row.data['扭转检测_缺陷_放大率¢2mm不合格']:scope.row.data.扭转检测_count_use }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比例" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢2mm不合格_比例']?100-scope.row.data['扭转检测_缺陷_放大率¢2mm不合格_比例']:100 }}%</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="黑网格" align="center" class-name="colorheader2">
|
||||||
|
<el-table-column label="无" class-name="colorheader2">
|
||||||
|
<el-table-column label="数量" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']?scope.row.data.扭转检测_count_use-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']:scope.row.data.扭转检测_count_use }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比例" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']?100-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']:100 }}%</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="轻" class-name="colorheader2">
|
||||||
|
<el-table-column label="数量" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']?scope.row.data.扭转检测_count_use-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']:scope.row.data.扭转检测_count_use }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比例" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']?100-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']:100 }}%</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="重" class-name="colorheader2">
|
||||||
|
<el-table-column label="数量" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']?scope.row.data.扭转检测_count_use-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']:scope.row.data.扭转检测_count_use }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比例" class-name="colorheader2">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']?100-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']:100 }}%</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="白网格" align="center" class-name="colorheader3">
|
||||||
|
<el-table-column label="无" class-name="colorheader3">
|
||||||
|
<el-table-column label="数量" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']?scope.row.data.扭转检测_count_use-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']:scope.row.data.扭转检测_count_use }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比例" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']?100-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']:100 }}%</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="轻" class-name="colorheader3">
|
||||||
|
<el-table-column label="数量" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']?scope.row.data.扭转检测_count_use-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']:scope.row.data.扭转检测_count_use }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比例" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']?100-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']:100 }}%</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="重" class-name="colorheader3">
|
||||||
|
<el-table-column label="数量" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']?scope.row.data.扭转检测_count_use-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']:scope.row.data.扭转检测_count_use }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比例" class-name="colorheader3">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']?100-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']:100 }}%</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="小网" align="center" class-name="colorheader4">
|
||||||
|
<el-table-column label="无" class-name="colorheader4">
|
||||||
|
<el-table-column label="数量" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']?scope.row.data.扭转检测_count_use-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']:scope.row.data.扭转检测_count_use }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比例" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']?100-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']:100 }}%</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="轻" class-name="colorheader4">
|
||||||
|
<el-table-column label="数量" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']?scope.row.data.扭转检测_count_use-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']:scope.row.data.扭转检测_count_use }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比例" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']?100-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']:100 }}%</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="重" class-name="colorheader4">
|
||||||
|
<el-table-column label="数量" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']?scope.row.data.扭转检测_count_use-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']:scope.row.data.扭转检测_count_use }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比例" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']?100-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']:100 }}%</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="分辨率" align="center" class-name="colorheader5">
|
||||||
|
<el-table-column label="测试数量" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.扭转检测_count_ok }} </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="国内" class-name="colorheader5">
|
||||||
|
<el-table-column label="数量" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']?scope.row.data.扭转检测_count_use-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']:scope.row.data.扭转检测_count_use }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比例" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']?100-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']:100 }}%</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="出口" class-name="colorheader5">
|
||||||
|
<el-table-column label="数量" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']?scope.row.data.扭转检测_count_use-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']:scope.row.data.扭转检测_count_use }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比例" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']?100-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']:100 }}%</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="不合格" class-name="colorheader5">
|
||||||
|
<el-table-column label="数量" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']?scope.row.data.扭转检测_count_use-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']:scope.row.data.扭转检测_count_use }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比例" class-name="colorheader5">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']?100-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']:100 }}%</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="加工数" align="center" class-name="colorheader6">
|
||||||
|
<el-table-column label="数量" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.扭转检测_count_ok }} </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比例" class-name="colorheader6">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.扭转检测_合格率 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="毛坯扭送" align="center" class-name="colorheader7">
|
||||||
|
<el-table-column label="数量" class-name="colorheader7">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.扭转检测_count_ok }} </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="时间" class-name="colorheader7">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.扭转检测_合格率 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="扭送损失" align="center" class-name="colorheader1">
|
||||||
|
<el-table-column label="炸裂情况" class-name="colorheader1">
|
||||||
|
<el-table-column label="完好" class-name="colorheader1">
|
||||||
|
<el-table-column label="数量" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']?scope.row.data.扭转检测_count_use-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']:scope.row.data.扭转检测_count_use }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比例" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']?100-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']:100 }}%</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="崩炸" class-name="colorheader1">
|
||||||
|
<el-table-column label="数量" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']?scope.row.data.扭转检测_count_use-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']:scope.row.data.扭转检测_count_use }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比例" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']?100-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']:100 }}%</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="炸废" class-name="colorheader1">
|
||||||
|
<el-table-column label="数量" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']?scope.row.data.扭转检测_count_use-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格']:scope.row.data.扭转检测_count_use }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比例" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']?100-scope.row.data['扭转检测_缺陷_放大率¢16mm不合格_比例']:100 }}%</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="扭转角" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.扭转检测_count_ok }} </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="改直" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.扭转检测_合格率 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="外圆大" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.扭转检测_count_ok }} </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="合计" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.扭转检测_count_ok }} </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="合格率" class-name="colorheader1">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.扭转检测_合格率 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="外形偏(0.5mm)" align="center" class-name="colorheader2">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="实验名称备注" prop="batch" align="center" class-name="colorheader3">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="检测设备" align="center" class-name="colorheader4">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.data.扭转检测_缺陷_备注 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "statistics_guan",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
params: {
|
||||||
|
ordering:'-data__扭转检测_小日期',
|
||||||
|
querys:[[{field:"data__has_key",compare:"",value:"扭转检测_日期"}]],
|
||||||
|
},
|
||||||
|
query:{
|
||||||
|
name__contains:'',
|
||||||
|
batch__contains:'',
|
||||||
|
last_time__gte:'',
|
||||||
|
last_time__lte:'',
|
||||||
|
},
|
||||||
|
// apiObj: this.$API.wpm.wpr.query,
|
||||||
|
apiObj: this.$API.wpm.batchstquery,
|
||||||
|
options:[],
|
||||||
|
tableData:[],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleQuery(){
|
||||||
|
let that = this;
|
||||||
|
let querys = [[{field:"wm",value:0,compare:"isnull"},{field:"data__has_key",compare:"",value:"扭转检测_批次号"}]];
|
||||||
|
let obj = {},obj1 = {},obj2 = {},obj3 = {};
|
||||||
|
obj.field = 'data__扭转检测_批次号';
|
||||||
|
obj.value = that.query.batch__contains;
|
||||||
|
obj.compare = '';
|
||||||
|
|
||||||
|
obj1.field = 'last_time';
|
||||||
|
obj1.value = that.query.last_time__gte;
|
||||||
|
obj1.compare = 'gte';
|
||||||
|
|
||||||
|
obj2.field = 'last_time';
|
||||||
|
obj2.value = that.query.last_time__lte;
|
||||||
|
obj2.compare = 'lte';
|
||||||
|
|
||||||
|
obj3.field = 'data__扭转检测_物料名';
|
||||||
|
obj3.value = that.query.name__contains;
|
||||||
|
obj3.compare = '';
|
||||||
|
|
||||||
|
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
|
||||||
|
querys[0].push(obj);
|
||||||
|
}
|
||||||
|
if(that.query.last_time__gte!==''&&that.query.last_time__gte!==null){
|
||||||
|
querys[0].push(obj1);
|
||||||
|
}
|
||||||
|
if(that.query.last_time__lte!==''&&that.query.last_time__lte!==null){
|
||||||
|
querys[0].push(obj2);
|
||||||
|
}
|
||||||
|
if(that.query.name__contains!==''&&that.query.name__contains!==null){
|
||||||
|
querys[0].push(obj3);
|
||||||
|
}
|
||||||
|
that.params.querys = querys;
|
||||||
|
this.$refs.table.queryData(that.params);
|
||||||
|
},
|
||||||
|
getCountQt(data,type){
|
||||||
|
let count_qt = 0,count = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
|
@ -0,0 +1,107 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="left-panel"></div>
|
||||||
|
<div class="right-panel">
|
||||||
|
<el-input v-model="query.user_name"
|
||||||
|
placeholder="姓名"
|
||||||
|
clearable
|
||||||
|
style="width: 200px;"
|
||||||
|
></el-input>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="query.start_date"
|
||||||
|
type="date"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
placeholder="开始时间"
|
||||||
|
style="width: 150px"
|
||||||
|
/>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="query.end_date"
|
||||||
|
type="date"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
placeholder="结束时间"
|
||||||
|
style="margin-left: 2px; width: 150px"
|
||||||
|
/>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
<!-- <el-button
|
||||||
|
@click="handleExport"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button> -->
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:data="tableData"
|
||||||
|
id="exportDiv"
|
||||||
|
stripe
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" fixed="left"/>
|
||||||
|
<el-table-column label="操作人" prop="操作人">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="日期" prop="日期">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="物料领用数" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<div v-for="value in scope.row.data" :key="value.name">{{ value.name }}:{{ value.count }}、</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "workerTimes",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
query:{
|
||||||
|
end_date:'',
|
||||||
|
user_name:'',
|
||||||
|
start_date:'',
|
||||||
|
},
|
||||||
|
tableData:[],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
let that = this;
|
||||||
|
let date = new Date();
|
||||||
|
that.query.start_date = that.query.end_date = that.$TOOL.dateFormat2(date);
|
||||||
|
that.getData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getData(){
|
||||||
|
let that = this;
|
||||||
|
let params = {};
|
||||||
|
params.query = that.query;
|
||||||
|
that.$API.bi.dataset.exec.req('lineDay_p', params).then((res) => {
|
||||||
|
let data = res.data2.ds0;
|
||||||
|
data.forEach((item) => {
|
||||||
|
item.data = [];
|
||||||
|
item.工段物料领用数 = JSON.parse(item.工段物料领用数);
|
||||||
|
for(let key in item.工段物料领用数){
|
||||||
|
item.data.push({
|
||||||
|
"name":key,
|
||||||
|
"count":item.工段物料领用数[key]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
that.tableData = data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleQuery(){
|
||||||
|
let that = this;
|
||||||
|
that.getData();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
|
@ -0,0 +1,334 @@
|
||||||
|
<template>
|
||||||
|
<el-drawer
|
||||||
|
title="关联产品"
|
||||||
|
v-model="visible"
|
||||||
|
:size="'70%'"
|
||||||
|
destroy-on-close
|
||||||
|
>
|
||||||
|
<template #header>
|
||||||
|
<h4>关联产品</h4>
|
||||||
|
<el-button v-if="mode=='out'" type="primary" @click="wprNumberChange">发货编号</el-button>
|
||||||
|
<el-button v-if="mode=='out'" type="warning" @click="wprNumberClear">清空编号</el-button>
|
||||||
|
<el-input
|
||||||
|
v-if="mode=='ins'"
|
||||||
|
style="margin-right: 5px;width: 200px;"
|
||||||
|
v-model="search"
|
||||||
|
placeholder="编号"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
v-if="mode=='ins'"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleWprQuery"
|
||||||
|
></el-button>
|
||||||
|
</template>
|
||||||
|
<template #default>
|
||||||
|
<el-table ref="wprTable" id="wprTable" :data="wprList" :height="wprTableHeight" border highlight-current-row>
|
||||||
|
<el-table-column label="产品编号" prop="number" min-width="100px" ></el-table-column>
|
||||||
|
<el-table-column label="对外编号" prop="number_out" min-width="100px"
|
||||||
|
v-if="mgroupName=='成品内外初检'||mgroupName=='成品内质复检'||mgroupName=='成品性能检测'||mgroupName=='成品尺寸检测'||mgroupName=='成品外观复检一'||mgroupName=='成品外观复检二'"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="记录数据" prop="oinfo">
|
||||||
|
<template #default="scope">
|
||||||
|
<div v-for="(item,index) in scope.row.oinfo" :key="item.id">
|
||||||
|
{{ item.name }}:{{ item.val}}
|
||||||
|
<span v-if="index<(scope.row.oinfo.length-1)">,</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="缺陷项" min-width="200px">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-for="item in scope.row.wprdefect" :key="item.id">
|
||||||
|
<el-tag
|
||||||
|
type="warning"
|
||||||
|
>{{ item.defect_name }}</el-tag>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
fixed="right"
|
||||||
|
align="center"
|
||||||
|
width="200"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button v-if="mode=='ins'&&mgroupName=='毛坯检测后打码'" @click="QRCode(scope.row)" type="success">二维码</el-button>
|
||||||
|
<el-button @click="printMaterial(scope.row)" type="primary">打印标签</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</template>
|
||||||
|
</el-drawer>
|
||||||
|
<el-dialog title="二维码" v-model="showQrCode" width="500px">
|
||||||
|
<el-container>
|
||||||
|
<el-main style="text-align: center;padding: 50px 0;">
|
||||||
|
<scQrCode :text="scQr_code"></scQrCode>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</el-dialog>
|
||||||
|
<el-dialog title="设置发货编号" v-model="showBatch">
|
||||||
|
<el-form :model="wprParams" label-width="80px">
|
||||||
|
<el-form-item label="编号前缀">
|
||||||
|
<el-input v-model="prefix"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="getWprNum">确定</el-button>
|
||||||
|
<el-button @click="showBatch=false">取消</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
<el-dialog title="设置发货流水位数" v-model="showDigit">
|
||||||
|
<h4>没有找到该前缀的发货编号,请完善发货流水号位数(填整数)</h4>
|
||||||
|
<el-form :model="wprParams" label-width="80px">
|
||||||
|
<el-form-item label="流水位数">
|
||||||
|
<el-input-number controls-position="right" precision="0" v-model="digitNum"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="digitSure">确定</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { wmState } from "@/utils/enum.js";
|
||||||
|
export default {
|
||||||
|
name: "inm_record",
|
||||||
|
props: {
|
||||||
|
wm: { type: String, default: "" },
|
||||||
|
mgroupId: { type: String, default: "" },
|
||||||
|
process: { type: String, default: "" },
|
||||||
|
ofromName: { type: String, default: "" },
|
||||||
|
ofromBatch: { type: String, default: "" },
|
||||||
|
mgroupName: {type: String,default: "",},
|
||||||
|
},
|
||||||
|
emits: ["success", "closed"],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
wmState,
|
||||||
|
visible: false,
|
||||||
|
showBatch:false,
|
||||||
|
showDigit:false,
|
||||||
|
showQrCode:false,
|
||||||
|
params:{
|
||||||
|
page:0,
|
||||||
|
wm:'',
|
||||||
|
},
|
||||||
|
mode:'',
|
||||||
|
prefix:'',
|
||||||
|
search:"",
|
||||||
|
wmId:'',
|
||||||
|
wmtype:'',
|
||||||
|
scQr_code:'',
|
||||||
|
wprList:[],
|
||||||
|
digitNum:3,
|
||||||
|
wprTableHeight:500,
|
||||||
|
printer_name:localStorage.getItem("printer_name"),
|
||||||
|
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
let that = this;
|
||||||
|
let paths = that.$route.path;
|
||||||
|
let arr = paths.split("/");
|
||||||
|
that.route_code = arr[2];
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
open(mode) {
|
||||||
|
let that = this;
|
||||||
|
this.mode = mode;
|
||||||
|
this.params.wm = this.wm;
|
||||||
|
this.visible = true;
|
||||||
|
this.getRowWpr();
|
||||||
|
that.$nextTick(() => {
|
||||||
|
let heights = document.getElementsByClassName("el-drawer__body")[0].clientHeight;
|
||||||
|
that.wprTableHeight = heights-20;
|
||||||
|
})
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
getRowWpr(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.wpm.wpr.list.req(that.params).then((res) => {
|
||||||
|
that.wprList = res;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
QRCode(row){
|
||||||
|
this.showQrCode = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.scQr_code=row.number;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
wprNumberChange(){
|
||||||
|
let that = this;
|
||||||
|
that.showBatch = true;
|
||||||
|
},
|
||||||
|
wprNumberClear(){
|
||||||
|
let that = this;
|
||||||
|
let items = [];
|
||||||
|
for(let i=0;i< that.wprList.length;i++){
|
||||||
|
let obj = {};
|
||||||
|
obj.id = that.wprList[i].id;
|
||||||
|
obj.number_out = null;
|
||||||
|
items.push(obj)
|
||||||
|
}
|
||||||
|
let params = {};
|
||||||
|
params.items = items;
|
||||||
|
that.$API.wpm.wpr.assginNumberOut.req(params).then((res) => {
|
||||||
|
that.getRowWpr();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getWprNum(){
|
||||||
|
let that = this;
|
||||||
|
let params0 = {};
|
||||||
|
params0.prefix = that.prefix;
|
||||||
|
that.$API.wpm.wpr.numberOutLast.req(params0).then((res) => {
|
||||||
|
let number_out_last = '';
|
||||||
|
if(res.number_out_last==null){//没有该前缀的发货编号
|
||||||
|
number_out_last = null;
|
||||||
|
that.showBatch=false;
|
||||||
|
that.showDigit = true;
|
||||||
|
}else{//有该前缀的发货编号
|
||||||
|
let items = [];
|
||||||
|
number_out_last = res.number_out_last;
|
||||||
|
let str = number_out_last.replace(/[^a-zA-Z]/g, ''); // 提取字母
|
||||||
|
let num = number_out_last.replace(/[^0-9]/g, ''); // 提取数字
|
||||||
|
let length = num.length;//流水号的长度
|
||||||
|
for(let i=0;i< that.wprList.length;i++){
|
||||||
|
let numb = Number(num)+i+1;
|
||||||
|
let numbs = numb+'';
|
||||||
|
let len = numbs.length;
|
||||||
|
let zoreStr = '';
|
||||||
|
for(let j=0;j<length-len;j++){
|
||||||
|
zoreStr+='0';
|
||||||
|
}
|
||||||
|
let obj = {};
|
||||||
|
obj.id = that.wprList[i].id;
|
||||||
|
obj.number_out = str + zoreStr + numb;
|
||||||
|
items.push(obj)
|
||||||
|
}
|
||||||
|
let params = {};
|
||||||
|
params.items = items;
|
||||||
|
that.$API.wpm.wpr.assginNumberOut.req(params).then((res) => {
|
||||||
|
that.showBatch=false;
|
||||||
|
that.getRowWpr();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//没有找到前缀的发货编号,从1开始编号时
|
||||||
|
digitSure(){
|
||||||
|
let that = this;
|
||||||
|
//根据前缀和流水位数获取编号
|
||||||
|
let items = [];
|
||||||
|
for(let i=0;i< that.wprList.length;i++){
|
||||||
|
let numb = i+1,zoreStr = '';
|
||||||
|
numb+= '';
|
||||||
|
let len = numb.length;
|
||||||
|
for(let j=0;j<that.digitNum-len;j++){
|
||||||
|
zoreStr+='0';
|
||||||
|
}
|
||||||
|
let obj = {};
|
||||||
|
obj.id = that.wprList[i].id;
|
||||||
|
obj.number_out = that.prefix + zoreStr + numb;
|
||||||
|
items.push(obj)
|
||||||
|
}
|
||||||
|
let params = {};
|
||||||
|
params.items = items;
|
||||||
|
that.$API.wpm.wpr.assginNumberOut.req(params).then((res) => {
|
||||||
|
that.showDigit = false;
|
||||||
|
that.getRowWpr();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleWprQuery(){
|
||||||
|
let that = this;
|
||||||
|
that.wprList.forEach((item,index)=>{
|
||||||
|
if(item.number.indexOf(that.search) > -1){
|
||||||
|
that.$refs.wprTable.setCurrentRow(item);
|
||||||
|
let rows = document.querySelectorAll("#wprTable .el-table__row");
|
||||||
|
let row = rows[index];
|
||||||
|
let rowTop = row.offsetTop;
|
||||||
|
that.$refs.wprTable.scrollTo({ top: rowTop });
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//打印物料标签
|
||||||
|
printMaterial(row){
|
||||||
|
let that = this;
|
||||||
|
if(that.printer_name!==''&&that.printer_name!==null&&that.printer_name!==undefined){
|
||||||
|
let params = {};
|
||||||
|
let name = row.material_name.split('|')[0];
|
||||||
|
if(that.route_code=='paiyicibang'||that.route_code=='kunbang'){
|
||||||
|
console.log('that.route_code',that.route_code);
|
||||||
|
console.log('that.ofromName',that.ofromName);
|
||||||
|
that.$API.mtm.route.list.req({material_out:row.material,page:0}).then((res) => {
|
||||||
|
let data = res[0].params_json;
|
||||||
|
data.number = row.number;
|
||||||
|
data.name=name;
|
||||||
|
data.ofrom_name=that.ofromName;
|
||||||
|
params.data = data;
|
||||||
|
if(that.route_code=='paiyicibang'){
|
||||||
|
params.label_template_name = '排一次棒单件打印模板';
|
||||||
|
}else{
|
||||||
|
params.label_template_name = '捆棒单件打印模板';
|
||||||
|
}
|
||||||
|
that.$API.cm.labeltemplate.commands.req(params).then((res) => {
|
||||||
|
let obj = {};
|
||||||
|
obj.printer_commands = res.commands;
|
||||||
|
obj.printer_name = that.printer_name;
|
||||||
|
that.$API.wpm.prints.req(obj).then((response) => {
|
||||||
|
that.$message.success("打印成功");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
if(that.route_code=='paiban'||that.route_code=='zhuangmo'||that.route_code=='zlybcl'||that.route_code=='tuomoceliang'||
|
||||||
|
that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'||that.route_code=='banduangunyuanhoudama'||that.route_code=='banduangunyuantuihuo'
|
||||||
|
){
|
||||||
|
let oinfo = [];
|
||||||
|
for(let key in row.oinfo){
|
||||||
|
oinfo.push(row.oinfo[key])
|
||||||
|
}
|
||||||
|
let data = {sigao:'',duibian:'',moban:'',istest:'否',number:row.number,name:name,ofrom_name:that.ofromName,ofrom_batch:that.ofromBatch};
|
||||||
|
if(that.route_code=='zhuangmo'||that.route_code=='zlybcl'||that.route_code=='tuomoceliang'||that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'){
|
||||||
|
params.label_template_name = '脱膜测量单件标签模板';
|
||||||
|
}else{
|
||||||
|
params.label_template_name = '排扳单件打印模板';
|
||||||
|
}
|
||||||
|
if(oinfo.length>0){
|
||||||
|
oinfo.forEach((item)=>{
|
||||||
|
if(item.name=="丝高"){
|
||||||
|
data.sigao = item.val;
|
||||||
|
}else if(item.name=="对边"){
|
||||||
|
data.duibian = item.val;
|
||||||
|
}else if(item.name=="模具号"){
|
||||||
|
data.moban = item.val;
|
||||||
|
}else if(item.name=="实验板段"){
|
||||||
|
data.istest = item.val?'是':'否';
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
params.data = data;
|
||||||
|
}else{
|
||||||
|
params.label_template_name = '单件打印模板';
|
||||||
|
params.data = {number:row.number,name:name};
|
||||||
|
}
|
||||||
|
that.$API.cm.labeltemplate.commands.req(params).then((res) => {
|
||||||
|
let obj = {};
|
||||||
|
obj.printer_commands = res.commands;
|
||||||
|
obj.printer_name = that.printer_name;
|
||||||
|
that.$API.wpm.prints.req(obj).then((response) => {
|
||||||
|
that.$message.success("打印成功");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
that.$message.warning("请先设置打印机");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//本地更新数据
|
||||||
|
handleSaveSuccess() {
|
||||||
|
this.$refs.tables.refresh();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
Loading…
Reference in New Issue