<!-- @desc:出库办理  @auth:常皓宁  @time:2024/2/20 8:59 -->
<template>
  <div class="main-div" ref="mainDiv">
    <loading :loading="loading" v-if="!modalVisible"></loading>
    <!--按钮区-->
    <BaseIndexButtonGroup ref="BaseIndexButtonGroup" id="BaseIndexButtonGroup">
      <template #left>
        <!--    查询    -->
        <BaseIndexButton ref="search" name="search"></BaseIndexButton>
        <!--    清空条件    -->
        <BaseIndexButton ref="clear" name="clear"></BaseIndexButton>
        <!--    编辑    -->
        <BaseIndexButton ref="edit" name="edit"></BaseIndexButton>
        <!--    出库办理    -->
        <BaseIndexButton ref="outHandle" name="outHandle"></BaseIndexButton>
        <!--    出库撤回    -->
        <BaseIndexButton ref="outBack" name="outBack"></BaseIndexButton>
        <!--    出库作废    -->
        <BaseIndexButton ref="invalid" name="invalid"></BaseIndexButton>
      </template>
      <template #right>
        <!--   新建     -->
        <BaseIndexButton ref="add" name="add"></BaseIndexButton>
      </template>
    </BaseIndexButtonGroup>

    <!--  卡片区  -->
    <div class="index-card">
      <!--  查询条件区域  -->
      <div id="search-cond-div" ref="search-cond-div" class="search-cond-class">
        <SearchCond ref="searchCond" v-model="searchCond"
                    @collapse-change="collapseChange" :setFlag="false"
                    :searchContent="searchContent"
        ></SearchCond>
      </div>
      <!--  表格区  -->
      <DkSplit mode="vertical" v-model="split" :height="tableHeight">
        <div slot="top">
          <DkTabs v-model="tableModel" :options="tabsOptions" @on-click="clickTab"></DkTabs>
          <!--待出库-->
          <DkTable :id="'table-'+$options.name"
                   ref="table-select"
                   :data="tableData"
                   primaryKey="outId"
                   v-if="this.tableModel === 'waitOut'"
                   @pageChange="pageSizeChange"
                   :page-total="pageInfo.total"
                   :current-page="pageInfo.currentPage"
                   :choose-flag="false"
                   @current-change="currentChange($event)"
                   :page-size-opts="pageSizeOpts"
                   :page-size="pageInfo.pageSize"
                   name="table"
                   :height="this.tableHeight * split - 66">
            <!-- 出库单号-->
            <DkTableColumn :type="$libaray.checkButtonHasRight('out-handle-edit')?'link':''" field="outNo" @on-link="handleLink"></DkTableColumn>
            <!-- 来源单号-->
            <DkTableColumn field="fromNo" width="auto"></DkTableColumn>
            <!-- 单据状态-->
            <DkTableColumn field="outTypeName" :title="$t('documentStatus')" width="auto"></DkTableColumn>
            <!--          <DkTableColumn :type="$libaray.checkButtonHasRight('entryHandle')?'link':''"-->
            <!--                         field="fromNo" width="auto" min-width="220px" @on-link="openform"></DkTableColumn>-->
            <!-- 出库日期-->
            <DkTableColumn field="outDate" width="auto" :dataType="$config.columnType.date"
            ></DkTableColumn>
            <!-- 出库状态-->
            <DkTableColumn field="outStatusName" :color-cards="['出库中','已出库']"></DkTableColumn>
            <!-- 待出库数量-->
            <DkTableColumn field="outingQty"
                           :sum="true" :digits="0"></DkTableColumn>
            <!-- 待出库金额-->
            <DkTableColumn field="outingAmt"
                           :sum="true" :digits="0"></DkTableColumn>
            <!-- 已出库数量-->
            <DkTableColumn field="outQty"
                           :sum="true" :digits="0"></DkTableColumn>
            <!-- 已出库金额-->
            <DkTableColumn field="outAmt"
                           :sum="true" :digits="0"></DkTableColumn>
            <!-- 供应商-->
            <DkTableColumn field="supplierName" :title="$t('supName')"></DkTableColumn>
            <!-- 收货人-->
            <DkTableColumn field="cusName" :title="$t('consignee')"></DkTableColumn>
            <!-- 收货电话-->
            <DkTableColumn field="cusPhone" :title="$t('consigneePhone')"></DkTableColumn>
            <!-- 收货地址-->
            <DkTableColumn field="cusFrom" :title="$t('takeOverAddress')"></DkTableColumn>
            <!--制单人-->
            <DkTableColumn field="makeStaffName" />
            <!-- 有效标识-->
            <DkTableColumn field="flgValid" type="switch"/>
            <!--出库办理人-->
            <!--          <DkTableColumn field="doneUserName" :title="$t('entryHandleUser')"></DkTableColumn>-->
            <!-- 备注-->
            <DkTableColumn field="remarks" :filter="false"></DkTableColumn>
          </DkTable>
          <!--已出库-->
          <DkTable :id="'table-'+$options.name"
                   ref="table-select"
                   :data="tableData"
                   primaryKey="outId"
                   v-if="this.tableModel === 'ingOut'"
                   @pageChange="pageSizeChange"
                   :page-total="pageInfo.total"
                   :current-page="pageInfo.currentPage"
                   :choose-flag="false"
                   @current-change="currentChange($event)"
                   :page-size-opts="pageSizeOpts"
                   :page-size="pageInfo.pageSize"
                   name="table"
                   :height="this.tableHeight * split - 66">
            <!-- 出库单号-->
            <DkTableColumn :type="$libaray.checkButtonHasRight('out-handle-edit')?'link':''" field="outNo" @on-link="handleLink"></DkTableColumn>
            <!-- 来源单号-->
            <DkTableColumn field="fromNo" width="auto"></DkTableColumn>
            <!-- 单据状态-->
            <DkTableColumn field="outTypeName" :title="$t('documentStatus')" width="auto"></DkTableColumn>
            <!--          <DkTableColumn :type="$libaray.checkButtonHasRight('entryHandle')?'link':''"-->
            <!--                         field="fromNo" width="auto" min-width="220px" @on-link="openform"></DkTableColumn>-->
            <!-- 出库日期-->
            <DkTableColumn field="outDate" width="auto" :dataType="$config.columnType.date"
            ></DkTableColumn>
            <!-- 出库状态-->
            <DkTableColumn field="outStatusName" :color-cards="['出库中','已出库']"></DkTableColumn>
            <!-- 待出库数量-->
            <DkTableColumn field="outingQty" :sum="true" :digits="0"></DkTableColumn>
            <DkTableColumn field="outingBox" dataType="number" sum></DkTableColumn>
            <DkTableColumn field="outingPiece" dataType="number" sum></DkTableColumn>
            <!-- 待出库金额-->
            <DkTableColumn field="outingAmt"
                           :sum="true" :digits="0"></DkTableColumn>
            <!-- 已出库数量-->
            <DkTableColumn field="outQty"
                           :sum="true" :digits="0"></DkTableColumn>
            <DkTableColumn field="outBox" dataType="number" sum></DkTableColumn>
            <DkTableColumn field="outPiece" dataType="number" sum></DkTableColumn>
            <!-- 已出库金额-->
            <DkTableColumn field="outAmt"
                           :sum="true" :digits="0"></DkTableColumn>
            <!-- 供应商-->
            <DkTableColumn field="supplierName" :title="$t('supName')"></DkTableColumn>
            <!-- 收货人-->
            <DkTableColumn field="cusName" :title="$t('consignee')"></DkTableColumn>
            <!-- 收货电话-->
            <DkTableColumn field="cusPhone" :title="$t('consigneePhone')"></DkTableColumn>
            <!-- 收货地址-->
            <DkTableColumn field="cusFrom" :title="$t('takeOverAddress')"></DkTableColumn>
            <!--制单人-->
            <DkTableColumn field="makeStaffName" :filter="false"></DkTableColumn>
            <!-- 有效标识-->
            <DkTableColumn field="flgValid" type="switch"/>
            <!--出库办理人-->
            <!--          <DkTableColumn field="doneUserName" :title="$t('entryHandleUser')"></DkTableColumn>-->
            <!-- 备注-->
            <DkTableColumn field="remarks" :filter="false"></DkTableColumn>
          </DkTable>

        </div>
        <!-- 明细-->
        <div slot="bottom">
          <DkTabs v-model="detailModel" :options="detailOptions" @on-click="detailTabsClick"></DkTabs>
          <div v-show="detailFlag">
            <DkTable ref="standardGoodsFlag"
                     primaryKey="itemId"
                     :id="'table-'+$options.name"
                     name="table2" :data="detailTableData"
                     :height="this.tableHeight * (1-split)-32"
                     :select-flag="false"
                     :choose-flag="false"
                     :pageFlag="false"
                     :pageTotalFlag="false"
                     show-footer>
              <!-- 商品型号-->
              <DkTableColumn field="skuModel" :filter="false"></DkTableColumn>
              <!-- 商品名称-->
              <DkTableColumn field="skuName" :filter="false"></DkTableColumn>
              <!-- 唯一编码-->
              <DkTableColumn field="skuCode" :filter="false"></DkTableColumn>
              <!-- 品牌-->
              <DkTableColumn field="brandName" :filter="false"></DkTableColumn>
              <!--品牌简称-->
              <DkTableColumn field="shortName" :filter="false"></DkTableColumn>
              <!-- 待出库数量-->
              <DkTableColumn field="outingQty"
                             :sum="true" :digits="0"></DkTableColumn>
              <DkTableColumn field="outingBox" dataType="number" sum></DkTableColumn>
              <DkTableColumn field="outingPiece" dataType="number" sum></DkTableColumn>
              <!-- 包装数量-->
              <DkTableColumn field="outingBoxPiece" />
              <!-- 待出库金额-->
              <DkTableColumn field="outingAmt"
                             :sum="true" :digits="0"></DkTableColumn>
              <!-- 已出库数量-->
              <DkTableColumn field="outQty"
                             :sum="true" :digits="0"></DkTableColumn>
              <DkTableColumn field="outBox" dataType="number" sum></DkTableColumn>
              <DkTableColumn field="outPiece" dataType="number" sum></DkTableColumn>
              <!-- 包装数量-->
              <DkTableColumn field="outBoxPiece" />
              <!-- 已出库金额-->
              <DkTableColumn field="outAmt"
                             :sum="true" :digits="0"></DkTableColumn>
              <!--备注-->
              <DkTableColumn field="remarks"></DkTableColumn>
            </DkTable>
          </div>
          <!--附件-->
          <div v-show="filesDetailFlag">
            <DkTable :pageFlag="false" :pageTotalFlag="false" :id="'table-'+$options.name"
                     name="table" ref="file-select" :data="fileTableData" :height="this.tableHeight * (1-split)-32">
              <DkTableColumn field="name" :title="$t('fileName')"/>
              <DkTableColumn field="path" :imageUrl="$config.imgUrl" type="image" :title="$t('yuLan')"/>
            </DkTable>
          </div>
        </div>
      </DkSplit>
    </div>

  </div>
</template>

<script>
import {indexMixin} from "@/mixins";
export default {
  name: 'out-handle',
  mixins: [indexMixin],
  data() {
    let self = this
    return {
      // 总单模式切换值
      tableModel: 'waitOut',
      tabsOptions: [
        {label: self.$t('waitOut'), name: 'waitOut'}, //待出库
        {label: self.$t('ingOut'), name: 'ingOut'},   //已出库
      ],
      //明细模式切换值
      detailModel: 'goodsDetail',
      detailOptions: [
        {label: self.$t('goodsDetail'), name: 'goodsDetail'}, //货物明细
        {label: self.$t('filesDetail'), name: 'filesDetail'},//附件明细
      ],
      detailFlag: true, //货物明细标识
      filesDetailFlag: false,//附件明细标识
      //数据存放
      tableData: [],
      detailTableData: [],
      fileTableData:[],//附件
      id: null,//总单id用于查询明细
      //查询条件
      searchContent: [
        {
          itemCode: '出库单号-文本',
          itemName: 'outNo',
          valueFormat: {code: 'outNo'},
          valueKind: 'STR'
        },
        {
          itemCode: '单据状态-下拉',
          itemName: 'documentStatus',
          valueFormat: {
            code: 'outTypes',
            data: [],
            valueKey: 'id',
            labelKey: 'kindName',
          },
          valueKind: 'M-CHOICE'
        },
        {
          itemCode: '客户名称-文本',
          itemName: 'cusName',
          valueFormat: {code: 'cusName'},
          valueKind: 'STR'
        },
        {
          itemCode: '客户电话-文本',
          itemName: 'cusPhone',
          valueFormat: {code: 'cusPhone'},
          valueKind: 'STR'
        },
        {
          itemCode: '供应商-文本',
          itemName: 'supplierName',
          valueFormat: {code: 'supId'},
          valueKind: 'S-SEARCH',
          magnifierType: self.$config.MagnifierType.supplier,
        },
        {
          itemCode: '业务部门-文本',
          itemName: 'orgId',
          valueFormat: {
            code: 'orgIdList',
            data: [],
            valueKey: 'orgId',
            labelKey: 'orgName',
          },
          valueKind: 'M-CHOICE'
        },
        {
          itemCode: '业务员-文本',
          itemName: 'staffId',
          valueFormat: {
            code: 'staffIdList',
            data: [],
            valueKey: 'staffId',
            labelKey: 'staffCodeName',
          },
          valueKind: 'M-CHOICE'
        },
        {
          itemCode: '出库日期',
          itemName: 'outDate',
          valueFormat: {
            code: 'makeTime',
            default: [new Date().addMonths(-1).format('yyyy-MM-dd'), new Date().format('yyyy-MM-dd')]
          },
          valueKind: 'DATE_RANGE'
        },
        self.$config.flgValidSearch,
        // {
        //   itemCode: '查看冲正单据',
        //   itemName: '查看冲正单据',
        //   valueFormat: { code: 'showItem', default: false },
        //   valueKind: 'SWITCH'
        // },
      ],
    }
  },
  methods: {
    /**
     * @desc   : 查询
     * @author : 常皓宁
     * @date   : 2024/2/18 13:16
     */
    initData() {
      //查询业务部门
      this.getOrg()
      //查询业务员
      this.getStaff()
      //获取出库状态查询list
      this.getOutTypeList()
    },
    /**
     *   @desc   : 获取出库状态查询list
     *   @date   : 2024/4/19 14:16
     *   @author : 寇珊珊
     */
    getOutTypeList(){
      // 读取系统字典
      let dataKindList =this.$store.state.user.dataKindList
      let data = dataKindList.filter(it=>it.kindType == this.$config.kindType.outType)
      let list = this.searchContent.filter(it =>  it.valueFormat && it.valueFormat.code == 'outTypes')
      if (list.length > 0) {
        list[0].valueFormat.data = data
      }
    },
    /**
     *   @desc   : 查询业务部门
     *   @date   : 2024/3/9 16:18
     *   @author : 寇珊珊
     */
    getOrg() {
      let params = {
        cpId: this.$store.state.user.cpId,
        flgValid: true
      }
      this.excute(this.$service.commonService, this.$service.commonService.getOrg, params).then(res => {
        if (res.code === this.$config.SUCCESS_CODE) {
          let list = this.searchContent.filter(it => it.valueFormat.code == 'orgIdList')
          if (list.length > 0) {
            list[0].valueFormat.data = res.data
          }
        }
      })
    },
    /**
     *   @desc   : 查询业务员
     *   @date   : 2024/3/9 16:18
     *   @author : 寇珊珊
     */
    getStaff() {
      let params = {
        cpId: this.$store.state.user.cpId,
        flgValid: true
      }
      this.excute(this.$service.commonService, this.$service.commonService.getStaff, params).then(res => {
        if (res.code === this.$config.SUCCESS_CODE) {
          let list = this.searchContent.filter(it => it.valueFormat.code == 'staffIdList')
          if (list.length > 0) {
            list[0].valueFormat.data = res.data
          }
        }
      })
    },
    /**
     *   @desc   : 获取数据
     *   @date   : 2024/3/12 16:19
     *   @author : 寇珊珊
     */
    getData(params) {
      //待出库
      if (this.tableModel == 'waitOut') {
        //参数设置
        params = this.searchParams
        params.intoStatus = this.$config.intoStatus.ruKuZhong
        params.outStatus = this.$config.outStatus.chuKuZhong
      }
      //已出库
      else if (this.tableModel == 'ingOut') {
        //参数设置
        params = this.searchParams
        params.intoStatus = this.$config.intoStatus.yiRuKu
        params.outStatus = this.$config.outStatus.yiChuKu
      }
      //出库类型
      this.tableData = []
      this.detailTableData = []
      let excute = this.excute(this.$service.otherOutboundService, this.$service.otherOutboundService.selectOutbound, params)
      excute.then(res => {
        if (res.code === this.$config.SUCCESS_CODE) {
          this.tableData = res.data.list
          if (this.tableData.length == 0) {
            this.detailTableData = []
          }
        }
      })
      return excute;
    },
    /**
     *   @desc   : 行改变事件
     *   @date   : 2024/3/9 15:35
     *   @author : 寇珊珊
     */
    currentChange({row}) {
      this.loading = true
      this.id = row.outId
      this.getDetail(1)
      //订单附件
      this.fileTableData = row.annexPaths
    },
    /**
     *   @desc   : 切换tab事件
     *   @date   : 2024/3/9 15:49
     *   @author : 寇珊珊
     */
    clickTab(params) {
      //待出库
      if (params && params == 'waitOut') {
        this.tableModel = params
      }
      //已出库
      else if (params && params == 'ingOut') {
        this.tableModel = params
      }
      //获取总单数据
      this.searchData()
    },
    /**
     *   @desc   : 明细点击Tab进行切换
     *   @date   : 2024/3/12 14:03
     *   @author : 寇珊珊
     */
    detailTabsClick(val) {
      if (val == 'goodsDetail') {
        this.detailFlag = true
        this.filesDetailFlag = false
        this.getDetail(val)
      } else if (val == 'filesDetail') {
        this.detailFlag = false
        this.filesDetailFlag = true
      }
    },
    /**
     *   @desc   : 获取明细
     *   @date   : 2024/3/12 14:06
     *   @author : 寇珊珊
     */
    getDetail(val) {
      this.detailModel = val
      this.loading = true
      this.excuteNoParam(this.$service.otherOutboundService, this.$service.otherOutboundService.selectOutboundItem, [this.id], false).then(res => {
        if (res.code === this.$config.SUCCESS_CODE) {
          this.detailTableData = res.data.itemList
          this.loading = false
        }
      })
    },
    /**
     *   @desc   : 出库撤回
     *   @date   : 2024/3/14 14:45
     *   @author : 寇珊珊
     */
    outBack(row) {
      //出库中不允许撤回
      if (this.tableModel == 'waitOut') {
        this.$Message.error(this.$t('W_007', {'param': this.$t('W_115')}))
      }
      //已出库并且是自动  不允许撤回
      else if (this.tableModel == 'ingOut' && row[0].flgHandleSetting) {
        this.$Message.error(this.$t('W_007', {'param': this.$t('W_114')}))
      }
      //已出库 并且是手动  允许撤回
      else if (this.tableModel == 'ingOut' && !row[0].flgHandleSetting) {
        if (this.$refs['table-select'].batchKeys.length === 1) {
          let params = {
            outId: this.$refs['table-select'].batchKeys[0],
            cpId: this.$store.state.user.cpId
          }
          this.$IBMessage({
              content: this.$t('Q_002', {'param': this.$v('outHandle')}),
              title: this.$t('systemQuestion')
            },
            {
              // 弹出是否删除对话框-是
              ok: () => {
                let method = null
                let service = null
                //其他出库
                if (row[0].outType === this.$config.outTypeBySql.other) {
                  method = 'inboundCancel'
                  service = 'otherOutboundService'
                }
                //销售出库
                else if (row[0].outType === this.$config.outTypeBySql.order) {
                  //todo
                  method = 'purchaseInboundCancel'
                  service = 'orderOutService'
                }
                //销售退货出库
                else {
                  method = 'saleReturnInboundCancel'
                  service = 'saleReturnInboundService'
                }
                //其他出库撤销
                this.excute(this.$service[service], this.$service[service][method], params).then(res => {
                  if (res.code === this.$config.SUCCESS_CODE) {
                    this.$Message.success(this.$t('I_001', {'param': this.$v('outHandle')}))
                    this.searchData()
                  } else {
                    this.$Message.error(res.message)
                  }
                })
              },
            })
        } else {
          this.$Message.error(this.$t('W_013'))
        }
      }
    },
    /**
     *   @desc   : 作废
     *   @date   : 2024/4/1 15:23
     *   @author : 寇珊珊
     */
    invalid(row) {
      //已出库并且是手动  ---不让作废
      if (this.tableModel == 'ingOut' && !row[0].flgHandleSetting) {
        this.$Message.error(this.$t('W_007', {'param': this.$t('W_113')}))
      }
      else {
        if (this.$refs['table-select'].batchKeys.length === 1) {
          let params = {
            outId: this.$refs['table-select'].batchKeys[0],
            cpId: this.$store.state.user.cpId
          }
          this.$IBMessage({
              content: this.$t('Q_002', {'param': this.$v('outHandle')}),
              title: this.$t('systemQuestion')
            },
            {
              // 弹出是否删除对话框-是
              ok: () => {
                let method = null
                let service = null
                //其他出库
                if (row[0].outType === this.$config.outTypeBySql.other) {
                  method = 'outboundRepeal'
                  service = 'otherOutboundService'
                }
                //销售出库
                else if (row[0].outType === this.$config.outTypeBySql.order) {
                  method = 'purchaseInboundRepeal'
                  service = 'orderOutService'
                }
                //销售退货出库
                else {
                  //todo   作废方法
                  method = 'entryHandleSaleReturn'
                  service = 'saleReturnInboundService'
                }
                //其他出库撤销
                this.excute(this.$service[service], this.$service[service][method], params).then(res => {
                  if (res.code === this.$config.SUCCESS_CODE) {
                    this.$Message.success(this.$t('I_001', {'param': this.$v('outHandle')}))
                    this.searchData()
                  } else {
                    this.$Message.error(res.message)
                  }
                })
              },
            })
        } else {
          this.$Message.error(this.$t('W_013'))
        }
      }
    },
    /**
     *   @desc   : 校验按钮
     *   @date   : 2024/3/15 15:01
     *   @author : 寇珊珊
     */
    openValidData(btnName, rows)  {
      //出库办理
      if (rows && rows[0] && btnName === 'outHandle') {
        //作废单据不允许进行此操作
        if(!rows[0].flgValid){
          this.$Message.error(this.$t('W_007', {'param': this.$t('W_118')}))
          return false;
        }
        //已出库不允许进行出库办理
        if (this.tableModel == 'ingOut') {
          this.$Message.warning(this.$t('W_007', {'param': this.$t('W_116')}));
          return false;
        }
      }
      //出库撤回
      else if (rows && rows[0] && btnName === 'outBack') {
        //作废单据不允许进行此操作
        if(!rows[0].flgValid){
          this.$Message.error(this.$t('W_007', {'param': this.$t('W_118')}))
          return false;
        }
        //出库中不允许进行出库撤回
        if (this.tableModel == 'waitOut') {
          this.$Message.warning(this.$t('W_007', {'param': this.$t('W_117')}));
          return false;
        }
      }
      //编辑
      else if(rows && rows[0] && btnName === 'edit'){
        //作废单据不允许进行此操作
        if(!rows[0].flgValid){
          this.$Message.error(this.$t('W_007', {'param': this.$t('W_118')}))
          return false;
        }
      }
      //作废
      else if(rows && rows[0] && btnName === 'invalid'){
        //作废单据不允许进行此操作
        if(!rows[0].flgValid){
          this.$Message.error(this.$t('W_007', {'param': this.$t('W_118')}))
          return false;
        }
      }
      return true;
    },
    /**
     *   @desc   : 出库办理-根据每行选的单据类型不一致，出库办理跳转到不同的页面
     *   @date   : 2024/3/23 14:37
     *   @author : 寇珊珊
     */
    outHandle(row) {
      let name = ''
      //其他出库
      if (row[0].outType === this.$config.outTypeBySql.other) {
        name = 'outHandleOther'
      }
      //销售出库
      else if (row[0].outType === this.$config.outTypeBySql.saleReturn) {
        name = 'outHandlePurReturn'
      }
      //销售退货出库
      else {
        name = 'outHandleOrder'
      }
      // 跳转到具体的办理页面
      this.open(this.$config.routeUrl[this.routeObjName][name])
    },
    /**
     *   @desc   : 编辑
     *   @date   : 2024/4/1 15:29
     *   @author : 寇珊珊
     */
    edit(row) {
      let name = ''
      //其他出库
      if (row[0].outType === this.$config.outTypeBySql.other) {
        name = 'updateOther'
      }
      //销售出库
      else if (row[0].outType === this.$config.outTypeBySql.order) {
        name = 'updateOrder'
      }
      //采购退货出库
      else {
        name = 'updatePurReturn'
      }
      // 跳转到具体的办理页面
      this.open(this.$config.routeUrl[this.routeObjName][name])
    },
  },
  created() {
    this.primaryKey = 'outId'  // 设置主键Id
    this.routeObjName = 'otherOutbound'  // 设置路由名称
  }
}
</script>

<style scoped>

</style>
