|
@@ -50,9 +50,9 @@ export class FbsAbnormalWorkingHoursUpdateComponent implements OnInit {
|
|
|
// .then(() => {
|
|
|
// return this.getTypeById();
|
|
|
// })
|
|
|
- .then(() => {
|
|
|
- return this.getProductList();
|
|
|
- })
|
|
|
+ // .then(() => {
|
|
|
+ // return this.getProductList();
|
|
|
+ // })
|
|
|
.then(() => {
|
|
|
this.saveLoading = false;
|
|
|
});
|
|
@@ -146,30 +146,57 @@ export class FbsAbnormalWorkingHoursUpdateComponent implements OnInit {
|
|
|
return new Promise(resolve => {
|
|
|
//时间格式化
|
|
|
let date = this.datePipe.transform(this.fbsAbnormalWorkingHours.date, 'yyyy-MM-dd HH:mm:ss');
|
|
|
- this.fbsAbnormalWorkingHoursService.getDispatchListByDate(date).then(response => {
|
|
|
- this.productList = response.result;
|
|
|
- resolve();
|
|
|
- });
|
|
|
+ // this.fbsAbnormalWorkingHoursService.getDispatchListByDate(date).then(response => {
|
|
|
+ // this.productList = response.result;
|
|
|
+ // resolve();
|
|
|
+ // });
|
|
|
});
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 产品选择事件(获取产品名称、派工id)
|
|
|
+ * 订单号输入事件 ( 产品选择事件(获取产品名称、派工id)--前期逻辑根据选择的产品匹配)
|
|
|
*/
|
|
|
- productChange(event,data){
|
|
|
- if(event){
|
|
|
- this.productList.forEach(element => {
|
|
|
- if(event===element.productId){
|
|
|
- data.workshopDispatchListId=element.id;//派工单id
|
|
|
- data.product=element.product;//产品名称
|
|
|
- data.plannedQuantity=element.plannedQuantity;//计划数量
|
|
|
- data.productionOrderNumberName=element.productionOrderNumberName;
|
|
|
- data.costItemCode=element.costItemCode;//项目编码
|
|
|
- data.projectName=element.projectName;//项目名称
|
|
|
- data.workCenter=element.workCenter;//工作中心
|
|
|
- }
|
|
|
- });
|
|
|
+ productChange(event,data){
|
|
|
+ if(!event){
|
|
|
+ this.nzNotificationService.warning("验证","请输入订单编号");
|
|
|
+ return;
|
|
|
}
|
|
|
+ this.fbsAbnormalWorkingHoursService.getDispatchListByDate(null,event).then((response)=>{
|
|
|
+ if(response.success){
|
|
|
+ this.productList=response.result;
|
|
|
+ if(this.productList==null||this.productList.length==0){
|
|
|
+ this.nzNotificationService.warning("验证","派工单未找到订单编号");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let element=this.productList[0]
|
|
|
+ data.workshopDispatchListId=element.id;//派工单id
|
|
|
+ data.productId=element.productId;
|
|
|
+ data.product=element.product;//产品名称
|
|
|
+ data.plannedQuantity=element.plannedQuantity;//计划数量
|
|
|
+ data.productionOrderNumberName=element.productionOrderNumberName;
|
|
|
+ data.costItemCode=element.costItemCode;//项目编码
|
|
|
+ data.projectName=element.projectName;//项目名称
|
|
|
+ data.workCenter=element.workCenter;//工作中心
|
|
|
+ }else{
|
|
|
+ this.nzNotificationService.warning("搜索失败",response.message);
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ // if(event){
|
|
|
+ // this.productList.forEach(element => {
|
|
|
+ // if(event===element.productId){
|
|
|
+ // data.workshopDispatchListId=element.id;//派工单id
|
|
|
+ // data.product=element.product;//产品名称
|
|
|
+ // data.plannedQuantity=element.plannedQuantity;//计划数量
|
|
|
+ // data.productionOrderNumberName=element.productionOrderNumberName;
|
|
|
+ // data.costItemCode=element.costItemCode;//项目编码
|
|
|
+ // data.projectName=element.projectName;//项目名称
|
|
|
+ // data.workCenter=element.workCenter;//工作中心
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
/**
|