<template>
  <div class='onlyReturnMoneyOrder'>
    <div class="quickOperation">
      快捷操作：
      <Button
        type="fcdefault"
        style="margin-right:8px"
        @click="saveAll"
      >
        保存
      </Button>
      <Button type="fcdefault" style="margin-right:8px" @click="refreshParams">刷新</Button>
      <Button type="fcdefault"
      @click="closePage"
      >
        关闭
      </Button>
    </div>
    <div class="content">
      <div
        v-for="(item,tabId) in tabList"
        :key="tabId"
        class="block"
      >
        <foldPanel
          v-model="item.blockShow"
          :title="item.tabtext"
          :explain="item.explainText"
        >
          <div
            slot="content"
            class="block"
          >
            <div class="item">
              <Row>
              <div
                v-for="(i,cindex) in tabList[tabId].list"
                :key="cindex"
                class="form"
              >
                <Col span="8" v-if="i.standard" >
                    <div
                      v-if="i.title"
                      :class="{'title':true,'order-setting-input-error':i.required}"
                    >{{ i.title }}
                     <Tooltip
                      max-width="200"
                      :content="i.explainContent"
                      placement="bottom"
                    >
                      <img
                      v-if="i.explain"
                      class="img-framelanflag"
                      src="../../assets/icon/help.png"
                      >
                    </Tooltip>
                    </div>
                    <DropDownSelectFilter 
                            :single="true"
                            v-if="(i.SKEY=='OUT_SHOP_NAME') || (i.SKEY=='INVOICE_PLATFORM')"
                            class="input_box"
                            :placeholder='i.placeholder'
                            :data="i.shopData"
                            :totalRowCount="i.shopData.totalRowCount"
                            :showColnameKey="'isak'"
                            :defaultSelected="i.defaultSelected"
                            @on-page-change="changePageShop($event,i)"
                            @on-input-value-change="InputValueChangeShop($event,i)"
                            @on-popper-show="searchShopData(i)"
                            @on-fkrp-selected="checkDataShop($event,i)"
                            @on-focus="focusInputValueChangeShop($event,i)"
                            @on-blur="changeDataShop($event,i)"
                            @on-clear="clearDataShop(i)"
                            :dataEmptyMessage="i.dataEmptyMessage"
                            :columns="i.columns"
                            :AutoData="i.AutoData">
                    </DropDownSelectFilter>
                  <Select v-model="i.VALUE" :placeholder='i.placeholder' clearable :disabled="i.disabled" class="input_box" v-else-if="(i.SKEY=='BUSINESS_TYPE') || (i.SKEY=='INVOICE_KIND')"  @on-change="checkInput(cindex,i)">
                      <Option v-for="d in i.optionList" :value="d.value" :key="d.value">{{ d.label }}</Option>
                  </Select>
                  <Input
                    v-else-if="
                    (i.SKEY=='OMSORDERID')
                    ||(i.SKEY=='PLATFORM_TID')
                    ||(i.SKEY=='INVOICE_MEMO')
                    ||(i.SKEY=='PAYER_NAME')
                    ||(i.SKEY=='PAYER_REGISTER_NO')
                    ||(i.SKEY=='PAYER_ADDRESS')
                    ||(i.SKEY=='PAYER_BANK')
                    ||(i.SKEY=='PAYER_BANKACCOUNT')
                    ||(i.SKEY=='PAYEE_NAME')
                    ||(i.SKEY=='PAYEE_REGISTER_NO')
                    ||(i.SKEY=='PAYEE_ADDRESS')
                    ||(i.SKEY=='PAYEE_PHONE')
                    ||(i.SKEY=='PAYEE_BANKNAME')
                    ||(i.SKEY=='PAYEE_BANKACCOUNT')
                    ||(i.SKEY=='PAYEE_RECEIVER')
                    ||(i.SKEY=='PAYEE_CHECKER')
                    ||(i.SKEY=='PAYER_PHONE')
                    ||(i.SKEY=='PAYER_EMAIL')
                    ||(i.SKEY=='SUM_PRICE')
                    ||(i.SKEY=='SUM_TAX')
                    ||(i.SKEY=='INVOICE_AMOUNT')
                    "
                    class="input_box"
                    v-model="i.VALUE"
                    :placeholder='i.placeholder'
                    :disabled="i.disabled"
                    :regx='i.Isregx?regx1:""'
                    @on-keypress='noSpaces($event,i)'
                  />
                </Col>
                <Col span="24"  v-else-if="i.remark" style="align-items: flex-start;">
                  <div
                      v-if="i.title"
                      :class="{'title':true,'order-setting-input-error':i.required}"
                      style="margin-top: 6px;"
                    >{{ i.title }}
                     <Tooltip
                      max-width="200"
                      :content="i.explainContent"
                      placement="bottom"
                    >
                      <img
                      v-if="i.explain"
                      class="img-framelanflag"
                      src="../../assets/icon/help.png"
                      >
                    </Tooltip>
                  </div>
                  <Input 
                    style="max-width: 1000px;"
                    :rows="2"
                    v-model="i.VALUE" 
                    :disabled="i.disabled"
                    type="textarea" 
                    v-if="(i.SKEY=='return_desc')||(i.SKEY=='remark')||(i.SKEY=='sysremark')" 
                    placeholder="请输入内容" />
                </Col>
              </div>
              </Row>
            </div>
          </div>
        </foldpanel>
      </div>
    </div>
    <div class="tableArea">
      <Tabs type="card">
        <TabPane label="电子发票明细表">
          <div class="searchContent" style="display: flex;background: rgb(248, 248, 248);height: 110px;align-items: center;">
              <div>
                <Row style="display: flex; 
                justify-content: space-around;
                align-items: center;
                height: 32px;
                background: #F8F8F8;">
                <Col span="5" >
                  <div style="display: flex;align-items: center;">
                    <label style="width: 90px;text-align: right;margin-right:10px">发票项目名称</label>
                    <Input style="width:240px" v-model="detailForm.ITEM_NAME" @on-enter="addReturnGoods"></Input> 
                  </div>
                </Col>
                <Col span="5" >
                  <div style="display: flex;align-items: center;">
                    <label style="width: 90px;text-align: right;margin-right:10px">税收分类编码</label>
                    <Input style="width:240px" v-model="detailForm.ITEM_NO" @on-enter="addReturnGoods"></Input> 
                  </div>
                </Col>
                <Col span="5">
                  <div style="display: flex;align-items: center;">
                    <label style="width: 90px;text-align: right;margin-right:10px"><span style='color: red;'>*</span>SKU</label>
                    <Select
                      ref="returnSelect"
                      style="width:240px"
                      v-model="detailForm.IESSKUID"
                      @on-query-change="getReturnSkuList"
                      @on-change="selectReturnGoods"
                      @on-enter="addReturnGoods"
                      filterable
                      clearable
                    >
                      <Option v-for="(option,index) in SKUArrReturn" :key="index" :value="option.value">{{option.label}}</Option>
                    </Select>
                    <img
                      style="width:16px;margin-left:8px"
                      src="../../assets/icon/search.png"
                      @click="searchGoods('return')"
                      >
                  </div>
                </Col>
                <Col span="5" >
                  <div style="display: flex;align-items: center;">
                    <label style="width: 90px;text-align: right;margin-right:10px">未税金额</label>
                    <Input style="width:240px" :regx='regx1' v-model="detailForm.SUM_PRICE" @on-enter="addReturnGoods"></Input> 
                  </div>
                </Col>
                </Row>
                <Row style="display: flex; 
                justify-content: space-around;
                align-items: center;
                height: 32px;
                background: #F8F8F8;">
                  
                  <Col span="5" >
                    <div style="display: flex;align-items: center;">
                      <label style="width: 90px;text-align: right;margin-right:10px"><span style='color: red;'>*</span>税额</label>
                      <Input style="width:240px" :regx='regx1' v-model="detailForm.TAX" @on-enter="addReturnGoods"></Input> 
                    </div>
                  </Col>
                  <Col span="5" >
                    <div style="display: flex;align-items: center;">
                      <label style="width: 90px;text-align: right;margin-right:10px">数量</label>
                      <Input style="width:240px" :regx='regx' v-model="detailForm.NUM" @on-enter="addReturnGoods"></Input> 
                    </div>
                  </Col>
                  <Col span="5" >
                    <div style="display: flex;align-items: center;">
                      <label style="width: 90px;text-align: right;margin-right:10px">单价</label>
                      <Input style="width:240px" :regx='regx1' v-model="detailForm.PRICE" @on-enter="addReturnGoods"></Input> 
                    </div>
                  </Col>
                  <Col span="5" >
                    <div style="display: flex;align-items: center;">
                      <label style="width: 90px;text-align: right;margin-right:10px">单价是否含税</label>
                      <Select
                        style="width:240px"
                        v-model="detailForm.WITHTAXFLAG"
                        @on-enter="addReturnGoods"
                        clearable
                      >
                      <Option value="1">是</Option>
                      <Option value="0">否</Option>
                    </Select>
                    </div>
                  </Col>
                </Row>
                <Row style="display: flex; 
                justify-content: space-around;
                align-items: center;
                height: 32px;
                background: #F8F8F8;">
                  <Col span="5" >
                    <div style="display: flex;align-items: center;">
                      <label style="width: 90px;text-align: right;margin-right:10px"><span style='color: red;'>*</span>税率</label>
                      <Input style="width:240px" :regx='regx1' v-model="detailForm.TAX_RATE" @on-enter="addReturnGoods"></Input> 
                    </div>
                  </Col>
                  <Col span="5" >
                    <div style="display: flex;align-items: center;">
                      <label style="width: 90px;text-align: right;margin-right:10px">单位</label>
                      <Input style="width:240px" v-model="detailForm.UNIT" @on-enter="addReturnGoods"></Input> 
                    </div>
                  </Col>
                  <Col span="5" >
                    <div style="display: flex;align-items: center;">
                      <label style="width: 90px;text-align: right;margin-right:10px">价税合计</label>
                      <Input style="width:240px" :regx='regx1' v-model="detailForm.AMOUNT" @on-enter="addReturnGoods"></Input> 
                    </div>
                  </Col>
                  <Col span="5" >
                    <div style="display: flex;align-items: center;">
                      <label style="width: 90px;text-align: right;margin-right:10px">规格型号</label>
                      <Input style="width:240px" v-model="detailForm.SPEC" @on-enter="addReturnGoods"></Input> 
                    </div>
                  </Col>
                </Row>
              </div>
              <div style="display: flex;align-items: center;height: 100%;margin-left: -20px;">
                <Row style="display: flex; 
                  /* justify-content: space-around; */
                  align-items: center;
                  height: 32px;
                  background: #F8F8F8;">
                    <Col span="2" >
                      <Button type="primary" icon="md-return-left" @click="addReturnGoods">添加</Button>
                    </Col>
                </Row>
              </div>
          </div>
            
                
            <div class="handleBtn">
              <div class="handleItem" @click="deleteReturnGoods">【删除】</div>
            </div>
           <Table height="300" 
            :columns="returnColumns" 
            :data="currentReturnData"
            @on-select="selectReturnData"
            @on-select-cancel="selectReturnCancel"
            @on-select-all="selectReturnDataAll"
            @on-select-all-cancel="selectReturnDataCancel"
           ></Table>
           <div class="pageContent">
              <Page
                size="small"
                :current="returnCurrentPage"
                show-elevator
                :total="totalReturn"
                show-total
                show-sizer
                @on-change="changePageReturn"
                @on-page-size-change="changeSizeReturn"
              />
            </div>
        </TabPane>
      </Tabs>
    </div>
     <Modal
      v-model="selectGoodsModal"
      title="选择商品"
      width="900"
      :mask="mask"
      :closable="closable"
      :mask-closable="maskClosable"
      :footer-hide="hideFoot"
      @on-cancel="cancelSelectGoods">
        <div class="conditionContent">
          <div class="itemContent">
            <div class="itemLabel">
              商品名称
            </div>
            <Input
              style="width:240px"
              v-model="selectGoodsData.PRODUCTNAME"
              clearable
            />
          </div>
          <div class="itemContent">
            <div class="itemLabel">
              商品编码
            </div>
            <Input
              style="width:240px"
              v-model="selectGoodsData.PRODUCTCODE"
              clearable
            />
          </div>
          <div class="itemContent">
            <div class="itemLabel">
              SKU
            </div>
            <Input
              v-model="selectGoodsData.SKU"
              clearable
            />
          </div>
          <div class="itemContent">
            <div class="itemLabel">
              国标码
            </div>
            <Input
              v-model="selectGoodsData.GBCODE"
              clearable
            ></Input>
          </div>
          <div class="itemContent">
            <div class="itemLabel">
              颜色
            </div>
            <Input
              v-model="selectGoodsData.NORMS1NAME"
              clearable
            ></Input>
          </div>
          <div class="itemContent">
            <div class="itemLabel">
              尺寸
            </div>
            <Input
              v-model="selectGoodsData.NORMS2NAME"
              clearable
            ></Input>
          </div>
          
        </div>
        <ShrinkOrExtend
          :form-data="originalOrderData"
          :height="shrinkHeight"
          :current-value="currentValue"
          @click="upOrDown(shrinkHeight)"
          @on-reset="resetGoodsData"
          @on-query="searchGoodsData"
        />
        <Table 
        :height="tableHeight" 
        :columns="SKUColumns" 
        :data="GoodsData"
        highlight-row
        @on-current-change="selectGoods"
        ></Table>
        <div class="pageContent">
          <Page
            size="small"
            :current="GoodsCurrentPage"
            show-elevator
            :total="totalGoods"
            show-total
            show-sizer
            @on-change="changePageGoods"
            @on-page-size-change="changeSizeGoods"
          />
        </div>
      <footer style="display: flex; justify-content: center; margin-top: 12px;padding-top: 16px;border-top: 1px solid #DEDEDE;;">
        <Button
          type="fcdefault"
          @click="cancelSelectGoods"
        >
          取消
        </Button>
        <Button
          type="posdefault"
          style="margin-left: 16px"
          @click="okSelectGoods"
        >
          确认
        </Button>
      </footer>
    </Modal>
    <Modal
      v-model="showTip"
      mask
      :mask-closable="maskClosable"
      title="警告"
      title-align="left"
      class-name="showTipModel"
      width="400px"
      @on-ok="resetData"
    >
      <p><i class="iconfont iconbj_doubt fcWarning " />修改的数据未保存，确定刷新？</p>
    </Modal>
  </div>
