|
@@ -50,9 +50,9 @@ export class FbsAbnormalWorkingHoursUpdateComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
- .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();
|
|
|
- });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
- * 产品选择事件(获取产品名称、派工id)
|
|
|
+ * 订单号输入事件 ( 产品选择事件(获取产品名称、派工id)--前期逻辑根据选择的产品匹配)
|
|
|
*/
|
|
|
- productChange(event,data){
|
|
|
- if(event){
|
|
|
- this.productList.forEach(element => {
|
|
|
- if(event===element.productId){
|
|
|
- data.workshopDispatchListId=element.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;
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|