Browse Source

24-12-26 标签记录

master
qiezi 1 year ago
parent
commit
a97d218440
  1. 6
      src/views/modules/print/print_package_TCPlabel-NOOREVIEW.js
  2. 83
      src/views/modules/production/bagLabelsTCP.vue
  3. 2
      src/views/modules/production/scanForm.vue

6
src/views/modules/print/print_package_TCPlabel-NOOREVIEW.js

@ -97,7 +97,7 @@ export function printTCPPackageLabelNoPreview(printList) {
LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
LODOP.SET_PRINT_STYLEA(0,"FontSize",12); LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(115,274,99,25,"MFG:"+printData.tcpValue);
LODOP.ADD_PRINT_TEXT(115,274,99,25,"MFG:"+printData.tcpValue+"g");
LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
LODOP.SET_PRINT_STYLEA(0,"FontSize",12); LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
@ -114,8 +114,8 @@ export function printTCPPackageLabelNoPreview(printList) {
} }
// LODOP.PRINT_DESIGN(); // LODOP.PRINT_DESIGN();
LODOP.PREVIEW();
// LODOP.PRINT();
// LODOP.PREVIEW();
LODOP.PRINT();
console.log("操作成功!") console.log("操作成功!")
} }
} }

83
src/views/modules/production/bagLabelsTCP.vue

@ -40,6 +40,7 @@ export default {
scanTime:'', scanTime:'',
scheduleJob:'', scheduleJob:'',
nowTime:'', nowTime:'',
weight:undefined,
} }
}, },
mounted() { mounted() {
@ -59,7 +60,14 @@ export default {
return this.searchData.seqNo; return this.searchData.seqNo;
} }
}, },
watch: {},
watch: {
flag(newVal,oldVal){
if (newVal === false){
this.number = undefined
this.weight = undefined
}
}
},
methods: { methods: {
handleBeforeUnload() { handleBeforeUnload() {
this.closeWeighTPC(); this.closeWeighTPC();
@ -203,7 +211,7 @@ export default {
this.fileTitle = "文件名 (" + 0 + "/" + 0 + ")"; this.fileTitle = "文件名 (" + 0 + "/" + 0 + ")";
this.photoUrl = null; this.photoUrl = null;
// this.scanTime= ''; // this.scanTime= '';
this.closeWeighTPC();
// this.closeWeighTPC();
this.nowTime=''; this.nowTime='';
this.stopSchedule() this.stopSchedule()
}, },
@ -215,6 +223,8 @@ export default {
closeWeighTPC(data).then(({data}) => { closeWeighTPC(data).then(({data}) => {
}) })
this.cleanAll()
this.searchData.seqNo=undefined;
}, },
checkIsPacking() { checkIsPacking() {
let params = { let params = {
@ -242,17 +252,32 @@ export default {
this.soScheduleRouting = {}; this.soScheduleRouting = {};
}) })
}, },
printPackageLabelNoPreview(params) {
if (!params) {
this.$message.warning("参数为空")
printLabel() {
if (!this.soScheduleRouting.site) {
this.$message.warning("请先扫描派工单号")
return
}
this.searchData.flag = 'Y'
this.flag = true
},
printPackageLabelNoPreview() {
let params = {
previousSeqNo: this.soScheduleRouting.previousSeqNo,
site: this.soScheduleRouting.site,
orderNo: this.soScheduleRouting.orderNo
}
if (!this.number || !this.weight){
this.$message.warning("请先输入数量和重量")
return return
} }
params.number = this.number;
// //
getPackagePrintDataList(params).then(({data}) => { getPackagePrintDataList(params).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
data.rows[0].tcpValue=this.weight
printTCPPackageLabelNoPreview(data.rows); printTCPPackageLabelNoPreview(data.rows);
this.searchData.flag = ''; this.searchData.flag = '';
this.flag = false
} else { } else {
this.$message.warning(data.msg) this.$message.warning(data.msg)
} }
@ -336,8 +361,10 @@ export default {
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label=" "> <el-form-item label=" ">
<!-- <el-button type="primary" @click="printLabel">打印标签</el-button>--> <!-- <el-button type="primary" @click="printLabel">打印标签</el-button>-->
<el-button type="primary" @click="linkTPC()">重连设备</el-button>
<!-- <el-button type="primary" @click="linkTPC()">重连设备</el-button>-->
<el-button type="primary" @click="closeWeighTPC()">取消连接</el-button> <el-button type="primary" @click="closeWeighTPC()">取消连接</el-button>
<el-button type="primary" style="width: 120px" @click="printLabel">手工打印零数标签</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="content"> <div class="content">
@ -491,25 +518,29 @@ export default {
</div> </div>
</el-card> </el-card>
</div> </div>
<!-- <el-dialog title="提示" :visible.sync="flag" @open="()=>{-->
<!-- this.$nextTick(()=>{-->
<!-- this.$refs.dialogInput.focus();-->
<!-- })-->
<!-- }" @close="()=>{-->
<!-- this.number = 1-->
<!-- }" width="15vw" top="30vh">-->
<!-- <el-form label-position="top" class="title">-->
<!-- <el-form-item label="零数量">-->
<!-- <el-input-number size="medium" style="width: 100%;text-align: left" :controls="false" ref="dialogInput"-->
<!-- :min="1" v-model="number" @keyup.enter.native="selectBySeqNo"></el-input-number>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <div style="height: 20px;width: 100%"></div>-->
<!-- <div style="text-align: center;margin-bottom: 5px">-->
<!-- <el-button type="primary" @click="printLabelEntity">确定</el-button>-->
<!-- </div>-->
<!-- <div style="height: 5px;width: 100%"></div>-->
<!-- </el-dialog>-->
<el-dialog title="提示" :visible.sync="flag" :close-on-click-modal="false" @open="()=>{
this.$nextTick(()=>{
this.$refs.dialogInput.focus();
})
}" @close="()=>{
this.number = 1
}" width="15vw" top="30vh">
<el-form label-position="top" class="title">
<el-form-item label="零数量">
<el-input-number size="medium" style="width: 100%;text-align: left" :controls="false" ref="dialogInput"
:min="1" v-model="number" @keyup.enter.native="printPackageLabelNoPreview"></el-input-number>
</el-form-item>
<el-form-item label="重量">
<el-input-number size="medium" style="width: 100%;text-align: left" :controls="false" ref="dialogInput"
:min="1" v-model="weight" @keyup.enter.native="printPackageLabelNoPreview"></el-input-number>
</el-form-item>
</el-form>
<div style="height: 20px;width: 100%"></div>
<div style="text-align: center;margin-bottom: 5px">
<el-button type="primary" @click="printPackageLabelNoPreview">确定</el-button>
</div>
<div style="height: 5px;width: 100%"></div>
</el-dialog>
</div> </div>
</template> </template>

2
src/views/modules/production/scanForm.vue

@ -136,7 +136,7 @@ export default {
return; return;
} }
let arr = this.model.label.split(";"); let arr = this.model.label.split(";");
if (arr.length < 5){
if (arr.length < 5){//site;partNo;qty;seqNo;printId
if (!arr[3]){ if (!arr[3]){
this.$message.warning("标签jobNo为空") this.$message.warning("标签jobNo为空")
return; return;

Loading…
Cancel
Save