模具报工
This commit is contained in:
parent
5ea71c5dd5
commit
738e7a172e
|
|
@ -24,7 +24,8 @@
|
||||||
<div>状态:{{ item.is_complete ? "已完成" : (item.is_send ? "已发料" : "未发料") }}</div>
|
<div>状态:{{ item.is_complete ? "已完成" : (item.is_send ? "已发料" : "未发料") }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gx-item-col">
|
<div class="gx-item-col">
|
||||||
<a-button type="primary" @click="pageSend(item)" v-if="item.is_send !== 1">发料</a-button>
|
<div>
|
||||||
|
<a-button type="primary" @click="pageSend(item)" v-if="item.is_send !== 1">发料</a-button>
|
||||||
<a-button @click="pageSend(item, true)" v-else-if="!item.is_complete">撤销发料</a-button>
|
<a-button @click="pageSend(item, true)" v-else-if="!item.is_complete">撤销发料</a-button>
|
||||||
|
|
||||||
<a-button style="margin-left: 3px;" type="primary" @click="pageReport(item)"
|
<a-button style="margin-left: 3px;" type="primary" @click="pageReport(item)"
|
||||||
|
|
@ -32,6 +33,10 @@
|
||||||
|
|
||||||
<a-button style="margin-left: 3px;" @click="pageReport(item, true)"
|
<a-button style="margin-left: 3px;" @click="pageReport(item, true)"
|
||||||
v-if="item.is_complete == 1">撤销报工</a-button>
|
v-if="item.is_complete == 1">撤销报工</a-button>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 10px;;" v-if="item.complete_time">
|
||||||
|
{{ getDateValueString(item.complete_time) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -109,6 +114,7 @@
|
||||||
<script>
|
<script>
|
||||||
import BASE_URL from '@/services/mes/api.js';
|
import BASE_URL from '@/services/mes/api.js';
|
||||||
|
|
||||||
|
import XEUtils from 'xe-utils' // 加载xe-utils
|
||||||
import JSONbig from 'json-bigint'
|
import JSONbig from 'json-bigint'
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
|
|
@ -218,7 +224,7 @@ export default {
|
||||||
params: {
|
params: {
|
||||||
dataType: "object",
|
dataType: "object",
|
||||||
valueField: "id",
|
valueField: "id",
|
||||||
textField: "code"
|
textField: "name"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -231,7 +237,7 @@ export default {
|
||||||
params: {
|
params: {
|
||||||
dataType: "object",
|
dataType: "object",
|
||||||
valueField: "id",
|
valueField: "id",
|
||||||
textField: "code"
|
textField: "name"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -432,6 +438,7 @@ export default {
|
||||||
}, 20);
|
}, 20);
|
||||||
|
|
||||||
|
|
||||||
|
this.searchName = '';
|
||||||
input.value = '';
|
input.value = '';
|
||||||
this.scanEntry = '';
|
this.scanEntry = '';
|
||||||
return;
|
return;
|
||||||
|
|
@ -441,6 +448,7 @@ export default {
|
||||||
|
|
||||||
input.value = '';
|
input.value = '';
|
||||||
|
|
||||||
|
this.searchName = '';
|
||||||
this.scanEntry = '';
|
this.scanEntry = '';
|
||||||
|
|
||||||
}, 10);
|
}, 10);
|
||||||
|
|
@ -495,6 +503,25 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
getDateValueString(v) {
|
||||||
|
if (!v) return '';
|
||||||
|
return XEUtils.toDateString(new Date(v * 1000), 'yyyy-MM-dd');
|
||||||
|
},
|
||||||
|
|
||||||
|
resetProcesses() {
|
||||||
|
let ds = JSON.parse(JSON.stringify(this.detailsData || []))
|
||||||
|
let newDs = [];
|
||||||
|
this.current_mold_production_order_component_processes.forEach(item => {
|
||||||
|
ds.forEach(o => {
|
||||||
|
if (item.id.toString() == o.id.toString()) {
|
||||||
|
newDs.push(item);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.detailsData = newDs;
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
loadDepartment({ id, code }) {
|
loadDepartment({ id, code }) {
|
||||||
let ds = [];
|
let ds = [];
|
||||||
|
|
||||||
|
|
@ -532,7 +559,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
loadProductionOrder({ id }) {
|
loadProductionOrder({ id, resetProcesses }) {
|
||||||
|
|
||||||
this.currentId = id;
|
this.currentId = id;
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
|
@ -557,10 +584,14 @@ export default {
|
||||||
this.formOptions2.data = data2
|
this.formOptions2.data = data2
|
||||||
this.formOptions3.data = data3
|
this.formOptions3.data = data3
|
||||||
this.current_mold_production_order_component_processes = row.mold_production_order_component_processes;
|
this.current_mold_production_order_component_processes = row.mold_production_order_component_processes;
|
||||||
this.detailsData = [];
|
|
||||||
|
|
||||||
|
if (resetProcesses === true) {
|
||||||
|
this.resetProcesses();
|
||||||
|
}else{
|
||||||
|
|
||||||
|
this.detailsData = [];
|
||||||
|
}
|
||||||
|
|
||||||
//this.detailsData = JSON.parse(JSON.stringify(row.mold_production_order_component_processes || []));
|
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -573,7 +604,7 @@ export default {
|
||||||
}).then(a => {
|
}).then(a => {
|
||||||
|
|
||||||
let row = a.data.mold_production_order_component_processes;
|
let row = a.data.mold_production_order_component_processes;
|
||||||
this.loadProductionOrder(row.production_id);
|
this.loadProductionOrder({id:row.production_id});
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -676,7 +707,7 @@ export default {
|
||||||
if (a.code == 200) {
|
if (a.code == 200) {
|
||||||
this.$mk.success("操作成功");
|
this.$mk.success("操作成功");
|
||||||
|
|
||||||
this.loadProductionOrder({ id: this.currentId });
|
this.loadProductionOrder({ id: this.currentId, resetProcesses: true });
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue