<template>
  <div class="doorToDoorPickup">
    <div class="quickOperation">
      快捷操作：
      <Button
        type="fcdefault"
        style="margin-right:8px"
        @click="saveAll"
      >
        保存
      </Button>
      <Button
        type="fcdefault"
        style="margin-right:8px"
        @click="closePage"
      >
        返回
      </Button>
      <Button
        type="fcdefault"
        style="margin-right:8px"
        @click='startDoorPickupOrder'
        :disabled='!(orderStatus == 0 || orderStatus == 2)'
      >
        请求上门取件
      </Button>
      <Button type="fcdefault"
        @click='cancelDoorPickupOrder'
        :disabled='orderStatus!=1'
      >
        取消上门取件
      </Button>
    </div>
    <div class="content">
      <!-- 请求取件结果 -->
      <div v-if='orderStatus!=null'>
        <div
          v-for="(item,tabId) in tabListOne"
          :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 tabListOne[tabId].list"
                  :key="cindex"
                  class="form"
                >
                  <Col span="6" v-if="i.standard" >
                    <div
                      v-if="i.title"
                      :class="{'title':true,'order-setting-input-error':i.required}"
                    >{{ i.title }}
                    </div>
                    <span
                      v-if="
                      (i.SKEY=='pickupOrderno')
                      ||(i.SKEY=='orderStatusText')
                      ||(i.SKEY=='carrierName')
                      ||(i.SKEY=='mailNo')
                      ||(i.SKEY=='sysOrderId')
                      "
                      class="input_box"
                    >{{i.VALUE}}</span>
                  </Col>
                  <Col span="18" v-else >
                      <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>
                    <Input style="width:620px;"
                    :rows="4"
                    v-model="i.VALUE"
                    type="textarea"
                    :disabled='AllDisabled'
                    v-if="i.SKEY=='senderAddress' || i.SKEY=='receiverAddress' "
                    placeholder="请输入内容" />
                    <!-- :autosize='{minRows:4,maxRows: 6}' -->
                  </Col>
                </div>
                </Row>
              </div>
            </div>
          </foldpanel>
        </div>
      </div>
      <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="6" 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>
                  <Select v-model="i.VALUE" :filterable="(i.SKEY !== 'senderProvince' && i.SKEY !== 'receiverProvince' && i.SKEY !=='senderCity' && i.SKEY !=='receiverCity' && i.SKEY !== 'senderCounty'&& i.SKEY !== 'receiverCounty')?true:false" clearable :disabled="AllDisabled" class="input_box"
                          v-if="(i.SKEY=='payMethod') || (i.SKEY=='senderProvince') || (i.SKEY=='receiverProvince') || (i.SKEY=='senderCity') || (i.SKEY=='receiverCity') || (i.SKEY=='senderCounty') || (i.SKEY=='receiverCounty') || (i.SKEY=='logisticscompanyid') "
                          @on-change="checkInput(i)" @on-query-change="checkInputSKU($event,i)">
                      <Option v-for="d in i.optionList" :disabled='AllDisabled' :value="d.value" :key="d.value">{{ d.label }}</Option>
                  </Select>
                  <DatePicker v-else-if='i.SKEY=="expectSendTime"' :disabled='AllDisabled' v-model="i.VALUE" type="datetime" format="yyyy-MM-dd HH:mm:ss" :options="options3" placeholder="请选择时间" style="width: 100%;max-width:240px;min-width: 200px;" :transfer="transfer" :clearable="clearable" @on-change="rangeDate"></DatePicker>
                  <Input
                    v-else-if="
                    (i.SKEY=='senderStreet')
                    ||(i.SKEY=='receiverStreet')
                    ||(i.SKEY=='senderContact')
                    ||(i.SKEY=='receiverContact')
                    ||(i.SKEY=='senderMobile')
                    ||(i.SKEY=='receiverMobile')
                    ||(i.SKEY=='senderTel')
                    ||(i.SKEY=='receiverTel')
                    ||(i.SKEY=='insuredAmount')
                    "
                    class="input_box"
                    v-model="i.VALUE"
                    placeholder="请输入内容"
                    :disabled='AllDisabled'
                    :regx='i.regx'
                  />
                  <img
                      v-if="i.search"
                      style="width:16px;margin-left:8px"
                      src="../../assets/icon/search.png"
                      @click="searchMsg(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='AllDisabled'
                    maxlength='64'
                    type="textarea"
                    v-if="(i.SKEY=='remark')"
                    placeholder="请输入内容" />
                </Col>
                <Col span="18" v-else >
                    <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>
                  <Input style="width:620px;"
                  :rows="4"
                  v-model="i.VALUE"
                  type="textarea"
                  :disabled='AllDisabled'
                  v-if="i.SKEY=='senderAddress' || i.SKEY=='receiverAddress' "
                  placeholder="请输入内容" />
                  <!-- :autosize='{minRows:4,maxRows: 6}' -->
                </Col>
              </div>
              </Row>
            </div>
          </div>
        </foldpanel>
        <Form
          class="form"
          v-if='tabId=="1" && orderStatus!=1'
          :model="formValidate"
          label-position="top"
          :inline="inline"
          style="padding-left: 20px;"
        >
          <FormItem label="智能识别">
            <Input
              v-model="formValidate.desc"
              class="text1"
              type="textarea"
              :disabled='AllDisabled'
              placeholder="粘贴地址信息后回车,自动识别姓名、电话和地址"
              @on-keydown="searchsmart($event,1)"
            />
          </FormItem>
        </Form>
        <Form
          class="form"
          v-if='tabId=="2" && orderStatus!=1'
          :model="formValidate1"
          label-position="top"
          :inline="inline"
          style="padding-left: 20px;"
        >
          <FormItem label="智能识别">
            <Input
              v-model="formValidate1.desc"
              class="text1"
              type="textarea"
              placeholder="粘贴地址信息后回车,自动识别姓名、电话和地址"
              @on-keydown="searchsmart($event,2)"
            />
          </FormItem>
        </Form>
      </div>
    </div>
  </div>
