This commit is contained in:
xielue 2023-09-16 11:28:15 +08:00
parent b154723dd0
commit 2a962e471e
2 changed files with 52 additions and 39 deletions

View File

@ -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' },

View File

@ -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" // fromFieldsaveField
},
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" // fromFieldsaveField
},
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,