Commit daddefc1 authored by 李驰骋's avatar 李驰骋

工装夹具台账添加打印二维码

parent ba078303
...@@ -120,6 +120,17 @@ ...@@ -120,6 +120,17 @@
v-hasPermi="['mes:tm:tool:export']" v-hasPermi="['mes:tm:tool:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="print"
plain
icon="el-icon-download"
size="mini"
@click="printQrCode"
v-hasPermi="['tm:tmToolRequestUse:export']"
>打印二维码</el-button
>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
...@@ -360,6 +371,7 @@ ...@@ -360,6 +371,7 @@
<script> <script>
import { listTool, getTool, delTool, addTool, updateTool } from "@/api/mes/tm/tool"; import { listTool, getTool, delTool, addTool, updateTool } from "@/api/mes/tm/tool";
import { listAllTooltype } from "@/api/mes/tm/tooltype" import { listAllTooltype } from "@/api/mes/tm/tooltype"
import {postPrintPdf} from "@/utils/ruoyi"
import {genCode} from "@/api/system/autocode/rule" import {genCode} from "@/api/system/autocode/rule"
import BrandSelect from "@/components/itemSelect/single.vue"; import BrandSelect from "@/components/itemSelect/single.vue";
export default { export default {
...@@ -375,6 +387,7 @@ export default { ...@@ -375,6 +387,7 @@ export default {
loading: true, loading: true,
// 选中数组 // 选中数组
ids: [], ids: [],
selectRow: [],
// 非单个禁用 // 非单个禁用
single: true, single: true,
// 非多个禁用 // 非多个禁用
...@@ -522,7 +535,8 @@ export default { ...@@ -522,7 +535,8 @@ export default {
}, },
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.toolId) this.ids = selection.map(item => item.toolId);
this.selectRow = selection;
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
...@@ -591,6 +605,18 @@ export default { ...@@ -591,6 +605,18 @@ export default {
...this.queryParams ...this.queryParams
}, `tool_${new Date().getTime()}.xlsx`) }, `tool_${new Date().getTime()}.xlsx`)
}, },
printQrCode() {
const qrArr = [];
this.selectRow.forEach(s=>{
qrArr.push({"qrcode": s.toolCode});
});
postPrintPdf({
"reportName":"mysql:qrcode-100*100",
"values":{
"detail": qrArr
}
});
},
// //自动生成编码 // //自动生成编码
// handleAutoGenChange(autoGenFlag){ // handleAutoGenChange(autoGenFlag){
// debugger; // debugger;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment