86134
2023-11-11 4652431ce329b4dec6c4dcc0758d5c4ff97e0666
src/views/product/workbench/workReportCard.vue
@@ -12,16 +12,11 @@
      <div class="tabDivClass">
        <div class="product-out-header-left">
          <div style="height:28px;line-height:28px;">
            <el-divider class="pane-divider" direction="vertical"></el-divider
            ><span style="font-size:14px;font-weight:bold">产出</span>
            <el-divider class="pane-divider" direction="vertical"></el-divider><span
              style="font-size:14px;font-weight:bold">产出</span>
            <el-tooltip effect="dark" content="刷新列表" placement="top">
              <el-button
                class="step-refresh-btn"
                icon="el-icon-refresh"
                type="info"
                circle
                @click="getBatchReport(5)"
              ></el-button>
              <el-button class="step-refresh-btn" icon="el-icon-refresh" type="info" circle
                @click="getBatchReport(5)"></el-button>
            </el-tooltip>
          </div>
          <div style="margin-left: 30px">
@@ -39,29 +34,21 @@
          </div>
        </div>
        <div style="display:flex;flex-wrap:wrap;">
          <el-button
            class="export-btn"
            type="primary"
            @click="exportOutProduct()"
            >导出
          <el-button class="export-btn" type="primary" @click="exportOutProduct()">导出
          </el-button>
          <el-button
          <!-- <el-button
            class="out-btn"
            type="primary"
            :disabled="currProductMainDisable || currentDutyRecord.isConfirm"
            v-if="!editShow"
            @click="addShiftProductOut()"
            >交班产出
          </el-button> -->
          <el-button class="batch-out-btn" type="primary"
            :disabled="currProductMainDisable || currentDutyRecord.isConfirm" v-if="!editShow"
            @click="addBatchProductOut()">汇报产出
          </el-button>
          <el-button
            class="batch-out-btn"
            type="primary"
            :disabled="currProductMainDisable || currentDutyRecord.isConfirm"
            v-if="!editShow"
            @click="addBatchProductOut()"
            >批量产出
          </el-button>
          <div class="print-button-class">
          <!-- <div class="print-button-class">
            <el-button type="danger" class="print-btn" @click="batchPrint()"
              >大标签打印
            </el-button>
@@ -83,8 +70,8 @@
              v-model="batchSmallPrintRadio"
              @change="labelTabChange2"
            ></el-checkbox>
          </div>
          <div
          </div> -->
          <!-- <div
            class="print-button-class"
            v-if="permissions.product_finished_productLabel1_unlimit"
          >
@@ -110,8 +97,8 @@
              v-model="warehousingPrintSingleRadio"
              @change="labelTabChange3"
            ></el-checkbox>
          </div>
          <div
          </div> -->
          <!-- <div
            class="print-button-class"
            v-if="permissions.product_finished_productLabel2"
          >
@@ -126,78 +113,36 @@
              v-model="warehousingSmalllPrintRadio"
              @change="labelTabChange4"
            ></el-checkbox>
          </div>
          <el-button
            class="change-shift-out-btn"
            type="primary"
            :disabled="currProductMainDisable || currentDutyRecord.isConfirm"
            v-if="!editShow"
            @click="editList()"
            >编辑
          </div> -->
          <el-button class="change-shift-out-btn" type="primary"
            :disabled="currProductMainDisable || currentDutyRecord.isConfirm" v-if="!editShow" @click="editList()">编辑
          </el-button>
          <el-button
            class="batch-out-del-btn"
            type="primary"
            :disabled="currProductMainDisable || currentDutyRecord.isConfirm"
            v-if="editShow"
            @click="cancelSaveList()"
            >取消
          <el-button class="batch-out-del-btn" type="primary"
            :disabled="currProductMainDisable || currentDutyRecord.isConfirm" v-if="editShow" @click="cancelSaveList()">取消
          </el-button>
          <el-button
            class="change-shift-out-btn"
            type="primary"
            :disabled="currProductMainDisable || currentDutyRecord.isConfirm"
            v-if="editShow"
            @click="saveList()"
            >保存
          <el-button class="change-shift-out-btn" type="primary"
            :disabled="currProductMainDisable || currentDutyRecord.isConfirm" v-if="editShow" @click="saveList()">保存
          </el-button>
          <!-- <el-button class="tracking-out-revoke-btn" type="primary" icon="tracking-btn-out"
          :disabled="currProductMainDisable || currentDutyRecord.isConfirm" v-if="!editShow" >交班
        </el-button> -->
          <el-button
            class="submit-out-btn"
            type="primary"
            :disabled="currProductMainDisable || currentDutyRecord.isConfirm"
            v-if="!editShow"
            @click="submitList()"
            :loading="submitLoading"
            >提交
          <el-button class="submit-out-btn" type="primary"
            :disabled="currProductMainDisable || currentDutyRecord.isConfirm" v-if="!editShow" @click="submitList()"
            :loading="submitLoading">提交
          </el-button>
          <el-button
            class="batch-out-del-btn"
            type="primary"
            :disabled="currProductMainDisable || currentDutyRecord.isConfirm"
            v-if="!editShow"
            @click="deleteList()"
            >删除
          <el-button class="batch-out-del-btn" type="primary"
            :disabled="currProductMainDisable || currentDutyRecord.isConfirm" v-if="!editShow" @click="deleteList()">删除
          </el-button>
          <el-button
            v-if="permissions.product_main_revoke"
            type="danger"
            class="revoke-btn"
            @click="revokeList()"
            :loading="removeLoading"
            >撤销</el-button
          >
          <el-button
            v-if="permissions.product_state_reset"
            type="primary"
            class="change-shift-out-btn"
            @click="goReset()"
            :loading="resetLoading"
            >状态重置</el-button
          >
          <!-- v-if="permissions.product_main_revoke" -->
          <el-button type="danger" class="revoke-btn" @click="revokeList()" :loading="removeLoading">撤销</el-button>
          <!-- v-if="permissions.product_state_reset" -->
          <el-button type="primary" class="change-shift-out-btn" @click="goReset()"
            :loading="resetLoading">状态重置</el-button>
        </div>
      </div>
      <el-table
        ref="productOutTable"
        :data="productOutputList"
        height="calc(100% - 118px)"
        :header-cell-style="productOutTableHeaderCellStyle"
        :row-class-name="productOutTableRowClassName"
        class="tracking-table"
        @selection-change="handleSelectionChange"
      >
      <el-table ref="productOutTable" :data="productOutputList" height="calc(100% - 118px)"
        :header-cell-style="productOutTableHeaderCellStyle" :row-class-name="productOutTableRowClassName"
        class="tracking-table" @selection-change="handleSelectionChange">
        <el-table-column type="selection" width="55"> </el-table-column>
        <el-table-column label="序号" width="50px">
@@ -208,74 +153,43 @@
        <el-table-column label="报工单号" prop="productNo" align="center">
        </el-table-column>
        <el-table-column
          label="状态"
          prop="state"
          align="center"
          :formatter="formatState"
          width="120"
        >
        <el-table-column label="状态" prop="state" align="center" :formatter="formatState" width="120">
          <template slot="header" slot-scope="scope">
            <div style="line-height: 14px;">状态</div>
            <div class="th" @click.stop>
              <template>
                <el-select
                  clearable
                  v-model="paramObject.state"
                  placeholder="全部状态"
                  @change="getBatchReport(5)"
                  style="width: 100%"
                >
                  <el-option
                    v-for="item in stateTagArr"
                    :key="item.id"
                    :label="item.label"
                    :value="item.value"
                  />
                <el-select clearable v-model="paramObject.state" placeholder="全部状态" @change="getBatchReport(5)"
                  style="width: 100%">
                  <el-option v-for="item in stateTagArr" :key="item.id" :label="item.label" :value="item.value" />
                </el-select>
              </template>
            </div>
          </template>
        </el-table-column>
        <el-table-column
          label="零件编号"
          prop="partNo"
          align="center"
          :show-overflow-tooltip="true"
        >
        <el-table-column label="零件编号" prop="partNo" align="center" :show-overflow-tooltip="true">
        </el-table-column>
        <el-table-column
          label="零件名称"
          prop="partName"
          align="center"
          :show-overflow-tooltip="true"
        >
        <el-table-column label="零件名称" prop="partName" align="center" :show-overflow-tooltip="true">
        </el-table-column>
        <el-table-column
          label="SN号"
          prop="outBatchNo"
          align="center"
          width="120"
          :show-overflow-tooltip="true"
        >
          <template slot="header" slot-scope="scope">
            <div style="line-height: 14px;">SN号</div>
        <el-table-column label="序列号" prop="outBatchNo" align="center" width="120" :show-overflow-tooltip="true">
          <template slot-scope="scope">
            <el-input :id="'idReport_' + +scope.$index" :ref="'reference_' + scope.$index" v-if="scope.row.isEdit"
              v-model="scope.row.outBatchNo" placeholder="序列号"></el-input>
            <template v-if="!scope.row.isEdit">{{
              scope.row.outBatchNo
            }}</template>
          </template>
          <!-- <template slot="header" slot-scope="scope">
            <div style="line-height: 14px;">序列号</div>
            <div class="th" @click.stop>
              <template>
                <el-input
                  clearable
                  @keyup.enter.native="getBatchReport(5)"
                  v-model="paramObject.outBatchNo"
                  placeholder="SN号"
                  @clear="getBatchReport(5)"
                  style="width: 100%"
                >
                <el-input clearable @keyup.enter.native="getBatchReport(5)" v-model="paramObject.outBatchNo"
                  placeholder="序列号" @clear="getBatchReport(5)" style="width: 100%">
                </el-input>
              </template>
            </div>
          </template>
          </template> -->
        </el-table-column>
        <el-table-column
        <!-- <el-table-column
          label="载具编号"
          prop="reelNumber"
          align="center"
@@ -294,8 +208,8 @@
              scope.row.reelNumber
            }}</template>
          </template>
        </el-table-column>
        <el-table-column
        </el-table-column> -->
        <!-- <el-table-column
          label="起始米标"
          prop="startMeterMark"
          align="center"
@@ -332,15 +246,26 @@
              scope.row.endMeterMark
            }}</template>
          </template>
        </el-table-column> -->
        <el-table-column label="生产数量" prop="productQty" align="center" width="100">
          <template slot-scope="scope">
            <el-input :id="'idReport_' + +scope.$index" :ref="'reference_' + scope.$index" v-if="scope.row.isEdit"
              v-model="scope.row.productQty" placeholder="生产数量"></el-input>
            <template v-if="!scope.row.isEdit">{{
              scope.row.productQty
            }}</template>
          </template>
        </el-table-column>
        <el-table-column
          label="生产数量"
          prop="productQty"
          align="center"
          width="100"
        >
        <el-table-column label="WDR号" prop="wdr" align="center" width="100">
          <template slot-scope="scope">
            <el-input :id="'idReport_' + +scope.$index" :ref="'reference_' + scope.$index" v-if="scope.row.isEdit"
              v-model="scope.row.wdr" placeholder="WDR号"></el-input>
            <template v-if="!scope.row.isEdit">{{
              scope.row.wdr
            }}</template>
          </template>
        </el-table-column>
        <el-table-column label="分段描述" prop="segmentDesc" align="center">
        <!-- <el-table-column label="分段描述" prop="segmentDesc" align="center">
          <template slot-scope="scope">
            <el-input
              :id="'idReport_' + +scope.$index"
