|
|
@@ -167,7 +167,7 @@ export default {
|
|
|
crewIds: '',
|
|
|
workstationIds: '',
|
|
|
teamId: '',
|
|
|
- singleReport: this.clientEnvironmentId == 2 ? 0 : 1
|
|
|
+ singleReport: ''
|
|
|
},
|
|
|
|
|
|
rules: {
|
|
|
@@ -452,31 +452,37 @@ export default {
|
|
|
},
|
|
|
// 下达
|
|
|
confirm() {
|
|
|
- const loading = this.$loading({ text: '加载中...' });
|
|
|
-
|
|
|
- if (this.form.assignType * 1 == 2) {
|
|
|
- this.form.workstationIds = [];
|
|
|
- } else {
|
|
|
- this.form.crewIds = [];
|
|
|
- }
|
|
|
+ this.$refs.form.validate((valid)=>{
|
|
|
+ if (valid) {
|
|
|
+ const loading = this.$loading({ text: '加载中...' });
|
|
|
+
|
|
|
+ if (this.form.assignType * 1 == 2) {
|
|
|
+ this.form.workstationIds = [];
|
|
|
+ } else {
|
|
|
+ this.form.crewIds = [];
|
|
|
+ }
|
|
|
|
|
|
|
|
|
- releaseWorkOrder({
|
|
|
- id: this.current.id,
|
|
|
- ...this.form
|
|
|
+ releaseWorkOrder({
|
|
|
+ id: this.current.id,
|
|
|
+ ...this.form
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res) {
|
|
|
+ this.$message.success('成功');
|
|
|
+
|
|
|
+ this.reData();
|
|
|
+ this.reload();
|
|
|
+ this.visible = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
- if (res) {
|
|
|
- this.$message.success('成功');
|
|
|
|
|
|
- this.reData();
|
|
|
- this.reload();
|
|
|
- this.visible = false;
|
|
|
- }
|
|
|
- })
|
|
|
- .finally(() => {
|
|
|
- loading.close();
|
|
|
- });
|
|
|
},
|
|
|
close() {
|
|
|
this.visible = false;
|
|
|
@@ -488,7 +494,7 @@ export default {
|
|
|
crewIds: '',
|
|
|
workstationIds: '',
|
|
|
teamId: '',
|
|
|
- singleReport: this.clientEnvironmentId == 2 ? 0 : 1
|
|
|
+ singleReport: ''
|
|
|
};
|
|
|
},
|
|
|
|