| | |
| | | >提 交</el-button |
| | | > |
| | | <el-button |
| | | icon="el-icon-download" |
| | | icon="el-icon-back" |
| | | @click=" |
| | | () => { |
| | | goBack(); |
| | |
| | | <el-col :span="7"> |
| | | <el-form-item label="供应商名称:"> |
| | | <el-input |
| | | :placeholder="detailId !== null ? '' : '请输入检验数量'" |
| | | :placeholder="detailId !== null ? '' : '请输入供应商名称'" |
| | | :disabled="detailId !== null" |
| | | v-model="detailInfo.supplier" |
| | | ></el-input> |
| | |
| | | <el-table :data="conclusionTable" style="100%"> |
| | | <el-table-column prop="code" label="物料编号"> </el-table-column> |
| | | <el-table-column prop="name" label="物料名称"> </el-table-column> |
| | | <el-table-column prop="uName" label="检验员"> |
| | | <el-table-column v-if="detailId != null" prop="uName" label="检验员"> |
| | | <template slot-scope="scope"> |
| | | <span |
| | | v-for="item in scope.row.uName" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { triggerRef } from "vue"; |
| | | import RawIns from "./raw-ins.vue"; |
| | | export default { |
| | | components: { RawIns }, |
| | |
| | | } else { |
| | | conclusion.testState = 1; |
| | | } |
| | | console.log([conclusion]); |
| | | return [conclusion]; |
| | | } |
| | | }, |
| | |
| | | this.projectTable = res.data.children; |
| | | this.projectTable.forEach(i => { |
| | | // 解决重新赋值无法编辑操作 |
| | | this.$set(i, "testValueList", i.testValue.split(",")); |
| | | if (i.testValue == null) { |
| | | this.$set(i, "testValueList", []); |
| | | } else { |
| | | this.$set(i, "testValueList", i.testValue.split(",")); |
| | | } |
| | | // 取最长的列表数 |
| | | if (i.testValueList.length > this.empiricalValueAdd) { |
| | | this.empiricalValueAdd = i.testValueList.length; |
| | |
| | | this.detailId = res.data; |
| | | this.getDetailInfo(); |
| | | this.$message.success(res.message); |
| | | this.goBack(); |
| | | }, |
| | | |
| | | // 修改项目的检测值改变结论 |
| | | async changeState(row, index) { |
| | | let val=row.testValueList.filter(item=>{ |
| | | return item!=''&&item!=null |
| | | }) |
| | | let eq=val.filter(item=>{ |
| | | return /^[^><=]/.test(item) |
| | | }) |
| | | if(eq.length>0){ |
| | | this.$message({ |
| | | message: "输入值["+eq+"]格式首位应包含>,<或者=", |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | if (this.detailId !== null) { |
| | | const res = await this.$axios.post(this.$api.url.updaterawInsProduct, { |
| | | DevId: row.deviceId, |
| | |
| | | async submitSave() { |
| | | const res = await this.$axios.post( |
| | | this.$api.url.updateRawInspectsById + `${this.detailId}` |
| | | ); |
| | | this.$message.success("提交成功"); |
| | | this.getDetailInfo(); |
| | | ).then(res=>{ |
| | | this.$message.success("提交成功"); |
| | | this.getDetailInfo(); |
| | | this.goBack() |
| | | }); |
| | | }, |
| | | // 获取设备树内容 |
| | | getOptions() { |
| | |
| | | name: "", |
| | | required: "", |
| | | textValue: "", |
| | | testState:null, |
| | | testValueList: [], |
| | | unit: "" |
| | | }; |