</template>
<script>
  import foldPanel from '../customizedContent/FoldPanel.vue'; // 折叠面板组件
  import ShrinkOrExtend from '../customizedContent/shrinkOrExtend' //收缩伸展搜索条件组件 
  import tableFaker from '../customizedContent/tableFaker.vue'; //表格组件
  
  // import R3 from '../../../static/r3/r3.publish/r3.min';
  const R3 = window.R3;
  const { network, urlSearchParams, store } = R3;
  export default {
    data() {
      return {
        SKUArrReturn:[],//退货商品SKU下拉框列表
        SKUAllDataReturn:[],//退货商品SKU下拉框列表完整数据
        selectReturnSKUData:{},//退货商品选中的SKU数据
        returnGoodsNum:'',//退货商品数量
        TRUEPRICE: '', //订单成交金额
        REFUNDTRUEPRICE: '',//退款金额
        detailForm: {
          ITEM_NAME: '',
          ITEM_NO: '',
          IESSKUID: '',
          SUM_PRICE: '',
          TAX: '',
          NUM: '',
          PRICE: '',
          WITHTAXFLAG: '1',
          TAX_RATE: '',
          UNIT: '',
          AMOUNT: '',
          SPEC:'',
        },
        regx: /^\d{0,15}?$/, // 正整数
        regx1: /^-?\d{0,15}(\.[0-9]{0,2})?$/,

        refundableAmount: '0.0000', // 应退总金额
        refundablePostage: '0.0000', // 应退邮费
        otherAmount: '0.0000', // 其他金额
        exchangeAmount: '0.0000', // 换货金额
        SYSREMARK: '', //系统备注
        total: 0, // 退货单总金额
        tabList: [
          {
            tabId: '1',
            tabtext: '基础信息',
            blockShow: true,
            list: [
              {
                ID: '',
                SKEY: 'OMSORDERID',
                title: 'OMS订单号',
                VALUE: '',
                company: '',
                tips: '',
                regx: /^\d{0,100}?$/,
                disabled:false,
                standard:true,//标准输入框长度
                flag: true, // 控制必填校验样式展示
                required: true, // 是否为必填项
                placeholder: '请输入OMS订单号'
              },
              {
                ID: '',
                SKEY:'OUT_SHOP_NAME', //字段
                title:'店铺名称', //字段名称
                VALUE: '', //字段值
                clearable:true,
                required: true, // 是否为必填项
                tableName:'',//表名
                currentIndex:0,//当前页码
                dataEmptyMessage: '数据加载中...', // 无数据的提示
                columns:['name','value'],// 展现的组
                AutoData:[],//模糊搜索
                defaultSelected:[],//默认数据
                shopData:{},
                standard:true,//标准输入框长度
                placeholder: '请输入店铺名称'
              },
              {
                ID: '',
                SKEY:'INVOICE_PLATFORM', //字段
                title:'对接开票平台', //字段名称
                VALUE: '', //字段值
                clearable:true,
                required: true, // 是否为必填项
                tableName:'',//表名
                currentIndex:0,//当前页码
                dataEmptyMessage: '数据加载中...', // 无数据的提示
                columns:['name','value'],// 展现的组
                AutoData:[],//模糊搜索
                defaultSelected:[],//默认数据
                shopData:{},
                standard:true,//标准输入框长度
                placeholder: '请输入对接开票平台'
              },
              {
                ID: '',
                SKEY: 'PLATFORM_TID',
                title: '平台订单号',
                VALUE: '',
                company: '',
                tips: '',
                regx: /^\d{0,100}?$/,
                disabled:false,
                standard:true,//标准输入框长度
                flag: true, // 控制必填校验样式展示
                required: false, // 是否为必填项
                explain:false, //是否有解释
                placeholder: '请输入平台订单号'
              },
              {
                ID: '',
                SKEY: 'INVOICE_MEMO',
                title: '发票备注',
                VALUE: '',
                company: '',
                tips: '',
                standard:true,//标准输入框长度
                flag: false, // 控制必填校验样式展示
                placeholder: '请输入发票备注'
              },
            ]
          },
          {
            tabId: '2',
            tabtext: '发票信息',
            blockShow: true,
            list: [
              {
                SKEY: 'BUSINESS_TYPE',
                title: '开票类型',
                VALUE: '0',
                defaultvalue: '',
                company: '',
                tips: '',
                disabled:false,
                required: true, // 是否为必填项
                standard:true,//标准输入框长度
                flag: true, // 控制必填校验样式展示
                optionList:[
                  { label: '个人',value: '0' },
                  { label: '企业',value: '1' }
                ]
              },
              {
                SKEY: 'INVOICE_KIND',
                title: '发票种类',
                VALUE: '',
                defaultvalue: '',
                company: '',
                tips: '',
                disabled:false,
                required: true, // 是否为必填项
                standard:true,//标准输入框长度
                flag: true, // 控制必填校验样式展示
                placeholder: '请输入发票种类',
                optionList:[
                  { label: '电子发票',value: '0' },
                  { label: '纸质发票',value: '1' },
                  { label: '专票',value: '2' }
                ]
              },
              {
                ID: '',
                SKEY: 'PAYER_NAME',
                title: '发票抬头',
                VALUE: '',
                company: '',
                tips: '',
                required: true, // 是否为必填项
                standard:true,//标准输入框长度
                flag: false, // 控制必填校验样式展示
                placeholder: '请输入发票抬头'
              },
              {
                ID: '',
                SKEY: 'PAYER_ADDRESS',
                title: '买方地址',
                VALUE: '',
                company: '',
                tips: '',
                required: false, // 是否为必填项
                standard:true,//标准输入框长度
                flag: false, // 控制必填校验样式展示
                placeholder: '请输入买方地址'
              },
              {
                ID: '',
                SKEY: 'PAYER_BANK',
                title: '买方开户银行',
                VALUE: '',
                company: '',
                tips: '',
                required: false, // 是否为必填项
                standard:true,//标准输入框长度
                flag: false, // 控制必填校验样式展示
                placeholder: '请输入买方开户银行'
              },
              {
                ID: '',
                SKEY: 'PAYER_BANKACCOUNT',
                title: '买方开户行账户',
                VALUE: '',
                company: '',
                tips: '',
                required: false, // 是否为必填项
                standard:true,//标准输入框长度
                flag: false, // 控制必填校验样式展示
                placeholder: '请输入买方开户行账户'
              },
            ]
          },
          {
            tabId: '3',
            tabtext: '销售方信息',
            blockShow: true,
            list: [
              {
                ID: '',
                SKEY: 'PAYEE_NAME',
                title: '公司名称',
                VALUE: '',
                company: '',
                tips: '',
                standard:true,//标准输入框长度
                flag: false, // 控制必填校验样式展示
                placeholder: '请输入公司名称'
              },
              {
                ID: '',
                SKEY: 'PAYEE_REGISTER_NO',
                title: '税号',
                VALUE: '',
                company: '',
                tips: '',
                standard:true,//标准输入框长度
                flag: false, // 控制必填校验样式展示
                placeholder: '请输入税号'
              },
              {
                ID: '',
                SKEY: 'PAYEE_ADDRESS',
                title: '地址',
                VALUE: '',
                company: '',
                tips: '',
                standard:true,//标准输入框长度
                flag: false, // 控制必填校验样式展示
                placeholder: '请输入地址'
              },
              {
                ID: '',
                SKEY: 'PAYEE_PHONE',
                title: '电话',
                VALUE: '',
                company: '',
                tips: '',
                standard:true,//标准输入框长度
                flag: false, // 控制必填校验样式展示
                placeholder: '请输入电话'
              },
              {
                ID: '',
                SKEY: 'PAYEE_BANKNAME',
                title: '开户行',
                VALUE: '',
                company: '',
                tips: '',
                standard:true,//标准输入框长度
                flag: false, // 控制必填校验样式展示
                placeholder: '请输入开户行'
              },
              {
                ID: '',
                SKEY: 'PAYEE_BANKACCOUNT',
                title: '开户账号',
                VALUE: '',
                company: '',
                tips: '',
                standard:true,//标准输入框长度
                flag: false, // 控制必填校验样式展示
                placeholder: '请输入开户账号'
              },
              {
                ID: '',
                SKEY: 'PAYEE_RECEIVER',
                title: '收款人',
                VALUE: '',
                company: '',
                tips: '',
                standard:true,//标准输入框长度
                flag: false, // 控制必填校验样式展示
                placeholder: '请输入收款人'
              },
              {
                ID: '',
                SKEY: 'PAYEE_CHECKER',
                title: '复核人',
                VALUE: '',
                company: '',
                tips: '',
                standard:true,//标准输入框长度
                flag: false, // 控制必填校验样式展示
                placeholder: '请输入复核人'
              },
            ]
          },
          {
            tabId: '4',
            tabtext: '申请人信息',
            blockShow: true,
            list: [
              {
                ID: '',
                SKEY: 'PAYER_PHONE',
                title: '买家联系电话',
                VALUE: '',
                company: '',
                tips: '',
                required: true, // 是否为必填项
                standard:true,//标准输入框长度
                flag: false, // 控制必填校验样式展示
                placeholder: '请输入买家联系电话'
              },
              {
                ID: '',
                SKEY: 'PAYER_EMAIL',
                title: '买家电子邮箱',
                VALUE: '',
                company: '',
                tips: '',
                standard:true,//标准输入框长度
                flag: false, // 控制必填校验样式展示
                placeholder: '请输入买家电子邮箱'
              },
            ]
          },
          {
            tabId: '5',
            tabtext: '金额合计',
            blockShow: true,
            list: [
              {
                ID: '',
                SKEY: 'SUM_PRICE',
                title: '合计金额',
                VALUE: '',
                company: '',
                tips: '',
                Isregx: true,
                disabled:false,
                standard:true,//标准输入框长度
                placeholder: '请输入合计金额'
              },
              {
                ID: '',
                SKEY: 'SUM_TAX',
                title: '合计税额',
                VALUE: '',
                company: '',
                tips: '',
                Isregx: true,
                disabled:false,
                standard:true,//标准输入框长度
                placeholder: '请输入合计税额'
              },
              {
                ID: '',
                SKEY: 'INVOICE_AMOUNT',
                title: '开票金额',
                VALUE: '',
                company: '',
                tips: '',
                Isregx: true,
                disabled:false,
                standard:true,//标准输入框长度
                placeholder: '请输入开票金额'
              },
              {
                ID: '',
                SKEY: 'sysremark',
                title: '系统备注',
                VALUE: '',
                defaultvalue: '',
                company: '',
                tips: '',
                standard:false,//标准输入框长度
                remark:true,//备注栏
                disabled: true, 
                flag: false, // 控制必填校验样式展示
              },
            ]
          },
        ],
        returnColumns: [ //退货商品
            {
              type: 'selection',
              width: 60,
              align: 'center'
            }, 
            {
              type: 'index',
              align: 'center',
              title: '序号',
            },
            {
              title: '发票项目名称',
              align: 'center',
              key: 'ITEM_NAME'
            },
            {
              title: '税收分类编码',
              align: 'center',
              key: 'ITEM_NO'
            },
            {
              title: 'SKU',
              align: 'center',
              key: 'SKU'
            },
            {
              title: '未税金额',
              align: 'center',
              key: 'SUM_PRICE'
            },
            {
              title: '税额',
              align: 'center',
              key: 'TAX'
            },
            // 新增字段
            {
              title: '数量',
              align: 'center',
              key: 'NUM',
              render: (h, params) => {
                let this_=this
                return h(
                  'Input',
                  {
                    style: {
                      width:'66px'
                    },
                    props: {
                      value: params.row.NUM,
                      number: true
                    },
                    on: {
                      'on-blur': (event) => {
                        let chengeData=this.currentReturnData[params.index] 
                        this.returnData[params.index].NUM = event.target.value
                        
                        this.totalReturn=this.returnData.length;
                        let startIndex=this.pageSizeReturn*(this.returnCurrentPage-1)
                        let endIndex=startIndex+this.pageSizeReturn
                        this.currentReturnData=this.returnData.slice(startIndex,endIndex) //当前页面显示明细
                      }
                    }
                  },
                );
              },
            },
            {
              title: '单价',
              align: 'center',
              key: 'PRICE',
              render: (h, params) => {
                let this_=this
                return h(
                  'Input',
                  {
                    style: {
                      width:'66px'
                    },
                    props: {
                      value: params.row.PRICE,
                    },
                    on: {
                      'on-blur': (event) => {
                          let chengeData=this.currentReturnData[params.index]
                          event.target.value=this.standardMoney(this.parser(event.target.value)) 
                          this.returnData[params.index].PRICE = this.standardMoney(this.parser(event.target.value));
                          this.totalReturn=this.returnData.length;
                          let startIndex=this.pageSizeReturn*(this.returnCurrentPage-1)
                          let endIndex=startIndex+this.pageSizeReturn
                          this.currentReturnData=this.returnData.slice(startIndex,endIndex) //当前页面显示明细
                      }
                    }
                  },
                );
              },
            },
            {
              title: '单价是否含税',
              align:'center',
              key: 'WITHTAXFLAGTEXT'
            },
            {
              title: '税率',
              align: 'center',
              key: 'TAX_RATE',
              render: (h, params) => {
                return h(
                  'Input',
                  {
                    style: {
                      width:'66px'
                    },
                    props: {
                      value: params.row.TAX_RATE,
                    },
                    on: {
                      'on-blur': (event) => {
                        let chengeData=this.currentReturnData[params.index] 
                        event.target.value=this.standardMoney(this.parser(event.target.value)) 
                        this.returnData[params.index].TAX_RATE = this.standardMoney(this.parser(event.target.value));
                        this.totalReturn=this.returnData.length;
                        let startIndex=this.pageSizeReturn*(this.returnCurrentPage-1)
                        let endIndex=startIndex+this.pageSizeReturn
                        this.currentReturnData=this.returnData.slice(startIndex,endIndex) //当前页面显示明细
                      }
                    }
                  },
                );
              },
            },
            {
              title: '单位',
              align: 'center',
              key: 'UNIT',
              render: (h, params) => {
                return h(
                  'Input',
                  {
                    style: {
                      width:'66px'
                    },
                    props: {
                      value: params.row.UNIT,
                    },
                    on: {
                      'on-blur': (event) => {
                        let chengeData=this.currentReturnData[params.index] 
                        this.returnData[params.index].UNIT = event.target.value;
                        this.totalReturn=this.returnData.length;
                        let startIndex=this.pageSizeReturn*(this.returnCurrentPage-1)
                        let endIndex=startIndex+this.pageSizeReturn
                        this.currentReturnData=this.returnData.slice(startIndex,endIndex) //当前页面显示明细
                      }
                    }
                  },
                );
              },
            },
            {
              title: '发票行性质',
              align:'center',
              key: 'ROWTYPETEXT'
            },
            {
              title: '税价合计',
              align: 'center',
              key: 'AMOUNT',
              render: (h, params) => {
                let this_=this
                return h(
                  'Input',
                  {
                    style: {
                      width:'66px'
                    },
                    props: {
                      value: params.row.AMOUNT,
                      number: true
                    },
                    on: {
                      'on-blur': (event) => {
                        let chengeData=this.currentReturnData[params.index] 
                        this.returnData[params.index].AMOUNT = event.target.value
                        
                        this.totalReturn=this.returnData.length;
                        let startIndex=this.pageSizeReturn*(this.returnCurrentPage-1)
                        let endIndex=startIndex+this.pageSizeReturn
                        this.currentReturnData=this.returnData.slice(startIndex,endIndex) //当前页面显示明细
                      }
                    }
                  },
                );
              },
            },
            {
              title: '规格型号',
              align: 'center',
              key: 'SPEC',
              render: (h, params) => {
                return h(
                  'Input',
                  {
                    style: {
                      width:'66px'
                    },
                    props: {
                      value: params.row.SPEC,
                    },
                    on: {
                      'on-blur': (event) => {
                        let chengeData=this.currentReturnData[params.index] 
                        this.returnData[params.index].SPEC = event.target.value;
                        this.totalReturn=this.returnData.length;
                        let startIndex=this.pageSizeReturn*(this.returnCurrentPage-1)
                        let endIndex=startIndex+this.pageSizeReturn
                        this.currentReturnData=this.returnData.slice(startIndex,endIndex) //当前页面显示明细
                      }
                    }
                  },
                );
              },
            },
        ],

        highlightRow:true,//支持单选
        selectTableData:{},//选中的数据
        nowTab:'all',//默认当前tab页为全部
        allFixOne:{
          OrderStatus:["=1","=2","=3","=4","=5","=6","=7","=21","=50"]
        },//订单明细表格过滤条件
        warehouseFix:{ //仓库发货表格过滤条件
          OrderStatus: "=5"
        },
        platformFix:{ //平台发货表格过滤条件
          OrderStatus: "=6"
        },
        tableHeight:'200',//表格高度
        currentReturnData:[],//当前显示退款明细
        returnData:[],
        returnDataNoSame:[],//弹窗中没有的退货商品
        submitArrReturn:[],//选中的退货商品
        // 退货商品page
        returnCurrentPage:1,
        totalReturn: 0, // 总条数
        currentPageReturn: 0, // 页码
        pageSizeReturn: 10, // 每页的条数

        mask:true,
        closable: true,
        maskClosable: false,
        hideFoot: true,
        shrinkHeight: '58px',
        currentValue: false,//默认收缩
        originalOrderData:{
          ID:'',//订单编号
          TID:'',//平台单号SOURCECODE
          SOURCECODE: '', //系统单号
          LOGISTICSNUMBER: '', //物流单号
          ALLSKU:'',//所有SKU
          RECEIVMOBILE:'',//收件人手机号码
          RECEIVNAME:'',//收件人
          USERNICK:'',//买家昵称
        },
        selectGoodsModal:false,//选择商品弹窗
        nowGoodsType:'',//当前商品表类型
        selectGoodsData:{//选择商品搜索条件
          NORMS1NAME:'',//颜色
          NORMS2NAME:'',//尺寸
          SKU:'',//SKU
          GBCODE:'',//国标码
          PRODUCTCODE:'',//商品编码
          PRODUCTNAME:''//商品名称
        },
        submitArrGoods:[],//选择商品表格选中项
        SKUColumns:[
          {
            title: 'SKU',
            key: 'SKU'
          },
          {
            title: '销售价',
            key: 'SELLPRICE'
          },
          {
            title: '商品名称',
            key: 'PRODUCTNAME'
          },
          {
            title: '颜色',
            key: 'NORMS1NAME'
          },
          {
            title: '尺寸',
            key: 'NORMS2NAME'
          },
          {
            title: '重量',
            key: 'WEIGHT'
          },
          {
            title: '库位',
            key: 'STORESITE'
          },
          {
            title: '国标码',
            key: 'GBCODE'
          },
          {
            title:'图片地址',
             key: 'PICTUREURL',
              render: (h, params) => {
                return h(
                  'div',
                  { 
                    class:{
                      imgBox:true
                    },
                    style: {
                      zIndex: 999,
                      width:'60px',
                      height:'60px',
                      position:'relative'
                    },
                      
                  },
                  [
                    h('Img',
                    {
                       style: {
                          width:'60px',
                          height:'60px'
                        },
                      attrs: {
                        src:params.row.PICTUREURL==''?'../../../static/img/camera.jpg':params.row.PICTUREURL,
                      },
                      on:{
                        'mouseenter':(e)=>{
                          var txt3=document.createElement("img");
                          txt3.id='enlargeImg'
                          txt3.src=params.row.PICTUREURL==''?'../../../static/img/camera.jpg':params.row.PICTUREURL
                          txt3.style.height='120px'
                          txt3.style.width='120px'
                          txt3.style.position='fixed'
                          if(this.currentValue){
                            txt3.style.top=($(".imgBox")[params.index].offsetParent.offsetHeight + $(".imgBox")[params.index].offsetTop - $(".imgBox")[params.index].offsetParent.scrollTop + 30)-100+'px';
                          }else{
                            txt3.style.top=($(".imgBox")[params.index].offsetParent.offsetHeight + $(".imgBox")[params.index].offsetTop - $(".imgBox")[params.index].offsetParent.scrollTop + 30)+'px';
                          }
                          txt3.style.left=($(".imgBox")[0].offsetLeft-$(".imgBox")[params.index].offsetParent.scrollLeft + 60 + 30)+'px'
                          $(".imgBox")[params.index].append(txt3)
                        },
                        'mouseleave':(e)=>{
                          $("#enlargeImg").remove();
                        }
                      }
                    },
                    )
                  ]

                )
              }
          },
          {
            title: 'SKU是否有效',
            key: 'ISVALID',
            render: (h, params) => {
              const vm = this;
              return h(
                'div',
                {
                  style: {
                   color:params.row.ISVALID==1?'#63A4FE':'#D70017'
                  },
                },
                [params.row.ISVALID==1?'是':'否']
              );
            },
          },
          {
            title: '安全库存数',
            key: 'SECURITYSTOCK'
          },
        ],
        GoodsData:[],//选择商品数据
        
        // 换货商品page
        totalGoods: 0, // 总条数
        currentGoodsPage:0, // 页码
        pageSizeGoods: 10, // 每页的条数
        GoodsCurrentPage: 1,
        showTip: false,

        TIDOld: '', // 从订单管理跳转的原始单据的平台单号

      };
    },
    components: {
      foldPanel,
      ShrinkOrExtend,
      tableFaker
    },
    created(){
      this.getQuery('T_V_IESSHOP')// 初始查询店铺名称列表
      if(this.$route.query.TID){
        this.OMSID = this.$route.query.OMSID;
        this.TIDOld = this.$route.query.TID;
        this.getInvoiceDetailParam()
      }
      // this.getQuery('T_V_OMSLOGISTICSCOMPANY')// 初始查询物流公司列表
      // this.getQuery('T_OMSREASONTYPE',{REFUNDTYPE:2})// 初始查询退款原因
      // this.getQuery('T_IESWAREHOUSE')// 初始查询退货仓库
    },
    methods: {
      getInvoiceDetailParam() {
        let params = {
          platformTid: this.$route.query.TID
        }
        network.post('/p/cs/getInvoiceDetailParam',params).then(res => {
          if(res.data.code == 0) {
            this.tabList[0].list[0].VALUE = this.OMSID;
            if(res.data.data){
              this.tabList[0].list[1].NAME = res.data.data.outShopName?res.data.data.outShopName:'';
              this.tabList[0].list[1].VALUE = res.data.data.shopId?res.data.data.shopId:'';
              this.tabList[0].list[1].defaultSelected = res.data.data.shopId?[{
                ID:  res.data.data.shopId,
                Label: res.data.data.outShopName
              }]:[];
              this.tabList[0].list[2].NAME = res.data.data.invoicePlatformName?res.data.data.invoicePlatformName:'';
              this.tabList[0].list[2].VALUE = res.data.data.invoicePlatform?res.data.data.invoicePlatform:'';
              this.tabList[0].list[2].defaultSelected = res.data.data.invoicePlatform?[{
                ID: res.data.data.invoicePlatform,
                Label: res.data.data.invoicePlatformName
              }]:[];
              this.tabList[0].list[3].VALUE = res.data.data.platformTid;
              if(res.data.data.addInvoiceDetailList.length>0){
                res.data.data.addInvoiceDetailList.forEach(item => {
                  let obj = {
                    ID: 'cs'+ Math.floor(Math.random()*10000),
                    ITEM_NAME: item.itemName,
                    ITEM_NO: item.itemNo,
                    SKU: item.sku,
                    IESSKUID: item.skuid,
                    SUM_PRICE: item.sumPrice,
                    TAX: item.tax,
                    NUM: item.num,
                    PRICE: item.price,
                    ROWTYPE: item.rowType,
                    ROWTYPETEXT: item.rowType==0?'正常行':item.rowType==1?'折扣行':'被折扣行',
                    WITHTAXFLAG: item.withtaxflag,
                    WITHTAXFLAGTEXT: item.withtaxflag==1?'是':'否',
                    TAX_RATE: item.taxRate,
                    UNIT: item.unit,
                    AMOUNT: item.amount,
                    SPEC: item.spec
                  }
                  this.returnData.push(obj);
                  this.totalReturn=this.returnData.length
                  if(this.totalReturn){ //翻页
                    this.returnCurrentPage=parseInt((this.totalReturn-1)/this.pageSizeReturn)+1
                  }
                  // 截取数组
                  let startIndex=this.pageSizeReturn*(this.returnCurrentPage-1)
                  let endIndex=startIndex+this.pageSizeReturn
                  this.currentReturnData=this.returnData.slice(startIndex,endIndex) //当前页面显示明细
                })
              }
            }
          }
        })
      },
      refreshParams() {
        let flag = true;
        for(let i = 0;i<this.tabList[0].list.length;i++){
          if(this.tabList[0].list[i].VALUE){
            flag = false;
            break;
          }
        }
        for(let i = 0;i<this.tabList[1].list.length;i++){
          if(this.tabList[1].list[i].VALUE){
            if(i == 0 && this.tabList[1].list[i].VALUE == '0') { // 开票类型默认选中
            }else {
              flag = false;
              break;
            }
          }
        }
        for(let i = 0;i<this.tabList[2].list.length;i++){
          if(this.tabList[2].list[i].VALUE){
            flag = false;
            break;
          }
        }
        for(let i = 0;i<this.tabList[3].list.length;i++){
          if(this.tabList[3].list[i].VALUE){
            flag = false;
            break;
          }
        }
        if(this.detailForm.ITEM_NAME){
          flag = false;
        }
        if(this.detailForm.ITEM_NO) {
          flag = false;
        }
        if(this.detailForm.IESSKUID) {
          flag = false;
        }
        if(this.detailForm.SUM_PRICE) {
          flag = false;
        }
        if(this.detailForm.TAX) {
          flag = false;
        }
        if(this.detailForm.NUM) {
          flag = false;
        }
        if(this.detailForm.PRICE) {
          flag = false;
        }
        if(this.detailForm.WITHTAXFLAG != '1') {
          flag = false;
        }
        if(this.detailForm.TAX_RATE) {
          flag = false;
        }
        if(this.detailForm.UNIT) {
          flag = false;
        }
        if(this.detailForm.AMOUNT) {
          flag = false;
        }
        if(this.detailForm.SPEC) {
          flag = false;
        }
        if(this.currentReturnData.length > 0){
          flag = false
        }
        if(!flag){
          this.showTip = true;
        }
      },
      // 重置数据
      resetData(){
        this.tabList.forEach(item=>{
          item.list.forEach(i=>{
            if(i.SKEY == 'BUSINESS_TYPE'){
              i.VALUE='0'
            }else {
              i.VALUE=''
            }
          })
        })
        this.returnData = []; // 退款明细置空
        this.currentReturnData = []; // 仅退款明细置空
        this.detailForm = {
          ITEM_NAME: '',
          ITEM_NO: '',
          IESSKUID: '',
          SUM_PRICE: '',
          TAX: '',
          NUM: '',
          PRICE: '',
          WITHTAXFLAG: '1',
          TAX_RATE: '',
          UNIT: '',
          AMOUNT: '',
          SPEC: '',
        }
        // 退回明细搜索栏重置
        if(this.$refs.returnSelect){
          this.$refs.returnSelect.clearSingleSelect()
        }
      },
      // 关闭当前页面
      closePage(){
        const { fullPath } = this.$route;
        const {
          keepAliveModuleName,tableName
        } = this.$store.state.global.activeTab;
        this.$store.commit('global/tabCloseAppoint', {
          tableName,
          routeFullPath: fullPath,
          keepAliveModuleName,
          stopRouterPush: true,
        });
        if(this.$route.query.OMSID){
           // 跳转
          setTimeout(()=>{
            R3.store.commit('global/tabOpen', {
              type: 'S',
              tableName:'T_V_OMSONLINEORDER',
              tableId:'10883',
              back:true
            });
          },0)
        }else {
          // 跳转
          setTimeout(()=>{
            R3.store.commit('global/tabOpen', {
              type: 'S',
              tableName:'T_V_INVOICE',
              tableId:'10605',
              back:true
            });
          },0)
        }
      },
      // 获取退货表格所有SKU
      getReturnSkuList(val){
         let virtual={sku: val}
          network.post('/p/cs/getIesSku', virtual).then((res) => {
            if(res.data.Code==0){
              this.SKUArrReturn=res.data.Rows.map(i=>{
                return {
                  label:i.SKU,
                  value:i.ID
                }
              })
              this.SKUAllDataReturn=res.data.Rows
            }else{
              this.SKUArrReturn=[]
              this.SKUAllDataReturn=[]
            }
          })
      },
      selectReturnGoods(val){
        if(this.detailForm.IESSKUID){
          this.selectReturnSKUData=this.SKUAllDataReturn.find(item=>{
            return item.ID==val
          })
        }else{
          this.selectReturnSKUData={}
        }
      },
      // 添加退货商品到表格
      addReturnGoods(){
          if(JSON.stringify(this.selectReturnSKUData)=='{}'){
            this.$Message.warning('SKU不能为空');
            return
          }
          if(this.detailForm.TAX == ''){
            this.$Message.warning('税额不能为空');
            return
          }
          if(this.detailForm.TAX_RATE == ''){
            this.$Message.warning('税率不能为空');
            return
          }
          let obj1 = this.selectReturnSKUData 
          let obj = JSON.parse(JSON.stringify(this.detailForm))
          let addData= {
            ID: 'cs'+ Math.floor(Math.random()*10000),
            ITEM_NAME: obj.ITEM_NAME,
            ITEM_NO: obj.ITEM_NO,
            SKU: obj1.SKU,
            IESSKUID: obj.IESSKUID,
            SUM_PRICE: obj.SUM_PRICE,
            TAX: obj.TAX,
            NUM: obj.NUM,
            PRICE: obj.PRICE,
            ROWTYPE: '',
            ROWTYPETEXT: '',
            WITHTAXFLAG: obj.WITHTAXFLAG,
            WITHTAXFLAGTEXT: obj.WITHTAXFLAG==1?'是':'否',
            TAX_RATE: obj.TAX_RATE,
            UNIT: obj.UNIT,
            AMOUNT: obj.AMOUNT,
            SPEC: obj.SPEC,
          }
          this.returnData.push(addData)
          this.$refs.returnSelect.clearSingleSelect()
          this.totalReturn=this.returnData.length
          if(this.totalReturn){ //翻页
            this.returnCurrentPage=parseInt((this.totalReturn-1)/this.pageSizeReturn)+1
          }

          //每次添加完数据，清空搜索项内容
          this.detailForm={
            ITEM_NAME: '',
            ITEM_NO: '',
            IESSKUID: '',
            SUM_PRICE: '',
            TAX: '',
            NUM: '',
            PRICE: '',
            WITHTAXFLAG: '1',
            TAX_RATE: '',
            UNIT: '',
            AMOUNT: '',
            SPEC: '',
          }
          // 截取数组
          let startIndex=this.pageSizeReturn*(this.returnCurrentPage-1)
          let endIndex=startIndex+this.pageSizeReturn
          this.currentReturnData=this.returnData.slice(startIndex,endIndex) //当前页面显示明细
      },
      //初始查询标准下拉框数据
      getQuery(tableName,fixed){
        let virtual={
          fixedcolumns: fixed?fixed:{},
          range: 1000,
          startindex: 0,
          table: tableName
        }
          network.post('/p/cs/list/query', virtual).then((res) => {
            this.tabList[0].list.forEach(item=>{
              if(item.ID==tableName){
                if(tableName=='T_V_IESSHOP'){
                  item.optionList= res.data.rows.map(i=>{
                    return {
                      label:i.SHOPTITLE.val,
                      value:i.ID.val
                    }
                  })
                }else if(tableName=='T_IESWAREHOUSE'){
                  item.optionList= res.data.rows.map(i=>{
                    return {
                      label:i.WAREHOUSENAME.val,
                      value:i.ID.val
                    }
                  })
                }else{
                  item.optionList= res.data.rows.map(i=>{
                    return {
                      label:i.NAME.val,
                      value:i.ID.val
                    }
                  })
                }
                
              }
            })
          })
      },
      
      // 选择商品 在单选下有效，选中某一项时触发
      selectGoods(selection){
        this.submitArrGoods=[selection]
      },
      
      // 选择商品页码改变时触发
      changePageGoods(val) {
        // 1=>0 2=>10 3=>20 
        this.currentGoodsPage = (val - 1) * 10;
        this.searchGoodsData();
      },
      // 选择商品页数改变时触发
      changeSizeGoods(val) {
        this.pageSizeGoods = val;
        this.currentGoodsPage = 1;
        this.searchGoodsData();
      },
      // 打开选择商品弹窗
      searchGoods(name){
        this.nowGoodsType=name
        this.searchGoodsData()
        this.selectGoodsModal=true
      },
      // 关闭选择商品弹窗
      cancelSelectGoods(){
        this.selectGoodsData={ 
          NORMS1NAME:'',//颜色
          NORMS2NAME:'',//尺寸
          SKU:'',//SKU
          GBCODE:'',//国标码
          // SELLPRICE:'',//销售价
          // BASEPRICE:'',//成本价
          PRODUCTCODE:'',//商品编码
          PRODUCTNAME:''//商品名称
        }
        this.submitArrGoods=[]
        this.selectGoodsModal=false
      },
      okSelectGoods(){
        if(!this.submitArrGoods.length){
          this.$Message.warning('请选择商品');
          return
        }
        if(this.nowGoodsType=='exchange'){
            network.post('/p/cs/getIesSku', {sku: this.submitArrGoods[0].SKU}).then((res) => {
              if(res.data.Code==0){
                if(!res.data.Rows.length){
                  this.$Message.warning('该SKU无法添加，请重新选择');
                  return
                }
                this.SKUArr=res.data.Rows.map(i=>{
                  return {
                    label:i.SKU,
                    value:i.ID
                  }
                })
                this.SKUAllData=res.data.Rows
              }else{
                this.SKUArr=[]
                this.SKUAllData=[]
              }
              this.selectSKUData=this.SKUAllData.find(item=>{
                return item.ID==this.submitArrGoods[0].ID
              }) //添加的数据
              this.selectSKUID=this.selectSKUData.ID //双向数据绑定
              this.cancelSelectGoods()
            })
            
        }else if(this.nowGoodsType=='return'){
          network.post('/p/cs/getIesSku', {sku: this.submitArrGoods[0].SKU}).then((res) => {
            if(res.data.Code==0){
              if(!res.data.Rows.length){
                this.$Message.warning('该SKU无法添加，请重新选择');
                return
              }
              this.SKUArrReturn=res.data.Rows.map(i=>{
                return {
                  label:i.SKU,
                  value:i.ID
                }
              })
              this.SKUAllDataReturn=res.data.Rows
            }else{
              this.SKUArrReturn=[]
              this.SKUAllDataReturn=[]
            }
            this.selectReturnSKUData=this.SKUAllDataReturn.find(item=>{
              return item.ID==this.submitArrGoods[0].ID
            }) //添加的数据
            this.detailForm.IESSKUID=this.selectReturnSKUData.ID //双向数据绑定
            this.cancelSelectGoods()
          })

        }
      },
      // 重置选择商品搜索条件
      resetGoodsData(){
        this.selectGoodsData={ 
          NORMS1NAME:'',//颜色
          NORMS2NAME:'',//尺寸
          SKU:'',//SKU
          GBCODE:'',//国标码
          // SELLPRICE:'',//销售价
          // BASEPRICE:'',//成本价
          PRODUCTCODE:'',//商品编码
          PRODUCTNAME:''//商品名称
        }
        this.submitArrGoods=[]
        this.searchGoodsData()
      },
      // 查询符合搜索条件的商品
      searchGoodsData(){
        let virtual = {
          fixedcolumns: this.selectGoodsData ? this.selectGoodsData : {},
          isdroplistsearch: false,
          range: this.pageSizeGoods,
          startindex: this.currentGoodsPage,
          table: 'T_V_IESNOGROUPSKU',
        };
          network.post('/p/cs/list/query', virtual).then((res) => {
            this.totalGoods = res.data.total;
            let data = [];
            for (let i = 0; i < res.data.rows.length; i++) {
              for (let j = 0; j < Object.keys(res.data.rows[i]).length; j++) {
                let keyName = Object.keys(res.data.rows[i])[j];
                res.data.rows[i][keyName] = res.data.rows[i][keyName].val;
              }
              data.push(res.data.rows[i]);
            }
            this.GoodsData = data;
            this.GoodsData.forEach(i=>i.ISGIFT=0)
            this.GoodsData.forEach(i=>i.ISGROUP=0)
            if(this.nowGoodsType=='exchange'){
               if(this.exchangeData.length){
                  let sameArr = [...this.GoodsData].filter((x) => [...this.exchangeData].some((y) => y.SKU == x.SKU));
                  this.exchangeDataNoSame = [...this.exchangeData].filter((x) => [...this.GoodsData].every((y) => y.SKU != x.SKU));
                  if(sameArr.length){
                    this.GoodsData.forEach(item=>{
                      sameArr.forEach(i=>{
                        if(i.SKU==item.SKU){
                            item._checked=true
                            item.isSame=true //标记是否为之前选择项
                        }
                      })
                    })
                    this.submitArrGoods=[...this.submitArrGoods,...sameArr]
                  }
                  
                }else{
                  this.GoodsData.forEach(item=>{
                    item.NUM=1
                    item.REFUND_FEE=this.standardMoney(item.BASEPRICE * item.NUM)
                    item.REFUNDNUM=1
                    item.ADJUSTAMOUNT=(item.BASEPRICE - item.SELLPRICE) * item.NUM
                  })
                }
            }else if(this.nowGoodsType=='return'){
              if(this.returnData.length){
                let sameArr = [...this.GoodsData].filter((x) => [...this.returnData].some((y) => y.SKU == x.SKU));
                this.returnDataNoSame= [...this.returnData].filter((x) => [...this.GoodsData].every((y) => y.SKU != x.SKU));
                if(sameArr.length){
                  this.GoodsData.forEach(item=>{
                    sameArr.forEach(i=>{
                      if(i.SKU==item.SKU){
                          item._checked=true
                          item.isSame=true //标记是否为之前选择项
                      }
                    })
                  })
                  this.submitArrGoods=[...this.submitArrGoods,...sameArr]
                }
              }else{
                this.GoodsData.forEach(item=>{
                  item.NUM=1
                  item.REFUND_FEE=this.standardMoney(item.BASEPRICE * item.NUM)
                  item.REFUNDNUM=1
                })
              }
            }
          });
      },
      // 删除
      deleteReturnGoods(){
        let idArray=this.submitArrReturn.map(item=>item.ID)
        this.returnData = this.returnData.filter(i =>{ 
         return !idArray.includes(i.ID)
        });
        this.totalReturn=this.returnData.length //总条数
        // 截取数组
        let startIndex=this.pageSizeReturn*(this.returnCurrentPage-1)
        let endIndex=startIndex+this.pageSizeReturn
        this.currentReturnData=this.returnData.slice(startIndex,endIndex) //当前页面显示明细
      },
      
      // 退货页码改变时触发
      changePageReturn(val){
         // 1=>0 2=>10 3=>20 
         this.returnCurrentPage=val
        // 截取数组
        let startIndex=this.pageSizeReturn*(this.returnCurrentPage-1)
        let endIndex=startIndex+this.pageSizeReturn
        this.currentReturnData=this.returnData.slice(startIndex,endIndex)
      },
      // 退货页数改变时触发
      changeSizeReturn(val){
        this.pageSizeReturn = val;
        this.returnCurrentPage=1;
        // this.currentReturnPage = 0;
        // 截取数组
        let startIndex=this.pageSizeReturn*(this.returnCurrentPage-1)
        let endIndex=startIndex+this.pageSizeReturn
        this.currentReturnData=this.returnData.slice(startIndex,endIndex)
      },
      // 退货表格选中某项时触发
      selectReturnData(selection, row) {
        this.submitArrReturn = selection;
      },
      // 退货表格取消某项时触发
      selectReturnCancel(selection, row) {
        this.submitArrReturn = selection;
      },
      // 退货表格全选
      selectReturnDataAll(selection) {
        this.submitArrReturn = selection;
      },
      // 退货表格取消全选
      selectReturnDataCancel(selection) {
        this.submitArrReturn = selection;
      },
      checkMoney(str) {
        let num;
        if (str == 'refundablePostage') {
          this.refundablePostage = this.standardMoney(this.refundablePostage);
          num =  (+this.parser(this.refundableAmount)) + (+this.parser(this.refundablePostage)) + (+this.parser(this.otherAmount)) -this.parser(this.exchangeAmount);
        } else if (str == 'otherAmount') {//其他金额暂时注释掉
          this.otherAmount = this.standardMoney(this.otherAmount);
          num = (+this.parser(this.refundableAmount)) + (+this.parser(this.refundablePostage)) + (+this.parser(this.otherAmount))-this.parser(this.exchangeAmount);
        }else{
            num = (+this.parser(this.refundableAmount)) + (+this.parser(this.refundablePostage)) + (+this.parser(this.otherAmount)) -this.parser(this.exchangeAmount);
        } 
        
        this.total = this.standardMoney(num);
      },
      standardMoney(number) {
        number = (`${number}`).replace(/[^0-9+-Ee.]/g, '');
        let n = !isFinite(+number) ? 0 : +number;
        let prec = !isFinite(+4) ? 0 : Math.abs(4); // 保留几位小数
        let sep = ','; // 千分位符号
        let dec = '.'; // 小数点符号
        let s = '';
        let toFixedFix = function (n, prec) {
          let k = Math.pow(10, prec); //10的prec次方
          // return `${Math.ceil(n * k) / k}`;
          return `${Math.ceil(Math.floor(n * k * 100) / 100  ) / k}`;
        };
 
        s = (prec ? toFixedFix(n, prec) : `${Math.round(n)}`).split('.');
        let re = /(-?\d+)(\d{3})/;
        while (re.test(s[0])) {
          s[0] = s[0].replace(re, `$1${sep}$2`);
        }
 
        if ((s[1] || '').length < prec) {
          s[1] = s[1] || '';
          s[1] += new Array(prec - s[1].length + 1).join('0');
        }
        return s.join(dec);
      },
      parser(value) {
        if((typeof value=='string')){
          return parseFloat(value.replace(/[^\d\.-]/g, ''));
        }else{
          return value
        }
        
      },
      
      checkInput(index,i){ //下拉框选中事件
        let skey = i.SKEY;
        let inputValue = i.VALUE; //refund_type
        if(skey == 'BUSINESS_TYPE' && inputValue == '1'){
          let obj = {
            ID: '',
            SKEY: 'PAYER_REGISTER_NO',
            title: '买方税号',
            VALUE: '',
            standard:true,//标准输入框长度
            flag: false, // 控制必填校验样式展示
            placeholder: '请输入买方税号'
          }
          this.tabList[1].list.splice(index+3,0,obj);
        }else if(skey == 'BUSINESS_TYPE' && inputValue == '0'){
          let flag = true
          let index1 = 0
          this.tabList[1].list.forEach((item,index) => {
            if(item.SKEY == 'PAYER_REGISTER_NO'){
              flag = false
              index1 = index
            }
          })
          if(!flag){
            this.tabList[1].list.splice(index1,1);
          }
        }
      }, 
      // 平台单号，退款单号(换货单没有)，退回物流单号禁止输入空格
      noSpaces(e,i){
        if(i.SKEY=='PLATFORM_TID'||i.SKEY=='OMSORDERID'){
          if(e.keyCode == 32) e.returnValue = false
        }
      },
      // 关闭弹窗
      cancel(){
        this.originalOrderData={
          ID:'',//订单编号
          TID:'',//平台单号SOURCECODE
          SOURCECODE: '', //系统单号
          ALLSKU:'',//所有SKU
          RECEIVMOBILE:'',//收件人手机号码
          RECEIVNAME:'',//收件人
          USERNICK:'',//买家昵称
        },
        // 初始化过滤条条件
        this.allFixOne={//全部发货表格过滤条件
          OrderStatus:["=1","=2","=3","=4","=5","=6","=7","=21","=50"]
        }
        this.warehouseFix={ //仓库发货表格过滤条件
          OrderStatus: "=5"
        }
        this.platformFix={ //平台发货表格过滤条件
          OrderStatus: "=6"
        }
        this.nowTab='all'
      },
       // 重置
      reset() {
        this.originalOrderData={
          ID:'',//订单编号
          TID:'',//平台单号 SOURCECODE
          SOURCECODE: '', //系统单号
          ALLSKU:'',//所有SKU
          RECEIVMOBILE:'',//收件人手机号码
          RECEIVNAME:'',//收件人
          USERNICK:'',//买家昵称
        },
        this.queryBtn(this.nowTab)
      },
      // 查询按钮点击
      queryBtn(nowTab) {
        if(nowTab=='all'){
          this.allFixOne=this.originalOrderData
          this.allFixOne.OrderStatus=["=1","=2","=3","=4","=5","=6","=7","=21","=50"]
          setTimeout(()=>{
            this.$refs.getAllDeliver.currentPage = 1;
            this.$refs.getAllDeliver.currentPageOfferInfo=0
            this.$refs.getAllDeliver.getInfoData() 
          },200)
        }else if(nowTab=='warehouse'){
          this.warehouseFix=this.originalOrderData
          this.warehouseFix.OrderStatus="=5"
          setTimeout(()=>{
            this.$refs.getWarehouseDeliver.currentPage = 1;
            this.$refs.getWarehouseDeliver.currentPageOfferInfo=0
            this.$refs.getWarehouseDeliver.getInfoData();
          },200)
        }else if(nowTab=='platform'){
          this.platformFix=this.originalOrderData
          this.platformFix.OrderStatus="=6"
          setTimeout(()=>{
            this.$refs.getPlatformDeliver.currentPage = 1;
            this.$refs.getPlatformDeliver.currentPageOfferInfo=0
            this.$refs.getPlatformDeliver.getInfoData();
          },200)
        }
      },
      // 表格单选一项
      selectOneData(val){
        this.selectTableData=val
      },
      upOrDown(height) {
        this.currentValue = !this.currentValue;
        document.getElementsByClassName('conditionContent')[0].style.maxHeight = this.currentValue ? height : '';
        this.tableHeight = this.currentValue ? '250' : '200';
      },
      // 下拉分页模糊搜索框
      // 外键下拉框
        searchShopData(i){
             let virtual={}
            if(i.SKEY==='OUT_SHOP_NAME'){
              virtual={
                searchdata:{
                  "isdroplistsearch":true,
                  "refcolid":194915,
                  "startindex":i.currentIndex,
                  "range":10,
                }
              }
            }else if(i.SKEY==='INVOICE_PLATFORM'){
              virtual={
                searchdata:{
                  "isdroplistsearch":true,
                  "refcolid":202656,
                  "startindex":i.currentIndex,
                  "range":10,
                }
              }
            }
            network.post('/p/cs/QueryList',urlSearchParams(virtual)).then((res) => {
                 if(res.data.code==0){
                    if(i.SKEY==='OUT_SHOP_NAME'){
                      this.tabList[0].list.forEach(item => {
                        if(item.SKEY===i.SKEY){
                            item.shopData=res.data.data
                            item.currentIndex=0
                        }
                      });
                    }else if(i.SKEY==='INVOICE_PLATFORM') {
                      this.tabList[0].list.forEach(item => {
                        if(item.SKEY===i.SKEY){
                          item.shopData=res.data.data
                          item.currentIndex=0
                        }
                      });
                    }
                 }
             })
        },
        // 单选下拉选中
        checkDataShop(val,i){
          console.log(this.tabList[0].list[1].shopData.row)
          let index = 0
          if(i.SKEY==='OUT_SHOP_NAME') {
            index = 0;
            this.tabList[0].list[1].shopData.row.forEach(item => {
              if(item.ID.val == val[0].ID){
                this.PLATFORMTYPE = item.PLATFORM.refobjid;
              }
            })
          }else if(i.SKEY==='INVOICE_PLATFORM'){
            index = 0;
          }
          this.tabList[index].list.forEach(item => {
            if(item.SKEY===i.SKEY){
              item.VALUE=val[0].ID
              item.NAME=val[0].Label
            }
          });
        },
        // 单选框失去焦点事件
        changeDataShop(e,i){
            let index = 0
            if(i.SKEY==='OUT_SHOP_NAME') {
              index = 0;
            }else if(i.SKEY==='INVOICE_PLATFORM'){
              index = 0;
            }
            if(!e.target.value){
              this.tabList[index].list.forEach(item => {
                  if(item.SKEY===i.SKEY){
                      item.VALUE=''
                      item.NAME=''
                  }
              });
            }else{
                this.tabList[index].list.forEach(item => {
                    if(item.SKEY===i.SKEY){
                        if(item.AutoData.length){
                            item.AutoData.forEach(v=>{
                                if(e.target.value==v.value){
                                    item.VALUE=v.id
                                    item.NAME=v.value
                                }
                            })
                        }
                        e.target.value=item.NAME?item.NAME:''
                    }
                }); 
            }
        },
        // 清空选中项
        clearDataShop(i){
            let index = 0
            if(i.SKEY==='OUT_SHOP_NAME') {
              index = 0;
            }else if(i.SKEY==='INVOICE_PLATFORM'){
              index = 0;
            } 
            this.tabList[index].list.forEach(item => {
                if(item.SKEY==i.SKEY){
                    item.VALUE=''
                    item.NAME=''
                }
            });
            this.tabList = JSON.parse(JSON.stringify(this.tabList))
        },
        // 单选下拉分页改变
        changePageShop(e,i){
          let index = 0
            if(i.SKEY==='OUT_SHOP_NAME') {
              index = 0;
            }else if(i.SKEY==='INVOICE_PLATFORM'){
              index = 0;
            }
            this.tabList[index].list.forEach(item => {
                if(item.SKEY===i.SKEY){
                    item.currentIndex=(e-1)*10
                    this.searchShopData(item)
                }
            });
        },
        focusInputValueChangeShop(e,i){
            let virtual={}
            if(i.SKEY==='OUT_SHOP_NAME'){
                virtual={
                    ak: e.target.value,
                    colid: 194915,
                    fixedcolumns: {}
                }
            }else if(i.SKEY==='INVOICE_PLATFORM'){
                virtual={
                    ak: e.target.value,
                    colid: 202656,
                    fixedcolumns: {}
                }
            }
            network.post('/p/cs/fuzzyquerybyak',urlSearchParams(virtual)).then((res) => {
                if(res.data.code==0){
                    if(i.SKEY==='OUT_SHOP_NAME'){
                      this.tabList[0].list.forEach(item => {
                          if(item.SKEY===i.SKEY){
                              item.AutoData=res.data.data
                          }
                      });
                    }else if(i.SKEY==='INVOICE_PLATFORM'){
                      this.tabList[0].list.forEach(item => {
                          if(item.SKEY===i.SKEY){
                              item.AutoData=res.data.data
                          }
                      });
                    }
                }
                
            })
        },
        // 单选下拉模糊搜索数据
        InputValueChangeShop(e,i){
             let virtual={}
            if(i.SKEY==='OUT_SHOP_NAME'){
                virtual={
                    ak: e,
                    colid: 194915,
                    fixedcolumns: {}
                }
            }else if(i.SKEY==='INVOICE_PLATFORM'){
                virtual={
                    ak: e,
                    colid: 202656,
                    fixedcolumns: {}
                }
            }
            network.post('/p/cs/fuzzyquerybyak',urlSearchParams(virtual)).then((res) => {
                if(res.data.code==0){
                    if(i.SKEY==='OUT_SHOP_NAME'){
                      this.tabList[0].list.forEach(item => {
                          if(item.SKEY===i.SKEY){
                              item.AutoData=res.data.data
                          }
                      });
                    }else if(i.SKEY==='INVOICE_PLATFORM'){
                      this.tabList[0].list.forEach(item => {
                          if(item.SKEY===i.SKEY){
                              item.AutoData=res.data.data
                          }
                      });
                    }
                }
                
            })
        },
        // 保存
        saveAll() {
          let baseMsg = this.tabList[0]; //基础信息
          let invoiceMsg = this.tabList[1]; //发票信息
          let sallMsg = this.tabList[2]; //销售方信息
          let sellMsg = this.tabList[3]; // 申请人信息
          let allAmoutMsg = this.tabList[4]; //金额合计信息
          if(!baseMsg.list[0].VALUE){
            return this.$Message.warning('OMS订单号不能为空！');
          }
          if(!baseMsg.list[1].VALUE){
            return this.$Message.warning('店铺名称不能为空！');
          }
          // && !baseMsg.list[2].defaultSelected[0].ID
          if(!baseMsg.list[2].VALUE){
            return this.$Message.warning('对接开票平台不能为空！');
          }
          if(!invoiceMsg.list[0].VALUE){
            return this.$Message.warning('开票类型不能为空！');
          }
          if(!invoiceMsg.list[1].VALUE){
            return this.$Message.warning('发票种类不能为空！');
          }
          if(!invoiceMsg.list[2].VALUE){
            return this.$Message.warning('发票抬头不能为空！');
          }
          if(!sellMsg.list[0].VALUE){
            return this.$Message.warning('买家联系电话不能为空！');
          }
          let params = {
            omsorderid: baseMsg.list[0].VALUE, // OMS订单号
            platformTid: baseMsg.list[3].VALUE, // 平台订单号
            invoiceMemo: baseMsg.list[4].VALUE, // 发票备注

            businessType: Number(invoiceMsg.list[0].VALUE), // 开票类型
            invoiceKind: Number(invoiceMsg.list[1].VALUE), // 发票种类
            payerName: invoiceMsg.list[2].VALUE, // 发票抬头

            payeeName: sallMsg.list[0].VALUE, // 公司名称
            payeeRegisterNo: sallMsg.list[1].VALUE, // 税号
            payeeAddress: sallMsg.list[2].VALUE, // 地址
            payeePhone: sallMsg.list[3].VALUE, // 电话
            payeeBankname: sallMsg.list[4].VALUE, // 开户行
            payeeBankaccount: sallMsg.list[5].VALUE, // 开户账号
            payeeReceiver: sallMsg.list[6].VALUE, // 收款人
            payeeChecker: sallMsg.list[7].VALUE, // 复核人

            payerPhone: sellMsg.list[0].VALUE, // 买家联系电话
            payerEmail: sellMsg.list[1].VALUE, // 买家电子邮箱

            sumPrice: allAmoutMsg.list[0].VALUE, // 合计金额
            sumTax: allAmoutMsg.list[1].VALUE, // 合计税额
            INVOICE_AMOUNT: allAmoutMsg.list[2].VALUE, // 开票金额
          }
          if(baseMsg.list[1].VALUE) {
            params.outShopName = baseMsg.list[1].VALUE // 店铺
          }else {
            if(baseMsg.list[1].defaultSelected[0].ID) {
              params.outShopName = baseMsg.list[1].defaultSelected[0].ID // 店铺
            }
          }
          if(baseMsg.list[2].VALUE) {
            params.invoicePlatform = baseMsg.list[2].VALUE // 对接开票平台
          }else {
            if(baseMsg.list[2].defaultSelected[0].ID) {
              params.invoicePlatform = baseMsg.list[2].defaultSelected[0].ID // 对家开票平台
            }
          }
          if(invoiceMsg.list.length == 7 && invoiceMsg.list[0].VALUE == 1) {
            params.payerRegisterNo = invoiceMsg.list[3].VALUE;
            params.payerAddress = invoiceMsg.list[4].VALUE;
            params.payerBank = invoiceMsg.list[5].VALUE;
            params.payerBankaccount = invoiceMsg.list[6].VALUE;
          }else {
            params.payerAddress = invoiceMsg.list[3].VALUE;
            params.payerBank = invoiceMsg.list[4].VALUE;
            params.payerBankaccount = invoiceMsg.list[5].VALUE;
          }

          let invoiceDetailDTO = []
          this.returnData.forEach(item => {
            let obj = {
              // ID: -1, //12345ITEM_NAME,ITEM_NO,SKU,SUM_PRICE,TAX,NUM,PRICE,WITHTAXFLAGTEXT,TAX_RATE,UNIT,ROW_TYPE,AMOUNT
              itemName:item.ITEM_NAME,
              itemNo:item.ITEM_NO,
              sku: item.SKU,
              skuid: item.IESSKUID,
              sumPrice: Number(item.SUM_PRICE),
              tax: Number(item.TAX),
              num: Number(item.NUM),//NUM
              price:Number(item.PRICE),
              withtaxflag: Number(item.WITHTAXFLAG),
              rowType: Number(item.ROWTYPE),
              taxRate: Number(item.TAX_RATE),
              unit: item.UNIT,
              amount: Number(item.AMOUNT),
              spec: item.SPEC
            }
            invoiceDetailDTO.push(obj)
          })
          params.invoiceDetailDTO = invoiceDetailDTO;
          network.post('/p/cs/orderAddInvoice',params).then(res => {
            if(res.data.code == 0){
              const id = res.data.data.objid
              const { fullPath } = this.$route;
              const {
                keepAliveModuleName,tableName
              } = this.$store.state.global.activeTab;
              window.parent.R3.store.commit("global/tabCloseAppoint", {
                routeFullPath: fullPath, // 当前路由fullPath
                stopRouterPush: false, // 是否阻止默认跳转到前一个tab
                keepAliveModuleName, // 当前模块名称
                tableName, // 当前自定义表标识
                event() { }, // type:function;调用方法前执行的回调
              });
              // 跳转
              window.parent.R3.store.commit('global/tabOpen', {
                  type: 'V',
                  tableName: 'T_V_INVOICE',
                  tableId: '10605',
                  id: id,
                  dynamicRoutingForCustomizePage: true
              });
            }
          })
        }
    }
  };
