小小儁爺
8 小时以前 d7c86ef866b5443c9f1408d64cd2ac511b262e92
src/views/workOrder/workOrderList.vue
@@ -505,6 +505,7 @@
      <div class="elTableDiv">
        <el-table
          ref="tableDataRef2"
          :data="tableDataDetail"
          border
          height="210px"
@@ -513,18 +514,18 @@
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
        >
          <!--          <el-table-column-->
          <!--            width="50"-->
          <!--            type="index"-->
          <!--            prop="序号"-->
          <!--            fixed-->
          <!--          />   -->
          <el-table-column
            width="50"
            prop="seq"
            label="序号"
            type="index"
            prop="序号"
            fixed
          />
          <!--          <el-table-column-->
          <!--            width="50"-->
          <!--            prop="seq"-->
          <!--            label="序号"-->
          <!--            fixed-->
          <!--          />-->
          <el-table-column
            prop="wo_code"
            show-tooltip-when-overflow
@@ -597,42 +598,24 @@
            show-tooltip-when-overflow
            prop="delive_qty"
          />
          <el-table-column
            label="操作"
            width="120"
            fixed="right"
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <el-tooltip v-del-tab-index class="item" effect="dark" content="SOP预览" placement="top">
                  <i
                    v-if="mesSetting.tech"
                    class="el-icon-files"
                    style="cursor: pointer;color:#42b983;margin-right: 15px"
                    @click="pre(row,2)"
                  />
                </el-tooltip>
                <!--                          <el-tooltip class="item" effect="dark" content="打印工序" placement="top">-->
                <!--                            <i-->
                <!--                              v-if="tableDataDetail.length!==row.seq"-->
                <!--                              class="el-icon-printer"-->
                <!--                              :style="{color:$store.state.settings.theme}"-->
                <!--                              style="cursor: pointer;margin-right: 15px"-->
                <!--                              @click="supplementSmallClick(row)"-->
                <!--                            />-->
                <!--                          </el-tooltip>-->
                <!--                          <el-tooltip class="item" effect="dark" content="补打生产入库条码" placement="top">-->
                <!--                            <i-->
                <!--                              v-if="tableDataDetail.length===row.seq"-->
                <!--                              class="  el-icon-camera"-->
                <!--                              :style="{color:$store.state.settings.theme}"-->
                <!--                              style="cursor: pointer;margin-right: 15px"-->
                <!--                              @click="getProductInHouseLabCode(row.wo_code)"-->
                <!--                            />-->
                <!--                          </el-tooltip>-->
              </div>
            </template>
          </el-table-column>
          <!--          <el-table-column-->
          <!--            label="操作"-->
          <!--            width="120"-->
          <!--            fixed="right"-->
          <!--          >-->
          <!--            <template slot-scope="{row}">-->
          <!--              <div class="operationClass">-->
          <!--                <el-tooltip v-del-tab-index class="item" effect="dark" content="SOP预览" placement="top">-->
          <!--                  <i-->
          <!--                    v-if="mesSetting.tech"-->
          <!--                    class="el-icon-files"-->
          <!--                    style="cursor: pointer;color:#42b983;margin-right: 15px"-->
          <!--                    @click="pre(row,2)"-->
          <!--                  />-->
          <!--                </el-tooltip>-->
          <!--              </div>-->
          <!--            </template>-->
          <!--          </el-table-column>-->
        </el-table>
      </div>
    </div>
@@ -730,6 +713,7 @@
            v-model="dialogForm.mesqty"
            oninput="value=value.replace(/[^\d]/g,'')"
            style="width: 200px"
            @input="mesqtyInputChange"
          />
          <!--          oninput="value=value.replace(/[^0-9*.{1}0-9*]/g,'')"-->
        </el-form-item>
@@ -855,6 +839,7 @@
            class="stepSelectedValueClass"
            style="width: 930px;"
            multiple
            filterable
            placeholder="请选择相对应工序"
            @change="stepSelectedValueChange"
          >
@@ -2559,6 +2544,7 @@
              class="stepSelectedValueClass"
              style="width: 930px;"
              multiple
              filterable
              placeholder="请选择相对应工序"
              @change="val=>stepSelectedValueChangeBatchUpdate(val,index)"
            >
@@ -3003,7 +2989,9 @@
        // 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 => {
@@ -3039,6 +3027,13 @@
    // })
  },
  methods: {
    mesqtyInputChange(val) {
      if (this.stepTableData && this.stepTableData.length > 0) {
        this.stepTableData.forEach(i => {
          i.sumqty = Math.floor(parseFloat(val) * (1 + (parseFloat(i.ratio) / 100)))
        })
      }
    },
    statusChange(val) {
      this.form.mesorderstus = val
      this.getMesOrderSearch()
@@ -3111,7 +3106,8 @@
        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)
@@ -3692,7 +3688,8 @@
                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)))
              }
            )
          })
@@ -3726,7 +3723,8 @@
                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)))
              }
            )
          })
@@ -4001,6 +3999,7 @@
        }
        this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
        this.$refs.tableDataRef.doLayout()
        this.$refs.tableDataRef2.doLayout()
      })
    },
    // 工艺路线放大镜点击
@@ -4446,7 +4445,12 @@
        data_sources: row.data_sources
      }
      const { data: res } = await UpdateMesOrderStepSearch(data)
      this.tableDataDetail = res.stepdata
      if (row.islastreport === 'Y') {
        this.tableDataDetail = res.stepdata.filter(i => i.isend === 'Y')
      } else {
        this.tableDataDetail = res.stepdata
      }
    },
    // 工序删除
    stepDel(row) {
@@ -4522,7 +4526,7 @@
    getSummaries(param) {
      const { columns, data } = param
      const sums = []
      const i = 9
      const i = 11
      columns.forEach((column, index) => {
        if (index === i) {
          sums[index] = '总数'
@@ -4544,6 +4548,7 @@
      this.$nextTick(() => {
        this.$refs.tableDataRef.doLayout()
        this.$refs.tableDataRef2.doLayout()
      })
      return sums
    }