<!-- @desc:入库办理  @auth:寇珊珊  @time:2024年3月9日15:01:31 -->
<template>
  <div class="main-div" ref="mainDiv">
    <!--按钮区-->
    <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="entryHandle" name="entryHandle"></BaseIndexButton>
        <!--    入库撤回    -->
        <BaseIndexButton ref="entryBack" name="entryBack"></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="intoId"
                   v-if="this.tableModel === 'waitIn'"
                   @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('entry-handle-edit')?'link':''" field="intoNo" @on-link="handleLink"></DkTableColumn>
            <!-- 来源单号-->
            <DkTableColumn field="fromNo" width="auto"></DkTableColumn>
            <!-- 单据状态-->
            <DkTableColumn field="intoTypeName" :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="intoDate" width="auto" :dataType="$config.columnType.date"
            ></DkTableColumn>
            <!-- 入库状态-->
            <DkTableColumn field="intoStatusName" :color-cards="['出库中','入库中']"></DkTableColumn>
            <!-- 待入库数量-->
            <DkTableColumn field="intoingQty"
                           :sum="true" :digits="0"></DkTableColumn>
            <!-- 待入库金额-->
            <DkTableColumn field="intoingAmt"
                           :sum="true" :digits="0"></DkTableColumn>
            <!-- 已入库数量-->
            <DkTableColumn field="intoQty"
                           :sum="true" :digits="0"></DkTableColumn>
            <!-- 已入库金额-->
            <DkTableColumn field="intoAmt"
                           :sum="true" :digits="0"></DkTableColumn>
            <!-- 仓库-->
            <DkTableColumn field="whName"></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>
          <!--已入库-->
          <DkTable :id="'table-'+$options.name"
                   ref="table-select"
                   :data="tableData"
                   primaryKey="intoId"
                   v-if="this.tableModel === 'ingIn'"
                   @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('entry-handle-edit')?'link':''" field="intoNo" @on-link="handleLink"></DkTableColumn>
            <!-- 来源单号-->
            <DkTableColumn field="fromNo" width="auto"></DkTableColumn>
            <!-- 单据状态-->
            <DkTableColumn field="intoTypeName" :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="intoDate" width="auto" :dataType="$config.columnType.date"
            ></DkTableColumn>
            <!-- 入库状态-->
            <DkTableColumn field="intoStatusName" :color-cards="['入库中','已入库']"></DkTableColumn>
            <!-- 待入库数量-->
            <DkTableColumn field="intoingQty"
                           :sum="true" :digits="0"></DkTableColumn>
            <!-- 待入库金额-->
            <DkTableColumn field="intoingAmt"
                           :sum="true" :digits="0"></DkTableColumn>
            <!-- 已入库数量-->
            <DkTableColumn field="intoQty"
                           :sum="true" :digits="0"></DkTableColumn>
            <!-- 已入库金额-->
            <DkTableColumn field="intoAmt"
                           :sum="true" :digits="0"></DkTableColumn>
            <!-- 仓库-->
            <DkTableColumn field="whName"></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="ingBoxPiece" />
              <!-- 待入库数量-->
              <DkTableColumn field="intoingQty"
                             :sum="true" :digits="0"></DkTableColumn>
              <!-- 待入库金额-->
              <DkTableColumn field="intoingAmt"
                             :sum="true" :digits="0"></DkTableColumn>
              <!-- 基本单位-->
              <DkTableColumn field="intoingBox" dataType="number" :digits="0"/>
              <!-- 包装单位-->
              <DkTableColumn field="intoingPiece" dataType="number" :digits="0"/>
              <!-- 已入库数量-->
              <DkTableColumn field="intoQty"
                             :sum="true" :digits="0"></DkTableColumn>
              <!-- 已入库金额-->
              <DkTableColumn field="intoAmt"
                             :sum="true" :digits="0"></DkTableColumn>
              <!-- 基本单位-->
              <DkTableColumn field="intoBox" dataType="number" :digits="0"/>
              <!-- 包装单位-->
              <DkTableColumn field="intoPiece" dataType="number" :digits="0"/>
              <!--备注-->
              <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: 'entry-handle',
    mixins: [indexMixin],
    data() {
      let self = this
      return {
        // 总单模式切换值
        tableModel: 'waitIn',
        tabsOptions: [
          {label: self.$t('waitIn'), name: 'waitIn'}, //待入库
          {label: self.$t('ingIn'), name: 'ingIn'},   //已入库
        ],
        //明细模式切换值
        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: 'intoNo',
            valueFormat: {code: 'intoNo'},
            valueKind: 'STR'
          },
          {
            itemCode: '单据状态-下拉',
            itemName: 'documentStatus',
            valueFormat: {
              code: 'intoTypes',
              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: 'intoDate',
            valueFormat: {
              code: 'makeTime',
              default: [new Date().addMonths(-1).format('yyyy-MM-dd'), new Date().format('yyyy-MM-dd')]
            },
            valueKind: 'DATE_RANGE'
          },
          // {
          //   itemCode: '查看冲正单据',
          //   itemName: '查看冲正单据',
          //   valueFormat: { code: 'showItem', default: false },
          //   valueKind: 'SWITCH'
          // },
          self.$config.flgValidSearch,
        ],
      }
    },
    methods: {
      /**
       * @desc   : 查询
       * @author : 常皓宁
       * @date   : 2024/2/18 13:16
       */
      initData() {
        //查询业务部门
        this.getOrg()
        //查询业务员
        this.getStaff()
        //获取入库状态查询list
        this.getIntoTypeList()
      },
      /**
       *   @desc   : 获取入库状态查询list
       *   @date   : 2024/4/19 14:14
       *   @author : 寇珊珊
       */
      getIntoTypeList(){
        // 读取系统字典
        let dataKindList =this.$store.state.user.dataKindList
        let data = dataKindList.filter(it=>it.kindType == this.$config.kindType.intoType)
        let list = this.searchContent.filter(it =>  it.valueFormat && it.valueFormat.code == 'intoTypes')
        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 == 'waitIn') {
          //参数设置
          params = this.searchParams
          params.intoStatus = this.$config.intoStatus.ruKuZhong
          params.outStatus = this.$config.outStatus.chuKuZhong
        }
        //已入库
        else if (this.tableModel == 'ingIn') {
          //参数设置
          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.otherInboundService, this.$service.otherInboundService.selectInbound, 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.intoId
        this.getDetail(1)
        //订单附件
        this.fileTableData = row.annexPaths
      },
      /**
       *   @desc   : 切换tab事件
       *   @date   : 2024/3/9 15:49
       *   @author : 寇珊珊
       */
      clickTab(params) {
        //待入库
        if (params && params == 'waitIn') {
          this.tableModel = params
        }
        //已入库
        else if (params && params == 'ingIn') {
          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.otherInboundService, this.$service.otherInboundService.selectInboundItem, [this.id], false).then(res => {
          if (res.code === this.$config.SUCCESS_CODE) {
            this.detailTableData = res.data.itemList
          }
        })
      },
      /**
       *   @desc   : 入库撤回
       *   @date   : 2024/3/14 14:45
       *   @author : 寇珊珊
       */
      entryBack(row) {
        //入库中不允许撤回
        if (this.tableModel == 'waitIn') {
          this.$Message.error(this.$t('W_007', {'param': this.$t('W_095')}))
        }
        //已入库并且是自动  不允许撤回
        else if (this.tableModel == 'ingIn' && row[0].flgHandleSetting) {
          this.$Message.error(this.$t('W_007', {'param': this.$t('W_114')}))
        }
        //已入库 并且是手动  允许撤回
        else if (this.tableModel == 'ingIn' && !row[0].flgHandleSetting) {
          if (this.$refs['table-select'].batchKeys.length === 1) {
            let params = {
              intoId: this.$refs['table-select'].batchKeys[0],
              cpId: this.$store.state.user.cpId
            }
            this.$IBMessage({
                content: this.$t('Q_002', {'param': this.$v('entryBack')}),
                title: this.$t('systemQuestion')
              },
              {
                // 弹出是否删除对话框-是
                ok: () => {
                  let method = null
                  let service = null
                  //其他入库
                  if (row[0].intoType === this.$config.intoTypeBySql.other) {
                    method = 'inboundCancel'
                    service = 'otherInboundService'
                  }
                  //采购入库
                  else if (row[0].intoType === this.$config.intoTypeBySql.purchase) {
                    method = 'purchaseInboundCancel'
                    service = 'purEnterService'
                  }
                  //销售退货入库
                  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('entryBack')}))
                      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 == 'ingIn' && !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 = {
              intoId: this.$refs['table-select'].batchKeys[0],
              cpId: this.$store.state.user.cpId
            }
            this.$IBMessage({
                content: this.$t('Q_002', {'param': this.$v('entryBack')}),
                title: this.$t('systemQuestion')
              },
              {
                // 弹出是否删除对话框-是
                ok: () => {
                  let method = null
                  let service = null
                  //其他入库
                  if (row[0].intoType === this.$config.intoTypeBySql.other) {
                    method = 'outboundRepeal'
                    service = 'otherInboundService'
                  }
                  //采购入库
                  else if (row[0].intoType === this.$config.intoTypeBySql.purchaseReturn) {
                    method = 'purchaseInboundRepeal'
                    service = 'purEnterService'
                  }
                  //销售退货入库
                  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('entryBack')}))
                      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 === 'entryHandle') {
          //作废单据不允许进行此操作
          if(!rows[0].flgValid){
            this.$Message.error(this.$t('W_007', {'param': this.$t('W_118')}))
            return false;
          }
          //已入库不允许进行入库办理
          if (this.tableModel == 'ingIn') {
            this.$Message.warning(this.$t('W_007', {'param': this.$t('W_096')}));
            return false;
          }
        }
        //入库撤回
        else if (rows && rows[0] && btnName === 'entryBack') {
          //作废单据不允许进行此操作
          if(!rows[0].flgValid){
            this.$Message.error(this.$t('W_007', {'param': this.$t('W_118')}))
            return false;
          }
          //入库中不允许进行入库撤回
          if (this.tableModel == 'waitIn') {
            this.$Message.warning(this.$t('W_007', {'param': this.$t('W_097')}));
            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 : 寇珊珊
       */
      entryHandle(row) {
        let name = ''
        //其他入库
        if (row[0].intoType === this.$config.intoTypeBySql.other) {
          name = 'entryHandleOther'
        }
        //采购入库
        else if (row[0].intoType === this.$config.intoTypeBySql.purchase) {
          name = 'entryHandlePur'
        }
        //销售退货入库
        else {
          name = 'entryHandleSaleReturn'
        }
        // 跳转到具体的办理页面
        this.open(this.$config.routeUrl[this.routeObjName][name])
      },
      /**
       *   @desc   : 编辑
       *   @date   : 2024/4/1 15:29
       *   @author : 寇珊珊
       */
      edit(row) {
        let name = ''
        //其他入库
        if (row[0].intoType === this.$config.intoTypeBySql.other) {
          name = 'updateOther'
        }
        //采购入库
        else if (row[0].intoType === this.$config.intoTypeBySql.purchase) {
          name = 'updatePur'
        }
        //销售退货入库
        else {
          name = 'updateSaleReturn'
        }
        // 跳转到具体的办理页面
        this.open(this.$config.routeUrl[this.routeObjName][name])
      },
    },
    created() {
      this.primaryKey = 'intoId'  // 设置主键Id
      this.routeObjName = 'otherInbound'  // 设置路由名称
    }
  }
</script>

<style scoped>

</style>
