Merge remote-tracking branch 'origin/master'

yangwl
mengjiao 3 months ago
commit b405d5e1b9

@ -16,7 +16,6 @@ export function getUnitPrice(picId) {
method: 'get'
});
}
// 新增unitPrice
export function addUnitPrice(data) {
return request({

@ -8,12 +8,7 @@ export function listUnitPriceReport(query) {
params: query
});
}
// export function getReport(id) {
// return request({
// url: '/mes/unitPriceReport/' + id,
// method: 'get'
// });
// }
// 查询【计件工资】详细
export function getReport(id) {
return request({
@ -29,3 +24,20 @@ export function updateUnitPriceReport(data) {
data: data
});
}
// 新增
// 计件工资统计
export function addUnitPriceReport(data) {
return request({
url: '/mes/unitPriceReport',
method: 'post',
data: data
});
}
// 查询生产工单列表--顶级母
export function listWorkorderLevel0(query) {
return request({
url: '/plan/pro/workorder/listLevel0',
method: 'get',
params: query
});
}

@ -181,10 +181,7 @@ export function getProdLineList() {
params: {}
});
}
export function getIdCardList(workorderCode){
const data={
workorderCode
}
export function getIdCardList(data){
return request({
url:'/plan/pro/workorder/getIdCardList',
method:'post',

@ -17,6 +17,14 @@ export function getUser(userId) {
method: 'get'
})
}
// 查询用户详细-通过工号
export function getUserByUserName(data) {
return request({
url: '/system/user/getInfoByUserName/',
method: 'post',
data: data
})
}
// 新增用户
export function addUser(data) {

@ -0,0 +1,5 @@
<svg t="1720683721767" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1481" width="200" height="200"><path d="M819.2 364.8h-44.8V128c0-17.066667-14.933333-32-32-32H281.6c-17.066667 0-32 14.933333-32 32v236.8H204.8c-59.733333 0-108.8 49.066667-108.8 108.8v192c0 59.733333 49.066667 108.8 108.8 108.8h44.8V896c0 17.066667 14.933333 32 32 32h460.8c17.066667 0 32-14.933333 32-32v-121.6h44.8c59.733333 0 108.8-49.066667 108.8-108.8v-192c0-59.733333-49.066667-108.8-108.8-108.8zM313.6 160h396.8v204.8H313.6V160z m396.8 704H313.6V620.8h396.8v243.2z m153.6-198.4c0 25.6-19.2 44.8-44.8 44.8h-44.8v-121.6c0-17.066667-14.933333-32-32-32H281.6c-17.066667 0-32 14.933333-32 32v121.6H204.8c-25.6 0-44.8-19.2-44.8-44.8v-192c0-25.6 19.2-44.8 44.8-44.8h614.4c25.6 0 44.8 19.2 44.8 44.8v192z" fill="#1296db" p-id="1482"></path></svg>

After

Width:  |  Height:  |  Size: 866 B

@ -42,10 +42,10 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="员工姓名" prop="nickName">
<el-form-item label="员工姓名/工号" prop="nickName" label-width="100px">
<el-input
v-model="queryParams.equipmentName"
placeholder="请输入员工姓名"
v-model="queryParams.nickName"
placeholder="请输入员工姓名/工号"
clearable
@keyup.enter.native="handleQuery"
/>
@ -69,16 +69,15 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['unitPriceReport:report:edit']"-->
<!-- >修改-->
<!-- </el-button>-->
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="openSelectOrder"
v-hasPermi="['device:item:add']"
>补录
</el-button>
<el-button
type="success"
plain
@ -156,7 +155,7 @@
@pagination="getList"
/>
<!-- 添加或修改unitPrice对话框 -->
<!-- 修改unitPrice对话框 -->
<el-dialog :title="title" :visible.sync="open" width="680px" append-to-body>
<el-form ref="form" :model="form" label-width="100px">
@ -281,16 +280,243 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 新增unitPrice对话框 -->
<el-dialog :title="addtitle" :visible.sync="addopen" width="680px" append-to-body>
<el-form ref="addform" :model="addform" :rules="rules" label-width="100px">
<el-row>
<el-col :span="12">
<el-form-item label="工单号" prop="workorderCode" >
<el-input v-model="addform.workorderCode" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="SAP订单号" prop="workorderCodeSap" >
<el-input v-model="addform.workorderCodeSap" >
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="工单生产日期" prop="workOrderProductDate" >
<el-date-picker
v-model="addform.workOrderProductDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择生产日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="物料码" prop="productCode" >
<el-input v-model="addform.productCode" >
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="产品描述" prop="productName" >
<el-input v-model="addform.productName" >
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="工序" prop="childprocessName" >
<el-select v-model="addform.childprocessName" single placeholder="请选择工序">
<el-option
v-for="item in childprocessNameOptions"
:key="item.picId"
:label="item.childprocessName"
:value="item.childprocessCode"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="产线编码" prop="workorderName" >
<el-input v-model="addform.workorderName" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="岗位">
<el-select v-model="addform.post" multiple placeholder="请选择岗位">
<el-option
v-for="item in postOptions"
:key="item.postId"
:label="item.postName"
:value="item.postId"
:disabled="item.status == 1"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="工号" prop="userName" >
<el-input v-model="addform.userName" @keyup.enter.native="handleQueryUser">
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="员工姓名" prop="nickName" >
<el-input v-model="addform.nickName" >
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="产量" prop="attr1" >
<el-input v-model="addform.attr1" >
<template #suffix>PC</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="工时" prop="attr2" >
<el-input v-model="addform.attr2" >
<template #suffix>小时</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="扣款" prop="kk" >
<el-input v-model="addform.kk" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="保底" prop="bd" >
<el-input v-model="addform.bd" >
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="转岗" prop="zg" >
<el-input v-model="addform.zg" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="返工费用" prop="fg" >
<el-input v-model="addform.fg" >
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="试产" prop="sc" >
<el-input v-model="addform.sc" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="试机" prop="sj" >
<el-input v-model="addform.sj" >
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="特殊费用" prop="tsfy" >
<el-input v-model="addform.tsfy" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="夜班补贴" prop="ybbt" >
<el-input v-model="addform.ybbt" >
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="协产补贴" prop="xcbt" >
<el-input v-model="addform.xcbt" >
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-col :span="24">
<el-form-item label="备注">
<!-- <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>-->
<el-select
v-model="addform.remark"
placeholder="备注"
clearable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.unit_price"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="addsubmitForm"> </el-button>
<el-button @click="addcancel"> </el-button>
</div>
</el-dialog>
<select-order ref="orderselect" :datasourceId="queryParams.datasourceId" @ok="handleQuery" @showAddDialog="showAddDialog" />
</div>
</template>
<script>
// import { ElEditable } from 'element-plus';
import { getToken } from "@/utils/auth";
import { listUnitPriceReport,getReport,updateUnitPriceReport } from "@/api/mes/unitPriceReport";
import { listUnitPriceReport,getReport,updateUnitPriceReport,addUnitPriceReport } from "@/api/mes/unitPriceReport";
import { listUnitPrice } from "@/api/mes/unitPrice";
import { getUserByUserName } from "@/api/system/user";
import selectOrder from "./selectOrder";
export default {
name: "UnitPrice",
name: "UnitPriceReport",
dicts: ['unit_price'],
components: { selectOrder }, //
data() {
return {
//
@ -307,10 +533,15 @@ export default {
total: 0,
// unitPrice
unitPriceList: [],
//
postOptions: [],
childprocessNameOptions: [],
//
title: "",
addtitle: "",
//
open: false,
addopen: false,
value: '',
//
dateRange: [],
@ -319,6 +550,7 @@ export default {
pageNum: 1,
pageSize: 10,
factoryId: null,
datasourceId: undefined,
workorderCodeSap: null,
productCode: null,
productName: null,
@ -333,11 +565,14 @@ export default {
attr4: null,
},
productQueryParams:{
pageNum: 1,
pageSize: 10,
productCode: null,
productName: null,
},
//
form: {},
addform:{},
//
productCodeList: [],
state: '',
@ -346,58 +581,22 @@ export default {
tableData: [],
MesUnitPriceInfo: [],
//
// rules: {
// attr2: [
// { required: true, message: "", trigger: "blur" },
// { validator: validateNumberOrDecimal, trigger: "blur" }
// ],
// attr1: [
// { required: true, message: "", trigger: "blur" },
// { validator: validateNumberOrDecimal, trigger: "blur" }
// ],
// bd: [
// { required: true, message: "", trigger: "blur" },
// { validator: validateNumberOrDecimal, trigger: "blur" }
// ],
// zg: [
// { required: true, message: "", trigger: "blur" },
// { validator: validateNumberOrDecimal, trigger: "blur" }
// ],
// fg: [
// { required: true, message: "", trigger: "blur" },
// { validator: validateNumberOrDecimal, trigger: "blur" }
// ],
// sc: [
// { required: true, message: "", trigger: "blur" },
// { validator: validateNumberOrDecimal, trigger: "blur" }
// ],
// sj: [
// { required: true, message: "", trigger: "blur" },
// { validator: validateNumberOrDecimal, trigger: "blur" }
// ],
// tsfy: [
// { required: true, message: "", trigger: "blur" },
// { validator: validateNumberOrDecimal, trigger: "blur" }
// ],
// ybbt: [
// { required: true, message: "", trigger: "blur" },
// { validator: validateNumberOrDecimal, trigger: "blur" }
// ],
// }
rules: {
userName: [
{ required: true, message: "用户名称不能为空", trigger: "blur" },
],
nickName: [
{ required: true, message: "用户昵称不能为空", trigger: "blur" }
],
childprocessName: [
{ required: true, message: "工序不能为空", trigger: "blur" }
],
}
};
//
// const validateNumberOrDecimal = (rule, value, callback) => {
// const regex = /^(\d+(\.\d{1,2})?)?$/;
// if (!regex.test(value)) {
// callback(new Error(''));
// } else {
// callback();
// }
// };
},
created() {
this.getList();
// this.fetchProcessOptions();
this.getList();
},
methods: {
handleEdit(index, row) {
@ -418,6 +617,14 @@ export default {
this.open = false;
this.reset();
},
addcancel(){
this.addopen = false;
this.addreset();
},
addreset(){
this.addform = {};
this.resetForm("addform");
},
//
reset() {
this.form = {
@ -448,6 +655,15 @@ export default {
this.queryParams.pageNum = 1;
this.getList();
},
handleQueryUser(){
getUserByUserName(this.addform).then(response => {
this.postOptions = response.posts;
this.$set(this.addform, "post", response.postIds);
this.addform.nickName=response.data.nickName;
});
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
@ -460,23 +676,31 @@ export default {
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加计件薪酬信息";
openSelectOrder() {
this.$refs.orderselect.show();
},
/** 修改按钮操作 */
// handleUpdate(row) {
// console.log(row)
// this.reset();
// const picId = row.id || this.ids
// getReport(picId).then(response => {
// this.form = response.data.MesUnitpriceReport;
// this.open = true;
// this.MesUnitPriceInfo=response.data.MesUnitPriceInfo;
// });
// },
/** 新增按钮操作 */
showAddDialog(currentRow) {
this.reset();
//
this.productQueryParams.productCode=currentRow.productCode.slice(7, 18);
this.productQueryParams.lineCode=currentRow.sapCode;
listUnitPrice(this.productQueryParams).then(response => {
this.childprocessNameOptions = response.rows;
// this.$set(this.addform, "post", response.rows);
});
this.addopen = true;
this.addform.workorderCode=currentRow.workorderCode;
this.addform.workorderCodeSap=currentRow.workorderCodeSap;
this.addform.workOrderProductDate=currentRow.productDate;
this.addform.productCode=currentRow.productCode;
this.addform.productName=currentRow.productName;
this.addform.workorderName=currentRow.sapCode;
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
@ -513,6 +737,23 @@ export default {
}
});
},
/** 新增提交按钮 */
addsubmitForm() {
this.$refs["addform"].validate(valid => {
if (valid) {
console.log(this.addform)
const post=this.addform.post[0]
this.addform.post=null;
this.addform.post=post;
addUnitPriceReport(this.addform).then(response => {
this.$modal.msgSuccess("新增成功");
this.addopen = false;
this.addform = {};
this.getList();
})
}
})
},
/** 导出按钮操作 */
handleExport() {
this.download('mes/unitPriceReport/export', {

@ -0,0 +1,158 @@
<template>
<!-- 授权用户 -->
<el-dialog title="选择订单" :visible.sync="visible" width="1200px" top="5vh" append-to-body>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
<el-form-item label="生产日期" prop="productDate">
<el-date-picker
v-model="queryParams.productDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择生产日期">
</el-date-picker>
</el-form-item>
<el-form-item label="产线编码" prop="workorderName">
<el-select clearable v-model="queryParams.workorderName">
<el-option
v-for="item in prodLineList"
:key="item.lineCode"
:label="item.lineName"
:value="item.lineCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="物料编码" prop="productCode">
<el-input
v-model="queryParams.productCode"
placeholder="请输入物料编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row>
<!-- <el-table-->
<!-- ref="singleTable"-->
<!-- :data="userList"-->
<!-- highlight-current-row-->
<!-- @selection-change="handleSelectionChange">-->
<el-table
ref="table"
:data="userList"
highlight-current-row
@current-change="handleCurrentChange"
height="260px">
<el-table-column label="工单号" prop="workorderCode" :show-overflow-tooltip="true" />
<el-table-column label="SAP订单号" prop="workorderCodeSap" :show-overflow-tooltip="true" />
<el-table-column label="产品编码" width="200" prop="productCode" :show-overflow-tooltip="true" />
<el-table-column label="产品名称" width="200" prop="productName" :show-overflow-tooltip="true" />
<el-table-column label="生产日期" prop="productDate" :show-overflow-tooltip="true" />
<el-table-column label="产线" prop="sapName" :show-overflow-tooltip="true" />
<el-table-column label="产线编码" prop="sapCode" :show-overflow-tooltip="true" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleSelectUser"> </el-button>
<el-button @click="visible = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import {
listWorkorderLevel0,
getProdLineList
} from '@/api/plan/workorder'
export default {
dicts: ['sys_normal_disable'],
props: {
//
datasourceId: {
type: [Number, String]
}
},
data() {
return {
//
visible: false,
//
orderId: null,
//
total: 0,
//
userList: [],
prodLineList:[],
currentRow: null,
//
queryParams: {
pageNum: 1,
pageSize: 10,
datasourceId: undefined,
userName: undefined,
phonenumber: undefined,
}
};
},
created() {
getProdLineList().then(response => {
this.prodLineList = response
})
},
methods: {
//
show() {
this.queryParams.datasourceId = this.datasourceId;
this.getList();
this.visible = true;
},
clickRow(row) {
this.$refs.table.toggleRowSelection(row);
},
//
handleCurrentChange(val) {
this.currentRow = val;
},
//
getList() {
this.queryParams.parentOrder= '0';
listWorkorderLevel0(this.queryParams).then(res => {
console.log(res)
this.userList = res.rows;
this.total = res.total;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 选择授权用户操作 */
handleSelectUser() {
this.visible = false;
this.$emit('showAddDialog',this.currentRow); //
}
}
};
</script>

@ -1838,7 +1838,7 @@ export default {
this.$modal.msgError("还未派发请到工单变更进行调整!");
return;
}
this.batchLoading = true;
const workOrdercode = this.codes[0];
@ -1987,8 +1987,17 @@ export default {
/**打印标识卡弹出框**/
printIdCard() {
//var statusesArray = this.statuses;
//for (var i = 0; i < statusesArray.length; i++) {
// if (statusesArray[i] == 'w0') {//
// this.$modal.msgError("");
// return
// }
//}
this.$refs.printID.init(this.selectWork.workorderCode);
this.$refs.printID.printDialogVisible = true;
this.$refs.printID.init("20021221552");
},
//
printIdFunc(obj) {

@ -1,15 +1,18 @@
<template>
<div class="app-container">
<!-- 打印预览弹出层 -->
<el-dialog title="" :visible.sync="printDialogVisible" width="990px">
<div class="app-container">
<el-dialog title="" :visible.sync="printDialogVisible" width="990px">
<div>
<el-input v-model="idCardsNum" placeholder="请输入板次数量" style="width:100px"/>
<el-button type="primary" icon="el-icon-check" circle @click="showPrint()"/>
<el-form inline>
<el-form-item label="补打版次" prop="factory">
<el-input v-model="idCardsNum" placeholder="请输入补打版次" style="width:100px"/>
</el-form-item>
<el-button type="primary" icon="el-icon-check" circle @click="showPrint()"/>
</el-form>
</div>
<div id="printFrom" class="my-print-box">
<div v-for="(item, index) in printData.idCardList" :key="index">
<el-form>
<!-- 表头-工单信息 -->
<div id="printFrom" class="my-print-box">
<div v-for="(item, index) in printData.idCardList" :key="index">
<el-form class="print-card">
<el-row>
<el-col :span="7">
<img src="@/assets/logo/lanjv.png" class="report-logo" />
@ -17,34 +20,34 @@
<el-col :span="10" class="center-text">
<span>产品标识卡</span>
</el-col>
</el-row>
<el-row class="my-print-head">
<el-col><el-divider/></el-col>
</el-row>
<div class="custom-divider"></div>
<el-row class="my-print-foot">
<el-col :offset="1" :span="10">
<div>产品名称:{{ printData.factory }}</div><br/>
<div>批次号:{{ printData.factory }}</div><br/>
<div>生产日期:{{ printData.factory }}</div><br/>
<div>板次:{{ printData.factory }}</div><br/>
<div>数量:{{ printData.factory }}</div>
<div class="card-div1">产品名称: {{ item.productName }}</div><br />
<div class="card-div1">批次号: {{ item.batchCode }}</div><br />
<div class="card-div2">生产日期: {{ item.productDateStr }}</div><br />
<div class="card-div2">板次: {{ item.palletNo }}</div><br />
<div class="card-div2">数量: {{ item.batchQuantity }}</div>
</el-col>
<el-col :offset="1" :span="10">
<canvas ref="qrCanvas"></canvas>
<el-col :offset="1" :span="10">
<canvas :id="'qrcode-' + index" class="qrcode"></canvas>
</el-col>
</el-row>
</el-form>
<div style="clear: both; margin-bottom: 30px;"></div>
<div v-if="(index + 1) % 2 === 0" class="print-page"></div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handlePrint(printData)"> </el-button>
</span>
</el-dialog>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handlePrint(printData)"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
getIdCardList,
@ -57,7 +60,7 @@ export default {
},
data() {
return {
idCardsNum: 1,
idCardsNum: null,
optType: undefined,
//
loading: true,
@ -79,7 +82,8 @@ export default {
ignore: ["no-print"],
workCenter: "暂无数据",
factory: null,
idCardList: []
idCardList: [],
//gridStyle:'border: 1px solid lightgray; margin-bottom: -1px;'
},
workorderCode: '',
//
@ -92,50 +96,52 @@ export default {
};
},
created() {
},
mounted() {
},
methods: {
init(workorderCode){
this.workorderCode = workorderCode;
this.showPrint();
},
// -
handlePrint(params) {
printJS({
printable: params.printable, // 'printFrom', // id
type: params.type || "html",
maxWidth: 1500, //
font_size: "", //
header: params.header, // '',
targetStyles: ["*"],
style: "@page {margin:0 10mm};", // -
ignoreElements: params.ignore || [], // ['no-print']
properties: params.properties || null,
});
printable: params.printable,
type: params.type || 'html',
maxWidth: 1500,
font_size: "", //
header: params.header, // '',
targetStyles: ['*'],
style: `
@page { margin: 30mm 10mm; }
.print-page { page-break-after: always; }
`,
ignoreElements: params.ignore || [],
});
},
// -
showPrint() {
//
//this.printData.workCenter = "";
getIdCardList(this.workorderCode,this.idCardNum).then((response) => {
debugger
//this.reset();
this.printData.idCardList = response.idCards;
// 使 Vue nextTick DOM
this.$nextTick(() => {
//for(var i=0;0<response.idCards.length;i++){
let qrCanvasIndex = "qrCanvas"+0;
const canvas = this.$refs.qrCanvas;
const options = {
width: 350, //
height: 350 //
};
QRCode.toCanvas(canvas,response.idCards[0], options, error => {
if (error) console.error(error);
});
//}
async showPrint() {
console.log('执行了打印预览');
let params = {
};
if(this.idCardsNum!=null){
params.palletNo=this.idCardsNum;
}
let response = await getIdCardList({workorderCode:this.workorderCode,...params});
this.printData.idCardList = response;
this.$nextTick(() => {
this.printData.idCardList.forEach((item, index) => {
const canvas = document.getElementById('qrcode-' + index);
QRCode.toCanvas(canvas, item.palletCode, { width: 350,margin:1 }, function (error) {
if (error) console.error(error);
console.log('success!');
});
});
})
}
},
};
@ -150,6 +156,7 @@ export default {
text-align: left;
font-size: 63px;
font-weight: 800;
color: black;
}
.report-logo {
@ -178,4 +185,34 @@ export default {
.my-print-box{
width:100%
}
.custom-divider {
width: 100%;
height: 1px;
background-color: #a5a4a4 !important;
margin: 20px 0 !important;
-webkit-print-color-adjust: exact;
}
.print-page {
page-break-after: always;
}
@media print {
.custom-divider {
width: 100%;
height: 1px;
background-color: #a5a4a4 !important;
margin: 20px 0 !important;
-webkit-print-color-adjust: exact;
}
}
.card-div1{
font-size: 20px;
font-weight: 600;
padding-top: 14px;
}
.card-div2{
font-size: 22px;
font-weight: 700;
padding-top: 14px;
}
</style>

@ -384,6 +384,11 @@
style="width: 320px"
/>
</el-form-item>
<el-form-item label="标准模板" prop="mvgr5">
<el-input v-model="form.mvgr5" placeholder="请输入建议标准模板" />
</el-form-item>
<el-form-item label="是否启用" prop="activeFlag">
<el-select
v-model="form.activeFlag"
@ -448,22 +453,15 @@
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<!--
<el-form-item label="标准效率" prop="iei">
<el-form-item label="仓库检验周期" prop="warehouseCycle">
<el-input-number
v-model="form.iei"
v-model="form.warehouseCycle"
style="width: 320px"
/>
</el-form-item>
<el-form-item label="标准用人" prop="manStandar">
<el-form-item label="每托盘最大箱数" prop="palletNum">
<el-input-number
v-model="form.manStandar"
style="width: 320px"
/>
</el-form-item>-->
<el-form-item label="仓库检验周期" prop="warehouseCycle">
<el-input-number
v-model="form.warehouseCycle"
v-model="form.palletNum"
style="width: 320px"
/>
</el-form-item>

Loading…
Cancel
Save