</script>
<style lang="less">

.quickOperation{
  height: 64px;
  border-bottom: 1px solid #D8D8D8;
  display: flex;
  align-items: center;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: #333333;
}
.content{
  .block{
    padding-top: 24px;
  }
  .ark-col{
    display: flex;
    align-items: center;
    // justify-content: flex-end;
    margin-bottom: 16px;
    .input_box{
      max-width: 400px;
      min-width: 180px;
    }
    
   .ark-input-wrapper /deep/ textarea{
      resize: none;
      min-height: 36px!important;
    }
    .title{
      min-width: 80px;
      display: flex;
      justify-content: flex-end;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #333333;
      display: flex;
      align-items: center;
      margin-right: 8px;
      img{
        margin-left: 5px;
        width: 16px;
      }
    }
  }
 
}
.refund-content{
    margin:0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;

    .count-part{
        height: 60px;
        margin-bottom: 16px;
        border-bottom: 1px solid #D8D8D8;
        .item{
            display: flex;
            align-items: center;
            .text{
                font-size: 14px;
                font-family: PingFangSC-Regular, PingFang SC;
                font-weight: 400;
                color: #333333;
            }
        }
        .img-framelanflag{
            cursor: pointer;
            vertical-align: middle;
            margin-top: -3px;
            margin-left: 5px;
            width: 16px;
        }
        .input-money{
            width: 80px;margin:0 8px
        }
        .plus{
            margin: 0 16px;
            font-size: 14px;
            font-family: PingFangSC-Regular, PingFang SC;
            font-weight: 400;
            color: #979797;
        }
    }
    .total-part{
        display: flex;
        align-items: center;
        font-size: 14px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #333333;
    }
}

.onlyReturnMoneyOrder .ark-upload-drag {
  border: none;

}

</style>
<style lang="less" scoped>
 .pageContent {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
  }
  .order-setting-input-error:before{
    content: '*';
    color: red;
    // position: absolute;
    // left: 8px;
  }
  .conditionContent {
    width: 100%;
    display: flex;
    max-height: 3000px;
    overflow: hidden;
    flex-wrap: wrap;
    padding-top: 8px;
    // padding-right: 51px;    
    // justify-content: space-between;
    .itemContent {
      width: calc((100% - 120px) / 3);
      display: flex;
      align-items: center;
      margin:0 20px 24px;
      .itemLabel {
        min-width: 84px;
        font-size: 12px;
        font-weight: 500;
        color: #4C4C4C;
        line-height: 17px;
        margin-right: 8px;
        text-align: right;
      }
      .posterType {
        width: calc(100% - 84px);
      }
    }
  }
  .tableArea /deep/ .ark-tabs-bar{
    margin-bottom: 0px;
    .ark-tabs-tab{
      line-height: 22px !important;
    }
  }
  .tableArea{
    padding-top:24px;
    .handleBtn{
        height:16px;
        margin-bottom:16px;
        display:flex;
        .handleItem{
          width: 48px;
          height: 16px;
          font-family: PingFangSC-Regular, PingFang SC;
          font-weight: 400;
          color: var(--primary-color);
          line-height: 16px;
          margin: 0 2px;
          cursor: pointer;
        }
    }
  }
  .content /deep/ .ark-select-input[disabled]{
      color: #575757;
  }
</style>