</template>

<script>
    import foldPanel from '../customizedContent/FoldPanel.vue'; // 折叠面板组件
    // import AddressParse from 'address-parse';
    import AddressParse from '../../../static/@address-parse/dist/parse/index';

    const R3 = window.R3;
    const { network, urlSearchParams, store } = R3;
    export default {
        data() {
            return {
              AllDisabled:false, // 全局不可编辑
              refundOrderId: '', // 退换货单id
              PickupId: '', // 上门取件单id
              orderStatus: '', // 上门取件单状态
              saveArr:{
                logisticscompanyid:'',//上门物流公司ID
                expectSendTime: '', //上门取件时间
                payMethod: '', //支付方式
                insuredAmount: '', //保价金额
                remark: '', //备注信息

                senderContact: '', // 寄件人
                senderMobile:'',//寄件人手机号码
                senderTel:'',//寄件人电话
                senderProvince:'',//寄件人省份id
                senderProvincename:'',//寄件人省份
                senderCity:'', //寄件人市id
                senderCityname:'',//寄件人市
                senderCounty:'', //寄件人区id
                senderCountyname:'',//寄件人区
                senderStreet:'',//寄件人街道
                senderAddress:'',//寄件人地址

                receiverContact: '', // 收件人
                receiverMobile:'',//收件人手机号码
                receiverTel:'',//收件人电话
                receiverProvince:'',//收件人省份id
                receiverProvincename:'',//收件人省份
                receiverCity:'', //收件人市id
                receiverCityname:'',//收件人市
                receiverCounty:'', //收件人区id
                receiverCountyname:'',//收件人区
                receiverStreet:'',//收件人街道
                receiverAddress:'',//收件人地址
              },//最终保存入参
              oldSaveArr:{}, // 如果已经保存过上门取件信息，生成了上门取件单，需要先保存一份默认数据
              tabListOne: [  // 请求取件信息
                {
                    tabId: '1',
                    tabtext: '请求取件信息',
                    blockShow: true,
                    list: [
                      {
                          ID: '',
                          SKEY: 'pickupOrderno',
                          title: '上门取件单号:',
                          VALUE: '',
                          defaultvalue: '',
                          company: '',
                          tips: '',
                          standard:true,//标准输入框长度
                          flag: false, // 控制必填校验样式展示
                      },
                      {
                          ID: '',
                          SKEY: 'orderStatusText',
                          title: '下单状态:',
                          VALUE: '',
                          defaultvalue: '',
                          company: '',
                          tips: '',
                          standard:true,//标准输入框长度
                      },
                      {
                          ID: '',
                          SKEY: 'carrierName',
                          title: '物流公司:',
                          VALUE: '',
                          defaultvalue: '',
                          company: '',
                          tips: '',
                          standard:true,//标准输入框长度
                      },
                      {
                          ID: '',
                          SKEY: 'mailNo',
                          title: '物流单号:',
                          VALUE: '',
                          defaultvalue: '',
                          company: '',
                          tips: '',
                          standard:true,//标准输入框长度
                      },
                      {
                          ID: '',
                          SKEY: 'sysOrderId',
                          title: '物流平台单号:',
                          VALUE: '',
                          defaultvalue: '',
                          company: '',
                          tips: '',
                          standard:true,//标准输入框长度
                      },
                    ],
                },
              ],
              tabList: [
                {
                    tabId: '1',
                    tabtext: '物流选择',
                    blockShow: true,
                    list: [
                    {
                        ID: 'T_V_OMSLOGISTICSCOMPANY',
                        SKEY: 'logisticscompanyid',
                        title: '上门物流公司',
                        VALUE: '',
                        defaultvalue: '',
                        company: '',
                        tips: '',
                        standard:true,//标准输入框长度
                        flag: false, // 控制必填校验样式展示
                        required: true, // 是否为必填项
                        optionList:[]
                    },
                    {
                        ID: 'T_IESWAREHOUSE',
                        SKEY: 'expectSendTime',
                        title: '上门取件时间',
                        VALUE: '',
                        defaultvalue: '',
                        company: '',
                        tips: '',
                        standard:true,//标准输入框长度
                        flag: false, // 控制必填校验样式展示
                        // explainContent:'换货的新订单邮费',
                        // explain:true, //是否有解释
                        optionList:[]
                    },
                    {
                        ID: 'T_OMSREASONTYPE',
                        SKEY: 'payMethod',
                        title: '支付方式',
                        VALUE:'',
                        defaultvalue: '',
                        company: '',
                        tips: '',
                        standard:true,//标准输入框长度
                        flag: false, // 控制必填校验样式展示
                        optionList:[
                            {
                                label: '寄付',
                                value: '1'
                            },
                            {
                                label: '到付',
                                value: '2'
                            },
                        ]
                    },
                    {
                        ID: '',
                        SKEY: 'insuredAmount',
                        title: '保价金额',
                        VALUE: 0,
                        regx: /^\d{0,15}(\.[0-9]{0,2})?$/, // 两位小数的正数
                        standard:true,//标准输入框长度
                        flag: false, // 控制必填校验样式展示
                    },
                    {
                        ID: '',
                        SKEY: 'remark',
                        title: '备注信息',
                        VALUE: '',
                        defaultvalue: '',
                        company: '',
                        tips: '',
                        standard:false,//标准输入框长度
                        remark:true,//备注栏
                        flag: false, // 控制必填校验样式展示
                    },
                    ],
                },
                {
                    tabId: '2',
                    tabtext: '寄件人信息',
                    blockShow: true,
                    list: [
                    {
                        ID: '',
                        SKEY: 'senderContact',
                        title: '寄件人',
                        VALUE: '',
                        standard:true,//标准输入框长度
                        flag: true, // 控制必填校验样式展示
                        required: true, // 是否为必填项
                    },
                    {
                        ID: '',
                        SKEY: 'senderMobile',
                        title: '手机号码',
                        VALUE: '',
                        standard:true,//标准输入框长度
                        flag: true, // 控制必填校验样式展示
                        required: true, // 是否为必填项
                    },
                    {
                        ID: '',
                        SKEY: 'senderTel',
                        title: '电话',
                        VALUE: '',
                        standard:true,//标准输入框长度
                        flag: false, // 控制必填校验样式展示
                    },
                    {
                        ID: 'T_OMSREGION_PROVINCE',
                        SKEY: 'senderProvince',
                        title: '省份',
                        VALUE: '',
                        company: '',
                        tips: '',
                        standard:true,//标准输入框长度
                        flag: true, // 控制必填校验样式展示
                        required: true, // 是否为必填项
                        optionList:[]
                    },
                    {
                        ID: 'T_OMSREGION_CITY',
                        SKEY: 'senderCity',
                        title: '市',
                        VALUE: '',
                        company: '',
                        tips: '',
                        standard:true,//标准输入框长度
                        flag: true, // 控制必填校验样式展示
                        required: true, // 是否为必填项
                        optionList:[]
                    },
                    {
                        ID: 'T_OMSREGION_AREA',
                        SKEY: 'senderCounty',
                        title: '区',
                        VALUE: '',
                        company: '',
                        tips: '',
                        standard:true,//标准输入框长度
                        flag: false, // 控制必填校验样式展示
                        required: true, // 是否为必填项
                        optionList:[]
                    },
                    {
                        ID: '',
                        SKEY: 'senderStreet',
                        title: '街道',
                        VALUE: '',
                        placeholder:'',
                        standard:true,//标准输入框长度
                        flag: false, // 控制必填校验样式展示
                    },
                    {
                        ID: '',
                        SKEY: 'senderAddress',
                        title: '地址',
                        VALUE: '',
                        standard:false,//标准输入框长度
                        flag: false, // 控制必填校验样式展示
                        required: true, // 是否为必填项
                    }
                    ],
                },
                {
                    tabId: '3',
                    tabtext: '收件人信息',
                    blockShow: true,
                    list: [
                    {
                        ID: '',
                        SKEY: 'receiverContact',
                        title: '收件人',
                        VALUE: '',
                        standard:true,//标准输入框长度
                        flag: false, // 控制必填校验样式展示
                        required: true, // 是否为必填项
                    },
                    {
                        ID: '',
                        SKEY: 'receiverMobile',
                        title: '手机号码',
                        VALUE: '',
                        standard:true,//标准输入框长度
                        flag: false, // 控制必填校验样式展示
                        required: true, // 是否为必填项
                    },
                    {
                        ID: '',
                        SKEY: 'receiverTel',
                        title: '电话',
                        VALUE: '',
                        standard:true,//标准输入框长度
                        flag: false, // 控制必填校验样式展示
                    },
                    {
                        ID: 'T_OMSREGION_PROVINCE',
                        SKEY: 'receiverProvince',
                        title: '省份',
                        VALUE: '',
                        company: '',
                        tips: '',
                        standard:true,//标准输入框长度
                        flag: true, // 控制必填校验样式展示
                        required: true, // 是否为必填项
                        optionList:[]
                    },
                    {
                        ID: 'T_OMSREGION_CITY',
                        SKEY: 'receiverCity',
                        title: '市',
                        VALUE: '',
                        company: '',
                        tips: '',
                        standard:true,//标准输入框长度
                        flag: true, // 控制必填校验样式展示
                        required: true, // 是否为必填项
                        optionList:[]
                    },
                    {
                        ID: 'T_OMSREGION_AREA',
                        SKEY: 'receiverCounty',
                        title: '区',
                        VALUE: '',
                        company: '',
                        tips: '',
                        standard:true,//标准输入框长度
                        flag: false, // 控制必填校验样式展示
                        required: true, // 是否为必填项
                        optionList:[]
                    },
                    {
                        ID: '',
                        SKEY: 'receiverStreet',
                        title: '街道',
                        VALUE: '',
                        placeholder:'',
                        standard:true,//标准输入框长度
                        flag: false, // 控制必填校验样式展示
                    },
                    {
                        ID: '',
                        SKEY: 'receiverAddress',
                        title: '地址',
                        VALUE: '',
                        standard:false,//标准输入框长度
                        flag: false, // 控制必填校验样式展示
                        required: true, // 是否为必填项
                    }
                    ],
                },
              ],
                options3: {
                    disabledDate (date) {
                        return date && date.valueOf() < Date.now() - 86400000;
                    },
                },
                formValidate: { // 寄件人智能识别
                    desc: '',
                },
                formValidate1: { // 收件人智能识别
                    desc: '',
                },
            };
        },
        components: { foldPanel },
        created(){
          this.refundOrderId = this.$route.query.refundOrderId;
          this.getQuery('T_V_OMSLOGISTICSCOMPANY',{IsActive:'=Y',IS_DOOR_PICKUP:'=1'})// 初始查询物流公司列表
          this.getProvinceList()// 初始获取省列表
          // 如果退换货单已保存上门取件单或者未保存但是有原始数据
          this.getRefundOrderId();
        },
        methods: {
          transferDate(time) { // d当前时间
            var myDate = new Date(time);
            //获取当前年
            var year = myDate.getFullYear();
            //获取当前月
            var month = myDate.getMonth() + 1;
            //获取当前日
            var date = myDate.getDate();
            var h = myDate.getHours();       //获取当前小时数(0-23)
            var m = myDate.getMinutes();     //获取当前分钟数(0-59)
            var s = myDate.getSeconds();
            var now = year + '-' + this.p(month) + "-" + this.p(date) + " " + this.p(h) + ':' + this.p(m) + ":" + this.p(s);
            return now;
          },
          p(s) {
            return s < 10 ? '0' + s : s;
          },
          getRefundOrderId(){
            network.get('/p/cs/onclickDoorPickup?refundOrderId='+this.refundOrderId).then(res => {
              if(res.data.code == 0) {
                // if(res.data.data.orderStatus == null){
                // }
                this.orderStatus = res.data.data.orderStatus
                this.listId = res.data.data.id
                if(this.orderStatus != null){
                  this.tabListOne.forEach(tabLiOne => {
                    tabLiOne.list.forEach(item => {
                      item.VALUE = res.data.data[item.SKEY]?String(res.data.data[item.SKEY]):''
                      if(item.SKEY == 'orderStatusText'){
                        item.VALUE = res.data.data['orderStatus'] == 0?'未发起':res.data.data['orderStatus'] == 1?'下单成功':res.data.data['orderStatus'] == 2?'下单失败':res.data.data['orderStatus'] == 9?'已取消':'';
                      }
                    })
                  })
                }
                this.tabList.forEach(tabLi => {
                  tabLi.list.forEach(item => {
                    item.VALUE = res.data.data[item.SKEY]?String(res.data.data[item.SKEY]):''
                    this.saveArr[item.SKEY] = res.data.data[item.SKEY]?String(res.data.data[item.SKEY]):''
                    if(item.SKEY=='logisticscompanyid') {
                      if(res.data.data[item.SKEY]){
                        item.VALUE = String(res.data.data[item.SKEY])
                      }else {
                        if(res.data.data['defaultLogisticscompany']){
                          item.VALUE = String(res.data.data['defaultLogisticscompany'])
                        }else {
                          item.VALUE = ''
                        }
                      }
                    }else if(item.SKEY=='expectSendTime'){
                      item.VALUE = res.data.data[item.SKEY]?this.transferDate(res.data.data[item.SKEY]):''
                      this.saveArr[item.SKEY] = res.data.data[item.SKEY]?this.transferDate(res.data.data[item.SKEY]):''
                    }else if(item.SKEY=='receiverProvince'){
                      this.saveArr.receiverProvince=item.VALUE
                      this.saveArr.receiverProvincename=res.data.data['receiverProvincename']
                      this.getCityList(item.VALUE,'receiverProvince')
                    }else if(item.SKEY=='receiverCity'){
                      this.saveArr.receiverCity=item.VALUE
                      this.saveArr.receiverCityname=res.data.data['receiverCityname']
                      this.getAreaList(item.VALUE,'receiverCity')
                    }else if(item.SKEY=='receiverCounty'){
                      this.saveArr.receiverCounty=item.VALUE
                      this.saveArr.receiverCountyname=res.data.data['receiverCountyname']
                    }else if(item.SKEY=='senderProvince'){
                      this.saveArr.senderProvince=item.VALUE
                      this.saveArr.senderProvincename=res.data.data['senderProvincename']
                      this.getCityList(item.VALUE,'senderProvince')
                    }else if(item.SKEY=='senderCity'){
                      this.saveArr.senderCity=item.VALUE
                      this.saveArr.senderCityname=res.data.data['senderCityname']
                      this.getAreaList(item.VALUE,'senderCity')
                    }else if(item.SKEY=='senderCounty'){
                      this.saveArr.senderCounty=item.VALUE
                      this.saveArr.senderCountyname=res.data.data['senderCountyname']
                    }
                  })
                })
                if((res.data.data.orderStatus == 0 || res.data.data.orderStatus == 2) && res.data.data.pickupOrderno){
                  this.PickupId = res.data.data.pickupOrderno
                  this.oldSaveArr = JSON.parse(JSON.stringify(this.saveArr))
                }
                if(res.data.data.orderStatus == 1){ // 请求上门取件成功
                  this.AllDisabled = true;
                }else {
                  this.AllDisabled = false;
                }
              }
            })
          },
          //初始查询标准下拉框数据
          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
                        }
                      })
                    }

                  }
                })
              })
          },
          rangeDate(e) {
            this.saveArr.expectSendTime = e;
          },
          // 获取省列表
          getProvinceList(type) {
            let virtual = {
              table: 'T_OMSREGION_PROVINCE',
              isdroplistsearch: true,
              range: 1000,
              startindex: 0,
            };
            network.post('/p/cs/list/query', virtual).then((res) => {
              this.tabList.forEach(oneTab => {
                oneTab.list.forEach(item=>{
                  if(item.ID=='T_OMSREGION_PROVINCE'){
                    item.optionList= res.data.rows.map(i=>{
                      return {
                        label:i.REGIONNAME.val,
                        value:i.ID.val
                      }
                    })
                    this.provinceList = item.optionList
                    // 获取省列表
                    this.selectProvince(this.smartProvince, type)
                  }
                })
              })
            });
          },
          // 获取市列表
          getCityList(val,skey) {
            if(val!=0&&val!=null&&val){
              // 市
              let virtual = {
                type: skey,
                table: 'T_OMSREGION_CITY',
                isdroplistsearch: true,
                range: 1000,
                startindex: 0,
                fixedcolumns: { PARENTID: [`=${val}`] },
              };
              network.post('/p/cs/list/query', virtual).then((res) => {
                if(skey == 'senderProvince'){
                  this.tabList[1].list.forEach(item=>{
                      if(item.ID=='T_OMSREGION_CITY'){
                        item.optionList= res.data.rows.map(i=>{
                          return {
                            label:i.REGIONNAME.val,
                            value:i.ID.val
                          }
                        })
                        this.cityList = item.optionList
                      }
                  })
                }else {
                  this.tabList[2].list.forEach(item=>{
                      if(item.ID=='T_OMSREGION_CITY'){
                        item.optionList= res.data.rows.map(i=>{
                          return {
                            label:i.REGIONNAME.val,
                            value:i.ID.val
                          }
                        })
                        this.cityList = item.optionList
                      }
                  })
                }
              })
            }

          },
          // 获取区列表
          getAreaList(val,skey) {
            if(val!=0&&val!=null&&val){
              let virtual = {
                type: skey,
                table: 'T_OMSREGION_AREA',
                isdroplistsearch: true,
                range: 1000,
                startindex: 0,
                fixedcolumns: { PARENTID: [`=${val}`] },
              };
              network.post('/p/cs/list/query', virtual).then((res) => {
                if(skey == 'senderCity'){
                  this.tabList[1].list.forEach(item=>{
                    if(item.ID=='T_OMSREGION_AREA'){
                      item.optionList= res.data.rows.map(i=>{
                        return {
                          label:i.REGIONNAME.val,
                          value:i.ID.val
                        }
                      })
                    }
                  })
                }else {
                  this.tabList[2].list.forEach(item=>{
                    if(item.ID=='T_OMSREGION_AREA'){
                      item.optionList= res.data.rows.map(i=>{
                        return {
                          label:i.REGIONNAME.val,
                          value:i.ID.val
                        }
                      })
                    }
                  })
                }
              });
            }

          },

          // 智能识别获取省编号

          // 选择省份
          selectProvince(val,type) {
            let data = this.provinceList.find((item) => item.label == val); //在省列表中找对应的省id
            if(data){
              // 市
              let virtual = {
                table: 'T_OMSREGION_CITY',
                isdroplistsearch: true,
                range: 1000,
                startindex: 0,
                fixedcolumns: { PARENTID: [`=${data.value}`] },
              };
              network.post('/p/cs/list/query', virtual).then((res) => {
                this.cityList = res.data.rows.map((item) => ({
                  value: item.ID.val,
                  label: item.REGIONNAME.val,
                }));
                if(type == 1){
                  this.tabList[1].list[4].optionList = this.cityList
                  // 获取市列表
                  if (this.smartCity) { //智能识别市就获取市ID
                    this.getCityNum(this.smartCity,type);
                  } else {//识别不到就通过默认的选择
                    this.selectCity(this.formValidate.city);
                  }
                }else {
                  this.tabList[2].list[4].optionList = this.cityList
                  // 获取市列表
                  if (this.smartCity) { //智能识别市就获取市ID
                    this.getCityNum(this.smartCity,type);
                  } else {//识别不到就通过默认的选择
                    this.selectCity(this.formValidate1.city);
                  }
                }

              });
            }

          },
          // 选择市
          selectCity(val,type) {
            let data = this.cityList.find((item) => item.label == val);//在市列表中找对应的市id
            // 市
            if (data) {
              let virtual = {
                table: 'T_OMSREGION_AREA',
                isdroplistsearch: true,
                range: 1000,
                startindex: 0,
                fixedcolumns: { PARENTID: [`=${data.value}`] },
              };
              network.post('/p/cs/list/query', virtual).then((res) => {
                this.areaList = res.data.rows.map((item) => ({
                  value: item.ID.val,
                  label: item.REGIONNAME.val,
                }));
                if(type == 1){
                  this.tabList[1].list[5].optionList = this.areaList
                  // 获取区列表
                  if( this.areaList.length==0){  //没有区就不要
                    this.formValidate.areaId = '';
                    this.formValidate.area = '';
                  }
                  if (this.smartArea) { //智能识别到区获取区ID
                    this.getAreaNum(this.smartArea,type,data.value);
                  }
                }else {
                  this.tabList[2].list[5].optionList = this.areaList
                  // 获取区列表
                  if( this.areaList.length==0){  //没有区就不要
                    this.formValidate1.areaId = '';
                    this.formValidate1.area = '';
                  }
                  if (this.smartArea) { //智能识别到区获取区ID
                    this.getAreaNum(this.smartArea,type,data.value);
                  }
                }
              });
            }
          },
          getProvinceNum(province,type) {
            let virtual = {
              table: 'T_OMSREGION_PROVINCE',
              isdroplistsearch: false,
              range: 1000,
              startindex: 0,
              fixedcolumns: { REGIONNAME: province },
            };
            network.post('/p/cs/list/query', virtual).then((res) => {
              if (res.data.rows.length) {
                if(type == 1){
                  this.formValidate.provinceId = res.data.rows[0].ID.val;
                  this.formValidate.province = res.data.rows[0].REGIONNAME.val;
                  this.selectProvince(this.formValidate.province,type);
                }else {
                  this.formValidate1.provinceId = res.data.rows[0].ID.val;
                  this.formValidate1.province = res.data.rows[0].REGIONNAME.val;
                  this.selectProvince(this.formValidate1.province,type);
                }
              }
            });
          },
          // 智能识别获取市编号
          getCityNum(city,type) {
            let virtual = {
              table: 'T_OMSREGION_CITY',
              isdroplistsearch: false,
              range: 1000,
              startindex: 0,
              fixedcolumns: { REGIONNAME: city },
            };
            network.post('/p/cs/list/query', virtual).then((res) => {
              if (res.data.rows.length) {
                if(type == 1){
                  this.formValidate.cityId = res.data.rows[0].ID.val;
                  this.formValidate.city = res.data.rows[0].REGIONNAME.val;
                  this.selectCity(this.formValidate.city,type);
                }else {
                  this.formValidate1.cityId = res.data.rows[0].ID.val;
                  this.formValidate1.city = res.data.rows[0].REGIONNAME.val;
                  this.selectCity(this.formValidate1.city,type);
                }
              }
            });
          },
          // 智能识别获取区编号
          getAreaNum(area,type,PARENTID) {
            let virtual = {
              table: 'T_OMSREGION_AREA',
              isdroplistsearch: false,
              range: 1000,
              startindex: 0,
              fixedcolumns: { REGIONNAME: [`=${area}`], PARENTID: [`=${PARENTID}`]},
            };
            network.post('/p/cs/list/query', virtual).then((res) => {
              if (res.data.rows.length) {
                if(type == 1){
                  this.formValidate.areaId = res.data.rows[0].ID.val;
                  this.formValidate.area = res.data.rows[0].REGIONNAME.val;
                }else {
                  this.formValidate1.areaId = res.data.rows[0].ID.val;
                  this.formValidate1.area = res.data.rows[0].REGIONNAME.val;
                }
                this.smartProvince = '';
                this.smartCity = '',
                this.smartArea = '';
              }
            });
          },

          // 智能识别回车事件
          searchsmart(e,type){
            if(e.keyCode == 13) {
              this.smartParse(type)
            }
          },
          // 智能识别
          smartParse(type) {
            if(type == 1){
              this.tabList[1].list.find(item=>item.SKEY=='senderStreet').VALUE = '';
              const [smartResult] = AddressParse.parse(this.formValidate.desc);
              this.smartCode = smartResult.code;
              console.log(smartResult)
              this.tabList[1].list[0].VALUE = smartResult.name;
              this.tabList[1].list[1].VALUE = smartResult.mobile;
              this.tabList[1].list[2].VALUE = smartResult.phone;
              this.tabList[1].list[3].VALUE = `${smartResult.code.slice(0, 2)}0000`;
              this.tabList[1].list[4].VALUE = `${smartResult.code.slice(0, 4)}00`;
              this.tabList[1].list[5].VALUE = smartResult.code;
              this.tabList[1].list[7].VALUE = smartResult.details;

              this.saveArr.senderProvince = `${smartResult.code.slice(0, 2)}0000`;
              this.saveArr.senderProvincename = smartResult.province;

              this.saveArr.senderCity = `${smartResult.code.slice(0, 4)}00`
              this.saveArr.senderCityname = smartResult.city

              this.saveArr.senderCounty = smartResult.code
              this.saveArr.senderCountyname = smartResult.area

              this.smartProvince = smartResult.province;
              // this.smartCity = smartResult.city;
              this.smartCity = smartResult.city == '省直辖县'?smartResult.area: smartResult.city;  // 跟系统统一，如果识别出的市区为省直辖县，带入识别出来的区
              this.smartArea = smartResult.area;

              // 有省
              if (smartResult.province) {
                this.smartProvince = smartResult.province;
                this.getProvinceList(type);
                this.getProvinceNum(this.smartProvince,1);
              }
            }else {
              this.tabList[2].list.find(item=>item.SKEY=='receiverStreet').VALUE = ''
              const [smartResult] = AddressParse.parse(this.formValidate1.desc);
              this.smartCode = smartResult.code;
              this.tabList[2].list[0].VALUE = smartResult.name;
              this.tabList[2].list[1].VALUE = smartResult.mobile;
              this.tabList[2].list[2].VALUE = smartResult.phone;
              this.tabList[2].list[3].VALUE = `${smartResult.code.slice(0, 2)}0000`;
              this.tabList[2].list[4].VALUE = `${smartResult.code.slice(0, 4)}00`;
              this.tabList[2].list[5].VALUE = smartResult.code;
              this.tabList[2].list[7].VALUE = smartResult.details;

              this.saveArr.receiverProvince = `${smartResult.code.slice(0, 2)}0000`;
              this.saveArr.receiverProvincename = smartResult.province;

              this.saveArr.receiverCity = `${smartResult.code.slice(0, 4)}00`
              this.saveArr.receiverCityname = smartResult.city

              this.saveArr.receiverCounty = smartResult.code
              this.saveArr.receiverCountyname = smartResult.area

              this.smartProvince = smartResult.province;
              this.smartCity = smartResult.city;
              this.smartArea = smartResult.area;

              // 有省
              if (smartResult.province) {
                this.smartProvince = smartResult.province;
                this.getProvinceList(type);
                this.getProvinceNum(this.smartProvince,2);
              }
            }
          },


          checkInput(i){ //下拉框选中事件
            let skey = i.SKEY;
            let inputValue = i.VALUE;
            if(skey=='logisticscompanyid'){ //退款物流公司
              let companyData = i.optionList.find((item) => item.value == inputValue);
              this.saveArr.logisticscompanyid=companyData?companyData.value:''
            }else if(skey=='senderProvince' || skey=='receiverProvince'){
              let provinceData = i.optionList.find((item) => item.value == inputValue); //在省列表中找对应的省id
              if(skey=='senderProvince'){
                this.saveArr.senderProvince=provinceData?provinceData.value:''
                this.saveArr.senderProvincename=provinceData?provinceData.label:''
                if(inputValue) {
                  this.smartCode = ''
                  this.tabList[1].list[4].VALUE = ''
                  this.tabList[1].list[5].VALUE = ''
                }
              }else {
                this.saveArr.receiverProvince=provinceData?provinceData.value:''
                this.saveArr.receiverProvincename=provinceData?provinceData.label:''
                if(inputValue) {
                  this.smartCode = ''
                  this.tabList[2].list[4].VALUE = ''
                  this.tabList[2].list[5].VALUE = ''
                }
              }

              this.getCityList(inputValue,skey) //获取对应省的市列表
            }else if(skey=='senderCity' || skey=='receiverCity' ){
              let cityData = ''
              if(skey=='senderCity'){
                if(!inputValue && this.smartCity){
                  cityData = {
                    value: this.smartCode.slice(0, 4)+ '00',
                    label: this.smartCity
                  };
                  inputValue = cityData.value
                  this.tabList[1].list[4].VALUE = this.smartCode.slice(0, 4)+ '00';
                } else {
                  cityData = i.optionList.find((item) => item.value == inputValue); //在市列表中找对应的市id
                }
                this.saveArr.senderCity=cityData?cityData.value:''
                this.saveArr.senderCityname=cityData?cityData.label:''
              }else {
                if(!inputValue && this.smartCity){
                  cityData = {
                    value: this.smartCode.slice(0, 4)+ '00',
                    label: this.smartCity
                  };
                  inputValue = cityData.value
                  this.tabList[2].list[4].VALUE = this.smartCode.slice(0, 4)+ '00';
                } else {
                  cityData = i.optionList.find((item) => item.value == inputValue); //在市列表中找对应的市id
                }
                this.saveArr.receiverCity=cityData?cityData.value:''
                this.saveArr.receiverCityname=cityData?cityData.label:''
              }
              this.getAreaList(inputValue,skey) //获取对应省的市列表
            }else if(skey=='senderCounty' || skey=='receiverCounty'){
              let AreaData = ''
              if(skey=='senderCounty'){
                if(!inputValue && this.smartArea){
                  AreaData = {
                    value: this.smartCode,
                    label: this.smartArea
                  };
                  // AreaData = this.smartCode;
                  this.tabList[1].list[5].VALUE = this.smartCode;
                }else {
                  AreaData = i.optionList.find((item) => item.value == inputValue); //在市列表中找对应的市id
                }
                this.saveArr.senderCounty=AreaData?AreaData.value:''
                this.saveArr.senderCountyname=AreaData?AreaData.label:''
              }else {
                if(!inputValue && this.smartArea){
                  AreaData = {
                    value: this.smartCode,
                    label: this.smartArea
                  };
                  // AreaData = this.smartCode;
                  this.tabList[2].list[5].VALUE = this.smartCode;
                }else {
                  AreaData = i.optionList.find((item) => item.value == inputValue); //在市列表中找对应的市id
                }
                this.saveArr.receiverCounty=AreaData?AreaData.value:''
                this.saveArr.receiverCountyname=AreaData?AreaData.label:''
              }

            }
          },
          checkInputSKU(e,i){
            if(i.VALUE){
              let tableName=i.ID
              if(tableName=='T_V_OMSLOGISTICSCOMPANY'){
                this.getQuery(tableName)
              }
            }else {
              let tableName=i.ID
              if(tableName=='T_V_OMSLOGISTICSCOMPANY'){
                this.getQuery(tableName,{NAME:e})
              }
            }
          },

          saveAll() {
            var flag=false;
            // 物流选择
            this.saveArr.logisticscompanyid=this.tabList[0].list.find(item=>item.SKEY=='logisticscompanyid').VALUE // 上门物流公司
            // this.saveArr.expectSendTime=this.tabList[0].list.find(item=>item.SKEY=='expectSendTime').VALUE //上门取件时间
            this.saveArr.payMethod=this.tabList[0].list.find(item=>item.SKEY=='payMethod').VALUE //支付方式
            this.saveArr.insuredAmount=this.tabList[0].list.find(item=>item.SKEY=='insuredAmount').VALUE //保价金额
            this.saveArr.remark=this.tabList[0].list.find(item=>item.SKEY=='remark').VALUE //备注信息

            // 寄件人信息
            this.saveArr.senderContact=this.tabList[1].list.find(item=>item.SKEY=='senderContact').VALUE // 寄件人
            this.saveArr.senderMobile=this.tabList[1].list.find(item=>item.SKEY=='senderMobile').VALUE //寄件人手机号码
            this.saveArr.senderTel=this.tabList[1].list.find(item=>item.SKEY=='senderTel').VALUE //寄件人电话
            this.saveArr.senderProvince=this.tabList[1].list.find(item=>item.SKEY=='senderProvince').VALUE //寄件人省份
            this.saveArr.senderCity=this.tabList[1].list.find(item=>item.SKEY=='senderCity').VALUE //寄件人市
            this.saveArr.senderCounty=this.tabList[1].list.find(item=>item.SKEY=='senderCounty').VALUE //寄件人区
            this.saveArr.senderStreet=this.tabList[1].list.find(item=>item.SKEY=='senderStreet').VALUE //寄件人街道
            this.saveArr.senderAddress=this.tabList[1].list.find(item=>item.SKEY=='senderAddress').VALUE //寄件人地址

            // 收件人信息
            this.saveArr.receiverContact=this.tabList[2].list.find(item=>item.SKEY=='receiverContact').VALUE // 收件人
            this.saveArr.receiverMobile=this.tabList[2].list.find(item=>item.SKEY=='receiverMobile').VALUE //收件人手机号码
            this.saveArr.receiverTel=this.tabList[2].list.find(item=>item.SKEY=='receiverTel').VALUE //收件人电话
            this.saveArr.receiverProvince=this.tabList[2].list.find(item=>item.SKEY=='receiverProvince').VALUE //收件人省份
            this.saveArr.receiverCity=this.tabList[2].list.find(item=>item.SKEY=='receiverCity').VALUE //收件人市
            this.saveArr.receiverCounty=this.tabList[2].list.find(item=>item.SKEY=='receiverCounty').VALUE //收件人区
            this.saveArr.receiverStreet=this.tabList[2].list.find(item=>item.SKEY=='receiverStreet').VALUE //收件人街道
            this.saveArr.receiverAddress=this.tabList[2].list.find(item=>item.SKEY=='receiverAddress').VALUE //收件人地址

            if(!this.saveArr.logisticscompanyid){
              this.$Message.warning('请选择上门物流公司');
              return
            }
            if(new Date(this.saveArr.expectSendTime) < new Date()){
              this.$Message.warning('上门取件时间不能早于当前时间');
              return
            }
            if(!this.saveArr.senderContact){
              this.$Message.warning('寄件人不能为空');
              return
            }
            if(!this.saveArr.senderMobile){
              this.$Message.warning('寄件人手机号码不能为空');
              return
            }
            if(!this.saveArr.senderProvince){
              this.$Message.warning('请选择寄件人省份');
              return
            }
            if(!this.saveArr.senderCity){
              this.$Message.warning('请选择寄件人市');
              return
            }
            if(!this.saveArr.senderCounty){
              this.$Message.warning('请选择寄件人区');
              return
            }
            if(!this.saveArr.senderAddress){
              this.$Message.warning('请选择寄件人地址');
              return
            }

            if(!this.saveArr.receiverContact){
              this.$Message.warning('收件人不能为空');
              return
            }
            if(!this.saveArr.receiverMobile){
              this.$Message.warning('收件人手机号码不能为空');
              return
            }
            if(!this.saveArr.receiverProvince){
              this.$Message.warning('请选择收件人省份');
              return
            }
            if(!this.saveArr.receiverCity){
              this.$Message.warning('请选择收件人市');
              return
            }
            if(!this.saveArr.receiverCounty){
              this.$Message.warning('请选择收件人区');
              return
            }
            if(!this.saveArr.receiverAddress){
              this.$Message.warning('请选择收件人地址');
              return
            }

            let params = this.saveArr
            params.omsrefundorderId = this.refundOrderId
            if(this.orderStatus == 0 || this.orderStatus == 2){
              params.id = this.listId;
              network.post('/p/cs/updateDoorPickupOrder',params).then(res => {
                if(res.data.code == 0){
                  this.$Message.success(res.data.message);
                  this.getRefundOrderId()
                }
              })
            }else {
              network.post('/p/cs/generateDoorPickupOrder',params).then(res => {
                if(res.data.code == 0){
                  this.$Message.success(res.data.message);
                  this.getRefundOrderId()
                }
              })
            }
          },

          isChangeMsg () {  // 判断已保存过上门取件信息的情况下，进入编辑页面是否对信息进行了二次编辑未保存
            // 物流选择
            this.saveArr.logisticscompanyid=this.tabList[0].list.find(item=>item.SKEY=='logisticscompanyid').VALUE // 上门物流公司
            // this.saveArr.expectSendTime=this.tabList[0].list.find(item=>item.SKEY=='expectSendTime').VALUE //上门取件时间
            this.saveArr.payMethod=this.tabList[0].list.find(item=>item.SKEY=='payMethod').VALUE //支付方式
            this.saveArr.insuredAmount=this.tabList[0].list.find(item=>item.SKEY=='insuredAmount').VALUE //保价金额
            this.saveArr.remark=this.tabList[0].list.find(item=>item.SKEY=='remark').VALUE //备注信息

            // 寄件人信息
            this.saveArr.senderContact=this.tabList[1].list.find(item=>item.SKEY=='senderContact').VALUE // 寄件人
            this.saveArr.senderMobile=this.tabList[1].list.find(item=>item.SKEY=='senderMobile').VALUE //寄件人手机号码
            this.saveArr.senderTel=this.tabList[1].list.find(item=>item.SKEY=='senderTel').VALUE //寄件人电话
            this.saveArr.senderProvince=this.tabList[1].list.find(item=>item.SKEY=='senderProvince').VALUE //寄件人省份
            this.saveArr.senderCity=this.tabList[1].list.find(item=>item.SKEY=='senderCity').VALUE //寄件人市
            this.saveArr.senderCounty=this.tabList[1].list.find(item=>item.SKEY=='senderCounty').VALUE //寄件人区
            this.saveArr.senderStreet=this.tabList[1].list.find(item=>item.SKEY=='senderStreet').VALUE //寄件人街道
            this.saveArr.senderAddress=this.tabList[1].list.find(item=>item.SKEY=='senderAddress').VALUE //寄件人地址

            // 收件人信息
            this.saveArr.receiverContact=this.tabList[2].list.find(item=>item.SKEY=='receiverContact').VALUE // 收件人
            this.saveArr.receiverMobile=this.tabList[2].list.find(item=>item.SKEY=='receiverMobile').VALUE //收件人手机号码
            this.saveArr.receiverTel=this.tabList[2].list.find(item=>item.SKEY=='receiverTel').VALUE //收件人电话
            this.saveArr.receiverProvince=this.tabList[2].list.find(item=>item.SKEY=='receiverProvince').VALUE //收件人省份
            this.saveArr.receiverCity=this.tabList[2].list.find(item=>item.SKEY=='receiverCity').VALUE //收件人市
            this.saveArr.receiverCounty=this.tabList[2].list.find(item=>item.SKEY=='receiverCounty').VALUE //收件人区
            this.saveArr.receiverStreet=this.tabList[2].list.find(item=>item.SKEY=='receiverStreet').VALUE //收件人街道
            this.saveArr.receiverAddress=this.tabList[2].list.find(item=>item.SKEY=='receiverAddress').VALUE //收件人地址

            let flag = true;
            let keyList = [];
            this.tabList.forEach(tab => {
              tab.list.forEach(item => {
                keyList.push(item.SKEY)
              })
            })
            for(let i = 0;i < keyList.length; i++){
              if(this.saveArr[keyList[i]] != this.oldSaveArr[keyList[i]]){
                flag = false;
                break;
              }
            }
            return flag;
          },

          // 请求上门取件
          startDoorPickupOrder() {
            if(new Date(this.saveArr.expectSendTime) < new Date()){
              this.$Message.warning('请求上门取件时间不能早于当前时间，请修改后保存再发起请求上门取件');
              return
            }
            if(this.isChangeMsg()){
              network.get('/p/cs/startDoorPickupOrder?id='+this.listId).then(res => {
                if(res.data.code == 0) {
                  this.$Message.success(res.data.message);
                  this.getRefundOrderId()
                }
              })
            }else {
              this.$Modal.fcError({
                title: '提示',
                mask:true,
                content: '上门取件单信息发生变化，请先保存再请求上门取件'
              });
            }
          },

          // 取消上门取件
          cancelDoorPickupOrder() {
            network.get('/p/cs/cancelDoorPickupOrder?id='+this.listId).then(res => {
              if(res.data.code == 0) {
                this.$Message.success(res.data.message);
                this.getRefundOrderId()
              }
            })
          },

          // 关闭当前页面
          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_V_OMSREFUNDORDERALL',
                tableId:'10612',
                back:true
              });
            },0)
          },
        }
    };
</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: 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;
            }
        }
    }
}
</style>
<style lang="less" scoped>
    .order-setting-input-error:before{
        content: '*';
        color: red;
    }
    .text1 /deep/ .ark-input {
        height: 80px;
        resize: none;
        background-color: #f5f5f5;
    }
</style>
