<template>
    <div class="add-return-order" data-key="TO_BOS_ITEM">
      <div class="quickOperation">
        快捷操作：
        <Button
          type="fcdefault"
          style="margin-right:8px"
          @click="saveBefore"
        >
          保存
        </Button>
        <Button type="fcdefault"
        @click="handleClosePage"
        >
          返回
        </Button>
      </div>
      <div class="content">
        <div
          v-for="(item,tabId) in tabList"
          :key="tabId"
          class="block"
        >
          <foldPanel
            v-model="item.blockShow"
            :title="item.tabtext"
          >
            <div
              slot="content"
              class="block"
            >
              <div class="item">
                <Row>
                <div
                  v-for="(i,cindex) in tabList[tabId].list"
                  :key="cindex"
                  class="form"
                >
                  <Col span="6" v-if="i.standard" style="height:16px" >
                      <div
                        v-if="i.title"
                        :class="{'title':true,'returnLongText':(i.SKEY=='original_order_number'),'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>
                    <Select v-model="i.VALUE" filterable clearable :disabled="i.disabled" class="input_box" v-if="(i.SKEY=='doctype')">
                        <Option v-for="d in i.optionList" :value="d.value" :key="d.value">{{ d.label }}</Option>
                    </Select>
                    <Input
                      v-else-if="(i.SKEY=='num')
                      ||(i.SKEY=='amount')
                      "
                      class="input_box"
                      v-model.trim="i.VALUE"
                      :placeholder="i.placeholder?i.placeholder:'请输入内容'"
                      :disabled="i.disabled"
                      :regx="i.regx"
                      :class="i.errorInput?'errorInput':''"
                      @on-blur="checkInput(i)"
                      @on-enter="i.SKEY=='original_order_number'?checkInput(i):''"
                    />
                    <Input
                      v-else-if="i.SKEY=='original_platform_number'"
                      ref="original_platform_number"
                      class="input_box"
                      v-model.trim="i.VALUE"
                      :placeholder="i.placeholder"
                      :disabled="i.disabled"
                      :regx='i.regx'
                      :class="i.errorInput?'errorInput':''"
                      icon="ios-search"
                      @on-blur="checkInput(i)"
                      @on-enter="i.SKEY=='original_platform_number'?checkInput(i):''"
                      @on-click="searchMsg(i)"
                    />
                    <arkDropMultiSelectFilter
                      single
                      ref="arkDropMultiSelectFilter"
                      class="shopDropMultiSelectFilter"
                      v-model="shopId"
                      v-else-if="i.SKEY=='iesshopid'"
                      :props-data="propsData"
                      :url="Url"
                      :table-request="TableRequest"
                      :http="network"
                    ></arkDropMultiSelectFilter>
                    <!-- @on-change="DropShopvalueChange" -->
                    <arkDropMultiSelectFilter
                      single
                      ref="arkDropMultiSelectFilter"
                      class="shopDropMultiSelectFilter"
                      v-model="platformId"
                      v-else-if="i.SKEY=='platform'"
                      :props-data="propsDataOne"
                      :url="UrlOne"
                      :table-request="TableRequestOne"
                      :http="network"
                    ></arkDropMultiSelectFilter>
                    <!-- @on-change="DropShopvalueChangeOne" -->
                    <div v-else-if="i.SKEY=='SKU'" style="width: calc(100% - 108px);display: flex;align-items: center;">
                        <Select
                            style="width:240px"
                            v-model="i.VALUE"
                            @on-query-change="getSkuList"
                            @on-change="changeSKU"
                            filterable
                            clearable
                            label-in-value
                            >
                            <Option v-for="(option,index) in SKUArr" :key="index" :value="option.value">{{option.label}}</Option>
                        </Select>
                        <!-- img
                            style="width:16px;margin-left:8px"
                            src="../../../assets/icon/search.png"
                            @click="searchGoods('exchange')">< -->
                    </div>
                  </Col>
                </div>
                </Row>
              </div>
            </div>
          </foldpanel>
        </div>
      </div>
      <Modal
        v-model="originalModal"
        title="选择平台单号"
        width="900"
        :mask="mask"
        :closable="closable"
        :mask-closable="maskClosable"
        :footer-hide="hideFoot"
        @on-cancel="cancel">
           <div class="conditionContent">
            <div class="itemContent">
              <div class="itemLabel">
                订单编号
              </div>
              <Input
                v-model="originalOrderData.ID"
                clearable
              ></Input>
            </div>
            <div class="itemContent">
              <div class="itemLabel">
                平台单号
              </div>
              <Input
                v-model="originalOrderData.TID"
                clearable
              ></Input>
            </div>
            <div class="itemContent">
              <div class="itemLabel">
                系统单号
              </div>
              <Input
                v-model="originalOrderData.SOURCECODE"
                clearable
              ></Input>
            </div>
            <div class="itemContent">
              <div class="itemLabel">
                物流单号
              </div>
              <Input
                v-model="originalOrderData.LOGISTICSNUMBER"
                clearable
              ></Input>
            </div>
            <div class="itemContent">
              <div class="itemLabel">
                所有SKU
              </div>
              <Input
                v-model="originalOrderData.ALLSKU"
                clearable
              ></Input>
            </div>
            <div class="itemContent">
              <div class="itemLabel">
                收件人手机号码
              </div>
              <Input
                v-model="originalOrderData.RECEIVMOBILE"
                clearable
              />
            </div>
            <div class="itemContent">
              <div class="itemLabel">
                收件人
              </div>
              <Input
                v-model="originalOrderData.RECEIVNAME"
                clearable
              />
            </div>
  
            <div class="itemContent">
              <div class="itemLabel">
                买家昵称
              </div>
              <Input
                style="width:240px"
                v-model="originalOrderData.USERNICK"
                clearable
              />
            </div>
          </div>
          <ShrinkOrExtend
            :form-data="originalOrderData"
            :height="shrinkHeight"
            :current-value="currentValue"
            @click="upOrDown(shrinkHeight)"
            @on-reset="reset"
            @on-query="queryBtn(nowTab)"
          />
            <Tabs type="card" v-model="nowTab">
                <TabPane label="订单详情" name="all">
                    <tableFaker
                        ref="getAllDeliver"
                        :tableHeight="tableHeight"
                        :table-head="deliverColumns"
                        :table-name="'T_V_OMSONLINEORDER'"
                        :fixedcolumns="allFixOne"
                        :isdroplistsearch="true"
                        :column_include_uicontroller="true"
                        :highlightRow="highlightRow"
                        @on-selectData="selectOneData"
                    />
                </TabPane>
            </Tabs>
        <footer style="display: flex; justify-content: center; margin-top: 12px;padding-top: 16px;border-top: 1px solid #DEDEDE;;">
          <Button
            type="fcdefault"
            @click="cancel"
          >
            取消
          </Button>
          <Button
            type="posdefault"
            style="margin-left: 16px"
            @click="okSelectId"
          >
            确认
          </Button>
        </footer>
      </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 {
          stopClickLogin:false,//节流
          saveArr:{
          },//最终保存入参
          SKUArr:[], //SKU下拉框列表
          SKUAllData:[], //SKU下拉框列表完整数据
          // returnSKU:'',//退货商品SKU
          SKUArrReturn:[],//退货商品SKU下拉框列表
          SKUAllDataReturn:[],//退货商品SKU下拉框列表完整数据
          selectReturnSKUData:{},//退货商品选中的SKU数据
          selectReturnSKUID:'',//退货商品sku下拉框双向数据绑定
          tabList: [
            {
              tabId: '1',
              tabtext: '基础信息',
              blockShow: true,
              list: [
                {
                  ID: '',
                  SKEY: 'original_platform_number',
                  title: '平台单号',
                  VALUE: '',
                  company: '',
                  tips: '',
                  placeholder: '输入后请按enter',
                  errorInput: false,
                  disabled:false,
                  standard:true,//标准输入框长度
                  flag: true, // 控制必填校验样式展示
                  required: false, // 是否为必填项
                  explain:false, //是否有解释
                  search:true,//是否有搜索弹窗
                  explainContent:'',//解释文字
                },
                {
                  ID: '',
                  SKEY: 'platform',
                  title: '平台',
                  VALUE: '',
                  defaultvalue: '',
                  company: '',
                  tips: '',
                  disabled:false,
                  required: false, // 是否为必填项
                  standard:true,//标准输入框长度
                  flag: false, // 控制必填校验样式展示
                  optionList:[]
                },
                {
                  ID: '',
                  SKEY: 'iesshopid',
                  title: '店铺',
                  VALUE: '',
                  defaultvalue: '',
                  company: '',
                  tips: '',
                  disabled:false,
                  required: false, // 是否为必填项
                  standard:true,//标准输入框长度
                  flag: false, // 控制必填校验样式展示
                  optionList:[]
                },
                {
                  ID: '',
                  SKEY: 'doctype',
                  title: '单据类型',
                  VALUE: '',
                  defaultvalue: '',
                  company: '',
                  tips: '',
                  disabled:false,
                  required: false, // 是否为必填项
                  standard:true,//标准输入框长度
                  flag: false, // 控制必填校验样式展示
                  optionList:[
                    { label: '订单',value: '0' },
                    { label: '退换货单',value: '1' },
                    { label: '唯品会销售',value: '4' },
                    { label: '唯品会客退',value: '5' },
                    { label: '唯品会其他',value: '6' },
                    { label: '唯品会活动折扣',value: '7' },
                    { label: '唯品会会员价保',value: '8' },
                    { label: '唯品会差异',value: '9' }
                  ]
                },
                {
                  ID: '',
                  SKEY: 'SKU',
                  title: 'SKU',
                  VALUE: '',
                  company: '',
                  tips: '',
                  placeholder: '',
                  errorInput: false,
                  disabled:false,
                  standard:true,//标准输入框长度
                  flag: true, // 控制必填校验样式展示
                  required: false, // 是否为必填项
                  explain:false, //是否有解释
                  search:true,//是否有搜索弹窗
                  explainContent:'',//解释文字
                },
                {
                  ID: '',
                  SKEY: 'num',
                  title: '数量',
                  VALUE: '',
                  company: '',
                  tips: '',
                  regx: /^[1-9]\d{0,30}?$/,
                  required: false, // 是否为必填项
                  disabled:false,
                  standard:true,//标准输入框长度
                  flag: false, // 控制必填校验样式展示
                },
                {
                  ID: '',
                  SKEY: 'amount',
                  title: '收支金额',
                  VALUE: '',
                  defaultvalue: '',
                  company: '',
                  tips: '',
                  required: true, // 是否为必填项
                  regx: /^-?\d{0,15}(\.[0-9]{0,4})?$/,
                  standard:true,//标准输入框长度
                  remark:true,//备注栏
                  flag: false, // 控制必填校验样式展示
                },
              ],
            },
          ],
  
          highlightRow:true,//支持单选
          selectTableData:{},//选中的数据
          nowTab:'all',//默认当前tab页为全部
          lastTab:'',//上一个tab页
          deliverColumns: [
              {
                  title: '平台单号',
                  key: 'TID'
              },
              {
                  title: '订单编号',
                  key: 'ID'
              },
              {
                  title: '系统单号',
                  key: 'SOURCECODE'
              },
              {
                  title: '物流单号',
                  key: 'LOGISTICSNUMBER'
              },
              {
                  title: '所有SKU',
                  key: 'ALLSKU'
              },
              {
                  title: '商品数量',
                  key: 'ALLNUM'
              },
              {
                  title: '订单总额',
                  key: 'ACTUALAMOUNT'
              }
          ],
          allFixOne:{
            OrderStatus:["=1","=2","=3","=4","=5","=6","=7","=21","=50"]
          },//订单明细表格过滤条件
          warehouseFix:{ //仓库发货表格过滤条件
            OrderStatus: "=5"
          },
          platformFix:{ //平台发货表格过滤条件
            OrderStatus: "=6"
          },
          tableHeight:'200',//表格高度
  
          originalModal:false,//平台单号弹窗
          mask:true,
          closable: true,
          maskClosable: false,
          hideFoot: true,
          shrinkHeight: '58px',
          currentValue: false,//默认收缩
          originalOrderData:{
            ID:'',//订单编号
            TID:'',//平台单号SOURCECODE
            SOURCECODE: '', //系统单号
            LOGISTICSNUMBER: '',// 物流单号
            ALLSKU:'',//所有SKU
            RECEIVMOBILE:'',//收件人手机号码
            RECEIVNAME:'',//收件人
            USERNICK:'',//买家昵称
          },
          nowGoodsType:'',//当前商品表类型

          platformId: '', // 平台id
          shopId: '', // 店铺id
          sku: '', // sku

          dropDownShopValue: [
            {
              ID:180,
              Label: "XD抖音测试店铺"
            }
          ],
          network,
          propsData: {
            single: true,
            pageSize: 10,
            item: {}
          },
          TableRequest: {
            isdroplistsearch: true,
            refcolid: 202934,
          },
          eventFun: {
            'on-blur': (even) => {
              setTimeout(() => {
                if (!Array.isArray(this.dropDownShopValue)) {
                  even.target.value = '';
                  this.$emit('change', []);
                }
              }, 200);
            }
          },
          Url: {
            autoUrl: '/p/cs/fuzzyquerybyak',
            tableUrl: 'p/cs/QueryList',
            tableSearchUrl: '/p/cs/newQueryList'
          },

          dropDownShopValueOne: '',
          propsDataOne: {
            single: true,
            pageSize: 10,
            item: {}
          },
          TableRequestOne: {
            isdroplistsearch: true,
            refcolid: 213810,
          },
          eventFunOne: {
            'on-blur': (even) => {
              setTimeout(() => {
                if (!Array.isArray(this.dropDownShopValueOne)) {
                  even.target.value = '';
                  this.$emit('change', []);
                }
              }, 200);
            }
          },
          UrlOne: {
            autoUrl: '/p/cs/fuzzyquerybyak',
            tableUrl: 'p/cs/QueryList',
            tableSearchUrl: '/p/cs/newQueryList'
          }
        };
      },
      components: {
        foldPanel,
        ShrinkOrExtend,
        tableFaker
      },
      created(){
        // this.getQuery('T_V_IESSHOP')// 初始查询店铺名称列表
        let currentId = this.$route.params.customizedModuleId;
      },
      methods: {
        // 重置数据
        resetData(){
          this.tabList.forEach(item=>{
            item.list.forEach(i=>{
               i.VALUE=''
            })
          })
          this.platformId = '';
          this.shopId = '';
          this.sku = '';
        },
        handleClosePage() {
          let isTip = false
          for(let i = 0;i<this.tabList[0].list.length;i++){
            if(this.tabList[0].list[i].VALUE){
              isTip = true;
              break;
            }
          }
          if (isTip) {
            this.$Modal.fcWarning({
              title: '警告',
              mask: true,
              showCancel: true,
              content: '修改的数据未保存，确定返回？',
              onOk:()=>{
                this.closePage()
              }
            })
          } else {
            this.closePage()
          }
        },
        // 关闭当前页面
        closePage(){
          const { fullPath } = this.$route;
          const {
            keepAliveModuleName,tableName
          } = this.$store.state.global.activeTab;
          this.$store.commit('global/tabCloseAppoint', {
            tableName,
            routeFullPath: fullPath,
            keepAliveModuleName,
            stopRouterPush: true,
          });
           // 跳转
          setTimeout(()=>{
            R3.store.commit('global/tabOpen', {
              type: 'S',
              tableName:'T_OMSTOPOSITEM',
              tableId:'12079',
              back:true
            });
          },0)
        },
        // 保存之前校验是否有其他非取消，作废状态下的退换货单
        saveBefore() {
          // if(!this.tabList[0].list.find(item=>item.SKEY=='original_platform_number').VALUE){
          //   return this.$Message.error('平台单号不能为空');
          // }
          // if(!this.platformId){
          //   return this.$Message.error('平台不能为空');
          // }
          // if(!this.shopId){
          //   return this.$Message.error('店铺不能为空');
          // }
          // if(!this.tabList[0].list.find(item=>item.SKEY=='doctype').VALUE){
          //   return this.$Message.error('单据类型不能为空');
          // }
          // if(!this.sku){
          //   return this.$Message.error('SKU不能为空');
          // }
          // if(!this.tabList[0].list.find(item=>item.SKEY=='num').VALUE){
          //   return this.$Message.error('数量不能为空');
          // }
          if(!this.tabList[0].list.find(item=>item.SKEY=='amount').VALUE){
            return this.$Message.error('收支金额不能为空');
          }
          let params = {
            T_OMSTOPOSITEM: {
              sourcecode: this.tabList[0].list.find(item=>item.SKEY=='original_platform_number').VALUE || "",
              platform: (this.platformId[0] || {}).ID || "",
              iesshopid: (this.shopId[0] || {}).ID || "",
              doctype: this.tabList[0].list.find(item=>item.SKEY=='doctype').VALUE || "",
              sku: this.sku || "",
              num: this.tabList[0].list.find(item=>item.SKEY=='num').VALUE || "",
              amount: this.tabList[0].list.find(item=>item.SKEY=='amount').VALUE || "",
            }
          }
          
          // const baseInfo = params.T_OMSTOPOSITEM || {};
          // let emptyNum = 0;
          // for (const key in baseInfo) {
          //   const tempVal = baseInfo[key] || null;
          //   if (!tempVal) {
          //     emptyNum += 1;
          //   }
          // }
          // if(emptyNum === 7){
          //   return this.$Message.error('请至少填写一个选项');
          // }
          network.post('/p/cs/statement/account/topos/save',params).then(res => {
            if(res.data.code==0){
              this.$Message.success(res.data.message);
              this.closePage();
              // const { fullPath } = this.$route;
              // const {
              //   keepAliveModuleName,tableName
              // } = this.$store.state.global.activeTab;
              // this.$store.commit('global/tabCloseAppoint', {
              //   tableName,
              //   routeFullPath: fullPath,
              //   keepAliveModuleName,
              //   stopRouterPush: true,
              // });
              // // 跳转
              // setTimeout(()=>{
              //   R3.store.commit('global/tabOpen', {
              //     type : 'tableDetailAction'||'C',
              //     label: '退换货单编辑',
              //     customizedModuleName:'REFUNDUPDATE',
              //     customizedModuleId:res.data.data.objId
              //   });
              // },0)
            }
          })
  
        },
        // 获取换货表格所有SKU
        getSkuList(val){
           let virtual={sku: val}
            network.post('/p/cs/getIesSku', virtual).then((res) => {
              if(res.data.Code==0){
                this.SKUArr=res.data.Rows.map(i=>{
                  return {
                    label:i.SKU,
                    value:i.ID
                  }
                })
                this.SKUAllData=res.data.Rows
              }else{
                this.SKUArr=[]
                this.SKUAllData=[]
              }
            })
        },
        // 点击选择SKU
        changeSKU(e){
          console.log(e)
          this.sku = e.label;
        },
        //初始查询标准下拉框数据
        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
                      }
                    })
                  }
  
                }
              })
            })
        },
        checkInput(i){ //下拉框选中事件
          let skey = i.SKEY;
          let inputValue = i.VALUE?i.VALUE:'';
          if(skey=='original_platform_number'){ //平台单号 请求接口
            let TID= this.tabList[0].list.find(i=>i.SKEY=='original_platform_number').VALUE
            if(TID==''){
              return
            }
            let virtual={TID:TID}
            this.ok(virtual,'enterOrderNumber')
          }
        },
        searchMsg(i){  //原平台单号弹窗
          let skey = i.SKEY;
          let inputValue = +i.VALUE;
          if(!isNaN(inputValue)){
            if(skey=='original_platform_number'){ //退换货原因
              this.originalModal=true
            }
          }else{
            i.VALUE=''
            this.$Message.error('订单编号输入格式不正确，请重新输入');
          }
        },
        // 关闭弹窗
        cancel(){
          this.originalOrderData={
            ID:'',//订单编号
            TID:'',//平台单号SOURCECODE
            SOURCECODE: '', //系统单号
            ALLSKU:'',//所有SKU
            RECEIVMOBILE:'',//收件人手机号码
            RECEIVNAME:'',//收件人
            USERNICK:'',//买家昵称
          }
          // 初始化过滤条条件
          this.allFix={//全部发货表格过滤条件
            OrderStatus:["=5","=6"]
          }
          this.warehouseFix={ //仓库发货表格过滤条件
            OrderStatus: "=5"
          }
          this.platformFix={ //平台发货表格过滤条件
            OrderStatus: "=6"
          }
          this.nowTab='all'
          this.originalModal=false
        },
        okSelectId(){
          this.tabList[0].list.forEach(item=>{
            if(item.SKEY=='original_platform_number'){
              if(this.selectTableData.TID){
                item.VALUE=this.selectTableData.TID
                let virtual = {
                  TID: String(this.selectTableData.TID),
                };
                this.ok(virtual)
              }else{
                if(!item.VALUE){
                  this.$Message.warning('至少选择一条订单')
                }else {
                  this.originalModal=false
                }
              }
            }
          })
        },
        ok(virtual,type){
              network.post('/p/cs/findOrderByTid', virtual).then((res) => {   // /p/cs/findOrderByParam
                if(res.data.code==0){
                  let data=res.data.data
                   this.tabList[0].list.forEach(item=>{
                      if(item.SKEY=='original_platform_number'){
                        item.VALUE=data.TID
                      }else if(item.SKEY=='platform'){
                        item.VALUE=data.PLATFORMNAME
                        // this.platformId = data.PLATFORM;
                        this.platformId = [
                          {
                            ID:String(data.PLATFORM),
                            Label:data.PLATFORMNAME
                          }
                        ]
                      }else if(item.SKEY=='iesshopid'){
                        item.VALUE=data.ORDERSHOPNAME
                        // this.shopId = data.ORDERSHOPID
                        this.shopId = [
                          {
                            ID:String(data.ORDERSHOPID),
                            Label:data.ORDERSHOPNAME
                          }
                        ]
                      }
                    })
                    console.log(this.dropDownShopValue)
                    console.log(this.dropDownShopValueOne)
                } else {
                  // this.tabList[0].list.find(item=>item.SKEY=='original_platform_number').errorInput = true;
                  // this.tabList[0].list.find(item=>item.SKEY=='original_platform_number').VALUE = '';
                  // this.resetData();
                  // this.$refs['original_platform_number'].focus()
                  // this.$Message.warning('平台单号不存在!');
                }
                this.cancel()
                // if(this.originalModal && type != 'enterOrderNumber'){
                //   this.cancel()
                // }
              })
        },
    // 重置
        reset(){
          this.originalOrderData={
            ID:'',//订单编号
            TID:'',//平台单号 SOURCECODE
            SOURCECODE: '', //系统单号
            ALLSKU:'',//所有SKU
            RECEIVMOBILE:'',//收件人手机号码
            RECEIVNAME:'',//收件人
            USERNICK:'',//买家昵称
            // ACTUALAMOUNT:'',//订单总额
            // ALLNUM:''//商品数量
          },
          this.queryBtn(this.nowTab)
        },
        // 查询按钮点击
        queryBtn(nowTab) {
          if(nowTab=='all'){
            this.allFixOne=this.originalOrderData
            this.allFixOne.OrderStatus=["=5","=6"]
            setTimeout(()=>{
              this.$refs.getAllDeliver.currentPage = 1;
              this.$refs.getAllDeliver.currentPageOfferInfo=0
              this.$refs.getAllDeliver.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';
        },
      }
    };
  </script>
  <style lang="less">
  .add-return-order .foldPanelContent .ark-collapse > .ark-collapse-item > .ark-collapse-content {
    padding-top: 0px;
  }
  .add-return-order .ark-collapse-content > .ark-collapse-content-box {
    padding-bottom: 0px;
  }
  .add-return-order .content .ark-col {
    margin-bottom: 8px !important;
  }
  .add-return-order .content .ark-col-span-6 {
    margin-bottom: 16px !important;
  }
  </style>
  <style lang="less" scoped>
  .add-return-order {
    padding: 0 16px;
  }
  
  .quickOperation{
    height: 64px;
    border-bottom: 1px solid #D8D8D8;
    display: flex;
    align-items: center;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #333333;
    margin-bottom: -12px;
  }
  .content{
    .block{
      padding-top: 12px;
    }
    .ark-col{
      display: flex;
      align-items: center;
      // justify-content: flex-end;
      margin-bottom: 16px;
      .input_box{
        max-width: 240px;
        min-width: 180px;
      }
  
     .ark-input-wrapper /deep/ textarea{
        resize: none;
        min-height: 36px!important;
      }
      .title{
        width: 100px;
        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;
        }
      }
      .returnLongText {
        // width: 160px;
      }
    }
  
  }
  .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;
      }
  }
  
  </style>
  <style lang="less" scoped>
    .shopDropMultiSelectFilter {
      width: calc(100% - 110px);
    }
   .pageContent {
      margin-top: 12px;
      display: flex;
      justify-content: flex-end;
    }
    .order-setting-input-error:before{
      content: '*';
      color: red;
    }
    .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);
        }
      }
    }
  </style>
  