模具 喷印
This commit is contained in:
parent
758c0b5a90
commit
d99665588e
|
|
@ -38,7 +38,12 @@
|
||||||
:row-config="{ height: 120 }" :column-config="{ resizable: true }">
|
:row-config="{ height: 120 }" :column-config="{ resizable: true }">
|
||||||
|
|
||||||
|
|
||||||
<vxe-column field="fileName" title="条码编号" width="180"></vxe-column>
|
<vxe-column field="sequance" title="条码编号" width="180"></vxe-column>
|
||||||
|
<vxe-column field="voucherdate" title="单据日期" width="110"></vxe-column>
|
||||||
|
<vxe-column field="vouchercode" title="单据号" width="140"></vxe-column>
|
||||||
|
<vxe-column field="departmentName" title="生产车间" width="120"></vxe-column>
|
||||||
|
<vxe-column field="inventoryName" title="存货名称" width="130"></vxe-column>
|
||||||
|
<vxe-column field="quantity" title="数量" width="80"></vxe-column>
|
||||||
<vxe-column field="print_statistics" title="打印次数" width="100"></vxe-column>
|
<vxe-column field="print_statistics" title="打印次数" width="100"></vxe-column>
|
||||||
<vxe-column title="获取打印统计" width="150">
|
<vxe-column title="获取打印统计" width="150">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
|
|
@ -87,7 +92,7 @@ export default {
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
get: `${BASE_URL.BASE_URL}/InkjetPrinter/v1/inkjet/printer/list`,
|
get: `${BASE_URL.BASE_URL}/InkjetPrinter/v1/inkjet/printer/list`,
|
||||||
getFiles: `http://36.133.149.247:9112/api/tp/getSqList`
|
sequanceData: `http://36.133.149.247:9112/api/tp/getSqList`
|
||||||
},
|
},
|
||||||
searchKey: '',
|
searchKey: '',
|
||||||
currentPrint: null,
|
currentPrint: null,
|
||||||
|
|
@ -128,7 +133,7 @@ export default {
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
this.printInit();
|
this.printInit();
|
||||||
this.filesInit();
|
this.sequanceDataInit();
|
||||||
this.heightInit();
|
this.heightInit();
|
||||||
},
|
},
|
||||||
// 函数
|
// 函数
|
||||||
|
|
@ -136,9 +141,9 @@ export default {
|
||||||
pageSetting(row) {
|
pageSetting(row) {
|
||||||
this.$openPage("/InkjetPrinter/InkjetPrinterSetting/" + row.id); // 打开页面
|
this.$openPage("/InkjetPrinter/InkjetPrinterSetting/" + row.id); // 打开页面
|
||||||
},
|
},
|
||||||
filesInit() {
|
sequanceDataInit() {
|
||||||
this.$mk.post({
|
this.$mk.post({
|
||||||
url: this.actions.getFiles,
|
url: this.actions.sequanceData,
|
||||||
loading: "加载中...",
|
loading: "加载中...",
|
||||||
data: {
|
data: {
|
||||||
key: this.searchKey
|
key: this.searchKey
|
||||||
|
|
@ -149,10 +154,17 @@ export default {
|
||||||
|
|
||||||
let ds = [];
|
let ds = [];
|
||||||
let textList = a.textList || a.data.textList || [];
|
let textList = a.textList || a.data.textList || [];
|
||||||
|
|
||||||
|
|
||||||
textList.forEach(item => {
|
textList.forEach(item => {
|
||||||
ds.push({ fileName: item.sequance, x: 0, y: 0, direction: 0, fontName: 'Arial', fontSize: 100, fontSpacing: 10 })
|
let o = this.getDefaultData(item);
|
||||||
|
if(o.voucherdate){
|
||||||
|
o.voucherdate = o.voucherdate.substr(0,10)
|
||||||
|
}
|
||||||
|
ds.push(o)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ds= JSON.parse(JSON.stringify(ds))
|
||||||
this.detailsData = ds;
|
this.detailsData = ds;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -163,10 +175,15 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getDefaultData(item){
|
||||||
|
return Object.assign(item, {x: 0, y: 0, direction: 0, fontName: 'Arial', fontSize: 100, fontSpacing: 10 });
|
||||||
|
},
|
||||||
|
|
||||||
pageAdd() {
|
pageAdd() {
|
||||||
|
|
||||||
|
|
||||||
this.detailsData = [...this.detailsData, { fileName: this.searchKey, x: 0, y: 0, direction: 0, fontName: 'Arial', fontSize: 100, fontSpacing: 10 }];
|
this.detailsData = [...this.detailsData, this.getDefaultData({sequance:this.searchKey})];
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -289,7 +306,14 @@ export default {
|
||||||
delete sendData._X_ROW_KEY;
|
delete sendData._X_ROW_KEY;
|
||||||
delete sendData.print_statistics;
|
delete sendData.print_statistics;
|
||||||
sendData.id = this.$mk.toBigInt(this.currentPrint.id);
|
sendData.id = this.$mk.toBigInt(this.currentPrint.id);
|
||||||
sendData.contents = sendData.fileName;
|
sendData.contents = sendData.sequance;
|
||||||
|
sendData.fileName = "";
|
||||||
|
delete sendData.sequance
|
||||||
|
delete sendData.voucherdate
|
||||||
|
delete sendData.vouchercode
|
||||||
|
delete sendData.inventoryName
|
||||||
|
delete sendData.quantity
|
||||||
|
delete sendData.departmentName
|
||||||
this.$mk.post({
|
this.$mk.post({
|
||||||
url: `${BASE_URL.BASE_URL}/InkjetPrinter/v1/send/print/file`,
|
url: `${BASE_URL.BASE_URL}/InkjetPrinter/v1/send/print/file`,
|
||||||
loading: "发送文件中...",
|
loading: "发送文件中...",
|
||||||
|
|
|
||||||
|
|
@ -431,6 +431,8 @@ export default {
|
||||||
this.deletedDetailsData.push(this.$mk.toBigInt(row.id))
|
this.deletedDetailsData.push(this.$mk.toBigInt(row.id))
|
||||||
}
|
}
|
||||||
this.detailsData.splice($table.getRowSeq(row) - 1, 1);
|
this.detailsData.splice($table.getRowSeq(row) - 1, 1);
|
||||||
|
|
||||||
|
this.postDataUpdate();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -457,6 +459,7 @@ export default {
|
||||||
}
|
}
|
||||||
this.detailsData2.splice($table.getRowSeq(row) - 1, 1);
|
this.detailsData2.splice($table.getRowSeq(row) - 1, 1);
|
||||||
|
|
||||||
|
this.postDataUpdate();
|
||||||
},
|
},
|
||||||
|
|
||||||
postDataUpdate(){
|
postDataUpdate(){
|
||||||
|
|
|
||||||
|
|
@ -466,16 +466,11 @@ export default {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
let key = this.infos.length + '';
|
this.addInfo({
|
||||||
let info = {
|
rows1: currentAddRows1,
|
||||||
key: key, data: {
|
rows2: currentAddRows2,
|
||||||
mold_production_order_component: currentAddRows1,
|
|
||||||
mold_production_order_component_processes: currentAddRows2
|
|
||||||
},
|
|
||||||
header: data.row1.name
|
header: data.row1.name
|
||||||
};
|
})
|
||||||
this.collapseActiveKey = [...this.collapseActiveKey, key];
|
|
||||||
this.infos = [...this.infos, info];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -486,6 +481,22 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
clearInfos() {
|
||||||
|
this.collapseActiveKey = [];
|
||||||
|
this.infos = [];
|
||||||
|
},
|
||||||
|
addInfo({ rows1, rows2, header }) {
|
||||||
|
let key = this.infos.length + '';
|
||||||
|
let info = {
|
||||||
|
key: key, data: {
|
||||||
|
mold_production_order_component: rows1,
|
||||||
|
mold_production_order_component_processes: rows2
|
||||||
|
},
|
||||||
|
header: header
|
||||||
|
};
|
||||||
|
this.collapseActiveKey = [...this.collapseActiveKey, key];
|
||||||
|
this.infos = [...this.infos, info];
|
||||||
|
},
|
||||||
pageSelectOrder() {
|
pageSelectOrder() {
|
||||||
let { width, height } = this.$mk.getWindowSize();
|
let { width, height } = this.$mk.getWindowSize();
|
||||||
this.$mk.dialog.open({
|
this.$mk.dialog.open({
|
||||||
|
|
@ -535,10 +546,63 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
this.formOptions.data = JSON.parse(JSON.stringify(this.formOptions.data))
|
this.formOptions.data = JSON.parse(JSON.stringify(this.formOptions.data))
|
||||||
|
|
||||||
|
|
||||||
|
//this.loadMoleData(detail.mold_id);
|
||||||
|
|
||||||
|
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
loadMoleData(mold_id) {
|
||||||
|
this.$mk.post({
|
||||||
|
url: `${BASE_URL.BASE_URL}/MoldScheme/v1/mold/scheme/detail`,
|
||||||
|
data: {
|
||||||
|
id: this.$mk.toBigInt(mold_id)
|
||||||
|
},
|
||||||
|
useBigInt: true
|
||||||
|
}).then((a) => { // 成功回调
|
||||||
|
if (a.data && a.data.mold_scheme) {
|
||||||
|
|
||||||
|
|
||||||
|
let row = a.data.mold_scheme;
|
||||||
|
let mold_scheme_processes = row.mold_scheme_processes || [];
|
||||||
|
let currentAddRows1 = [];
|
||||||
|
let currentAddRows2 = [];
|
||||||
|
|
||||||
|
mold_scheme_processes.forEach(pitem => {
|
||||||
|
|
||||||
|
if (!currentAddRows1.filter(a => a.component_id == pitem.component_id.toString()).length) {
|
||||||
|
currentAddRows1.push({
|
||||||
|
component_id: pitem.component_id.toString(),
|
||||||
|
component_num: 1,
|
||||||
|
component_detail: { id: row.id, name: row.name },
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
currentAddRows2.push({
|
||||||
|
component_id: pitem.component_id.toString(),
|
||||||
|
process_id: pitem.mes_processes_id,
|
||||||
|
process_detail: { id: pitem.mes_processes_id, name: pitem.mes_processes.name },
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
this.clearInfos();
|
||||||
|
currentAddRows1.forEach(row => {
|
||||||
|
this.addInfo({
|
||||||
|
rows1: [row],
|
||||||
|
rows2: currentAddRows2.filter(a => a.component_id == row.component_id),
|
||||||
|
header: row.component_detail.name
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
heightInit() {
|
heightInit() {
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
</vxe-form>
|
</vxe-form>
|
||||||
|
|
||||||
|
|
||||||
<vxe-table border show-overflow keep-source ref="xTable" :height="table1Height" :data="detailsData"
|
<vxe-table border show-overflow keep-source ref="xTable" :data="detailsData"
|
||||||
@pulldownSelected="onPulldownSelected" @popupSelected="onPopupSelected" :export-config="{}"
|
@pulldownSelected="onPulldownSelected" @popupSelected="onPopupSelected" :export-config="{}"
|
||||||
@edit-closed="afterEditEvent" @edit-actived="beforeEditEvent"
|
@edit-closed="afterEditEvent" @edit-actived="beforeEditEvent"
|
||||||
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: beforeEditMethod }">
|
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: beforeEditMethod }">
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
<a-button @click="pageLoadData()" style="margin: 5px;">加载部门工序</a-button>
|
<a-button @click="pageLoadData()" style="margin: 5px;">加载部门工序</a-button>
|
||||||
|
|
||||||
<vxe-table border show-overflow keep-source ref="xTable2" :height="table1Height" :data="detailsData2"
|
<vxe-table border show-overflow keep-source ref="xTable2" :data="detailsData2"
|
||||||
@pulldownSelected="onPulldownSelected" @popupSelected="onPopupSelected" :export-config="{}"
|
@pulldownSelected="onPulldownSelected" @popupSelected="onPopupSelected" :export-config="{}"
|
||||||
@edit-closed="afterEditEvent" @edit-actived="beforeEditEvent"
|
@edit-closed="afterEditEvent" @edit-actived="beforeEditEvent"
|
||||||
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: beforeEditMethod }">
|
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: beforeEditMethod }">
|
||||||
|
|
@ -313,10 +313,10 @@ export default {
|
||||||
|
|
||||||
},
|
},
|
||||||
detailsDataInit() {
|
detailsDataInit() {
|
||||||
for (let i = this.detailsData && this.detailsData.length; i < 10; i++) {
|
for (let i = this.detailsData && this.detailsData.length; i < 1; i++) {
|
||||||
this.detailsData.push({});
|
this.detailsData.push({});
|
||||||
}
|
}
|
||||||
for (let i = this.detailsData2 && this.detailsData2.length; i < 10; i++) {
|
for (let i = this.detailsData2 && this.detailsData2.length; i < 1; i++) {
|
||||||
this.detailsData2.push({});
|
this.detailsData2.push({});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -530,6 +530,10 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pageDelete(row) {
|
pageDelete(row) {
|
||||||
|
if (this.detailsData.length == 1) {
|
||||||
|
this.$mk.success("至少保留一行");
|
||||||
|
return;
|
||||||
|
}
|
||||||
const $table = this.$refs.xTable;
|
const $table = this.$refs.xTable;
|
||||||
if (row.id) {
|
if (row.id) {
|
||||||
this.deletedDetailsData.push(this.$mk.toBigInt(row.id))
|
this.deletedDetailsData.push(this.$mk.toBigInt(row.id))
|
||||||
|
|
@ -549,6 +553,10 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pageDelete2(row) {
|
pageDelete2(row) {
|
||||||
|
if (this.detailsData2.length == 1) {
|
||||||
|
this.$mk.success("至少保留一行");
|
||||||
|
return;
|
||||||
|
}
|
||||||
const $table = this.$refs.xTable2;
|
const $table = this.$refs.xTable2;
|
||||||
if (row.id) {
|
if (row.id) {
|
||||||
this.deletedDetailsData2.push(this.$mk.toBigInt(row.id))
|
this.deletedDetailsData2.push(this.$mk.toBigInt(row.id))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue