|
|
@@ -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',
|