|
|
@@ -194,34 +194,32 @@
|
|
|
},
|
|
|
methods: {
|
|
|
handleReport () {
|
|
|
- this.$confirm('是否确定要报工?', '提示').then(() => {
|
|
|
- this.$refs.reportRef.report(async (data) => {
|
|
|
- // data.workReportCategoryList = data.workReportCategoryList || [
|
|
|
- // {
|
|
|
- // code: this.infoData.productCode,
|
|
|
- // name: this.infoData.productName,
|
|
|
- // rootCategoryLevelId: '1',
|
|
|
- // batchNo: '',
|
|
|
- // brandNum: this.infoData.brandNo
|
|
|
- // }
|
|
|
- // ];
|
|
|
- if (data.workReport) {
|
|
|
- data.workReport.taskCode = this.tabList[this.activeName].code;
|
|
|
- data.workReport.taskName = this.tabList[this.activeName].name;
|
|
|
- data.workReport.taskSort = this.tabList[this.activeName].sortNum;
|
|
|
- data.workReport.workOrderId = this.infoData.id;
|
|
|
- }
|
|
|
+ this.$refs.reportRef.report(async (data) => {
|
|
|
+ // data.workReportCategoryList = data.workReportCategoryList || [
|
|
|
+ // {
|
|
|
+ // code: this.infoData.productCode,
|
|
|
+ // name: this.infoData.productName,
|
|
|
+ // rootCategoryLevelId: '1',
|
|
|
+ // batchNo: '',
|
|
|
+ // brandNum: this.infoData.brandNo
|
|
|
+ // }
|
|
|
+ // ];
|
|
|
+ if (data.workReport) {
|
|
|
+ data.workReport.taskCode = this.tabList[this.activeName].code;
|
|
|
+ data.workReport.taskName = this.tabList[this.activeName].name;
|
|
|
+ data.workReport.taskSort = this.tabList[this.activeName].sortNum;
|
|
|
+ data.workReport.workOrderId = this.infoData.id;
|
|
|
+ }
|
|
|
|
|
|
- const params = {
|
|
|
- isSapReportState: 0,
|
|
|
- lastTaskCode:
|
|
|
- this.tabList[
|
|
|
- this.activeName > 0 ? this.activeName - 1 : this.activeName
|
|
|
- ].code,
|
|
|
- ...data
|
|
|
- };
|
|
|
- await report(params);
|
|
|
- });
|
|
|
+ const params = {
|
|
|
+ isSapReportState: 0,
|
|
|
+ lastTaskCode:
|
|
|
+ this.tabList[
|
|
|
+ this.activeName > 0 ? this.activeName - 1 : this.activeName
|
|
|
+ ].code,
|
|
|
+ ...data
|
|
|
+ };
|
|
|
+ await report(params);
|
|
|
});
|
|
|
},
|
|
|
async getDetail (id) {
|