This commit is contained in:
parent
b154723dd0
commit
2a962e471e
|
|
@ -604,7 +604,7 @@ export default {
|
|||
{ field: 'component_num', type: 'integer' },
|
||||
{ field: 'prepare_process_time', type: 'timestamp' },
|
||||
{ field: 'plan_complete_time', type: 'timestamp' },
|
||||
|
||||
|
||||
{ field: 'id', type: 'bigint' },
|
||||
{ field: 'update_uid', type: 'bigint' },
|
||||
{ field: 'complete_uid', type: 'bigint' },
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@
|
|||
|
||||
<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 v-if="false" @click="pageApproved" type="primary" :disabled="!this.getDataId() || pageStatus == 'approved'">审批
|
||||
<a-button v-if="false" @click="pageApproved" type="primary"
|
||||
:disabled="!this.getDataId() || pageStatus == 'approved'">审批
|
||||
</a-button>
|
||||
<a-button @click="print">打印</a-button>
|
||||
|
||||
|
|
@ -33,7 +34,7 @@
|
|||
<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)" />
|
||||
<component-detail :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>
|
||||
|
|
@ -57,7 +58,8 @@
|
|||
|
||||
<h4 style="margin-top: 5px;">出现问题及建议反馈</h4>
|
||||
<vxe-form :data="formOptions2.data" ref="xForm" :title-width="formOptions2.titleWidth"
|
||||
:title-align="formOptions2.titleAlign" :rules="formOptions2.rules" :items="formOptions2.items" :titleColon="false" vertical>
|
||||
:title-align="formOptions2.titleAlign" :rules="formOptions2.rules" :items="formOptions2.items" :titleColon="false"
|
||||
vertical>
|
||||
</vxe-form>
|
||||
|
||||
|
||||
|
|
@ -194,27 +196,27 @@ export default {
|
|||
{ 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: 'problem', title: '出现问题及建议反馈', span: 8, itemRender: { name: '$input', props: {} } },
|
||||
{
|
||||
title: '模具师傅', span: 8,
|
||||
field: 'mold_master_user_detail',
|
||||
dataRule: {
|
||||
fromField: "id",
|
||||
saveField: "mold_master_uid" // 如果表单项存储的是对象,将从fromField中取得值保存到saveField
|
||||
},
|
||||
itemRender: {
|
||||
name: 'MkFormDataSelector', props: {
|
||||
params: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
textField: "name",
|
||||
listdataFieldName: 'MesStaff',
|
||||
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
|
||||
}
|
||||
title: '模具师傅', span: 8,
|
||||
field: 'mold_master_user_detail',
|
||||
dataRule: {
|
||||
fromField: "id",
|
||||
saveField: "mold_master_uid" // 如果表单项存储的是对象,将从fromField中取得值保存到saveField
|
||||
},
|
||||
itemRender: {
|
||||
name: 'MkFormDataSelector', props: {
|
||||
params: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
textField: "name",
|
||||
listdataFieldName: 'MesStaff',
|
||||
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'progress', title: '进度', span: 16, itemRender: {
|
||||
name: 'MkFormProgress', props: {
|
||||
|
|
@ -230,7 +232,7 @@ export default {
|
|||
|
||||
|
||||
formOptions2: {
|
||||
data: {
|
||||
data: {
|
||||
},
|
||||
// 标题宽度
|
||||
titleWidth: 180,
|
||||
|
|
@ -238,14 +240,14 @@ export default {
|
|||
titleAlign: 'top',
|
||||
|
||||
// 表单校验规则
|
||||
rules: {
|
||||
rules: {
|
||||
},
|
||||
// 表单项
|
||||
items: [
|
||||
|
||||
|
||||
{ showTitle:false, field: 'problem', title: '', span: 24, itemRender: { name: '$textarea', props: {} } },
|
||||
|
||||
|
||||
|
||||
{ showTitle: false, field: 'problem', title: '', span: 24, itemRender: { name: '$textarea', props: {} } },
|
||||
|
||||
|
||||
]
|
||||
},
|
||||
|
|
@ -334,7 +336,7 @@ export default {
|
|||
},
|
||||
|
||||
|
||||
loadCount : 0,
|
||||
loadCount: 0,
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -390,7 +392,7 @@ export default {
|
|||
|
||||
|
||||
this.formOptions2.data = {
|
||||
problem : a.data[this.detailDataFieldName].problem
|
||||
problem: a.data[this.detailDataFieldName].problem
|
||||
}
|
||||
|
||||
this.detailsData = JSON.parse(JSON.stringify(a.data[this.detailDataFieldName].mold_production_order_component || []));
|
||||
|
|
@ -432,7 +434,7 @@ export default {
|
|||
|
||||
let keys = [];
|
||||
let infos = [];
|
||||
this.loadCount ++;
|
||||
this.loadCount++;
|
||||
this.detailsData.forEach(item => {
|
||||
|
||||
if (!item.component_id) {
|
||||
|
|
@ -600,9 +602,9 @@ export default {
|
|||
this.formOptions.data.horizontal_frame_time = this.getDateValue(detail.horizontal_frame_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_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))
|
||||
|
|
@ -629,7 +631,7 @@ export default {
|
|||
|
||||
let row = a.data.mold_scheme;
|
||||
|
||||
|
||||
|
||||
let mold_scheme_processes = row.mold_scheme_processes || [];
|
||||
let currentAddRows1 = [];
|
||||
let currentAddRows2 = [];
|
||||
|
|
@ -652,7 +654,7 @@ export default {
|
|||
})
|
||||
});
|
||||
|
||||
|
||||
|
||||
this.clearInfos();
|
||||
currentAddRows1.forEach(row => {
|
||||
this.addInfo({
|
||||
|
|
@ -660,7 +662,7 @@ export default {
|
|||
rows2: currentAddRows2.filter(a => a.component_id == row.component_id),
|
||||
header: row.component_detail.name
|
||||
});
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
|
|
@ -726,11 +728,11 @@ export default {
|
|||
let action = !this.isEdit ? this.actions.create : this.actions.update;
|
||||
// 如果是新增模式,提交的数据中加入id 如果是编辑模式,提交的数据中不加入id
|
||||
let postdata = Object.assign({}, this.formOptions.data, this.formOptions2.data);
|
||||
|
||||
|
||||
// 格式化提交的数据
|
||||
this.$mk.formatFormData({ data: postdata, rules: this.formOptions.items });
|
||||
|
||||
|
||||
|
||||
if (postdata.id) {
|
||||
postdata.id = this.$mk.toBigInt(postdata.id);
|
||||
}
|
||||
|
|
@ -745,11 +747,22 @@ export default {
|
|||
postdata.mold_master_uid = this.$mk.toBigInt(postdata.mold_master_uid);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
postdata.mold_production_order_component = !this.isEdit ? [] : { insertList: [], deleteList: [], updateList: [] };
|
||||
postdata.mold_production_order_component_processes = !this.isEdit ? [] : { insertList: [], deleteList: [], updateList: [] };
|
||||
|
||||
let componentDetails = this.$refs['componentDetail'];
|
||||
|
||||
if (componentDetails) {
|
||||
componentDetails.forEach(componentDetail => {
|
||||
if (componentDetail.postDataUpdate) {
|
||||
console.log("postDataUpdate");
|
||||
componentDetail.postDataUpdate();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.infos.forEach(info => {
|
||||
if (!info.data.postdata) {
|
||||
return;
|
||||
|
|
@ -786,7 +799,7 @@ export default {
|
|||
value: postdata.mold_production_order_component_processes
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 提交数据
|
||||
this.$mk.post({
|
||||
url: action,
|
||||
|
|
|
|||
Loading…
Reference in New Issue