zss
2023-12-11 c880739ec4cd5ede33b31eb98ad5f7628ea288e5
src/views/warehouse/pallettransports/ifsstock-form.vue
@@ -1,93 +1,34 @@
<template>
  <el-dialog
    width="65%"
    title="IFS库存物料"
    top="5vh"
    :visible.sync="innerVisible"
    append-to-body
    @close="$emit('update:currshowlist', false)"
    :show="currshowlist"
    class="part-dialog"
  >
  <el-dialog width="65%" title="IFS库存物料" top="5vh" :visible.sync="innerVisible" append-to-body
    @close="$emit('update:currshowlist', false)" :show="currshowlist" class="part-dialog">
    <div>
      <span>需求数量:</span
      ><span style="color:Red;">{{
      <span>需求数量:</span><span style="color:Red;">{{
        materialRow == null
          ? ''
          : materialRow.surplusQuantity - totalPlanMoveQuality
        ? ''
        : materialRow.surplusQuantity - totalPlanMoveQuality
      }}</span>
    </div>
    <el-table
      class="ifs-stock-table"
      :data="ifsStockData"
      style="width: 100%;"
      height="450px"
      border
      @selection-change="ifsStockSelectionChange"
      stripe
      ref="ifsStockTable"
    >
    <el-table class="ifs-stock-table" :data="ifsStockData" style="width: 100%;" height="450px" border
      @selection-change="ifsStockSelectionChange" stripe ref="ifsStockTables">
      <el-table-column type="selection" width="55"> </el-table-column>
      <el-table-column type="index" width="50" label="序号"> </el-table-column>
      <el-table-column
        prop="partNo"
        label="零件号"
        align="center"
        show-overflow-tooltip
      >
      <el-table-column prop="partNo" label="零件号" align="center" show-overflow-tooltip>
      </el-table-column>
      <el-table-column
        prop="partDesc"
        label="零件描述"
        align="center"
        show-overflow-tooltip
      >
      <el-table-column prop="partDesc" label="零件描述" align="center" show-overflow-tooltip>
      </el-table-column>
      <el-table-column
        prop="locationDesc"
        label="库位"
        align="center"
        show-overflow-tooltip
      >
      <el-table-column prop="locationDesc" label="库位" align="center" show-overflow-tooltip>
      </el-table-column>
      <el-table-column
        prop="batchNo"
        label="批次号"
        align="center"
        show-overflow-tooltip
      >
      <el-table-column prop="batchNo" label="批次号" align="center" show-overflow-tooltip>
      </el-table-column>
      <el-table-column
        prop="wdr"
        label="WDR"
        align="center"
        show-overflow-tooltip
      >
      <el-table-column prop="wdr" label="WDR" align="center" show-overflow-tooltip>
      </el-table-column>
      <el-table-column
        prop="optaskNo"
        label="工单"
        align="center"
        show-overflow-tooltip
      >
      <el-table-column prop="optaskNo" label="工单" align="center" show-overflow-tooltip>
      </el-table-column>
      <el-table-column
        prop="available"
        label="可用库存数量"
        align="center"
        show-overflow-tooltip
      >
      <el-table-column prop="available" label="可用库存数量" align="center" show-overflow-tooltip>
      </el-table-column>
      <el-table-column
        prop="planMoveQuality"
        label="计划移库数量"
        align="center"
      >
      <el-table-column prop="planMoveQuality" label="计划移库数量" align="center">
        <template slot-scope="scope">
          <el-input
            v-model="scope.row.planMoveQuality"
            @blur="blurChangeCallback(scope.row)"
          ></el-input>
          <el-input v-model="scope.row.planMoveQuality" @blur="blurChangeCallback(scope.row)"></el-input>
        </template>
      </el-table-column>
      <el-table-column prop="unit" label="单位" align="center">
@@ -97,12 +38,7 @@
    </el-table>
    <div slot="footer" class="dialog-footer">
      <el-button @click="innerVisible = false">取 消</el-button>
      <el-button
        type="primary"
        :disabled="isSubmit"
        v-thinclick="`saveSelectRow`"
        >确 定</el-button
      >
      <el-button type="primary" v-thinclick="`saveSelectRow`">确 定</el-button>
    </div>
  </el-dialog>
</template>
@@ -177,18 +113,6 @@
                flagMsg =
                  flagMsg + '第' + (i + 1) + '行,计划移库数量最多六位小数;'
              } else {
                console.log(
                  'this.ifsStockData[i].planMoveQuality',
                  this.ifsStockData[i].planMoveQuality
                )
                console.log(
                  'this.ifsStockData[i].available',
                  this.ifsStockData[i].available
                )
                console.log(
                  this.ifsStockData[i].planMoveQuality >
                    this.ifsStockData[i].available
                )
                if (
                  this.ifsStockData[i].planMoveQuality >
                  this.ifsStockData[i].available
@@ -262,9 +186,16 @@
            partDesc: item.partDesc,
            batchNo: item.batchNo,
            wdr: item.wdr,
            serialNo: item.serialNo,
            engChgLevel: item.engChgLevel,
            configurationId: item.configurationId,
            activitySeq: item.activitySeq,
            transferQuantity: item.planMoveQuality,
            fromIfsLocationNo: item.locationNo,
            transportsMaterialId: this.materialRow.id,
            toIfsLocationNo: this.materialRow.toIfsLocationNo,
            toIfsLocationName: this.materialRow.toIfsLocationName,
            partId: this.materialRow.partId,
            transportsId: this.transportsRow.id,
            operationTaskId: item.optaskId,
            operationTaskNo: item.optaskNo,
@@ -282,10 +213,10 @@
              } else {
                this.$message.error('添加移库明细失败')
              }
              this.isSubmit = false
              this.isSubmit = true
            })
            .catch(() => {
              this.isSubmit = false
              this.isSubmit = true
            })
        } else {
          this.$message.error('请选择IFS库存物料')
@@ -295,7 +226,7 @@
        this.isSubmit = false
      }
    },
    initData() {}
    initData() { }
  },
  watch: {
    currshowlist() {
@@ -318,14 +249,18 @@
                    id: index + 1,
                    partNo: item.PART_NO,
                    partDesc: item.PART_DESC,
                    locationDesc: item.LOCATION_DESC,
                    locationDesc: item.LOCATION_NO,
                    locationNo: item.LOCATION_NO,
                    batchNo: item.LOT_BATCH_NO,
                    wdr: item.WAIV_DEV_REJ_NO,
                    available: Number(item.QTY_AVAILABLE),
                    unit: item.UNIT_MEAS_DESC,
                    engChgLevel: item.ENG_CHG_LEVEL,
                    serialNo: item.SERIAL_NO,
                    configurationId: item.CONFIGURATION_ID,
                    activitySeq: item.ACTIVITY_SEQ,
                    planMoveQuality: Number(item.QTY_AVAILABLE),
                    partId: this.materialRow.partId,
                    optaskNo: this.optask != null ? this.optask.optaskNo : null,
                    optaskId: this.optask != null ? this.optask.id : null
                  })
@@ -343,9 +278,11 @@
.part-dialog .el-dialog__header {
  padding: 10px 20px 10px;
}
.part-dialog .el-dialog__header .el-dialog__headerbtn {
  top: 10px;
}
.part-dialog .el-dialog__body {
  padding: 5px 20px;
}