fix:工段库存物料标签打印
This commit is contained in:
parent
f3f59c7888
commit
3349982650
|
@ -144,11 +144,11 @@
|
|||
>
|
||||
</scrap-dialog>
|
||||
<showDrawer
|
||||
ref="showDrawer"
|
||||
v-if="visibleDrawer"
|
||||
:wm="wm"
|
||||
@closed="visibleDrawer = false"
|
||||
>
|
||||
ref="showDrawer"
|
||||
v-if="visibleDrawer"
|
||||
:wm="wm"
|
||||
@closed="visibleDrawer = false"
|
||||
>
|
||||
</showDrawer>
|
||||
<save-dialog
|
||||
v-if="dialog.inmRecord"
|
||||
|
@ -160,11 +160,19 @@
|
|||
@success="handleinmSuccess"
|
||||
>
|
||||
</save-dialog>
|
||||
<print-dialog
|
||||
v-if="dialog.print_m"
|
||||
ref="printmaterial"
|
||||
:mId="wmId"
|
||||
:mtype="wmtype"
|
||||
:apiObj="apiObjPrint"
|
||||
></print-dialog>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import { wmState } from "@/utils/enum.js";
|
||||
import materials from "./../mtm/materials.vue";
|
||||
import printDialog from "./../template/printmaterial.vue";
|
||||
import checkDialog from "./check_form.vue";
|
||||
import showDrawer from "./check_drawer.vue";
|
||||
import scrapDialog from "./handover_form.vue";
|
||||
|
@ -181,7 +189,8 @@ export default {
|
|||
materials,
|
||||
checkDialog,
|
||||
showDrawer,
|
||||
scrapDialog
|
||||
scrapDialog,
|
||||
printDialog
|
||||
},
|
||||
name: "wmaterial",
|
||||
data() {
|
||||
|
@ -192,12 +201,14 @@ export default {
|
|||
mgroupx: "",
|
||||
belong_dept:''
|
||||
},
|
||||
wmtype:0,
|
||||
query: {},
|
||||
dialog: {
|
||||
save: false,
|
||||
scrap: false,
|
||||
permission: false,
|
||||
inmRecord:false
|
||||
inmRecord:false,
|
||||
print_m:false
|
||||
},
|
||||
tableData: [],
|
||||
selection: [],
|
||||
|
@ -208,7 +219,10 @@ export default {
|
|||
cate_type:'',
|
||||
process:'',
|
||||
materialType: "wm",
|
||||
materialsVisible:false,
|
||||
visibleDrawer: false,
|
||||
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
||||
wmId:'',
|
||||
printer_name:localStorage.getItem("printer_name")
|
||||
};
|
||||
},
|
||||
|
@ -317,28 +331,12 @@ export default {
|
|||
//打印物料标签
|
||||
printMaterial(row){
|
||||
let that = this;
|
||||
that.$API.cm.labelmat.fromWm.req({tid:row.id}).then((res) => {
|
||||
console.log(res)
|
||||
let code = res.code_label;
|
||||
let str = [
|
||||
"SIZE 40 mm,70 mm",
|
||||
"GAP 7 mm,7 mm",
|
||||
"CLS",
|
||||
"REFERENCE 0,0",
|
||||
'QRCODE 30,400,H,5,A,0,"' +code +'"',
|
||||
"WINTEXT 200,550,28,90,0,0,Simhei," + res.material_name,
|
||||
"WINTEXT 240,550,28,90,0,0,Simhei," + res.batch,
|
||||
];
|
||||
if(res.notok_sign!==null){
|
||||
str.push("WINTEXT 280,550,28,90,0,0,Simhei," +res.notok_sign_name,)
|
||||
}
|
||||
str.push("PRINT 1",)
|
||||
let obj = {};
|
||||
obj.printer_commands = str;
|
||||
obj.printer_name = that.printer_name;
|
||||
this.$API.wpm.prints.req(obj).then((response) => {});
|
||||
that.wmId = row.id;
|
||||
that.wmtype = row.material_.type;
|
||||
that.dialog.print_m = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.printmaterial.open();
|
||||
})
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue