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

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

parent ba078303
......@@ -120,6 +120,17 @@
v-hasPermi="['mes:tm:tool:export']"
>导出</el-button>
</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>
</el-row>
......@@ -360,6 +371,7 @@
<script>
import { listTool, getTool, delTool, addTool, updateTool } from "@/api/mes/tm/tool";
import { listAllTooltype } from "@/api/mes/tm/tooltype"
import {postPrintPdf} from "@/utils/ruoyi"
import {genCode} from "@/api/system/autocode/rule"
import BrandSelect from "@/components/itemSelect/single.vue";
export default {
......@@ -375,6 +387,7 @@ export default {
loading: true,
// 选中数组
ids: [],
selectRow: [],
// 非单个禁用
single: true,
// 非多个禁用
......@@ -522,7 +535,8 @@ export default {
},
// 多选框选中数据
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.multiple = !selection.length
},
......@@ -591,6 +605,18 @@ export default {
...this.queryParams
}, `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){
// 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