|
|
@@ -488,12 +488,15 @@ export default {
|
|
488
|
488
|
id: options.id,
|
|
489
|
489
|
userId: this.$store.state.user.userInfo.userId,
|
|
490
|
490
|
}).then(res => {
|
|
491
|
|
- const key = ['costPrice','dictLabel','dictValue','goodPicFileList','indexntifuCode','origin','stockStatus']
|
|
|
491
|
+ const key = ['model','costPrice','dictLabel','dictValue','goodPicFileList','indexntifuCode','origin','stockStatus']
|
|
492
|
492
|
key.forEach(item => {
|
|
493
|
493
|
this.formData[item] = res.data[item]
|
|
494
|
494
|
})
|
|
495
|
495
|
this.recycleTime = this.$dayjs(res.data.recycleTime).format('YYYY-MM-DD') || ''
|
|
496
|
496
|
this.echoInfoType = res.data.type || '1'
|
|
|
497
|
+ this.echoInfoProductAttribute = '1'
|
|
|
498
|
+ this.echoInfoProductCondition = '1'
|
|
|
499
|
+ this.echoInfoStockStatus = res.data.stockStatus || '0'
|
|
497
|
500
|
});
|
|
498
|
501
|
}
|
|
499
|
502
|
})
|
|
|
@@ -518,20 +521,18 @@ export default {
|
|
518
|
521
|
continuousWarehousing: this.continuousWarehousing[0] || '0',//是否连续入库 1:是 0:否
|
|
519
|
522
|
}
|
|
520
|
523
|
uni.$u.api.wareHouseAdd(data).then(res => {
|
|
521
|
|
- if (res.code === 200) {
|
|
522
|
|
- uni.$u.toast('新增成功');
|
|
523
|
|
- if (data.continuousWarehousing == '0') {
|
|
524
|
|
- setTimeout(() => {
|
|
525
|
|
- uni.navigateBack({
|
|
526
|
|
- delta: 1
|
|
527
|
|
- });
|
|
528
|
|
- }, 1000);
|
|
529
|
|
- } else {
|
|
530
|
|
- this.clearForm();
|
|
531
|
|
- }
|
|
|
524
|
+ uni.$u.toast('操作成功');
|
|
|
525
|
+ if (data.continuousWarehousing == '0') {
|
|
|
526
|
+ setTimeout(() => {
|
|
|
527
|
+ uni.navigateBack({
|
|
|
528
|
+ delta: 1
|
|
|
529
|
+ });
|
|
|
530
|
+ }, 1000);
|
|
532
|
531
|
} else {
|
|
533
|
|
- uni.$u.toast(res.msg);
|
|
|
532
|
+ this.clearForm();
|
|
534
|
533
|
}
|
|
|
534
|
+ }).catch(err => {
|
|
|
535
|
+ uni.$u.toast(err.msg);
|
|
535
|
536
|
})
|
|
536
|
537
|
} else {
|
|
537
|
538
|
console.log('表单校验不通过');
|