@@ -353,69 +278,43 @@
              scope.row.segmentDesc
            }}</template>
          </template>
        </el-table-column>
        </el-table-column> -->
        <el-table-column label="报废数量" prop="scrapQty" align="center">
          <template slot-scope="scope">
            <el-input
              :id="'idReport_' + +scope.$index"
              :ref="'reference_' + scope.$index"
              v-if="scope.row.isEdit"
              v-model="scope.row.scrapQty"
              placeholder="报废数量"
            ></el-input>
            <el-input :id="'idReport_' + +scope.$index" :ref="'reference_' + scope.$index" v-if="scope.row.isEdit"
              v-model="scope.row.scrapQty" placeholder="报废数量"></el-input>
            <template v-if="!scope.row.isEdit">{{
              scope.row.scrapQty
            }}</template>
          </template>
        </el-table-column>
        <el-table-column
          label="IFS批次号"
          prop="ifsBatchNo"
          align="center"
          width="120"
        >
          <template slot="header" slot-scope="scope">
        <el-table-column label="IFS批次号" prop="ifsBatchNo" align="center" width="120">
          <!-- <template slot="header" slot-scope="scope">
            <div style="line-height: 14px;">IFS批次号</div>
            <div class="th" @click.stop>
              <template>
                <el-input
                  clearable
                  @keyup.enter.native="getBatchReport(5)"
                  v-model="paramObject.ifsBatchNo"
                  placeholder="IFS批次号"
                  @clear="getBatchReport(5)"
                  style="width: 100%"
                >
                <el-input clearable @keyup.enter.native="getBatchReport(5)" v-model="paramObject.ifsBatchNo"
                  placeholder="IFS批次号" @clear="getBatchReport(5)" style="width: 100%">
                </el-input>
              </template>
            </div>
          </template>
          <template slot-scope="scope">
            <el-input
              :id="'idReport_' + +scope.$index"
              :ref="'reference_' + scope.$index"
              v-if="scope.row.isIfsBatchNoEdit"
              v-model="scope.row.ifsBatchNo"
              placeholder="IFS批次号"
            ></el-input>
            <el-input :id="'idReport_' + +scope.$index" :ref="'reference_' + scope.$index"
              v-if="scope.row.isIfsBatchNoEdit" v-model="scope.row.ifsBatchNo" placeholder="IFS批次号"></el-input>
            <template v-if="!scope.row.isIfsBatchNoEdit">{{
              scope.row.ifsBatchNo
            }}</template>
          </template>
          </template> -->
        </el-table-column>
        <el-table-column label="备注" prop="remark" align="center">
          <template slot-scope="scope">
            <el-input
              :id="'idReport_' + +scope.$index"
              :ref="'reference_' + scope.$index"
              v-if="scope.row.isEdit"
              v-model="scope.row.remark"
              placeholder="备注"
            ></el-input>
            <el-input :id="'idReport_' + +scope.$index" :ref="'reference_' + scope.$index" v-if="scope.row.isEdit"
              v-model="scope.row.remark" placeholder="备注"></el-input>
            <template v-if="!scope.row.isEdit">{{ scope.row.remark }}</template>
          </template>
        </el-table-column>
        <el-table-column label="盘具重量" prop="reelWeight" align="center">
        <!-- <el-table-column label="盘具重量" prop="reelWeight" align="center">
          <template slot-scope="scope">
            <el-input
              :id="'idReport_' + +scope.$index"
@@ -442,39 +341,29 @@
              scope.row.grossWeight
            }}</template>
          </template>
        </el-table-column>
        <el-table-column label="系统号" prop="systemNo" align="center">
        </el-table-column>
        </el-table-column> -->
        <!-- <el-table-column label="系统号" prop="systemNo" align="center">
        </el-table-column> -->
        <el-table-column label="工序名称" prop="operationName" align="center">
        </el-table-column>
        <el-table-column label="单位" prop="unit" align="center">
        </el-table-column>
        <el-table-column
        <!-- <el-table-column
          label="交班状态"
          prop="shiftState"
          align="center"
          :formatter="formatshiftState"
        >
        </el-table-column>
        <el-table-column label="打印次数" prop="printNum" align="center">
        </el-table-column>
        <el-table-column
          label="操作"
          align="center"
          width="190px"
          fixed="right"
        >
        </el-table-column> -->
        <!-- <el-table-column label="打印次数" prop="printNum" align="center">
        </el-table-column> -->
        <el-table-column label="操作" align="center" width="80" fixed="right">
          <template slot-scope="scope">
            <el-tooltip effect="dark" content="投入" placement="top-start">
              <el-button
                type="text"
                size="small"
                class="blue-but"
                @click="searchDetail(scope.$index, scope.row)"
                >投入</el-button
              >
              <el-button type="text" size="small" class="blue-but"
                @click="searchDetail(scope.$index, scope.row)">投入</el-button>
            </el-tooltip>
            <el-tooltip effect="dark" content="交班" placement="top-start">
            <!-- <el-tooltip effect="dark" content="交班" placement="top-start">
              <el-button
                type="text"
                size="small"
@@ -509,8 +398,8 @@
                "
                >取消交班</el-button
              >
            </el-tooltip>
            <el-tooltip
            </el-tooltip> -->
            <!-- <el-tooltip
              effect="dark"
              content="标签"
              placement="top-start"
@@ -537,98 +426,63 @@
                @click="smallPrintLabel(scope.row)"
                >小标签</el-button
              >
            </el-tooltip>
            </el-tooltip> -->
          </template>
        </el-table-column>
      </el-table>
      <div class="pagin-page">
        <el-pagination
          :current-page="queryReport.current"
          :page-sizes="[10, 15, 20, 50, 100]"
          :page-size="queryReport.size"
          layout="total, sizes, prev, pager, next, jumper"
          @size-change="handleSizeChangeReport"
          @current-change="handleCurrentChangeReport"
          :total="queryReport.total"
        >
        <el-pagination :current-page="queryReport.current" :page-sizes="[10, 15, 20, 50, 100]"
          :page-size="queryReport.size" layout="total, sizes, prev, pager, next, jumper"
          @size-change="handleSizeChangeReport" @current-change="handleCurrentChangeReport" :total="queryReport.total">
        </el-pagination>
      </div>
      <batchProductOutFormDialog
        :currshowlist.sync="showBatchProductForm"
        :productList="productList"
        :parentInfo="parentInfo"
        :currentDutyRecord="currentDutyRecord"
        :personBoardList="personBoardList"
        @refreshProductOutputList="refreshProductOutputList"
        :groupStatus="groupStatus"
      />
      <shiftProductoutFormDialog
        :currshowlist.sync="showShiftProductForm"
        :productList="productList"
        :parentInfo="parentInfo"
        :currentDutyRecord="currentDutyRecord"
        :personBoardList="personBoardList"
        @refreshProductOutputList="refreshProductOutputList"
      />
      <workReportFeed
        v-if="searchFeed"
        ref="searchFeed"
        @refreshFeedsForDel="refreshFeedsForDel"
      ></workReportFeed>
      <batchProductOutFormDialog :currshowlist.sync="showBatchProductForm" :productList="productList"
        :parentInfo="parentInfo" :currentDutyRecord="currentDutyRecord" :personBoardList="personBoardList"
        @refreshProductOutputList="refreshProductOutputList" :groupStatus="groupStatus" />
      <shiftProductoutFormDialog :currshowlist.sync="showShiftProductForm" :productList="productList"
        :parentInfo="parentInfo" :currentDutyRecord="currentDutyRecord" :personBoardList="personBoardList"
        @refreshProductOutputList="refreshProductOutputList" />
      <workReportFeed v-if="searchFeed" ref="searchFeed" @refreshFeedsForDel="refreshFeedsForDel"></workReportFeed>
      <productOutFormDialog
        :currshowlist.sync="showProductForm"
        :productList="productList"
        :parentInfo="parentInfo"
        :currentDutyRecord="currentDutyRecord"
        :personBoardList="personBoardList"
        @refreshProductOutputList="refreshProductOutputList"
      />
      <TaskSecretForm
        :currshowlist.sync="showTaskSecretForm"
        @confirmSecret="confirmSecret"
        :tackingList="confirmList"
        :tipeInfo="tipeInfo"
      />
      <printSecretFormDialog
        :currshowlist.sync="showPrintSecretForm"
        :outputs="selectOutputs"
        :statusCheck="statusCheck"
        @goOnPrint="goOnPrint"
        @cancelClose="cancelClose"
        @cancelCloseCancel="cancelCloseCancel"
      />
      <productOutFormDialog :currshowlist.sync="showProductForm" :productList="productList" :parentInfo="parentInfo"
        :currentDutyRecord="currentDutyRecord" :personBoardList="personBoardList"
        @refreshProductOutputList="refreshProductOutputList" />
      <TaskSecretForm :currshowlist.sync="showTaskSecretForm" @confirmSecret="confirmSecret" :tackingList="confirmList"
        :tipeInfo="tipeInfo" />
      <printSecretFormDialog :currshowlist.sync="showPrintSecretForm" :outputs="selectOutputs" :statusCheck="statusCheck"
        @goOnPrint="goOnPrint" @cancelClose="cancelClose" @cancelCloseCancel="cancelCloseCancel" />
    </div>
    <div>
      <iframe
        id="frame"
        style="width:2480px;overflow:hidden;margin-top: 200px;"
        :src="jimusrc"
      ></iframe>
      <iframe id="frame" style="width:2480px;overflow:hidden;margin-top: 200px;" :src="jimusrc"></iframe>
    </div>
    <el-dialog title="产出合格库位" :visible.sync="dialogVisible" width="30%">
      <span>合格库位:</span>
      <el-select v-model="locationIdValue" placeholder="请选择">
        <el-option v-for="item in options" :key="item.index" :label="`${item.locNo}+${item.locName}`" :value="item.id">
        </el-option>
      </el-select>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false; isTrue = false">取 消</el-button>
        <el-button type="primary" @click="clickSureSubmit">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<style lang="scss" scoped>
.cancel-btn {
  background-image: -webkit-linear-gradient(
    90deg,
    rgba(254, 100, 84, 0.8) 0%,
    rgba(252, 84, 75, 0.8) 50%,
    rgba(250, 69, 65, 0.8) 100%
  );
  background-image: -moz-linear-gradient(
    90deg,
    rgba(254, 100, 84, 0.8) 0%,
    rgba(252, 84, 75, 0.8) 50%,
    rgba(250, 69, 65, 0.8) 100%
  );
  background-image: linear-gradient(
    90deg,
    rgba(254, 100, 84, 0.8) 0%,
    rgba(252, 84, 75, 0.8) 50%,
    rgba(250, 69, 65, 0.8) 100%
  );
  background-image: -webkit-linear-gradient(90deg,
      rgba(254, 100, 84, 0.8) 0%,
      rgba(252, 84, 75, 0.8) 50%,
      rgba(250, 69, 65, 0.8) 100%);
  background-image: -moz-linear-gradient(90deg,
      rgba(254, 100, 84, 0.8) 0%,
      rgba(252, 84, 75, 0.8) 50%,
      rgba(250, 69, 65, 0.8) 100%);
  background-image: linear-gradient(90deg,
      rgba(254, 100, 84, 0.8) 0%,
      rgba(252, 84, 75, 0.8) 50%,
      rgba(250, 69, 65, 0.8) 100%);
  color: #fff;
  border-color: #fbecec;
  border-radius: 10px;
@@ -636,40 +490,34 @@
  height: 32px;
}
.cancel-btn >>> span {
.cancel-btn>>>span {
  margin-left: 3px;
}
.tracking-change-state-div >>> .tracking-btn-cancel {
.tracking-change-state-div>>>.tracking-btn-cancel {
  background: url('/img/workbench/icon_cancel.png') center center no-repeat;
  background-size: cover;
}
.tracking-change-state-div >>> .tracking-btn-cancel:before {
.tracking-change-state-div>>>.tracking-btn-cancel:before {
  content: '消';
  font-size: 14px;
  visibility: hidden;
}
.submit-btn {
  background-image: -webkit-linear-gradient(
    90deg,
    rgba(80, 213, 118, 0.8) 0%,
    rgba(73, 209, 87, 0.8) 50%,
    rgba(65, 205, 58, 0.8) 100%
  );
  background-image: -moz-linear-gradient(
    90deg,
    rgba(80, 213, 118, 0.8) 0%,
    rgba(73, 209, 87, 0.8) 50%,
    rgba(65, 205, 58, 0.8) 100%
  );
  background-image: linear-gradient(
    90deg,
    rgba(80, 213, 118, 0.8) 0%,
    rgba(73, 209, 87, 0.8) 50%,
    rgba(65, 205, 58, 0.8) 100%
  );
  background-image: -webkit-linear-gradient(90deg,
      rgba(80, 213, 118, 0.8) 0%,
      rgba(73, 209, 87, 0.8) 50%,
      rgba(65, 205, 58, 0.8) 100%);
  background-image: -moz-linear-gradient(90deg,
      rgba(80, 213, 118, 0.8) 0%,
      rgba(73, 209, 87, 0.8) 50%,
      rgba(65, 205, 58, 0.8) 100%);
  background-image: linear-gradient(90deg,
      rgba(80, 213, 118, 0.8) 0%,
      rgba(73, 209, 87, 0.8) 50%,
      rgba(65, 205, 58, 0.8) 100%);
  color: #fff;
  border-color: #fbecec;
  border-radius: 10px;
@@ -677,38 +525,31 @@
  height: 32px;
}
.submit-btn >>> span {
.submit-btn>>>span {
  margin-left: 3px;
}
.tracking-change-state-div >>> .tracking-btn-submit {
  background: url('/img/workbench/icon_tracking_submit.png') center center
    no-repeat;
.tracking-change-state-div>>>.tracking-btn-submit {
  background: url('/img/workbench/icon_tracking_submit.png') center center no-repeat;
  background-size: cover;
}
.tracking-change-state-div >>> .tracking-btn-submit:before {
.tracking-change-state-div>>>.tracking-btn-submit:before {
  content: '交';
  font-size: 14px;
  visibility: hidden;
}
.revoke-btn {
  background-image: -webkit-linear-gradient(
    90deg,
    rgba(254, 91, 53, 0.8) 0%,
    rgba(245, 68, 50, 0.8) 100%
  );
  background-image: -moz-linear-gradient(
    90deg,
    rgba(254, 91, 53, 0.8) 0%,
    rgba(245, 68, 50, 0.8) 100%
  );
  background-image: linear-gradient(
    90deg,
    rgba(254, 91, 53, 0.8) 0%,
    rgba(245, 68, 50, 0.8) 100%
  );
  background-image: -webkit-linear-gradient(90deg,
      rgba(254, 91, 53, 0.8) 0%,
      rgba(245, 68, 50, 0.8) 100%);
  background-image: -moz-linear-gradient(90deg,
      rgba(254, 91, 53, 0.8) 0%,
      rgba(245, 68, 50, 0.8) 100%);
  background-image: linear-gradient(90deg,
      rgba(254, 91, 53, 0.8) 0%,
      rgba(245, 68, 50, 0.8) 100%);
  color: #fff;
  border-color: #fbecec;
  border-radius: 15px;
@@ -716,27 +557,21 @@
  font-size: 14px;
}
.revoke-btn >>> span {
.revoke-btn>>>span {
  margin-left: 3px;
  font-size: 12px;
}
.print-btn {
  background-image: -webkit-linear-gradient(
    90deg,
    rgba(83, 53, 254, 0.8) 0%,
    rgba(52, 50, 213, 0.8) 100%
  );
  background-image: -moz-linear-gradient(
    90deg,
    rgba(83, 53, 254, 0.8) 0%,
    rgba(52, 50, 213, 0.8) 100%
  );
  background-image: linear-gradient(
    90deg,
    rgba(83, 53, 254, 0.8) 0%,
    rgba(52, 50, 213, 0.8) 100%
  );
  background-image: -webkit-linear-gradient(90deg,
      rgba(83, 53, 254, 0.8) 0%,
      rgba(52, 50, 213, 0.8) 100%);
  background-image: -moz-linear-gradient(90deg,
      rgba(83, 53, 254, 0.8) 0%,
      rgba(52, 50, 213, 0.8) 100%);
  background-image: linear-gradient(90deg,
      rgba(83, 53, 254, 0.8) 0%,
      rgba(52, 50, 213, 0.8) 100%);
  color: #fff;
  border-color: #fbecec;
  border-radius: 15px;
@@ -744,17 +579,17 @@
  font-size: 14px;
}
.print-btn >>> span {
.print-btn>>>span {
  margin-left: 3px;
  font-size: 12px;
}
.tracking-change-state-div >>> .tracking-btn-revoke {
.tracking-change-state-div>>>.tracking-btn-revoke {
  background: url('/img/workbench/icon_back.png') center center no-repeat;
  background-size: cover;
}
.tracking-change-state-div >>> .tracking-btn-revoke:before {
.tracking-change-state-div>>>.tracking-btn-revoke:before {
  content: '撤';
  font-size: 14px;
  visibility: hidden;
@@ -778,13 +613,13 @@
  align-items: center;
}
.product-out-header >>> .tracking-btn-out {
.product-out-header>>>.tracking-btn-out {
  background: url('/img/workbench/icon_bgcc.png') center center no-repeat;
  background-size: cover;
  font-size: 14px;
}
.product-out-header >>> .tracking-btn-out:before {
.product-out-header>>>.tracking-btn-out:before {
  content: '产';
  font-size: 14px;
  visibility: hidden;
@@ -806,7 +641,7 @@
  font-size: 14px;
}
.export-btn >>> span {
.export-btn>>>span {
  margin-left: 3px;
  font-size: 12px;
}
@@ -822,7 +657,7 @@
  font-size: 14px;
}
.out-btn >>> span {
.out-btn>>>span {
  margin-left: 3px;
  font-size: 12px;
}
@@ -838,7 +673,7 @@
  font-size: 14px;
}
.batch-out-btn >>> span {
.batch-out-btn>>>span {
  margin-left: 3px;
  font-size: 12px;
}
@@ -854,7 +689,7 @@
  font-size: 14px;
}
.submit-out-btn >>> span {
.submit-out-btn>>>span {
  margin-left: 3px;
  font-size: 12px;
}
@@ -870,7 +705,7 @@
  font-size: 14px;
}
.change-shift-out-btn >>> span {
.change-shift-out-btn>>>span {
  margin-left: 3px;
  font-size: 12px;
}
@@ -1020,6 +855,7 @@
  getProductMainV1,
  batchUpdateProductMain,
  batchChange,
  batchChangeCopy,
  batchCancelProductMain,
  productOutPutStateByMainId,
  getPrintUrl,
@@ -1031,12 +867,15 @@
  validateIsLastOperation,
  validateChangeProductOut,
  resetState,
  updatePrintNum
  updatePrintNum,
  cancellationOfWorkApplication
} from '@/api/product/personboard'
import {
  batchLabelPrint,
  checkBatchLabelPrint,
  batchLabelPrintTimes
  batchLabelPrintTimes,
  qualifiedLocation,
  isProductionCounting
} from '@/api/product/handymantype'
import batchProductOutFormDialog from './batchproductout-form-new.vue'
import { mapGetters } from 'vuex'
@@ -1090,6 +929,7 @@
  },
  data() {
    return {
      dialogVisible: false,
      showPrintSecretForm: false,
      printLabelType: null,
      printData: null,
@@ -1097,7 +937,7 @@
        { value: '01draft', label: '草稿' },
        { value: '02submitted', label: '已提交' },
        { value: '04processing', label: '处理中' },
        { value: '03changeshift', label: '交班' }
        // { value: '03changeshift', label: '交班' }
      ],
      tableData: [],
      multipleSelection: [],
@@ -1178,14 +1018,27 @@
      warehousingPrintSingleRadio: false,
      warehousingSmalllPrintRadio: false,
      statusCheck: true,
      selectOutputs: []
      selectOutputs: [],
      isProductionCountingShow: false,
      isTrue: false,
      options: [],
      locationIdValue: null,
    }
  },
  created() {},
  created() {
  },
  updated() { this.isProductionCounting() },
  computed: {
    ...mapGetters(['permissions', 'userInfo'])
  },
  methods: {
    isProductionCounting() {
      isProductionCounting({
        taskId: this.currOperateTask.taskId
      }).then(res => {
        this.isProductionCountingShow = res.data
      })
    },
    cancelClose() {
      this.statusCheck = true
    },
@@ -3222,11 +3075,12 @@
    },
    saveList() {
      const list = JSON.parse(JSON.stringify(this.productOutputList))
      console.log(`output->list`, list)
      const data = []
      list.forEach((el) => {
        if (el.isEdit) {
          var productVo = {}
          productVo.id = el.id
          productVo.id = el.outputId
          productVo.operationTaskId = this.currOperateTask.id
          productVo.workstationId = el.workstationId
          var productOuts = []
@@ -3235,7 +3089,9 @@
          productOut.endMeterMark = el.endMeterMark
          productOut.productQty = el.productQty
          productOut.segmentDesc = el.segmentDesc
          productOut.outBatchNo = el.outBatchNo
          productOut.scrapQty = el.scrapQty
          productOut.wdr = el.wdr
          productOut.ifsBatchNo = el.ifsBatchNo
          productOut.reelNumber = el.reelNumber
          productOut.reelWeight = el.reelWeight
@@ -3252,64 +3108,58 @@
        validateOverProduction(data).then((response) => {
          const resData = response.data
          if (resData.code === 0) {
            if (resData.data.success) {
              validateOverFeed(data)
                .then((resp) => {
                  const respData = resp.data
                  if (respData.code == 0) {
                    if (respData.data.success) {
                      batchUpdateProductMain(data).then((res) => {
                        this.$message.success('编辑成功')
                        this.editShow = false
                        this.getBatchReport(3)
                      })
                    } else {
                      // 投料不足,提示人工选择
                      // respData.data.message
                      let confirmInfo = ''
                      const confirmMessage = respData.data.message
                      confirmMessage.forEach((item) => {
                        confirmInfo = confirmInfo + item + ';<br>'
                      })
                      this.$confirm(
                        confirmInfo +
                          '<span style="color:red;">是否继续报工?</span>',
                        '提示',
                        {
                          confirmButtonText: '确定',
                          cancelButtonText: '取消',
                          type: 'warning',
                          customClass: 'validate-over-feed-message',
                          dangerouslyUseHTMLString: true,
                          closeOnClickModal: false
                        }
                      )
                        .then(() => {
                          batchUpdateProductMain(data).then((res) => {
                            this.$message.success('编辑成功')
                            this.editShow = false
                            this.getBatchReport(3)
                          })
                        })
                        .catch(() => {
                          this.$message({
                            type: 'info',
                            message: '已取消报工'
                          })
                        })
                    }
            validateOverFeed(data)
              .then((resp) => {
                const respData = resp.data
                if (respData.code == 0) {
                  if (respData.data.success) {
                    batchUpdateProductMain(data).then((res) => {
                      this.$message.success('编辑成功')
                      this.editShow = false
                      this.getBatchReport(3)
                    })
                  } else {
                    this.$message.error('投料是否充足校验失败')
                    // 投料不足,提示人工选择
                    // respData.data.message
                    let confirmInfo = ''
                    const confirmMessage = respData.data.message
                    confirmMessage.forEach((item) => {
                      confirmInfo = confirmInfo + item + ';<br>'
                    })
                    this.$confirm(
                      confirmInfo +
                      '<span style="color:red;">是否继续报工?</span>',
                      '提示',
                      {
                        confirmButtonText: '确定',
                        cancelButtonText: '取消',
                        type: 'warning',
                        customClass: 'validate-over-feed-message',
                        dangerouslyUseHTMLString: true,
                        closeOnClickModal: false
                      }
                    )
                      .then(() => {
                        batchUpdateProductMain(data).then((res) => {
                          this.$message.success('编辑成功')
                          this.editShow = false
                          this.getBatchReport(3)
                        })
                      })
                      .catch(() => {
                        this.$message({
                          type: 'info',
                          message: '已取消报工'
                        })
                      })
                  }
                })
                .catch((error) => {
                  console.log('失败' + new Date().getTime())
                })
            } else {
              this.tipeInfo = resData.data.message
              this.showTaskSecretForm = true
              this.confirmList = data
            }
                } else {
                  this.$message.error('投料是否充足校验失败')
                }
              })
              .catch((error) => {
                console.log('失败' + new Date().getTime())
              })
          } else {
            this.$message.error('工单数量校验失败')
          }
@@ -3319,6 +3169,7 @@
    // 取消编辑
    cancelSaveList() {
      this.editShow = false
      this.getBatchReport(2)
      this.productOutputList.forEach((element) => {
        if (element.isEdit) {
          element.isEdit = false
@@ -3338,6 +3189,10 @@
        this.paramObject
      )
      const _that = this
      /* if (!this.isProductionCountingShow) {
        this.$message.error('当前工单无需报工操作')
        return
      } */
      getProductMainV1(obj).then((res) => {
        _that.productOutputList = res.data.data.records
        // console.log(_that.productOutputList)
@@ -3407,122 +3262,145 @@
    // 提交报告
    submitList() {
      if (this.multipleSelection.length > 0) {
        if (this.multipleSelection.length > 10) {
          this.$message.error('最多只能选择10条记录进行提交!')
        if (this.multipleSelection.length > 1) {
          this.$message.error('最多只能选择1条记录进行提交!')
          return false
        }
        const list = this.multipleSelection
        if (this.getFlag(list)) {
          this.submitLoading = true
          var event = 'SUBMIT'
          var submitSize = 0
          let successSize = 0
          const errorMsg = ''
          var toProcessIds = []
          list.forEach((ele) => {
            toProcessIds.push(ele.id)
        } else {
          qualifiedLocation(this.multipleSelection[0].workstationId).then(res => {
            this.options = res.data.data
            if (this.options.length > 1) {
              this.dialogVisible = true
            } else {
              this.locationIdValue = this.options[0].id
              this.submitListApi()
            }
          })
          // 1、状态改成进行中
          productProcessState(toProcessIds, event)
            .then((response) => {
              // 判断是否携带打印
              if (this.batchPrintRadio) {
                this.statusCheck = false
                this.batchPrint()
              } else if (this.batchSmallPrintRadio) {
                this.statusCheck = false
                this.batchSmallPrint()
              } else if (this.warehousingPrintSingleRadio) {
                this.statusCheck = false
                this.warehousingPrintSingle()
              } else if (this.warehousingSmalllPrintRadio) {
                this.statusCheck = false
                this.warehousingSmalllPrint()
              }
              this.submitLoading = false
              this.$message.success('提交成功,刷新查看提交结果')
              this.getBatchReport(5)
              // 2、处理提交
              list.forEach((ele) => {
                var outIds = []
                outIds.push(ele.id)
                batchChange(outIds, event)
                  .then((response) => {
                    successSize++
                    submitSize++
                    if (submitSize === list.length) {
                      // this.submitLoading = false
                      // if (successSize === list.length) {
                      //   this.$message.success('提交成功')
                      // } else {
                      //   this.$message.error(errorMsg + '提交失败')
                      // }
                      // this.getBatchReport(5)
                    }
                    if (
                      this.batchPrintRadio ||
                      this.batchSmallPrintRadio ||
                      this.warehousingPrintSingleRadio ||
                      this.warehousingSmalllPrintRadio
                    ) {
                      updatePrintNum({ ids: [ele.outputId] }).then(
                        (response) => {
                          this.getBatchReport(7)
                        }
                      )
                    }
                  })
                  .catch(() => {
                    // errorMsg = errorMsg + ele.outBatchNo + ';'
                    // submitSize++
                    // console.log('submitSize', submitSize)
                    // this.submitLoading = false
                    // console.log('successSize', successSize)
                    // console.log('超时......', error)
                    // if (submitSize === list.length) {
                    //   console.log('submitSizeFinal', submitSize)
                    //   this.submitLoading = false
                    //   console.log('successSizeFinal', successSize)
                    //   if (successSize === 0) {
                    //     this.$message.error('处理失败')
                    //   } else {
                    //     this.$message.error(errorMsg + '处理失败')
                    //   }
                    //   this.getBatchReport(5)
                    // }
                    if (
                      this.batchPrintRadio ||
                      this.batchSmallPrintRadio ||
                      this.warehousingPrintSingleRadio ||
                      this.warehousingSmalllPrintRadio
                    ) {
                      updatePrintNum({ ids: [ele.outputId] }).then(
                        (response) => {
                          this.getBatchReport(7)
                        }
                      )
                    }
                  })
              })
            })
            .catch((error) => {})
          // this.submitLoading = false;
          // this.$message.success('提交成功');
          // this.getBatchReport(5);
          // var outIds = list.map((ele) => {
          //   return ele.id
          // })
          // batchChange(outIds, event)
          //   .then((response) => {
          //     this.submitLoading = false;
          //     this.$message.success('提交成功')
          //     this.getBatchReport(5)
          //   })
          //   .catch((error) => {})
        }
      } else {
        this.$message.error('请选择需要提交的对象')
      }
    },
    clickSureSubmit() {
      this.dialogVisible = false
      this.submitListApi()
    },
    submitListApi() {
      const list = this.multipleSelection
      if (this.getFlag(list)) {
        this.submitLoading = true
        var event = 'SUBMIT'
        var submitSize = 0
        let successSize = 0
        const errorMsg = ''
        var toProcessIds = []
        list.forEach((ele) => {
          toProcessIds.push(ele.id)
        })
        // 1、状态改成进行中
        productProcessState(toProcessIds, event)
          .then((response) => {
            // 判断是否携带打印
            if (this.batchPrintRadio) {
              this.statusCheck = false
              this.batchPrint()
            } else if (this.batchSmallPrintRadio) {
              this.statusCheck = false
              this.batchSmallPrint()
            } else if (this.warehousingPrintSingleRadio) {
              this.statusCheck = false
              this.warehousingPrintSingle()
            } else if (this.warehousingSmalllPrintRadio) {
              this.statusCheck = false
              this.warehousingSmalllPrint()
            }
            this.submitLoading = false
            this.$message.success('提交成功,刷新查看提交结果')
            this.getBatchReport(5)
            // 2、处理提交
            list.forEach((ele) => {
              var outIds = []
              outIds.push(ele.id)
              const qury = Object.assign({
                ids: outIds,
                locationId: this.locationIdValue,
                outputId: this.multipleSelection[0].outputId
              })
              batchChangeCopy(qury, event)
                .then((response) => {
                  this.locationIdValue = null
                  this.isTrue = false
                  successSize++
                  submitSize++
                  if (submitSize === list.length) {
                    // this.submitLoading = false
                    // if (successSize === list.length) {
                    //   this.$message.success('提交成功')
                    // } else {
                    //   this.$message.error(errorMsg + '提交失败')
                    // }
                    // this.getBatchReport(5)
                  }
                  if (
                    this.batchPrintRadio ||
                    this.batchSmallPrintRadio ||
                    this.warehousingPrintSingleRadio ||
                    this.warehousingSmalllPrintRadio
                  ) {
                    updatePrintNum({ ids: [ele.outputId] }).then(
                      (response) => {
                        this.getBatchReport(7)
                      }
                    )
                  }
                })
                .catch(() => {
                  // errorMsg = errorMsg + ele.outBatchNo + ';'
                  // submitSize++
                  // console.log('submitSize', submitSize)
                  // this.submitLoading = false
                  // console.log('successSize', successSize)
                  // console.log('超时......', error)
                  // if (submitSize === list.length) {
                  //   console.log('submitSizeFinal', submitSize)
                  //   this.submitLoading = false
                  //   console.log('successSizeFinal', successSize)
                  //   if (successSize === 0) {
                  //     this.$message.error('处理失败')
                  //   } else {
                  //     this.$message.error(errorMsg + '处理失败')
                  //   }
                  //   this.getBatchReport(5)
                  // }
                  if (
                    this.batchPrintRadio ||
                    this.batchSmallPrintRadio ||
                    this.warehousingPrintSingleRadio ||
                    this.warehousingSmalllPrintRadio
                  ) {
                    updatePrintNum({ ids: [ele.outputId] }).then(
                      (response) => {
                        this.getBatchReport(7)
                      }
                    )
                  }
                })
            })
          })
          .catch((error) => { })
        // this.submitLoading = false;
        // this.$message.success('提交成功');
        // this.getBatchReport(5);
        // var outIds = list.map((ele) => {
        //   return ele.id
        // })
        // batchChange(outIds, event)
        //   .then((response) => {
        //     this.submitLoading = false;
        //     this.$message.success('提交成功')
        //     this.getBatchReport(5)
        //   })
        //   .catch((error) => {})
      }
    },
    // 撤销报告
@@ -3539,7 +3417,9 @@
          var outIds = list.map((ele) => {
            return ele.id
          })
          batchChange(outIds, event)
          cancellationOfWorkApplication({
            mainId: outIds[0]
          })
            .then((response) => {
              this.removeLoading = false
              this.$message.success('撤销成功')