Ver Fonte

fix(inspectionProjectTask): 修复任务下发时名称生成与字段显示问题

- 任务下发表单自动生成任务名称,避免名称为空
- 修复接收人表单项格式问题
- 总重量字段根据客户环境条件显示
- 交接表单自动填充分组并加载用户列表
yusheng há 4 dias atrás
pai
commit
51062a049c

+ 6 - 7
src/views/inspectionProjectTask/components/inspectionProjectTaskSend.vue

@@ -117,11 +117,7 @@
             /> </el-form-item
         ></el-col>
         <el-col :span="8">
-          <el-form-item
-            label="接收人"
-            prop="receiveUserId"
- 
-          >
+          <el-form-item label="接收人" prop="receiveUserId">
             <el-select
               v-model="form.receiveUserId"
               @change="changeExecutor"
@@ -174,7 +170,7 @@
   import deptSelect from '@/components/CommomSelect/dept-select.vue';
   import { getUserPage } from '@/api/system/organization';
   import { recordingMethodList } from '@/utils/util.js';
-
+  import { getCode } from '@/api/login/index.js';
   const defaultForm = {
     id: null,
     executeDeptId: '',
@@ -528,9 +524,12 @@
           }
         }
         //获取工单检测方案
-        await getById(this.form.qualityWorkOrderId).then((res) => {
+        await getById(this.form.qualityWorkOrderId).then(async (res) => {
           this.templateList = res.data.templateList;
           this.qualitySampleList = res.data.qualitySampleList;
+          if (!this.form.name) {
+            this.form.name = this.qualitySampleList[0].categoryName+ await getCode('inspection_project_task_name');
+          }
           this.recordingMethodChange();
           this.$nextTick(() => {
             this.$refs.table.setSelectedRowKeys(this.templateIdS);

+ 1 - 1
src/views/inspectionWork/components/baseInfo.vue

@@ -298,7 +298,7 @@
           </el-form-item>
         </el-col>
 
-        <el-col :span="6">
+        <el-col :span="6" v-if="$store.state.user.info.clientEnvironmentId!='9'">
           <el-form-item label="总重量:" prop="totalWeight">
             <el-input
               type="number"

+ 2 - 0
src/views/inspectionWork/components/transfer.vue

@@ -123,6 +123,8 @@
     },
     created() {
       this.form.id = this.id;
+      this.form.groupId = this.$store.state.user.info.groupId;
+      this.getUserList({ groupId: this.form.groupId });
     }
   };
 </script>