Browse Source

roll label

dev
zelian_wu 2 years ago
parent
commit
20600cc42e
  1. 4
      src/assets/scss/global.scss
  2. 24
      src/printFormat/roll_label.js
  3. 6
      src/utils/LodopFuncs.js
  4. 11
      src/views/modules/label/printer.vue
  5. 2
      src/views/modules/label/record.vue
  6. 3
      src/views/modules/label/roll.vue
  7. 19
      src/views/modules/sys/role.vue
  8. 22
      src/views/modules/sys/user.vue

4
src/assets/scss/global.scss

@ -451,3 +451,7 @@ a:hover{
z-index: 99999 !important;
}
.el-table__fixed-right{
height: 100% !important;
}

24
src/printFormat/roll_label.js

@ -25,32 +25,42 @@ export const print_roll_label = (printList,printerName)=>{
LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(17,132,25,20,"QTY");
LODOP.ADD_PRINT_TEXT(27,78,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,78,30,20,"DESC");
LODOP.ADD_PRINT_TEXT(27,132,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(17,98,40,20,row.ref);
LODOP.ADD_PRINT_TEXT(37,78,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,150,35,20,row.qty);
LODOP.ADD_PRINT_TEXT(17,98,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,101,83,35,row.desc);
LODOP.ADD_PRINT_TEXT(27,98,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(48,78,30,20,"ROLL");
LODOP.ADD_PRINT_TEXT(27,150,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.SET_PRINT_STYLEA(0,"FontName","Arial");
LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(58,78,30,20,"ROLL");
LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
LODOP.SET_PRINT_STYLEA(0,"Bold",1);
@ -66,7 +76,7 @@ export const print_roll_label = (printList,printerName)=>{
LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(48,100,80,20,row.rollNo);
LODOP.ADD_PRINT_TEXT(58,100,80,20,row.rollNo);
LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
LODOP.SET_PRINT_STYLEA(0,"Bold",1);

6
src/utils/LodopFuncs.js

@ -43,7 +43,7 @@ function getLodop() {
if (!LODOP && document.readyState !== 'complete') {
MessageBox.alert('C-Lodop打印控件还没准备好,请稍后再试!')
MessageBox.alert('C-Lodop print control is not ready, please try again later!')
return
@ -55,13 +55,13 @@ function getLodop() {
MessageBox({
title: '温馨提示',
title: 'Information',
type: 'warning',
showCancelButton: true,
message: '您还未安装打印控件,点击确定下载打印控件,安装成功后刷新页面即可进行打印',
message: 'You haven’t install the printing component, you can follow the steps in Manual to complete the installation, then close and reopen the window again, it should be fixed',
callback: res => {

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

@ -547,10 +547,6 @@ export default {
})
},
handlePrint(status){
if (this.labelFormatList.length === 0){
this.$message.warning("There is no maintenance of print label format")
return
}
this.printCurrentPart = JSON.parse(JSON.stringify(this.currentPart))
this.$set(this.printCurrentPart,'cartonCount',1)
this.$set(this.printCurrentPart,'manufacturerNo','')
@ -582,6 +578,10 @@ export default {
}else {
labelList = this.labelFormatList.filter((item)=> item.labelType === 'Shipment Carton')
}
if (labelList.length === 0){
this.$message.warning("There is no maintenance of print label format")
return
}
for (let label of labelList) {
if (!label.defaultPrinterName){
this.$message.warning("The default printer name is not set")
@ -640,7 +640,7 @@ export default {
for (let label of labelList) {
let prints = data.rows.map((item) => {
return {
qrCode: `(00)${item.partNo}(01)${item.qtyPerCarton}(02)${item.umName}(03)${item.manufacturerDate}(04)${item.serialNumber}(05)${item.manufacturerNo}(06)${item.moldCode}(07)${item.boxNo}(08)`,
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)`,
ref: item.partNo,
productRev: item.rev,
qty: item.qtyPerCarton,
@ -855,6 +855,7 @@ export default {
}
print_roll_label(prints,label.defaultPrinterName)
}
this.$message.success(data.msg)
}else {
this.$message.warning(data.msg)
}

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.qtyPerCarton}(02)${item.umName}(03)${item.manufacturerDate}(04)${item.serialNumber}(05)${item.manufacturerNo}(06)${item.moldCode}(07)${item.boxNo}(08)`,
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)`,
ref: item.partNo,
qty: item.qtyPerCarton,
productRev: item.rev,

3
src/views/modules/label/roll.vue

@ -176,7 +176,7 @@ export default {
columnProp: 'cartonCount',
headerAlign: 'center',
align: 'right',
columnLabel: 'Carton Count',
columnLabel: 'Roll Count',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -372,6 +372,7 @@ export default {
}
print_roll_label(arr,printerNameList[j].defaultPrinterName)
}
this.$message.success(data.msg)
}
}else {
this.$message.warning(data.msg)

19
src/views/modules/sys/role.vue

@ -41,14 +41,14 @@
width="150"
:label="buttons.cz||'操作'">
<template slot-scope="scope">
<span v-if="$store.state.user.id === 1">
<a type="text" size="small" @click="addOrUpdateHandle(scope.row.roleId)">{{buttons.edit||'修改'}}</a>
<a type="text" size="small" @click="deleteHandle(scope.row.roleId)">{{buttons.delete|| '删除'}}</a>
</span>
<span v-else>
<template v-if="userId === 1">
<a type="text" size="small" @click="addOrUpdateHandle(scope.row.roleId)">{{buttons.edit||'修改'}}</a>
<a type="text" size="small" @click="deleteHandle(scope.row.roleId)">{{buttons.delete|| '删除'}}</a>
</template>
<template v-else>
<span>{{ buttons.edit || '修改' }}</span>
<span>{{ buttons.delete || '删除' }}</span>
</span>
</template>
</template>
</el-table-column>
</el-table>
@ -83,6 +83,7 @@ import {
export default {
data () {
return {
userId:this.$store.state.user.id,
showAuthCustomerReportFlag: false,
dataForm: {
roleName: ''
@ -212,3 +213,9 @@ import {
}
}
</script>
<style scoped>
.el-table /deep/ .cell{
height: auto;
line-height: 1;
}
</style>

22
src/views/modules/sys/user.vue

@ -29,9 +29,7 @@
v-loading="dataListLoading"
@selection-change="selectionChangeHandle"
highlight-current-row
@current-change="handleCurrentChange"
style="width: 100%;">
@current-change="handleCurrentChange">
<el-table-column
prop="username"
header-align="center"
@ -93,20 +91,14 @@
:label="buttons.cz||'操作'">
<template slot-scope="scope">
<!-- <a type="text" size="small" @click="generateData(scope.row)">{{ buttons.auth || '审核' }}</a>-->
<span v-if="scope.row.username === 'admin'">
<span v-if="$store.state.user.id === 1">
<a type="text" size="small" @click="addOrUpdateHandle(scope.row.userId)">{{ buttons.edit || '修改' }}</a>
<a type="text" size="small" @click="deleteHandle(scope.row.userId)" >{{ buttons.delete || '删除' }}</a>
</span>
<span v-else>
<span>{{ buttons.edit || '修改' }}</span>
<span>{{ buttons.delete || '删除' }}</span>
</span>
</span>
<span v-else>
<template v-if="scope.row.username !== 'admin' || $store.state.user.id === 1">
<a type="text" size="small" @click="addOrUpdateHandle(scope.row.userId)">{{ buttons.edit || '修改' }}</a>
<a type="text" size="small" @click="deleteHandle(scope.row.userId)" >{{ buttons.delete || '删除' }}</a>
</span>
</template>
<template v-else>
<a type="text" size="small">{{ buttons.edit || '修改' }}</a>
<a type="text" size="small">{{ buttons.delete || '删除' }}</a>
</template>
</template>
</el-table-column>
</el-table>

Loading…
Cancel
Save