| | |
| | | |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | ref="tableDataRef2" |
| | | :data="tableDataDetail" |
| | | border |
| | | height="210px" |
| | |
| | | // do something with the new and old value of stepSelectedValue |
| | | console.log(val, 1) |
| | | console.log(this.stepTableData, 3) |
| | | |
| | | const arr = JSON.parse(JSON.stringify(this.stepTableData)) |
| | | console.log(arr, 33, this.dialogForm.mesqty) |
| | | const arrStepcode = arr.map(i => i.stepcode) |
| | | this.stepTableData = [] |
| | | val.forEach(i => { |
| | |
| | | if (i.stepdata.length > 0) { |
| | | i.stepdata.forEach(j => { |
| | | j.ratio = parseFloat(j.ratio) > 0 ? parseFloat(j.ratio) : 0 |
| | | j.sumqty = Math.round(parseFloat(i.canupdate_qty) * (1 + (parseFloat(j.ratio) > 0 ? parseFloat(j.ratio) / 100 : 0))) |
| | | // j.sumqty = Math.round(parseFloat(i.canupdate_qty) * (1 + (parseFloat(j.ratio) > 0 ? parseFloat(j.ratio) / 100 : 0))) |
| | | j.sumqty = Math.round(parseFloat(this.formData3[index].mesqty) * (1 + (parseFloat(j.ratio) > 0 ? parseFloat(j.ratio) / 100 : 0))) |
| | | }) |
| | | this.formData3[index].stepTableData = i.stepdata |
| | | this.formData3[index].stepSelectedValue = i.stepdata.map(j => j.stepcode) |
| | |
| | | stepname: i.stepname, |
| | | stepprice: i.stepprice, |
| | | ratio: parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) : 0, |
| | | sumqty: Math.round(parseFloat(res.canupdate_qty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0))) |
| | | // sumqty: Math.round(parseFloat(res.canupdate_qty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0))) |
| | | sumqty: Math.round(parseFloat(this.dialogForm.mesqty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0))) |
| | | } |
| | | ) |
| | | }) |
| | |
| | | stepname: i.stepname, |
| | | stepprice: i.stepprice, |
| | | ratio: parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) : 0, |
| | | sumqty: Math.round(parseFloat(res.canupdate_qty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0))) |
| | | // sumqty: Math.round(parseFloat(res.canupdate_qty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0))) |
| | | sumqty: Math.round(parseFloat(this.dialogForm.mesqty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0))) |
| | | } |
| | | ) |
| | | }) |
| | |
| | | } |
| | | this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367 |
| | | this.$refs.tableDataRef.doLayout() |
| | | this.$refs.tableDataRef2.doLayout() |
| | | }) |
| | | }, |
| | | // 工艺路线放大镜点击 |
| | |
| | | |
| | | this.$nextTick(() => { |
| | | this.$refs.tableDataRef.doLayout() |
| | | this.$refs.tableDataRef2.doLayout() |
| | | }) |
| | | return sums |
| | | } |