|
@@ -39,8 +39,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-item-box">
|
|
|
- <el-form-item label="用途:" prop="data5" label-width="80px">
|
|
|
- <el-input v-model="newData.applyReason" placeholder="请输入用途" maxLength="100" style="width:348px;"></el-input>
|
|
|
+ <el-form-item label="归属人:" prop="applyUserId" label-width="80px">
|
|
|
+ <el-input v-model="newData.applyUserAll" placeholder="请输入归属人" maxLength="20" style="width:350px;"></el-input>
|
|
|
</el-form-item>
|
|
|
<div class="form-item-text-box">
|
|
|
<p>非管控液体已存储量:</p>
|
|
@@ -52,9 +52,10 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-item-box">
|
|
|
- <el-form-item label="归属人:" prop="applyUserId" label-width="80px">
|
|
|
- <el-input v-model="newData.applyUserAll" placeholder="请输入归属人" maxLength="20" style="width:350px;"></el-input>
|
|
|
+ <el-form-item label="用途:" prop="data5" label-width="80px">
|
|
|
+ <el-input v-model="newData.applyReason" placeholder="请输入用途" maxLength="100" style="width:348px;"></el-input>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
<div class="form-check-max-box">
|
|
|
<div class="form-check-box" @click="checkButton">
|
|
|
<div class="form-check" :class="newData.data3?'form-check-a':''">
|
|
@@ -164,7 +165,7 @@
|
|
|
</el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" prop="content" width="80" show-overflow-tooltip>
|
|
|
+ <el-table-column label="操作" prop="content" width="80" show-overflow-tooltip v-if="!newData.waitId">
|
|
|
<template slot-scope="scope">
|
|
|
<div class="table-button-box">
|
|
|
<p class="table-button-null"></p>
|
|
@@ -263,6 +264,8 @@
|
|
|
},
|
|
|
// 化学品列表
|
|
|
chemicalsOptions:[],
|
|
|
+ // 化学品列表临时存储
|
|
|
+ chemicalsOptionsArr:[],
|
|
|
// 实验室列表
|
|
|
subOptions:[],
|
|
|
// 人员列表
|
|
@@ -389,6 +392,9 @@
|
|
|
},
|
|
|
//添加化学品
|
|
|
addButton(){
|
|
|
+ if (this.newData.hxpStockWaitModelList){
|
|
|
+ this.$set(this,'chemicalsOptions',this.newData.hxpStockWaitModelList);
|
|
|
+ }
|
|
|
this.$set(this,'savePendingDialogType',true);
|
|
|
},
|
|
|
//关闭弹窗
|
|
@@ -400,6 +406,7 @@
|
|
|
let self = this;
|
|
|
let list=self.newData.hxpStockWaitModelList;
|
|
|
let result=[];
|
|
|
+ debugger
|
|
|
//每次新增时候判断一下,把新的id进行数据匹配老的数据不动
|
|
|
if (self.newData.hxpStockWaitModelList[0]){
|
|
|
const oldIds = self.newData.hxpStockWaitModelList.map(item => item.chemicalId)
|
|
@@ -407,11 +414,13 @@
|
|
|
}else{
|
|
|
result= self.dialogForm.hxpStockWaitModelList
|
|
|
}
|
|
|
+ console.log(result)
|
|
|
+ console.log(self.chemicalsOptions)
|
|
|
//通过化学品id获取到完成的化学品数据
|
|
|
for(let i=0;i<result.length;i++) {
|
|
|
- for(let b=0;b<self.chemicalsOptions.length;b++) {
|
|
|
- if (result[i]==self.chemicalsOptions[b].chemicalId){
|
|
|
- list.push(self.chemicalsOptions[b])
|
|
|
+ for(let b=0;b<self.chemicalsOptionsArr.length;b++) {
|
|
|
+ if (result[i]==self.chemicalsOptionsArr[b].chemicalId){
|
|
|
+ list.push(self.chemicalsOptionsArr[b])
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -434,6 +443,14 @@
|
|
|
if (!self.newData.data3){
|
|
|
this.$set(this.newData,'topicGroupId','');
|
|
|
this.$set(this.newData,'topicGroupName','');
|
|
|
+ this.$set(this.newData,'topicUserName','');
|
|
|
+ this.$set(this.newData,'topicUserPhone','');
|
|
|
+ }
|
|
|
+ for (let i=0;i<self.newData.hxpStockWaitModelList.length;i++){
|
|
|
+ if (!self.newData.hxpStockWaitModelList[i].normsNum || !self.newData.hxpStockWaitModelList[i].normsUnit || !self.newData.hxpStockWaitModelList[i].applyUnit || !self.newData.hxpStockWaitModelList[i].applyNum){
|
|
|
+ self.msgError('请输入['+self.newData.hxpStockWaitModelList[i].chemicalName+']规格/单位/数量!')
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
if (this.newData.waitId){//保存/编辑
|
|
|
chemicalStockWaitUpdate(self.newData).then( response => {
|
|
@@ -514,13 +531,13 @@
|
|
|
//选中化学品
|
|
|
chemicalsChange(val){
|
|
|
let self = this;
|
|
|
-
|
|
|
},
|
|
|
//搜索化学品
|
|
|
chemicalsSelectList(query){
|
|
|
if (query !== '' && query.length>1) {
|
|
|
chemicalChemicalGetList({"searchValue":query}).then(response => {
|
|
|
this.$set(this,'chemicalsOptions',response.data);
|
|
|
+ this.chemicalsOptionsArr=[...this.chemicalsOptionsArr,...response.data]
|
|
|
});
|
|
|
|
|
|
} else {
|