|
@@ -88,7 +88,7 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="指定:" prop="assignType">
|
|
<el-form-item label="指定:" prop="assignType">
|
|
|
- <el-radio-group v-model="form.assignType" size="mini">
|
|
|
|
|
|
|
+ <el-radio-group v-model="form.assignType" size="mini" @change="assignTypeFn">
|
|
|
<el-radio-button :label="1">工位</el-radio-button>
|
|
<el-radio-button :label="1">工位</el-radio-button>
|
|
|
<el-radio-button :label="2">人员</el-radio-button>
|
|
<el-radio-button :label="2">人员</el-radio-button>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
@@ -163,9 +163,9 @@ export default {
|
|
|
|
|
|
|
|
form: {
|
|
form: {
|
|
|
assignType: 1,
|
|
assignType: 1,
|
|
|
- crewIds:'',
|
|
|
|
|
- workstationIds:'',
|
|
|
|
|
- teamId:'',
|
|
|
|
|
|
|
+ crewIds: '',
|
|
|
|
|
+ workstationIds: '',
|
|
|
|
|
+ teamId: '',
|
|
|
singleReport: this.clientEnvironmentId == 2 ? 0 : 1
|
|
singleReport: this.clientEnvironmentId == 2 ? 0 : 1
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -376,6 +376,11 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ assignTypeFn(e) {
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
statusFormatter(status) {
|
|
statusFormatter(status) {
|
|
|
const obj = this.statusOpt.find((i) => i.value == status);
|
|
const obj = this.statusOpt.find((i) => i.value == status);
|
|
|
return obj && obj.label;
|
|
return obj && obj.label;
|
|
@@ -447,6 +452,13 @@ export default {
|
|
|
// 下达
|
|
// 下达
|
|
|
confirm() {
|
|
confirm() {
|
|
|
const loading = this.$loading({ text: '加载中...' });
|
|
const loading = this.$loading({ text: '加载中...' });
|
|
|
|
|
+ if (this.form.assignType * 1 == 2) {
|
|
|
|
|
+ this.form.workstationIds = [];
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.form.crewIds = [];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
releaseWorkOrder({
|
|
releaseWorkOrder({
|
|
|
id: this.current.id,
|
|
id: this.current.id,
|
|
|
...this.form
|
|
...this.form
|
|
@@ -454,7 +466,7 @@ export default {
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
if (res) {
|
|
if (res) {
|
|
|
this.$message.success('成功');
|
|
this.$message.success('成功');
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
this.reData();
|
|
this.reData();
|
|
|
this.reload();
|
|
this.reload();
|
|
|
this.visible = false;
|
|
this.visible = false;
|
|
@@ -464,18 +476,18 @@ export default {
|
|
|
loading.close();
|
|
loading.close();
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- close(){
|
|
|
|
|
|
|
+ close() {
|
|
|
this.visible = false;
|
|
this.visible = false;
|
|
|
this.reData();
|
|
this.reData();
|
|
|
},
|
|
},
|
|
|
- reData(){
|
|
|
|
|
- this.form= {
|
|
|
|
|
- assignType: 1,
|
|
|
|
|
- crewIds:'',
|
|
|
|
|
- workstationIds:'',
|
|
|
|
|
- teamId:'',
|
|
|
|
|
- singleReport: this.clientEnvironmentId == 2 ? 0 : 1
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ reData() {
|
|
|
|
|
+ this.form = {
|
|
|
|
|
+ assignType: 1,
|
|
|
|
|
+ crewIds: '',
|
|
|
|
|
+ workstationIds: '',
|
|
|
|
|
+ teamId: '',
|
|
|
|
|
+ singleReport: this.clientEnvironmentId == 2 ? 0 : 1
|
|
|
|
|
+ };
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/* 刷新表格 */
|
|
/* 刷新表格 */
|
|
@@ -517,12 +529,12 @@ export default {
|
|
|
this.teamsList = res;
|
|
this.teamsList = res;
|
|
|
|
|
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
- if(this.teamId){
|
|
|
|
|
-
|
|
|
|
|
|
|
+ if (this.teamId) {
|
|
|
|
|
+
|
|
|
this.$set(this.form, 'teamId', this.teamId);
|
|
this.$set(this.form, 'teamId', this.teamId);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// this.$refs.form.clearValidate();
|
|
// this.$refs.form.clearValidate();
|
|
|
})
|
|
})
|
|
|
|
|
|