This commit is contained in:
xielue 2023-06-17 19:40:14 +08:00
parent b3031aec29
commit c7275bbdc1
3 changed files with 8 additions and 5 deletions

View File

@ -125,7 +125,7 @@ VXETable.formats.mixin({
return `<img src="${cellValue}">`; return `<img src="${cellValue}">`;
}, },
formatEnum({ cellValue,column }) { // 格式化状态 formatEnum({ cellValue,column }) { // 格式化状态
if (!cellValue) return ''; if (cellValue == null) return '';
if(!column.params) return ''; if(!column.params) return '';
for(let i =0;i<column.params.length;i++){ for(let i =0;i<column.params.length;i++){
if(column.params[i].value == cellValue){ if(column.params[i].value == cellValue){

View File

@ -90,10 +90,11 @@ export default {
{ title: '操作', slots: { default: 'op' }, width: 120 }, { title: '操作', slots: { default: 'op' }, width: 120 },
{ field: 'production_number', sortable: true, title: '单据编码', width: 250 }, // { field: 'production_number', sortable: true, title: '单据编码', width: 250 }, //
{ field: 'audit_status', params:[{label:"已审批",value:1},{label:"未审批",value:0}] , formatter: 'formatEnum', width: 160, sortable: true, title: '审批状态', showHeaderOverflow: true }, //
{ field: 'create_time', formatter: 'formatDate', width: 160, sortable: true, title: '单据日期', showHeaderOverflow: true }, // { field: 'create_time', formatter: 'formatDate', width: 160, sortable: true, title: '单据日期', showHeaderOverflow: true }, //
{ field: 'create_time', formatter: 'formatDate', width: 160, sortable: true, title: '创建时间', showHeaderOverflow: true }, // { field: 'create_time', formatter: 'formatDate', width: 160, sortable: true, title: '创建时间', showHeaderOverflow: true }, //
{ field: 'update_time', formatter: 'formatDate', width: 160, sortable: true, title: '更新时间', showHeaderOverflow: true }, // { field: 'update_time', formatter: 'formatDate', width: 160, sortable: true, title: '更新时间', showHeaderOverflow: true }, //
] ]
} }

View File

@ -819,7 +819,7 @@ export default {
}).then(a => { }).then(a => {
this.deletedDetailsData2 = []; this.deletedDetailsData2 = [];
this.detailsData2 = a.data.ProductionOrderProcesses || []; this.detailsData2 = JSON.parse(JSON.stringify(a.data.ProductionOrderProcesses || []));
this.showProcesses = true; this.showProcesses = true;
this.detailsDataInit2(); this.detailsDataInit2();
@ -1007,14 +1007,16 @@ export default {
var postdata = { var postdata = {
insertList: [], insertList: [],
updateList: [], updateList: [],
deleteList: this.deletedDetailsData deleteList: this.deletedDetailsData2
}; };
ds.forEach(item => { ds.forEach(item => {
delete item._X_ROW_KEY; delete item._X_ROW_KEY;
item.production_order_id = this.getDataId_BigInt(); item.production_order_id = this.getDataId_BigInt();
item.materials_id = this.$mk.toBigInt(this.currentRow.materials_id); item.materials_id = this.$mk.toBigInt(this.currentRow.materials_id);
item.step_id = this.$mk.toBigInt(item.step_id);
if (item.id) { if (item.id) {
item.id = this.$mk.toBigInt(item.id); item.id = this.$mk.toBigInt(item.id);