|
|
@@ -392,7 +392,7 @@
|
|
|
import { getFactoryarea } from '@/api/factoryModel';
|
|
|
|
|
|
import { getteampage, listUserByIds } from '@/api/workforceManagement/team';
|
|
|
-
|
|
|
+ import { getCode } from '@/api/codeManagement/index.js';
|
|
|
export default {
|
|
|
components: {
|
|
|
AreaSelect,
|
|
|
@@ -617,7 +617,7 @@
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
|
|
|
- open(type, row) {
|
|
|
+ async open(type, row) {
|
|
|
this.type = type;
|
|
|
this.visible = true;
|
|
|
if (type == 'edit' || type == 'copy') {
|
|
|
@@ -630,7 +630,7 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- this.getData(row.id);
|
|
|
+ await this.getData(row.id);
|
|
|
|
|
|
// 请求下拉数据
|
|
|
if (this.form.extInfo.factoryId) {
|
|
|
@@ -647,9 +647,9 @@
|
|
|
this.getUserPage();
|
|
|
}
|
|
|
}
|
|
|
- if (this.type == 'copy') {
|
|
|
- this.form.code = '';
|
|
|
- }
|
|
|
+ if (this.type != 'edit') {
|
|
|
+ this.form.code = await getCode('station_code');
|
|
|
+ }
|
|
|
this.getListWorkCenter();
|
|
|
this.getListProduce();
|
|
|
},
|
|
|
@@ -845,7 +845,7 @@
|
|
|
change_productionLineId() {},
|
|
|
// 请求详情
|
|
|
getData(id) {
|
|
|
- getById(id).then((res) => {
|
|
|
+ return getById(id).then((res) => {
|
|
|
if (
|
|
|
res.workstationSubstanceList &&
|
|
|
res.workstationSubstanceList.length > 0
|
|
|
@@ -862,9 +862,7 @@
|
|
|
if (res.taskList?.length) {
|
|
|
this.form.taskNames = res.taskList.map((i) => i.name);
|
|
|
}
|
|
|
- if (this.type == 'copy') {
|
|
|
- this.form.code = '';
|
|
|
- }
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
}
|