|
@@ -38,9 +38,17 @@
|
|
|
title="添加检测地点"
|
|
title="添加检测地点"
|
|
|
width="200"
|
|
width="200"
|
|
|
trigger="click">
|
|
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-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 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-button>
|
|
|
</el-popover>
|
|
</el-popover>
|
|
|
</template>
|
|
</template>
|
|
@@ -168,6 +176,7 @@
|
|
|
|
|
|
|
|
data () {
|
|
data () {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ TestDepartId: '',
|
|
|
Descdisabled: true,
|
|
Descdisabled: true,
|
|
|
activeName: '1',
|
|
activeName: '1',
|
|
|
IsInner: 0,
|
|
IsInner: 0,
|
|
@@ -186,7 +195,7 @@
|
|
|
DifPressTranOptions: [],
|
|
DifPressTranOptions: [],
|
|
|
PositionOptionsSelect: [],
|
|
PositionOptionsSelect: [],
|
|
|
instrumentgroup: [],
|
|
instrumentgroup: [],
|
|
|
-
|
|
|
|
|
|
|
+ TestDepartOptions: [],
|
|
|
props: {
|
|
props: {
|
|
|
label: 'ItemName',
|
|
label: 'ItemName',
|
|
|
value: 'ItemName',
|
|
value: 'ItemName',
|
|
@@ -315,11 +324,19 @@
|
|
|
console.error(err)
|
|
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) {
|
|
getEntrustInfo (EId) {
|
|
|
entrustApi.getEntrustInfo(EId, this.$axios).then(res => {
|
|
entrustApi.getEntrustInfo(EId, this.$axios).then(res => {
|
|
|
this.EntrustCorp = res.data.CustomerId
|
|
this.EntrustCorp = res.data.CustomerId
|
|
|
this.EntrustCorpName = res.data.CustomerName
|
|
this.EntrustCorpName = res.data.CustomerName
|
|
|
|
|
+ this.getAllGrade(this.EntrustCorp)
|
|
|
this.getEntrustCorpItems(this.EntrustCorp)
|
|
this.getEntrustCorpItems(this.EntrustCorp)
|
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
|
// handle error
|
|
// handle error
|
|
@@ -390,23 +407,27 @@
|
|
|
}
|
|
}
|
|
|
let params = {
|
|
let params = {
|
|
|
CustomerId: this.EntrustCorp,
|
|
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)) {
|
|
if (PositionCheck !== '' && !this.in_array_positionname(PositionCheck, this.PositionCheckOptionsBackUp)) {
|
|
|
this.$axios.post('/limsdataentry/addDistrict', params)
|
|
this.$axios.post('/limsdataentry/addDistrict', params)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
if (res.data.code === 0) {
|
|
if (res.data.code === 0) {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: 'success',
|
|
|
|
|
+ message: res.data.message
|
|
|
|
|
+ })
|
|
|
this.PositionCheckOptionsBackUp.push(res.data.item)
|
|
this.PositionCheckOptionsBackUp.push(res.data.item)
|
|
|
this.PositionCheckOptions = this.PositionCheckOptionsBackUp
|
|
this.PositionCheckOptions = this.PositionCheckOptionsBackUp
|
|
|
let _this = this
|
|
let _this = this
|
|
|
setTimeout(function () {
|
|
setTimeout(function () {
|
|
|
_this.formData.PositionCheckId = res.data.item.Id
|
|
_this.formData.PositionCheckId = res.data.item.Id
|
|
|
}, 200)
|
|
}, 200)
|
|
|
- this.$message({
|
|
|
|
|
- type: 'success',
|
|
|
|
|
- message: res.data.message
|
|
|
|
|
- })
|
|
|
|
|
} else {
|
|
} else {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
type: 'warning',
|
|
type: 'warning',
|