模具报工
This commit is contained in:
parent
5ea71c5dd5
commit
738e7a172e
|
|
@ -24,7 +24,8 @@
|
|||
<div>状态:{{ item.is_complete ? "已完成" : (item.is_send ? "已发料" : "未发料") }}</div>
|
||||
</div>
|
||||
<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 style="margin-left: 3px;" type="primary" @click="pageReport(item)"
|
||||
|
|
@ -32,11 +33,15 @@
|
|||
|
||||
<a-button style="margin-left: 3px;" @click="pageReport(item, true)"
|
||||
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 class="card-item-progress">
|
||||
|
||||
|
||||
<img v-if="item.component_detail && item.component_detail.image"
|
||||
style="width:50px;height:50px;margin-right: 10px;" :src="item.component_detail.image" />
|
||||
<span v-else></span>
|
||||
|
|
@ -109,6 +114,7 @@
|
|||
<script>
|
||||
import BASE_URL from '@/services/mes/api.js';
|
||||
|
||||
import XEUtils from 'xe-utils' // 加载xe-utils
|
||||
import JSONbig from 'json-bigint'
|
||||
export default {
|
||||
|
||||
|
|
@ -218,7 +224,7 @@ export default {
|
|||
params: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
textField: "code"
|
||||
textField: "name"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -231,7 +237,7 @@ export default {
|
|||
params: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
textField: "code"
|
||||
textField: "name"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -432,6 +438,7 @@ export default {
|
|||
}, 20);
|
||||
|
||||
|
||||
this.searchName = '';
|
||||
input.value = '';
|
||||
this.scanEntry = '';
|
||||
return;
|
||||
|
|
@ -441,6 +448,7 @@ export default {
|
|||
|
||||
input.value = '';
|
||||
|
||||
this.searchName = '';
|
||||
this.scanEntry = '';
|
||||
|
||||
}, 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 }) {
|
||||
let ds = [];
|
||||
|
||||
|
|
@ -532,7 +559,7 @@ export default {
|
|||
},
|
||||
|
||||
|
||||
loadProductionOrder({ id }) {
|
||||
loadProductionOrder({ id, resetProcesses }) {
|
||||
|
||||
this.currentId = id;
|
||||
this.loading = true
|
||||
|
|
@ -557,10 +584,14 @@ export default {
|
|||
this.formOptions2.data = data2
|
||||
this.formOptions3.data = data3
|
||||
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 => {
|
||||
|
||||
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) {
|
||||
this.$mk.success("操作成功");
|
||||
|
||||
this.loadProductionOrder({ id: this.currentId });
|
||||
this.loadProductionOrder({ id: this.currentId, resetProcesses: true });
|
||||
|
||||
} else {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue