| | |
| | | </div> |
| | | <div class="search-item" style="margin-right: 10px;"> |
| | | <label style="width: 70px;">标准量</label> |
| | | <el-input v-model="packageInfo.num2" placeholder="请输入" size="small" @change="upNum"></el-input> |
| | | <el-input v-model="packageInfo.standNum" placeholder="请输入" size="small" @change="upNum"></el-input> |
| | | </div> |
| | | <div class="search-item"> |
| | | <label style="width: 70px;">检测量</label> |
| | | <el-input v-model="packageInfo.num3" placeholder="请输入" size="small" @change="upNum" |
| | | <el-input v-model="packageInfo.testNum" placeholder="请输入" size="small" @change="upNum" |
| | | :disabled="packageInfo.radio===0"></el-input> |
| | | </div> |
| | | </div> |
| | |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="num2" label="标量" show-overflow-tooltip align="center"> |
| | | <el-table-column prop="standNum" label="标量" show-overflow-tooltip align="center"> |
| | | </el-table-column> |
| | | <el-table-column prop="num3" label="测试量" show-overflow-tooltip align="center"> |
| | | <el-table-column prop="testNum" label="测试量" show-overflow-tooltip align="center"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | |
| | | packageInfo: { |
| | | radio: 1, |
| | | num1: null, |
| | | num2: null, |
| | | num3: null, |
| | | standNum: null, |
| | | testNum: null, |
| | | ismiers: false |
| | | }, |
| | | tableData: [], |
| | |
| | | }else{ |
| | | this.bushing = this.HaveJson(this.sample[0].bushing) |
| | | this.packageInfo.num1 = this.sample[0].bushing.length |
| | | this.packageInfo.num2 = this.sample[0].bushing[0].num2 |
| | | this.packageInfo.num3 = this.sample[0].bushing[0].num3 |
| | | this.packageInfo.standNum = this.sample[0].bushing[0].standNum |
| | | this.packageInfo.testNum = this.sample[0].bushing[0].testNum |
| | | this.bushing.forEach(a=>{ |
| | | if(a.fibers===null)a.fibers=[] |
| | | if(a.fiber===null)a.fiber=[] |
| | | if(this.packageInfo.ismiers){ |
| | | a.fibers.forEach(b=>{ |
| | | this.fibersList.push(b) |
| | |
| | | this.fibersList = [] |
| | | this.detectionItems = [] |
| | | if (this.packageInfo.radio === 0) { |
| | | this.packageInfo.num3 = this.packageInfo.num2 |
| | | this.packageInfo.testNum = this.packageInfo.standNum |
| | | } |
| | | if (parseInt(this.packageInfo.num2) < parseInt(this.packageInfo.num3)) { |
| | | this.packageInfo.num3 = this.packageInfo.num2 |
| | | if (parseInt(this.packageInfo.standNum) < parseInt(this.packageInfo.testNum)) { |
| | | this.packageInfo.testNum = this.packageInfo.standNum |
| | | } |
| | | if (this.packageInfo.num1 !== null && this.packageInfo.num1 !== '' && |
| | | this.packageInfo.num2 !== null && this.packageInfo.num2 !== '' && |
| | | this.packageInfo.num3 != null && this.packageInfo.num3 !== '') { |
| | | this.packageInfo.standNum !== null && this.packageInfo.standNum !== '' && |
| | | this.packageInfo.testNum != null && this.packageInfo.testNum !== '') { |
| | | let colors2 = [] |
| | | if (this.packageInfo.num1 / this.colors.length > 1) { |
| | | let num = this.packageInfo.num1 / this.colors.length |
| | |
| | | for (var i = 0; i < this.packageInfo.num1; i++) { |
| | | let bushing = { |
| | | color: colors2[i].label, |
| | | num2: this.packageInfo.num2, |
| | | num3: this.packageInfo.num3, |
| | | standNum: this.packageInfo.standNum, |
| | | testNum: this.packageInfo.testNum, |
| | | fibers: [], |
| | | fiber: [] |
| | | } |
| | |
| | | } else { |
| | | this.bushing = [] |
| | | } |
| | | console.log(1111111,this.bushing) |
| | | }, |
| | | getStandTreeBySampleType() { |
| | | this.$axios.post(this.$api.standardTree.getStandTreeBySampleType, { |
| | |
| | | } else { |
| | | this.selectBushing.forEach(a => { |
| | | a.fiber = [] |
| | | for (var i = 0; i < parseInt(a.num3); i++) { |
| | | for (var i = 0; i < parseInt(a.testNum); i++) { |
| | | let fiber = { |
| | | bushColor: a.color, |
| | | color: colors2[i].label, |
| | |
| | | this.selectBushing.forEach(a => { |
| | | a.fiber = [] |
| | | a.fibers = [] |
| | | for (var i = 0; i < parseInt(a.num3); i++) { |
| | | for (var i = 0; i < parseInt(a.testNum); i++) { |
| | | let fibers = { |
| | | code: null, |
| | | color: a.color, |
| | | model: this.miresModel, |
| | | standard: standard, |
| | | num: a.num3, |
| | | num: a.testNum, |
| | | productList: this.HaveJson(this.productList2), |
| | | fiber: [] |
| | | } |
| | |
| | | rowClickFiber(row, column, event){ |
| | | this.currentDetectionItems = row |
| | | this.detectionItems = row.productList |
| | | if(this.detectionItems === null) return |
| | | setTimeout(() => { |
| | | this.detectionItems.forEach(a => { |
| | | if (a.state == 1) this.toggleSelection(a) |
| | |
| | | }) |
| | | }, |
| | | save(){ |
| | | if(this.bushing.length === 0){ |
| | | this.$message.error('缺少配置无法保存') |
| | | return |
| | | } |
| | | for(let a in this.bushing){ |
| | | if(this.bushing[a].fibers.length===0&&this.bushing[a].fiber.length===0){ |
| | | this.$message.error(this.bushing[a].color+'管色标套管缺少配置无法保存') |
| | |
| | | a.bushing = this.bushing |
| | | }) |
| | | this.$message.success('已保存') |
| | | console.log(11111111,this.bushing) |
| | | console.log(this.bushing); |
| | | } |
| | | } |
| | | } |