yuhan hace 1 año
padre
commit
26eeb7c2e2

+ 28 - 25
itdmWeb/src/views/module-iTDM/gongdandetail/modules/ItdmGongdanDetailForm.vue

@@ -134,31 +134,34 @@ export default {
     },
     edit(record) {
       this.model = Object.assign({}, record)
-      var select={id:record.woId}
-      getAction('/itdmGongdanMaster/itdmGongdanMaster/queryById', select).then((res) => {
-        if (res.success) {
-          this.model.shijiShebeiId=res.result.shebeiId
-          this.model.shijiShiiyanType=res.result.shiiyanType
-          this.model.chuanganqi=res.result.chuanganqi
-
-
-
-
-
-
-        }
-      })
-
-      var selec1t={id:record.id}
-      getAction('/itdmGongdanDetail/itdmGongdanDetail/queryById', selec1t).then((res) => {
-        if (res.success) {
-          this.model.shijiWorkDate=res.result.shijiWorkDate
-          // this.model.shijiWorkDate=res.result.workDate
-          this.model.shijiStartTime=res.result.startTime
-          this.model.shijiEndTime=res.result.endTime
-        }
-      })
-
+      console.log(record)
+      if(record.updateTime){
+        // 第二次弹窗
+        var select={id:record.id}
+        getAction('/itdmGongdanDetail/itdmGongdanDetail/queryById', select).then((res) => {
+          if (res.success) {
+            this.model = res.result
+          }
+        })
+      } else {
+        // 第一次确认 没有数据  默认把计划数据带过来
+        var select1={id:record.woId}
+        getAction('/itdmGongdanMaster/itdmGongdanMaster/queryById', select1).then((res) => {
+          if (res.success) {
+            // 接口数据获取的
+            this.model.shijiShebeiId=res.result.shebeiId
+            this.model.chuanganqi=res.result.chuanganqi
+            this.model.shijiShiiyanType=res.result.shiiyanType
+            
+            // 表格当前行数据直接获取
+            // this.model.shijiShebeiId=record.jihuaDeviceId
+            // this.model.chuanganqi=record.chuanganqi
+            this.model.shijiWorkDate=record.workDate
+            this.model.shijiStartTime=record.startTime
+            this.model.shijiEndTime=record.endTime
+          }
+        })
+      }
       this.visible = true
     },
     submitForm() {

+ 7 - 1
itdmWeb/src/views/module-iTDM/itdmGongdanDetail/ItdmGongdanDetailList.vue

@@ -233,10 +233,16 @@ export default {
           dataIndex: 'weituoYangpinId_dictText'
         },
         {
-          title:'设备',
+          title:'计划设备',
           align:"center",
           dataIndex: 'shebeiId_dictText'
         },
+        // 有时间改改_dictText
+        {
+          title:'实际设备',
+          align:"center",
+          dataIndex: 'shijiShebeiId_dictText'
+        },
         {
           title:'试验类型',
           align:"center",

+ 2 - 2
itdmWeb/src/views/module-iTDM/itdmGongdanMaster/uGantt.vue

@@ -2,7 +2,7 @@
   <div class="gdDetail-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="70px">
         <el-form-item label="委托单位" prop="weituoClient">
-          <el-select v-model="queryParams.weituoClient" clearable placeholder="请选择委托单位" @change="getWeituoClientOptions">
+          <el-select v-model="queryParams.weituoClient" clearable filterable placeholder="请选择委托单位" @change="getWeituoClientOptions">
             <el-option
               v-for="item in weituoClientOptions"
               :key="item.value"
@@ -12,7 +12,7 @@
           </el-select>
         </el-form-item>
         <el-form-item label="委托编号" prop="weituoNo">
-          <el-select v-model="queryParams.weituoNo" clearable placeholder="请选择委托编号" @change="getWeituoNoOptions">
+          <el-select v-model="queryParams.weituoNo" clearable filterable placeholder="请选择委托编号" @change="getWeituoNoOptions">
             <el-option
               v-for="item in weituoNoOptions"
               :key="item.value"

+ 5 - 5
itdmWeb/src/views/module-iTDM/itdmGongdanMaster/uGantt2.vue

@@ -2,7 +2,7 @@
   <div class="gdPlan-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="70px">
         <el-form-item label="委托单位" prop="weituoClient">
-          <el-select v-model="queryParams.weituoClient" clearable placeholder="请选择委托单位" @change="getWeituoClientOptions">
+          <el-select v-model="queryParams.weituoClient" clearable filterable placeholder="请选择委托单位" @change="getWeituoClientOptions">
             <el-option
               v-for="item in weituoClientOptions"
               :key="item.value"
@@ -12,7 +12,7 @@
           </el-select>
         </el-form-item>
         <el-form-item label="委托编号" prop="weituoNo">
-          <el-select v-model="queryParams.weituoNo" clearable placeholder="请选择委托编号" @change="getWeituoNoOptions">
+          <el-select v-model="queryParams.weituoNo" clearable filterable placeholder="请选择委托编号" @change="getWeituoNoOptions">
             <el-option
               v-for="item in weituoNoOptions"
               :key="item.value"
@@ -95,7 +95,7 @@
             </template>
           </el-calendar>
           <el-form-item label="传感器" prop="chuanganqiArray">
-            <el-select v-model="currentDbEdit.chuanganqiArray" multiple placeholder="请选择传感器" style="width: 100%;">
+            <el-select v-model="currentDbEdit.chuanganqiArray" multiple filterable placeholder="请选择传感器" style="width: 100%;">
               <el-option
                 v-for="item in chuanganqi"
                 :key="item.value"
@@ -148,8 +148,8 @@ export default {
         { name: "weituoNo", label: "委托编号", width: 140, fixed: true, resize: true, align: "center", tree: true },
         { name: "testItems", label: "检测项目", width: 80, fixed: true, resize: true, align: "center"},
         { name: "sampleName", label: "样品名称", width: 80, fixed: true, resize: true, align: "center" },
-        { name: "start_date", label: "开始时间", width: 80, fixed: true, resize: true, align: "center" },
-        { name: "end_date", label: "结束时间", width: 80, fixed: true, resize: true, align: "center" },
+        { name: "start_date", label: "开始时间", width: 100, fixed: true, resize: true, align: "center" },
+        { name: "end_date", label: "结束时间", width: 100, fixed: true, resize: true, align: "center" },
         { name: "statusC", label: "状态", width: 60, fixed: true, resize: true, align: "center" },
         // { name: "add", label:"", width: 30 }
       ],