Browse Source

roll label

dev
qiezi 1 year ago
parent
commit
5fa1fa8171
  1. 1
      src/main.js
  2. 30
      src/printFormat/roll_label.js
  3. 1
      src/router/index.js
  4. 32
      src/views/common/collect.vue
  5. 2
      src/views/modules/label/printer.vue
  6. 2
      src/views/modules/label/record.vue
  7. 9
      src/views/modules/part/external.vue

1
src/main.js

@ -10,6 +10,7 @@ import '@/element-ui-theme'
import 'element-ui/lib/theme-chalk/icon.css';
import 'element-ui/lib/theme-chalk/image.css';
import 'element-ui/lib/theme-chalk/message.css';
import 'element-ui/lib/theme-chalk/drawer.css'
// import 'element-ui/lib/theme-chalk/index.css';
import '@/assets/scss/index.scss'
import httpRequest from '@/utils/httpRequest' // api: https://github.com/axios/axios

30
src/printFormat/roll_label.js

@ -18,53 +18,53 @@ export const print_roll_label = (printList,printerName)=>{
LODOP.NewPage();
LODOP.ADD_PRINT_IMAGE(2,-2,"20mm","20mm",`<img src="${row.qrCode}"/>`);
LODOP.SET_PRINT_STYLEA(0,"Stretch",2);
LODOP.ADD_PRINT_IMAGE(4,126,62,12,"<img src=\"data:image/png;base64," + ckpLogo + "\"/>");
LODOP.ADD_PRINT_IMAGE(4,100,62,12,"<img src=\"data:image/png;base64," + ckpLogo + "\"/>");
LODOP.SET_PRINT_STYLEA(0,"Stretch",2);
LODOP.ADD_PRINT_TEXT(17,78,25,20,"REF");
LODOP.ADD_PRINT_TEXT(17,73,25,20,"REF");
LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(27,78,25,20,"QTY");
LODOP.ADD_PRINT_TEXT(27,73,25,20,"QTY");
LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(27,132,25,20,"UOM");
LODOP.ADD_PRINT_TEXT(27,127,25,20,"UOM");
LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(37,78,30,20,"DESC");
LODOP.ADD_PRINT_TEXT(37,73,30,20,"DESC");
LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(17,98,60,20,row.ref);
LODOP.ADD_PRINT_TEXT(17,93,60,20,row.ref);
LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(27,98,35,20,row.qty);
LODOP.ADD_PRINT_TEXT(27,93,35,20,row.qty);
LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(27,150,35,20,row.uom);
LODOP.ADD_PRINT_TEXT(27,145,35,20,row.uom);
LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(37,101,83,35,row.desc);
LODOP.ADD_PRINT_TEXT(37,96,83,35,row.desc);
LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
LODOP.SET_PRINT_STYLEA(0,"Bold",1);
if (row.rollLabelRequired === 'Y'){
LODOP.ADD_PRINT_TEXT(58,78,30,20,"ROLL");
LODOP.ADD_PRINT_TEXT(58,73,30,20,"ROLL");
}else if (row.serialNumberRequired === 'Y'){
LODOP.ADD_PRINT_TEXT(58,78,50,20,"SERIAL");
LODOP.ADD_PRINT_TEXT(58,73,50,20,"SERIAL");
}
if (row.rollLabelRequired === 'Y' || row.serialNumberRequired === 'Y'){
LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
@ -72,20 +72,20 @@ export const print_roll_label = (printList,printerName)=>{
LODOP.SET_PRINT_STYLEA(0,"Bold",1);
}
LODOP.ADD_PRINT_TEXT(66,78,29,15,"DATE");
LODOP.ADD_PRINT_TEXT(66,73,29,15,"DATE");
LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(66,100,85,16,row.date);
LODOP.ADD_PRINT_TEXT(66,95,85,16,row.date);
LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
LODOP.SET_PRINT_STYLEA(0,"Bold",1);
if (row.rollLabelRequired === 'Y'){
LODOP.ADD_PRINT_TEXT(58,100,80,20,row.rollNo);
LODOP.ADD_PRINT_TEXT(58,95,80,20,row.rollNo);
}else if (row.serialNumberRequired === 'Y'){
LODOP.ADD_PRINT_TEXT(58,105,80,20,row.serialNumber);
LODOP.ADD_PRINT_TEXT(58,100,80,20,row.serialNumber);
}
if (row.rollLabelRequired === 'Y' || row.serialNumberRequired === 'Y'){
LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");

1
src/router/index.js

@ -35,6 +35,7 @@ const mainRoutes = {
// 2. iframeUrl: 是否通过iframe嵌套展示内容, '以http[s]://开头': 是, '': 否
// 提示: 如需要通过iframe嵌套展示内容, 但不通过tab打开, 请自行创建组件使用iframe处理!
{ path: '/home', component: _import('common/home'), name: 'home', meta: { title: '首页' } },
{ path: '/collect', component: _import('common/collect'), name: 'collect', meta: { title: '采集' } },
{ path: '/theme', component: _import('common/theme'), name: 'theme', meta: { title: '主题' } },
{ path: '/demo-echarts', component: _import('demo/echarts'), name: 'demo-echarts', meta: { title: 'demo-echarts', isTab: true } },
// { path: '/demo-ueditor', component: _import('demo/ueditor'), name: 'demo-ueditor', meta: { title: 'demo-ueditor', isTab: true } }

32
src/views/common/collect.vue

@ -0,0 +1,32 @@
<script>
export default {
name: 'collect',
data(){
return{
drawer:false
}
},
methods:{
},
computed:{
},
watch:{
},
created () {
},
}
</script>
<template>
<div>
<el-button type="text" @click="drawer=true">筛选</el-button>
</div>
</template>
<style scoped>
</style>

2
src/views/modules/label/printer.vue

@ -680,7 +680,7 @@ export default {
for (let label of labelList) {
let prints = data.rows.map((item) => {
return {
qrCode: `(00)${item.partNo}(01)${item.qtyPerRoll}(02)${item.umName}(03)${item.manufacturerDate}(04)${item.serialNumber? item.serialNumber : ''}(05)${item.manufacturerNo? item.manufacturerNo : ''}(06)${item.moldCode? item.moldCode : ''}(07)(08)`,
qrCode: `(00)${item.partNo}(01)${item.qtyPerCarton}(02)${item.umName}(03)${item.manufacturerDate}(04)${item.serialNumber? item.serialNumber : ''}(05)${item.manufacturerNo? item.manufacturerNo : ''}(06)${item.moldCode? item.moldCode : ''}(07)(08)`,
ref: item.partNo,
productRev: item.rev,
qty: item.qtyPerCarton,

2
src/views/modules/label/record.vue

@ -396,7 +396,7 @@ export default {
printLabel(pictureList,formatList){
let prints = this.selectionPrintLabelRecordList.map((item) => {
return {
qrCode: `(00)${item.partNo}(01)${item.qtyPerRoll}(02)${item.umName}(03)${item.manufacturerDate}(04)${item.serialNumber? item.serialNumber : ''}(05)${item.manufacturerNo? item.manufacturerNo : ''}(06)${item.moldCode? item.moldCode : ''}(07)(08)`,
qrCode: `(00)${item.partNo}(01)${item.qtyPerCarton}(02)${item.umName}(03)${item.manufacturerDate}(04)${item.serialNumber? item.serialNumber : ''}(05)${item.manufacturerNo? item.manufacturerNo : ''}(06)${item.moldCode? item.moldCode : ''}(07)(08)`,
ref: item.partNo,
qty: item.qtyPerCarton,
productRev: item.rev,

9
src/views/modules/part/external.vue

@ -719,6 +719,7 @@ export default {
if (category.showCartonRollsPerCarton === 'N'){
this.savePart.rollsPerCarton = 1;
}
this.partRules.rollsPerCarton[0].message = `Please input ${category.qtyPerRollPart}`
this.savePart.qtyPerCarton = this.qtyPerCarton();
this.category = JSON.parse(JSON.stringify(category))
}
@ -1152,18 +1153,18 @@ export default {
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="7" v-if="category.showRollQtyPerRoll === 'Y' || category.showCartonQtyPerRoll === 'Y'">
<el-form-item :label="category.qtyPerRollLabel" prop="qtyPerRoll" :show-message="false">
<el-col :span="7" v-if="category.rollLabelRequired === 'Y'">
<el-form-item label="Qty Per Roll" prop="qtyPerRoll" :show-message="false">
<el-input-number :step="0" :min="0" :controls="false" :disabled="this.savePart.serialNumberRequired === 'Y'" v-model="savePart.qtyPerRoll"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="7" v-if="category.showCartonRollsPerCarton === 'Y'">
<el-col :span="7" v-if="category.rollLabelRequired === 'Y'">
<el-form-item label="Rolls Per Carton" prop="rollsPerCarton" :show-message="false">
<el-input-number :step="0" :min="0" :controls="false" :disabled="this.savePart.serialNumberRequired === 'Y'" v-model="savePart.rollsPerCarton"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="Qty Per Carton" prop="qtyPerCarton" :show-message="false">
<el-form-item :label="category.qtyPerRollPart" prop="qtyPerCarton" :show-message="false">
<el-input-number :step="0" :min="0" :controls="false" :disabled="category.editQtyPerCarton === 'N'" v-model="savePart.qtyPerCarton"></el-input-number>
</el-form-item>
</el-col>

Loading…
Cancel
Save