| | |
| | | </div> |
| | | </div> |
| | | <div class="table-box"> |
| | | <el-table ref="commisionTable" :max-height="800" :cell-style="{textAlign: 'center'}" |
| | | :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}" |
| | | <el-table ref="commisionTable" :max-height="800" :cell-style="{textAlign: 'left'}" |
| | | :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'left'}" |
| | | :data="commisionTable" @selection-change="handleSelectionChange" style="width: 100%"> |
| | | <el-table-column type="selection" :selectable="checkSelect" min-width="10%" /> |
| | | <el-table-column type="index" label="序号" min-width="10%" /> |
| | |
| | | }, |
| | | handleSelectionChange(val) { |
| | | if (val.length > 1) { |
| | | let data = val.pop(); |
| | | this.$refs.commisionTable.clearSelection(); |
| | | this.$refs.commisionTable.toggleRowSelection(val.pop()) |
| | | this.$refs.commisionTable.toggleRowSelection(data); |
| | | this.checkData = data; |
| | | }else{ |
| | | this.checkData = val; |
| | | } |
| | | this.checkData = val; |
| | | console.log(this.checkData); |
| | | }, |
| | | //生成报检单确认按钮 |
| | | confirmBtn(formName) { |
| | |
| | | }, |
| | | //生成报检单请求 |
| | | async createReport(param) { |
| | | let res = await addInspect(param); |
| | | if(res.data==null)return |
| | | this.$message.success('报检成功') |
| | | this.$router.push(`/experiment/Viewdetails/${res.data}`) |
| | | await addInspect(param).then(res =>{ |
| | | this.search(); |
| | | this.$message.success('报检成功') |
| | | this.$router.push(`/experiment/Viewdetails/${res.data}`) |
| | | }).catch(()=>{ |
| | | this.$message.error('报检失败') |
| | | }); |
| | | }, |
| | | //生成报检单按钮 |
| | | addReportBtn() { |
| | |
| | | specifications : specifications, |
| | | version: version |
| | | }).then((res)=>{ |
| | | console.log(res); |
| | | var data = res.data; |
| | | for(var i=0;i<data.length;i++){ |
| | | data[i].id = "0" + i; |
| | | } |
| | | vm.standardLibraryData = res.data; |
| | | }) |
| | | }, |