|
|
@@ -35,31 +35,18 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
- <el-col
|
|
|
- :lg="8"
|
|
|
- :md="12"
|
|
|
- :sm="12"
|
|
|
- :xl="8"
|
|
|
- :xs="12"
|
|
|
- v-if="clientEnvironmentId != 9"
|
|
|
- >
|
|
|
+ <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
|
|
|
<el-form-item label="执行部门:" prop="beEntrustedDeptId">
|
|
|
<deptSelect
|
|
|
+ ref="deptSelect"
|
|
|
v-model="form.beEntrustedDeptId"
|
|
|
@changeGroup="beEntrustedDeptIdChange"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
- <el-col
|
|
|
- :lg="8"
|
|
|
- :md="12"
|
|
|
- :sm="12"
|
|
|
- :xl="8"
|
|
|
- :xs="12"
|
|
|
- v-if="clientEnvironmentId != 9"
|
|
|
- >
|
|
|
- <el-form-item label="执行人员:" prop="executeUserId">
|
|
|
+ <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
|
|
|
+ <el-form-item label="执行人员:">
|
|
|
<el-select
|
|
|
style="width: 100%"
|
|
|
v-model="form.executeUserId"
|
|
|
@@ -235,32 +222,34 @@
|
|
|
import deptSelect from '@/components/CommomSelect/dept-select.vue';
|
|
|
import { getTemplateById } from '@/api/produce/bom.js';
|
|
|
import inspectionTemplatePop from '@/views/produce/components/bom/qualityTesting/inspectionTemplate.vue';
|
|
|
+
|
|
|
+ const initForm = () => ({
|
|
|
+ order: '',
|
|
|
+ endDate: '',
|
|
|
+ name: '',
|
|
|
+ applyDeptId: '',
|
|
|
+ applyDeptName: '',
|
|
|
+ priority: '',
|
|
|
+ beEntrustedDeptId: '',
|
|
|
+ executeUserId: '',
|
|
|
+ beEntrustedDeptName: '',
|
|
|
+ executeUserName: '',
|
|
|
+ id: '',
|
|
|
+ itemIds: [],
|
|
|
+ clientEnvironmentId: ''
|
|
|
+ });
|
|
|
export default {
|
|
|
components: { deptSelect, inspectionTemplatePop },
|
|
|
|
|
|
data() {
|
|
|
return {
|
|
|
- form: {
|
|
|
- order: '',
|
|
|
- endDate: '',
|
|
|
- name: '',
|
|
|
- applyDeptId: '',
|
|
|
- applyDeptName: '',
|
|
|
- priority: '',
|
|
|
- beEntrustedDeptId: '',
|
|
|
- executeUserId: '',
|
|
|
- beEntrustedDeptName: '',
|
|
|
- executeUserName: '',
|
|
|
- id: '',
|
|
|
- itemIds: [],
|
|
|
- clientEnvironmentId: ''
|
|
|
- },
|
|
|
+ form: initForm(),
|
|
|
rules: {
|
|
|
name: [{ required: true, message: '请输入', trigger: 'change' }],
|
|
|
|
|
|
- executeUserId: [
|
|
|
- { required: true, message: '请选择', trigger: 'change' }
|
|
|
- ],
|
|
|
+ // executeUserId: [
|
|
|
+ // { required: true, message: '请选择', trigger: 'change' }
|
|
|
+ // ],
|
|
|
beEntrustedDeptId: [
|
|
|
{ required: true, message: '请选择', trigger: 'change' }
|
|
|
],
|
|
|
@@ -284,6 +273,7 @@
|
|
|
value: 2
|
|
|
}
|
|
|
],
|
|
|
+ treeData: [],
|
|
|
isAdd: false
|
|
|
};
|
|
|
},
|
|
|
@@ -348,13 +338,21 @@
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
- open(item) {
|
|
|
+ async open(item) {
|
|
|
this.visible = true;
|
|
|
+ this.form = initForm();
|
|
|
this.clientEnvironmentId =
|
|
|
this.$store.state.user.info.clientEnvironmentId;
|
|
|
+
|
|
|
this.isAdd = false;
|
|
|
this.item = this.deepCopy(item);
|
|
|
this.getData();
|
|
|
+
|
|
|
+ if (this.clientEnvironmentId == 9) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.deptSelect?.locateByName('综合管理室');
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
cancel() {
|
|
|
@@ -466,38 +464,6 @@
|
|
|
console.log(e);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- // submitSelf() {
|
|
|
- // this.$refs.form.validate((valid) => {
|
|
|
- // if (!valid) {
|
|
|
- // return false;
|
|
|
- // }
|
|
|
-
|
|
|
- // if (this.selection.length == 0) {
|
|
|
- // return this.$message.warning('请选择需要请托的质检项');
|
|
|
- // }
|
|
|
-
|
|
|
- // const userData = this.userList.find(
|
|
|
- // (item) => item.id == this.form.executeUserId
|
|
|
- // );
|
|
|
-
|
|
|
- // this.form.executeUserName = userData.name;
|
|
|
- // this.form.applyDeptId = this.$store.state.user.info.groupId;
|
|
|
- // this.form.applyDeptName = this.$store.state.user.info.groupName;
|
|
|
-
|
|
|
- // this.form.id = this.item.id;
|
|
|
-
|
|
|
- // this.form.itemIds = this.selection.map((item) => {
|
|
|
- // return item.id;
|
|
|
- // });
|
|
|
-
|
|
|
- // inspectionRequest(this.form).then((res) => {
|
|
|
- // this.$message.success('请托成功');
|
|
|
- // this.cancel();
|
|
|
- // this.$emit('refreshData');
|
|
|
- // });
|
|
|
- // });
|
|
|
- // }
|
|
|
}
|
|
|
};
|
|
|
</script>
|