|
|
@ -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> |
|
|
|
|
|
|
|
|
|