This commit is contained in:
parent
d294fd4125
commit
dc232af445
|
|
@ -321,9 +321,9 @@ export default {
|
||||||
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
|
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
|
||||||
},
|
},
|
||||||
|
|
||||||
currentRow: null
|
currentRow: null,
|
||||||
|
allProcessingCost: 0,
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
return pageData;
|
return pageData;
|
||||||
|
|
@ -364,6 +364,7 @@ export default {
|
||||||
|
|
||||||
this.postDataUpdate();
|
this.postDataUpdate();
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
isComponentDone() {
|
isComponentDone() {
|
||||||
|
|
@ -681,28 +682,24 @@ export default {
|
||||||
},
|
},
|
||||||
afterEditEvent({column, row}) {
|
afterEditEvent({column, row}) {
|
||||||
console.log(column, row);
|
console.log(column, row);
|
||||||
|
|
||||||
this.postDataUpdate();
|
this.postDataUpdate();
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
afterEditEvent2({column, row}) {
|
afterEditEvent2({column, row}) { // 编辑后事件
|
||||||
console.log(column, row);
|
console.log(column, row);
|
||||||
|
|
||||||
if(column.field == "processing_cost"){
|
if (column.field == "processing_cost") { // 如果编辑的字段是加工成本
|
||||||
|
|
||||||
let processing_cost = 0;
|
let processing_cost = 0; // 加工成本设置为0
|
||||||
this.detailsData2.forEach(item=>{
|
this.detailsData2.forEach(item => { // 遍历所有的行
|
||||||
processing_cost += parseFloat(item.processing_cost || 0);
|
processing_cost += parseFloat(item.processing_cost || 0); // 加上每一行的加工成本
|
||||||
});
|
});
|
||||||
|
this.detailsData.forEach(item => { // 遍历所有的行
|
||||||
this.detailsData.forEach(item=>{
|
item.processing_cost = processing_cost; // 设置每一行的加工成本
|
||||||
|
})
|
||||||
item.processing_cost = processing_cost;
|
this.$forceUpdate();
|
||||||
})
|
|
||||||
|
|
||||||
console.log(processing_cost)
|
|
||||||
this.$forceUpdate();
|
|
||||||
}
|
}
|
||||||
this.postDataUpdate();
|
this.postDataUpdate();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<a-button type="primary" @click="print">打印</a-button>
|
<a-button type="primary" @click="print">打印</a-button>
|
||||||
|
|
||||||
|
|
||||||
<a-button @click="pageUnComplete" v-if="formOptions.data.is_complete">取消完成布产</a-button>
|
<a-button @click="pageUnComplete" v-if="formOptions.data.is_complete">取消完成布产</a-button>
|
||||||
<a-button type="primary" @click="pageComplete" v-else>完成布产</a-button>
|
<a-button type="primary" @click="pageComplete" v-else>完成布产</a-button>
|
||||||
|
|
||||||
<a-button type="primary" @click="pageCopy">改模</a-button>
|
<a-button type="primary" @click="pageCopy">改模</a-button>
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<vxe-form :data="formOptions.data" ref="xForm" :title-width="formOptions.titleWidth"
|
<vxe-form :data="formOptions.data" ref="xForm" :title-width="formOptions.titleWidth"
|
||||||
:title-align="formOptions.titleAlign" :rules="formOptions.rules" :items="formOptions.items" titleColon>
|
:title-align="formOptions.titleAlign" :rules="formOptions.rules" :items="formOptions.items" titleColon>
|
||||||
</vxe-form>
|
</vxe-form>
|
||||||
|
|
||||||
<a-tabs>
|
<a-tabs>
|
||||||
|
|
@ -38,13 +38,12 @@
|
||||||
<a-collapse-panel v-for="info in infos" :key="info.key" :header="info.header">
|
<a-collapse-panel v-for="info in infos" :key="info.key" :header="info.header">
|
||||||
|
|
||||||
<component-detail :readonly="true" :dataId="getDataId()" :itemData="info.data"
|
<component-detail :readonly="true" :dataId="getDataId()" :itemData="info.data"
|
||||||
@reloadData="pageInit"></component-detail>
|
@reloadData="pageInit" @allProcessingCost="allProcessingCost"></component-detail>
|
||||||
|
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
</a-collapse>
|
</a-collapse>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -60,10 +59,14 @@
|
||||||
|
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
总成本:{{ ProcessingCost }}
|
||||||
|
</div>
|
||||||
<h4 style="margin-top: 5px;">出现问题及建议反馈</h4>
|
<h4 style="margin-top: 5px;">出现问题及建议反馈</h4>
|
||||||
<vxe-form :data="formOptions2.data" ref="xForm" :title-width="formOptions2.titleWidth"
|
<vxe-form :data="formOptions2.data" ref="xForm" :title-width="formOptions2.titleWidth"
|
||||||
:title-align="formOptions2.titleAlign" :rules="formOptions2.rules" :items="formOptions2.items" :titleColon="false"
|
:title-align="formOptions2.titleAlign" :rules="formOptions2.rules" :items="formOptions2.items"
|
||||||
vertical>
|
:titleColon="false"
|
||||||
|
vertical>
|
||||||
</vxe-form>
|
</vxe-form>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -80,20 +83,19 @@
|
||||||
import ComponentDetail from './ComponentDetail'
|
import ComponentDetail from './ComponentDetail'
|
||||||
import BASE_URL from '@/services/mes/api.js';
|
import BASE_URL from '@/services/mes/api.js';
|
||||||
|
|
||||||
import XEUtils from 'xe-utils' // 加载xe-utils
|
import XEUtils from 'xe-utils' // 加载xe-utils
|
||||||
const settings = require('../basic/settings.js');
|
const settings = require('../basic/settings.js');
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
name: '',
|
name: '',
|
||||||
components: { ComponentDetail },
|
components: {ComponentDetail},
|
||||||
props: {
|
props: {
|
||||||
pageMode: {
|
pageMode: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "edit"
|
default: "edit"
|
||||||
},
|
},
|
||||||
dataId: {
|
dataId: {}
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -150,13 +152,13 @@ export default {
|
||||||
// 表单校验规则
|
// 表单校验规则
|
||||||
rules: {
|
rules: {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '请输入编号' }
|
{required: true, message: '请输入编号'}
|
||||||
],
|
],
|
||||||
mold_order: [
|
mold_order: [
|
||||||
{ required: true, message: '请选择订单' }
|
{required: true, message: '请选择订单'}
|
||||||
],
|
],
|
||||||
mold_scheme: [
|
mold_scheme: [
|
||||||
{ required: true, message: '请选择模具' }
|
{required: true, message: '请选择模具'}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
// 表单项
|
// 表单项
|
||||||
|
|
@ -187,25 +189,85 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'code', title: '编号', span: 6, itemRender: { name: '$input' } },
|
{field: 'code', title: '编号', span: 6, itemRender: {name: '$input'}},
|
||||||
|
|
||||||
{ field: 'production_type', dataRule: { type: 'integer' }, title: '布产类型', span: 6, 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: 6, itemRender: { name: '$input' } },
|
{field: 'rubber', title: '胶件材质/缩水', span: 6, itemRender: {name: '$input'}},
|
||||||
{ field: 'hole', title: '模具穴数', span: 6, itemRender: { name: '$input' } },
|
{field: 'hole', title: '模具穴数', span: 6, itemRender: {name: '$input'}},
|
||||||
{ field: 'water', title: '入水口类型/位置', span: 6, itemRender: { name: '$input' } },
|
{field: 'water', title: '入水口类型/位置', span: 6, itemRender: {name: '$input'}},
|
||||||
|
|
||||||
|
|
||||||
{ field: 'manufacture_cycle', dataRule: { type: 'timestamp' }, title: '制作周期', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
{
|
||||||
{ field: 'draw_start_time', dataRule: { type: 'timestamp' }, title: '预计开始画图时间', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
field: 'manufacture_cycle',
|
||||||
{ field: 'split_design_time', dataRule: { type: 'timestamp' }, title: '分模设计时间预计', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
dataRule: {type: 'timestamp'},
|
||||||
{ field: 'draw_time', dataRule: { type: 'timestamp' }, title: '出图时间预计', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
title: '制作周期',
|
||||||
|
span: 6,
|
||||||
|
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: 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: 'draw2D_time',
|
||||||
{ field: 'inlay_deep_hole_time', dataRule: { type: 'timestamp' }, title: '镶件深孔钻到厂日期预计', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
dataRule: {type: 'timestamp'},
|
||||||
{ field: 'horizontal_frame_time', dataRule: { type: 'timestamp' }, title: '横架到厂日期预计', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
title: '出2D时间预计',
|
||||||
{ field: 'complete_time', dataRule: { type: 'timestamp' }, title: '要求完成时间', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
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: 6,
|
title: '模具师傅', span: 6,
|
||||||
field: 'mold_master_user_detail',
|
field: 'mold_master_user_detail',
|
||||||
|
|
@ -232,12 +294,11 @@ export default {
|
||||||
},
|
},
|
||||||
itemRender: {
|
itemRender: {
|
||||||
name: 'MkFormInputShow', props: {
|
name: 'MkFormInputShow', props: {
|
||||||
params: {
|
params: {}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'customer_name', title: '客户名称', span: 6, itemRender: { name: '$input' } },
|
{field: 'customer_name', title: '客户名称', span: 6, itemRender: {name: '$input'}},
|
||||||
{
|
{
|
||||||
field: 'progress', title: '进度', span: 6, itemRender: {
|
field: 'progress', title: '进度', span: 6, itemRender: {
|
||||||
name: 'MkFormProgress', props: {
|
name: 'MkFormProgress', props: {
|
||||||
|
|
@ -251,21 +312,19 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
formOptions2: {
|
formOptions2: {
|
||||||
data: {
|
data: {},
|
||||||
},
|
|
||||||
// 标题宽度
|
// 标题宽度
|
||||||
titleWidth: 180,
|
titleWidth: 180,
|
||||||
// 标题对齐方式
|
// 标题对齐方式
|
||||||
titleAlign: 'top',
|
titleAlign: 'top',
|
||||||
|
|
||||||
// 表单校验规则
|
// 表单校验规则
|
||||||
rules: {
|
rules: {},
|
||||||
},
|
|
||||||
// 表单项
|
// 表单项
|
||||||
items: [
|
items: [
|
||||||
|
|
||||||
|
|
||||||
{ showTitle: false, field: 'problem', title: '', span: 24, itemRender: { name: '$textarea', props: {} } },
|
{showTitle: false, field: 'problem', title: '', span: 24, itemRender: {name: '$textarea', props: {}}},
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
@ -275,32 +334,23 @@ export default {
|
||||||
departmentId: null,
|
departmentId: null,
|
||||||
|
|
||||||
// 新增模式表单项
|
// 新增模式表单项
|
||||||
addModeItems: [
|
addModeItems: [],
|
||||||
|
|
||||||
],
|
|
||||||
|
|
||||||
|
|
||||||
table1Height: 400,
|
table1Height: 400,
|
||||||
detailsSourceData: [
|
detailsSourceData: [],
|
||||||
],
|
detailsData: [],
|
||||||
detailsData: [
|
deletedDetailsData: [],
|
||||||
],
|
|
||||||
deletedDetailsData: [
|
|
||||||
|
|
||||||
],
|
detailsData2: [],
|
||||||
|
deletedDetailsData2: [],
|
||||||
detailsData2: [
|
|
||||||
],
|
|
||||||
deletedDetailsData2: [
|
|
||||||
|
|
||||||
],
|
|
||||||
editor_component: {
|
editor_component: {
|
||||||
dataType: "object",
|
dataType: "object",
|
||||||
valueField: "id",
|
valueField: "id",
|
||||||
textField: "name",
|
textField: "name",
|
||||||
listdataFieldName: 'MoldComponent',
|
listdataFieldName: 'MoldComponent',
|
||||||
mapper: [
|
mapper: [
|
||||||
{ fromField: "id", field: "component_id" }
|
{fromField: "id", field: "component_id"}
|
||||||
],
|
],
|
||||||
dataUrl: `${BASE_URL.BASE_URL}/MoldComponent/v1/mold/component/list`
|
dataUrl: `${BASE_URL.BASE_URL}/MoldComponent/v1/mold/component/list`
|
||||||
},
|
},
|
||||||
|
|
@ -310,7 +360,7 @@ export default {
|
||||||
textField: "name",
|
textField: "name",
|
||||||
listdataFieldName: 'BaseDepartment',
|
listdataFieldName: 'BaseDepartment',
|
||||||
mapper: [
|
mapper: [
|
||||||
{ fromField: "id", field: "department_id" }
|
{fromField: "id", field: "department_id"}
|
||||||
],
|
],
|
||||||
dataUrl: `${BASE_URL.BASE_URL}/BaseDepartment/v1/base/department/list`
|
dataUrl: `${BASE_URL.BASE_URL}/BaseDepartment/v1/base/department/list`
|
||||||
},
|
},
|
||||||
|
|
@ -321,7 +371,7 @@ export default {
|
||||||
textField: "name",
|
textField: "name",
|
||||||
listdataFieldName: 'MesProcesses',
|
listdataFieldName: 'MesProcesses',
|
||||||
mapper: [
|
mapper: [
|
||||||
{ fromField: "id", field: "process_id" }
|
{fromField: "id", field: "process_id"}
|
||||||
],
|
],
|
||||||
dataUrl: `${BASE_URL.BASE_URL}/MesProcesses/v1/mes/processes/list`
|
dataUrl: `${BASE_URL.BASE_URL}/MesProcesses/v1/mes/processes/list`
|
||||||
},
|
},
|
||||||
|
|
@ -332,7 +382,7 @@ export default {
|
||||||
textField: "name",
|
textField: "name",
|
||||||
listdataFieldName: 'MesStaff',
|
listdataFieldName: 'MesStaff',
|
||||||
mapper: [
|
mapper: [
|
||||||
{ fromField: "id", field: "process_uid" }
|
{fromField: "id", field: "process_uid"}
|
||||||
],
|
],
|
||||||
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
|
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
|
||||||
},
|
},
|
||||||
|
|
@ -342,7 +392,7 @@ export default {
|
||||||
textField: "name",
|
textField: "name",
|
||||||
listdataFieldName: 'MesStaff',
|
listdataFieldName: 'MesStaff',
|
||||||
mapper: [
|
mapper: [
|
||||||
{ fromField: "id", field: "send_uid" }
|
{fromField: "id", field: "send_uid"}
|
||||||
],
|
],
|
||||||
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
|
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
|
||||||
},
|
},
|
||||||
|
|
@ -352,13 +402,14 @@ export default {
|
||||||
textField: "name",
|
textField: "name",
|
||||||
listdataFieldName: 'MesStaff',
|
listdataFieldName: 'MesStaff',
|
||||||
mapper: [
|
mapper: [
|
||||||
{ fromField: "id", field: "process_uid" }
|
{fromField: "id", field: "process_uid"}
|
||||||
],
|
],
|
||||||
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
|
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
loadCount: 0,
|
loadCount: 0,
|
||||||
|
ProcessingCost: 0,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -379,7 +430,6 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.pageInit();
|
this.pageInit();
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -392,7 +442,6 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
loadDepartments() {
|
loadDepartments() {
|
||||||
this.$mk.post({
|
this.$mk.post({
|
||||||
url: `${BASE_URL.BASE_URL}/BaseDepartment/v1/base/department/list`,
|
url: `${BASE_URL.BASE_URL}/BaseDepartment/v1/base/department/list`,
|
||||||
|
|
@ -401,19 +450,17 @@ export default {
|
||||||
"page": 1,
|
"page": 1,
|
||||||
"limit": 1000,
|
"limit": 1000,
|
||||||
"end_time": 0,
|
"end_time": 0,
|
||||||
"order_bys": [
|
"order_bys": [],
|
||||||
],
|
"search_rules": [],
|
||||||
"search_rules": [
|
|
||||||
],
|
|
||||||
"start_time": 0
|
"start_time": 0
|
||||||
},
|
},
|
||||||
useBigInt: true
|
useBigInt: true
|
||||||
}).then(a => {
|
}).then(a => {
|
||||||
this.departments = a.data.BaseDepartment;
|
this.departments = a.data.BaseDepartment;
|
||||||
this.departmentOptions = [{ value: null, label: '全部部门' }];
|
this.departmentOptions = [{value: null, label: '全部部门'}];
|
||||||
this.departments.forEach(item => {
|
this.departments.forEach(item => {
|
||||||
|
|
||||||
this.departmentOptions = [... this.departmentOptions, {
|
this.departmentOptions = [...this.departmentOptions, {
|
||||||
value: item.id + '',
|
value: item.id + '',
|
||||||
label: item.name
|
label: item.name
|
||||||
}]
|
}]
|
||||||
|
|
@ -436,12 +483,15 @@ export default {
|
||||||
this.$mk.post({
|
this.$mk.post({
|
||||||
url: this.actions.get,
|
url: this.actions.get,
|
||||||
loading: "加载中...",
|
loading: "加载中...",
|
||||||
data: { id: this.$mk.toBigInt(dataId) },
|
data: {id: this.$mk.toBigInt(dataId)},
|
||||||
useBigInt: true
|
useBigInt: true
|
||||||
}).then(a => {
|
}).then(a => {
|
||||||
|
|
||||||
|
|
||||||
this.formOptions.data = this.$mk.formatDetailData({ data: a.data[this.detailDataFieldName], rules: this.formOptions.items });
|
this.formOptions.data = this.$mk.formatDetailData({
|
||||||
|
data: a.data[this.detailDataFieldName],
|
||||||
|
rules: this.formOptions.items
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
this.formOptions2.data = {
|
this.formOptions2.data = {
|
||||||
|
|
@ -452,13 +502,13 @@ export default {
|
||||||
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.departmentOptions = [{value: null, label: '全部部门'}];
|
||||||
this.detailsData2.forEach(item => {
|
this.detailsData2.forEach(item => {
|
||||||
|
|
||||||
if (item.department_detail && item.department_detail.id &&
|
if (item.department_detail && item.department_detail.id &&
|
||||||
!this.departmentOptions.filter(a => a.value == item.department_detail.id.toString()).length
|
!this.departmentOptions.filter(a => a.value == item.department_detail.id.toString()).length
|
||||||
) {
|
) {
|
||||||
this.departmentOptions = [... this.departmentOptions, {
|
this.departmentOptions = [...this.departmentOptions, {
|
||||||
value: item.department_detail.id + '',
|
value: item.department_detail.id + '',
|
||||||
label: item.department_detail.name
|
label: item.department_detail.name
|
||||||
}]
|
}]
|
||||||
|
|
@ -486,7 +536,6 @@ export default {
|
||||||
this.isEdit = true;
|
this.isEdit = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// 如果没有id参数,说明是新增模式
|
// 如果没有id参数,说明是新增模式
|
||||||
this.addModeItems.forEach(item => {
|
this.addModeItems.forEach(item => {
|
||||||
|
|
@ -571,7 +620,7 @@ export default {
|
||||||
this.collapseActiveKey = [];
|
this.collapseActiveKey = [];
|
||||||
this.infos = [];
|
this.infos = [];
|
||||||
},
|
},
|
||||||
addInfo({ rows1, rows2, header }) {
|
addInfo({rows1, rows2, header}) {
|
||||||
let key = this.infos.length + '';
|
let key = this.infos.length + '';
|
||||||
let info = {
|
let info = {
|
||||||
key: key, data: {
|
key: key, data: {
|
||||||
|
|
@ -584,14 +633,14 @@ export default {
|
||||||
this.infos = [...this.infos, info];
|
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({
|
||||||
page: () => import("../MoldOrder/selector"),
|
page: () => import("../MoldOrder/selector"),
|
||||||
title: "选择订单",
|
title: "选择订单",
|
||||||
showFooter: true,
|
showFooter: true,
|
||||||
width: width * 0.9,
|
width: width * 0.9,
|
||||||
height: height * 0.9,
|
height: height * 0.9,
|
||||||
callback: ({ data }) => {
|
callback: ({data}) => {
|
||||||
if (!data || !data.row2) {
|
if (!data || !data.row2) {
|
||||||
this.$mk.error("未选择明细行");
|
this.$mk.error("未选择明细行");
|
||||||
return;
|
return;
|
||||||
|
|
@ -664,7 +713,7 @@ export default {
|
||||||
currentAddRows1.push({
|
currentAddRows1.push({
|
||||||
component_id: pitem.component_id.toString(),
|
component_id: pitem.component_id.toString(),
|
||||||
component_num: 1,
|
component_num: 1,
|
||||||
component_detail: { id: pitem.mold_component.id, name: pitem.mold_component.name },
|
component_detail: {id: pitem.mold_component.id, name: pitem.mold_component.name},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -672,7 +721,7 @@ export default {
|
||||||
currentAddRows2.push({
|
currentAddRows2.push({
|
||||||
component_id: pitem.component_id.toString(),
|
component_id: pitem.component_id.toString(),
|
||||||
process_id: pitem.mes_processes_id,
|
process_id: pitem.mes_processes_id,
|
||||||
process_detail: { id: pitem.mes_processes_id, name: pitem.mes_processes.name },
|
process_detail: {id: pitem.mes_processes_id, name: pitem.mes_processes.name},
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -737,12 +786,14 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
allProcessingCost(data) {
|
||||||
|
this.ProcessingCost = data;
|
||||||
|
},
|
||||||
|
|
||||||
// 保存
|
// 保存
|
||||||
ok() {
|
ok() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let save = () => {
|
let save = () => {
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -753,7 +804,7 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
// 格式化提交的数据
|
// 格式化提交的数据
|
||||||
this.$mk.formatFormData({ data: postdata, rules: this.formOptions.items });
|
this.$mk.formatFormData({data: postdata, rules: this.formOptions.items});
|
||||||
|
|
||||||
|
|
||||||
if (postdata.id) {
|
if (postdata.id) {
|
||||||
|
|
@ -767,8 +818,12 @@ export default {
|
||||||
postdata.order_id = this.$mk.toBigInt(postdata.order_id);
|
postdata.order_id = this.$mk.toBigInt(postdata.order_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
postdata.mold_production_order_component = !this.isEdit ? [] : { insertList: [], deleteList: [], updateList: [] };
|
postdata.mold_production_order_component = !this.isEdit ? [] : {insertList: [], deleteList: [], updateList: []};
|
||||||
postdata.mold_production_order_component_processes = !this.isEdit ? [] : { insertList: [], deleteList: [], updateList: [] };
|
postdata.mold_production_order_component_processes = !this.isEdit ? [] : {
|
||||||
|
insertList: [],
|
||||||
|
deleteList: [],
|
||||||
|
updateList: []
|
||||||
|
};
|
||||||
|
|
||||||
this.infos.forEach(info => {
|
this.infos.forEach(info => {
|
||||||
if (!info.data.postdata) {
|
if (!info.data.postdata) {
|
||||||
|
|
@ -833,11 +888,8 @@ export default {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 验证表单
|
// 验证表单
|
||||||
this.$mk.validateForm({ form: this.$refs.xForm }).then(() => { // 验证表单
|
this.$mk.validateForm({form: this.$refs.xForm}).then(() => { // 验证表单
|
||||||
|
|
||||||
save(); // 提交保存
|
save(); // 提交保存
|
||||||
|
|
||||||
|
|
@ -854,7 +906,7 @@ export default {
|
||||||
this.back();
|
this.back();
|
||||||
},
|
},
|
||||||
|
|
||||||
pageCopy(){
|
pageCopy() {
|
||||||
let dataId = this.getDataId();
|
let dataId = this.getDataId();
|
||||||
if (!dataId) {
|
if (!dataId) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -873,14 +925,13 @@ export default {
|
||||||
if (a.code == "200") {
|
if (a.code == "200") {
|
||||||
this.$mk.success("操作成功");
|
this.$mk.success("操作成功");
|
||||||
this.$openPage(this.editPageUrl + a.data.id);
|
this.$openPage(this.editPageUrl + a.data.id);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
this.$mk.error(a.msg);
|
this.$mk.error(a.msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.$mk.confirm('您确定要改模布产吗?').then(type => {
|
this.$mk.confirm('您确定要改模布产吗?').then(type => {
|
||||||
if (type == 'confirm') {
|
if (type == 'confirm') {
|
||||||
sendCopy("");
|
sendCopy("");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -906,14 +957,13 @@ export default {
|
||||||
if (a.code == "200") {
|
if (a.code == "200") {
|
||||||
this.$mk.success("操作成功");
|
this.$mk.success("操作成功");
|
||||||
this.pageInit();
|
this.pageInit();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
this.$mk.error(a.msg);
|
this.$mk.error(a.msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.$mk.confirm('您确定要完成布产吗?').then(type => {
|
this.$mk.confirm('您确定要完成布产吗?').then(type => {
|
||||||
if (type == 'confirm') {
|
if (type == 'confirm') {
|
||||||
sendComplete("");
|
sendComplete("");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -939,14 +989,13 @@ export default {
|
||||||
if (a.code == "200") {
|
if (a.code == "200") {
|
||||||
this.$mk.success("操作成功");
|
this.$mk.success("操作成功");
|
||||||
this.pageInit();
|
this.pageInit();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
this.$mk.error(a.msg);
|
this.$mk.error(a.msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.$mk.confirm('您确定要取消完成布产吗?').then(type => {
|
this.$mk.confirm('您确定要取消完成布产吗?').then(type => {
|
||||||
if (type == 'confirm') {
|
if (type == 'confirm') {
|
||||||
sendComplete("");
|
sendComplete("");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -971,8 +1020,7 @@ export default {
|
||||||
if (a.code == "200") {
|
if (a.code == "200") {
|
||||||
this.$mk.success("审批成功");
|
this.$mk.success("审批成功");
|
||||||
this.pageInit();
|
this.pageInit();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
this.$mk.error(a.msg);
|
this.$mk.error(a.msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -984,7 +1032,6 @@ export default {
|
||||||
print() { // 打印
|
print() { // 打印
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let hiprint = this.$hiPrint; // 获取打印组件
|
let hiprint = this.$hiPrint; // 获取打印组件
|
||||||
let tdata = JSON.parse(JSON.stringify(this.formOptions.data)); // 复制表单数据
|
let tdata = JSON.parse(JSON.stringify(this.formOptions.data)); // 复制表单数据
|
||||||
|
|
||||||
|
|
@ -997,9 +1044,9 @@ export default {
|
||||||
for (let name in tdata) {
|
for (let name in tdata) {
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(name.indexOf('_time') != -1 || name == 'manufacture_cycle')
|
(name.indexOf('_time') != -1 || name == 'manufacture_cycle')
|
||||||
|
|
||||||
&& tdata[name] && tdata[name].indexOf('T') != -1) {
|
&& tdata[name] && tdata[name].indexOf('T') != -1) {
|
||||||
tdata[name] = tdata[name].split('T')[0];
|
tdata[name] = tdata[name].split('T')[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1058,21 +1105,18 @@ export default {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
hiprint.init(); // 初始化打印组件
|
hiprint.init(); // 初始化打印组件
|
||||||
|
|
||||||
|
|
||||||
var hiprintTemplate = new hiprint.PrintTemplate({ // 创建打印模板
|
var hiprintTemplate = new hiprint.PrintTemplate({ // 创建打印模板
|
||||||
template: template
|
template: template
|
||||||
});
|
});
|
||||||
hiprintTemplate.print(tdata, { printer: '', title: '工艺布产' }); // 打印
|
hiprintTemplate.print(tdata, {printer: '', title: '工艺布产'}); // 打印
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
// 监听属性
|
// 监听属性
|
||||||
watch: {
|
watch: {}
|
||||||
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@
|
||||||
<a-button v-if="!getDataId()" @click="pageSelectOrder" :disabled="pageStatus == 'approved'">选择订单</a-button>
|
<a-button v-if="!getDataId()" @click="pageSelectOrder" :disabled="pageStatus == 'approved'">选择订单</a-button>
|
||||||
<a-button type="primary" @click="ok" :disabled="pageStatus == 'approved'">保存</a-button>
|
<a-button type="primary" @click="ok" :disabled="pageStatus == 'approved'">保存</a-button>
|
||||||
<a-button v-if="false" @click="pageApproved" type="primary"
|
<a-button v-if="false" @click="pageApproved" type="primary"
|
||||||
:disabled="!this.getDataId() || pageStatus == 'approved'">审批
|
:disabled="!this.getDataId() || pageStatus == 'approved'">审批
|
||||||
</a-button>
|
</a-button>
|
||||||
|
|
||||||
<a-button @click="back">关闭</a-button>
|
<a-button @click="back">关闭</a-button>
|
||||||
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<vxe-form :data="formOptions.data" ref="xForm" :title-width="formOptions.titleWidth"
|
<vxe-form :data="formOptions.data" ref="xForm" :title-width="formOptions.titleWidth"
|
||||||
:title-align="formOptions.titleAlign" :rules="formOptions.rules" :items="formOptions.items" titleColon>
|
:title-align="formOptions.titleAlign" :rules="formOptions.rules" :items="formOptions.items" titleColon>
|
||||||
</vxe-form>
|
</vxe-form>
|
||||||
|
|
||||||
<a-tabs>
|
<a-tabs>
|
||||||
|
|
@ -32,14 +32,14 @@
|
||||||
|
|
||||||
<a-collapse-panel v-for="(info, index) in infos" :key="info.key" :header="info.header">
|
<a-collapse-panel v-for="(info, index) in infos" :key="info.key" :header="info.header">
|
||||||
|
|
||||||
<a-icon slot="extra" type="delete" @click.stop="removeInfo(index)" />
|
<a-icon slot="extra" type="delete" @click.stop="removeInfo(index)"/>
|
||||||
<component-detail ref="componentDetail" :dataId="getDataId()" :itemData="info.data" @reloadData="pageInit"></component-detail>
|
<component-detail ref="componentDetail" :dataId="getDataId()" :itemData="info.data"
|
||||||
|
@reloadData="pageInit"></component-detail>
|
||||||
|
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
</a-collapse>
|
</a-collapse>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -54,10 +54,13 @@
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
|
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
|
|
||||||
|
<h3 style="padding: 20px;text-align: right;">
|
||||||
|
总成本:{{ ProcessingCost }} 元
|
||||||
|
</h3>
|
||||||
<vxe-form :data="formOptions2.data" ref="xForm2" :title-width="formOptions2.titleWidth"
|
<vxe-form :data="formOptions2.data" ref="xForm2" :title-width="formOptions2.titleWidth"
|
||||||
:title-align="formOptions2.titleAlign" :rules="formOptions2.rules" :items="formOptions2.items"
|
:title-align="formOptions2.titleAlign" :rules="formOptions2.rules" :items="formOptions2.items"
|
||||||
>
|
>
|
||||||
</vxe-form>
|
</vxe-form>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -74,20 +77,19 @@
|
||||||
import ComponentDetail from './ComponentDetail'
|
import ComponentDetail from './ComponentDetail'
|
||||||
import BASE_URL from '@/services/mes/api.js';
|
import BASE_URL from '@/services/mes/api.js';
|
||||||
|
|
||||||
import XEUtils from 'xe-utils' // 加载xe-utils
|
import XEUtils from 'xe-utils' // 加载xe-utils
|
||||||
const settings = require('../basic/settings.js');
|
const settings = require('../basic/settings.js');
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
name: '',
|
name: '',
|
||||||
components: { ComponentDetail },
|
components: {ComponentDetail},
|
||||||
props: {
|
props: {
|
||||||
pageMode: {
|
pageMode: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "edit"
|
default: "edit"
|
||||||
},
|
},
|
||||||
dataId: {
|
dataId: {}
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -143,13 +145,13 @@ export default {
|
||||||
// 表单校验规则
|
// 表单校验规则
|
||||||
rules: {
|
rules: {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '请输入编号' }
|
{required: true, message: '请输入编号'}
|
||||||
],
|
],
|
||||||
mold_order: [
|
mold_order: [
|
||||||
{ required: true, message: '请选择订单' }
|
{required: true, message: '请选择订单'}
|
||||||
],
|
],
|
||||||
mold_detail: [
|
mold_detail: [
|
||||||
{ required: true, message: '请选择模具' }
|
{required: true, message: '请选择模具'}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
// 表单项
|
// 表单项
|
||||||
|
|
@ -180,27 +182,87 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'code', title: '编号', span: 6, itemRender: { name: '$input' } },
|
{field: 'code', title: '编号', span: 6, itemRender: {name: '$input'}},
|
||||||
|
|
||||||
{ field: 'production_type', dataRule: { type: 'integer' }, title: '布产类型', span: 6, itemRender: { name: '$select', props: { options: options_production_type } } },
|
{
|
||||||
|
field: 'production_type',
|
||||||
|
dataRule: {type: 'integer'},
|
||||||
{ field: 'rubber', title: '胶件材质/缩水', span: 6, itemRender: { name: '$input' } },
|
title: '布产类型',
|
||||||
{ field: 'hole', title: '模具穴数', span: 6, itemRender: { name: '$input' } },
|
span: 6,
|
||||||
{ field: 'water', title: '入水口类型/位置', span: 6, itemRender: { name: '$input' } },
|
itemRender: {name: '$select', props: {options: options_production_type}}
|
||||||
|
},
|
||||||
|
|
||||||
{ field: 'manufacture_cycle', dataRule: { type: 'timestamp' }, title: '制作周期', span: 6, 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: 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: 'rubber', title: '胶件材质/缩水', span: 6, itemRender: {name: '$input'}},
|
||||||
{ field: 'draw3D_time', dataRule: { type: 'timestamp' }, title: '出3D时间预计', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
{field: 'hole', title: '模具穴数', span: 6, itemRender: {name: '$input'}},
|
||||||
{ field: 'inlay_deep_hole_time', dataRule: { type: 'timestamp' }, title: '镶件深孔钻到厂日期预计', span: 6, itemRender: { name: '$input', props: { type: 'date' } } },
|
{field: 'water', title: '入水口类型/位置', span: 6, itemRender: {name: '$input'}},
|
||||||
{ 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' } } },
|
{
|
||||||
|
field: 'manufacture_cycle',
|
||||||
|
dataRule: {type: 'timestamp'},
|
||||||
|
title: '制作周期',
|
||||||
|
span: 6,
|
||||||
|
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: 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: 6,
|
title: '模具师傅', span: 6,
|
||||||
field: 'mold_master_user_detail',
|
field: 'mold_master_user_detail',
|
||||||
|
|
@ -224,23 +286,23 @@ export default {
|
||||||
title: '工程师傅', span: 6,
|
title: '工程师傅', span: 6,
|
||||||
field: 'engineer_detail',
|
field: 'engineer_detail',
|
||||||
dataRule: {
|
dataRule: {
|
||||||
initType:'object',
|
initType: 'object',
|
||||||
|
|
||||||
textField:'engineer_name',
|
textField: 'engineer_name',
|
||||||
idField:'engineer_uid',
|
idField: 'engineer_uid',
|
||||||
|
|
||||||
|
|
||||||
type:'object',
|
type: 'object',
|
||||||
fromTextField: "name",
|
fromTextField: "name",
|
||||||
saveTextField: "engineer_name",
|
saveTextField: "engineer_name",
|
||||||
|
|
||||||
|
|
||||||
fromField: "id",
|
fromField: "id",
|
||||||
saveField: "engineer_uid" // 如果表单项存储的是对象,将从fromField中取得值保存到saveField
|
saveField: "engineer_uid" // 如果表单项存储的是对象,将从fromField中取得值保存到saveField
|
||||||
},
|
},
|
||||||
itemRender: {
|
itemRender: {
|
||||||
name: 'MkFormDataSelector', props: {
|
name: 'MkFormDataSelector', props: {
|
||||||
params: {
|
params: {
|
||||||
dataType: "object",
|
dataType: "object",
|
||||||
valueField: "id",
|
valueField: "id",
|
||||||
textField: "name",
|
textField: "name",
|
||||||
|
|
@ -250,7 +312,7 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'customer_name', title: '客户名称', span: 6, itemRender: { name: '$input' } },
|
{field: 'customer_name', title: '客户名称', span: 6, itemRender: {name: '$input'}},
|
||||||
{
|
{
|
||||||
field: 'progress', title: '进度', span: 18, itemRender: {
|
field: 'progress', title: '进度', span: 18, itemRender: {
|
||||||
name: 'MkFormProgress', props: {
|
name: 'MkFormProgress', props: {
|
||||||
|
|
@ -266,53 +328,42 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
formOptions2: {
|
formOptions2: {
|
||||||
data: {
|
data: {},
|
||||||
},
|
|
||||||
// 标题宽度
|
// 标题宽度
|
||||||
titleWidth: 180,
|
titleWidth: 180,
|
||||||
// 标题对齐方式
|
// 标题对齐方式
|
||||||
|
|
||||||
// 表单校验规则
|
// 表单校验规则
|
||||||
rules: {
|
rules: {},
|
||||||
},
|
|
||||||
// 表单项
|
// 表单项
|
||||||
items: [
|
items: [
|
||||||
|
|
||||||
|
|
||||||
{ field: 'problem', title: '出现问题及建议反馈', span: 24, itemRender: { name: '$input', props: {} } },
|
{field: 'problem', title: '出现问题及建议反馈', span: 24, itemRender: {name: '$input', props: {}}},
|
||||||
{ field: 'remark', title: '备注', span: 24, itemRender: { name: '$textarea', props: {} } },
|
{field: 'remark', title: '备注', span: 24, itemRender: {name: '$textarea', props: {}}},
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
// 新增模式表单项
|
// 新增模式表单项
|
||||||
addModeItems: [
|
addModeItems: [],
|
||||||
|
|
||||||
],
|
|
||||||
|
|
||||||
|
|
||||||
table1Height: 400,
|
table1Height: 400,
|
||||||
detailsSourceData: [
|
detailsSourceData: [],
|
||||||
],
|
detailsData: [],
|
||||||
detailsData: [
|
deletedDetailsData: [],
|
||||||
],
|
|
||||||
deletedDetailsData: [
|
|
||||||
|
|
||||||
],
|
detailsData2: [],
|
||||||
|
deletedDetailsData2: [],
|
||||||
detailsData2: [
|
|
||||||
],
|
|
||||||
deletedDetailsData2: [
|
|
||||||
|
|
||||||
],
|
|
||||||
editor_component: {
|
editor_component: {
|
||||||
dataType: "object",
|
dataType: "object",
|
||||||
valueField: "id",
|
valueField: "id",
|
||||||
textField: "name",
|
textField: "name",
|
||||||
listdataFieldName: 'MoldComponent',
|
listdataFieldName: 'MoldComponent',
|
||||||
mapper: [
|
mapper: [
|
||||||
{ fromField: "id", field: "component_id" }
|
{fromField: "id", field: "component_id"}
|
||||||
],
|
],
|
||||||
dataUrl: `${BASE_URL.BASE_URL}/MoldComponent/v1/mold/component/list`
|
dataUrl: `${BASE_URL.BASE_URL}/MoldComponent/v1/mold/component/list`
|
||||||
},
|
},
|
||||||
|
|
@ -322,7 +373,7 @@ export default {
|
||||||
textField: "name",
|
textField: "name",
|
||||||
listdataFieldName: 'BaseDepartment',
|
listdataFieldName: 'BaseDepartment',
|
||||||
mapper: [
|
mapper: [
|
||||||
{ fromField: "id", field: "department_id" }
|
{fromField: "id", field: "department_id"}
|
||||||
],
|
],
|
||||||
dataUrl: `${BASE_URL.BASE_URL}/BaseDepartment/v1/base/department/list`
|
dataUrl: `${BASE_URL.BASE_URL}/BaseDepartment/v1/base/department/list`
|
||||||
},
|
},
|
||||||
|
|
@ -333,7 +384,7 @@ export default {
|
||||||
textField: "name",
|
textField: "name",
|
||||||
listdataFieldName: 'MesProcesses',
|
listdataFieldName: 'MesProcesses',
|
||||||
mapper: [
|
mapper: [
|
||||||
{ fromField: "id", field: "process_id" }
|
{fromField: "id", field: "process_id"}
|
||||||
],
|
],
|
||||||
dataUrl: `${BASE_URL.BASE_URL}/MesProcesses/v1/mes/processes/list`
|
dataUrl: `${BASE_URL.BASE_URL}/MesProcesses/v1/mes/processes/list`
|
||||||
},
|
},
|
||||||
|
|
@ -344,7 +395,7 @@ export default {
|
||||||
textField: "name",
|
textField: "name",
|
||||||
listdataFieldName: 'MesStaff',
|
listdataFieldName: 'MesStaff',
|
||||||
mapper: [
|
mapper: [
|
||||||
{ fromField: "id", field: "process_uid" }
|
{fromField: "id", field: "process_uid"}
|
||||||
],
|
],
|
||||||
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
|
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
|
||||||
},
|
},
|
||||||
|
|
@ -354,7 +405,7 @@ export default {
|
||||||
textField: "name",
|
textField: "name",
|
||||||
listdataFieldName: 'MesStaff',
|
listdataFieldName: 'MesStaff',
|
||||||
mapper: [
|
mapper: [
|
||||||
{ fromField: "id", field: "send_uid" }
|
{fromField: "id", field: "send_uid"}
|
||||||
],
|
],
|
||||||
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
|
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
|
||||||
},
|
},
|
||||||
|
|
@ -364,13 +415,14 @@ export default {
|
||||||
textField: "name",
|
textField: "name",
|
||||||
listdataFieldName: 'MesStaff',
|
listdataFieldName: 'MesStaff',
|
||||||
mapper: [
|
mapper: [
|
||||||
{ fromField: "id", field: "process_uid" }
|
{fromField: "id", field: "process_uid"}
|
||||||
],
|
],
|
||||||
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
|
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
loadCount: 0,
|
loadCount: 0,
|
||||||
|
ProcessingCost: 0,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -393,7 +445,6 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.pageInit();
|
this.pageInit();
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -419,17 +470,20 @@ export default {
|
||||||
this.$mk.post({
|
this.$mk.post({
|
||||||
url: this.actions.get,
|
url: this.actions.get,
|
||||||
loading: "加载中...",
|
loading: "加载中...",
|
||||||
data: { id: this.$mk.toBigInt(dataId) },
|
data: {id: this.$mk.toBigInt(dataId)},
|
||||||
useBigInt: true
|
useBigInt: true
|
||||||
}).then(a => {
|
}).then(a => {
|
||||||
|
|
||||||
|
|
||||||
this.formOptions.data = this.$mk.formatDetailData({ data: a.data[this.detailDataFieldName], rules: this.formOptions.items });
|
this.formOptions.data = this.$mk.formatDetailData({
|
||||||
|
data: a.data[this.detailDataFieldName],
|
||||||
|
rules: this.formOptions.items
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
this.formOptions2.data = {
|
this.formOptions2.data = {
|
||||||
problem: a.data[this.detailDataFieldName].problem,
|
problem: a.data[this.detailDataFieldName].problem,
|
||||||
|
|
||||||
remark: a.data[this.detailDataFieldName].remark
|
remark: a.data[this.detailDataFieldName].remark
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -449,7 +503,6 @@ export default {
|
||||||
this.setPageReadonly(this.pageStatus == 'approved');
|
this.setPageReadonly(this.pageStatus == 'approved');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
@ -457,7 +510,6 @@ export default {
|
||||||
this.isEdit = true;
|
this.isEdit = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// 如果没有id参数,说明是新增模式
|
// 如果没有id参数,说明是新增模式
|
||||||
this.addModeItems.forEach(item => {
|
this.addModeItems.forEach(item => {
|
||||||
|
|
@ -479,7 +531,7 @@ export default {
|
||||||
|
|
||||||
if (!item.component_id) {
|
if (!item.component_id) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let key = infos.length + '' + (this.loadCount + '');
|
let key = infos.length + '' + (this.loadCount + '');
|
||||||
let info = {
|
let info = {
|
||||||
key: key, data: {
|
key: key, data: {
|
||||||
|
|
@ -491,7 +543,7 @@ export default {
|
||||||
this.detailsData2.forEach(pitem => {
|
this.detailsData2.forEach(pitem => {
|
||||||
if (pitem.component_line == item.component_line) {
|
if (pitem.component_line == item.component_line) {
|
||||||
info.data.mold_production_order_component_processes.push(pitem);
|
info.data.mold_production_order_component_processes.push(pitem);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
keys.push(key);
|
keys.push(key);
|
||||||
infos.push(info);
|
infos.push(info);
|
||||||
|
|
@ -500,7 +552,7 @@ export default {
|
||||||
|
|
||||||
this.collapseActiveKey = keys;
|
this.collapseActiveKey = keys;
|
||||||
this.infos = infos
|
this.infos = infos
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
setPageReadonly(readonly) {
|
setPageReadonly(readonly) {
|
||||||
|
|
@ -522,27 +574,27 @@ export default {
|
||||||
if (!v) return '';
|
if (!v) return '';
|
||||||
return XEUtils.toDateString(new Date(v * 1000), 'yyyy-MM-dd');
|
return XEUtils.toDateString(new Date(v * 1000), 'yyyy-MM-dd');
|
||||||
},
|
},
|
||||||
existComonent({ component_id }) {
|
existComonent({component_id}) {
|
||||||
let exist = false;
|
let exist = false;
|
||||||
this.infos.forEach(info => {
|
this.infos.forEach(info => {
|
||||||
info.data.mold_production_order_component.forEach(row => {
|
info.data.mold_production_order_component.forEach(row => {
|
||||||
if (row.component_id.toString() == component_id) {
|
if (row.component_id.toString() == component_id) {
|
||||||
exist = true;
|
exist = true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
return exist;
|
return exist;
|
||||||
|
|
||||||
},
|
},
|
||||||
pageSelectComponent() {
|
pageSelectComponent() {
|
||||||
let { width, height } = this.$mk.getWindowSize();
|
let {width, height} = this.$mk.getWindowSize();
|
||||||
this.$mk.dialog.open({
|
this.$mk.dialog.open({
|
||||||
page: () => import("../MoldComponent/selector"),
|
page: () => import("../MoldComponent/selector"),
|
||||||
title: "选择部件",
|
title: "选择部件",
|
||||||
showFooter: true,
|
showFooter: true,
|
||||||
width: width * 0.9,
|
width: width * 0.9,
|
||||||
height: height * 0.9,
|
height: height * 0.9,
|
||||||
callback: ({ data }) => {
|
callback: ({data}) => {
|
||||||
if (!data || !data.row1) {
|
if (!data || !data.row1) {
|
||||||
this.$mk.error("未选择行");
|
this.$mk.error("未选择行");
|
||||||
return;
|
return;
|
||||||
|
|
@ -558,26 +610,26 @@ export default {
|
||||||
if (a.data && a.data.mold_component) {
|
if (a.data && a.data.mold_component) {
|
||||||
let row = a.data.mold_component;
|
let row = a.data.mold_component;
|
||||||
//if (this.existComonent({ component_id: row.id.toString() })) {
|
//if (this.existComonent({ component_id: row.id.toString() })) {
|
||||||
//this.$mk.error("该部件已经存在");
|
//this.$mk.error("该部件已经存在");
|
||||||
//return;
|
//return;
|
||||||
//}
|
//}
|
||||||
let mold_component_processes = row.mold_component_processes || [];
|
let mold_component_processes = row.mold_component_processes || [];
|
||||||
let currentAddRows1 = [];
|
let currentAddRows1 = [];
|
||||||
let currentAddRows2 = [];
|
let currentAddRows2 = [];
|
||||||
let component_line = this.$mk.getGuid();
|
let component_line = this.$mk.getGuid();
|
||||||
|
|
||||||
currentAddRows1.push({
|
currentAddRows1.push({
|
||||||
component_line: component_line,
|
component_line: component_line,
|
||||||
component_id: row.id,
|
component_id: row.id,
|
||||||
component_num: 1,
|
component_num: 1,
|
||||||
component_detail: { id: row.id, name: row.name },
|
component_detail: {id: row.id, name: row.name},
|
||||||
})
|
})
|
||||||
mold_component_processes.forEach(pitem => {
|
mold_component_processes.forEach(pitem => {
|
||||||
currentAddRows2.push({
|
currentAddRows2.push({
|
||||||
component_line: component_line,
|
component_line: component_line,
|
||||||
component_id: row.id,
|
component_id: row.id,
|
||||||
process_id: pitem.mes_processes_id,
|
process_id: pitem.mes_processes_id,
|
||||||
process_detail: { id: pitem.mes_processes_id, name: pitem.mes_processes.name },
|
process_detail: {id: pitem.mes_processes_id, name: pitem.mes_processes.name},
|
||||||
})
|
})
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
@ -589,8 +641,6 @@ export default {
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -601,7 +651,7 @@ export default {
|
||||||
this.collapseActiveKey = [];
|
this.collapseActiveKey = [];
|
||||||
this.infos = [];
|
this.infos = [];
|
||||||
},
|
},
|
||||||
addInfo({ rows1, rows2, header }) {
|
addInfo({rows1, rows2, header}) {
|
||||||
let key = this.infos.length + '';
|
let key = this.infos.length + '';
|
||||||
let info = {
|
let info = {
|
||||||
key: key, data: {
|
key: key, data: {
|
||||||
|
|
@ -614,14 +664,14 @@ export default {
|
||||||
this.infos = [...this.infos, info];
|
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({
|
||||||
page: () => import("../MoldOrder/selector"),
|
page: () => import("../MoldOrder/selector"),
|
||||||
title: "选择订单",
|
title: "选择订单",
|
||||||
showFooter: true,
|
showFooter: true,
|
||||||
width: width * 0.9,
|
width: width * 0.9,
|
||||||
height: height * 0.9,
|
height: height * 0.9,
|
||||||
callback: ({ data }) => {
|
callback: ({data}) => {
|
||||||
if (!data || !data.row2) {
|
if (!data || !data.row2) {
|
||||||
this.$mk.error("未选择明细行");
|
this.$mk.error("未选择明细行");
|
||||||
return;
|
return;
|
||||||
|
|
@ -656,15 +706,18 @@ 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) {
|
if (detail.complete_time) {
|
||||||
this.formOptions.data.complete_time = this.getDateValue(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
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
this.formOptions.data = JSON.parse(JSON.stringify(this.formOptions.data))
|
this.formOptions.data = JSON.parse(JSON.stringify(this.formOptions.data))
|
||||||
|
|
@ -702,7 +755,7 @@ export default {
|
||||||
currentAddRows1.push({
|
currentAddRows1.push({
|
||||||
component_id: pitem.component_id.toString(),
|
component_id: pitem.component_id.toString(),
|
||||||
component_num: 1,
|
component_num: 1,
|
||||||
component_detail: { id: pitem.mold_component.id, name: pitem.mold_component.name },
|
component_detail: {id: pitem.mold_component.id, name: pitem.mold_component.name},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -710,7 +763,7 @@ export default {
|
||||||
currentAddRows2.push({
|
currentAddRows2.push({
|
||||||
component_id: pitem.component_id.toString(),
|
component_id: pitem.component_id.toString(),
|
||||||
process_id: pitem.mes_processes_id,
|
process_id: pitem.mes_processes_id,
|
||||||
process_detail: { id: pitem.mes_processes_id, name: pitem.mes_processes.name },
|
process_detail: {id: pitem.mes_processes_id, name: pitem.mes_processes.name},
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -730,7 +783,7 @@ export default {
|
||||||
heightInit() {
|
heightInit() {
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
let h = this.$mk.getWindowSize().height - 500;
|
let h = this.$mk.getWindowSize().height - 500;
|
||||||
if (h < 400) {
|
if (h < 400) {
|
||||||
h = 400;
|
h = 400;
|
||||||
}
|
}
|
||||||
|
|
@ -775,12 +828,10 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 保存
|
// 保存
|
||||||
ok() {
|
ok() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let save = () => {
|
let save = () => {
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -790,7 +841,7 @@ export default {
|
||||||
let postdata = Object.assign({}, this.formOptions.data, this.formOptions2.data);
|
let postdata = Object.assign({}, this.formOptions.data, this.formOptions2.data);
|
||||||
|
|
||||||
// 格式化提交的数据
|
// 格式化提交的数据
|
||||||
this.$mk.formatFormData({ data: postdata, rules: this.formOptions.items });
|
this.$mk.formatFormData({data: postdata, rules: this.formOptions.items});
|
||||||
|
|
||||||
|
|
||||||
if (postdata.id) {
|
if (postdata.id) {
|
||||||
|
|
@ -811,14 +862,18 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (postdata.mold_master_user_detail) {
|
if (postdata.mold_master_user_detail) {
|
||||||
postdata.mold_master_name = postdata.mold_master_user_detail.name || '';
|
postdata.mold_master_name = postdata.mold_master_user_detail.name || '';
|
||||||
}
|
}
|
||||||
if (postdata.engineer_detail) {
|
if (postdata.engineer_detail) {
|
||||||
postdata.engineer_name = postdata.engineer_detail.name || '';
|
postdata.engineer_name = postdata.engineer_detail.name || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
postdata.mold_production_order_component = !this.isEdit ? [] : { insertList: [], deleteList: [], updateList: [] };
|
postdata.mold_production_order_component = !this.isEdit ? [] : {insertList: [], deleteList: [], updateList: []};
|
||||||
postdata.mold_production_order_component_processes = !this.isEdit ? [] : { insertList: [], deleteList: [], updateList: [] };
|
postdata.mold_production_order_component_processes = !this.isEdit ? [] : {
|
||||||
|
insertList: [],
|
||||||
|
deleteList: [],
|
||||||
|
updateList: []
|
||||||
|
};
|
||||||
|
|
||||||
let componentDetails = this.$refs['componentDetail'];
|
let componentDetails = this.$refs['componentDetail'];
|
||||||
|
|
||||||
|
|
@ -881,9 +936,8 @@ export default {
|
||||||
this.$mk.success("保存成功");
|
this.$mk.success("保存成功");
|
||||||
if (!this.isEdit) { // 如果是新增模式,关闭当前页面
|
if (!this.isEdit) { // 如果是新增模式,关闭当前页面
|
||||||
this.back();
|
this.back();
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
|
|
||||||
this.pageInit();
|
this.pageInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -898,14 +952,11 @@ export default {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 验证表单
|
// 验证表单
|
||||||
this.$mk.validateForm({ form: this.$refs.xForm }).then(() => { // 验证表单
|
this.$mk.validateForm({form: this.$refs.xForm}).then(() => { // 验证表单
|
||||||
|
|
||||||
|
save(); // 提交保存
|
||||||
|
|
||||||
save(); // 提交保存
|
|
||||||
|
|
||||||
}).catch(count => { // 验证失败
|
}).catch(count => { // 验证失败
|
||||||
this.$mk.error(`存在${count}项错误,请检查`);
|
this.$mk.error(`存在${count}项错误,请检查`);
|
||||||
});
|
});
|
||||||
|
|
@ -920,8 +971,6 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
pageApproved() {
|
pageApproved() {
|
||||||
let dataId = this.getDataId();
|
let dataId = this.getDataId();
|
||||||
if (!dataId) {
|
if (!dataId) {
|
||||||
|
|
@ -941,8 +990,7 @@ export default {
|
||||||
if (a.code == "200") {
|
if (a.code == "200") {
|
||||||
this.$mk.success("审批成功");
|
this.$mk.success("审批成功");
|
||||||
this.pageInit();
|
this.pageInit();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
this.$mk.error(a.msg);
|
this.$mk.error(a.msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -952,13 +1000,10 @@ export default {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// 监听属性
|
// 监听属性
|
||||||
watch: {
|
watch: {}
|
||||||
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue