<template>
  <div class="mod-config">
    <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
      <el-form-item >
        <span slot="label" style="" @click="getSearchModal()"><a herf="#">物料编码：</a></span>
        <el-input v-model="mainData.partNo" readonly   style="width: 130px"></el-input>
      </el-form-item>
      <el-form-item :label="'物料名称/规格型号：'">
        <el-input v-model="mainData.spec"  readonly style="width: 274px"></el-input>
      </el-form-item>
      <el-form-item :label="'状态：'">
        <el-input v-model="mainData.status"  readonly style="width: 130px"></el-input>
      </el-form-item>
      <el-form-item :label="'工厂编号：'">
        <el-input v-model="mainData.site"  readonly style="width: 130px"></el-input>
      </el-form-item>
    </el-form>
    <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
      <el-form-item :label="'工艺路线类型：'">
        <el-input v-model="mainData.routingType" readonly  style="width: 130px"></el-input>
      </el-form-item>
      <el-form-item :label="'版本号：'">
        <el-input v-model="mainData.revNo"  readonly style="width: 130px"></el-input>
      </el-form-item>
      <el-form-item :label="'启用日期：'">
        <el-input v-model="mainData.phaseInDate"  readonly style="width: 130px"></el-input>
      </el-form-item>
      <el-form-item :label="'停用日期：'">
        <el-input v-model="mainData.phaseOutDate"  readonly style="width: 130px"></el-input>
      </el-form-item>
      <el-form-item :label="'计量单位：'">
        <el-input v-model="mainData.umid" readonly  style="width: 130px"></el-input>
      </el-form-item>
    </el-form>
    <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
      <el-form-item :label="'备注：'">
        <el-input v-model="mainData.remark"  readonly style="width: 417px"></el-input>
        <el-checkbox style="margin-left: 20px" disabled v-model="mainData.defaultflag">默认</el-checkbox>
        <el-checkbox style="margin-left: 80px" disabled v-model="mainData.repairFlag">修复版本</el-checkbox>
      </el-form-item>
    </el-form>
    <el-tabs v-model="activeName" >
      <el-tab-pane :label="'明细'" name="first">
        <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
          <el-button @click="addRoutingDetail()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'新增'}}</el-button>
          <el-button @click="editRoutingDetail()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'修改'}}</el-button>
          <el-button @click="deleteRoutingDetail()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'删除'}}</el-button>
          <el-button @click="jumpWorkCenter()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'加工中心'}}</el-button>
          <el-button @click="getPartDetail()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'可用机台'}}</el-button>
        </el-form>
        <el-table
          :height="height"
          :data="dataList2"
          border
          @row-click="clickData"
          highlight-current-row
          v-loading="dataListLoading"
          style="width: 100%;">
          <el-table-column
            v-for="(item,index) in columnList2" :key="index"
            :sortable="item.columnSortable"
            :prop="item.columnProp"
            :header-align="item.headerAlign"
            :show-overflow-tooltip="item.showOverflowTooltip"
            :align="item.align"
            :fixed="item.fixed"
            :width="item.columnWidth"
            :label="item.columnLabel">
            <template slot-scope="scope">
              <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
              <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
                                                 style="width: 100px; height: 80px"/></span>
            </template>
          </el-table-column>
        </el-table>
      </el-tab-pane>
      <el-tab-pane :label="'工具清单'" name="second">
      </el-tab-pane>
    </el-tabs>
    <el-dialog title="数据表" :close-on-click-modal="false" v-drag :visible.sync="modelFlag" width="680px" >
      <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
        <el-form-item :label="'物料编码：'">
          <el-input v-model="searchPartNo" style="width: 130px"></el-input>
          <el-button @click="searchRoutingWithPartNo()" type="primary">查询</el-button>
        </el-form-item>
      </el-form>
      <el-table
        height="300"
        :data="dataList"
        border
        @row-dblclick="tableHanddle"
        v-loading="dataListLoading"
        style="width: 100%;">
        <el-table-column
          v-for="(item,index) in columnList" :key="index"
          :sortable="item.columnSortable"
          :prop="item.columnProp"
          :header-align="item.headerAlign"
          :show-overflow-tooltip="item.showOverflowTooltip"
          :align="item.align"
          :fixed="item.fixed"
          :min-width="item.columnWidth"
          :label="item.columnLabel">
          <template slot-scope="scope">
            <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
            <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
                                               style="width: 100px; height: 80px"/></span>
          </template>
        </el-table-column>
      </el-table>
      <el-footer  style="height:40px;margin-top: 20px;text-align:center">
        <el-button type="primary" @click="modelFlag = false">关闭</el-button>
      </el-footer>
    </el-dialog>
    <el-dialog title="维护工艺路线明细" :close-on-click-modal="false" v-drag :visible.sync="detailmodelFlag" width="620px">
      <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;">
        <el-form-item :label="'工序号：'">
          <el-input v-model="detailData.itemNo" :disabled="detailmodelInputFlag"  style="width: 130px;text-align: right" type="number"></el-input>
        </el-form-item>
        <el-form-item :label="'工序名称：'">
          <el-input v-model="detailData.operationDesc" style="width: 130px"></el-input>
        </el-form-item>
        <el-form-item :label="'加工中心编码：'">
          <el-input v-model="detailData.workCenterNo" style="width: 130px"></el-input>
        </el-form-item>
        <el-form-item :label="'准备时间：'">
          <el-input v-model="detailData.machSetupTime" style="width: 130px"></el-input>
        </el-form-item>
      </el-form>
      <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;">
        <el-form-item :label="'单位产出量：'">
          <el-input v-model="detailData.machRunFactor" type="number" style="width: 130px"></el-input>
        </el-form-item>
        <el-form-item :label="'产出单位：'">
          <el-select filterable v-model="detailData.factorUnit" style="width: 130px">
            <el-option label="" value=""></el-option>
            <el-option label="单位/小时" value="单位/小时"></el-option>
            <el-option label="小时" value="小时"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item :label="'计价单价：'">
          <el-input v-model="detailData.jjgzUnitPrice" type="number" style="width: 130px"></el-input>
        </el-form-item>
        <el-form-item :label="'单位：'">
          <el-select filterable v-model="detailData.jjgzUnitFactor" style="width: 130px">
            <el-option label="" value=""></el-option>
            <el-option label="小时" value="小时"></el-option>
            <el-option label="件" value="件"></el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;">
        <el-form-item :label="'效率：'">
          <el-input v-model="detailData.efficiency" type="number" style="width: 130px"></el-input>
        </el-form-item>
        <el-form-item :label="'操作工人数：'">
          <el-input v-model="detailData.crewsize" type="number" style="width: 130px"></el-input>
        </el-form-item>
        <el-form-item :label="'备注：'">
          <el-input v-model="detailData.remark" style="width: 130px"></el-input>
        </el-form-item>
      </el-form>
      <el-footer  style="height:40px;margin-top: 20px;text-align:center">
        <el-button type="primary" @click="saveRoutingDetailData()">保存</el-button>
        <el-button type="primary" @click="detailmodelFlag = false">关闭</el-button>
      </el-footer>
    </el-dialog>
  </div>
</template>

<script>
  import {
    searchRoutingWithPartNo,
    searchRoutingDetailData,
    saveRoutingDetailData,
  }from "@/api/base/site.js"
    export default {
      name: "maintainProductRouting",
      data () {
        return {
          dataListLoading: false,
          searchPartNo:'',
          height:200,
          mainData:{
            partNo:'',
            spec:'',
            status:'',
            site:'',
            routingType:'',
            revNo:'',
            phaseInDate:'',
            phaseOutDate:'',
            umid:'',
            remark:'',
            defaultflag:'',
            repairFlag:'',
          },
          activeName:'first',
          modelFlag:false,
          detailmodelFlag:false,
          detailmodelInputFlag:false,
          dataList:[],
          dataList2:[],
          columnList:[
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040TablePartNo',
              tableId: "6040Table",
              tableName: "维护工艺路线数据表",
              columnProp: "partNo",
              headerAlign: "center",
              align: "left",
              columnLabel: "物料编码",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 100
            },
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040TableSpec',
              tableId: "6040Table",
              tableName: "维护工艺路线数据表",
              columnProp: "spec",
              headerAlign: "center",
              align: "left",
              columnLabel: "名称/规格",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 120
            },
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040TableRoutingType',
              tableId: "6040Table",
              tableName: "维护工艺路线数据表",
              columnProp: "routingType",
              headerAlign: "center",
              align: "left",
              columnLabel: "工艺路线类型",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 80
            },
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040TableRevNo',
              tableId: "6040Table",
              tableName: "维护工艺路线数据表",
              columnProp: "revNo",
              headerAlign: "center",
              align: "left",
              columnLabel: "版本号",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 60
            },
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040TablePhaseInDate',
              tableId: "6040Table",
              tableName: "维护工艺路线数据表",
              columnProp: "phaseInDate",
              headerAlign: "center",
              align: "left",
              columnLabel: "启用日期",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 80
            },
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040TablePhaseOutDate',
              tableId: "6040Table",
              tableName: "维护工艺路线数据表",
              columnProp: "phaseOutDate",
              headerAlign: "center",
              align: "left",
              columnLabel: "停用日期",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 80
            },
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040TableStatus',
              tableId: "6040Table",
              tableName: "维护工艺路线数据表",
              columnProp: "status",
              headerAlign: "center",
              align: "left",
              columnLabel: "状态",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 40
            },
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040TableSite',
              tableId: "6040Table",
              tableName: "维护工艺路线数据表",
              columnProp: "site",
              headerAlign: "center",
              align: "left",
              columnLabel: "工厂编码",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 60
            },
          ],
          columnList2:[
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040Table2ItemNo',
              tableId: "6040Table2",
              tableName: "维护工艺路线工序表",
              columnProp: "itemNo",
              headerAlign: "center",
              align: "right",
              columnLabel: "工序号",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 60
            },
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040Table2OperationDesc',
              tableId: "6040Table2",
              tableName: "维护工艺路线工序表",
              columnProp: "operationDesc",
              headerAlign: "center",
              align: "left",
              columnLabel: "工序名称",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 300
            },
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040Table2WorkCenterNo',
              tableId: "6040Table2",
              tableName: "维护工艺路线工序表",
              columnProp: "workCenterNo",
              headerAlign: "center",
              align: "left",
              columnLabel: "加工中心编码",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 100
            },
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040Table2WorkCenterDesc',
              tableId: "6040Table2",
              tableName: "维护工艺路线工序表",
              columnProp: "workCenterDesc",
              headerAlign: "center",
              align: "left",
              columnLabel: "加工中心名称",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 100
            },
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040Table2MachSetupTime',
              tableId: "6040Table2",
              tableName: "维护工艺路线工序表",
              columnProp: "machSetupTime",
              headerAlign: "center",
              align: "right",
              columnLabel: "准备时间(小时)",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 100
            },
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040Table2MachRunFactor',
              tableId: "6040Table2",
              tableName: "维护工艺路线工序表",
              columnProp: "machRunFactor",
              headerAlign: "center",
              align: "right",
              columnLabel: "单位产出量",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 100
            },
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040Table2FactorUnit',
              tableId: "6040Table2",
              tableName: "维护工艺路线工序表",
              columnProp: "factorUnit",
              headerAlign: "center",
              align: "left",
              columnLabel: "产出单位",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 100
            },
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040Table2Efficiency',
              tableId: "6040Table2",
              tableName: "维护工艺路线工序表",
              columnProp: "efficiency",
              headerAlign: "center",
              align: "right",
              columnLabel: "效率(%)",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 80
            },
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040Table2Remark',
              tableId: "6040Table2",
              tableName: "维护工艺路线工序表",
              columnProp: "remark",
              headerAlign: "center",
              align: "left",
              columnLabel: "备注",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 160
            },
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040Table2JJGZUnitPrice',
              tableId: "6040Table2",
              tableName: "维护工艺路线工序表",
              columnProp: "jjgzUnitPrice",
              headerAlign: "center",
              align: "right",
              columnLabel: "每件计价",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 100
            },
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040Table2JJGZUnitFactor',
              tableId: "6040Table2",
              tableName: "维护工艺路线工序表",
              columnProp: "jjgzUnitFactor",
              headerAlign: "center",
              align: "left",
              columnLabel: "计价单位",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 100
            },
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040Table2Crewsize',
              tableId: "6040Table2",
              tableName: "维护工艺路线工序表",
              columnProp: "crewsize",
              headerAlign: "center",
              align: "left",
              columnLabel: "操作工人数",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 100
            },
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040Table2WorkCenterType',
              tableId: "6040Table2",
              tableName: "维护工艺路线工序表",
              columnProp: "workCenterType",
              headerAlign: "center",
              align: "left",
              columnLabel: "加工中心类型",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 100
            },
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040Table2WXPartNo',
              tableId: "6040Table2",
              tableName: "维护工艺路线工序表",
              columnProp: "wxPartNo",
              headerAlign: "center",
              align: "left",
              columnLabel: "费用结算料号",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 120
            },
            {
              userId: this.$store.state.user.name,
              functionId: 6040,
              serialNumber: '6040Table2WXSpec',
              tableId: "6040Table2",
              tableName: "维护工艺路线工序表",
              columnProp: "wxSpec",
              headerAlign: "center",
              align: "left",
              columnLabel: "费用结算物料名称/规格",
              columnHidden: false,
              columnImage: false,
              columnSortable: false,
              sortLv: 0,
              status: true,
              fixed: false,
              columnWidth: 250
            },


          ],
          detailData:{
            itemNo:'',
            operationDesc:'',
            workCenterNo:'',
            machSetupTime:'',
            machRunFactor:'',
            factorUnit:'',
            jjgzUnitPrice:'',
            jjgzUnitFactor:'',
            efficiency:'',
            crewsize:'',
            remark:'',
            site:'',
            partNo:'',
            revNo:'',
            add:'',
            user:'',
          }
        }
      },
      mounted() {
        this.$nextTick(() => {
          this.height = window.innerHeight - 310;
        })
      },
      methods: {
        addRoutingDetail(){
          if(this.mainData.partNo==null||this.mainData.partNo==''){
            this.$alert("请选择物料号！", '错误', {
              confirmButtonText: '确定'
            })
              return false;
          }
          let size=this.dataList2.length;
          this. detailData={
            itemNo:this.dataList2[Number(size-1)].itemNo+10,
            operationDesc:'',
            workCenterNo:'',
            machSetupTime:'',
            machRunFactor:0,
            factorUnit:'',
            jjgzUnitPrice:'',
            jjgzUnitFactor:'',
            efficiency:'',
            crewsize:'',
            remark:'',
            add:0,
            partNo:this.mainData.partNo,
            revNo:this.mainData.revNo,
            site:this.mainData.site,
            user:this.$store.state.user.name,
          }
          this.detailmodelInputFlag=false;
          this.detailmodelFlag=true;

        },
         saveRoutingDetailData(){
          if(this.detailData.itemNo==''||this.detailData.itemNo==null){
            this.$alert("请输入工序号！",'错误',{
              confirmButtonText:'确定'
            })
            return false;
          }
          if(this.detailData.operationDesc==''||this.detailData.operationDesc==null){
            this.$alert("请输入工序名称！",'错误',{
              confirmButtonText:'确定'
            })
            return false;
          }
          if(this.detailData.workCenterNo==''||this.detailData.workCenterNo==null){
            this.$alert("请输入加工中心编码！",'错误',{
              confirmButtonText:'确定'
            })
            return false;
          }
          saveRoutingDetailData(this.detailData).then(({data}) => {
            if (data && data.code == 200) {
              this.detailmodelFlag = false
              let data1={
                site: this.mainData.site,
                partNo:this.mainData.partNo,
                revNo:this.mainData.revNo,
              }
              searchRoutingDetailData(data1).then(({data}) => {
                this.dataList2=data.rows;
              })
              this.$message({
                message: '操作成功',
                type: 'success',
                duration: 1500,
                onClose: () => {
                }
              })
            } else {
              this.$alert(data.msg, '错误', {
                confirmButtonText: '确定'
              })
            }
          })
        },
        tableHanddle(row) {
          let data={
            partNo:row.partNo,
            site:row.site,
            revNo:row.revNo,
          }
          searchRoutingWithPartNo(data).then(({data}) => {
            if(data.rows.length>0){
              if(data.rows[0].repairFlag=='Y'){
                data.rows[0].repairFlag=true;
              }else {
                data.rows[0].repairFlag=false;
              }
              if(data.rows[0].defaultflag=='Y'){
                data.rows[0].defaultflag=true;
              }else {
                data.rows[0].defaultflag=false;
              }
              this.mainData = data.rows[0]
              let data1={
                site: data.rows[0].site,
                partNo:data.rows[0].partNo,
                revNo:data.rows[0].revNo,
              }
              searchRoutingDetailData(data1).then(({data}) => {
                this.dataList2=data.rows;
              })
            }

          })
          this.modelFlag = false;

        },
        getSearchModal() {
          this.searchPartNo = '';
          this.searchRoutingWithPartNo();
          this.modelFlag = true;
        },
        editRoutingDetail(){
          if(this.currentRow==null){
            this.$alert("请选择工艺路线工序！", '错误', {
              confirmButtonText: '确定'
            })
            return false;
          }
          this. detailData={
            itemNo:this.currentRow.itemNo,
            operationDesc:this.currentRow.operationDesc,
            workCenterNo:this.currentRow.workCenterNo,
            machSetupTime:this.currentRow.machSetupTime,
            machRunFactor:this.currentRow.machRunFactor,
            factorUnit:this.currentRow.factorUnit,
            jjgzUnitPrice:this.currentRow.jjgzUnitPrice,
            jjgzUnitFactor:this.currentRow.jjgzUnitFactor,
            efficiency:this.currentRow.efficiency,
            crewsize:this.currentRow.crewsize,
            remark:this.currentRow.remark,
            add:1,
            partNo:this.mainData.partNo,
            revNo:this.mainData.revNo,
            site:this.mainData.site,
            user:this.$store.state.user.name,
          }
          this.detailmodelInputFlag=true;
          this.detailmodelFlag=true;
        },
        searchRoutingWithPartNo() {
          let data={
            partNo:this.searchPartNo
          }
          searchRoutingWithPartNo(data).then(({data}) => {
            this.dataList = data.rows
          })
        },
        clickData(row){
          this.currentRow = JSON.parse(JSON.stringify(row));
        },
        jumpWorkCenter(){
          if(this.currentRow==null){
            this.$alert("请选择工艺路线工序！", '错误', {
              confirmButtonText: '确定'
            })
            return false;
          }
          let inData={user:this.$store.state.user.name,site:this.currentRow.site,workCenterNo:this.currentRow.workCenterNo};
          localStorage.setItem('workCenterNo', JSON.stringify(inData))
          this.$router.replace('base-workCenter')
        },
      },
      created() {

      }
    }
</script>

<style scoped>

</style>
