This commit is contained in:
parent
cdf1263d77
commit
dc348d7fec
|
|
@ -4,7 +4,7 @@
|
||||||
<a-col :flex="$mk.config.ui.searchFlex">
|
<a-col :flex="$mk.config.ui.searchFlex">
|
||||||
<!-- 搜索区 -->
|
<!-- 搜索区 -->
|
||||||
<vxe-form :data="options.searchFormData" :items="options.searchFormItems" titleColon @submit="onSearch2()">
|
<vxe-form :data="options.searchFormData" :items="options.searchFormItems" titleColon @submit="onSearch2()">
|
||||||
<template #date="{}">
|
<template #date="{ }">
|
||||||
<a-form-item label="创建时间" :style="{ display: 'inline-block', width: 120 }">
|
<a-form-item label="创建时间" :style="{ display: 'inline-block', width: 120 }">
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(100% - 120px )' }">
|
<a-form-item :style="{ display: 'inline-block', width: 'calc(100% - 120px )' }">
|
||||||
|
|
@ -99,7 +99,7 @@ export default {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
showSheetNameSelector: false, excelSheetName: '', excelSheetNames: [],
|
showSheetNameSelector: false, excelSheetName: '', excelSheetNames: [],
|
||||||
|
|
||||||
bindSearchData: null
|
bindSearchData: null
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -119,7 +119,6 @@ export default {
|
||||||
this.$refs.xGrid.connect(this.$refs.xToolbar) // 将表格和工具栏进行关联
|
this.$refs.xGrid.connect(this.$refs.xToolbar) // 将表格和工具栏进行关联
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
this.options.gridOptions.proxyConfig = { // 配置代理
|
this.options.gridOptions.proxyConfig = { // 配置代理
|
||||||
sort: true, // 启用排序代理,当点击排序时会自动触发 query 行为
|
sort: true, // 启用排序代理,当点击排序时会自动触发 query 行为
|
||||||
filter: true, // 启用筛选代理,当点击筛选时会自动触发 query 行为
|
filter: true, // 启用筛选代理,当点击筛选时会自动触发 query 行为
|
||||||
|
|
@ -138,11 +137,18 @@ export default {
|
||||||
params.order_bys = []; // 排序信息
|
params.order_bys = []; // 排序信息
|
||||||
params.search_rules = _this.getSearchParms(); // 搜索信息
|
params.search_rules = _this.getSearchParms(); // 搜索信息
|
||||||
if (sorts) { // 如果有排序信息
|
if (sorts) { // 如果有排序信息
|
||||||
|
|
||||||
sorts.forEach((v) => { // 遍历排序信息
|
sorts.forEach((v) => { // 遍历排序信息
|
||||||
params.order_bys.push({ // 添加排序信息
|
|
||||||
column: v.property, // 字段名
|
if (this.options.gridOptions.sortInit) {
|
||||||
order: v.order // 排序方式
|
this.options.gridOptions.sortInit({ sort: v, params: params })
|
||||||
})
|
} else {
|
||||||
|
params.order_bys.push({ // 添加排序信息
|
||||||
|
column: v.property, // 字段名
|
||||||
|
order: v.order // 排序方式
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return _this.loadData({ params }); // 返回请求结果
|
return _this.loadData({ params }); // 返回请求结果
|
||||||
|
|
@ -150,6 +156,7 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// 挂载完成
|
// 挂载完成
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
@ -161,9 +168,9 @@ export default {
|
||||||
// 动作
|
// 动作
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
pagePrint(){
|
pagePrint() {
|
||||||
let tableData = JSON.parse(JSON.stringify(this.$refs.xGrid.getTableData().fullData));
|
let tableData = JSON.parse(JSON.stringify(this.$refs.xGrid.getTableData().fullData));
|
||||||
this.$emit("print",{tableData:tableData});
|
this.$emit("print", { tableData: tableData });
|
||||||
|
|
||||||
},
|
},
|
||||||
pageExport() {
|
pageExport() {
|
||||||
|
|
@ -400,12 +407,12 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(e.name == "setting"){
|
else if (e.name == "setting") {
|
||||||
this.openSettingPage();
|
this.openSettingPage();
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
openSettingPage() {
|
openSettingPage() {
|
||||||
this.$mk.dialog.open({
|
this.$mk.dialog.open({
|
||||||
page: () => import("./setting"),
|
page: () => import("./setting"),
|
||||||
title: "配置",
|
title: "配置",
|
||||||
|
|
|
||||||
|
|
@ -155,7 +155,7 @@ export default {
|
||||||
items: [
|
items: [
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '订单', span: 8,
|
title: '订单', span: 6,
|
||||||
field: 'mold_order',
|
field: 'mold_order',
|
||||||
itemRender: {
|
itemRender: {
|
||||||
name: 'MkFormInputShow', props: {
|
name: 'MkFormInputShow', props: {
|
||||||
|
|
@ -167,7 +167,7 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
title: '模具', span: 8,
|
title: '模具', span: 6,
|
||||||
field: 'mold_detail',
|
field: 'mold_detail',
|
||||||
itemRender: {
|
itemRender: {
|
||||||
name: 'MkFormInputShow', props: {
|
name: 'MkFormInputShow', props: {
|
||||||
|
|
@ -179,21 +179,27 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'code', title: '编号', span: 8, itemRender: { name: '$input' } },
|
{ field: 'code', title: '编号', span: 6, itemRender: { name: '$input' } },
|
||||||
|
|
||||||
{ field: 'production_type', dataRule: { type: 'integer' }, title: '布产类型', span: 8, itemRender: { name: '$select', props: { options: options_production_type } } },
|
{ field: 'production_type', dataRule: { type: 'integer' }, title: '布产类型', span: 6, itemRender: { name: '$select', props: { options: options_production_type } } },
|
||||||
|
|
||||||
{ field: 'manufacture_cycle', dataRule: { type: 'timestamp' }, title: '制作周期', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
{ field: 'rubber', title: '胶件材质/缩水', span: 6, itemRender: { name: '$input' } },
|
||||||
{ field: 'draw_start_time', dataRule: { type: 'timestamp' }, title: '预计开始画图时间', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
{ field: 'hole', title: '模具穴数', span: 6, itemRender: { name: '$input' } },
|
||||||
{ field: 'split_design_time', dataRule: { type: 'timestamp' }, title: '分模设计时间预计', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
{ field: 'water', title: '入水口类型/位置', span: 6, itemRender: { name: '$input' } },
|
||||||
{ field: 'draw_time', dataRule: { type: 'timestamp' }, title: '出图时间预计', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
|
||||||
|
|
||||||
{ 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: 'manufacture_cycle', dataRule: { type: 'timestamp' }, title: '制作周期', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||||
{ field: 'inlay_deep_hole_time', dataRule: { type: 'timestamp' }, title: '镶件深孔钻到厂日期预计', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
{ field: 'draw_start_time', dataRule: { type: 'timestamp' }, title: '预计开始画图时间', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||||
{ field: 'horizontal_frame_time', dataRule: { type: 'timestamp' }, title: '横架到厂日期预计', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
{ field: 'split_design_time', dataRule: { type: 'timestamp' }, title: '分模设计时间预计', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||||
|
{ field: 'draw_time', dataRule: { type: 'timestamp' }, title: '出图时间预计', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||||
|
|
||||||
|
{ field: 'draw2D_time', dataRule: { type: 'timestamp' }, title: '出2D时间预计', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||||
|
{ field: 'draw3D_time', dataRule: { type: 'timestamp' }, title: '出3D时间预计', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||||
|
{ field: 'inlay_deep_hole_time', dataRule: { type: 'timestamp' }, title: '镶件深孔钻到厂日期预计', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||||
|
{ field: 'horizontal_frame_time', dataRule: { type: 'timestamp' }, title: '横架到厂日期预计', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||||
|
{ field: 'complete_time', dataRule: { type: 'timestamp' }, title: '要求完成时间', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||||
{
|
{
|
||||||
title: '模具师傅', span: 8,
|
title: '模具师傅', span: 6,
|
||||||
field: 'mold_master_user_detail',
|
field: 'mold_master_user_detail',
|
||||||
dataRule: {
|
dataRule: {
|
||||||
fromField: "id",
|
fromField: "id",
|
||||||
|
|
@ -209,8 +215,9 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{ field: 'customer_name', title: '客户名称', span: 6, itemRender: { name: '$input' } },
|
||||||
{
|
{
|
||||||
field: 'progress', title: '进度', span: 16, itemRender: {
|
field: 'progress', title: '进度', span: 12, itemRender: {
|
||||||
name: 'MkFormProgress', props: {
|
name: 'MkFormProgress', props: {
|
||||||
params: {
|
params: {
|
||||||
type: "line"
|
type: "line"
|
||||||
|
|
@ -356,7 +363,7 @@ export default {
|
||||||
|
|
||||||
this.heightInit();
|
this.heightInit();
|
||||||
|
|
||||||
this.loadDepartments();
|
//this.loadDepartments();
|
||||||
|
|
||||||
},
|
},
|
||||||
// 函数
|
// 函数
|
||||||
|
|
@ -422,6 +429,22 @@ export default {
|
||||||
this.detailsData = JSON.parse(JSON.stringify(a.data[this.detailDataFieldName].mold_production_order_component || []));
|
this.detailsData = JSON.parse(JSON.stringify(a.data[this.detailDataFieldName].mold_production_order_component || []));
|
||||||
this.detailsData2 = JSON.parse(JSON.stringify(a.data[this.detailDataFieldName].mold_production_order_component_processes || []));
|
this.detailsData2 = JSON.parse(JSON.stringify(a.data[this.detailDataFieldName].mold_production_order_component_processes || []));
|
||||||
|
|
||||||
|
|
||||||
|
this.departmentOptions = [{ value: null, label: '全部部门' }];
|
||||||
|
this.detailsData2.forEach(item => {
|
||||||
|
|
||||||
|
if (item.department_detail && item.department_detail.id &&
|
||||||
|
!this.departmentOptions.filter(a => a.value == item.department_detail.id.toString()).length
|
||||||
|
) {
|
||||||
|
this.departmentOptions = [... this.departmentOptions, {
|
||||||
|
value: item.department_detail.id + '',
|
||||||
|
label: item.department_detail.name
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
this.initComponentDetail();
|
this.initComponentDetail();
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -862,7 +885,7 @@ export default {
|
||||||
tdata.qrcode = tdata.qr_code;
|
tdata.qrcode = tdata.qr_code;
|
||||||
|
|
||||||
|
|
||||||
let template = JSON.parse(JSON.stringify(settings.printTemplate));
|
let template = JSON.parse(JSON.stringify(settings.printTemplate));
|
||||||
|
|
||||||
|
|
||||||
let process_id_list = [];
|
let process_id_list = [];
|
||||||
|
|
@ -913,7 +936,7 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
hiprint.init(); // 初始化打印组件
|
hiprint.init(); // 初始化打印组件
|
||||||
|
|
||||||
|
|
||||||
var hiprintTemplate = new hiprint.PrintTemplate({ // 创建打印模板
|
var hiprintTemplate = new hiprint.PrintTemplate({ // 创建打印模板
|
||||||
template: template
|
template: template
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ export default {
|
||||||
items: [
|
items: [
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '订单', span: 8,
|
title: '订单', span: 6,
|
||||||
field: 'mold_order',
|
field: 'mold_order',
|
||||||
itemRender: {
|
itemRender: {
|
||||||
name: 'MkFormInputShow', props: {
|
name: 'MkFormInputShow', props: {
|
||||||
|
|
@ -169,7 +169,7 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
title: '模具', span: 8,
|
title: '模具', span: 6,
|
||||||
field: 'mold_detail',
|
field: 'mold_detail',
|
||||||
itemRender: {
|
itemRender: {
|
||||||
name: 'MkFormInputShow', props: {
|
name: 'MkFormInputShow', props: {
|
||||||
|
|
@ -181,29 +181,29 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'code', title: '编号', span: 8, itemRender: { name: '$input' } },
|
{ field: 'code', title: '编号', span: 6, itemRender: { name: '$input' } },
|
||||||
|
|
||||||
{ field: 'production_type', dataRule: { type: 'integer' }, title: '布产类型', span: 8, itemRender: { name: '$select', props: { options: options_production_type } } },
|
{ field: 'production_type', dataRule: { type: 'integer' }, title: '布产类型', span: 6, itemRender: { name: '$select', props: { options: options_production_type } } },
|
||||||
|
|
||||||
|
|
||||||
{ field: 'rubber', title: '胶件材质/缩水', span: 8, itemRender: { name: '$input' } },
|
{ field: 'rubber', title: '胶件材质/缩水', span: 6, itemRender: { name: '$input' } },
|
||||||
{ field: 'hole', title: '模具穴数', span: 8, itemRender: { name: '$input' } },
|
{ field: 'hole', title: '模具穴数', span: 6, itemRender: { name: '$input' } },
|
||||||
{ field: 'water', title: '入水口类型/位置', span: 8, itemRender: { name: '$input' } },
|
{ field: 'water', title: '入水口类型/位置', span: 6, itemRender: { name: '$input' } },
|
||||||
|
|
||||||
|
|
||||||
{ field: 'manufacture_cycle', dataRule: { type: 'timestamp' }, title: '制作周期', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
{ field: 'manufacture_cycle', dataRule: { type: 'timestamp' }, title: '制作周期', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||||
{ field: 'draw_start_time', dataRule: { type: 'timestamp' }, title: '预计开始画图时间', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
{ field: 'draw_start_time', dataRule: { type: 'timestamp' }, title: '预计开始画图时间', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||||
{ field: 'split_design_time', dataRule: { type: 'timestamp' }, title: '分模设计时间预计', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
{ field: 'split_design_time', dataRule: { type: 'timestamp' }, title: '分模设计时间预计', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||||
{ field: 'draw_time', dataRule: { type: 'timestamp' }, title: '出图时间预计', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
{ field: 'draw_time', dataRule: { type: 'timestamp' }, title: '出图时间预计', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||||
|
|
||||||
{ field: 'draw2D_time', dataRule: { type: 'timestamp' }, title: '出2D时间预计', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
{ field: 'draw2D_time', dataRule: { type: 'timestamp' }, title: '出2D时间预计', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||||
{ field: 'draw3D_time', dataRule: { type: 'timestamp' }, title: '出3D时间预计', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
{ field: 'draw3D_time', dataRule: { type: 'timestamp' }, title: '出3D时间预计', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||||
{ field: 'inlay_deep_hole_time', dataRule: { type: 'timestamp' }, title: '镶件深孔钻到厂日期预计', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
{ field: 'inlay_deep_hole_time', dataRule: { type: 'timestamp' }, title: '镶件深孔钻到厂日期预计', span: 6, 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: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||||
|
|
||||||
|
{ field: 'complete_time', dataRule: { type: 'timestamp' }, title: '要求完成时间', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||||
{
|
{
|
||||||
title: '模具师傅', span: 8,
|
title: '模具师傅', span: 6,
|
||||||
field: 'mold_master_user_detail',
|
field: 'mold_master_user_detail',
|
||||||
dataRule: {
|
dataRule: {
|
||||||
fromField: "id",
|
fromField: "id",
|
||||||
|
|
@ -221,8 +221,10 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ field: 'customer_name', title: '客户名称', span: 6, itemRender: { name: '$input' } },
|
||||||
{
|
{
|
||||||
field: 'progress', title: '进度', span: 16, itemRender: {
|
field: 'progress', title: '进度', span: 12, itemRender: {
|
||||||
name: 'MkFormProgress', props: {
|
name: 'MkFormProgress', props: {
|
||||||
params: {
|
params: {
|
||||||
type: "line"
|
type: "line"
|
||||||
|
|
@ -598,6 +600,7 @@ export default {
|
||||||
|
|
||||||
this.formOptions.data.mold_order = data.row1;
|
this.formOptions.data.mold_order = data.row1;
|
||||||
this.formOptions.data.order_id = data.row1.id;
|
this.formOptions.data.order_id = data.row1.id;
|
||||||
|
this.formOptions.data.customer_name = data.row1.name;
|
||||||
|
|
||||||
let detail = data.row2;
|
let detail = data.row2;
|
||||||
|
|
||||||
|
|
@ -623,9 +626,12 @@ export default {
|
||||||
this.formOptions.data.draw3D_time = this.getDateValue(detail.draw3D_time);
|
this.formOptions.data.draw3D_time = this.getDateValue(detail.draw3D_time);
|
||||||
}
|
}
|
||||||
if (detail.horizontal_frame_time) {
|
if (detail.horizontal_frame_time) {
|
||||||
this.formOptions.data.horizontal_frame_time = this.getDateValue(detail.horizontal_frame_time);
|
this.formOptions.data.horizontal_frame_time = this.getDateValue(detail.horizontal_frame_time);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (detail.complete_time) {
|
||||||
|
this.formOptions.data.complete_time = this.getDateValue(detail.complete_time);
|
||||||
|
}
|
||||||
|
|
||||||
if (detail.mold_master_uid) {
|
if (detail.mold_master_uid) {
|
||||||
this.formOptions.data.mold_master_uid = detail.mold_master_uid;
|
this.formOptions.data.mold_master_uid = detail.mold_master_uid;
|
||||||
this.formOptions.data.mold_master_user_detail = { id: detail.mold_master_user_detail.id, name: detail.mold_master_user_detail.name };
|
this.formOptions.data.mold_master_user_detail = { id: detail.mold_master_user_detail.id, name: detail.mold_master_user_detail.name };
|
||||||
|
|
|
||||||
|
|
@ -5,19 +5,19 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot:column2="{ row }">
|
<template v-slot:column2="{ row }">
|
||||||
<a-table :columns="columns" :data-source="row.department_progress" style="border:1px solid #afafaf">
|
<a-table :columns="columns" :data-source="row.department_progress" style="border:1px solid #afafaf">
|
||||||
<span slot="progress" slot-scope="progress">
|
<span slot="progress" slot-scope="progress">
|
||||||
<a-progress type="line" :percent="progress" />
|
<a-progress type="line" :percent="progress" />
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<template v-slot:column3="{ row }">
|
<template v-slot:column3="{ row }">
|
||||||
<a-table :columns="columns" :data-source="row.department_progress" style="border:1px solid #afafaf;margin: 15px;">
|
<a-table :columns="columns" :data-source="row.department_progress" style="border:1px solid #afafaf;margin: 15px;">
|
||||||
<span slot="progress" slot-scope="progress">
|
<span slot="progress" slot-scope="progress">
|
||||||
<a-progress type="line" :percent="progress" />
|
<a-progress type="line" :percent="progress" />
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -110,14 +110,33 @@ export default {
|
||||||
},
|
},
|
||||||
// 搜索区配置
|
// 搜索区配置
|
||||||
searchRules: [
|
searchRules: [
|
||||||
{ key: "code", mode: "like" }
|
{ key: "code", mode: "like" },
|
||||||
|
{ key: "mold_master_uid", mode: "=" }
|
||||||
],
|
],
|
||||||
//搜索区
|
//搜索区
|
||||||
searchFormItems: [ // 子项
|
searchFormItems: [ // 子项
|
||||||
|
|
||||||
|
|
||||||
{ field: 'code', title: '编码', span: 6, itemRender: { name: '$input', props: { placeholder: '请输入编码' } } },
|
{ field: 'code', title: '编码', span: 6, itemRender: { name: '$input', props: { placeholder: '请输入编码' } } },
|
||||||
|
{ field: 'customer_name', title: '客户名称', span: 6, itemRender: { name: '$input', props: { placeholder: '请输入客户名称' } } },
|
||||||
|
{
|
||||||
|
title: '模具师傅', span: 6,
|
||||||
|
field: 'mold_master_uid',
|
||||||
|
dataRule: {
|
||||||
|
fromField: "id"
|
||||||
|
},
|
||||||
|
itemRender: {
|
||||||
|
name: 'MkFormDataSelector', props: {
|
||||||
|
params: {
|
||||||
|
dataType: "object",
|
||||||
|
valueField: "id",
|
||||||
|
textField: "name",
|
||||||
|
listdataFieldName: 'MesStaff',
|
||||||
|
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
align: 'right', span: 4, itemRender: { // 按钮列
|
align: 'right', span: 4, itemRender: { // 按钮列
|
||||||
name: '$buttons', children: [{ props: { type: 'submit', content: '搜索', status: 'primary' } }, // 搜索按钮
|
name: '$buttons', children: [{ props: { type: 'submit', content: '搜索', status: 'primary' } }, // 搜索按钮
|
||||||
|
|
@ -132,7 +151,14 @@ export default {
|
||||||
height: '100%', // 表格高度 100% 会自动撑满父容器
|
height: '100%', // 表格高度 100% 会自动撑满父容器
|
||||||
stripe: true, // 启用斑马纹
|
stripe: true, // 启用斑马纹
|
||||||
id: 'datagrid_1', // 表格唯一标识
|
id: 'datagrid_1', // 表格唯一标识
|
||||||
|
sortConfig: {
|
||||||
|
defaultSort: {
|
||||||
|
field: 'complete_time',
|
||||||
|
order: 'desc'
|
||||||
|
},
|
||||||
|
trigger: 'cell', // 触发排序的方式
|
||||||
|
remote: true // 是否远程排序
|
||||||
|
},
|
||||||
// 表格列配置
|
// 表格列配置
|
||||||
columns: [
|
columns: [
|
||||||
{ type: 'checkbox', width: 80 }, // 多选框
|
{ type: 'checkbox', width: 80 }, // 多选框
|
||||||
|
|
@ -145,12 +171,14 @@ export default {
|
||||||
{ slots: { default: 'column1' }, title: '查看详情', width: 120 },
|
{ slots: { default: 'column1' }, title: '查看详情', width: 120 },
|
||||||
{ field: 'code', title: '编码', width: 100 },
|
{ field: 'code', title: '编码', width: 100 },
|
||||||
{ field: 'mold_master_user_detail', formatter: 'formatRef', params: { dataType: "object", textField: "name" }, title: '模具师傅', width: 120 },
|
{ 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: 'complete_time', formatter: 'formatDate', width: 130, sortable: true, title: '要求完成时间', showHeaderOverflow: true },
|
||||||
|
|
||||||
|
//{ 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: 'mold_detail', formatter: 'formatRef', params: { dataType: "object", textField: "name" }, sortable: false, title: '模具', width: 120 },
|
||||||
{ slots: { content: 'column3' }, type: "expand", width: 100, title: '进度明细', showHeaderOverflow: true },
|
{ slots: { content: 'column3' }, type: "expand", width: 100, title: '进度明细', showHeaderOverflow: true },
|
||||||
{ field: 'progress_order', minWidth: 150, cellRender: { name: 'progress' }, sortable: true, title: '总进度', showHeaderOverflow: true },
|
{ field: 'progress_order', minWidth: 150, cellRender: { name: 'progress' }, sortable: true, title: '总进度', showHeaderOverflow: true },
|
||||||
// { slots: { default: 'column2' },width: 200, title: '进度明细', showHeaderOverflow: true },
|
// { slots: { default: 'column2' },width: 200, title: '进度明细', showHeaderOverflow: true },
|
||||||
{ field: 'create_time', formatter: 'formatDate', width: 100, sortable: true, title: '创建时间', showHeaderOverflow: true }, // 创建时间
|
{ field: 'create_time', formatter: 'formatDate', width: 130, sortable: true, title: '创建时间', showHeaderOverflow: true }, // 创建时间
|
||||||
|
|
||||||
// =============================== 表格列 自动生成 Start ===============================
|
// =============================== 表格列 自动生成 Start ===============================
|
||||||
|
|
||||||
|
|
@ -162,9 +190,22 @@ export default {
|
||||||
|
|
||||||
pageData.gridOptions = Object.assign({}, this.$mk.config.defaults.gridOptions, pageData.gridOptions); // 合并表格数据
|
pageData.gridOptions = Object.assign({}, this.$mk.config.defaults.gridOptions, pageData.gridOptions); // 合并表格数据
|
||||||
|
|
||||||
|
pageData.gridOptions.sortInit = ({ sort, params }) => {
|
||||||
|
if (sort.property == "progress_order") {
|
||||||
|
params.progress_order = sort.order;
|
||||||
|
} else {
|
||||||
|
params.order_bys = params.order_bys || [];
|
||||||
|
params.order_bys.push({ // 添加排序信息
|
||||||
|
column: sort.property, // 字段名
|
||||||
|
order: sort.order // 排序方式
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.pageOptions = pageData;
|
this.pageOptions = pageData;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
pageDetail(row) {
|
pageDetail(row) {
|
||||||
|
|
||||||
if (!row) {
|
if (!row) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue