Browse Source

修改外部单位存储功能

Liuqi 6 years ago
parent
commit
4800165072
19 changed files with 235 additions and 95 deletions
  1. 1 1
      src/dashoo.cn/frontend_web/src/pages/lims/reportairfoamgenerator/subdata/datalist.vue
  2. 28 6
      src/dashoo.cn/frontend_web/src/pages/lims/reportairfoamgenerator/subdata/datamain.vue
  3. 7 3
      src/dashoo.cn/frontend_web/src/pages/lims/reportairfoamgenerator/subdata/dataopera.vue
  4. 1 1
      src/dashoo.cn/frontend_web/src/pages/lims/reportatmosvalve/subdata/datalist.vue
  5. 40 18
      src/dashoo.cn/frontend_web/src/pages/lims/reportatmosvalve/subdata/datamain.vue
  6. 7 3
      src/dashoo.cn/frontend_web/src/pages/lims/reportatmosvalve/subdata/dataopera.vue
  7. 35 13
      src/dashoo.cn/frontend_web/src/pages/lims/reportbeampumpingUnits/subdata/dataopera.vue
  8. 8 4
      src/dashoo.cn/frontend_web/src/pages/lims/reportelecground/subdata/datalist.vue
  9. 5 3
      src/dashoo.cn/frontend_web/src/pages/lims/reportelecground/subdata/dataopera.vue
  10. 1 1
      src/dashoo.cn/frontend_web/src/pages/lims/reporthydraulicsafe/subdata/datalist.vue
  11. 29 8
      src/dashoo.cn/frontend_web/src/pages/lims/reporthydraulicsafe/subdata/datamain.vue
  12. 7 3
      src/dashoo.cn/frontend_web/src/pages/lims/reporthydraulicsafe/subdata/dataopera.vue
  13. 5 3
      src/dashoo.cn/frontend_web/src/pages/lims/reportleakprotect/subdata/datamain.vue
  14. 12 9
      src/dashoo.cn/frontend_web/src/pages/lims/reportleakprotect/subdata/dataopera.vue
  15. 3 1
      src/dashoo.cn/frontend_web/src/pages/lims/reportlightprotect/datareview.vue
  16. 5 1
      src/dashoo.cn/frontend_web/src/pages/lims/reportlightprotect/subdata/datamain.vue
  17. 5 3
      src/dashoo.cn/frontend_web/src/pages/lims/reportlightprotect/subdata/dataopera.vue
  18. 35 13
      src/dashoo.cn/frontend_web/src/pages/lims/reportnobeampumpingUnits/subdata/dataopera.vue
  19. 1 1
      src/dashoo.cn/frontend_web/src/pages/lims/reportzuhq/subdata/datamain.vue

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/lims/reportairfoamgenerator/subdata/datalist.vue

@@ -712,7 +712,7 @@
             return
           }
           // 刷新子列表
-          this.$refs['DataoperaCompoment'].resetFormData()
+          this.$refs['DataoperaCompoment'].resetFormData(res.data.PositionCheckId)
           this.$refs['DataoperaCompoment'].dialogVisible = true
         }).catch(error => {
           console.log(error)

+ 28 - 6
src/dashoo.cn/frontend_web/src/pages/lims/reportairfoamgenerator/subdata/datamain.vue

@@ -34,6 +34,14 @@
                   title="添加检测地点"
                   width="200"
                   trigger="click">
+                  <el-select ref="selectTestDepart" size="small" v-model="TestDepartId" filterable placeholder="请选择" style="width: 100%; margin-bottom: 10px">
+                    <el-option
+                      v-for="item in TestDepartOptions"
+                      :key="item.Id"
+                      :label="item.Fullname"
+                      :value="item.Id">
+                    </el-option>
+                  </el-select>
                   <el-input ref="inputPositionCheck" v-model="PositionCheck" size="small" style="width: 70%"></el-input>
                   <el-button size="small" style="width: 30%; text-align: center" @click="addPositionCheck">保存</el-button>
                   <el-button slot="reference" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3" v-if=" IsInner != 1"><i class="el-icon-plus"></i>
@@ -129,6 +137,7 @@
 
     data () {
       return {
+        TestDepartId: '',
         Descdisabled: true,
         activeName: '1',
         IsInner: 0,
@@ -148,6 +157,7 @@
         ProblemOptions: [],
         ProblemLocationOptions: [],
         MainProductsList: [],
+        TestDepartOptions: [],
         props: {
           label: 'ItemName',
           value: 'ItemName',
@@ -256,11 +266,19 @@
           console.error(err)
         })
       },
+      getAllGrade (customerId) {
+        this.$axios.get('/limsreportelecground/allgradeinfo/' + customerId).then(res => {
+          this.TestDepartOptions = res.data.items['ThiUnits']
+        }).catch(err => {
+          console.error(err)
+        })
+      },
 
       getEntrustInfo (EId) {
         entrustApi.getEntrustInfo(EId, this.$axios).then(res => {
           this.EntrustCorp = res.data.CustomerId
           this.EntrustCorpName = res.data.CustomerName
+          this.getAllGrade(this.EntrustCorp)
           this.getEntrustCorpItems(this.EntrustCorp)
         }).catch(err => {
           // handle error
@@ -332,23 +350,27 @@
         }
         let params = {
           CustomerId: this.EntrustCorp,
-          ParentId: this.formData.TestDepartId,
-          PositionName: PositionCheck
+          ParentId: 0,
+          PositionName: PositionCheck,
+          ThrUnitId: this.TestDepartId,
+          ThrUnit: this.$refs.selectTestDepart.selectedLabel + '',
+          PositionType: '检测地点',
+          PositionTypeId: '1'
         }
         if (PositionCheck !== '' && !this.in_array_positionname(PositionCheck, this.PositionCheckOptionsBackUp)) {
           this.$axios.post('/limsdataentry/addDistrict', params)
             .then(res => {
               if (res.data.code === 0) {
+                this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
                 this.PositionCheckOptionsBackUp.push(res.data.item)
                 this.PositionCheckOptions = this.PositionCheckOptionsBackUp
                 let _this = this
                 setTimeout(function () {
                   _this.formData.PositionCheckId = res.data.item.Id
                 }, 200)
-                this.$message({
-                  type: 'success',
-                  message: res.data.message
-                })
               } else {
                 this.$message({
                   type: 'warning',

+ 7 - 3
src/dashoo.cn/frontend_web/src/pages/lims/reportairfoamgenerator/subdata/dataopera.vue

@@ -254,6 +254,7 @@
     },
     data () {
       return {
+        PositionCheckId: '',
         continueInsertChecked: false,
         Descdisabled: true,
         dialogVisible: false,
@@ -466,8 +467,10 @@
         }
         let params = {
           CustomerId: this.formData.EntrustCorp,
-          ParentId: this.formData.PositionCheckId,
-          PositionName: selectPosition
+          ParentId: this.PositionCheckId,
+          PositionName: selectPosition,
+          PositionType: '安装位置',
+          PositionTypeId: '2'
         }
         if (selectPosition !== '' && !this.in_array_positionname(selectPosition, this.PositionOptions)) {
           this.$axios.post('/limsdataentry/addDistrict', params)
@@ -741,7 +744,8 @@
         this.saveBtnName = '新增'
         this.saveEntity()
       },
-      resetFormData () {
+      resetFormData (PId) {
+        this.PositionCheckId = PId
         Object.assign(this.formData, this.historyData)
         this.saveBtnName = '新增'
         this.formData.Id = 0

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/lims/reportatmosvalve/subdata/datalist.vue

@@ -1580,7 +1580,7 @@
             return
           }
           // 刷新子列表
-          this.$refs['DataoperaCompoment'].resetFormData()
+          this.$refs['DataoperaCompoment'].resetFormData(res.data.PositionCheckId)
           this.$refs['DataoperaCompoment'].dialogVisible = true
         }).catch(error => {
           console.log(error)

+ 40 - 18
src/dashoo.cn/frontend_web/src/pages/lims/reportatmosvalve/subdata/datamain.vue

@@ -33,18 +33,26 @@
                     :value="item.Id">
                   </el-option>
                 </el-select>
-                <template>
-                  <el-popover
-                    placement="left"
-                    title="添加检测地点"
-                    width="200"
-                    trigger="click">
-                    <el-input ref="inputPositionCheck" v-model="PositionCheck" size="small" style="width: 70%"></el-input>
-                    <el-button size="small" style="width: 30%; text-align: center" @click="addPositionCheck">保存</el-button>
-                    <el-button slot="reference" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3" v-if=" IsInner != 1"><i class="el-icon-plus"></i>
-                    </el-button>
-                  </el-popover>
-                </template>
+              <template>
+                <el-popover
+                  placement="left"
+                  title="添加检测地点"
+                  width="200"
+                  trigger="click">
+                  <el-select ref="selectTestDepart" size="small" v-model="TestDepartId" filterable placeholder="请选择" style="width: 100%; margin-bottom: 10px">
+                    <el-option
+                      v-for="item in TestDepartOptions"
+                      :key="item.Id"
+                      :label="item.Fullname"
+                      :value="item.Id">
+                    </el-option>
+                  </el-select>
+                  <el-input ref="inputPositionCheck" v-model="PositionCheck" size="small" style="width: 70%"></el-input>
+                  <el-button size="small" style="width: 30%; text-align: center" @click="addPositionCheck">保存</el-button>
+                  <el-button slot="reference" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3" v-if=" IsInner != 1"><i class="el-icon-plus"></i>
+                  </el-button>
+                </el-popover>
+              </template>
               </el-form-item>
             </el-col>
             <el-col :span="8">
@@ -174,6 +182,7 @@
     },
     data () {
       return {
+        TestDepartId: '',
         Descdisabled: true,
         activeName: '1',
         IsInner: 0,
@@ -196,6 +205,7 @@
         SpecOptions: [],
         selectedOptions: [],
         instrumentgroup: [],
+        TestDepartOptions: [],
         props: {
           label: 'ItemName',
           value: 'ItemName',
@@ -319,11 +329,19 @@
           console.error(err)
         })
       },
+      getAllGrade (customerId) {
+        this.$axios.get('/limsreportelecground/allgradeinfo/' + customerId).then(res => {
+          this.TestDepartOptions = res.data.items['ThiUnits']
+        }).catch(err => {
+          console.error(err)
+        })
+      },
 
       getEntrustInfo (EId) {
         entrustApi.getEntrustInfo(EId, this.$axios).then(res => {
           this.EntrustCorp = res.data.CustomerId
           this.EntrustCorpName = res.data.CustomerName
+          this.getAllGrade(this.EntrustCorp)
           this.getEntrustCorpItems(this.EntrustCorp)
         }).catch(err => {
           // handle error
@@ -393,23 +411,27 @@
         }
         let params = {
           CustomerId: this.EntrustCorp,
-          ParentId: this.formData.TestDepartId,
-          PositionName: PositionCheck
+          ParentId: 0,
+          PositionName: PositionCheck,
+          ThrUnitId: this.TestDepartId,
+          ThrUnit: this.$refs.selectTestDepart.selectedLabel + '',
+          PositionType: '检测地点',
+          PositionTypeId: '1'
         }
         if (PositionCheck !== '' && !this.in_array_positionname(PositionCheck, this.PositionCheckOptionsBackUp)) {
           this.$axios.post('/limsdataentry/addDistrict', params)
             .then(res => {
               if (res.data.code === 0) {
+                this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
                 this.PositionCheckOptionsBackUp.push(res.data.item)
                 this.PositionCheckOptions = this.PositionCheckOptionsBackUp
                 let _this = this
                 setTimeout(function () {
                   _this.formData.PositionCheckId = res.data.item.Id
                 }, 200)
-                this.$message({
-                  type: 'success',
-                  message: res.data.message
-                })
               } else {
                 this.$message({
                   type: 'warning',

+ 7 - 3
src/dashoo.cn/frontend_web/src/pages/lims/reportatmosvalve/subdata/dataopera.vue

@@ -671,6 +671,7 @@
 
     data () {
       return {
+        PositionCheckId: '',
         continueInsertChecked: false,
         Descdisabled: true,
         dialogVisible: false,
@@ -978,8 +979,10 @@
         }
         let params = {
           CustomerId: this.formData.EntrustCorp,
-          ParentId: this.formData.PositionCheckId,
-          PositionName: selectPosition
+          ParentId: this.PositionCheckId,
+          PositionName: selectPosition,
+          PositionType: '安装位置',
+          PositionTypeId: '2'
         }
         if (selectPosition !== '' && !this.in_array_positionname(selectPosition, this.PositionOptions)) {
           this.$axios.post('/limsdataentry/addDistrict', params)
@@ -1706,7 +1709,8 @@
         this.saveBtnName = '新增'
         this.saveEntity()
       },
-      resetFormData () {
+      resetFormData (PId) {
+        this.PositionCheckId = PId
         Object.assign(this.formData, this.historyData)
         this.saveBtnName = '新增'
         this.formData.Id = 0

+ 35 - 13
src/dashoo.cn/frontend_web/src/pages/lims/reportbeampumpingUnits/subdata/dataopera.vue

@@ -61,18 +61,26 @@
                     </el-option>
                   </el-option-group>
                 </el-select>
-                <template>
-                  <el-popover
-                    placement="left"
-                    title="添加检测地点"
-                    width="200"
-                    trigger="click">
-                    <el-input ref="inputPositionCheck" v-model="PositionCheck" size="small" style="width: 70%"></el-input>
-                    <el-button size="small" style="width: 30%; text-align: center" @click="addPositionCheck">保存</el-button>
-                    <el-button slot="reference" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3 && DataStatus!=7" v-if="IsInner != 1"><i class="el-icon-plus"></i>
-                    </el-button>
-                  </el-popover>
-                </template>
+              <template>
+                <el-popover
+                  placement="left"
+                  title="添加检测地点"
+                  width="200"
+                  trigger="click">
+                  <el-select ref="selectTestDepart" size="small" v-model="TestDepartId" filterable placeholder="请选择" style="width: 100%; margin-bottom: 10px">
+                    <el-option
+                      v-for="item in TestDepartOptions"
+                      :key="item.Id"
+                      :label="item.Fullname"
+                      :value="item.Id">
+                    </el-option>
+                  </el-select>
+                  <el-input ref="inputPositionCheck" v-model="PositionCheck" size="small" style="width: 70%"></el-input>
+                  <el-button size="small" style="width: 30%; text-align: center" @click="addPositionCheck">保存</el-button>
+                  <el-button slot="reference" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3" v-if=" IsInner != 1"><i class="el-icon-plus"></i>
+                  </el-button>
+                </el-popover>
+              </template>
               </el-form-item>
             </el-col>
             <el-col :span="8">
@@ -417,6 +425,7 @@
     },
     data () {
       return {
+        TestDepartId: '',
         EntrustCorpName: '',
         ProoFreadShow: false,
         Descdisabled: true,
@@ -502,6 +511,7 @@
         StandardItemsOptions: [],
         PositionSelect: [],
         entityList: [],
+        TestDepartOptions: [],
         groupOptions: [{
           label: '未选择',
           options: []
@@ -771,7 +781,11 @@
         let params = {
           CustomerId: this.formData.EntrustCorp,
           ParentId: 0,
-          PositionName: selectPosition
+          PositionName: selectPosition,
+          ThrUnitId: this.TestDepartId,
+          ThrUnit: this.$refs.selectTestDepart.selectedLabel + '',
+          PositionType: '检测地点',
+          PositionTypeId: '1'
         }
         if (selectPosition !== '' && !this.in_array_positionname(selectPosition, this.PositionCheckOptions)) {
           this.$axios.post('/limsdataentry/addDistrict', params)
@@ -940,9 +954,17 @@
           console.error(err)
         })
       },
+      getAllGrade (customerId) {
+        this.$axios.get('/limsreportelecground/allgradeinfo/' + customerId).then(res => {
+          this.TestDepartOptions = res.data.items['ThiUnits']
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       getEntrustInfo (EId) {
         entrustApi.getEntrustInfo(EId, this.$axios).then(res => {
           this.formData.EntrustCorp = res.data.CustomerId
+          this.getAllGrade(this.formData.EntrustCorp)
           this.EntrustCorpName = res.data.CustomerName
           this.getEntrustCorpItems(this.formData.EntrustCorp)
           this.getSpecification(res.data.DetectSampleId)

+ 8 - 4
src/dashoo.cn/frontend_web/src/pages/lims/reportelecground/subdata/datalist.vue

@@ -578,10 +578,14 @@
         }
         let params = {
           CustomerId: this.EntrustCorp,
-          ParentId: this.formData.TestDepartId,
+          ParentId: 0,
+          ThrUnitId: this.formData.TestDepartId,
+          ThrUnit: this.$refs.selectTestDepart.selectedLabel + '',
+          PositionType: '检测地点',
+          PositionTypeId: '1',
           PositionName: PositionCheck
         }
-        if (PositionCheck !== '' && !this.in_array_positionname(PositionCheck, this.PositionCheckOptions)) {
+        if (PositionCheck !== '' && !this.in_array_positionname(PositionCheck, this.PositionCheckOptionsBackUp)) {
           this.$axios.post('/limsdataentry/addDistrict', params)
             .then(res => {
               if (res.data.code === 0) {
@@ -639,10 +643,10 @@
           if (valid) {
             this.formData.Instrument1 = this.CGRMeterOptions.join(',')
             this.formData.Instrument2 = this.GRMeterOptions.join(',')
-            /* if (this.formData.Instrument1 === '' || this.formData.Instrument2 === '') {
+            if (this.formData.Instrument1 === '' || this.formData.Instrument2 === '') {
               this.$message.warning('检测依据不能为空!')
               return
-            } */
+            }
             this.formData.PositionCheckId = parseInt(this.formData.PositionCheckId)
             this.formData.TestDepartId = parseInt(this.formData.TestDepartId)
             this.formData.TestDepart = this.$refs.selectTestDepart.selectedLabel + ''

+ 5 - 3
src/dashoo.cn/frontend_web/src/pages/lims/reportelecground/subdata/dataopera.vue

@@ -295,9 +295,11 @@
           return
         }
         let params = {
-          CustomerId: this.formData.EntrustCorp,
-          ParentId: this.formData.PositionCheckId,
-          PositionName: selectDistrict
+          CustomerId: parseInt(this.formData.EntrustCorp),
+          ParentId: parseInt(this.PositionCheckId),
+          PositionName: selectDistrict,
+          PositionType: '安装位置',
+          PositionTypeId: '2'
         }
         if (selectDistrict !== '' && !this.in_array_positionname(selectDistrict, this.DistrictOptions)) {
           this.$axios.post('/limsdataentry/addDistrict', params)

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/lims/reporthydraulicsafe/subdata/datalist.vue

@@ -819,7 +819,7 @@
             return
           }
           // 刷新子列表
-          this.$refs['DataoperaCompoment'].resetFormData()
+          this.$refs['DataoperaCompoment'].resetFormData(res.data.PositionCheckId)
           this.$refs['DataoperaCompoment'].dialogVisible = true
         }).catch(error => {
           console.log(error)

+ 29 - 8
src/dashoo.cn/frontend_web/src/pages/lims/reporthydraulicsafe/subdata/datamain.vue

@@ -38,9 +38,17 @@
                   title="添加检测地点"
                   width="200"
                   trigger="click">
+                  <el-select ref="selectTestDepart" size="small" v-model="TestDepartId" filterable placeholder="请选择" style="width: 100%; margin-bottom: 10px">
+                    <el-option
+                      v-for="item in TestDepartOptions"
+                      :key="item.Id"
+                      :label="item.Fullname"
+                      :value="item.Id">
+                    </el-option>
+                  </el-select>
                   <el-input ref="inputPositionCheck" v-model="PositionCheck" size="small" style="width: 70%"></el-input>
                   <el-button size="small" style="width: 30%; text-align: center" @click="addPositionCheck">保存</el-button>
-                  <el-button slot="reference" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3" v-if="IsInner != 1"><i class="el-icon-plus"></i>
+                  <el-button slot="reference" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3" v-if=" IsInner != 1"><i class="el-icon-plus"></i>
                   </el-button>
                 </el-popover>
               </template>
@@ -168,6 +176,7 @@
 
     data () {
       return {
+        TestDepartId: '',
         Descdisabled: true,
         activeName: '1',
         IsInner: 0,
@@ -186,7 +195,7 @@
         DifPressTranOptions: [],
         PositionOptionsSelect: [],
         instrumentgroup: [],
-
+        TestDepartOptions: [],
         props: {
           label: 'ItemName',
           value: 'ItemName',
@@ -315,11 +324,19 @@
           console.error(err)
         })
       },
+      getAllGrade (customerId) {
+        this.$axios.get('/limsreportelecground/allgradeinfo/' + customerId).then(res => {
+          this.TestDepartOptions = res.data.items['ThiUnits']
+        }).catch(err => {
+          console.error(err)
+        })
+      },
 
       getEntrustInfo (EId) {
         entrustApi.getEntrustInfo(EId, this.$axios).then(res => {
           this.EntrustCorp = res.data.CustomerId
           this.EntrustCorpName = res.data.CustomerName
+          this.getAllGrade(this.EntrustCorp)
           this.getEntrustCorpItems(this.EntrustCorp)
         }).catch(err => {
           // handle error
@@ -390,23 +407,27 @@
         }
         let params = {
           CustomerId: this.EntrustCorp,
-          ParentId: this.formData.TestDepartId,
-          PositionName: PositionCheck
+          ParentId: 0,
+          PositionName: PositionCheck,
+          ThrUnitId: this.TestDepartId,
+          ThrUnit: this.$refs.selectTestDepart.selectedLabel + '',
+          PositionType: '检测地点',
+          PositionTypeId: '1'
         }
         if (PositionCheck !== '' && !this.in_array_positionname(PositionCheck, this.PositionCheckOptionsBackUp)) {
           this.$axios.post('/limsdataentry/addDistrict', params)
             .then(res => {
               if (res.data.code === 0) {
+                this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
                 this.PositionCheckOptionsBackUp.push(res.data.item)
                 this.PositionCheckOptions = this.PositionCheckOptionsBackUp
                 let _this = this
                 setTimeout(function () {
                   _this.formData.PositionCheckId = res.data.item.Id
                 }, 200)
-                this.$message({
-                  type: 'success',
-                  message: res.data.message
-                })
               } else {
                 this.$message({
                   type: 'warning',

+ 7 - 3
src/dashoo.cn/frontend_web/src/pages/lims/reporthydraulicsafe/subdata/dataopera.vue

@@ -366,6 +366,7 @@
     },
     data () {
       return {
+        PositionCheckId: '',
         continueInsertChecked: false,
         Descdisabled: true,
         dialogVisible: false,
@@ -584,8 +585,10 @@
         }
         let params = {
           CustomerId: this.formData.EntrustCorp,
-          ParentId: this.formData.PositionCheckId,
-          PositionName: selectPosition
+          ParentId: this.PositionCheckId,
+          PositionName: selectPosition,
+          PositionType: '安装位置',
+          PositionTypeId: '2'
         }
         if (selectPosition !== '' && !this.in_array_positionname(selectPosition, this.PositionOptions)) {
           this.$axios.post('/limsdataentry/addDistrict', params)
@@ -973,7 +976,8 @@
         this.formData.Id = 0
         this.saveBtnName = '新增'
       },
-      resetFormData () {
+      resetFormData (PId) {
+        this.PositionCheckId = PId
         Object.assign(this.formData, this.historyData)
         this.saveBtnName = '新增'
         this.formData.Id = 0

+ 5 - 3
src/dashoo.cn/frontend_web/src/pages/lims/reportleakprotect/subdata/datamain.vue

@@ -336,16 +336,18 @@
         }
         let params = {
           CustomerId: this.EntrustCorp,
-          ParentId: this.formData.TestDepartId,
+          ParentId: 0,
+          ThrUnitId: this.formData.TestDepartId,
+          ThrUnit: this.$refs.selectTestDepart.selectedLabel + '',
+          PositionType: '检测地点',
+          PositionTypeId: '1',
           PositionName: PositionCheck
         }
         if (PositionCheck !== '' && !this.in_array_positionname(PositionCheck, this.PositionCheckOptionsBackUp)) {
           this.$axios.post('/limsdataentry/addDistrict', params)
             .then(res => {
               if (res.data.code === 0) {
-                // this.PositionCheckOptions.push(res.data.item)
                 this.PositionCheckOptionsBackUp.push(res.data.item)
-                // Object.assign(this.PositionCheckOptions, this.PositionCheckOptionsBackUp)
                 this.PositionCheckOptions = this.PositionCheckOptionsBackUp
                 let _this = this
                 setTimeout(function () {

+ 12 - 9
src/dashoo.cn/frontend_web/src/pages/lims/reportleakprotect/subdata/dataopera.vue

@@ -225,7 +225,7 @@
           DataEntryId: '',
           TestDepartId: '',
           PositionCheckId: '',
-          PositionId: 0,
+          PositionId: '',
           PositionCheck: '',
           Position: '',
           DetectBasis: '',
@@ -349,24 +349,27 @@
         }
       },
       addPosition () {
-        let selectPosition = this.Position
-        if (this.in_array_positionname(selectPosition, this.PositionOptions)) {
-          this.$message.warning(selectPosition + '已经存在!')
+        let selectDistrict = this.Position
+        if (this.in_array_positionname(selectDistrict, this.DistrictOptions)) {
+          this.$message.warning(selectDistrict + '已经存在!')
           return
         }
         let params = {
-          CustomerId: this.formData.EntrustCorp,
-          ParentId: this.formData.PositionCheckId,
-          PositionName: selectPosition
+          CustomerId: parseInt(this.formData.EntrustCorp),
+          ParentId: parseInt(this.PositionCheckId),
+          PositionName: selectDistrict,
+          PositionType: '安装位置',
+          PositionTypeId: '2'
         }
-        if (selectPosition !== '' && !this.in_array_positionname(selectPosition, this.PositionOptions)) {
+        if (selectDistrict !== '' && !this.in_array_positionname(selectDistrict, this.DistrictOptions)) {
           this.$axios.post('/limsdataentry/addDistrict', params)
             .then(res => {
               if (res.data.code === 0) {
                 this.AllGradeInfo.push(res.data.item)
                 this.groupOptions[0].options.push(res.data.item)
-                this.positionChange(res.data.item)
+                this.DistrictOptions.push(res.data.item)
                 Object.assign(this.groupOptions1, this.groupOptions[0].options)
+                // this.dd.push(res.data.item)
                 let _this = this
                 setTimeout(function () {
                   _this.formData.PositionId = res.data.item.Id

+ 3 - 1
src/dashoo.cn/frontend_web/src/pages/lims/reportlightprotect/datareview.vue

@@ -577,8 +577,10 @@
         this.initDatas()
       },
       addDataEntity () {
+        console.log(this.queryParams.DataEntryId)
         this.$axios.get('/limsdataentry/getdataentry/' + this.queryParams.DataEntryId).then(res => {
-          if (res.data.TestDepartId === '' || res.data.PositionCheckId === '') {
+          if (!res.data.TestDepartId || res.data.TestDepartId === '' ||
+            !res.data.PositionCheckId || res.data.PositionCheckId === '') {
             this.$message.warning('受检单位、检测地点不能为空!')
             return
           }

+ 5 - 1
src/dashoo.cn/frontend_web/src/pages/lims/reportlightprotect/subdata/datamain.vue

@@ -367,7 +367,11 @@
         }
         let params = {
           CustomerId: this.EntrustCorp,
-          ParentId: this.formData.TestDepartId,
+          ParentId: 0,
+          ThrUnitId: this.formData.TestDepartId,
+          ThrUnit: this.$refs.selectTestDepart.selectedLabel + '',
+          PositionType: '检测地点',
+          PositionTypeId: '1',
           PositionName: PositionCheck
         }
         if (PositionCheck !== '' && !this.in_array_positionname(PositionCheck, this.PositionCheckOptionsBackUp)) {

+ 5 - 3
src/dashoo.cn/frontend_web/src/pages/lims/reportlightprotect/subdata/dataopera.vue

@@ -319,9 +319,11 @@
           return
         }
         let params = {
-          CustomerId: this.formData.EntrustCorp,
-          ParentId: this.formData.PositionCheckId,
-          PositionName: selectDistrict
+          CustomerId: parseInt(this.formData.EntrustCorp),
+          ParentId: parseInt(this.PositionCheckId),
+          PositionName: selectDistrict,
+          PositionType: '安装位置',
+          PositionTypeId: '2'
         }
         if (selectDistrict !== '' && !this.in_array_positionname(selectDistrict, this.DistrictOptions)) {
           this.$axios.post('/limsdataentry/addDistrict', params)

+ 35 - 13
src/dashoo.cn/frontend_web/src/pages/lims/reportnobeampumpingUnits/subdata/dataopera.vue

@@ -67,18 +67,26 @@
                     </el-option>
                   </el-option-group>
                 </el-select>
-                <template>
-                  <el-popover
-                    placement="left"
-                    title="添加检测地点"
-                    width="200"
-                    trigger="click">
-                    <el-input ref="inputPositionCheck" v-model="PositionCheck" size="small" style="width: 70%"></el-input>
-                    <el-button size="small" style="width: 30%; text-align: center" @click="addPositionCheck">保存</el-button>
-                    <el-button slot="reference" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3 && DataStatus!=7" v-if="IsInner != 1"><i class="el-icon-plus"></i>
-                    </el-button>
-                  </el-popover>
-                </template>
+              <template>
+                <el-popover
+                  placement="left"
+                  title="添加检测地点"
+                  width="200"
+                  trigger="click">
+                  <el-select ref="selectTestDepart" size="small" v-model="TestDepartId" filterable placeholder="请选择" style="width: 100%; margin-bottom: 10px">
+                    <el-option
+                      v-for="item in TestDepartOptions"
+                      :key="item.Id"
+                      :label="item.Fullname"
+                      :value="item.Id">
+                    </el-option>
+                  </el-select>
+                  <el-input ref="inputPositionCheck" v-model="PositionCheck" size="small" style="width: 70%"></el-input>
+                  <el-button size="small" style="width: 30%; text-align: center" @click="addPositionCheck">保存</el-button>
+                  <el-button slot="reference" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3" v-if=" IsInner != 1"><i class="el-icon-plus"></i>
+                  </el-button>
+                </el-popover>
+              </template>
               </el-form-item>
             </el-col>
 
@@ -421,6 +429,7 @@
 
     data () {
       return {
+        TestDepartId: '',
         EntrustCorpName: '',
         IsInner: 0,
         ProoFreadShow: false,
@@ -501,6 +510,7 @@
         StandardItemsOptions: [],
         PositionSelect: [],
         entityList: [],
+        TestDepartOptions: [],
         groupOptions: [{
           label: '未选择',
           options: []
@@ -769,7 +779,11 @@
         let params = {
           CustomerId: this.formData.EntrustCorp,
           ParentId: 0,
-          PositionName: selectPosition
+          PositionName: selectPosition,
+          ThrUnitId: this.TestDepartId,
+          ThrUnit: this.$refs.selectTestDepart.selectedLabel + '',
+          PositionType: '检测地点',
+          PositionTypeId: '1'
         }
         if (selectPosition !== '' && !this.in_array_positionname(selectPosition, this.PositionCheckOptions)) {
           this.$axios.post('/limsdataentry/addDistrict', params)
@@ -938,9 +952,17 @@
           console.error(err)
         })
       },
+      getAllGrade (customerId) {
+        this.$axios.get('/limsreportelecground/allgradeinfo/' + customerId).then(res => {
+          this.TestDepartOptions = res.data.items['ThiUnits']
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       getEntrustInfo (EId) {
         entrustApi.getEntrustInfo(EId, this.$axios).then(res => {
           this.formData.EntrustCorp = res.data.CustomerId
+          this.getAllGrade(this.formData.EntrustCorp)
           this.EntrustCorpName = res.data.CustomerName
           this.getEntrustCorpItems(this.formData.EntrustCorp)
           this.getSpecification(res.data.DetectSampleId)

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/lims/reportzuhq/subdata/datamain.vue

@@ -38,7 +38,7 @@
                   title="添加检测地点"
                   width="200"
                   trigger="click">
-                  <el-select ref="selectTestDepart" size="small" v-model="TestDepartId" filterable placeholder="请选择" style="width: 100%">
+                  <el-select ref="selectTestDepart" size="small" v-model="TestDepartId" filterable placeholder="请选择" style="width: 100%; margin-bottom: 10px">
                     <el-option
                       v-for="item in TestDepartOptions"
                       :key="item.Id"