diff --git a/src/pages/Middle/Mold/MoldProductionOrder/ComponentDetail.vue b/src/pages/Middle/Mold/MoldProductionOrder/ComponentDetail.vue
index e41495b..8aae5fb 100644
--- a/src/pages/Middle/Mold/MoldProductionOrder/ComponentDetail.vue
+++ b/src/pages/Middle/Mold/MoldProductionOrder/ComponentDetail.vue
@@ -45,15 +45,9 @@
:params="{ data: options_user_type }" formatter='formatEnum'>
-
-
-
-
-
-
-
-
-
+
+
+
@@ -120,11 +114,11 @@
-
-
diff --git a/src/pages/Middle/Mold/MoldProductionOrder/Detail.vue b/src/pages/Middle/Mold/MoldProductionOrder/Detail.vue
index 28be471..ef8c22f 100644
--- a/src/pages/Middle/Mold/MoldProductionOrder/Detail.vue
+++ b/src/pages/Middle/Mold/MoldProductionOrder/Detail.vue
@@ -21,7 +21,7 @@
-
+
@@ -30,8 +30,9 @@
-
-
+
+
@@ -190,7 +191,7 @@ export default {
{ field: 'draw2D_time', dataRule: { type: 'timestamp' }, title: '出2D时间预计', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
{ field: 'draw3D_time', dataRule: { type: 'timestamp' }, title: '出3D时间预计', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
{ field: 'inlay_deep_hole_time', dataRule: { type: 'timestamp' }, title: '镶件深孔钻到厂日期预计', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
- { field: 'horizontal_frame_time', dataRule: { type: 'timestamp' }, title: '横架到厂日期预计', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
+ { field: 'horizontal_frame_time', dataRule: { type: 'timestamp' }, title: '横架到厂日期预计', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
{
field: 'progress', title: '进度', span: 24, itemRender: {
name: 'MkFormProgress', props: {
@@ -311,7 +312,7 @@ export default {
},
- loadCount : 0,
+ loadCount: 0,
};
@@ -344,7 +345,7 @@ export default {
// 函数
methods: {
-
+
loadDepartments() {
this.$mk.post({
@@ -438,7 +439,7 @@ export default {
initComponentDetail() {
- let infos = [];
+ let infos = [];
let keys = [];
this.loadCount++;
this.detailsData.forEach(item => {
@@ -456,18 +457,18 @@ export default {
};
this.detailsData2.forEach(pitem => {
if (pitem.component_id && pitem.component_id.toString() == item.component_id.toString()) {
- if(this.departmentId){
+ if (this.departmentId) {
if (pitem.department_id && pitem.department_id.toString() == this.departmentId) {
info.data.mold_production_order_component_processes.push(pitem);
}
- }else{
+ } else {
info.data.mold_production_order_component_processes.push(pitem);
- }
+ }
}
});
- if(!info.data.mold_production_order_component_processes.length){
+ if (!info.data.mold_production_order_component_processes.length) {
return;
}
@@ -480,7 +481,7 @@ export default {
this.collapseActiveKey = keys;
this.infos = infos
-
+
},
setPageReadonly(readonly) {
@@ -503,61 +504,7 @@ export default {
return XEUtils.toDateString(new Date(v * 1000), 'yyyy-MM-dd');
},
- pageSelectComponent() {
- let { width, height } = this.$mk.getWindowSize();
- this.$mk.dialog.open({
- page: () => import("../MoldComponent/selector"),
- title: "选择部件",
- showFooter: true,
- width: width * 0.9,
- height: height * 0.9,
- callback: ({ data }) => {
- if (!data || !data.row1) {
- this.$mk.error("未选择行");
- return;
- }
- this.$mk.post({
- url: `${BASE_URL.BASE_URL}/MoldComponent/v1/mold/component/detail`,
- data: {
- id: this.$mk.toBigInt(data.row1.id)
- },
- useBigInt: true
- }).then((a) => { // 成功回调
- if (a.data && a.data.mold_component) {
- let row = a.data.mold_component;
- let mold_component_processes = row.mold_component_processes || [];
- let currentAddRows1 = [];
- let currentAddRows2 = [];
- currentAddRows1.push({
- component_id: row.id,
- component_num: 1,
- component_detail: { id: row.id, name: row.name },
- })
- mold_component_processes.forEach(pitem => {
- currentAddRows2.push({
- component_id: row.id,
- process_id: pitem.mes_processes_id,
- process_detail: { id: pitem.mes_processes_id, name: pitem.mes_processes.name },
- })
-
- });
-
- this.addInfo({
- rows1: currentAddRows1,
- rows2: currentAddRows2,
- header: data.row1.name
- })
-
-
-
-
- }
- });
-
- }
- })
- },
clearInfos() {
this.collapseActiveKey = [];
this.infos = [];
@@ -667,7 +614,7 @@ export default {
})
});
-
+
this.clearInfos();
currentAddRows1.forEach(row => {
this.addInfo({
@@ -675,7 +622,7 @@ export default {
rows2: currentAddRows2.filter(a => a.component_id == row.component_id),
header: row.component_detail.name
});
- })
+ })
}
});
@@ -746,7 +693,7 @@ export default {
// 格式化提交的数据
this.$mk.formatFormData({ data: postdata, rules: this.formOptions.items });
-
+
if (postdata.id) {
postdata.id = this.$mk.toBigInt(postdata.id);
}
@@ -797,7 +744,7 @@ export default {
value: postdata.mold_production_order_component_processes
});
}
-
+
// 提交数据
this.$mk.post({
url: action,
@@ -877,7 +824,6 @@ export default {
sendApproved("");
},
-
print() { // 打印
@@ -897,37 +843,155 @@ export default {
}
}
tdata.qrcode = tdata.qr_code;
- tdata.details = JSON.parse(JSON.stringify(this.detailsData2));
- tdata.details.forEach(item => {
- if (item.component_detail && item.component_detail.name) {
- item.component_detail_name = item.component_detail.name;
+ let template = JSON.parse(JSON.stringify(settings.printTemplate));
+ let addedHeight = 0;
+
+
+ let departments = [];
+ this.detailsData2.forEach(item => {
+ if (item.department_detail && item.department_detail.name && !departments.filter(a=>a.id == item.department_detail.id + "").length) {
+ departments.push({
+ id: item.department_detail.id + "",
+ name: item.department_detail.name
+ })
}
- if (item.department_detail && item.department_detail.name) {
- item.department_detail_name = item.department_detail.name;
- }
-
- if (item.process_detail && item.process_detail.name) {
- item.process_detail_name = item.process_detail.name;
- }
-
- if (item.process_uid_detail && item.process_uid_detail.name) {
- item.process_u_name = item.process_uid_detail.name;
- }
-
- item.prepare_process_time = this.getDateValueString(item.prepare_process_time);
- item.plan_complete_time = this.getDateValueString(item.plan_complete_time);
- item.send_time = this.getDateValueString(item.send_time);
- item.complete_time = this.getDateValueString(item.complete_time);
-
})
- tdata.details = tdata.details.filter(a => a.component_detail_name && a.process_detail_name);
- console.log(tdata);
+
+ console.log(JSON.stringify(departments))
+ departments.forEach((department, index) => {
+
+ let details2 = JSON.parse(JSON.stringify(this.detailsData2));
+ let ds2 = [];
+
+ let componentIds = [];
+ details2.forEach(item => {
+ if (item.component_detail && item.component_detail.name) {
+ item.component_detail_name = item.component_detail.name;
+ }
+ if (item.department_detail && item.department_detail.name) {
+ if ((item.department_detail.id + '') != (department.id + '')) {
+ return;
+ }
+ item.department_detail_name = item.department_detail.name;
+ }
+ if (!item.component_id) {
+ return;
+ }
+ if (!componentIds.filter(a => a == item.component_id.toString()).length) {
+ componentIds.push(item.component_id.toString());
+ }
+ if (item.process_detail && item.process_detail.name) {
+ item.process_detail_name = item.process_detail.name;
+ }
+ if (item.process_uid_detail && item.process_uid_detail.name) {
+ item.process_u_name = item.process_uid_detail.name;
+ }
+ item.prepare_process_time = this.getDateValueString(item.prepare_process_time);
+ item.plan_complete_time = this.getDateValueString(item.plan_complete_time);
+ item.send_time = this.getDateValueString(item.send_time);
+ item.complete_time = this.getDateValueString(item.complete_time);
+ item.progress = (item.progress || 0) +"%";
+ ds2.push(item);
+ });
+
+ let groups = []; //按部件进行分组
+ componentIds.forEach(componentId => {
+
+ let group = {};
+ let d1 = [];
+ let d2 = [];
+ let ds1 = JSON.parse(JSON.stringify(this.detailsData));
+ ds1.forEach(item => {
+
+ if (item.component_detail && item.component_detail.name) {
+ item.component_detail_name = item.component_detail.name;
+ }
+ if (item.process_detail && item.process_detail.name) {
+ item.process_detail_name = item.process_detail.name;
+ }
+ item.prepare_process_time = this.getDateValueString(item.prepare_process_time);
+ item.plan_complete_time = this.getDateValueString(item.plan_complete_time);
+ item.send_time = this.getDateValueString(item.send_time);
+ item.complete_time = this.getDateValueString(item.complete_time);
+ item.production_type = item.production_type == 1 ?'正常布产' :'委外布产';
+ if (item.component_id && item.component_id.toString() == componentId) {
+ d1.push(item);
+ }
+
+ })
+ ds2.forEach(item => {
+ if (item.component_id && item.component_id.toString() == componentId) {
+ d2.push(item);
+ }
+ })
+
+
+ group.d1 = d1;
+ group.d2 = d2;
+ groups.push(group);
+
+ })
+
+ let ele2 = JSON.parse(JSON.stringify(settings.printTemplateDepartment));
+ let ele3 = JSON.parse(JSON.stringify(settings.printTemplateProgress));
+ ele2.options.field = 'department_' + index;
+ ele3.options.field = 'progress_' + index;
+ let progress = 0;
+ var dps = this.detailsData3.filter(a => a.id.toString() == department.id.toString());
+ if (dps.length) {
+ progress = dps[0].progress;
+ }
+ tdata['department_' + index] = department.name;
+ tdata['progress_' + index] = progress + "%";
+
+ ele2.options.top += addedHeight;
+ ele3.options.top += addedHeight;
+
+ template.panels[0].printElements.push(ele2)
+ template.panels[0].printElements.push(ele3)
+
+
+ groups.forEach((group, groupIndex) => {
+
+ let key1 = 'details1_' + index + "_" + groupIndex;
+ let key2 = 'details2_' + index + "_" + groupIndex;
+ tdata[key1] = group.d1;
+ tdata[key2] = group.d2;
+
+ let elet1 = JSON.parse(JSON.stringify(settings.printTemplateTable1))
+ let elet2 = JSON.parse(JSON.stringify(settings.printTemplateTable2))
+
+ elet1.options.field = key1;
+ elet2.options.field = key2;
+
+ elet1.options.top += addedHeight;
+ elet2.options.top += addedHeight;
+
+ template.panels[0].printElements.push(elet1)
+ template.panels[0].printElements.push(elet2)
+
+ addedHeight += 80;
+ })
+
+
+ addedHeight += 20;
+
+
+
+ });
+
+
hiprint.init(); // 初始化打印组件
+
+
+
+
+
var hiprintTemplate = new hiprint.PrintTemplate({ // 创建打印模板
- template: settings.printTemplate // 模板内容
+ template: template
});
hiprintTemplate.print(tdata, { printer: '', title: '工艺布产' }); // 打印
},
diff --git a/src/pages/Middle/Mold/MoldProductionOrder/Edit.vue b/src/pages/Middle/Mold/MoldProductionOrder/Edit.vue
index f77fa1c..6008170 100644
--- a/src/pages/Middle/Mold/MoldProductionOrder/Edit.vue
+++ b/src/pages/Middle/Mold/MoldProductionOrder/Edit.vue
@@ -11,8 +11,7 @@
保存
审批
-
- 打印
+
关闭
@@ -185,6 +184,12 @@ export default {
{ field: 'code', title: '编号', span: 8, itemRender: { name: '$input' } },
{ field: 'production_type', dataRule: { type: 'integer' }, title: '布产类型', span: 8, itemRender: { name: '$select', props: { options: options_production_type } } },
+
+
+ { field: 'rubber', title: '胶件材质/缩水', span: 8, itemRender: { name: '$input' } },
+ { field: 'hole', title: '模具穴数', span: 8, itemRender: { name: '$input' } },
+ { field: 'water', title: '入水口类型/位置', span: 8, itemRender: { name: '$input' } },
+
{ field: 'manufacture_cycle', dataRule: { type: 'timestamp' }, title: '制作周期', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
{ field: 'draw_start_time', dataRule: { type: 'timestamp' }, title: '预计开始画图时间', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
@@ -485,7 +490,18 @@ export default {
if (!v) return '';
return XEUtils.toDateString(new Date(v * 1000), 'yyyy-MM-dd');
},
+ existComonent({ component_id }) {
+ let exist = false;
+ this.infos.forEach(info => {
+ info.data.mold_production_order_component.forEach(row => {
+ if (row.component_id.toString() == component_id) {
+ exist = true;
+ }
+ })
+ })
+ return exist;
+ },
pageSelectComponent() {
let { width, height } = this.$mk.getWindowSize();
this.$mk.dialog.open({
@@ -509,6 +525,10 @@ export default {
}).then((a) => { // 成功回调
if (a.data && a.data.mold_component) {
let row = a.data.mold_component;
+ if (this.existComonent({ component_id: row.id.toString() })) {
+ this.$mk.error("该部件已经存在");
+ return;
+ }
let mold_component_processes = row.mold_component_processes || [];
let currentAddRows1 = [];
let currentAddRows2 = [];
@@ -577,7 +597,6 @@ export default {
let detail = data.row2;
- console.log(detail)
this.formOptions.data.mold_detail = detail.mold_scheme;
this.formOptions.data.mold_id = detail.mold_id;
@@ -611,7 +630,7 @@ export default {
this.formOptions.data = JSON.parse(JSON.stringify(this.formOptions.data))
- this.loadMoleData(detail.mold_id);
+ //this.loadMoleData(detail.mold_id);
this.$forceUpdate()
@@ -881,59 +900,7 @@ export default {
},
- print() { // 打印
-
-
-
- let hiprint = this.$hiPrint; // 获取打印组件
- let tdata = JSON.parse(JSON.stringify(this.formOptions.data)); // 复制表单数据
-
- if (tdata.mold_order) {
- tdata.order_code = tdata.mold_order.name || '';
- }
- if (tdata.mold_detail) {
- tdata.mold_name = tdata.mold_detail.name || '';
- }
- for (let name in tdata) {
- if (name.indexOf('_time') != -1 && tdata[name] && tdata[name].indexOf('T') != -1) {
- tdata[name] = tdata[name].split('T')[0];
- }
- }
- tdata.qrcode = tdata.qr_code;
- tdata.details = JSON.parse(JSON.stringify(this.detailsData2));
-
- tdata.details.forEach(item => {
-
- if (item.component_detail && item.component_detail.name) {
- item.component_detail_name = item.component_detail.name;
- }
- if (item.department_detail && item.department_detail.name) {
- item.department_detail_name = item.department_detail.name;
- }
-
- if (item.process_detail && item.process_detail.name) {
- item.process_detail_name = item.process_detail.name;
- }
-
- if (item.process_uid_detail && item.process_uid_detail.name) {
- item.process_u_name = item.process_uid_detail.name;
- }
-
- item.prepare_process_time = this.getDateValueString(item.prepare_process_time);
- item.plan_complete_time = this.getDateValueString(item.plan_complete_time);
- item.send_time = this.getDateValueString(item.send_time);
- item.complete_time = this.getDateValueString(item.complete_time);
-
- })
- tdata.details = tdata.details.filter(a => a.component_detail_name && a.process_detail_name);
- console.log(tdata);
-
- hiprint.init(); // 初始化打印组件
- var hiprintTemplate = new hiprint.PrintTemplate({ // 创建打印模板
- template: settings.printTemplate // 模板内容
- });
- hiprintTemplate.print(tdata, { printer: '', title: '工艺布产' }); // 打印
- },
+
},
// 监听属性
diff --git a/src/pages/Middle/Mold/MoldProductionOrder/List.vue b/src/pages/Middle/Mold/MoldProductionOrder/List.vue
index dc9d8e1..79097e3 100644
--- a/src/pages/Middle/Mold/MoldProductionOrder/List.vue
+++ b/src/pages/Middle/Mold/MoldProductionOrder/List.vue
@@ -1,8 +1,26 @@
-
-
- 查看详情
-
+
+
+ 查看详情
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -17,6 +35,31 @@ export default {
},
data() {
return {
+ columns: [
+
+ {
+ title: '部门名',
+ dataIndex: 'name',
+ key: 'name',
+ },
+ {
+ title: '部门编码',
+ dataIndex: 'code',
+ key: 'code',
+ },
+ {
+ title: '工序数量',
+ dataIndex: 'process_num',
+ key: 'process_num',
+ },
+ {
+ title: '进度',
+ dataIndex: 'progress',
+ key: 'progress',
+ slots: { title: 'progress' },
+ scopedSlots: { customRender: 'progress' },
+ },
+ ],
pageOptions: {}
};
},
@@ -35,7 +78,7 @@ export default {
},
// 动作
methods: {
-
+
optionsInit() {
@@ -58,7 +101,7 @@ export default {
exportFileTitle: "模型",
enabledExport: false,
enabledImport: false,
- enabledImportTemplate: false,
+ enabledImportTemplate: false,
//搜索区
searchFormData: {
@@ -66,14 +109,14 @@ export default {
desc: '',
},
// 搜索区配置
- searchRules: [
+ searchRules: [
{ key: "code", mode: "like" }
],
//搜索区
searchFormItems: [ // 子项
-
- { field: 'code', title: '编码', span: 6, itemRender: { name: '$input', props: { placeholder: '请输入编码' } } },
+
+ { field: 'code', title: '编码', span: 6, itemRender: { name: '$input', props: { placeholder: '请输入编码' } } },
{
align: 'right', span: 4, itemRender: { // 按钮列
@@ -92,17 +135,21 @@ export default {
// 表格列配置
columns: [
- { type: 'checkbox', width: 80 }, // 多选框
- { type: 'seq', width:80 }, // 序号
+ { type: 'checkbox', width: 80 }, // 多选框
+ { type: 'seq', width: 60 }, // 序号
- { title: '操作', slots: { default: 'op' }, width: 120 },
-
- { slots: { default: 'column1' }, title: '查看详情', width: 180 },
- { field:'code', title: '编码', width: 180 },
- { field: 'mold_order',formatter: 'formatRef',params:{dataType:"object",textField:"code"}, sortable: false, title: '订单编号', width: 150 },
- { field: 'mold_detail',formatter: 'formatRef',params:{dataType:"object",textField:"name"}, sortable: false, title: '模具', width: 150 },
- { field: 'progress', cellRender:{name: 'progress'}, sortable: true, title: '进度', showHeaderOverflow: true },
-
+ { title: '操作', slots: { default: 'op' }, width: 90 },
+
+
+
+ { slots: { default: 'column1' }, title: '查看详情', width: 120 },
+ { field: 'code', title: '编码', width: 100 },
+ { field: 'mold_master_user_detail', formatter: 'formatRef', params: { dataType: "object", textField: "name" }, title: '模具师傅', width: 120 },
+ { field: 'mold_order', formatter: 'formatRef', params: { dataType: "object", textField: "code" }, sortable: false, title: '订单编号', width: 120 },
+ { field: 'mold_detail', formatter: 'formatRef', params: { dataType: "object", textField: "name" }, sortable: false, title: '模具', width: 120 },
+ { field: 'progress', width: 100, cellRender: { name: 'progress' }, sortable: true, title: '总进度', showHeaderOverflow: true },
+ // { slots: { default: 'column2' },width: 200, title: '进度明细', showHeaderOverflow: true },
+ { slots: { content: 'column3' }, type: "expand", width: 100, title: '进度明细', showHeaderOverflow: true },
{ field: 'create_time', formatter: 'formatDate', width: 100, sortable: true, title: '创建时间', showHeaderOverflow: true }, // 创建时间
{ field: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, // 更新时间
@@ -113,13 +160,13 @@ export default {
}
};
-
+
pageData.gridOptions = Object.assign({}, this.$mk.config.defaults.gridOptions, pageData.gridOptions); // 合并表格数据
this.pageOptions = pageData;
},
- pageDetail(row){
+ pageDetail(row) {
if (!row) {
this.$mk.msg("请选择行");
diff --git a/src/pages/Middle/Mold/basic/settings.js b/src/pages/Middle/Mold/basic/settings.js
index b3f289b..2fca2fd 100644
--- a/src/pages/Middle/Mold/basic/settings.js
+++ b/src/pages/Middle/Mold/basic/settings.js
@@ -1,11 +1,423 @@
var config = {
- options_production_type: [{ value: null, label: '' },{ value: 1, label: '正常布产' }, { value: 2, label: '委托布产' }],
+ options_production_type: [{ value: null, label: '' }, { value: 1, label: '正常布产' }, { value: 2, label: '委托布产' }],
options_is_complete: [{ value: '0', label: '未完成' }, { value: '1', label: '已完成' }],
options_is_send: [{ value: '0', label: '未发料' }, { value: '1', label: '已发料' }],
- options_user_type: [{ value: null, label: '' },{ value: 1, label: '管理员' }, { value: 2, label: '员工' }, { value: 3, label: '触控屏' }],
+ options_user_type: [{ value: null, label: '' }, { value: 1, label: '管理员' }, { value: 2, label: '员工' }, { value: 3, label: '触控屏' }],
+
+ printTemplate: {"panels":[{"index":0,"name":1,"height":296.6,"width":210,"paperHeader":108,"paperFooter":810,"printElements":[{"options":{"left":520.5,"top":3,"height":70,"width":70,"field":"qrcode","fontSize":15,"fontWeight":"700","textAlign":"center","hideTitle":true,"title":"qrcode","coordinateSync":false,"widthHeightSync":false,"textType":"qrcode","qrCodeLevel":0,"right":589.75,"bottom":72.25,"vCenter":554.75,"hCenter":37.25},"printElementType":{"title":"qrcode","type":"text"}},{"options":{"left":192,"top":6,"height":16,"width":211.5,"field":"mold_master_name","fontSize":15,"textAlign":"left","hideTitle":false,"title":"模具师傅"},"printElementType":{"title":"模具师傅","type":"text"}},{"options":{"left":355.5,"top":6,"height":16,"width":172.5,"field":"progress","fontSize":15,"textAlign":"left","hideTitle":false,"title":"进度","right":567,"bottom":22,"vCenter":480.75,"hCenter":14},"printElementType":{"title":"进度","type":"text"}},{"options":{"left":3,"top":7.5,"height":16,"width":198,"field":"code","fontSize":15,"title":"编号","right":164.25,"bottom":26.5,"vCenter":84.75,"hCenter":18.5,"coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"编号","type":"text"}},{"options":{"left":192,"top":22.5,"height":16,"width":211.5,"field":"mold_name","fontSize":15,"title":"模具","coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0,"right":479.25,"bottom":37,"vCenter":339,"hCenter":29},"printElementType":{"title":"模具","type":"text"}},{"options":{"left":354,"top":22.5,"height":16,"width":174,"field":"draw2D_time","fontSize":15,"title":"出2D时间","right":576,"bottom":39.25,"vCenter":494.25,"hCenter":31.25,"coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"出2D时间","type":"text"}},{"options":{"left":3,"top":24,"height":16,"width":198,"field":"order_code","fontSize":15,"title":"订单","right":162,"bottom":26.5,"vCenter":84,"hCenter":18.5,"coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"订单编号","type":"text"}},{"options":{"left":352.5,"top":39,"height":16,"width":175.5,"field":"draw_start_time","fontSize":15,"title":"画图时间","right":520.5,"bottom":55,"vCenter":435.75,"hCenter":47,"coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"画图时间","type":"text"}},{"options":{"left":192,"top":40.5,"height":16,"width":210,"field":"draw_time","fontSize":15,"title":"出图时间","right":336,"bottom":54.25,"vCenter":237,"hCenter":46.25,"coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"出图时间","type":"text"}},{"options":{"left":0,"top":42,"height":16,"width":201,"field":"split_design_time","fontSize":15,"title":"分模设计时间","right":553.5,"bottom":43,"vCenter":393.75,"hCenter":35,"coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"分模设计时间","type":"text"}},{"options":{"left":192,"top":57,"height":16,"width":210,"field":"hole","fontSize":15,"textAlign":"left","hideTitle":false,"title":"模具穴数","right":402.75,"bottom":73,"vCenter":297.75,"hCenter":65},"printElementType":{"title":"模具穴数","type":"text"}},{"options":{"left":3,"top":55.5,"height":16,"width":198,"field":"rubber","fontSize":15,"textAlign":"left","hideTitle":false,"title":"胶件材质/缩水","right":200.25,"bottom":91.75,"vCenter":101.25,"hCenter":83.75},"printElementType":{"title":"胶件材质/缩水","type":"text"}},{"options":{"left":3,"top":72,"height":16,"width":189,"field":"inlay_deep_hole_time","fontSize":15,"title":"镶件深孔钻到厂","right":410.25,"bottom":90.25,"vCenter":206.25,"hCenter":82.25,"coordinateSync":false,"widthHeightSync":false,"qrCodeLevel":0},"printElementType":{"title":"镶件深孔钻到厂","type":"text"}},{"options":{"left":192,"top":72,"height":16,"width":208.5,"field":"water","fontSize":15,"textAlign":"left","hideTitle":false,"title":"入水口类型/位置","right":356.25,"bottom":88,"vCenter":268.5,"hCenter":80},"printElementType":{"title":"入水口类型/位置","type":"text"}},{"options":{"left":3,"top":91.5,"height":16,"width":523.5,"field":"problem","fontSize":15,"textAlign":"left","hideTitle":false,"title":"出现问题及建议反馈","right":388.5,"bottom":107.5,"vCenter":196.5,"hCenter":99.5},"printElementType":{"title":"出现问题及建议反馈","type":"text"}}],"paperNumberLeft":567,"paperNumberTop":816,"watermarkOptions":{"content":"","rotate":25,"timestamp":false,"format":"YYYY-MM-DD HH:mm"}}]},
+
+ printTemplateTable1: {
+ "options": {
+ "left": 7.5,
+ "top": 135,
+ "height": 39,
+ "width": 577.5,
+ "tableFooterRepeat": "last",
+ "field": "details1",
+ "tableHeaderRepeat": "first",
+ "fields": [{
+ "field": "component_detail_name",
+ "text": "部件"
+ }, {
+ "field": "production_type",
+ "text": "布产类型"
+ }, {
+ "field": "prepare_process_time",
+ "text": "预备加工日期"
+ }, {
+ "field": "plan_complete_time",
+ "text": "计划完成时间"
+ } , {
+ "field": "complete_time",
+ "text": "实际完成时间"
+ }, {
+ "field": "spec",
+ "text": "规格"
+ }, {
+ "field": "surface",
+ "text": "表面工艺"
+ }, {
+ "field": "inlay",
+ "text": "镶件材料"
+ }, {
+ "field": "remark",
+ "text": "备注"
+ }],
+ "right": 576.75,
+ "bottom": 155.25,
+ "vCenter": 291.75,
+ "hCenter": 135.75,
+ "coordinateSync": false,
+ "widthHeightSync": false,
+ "columns": [
+ [{
+ "width": 150,
+ "title": "部件",
+ "field": "component_detail_name",
+ "checked": true,
+ "columnId": "component_detail_name",
+ "fixed": false,
+ "rowspan": 1,
+ "colspan": 1,
+ "align": "center",
+ "tableColumnHeight": 30,
+ "tableTextType": "text",
+ "tableBarcodeMode": "CODE128A",
+ "tableQRCodeLevel": 0
+ }, {
+ "width": 150,
+ "title": "布产类型",
+ "field": "production_type",
+ "checked": true,
+ "columnId": "production_type",
+ "fixed": false,
+ "rowspan": 1,
+ "colspan": 1,
+ "align": "center",
+ "tableColumnHeight": 30,
+ "tableTextType": "text",
+ "tableBarcodeMode": "CODE128A",
+ "tableQRCodeLevel": 0
+ }, {
+ "width": 163.85999999999999,
+ "title": "预备加工日期",
+ "field": "prepare_process_time",
+ "checked": true,
+ "columnId": "prepare_process_time",
+ "fixed": false,
+ "rowspan": 1,
+ "colspan": 1,
+ "align": "center",
+ "tableColumnHeight": 30,
+ "tableTextType": "text",
+ "tableBarcodeMode": "CODE128A",
+ "tableQRCodeLevel": 0
+ }, {
+ "width": 157.05524999999994,
+ "title": "计划完成时间",
+ "field": "plan_complete_time",
+ "checked": true,
+ "columnId": "plan_complete_time",
+ "fixed": false,
+ "rowspan": 1,
+ "colspan": 1,
+ "align": "center",
+ "tableColumnHeight": 30,
+ "tableTextType": "text",
+ "tableBarcodeMode": "CODE128A",
+ "tableQRCodeLevel": 0
+ } , {
+ "width": 150,
+ "title": "完成时间",
+ "field": "complete_time",
+ "checked": true,
+ "columnId": "complete_time",
+ "fixed": false,
+ "rowspan": 1,
+ "colspan": 1,
+ "align": "center",
+ "tableColumnHeight": "30",
+ "tableTextType": "text",
+ "tableBarcodeMode": "CODE128A",
+ "tableQRCodeLevel": 0,
+ "tableSummaryTitle": true,
+ "tableSummary": ""
+ }, {
+ "width": 150,
+ "title": "规格",
+ "field": "spec",
+ "checked": true,
+ "columnId": "spec",
+ "fixed": false,
+ "rowspan": 1,
+ "colspan": 1,
+ "align": "center",
+ "tableColumnHeight": 30,
+ "tableTextType": "text",
+ "tableBarcodeMode": "CODE128A",
+ "tableQRCodeLevel": 0
+ }, {
+ "width": 150,
+ "title": "表面工艺",
+ "field": "surface",
+ "checked": true,
+ "columnId": "surface",
+ "fixed": false,
+ "rowspan": 1,
+ "colspan": 1,
+ "align": "center",
+ "tableColumnHeight": 30,
+ "tableTextType": "text",
+ "tableBarcodeMode": "CODE128A",
+ "tableQRCodeLevel": 0
+ }, {
+ "width": 150,
+ "title": "镶件材料",
+ "field": "inlay",
+ "checked": true,
+ "columnId": "inlay",
+ "fixed": false,
+ "rowspan": 1,
+ "colspan": 1,
+ "align": "center",
+ "tableColumnHeight": 30,
+ "tableTextType": "text",
+ "tableBarcodeMode": "CODE128A",
+ "tableQRCodeLevel": 0
+ }, {
+ "width": 150,
+ "title": "备注",
+ "field": "remark",
+ "checked": true,
+ "columnId": "remark",
+ "fixed": false,
+ "rowspan": 1,
+ "colspan": 1,
+ "align": "center",
+ "tableColumnHeight": 30,
+ "tableTextType": "text",
+ "tableBarcodeMode": "CODE128A",
+ "tableQRCodeLevel": 0
+ }]
+ ]
+ },
+ "printElementType": {
+ "title": "部件列表",
+ "type": "table",
+ "editable": true,
+ "columnDisplayEditable": true,
+ "columnDisplayIndexEditable": true,
+ "columnTitleEditable": true,
+ "columnResizable": true,
+ "columnAlignEditable": true,
+ "isEnableEditField": true,
+ "isEnableContextMenu": true,
+ "isEnableInsertRow": true,
+ "isEnableDeleteRow": true,
+ "isEnableInsertColumn": true,
+ "isEnableDeleteColumn": true,
+ "isEnableMergeCell": true
+ }
+ },
+
+
+ printTemplateTable2: {
+ "options": {
+ "left": 7.5,
+ "top": 171,
+ "height": 36,
+ "width": 577.5,
+ "tableFooterRepeat": "last",
+ "field": "details2",
+ "tableHeaderRepeat": "first",
+ "fields": [{
+ "field": "process_detail_name",
+ "text": "工序"
+ }, {
+ "field": "progress",
+ "text": "进度"
+ }, {
+ "field": "prepare_process_time",
+ "text": "预备加工日期"
+ }, {
+ "field": "plan_complete_time",
+ "text": "计划完成时间"
+ }, {
+ "field": "send_time",
+ "text": "发料时间"
+ }, {
+ "field": "complete_time",
+ "text": "实际完成时间"
+ }, {
+ "field": "remark",
+ "text": "备注"
+ }],
+ "right": 556.75,
+ "bottom": 192.75,
+ "vCenter": 281.75,
+ "hCenter": 174.75,
+ "columns": [
+ [{
+ "width": 150,
+ "title": "工序",
+ "field": "process_detail_name",
+ "checked": true,
+ "columnId": "process_detail_name",
+ "fixed": false,
+ "rowspan": 1,
+ "colspan": 1,
+ "align": "center",
+ "tableColumnHeight": 30,
+ "tableTextType": "text",
+ "tableBarcodeMode": "CODE128A",
+ "tableQRCodeLevel": 0
+ }, {
+ "width": 150,
+ "title": "进度",
+ "field": "progress",
+ "checked": true,
+ "columnId": "progress",
+ "fixed": false,
+ "rowspan": 1,
+ "colspan": 1,
+ "align": "center",
+ "tableColumnHeight": 30,
+ "tableTextType": "text",
+ "tableBarcodeMode": "CODE128A",
+ "tableQRCodeLevel": 0
+ }, {
+ "width": 150,
+ "title": "预备加工日期",
+ "field": "prepare_process_time",
+ "checked": true,
+ "columnId": "prepare_process_time",
+ "fixed": false,
+ "rowspan": 1,
+ "colspan": 1,
+ "align": "center",
+ "tableColumnHeight": 30,
+ "tableTextType": "text",
+ "tableBarcodeMode": "CODE128A",
+ "tableQRCodeLevel": 0
+ }, {
+ "width": 150,
+ "title": "计划完成时间",
+ "field": "plan_complete_time",
+ "checked": true,
+ "columnId": "plan_complete_time",
+ "fixed": false,
+ "rowspan": 1,
+ "colspan": 1,
+ "align": "center",
+ "tableColumnHeight": 30,
+ "tableTextType": "text",
+ "tableBarcodeMode": "CODE128A",
+ "tableQRCodeLevel": 0
+ }, {
+ "width": 150,
+ "title": "发料时间",
+ "field": "send_time",
+ "checked": true,
+ "columnId": "send_time",
+ "fixed": false,
+ "rowspan": 1,
+ "colspan": 1,
+ "align": "center",
+ "tableColumnHeight": 30,
+ "tableTextType": "text",
+ "tableBarcodeMode": "CODE128A",
+ "tableQRCodeLevel": 0
+ }, {
+ "width": 150,
+ "title": "实际完成时间",
+ "field": "complete_time",
+ "checked": true,
+ "columnId": "complete_time",
+ "fixed": false,
+ "rowspan": 1,
+ "colspan": 1,
+ "align": "center",
+ "tableColumnHeight": 30,
+ "tableTextType": "text",
+ "tableBarcodeMode": "CODE128A",
+ "tableQRCodeLevel": 0
+ }, {
+ "width": 150,
+ "title": "备注",
+ "field": "remark",
+ "checked": true,
+ "columnId": "remark",
+ "fixed": false,
+ "rowspan": 1,
+ "colspan": 1,
+ "align": "center",
+ "tableColumnHeight": 30,
+ "tableTextType": "text",
+ "tableBarcodeMode": "CODE128A",
+ "tableQRCodeLevel": 0
+ }]
+ ]
+ },
+ "printElementType": {
+ "title": "工序列表",
+ "type": "table",
+ "editable": true,
+ "columnDisplayEditable": true,
+ "columnDisplayIndexEditable": true,
+ "columnTitleEditable": true,
+ "columnResizable": true,
+ "columnAlignEditable": true,
+ "isEnableEditField": true,
+ "isEnableContextMenu": true,
+ "isEnableInsertRow": true,
+ "isEnableDeleteRow": true,
+ "isEnableInsertColumn": true,
+ "isEnableDeleteColumn": true,
+ "isEnableMergeCell": true
+ }
+ },
+
+ printTemplateDepartment: {
+ "options": {
+ "left": 7.5,
+ "top": 117,
+ "height": 16,
+ "width": 193.5,
+ "field": "department_nameX",
+ "fontSize": 15,
+ "hideTitle": true,
+ "title": "部门X",
+ "right": 186,
+ "bottom": 140.5,
+ "vCenter": 96.75,
+ "hCenter": 132.5,
+ "coordinateSync": false,
+ "widthHeightSync": false,
+ "qrCodeLevel": 0
+ },
+ "printElementType": {
+ "title": "部门X",
+ "type": "text"
+ }
+ },
+ printTemplateProgress: {
+ "options": {
+ "left": 201,
+ "top": 117,
+ "height": 16,
+ "width": 382.5,
+ "field": "progress",
+ "fontSize": 15,
+ "title": "进度",
+ "coordinateSync": false,
+ "widthHeightSync": false,
+ "qrCodeLevel": 0
+ },
+ "printElementType": {
+ "title": "进度X",
+ "type": "text"
+ }
+ },
+ printTemplateProgress2: {
+ "options": {
+ "left": 201,
+ "top": 117 + 100,
+ "height": 16,
+ "width": 382.5,
+ "field": "progress",
+ "fontSize": 15,
+ "title": "进度2",
+ "coordinateSync": false,
+ "widthHeightSync": false,
+ "qrCodeLevel": 0
+ },
+ "printElementType": {
+ "title": "进度X",
+ "type": "text"
+ }
+ },
- printTemplate: { "panels": [{ "index": 0, "name": 1, "height": 296.6, "width": 210, "paperHeader": 97.5, "paperFooter": 810, "printElements": [{ "options": { "left": 3, "top": 25.5, "height": 16, "width": 198, "field": "order_code", "fontSize": 15, "title": "订单", "right": 162, "bottom": 26.5, "vCenter": 84, "hCenter": 18.5, "coordinateSync": false, "widthHeightSync": false, "qrCodeLevel": 0 }, "printElementType": { "title": "订单编号", "type": "text" } }, { "options": { "left": 3, "top": 9, "height": 16, "width": 198, "field": "code", "fontSize": 15, "title": "编号", "right": 164.25, "bottom": 26.5, "vCenter": 84.75, "hCenter": 18.5, "coordinateSync": false, "widthHeightSync": false, "qrCodeLevel": 0 }, "printElementType": { "title": "编号", "type": "text" } }, { "options": { "left": 232.5, "top": 27, "height": 16, "width": 280.5, "field": "mold_name", "fontSize": 15, "title": "模具", "coordinateSync": false, "widthHeightSync": false, "qrCodeLevel": 0, "right": 555, "bottom": 50.5, "vCenter": 453, "hCenter": 42.5 }, "printElementType": { "title": "模具", "type": "text" } }, { "options": { "left": 520.5, "top": 24, "height": 66, "width": 66, "field": "qrcode", "fontSize": 15, "fontWeight": "700", "textAlign": "center", "hideTitle": true, "title": "qrcode", "coordinateSync": false, "widthHeightSync": false, "textType": "qrcode", "qrCodeLevel": 0, "right": 588.75, "bottom": 90, "vCenter": 555.75, "hCenter": 57 }, "printElementType": { "title": "qrcode", "type": "text" } }, { "options": { "left": 4.5, "top": 43.5, "height": 16, "width": 198, "field": "draw_start_time", "fontSize": 15, "title": "画图时间", "right": 126, "bottom": 39.25, "vCenter": 66, "hCenter": 31.25, "coordinateSync": false, "widthHeightSync": false, "qrCodeLevel": 0 }, "printElementType": { "title": "画图时间", "type": "text" } }, { "options": { "left": 234, "top": 45, "height": 16, "width": 279, "field": "split_design_time", "fontSize": 15, "title": "分模设计时间", "right": 553.5, "bottom": 43, "vCenter": 393.75, "hCenter": 35, "coordinateSync": false, "widthHeightSync": false, "qrCodeLevel": 0 }, "printElementType": { "title": "分模设计时间", "type": "text" } }, { "options": { "left": 235.5, "top": 63, "height": 16, "width": 280.5, "field": "draw2D_time", "fontSize": 15, "title": "出2D时间", "right": 517.5, "bottom": 55.75, "vCenter": 377.25, "hCenter": 47.75, "coordinateSync": false, "widthHeightSync": false, "qrCodeLevel": 0 }, "printElementType": { "title": "出2D时间", "type": "text" } }, { "options": { "left": 4.5, "top": 63, "height": 16, "width": 198, "field": "draw_time", "fontSize": 15, "title": "出图时间", "right": 204, "bottom": 61, "vCenter": 105, "hCenter": 53, "coordinateSync": false, "widthHeightSync": false, "qrCodeLevel": 0 }, "printElementType": { "title": "出图时间", "type": "text" } }, { "options": { "left": 4.5, "top": 79.5, "height": 16, "width": 511.5, "field": "inlay_deep_hole_time", "fontSize": 15, "title": "镶件深孔钻到厂", "right": 517.5, "bottom": 79, "vCenter": 261.75, "hCenter": 71, "coordinateSync": false, "widthHeightSync": false, "qrCodeLevel": 0 }, "printElementType": { "title": "镶件深孔钻到厂", "type": "text" } }, { "options": { "left": 6, "top": 103.5, "height": 36, "width": 580.5, "tableFooterRepeat": "last", "field": "details", "tableHeaderRepeat": "first", "fields": [{ "field": "component_detail_name", "text": "部件" }, { "field": "process_detail_name", "text": "工序" }, { "field": "process_u_name", "text": "加工人员" }, { "field": "prepare_process_time", "text": "预备加工日期" }, { "field": "plan_complete_time", "text": "计划完成时间" }, { "field": "send_time", "text": "发料时间" }, { "field": "complete_time", "text": "实际完成时间" }, { "field": "remark", "text": "备注" }], "columns": [[{ "width": 150, "title": "部件", "field": "component_detail_name", "checked": true, "columnId": "component_detail_name", "fixed": false, "rowspan": 1, "colspan": 1, "align": "center", "tableColumnHeight": 30, "tableTextType": "text", "tableBarcodeMode": "CODE128A", "tableQRCodeLevel": 0 }, { "width": 150, "title": "工序", "field": "process_detail_name", "checked": true, "columnId": "process_detail_name", "fixed": false, "rowspan": 1, "colspan": 1, "align": "center", "tableColumnHeight": 30, "tableTextType": "text", "tableBarcodeMode": "CODE128A", "tableQRCodeLevel": 0 }, { "width": 150, "title": "加工人员", "field": "process_u_name", "checked": true, "columnId": "process_u_name", "fixed": false, "rowspan": 1, "colspan": 1, "align": "center", "tableColumnHeight": 30, "tableTextType": "text", "tableBarcodeMode": "CODE128A", "tableQRCodeLevel": 0 }, { "width": 150, "title": "预备加工日期", "field": "prepare_process_time", "checked": true, "columnId": "prepare_process_time", "fixed": false, "rowspan": 1, "colspan": 1, "align": "center", "tableColumnHeight": 30, "tableTextType": "text", "tableBarcodeMode": "CODE128A", "tableQRCodeLevel": 0 }, { "width": 150, "title": "计划完成时间", "field": "plan_complete_time", "checked": true, "columnId": "plan_complete_time", "fixed": false, "rowspan": 1, "colspan": 1, "align": "center", "tableColumnHeight": 30, "tableTextType": "text", "tableBarcodeMode": "CODE128A", "tableQRCodeLevel": 0 }, { "width": 150, "title": "发料时间", "field": "send_time", "checked": true, "columnId": "send_time", "fixed": false, "rowspan": 1, "colspan": 1, "align": "center", "tableColumnHeight": 30, "tableTextType": "text", "tableBarcodeMode": "CODE128A", "tableQRCodeLevel": 0 }, { "width": 150, "title": "实际完成时间", "field": "complete_time", "checked": true, "columnId": "complete_time", "fixed": false, "rowspan": 1, "colspan": 1, "align": "center", "tableColumnHeight": 30, "tableTextType": "text", "tableBarcodeMode": "CODE128A", "tableQRCodeLevel": 0 }, { "width": 150, "title": "备注", "field": "remark", "checked": true, "columnId": "remark", "fixed": false, "rowspan": 1, "colspan": 1, "align": "center", "tableColumnHeight": 30, "tableTextType": "text", "tableBarcodeMode": "CODE128A", "tableQRCodeLevel": 0 }]] }, "printElementType": { "title": "工序列表", "type": "table", "editable": true, "columnDisplayEditable": true, "columnDisplayIndexEditable": true, "columnTitleEditable": true, "columnResizable": true, "columnAlignEditable": true, "isEnableEditField": true, "isEnableContextMenu": true, "isEnableInsertRow": true, "isEnableDeleteRow": true, "isEnableInsertColumn": true, "isEnableDeleteColumn": true, "isEnableMergeCell": true } }], "paperNumberLeft": 571.5, "paperNumberTop": 817.5, "watermarkOptions": { "content": "", "rotate": 25, "timestamp": false, "format": "YYYY-MM-DD HH:mm" } }] }
};