loulijun2021
2023-02-14 b46bc2dba51a3885a68e4c58316b41a31ea16bb2
src/views/scgl/gd.vue
@@ -4,11 +4,11 @@
      <div class="bodyTopButtonGroup" style="justify-content: space-between">
        <div style="display: flex">
          <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
          <el-button type="primary" icon="el-icon-connection" @click="send('send')">派发</el-button>
          <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
          <el-button v-waves type="primary" icon="el-icon-connection" @click="send('send')">派发</el-button>
        </div>
        <el-button icon="el-icon-switch-button" @click="orderClose">关闭工单</el-button>
        <el-button v-waves icon="el-icon-switch-button" @click="orderClose">关闭工单</el-button>
      </div>
      <div class="bodyTopFormGroup">
@@ -17,10 +17,10 @@
          :model="form"
          label-width="100px"
          inline
          style="display: flex;justify-content: space-between"
          style="display: flex;"
        >
          <div class="elForm">
            <el-form-item label-width="70px" label="订单状态" style=" display: flex;">
            <el-form-item label="订单状态" style=" display: flex;">
              <el-select
                v-model="form.mesorderstus"
                :popper-append-to-body="false"
@@ -59,7 +59,7 @@
                />
              </el-select>
            </el-form-item>
            <el-form-item v-show="isExpandForm" label-width="70px" label="产品编码" style=" display: flex;">
            <el-form-item v-show="isExpandForm" label="产品编码" style=" display: flex;">
              <el-input v-model="form.partcode" style="width: 200px" placeholder="请输入" />
            </el-form-item>
            <el-form-item v-show="isExpandForm" label="产品名称" style=" display: flex;">
@@ -71,7 +71,7 @@
            <el-form-item v-show="isExpandForm" label="创建人员" style=" display: flex;">
              <el-input v-model="form.creatuser" style="width: 200px" placeholder="请输入" />
            </el-form-item>
            <el-form-item v-show="isExpandForm" label-width="70px" label="创建时间" style=" display: flex;">
            <el-form-item v-show="isExpandForm" label="创建时间" style=" display: flex;">
              <!--              <el-date-picker-->
              <!--                v-model="form.createdate"-->
              <!--                type="daterange"-->
@@ -93,9 +93,9 @@
            </el-form-item>
          </div>
          <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened?'5%':'10%'}">
            <el-button type="primary" icon="el-icon-search" @click="search">查询</el-button>
            <el-button type="info" icon="el-icon-refresh" @click="reset">重置</el-button>
          <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}">
            <el-button v-waves type="primary" icon="el-icon-search" @click="search">查询</el-button>
            <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">重置</el-button>
          </div>
        </el-form>
@@ -146,8 +146,8 @@
                v-model="radioSelected"
                :label="row.wo_code"
                style="color: transparent;padding-left: 10px;"
                @change.native="getCurrentRow(row.wo_code)"
              />
              <!--              @change.native="getCurrentRow(row.wo_code)"-->
            </template>
          </el-table-column>
          <el-table-column
@@ -161,6 +161,7 @@
            label="订单状态"
            sortable="custom"
            width="110"
            show-tooltip-when-overflow
          >
            <template slot-scope="{row}">
              <div v-if="row.status==='NEW'">新工单</div>
@@ -169,11 +170,14 @@
              <div v-if="row.status==='ALLO'">已派发</div>
              <div v-if="row.status==='START'">开工</div>
              <div v-if="row.status==='CLOSED'">完工</div>
              <div v-if="row.status==='NOSCHED'">待排程</div>
              <div v-if="row.status==='SCHED'">已排程</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="wo_code"
            label="工单编号"
            show-tooltip-when-overflow
            sortable="custom"
            min-width="160"
          />
