fix:打印时原料和其他物料模板区分

This commit is contained in:
shijing 2025-08-19 09:28:08 +08:00
parent 335e6b2e12
commit 780caff788
1 changed files with 8 additions and 3 deletions

View File

@ -393,6 +393,9 @@ export default {
};
},
mounted() {
let url1 = window.location.hash;
this.url_code = url1.split('/')[2];
console.log(this.url_code);
this.checkTemplate = this.checkTemplate+"?t=" + new Date().getTime();
this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code;
this.params.mio = this.mioId;
@ -425,8 +428,9 @@ export default {
//
table_add() {
let that = this;
console.log(this.$refs.table);
console.log(this.$refs.table.tableData);
// console.log(this.$refs.table);
// console.log(this.$refs.table.tableData);
// console.log(that.mioType);
let tableData = this.$refs.table.tableData;
let datas = [];
tableData.forEach(item => {
@ -604,6 +608,7 @@ export default {
//
printMaterial(row,type){
let that = this;
let is_mainso = this.url_code.includes('mainso');
if(that.printer_name!==''&&that.printer_name!==null&&that.printer_name!==undefined){
if(type=='mioitem'){
let params = {};
@ -621,7 +626,7 @@ export default {
}else{
let params = {};
let name = that.printMaterialName.split('|')[0];
params.label_template_name = '单件打印模板';
params.label_template_name = is_mainso?'原料单件打印模板': '单件打印模板';
params.data = {number:row.number,name:name};
that.$API.cm.labeltemplate.commands.req(params).then((res) => {
let obj = {};