@@ -181,12 +185,19 @@
            prop="m_po"
            label="源单单号"
            sortable="custom"
            show-tooltip-when-overflow
            min-width="160"
          />
          >
            <template slot-scope="{row}">
              <div v-if="row.m_po">{{ row.m_po }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="wotype"
            label="单据类型"
            sortable="custom"
            show-tooltip-when-overflow
            min-width="120"
          >
            <template slot-scope="{row}">
@@ -198,6 +209,7 @@
          <el-table-column
            prop="partcode"
            label="产品编码"
            show-tooltip-when-overflow
            sortable="custom"
            min-width="120"
          />
@@ -224,11 +236,13 @@
            prop="plan_qty"
            label="工单数"
            sortable="custom"
            show-tooltip-when-overflow
            width="100"
          />
          <el-table-column
            prop="wkshp_name"
            label="生产车间"
            show-tooltip-when-overflow
            sortable="custom"
            width="120"
          >
@@ -262,6 +276,7 @@
          <el-table-column
            prop="plan_startdate"
            label="计划开始时间"
            show-tooltip-when-overflow
            sortable="custom"
            width="160"
          >
@@ -275,6 +290,7 @@
            label="计划结束时间"
            sortable="custom"
            width="160"
            show-tooltip-when-overflow
          >
            <template slot-scope="{row}">
              <div v-if="row.plan_enddate">{{ row.plan_enddate }}</div>
@@ -284,6 +300,7 @@
          <el-table-column
            prop="piroque"
            label="工单等级"
            show-tooltip-when-overflow
            sortable="custom"
            width="120"
          >
@@ -296,6 +313,7 @@
          </el-table-column>
          <el-table-column
            prop="lm_user"
            show-tooltip-when-overflow
            label="创建人员"
            sortable="custom"
            width="120"
@@ -303,6 +321,7 @@
          <el-table-column
            prop="lm_date"
            label="创建时间"
            show-tooltip-when-overflow
            width="160"
            sortable="custom"
          />
@@ -320,13 +339,14 @@
                  <!--                    @click="check(row)"-->
                  <!--                  />-->
                  <i
                    class="el-icon-tickets"
                    style="cursor: pointer;color: #42b983;margin-right: 15px"
                    :style="{color:$store.state.settings.theme}"
                    class="el-icon-printer"
                    style="cursor: pointer;margin-right: 15px"
                    @click="handlePrint(row.wo_code)"
                  />
                </el-tooltip>
                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                  <i class="el-icon-delete" @click="del(row)" />
                  <i class="el-icon-delete" :style="{color:$store.state.settings.theme}" @click="del(row)" />
                </el-tooltip>
              </div>
            </template>
@@ -368,6 +388,7 @@
          />
          <el-table-column
            prop="wo_code"
            show-tooltip-when-overflow
            label="工单编号"
            width="160"
          />
@@ -376,33 +397,40 @@
            prop="partcode"
            label="产品编码"
            width="150"
            show-tooltip-when-overflow
          />
          <el-table-column
            prop="partname"
            label="产品名称"
            width="200"
            show-tooltip-when-overflow
          />
          <el-table-column
            label="工序编码"
            prop="stepcode"
            show-tooltip-when-overflow
            width="150"
          />
          <el-table-column
            label="工序名称"
            show-tooltip-when-overflow
            prop="stepname"
            width="150"
          />
          <el-table-column
            label="任务数量"
            show-tooltip-when-overflow
            prop="plan_qty"
          />
          <el-table-column
            label="合格数量"
            show-tooltip-when-overflow
            prop="good_qty"
          />
          <el-table-column
            label="不良数量"
            show-tooltip-when-overflow
            prop="ng_qty"
          />
          <el-table-column
@@ -414,8 +442,9 @@
              <div class="operationClass">
                <el-tooltip class="item" effect="dark" content="打印工序" placement="top">
                  <i
                    class="el-icon-tickets"
                    style="cursor: pointer;color: #42b983;margin-right: 15px"
                    class="el-icon-printer"
                    :style="{color:$store.state.settings.theme}"
                    style="cursor: pointer;margin-right: 15px"
                    @click="supplementSmallClick(row)"
                  />
                </el-tooltip>
@@ -427,6 +456,7 @@
    </div>
    <!--新增派发对话框-->
    <el-dialog
      v-el-drag-dialog
      :title="operation==='add'?'新增':'派发'"
      :visible.sync="dialogVisible"
      width="840px"
@@ -494,6 +524,7 @@
              />
            </el-form-item>
            <el-button
              v-waves
              type="primary"
              style="padding: 0 10px;margin-left: -8px;margin-top: 3px"
              class="el-icon-search"
@@ -562,6 +593,7 @@
              </el-select>
            </el-form-item>
            <el-button
              v-waves
              type="primary"
              style="padding: 0 10px;margin-left: -8px;margin-top:3px"
              class="el-icon-search"
@@ -588,19 +620,26 @@
            </el-select>
          </el-form-item>
        </div>
        <el-form-item label="物料清单" prop="bomId">
        <el-form-item label="是否排程" prop="isAps">
          <el-radio-group v-model="dialogForm.isAps" style="width:200px" @change="changeIsAps">
            <el-radio key="Y" label="Y" value="Y">是</el-radio>
            <el-radio key="N" label="N" value="N">否</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="物料清单" :prop="dialogForm.isAps==='Y'?'bomId':''">
          <el-select
            v-model="dialogForm.bomId"
            filterable
            :disabled="dialogForm.isAps==='N'"
            :popper-append-to-body="false"
            style="width: 200px;"
            placeholder="请选择"
          >
            <el-option
              v-for="item in bomIdArr"
              :key="item.code"
              :label="item.name"
              :value="item.code"
              :key="item.id"
              :label="item.version"
              :value="item.id"
            />
          </el-select>
        </el-form-item>
@@ -610,6 +649,7 @@
            type="date"
            :clearable="false"
            value-format="yyyy-MM-dd"
            :picker-options="pickerOptions"
            style="width: 200px"
            placeholder="选择日期"
          />
@@ -622,6 +662,7 @@
            value-format="yyyy-MM-dd"
            style="width: 200px"
            placeholder="选择日期"
            :picker-options="pickerOptions"
          />
        </el-form-item>
        <el-form-item label="工单等级" prop="orderlev">
@@ -640,12 +681,7 @@
            />
          </el-select>
        </el-form-item>
        <el-form-item label="是否排程" prop="isAps">
          <el-radio-group v-model="dialogForm.isAps">
            <el-radio key="Y" label="Y" value="Y">是</el-radio>
            <el-radio key="N" label="N" value="N">否</el-radio>
          </el-radio-group>
        </el-form-item>
      </el-form>
      <!--        工艺路线放大镜对话框-->
@@ -676,15 +712,18 @@
          />
          <el-table-column
            prop="stepcode"
            show-tooltip-when-overflow
            label="工序编码"
          />
          <el-table-column
            prop="stepname"
            label="工序名称"
            show-tooltip-when-overflow
          />
          <el-table-column
            prop="flwtype"
            label="工序类型"
            show-tooltip-when-overflow
          >
            <template slot-scope="{row}">
              <div v-if="row.flwtype==='W'">外协</div>
@@ -694,6 +733,7 @@
          <el-table-column
            prop="descr"
            label="工序描述"
            show-tooltip-when-overflow
            fixed="right"
          />
        </el-table>
@@ -701,9 +741,10 @@
      <span slot="footer" class="dialog-footer">
        <div class="footerButton">
          <el-button @click="dialogVisibleCancel">取 消</el-button>
          <!--          <el-button v-if="operation==='add'" type="primary" @click="dialogVisibleConfirmPreview('add')">预览</el-button>-->
          <el-button v-waves @click="dialogVisibleCancel">取 消</el-button>
          <!--          <el-button v-waves v-if="operation==='add'" type="primary" @click="dialogVisibleConfirmPreview('add')">预览</el-button>-->
          <el-button
            v-waves
            type="primary"
            :loading="$store.state.app.buttonIsDisabled"
            :disabled="$store.state.app.buttonIsDisabled"
@@ -715,6 +756,7 @@
    <!-- 工序任务对话框-->
    <el-dialog
      v-el-drag-dialog
      title="工序任务"
      :visible.sync="dialogVisibleTask"
      width="840px"
@@ -724,6 +766,7 @@
      @close="dialogVisibleTaskClose"
    >
      <el-button
        v-waves
        style="margin-bottom: 15px"
        type="primary"
        @click="supplementClick"
@@ -747,15 +790,18 @@
        />
        <el-table-column
          prop="wo_code"
          show-tooltip-when-overflow
          label="工单编号"
          width="200"
        />
        <el-table-column
          prop="stepcode"
          label="工序编码"
          show-tooltip-when-overflow
        />
        <el-table-column
          prop="stepname"
          show-tooltip-when-overflow
          label="工序名称"
        />
        <!--        <el-table-column-->
@@ -773,14 +819,17 @@
        <!--        />-->
        <el-table-column
          prop="plan_qty"
          show-tooltip-when-overflow
          label="任务数量"
        />
        <el-table-column
          prop="good_qty"
          show-tooltip-when-overflow
          label="合格数量"
        />
        <el-table-column
          prop="ng_qty"
          show-tooltip-when-overflow
          label="不良数量"
        />
        <el-table-column
@@ -788,21 +837,22 @@
          fixed="right"
        >
          <template slot-scope="{row}">
            <el-button type="text" style="padding: 0;" @click="supplementSmallClick(row)">补打</el-button>
            <el-button v-waves type="text" style="padding: 0;" @click="supplementSmallClick(row)">补打</el-button>
          </template>
        </el-table-column>
      </el-table>
      <span slot="footer" class="dialog-footer">
        <div class="footerButton">
          <el-button @click="dialogVisibleBack">返 回</el-button>
          <!--          <el-button type="primary" @click="dialogVisibleConfirm">确 定</el-button>-->
          <el-button v-waves @click="dialogVisibleBack">返 回</el-button>
          <!--          <el-button v-waves type="primary" @click="dialogVisibleConfirm">确 定</el-button>-->
        </div>
      </span>
    </el-dialog>
    <!-- 源单单号对话框-->
    <el-dialog
      v-el-drag-dialog
      title="源单单号"
      :visible.sync="dialogVisibleSource"
      width="1200px"
@@ -892,8 +942,8 @@
          </div>
          <div style="display: flex;align-items: start;margin-top: 3px;z-index: 2;justify-content: end">
            <el-button type="primary" icon="el-icon-search" @click="sourceSearch">查询</el-button>
            <el-button type="info" icon="el-icon-refresh" @click="sourceReset">重置</el-button>
            <el-button v-waves type="primary" icon="el-icon-search" @click="sourceSearch">查询</el-button>
            <el-button v-waves type="info" icon="el-icon-refresh" @click="sourceReset">重置</el-button>
          </div>
        </el-form>
@@ -927,6 +977,7 @@
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
          @sort-change="sourceSortChange"
          @row-click="getCurrentRowSource"
        >
          <!--          <el-table-column-->
          <!--            type="selection"-->
@@ -941,8 +992,8 @@
                v-model="radioSelectedId"
                :label="row.id"
                style="color: transparent;padding-left: 10px;"
                @change.native="getCurrentRowSource(row.id)"
              />
              <!--              @change.native="getCurrentRowSource(row.id)"-->
            </template>
          </el-table-column>
          <el-table-column
@@ -954,6 +1005,7 @@
          <el-table-column
            prop="status"
            label="订单状态"
            show-tooltip-when-overflow
            sortable="custom"
            width="110"
          >
@@ -967,6 +1019,7 @@
          <el-table-column
            prop="wo"
            label="订单编号"
            show-tooltip-when-overflow
            sortable="custom"
            min-width="150"
          />
@@ -974,17 +1027,20 @@
            prop="partcode"
            label="产品编码"
            sortable="custom"
            show-tooltip-when-overflow
            min-width="150"
          />
          <el-table-column
            prop="partname"
            label="产品名称"
            sortable="custom"
            show-tooltip-when-overflow
            min-width="150"
          />
          <el-table-column
            prop="partspec"
            label="产品规格"
            show-tooltip-when-overflow
            sortable="custom"
            min-width="110"
          >
@@ -997,10 +1053,12 @@
            prop="qty"
            label="订单数量"
            width="150"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="relse_qty"
            show-tooltip-when-overflow
            label="已下单数量"
            width="150"
            sortable="custom"
@@ -1008,6 +1066,7 @@
          <el-table-column
            prop="wkshp_name"
            label="生产车间"
            show-tooltip-when-overflow
            sortable="custom"
            width="150"
          >
@@ -1019,6 +1078,7 @@
          <el-table-column
            prop="planstartdate"
            label="预计开工时间"
            show-tooltip-when-overflow
            sortable="custom"
            width="130"
          >
@@ -1030,6 +1090,7 @@
          <el-table-column
            prop="planenddate"
            label="预计完工时间"
            show-tooltip-when-overflow
            sortable="custom"
            width="130"
          >
@@ -1041,6 +1102,7 @@
          <el-table-column
            prop="createuser"
            label="创建人员"
            show-tooltip-when-overflow
            sortable="custom"
            width="150"
          >
@@ -1052,6 +1114,7 @@
          <el-table-column
            prop="createdate"
            label="创建时间"
            show-tooltip-when-overflow
            width="130"
            sortable="custom"
          >
@@ -1068,7 +1131,7 @@
          <!--            <template slot-scope="{row}">-->
          <!--              <div class="operationClass">-->
          <!--                <el-tooltip class="item" effect="dark" content="下达" placement="top">-->
          <!--                  &lt;!&ndash;                <el-button type="text" @click="edit('edit',row)">下达</el-button>&ndash;&gt;-->
          <!--                  &lt;!&ndash;                <el-button v-waves type="text" @click="edit('edit',row)">下达</el-button>&ndash;&gt;-->
          <!--                  <i-->
          <!--                    class="el-icon-bottom"-->
          <!--                    style="color:#42b983;cursor: pointer;margin-left: 5px"-->
@@ -1092,14 +1155,15 @@
      />
      <span slot="footer" class="dialog-footer">
        <div class="footerButton">
          <el-button @click="dialogVisibleSourceBack">返 回</el-button>
          <el-button type="primary" @click="dialogVisibleSourceConfirm">确 定</el-button>
          <el-button v-waves @click="dialogVisibleSourceBack">返 回</el-button>
          <el-button v-waves type="primary" @click="dialogVisibleSourceConfirm">确 定</el-button>
        </div>
      </span>
    </el-dialog>
    <!--打印预览对话框  大标签-->
    <el-dialog
      v-el-drag-dialog
      title=""
      :visible.sync="dialogVisibleApprove"
      width="812px"
@@ -1235,16 +1299,17 @@
      </div>
      <span slot="footer" class="dialog-footer">
        <div class="footerButton">
          <el-button @click="dialogVisibleBackPreview">返 回</el-button>
          <!--            <el-button v-if="operation==='add'" type="primary" @click="dialogVisibleConfirm">确 定</el-button>-->
          <!--            <el-button type="primary" @click="dialogVisibleConfirm">确 定/打 印</el-button>-->
          <el-button v-print="printObj" type="primary">打 印</el-button>
          <el-button v-waves @click="dialogVisibleBackPreview">返 回</el-button>
          <!--            <el-button v-waves v-if="operation==='add'" type="primary" @click="dialogVisibleConfirm">确 定</el-button>-->
          <!--            <el-button v-waves type="primary" @click="dialogVisibleConfirm">确 定/打 印</el-button>-->
          <el-button v-waves v-print="printObj" type="primary">打 印</el-button>
        </div>
      </span>
    </el-dialog>
    <!--打印预览页面  小标签-->
    <el-dialog
      v-el-drag-dialog
      title="预览"
      :visible.sync="dialogVisible2"
      width="1140"
@@ -1285,7 +1350,11 @@
                style="display: flex;height: 96px;border-bottom:1px solid #000;
              justify-content: center;align-items: center;position: relative"
              >
                <div id="qrCode2" ref="qrCodeDiv2" style="overflow-y: hidden;height:60px;position: absolute;left: 14px;" />
                <div
                  id="qrCode2"
                  ref="qrCodeDiv2"
                  style="overflow-y: hidden;height:60px;position: absolute;left: 14px;"
                />
              </div>
              <div
                style="display: flex;height: 32px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
@@ -1342,7 +1411,11 @@
                style="display: flex;height: 96px;border-bottom:1px solid #000;
              justify-content: center;align-items: center;position: relative"
              >
                <div id="qrCode2" ref="qrCodeDiv2" style="overflow-y: hidden;height:60px;position: absolute;left: 14px;" />
                <div
                  id="qrCode2"
                  ref="qrCodeDiv2"
                  style="overflow-y: hidden;height:60px;position: absolute;left: 14px;"
                />
              </div>
              <div
                style="display: flex;height: 32px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
@@ -1399,7 +1472,11 @@
                style="display: flex;height: 60px;border-bottom:1px solid #000;
              justify-content: center;align-items: center;position: relative"
              >
                <div id="qrCode2" ref="qrCodeDiv2" style="overflow-y: hidden;height:60px;position: absolute;left: 14px;" />
                <div
                  id="qrCode2"
                  ref="qrCodeDiv2"
                  style="overflow-y: hidden;height:60px;position: absolute;left: 14px;"
                />
              </div>
              <div
                style="display: flex;height: 20px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
@@ -1450,14 +1527,15 @@
      </div>
      <span slot="footer" class="dialog-footer">
        <div class="footerButton">
          <el-button @click="dialogVisible2 = false">取 消</el-button>
          <el-button v-print="printObj2" type="primary">打 印</el-button>
          <el-button v-waves @click="dialogVisible2 = false">取 消</el-button>
          <el-button v-waves v-print="printObj2" type="primary">打 印</el-button>
        </div>
      </span>
    </el-dialog>
    <!--    工艺路线对话框-->
    <el-dialog
      v-el-drag-dialog
      :close-on-click-modal="false"
      title="关联工艺路线"
      :visible.sync="dialogVisibleRoute"
@@ -1541,10 +1619,12 @@
          <el-table-column
            prop="stepcode"
            label="工序编码"
            show-tooltip-when-overflow
          />
          <el-table-column
            prop="stepname"
            label="工序名称"
            show-tooltip-when-overflow
          />
          <el-table-column
            prop="enable"
@@ -1566,8 +1646,8 @@
      </div>
      <span slot="footer" class="dialog-footer">
        <div class="footerButton">
          <el-button @click="routeDialogVisibleCancel">取 消</el-button>
          <el-button type="primary" @click="routeDialogVisibleConfirm">确 定</el-button>
          <el-button v-waves @click="routeDialogVisibleCancel">取 消</el-button>
          <el-button v-waves type="primary" @click="routeDialogVisibleConfirm">确 定</el-button>
        </div>
      </span>
    </el-dialog>
@@ -1580,7 +1660,7 @@
import {
  AddUpdateMesOrder,
  ClosedMesOrder,
  DeleteMesOrder, ErpOrderSearch,
  DeleteMesOrder, ErpOrderSearch, JobCreationSonAddVison,
  MesOrderSearch, PartSelectRoute, RouteSelectWkshop, SearchWorkStep,
  SelectRouteStep
} from '@/api/scgl'
@@ -1591,12 +1671,15 @@
import { urlAddRandomNo, webapp_ws_ajax_run, webapp_ws_autoupdate } from '@/utils/grwebapp'
import QRCode from 'qrcodejs2'
import $ from 'jquery'
import elDragDialog from '@/directive/el-drag-dialog'
import waves from '@/directive/waves'
export default {
  name: 'GD',
  components: {
    Pagination
  },
  directives: { elDragDialog, waves },
  data() {
    return {
      mouseHoverType: 'mouseout',
@@ -1627,7 +1710,9 @@
        // { code: 'CREATED', name: '已关闭' }
        { code: 'ALLO', name: '已派发' },
        { code: 'START', name: '开工' },
        { code: 'CLOSED', name: '完工' }
        { code: 'CLOSED', name: '完工' },
        { code: 'NOSCHED', name: '待排程' },
        { code: 'SCHED', name: '已排程' }
      ],
      total: 10,
      radioSelected: '',
@@ -1656,12 +1741,7 @@
        bomId: '', // 物料清单id
        OperType: '' // 操作类型
      },
      bomIdArr: [// 物料清单下拉  因为接口还没写,暂时用写死的值
        { code: 15, name: 'V5' },
        { code: 14, name: 'V1' },
        { code: 17, name: 'V7' },
        { code: 16, name: 'V6' }
      ],
      bomIdArr: [], // 物料清单下拉
      ordertypeArr: [// 工单类型
        { code: 'PO', name: '标准工单' },
        { code: 'FO', name: '报废补单' }
@@ -1821,7 +1901,12 @@
        // { code: 3, name: '50*40' },
        // { code: 4, name: '50*80' },
        // { code: 5, name: '40*30' }
      ]
      ],
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() < Date.now() - 8.64e7
        }
      }
    }
  },
  created() {
@@ -1937,24 +2022,9 @@
      this.dialogForm.planstartdate = handleDatetime(new Date())
      this.dialogForm.planenddate = handleDatetime(new Date())
      this.dialogForm.orderlev = 3
      this.dialogForm.bomId = this.getMaxBomId()
    },
    // 查找物料清单里面版本最大的值
    getMaxBomId() {
      let max = 0// 最大值
      let code = ''// 最大值对应的code
      this.bomIdArr.forEach(item => {
        if (parseFloat(item.name.substring(1)) > max) {
          max = parseFloat(item.name.substring(1))
          code = item.code
        }
      })
      return code
    },
    // 产品信息值改变
    async partcodeChange(val) {
      console.log(val, 22)
      const { data: res } = await PartSelectRoute({ partcode: val })
      this.routeArr = res
@@ -1982,6 +2052,18 @@
      const { data: res2 } = await RouteSelectWkshop(data)
      this.wkshopArr = res2
      this.dialogForm.wkshopcode = ''
    },
    // 是否排程值改变时
    changeIsAps(val) {
      if (val === 'N') {
        this.dialogForm.bomId = ''
      }
      if (val === 'Y') {
        JobCreationSonAddVison({ partnumber: this.dialogForm.partcode }).then(res => {
          this.bomIdArr = res.data
          this.dialogForm.bomId = this.bomIdArr[0].id
        })
      }
    },
    // 工序任务
    async check(row) {
@@ -2026,13 +2108,11 @@
        this.dialogForm.planstartdate = row.plan_startdate !== null ? row.plan_startdate : handleDatetime(new Date())
        this.dialogForm.planenddate = row.plan_enddate !== null ? row.plan_enddate : handleDatetime(new Date())
        this.dialogForm.orderlev = row.piroque !== null ? row.piroque : 3 // 等级
        this.dialogForm.bomId = this.getMaxBomId() // 暂时写死
      })
    },
    // 删除按钮
    async del(row) {
      if (row.status === 'START' || row.status === 'CLOSED') {
      if (row.status === 'START' || row.status === 'CLOSED' || row.status === 'SCHED') {
        return this.$message.info('此工单不可删除!')
      }
      this.$confirm('是否确认删除?', '提示', {
@@ -2042,7 +2122,7 @@
      }).then(() => {
        console.log(row, 1)
        const data = {
          souceid: row.sourceid,
          souceid: row.sourceid ? row.sourceid : '',
          wocode: row.wo_code,
          m_po: row.m_po,
          orderqty: row.plan_qty
@@ -2105,6 +2185,8 @@
      // const { data: res } = await PartSelectRpute({ partcode: val })
      // this.routeArr = res
      // this.dialogForm.routecode = ''
      this.dialogForm.isAps = 'N'
      this.dialogForm.bomId = ''
      this.partcodeChange(val)
    },
    // 对话框关闭事件
@@ -2128,7 +2210,9 @@
      this.dialogForm.planenddate = '' // 计划完成时间
      this.dialogForm.orderlev = '' // 工单等级
      this.dialogForm.isAps = 'N' // 是否排程
      this.dialogForm.bomId = this.getMaxBomId()
      this.dialogForm.bomId = ''
      this.bomIdArr = []
      this.$refs.dialogForm.clearValidate()
    },
    // 对话框取消
@@ -2161,7 +2245,7 @@
            planenddate: this.dialogForm.planenddate, // 计划完成时间
            orderlev: this.dialogForm.orderlev, // 工单等级
            is_aps: this.dialogForm.isAps, // 是否排程
            bom_id: this.dialogForm.bomId, // 是否排程
            bom_id: this.dialogForm.bomId, // 物料清单id
            OperType: this.operation === 'add' ? 'Add' : 'Update'
          }
          this.$store.state.app.buttonIsDisabled = true
@@ -2263,9 +2347,9 @@
            // div.scrollTop = div.scrollHeight // 滚动条位于最底部
            div.scrollTop = 0 // 滚动条位于最顶部
          })
          this.dialogVisibleApprove = true
        }
      })
      this.dialogVisibleApprove = true
    },
    dialogVisibleTaskClose() {
      this.dialogForm.mesordercode = ''
@@ -2436,8 +2520,12 @@
      this.sourceFormTotal = res.count
    },
    // 单选框选中获取当前行信息
    getCurrentRowSource(id) {
      this.radioSelectedId = id
    // getCurrentRowSource2(id) {
    //   this.radioSelectedId = id
    // },
    // 单选框选中获取当前行信息
    getCurrentRowSource(row, event, column) {
      this.radioSelectedId = row.id
    },
    sourceSearch() {
      this.getErpOrderSearch()
@@ -2578,9 +2666,8 @@
      this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2)
    },
    //  行点击事件
    async   rowClick(row, event, column) {
      console.log(row, event, column)
      console.log(row.wo_code, event, column)
    async rowClick(row, event, column) {
      this.radioSelected = row.wo_code
      const { data: res } = await SearchWorkStep({ wo_code: row.wo_code })
      this.tableDataDetail = res
    },
@@ -2727,9 +2814,9 @@
}
.elTableDiv {
::v-deep .el-radio__label {
  display: none;
}
  ::v-deep .el-radio__label {
    display: none;
  }
}
@@ -2900,16 +2987,18 @@
  //}
}
::v-deep .el-select__caret{
::v-deep .el-select__caret {
  display: flex;
  align-items: center;
  justify-content: center;
}
.tableFixed{
  ::v-deep .el-table__fixed-right{
.tableFixed {
  ::v-deep .el-table__fixed-right {
    height: 100% !important;
  }
  ::v-deep .el-table__fixed{
  ::v-deep .el-table__fixed {
    height: 100% !important;
  }
}