<template>
  <div style="min-width: 1240px;height: 100%;
    display: flex;
    flex-direction: column;" data-key="ORDER_EDITOR">
    <Spin fix v-if="loadingAll">
      <div class="loader">
        <svg class="circular" viewBox="25 25 50 50">
          <circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="5" stroke-miterlimit="10"></circle>
        </svg>
      </div>
      <div>加载中...</div>
    </Spin>
    <Modal
        v-model="jumpNewOrder"
        title="提示"
        :mask="mask"
        :footer-hide="hideFoot"
        :showCancel="showCancel">
        操作成功，已作废原单，正在前往新单
    </Modal>
    <Modal
      v-model="sureDelate"
      title="提示"
      :mask="mask"
      @on-ok="deleteGift"
    >
      是否确认删除赠品?
    </Modal>
    <Modal
      v-model="showDelete"
      title="提示"
      :mask="mask"
      @on-ok="cancelOrder"
    >
      <div style="height: 40px">
        订单商品全部删除后，订单会直接取消，请确认是否要删除?
      </div>
    </Modal>
    <Modal
      v-model="modal1"
      title="提示"
      :mask="mask"
      @on-ok="okSKUSPEC"
      @on-cancel="cancelSKUSPEC"
    >
      确认修改商品
    </Modal>
    <Modal
      v-model="showBuyerModal"
      title="修改地址"
      :mask="mask"
      :closable="closable"
      :mask-closable="maskClosable"
      :footer-hide="hideFoot"
      width="900"
      class='modifyBuyer modifyAddress'
      @on-cancel="cancel"
    >
      <div class="tipsPlatformText" v-if='PLATFORMText == "京东"'>
        <span>注意：如原地址信息为加密数据，请完整修改姓名，手机号，详细地址，请勿部分保留平台的加密地址信息，否则无法正常发货。</span>
      </div>
      <Form
        ref="formValidate"
        class="form"
        :model="formValidate"
        :rules="ruleValidate"
        label-position="right"
        :label-width="80"
        :inline="inline"
      >
        <Row>
          <Col span="8" >
          <FormItem
            label="姓名"
            prop="name"
          >
            <Input v-model="formValidate.name" ></Input>
          </FormItem>
          </Col>
          <Col span="8" >
          <FormItem
            label="手机号"
            prop="mobile"
          >
            <Input v-model="formValidate.mobile" :disabled="disableColumns.includes('RECEIVMOBILE')"></Input>
          </FormItem>
          </Col>
          <Col span="8" >
          <FormItem
            label="电话"
            prop="phone"
          >
            <Input v-model="formValidate.phone" ></Input>
          </FormItem>
          </Col>
        </Row>
      </Form>
      <Form
        ref="formValidate"
        class="form"
        :model="formValidate"
        :rules="ruleValidate"
        label-position="right"
        :label-width="80"
        :inline="inline"
      >
        <Row>
          <Col span="8">
            <FormItem
              label="收件人省"
              prop="province"
            >
              <Select
                v-model="formValidate.province"
                @on-change="selectProvinceBtn"
              >
                <Option
                  v-for="optionsItem in provinceList"
                  :key="optionsItem.value"
                  :value="optionsItem.label"
                >
                  {{ optionsItem.label }}
                </Option>
              </Select>
            </FormItem>
          </Col>
          <Col span="8">
          <FormItem
            label="收件人市"
            prop="city"
          >
            <Select
              v-model="formValidate.city"
              @on-change="selectCityBtn"
            >
              <Option
                v-for="optionsItem in cityList"
                :key="optionsItem.value"
                :value="optionsItem.label"
              >
                {{ optionsItem.label }}
              </Option>
            </Select>
          </FormItem>
          </Col>
          <Col span="8">
          <FormItem
            label="收件人区"
            prop="area"
          >
            <Select
              v-model="formValidate.area"
              @on-change="selectAreaBtn"
            >
              <Option
                v-for="optionsItem in areaList"
                :key="optionsItem.value"
                :value="optionsItem.label"
              >
                {{ optionsItem.label }}
              </Option>
            </Select>
          </FormItem>
          </Col>
        </Row>
      </Form>
      <Form
        ref="formValidate"
        class="form"
        :model="formValidate"
        :rules="ruleValidate"
        label-position="right"
        :label-width="80"
        :inline="inline"
      >
        <Row>
          <!-- v-if='PLATFORM=="57"' -->
          <Col span="8">
            <FormItem
              label="收件人街道"
              prop="town"
            >
              <Input v-model="formValidate.town" ></Input>
            </FormItem>
          </Col>
          <Col span="16" >
          <FormItem
            label="详细地址"
            prop="detailAddress"
          >
            <Input v-model="formValidate.detailAddress" ></Input>
          </FormItem>
          </Col>
          <Col span="8" >
          <FormItem label="国家">
            <Input v-model="formValidate.countryName" ></Input>
          </FormItem>
          </Col>
          <Col span="8" >
          <FormItem label="邮编">
            <Input v-model="formValidate.postCode" ></Input>
          </FormItem>
          </Col>
        </Row>
      </Form>
      <Form 
        ref="formValidate"
        class="form"
        :model="formValidate"
        :rules="ruleValidate"
        label-position="right"
        :label-width="80"
        :inline="inline">
        <Row>
          <Col span="16" v-if="IS_OVERSEAS">
          <FormItem label="清关信息" prop="customs_clearance_info">
            <Select
              v-model="formValidate.customs_clearance_type"
              placeholder="请选择证件类型"
              style='width: 30%'
              @on-change="selectclearancetypeBtn"
            >
              <Option
                v-for="optionsItem in clearancetypeList"
                :key="optionsItem.value"
                :value="optionsItem.value"
              >
                {{ optionsItem.label }}
              </Option>
            </Select>
            <Input style='width: 50%' placeholder="请填写证件号码" v-model="formValidate.customs_clearance_info"></Input>
          </FormItem>
          </Col>
        </Row>
      </Form>
      <Form
        class="form"
        :model="formValidate"
        label-position="top"
        :inline="inline"
        style="padding-left: 20px; margin-top: 20px"
      >
        <FormItem label="智能识别">
          <Input
            style='width:800px'
            v-model="formValidate.desc"
            class="text1"
            type="textarea"
            placeholder="粘贴地址信息后回车,自动识别姓名、电话和地址"
            @on-keydown="searchsmart"
          ></Input>
        </FormItem>
      </Form>
      <footer style="display: flex; justify-content: flex-end">
        <Button
          type="fcdefault"
          style="width: 80px; height: 34px; font-size: 14px"
          @click="cancel"
        >
          取消
        </Button>
        <Button
          type="posdefault"
          style="width: 80px; height: 34px; font-size: 14px; margin-left: 8px"
          @click="ok"
        >
          确认
        </Button>
      </footer>
    </Modal>
    <Modal
      v-model="showSellerModal"
      title="修改卖家备注"
      :mask="mask"
      :closable="closable"
      :mask-closable="maskClosable"
      :footer-hide="hideFoot"
      width="900"
      @on-cancel="cancelSellerMark"
    >
      <Form
        class="form"
        :model="formValidate1"
        :label-width="80"
        label-position="right"
        style="margin-top: 20px"
      >
        <FormItem label="标记:">
          <RadioGroup v-model="formValidate1.ORDERFLAG">
            <Radio v-for="(option , index) in support_flag"
              :key="index"
              :label="option">
              <Icon
                type="ios-flag"
                :style="`color: ${colorTextList[option]};`"
              />
            </Radio>
          </RadioGroup>
        </FormItem>
      </Form>

      <Form
        class="form"
        :model="formValidate1"
        :label-width="80"
        label-position="right"
        style="margin-top: 20px"
      >
        <FormItem label="备注内容:">
          <Input
            v-model="formValidate1.SELLERMEMO"
            class="text2"
            type="textarea"
          ></Input>
        </FormItem>
      </Form>
      <footer style="display: flex; justify-content: flex-end">
        <Button
          type="fcdefault"
          style="width: 80px; height: 34px; font-size: 14px"
          @click="cancelSellerMark"
        >
          取消
        </Button>
        <Button
          type="fcdefault"
          style="width: 80px; height: 34px; font-size: 14px; margin-left: 8px"
          @click="okSellerMark"
        >
          保存
        </Button>
        <Button
          v-if='isShowSyncToPlatform'
          type="fcdefault"
          style="width: 150px; height: 34px; font-size: 14px; margin-left: 8px"
          @click="saveSellerMark"
        >
        <!-- v-if="PLATFORM==2 || PLATFORM==20 || PLATFORM==27 || PLATFORM==57 || PLATFORM==401 || PLATFORM==4" -->
          保存并同步平台
        </Button>
      </footer>
    </Modal>

    <Modal
      v-model="showinterModal"
      title="修改内部备注"
      :mask="mask"
      :closable="closable"
      :mask-closable="maskClosable"
      :footer-hide="hideFoot"
      width="900"
      @on-cancel="cancelInterDesc"
    >
      <Form
        class="form"
        :label-width="80"
        label-position="right"
        style="margin-top: 20px"
      >
        <FormItem label="备注内容:">
          <Input
            v-model="interDesc"
            class="text2"
            type="textarea"
          ></Input>
        </FormItem>
      </Form>
      <footer style="display: flex; justify-content: flex-end">
        <Button
          type="fcdefault"
          style="width: 80px; height: 34px; font-size: 14px"
          @click="cancelInterDesc"
        >
          取消
        </Button>
        <Button
          type="fcdefault"
          style="width: 80px; height: 34px; font-size: 14px; margin-left: 8px"
          @click="okInterDesc"
        >
          保存
        </Button>
      </footer>
    </Modal>
    <Modal
      v-model="showwmsModal"
      title="修改WMS备注"
      :mask="mask"
      :closable="closable"
      :mask-closable="maskClosable"
      :footer-hide="hideFoot"
      width="900"
      @on-cancel="cancelWmsDesc"
    >
      <Form
        class="form"
        :label-width="80"
        label-position="right"
        style="margin-top: 20px"
      >
        <FormItem label="备注内容:">
          <Input
            v-model="wmsDesc"
            class="text2"
            type="textarea"
          ></Input>
        </FormItem>
      </Form>
      <footer style="display: flex; justify-content: flex-end">
        <Button
          type="fcdefault"
          style="width: 80px; height: 34px; font-size: 14px"
          @click="cancelWmsDesc"
        >
          取消
        </Button>
        <Button
          type="fcdefault"
          style="width: 80px; height: 34px; font-size: 14px; margin-left: 8px"
          @click="okWmsDesc"
        >
          保存
        </Button>
      </footer>
    </Modal>
    <Modal
      v-model="showAddGiftModal"
      title="添加赠品"
      clearable
      :mask="mask"
      :closable="closable"
      :mask-closable="maskClosable"
      :footer-hide="hideFoot"
      width="900"
      @on-cancel="cancelModal"
      @on-keydown="searchSKU"
    >
      <Row style="display: flex; justify-content: space-around">
        <Col span="9">
        <div style="display: flex;align-items: center;margin-bottom: 16px;">
          <label style="width: 200px;">sku/商品名/国际码</label>
          <Select
            v-model="formValidate3.SKU"
            @on-query-change="selectGiftGoods"
            filterable
            clearable
            style="width: 210px;"
          >
            <Option v-for="(option,index) in modifyGoodsArr" :key="index" :value="option.value" :label="option.label">{{option.label}}</Option>
          </Select>
        </div>
        </Col>
        <Col span="7" >
        <div style="display: flex;align-items: center;margin-bottom: 16px;">
          <label style="width: 50px;">数量</label>
          <Input
            v-model="formValidate3.NUM"
            :regx="regx"
            clearable
            @on-keyup="checkNum"
          ></Input>
        </div>
        </Col>
        <Col span="2" >
        <Button type="primary" v-if="showSaveBtn" class="btn_modify"  icon="md-return-left" @click="searchSKUBtn">添加</Button>
        </Col>
      </Row>
      <!-- </Form> -->
      <Table
        border
        height="150"
        :columns="columns2"
        :data="giftTableDataAdd"
        size="large"
      />
      <footer style="display: flex; justify-content: flex-end; margin-top: 16px">
        <Button
          type="fcdefault"
          style="width: 80px; height: 34px; font-size: 14px"
          @click="cancelModal"
        >
          取消
        </Button>
        <Button
          type="posdefault"
          style="width: 80px; height: 34px; font-size: 14px; margin-left: 8px"
          @click="okAddGift"
        >
          确定
        </Button>
      </footer>
    </Modal>
    <!-- 修改商品 -->
    <Modal
      v-model="showModifyGoodsModal"
      title="替换商品"
      titleAlign='left'
      :mask="mask"
      :closable="closable"
      :mask-closable="maskClosable"
      :footer-hide="hideFoot"
      width="1200"
      @on-cancel="cancelModal"
      @on-keydown="searchSKU1"
    >
      <div class="ModifyGoods" style="display:flex;justify-content:space-between;">
        <Spin fix v-if="loading">
          <div class="loader">
            <svg class="circular" viewBox="25 25 50 50">
              <circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="5" stroke-miterlimit="10"></circle>
            </svg>
          </div>
          <div>请稍后...</div>
        </Spin>
        <div class="leftModifyGoods" style='width:40%;'>
          <div class="ModifyGoodsTitle">
            被替换商品SKU
          </div>
          <Table
            border
            height="300"
            :columns="columns4"
            :data="submitArr"
            size="large"
            style='margin-top:95px;'
          />
        </div>
        <div class="modifyGoodsLine" style='position:relative;width: 1px;background:#eee;height:412px;'><span class='changeIcon'><Icon type="ios-swap"/></span></div>
        <div class="rightModifyGoods"  style='width:57%;'>
          <div class="ModifyGoodsTitle">
            替换后商品SKU
          </div>
          <div style="display:flex;align-items: center;justify-content:space-between;">
            <div style="display: flex;align-items: center;margin-bottom: 16px;">
              <label style="width: 90px;">sku/商品名/国际码</label>
              <div
                class="SKUgoods"
                style="width:180px;margin-left: 8px;"
              >
                <Select
                  v-model="formValidate4.SKU"
                  @on-query-change="selectSkuGoods"
                  filterable
                  clearable
                >
                  <Option
                    v-for="(option, index) in modifyGoodsArr"
                    :key="index"
                    :value="option.value"
                    :label="option.label"
                  >{{ option.label }}</Option>
                </Select>
              </div>
            </div>
            <div style="display: flex;align-items: center;margin-bottom: 16px;margin-left:10px;">
              <label style="width: 30px;">数量</label>
              <div
                class="SKUgoods"
                style="width:120px;margin-left: 8px;"
              >
              <Input
                v-model="formValidate4.NUM"
                :regx='regx'
                @on-focus='focusNumBox'
                clearable
              ></Input>
              </div>
            </div>
            <div style="display: flex;align-items: center;margin-bottom: 16px;margin-left:10px;">
              <label style="width: 50px;">成交金额</label>
              <div
                class="SKUgoods"
                style="width:120px;margin-left: 8px;"
              >
                <Input
                v-model="formValidate4.ACTUALAMOUNT"
                :regx='regx1'
                clearable
              ></Input>
              </div>
            </div>
          </div>
          <div style='display: flex;justify-content: flex-end;margin: 10px 0;'>
            <Button type="primary" v-if="showSaveBtn" style='margin-top:-16px;' class="btn_modify"
            icon="md-return-left" @click="searchSKU1Btn">添加</Button>
          </div>
          <!--</Form> -->
          <Table
            border
            height="300"
            :columns="columns3"
            :data="goodsTableDataModify"
            size="large"
          />
          <footer style="display: flex; justify-content: flex-start; margin-top: 16px;margin-left: -100px;">
            <Button
              type="fcdefault"
              style="width: 80px; height: 34px; font-size: 14px"
              @click="cancelModal"
            >
              取消
            </Button>
            <Button
              type="posdefault"
              style="width: 80px; height: 34px; font-size: 14px; margin-left: 8px"
              @click="okModifyGoods"
            >
              确定
            </Button>
          </footer>
        </div>
      </div>
    </Modal>
    <div class="topContent">
      <Steps
        :current="currentStep"
        status="wait"
      >
        <Step>
          <div
            id="1"
            class="step stepItem"
          >
            <div class="stepTitle">
              付款
            </div>
            <div class="stepImg">
              <img
                src="../../assets/orderEditorImg/pay_.png"
                style="width: 25px; height: 25px; margin: 0 auto"
              >
            </div>
            <div class="stepData">
              {{ PAYTIME }}
            </div>
            <div class="stepTime">
              {{ PAYTIME1 }}
            </div>
          </div>
        </Step>
        <Step class="jtStyle">
          <img
            src="../../assets//orderEditorImg/stepJT.png"
            style="width: 32px; height: 32px ;background-color:#f9f9f9;"
          >
        </Step>
        <Step>
          <div
            id="2"
            class="step stepItem"
          >
            <div class="stepTitle">
              进入云雀
            </div>
            <div class="stepImg">
              <img
                src="../../assets/orderEditorImg/goin_.png"
                style="width: 25px; height: 25px; margin: 0 auto"
              >
            </div>
            <div class="stepData">
              {{ CREATIONDATE }}
            </div>
            <div class="stepTime">
              {{ CREATIONDATE1 }}
            </div>
          </div>
        </Step>
        <Step class="jtStyle">
          <img
            src="../../assets//orderEditorImg/stepJT.png"
            style="width: 32px; height: 32px;background-color:#f9f9f9;"
          >
        </Step>
        <Step>
          <div
            id="3"
            class="step stepItem"
          >
            <div class="stepTitle">
              订单审单
            </div>
            <div class="stepImg">
              <img
                src="../../assets/orderEditorImg/examine_.png"
                style="width: 25px; height: 25px; margin: 0 auto"
              >
            </div>
            <div class="stepData">
              {{ AUDITTIME }}
            </div>
            <div class="stepTime">
              {{ AUDITTIME1 }}
            </div>
          </div>
        </Step>
        <Step class="jtStyle">
          <img
            src="../../assets//orderEditorImg/stepJT.png"
            style="width: 32px; height: 32px;background-color:#f9f9f9;"
          >
        </Step>
        <Step>
          <div
            id="4"
            class="step stepItem"
          >
            <div class="stepTitle">
              推送仓库
            </div>
            <div class="stepImg">
              <img
                src="../../assets/orderEditorImg/post_.png"
                style="width: 25px; height: 25px; margin: 0 auto"
              >
            </div>
            <div class="stepData">
              {{ NOTICETIME }}
            </div>
            <div class="stepTime">
              {{ NOTICETIME1 }}
            </div>
          </div>
        </Step>
        <Step class="jtStyle">
          <img
            src="../../assets//orderEditorImg/stepJT.png"
            style="width: 32px; height: 32px;background-color:#f9f9f9;"
          >
        </Step>
        <Step>
          <div
            id="5"
            class="step stepItem"
          >
            <div class="stepTitle">
              仓库出货
            </div>
            <div class="stepImg">
              <img
                src="../../assets/orderEditorImg/pull_.png"
                style="width: 25px; height: 25px; margin: 0 auto"
              >
            </div>
            <div class="stepData">
              {{ SCANTIME }}
            </div>
            <div class="stepTime">
              {{ SCANTIME1 }}
            </div>
          </div>
        </Step>
        <Step class="jtStyle">
          <img
            src="../../assets//orderEditorImg/stepJT.png"
            style="width: 32px; height: 32px;background-color:#f9f9f9;"
          >
        </Step>
        <Step>
          <div
            id="6"
            class="step stepItem"
          >
            <div class="stepTitle">
              平台发货
            </div>
            <div class="stepImg">
              <img
                src="../../assets/orderEditorImg/express_.png"
                style="width: 25px; height: 25px; margin: 0 auto"
              >
            </div>
            <div class="stepData">
              {{ PLATNOTICETIME }}
            </div>
            <div class="stepTime">
              {{ PLATNOTICETIME1 }}
            </div>
          </div>
        </Step>
      </Steps>
    </div>
    <div class="centerContent" style="flex:1" data-key="ORDER_EDITOR">
      <Tabs value="name1" style="height:100%">
        <TabPane
          label="基本信息"
          name="name1"
        >
          <div class="orderMessage">
            <div class="message_left">
              <div class="title">
                订单信息
              </div>
              <div class="content">
                <div class="content_item" v-if="RT_ORDER_ID">
                  <div class="contentName">
                    关联订单编号：
                  </div>
                  <div class="contentMsg" style="color: #147ac1;cursor:pointer;" @click='viewOrderDetail(RT_ORDER_ID)'>
                    {{ RT_ORDER_ID }}
                  </div>
                </div>

                <div class="content_item">
                  <div class="contentName">
                    收件信息：
                  </div>
                  <div
                    class="contentMsg"
                    style="width: 75%"
                  >
                    <BodyGuard v-if="PLATFORM == 57 && douyinData.token && OAID" :data="douyinData"  />
                    <span v-if='showOwnText'>
                      {{ formValidate.name }},{{ formValidate.mobile }},{{ formValidate.countryName?formValidate.countryName:'' }} {{
                        formValidate.province
                      }}
                      {{ formValidate.city }} {{ formValidate.area }} {{ formValidate.town }}
                    </span>
                    <p v-if='showOwnText'>{{ formValidate.detailAddress }} {{ formValidate.postCode?formValidate.postCode:'' }}</p>
                    <!-- {{ PLATFORM }} 
                    {{ douyinData.token }} 
                    {{ douyinData.text }} -->
                    <div
                      class="modify"
                      data-key="MODIFY_ADDRESS"
                      style="color: #183d71; display: flex"
                    >
                      <div
                        @click="changeAddress" v-if="showSaveBtn"
                      >
                        修改地址
                      </div>
                      <div
                        v-if="hideAll"
                        style="margin-left: 4px"
                        @click="toShowAll"
                      >
                      <!--  && PLATFORM != 57 -->
                        查看敏感信息
                      </div>
                      <div
                        v-else-if='!hideAll'
                        style="margin-left: 4px"
                        @click="toHideAll"
                      >
                        隐藏敏感信息
                      </div>
                    </div>
                  </div>
                </div>
                <div class="content_item">
                  <div class="contentName">
                    买家备注：
                  </div>
                  <div class="contentMsg">
                    {{ BUYERMESSAGE }}
                  </div>
                </div>
                <div class="content_item">
                  <div class="contentName">
                    卖家备注：
                  </div>
                  <div class="contentMsg">
                    <Icon
                      class="changeColor"
                      type="ios-flag"
                      style="color: #eb4832"
                    />
                    {{ formValidate1.SELLERMEMO }}
                    <Icon
                      class="toBlue"
                      v-if="showSaveBtn"
                      type="ios-create-outline"
                      @click="showSellerDialog"
                    />
                    <!-- <img src="../../assets/orderEditorImg/modify.png"/> -->
                  </div>
                </div>
                <div class="content_item">
                  <div class="contentName">
                    内部备注：
                  </div>
                  <div class="contentMsg">
                    {{ interDesc }}

                    <Icon
                      class="toBlue"
                      v-if="showSaveBtn"
                      type="ios-create-outline"
                      @click="showinterModal = true"
                    />
                  </div>
                </div>
                <div class="content_item">
                  <div class="contentName">
                    WMS备注：
                  </div>
                  <div class="contentMsg">
                    {{ wmsDesc }}

                    <Icon
                      class="toBlue"
                      v-if="showSaveBtn"
                      type="ios-create-outline"
                      @click="showwmsModal = true"
                    />
                  </div>
                </div>
                <div class="content_item">
                  <div class="contentName">
                    系统备注：
                  </div>
                  <div class="contentMsg">
                    {{ SYSREMARK }}
                  </div>
                </div>

                <!-- 其它信息 -->
                <div class="other-info">
                  <div style='display: flex;align-items:center;'>
                    <div class="fold-wrap" @click="toggleFold" style="margin-bottom: 6px;">
                      <Icon :type="foldIcon" style="margin-right: 4px;"/>
                      <span>其它信息</span>
                    </div>
                    <Icon
                    v-if="ORDERSTATUS === 1 || ORDERSTATUS === 2"
                    class="toBlue"
                      type="ios-create-outline"
                      style="vertical-align: 0px;margin-left: 8px;"
                      @click="openOtherDialogAll()"
                    />
                  </div>
                  <div v-show="showOtherInfo">
                    <div class="content_item" style="margin-bottom: 2px;" v-for="info in otherInfos" :key="info.title">
                        <div class="contentName">
                          {{info.title}}：
                        </div>
                        <div class="contentMsg">
                          {{info.value}}
                          <!-- <Icon
                            v-if="ORDERSTATUS === 1 || ORDERSTATUS === 2"
                            class="toBlue"
                            type="ios-create-outline"
                            style="vertical-align: 0px;"
                            @click="openOtherDialog(info.field)"
                          /> -->
                        </div>
                    </div>
                  </div>
                </div>


              </div>
            </div>
            <div class="message_right">
              <div style="position: absolute; top: 13px; right: 16px">
                <img
                  :src="orderStatusImg"
                  style="width: 83px; height: 66px"
                >
              </div>
              <div class="orderMember">
                <div class="content_item">
                  <div
                    class="contentName"
                    style="font-size: 14px; width: 70px"
                  >
                    订单编号：
                  </div>
                  <div class="contentMsg">
                    {{ OMSID }}
                  </div>
                </div>
                <div
                  class="orderIcon order-sign-wrap"
                  v-html="htmlTip"
                />
                <div
                  class="orderIcon HOST"
                  v-if='tipType'
                >
                  <Tooltip placement="top" theme="light">
                      <div class="box order_status" :class='ALLHOST_info.column' style="border: 2px solid #147ac1;color:#147ac1;line-height:22px;">直播</div>
                      <div slot="content" style="color:#C1C1C1">
                        <p>主播ID：<span style="color:#000000;width:100px;display:inline-block;" class="one-line-flow">{{ALLHOST_info.ALLHOSTNO}}</span></p>
                        <p>主播名称：<span style="color:#000000;width:100px;display:inline-block;" class="one-line-flow">{{ALLHOST_info.ALLHOSTNAME}}</span></p>
                      </div>
                  </Tooltip>
                </div>
              </div>
              <div style="position: relative">
                <Row style="margin: 14px 0 19px 0;" type="flex" justify="start">   
                  <!--  width: 1000px -->
                  <Col span="6" >
                    <div class="content_item">
                      <div class="contentName">
                        平台：
                      </div>
                      <div class="contentMsg" style="white-space:nowrap;overflow:auto">
                        {{ PLATFORMText }}
                      </div>
                    </div>
                  </Col>
                  <Col span="6" >
                    <div class="content_item">
                      <div class="contentName">
                        下单店铺：
                      </div>
                      <div class="contentMsg" style="white-space:nowrap;overflow:auto">
                        {{ ORDERSHOPNAME }}
                      </div>
                    </div>
                  </Col>
                  <Col span="6" >
                    <div class="content_item">
                      <div class="contentName">
                        平台单号：
                      </div>
                      <div class="contentMsg" style="white-space:nowrap;overflow:auto">
                        {{ TID }}
                      </div>
                    </div>
                  </Col>
                  <Col span="6" >
                    <div class="content_item">
                      <div class="contentName">
                        买家昵称：
                      </div>
                      <div
                        class="contentMsg"
                        style="white-space:nowrap;overflow:auto"
                      >
                        {{ formValidate.buyNickname }}
                        <span ref='wangwang' v-if='PLATFORM==2 && formValidate.buyopenid' v-html='wangwangHtml'></span>
                        <span v-else-if='PLATFORM==2 && formValidate.buyNickname && formValidate.buyNickname.indexOf("*") < 0 && !formValidate.buyopenid'>
                          <a target="_blank" :href="'aliim:sendmsg?&touid=cntaobao'+formValidate.buyNickname+'&siteid=cntaobao&status=2&portalId=&gid=&itemsId=&scene=&toRole=&source=light&client=false&encryptuid=&bizdomain=taobao&openappkey=12585822&openuid=&sceneparam=%7B%22toRole%22:%22buyer%22%EF%BC%8C%22bizRef%22:%20%22%22%7D'" ><img class='wangwangIcon' border="0" src="../../assets/image/wangwanglink.gif" alt="有事点这里和我交流或留言！" /></a>
                        </span>
                        <!-- <a v-if='PLATFORM==2 && formValidate.buyopenid && formValidate.buyNickname && formValidate.buyNickname.indexOf("*") < 0' target="_blank" :href="'aliim:sendmsg?&touid=cntaobao'+formValidate.buyNickname+'&siteid=cntaobao&status=2&portalId=&gid=&itemsId=&scene=&toRole=&source=light&client=false&encryptuid=&bizdomain=taobao&openappkey=12585822&openuid='+formValidate.buyopenid+'&sceneparam=%7B%22toRole%22:%22buyer%22%EF%BC%8C%22bizRef%22:%20%22%22%7D'" ><img class='wangwangIcon' border="0" src="../../assets/image/wangwangIcon.png" alt="有事点这里和我交流或留言！" /></a> -->
                        <!-- <a v-if='PLATFORM==2 && !formValidate.buyopenid && formValidate.buyNickname && formValidate.buyNickname.indexOf("*") < 0' target="_blank" :href="'aliim:sendmsg?&touid=cntaobao'+formValidate.buyNickname+'&siteid=cntaobao&status=2&portalId=&gid=&itemsId=&scene=&toRole=&source=light&client=false&encryptuid=&bizdomain=taobao&openappkey=12585822&openuid=&sceneparam=%7B%22toRole%22:%22buyer%22%EF%BC%8C%22bizRef%22:%20%22%22%7D'" ><img class='wangwangIcon' border="0" src="../../assets/image/wangwangIcon.png" alt="有事点这里和我交流或留言！" /></a> -->
                      </div>
                    </div>
                  </Col>
                  <Col span="6"  v-if='formValidate.real_receiver_display_nick'>
                    <div class="content_item">
                      <div class="contentName">
                        收货人昵称:
                      </div>
                      <div
                        class="contentMsg"
                        style="white-space:nowrap;overflow:auto"
                      >
                        {{ formValidate.real_receiver_display_nick }}
                        <span ref='wangwang' v-if='PLATFORM==2 && formValidate.real_receiver_openid && formValidate.real_receiver_display_nick' v-html='rewangwangHtml'></span>
                        <span v-else-if='PLATFORM==2 && formValidate.real_receiver_display_nick && formValidate.real_receiver_display_nick.indexOf("*") < 0 && !formValidate.real_receiver_openid'>
                          <a target="_blank" :href="'aliim:sendmsg?&touid=cntaobao'+formValidate.real_receiver_display_nick+'&siteid=cntaobao&status=2&portalId=&gid=&itemsId=&scene=&toRole=&source=light&client=false&encryptuid=&bizdomain=taobao&openappkey=12585822&openuid=&sceneparam=%7B%22toRole%22:%22buyer%22%EF%BC%8C%22bizRef%22:%20%22%22%7D'" ><img class='wangwangIcon' border="0" src="../../assets/image/wangwanglink.gif" alt="有事点这里和我交流或留言！" /></a>
                        </span>
                        <!-- <a v-if='PLATFORM==2 && formValidate.buyopenid && formValidate.buyNickname && formValidate.buyNickname.indexOf("*") < 0' target="_blank" :href="'aliim:sendmsg?&touid=cntaobao'+formValidate.buyNickname+'&siteid=cntaobao&status=2&portalId=&gid=&itemsId=&scene=&toRole=&source=light&client=false&encryptuid=&bizdomain=taobao&openappkey=12585822&openuid='+formValidate.buyopenid+'&sceneparam=%7B%22toRole%22:%22buyer%22%EF%BC%8C%22bizRef%22:%20%22%22%7D'" ><img class='wangwangIcon' border="0" src="../../assets/image/wangwangIcon.png" alt="有事点这里和我交流或留言！" /></a> -->
                        <!-- <a v-if='PLATFORM==2 && !formValidate.buyopenid && formValidate.buyNickname && formValidate.buyNickname.indexOf("*") < 0' target="_blank" :href="'aliim:sendmsg?&touid=cntaobao'+formValidate.buyNickname+'&siteid=cntaobao&status=2&portalId=&gid=&itemsId=&scene=&toRole=&source=light&client=false&encryptuid=&bizdomain=taobao&openappkey=12585822&openuid=&sceneparam=%7B%22toRole%22:%22buyer%22%EF%BC%8C%22bizRef%22:%20%22%22%7D'" ><img class='wangwangIcon' border="0" src="../../assets/image/wangwangIcon.png" alt="有事点这里和我交流或留言！" /></a> -->
                      </div>
                    </div>
                  </Col>
                  <Col span="6" >
                    <div class="content_item">
                      <div class="contentName">
                        下单时间：
                      </div>
                      <div class="contentMsg" style="white-space:nowrap;overflow:auto">
                        {{ ORDERDATE }}
                      </div>
                    </div>
                  </Col>
                  <Col span="6" >
                    <div class="content_item">
                      <div class="contentName">
                        平台会员卡号：
                      </div>
                      <div class="contentMsg" style="white-space:nowrap;overflow:auto">
                        {{ PLATFORMVIPCODE }}
                      </div>
                    </div>
                  </Col>
                  <Col span="6" v-if='ORDERTYPE == 2'>
                    <div class="content_item">
                      <div class="contentName">
                        平台换货单号：
                      </div>
                      <div class="contentMsg" style="white-space:nowrap;overflow:auto">
                        {{ DISPUTE_ID }}
                      </div>
                    </div>
                  </Col>
                  <Col span="6" >
                    <div class="content_item">
                      <div class="contentName">
                        支付方式：
                      </div>
                      <div class="contentMsg" style="white-space:nowrap;overflow:auto">
                        {{ PAYTYPE }}
                      </div>
                    </div>
                  </Col>
                  <Col span="6" >
                    <div class="content_item">
                      <div class="contentName">
                        物流公司：
                      </div>
                      <div class="contentMsg" style="white-space:nowrap;overflow:auto">
                        {{ SHIPPERID }}
                      </div>
                    </div>
                  </Col>
                  <Col span="6" v-if='LOGISTICSNUMBER'>
                    <div class="content_item">
                      <div class="contentName">
                        物流单号：
                      </div>
                      <div class="contentMsg" style="display:flex;align-items: center;" :class="[LOGISTICSNUMBER?'hidePoint':'']" @click="toExpressQuery('','')">
                        <span style="white-space:nowrap;overflow:auto">{{ LOGISTICSNUMBER }}</span>
                        <img src="../../assets/orderEditorImg/moreExpress.png" :class="[LOGISTICSNUMBER?'':'hideImg']" style="height:18px;margin-left:8px" >
                      </div>
                    </div>
                  </Col>
                  <Col span="6" >
                    <div class="content_item">
                      <div class="contentName">
                        发货仓库：
                      </div>
                      <div class="contentMsg" style="white-space:nowrap;overflow:auto">
                        {{ IESWAREHOUSEIDTEXT }}
                      </div>
                    </div>
                  </Col>
                  <Col span="6" >
                    <div class="content_item" title='根据云雀sku档案的重量，计算出的订单商品重量之和（kg）'>
                      <div class="contentName">
                        预估包裹重量：
                      </div>
                      <div class="contentMsg" style="white-space:nowrap;overflow:auto">
                        {{ WEIGHT }}
                      </div>
                    </div>
                  </Col>
                  <Col span="6" >
                    <div class="content_item" title='包裹出库时的称重重量（kg）'>
                      <div class="contentName">
                        实际包裹重量：
                      </div>
                      <div class="contentMsg" style="white-space:nowrap;overflow:auto">
                        {{ REAL_WEIGHT }}
                      </div>
                    </div>
                  </Col>
                  <Col span="6" >
                    <div class="content_item">
                      <div class="contentName">
                        门店业务信息：
                      </div>
                      <Poptip trigger="click" popper-class='offlineStorePop' placement="top-start" max-width="200" transfer>
                        <span style="color: #147ac1;cursor:pointer;">
                          线下门店详情
                        </span>
                        <div slot="content" style="color:#fff" v-if='!ORDERSTORENAME&&!PLATFORMSENDNAME&&!LOGISTICSTYPE'>
                          <span style='#fff'>暂无数据</span>
                        </div>
                        <div slot="content" style="color:#fff;line-height: 20px;" v-else>
                          <!-- style="color:#000000" -->
                          <p>下单门店名称：<span>{{ ORDERSTORENAME }}</span></p>
                          <p>发货门店名称：<span>{{ PLATFORMSENDNAME }}</span></p>
                          <p>配送方式：<span>{{ LOGISTICSTYPE }}</span></p>
                        </div>
                      </Poptip>
                    </div>
                  </Col>
                  <Col span="6" v-if="isOfflineStoreFlag">
                    <div class="content_item">
                      <div class="contentName">
                        云仓业务信息：
                      </div>
                      <Poptip trigger="click" popper-class='offlineStorePop' placement="top-start" max-width="200" transfer @on-popper-show="getShipStoreInfo" >
                        <span style="color: #147ac1;cursor:pointer;">
                          云仓信息
                        </span>
                        <div slot="content" style="color:#fff" v-if='SHIP_STORE_INFO.length == 0'>
                          <span style='#fff'>暂无数据</span>
                        </div>
                        <div slot="content" style="color:#fff;line-height: 20px;" v-else>
                          <!-- max-height: 150px;overflow-y: auto; -->
                          <!-- style="color:#000000" -->
                          <p v-for='(item,index) in SHIP_STORE_INFO' :key='index'>
                            {{item.label}}：<span :title='item.value' style='display: inline-block;line-height: 12px;max-width: 150px;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;'>{{ item.value }}</span>
                          </p>
                        </div>
                      </Poptip>
                    </div>
                  </Col>
                  <Col span="6" v-if="isOfflineStoreFlag">
                    <div class="content_item">
                      <div class="contentName">
                        云仓派单日志：
                      </div>
                      <span style="color: #147ac1;cursor:pointer;" @click="showpdLog">
                        派单日志
                      </span>
                    </div>
                  </Col>
                </Row>
              </div>
              <div class="orderMoney">
                <div
                  class="contentName"
                  style="font-size: 14px; margin-bottom: 14px"
                >
                  订单金额
                </div>
                <div
                  style="
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                  "
                >
                  <div class="moneyItem_left">
                    <div>商品销售金额</div>
                    <div class="moneyMember">
                      {{ GOODSSALEAMOUNT }}
                    </div>
                  </div>
                  <div class="moneySymbol">
                    +
                  </div>
                  <div class="moneyItem_left">
                    <div>配送费</div>
                    <div class="moneyMember">
                      {{ SHIPPINGFEE }}
                    </div>
                  </div>
                  <div class="moneySymbol">
                    +
                  </div>
                  <div class="moneyItem_left">
                    <div>服务费</div>
                    <div class="moneyMember">
                      {{ SERVICEFEE }}
                    </div>
                  </div>
                  <!-- <div class="moneySymbol"> -->
                    <!-- + -->
                  <!-- </div> -->
                  
                  <div class="moneySymbol">
                    -
                  </div>
                  <div class="moneyItem_left">
                    <Tooltip :content="`余额抵扣运费金额: ${balanceDiscount}`" placement="top">
                      <div style='cursor:pointer;'>商家优惠金额</div>
                    </Tooltip>

                    <div class="moneyMember">
                      {{ DISCOUNTAMOUNT }}
                    </div>
                  </div>
                  <div class="moneySymbol">
                    =
                  </div>
                  <div
                    class="moneyItem_left"
                    style="padding-right: 21px; border-right: 1px solid #e1e1e1"
                  >
                    <div>成交金额</div>
                    <div class="moneyMember">
                      {{ ACTUALAMOUNT }}
                    </div>
                  </div>
                  <div
                    class="moneyItem_left"
                    style="padding-right: 21px"
                  >
                    <div>原单金额</div>
                    <!-- 已支付金额 -->
                    <div class="moneyMember">
                      {{ RECEIVEDAMOUNT }}
                    </div>
                  </div>
                  <div class="moneyItem_left">
                    <div>税费</div>
                    <div class="moneyMember">
                      {{ SUB_ORDER_TAX_FEE_ALL }}
                    </div>
                  </div>
                  <div class="moneyItem_left">
                    <div>代收COD贷款</div>
                    <div class="moneyMember">
                      {{ CODAMOUNT }}
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="orderTable">
            <div class="title">
              <div
                style="
                  font-size: 16px;
                  font-family: Helvetica;
                  font-weight: 400;
                  color: #000000;
                  line-height: 38px;
                "
              >
                订单明细
              </div>
              <Button data-key="TOOGLE_BTN" type="text" ghost class='toggleButtonType' @click='toggleButtonType'>{{TypeButtonText}}</Button>
            </div>
            <div class="content">
              <div class="content-button">
                <div class="actionBtn" v-show="showSaveBtn">
                    <Button
                      type="fcdefault"
                      size="large"
                      style="margin-right: 10px"
                      @click="addGift"
                      v-if="showAdd && showAddPower"
                    >
                      添加赠品
                    </Button>
                    <Button
                      type="fcdefault"
                      size="large"
                      style="margin-right: 10px"
                      @click="deleteBtn"
                      v-if="(detailShowType == 'classicStyle') && ((ORDERSTATUS==1||ORDERSTATUS==2 ||(ORDERSTATUS==4&&WMSCANCELSTATUS==1)) ||(ORDERSTATUS==4&&ISJOINTWMS==0))"
                    >
                      删除赠品
                    </Button>
                    
                    <Button
                      type="fcdefault"
                      size="large"
                      style="margin-right: 10px"
                      @click="addGoods"
                      v-if="((ORDERSTATUS==1||ORDERSTATUS==2||(ORDERSTATUS==4&&WMSCANCELSTATUS==1)||(ORDERSTATUS==4&&ISPRINTLOGISTIC==1)) && ORDERFROM === '手工新增' && ISNOTPAY != 0)"
                    >
                      添加商品
                    </Button>
                    <Button
                      type="fcdefault"
                      size="large"
                      style="margin-right: 10px"
                      @click="removeGood('tableCurrentData')"
                      v-if="(detailShowType == 'classicStyle') && ((ORDERSTATUS==1||ORDERSTATUS==2 ||(ORDERSTATUS==4&&WMSCANCELSTATUS==1) ||(ORDERSTATUS==4&&ISPRINTLOGISTIC==1)))  && ORDERFROM === '手工新增'"
                    >
                      删除商品
                    </Button>
                    <Button
                      type="fcdefault"
                      size="large"
                      style="margin-right: 10px"
                      @click="refundComplete"
                      v-if="(Number(ARAMOUNT)<0 || Number(ARAMOUNT)==0) && showReturnButton && ((detailShowType == 'classicStyle') && (ORDERSTATUS==1||ORDERSTATUS==2 ||(ORDERSTATUS==4&&WMSCANCELSTATUS==1)) ||(ORDERSTATUS==4&&ISJOINTWMS==0))"
                    >
                      退款完成
                    </Button>
                    <Button
                      type="fcdefault"
                      size="large"
                      style="margin-right: 10px"
                      @click="modifyGoods"
                      v-if="(detailShowType == 'classicStyle') && ((ORDERSTATUS==1||ORDERSTATUS==2 ||(ORDERSTATUS==4&&WMSCANCELSTATUS==1)) ||(ORDERSTATUS==4&&ISJOINTWMS==0)) && modifyGoodsPower"
                    >
                      修改商品
                    </Button>
                  </div>
                  <Checkbox v-model="showLackOnly" style="margin-left: 10px;" v-if="ORDERSTATUS==2 ">
                      只看缺货商品
                  </Checkbox>
              </div>
            
              <div v-if='detailShowType == "platformStyle"'>
                <div v-for="(item,index) in filteredTableData" :key="index">
                  <div v-if='index == 0 || ((index !== 0)&&(item.TID != filteredTableData[index-1].TID))' class='TIDBOX'>平台单号：{{item.TID}}</div>
                  <div class="detailItem"  :class="[item.REFUNDSTATUS==6?'bgColor':'']">
                    <div class="left" style="display:flex;">
                      <div class="item1" style="display:flex;align-items: center;">
                        <div class='imgBox' >
                          <img style="width:80px;height:80px" :src="item.PICPATH==''?'../../../static/img/camera.jpg':item.PICPATH" @mouseleave="picLeave(item,index)" @mouseenter="picEnter(item,index)">
                        </div>
                        <div style="width:400px;height:100%;">
                            <!-- 330px -->
                          <div style="display:flex;justify-content: space-between;align-items: center;">
                            <div style="flex:1;width:0;">
                              <Tooltip style="width:100%;" placement="top-start" max-width="200" transfer :content="item.TITLE">
                                <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;font-weight: 500;color: #000000;font-size: 14px;line-height: 18px;">
                                  {{item.TITLE}}
                                </div>
                              </Tooltip>
                            </div>
                          </div>
                          <div style="display:flex;justify-content: space-between;color:#666666;margin: 13px 0;align-items: center;">
                            <Tooltip placement="top" max-width="200" transfer :content="item.SKUNAME" :disabled="!item.SkuNameTip">
                              <div style="display:flex;color:#666666;">
                                系统名：
                                <div style="width:150px;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;">
                                  {{item.SKUNAME}}
                                </div>
                              </div>
                            </Tooltip>
                          </div>
                          <div style="display:flex;justify-content: space-between;height: 30%;align-items: center;">
                            <div class="logobox">
                              <!-- <div v-if="item.ISGIFT_text=='是'" class="box" style="border: 1px solid #63BA4E;color:#63BA4E">赠</div> -->
                              <div v-if="item.GIFT_TYPE=='系统赠品'" class="box" style="border: 1px solid #63BA4E;color:#63BA4E">系统赠品</div>
                              <div v-if="item.GIFT_TYPE=='平台赠品'" class="box" style="border: 1px solid #060;color:#060">平台赠品</div>
                              <div v-if="item.ISEMBARGO=='是'" class="box" style="border: 1px solid #D0021B;color:#D0021B">航空禁运</div>
                              <div v-if="item.ISLG=='是'" class="box" style="border: 1px solid #D0021B;color:#D0021B">催</div>
                              <div v-if="item.ORDER_LABEL==3" class="box" style="border: 1px solid #0000ff;color:#0000ff">换</div>
                              <div v-if="item.HASVIRTUAL=='是'" class="box" style="border: 1px solid var(--primary-color);color:var(--primary-color)">虚拟商品</div>
                              <div v-if="item.REFUNDSTATUS==1 || item.REFUNDSTATUS==2 || item.REFUNDSTATUS==3" class="box" style="border: 1px solid #D0021B;color:#D0021B">退款中</div>
                              <div v-if="item.ISAUTOREFUND=='是'&&item.REFUNDSTATUS!=6" class="box" style="border: 1px solid #D0021B;color:#D0021B">自动售后</div>
                              <div v-if="item.ISPRICEABNORMAL=='是'" class="box" style="border: 1px solid #D0021B;color:#D0021B">价格异常</div>
                              <div v-if="item.REFUNDSTATUS==6" class="box" style="border: 1px solid #C1C1C1;color:#C1C1C1">退款成功</div>
                              <div v-if="item.RESERVATION_TYPE==1" class="box" style="border: 1px solid #D0021B;color:#0000ff">1元预定</div>
                              <Tooltip placement="top" theme="light">
                                <div v-if="item.IS_LACK=='是'" class="box" style="border: 1px solid #ed1a14;color:#ed1a14">缺</div>
                                <div slot="content" style="color:#333">
                                    <p>缺货（实缺数）数量：<span style="color:#000000">{{item.LACK_NUM}}</span></p>
                                </div>
                              </Tooltip>
                              <Tooltip placement="top" theme="light">
                                <div v-if="item.GROUPTITLE" class="box" style="border: 1px solid var(--primary-color);color:var(--primary-color)">组合</div>
                                <div slot="content" style="color:#C1C1C1">
                                    <p>组合名称：<span style="color:#000000">{{item.GROUPTITLE}}</span></p>
                                    <p>组合SKU：<span style="color:#000000">{{item.GROUPNAME}}</span></p>
                                </div>
                              </Tooltip>
                              <Tooltip placement="top" theme="light">
                                <div v-if="item.HOSTNO" class="box" style="border: 1px solid var(--primary-color);color:var(--primary-color)">直播</div>
                                <div slot="content" style="color:#C1C1C1">
                                    <p>主播ID：<span style="color:#000000">{{item.HOSTNO}}</span></p>
                                    <p>主播名称：<span style="color:#000000">{{item.HOSTNAME}}</span></p>
                                </div>
                              </Tooltip>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="right" style="display:flex;width: 70%;justify-content: space-between;">
                      <div class="item1" style="display:flex;flex:1;align-items: center;">
                        <div class="numBox" style="height: 100%;margin-left: 24px;">
                          <!-- 数量：* -->
                          <div style='display: flex;align-items:center;justify-content: left;color: #999;'>商品数：<span style="font-weight:500;font-size:18px;color: #4C4C4C;">{{item.NUM}}</span></div>
                          <div class="spec" style='margin: 12px 0;'>
                            <Select v-model="item.SKU" :disabled="item.REFUNDSTATUS==6 || !modifyGoodsPower" style="width:200px" @on-open-change="getSpecList($event,item,index)" @on-change="changeSKUSPEC($event,item)">
                              <Option v-for="d in item.options" :value="d.value" :label="d.label" :key="d.value"><span>{{d.value}}:</span>{{ d.label }}</Option>
                            </Select>
                          </div>
                          <Poptip trigger="hover" placement="bottom" max-width="300" popper-class='popQtyfreeBox' transfer :disabled="item.QTYFREE==0?true:false">
                            <div style="display:flex;align-items: center;" @mouseenter="getWMSHOUSEqty(item,index)">
                              <!-- <Icon style ='margin:0 8px;' type="md-list" /> -->
                              <span style="display: inline-block;width: 50px;color: #999;">可用数：</span>
                              <div style="width:54px;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;color: #4c4c4c;">
                                {{item.QTYFREE}}
                              </div>
                            </div>
                            <div slot="content">
                                <p style='line-height: 20px;color: #fff;' v-for='(itemOne,indexOne) in item.SKUWMSHOUSENUM' :key='indexOne'>{{itemOne.storeName}}：{{itemOne.qtyfee}}</p>
                            </div>
                          </Poptip>
                          <div class="available-stock" style='margin: 12px 0;color: rgb(20, 122, 193);cursor: pointer;font-size: 12px;' @click="jumpToStock(item)">
                            <i class="iconfont ag-syman-hover iconbj_link" style="font-size: 12px;"></i><span>逻辑仓可用库存</span>
                          </div>
                        </div>
                      </div>
                      <div class="item1" style="display:flex;flex:1;align-items: center;">
                        <div class="numBox" style="height: 100%;margin-left: 24px;color:#999999;">
                          <div class="content_item">
                            <div class="contentName">
                              SKU：
                            </div>
                            <Tooltip placement="top" max-width="200" transfer :disabled="!item.SkuTip" :content="item.SKU">
                                <div class="contentMsg" style="font-weight:500;color: #4c4c4c;">
                                {{ item.SKU }}
                              </div>
                            </Tooltip>
                          </div>
                          <div class="content_item">
                            <div class="contentName">
                              商品编码：
                            </div>
                            <Tooltip placement="top" max-width="200" transfer :disabled="!item.PRODUCTCODETip" :content="item.PRODUCTCODE">
                                <div class="contentMsg" style='color: #4c4c4c;'>
                                  {{ item.PRODUCTCODE }}
                                </div>
                            </Tooltip>
                          </div>
                          <div class="content_item" v-if='item.GBCODE?true:false'>
                            <div class="contentName">
                              国标码：
                            </div>
                            <Tooltip placement="top" max-width="200" transfer :disabled="!item.GBCODETip" :content="item.GBCODE">
                              <div class="contentMsg" style="style='color: #4c4c4c;'">
                                {{ item.GBCODE }}
                              </div>
                            </Tooltip>

                          </div>
                        </div>
                      </div>
                      <div style="display:flex;flex:1;align-items: end;color: #999999;height: 100%;margin-right:30px;">
                        <div style="display:flex;flex-direction: column;height: 100%;justify-content: space-around;">
                          <div style="font-size:16px;color: #4c4c4c;font-weight:500;display: flex;align-items: center;padding-left: 12px;">
                              <Tooltip placement="bottom" transfer :disabled="item.PLATUNDERTAKEAMOUNT==0 && item.SUB_ORDER_TAX_FEE==0 && item.SUB_ORDER_TAX_FEE==''">
                                  <img src="../../assets/icon/Tips.png" style="height:14px;margin-top:2px;margin-right: 2px;" :class="[item.PLATUNDERTAKEAMOUNT==0 && item.SUB_ORDER_TAX_FEE==0 && item.SUB_ORDER_TAX_FEE=='' ?'isHide':'']">
                                  <div slot="content">
                                      <div v-if='item.PLATUNDERTAKEAMOUNT!=0'>买家支付：{{item.BUYERPAYAMOUNT}}</div>
                                      <div v-if='item.PLATUNDERTAKEAMOUNT!=0'  style="margin-top:8px">平台承担：{{item.PLATUNDERTAKEAMOUNT}}</div>
                                      <div :style="item.PLATUNDERTAKEAMOUNT!=0?'margin-top:8px':''">税费：{{item.SUB_ORDER_TAX_FEE}}</div>
                                  </div>
                              </Tooltip>
                              <span style='display: inline-block;text-align: right;color: #999999;font-size:12px;'>成交金额：</span>{{item.ACTUALAMOUNT}}
                          </div>
                          <div style="word-break:break-all;margin: 14px 8px 14px 0;display: flex;align-items: center;font-size:12px;font-weight:500;color:#4c4c4c;">
                            <Tooltip placement="bottom" transfer>
                                <img src="../../assets/icon/Tips.png" style="height:14px;margin-top:2px;margin-right: 2px;" >
                                <div slot="content">
                                    <div>系统标准价：{{item.SYSSTANDARDPRICE}}</div>
                                    <div v-if="SHOW_SYSTEM_SETTLEMENT_PRICE" style="margin-top:8px">系统结算价：{{item.SYSTEM_SETTLEMENT_PRICE}}</div>
                                    <div v-if="item.ORIGINAL_PRICE != 0" style="margin-top:8px">唯品会平台原价：{{item.ORIGINAL_PRICE}}</div>
                                  </div>
                            </Tooltip>
                            <span style='display: inline-block;color: #999999;text-align: right;'>平台销售价：</span>{{item.PLATSALEPRICE}}
                          </div>
                          <div style="word-break:break-all;word-break:break-all;display: flex;align-items: center;font-size:12px;font-weight:500;color:#4c4c4c;padding-left: 12px;">
                            <Tooltip placement="bottom" transfer :disabled="(item.GOODSDISCOUNTAMOUNT==0)&&(item.MANUALADJUSTAMOUNT==0)&&(item.SPLITDISCOUNTAMOUNT==0)&&(item.EXPAND_CARD_EXPAND_PRICE_USED==0)&&(item.PRICEINSURANCEAMOUNT==0)&&(item.BALANCEDEDUCTIONAMOUNT==0)">
                                <img src="../../assets/icon/Tips.png" style="height:14px;margin-top:2px;margin-right: 2px;" :class="[(item.GOODSDISCOUNTAMOUNT==0)&&(item.MANUALADJUSTAMOUNT==0)&&(item.EXPAND_CARD_EXPAND_PRICE_USED==0)&&(item.SPLITDISCOUNTAMOUNT==0)&&(item.PRICEINSURANCEAMOUNT==0)&&(item.BALANCEDEDUCTIONAMOUNT==0)?'isHide':'']">
                                <div slot="content">
                                  <div v-if="item.GOODSDISCOUNTAMOUNT!=0">商品优惠：{{item.GOODSDISCOUNTAMOUNT}}</div>
                                      <div v-if="item.MANUALADJUSTAMOUNT!=0" style="margin-top:8px">手工调整金额：{{item.MANUALADJUSTAMOUNT}}</div>
                                    <div v-if="item.SPLITDISCOUNTAMOUNT!=0" style="margin-top:8px">商家优惠平摊：{{item.SPLITDISCOUNTAMOUNT}}</div>
                                    <!-- 商家优惠平摊 -->
                                    <div v-if='item.EXPAND_CARD_EXPAND_PRICE_USED !=0' style="margin-top:8px">权益金：{{item.EXPAND_CARD_EXPAND_PRICE_USED}}</div>
                                    <div v-if='item.PRICEINSURANCEAMOUNT !=0' style="margin-top:8px">价保金额：{{item.PRICEINSURANCEAMOUNT}}</div>
                                    <div v-if='item.BALANCEDEDUCTIONAMOUNT !=0' style="margin-top:8px">余额抵扣金额：{{item.BALANCEDEDUCTIONAMOUNT}}</div>
                                </div>
                            </Tooltip>
                            <span style='display: inline-block;color: #999999;text-align: right;'>优惠金额：</span>{{item.DISCOUNTAMOUNT}} 
                            <!-- ￥ -->
                          </div>
                        </div>
                      </div>
                      <div :class="[item.REFUNDSTATUS==6?'isHide':'']" style="height: 100%;width:48px;margin-left:10px;color:#1D73FF; display: flex;flex-direction: column;" v-if="showSaveBtn">
                        <!-- || item.GIFT_TYPE == '平台赠品' -->
                        <div class="btn btn_modify" @click="deleteBtn(item)" v-if="(item.GIFT_TYPE == '系统赠品')&&((ORDERSTATUS==1||ORDERSTATUS==2 ||(ORDERSTATUS==4&&WMSCANCELSTATUS==1)) ||(ORDERSTATUS==4&&ISJOINTWMS==0))">删除赠品</div>
                        <div class="btn btn_modify" @click="refundComplete(item)" v-if="(Number(ARAMOUNT)<0 || Number(ARAMOUNT)==0) && showReturnButton && ((ORDERSTATUS==1||ORDERSTATUS==2 ||(ORDERSTATUS==4&&WMSCANCELSTATUS==1)) ||(ORDERSTATUS==4&&ISJOINTWMS==0))">退款完成</div>
                        <div class="btn btn_modify" @click="modifyGoods(item)" v-if="((ORDERSTATUS==1||ORDERSTATUS==2 ||(ORDERSTATUS==4&&WMSCANCELSTATUS==1)) ||(ORDERSTATUS==4&&ISJOINTWMS==0)) && modifyGoodsPower">修改商品</div>
                        <div class="btn btn_modify" @click="removeSku(item)" v-if="(item.GIFT_TYPE != '平台赠品')&&(ORDERSTATUS==1||ORDERSTATUS==2 ||(ORDERSTATUS==4&&WMSCANCELSTATUS==1) ||(ORDERSTATUS==4&&ISPRINTLOGISTIC==1))  && ORDERFROM === '手工新增'">删除商品</div>
                      </div>
                    </div>
                </div>
              </div>
              </div>
              <!-- 列表样式 -->
              <div data-key="LIST_STYLE" class='tableType' style="margin-top: 16px;" v-if='detailShowType == "classicStyle"'>
                <Table
                  :row-class-name="rowClassName"
                  ref="tableData"
                  height="450"
                  :columns="subTableColumn"
                  :data="filtereTableCurrentData"
                  size="small"
                  @on-select="selectData"
                  @on-select-cancel="selectCancel"
                  @on-select-all="selectDataAll"
                  @on-select-all-cancel="selectDataCancel"
                />
                <div class="pageContent">
                  <Page
                    size="small"
                    :current="currentPage"
                    show-elevator
                    :total="total"
                    show-total
                    show-sizer
                    @on-change="changePage"
                    @on-page-size-change="changeSize"
                  />
                </div>
              </div>
            </div>
          </div>
        </TabPane>
        <TabPane
          label="原订单优惠信息"
          name="name2"
        >
        <!-- 优惠信息 -->
          <tableFaker
            :table-head="offerInformationColumn"
            :searchcols="'OMSONLINEORDERID'"
            :table-name="'T_OMSONLINEPROMOTION'"
            :page-msg-id="pageMsgId"
          />
        </TabPane>
        <TabPane
          label="支付信息"
          name="name3"
        >
          <tableFaker
            :table-head="payInformationColumn"
            :searchcols="'OMSONLINEORDERID'"
            :table-name="'T_OMSONLINEPAYMENT'"
            :page-msg-id="pageMsgId"
          />
        </TabPane>
        <TabPane
          label="包裹信息"
          name="name4"
        >
          <div class="packageMsgBox">
            <div class="orderTableOne">
              <Table
                :height="tableHeightOne"
                :columns="packageGoodsColumns"
                :data="packageGoodsData"
                highlight-row
                :index='defaultIndex'
                class="getReturnTable"
                @on-row-click='saveClickPackage'
              />
              <div class="pageContent">
                  <Page
                    size="small"
                    :current="currentPackagePage"
                    show-elevator
                    :total="totalPackage"
                    show-total
                    show-sizer
                    @on-change="changePagePackage"
                    @on-page-size-change="changeSizePackage"
                  />
              </div>
            </div>
            <div class="orderTableOne">
              <Table
                :height="tableHeightOne"
                :columns="batchOrQrcodeColumns"
                :data="batchOrQrcodeData"
                class="getReturnTable"
              />
              <div class="pageContent">
                  <Page
                    size="small"
                    :current="currentBatchOrQrcodePage"
                    show-elevator
                    :total="totalBatchOrQrcode"
                    show-total
                    show-sizer
                    @on-change="changePageBatchOrQrcode"
                    @on-page-size-change="changeSizeBatchOrQrcode"
                  />
              </div>
            </div>
          </div>
        </TabPane>
        <TabPane
          label="逻辑仓发货明细"
          name="name5"
        >
          <tableFaker
            :table-head="storesendColumn"
            :searchcols="'OMSONLINEORDERID'"
            :table-name="'V_OTB_ONLINESTORESEND'"
            :page-msg-id="pageMsgId"
          />
        </TabPane>
        <TabPane
          label="仓内操作轨迹"
          name="name6"
        >
          <tableFaker
            :table-head="OperationColumn"
            :searchcols="'OMSORDERID'"
            :table-name="'T_WMSLOGISTICSTRACK'"
            :page-msg-id="pageMsgId"
          />
        </TabPane>
        <TabPane
          label="订单附件信息"
          name="name8"
        >
          <!-- <tableFaker
            ref="attachmentOrder"
            :table-head="attachmentColumn"
            :searchcols="''"
            :table-name="'T_FILETYPE'"
            :page-msg-id="pageMsgId"
          /> -->
          <AttachmentInfo :disabled="!showSaveBtn" :orderStatus="ORDERSTATUS" :TID="TID"></AttachmentInfo>
        </TabPane>
        <TabPane
          label="操作日志"
          name="name7"
        >
          <tableFaker
            ref="getOperationLog"
            :table-head="logInformationColumn"
            :searchcols="'OMSONLINEORDERID'"
            :table-name="'T_OMSORDERLOGS'"
            :page-msg-id="pageMsgId"
          />
        </TabPane>

      </Tabs>
      <div
        class="processBtn"
        @click="auditorder"
        v-if="ORDERSTATUS==1 && showAudioPower"
      >
        <!-- <img
          src="../../assets/orderEditorImg/return_.png"
          style="width: 20px; height: 20px; margin-right: 4px"
        > -->
        <Icon type="md-checkmark-circle-outline" style="color： #fff;font-size: 22px; margin-right: 4px" />
        <div>审核</div>
      </div>
      <div
        class="returnBtn"
        @click="return1"
      >
        <img
          src="../../assets/orderEditorImg/return_.png"
          style="width: 20px; height: 20px; margin-right: 4px"
        >
        <div>返回</div>
      </div>
    </div>
    <div v-if="!isTop" style="position:fixed;bottom:6px;right:16px;z-index:100;" @click="toTop">
      <img src="../../assets/icon/totop.png" style="width:40px">
    </div>
    <div style="height:30px" v-if="isScroll">
        <Spin
          v-if="spinShow"
        >
          <Icon
            type="ios-loading"
            size="18"
            style="animation: ani-demo-spin 1s linear infinite"
          />
          <div>加载中...</div>
        </Spin>
    </div>

    <!-- 修改其他信息 -->
    <Modal
      v-model="showOtherModal"
      :title="`修改${currentEditOtherInfo && currentEditOtherInfo.title}`"
      :mask="mask"
      :closable="closable"
      :mask-closable="maskClosable"
      :footer-hide="hideFoot"
      width="900"
    >
      <Form
        class="form"
        :label-width="100"
        label-position="right"
        style="margin-top: 20px"
        v-if="currentEditOtherInfo"
      >
        <FormItem :label="`${currentEditOtherInfo && currentEditOtherInfo.title}:`" v-if="!currentEditOtherInfo.componentType || currentEditOtherInfo.componentType === 'input'">
          <Input
            v-model="otherInfoValue"
            class="text2"
            type="textarea"
            :regx="currentEditOtherInfo && currentEditOtherInfo.field === 'RESERVE_BIGINT01'? /^[0-9]+$/ : undefined"
          ></Input>
        </FormItem>
        <FormItem :label="`${currentEditOtherInfo && currentEditOtherInfo.title}:`" v-if="currentEditOtherInfo.componentType === 'date'">
          <DatePicker
            v-model="otherInfoValue"
            :type="currentEditOtherInfo.type"
            format="yyyy-MM-dd"
            :options="currentEditOtherInfo.options"
            :vModelFormat='true'
            ></DatePicker>
          <!-- <Input
            v-model="otherInfoValue"
            class="text2"
            type="textarea"
            :regx="currentEditOtherInfo && currentEditOtherInfo.field === 'RESERVE_BIGINT01'? /^[0-9]+$/ : undefined"
          ></Input> -->
        </FormItem>
      </Form>
      <footer style="display: flex; justify-content: flex-end">
        <Button
          type="fcdefault"
          style="width: 80px; height: 34px; font-size: 14px"
          @click="closeOtherDialog"
        >
          取消
        </Button>
        <Button
          type="fcdefault"
          style="width: 80px; height: 34px; font-size: 14px; margin-left: 8px"
          @click="saveOtherInfo(currentEditOtherInfo)"
        >
          保存
        </Button>
      </footer>
    </Modal>

    <!-- 修改所有其他信息 -->
    <Modal
      v-model="showOtherAllModal"
      class='showOtherAllModal'
      title="修改其他信息"
      :mask="mask"
      :closable="closable"
      :mask-closable="maskClosable"
      :footer-hide="hideFoot"
      @on-cancel='closeOtherAllDialog'
      width="900"
    >
      <Form
        class="form"
        :label-width="120"
        label-position="right"
        style="margin-top: 20px"
      >
        <FormItem v-for="info in otherInfos" :key="info.title"  :label="`${info && info.title}`">
          <Input
            v-if="!info.componentType || info.componentType === 'input'"
            v-model="info.value"
            class="text2"
            type="textarea"
            :regx="info && info.field === 'RESERVE_BIGINT01'? /^[0-9]+$/ : undefined"
          ></Input>
          <DatePicker
            v-if="info.componentType === 'date'"
            v-model="info.value"
            :type="info.type"
            :disabled="info.disabled ? true :false"
            format="yyyy-MM-dd"
            :options="info.options"
            :vModelFormat='true'
            ></DatePicker>
        </FormItem>
      </Form>
      <footer style="display: flex; justify-content: flex-end">
        <Button
          type="fcdefault"
          style="width: 80px; height: 34px; font-size: 14px"
          @click="closeOtherAllDialog"
        >
          取消
        </Button>
        <Button
          type="fcdefault"
          style="width: 80px; height: 34px; font-size: 14px; margin-left: 8px"
          @click="saveOtherAllInfo()"
        >
          保存
        </Button>
      </footer>
    </Modal>
    <!-- 云仓派单日志 showpdLogShow -->
    <Modal
      v-model="showpdLogShow"
      title="云仓派单日志"
      titleAlign='center'
      :mask="mask"
      :closable="closable"
      :mask-closable="maskClosable"
      :footer-hide="hideFoot"
      width="850"
    >
      <Table
        height="300"
        :columns="pdlogcolumns"
        :data="pdlogtableData"
      />
    </Modal>


    <!-- 添加商品弹框 -->
    <AddGoodSkuModal v-model="showAddGood" :objId="pageMsgId" :ORDERSHOPID="ORDERSHOPID" :orderStatus="ORDERSTATUS" @on-confirm="onConfirmAdd"></AddGoodSkuModal>
    <!-- 添加图片预览 -->
    <arkPreviewPicture
        :images="picPackageImagePreviewPicture"
        :show="PreviewPictureShow"
        :defaultIndex="defaultImageIndex"
        :modal-props="ModalProps"
        @on-cancel="()=>{
          this.PreviewPictureShow = false;
        }"
      />
  </div>
</template>
<script>
// import R3 from "@syman/burgeon-r3";
  // import R3 from '../../../static/r3/r3.publish/r3.min';
  import cloneDeep from 'lodash/cloneDeep'
  const R3 = window.R3;
  // import smart from "address-smart-parse";
  // address-parse
  import AddressParse from '../../../static/@address-parse/dist/parse/index';

  import tableFaker from '../customizedContent/tableFaker.vue';
  import AddGoodSkuModal from '@yunque/component/modal/addGoodSku/index.vue';
  import AttachmentInfo from '@yunque/component/customizedPage/orderManagementEditor/attachmentInfo.vue'
  import dayjs from 'dayjs';
  import { BodyGuard } from '@open-fxg/bodyguard-vue2'

// 静态数据
  import { orderSigns } from "./form-db/orderManagementEditorData";

  // eslint-disable-next-line no-unused-vars
  const { network, urlSearchParams, store } = R3;
  export default {
    components: {
      tableFaker,
      AddGoodSkuModal,
      AttachmentInfo,
      BodyGuard
    },
    props: {
      type: { // 活动明细
          type: String,
          default: ''
      },
      OrderIdFromList: { // 活动明细id
          type: String,
          default: ''
      },
    },
    data() {
      const CrdtNoValidar=(rule,value,callback)=>{
               if(value && this.formValidate.customs_clearance_type == '1'){
                  if(value=="无"){
                    callback();
                      return
                    }
                    let reg18=/^[1-9]\d{5}(19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[\dXx]$/;
                    let reg15=/^[1-9]\d{7}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$/;
                    if(reg18.test(value)||reg15.test(value)){
                      callback()
                    }else{
                      callback(new Error("请输入有效的身份证号码！"))
                    }
               }else{
                callback()
               }
         };
      const validateProvince = (rule, value, callback) => {
        if (value === '') {
          callback(new Error('收件人省不能为空'));
        } else {
          callback();
        }
      };
      const validateCity = (rule, value, callback) => {
        if (value === '') {
          callback(new Error('收件人市不能为空'));
        } else {
          callback();
        }
      };
      // 收货人地址校验：不能为纯数字
      const validateReceiveAddress = (rule, value, callback) => {
        const rAddress = this.formValidate.detailAddress;
        if (!rAddress) {
          return callback(new Error('收货人地址不能为空!'));
        }
        // console.log(/^(?=.*?[\u4E00-\u9FA5])[\d\u4E00-\u9FA5]{1,}/.test(rAddress))
        // if (/^(?=.*?[\u4E00-\u9FA5])[\d\u4E00-\u9FA5]{1,}/.test(rAddress)) {
        //   return callback();
        // }
        return callback();
        // return callback(new Error('收货人地址格式不正确!'));
      };
      return {
        clearancetypeList: [
          {
            label: '身份证',
            value: '1'
          },
          {
            label: '军官证',
            value: '2'
          },
          {
            label: '护照',
            value: '3'
          },
          {
            label: '其他',
            value: '4'
          },
        ],
        ISNOTPAY:1, // 是否添加商品
        IS_OVERSEAS: false,
        ARAMOUNT: '', //是否展示未标识
        isOfflineStoreFlag: false, // 是否展示云仓信息
        sceneparam: {"toRole":"buyer","bizRef": ""},
        regx: /^(([1-9][0-9]{0,4})|0|100000)$/, // 正整数0-100000
        regx1: /^\d{0,15}(\.[0-9]{0,4})?$/, // 四位小数的正数
        detailShowType: 'platformStyle',
        TypeButtonText: '列表样式',
        spinShow:false,//加载中
        showAdd:false,//显示添加赠品按钮
        showAddPower: false,//根据用户权限显示添加赠品按钮
        modifyGoodsPower: false,//根据用户权限显示修改商品按钮
        showAudioPower: false, //根据用户权限显示审核按钮
        isScroll:true,//是否滚动到底请求数据
        canLoad:true,//可以加载
        isTop:true,//滚动条是否在顶部
        canModify:false,//是否可以修改地址
        smartProvince: '', // 智能识别省
        smartCity: '', // 智能识别市
        smartArea: '', // 智能识别区
        stopClickLogin: false, // 防抖
        PAYTIME: '', // 平台付款时间
        PAYTIME1: '', // 平台付款时间1
        CREATIONDATE: '', // 进入云雀时间
        CREATIONDATE1: '', // 进入云雀时间1
        AUDITTIME: '', // 订单审核时间
        AUDITTIME1: '', // 订单审核时间1
        NOTICETIME: '', // 推送仓库时间
        NOTICETIME1: '', // 推送仓库时间1
        SCANTIME: '', // 仓库出货时间
        SCANTIME1: '', // 仓库出货时间1
        PLATNOTICETIME: '', // 平台发货时间,
        PLATNOTICETIME1: '', // 平台发货时间1,
        // BILLCHECKTIME: '', // 账单核对时间
        // BILLCHECKTIME1: '', // 账单核对时间1
        ORDERTYPE: '', // 单据类型
        BUYERMESSAGE: '', // 买家备注
        SYSREMARK: '', // 系统备注
        OMSID: '', // 订单编号
        PLATFORM: '', // 平台
        PLATFORMText: '', // 平台
        ORDERSHOPNAME: '', // 下单店铺
        ORDERSHOPID: '', // 下单店铺id
        SOURCECODE: '', // 系统单号
        TID: '', // 平台单号
        DISPUTE_ID: '', // 平台换货单号
        ORDERDATE: '', // 下单时间
        PLATFORMVIPCODE: '', // 平台会员卡号
        IESWAREHOUSEIDTEXT: '', // 发货仓库名称
        IESWAREHOUSEID: '', // 发货仓库ID
        ORDERSTORENAME: '',// 下单门店名称
        PLATFORMSENDNAME: '', // 发货门店名称
        LOGISTICSTYPE: '', // 配送方式
        SHIP_STORE_INFO: [], //云仓回传展示字段
        ISJOINTWMS:'',//配货中状态 未对接
        PAYTYPE: '', // 支付方式
        SHIPPERID: '', // 物流公司
        LOGISTICSNUMBER: '', // 物流单号
        EXPRESSQUERYADDRESS:'',//物流公司
        WEIGHT: '', // 预估包裹重量
        REAL_WEIGHT: '', //实际包裹重量
        GOODSSALEAMOUNT: '', // 商品金额
        SHIPPINGFEE: "", //配送费用
        SERVICEFEE: '', // 服务费
        SUB_ORDER_TAX_FEE_ALL: '', // 税费
        ADJUSTAMOUNT: '', // 调整金额
        ORDERDISCOUNTAMOUNT: '', // 订单优惠金额
        DISCOUNTAMOUNT: '', // 商品优惠金额s
        ACTUALAMOUNT: '', // 订单应收
        RECEIVEDAMOUNT: '', // 已支付金额
        CODAMOUNT: '', // 代收COD货款
        ORDERSTATUS: '', // 订单状态图片
        ISPRINTLOGISTIC: '', // 是否云雀出库
        ORDERFROM: '',
        WMSCANCELSTATUS: '', // 是否撤回
        orderStatusImg: '', // 订单状态图片地址
        pageMsgId: '', // 进入id
        sureDelate:false,//确认删除赠品框
        jumpNewOrder:false,//跳转新单提示框
        balanceDiscount: '',
        showCancel:false,
        // 规格下拉框更改时
        modal1: false,
        // 修改商品弹窗
        showModifyGoodsModal: false,
        // 添加赠品弹窗
        showAddGiftModal: false,
        // 显示小图标权限
        showIcon: 3,
        // 修改内部备注
        showinterModal: false,
        // 修改WMS备注
        showwmsModal: false,
        // 修改卖家备注
        showSellerModal: false,
        // 修改地址弹窗属性
        showBuyerModal: false, // 修改地址弹窗
        visible: false, // 控制替换商品下拉框
        mask: true,
        closable: true,
        maskClosable: false,
        hideFoot: true,
        inline: true, // 行内表单模式
        provinceList: [],
        cityList: [],
        areaList: [],
        formValidate: {
          name: '',
          mobile: '',
          phone: '',
          province: '',
          city: '',
          area: '',
          town: '',
          provinceId: '',
          cityId: '',
          areaId: '',
          detailAddress: '',
          postCode: '',
          desc: '',
          buyNickname: '',
          buyopenid: '',
          countryName: '',
          customs_clearance_type: '1',
          customs_clearance_info: '',
        },
        dataSceneparam: {
          "toRole":"buyer",
          "bizRef": ""
        },
        canSee: true, // 查看敏感信息权限
        hideAll: true, // 隐藏敏感信息
        // 内部备注
        interDesc: '',
        // WMS备注
        wmsDesc: '',
        // 修改卖家备注
        formValidate1: {
          SELLERMEMO: '',
          ORDERFLAG: '', // 卖家备注旗帜
        },
        formValidate3: {
          SKU: '',
          NUM: '',
        },
        formValidate4: {
          SKU: '',
          NUM: '',
          ACTUALAMOUNT: '',
        },
        modifyGoodsArr: [], // sku联想数据
        SKUData: [], // 表格数据
        ruleValidate: {
          name: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
          // mobile: [
          //   { required: true, message: '手机号不能为空', trigger: 'blur' },
          // ],
          // phone: [
          //   { required: false, message: '手机号不能为空', trigger: 'blur' },
          // ],
          province: [{ required: true, validator: validateProvince, trigger: 'change' }],
          city: [{ required: true, validator: validateCity, trigger: 'change' }],
          customs_clearance_info:[{required:true,message:'请输入证件号码',trigger:'blur'}],
          detailAddress: [{
            validator: validateReceiveAddress,
            required: true,
            trigger: 'blur'
          }],
        },
        picPackageImagePreviewPicture: [], // 预览数组
        PreviewPictureShow: false,
        ModalProps: {  //图片预览
          width: 800,
          height: 600,
          'footer-hide': true,
          mask: true
        },
        defaultImageIndex:0, // 图片预览位置
        subTableColumn: [   // 列表样式
          {
            type: 'selection',
            width: 60,
            align: 'right',
          },
          {
            title: '序号',
            align: 'left',
            render: (h, params) => h('span', params.index + 1 + ((this.currentPage - 1) * this.pageSize))
          },
          {
            title: '平台单号',
            key: 'TID',
            align: 'center',
          },
          {
            title: '平台商品名称',
            key: 'TITLE',
            align: 'center',
          },
          {
            title: '系统商品名称',
            key: 'SKUNAME',
            align: 'center',
          },
          // {
          //   title:'商品图片',
          //    key: 'PICPATH',
          //     render: (h, params) => {
          //       return h(
          //         'div',
          //         {
          //           class:{
          //             imgBox:true
          //           },
          //           style: {
          //             zIndex: 999,
          //             width:'60px',
          //             height:'60px',
          //             position:'relative'
          //           },

          //         },
          //         [
          //           h('Img',
          //           {
          //              style: {
          //                 width:'60px',
          //                 height:'60px'
          //               },
          //             attrs: {
          //               src:params.row.PICPATH==''?'../../../static/img/camera.jpg':params.row.PICPATH,
          //             },
          //             on:{
          //               'mouseenter':(e)=>{
          //                 var txt3=document.createElement("img");
          //                 txt3.id='enlargeImg'
          //                 txt3.src=params.row.PICPATH==''?'../../../static/img/camera.jpg':params.row.PICPATH
          //                 txt3.style.height='120px'
          //                 txt3.style.width='120px'
          //                 txt3.style.position='fixed'
          //                 if(this.currentValue){
          //                   txt3.style.top=($(".imgBox")[params.index].offsetParent.offsetHeight + $(".imgBox")[params.index].offsetTop - $(".imgBox")[params.index].offsetParent.scrollTop + 30)-100+'px';
          //                 }else{
          //                   txt3.style.top=($(".imgBox")[params.index].offsetParent.offsetHeight + $(".imgBox")[params.index].offsetTop - $(".imgBox")[params.index].offsetParent.scrollTop + 30)+'px';
          //                 }
          //                 txt3.style.left=($(".imgBox")[0].offsetLeft-$(".imgBox")[params.index].offsetParent.scrollLeft + 60 + 30)+'px'
          //                 $(".imgBox")[params.index].append(txt3)
          //               },
          //               'mouseleave':(e)=>{
          //                 $("#enlargeImg").remove();
          //               }
          //             }
          //           },
          //           )
          //         ]

          //       )
          //     }
          // },
          {
            title: '商品编码',
            key: 'PRODUCTCODE',
            align: 'center',
          },
          {
            title: 'SKU',
            key: 'SKU',
            align: 'center',
          },
          {
            title: '规格',
            key: 'SKUSPEC',
            align: 'center',
            render: (h, params) => {
              const vm = this;
              return h(
                'Select',
                {
                  style: {
                    zIndex: 999,
                  },
                  props: {
                    transfer: true,
                    value: params.row.SKU, // 获取选择的下拉框的
                    disabled: params.row.REFUNDSTATUS==6
                  },
                  on: {
                    'on-open-change': (e) => {
                      if (e) {
                        let virtual = {
                          table: 'V_IES_IESSKU_STOCK',
                          isdroplistsearch: true,
                          range: 1000,
                          startindex: 0,
                          fixedcolumns: {
                            productcode: [
                              `=${vm.tableData[params.index].PRODUCTCODE}`,
                            ],
                          },
                        };
                        network.post('/p/cs/list/query', virtual).then((res) => {
                          let a = [];
                          res.data.rows.map((item) => {
                            a.push({
                              label:
                                `${item.NORMS2NAME.val || ''}`
                                + `(${item.NORMS2CODE.val || ''}),`
                                + `${item.NORMS1NAME.val || ''}`
                                + `(${item.NORMS1CODE.val || ''})`,
                              value: `${item.SKU.val}`,
                              SKU: `${item.SKU.val}`
                            });
                          });
                          this.$set(params.row, 'options', a);
                          this.$refs.tableData.$forceUpdate();
                          console.log(params.index)
                          this.specIndex = params.index;
                          this.SKUMiddle = params.row.SKU;
                        });
                      }
                    },
                    'on-change': (e) => {
                      let data;
                      vm.specMiddle = vm.tableData[params.index].SKUSPEC;
                      vm.specIndex = params.index;
                      if (e) {
                        // 有选中过
                        data = params.row.options.find((item) => item.value == e);
                        vm.SKUAfter = data.SKU;
                        this.modal1 = true;

                        // let virtual = {
                        //       table: 'T_IESWAREHOUSE',
                        //       objid: this.IESWAREHOUSEID,
                        //     };
                        // network.post('/p/cs/object/query', virtual).then((res) => {
                        //      let ISJOINTWMS=res.data.ISJOINTWMS //WMS未对接
                        //     if(this.ORDERSTATUS==1||this.ORDERSTATUS==2 ||(this.ORDERSTATUS==4&&this.WMSCANCELSTATUS==1) ||(this.ORDERSTATUS==4&&ISJOINTWMS==0)){
                        //       if(params.row.ISGIFT_text=='是'){
                        //         this.$Modal.fcWarning({
                        //             title: '提示',
                        //             content: '赠品商品不支持修改，如需修改请删除赠品后重新添加赠品。',
                        //             mask:true,
                        //         });
                        //       }else{
                                //   // 有选中过
                                // data = params.row.options.find((item) => item.value == e);
                                // vm.SKUAfter = data.SKU;
                                // this.modal1 = true;
                        //       }
                        //     }else{
                        //         // 有选中过
                        //       data = params.row.options.find((item) => item.value == e);
                        //       vm.SKUAfter = data.SKU;
                        //       this.modal1 = true;
                        //     }
                        // })
                      } else {
                        // 第一次下拉改变
                        vm.SKUAfter = params.row.SKU;
                      // vm.okSKUSPEC()
                      }
                    },
                  },
                },
                params.row.options.map((item) => h(
                  'Option',
                  {
                    props: {
                      label: item.label,
                      value: item.value, // 绑定的值
                    },
                  },
                  // item.label
                  item.value+':'+item.label
                ))
              );
            },
          },
          {
            title: '国标码',
            key: 'GBCODE',
            align: 'center',
          },
          {
            title: '组合商品条码',
            key: 'GROUPNAME',
            align: 'center',
            },
          {
            title: '平台销售价',
            key: 'PLATSALEPRICE',
            align: 'center',
            },
          {
            title: '唯品会平台原价',
            key: 'ORIGINAL_PRICE',
            align: 'center',
            },
          {
            title: '唯品会平台优惠活动价',
            key: 'SUM_FAV_PRICE',
            align: 'center',
            },
          {
            title: '系统标准价',
            key: 'SYSSTANDARDPRICE',
            align: 'center',
            },
          {
            title: '数量',
            key: 'NUM',
            align: 'center',
          },
          {
            title: '可用数',
            key: 'QTYFREE',
            align: 'center',
          },
          // {
          //   title: '可用数',
          //   key: 'QTYFREE',
          //   align: 'center',
          //   render: (h, params) => {
          //       return h(
          //         'div',
          //         {
          //           style: {
          //             display:'flex',
          //             width:'100%',
          //             justifyContent: 'center'
          //           },
          //         },
          //         [
          //           h('Tooltip',
          //           {
          //             attrs: {
          //               placement:"bottom",
          //               transfer:true
          //             },
          //           },
          //           [h(
          //             'Img',
          //             {
          //               style: {
          //                 height:'8px',
          //                 marginRight:'8px',
          //                 display:(params.row.GOODSDISCOUNTAMOUNT==0)&&(params.row.MANUALADJUSTAMOUNT==0)&&(params.row.SPLITDISCOUNTAMOUNT==0)?'none':'block'
          //               },
          //               attrs: {
          //                 src:'../../../static/img/bianzu.png'
          //               },
          //               on:{
          //                 'mouseenter':(e)=>{
          //                   params.row.TipList = '';
          //                   this.getWMSHOUSEqty(params.row,params.index);
          //                   params.row.SKUWMSHOUSENUM.forEach(item => {
          //                     let tipsList = '<p>'+item.storeName+':'+item.qtyfee+'</p>'
          //                     params.row.TipList += tipsList;
          //                   })
          //                 },
          //               }
          //             }
          //           ),
          //           h(
          //             'div',
          //             {
          //                 slot:"content"
          //             },
          //             [
          //               h(
          //                 'div',
          //                 {
          //                   style: {
          //                     display:params.row.QTYFREE==0?'none':'block'
          //                   }
          //                 },
          //                 ['商品优惠：',params.row.QTYFREE]
          //               ),
          //             ]
          //             ),
          //           ]
          //           ),
          //         h(
          //           'div',
          //           [params.row.QTYFREE]
          //           )
          //         ],
          //       )
          //   }
          // },
          {
            title: '是否缺货',
            key: 'IS_LACK',
            align: 'center',
          },
          {
            title: '缺货数量',
            key: 'LACK_NUM',
            align: 'center',
          },
          {
            title: '优惠金额',
            key: 'DISCOUNTAMOUNT',
            align: 'center',
          },
          {
            title: '商品优惠',
            key: 'GOODSDISCOUNTAMOUNT',
            align: 'center',
          },
          {
            title: '手工调整金额',
            key: 'MANUALADJUSTAMOUNT',
            align: 'center',
          },
          {
            title: '商家优惠平摊',
            key: 'SPLITDISCOUNTAMOUNT',
            align: 'center',
          },
          {
            title: '权益金',
            key: 'EXPAND_CARD_EXPAND_PRICE_USED',
            align: 'center',
          },
          // {
          //   title: '优惠金额',
          //   key: 'DISCOUNTAMOUNT',
          //   align: 'center',
          //   width:100,
          //   render: (h, params) => {
          //       return h(
          //         'div',
          //         {
          //           style: {
          //             display:'flex',
          //             width:'100%',
          //             justifyContent: 'center'
          //           },
          //         },
          //         [
          //           h('Tooltip',
          //           {
          //             attrs: {
          //               placement:"bottom",
          //               transfer:true
          //             },
          //           },
          //           [h(
          //             'Img',
          //             {
          //               style: {
          //                 height:'8px',
          //                 marginRight:'8px',
          //                 display:(params.row.GOODSDISCOUNTAMOUNT==0)&&(params.row.MANUALADJUSTAMOUNT==0)&&(params.row.SPLITDISCOUNTAMOUNT==0)?'none':'block'
          //               },
          //               attrs: {
          //                 src:'../../../static/img/bianzu.png'
          //               }
          //             }
          //             ),
          //           h(
          //             'div',
          //             {
          //                 slot:"content"
          //             },
          //             [
          //               h(
          //                 'div',
          //                 {
          //                   style: {
          //                     display:params.row.GOODSDISCOUNTAMOUNT==0?'none':'block'
          //                   }
          //                 },
          //                 ['商品优惠：',params.row.GOODSDISCOUNTAMOUNT]
          //               ),
          //               h(
          //                 'div',
          //                 {
          //                   style:{
          //                     marginTop:'8px',
          //                     display:params.row.MANUALADJUSTAMOUNT==0?'none':'block'
          //                   }
          //                 },
          //                 ['手工调整金额：',params.row.MANUALADJUSTAMOUNT]
          //               ),
          //               h(
          //                 'div',
          //                 {
          //                   style:{
          //                     marginTop:'8px',
          //                     display:params.row.SPLITDISCOUNTAMOUNT==0?'none':'block'
          //                   }
          //                 },
          //                 ['商家优惠平摊：',params.row.SPLITDISCOUNTAMOUNT]
          //               ),
          //               h(
          //                 'div',
          //                 {
          //                   style:{
          //                     marginTop:'8px',
          //                     display:params.row.EXPAND_CARD_EXPAND_PRICE_USED==0?'none':'block'
          //                   }
          //                 },
          //                 ['权益金：',params.row.EXPAND_CARD_EXPAND_PRICE_USED]
          //               ),
          //             ]
          //             ),
          //           ]
          //           ),
          //         h(
          //           'div',
          //           [params.row.DISCOUNTAMOUNT]
          //           )
          //         ]

          //       )
          //   }
          // },
          {
            title: '成交金额',
            key: 'ACTUALAMOUNT',
            align: 'center',
          },
          {
            title: '税费',
            key: 'SUB_ORDER_TAX_FEE',
            align: 'center',
          },
          {
            title: '未税金额',
            key: 'UN_TAX_FEE',
            align: 'center',
            renderHeader: this.tooltipRenderHeader('成交金额-税费'),
          },
          {
            title: '买家支付',
            key: 'BUYERPAYAMOUNT',
            align: 'center',
          },
          {
            title: '平台承担',
            key: 'PLATUNDERTAKEAMOUNT',
            align: 'center',
          },
          // {
          //   title: '成交金额',
          //   key: 'ACTUALAMOUNT',
          //   align: 'center',
          //   width:100,
          //   render: (h, params) => {
          //       return h(
          //         'div',
          //         {
          //           style: {
          //             display:'flex',
          //             width:'100%',
          //             justifyContent: 'center'
          //           },
          //         },
          //         [
          //           h('Tooltip',
          //           {
          //             attrs: {
          //               placement:"bottom",
          //               transfer:true
          //             },
          //           },
          //           [h(
          //             'Img',
          //             {
          //               style: {
          //                 height:'8px',
          //                 marginRight:'8px',
          //                 display:params.row.PLATUNDERTAKEAMOUNT==0?'none':'block' //平台承担
          //               },
          //               attrs: {
          //                 src:'../../../static/img/bianzu.png'
          //               }
          //             }
          //             ),
          //           h(
          //             'div',
          //             {
          //                 slot:"content"
          //             },
          //             [
          //               h(
          //                 'div',
          //                 ['买家支付：',params.row.BUYERPAYAMOUNT]
          //               ),
          //               h(
          //                 'div',
          //                 {
          //                   style:{
          //                     marginTop:'8px'
          //                   }
          //                 },
          //                 ['平台承担：',params.row.PLATUNDERTAKEAMOUNT]
          //               ),
          //               h(
          //                 'div',
          //                 {
          //                   style:{
          //                     marginTop:'8px'
          //                   }
          //                 },
          //                 ['税费：',params.row.SUB_ORDER_TAX_FEE]
          //               ),
          //             ]
          //             ),
          //           ]
          //           ),
          //         h(
          //           'div',
          //           [params.row.ACTUALAMOUNT]
          //           )
          //         ]
          //       )
          //     }
          // },
          {
            title: '成交单价',
            key: 'ACTUALPRICE',
            align: 'center'
          },
          {
            title: '计划发货时间',
            key: 'PRESALEPLANDELIVERYDATE',
            align: 'center'
          },
          // {
          //   title: '调整金额',
          //   key: 'ADJUSTAMOUNT',
          //   align: 'center',
          // },
          // {
          //   title: '成交金额',
          //   key: 'PRICE',
          //   align: 'center',
          // },
          // {
          //   title: '总实际成交金额',
          //   key: 'TRUEPRICE',
          //   align: 'center',
          // },
          // {
          //   title: '平摊金额',
          //   key: 'AVERAGEDISCOUNT',
          //   align: 'center',
          // },
          {
            title: '退款状态',
            key: 'REFUNDSTATUS_text',
            align: 'center',
            render: (h, params) => {
                return h(
                  'div',
                  {
                    style: {
                    //  color:params.row.REFUNDSTATUS_text=='退款成功'?'#999999':'#575757',
                    //  fontStyle:params.row.REFUNDSTATUS_text=='退款成功'?'italic':'normal'
                    },
                  },
                  [params.row.REFUNDSTATUS_text]
                )}
          },
          // {
          //   title: '自动售后状态',
          //   key: 'ISAUTOREFUND',
          //   align: 'center',
          // },
          {
            title: '是否赠品',
            key: 'ISGIFT_text',
            align: 'center',
          },
          {
            title: '赠品类型',
            key: 'GIFT_TYPE',
            align: 'center',
          },
          {
            title: '唯一码',
            key: 'QRCODE',
            align: 'center',
            render: (h, params) => {
                return h(
                  'div',
                  {
                    style: {
                      maxWidth:'385px',
                      height:'18px',
                      overflow: 'hidden',

                    },
                  },
                  [h('Tooltip',
                    {
                      attrs: {
                        placement:"top-start",
                        maxWidth:"385",
                        transfer:true
                      },
                    },
                    [h(
                      'div',
                      {
                        class:'qrele',
                        style: {
                          cursor: 'pointer',
                          overflow: 'hidden',
                          maxWidth:'385px',
                          textOverflow:'ellipsis',
                          whiteSpace: 'nowrap'
                        },
                        props: {
                          value: params.row.QRCODE,
                        },
                        on: {
                        click: () => {
                          if(params.row.QRCODE){
                            let text = params.row.QRCODE;
                            let inputElement = document.createElement('input')
                            inputElement.value = text;
                            document.body.appendChild(inputElement);
                            inputElement .select(); //选中文本
                            document.execCommand("copy"); //执行浏览器复制命令
                            inputElement.remove();

                          }
                        }
                        }
                      },
                      [params.row.QRCODE]
                      // ['11111111111111111111111111111111111111111111111123','4']
                      ),
                    h(
                      'div',
                      {
                           slot:"content",
                      },
                      [params.row.tip]
                      ),
                    ]
                    ),

                  ]

                )
              }
          },
          {
            title: '主播名称',
            key: 'HOSTNAME',
            align: 'center',
          },
          {
            title: '主播id',
            key: 'HOSTNO',
            align: 'center',
          },
          {
            title: '是否价格异常',
            key: 'ISPRICEABNORMAL',
            align: 'center',
          },
          {
            title: '是否航空禁运',
            key: 'ISEMBARGO',
            align: 'center',
          },
          {
            title: '是否虚拟条码',
            key: 'HASVIRTUAL',
            align: 'center',
          },
          {
            title: '是否催发',
            key: 'ISLG',
            align: 'center',
          },
          {
            title: '是否确认收货',
            key: 'ORDER_RECEIVED_STATUS',
            align: 'center',
          },
          {
            title: '确认收货时间',
            key: 'RECEIVE_TIME',
            align: 'center',
          },
          {
            title: '第三方支付单号',
            key: 'TRIPARTITE_PAYMENT_NO',
            align: 'center',
          },
          {
            title: '三方销售渠道',
            key: 'CHANNEL_TYPE',
            align: 'center',
          },
          {
            title: '定制信息',
            key: 'CUSTOM_CUSTOMER',
            align: 'center',
            width: '250',
            tooltip: true
          },
          {
            title: '质检子订单号',
            key: 'CHECK_OID',
            align: 'center',
          },
          {
            title: '商品重量',
            key: 'ESTIMATE_WEIGHT',
            align: 'center',
          },
          {
            title: '送货上门',
            key: 'IS_HOME_DELIVERY_SERVICE',
            align: 'center',
          },
          {
            title: '买家是否已评价',
            key: 'BUYERRATE',
            align: 'center',
          },
          {
            title: '发货前已退数量',
            key: 'REFUNDQTY',
            align: 'center',
          },
          {
            title: '已退金额',
            key: 'REFUNDAMOUNT',
            align: 'center',
          },
          {
            title: '发货后已退数量',
            key: 'APPLYREFUNDQTY',
            align: 'center',
          },
        ],

        // page
        total: 0, // 总条数
        currentPage: 1, // 页码
        pageSize: 10, // 每页的条数
        // 进度条
        currentStep: 2,
        // 表格
        submitArr: [], // 平台样式下选中的表格数据,
        submitArrClassicStyle: [], // 列表样式下选中的表格数据

        // specID:'',
        SKUMiddle: '', // 更改前
        SKUAfter: '', // 更改后
        specIndex: '', // 更改项索引
        offerInformationColumn: [
          {
            type: 'index',
            title: '序号',
            align: 'left',
          },
          {
            title: '平台单号',
            key: 'TID',
            align: 'center',
          },
          {
            title: '子订单编号',
            key: 'OID',
            align: 'center',
          },
          {
            title: '平台sku编码',
            key: 'EXTSKUID',
            align: 'center',
          },
          {
            title: '平台商品名称',
            key: 'TITLE',
            align: 'center',
          },
          {
            title: '活动编号',
            key: 'PROMOTION_ID',
            align: 'center',
          },
          {
            title: '优惠名称',
            key: 'PROMOTION_NAME',
            align: 'center',
          },
          {
            title: '优惠券码',
            key: 'ACTIVITY_CODE',
            align: 'center',
          },
          {
            title: '优惠金额',
            key: 'DISCOUNT_FEE',
            align: 'center',
          },
          {
            title: '赠送商品',
            key: 'GIFT_ITEM_NAME',
            align: 'center',
          },
          {
            title: '赠送数量',
            key: 'GIFT_ITEM_NUM',
            align: 'center',
          },
          {
            title: '优惠活动描述',
            key: 'PROMOTION_DESC',
            align: 'center',
          },
        ],
        payInformationColumn: [
          {
            type: 'index',
            title: '序号',
            align: 'left',
          },
          {
            title: '付款方式',
            key: 'PAYTYPE',
            align: 'center',
          },
          {
            title: '平台单号',
            key: 'OMSTID',
            align: 'center',
          },
          {
            title: '客户实际付款金额',
            key: 'PAYMENTAMOUNT',
            align: 'center',
          },
          {
            title: '支付宝交易号',
            key: 'PAYMENTNO',
            align: 'center',
          },
          {
            title: '备注',
            key: 'REMARK',
            align: 'center',
          },
          {
            title: '支付时间',
            key: 'PAYTIME',
            align: 'center',
          },
        ],
        sendInformationColumn: [
          {
            type: 'index',
            title: '序号',
            align: 'left',
          },
          {
            title: '状态',
            key: 'STATUSDESC',
            align: 'center',
          },
          {
            title: '时间',
            key: 'STATUSTIME',
            align: 'center',
          },
        ],
        logInformationColumn: [
          {
            type: 'index',
            title: '序号',
            align:'center',
            width:150
          },
          {
            title: '操作者',
            key: 'OWNERID',
            align: 'left',
            width:120
          },
          {
            title: '创建时间',
            key: 'CREATIONDATE',
            align: 'left',
            // sortable: true,
            // sortType:'desc',
            width:180
          },
          {
            title: '日志类型',
            key: 'LOGTYPE',
            align: 'left',
            width:160
          },
          {
            title: '日志内容',
            key: 'LOGMESSAGE',
            align: 'left',
            // width:300,
            render: (h, params) => {
              return h(
                'div',
                {
                  style: {
                    whiteSpace:'normal',
                    wordBreak:'break-all',
                  },
                },
                [params.row.LOGMESSAGE]
              );
            },
          },
          // {
          //   title: '日志标识',
          //   key: 'LOGTYPESIGN',
          //   align: 'left',
          // },
        ],
        storesendColumn: [
          {
            title: '逻辑仓',
            key: 'IESSTOREID',
            align: 'center',
          },
          {
            title: '条码',
            key: 'SKU',
            align: 'center',
          },
          {
            title: '数量',
            key: 'NUM',
            align: 'center',
          },
        ],
        OperationColumn: [
          {
            type: 'index',
            title: '序号',
            align: 'left',
          },
          {
            title: '仓储系统单号',
            key: 'ORDERID',
            align: 'center',
          },
          {
            title: '仓储状态',
            key: 'PROCESSSTATUS',
            align: 'center',
          },
          {
            title: '物流单号',
            key: 'EXPRESSCODE',
            align: 'center',
          },
          {
            title: '操作人编码',
            key: 'OPERATORCODE',
            align: 'center',
          },
          {
            title: '操作人姓名',
            key: 'OPERATORNAME',
            align: 'center',
          },
          {
            title: '操作时间',
            key: 'OPERATETIME',
            align: 'center',
          },
          {
            title: '操作内容',
            key: 'OPERATEINFO',
            align: 'center',
          },
          {
            title: '备注',
            key: 'REMARK',
            align: 'center',
          },
        ],
        tableData: [],
        tableCurrentData: [], // 列表样式下展示的当前数据
        // 包裹信息
        tableHeightOne: 420,
        packageGoodsColumns: [
          {
            type: 'index',
            title: '序号',
            align: 'left',
            width: '50',
          },
          {
            title: '物流公司',
            key: 'logisticsName',
            align: 'center',
          },
          {
            title: '物流单号',
            key: 'logisticsNumber',
            align: 'center',
            render: (h, params) => {
              return h(
                'a',
                {
                  style: {
                  //  123456color:params.row.REFUNDSTATUS_text=='退款成功'?'#999999':'#575757',
                  //  fontStyle:params.row.REFUNDSTATUS_text=='退款成功'?'italic':'normal'
                  },
                  on: {
                    'click': (event) => {
                      // 跳转
                      this.toExpressQuery(params.row.expressqueryaddress,params.row.logisticsNumber)
                    }
                  }
                },
                [params.row.logisticsNumber]
            )}
          },
          {
            title: '商品编码',
            key: 'productCode',
            align: 'center',
          },
          {
            title: '商品名称',
            key: 'productName',
            align: 'center',
          },
          {
            title: 'SKU',
            key: 'sku',
            align: 'center',
          },
          {
            title: 'SKU名称',
            key: 'skuName',
            align: 'center',
          },
          {
            title: '数量',
            key: 'num',
            align: 'center',
          },
          {
            title: '重量(kg)',
            key: 'weight',
            align: 'center',
          },
          {
            title: '体积',
            key: 'volume',
            align: 'center',
          },
          {
            title: '包裹图片',
            key: 'pictureurl',
            align: 'center',
            render: (h, params) => {
            const vm = this;
            if(!params.row.pictureurl || !Array.isArray(params.row.pictureurl)){
              return false;
            }
            let arr = params.row.pictureurl; // 假设每行数据有一个images数组属性，存放图片的url

            return h('div', arr.map((item, i) => {
              return h('img', {
                attrs: {
                  src: item,
                  width: '20px',
                  height: '20px',
                },
                style:{
                  'margin-right':'6px'
                },
                on:{
                  click: () => {
                    console.log(arr, i)
                    vm.previewPictureShowImage(arr, i)
                  }
                }

              })
            }))
          }


          }
        ], // 包裹信息列表
        showLackOnly: false, // 是否只显示缺货商品
        packageGoodsData:[], // 包裹信息列表数据
        // 批次/唯一码信息列表
        batchOrQrcodeColumns: [
          {
            type: 'index',
            title: '序号',
            align: 'left',
            // render: (h, params) => h('span', params.index + 1 + ((this.currentBatchOrQrcodePage - 1) * this.pageSizeBatchOrQrcode)
          },
          {
            title: 'SKU',
            key: 'sku',
            align: 'center',
          },
          {
            title: '数量',
            key: 'num',
            align: 'center',
          },
          {
            title: '生产日期',
            key: 'productDate',
            align: 'center',
          },
          {
            title: '有效期',
            key: 'expireDate',
            align: 'center',
          },
          {
            title: '批次号',
            key: 'batchCode',
            align: 'center',
          },
          {
            title: '唯一码',
            key: 'sn',
            align: 'center',
          },
        ],
        batchOrQrcodeData: [], // 批次/唯一码信息列表数据

        // 添加赠品数据
        columns2: [
          {
            type: 'index',
            title: '序号',
            align: 'center',
          },
          {
            title: '商品SKU',
            key: 'SKU',
            align: 'center',
          },
          {
            title: '商品编码',
            key: 'PRODUCTCODE',
            align: 'center',
          },
          {
            title: '数量',
            key: 'NUM',
            align: 'center',
          },
          {
            title: '商品名称',
            key: 'TITLE',
            align: 'center',
          },
          {
            title: '规格',
            key: 'NORMSDETAILNAMES',
            align: 'center',
          },
          {
            title: '国标码',
            key: 'GBCODE',
            align: 'center',
          },
          {
            title: '是否赠品',
            key: 'ISGIFT',
            align: 'center',
          },
          {
            title: '店铺可用库存',
            key: 'SHOPQTY',
            align: 'center',
          },
          {
            title: '操作',
            key: 'action',
            width: 100,
            align: 'center',
            render: (h, params) => {
              const vm = this;
              return h('div', [
                h('Button', {
                  props: {
                    type:'error',
                  },
                  on: {
                    click: () => {
                      vm.giftTableDataAdd.splice(params.index, 1);
                    }
                  }
                },'删除' )
              ]);
            }
          }
        ],
        // 被替换商品SKU
        columns4: [
          {
            title: '商品SKU',
            key: 'SKU',
            align: 'left',
          },
          {
            title: '商品名称',
            key: 'TITLE',
            align: 'left',
            width: 100,
            tooltip: true,
          },
          {
            title: '商品编码',
            key: 'PRODUCTCODE',
            align: 'left',
          },
          {
            title: '数量',
            key: 'NUM',
            align: 'left',
          },
          {
            title: '国标码',
            key: 'GBCODE',
            align: 'left',
          },
          {
            title: '成交金额',
            key: 'ACTUALAMOUNT',
            align: 'left',
          },
        ],
        goodsTableDataToModify: [],
        // 替换商品数据
        columns3: [
          {
            title: '商品SKU',
            key: 'SKU',
            align: 'left',
            width: 80,
            tooltip: true,
          },
          {
            title: '商品名称',
            key: 'TITLE',
            align: 'left',
            width: 80,
            tooltip: true,
          },
          {
            title: '商品编码',
            key: 'PRODUCTCODE',
            align: 'left',
            width: 80,
            tooltip: true,
          },
          {
            title: '数量',
            key: 'NUM',
            align: 'left',
            render: (h, params) => {
              return h(
                'Input',
                {
                  style: {
                  width:'60px'
                },
                props: {
                  value: params.row.NUM,
                  regx: this.regx
                },
                on: {
                  'on-blur': (event) => {
                    if(isNaN(event.target.value)){
                      event.target.value=''
                    }else{
                      if(isNaN(event.target.value)){
                        event.target.value=''
                      }else{
                        this.goodsTableDataModify[params.index].NUM = event.target.value;
                      }
                    }
                  }
                }
              },
              );
            },
          },
          {
            title: '国标码',
            key: 'GBCODE',
            align: 'left',
          },
          {
            title: '成交金额',
            key: 'ACTUALAMOUNT',
            align: 'left',
            render: (h, params) => {
              return h(
                'Input',
                {
                  style: {
                  width:'60px'
                },
                props: {
                  value: params.row.ACTUALAMOUNT,
                  regx: this.regx1
                },
                on: {
                  'on-blur': (event) => {
                    if(isNaN(event.target.value)){
                      event.target.value=''
                    }else{
                      if(isNaN(event.target.value)){
                        event.target.value=''
                      }else{
                         this.goodsTableDataModify[params.index].ACTUALAMOUNT = event.target.value;
                      }
                    }
                  }
                }
              },
              );
            },
          },
          {
            title: '店铺可用库存',
            key: 'SHOPQTY',
            width: 86,
            align: 'center',
          },
          // {
          //   title: '规格',
          //   key: 'NORMSDETAILNAMES',
          //   align: 'left',
          // },
          // {
          //   title: '是否为赠品',
          //   key: 'ISGIFT',
          //   align: 'left',
          // },

          {
            title: '操作',
            key: 'action',
            width: 100,
            align: 'center',
            render: (h, params) => {
              const vm = this;
              return h('div', [
                h('Button', {
                  props: {
                    type:'error',
                  },
                  on: {
                    click: () => {
                      vm.goodsTableDataModify.splice(params.index, 1);
                    }
                  }
                },'删除' )
              ]);
            }
          }
        ],
        goodsTableDataModify: [],
        giftTableDataAdd: [],
        giftTableData: [],
        enumDataOrderStatus: [
          { id: 1, text: '未确认' },
          { id: 2, text: '缺货' },
          { id: 3, text: '已审核' },
          { id: 4, text: '配货中' },
          { id: 5, text: '仓库发货' },
          { id: 6, text: '平台发货' },
          { id: 7, text: '已取消', css: { style: 'background-color:#e6e6e3' } },
          { id: 8, text: '系统作废', css: { style: 'background-color:#e6e6e3' } },
          { id: 9, text: '预售' },
          { id: 10, text: '代发' },
          { id: 11, text: '物流已送达' },
          { id: 12, text: '交易完成' },
          { id: 13, text: '未付款' },
          { id: 21, text: '待传wms' },
          { id: 50, text: '待分配' },
          { id: 51, text: '预售待发货' },
          { id: 52, text: '预售缺货' },
          { id: 53, text: '预售待占单' },
        ],
        enumDataRefundStatus: [
          { id: 0, text: '未申请退款' },
          { id: 1, text: '买家已经申请退款，等待卖家同意' },
          { id: 2, text: '卖家已经同意退款，等待买家退货' },
          { id: 3, text: '买家已经退货，等待卖家确认收货' },
          { id: 4, text: '卖家拒绝退款' },
          { id: 5, text: '退款关闭' },
          { id: 6, text: '退款成功' },
        ],
        enumDataYES: [
          { id: '0', text: '否' },
          { id: '1', text: '是' },
        ],
        ALLHOST_info: {
          column: "ALLHOST",
          ALLHOSTNO: "",
          ALLHOSTNAME: "",
        },
        orderSignMap: orderSigns,// 订单标记
        htmlTip: '',
        wangwangNICKNAME: '',
        // 包裹信息包裹明细分页
        currentPackagePage: 1,
        pageSizePackage: 10,
        totalPackage: 0,

        clickOrderId: '', // 当前选中的订单id
        choosedSKU: '', // 当前选中的sku
        // 包裹信批次/唯一码分页
        currentBatchOrQrcodePage:1,
        pageSizeBatchOrQrcode: 10,
        totalBatchOrQrcode: 0,

        SHOW_SYSTEM_SETTLEMENT_PRICE: false, // 手工分销订单明细展示结算价
        defaultIndex: undefined,
        tipType: undefined,
        showAddGood: false, // 显示添加商品弹框
        showDelete: false, // 询问是否删除商品
        showOtherInfo: true, // 显示其他信息
        foldIcon: 'ios-arrow-down', // 折叠信息图标
        otherInfos: [ // 其他信息
          {
            title: '主播名称',
            value: '',
            field: 'ALLHOSTNAME'
          },
          {
            title: '主播ID',
            value: '',
            field: 'ALLHOSTNO'
          },
          {
            title: '销售导购编码',
            value: '',
            field: 'PRIVATE_GUIDERNO'
          },
          {
            title: '销售导购名称',
            value: '',
            field: 'PRIVATE_GUIDER_NAME'
          },
          {
            title: '销售导购WID',
            value: '',
            field: 'RESERVE_BIGINT01'
          },
          {
            title: '归属导购编码 ',
            value: '',
            field: 'PERSONAL_GUIDER_NO'
          },
          {
            title: '归属导购名称',
            value: '',
            field: 'PERSONAL_GUIDER_NAME'
          },
          {
            title: '归属导购WID ',
            value: '',
            field: 'PERSONAL_GUIDER_WID'
          },
          {
            title: '分销员名称 ',
            value: '',
            field: 'SALE_NICK'
          },
          {
            title: '分销员ID',
            value: '',
            field: 'SALE_ID'
          },
          {
            title: '分销员手机号 ',
            value: '',
            field: 'SALE_PHONE'
          },
          {
            title: '平台发货门店名称 ',
            value: '',
            field: 'PLATFORMSENDNAME'
          },
          {
            title: '平台发货门店编号 ',
            value: '',
            field: 'PLATFORMSENDCODE'
          },
          {
            title: '处理门店ID ',
            value: '',
            field: 'PROCESS_STOREID'
          },
          {
            title: '期望发货时间 ',
            value: '',
            field: 'EXPSHIPDATE',
            componentType: 'date',
            type: 'datetime',
            disabled: false, // 隐藏
            format: 'yyyy-MM-dd',
            vModelFormat: true,
            options: {
              disabledDate(date) {
                return dayjs(date).isBefore(new Date(), 'day');
              }
            },
          },
          {
            title: '超时未寄回时间 ',
            value: '',
            field: 'ESTIMATED_RETURN_TIME',
            componentType: 'date',
            type: 'datetime',
            format: 'yyyy-MM-dd',
            disabled: true, // 隐藏
            vModelFormat: true,
            // options: {
            //   disabledDate(date) {
            //     return dayjs(date).isBefore(new Date(), 'day');
            //   }
            // },
          }
        ],
        otherInfoValue: '',
        otherInfoParams: {
            ID: undefined,
            ALLHOSTNAME: '',
            ALLHOSTNO: '',
            PRIVATE_GUIDERNO: '',
            PRIVATE_GUIDER_NAME: '',
            RESERVE_BIGINT01: '',
            PERSONAL_GUIDER_NO: '',
            PERSONAL_GUIDER_NAME: '',
            PERSONAL_GUIDER_WID: '',
            SALE_NICK: '',
            SALE_ID: '',
            SALE_PHONE: '',
            PLATFORMSENDNAME: '',
            PLATFORMSENDCODE: '',
            EXPSHIPDATE: '',
            ESTIMATED_RETURN_TIME: '',
        },
        showOtherModal: false, // 显示其他信息弹框
        currentEditOtherInfo: undefined, // 值为当前编辑的信息
        showOtherAllModal: false, // 显示所有其他信息弹框
        showReturnButton: false,
        encryptColumns: [],
        disableColumns: [],
        RT_ORDER_ID: '', // 关联订单id

        showOwnText:true, // 是否展示我们自己的订单信息
        douyinToken: '', // 记录当前订单的token

        douyinData: {
          token: '',
          orderId: '',
          text: '',
          placement: 'left',
          icon: 'http://symanfile.oss-cn-hangzhou.aliyuncs.com/k8s/yunque-front-end/closeEye.png',
          fields: [ 'receiver_name', 'phone', 'receiver_address'],
          innerStyle:{color:'#575757',lineHeight:'26px'},
          editConfig: {
            icon: "", // 编辑地址的icon图标，不传是默认的图标
            edit: false,
            showVirtualTel: true, // 是否展示
          },
          success: this.hideBtnText,
        }, 

        loading: false, // 加载中

        loadingAll: false, // 全局加载中

        // 云仓派单日志
        showpdLogShow: false,
        pdlogcolumns: [
          {
            type: 'index',
            title: '序号',
            align: 'center',
          },
          {
            title: '店仓',
            key: 'cStoreIdName',
            align: 'center',
            width: 120,
            tooltip: true,
          },
          {
            title: '重派备注',
            key: 'o2oAssignorigReason',
            align: 'center',
            width: 110,
            tooltip: true,
          },
          {
            title: '重新指派原因',
            key: 'o2oAssignorigReasonIdName',
            align: 'center',
            width: 120,
            tooltip: true,
          },
          {
            title: '退回备注',
            key: 'o2oBackReason',
            align: 'center',
            width: 120,
            tooltip: true,
          },
          {
            title: '退回原因',
            key: 'o2oBackReasonIdName',
            align: 'center',
            width: 120,
            tooltip: true,
          },
          {
            title: '变更时间',
            key: 'changetime',
            align: 'center',
            width: 160,
            tooltip: true,
          },
        ],
        pdlogtableData: [],
        isShowSyncToPlatform: false,  // 保存并同步平台按钮
        colorTextList: ['grey','#eb4832','yellow','green','#25adeb','purple','pink','#51ef15','orange','#2538eb'],
        support_flag: [0,1,2,3,4,5],
        showSaveBtn:true, // 是否有编辑权限
        IS_SAMPLE_CLOTHES_SHOP:0, // 超时未寄回时间
        // isNotCheckReceiver: "Y",// 是否校验收货人信息
      };
    },
    created() {
      this._initFormData={}
      this.clearPopTipList();
      this.getPermission('showAddPower');
      this.getPermission('modifyGoodsPower');
      this.getPermission('showAudioPower');
      this.getReturnPermission()
      // this.getobjectTab()
      // 计算文本在页面所占px宽度 -- 扩展String原型方法pxWidth
      String.prototype.pxWidth = function(font) {
        var canvas = String.prototype.pxWidth.canvas || (String.prototype.pxWidth.canvas = document.createElement("canvas")),
            context = canvas.getContext("2d");

        font && (context.font = font);
        var metrics = context.measureText(this);

        return metrics.width;
      }
    },
    mounted() {
      window.Light.init();
      this.getConfigData();
      this.getPackageList(); // 获取包裹信息列表
        window.addEventListener('scroll', (e)=>{
            //滚动条滚动时，距离顶部的距离
          var scrollTop = $('#content')[0].scrollTop;
            //可视区的高度
          var windowHeight = $('#content')[0].clientHeight;
            //滚动条的总高度
          var scrollHeight = $('#content')[0].scrollHeight;
          if( $('#content')[0].scrollTop>0){
            this.isTop=false
          }else{
            this.isTop=true
          }
          //滚动条到底部的条件
          if(scrollTop+windowHeight+100 >= scrollHeight){
            // if(e.target.scrollTop + e.target.clientHeight+5 >= e.target.scrollHeight){
          this.spinShow=true
            if(this.canLoad){
              this.canLoad=false
              if(this.isScroll){
                if(this.detailShowType != 'classicStyle'){
                    this.currentPage=this.currentPage+1
                    this.getTableInfoData()
                }
              }
            }

          }
          },true)
    },

    // watch: {
    //   // 弹框关闭时还原敏感列
    //   showModifyGoodsModal(val) {
    //     if(!val) {
    //       this.encryptGoodData()
    //     }
    //   }
    // },
    watch: {
      '$route'(newRoute) { // 切换页面后，抖音解密组件问题
        if (newRoute.path.indexOf("ORDERMANAGEMENTEDITOR") > -1) {
          this.douyinData.token = this.douyinToken;
          this.showOwnText = true;
          // this.douyinData.text = this.formValidate.name+','+this.formValidate.mobile+','+this.formValidate.province +' '+this.formValidate.city+' '+this.formValidate.area+' '+this.formValidate.town+"<br/>"+this.formValidate.detailAddress+'  '+(this.formValidate.postCode?this.formValidate.postCode:'');
        } else {
          this.douyinData.token = ''
          this.showOwnText = false;
        }
      },
    },
    computed: {
      filteredTableData() {
        if (this.showLackOnly) {
          return this.tableData.filter(item => item.IS_LACK !== '否')
        }
        return this.tableData
      },
      filtereTableCurrentData() {
        if (this.showLackOnly) {
          return this.tableCurrentData.filter(item => item.IS_LACK !== '否')
        }
        return this.tableCurrentData
      }
    },
    methods: {
      getobjectTab(){
        // 获取元数据的配置权限
        network.post('/p/cs/objectTab', urlSearchParams({
          table:'T_V_OMSONLINEORDER',
          objid:this.OrderIdFromList,
          ismaintable:'y'
        })).then((res) => {
            if(res.data.code == 0){
              const {tabcmd} = res.data.data;     
              if (tabcmd && tabcmd.cmds) {
                const index = tabcmd.cmds.findIndex(cmd => cmd === "actionMODIFY");
                if (index !== -1) {
                  this.showSaveBtn = tabcmd.prem[index] === true;
                } else {
                  this.showSaveBtn = false;
                }
              }
            
             
            }
         })

      },
      selectclearancetypeBtn() {
        this.formValidate.customs_clearance_info = ''
      },
      showSellerDialog() {
        this.getBatchMemoCheckUp();
        this.showSellerModal = true;
      },
      getBatchMemoCheckUp(){
        let platformIds = [this.PLATFORM]; 
        let params = {
          ids: platformIds
        }
        network.post('/p/cs/batchMemoCheckUp',params).then(res => {
          if(res.data.code == 0){
            if(res.data.data.is_display == 0){
              this.isShowSyncToPlatform = false;
            }else if(res.data.data.is_display == 1) {
              this.isShowSyncToPlatform = true;
            }
            // 0灰色 1红色 2黄色 3绿色 4浅蓝色 5紫色 6粉红色 7青色 8橙色 9深蓝色
            this.support_flag = res.data.data.support_flag;
            this.support_flag.forEach(item => {
              if(item == this.formValidate1.ORDERFLAG){
                this.formValidate1.ORDERFLAG = item
              }
            })
          }
        })
      },
      hideBtnText() {
        this.hideAll = false;
        this.showOwnText = false;
      },
      tabClose(tableName) {
        let tabs = window.parent.vm.$store.state.global.openedMenuLists.filter((p) => p.tableName == tableName);
        if (tabs.length > 0) {
          const tab = tabs[0];
          const fullPath = tab.routeFullPath;
          const keepAliveModuleName = tab.keepAliveModuleName;
          const tableName = tab.tableName;

          window.parent.R3.store.commit('global/tabCloseAppoint',
            {
              routeFullPath: fullPath, // 当前路由fullPath
              stopRouterPush: false, // 是否阻止默认跳转到前一个tab
              keepAliveModuleName, // 当前模块名称
              tableName, // 当前自定义表标识
              event() { }, // type:function;调用方法前执行的回调
            });
        }
      },

      // 跳转订单详情页
      viewOrderDetail(id) {
        const tableName = 'ORDERMANAGEMENTEDITOR'
        this.tabClose(tableName);
        window.R3.store.commit('global/tabOpen', {
          type: 'C',
          label: '订单编辑',
          customizedModuleName: tableName,
          customizedModuleId: id
        })
      },

      // 图片预览
      previewPictureShowImage(arr, index){
            console.log(this.PreviewPictureShow)
            this.PreviewPictureShow = true;
            this.defaultImageIndex = index;
            this.picPackageImagePreviewPicture = arr.reduce((arr, item, i)=>{
              arr.push({
                NAME: i,
                URL: item,
                Size: '2K'
              });
              return arr;
            }, []);


      },
      // 跳转到库存查询界面
      jumpToStock(item) {
        const tab = {
          type: 'S',
          tableName: 'V_IES_STOCK',
          tableId: 10610,
          label: '库存查询',
          isSetQuery: true,
          isRefresh: true,
          queryData: {
            tableId: 10610,
            values: [//设置默认值的字段
              {
                colid: '191522', // sku字段
                defaultValue: item.SKU,
                display: "STRING"
              }
            ]
          }
        }

        R3.store.commit('global/tabOpen', tab);
      },

      // 打开编辑其他信息的弹框
      openOtherDialog(fieldName) {
        this.currentEditOtherInfo = this.otherInfos.find(item => item.field === fieldName)
        this.otherInfoValue = this.currentEditOtherInfo.value
        this.showOtherModal = true
      },

      // 打开编辑其他信息的弹框（所有的其他信息）
      openOtherDialogAll() {
        this.showOtherAllModal = true
      },

      // 修改其他信息
      saveOtherInfo(currentEditOtherInfo) {
        console.log("🚀 ~ file: OrderManagementEditor.vue:3564 ~ saveOtherInfo ~ currentEditOtherInfo:", currentEditOtherInfo)
        // 更新当前编辑的信息
        this.otherInfoParams[this.currentEditOtherInfo.field] = this.otherInfoValue
        if(['PRIVATE_GUIDERNO','PRIVATE_GUIDER_NAME','RESERVE_BIGINT01','PERSONAL_GUIDER_NO','PERSONAL_GUIDER_NAME','PERSONAL_GUIDER_WID','SALE_NICK','SALE_ID','SALE_PHONE','ALLHOSTNO','ALLHOSTNAME','PROCESS_STOREID'].includes(currentEditOtherInfo.field)) {
          this.otherInfoParams.ID = Number(this.pageMsgId)

          if(!this.otherInfoParams.RESERVE_BIGINT01) {
            this.otherInfoParams.RESERVE_BIGINT01 = null
          } else {
            this.otherInfoParams.RESERVE_BIGINT01 = Number(this.otherInfoParams.RESERVE_BIGINT01)
          }

          network.post('/p/cs/shoppingGuideInfo', this.otherInfoParams).then(res => {
            if (res.data.code == 0) {
              this.$Message.success(res.data.message)
              this.closeOtherDialog()
              // this.getConfigData()
            }
            this.getConfigData()
          })
        }
        // 保存平台发货门店名称、平台发货门店编号
        if(['PLATFORMSENDNAME','PLATFORMSENDCODE','EXPSHIPDATE'].includes(currentEditOtherInfo.field)) {
          const params = {
            id: this.pageMsgId,
            PLATFORMSENDNAME: this.otherInfoParams.PLATFORMSENDNAME,
            PLATFORMSENDCODE: this.otherInfoParams.PLATFORMSENDCODE,
            EXPSHIPDATE: this.otherInfoParams.EXPSHIPDATE,
            "ESTIMATED_RETURN_TIME":this.otherInfoParams.ESTIMATED_RETURN_TIME,
          }
            // if(!this.IS_SAMPLE_CLOTHES_SHOP){
            //   delete params.ESTIMATED_RETURN_TIME
            // }
          network.post('/p/cs/order/info', params).then(res => {
            if (res.data.code == 0) {
              this.$Message.success(res.data.message)
              this.closeOtherDialog()
              this.getConfigData()
            }
          })
        }
      },

      // 修改其他信息
      saveOtherAllInfo() {
        // 初始其他信息化ALLHOSTNAME
          let changeKey = [];
          for (let key in this.otherInfoParams) {
            if(key != 'ID' && this.otherInfoParams[key] != this.otherInfos.find(item => item.field === key).value){
              changeKey.push(key)
            }
          }
          let baseMsgList = ['PRIVATE_GUIDERNO','PRIVATE_GUIDER_NAME','RESERVE_BIGINT01','PERSONAL_GUIDER_NO','PERSONAL_GUIDER_NAME','PERSONAL_GUIDER_WID','SALE_NICK','SALE_ID','SALE_PHONE','ALLHOSTNO','ALLHOSTNAME']
          let platformMsgList = ['PLATFORMSENDNAME','PLATFORMSENDCODE','EXPSHIPDATE'];
          if(changeKey.some(item => baseMsgList.includes(item))) {
            let params = {
              "ID":Number(this.pageMsgId),
              "ALLHOSTNAME":this.otherInfos.find(item => item.field === 'ALLHOSTNAME').value,
              "ALLHOSTNO":this.otherInfos.find(item => item.field === 'ALLHOSTNO').value,
              "PRIVATE_GUIDERNO":this.otherInfos.find(item => item.field === 'PRIVATE_GUIDERNO').value,
              "PRIVATE_GUIDER_NAME":this.otherInfos.find(item => item.field === 'PRIVATE_GUIDER_NAME').value,
              "RESERVE_BIGINT01":this.otherInfos.find(item => item.field === 'RESERVE_BIGINT01').value?Number(this.otherInfos.find(item => item.field === 'RESERVE_BIGINT01').value):null,
              "PERSONAL_GUIDER_NO":this.otherInfos.find(item => item.field === 'PERSONAL_GUIDER_NO').value,
              "PERSONAL_GUIDER_NAME":this.otherInfos.find(item => item.field === 'PERSONAL_GUIDER_NAME').value,
              "PERSONAL_GUIDER_WID":this.otherInfos.find(item => item.field === 'PERSONAL_GUIDER_WID').value,
              "SALE_NICK":this.otherInfos.find(item => item.field === 'SALE_NICK').value,
              "SALE_ID":this.otherInfos.find(item => item.field === 'SALE_ID').value,
              "SALE_PHONE": this.otherInfos.find(item => item.field === 'SALE_PHONE').value,
              "PLATFORMSENDNAME":this.otherInfos.find(item => item.field === 'PLATFORMSENDNAME').value,
              "PLATFORMSENDCODE":this.otherInfos.find(item => item.field === 'PLATFORMSENDCODE').value,
              'PROCESS_STOREID':this.otherInfos.find(item => item.field === 'PROCESS_STOREID').value,
              "EXPSHIPDATE":this.otherInfos.find(item => item.field === 'EXPSHIPDATE').value,
              "ESTIMATED_RETURN_TIME":this.otherInfos.find(item => item.field === 'ESTIMATED_RETURN_TIME').value,
            }
          
            network.post('/p/cs/shoppingGuideInfo', params).then(res => {
              if (res.data.code == 0) {
                this.$Message.success(res.data.message)
                this.closeOtherAllDialog()
                // this.getConfigData()
              }
              this.getConfigData()
            })
          }
          // 保存平台发货门店名称、平台发货门店编号
          if(changeKey.some(item => platformMsgList.includes(item))) {
            const params = {
              id: this.pageMsgId,
              PLATFORMSENDNAME: this.otherInfos.find(item => item.field === 'PLATFORMSENDNAME').value,
              PLATFORMSENDCODE: this.otherInfos.find(item => item.field === 'PLATFORMSENDCODE').value,
              EXPSHIPDATE: this.otherInfos.find(item => item.field === 'EXPSHIPDATE').value,
              "ESTIMATED_RETURN_TIME":this.otherInfos.find(item => item.field === 'ESTIMATED_RETURN_TIME').value,
            }
            // if(!this.IS_SAMPLE_CLOTHES_SHOP){
            //   delete params.ESTIMATED_RETURN_TIME
            // }
            network.post('/p/cs/order/info', params).then(res => {
              if (res.data.code == 0) {
                this.$Message.success(res.data.message)
                this.closeOtherAllDialog()
                this.getConfigData()
              }
            })
          }        
      },
      


      // 关闭其他信息弹框
      closeOtherDialog() {
        console.log('关闭')
        this.currentEditOtherInfo = undefined
        this.showOtherModal = false
        this.otherInfoValue = ''
      },

      // 关闭所有其他信息弹框
      closeOtherAllDialog() {  // 取消关闭弹框还原参数
        for (let key in this.otherInfoParams) {
          if(key != 'ID' && this.otherInfoParams[key] != this.otherInfos.find(item => item.field === key).value){
            this.otherInfos.find(item => item.field === key).value = this.otherInfoParams[key]
          }
        }
        this.showOtherAllModal = false
      },


      // 折叠其他信息
      toggleFold() {
        this.showOtherInfo = !this.showOtherInfo
        this.foldIcon = this.showOtherInfo ? 'ios-arrow-down' : 'ios-arrow-up'
      },

      // 打开添加商品
      addGoods() {
        this.showAddGood = true
      },

      // 确定添加商品
      onConfirmAdd() {
        this.getConfigData();
        this.getTableInfoData();
      },

      // 平台样式，删除单个商品
      removeSku(item) {
        this.submitArrClassicStyle = [item]
        this._removeFlag = 'platform'
        this.removeGood('tableData')
      },

      // 列表样式，删除多个商品
      removeGood(table) {
        this._removeFlag = 'list' // 判断是点击列表样式的删除，还是点击平台的删除
        // 表格数据删除完
        console.log(this.submitArrClassicStyle)
        console.log(this[table].length)
        if(this.submitArrClassicStyle.length > 0 && this.submitArrClassicStyle.length === this[table].length) {
          this.showDelete = true
        } else if(this.submitArrClassicStyle.length > 0 && this.submitArrClassicStyle.length < this[table].length){
          let flag = true
          let count = 0;
          for(let i=0;i<this[table].length;i++){
            if(this[table][i].REFUNDSTATUS == '6'){
              count++;
            }
          }
          if(count+1 != this[table].length){
            this.deleteGood()
          }else {
            this.showDelete = true
          }
        } else {
          if(this.submitArrClassicStyle.length > 0) {
            // this.deleteGood()
          }
        }
      },

      // 取消订单
      cancelOrder() {
        const user = JSON.parse(localStorage.getItem('userInfo')).userenv.$USER_ENAME$

        const params= {
          orderId: [this.pageMsgId],
          cancelReason: `${user}操作删除全部明细，订单直接取消`
        }
        network.post("/p/cs/batchCancelOrder", params).then(res => {
          if (res.data.code == 0) {
            this.getConfigData()
            this.getTableInfoData()
            this.$Message.success('删除成功')
          }
        })
      },

      // 执行删除商品
      deleteGood() {
        const ids = this.submitArrClassicStyle.map(item => item.ID)
        const params = {
          ids, //明细id
          objId: this.pageMsgId //订单id
        }
        network.post("/p/cs/order/deleteDetails", params).then(res => {
          if (res.data.code == 0) {
            this.getTableInfoData()
            this.getConfigData()
            this.tableCurrentData = this.tableCurrentData.filter(item => !ids.includes(item.ID))
            this.$Message.success('删除成功')
            if (this.ORDERSTATUS === 4) {
              this.jumpToNewOrder(res.data.data.objId)
            }
          }
        })
      },

      // 判断退款权限
        getReturnPermission() {
        const params = {
            "ad_table_id": 10883,
            "ad_action_id": 3702
          }
        network.post('/p/cs/group/have/permission', params).then((res) => {
          if(res.data.code == 0){
            this.showReturnButton = res.data.data
          }
        })
      },

      // 跳转新订单
    jumpToNewOrder(id) {
      const { fullPath } = this.$route;
      const {
        keepAliveModuleName,
        tableName,
      } = this.$store.state.global.activeTab;
      this.$store.commit('global/tabCloseAppoint', {
        tableName,
        routeFullPath: fullPath,
        keepAliveModuleName,
      });
      // 跳转
      R3.store.commit('global/tabOpen', {
        type: 'tableDetailAction' || 'C',
        label: '订单编辑',
        customizedModuleName: 'OrderManagementEditor',
        customizedModuleId: id,
      })
    },

      getPermission(type){
        if(type == 'showAddPower'){
          let params = {
            "ad_table_id": 10883,
            "ad_action_id": 3146
          }
          network.post('/p/cs/group/have/permission', params).then((res) => {
            if(res.data.code == 0){
              this.showAddPower = res.data.data
            }
          })
        }else if(type == 'modifyGoodsPower'){
          let params = {
            "ad_table_id": 10883,
            "ad_action_id": 3318
          }
          network.post('/p/cs/group/have/permission', params).then((res) => {
            if(res.data.code == 0){
              this.modifyGoodsPower = res.data.data
            }
          })
        }else if(type == 'showAudioPower') {
          let params = {
            "ad_table_id": 10883,
            "ad_action_id": 2971
          }
          network.post('/p/cs/group/have/permission', params).then((res) => {
            if(res.data.code == 0){
              this.showAudioPower = res.data.data
              console.log(this.showAudioPower)
            }
          })
        }
      },
      // async light(id) {
      //     function initWW() {
      //         const Light = window['Light'];
      //         if (_isFunction(Light?.light)) {
      //             Light.light(id);
      //             return true;
      //         }
      //         return false;
      //     }
      //     if (!_isFunction(_get(window, 'KISSY.config'))) {
      //         await loadScript(webwwDependencies.kissy);
      //     }
      //     if (!initWW()) {
      //         await loadScript(webwwDependencies.webww);
      //         initWW();
      //     }
      // },
      focusNumBox() {
        console.log(this.formValidate4)
      },
      toggleButtonType(){
        if(this.TypeButtonText == '平台样式'){
          this.tableData.forEach((item) => {
            item.options = [
              {
                label: item.SKUSPEC,
                value: item.SKU,
              },
            ]
          })
          this.isScroll=true;
          this.TypeButtonText = '列表样式'
          this.detailShowType = 'platformStyle'
        }else {
          this.tableData.forEach((item) => {
            item.options = [
              {
                label: item.SKUSPEC,
                value: item.SKU,
              },
            ]
          })
          this.isScroll=false;
          this.TypeButtonText = '平台样式'
          this.detailShowType = 'classicStyle'
        }
        this.pageSize = 10;
        this.currentPage = 1;
        this.getTableInfoData();
      },
      clearPopTipList() {
        let getListReturnTableList = document.getElementsByClassName('getListReturnTable');
        for(let i=0;i<getListReturnTableList.length;i++){
          let objNode = getListReturnTableList[i].parentElement.parentElement.parentElement.parentElement
          objNode.style.display = 'none';
        }
      },
      // 规格下拉框打开时
      getSpecList(query,item,index){
        if(query){
          this.changeItemSKUOld = item.SKU
        }
        // this.specIndex =this.tableData.findIndex((i)=>{
        //   return i.SKU==item.SKU
        // });
        this.specIndex = index
        if (query) {
          let virtual = {
            table: 'V_IES_IESSKU_STOCK',
            isdroplistsearch: true,
            range: 1000,
            startindex: 0,
            fixedcolumns: {
              productcode: [
                `=${item.PRODUCTCODE}`,
              ],
            },
          };
          network.post('/p/cs/list/query', virtual).then((res) => {
            let a = [];
            res.data.rows.map((i) => {
              // i.NORMSDETAILNAMES.val
               a.push(
                 {
                   label:(i.NORMS2NAME.val || '')+'('+(i.NORMS2CODE.val || '')+'),'+(i.NORMS1NAME.val || '')+ '('+(i.NORMS1CODE.val || '')+')',
                   value: i.SKU.val,
                 }
               )
            })
            this.$set(this.tableData[this.specIndex], 'options', a);
            this.$forceUpdate();
            this.SKUMiddle = this.tableData[this.specIndex].SKU;
          });
        }
      },
      // 规格选中时
      changeSKUSPEC(e,item){
        let data;
        if (e) {
          // let giftChange=true
          // ORDERSTATUS:2缺货;
          // ORDERSTATUS:1未确定;
          // ORDERSTATUS:4配货中：WMSCANCELSTATUS:1已撤回
                              // this.IESWAREHOUSEID查表T_IESWAREHOUSE：ISJOINTWMS：0未对接
          // let virtual = {
          //       table: 'T_IESWAREHOUSE',
          //       objid: this.IESWAREHOUSEID,
          //     };
          // network.post('/p/cs/object/query', virtual).then((res) => {
              //   let ISJOINTWMS=res.data.ISJOINTWMS //WMS未对接
              // if(this.ORDERSTATUS==1||this.ORDERSTATUS==2 ||(this.ORDERSTATUS==4&&this.WMSCANCELSTATUS==1) ||(this.ORDERSTATUS==4&&ISJOINTWMS==0)){
              //   if(item.ISGIFT_text=='是'){
              //     this.$Modal.fcWarning({
              //         title: '提示',
              //         content: '赠品商品不支持修改，如需修改请删除赠品后重新添加赠品。',
              //         mask:true,
              //     });
              //      this.cancelSKUSPEC()
              //   }else{
              //       // 有选中过
              //     data =item.options.find((item) => item.value == e);
              //     this.SKUAfter = data.value;
              //     this.modal1 = true;
              //   }
              // }else{
              //     // 有选中过
              //   data = item.options.find((item) => item.value == e);
              //   this.SKUAfter = data.value;
              //   this.modal1 = true;
              // }

          // })

            // 有选中过
            data = item.options.find((item) => item.value == e);
            this.SKUAfter = data.value;
            this.modal1 = true;
        } else {
          // 第一次下拉改变
          this.SKUAfter = item.SKU;
        }
      },
      // 回到顶部
      toTop(){
        // let top = $('#content')[0].scrollTop;
        // 实现滚动效果
        const timeTop = setInterval(() => {
        //  $('#content')[0].scrollTop = $('#content')[0].scrollTop = top -= 1000;
         $('#content')[0].scrollTop = 0;
          // if (top <= 0) {
            clearInterval(timeTop);
          // }
        }, 10);
      },
      // 鼠标移入图片
      picEnter(item,index){
        var txt3=document.createElement("img");
        txt3.id='enlargeImg'
        txt3.src=item.PICPATH==''?'../../../static/img/camera.jpg':item.PICPATH
        txt3.style.height='120px'
        txt3.style.width='120px'
        txt3.style.position='fixed'
        // txt3.style.top=($(".imgBox")[index].offsetParent.offsetHeight + $(".imgBox")[index].offsetTop - $(".imgBox")[index].offsetParent.scrollTop + 30)+'px';
        // txt3.style.left=($(".imgBox")[0].offsetLeft-$(".imgBox")[params.index].offsetParent.scrollLeft + 60 + 30)+'px'
        txt3.style.top=($(".imgBox")[index].offsetTop - 30)+'px';
        txt3.style.left=($(".imgBox")[0].offsetLeft+ 60)+'px'
        $(".imgBox")[index].append(txt3)
      },
      // 鼠标移入图片
      picLeave(item,index){
        $("#enlargeImg").remove();
      },
      // 复制QR码
      copyQR(str){
        if(str){
          let inputElement = document.createElement('input')
          inputElement.value = str;
          document.body.appendChild(inputElement);
          inputElement .select(); //选中文本
          document.execCommand("copy"); //执行浏览器复制命令
          inputElement.remove();
        }
      },
      // 判断是否含有特殊字符串
      judgeStr(str){
        let judge=true
        if(str.indexOf('~~')==-1){
          if(str.indexOf('$$')==-1){
              if(str.indexOf('##')==-1){
                if(str.indexOf('&&')==-1){
                  judge=true
                }else{
                  judge=false
                }
              }else{
                 judge=false
              }
          }else{
            judge=false
          }
        }else{
          judge=false
        }
        return judge
      },
      rowClassName (row, index) {
          if (row.REFUNDSTATUS == 6) {
              return 'demo-table';
          }
          return '';
      },
      // 修改地址弹窗,请求解密后的数据
      changeAddress(){
        //只有缺货，未确认，配货中可以修改地址
        if(!this.canModify){
            this.$Message.warning('该状态下不能修改地址');
        }else{
          this.showBuyerModal = true //修改地址弹窗
          // let virtual = {
          //       table: "T_V_OMSONLINEORDER",
          //       objid: this.pageMsgId,
          //       columns: ['RECEIVPHONE','RECEIVNAME','RECEIVMOBILE','RECEIVADDRESS'],
          //       type: 2,
          //       isrefundorder: 1,
          // };
          // network.post('/p/cs/showProtectData', virtual).then((res) => {
          //   try {
          //   if (res.data.code == 0) {
          //       if(res.data.message !== 'SUCCESS'){
          //         this.$Modal.fcError({
          //           title: '提示',
          //           mask:true,
          //           content: res.data.message
          //         });
          //       }
          //       let showData = res.data.data;
          //       this.formValidate.name = showData.RECEIVNAME==null?'':showData.RECEIVNAME; // 收件人
          //       this.formValidate.mobile = showData.RECEIVMOBILE==null?'':showData.RECEIVMOBILE; // 收件人手机号
          //       this.formValidate.phone = showData.RECEIVPHONE==null?'':showData.RECEIVPHONE; // 收件人手机号
          //       this.formValidate.detailAddress = showData.RECEIVADDRESS==null?'':showData.RECEIVADDRESS; // 收件人详细地址
          //       this.showBuyerModal = true //修改地址弹窗

          //       //更新日志
          //       this.$refs.getOperationLog.getInfoData()
          //     } else if (res.data.code == 10) {
          //       this.$Message.warning('获取原单收件人信息失败，请手工填写收货人信息！');
          //       // let showData = res.data.data ? res.data.data : '';
          //       // this.formValidate.name = showData.RECEIVNAME == null ? '' : showData.RECEIVNAME; // 收件人
          //       // this.formValidate.mobile = showData.RECEIVMOBILE == null ? '' : showData.RECEIVMOBILE; // 收件人手机号
          //       // this.formValidate.phone = showData.RECEIVPHONE == null ? '' : showData.RECEIVPHONE; // 收件人手机号
          //       // this.formValidate.detailAddress = showData.RECEIVADDRESS == null ? '' : showData.RECEIVADDRESS; // 收件人详细地址
          //       this.showBuyerModal = true; // 修改地址弹窗

          //       // 更新日志
          //       this.$refs.getOperationLog.getInfoData();
          //     } else if(res.data.code ==-3){
          //       this.$Modal.fcError({
          //           title: '提示',
          //           mask:true,
          //           content: '您没有查看敏感信息的权限，无法修改地址，如需使用请联系管理员至【用户档案】中开通【可查看客户敏感信息】权限。'
          //       });
          //     }else{
          //       this.showBuyerModal = true //修改地址弹窗
          //     }
          //   }catch (e) {
          //     if (e.response) {
          //       if (e.response.status == 500) {
          //         this.$emit('closeActionDialog', false);
          //       }
          //     }
          //   }
          // })
        }

      },
      // 日期转换
      timeShift(str) {
        // var end_str = (str).replace(/-/g,"/");
        if (!str) {
          return;
        }
        let end_date = new Date(str); // 将字符串转化为时间
        let minute;
        let second;
        if (end_date.getMinutes() < 10) {
          minute = `0${end_date.getMinutes()}`;
        } else {
          minute = end_date.getMinutes();
        }
        if (end_date.getSeconds() < 10) {
          second = `0${end_date.getSeconds()}`;
        } else {
          second = end_date.getSeconds();
        }
        let time = `${end_date.getHours()}:${minute}:${second}`;
        if (!time) {
          time = '-';
        }
        return time;
      },
      // 时间转换
      dataShift(str) {
        if (!str) {
          return;
        }
        let end_date = new Date(str); // 将字符串转化为时间
        let month = end_date.getMonth() + 1;
        let time = `${end_date.getFullYear()}-${month}-${end_date.getDate()}`;
        if (!time) {
          time = '-';
        }
        return time;
      },
      // 获取云仓查询数据
      async getShipStoreInfo() {
        // const pageId = window.vm.$route.params.customizedModuleId;
        if(this.type == 'list'){
          this.pageMsgId = this.OrderIdFromList;
        }else {
          this.pageMsgId = window.vm.$route.params.customizedModuleId;
        }
          const response = await network.post(`/p/cs/erp/ship_store_info?id=${this.pageMsgId}`);

        if(response.data.code ===0 && response.data.data){
            this.SHIP_STORE_INFO = JSON.parse(response.data.data);
        }
      },
      // 获取初始化单对象数据
      async getConfigData() {
        this.loadingAll = true;
        if(this.type == 'list'){
          this.pageMsgId = this.OrderIdFromList;
        }else {
          this.pageMsgId = window.vm.$route.params.customizedModuleId;
        }
        await this.getSensitiveColumns()
        let data = {
          table: 'T_V_OMSONLINEORDER',
          objid: this.pageMsgId,
        };
        // /p/cs/object/query
        network.post('/p/cs/querySingleOrder', data).then((res) => {
          const resultData = res.data || {};
          let SHIP_STORE_INFO = '';
          this.PAYTIME = this.dataShift(res.data.PAYTIME); // 平台付款时间
          this.PAYTIME1 = this.timeShift(res.data.PAYTIME); // 平台付款时间1
          this.CREATIONDATE = this.dataShift(res.data.CREATIONDATE); // 进入系统时间
          this.CREATIONDATE1 = this.timeShift(res.data.CREATIONDATE); // 进入系统时间1
          this.AUDITTIME = this.dataShift(res.data.AUDITTIME); // 订单审核时间
          this.AUDITTIME1 = this.timeShift(res.data.AUDITTIME); // 订单审核时间1
          this.NOTICETIME = this.dataShift(res.data.NOTICETIME); // 推送仓库时间
          this.NOTICETIME1 = this.timeShift(res.data.NOTICETIME); // 推送仓库时间1
          this.SCANTIME = this.dataShift(res.data.SCANTIME); // 仓库出库时间
          this.SCANTIME1 = this.timeShift(res.data.SCANTIME); // 仓库出库时间1
          this.PLATNOTICETIME = this.dataShift(res.data.PLATNOTICETIME); // 仓库出库时间
          this.PLATNOTICETIME1 = this.timeShift(res.data.PLATNOTICETIME); // 仓库出库时间1
          this.balanceDiscount =  res.data.BALANCE_DISCOUNT_POST_FEE || 0 // 余额抵扣运费金额
          this.RT_ORDER_ID = res.data.RT_ORDER_ID // 关联订单id
          this.IS_OVERSEAS = res.data.IS_OVERSEAS==1?true: false; // 是否海外进口订单
          // this.BILLCHECKTIME = this.dataShift(res.data.BILLCHECKTIME); // 账单核对时间
          // this.BILLCHECKTIME1 = this.timeShift(res.data.BILLCHECKTIME); // 账单核对时间1
          // 敏感列处理
          // 311524502 oaid为空则不调用，直接展示明文
          this.OAID = res.data.OAID
          this.ISNOTPAY = res.data.ISNOTPAY // 是否添加商品
          this._decryptData = {} // 缓存解密前的数据(修改地址和查看敏感信息要用)
          if(this.encryptColumns.length > 0) {
            const columns = this.encryptColumns

            columns.forEach(col => {
              if(res.data[col]) {
                this._decryptData[col] = res.data[col]
                res.data[col] = '***'
              }
            })
          }
          this._initFormData.mobile = res.data.RECEIVMOBILE

          this.formValidate.name = res.data.RECEIVNAME; // 收件人
          this.formValidate.mobile = res.data.RECEIVMOBILE; // 收件人手机号
          this.formValidate.phone = res.data.RECEIVPHONE; // 收件人电话
          this.formValidate.provinceId = res.data.RECEIVPROVINCE; // 收件人省id
          if(this.formValidate.provinceId ===-1||!this.formValidate.provinceId ){
            this.formValidate.province = res.data.RECEIVPROVINCENAME; // 收件人省
          }else{
            this.formValidate.province = res.data['RECEIVPROVINCE:REGIONNAME']; // 收件人省
          }
          // 如果是海外显示对应
          if (this.IS_OVERSEAS) {
            const { CUSTOMS_CLEARANCE_TYPE, CUSTOMS_CLEARANCE_INFO } = resultData || {};
            this.formValidate.customs_clearance_type = String(CUSTOMS_CLEARANCE_TYPE) || "";
            this.formValidate.customs_clearance_info = CUSTOMS_CLEARANCE_INFO || "";
          }

          this.formValidate.cityId = res.data.RECEIVCITY; // 收件人市id
          if(this.formValidate.cityId ===-1||!this.formValidate.cityId ){
            this.formValidate.city = res.data.RECEIVCITYNAME; // 收件人市
          }else{
            this.formValidate.city = res.data['RECEIVCITY:REGIONNAME']; // 收件人市
          }

          this.formValidate.areaId = res.data.RECEIVAREA; // 收件人区id
          if(this.formValidate.areaId ===-1||!this.formValidate.areaId ){
            this.formValidate.area = res.data.RECEIVAREANAME; // 收件人区
          }else{
            this.formValidate.area = res.data['RECEIVAREA:REGIONNAME']; // 收件人区
          }
          this.formValidate.town = res.data['RECEIVTOWN']; // 收件人四级地址镇
          this.formValidate.detailAddress = res.data.RECEIVADDRESS; // 收件人详细地址
          this.formValidate.countryName = res.data.RECEIVCOUNTRY; // 收件人国家
          this.formValidate.postCode = res.data.RECEIVZIP; // 邮编
          this.BUYERMESSAGE = res.data.BUYERMESSAGE; // 买家备注
          this.formValidate1.SELLERMEMO = res.data.SELLERMEMO; // 卖家备注 内容
          this.formValidate1.ORDERFLAG = res.data.ORDERFLAG; // 卖家备注 旗帜
          this.interDesc = res.data.INSIDEREMARK; // 内部内容备注
          this.wmsDesc = res.data.WMS_REMARK; // WMS备注
          this.SYSREMARK = res.data.SYSREMARK; // 系统备注
          this.OMSID = res.data.OMSID; // 订单编号
          this.PLATFORM = res.data.PLATFORM; // 平台
          this.PLATFORMText = res.data['PLATFORM:PLATFORMNAME']; // 平台Text
          this.ORDERSHOPNAME = res.data.ORDERSHOPNAME; // 下单店铺
          this.ORDERSHOPID = res.data.ORDERSHOPID // 下单店铺id
          this.SOURCECODE = res.data.SOURCECODE; // 系统单号
          this.TID = res.data.TID; // 平台单号（新）
          this.DISPUTE_ID = res.data.DISPUTE_ID; // 平台换货单号
          this.ORDERTYPE = res.data.ORDERTYPE; // 单据类型
          this.ORDERDATE = res.data.ORDERDATE; // 下单时间
          this.PAYTYPE = res.data['PAYTYPE:DISPLAY']; // 支付方式
          this.SHIPPERID = res.data['SHIPPERID:NAME']; // 物流公司
          this.LOGISTICSNUMBER = res.data.LOGISTICSNUMBER; // 物流单号
          this.EXPRESSQUERYADDRESS=res.data.EXPRESSQUERYADDRESS; // 物流公司
          this.WEIGHT = res.data.WEIGHT; // 预估包裹重量
          this.REAL_WEIGHT = res.data.REAL_WEIGHT; // 实际包裹重量
          this.formValidate.buyNickname = res.data.USERNICK; // 买家昵称
          this.formValidate.real_receiver_display_nick = res.data.RECEIVERNICK; // 收货人昵称
          this.formValidate.real_receiver_openid = res.data.RECEIVER_OPEN_UID; // 收货人昵称RECEIVER_OPEN_UID
          this.PLATFORMVIPCODE = res.data.PLATFORMVIPCODE; // 平台会员卡号
          this.formValidate.buyopenid = res.data.BUYEROPENUID; // 买家id
          this.wangwangHtml = `<span class="J_WangWang" data-nick=${res.data.USERNICK} data-encryptuid=${res.data.BUYEROPENUID} data-bizdomain="taobao" data-appkey="12585822" data-biztype="1" data-sceneparam='{"toRole":"buyer"，"bizRef": ""}' data-icon="small"></span>`;
          this.rewangwangHtml = `<span class="J_WangWang" data-nick=${res.data.RECEIVERNICK} data-encryptuid=${res.data.RECEIVER_OPEN_UID} data-bizdomain="taobao" data-appkey="12585822" data-biztype="1" data-sceneparam='{"toRole":"buyer"，"bizRef": ""}' data-icon="small"></span>`;

          setTimeout(() => {
            window.Light.init();
          },200)
          this.GOODSSALEAMOUNT = res.data.GOODSSALEAMOUNT; // 商品金额
          this.SHIPPINGFEE = res.data.SHIPPINGFEE; //配送费用
          this.SERVICEFEE = res.data.SERVICEFEE==''?'0':res.data.SERVICEFEE; // 服务费
          this.SUB_ORDER_TAX_FEE_ALL = !res.data.SUB_ORDER_TAX_FEE || res.data.SUB_ORDER_TAX_FEE==''?'0':res.data.SUB_ORDER_TAX_FEE; // 税费
          this.ADJUSTAMOUNT = res.data.ADJUSTAMOUNT; // 调整金额
          this.ORDERDISCOUNTAMOUNT = res.data.ORDERDISCOUNTAMOUNT==''?0:res.data.ORDERDISCOUNTAMOUNT; // 订单优惠金额
          this.DISCOUNTAMOUNT = res.data.DISCOUNTAMOUNT; // 商品优惠金额
          this.ACTUALAMOUNT = res.data.ACTUALAMOUNT; // 订单应收
          this.RECEIVEDAMOUNT = res.data.RECEIVEDAMOUNT; // 已支付金
          this.CODAMOUNT = res.data.CODAMOUNT; // 代收COD货款
          this.ORDERSTATUS = +res.data.ORDERSTATUS; // 进度状态
          this.WMSCANCELSTATUS = +res.data.WMSCANCELSTATUS; // 是否撤回
          this.IESWAREHOUSEID = res.data.IESWAREHOUSEID; // 发货仓库ID
          this.IESWAREHOUSEIDTEXT = res.data['IESWAREHOUSEID:WAREHOUSENAME']; // 发货仓库名称
          this.ORDERSTORENAME = res.data.ORDERSTORENAME; // 下单门店名称
          this.PLATFORMSENDNAME = res.data.PLATFORMSENDNAME; // 发货门店名称
          this.LOGISTICSTYPE = res.data.LOGISTICSTYPE; // 配送方式
          SHIP_STORE_INFO = res.data.SHIP_STORE_INFO// 云仓回传展示信息
          this.SHOW_SYSTEM_SETTLEMENT_PRICE = res.data.SHOW_SYSTEM_SETTLEMENT_PRICE?res.data.SHOW_SYSTEM_SETTLEMENT_PRICE:false //是否展示
          this.ISPRINTLOGISTIC = res.data.ISPRINTLOGISTIC // 是否云雀出库
          this.ORDERFROM = res.data.ORDERFROM
          this.ISSPLIT = res.data.ISSPLIT // 是否拆单
          this.ISMERGE = res.data.ISMERGE // 是否合并


          // 初始其他信息化ALLHOSTNAME
          this.otherInfoParams.ALLHOSTNAME = res.data.ALLHOSTNAME || ''
          this.otherInfoParams.ALLHOSTNO = res.data.ALLHOSTNO || ''
          this.otherInfoParams.PRIVATE_GUIDERNO = res.data.PRIVATE_GUIDERNO || ''
          this.otherInfoParams.PRIVATE_GUIDER_NAME = res.data.PRIVATE_GUIDER_NAME || ''
          this.otherInfoParams.RESERVE_BIGINT01 = res.data.RESERVE_BIGINT01 || ''
          this.otherInfoParams.PERSONAL_GUIDER_NO = res.data.PERSONAL_GUIDER_NO || ''
          this.otherInfoParams.PERSONAL_GUIDER_NAME = res.data.PERSONAL_GUIDER_NAME|| ''
          this.otherInfoParams.PERSONAL_GUIDER_WID = res.data.PERSONAL_GUIDER_WID|| ''
          this.otherInfoParams.SALE_NICK = res.data.SALE_NICK|| ''
          this.otherInfoParams.SALE_ID = res.data.SALE_ID|| ''
          this.otherInfoParams.SALE_PHONE = res.data.SALE_PHONE|| ''
          this.otherInfoParams.PLATFORMSENDNAME = res.data.PLATFORMSENDNAME|| ''
          this.otherInfoParams.PLATFORMSENDCODE = res.data.PLATFORMSENDCODE|| ''
          this.otherInfoParams.EXPSHIPDATE = res.data.EXPSHIPDATE|| ''
          this.otherInfoParams.ESTIMATED_RETURN_TIME = res.data.ESTIMATED_RETURN_TIME || ''

          // this.otherInfos[0].value = res.data.PRIVATE_GUIDERNO
          // this.otherInfos[1].value = res.data.PRIVATE_GUIDER_NAME
          // this.otherInfos[2].value = res.data.RESERVE_BIGINT01
          // this.otherInfos[3].value = res.data.PERSONAL_GUIDER_NO
          // this.otherInfos[4].value = res.data.PERSONAL_GUIDER_NAME
          // this.otherInfos[5].value = res.data.PERSONAL_GUIDER_WID
          // this.otherInfos[6].value = res.data.PLATFORMSENDNAME
          // this.otherInfos[7].value = res.data.PLATFORMSENDCODE
          // this.otherInfos[8].value = res.data.EXPSHIPDATE
          this.otherInfos.forEach(item => {
            item.value = res.data[item.field]
          })

          if(this.PLATFORM == 57){
            network.post('/p/cs/getToken',  {ORDERSHOPID: res.data.ORDERSHOPID}).then((res1) => {
              if(res1.data.code == 0){
                // this.douyinData.text = this.formValidate.name+','+this.formValidate.mobile+','+this.formValidate.province +' '+this.formValidate.city+' '+this.formValidate.area+' '+this.formValidate.town+"<br/>"+this.formValidate.detailAddress+'  '+(this.formValidate.postCode?this.formValidate.postCode:'');
                this.douyinData.token = res1.data.data ? res1.data.data.token:''
                this.douyinData.orderId = this.TID
                this.douyinToken = res1.data.data ? res1.data.data.token:''
              }
            })
          }
          // // 如果下单店铺ID存在获取电商平台档案“订单发货流程校验省市区匹配系统地址”
          // this.getPlatformInfo({ shopId: this.PLATFORM })

          network.post('/p/cs/object/query',  {table: 'T_IESWAREHOUSE',objid: this.IESWAREHOUSEID}).then((res) => {
                this.ISJOINTWMS=res.data.ISJOINTWMS //WMS未对接
                if((this.ORDERSTATUS==1||this.ORDERSTATUS==2 ||(this.ORDERSTATUS==4&&this.WMSCANCELSTATUS==1)) ||(this.ORDERSTATUS==4&&this.ISJOINTWMS==0)){
                  this.showAdd=true
                }else{
                  this.showAdd=false
                }
                if(res.data.WMSCODE == 'O2O' && res.data.ISJOINTWMS == 1){
                  this.isOfflineStoreFlag = true
                }else {
                  this.isOfflineStoreFlag = false
                }
          })

          // 订单状态图片
          if (res.data.ORDERSTATUS == '1') {
            this.orderStatusImg = require('../../assets/orderEditorImg/unconfirmed.png'); // 未确认
            this.canModify=true //可以修改地址
          } else if (res.data.ORDERSTATUS == '2') {
            this.orderStatusImg = require('../../assets/orderEditorImg/outOfStock.png'); // 缺货
            this.canModify=true //可以修改地址
          } else if (res.data.ORDERSTATUS == '3') {
            this.orderStatusImg = require('../../assets/orderEditorImg/reviewed.png'); // 已审核
          } else if (res.data.ORDERSTATUS == '4') {
            this.orderStatusImg = require('../../assets/orderEditorImg/distributioning.png'); // 配货中
            this.canModify=true //可以修改地址
          } else if (res.data.ORDERSTATUS == '5') {
            this.orderStatusImg = require('../../assets/orderEditorImg/warehouseDelivery.png'); // 仓库发货
          } else if (res.data.ORDERSTATUS == '6') {
            this.orderStatusImg = require('../../assets/orderEditorImg/platformDelivery.png'); // 平台发货
          } else if (res.data.ORDERSTATUS == '7') {
            this.orderStatusImg = require('../../assets/orderEditorImg/cancel.png'); // 已取消
          } else if (res.data.ORDERSTATUS == '8') {
            this.orderStatusImg = require('../../assets/orderEditorImg/toVoid.png'); // 系统作废
          } else if (res.data.ORDERSTATUS == '21') {
            this.orderStatusImg = require('../../assets/orderEditorImg/WMSing.png'); // 待传wms
          } else if (res.data.ORDERSTATUS == '50') {
            this.orderStatusImg = require('../../assets/orderEditorImg/toAllocated.png'); // 待分配
          }
          this.htmlTip = '';
          // resultData
          if(resultData.ISLIVEORDER === 1){
            this.ALLHOST_info.ALLHOSTNO = resultData.ALLHOSTNO;
            this.ALLHOST_info.ALLHOSTNAME = resultData.ALLHOSTNAME;
            this.tipType = 'HOSTTYPE';
          }
          if(resultData.IS_SAMPLE_CLOTHES_SHOP == 1){
            // 样衣
            this.IS_SAMPLE_CLOTHES_SHOP = 1
            this.otherInfos.forEach(item => {
              if(item.field === 'ESTIMATED_RETURN_TIME'){
                item.value = resultData.ESTIMATED_RETURN_TIME || '';
                item.disabled = false
              }
            })
          }
          console.log(resultData,'=======1212')
          Object.keys(resultData).forEach(resKey => {
            const resVal =  resultData[resKey] || '';
            if (resVal) {
              const joinKey = `${resKey}:${resVal}`;
              console.log(joinKey,'joinKey')
              const orderSignItem = this.orderSignMap[joinKey] || null;

              if (orderSignItem) {
                this.htmlTip += `<span class="order-sign-cell ${orderSignItem.className}" data-key="${joinKey}">${orderSignItem.label}</span>`
              }
            }
          })
          if(this.htmlTip.includes('送礼单') !== true){
            this.formValidate.real_receiver_display_nick = '';
          }
       
          // 订单标识
          // this.gridJsStatusArray.map((item) => {
          //   if (item.filter) {
          //     if (item.filter == 'fn_ReturnStatus') {
          //       if (res.data[item.column] == 10) {
          //         item.showName = ' 退货中';
          //         this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //       } else if (res.data[item.column] == 20) {
          //         item.showName = ' 部分退货';
          //         this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //       } else if (res.data[item.column] == 30) {
          //         item.showName = '全退';
          //         this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //       }
          //     } else if (item.filter == 'fn_OrderTypeColor') {
          //       if (res.data[item.column] == 2) {
          //         this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //       } else {
          //         this.htmlTip += `<div class="order_status ${item.column1}"><div class="order_status_text ${item.column1}_text">${item.showName}</div></div>`;
          //       }
          //     } else if (item.filter == 'fn_OrderFromColor') {
          //       if (res.data[item.column] == '手工新增') {
          //         item.column = 'ORDERFROM';
          //         this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //       } else {
          //         this.htmlTip += `<div class="order_status ${item.column1}"><div class="order_status_text ${item.column1}_text">${item.showName}</div></div>`;
          //       }
          //     } else if (item.filter == 'fn_ArAmountColor') {
          //       this.ARAMOUNT = res.data[item.column]
          //       if (res.data[item.column] > 0) {
          //         this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //       } else {
          //         this.htmlTip += `<div class="order_status ${item.column1}"><div class="order_status_text ${item.column1}_text">${item.showName}</div></div>`;
          //       }
          //     } else if (item.filter == 'fn_paytypeColor') {
          //       if (res.data[item.column] == 2) {
          //         item.showName = ' 到付';
          //         this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //       }
          //     } else if (item.filter == 'fn_PRESALESTATUS') {
          //       if (res.data[item.column] == 10) {
          //         item.showName = ' 尾款已付';
          //         this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //       } else if (res.data[item.column] == 20) {
          //         item.showName = ' 尾款未付';
          //         this.htmlTip += `<div class="order_status ${item.column1}"><div class="order_status_text ${item.column1}_text">${item.showName}</div></div>`;
          //       }
          //     } else if (item.filter == 'fn_PROMISE') {
          //       if (
          //         res.data[item.column] == null
          //         || res.data[item.column] != undefined
          //       ) {
          //         item.showName = ' 天猫时效';
          //         item.title = '天猫时效订单业务';
          //         item.column = 'ORDERTYPEtwo'; // bg_00
          //         this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //       } else if (
          //         res.data[item.column] == 'tmallpromise.arrival.timing'  //揽收时效
          //       ) {
          //         if (res.data.SIGNTIME != null) {
          //           item.showName = '到货时效';
          //           item.title = `${res.data.SIGNTIME}前未签收可能造成赔付`;
          //           this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //         } else {
          //           item.showName = ' 到货时效';
          //           item.title = '到货时效前前未签收可能造成赔付';
          //           this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //         }
          //       } else if (
          //         res.data[item.column] == 'tmallpromise.consign.timing'
          //       ) {
          //         if (res.data.COLLECTTIME != null) {
          //           item.showName = ' 发货时效';
          //           item.title = `${res.data.COLLECTTIME}前未发货造成赔付`;
          //           this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //         } else {
          //           item.showName = ' 发货时效';
          //           item.title = '发货时效前未发货造成赔付';
          //           this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //         }
          //       } else if (
          //         res.data[item.column]
          //         == 'tmallpromise.arrival.timing,tmallpromise.consign.timing'
          //       ) {
          //         if (res.data.COLLECTTIME != null) {
          //           item.showName = ' 发货时效';
          //           item.title = `${res.data.COLLECTTIME}前未发货造成赔付`;
          //           this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //         } else {
          //           item.showName = ' 发货时效';
          //           item.title = '发货时效前未发货造成赔付';
          //           this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //         }
          //       } else if (
          //         res.data[item.column]
          //         == 'tmallpromise.consign.timing,tmallpromise.arrival.timing'
          //       ) {
          //         if (res.data.COLLECTTIME != null) {
          //           item.showName = ' 发货时效';
          //           item.title = `${res.data.COLLECTTIME}前未发货造成赔付`;
          //           this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //         } else {
          //           item.showName = ' 发货时效';
          //           item.title = '发货时效前未发货造成赔付';
          //           this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //         }
          //       } else {
          //         item.column = 'ORDERTYPEtwo'; // bg_00
          //         this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //       }
          //     } else if (item.filter == 'fn_LOGISTICSSTATUS') {
          //       if (res.data.KDN_STATUS == '1') {
          //         item.showName = '已揽收';
          //         this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //       } else if (res.data.KDN_STATUS == '2') {
          //         item.showName = '在途中';
          //         this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //       } else if (res.data.KDN_STATUS == '3') {
          //         item.showName = '签收';
          //         this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //       } else if (res.data.KDN_STATUS == '4') {
          //         item.showName = '问题件';
          //         this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //       } else if (res.data.LOGISTICS_STATUS == '1') {
          //         item.showName = '已签收';
          //         this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //       } else if (res.data.LOGISTICS_STATUS == '2') {
          //         item.showName = '物流更新中';
          //         this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //       }
          //     }else if(item.filter == 'fn_Preisinterecept'){
          //       if (res.data.PREISINTERECEPT == '10') {
          //         item.showName = '预售拦';
          //         this.htmlTip += `<div class="order_status ${item.column1}"><div class="order_status_text ${item.column1}_text">${item.showName}</div></div>`;
          //       } else if (res.data.PREISINTERECEPT == '20') {
          //         item.showName = '预售';
          //         this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //       }
          //     }else if(item.filter == 'fn_manualAudit'){
          //       if (res.data.AUTOAUDITSTATUS == '2') {
          //         this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //       }
          //     }else if(item.filter == 'fn_allhost'){
          //       if(res.data.ISLIVEORDER === 1){
          //         item.showName = '直播';
          //         item.ALLHOSTNO = res.data.ALLHOSTNO;
          //         item.ALLHOSTNAME = res.data.ALLHOSTNAME;
          //         this.tipType = 'HOSTTYPE'
          //         // this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //       }
          //     }else if(item.filter == 'fn_WMSCANCELSTATUS'){ // 从WMS撤回状态
          //       if (res.data.WMSCANCELSTATUS == '1') {
          //         item.showName = '撤回成功';
          //         this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //       } else if (res.data.WMSCANCELSTATUS == '2') {
          //         item.showName = '撤回失败';
          //         this.htmlTip += `<div class="order_status ${item.column1}"><div class="order_status_text ${item.column1}_text">${item.showName}</div></div>`;
          //       }
          //     }else if(item.filter == 'fn_CAPITAL_OCCUPATION_STATUS'){ // 资金不足
          //       if (res.data.CAPITAL_OCCUPATION_STATUS == '2') {
          //         item.showName = '资金不足';
          //         this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //       }
          //     }
          //   } else if (res.data[item.column] == 1) {
          //     this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //   } else if (res.data[item.column] == 'Y') {
          //     this.htmlTip += `<div class="order_status ${item.column}"><div class="order_status_text ${item.column}_text">${item.showName}</div></div>`;
          //   }
          // });

          // 卖家备注旗子
          if (this.formValidate1.ORDERFLAG == '0') {
            document.getElementsByClassName('changeColor')[0].style.color = 'grey';
          } else if (this.formValidate1.ORDERFLAG == '1') {
            document.getElementsByClassName('changeColor')[0].style.color = '#eb4832';
          } else if (this.formValidate1.ORDERFLAG == '2') {
            document.getElementsByClassName('changeColor')[0].style.color = 'yellow';
          } else if (this.formValidate1.ORDERFLAG == '3') {
            document.getElementsByClassName('changeColor')[0].style.color = 'green';
          } else if (this.formValidate1.ORDERFLAG == '4') {
            document.getElementsByClassName('changeColor')[0].style.color = '#25adeb';
          } else if (this.formValidate1.ORDERFLAG == '5') {
            document.getElementsByClassName('changeColor')[0].style.color = 'purple';
          } else if (this.formValidate1.ORDERFLAG == '6') {
            document.getElementsByClassName('changeColor')[0].style.color = 'pink';
          } else if (this.formValidate1.ORDERFLAG == '7') {
            document.getElementsByClassName('changeColor')[0].style.color = '#51ef15';
          } else if (this.formValidate1.ORDERFLAG == '8') {
            document.getElementsByClassName('changeColor')[0].style.color = 'orange';
          } else if (this.formValidate1.ORDERFLAG == '9') {
            document.getElementsByClassName('changeColor')[0].style.color = '#2538eb';
          }
          // 步骤条状态
          if (this.ORDERSTATUS == 12) {
            // 进入账单核对
            this.currentStep = 7;
          } else if (this.ORDERSTATUS == 6) {
            // 进入平台发货
            this.currentStep = 6;
          } else if (this.ORDERSTATUS == 5) {
            // 进入仓库出货
            this.currentStep = 5;
          } else if (res.data.NOTICETIME != '') {
            // 进入通知配货
            this.currentStep = 4;
          } else if (
            this.ORDERSTATUS == 4
            || this.ORDERSTATUS == 21
            || this.ORDERSTATUS == 3
          ) {
            // 进入订单审单
            this.currentStep = 3;
          } else if (this.ORDERSTATUS == 7) {
            if (res.data.AUDITTIME != '') {
              this.currentStep = 3;
            } else if (res.data.NOTICETIME != '') {
              this.currentStep = 4;
            } else {
              this.currentStep = 2;
            }
          } else {
            this.currentStep = 2;
          }

          let steps = document.getElementsByClassName('step');
          for (let i = 0; i < steps.length; i++) {
            if (i < this.currentStep) {
              steps[i].className = 'step stepItem1';
            } else {
              document.getElementsByClassName('stepData')[i].innerHTML = '';
              document.getElementsByClassName('stepTime')[i].innerHTML = '';
            }
          }
          this.getProvinceList();
          this.getTableInfoData(); // 订单明细

          //更新日志
          this.$refs.getOperationLog.getInfoData()

          this.SHIP_STORE_INFO = SHIP_STORE_INFO?JSON.parse(SHIP_STORE_INFO):[]

          this.loadingAll = false;
        });
      },
      /**
       * 获取电商平台档案中订单发货流程校验省市区匹配系统地址
       * @param {*} str 
       * @returns 
       */
      async getPlatformInfo(option) {
        const { shopId } = option;
        if (!shopId) {
          return;
        }
        const params = {
          table: 'T_OMSPLATFORM',
          objid: shopId
        };
        const res = await network.post('/p/cs/getObject ', urlSearchParams(params))
        const resData = res.data || {};
        const { code, data } = resData || {};
        if (code == 0) {
          const forms = data.addcolums[0].childs;
          // 订单发货流程校验省市区匹配系统地址
          const formItem = forms.find(item => item.colname === 'EFFECTSYSTEMADDRESS');
          if (formItem) {
            const curVal = formItem.valuedata;// 为N时去掉必填选项，除姓名外不校验任何收货人信息
            if (this.isNotCheckReceiver != curVal) {
              this.isNotCheckReceiver = curVal;
              this.switchReceiverIsMust()
            }
          }
        }
      },
      switchReceiverIsMust() {
        const defaultValidate = {
          name: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
        }
        const validateProvince = (rule, value, callback) => {
          if (value === '') {
            callback(new Error('收件人省不能为空'));
          } else {
            callback();
          }
        };
        const validateCity = (rule, value, callback) => {
          if (value === '') {
            callback(new Error('收件人市不能为空'));
          } else {
            callback();
          }
        };
        // 收货人地址校验：不能为纯数字
        const validateReceiveAddress = (rule, value, callback) => {
          const rAddress = this.formValidate.detailAddress;
          if (!rAddress) {
            return callback(new Error('收货人地址不能为空!'));
          }
          return callback();
        };
        const otherValidate = {
          province: [{ required: true, validator: validateProvince, trigger: 'change' }],
          city: [{ required: true, validator: validateCity, trigger: 'change' }],
          customs_clearance_info:[{required:true,message:'请输入证件号码',trigger:'blur'}],
          detailAddress: [{
            validator: validateReceiveAddress,
            required: true,
            trigger: 'blur'
          }],
        }
        if (this.isNotCheckReceiver == "N") {
          this.ruleValidate = defaultValidate;
        } else {
          this.ruleValidate = {
            ...defaultValidate,
            ...otherValidate,
          };
        }
      },
      // 获取省市区
      getProvinceList() {
        // 省
        let virtual = {
          table: 'T_OMSREGION_PROVINCE',
          isdroplistsearch: true,
          range: 1000,
          startindex: 0,
        };
        network.post('/p/cs/list/query', virtual).then((res) => {
          this.provinceList = res.data.rows.map((item) => ({
            value: item.ID.val,
            label: item.REGIONNAME.val,
          }));
          // 获取省列表
          if(this.encryptColumns.includes('RECEIVPROVINCENAME') || this.encryptColumns.includes('RECEIVPROVINCE:REGIONNAME')) {
            this.selectProvince(this._decryptData.RECEIVPROVINCENAME || this._decryptData['RECEIVPROVINCE:REGIONNAME'])
          } else {
            this.selectProvince(this.formValidate.province);
          }
        });
      },
      // 选择省份
      selectProvince(val) {
        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,
            }));
            console.log(222,this.smartCity)
            // 获取市列表
            if (this.smartCity) { //智能识别市就获取市ID
              this.getCityNum(this.smartCity);
            } else {//识别不到就通过默认的选择
              console.log(1111,this.formValidate.city)
              if(this.encryptColumns.includes('RECEIVCITYNAME') || this.encryptColumns.includes('RECEIVCITY:REGIONNAME')) {
                this.selectCity(this._decryptData.RECEIVCITYNAME || this._decryptData['RECEIVCITY:REGIONNAME'])
              } else {
                this.selectCity(this.formValidate.city);
              }
            }
          });
        }

      },
      // 选择市
      selectCity(val) {
        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( this.areaList.length==0){  //没有区就不要
              this.formValidate.areaId = '';
              this.formValidate.area = '';
            }
            if (this.smartArea) { //智能识别到区获取区ID
              this.getAreaNum(this.smartArea,data.value);
            }
          });
        }
      },
      // 点击后获取市
      selectProvinceBtn(val) {
        let data = this.provinceList.find((item) => item.label == val);
        if(data){
          this.formValidate.provinceId=data.value;
          this.formValidate.province=data.label;

          this.formValidate.areaId='';
          this.formValidate.area='';

          this.formValidate.cityId='';
          this.formValidate.city='';
          // 市
          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,
            }));
            // 获取市列表
            this.areaList = [];
          });
        }

      },
      // 点击后选择区
      selectAreaBtn(val) {
        let data = this.areaList.find((item) => item.label == val);
        if (data) {
          this.formValidate.areaId = data.value;
          this.formValidate.area = data.label;
        }else{
          this.formValidate.areaId = '';
          this.formValidate.area = '';
        }
      },
      // 点击后获取市
      selectCityBtn(val) {
        let data = this.cityList.find((item) => item.label == val);
        if (data) {
          this.formValidate.cityId=data.value;
          this.formValidate.city=data.label;

          this.formValidate.areaId='';
          this.formValidate.area='';
          // 市
          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( this.areaList.length==0){  //没有区就不要
              this.formValidate.areaId = '';
              this.formValidate.area = '';
            }
            // 获得区县
          });
        }
      },
      // 订单明细
      getTableInfoData() {
        let virtual = {
          table: 'T_V_GETORDER', // 视图表
          isdroplistsearch: true,
          range: this.pageSize*this.currentPage,
          startindex: 0,
          orderby: [{ asc: true, column: 'T_V_GETORDER.TID' }], // 日志排序
          fixedcolumns: { OMSONLINEORDERID: [`=${this.pageMsgId}`] },
        };
        network.post('/p/cs/list/query', virtual).then((res) => {
          this.tableData = [];
          this.total = res.data.total;
          let data = [];
          // let STANDARDPRICE=''
          // let SELLPRICE=''
          for (let i = 0; i < res.data.rows.length; i++) {
            for (let j = 0; j < Object.keys(res.data.rows[i]).length; j++) {
              let keyName = Object.keys(res.data.rows[i])[j];
              res.data.rows[i][keyName] = res.data.rows[i][keyName].val;
            }
            // 计算字符串的px长度
            let arrpx= res.data.rows[i].QRCODE.pxWidth('normal 12px Robot')
            if(arrpx>110){
              res.data.rows[i].tip='数据超长，当前仅展示部分，点击可复制全部内容到剪切板'
            }else{
              res.data.rows[i].tip='点击可复制内容'
            }
            let SkuNamePx=res.data.rows[i].SKUNAME.pxWidth('normal 12px Robot')
            // 系统名
            if(SkuNamePx>72){
              res.data.rows[i].SkuNameTip=true
            }else{
              res.data.rows[i].SkuNameTip=false
            }
            // SKU
            if(res.data.rows[i].SKU.pxWidth('normal 12px Robot')>93){
               res.data.rows[i].SkuTip=true
            }else{
               res.data.rows[i].SkuTip=false
            }
            //商品编码
            if(res.data.rows[i].PRODUCTCODE.pxWidth('normal 12px Robot')>70){
               res.data.rows[i].PRODUCTCODETip=true
            }else{
               res.data.rows[i].PRODUCTCODETip=false
            }
            // 国标码
            if(res.data.rows[i].GBCODE.pxWidth('normal 12px Robot')>87){
               res.data.rows[i].GBCODETip=true
            }else{
               res.data.rows[i].GBCODETip=false
            }

            data.push(res.data.rows[i]);
          }

          this.tableData = data;
          this.spinShow=false
          this.canLoad=true
          // this.tableData=this.tableData.concat(data)
          // // 数组去重
          //  var obj = {};
          //   this.tableData = this.tableData.reduce(function(item, next) {
          //     obj[next.ID] ? '' : obj[next.ID] = true && item.push(next);
          //     return item;
          // }, []);
          if(data.length<this.pageSize*this.currentPage){
            this.isScroll=false
          }
          // 订单明细表数据
          this.tableData.map((item) => {
            if(item.PICPATH){
              if(item.PICPATH[0]=='['){
                let arr=JSON.parse(item.PICPATH)
                if(arr instanceof Array){
                  item.PICPATH=arr[0].URL
                }
              }
            }
            if (item.SKUSPEC != '') {
              item.options = [
                {
                  label: (item.NORMS2NAME || '')+'('+(item.NORMS2CODE || '')+'),'+(item.NORMS1NAME || '')+'('+(item.NORMS1CODE || '')+')',
                  value: item.SKU,
                },
              ];
            } else {
              item.options = [];
            }
          });
          // 订单退货状态
          this.enumDataRefundStatus.map((returnStatus) => {
            this.tableData.map((returnStatuscode) => {
              if (returnStatus.id == returnStatuscode.REFUNDSTATUS) {
                returnStatuscode.REFUNDSTATUS_text = returnStatus.text;
              }
            });
          });
          // 是否赠品
          // this.enumDataYES.map((isSend) => {
          //   this.tableData.map((returnStatuscode) => {
          //     // 订单明细是否赠品渲染
          //     if (isSend.id == returnStatuscode.ISGIFT ||isSend.text == returnStatuscode.ISGIFT) {
          //       returnStatuscode.ISGIFT_text = isSend.text;
          //     }
          //   });
          // });
          this.tableData.forEach(item => {
            if(item.GIFT_TYPE == '系统赠品' || item.GIFT_TYPE == '平台赠品'){
              item.ISGIFT_text = '是'
            }else {
              item.ISGIFT_text = '否'
            }
          })
          if(this.detailShowType == 'classicStyle'){
            this.tableCurrentData = this.tableData.slice(this.pageSize*(this.currentPage - 1),this.pageSize*this.currentPage)
          }
          this.setSensitiveColumns(this.tableData)
          
        });
      },

      // 获取敏感列
      async getSensitiveColumns() {
        await network.post(`/p/cs/query/protect/column?hash=${+new Date()}`, {
          table: 'T_V_GETORDER'
        }).then(res=> {
          if (res.data.code == 0) {
            const data = res.data.data
            const encryptColumns = data.UNREADCOLUMUS // 加密字段
            const disableColumns = data.UNWRITECOLUMUS // 不可编辑字段
            this.encryptColumns = []
            this.disableColumns = []

            if(encryptColumns) {
              this.encryptColumns = encryptColumns.split(';')
            }

            if(disableColumns) {
              this.disableColumns = disableColumns.split(';')
            }
          }
        })
      },

      // 敏感列设置
      setSensitiveColumns(tableData) {
        if(this.encryptColumns.length > 0) {
            const fieldList = this.encryptColumns
            tableData.forEach(row => {
              fieldList.forEach(field => {
                row[`_decrypt_${field}`] = row[field] // 缓存解密前数据
                row[field] = '***'
              })
            })
          }
      },

      // 商品明细包裹明细分页事件
      changePage(val) {
        this.currentPage = val;
        this.getTableInfoData();
      },
      changeSize(val) {
        this.pageSize = val;
        this.getTableInfoData();
      },

      // 审核按钮
      auditorder() {
        let data = {
          orderids: [this.OMSID],
          ismerge: true
        };
        network.post('/p/cs/auditorder', data).then((res)=>{
          if (res.data.code == 0) {
            this.$Message.success('操作成功');
            this.getConfigData();  // 重新获取订单信息
          } else if (res.data.code == 10) {
            // return this.$Modal.fcWarning({
            //   title: '提示',
            //   width: 500,
            //   mask: true,
            //   content: res.data.message
            // });
            this.getConfigData();  // 重新获取订单信息
            let msg = res.data.message;
            let mergeIds = res.data.data.mergeIds;
            let refresh = this.searchClickData;
            this.$R3Dialog({
              dialogComponentName: 'BatchAudit', // 自定义的弹框组件
              title: '审核', // 弹框标题
              footerHide: true,
              externalOptions: {
                massage: msg,
                mergeIds,
                type: 'detail',
                refresh
              }
            }, () => {

              // this.batchExport(event); // 调用框架导出
            });
          }
        })
      },

      // 返回上一页按钮
      return1() {
        if(this.type == 'list'){
          this.$emit('closeOrderDetail',false)
        }else {
          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_OMSONLINEORDER',
              tableId:'10883',
              back:true
            });
          },0)
        }
      },
      // 添加赠品搜索SKU按钮
      searchSKUBtn(){
         let that = this;
          if (!that.formValidate3.NUM) {
            that.$Message.warning('请输入数量');
            return;
          }
          let arr = this.SKUData.find(
            (item) => item.SKU == that.formValidate3.SKU
          );
          if (arr) {
            arr.NUM = that.formValidate3.NUM;
            let canSelect = false;
            //  有匹配到的数据
            that.giftTableDataAdd.forEach((item) => {
              if (item.SKU == arr.SKU) {
                //  表格中已经有数据，只要数量变
                item.NUM = item.NUM * 1 + arr.NUM * 1;
                canSelect = true;
              }
            });
            if (!canSelect) {
              //  表格中没有该数据，直接添加
              that.giftTableDataAdd.push(JSON.parse(JSON.stringify(arr)));
            }
          } else {
            this.$Message.error('不存在该商品');
          }
      },
      // 添加赠品搜索SKU
      searchSKU(e) {
        if (e.keyCode == 13) {
          let that = this;
          if (!that.formValidate3.NUM) {
            that.$Message.warning('请输入数量');
            return;
          }
          let arr = this.SKUData.find(
            (item) => item.SKU == that.formValidate3.SKU
          );
          if (arr) {
            arr.NUM = that.formValidate3.NUM;
            let canSelect = false;
            //  有匹配到的数据
            that.giftTableDataAdd.forEach((item) => {
              if (item.SKU == arr.SKU) {
                //  表格中已经有数据，只要数量变
                item.NUM = item.NUM * 1 + arr.NUM * 1;
                canSelect = true;
              }
            });
            if (!canSelect) {
              //  表格中没有该数据，直接添加
              that.giftTableDataAdd.push(JSON.parse(JSON.stringify(arr)));
            }
          } else {
            this.$Message.error('不存在该商品');
          }
        }
      },

      // 替换商品搜索SKU按钮
      searchSKU1Btn(){
        let that = this;
        let arr = this.SKUData.find(
          (item) => item.SKU == that.formValidate4.SKU
        );
        if (arr) {
          let canSelect = false;
          //  有匹配到的数据
          that.goodsTableDataModify.forEach((item) => {
            if (item.SKU == arr.SKU) {
              //  表格中已经有数据，只要数量变
              item.NUM = Number(item.NUM)+Number(that.formValidate4.NUM)
              canSelect = true;
            }
          });
          if (!canSelect) {
            //  表格中没有该数据，直接添加
            // that.goodsTableDataModify = [JSON.parse(JSON.stringify(arr))];
            // 优先用被替换sku的金额和数量
            const originSku = this.submitArr && this.submitArr[0]
            arr.NUM = that.formValidate4.NUM || originSku.NUM;
            arr.ACTUALAMOUNT = that.formValidate4.ACTUALAMOUNT || originSku.ACTUALAMOUNT;
            that.goodsTableDataModify.push(JSON.parse(JSON.stringify(arr)));
          } else {
            that.$Message.error('该商品已存在');
          }
        } else {
          this.$Message.error('不存在该商品');
        }
      },
      // 替换商品搜索SKU
      searchSKU1(e) {
        if (e.keyCode == 13) {
          let that = this;
          let arr = this.SKUData.find(
            (item) => item.SKU == e.target.value
          );
          if (arr) {
            this.formValidate4.SKU = arr.value
            let canSelect = false;
            //  有匹配到的数据
            that.goodsTableDataModify.forEach((item) => {
              if (item.SKU == arr.SKU) {
                //  表格中已经有数据，只要数量变
                canSelect = true;
              }
            });
            if (!canSelect) {
              //  表格中没有该数据，直接添加
              // that.goodsTableDataModify = [JSON.parse(JSON.stringify(arr))];
              // 优先用被替换sku的金额和数量
              const originSku = this.submitArr && this.submitArr[0]
              arr.NUM = that.formValidate4.NUM || originSku.NUM;
              arr.ACTUALAMOUNT = that.formValidate4.ACTUALAMOUNT || originSku.ACTUALAMOUNT;
              that.goodsTableDataModify.push(JSON.parse(JSON.stringify(arr)));
            } else {
              that.$Message.error('该商品已存在');
            }
          } else {
            this.$Message.error('不存在该商品');
          }
        }
      },
      // 添加赠品数量校验只能为正整数
      checkNum() {
        let val = this.formValidate3.NUM;
        if (val) {
          if (!/(^[1-9]\d*$)/.test(val)) {
            this.$Message.warning('仅可输入正整数');
          }
        }
      },
      // 取消添加赠品
      // 取消修改商品
      cancelModal() {
        this.showAddGiftModal = false; // 添加赠品
        this.formValidate3.SKU = '';
        this.formValidate3.NUM = '';
        this.giftTableDataAdd = [];
        this.showModifyGoodsModal = false; // 修改商品
        this.formValidate4.SKU = '';
        this.formValidate4.NUM = '';
        this.formValidate4.ACTUALAMOUNT = '';
        this.goodsTableDataModify = [];
      },

      // 确定添加赠品
      okAddGift() {
        let sameArr = []; // 以前就有的赠品
        let newArr = []; // 新赠品
        if (!this.giftTableDataAdd.length) {
          this.$Message.error('无赠品可添加');
        } else {
          sameArr = [...this.giftTableDataAdd].filter((x) => [...this.tableData].some((y) => y.SKU == x.SKU &&y.ISGIFT == x.ISGIFT&&y.REFUNDSTATUS!=6&&y.REFUNDSTATUS!=1));
          newArr = [...this.giftTableDataAdd].filter((x) => [...this.tableData].every((y) => (y.SKU != x.SKU) || (y.SKU == x.SKU &&y.ISGIFT != x.ISGIFT) || (y.SKU == x.SKU &&y.ISGIFT == x.ISGIFT&&(y.REFUNDSTATUS==6||y.REFUNDSTATUS==1)) ));
          // for (let i = 0; i < this.tableData.length; i++) {
          //   sameArr.forEach((item) => {
          //     if (item.SKU == this.tableData[i].SKU &&(item.ISGIFT ==this.tableData[i].ISGIFT) &&this.tableData[i].REFUNDSTATUS!=6&&this.tableData[i].REFUNDSTATUS!=1) {
          //       // 有相同项
          //       item.NUM = item.NUM * 1 + this.tableData[i].NUM * 1;
          //       item.ID = this.tableData[i].ID;
          //     }
          //   });
          // }
          // 新添加项
          if (newArr.length) {
            // 新添加项
            newArr = newArr.map((item) => ({
              BASEPRICE:item.BASEPRICE,
              GBCODE: item.GBCODE,
              ID: item.ID,
              IESPRODUCTID: item.IESPRODUCTID,
              NORMS1CODE: item.NORMS1CODE,
              NORMS1NAME: item.NORMS1NAME,
              NORMS2CODE: item.NORMS2CODE,
              NORMS2NAME: item.NORMS2NAME,
              NORMSDETAILIDS: item.NORMSDETAILIDS,
              NORMSDETAILNAMES: item.NORMSDETAILNAMES,
              PICPATH: item.PICPATH,
              PRODUCTCODE: item.PRODUCTCODE,
              SAFENUM: item.SAFENUM,
              SYSSTANDARDPRICE: item.SYSSTANDARDPRICE,
              ORIGINAL_PRICE: item.ORIGINAL_PRICE,
              SUM_FAV_PRICE: item.SUM_FAV_PRICE,
              // PLATSALEPRICE:item.PLATSALEPRICE,
              STORESITE: item.STORESITE,
              TITLE: item.TITLE,
              WARNINGSTOCK: item.WARNINGSTOCK,
              WEIGHT: item.WEIGHT,
              SKU: item.SKU,
              NUM: item.NUM,
              ISGIFT: '1',
              OPERATIONSTATUS: 'CREATE',
            }));
          }
          if (sameArr.length) {
            // 有重复项
            sameArr = sameArr.map((item) => ({
              BASEPRICE:item.BASEPRICE,
              GBCODE: item.GBCODE,
              ID: item.ID,
              IESPRODUCTID: item.IESPRODUCTID,
              NORMS1CODE: item.NORMS1CODE,
              NORMS1NAME: item.NORMS1NAME,
              NORMS2CODE: item.NORMS2CODE,
              NORMS2NAME: item.NORMS2NAME,
              NORMSDETAILIDS: item.NORMSDETAILIDS,
              NORMSDETAILNAMES: item.NORMSDETAILNAMES,
              PICPATH: item.PICPATH,
              PRODUCTCODE: item.PRODUCTCODE,
              SAFENUM: item.SAFENUM,
              STORESITE: item.STORESITE,
              TITLE: item.TITLE,
              WARNINGSTOCK: item.WARNINGSTOCK,
              WEIGHT: item.WEIGHT,
              SYSSTANDARDPRICE: item.SYSSTANDARDPRICE,
              ORIGINAL_PRICE: item.ORIGINAL_PRICE,
              SUM_FAV_PRICE: item.SUM_FAV_PRICE,
              // PLATSALEPRICE:item.PLATSALEPRICE,
              SKU: item.SKU,
              NUM: item.NUM,
              ISGIFT: '1',
              OPERATIONSTATUS: 'CREATE', //UPDATE
            }));
          }
          let sendArr = [];
          sendArr = sendArr.concat(newArr, sameArr);
          let virtual = {
            objId: this.pageMsgId,
            T_OMSONLINEORDERPRODUCT: sendArr,
            T_V_OMSONLINEORDER: {},
          };
          network
            .post('/p/cs/orderDetailsOperation', virtual)
            .then((res) => {
              this.currentPage = 1;
              if (res.data.Code == 0) {
                this.getTableInfoData();
                if(this.ORDERSTATUS==4){
                    network.post('/p/cs/orderShopUpdate', {objid:this.pageMsgId}).then((res1) => {
                      if(res1.data.code==0){
                          this.jumpNewOrder=true
                          setTimeout(()=>{
                            this.jumpNewOrder=false
                            const { fullPath } = this.$route;
                            const {
                              keepAliveModuleName,
                              tableName,
                            } = this.$store.state.global.activeTab;
                            this.$store.commit('global/tabCloseAppoint', {
                              tableName,
                              routeFullPath: fullPath,
                              keepAliveModuleName,
                            // stopRouterPush: true,
                            });
                            // 跳转
                            R3.store.commit('global/tabOpen', {
                                type: 'tableDetailAction' || 'C',
                                label: '订单编辑',
                                customizedModuleName: 'OrderManagementEditor',
                                customizedModuleId: res1.data.data,
                            })
                          },1000)
                      }
                  })
                }else{
                  this.$Message.warning('添加赠品成功');
                  this.showAddGiftModal = false;
                  this.formValidate3.SKU = '';
                  this.formValidate3.NUM = '';
                  this.giftTableDataAdd = [];
                  this.submitArr = []; // 选中订单的情况
                  this.getConfigData();
                }
              } else {
                this.$Message.warning(res.data.Message);
                this.formValidate3.SKU = '';
                this.formValidate3.NUM = '';
                this.giftTableDataAdd = [];
              }
            })
            .catch((error) => {
              if (error.response) {
                if (error.response.status == 500) {
                  this.formValidate3.SKU = '';
                  this.formValidate3.NUM = '';
                  this.giftTableDataAdd = [];
                }
              }
            });
        }
      },
      // 确定修改商品
      okModifyGoods() {
        if (!this.goodsTableDataModify.length) {
          this.$Message.error('请选择替换后商品SKU'); //请添加需要修改的商品
        } else {
          let haveGood1 = false;
          let haveGood = false;
          let ALLACTUALAMOUNT = '';
          try {
            this.goodsTableDataModify.forEach(item => {
              if(item.NUM=='' || item.ACTUALAMOUNT == '') {
                haveGood1 = true;
                this.$Message.error('请输入替换后商品sku的数量和成交金额'); //请输入替换后商品sku的数量和成交金额
                throw Error();
              }
            })
          } catch (e) {
            console.log(e);
          }
          if (!haveGood1) {
            this.goodsTableDataModify.forEach(item => {
              ALLACTUALAMOUNT = Number(ALLACTUALAMOUNT) + Number(item.ACTUALAMOUNT)
            })
            if(Number(ALLACTUALAMOUNT).toFixed(4) !== Number(this.submitArr[0].ACTUALAMOUNT).toFixed(4)){
              haveGood = true;
              return this.$Message.error('替换后商品sku和被替换商品sku的成交金额需保持一致'); //替换后商品sku和被替换商品sku的成交金额需保持一致
            }
          }
          if (!haveGood) {
            let productDTOS = [];
            this.goodsTableDataModify.forEach((item,index) => {
              let obj = {
                "id":item.ID,
                "sku":item.SKU,
                "productCode":item.PRODUCTCODE,
                "num":item.NUM,
                "actualAmount":item.ACTUALAMOUNT
              }
              productDTOS.push(obj);
            })
            let params = {
              onLineOrderId: this.pageMsgId,
              proId: this.submitArr[0].ID,
              productDTOS
            }
            this.loading = true;
            network.post('/p/cs/orderProductUpdate',params).then(res => {
              if (res.data.code == 0) {
                let massage = ''
                this.goodsTableDataModify.forEach((item,index) => {
                  if(index == this.goodsTableDataModify.length - 1){
                    massage += item.SKU;
                  }else {
                    massage += item.SKU+',';
                  }
                })
                let msg={
                  "id": this.pageMsgId,
                  "logType": "订单修改商品",
                  "message": '订单商品由'+this.submitArr[0].SKU+'修改为'+massage
                }
                network.post('/p/cs/order/save/log', msg).then((resLog) => {
                    if(resLog.data.code==0){
                      if(this.ORDERSTATUS==4){
                        network.post('/p/cs/orderShopUpdate', {objid:this.pageMsgId}).then((res1) => {
                          if(res1.data.code==0){
                            this.jumpNewOrder=true
                            setTimeout(()=>{
                              this.jumpNewOrder=false
                              const { fullPath } = this.$route;
                              const {
                                keepAliveModuleName,
                                tableName,
                              } = this.$store.state.global.activeTab;
                              this.$store.commit('global/tabCloseAppoint', {
                                tableName,
                                routeFullPath: fullPath,
                                keepAliveModuleName,
                              // stopRouterPush: true,
                              });
                              // 跳转
                              R3.store.commit('global/tabOpen', {
                                  type: 'tableDetailAction' || 'C',
                                  label: '订单编辑',
                                  customizedModuleName: 'OrderManagementEditor',
                                  customizedModuleId: res1.data.data,
                              })
                            },1000)
                        }

                      })
                      }else{
                        this.formValidate4.SKU = '';
                        this.goodsTableDataModify = [];
                        this.submitArr = []; // 选中订单的情况
                        this.getConfigData();
                        this.showModifyGoodsModal = false;
                      }
                    }
                })
                this.loading = false;
              } else {
                  this.$Message.warning('替换商品失败');
                  this.formValidate4.SKU = '';
                  this.goodsTableDataModify = [];
                  this.submitArr = []; // 选中订单的情况
                  this.loading = false;
              }
            })
            .catch((error) => {
                if (error.response) {
                  if (error.response.status == 500) {
                    this.formValidate4.SKU = '';
                    this.goodsTableDataModify = [];
                  }
                  this.loading = false;
                } else if (error.request) {
                  this.loading = false;
                  console.log(error.request);
                } else {
                  this.loading = false;
                  console.log('Error', error.message);
                }
            });
          }
        }
      },
      // 智能识别获取省编号
      getProvinceNum(province) {
        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) {
            this.formValidate.provinceId = res.data.rows[0].ID.val;
            this.formValidate.province = res.data.rows[0].REGIONNAME.val;
            this.selectProvince(this.formValidate.province);
          }
        });
      },
      // 智能识别获取市编号
      getCityNum(city) {
        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) {
            this.formValidate.cityId = res.data.rows[0].ID.val;
            this.formValidate.city = res.data.rows[0].REGIONNAME.val;
            this.selectCity(this.formValidate.city);
          }
        });
      },
      // 智能识别获取区编号
      getAreaNum(area,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) {
            this.formValidate.areaId = res.data.rows[0].ID.val;
            this.formValidate.area = res.data.rows[0].REGIONNAME.val;
            this.smartProvince = '';
            this.smartCity = '',
            this.smartArea = '';
          }
        });
      },
      // 智能识别回车事件
      searchsmart(e){
        if(e.keyCode == 13) {
          // 智能识别前清空信息
          // this.formValidate.town = ''; // 街道
          this.smartParse()
      }
      },
      // 智能识别
      smartParse() {
        const [smartResult] = AddressParse.parse(this.formValidate.desc);
        this.formValidate.postCode = smartResult.zip_code?smartResult.zip_code:this.formValidate.postCode;
        this.formValidate.detailAddress = smartResult.details?smartResult.details:this.formValidate.detailAddress;
        this.formValidate.mobile = smartResult.mobile?smartResult.mobile:this.formValidate.mobile;
        this.formValidate.name = smartResult.name?smartResult.name:this.formValidate.name;
        this.formValidate.phone = smartResult.phone?smartResult.phone:this.formValidate.phone;
        this.smartProvince = smartResult.province?smartResult.province:this.smartProvince;
        // this.smartCity = smartResult.city;
        this.smartCity = smartResult.city == '省直辖县'?smartResult.area: smartResult.city;  // 跟系统统一，如果识别出的市区为省直辖县，带入识别出来的区
        this.smartArea = smartResult.area
        // 有省
        if (smartResult.province) {
          this.smartProvince = smartResult.province;
          this.getProvinceNum(this.smartProvince);
        }
      },
      // 显示信息
      toShowAll() {
        // axios.post('/p/cs/showProtectData', {
        //   table: "T_V_OMSONLINEORDER",
        //   objid: this.pageMsgId,
        //   columns: ['USERNICK','RECEIVNAME','RECEIVMOBILE','RECEIVADDRESS'],
        //   type: 1
        // })
        // .then(function (response) {
        //   console.log(response);
        // })
        // .catch(function (error) {
        //   console.log(error);
        // });
        this.douyinData.token = '';
        var accountId = JSON.parse(window.localStorage.getItem('userInfo')).ename
        BYTES_OPEN_int({
          accountId: accountId,  // 服务商账号体系中的用户唯一id，每个ISV下需要保证唯一，可选格式：1）独立生成的账户唯一标识
          appKey: '6839479260353299982',         // 应用创建完成后被分配的key
          sensUrls: [               // 配置会访问open侧敏感信息的url-path
          "/p/cs/showProtectData"
          ]
        })

        if (this.canSee) {
          let virtual = {
              table: "T_V_OMSONLINEORDER",
              objid: this.pageMsgId,
              columns: ['USERNICK','RECEIVNAME','RECEIVMOBILE','RECEIVPHONE','RECEIVADDRESS'],
              type: 1
          };
          network.post('/p/cs/showProtectData', virtual).then((res) => {
            try {
              if (res.data.code == 0) {
                  if(res.data.message !== 'SUCCESS'){
                    this.$Modal.fcError({
                      title: '提示',
                      mask:true,
                      content: res.data.message
                    });
                  }
                  let showData = res.data.data;

                  this.formValidate.name = showData.RECEIVNAME; // 收件人
                  // 没有被设置成敏感列，可以赋值
                  if(!this.encryptColumns.includes('RECEIVMOBILE')) {
                    this.formValidate.mobile = showData.RECEIVMOBILE; // 收件人手机号
                  }
                  this.formValidate.detailAddress = showData.RECEIVADDRESS; // 收件人详细地址
                  this.formValidate.buyNickname = showData.USERNICK; // 买家昵称
                  this.formValidate.phone = showData.RECEIVPHONE; // 收件人电话

                  this.hideAll = false;

                  if(showData.showType==1){
                    this.$Message.warning('应淘宝平台要求，售后场景仅能获取到手机号明文信息。')
                  }
                  //更新日志
                  this.$refs.getOperationLog.getInfoData()
                }else if(res.data.code == -3){
                  this.$Modal.fcError({
                      title: '提示',
                      mask:true,
                      content: '您没有查看敏感信息的权限，如需查看请联系管理员至【用户档案】中开通【可查看客户敏感信息】权限。'
                  });
                }
              }catch (e) {
                console.error(e)
                if (e.response) {
                  if (e.response.status == 500) {
                    this.$emit('closeActionDialog', false);
                  }
                }
              }
          })

        } else {
          this.$Message.warning('您没有查看收件人敏感信息权限');
        }
      },

      // // 加密商品的敏感列数据
      // encryptGoodData() {
      //   const fieldList = ['PLATSALEPRICE','ACTUALAMOUNT']
      //   this.tableData.forEach(row => {
      //     fieldList.forEach(field => {
      //       if(row[`_decrypt_${field}`]) {
      //         row[field] = '***'
      //       }
      //     })
      //   })
      // },

      // //解密商品的敏感列数据
      // restoreDecryptGoodData() {
      //   const fieldList = ['PLATSALEPRICE','ACTUALAMOUNT']
      //   this.tableData.forEach(row => {
      //     fieldList.forEach(field => {
      //       if(row[field] === '***') {
      //         row[field] = row[`_decrypt_${field}`]
      //       }
      //     })
      //   })
      // },

      // // 还原敏感列数据
      // restoreDecryptData() {
      //   // 还原敏感列数据
      //   if(this._decryptData.RECEIVPROVINCENAME) {
      //     this.formValidate.province = this._decryptData.RECEIVPROVINCENAME // 省
      //   }
      //   if(this._decryptData['RECEIVPROVINCE:REGIONNAME']) {
      //     this.formValidate.province = this._decryptData['RECEIVPROVINCE:REGIONNAME'] // 省
      //   }
      //   if(this._decryptData.RECEIVCITYNAME) {
      //     this.formValidate.city = this._decryptData.RECEIVCITYNAME // 市
      //   }
      //   if(this._decryptData['RECEIVCITY:REGIONNAME']) {
      //     this.formValidate.city = this._decryptData['RECEIVCITY:REGIONNAME'] // 市
      //   }
      //   if(this._decryptData.RECEIVAREANAME) {
      //     this.formValidate.area = this._decryptData.RECEIVAREANAME // 区
      //   }
      //   if(this._decryptData['RECEIVAREA:REGIONNAME']) {
      //     this.formValidate.area = this._decryptData['RECEIVAREA:REGIONNAME'] // 区
      //   }
      //   if(this._decryptData.RECEIVTOWN) {
      //     this.formValidate.town = this._decryptData.RECEIVTOWN // 四级地址镇
      //   }
      //   if(this._decryptData.RECEIVADDRESS) {
      //     this.formValidate.detailAddress = this._decryptData.RECEIVADDRESS // 详细地址
      //   }
      //   if(this._decryptData.RECEIVZIP) {
      //     this.formValidate.postCode = this._decryptData.RECEIVZIP // 邮编
      //   }
      //   if(this._decryptData.RECEIVNAME) {
      //     this.formValidate.name = this._decryptData.RECEIVNAME // 收件人
      //   }
      //   if(this._decryptData.RECEIVMOBILE) {
      //     this.formValidate.mobile = this._decryptData.RECEIVMOBILE // 手机号
      //   }
      //   if(this._decryptData.RECEIVPHONE) {
      //     this.formValidate.phone = this._decryptData.RECEIVPHONE // 电话
      //   }
      // },

      // 隐藏信息
      toHideAll() {
        this.getConfigData(); // 刷新
        setTimeout(() => {
          this.hideAll = true;
          this.douyinData.token = '';
          this.showOwnText = true;
        },300)
      },

      // 商品明细表格选中某项时触发
      selectData(selection, row) {
        this.submitArrClassicStyle = selection;
      },
      // 商品明细表格取消某项时触发
      selectCancel(selection, row) {
        this.submitArrClassicStyle = selection;
      },
      // 商品明细表格全选
      selectDataAll(selection) {
        this.submitArrClassicStyle = selection;
      },
      // 商品明细表格取消全选
      selectDataCancel(selection) {
        this.submitArrClassicStyle = selection;
      },

      // 添加赠品按钮
      addGift() {
        this.showAddGiftModal = true;
        let virtual = {
          table: 'V_IES_IESSKU',
          isdroplistsearch: false,
          range: 1000,
          startindex: 0,
          fixedcolumns: { ISGROUP: ['<>1'] }, //ISGIFT: ['=1'],
        };
        network.post('/p/cs/list/query', virtual).then((res) => {
          let data = [];
          for (let i = 0; i < res.data.rows.length; i++) {
            for (let j = 0; j < Object.keys(res.data.rows[i]).length; j++) {
              let keyName = Object.keys(res.data.rows[i])[j];
              res.data.rows[i][keyName] = res.data.rows[i][keyName].val;
            }
            data.push(res.data.rows[i]);
          }
          this.SKUData = data;
          this.modifyGoodsArr = this.SKUData.map((item) => ({
            value: item.SKU,
            label: `${item.SKU} ${item.TITLE || '  '} ${item.GBCODE || '  '} ${item.NORMS1NAME || '  '} ${item.NORMS1CODE || '  '} ${item.NORMS2NAME || '  '} ${item.NORMS2CODE || '  '}`,
          }));
        });
      },
      // 删除赠品按钮
      deleteBtn(item){
        if(this.detailShowType == 'classicStyle'){
          for(let i=0;i<this.submitArrClassicStyle.length;i++){
            if(this.submitArrClassicStyle[i].GIFT_TYPE != '系统赠品' && this.submitArrClassicStyle[i].GIFT_TYPE != '平台赠品') {
              return this.$Message.error('已选商品存在非赠品商品，无法删除，请确认！');
            }
          }
          this.submitArr = this.submitArrClassicStyle
        }else {
          this.submitArr=[item]
        }
        this.sureDelate=true
      },
      // 确认删除赠品
      deleteGift() {
        if (this.submitArr.length == 0) {
          this.$Message.info('请选择需要删除的赠品');
        } else {
          let arr = this.submitArr;
          let flag = arr.every(
            (item) => item.ISGIFT_text == '是' || item.ISGIFT == '1' || item.ISGIFT == '是'
          );
          if (!flag) {
            this.$Message.info('选择商品中有明细不为赠品、请重新选择。');
          } else {
            let data = this.submitArr.map(item=>({
                ID: item.ID,
                SKU: item.SKU,
                NUM: item.NUM,
                ISGIFT: '1',
                OPERATIONSTATUS: 'DELETE',
            }));
            let virtual = {
              objId: this.pageMsgId,
              T_OMSONLINEORDERPRODUCT: data,
              T_V_OMSONLINEORDER: {},
            };
            network.post('/p/cs/orderDetailsOperation', virtual).then((res) => {
              if (res.data.Code == 0){
                this.currentPage = 1;
                if(this.ORDERSTATUS==4&&this.submitArr.length!=this.tableData.length){
                    network.post('/p/cs/orderShopUpdate', {objid:this.pageMsgId}).then((res1) => {
                      if(res1.data.code==0){
                          this.jumpNewOrder=true
                          setTimeout(()=>{
                            this.jumpNewOrder=false
                            const { fullPath } = this.$route;
                            const {
                              keepAliveModuleName,
                              tableName,
                            } = this.$store.state.global.activeTab;
                            this.$store.commit('global/tabCloseAppoint', {
                              tableName,
                              routeFullPath: fullPath,
                              keepAliveModuleName,
                            });
                            // 跳转
                            R3.store.commit('global/tabOpen', {
                                type: 'tableDetailAction' || 'C',
                                label: '订单编辑',
                                customizedModuleName: 'OrderManagementEditor',
                                customizedModuleId: res1.data.data,
                            })
                          },1000)
                      }else if(res1.data.code==1){
                        this.$Message.success('赠品删除成功');
                        this.submitArr = [];
                        this.getConfigData();
                      }
                  })
                }else{
                  this.$Message.success('赠品删除成功');
                  this.submitArr = [];
                  this.getConfigData();
                }
              }else{
                this.$Message.error(res.data.Message);
                this.submitArr = [];
                this.getConfigData();
              }
            });
          }
        }
      },

      // 退款完成
      refundComplete(item) {
        if(this.detailShowType == 'classicStyle'){
          this.submitArr = this.submitArrClassicStyle
        }else {
          this.submitArr=[item]
        }
        if (this.submitArr.length == 0) {
          this.$Message.info('请选择需要标记退款完成的商品');
        } else {
          const newArr = cloneDeep(this.submitArr)
          newArr.forEach((item) => {
            item.GOODSDISCOUNTAMOUNT = '0';//商品优惠
            item.MANUALADJUSTAMOUNT = '0';//手工调整金额
            item.SPLITDISCOUNTAMOUNT = '0';//商家优惠平摊
            item.SYSSTANDARDPRICE = '0';//系统标准价
            item.ORIGINAL_PRICE = '0'; // 唯品会平台原价
            item.SUM_FAV_PRICE = '0'; // 唯品会平台优惠活动价
            item.BUYERPAYAMOUNT = '0';//买家支付
            item.PLATUNDERTAKEAMOUNT = '0';//平台承担
            item.ACTUALPRICE = '0';//成交单价
            item.DISCOUNTAMOUNT = '0';//商家优惠金额
            item.ACTUALAMOUNT= '0';//成交金额
            item.REFUNDSTATUS = 6;
          });

          let result = newArr.map((item) => ({
            // ADJUSTAMOUNT: item.ADJUSTAMOUNT,
            DISCOUNTAMOUNT: item.DISCOUNTAMOUNT,
            GBCODE: item.GBCODE,
            GROUPNAME: item.GROUPNAME,
            ID: item.ID,
            ISGIFT: item.ISGIFT=='否'?'0':'1',
            NUM: item.NUM,
            ACTUALAMOUNT: item.ACTUALAMOUNT,

            PRODUCTCODE: item.PRODUCTCODE,
            REFUNDSTATUS: item.REFUNDSTATUS,
            SKU: item.SKU,
            SKUSPEC: item.SKUSPEC,
            SYSSTANDARDPRICE: item.SYSSTANDARDPRICE,
            ORIGINAL_PRICE: item.ORIGINAL_PRICE,
            SUM_FAV_PRICE: item.SUM_FAV_PRICE,
            TITLE: item.TITLE,
          }));
          let virtual = {
            table: 'T_V_OMSONLINEORDER',
            objId: this.pageMsgId,
            fixedData: {
              T_OMSONLINEORDERPRODUCT: result,
              T_V_OMSONLINEORDER: {},
            },
          };
          network.post('/p/cs/order/pro/refund/finish', virtual).then((res) => {  // /p/cs/objectSave
            if (res.data.code == 0) {
              if(this.ORDERSTATUS==4&&this.submitArr.length!=this.tableData.length){
                  network.post('/p/cs/orderShopUpdate', {objid:this.pageMsgId}).then((res1) => {
                    if(res1.data.code==0){
                        this.jumpNewOrder=true
                        setTimeout(()=>{
                          this.jumpNewOrder=false
                          const { fullPath } = this.$route;
                          const {
                            keepAliveModuleName,
                            tableName,
                          } = this.$store.state.global.activeTab;
                          this.$store.commit('global/tabCloseAppoint', {
                            tableName,
                            routeFullPath: fullPath,
                            keepAliveModuleName,
                          // stopRouterPush: true,
                          });
                          // 跳转
                          R3.store.commit('global/tabOpen', {
                              type: 'tableDetailAction' || 'C',
                              label: '订单编辑',
                              customizedModuleName: 'OrderManagementEditor',
                              customizedModuleId: res1.data.data,
                          })
                        },1000)
                      }else if(res1.data.code==1){
                        this.$Message.success('赠品删除成功');
                        this.submitArr = [];
                        this.getConfigData();
                      }
                    })
              }else{
                this.$Message.success('退款完成');
                this.submitArr=[]
                this.getConfigData();
              }
            }
          });
        }
      },
      // 修改商品
      modifyGoods(item) {
        // this.restoreDecryptGoodData()
        // this.submitArr=[item]
        if(this.detailShowType == 'classicStyle'){
          this.submitArr = this.submitArrClassicStyle
        }else {
          this.submitArr=[item]
        }
        if (this.submitArr.length == 0) {
          this.$Message.info('请选择需要修改的商品');
        } else if (this.submitArr.length > 1) {
          this.$Message.info('每次只能修改一个商品');
        } else {
          let giftChange=false
          // ORDERSTATUS:2缺货;
          // ORDERSTATUS:1未确定;
          // ORDERSTATUS:4配货中：WMSCANCELSTATUS:1已撤回
                              // this.IESWAREHOUSEID查表T_IESWAREHOUSE：ISJOINTWMS：0未对接
          let ISJOINTWMS=this.ISJOINTWMS //WMS未对接
          if(this.ORDERSTATUS==1||this.ORDERSTATUS==2 ||(this.ORDERSTATUS==4&&this.WMSCANCELSTATUS==1) ||(this.ORDERSTATUS==4&&ISJOINTWMS==0)){
            // if(this.submitArr[0].ISGIFT_text=='是'){
            //   giftChange=false
            //   this.$Modal.fcWarning({
            //       title: '提示',
            //       content: '赠品商品不支持修改，如需修改请删除赠品后重新添加赠品。',
            //       mask:true,
            //   });
            // }else{
            //   giftChange=true
            // }
            giftChange=true
          }else{
              giftChange=true
          }
          // 是否弹出修改商品弹窗
          if(giftChange){
            this.showModifyGoodsModal = true;
            let virtual = {
              table: 'V_IES_IESSKU',
              isdroplistsearch: true,
              range: 1000,
              startindex: 0,
              fixedcolumns: { ISPRESALE: ['<>1'], ISGROUP: ['<>1'] },
            };
            network.post('/p/cs/list/query', virtual).then((res) => {
              this.SKUData = res.data.rows.map((item) => ({
                SKU: item.SKU.val,
                PRODUCTCODE: item.PRODUCTCODE.val,
                TITLE: item.TITLE.val,
                GBCODE: item.GBCODE.val,
                NORMSDETAILNAMES: item.NORMSDETAILNAMES.val,
                ISGIFT: item.ISGIFT.val,
                ID: item.ID.val,
                NORMS1NAME: item.NORMS1NAME.val,
                NORMS1CODE: item.NORMS1CODE.val,
                NORMS2NAME: item.NORMS2NAME.val,
                NORMS2CODE: item.NORMS2CODE.val,
              }));
              this.modifyGoodsArr = this.SKUData.map((item) => ({
                value: item.SKU,
                label: `${item.SKU} ${item.TITLE || '  '} ${item.GBCODE || '  '} ${item.NORMS1NAME || '  '} ${item.NORMS1CODE || '  '} ${item.NORMS2NAME || '  '} ${item.NORMS2CODE || '  '}`,
              }));
            });
          }
        }
      },
      selectGiftGoods(query){
        //  let virtual = {
        //     table: 'V_IES_IESSKU',
        //     isdroplistsearch: true,
        //     range: 1000,
        //     startindex: 0,
        //     fixedcolumns: { ISGIFT: ['=1'], ISGROUP: ['<>1'] ,SKU: query},
        //   };
        //   network.post('/p/cs/list/query', virtual).then((res) => {
        //     this.SKUData = res.data.rows.map((item) => ({
        //       SKU: item.SKU.val,
        //       PRODUCTCODE: item.PRODUCTCODE.val,
        //       TITLE: item.TITLE.val,
        //       GBCODE: item.GBCODE.val,
        //       NORMSDETAILNAMES: item.NORMSDETAILNAMES.val,
        //       ISGIFT: item.ISGIFT.val,
        //       SYSSTANDARDPRICE:item.SELLPRICE.val, //添加赠品标准金额字段
        //       // PLATSALEPRICE:item.SELLPRICE.val,//添加赠品平台销售价字段
        //     }));

        //     this.modifyGoodsArr = this.SKUData.map((item) => ({
        //       value: item.SKU,
        //       label: `${item.SKU} ${item.TITLE}`,
        //     }));
        //   });
        let index = query.indexOf(' ');
        let queryOne = -1
        if(index > 0){
          queryOne = query.substring(0,query.indexOf(' '));
        }else {
          queryOne = query
        }
        let param = {
          "iesShopId": this.ORDERSHOPID,
          "searchVal": queryOne
        }
        if(this.formValidate3.SKU){
          network.post('/p/cs/search/sku/shopQty', param).then((res) => {
            this.SKUData.SHOPQTY = res.data.data.SHOPQTY
          })
        }
          let params = {
            "page": 1,
            "pageSize": 1000,
            "searchVal": queryOne, //搜索内容(sku或skpu名称)
            // "isgift": '1',
            "isgroup": '0',
            // "iesShopId": this.ORDERSHOPID

          }
          network.post('/p/cs/search/sku/str', params).then((res) => {
            this.SKUData = res.data.data.resultList.map((item) => ({
              SKU: item.SKU,
              PRODUCTCODE: item.PRODUCTCODE,
              TITLE: item.TITLE,
              GBCODE: item.GBCODE,
              NORMSDETAILNAMES: item.NORMSDETAILNAMES,
              ISGIFT: item.ISGIFT,
              SYSSTANDARDPRICE:item.SELLPRICE, //添加赠品标准金额字段
              ORIGINAL_PRICE: item.ORIGINAL_PRICE,
              SUM_FAV_PRICE: item.SUM_FAV_PRICE,
              NORMS1NAME: item.NORMS1NAME,
              NORMS1CODE: item.NORMS1CODE,
              NORMS2NAME: item.NORMS2NAME,
              NORMS2CODE: item.NORMS2CODE,
              SHOPQTY: this.SKUData.SHOPQTY
              // PLATSALEPRICE:item.SELLPRICE.val,//添加赠品平台销售价字段
            }));

            this.modifyGoodsArr = this.SKUData.map((item) => ({
              value: item.SKU,
              label: `${item.SKU} ${item.TITLE || '  '} ${item.GBCODE || '  '} ${item.NORMS1NAME || '  '} ${item.NORMS1CODE || '  '} ${item.NORMS2NAME || '  '} ${item.NORMS2CODE || '  '}`,
            }));
          });
      },
      selectSkuGoods(query){
        //  let virtual = {
        //     table: 'V_IES_IESSKU',
        //     isdroplistsearch: true,
        //     range: 1000,
        //     startindex: 0,
        //     fixedcolumns: { ISPRESALE: ['<>1'], ISGROUP: ['<>1'] ,SKU: query},
        //   };
        //   network.post('/p/cs/list/query', virtual).then((res) => {
        //     this.SKUData = res.data.rows.map((item) => ({
        //       SKU: item.SKU.val,
        //       PRODUCTCODE: item.PRODUCTCODE.val,
        //       TITLE: item.TITLE.val,
        //       GBCODE: item.GBCODE.val,
        //       NORMSDETAILNAMES: item.NORMSDETAILNAMES.val,
        //       ISGIFT: item.ISGIFT.val,
        //       SYSSTANDARDPRICE:item.SELLPRICE.val, //添加赠品标准金额字段
        //       // PLATSALEPRICE:item.SELLPRICE.val,//添加赠品平台销售价字段
        //     }));

        //     this.modifyGoodsArr = this.SKUData.map((item) => ({
        //       value: item.SKU,
        //       label: `${item.SKU} ${item.TITLE}`,
        //     }));
        //   });
          let index = query.indexOf(' ');
          let queryOne = -1
          if(index > 0){
            queryOne = query.substring(0,query.indexOf(' '));
          }else {
            queryOne = query
          }
          let param = {
            "iesShopId": this.ORDERSHOPID,
            "searchVal": queryOne
          }
          if(this.formValidate4.SKU){
            network.post('/p/cs/search/sku/shopQty', param).then((res) => {
              this.SKUData.SHOPQTY = res.data.data.SHOPQTY
            })
          }
          let params = {
            "page": 1,
            "pageSize": 1000,
            "searchVal": queryOne, //搜索内容(sku或skpu名称)
            "ispresale": '0',
            "isgroup": '0',
            // "iesShopId": this.ORDERSHOPID
          }
          network.post('/p/cs/search/sku/str', params).then((res) => {
            this.SKUData = res.data.data.resultList.map((item) => {
              if(item.TITLE) {
                item.TITLE = item.TITLE.replace(/\n|\t|\s/g, '')  // 去掉回车、空格和制表符号
              }
              return {
                ID: item.ID,
                SKU: item.SKU,
                PRODUCTCODE: item.PRODUCTCODE,
                TITLE: item.TITLE, // 去掉回车、空格和制表符号
                GBCODE: item.GBCODE,
                NORMSDETAILNAMES: item.NORMSDETAILNAMES,
                ISGIFT: item.ISGIFT,
                SYSSTANDARDPRICE:item.SELLPRICE, //添加赠品标准金额字段
                ORIGINAL_PRICE:item.ORIGINAL_PRICE,
                SUM_FAV_PRICE: item.SUM_FAV_PRICE,
                NORMS1NAME: item.NORMS1NAME,
                NORMS1CODE: item.NORMS1CODE,
                NORMS2NAME: item.NORMS2NAME,
                NORMS2CODE: item.NORMS2CODE,
                SHOPQTY: this.SKUData.SHOPQTY
                // PLATSALEPRICE:item.SELLPRICE.val,//添加赠品平台销售价字段
              }
            });

            this.modifyGoodsArr = this.SKUData.map((item) => {
              return {
                value: item.SKU,
                label: `${item.SKU} ${item.TITLE || '  '} ${item.GBCODE || '  '} ${item.NORMS1NAME || '  '} ${item.NORMS1CODE || '  '} ${item.NORMS2NAME || '  '} ${item.NORMS2CODE || '  '}`,
            }});
          });
      },
      // 修改地址弹窗
      ok() {
        if (!this.formValidate.name) {
          this.$Message.error('请输入姓名');
          return;
        }
        // 当电商平台档案“订单发货流程校验省市区匹配系统地址”为否时，出姓名之外不需要校验
        // if (this.isNotCheckReceiver == 'Y') {
        // }
        if (!this.formValidate.province) {
          this.$Message.error('请输入收件人省');
          return;
        }
        if (!this.formValidate.city) {
          this.$Message.error('请输入收件人市');
          return;
        }
        if (!this.formValidate.detailAddress) {
          this.$Message.error('请输入详细地址');
          return;
        }
        if (!(this.formValidate.mobile || this.formValidate.phone)) {
          this.$Message.error('请输入手机号或电话');
          return;
        }
        if (this.IS_OVERSEAS && (!this.formValidate.customs_clearance_type || !this.formValidate.customs_clearance_info)) {
          this.$Message.error('清关信息不能为空!');
          return;
        }
        let mobile = this.formValidate.mobile
        // let reg = RegExp(/(~{2,}|\${2,}|#{2,}|&{2,})/);
        // let judge1=reg.test(this.formValidate.detailAddress)||reg.test(this.formValidate.name) ||reg.test(this.formValidate.phone) ||reg.test(this.formValidate.mobile);
        // if(judge1){
        //   this.$Message.error('收货人信息不能存在##,~~,&&,$$号');
        //   return;
        // }
        let data = {
          platformId: this.PLATFORM,
          omsOnlineOrderId: this.pageMsgId,
          receivProvince: this.formValidate.provinceId,
          receivProvinceName: this.formValidate.province,
          receivCity: this.formValidate.cityId,
          receivCityName: this.formValidate.city,
          receivArea: this.formValidate.areaId,
          receivAreaName: this.formValidate.area,
          receivTown: this.formValidate.town,
          receivAddress: this.formValidate.detailAddress,
          countryName: this.formValidate.countryName,
          receivZip: this.formValidate.postCode,
          receivName: this.formValidate.name,
          receivMobile: mobile,
          receivPhone: this.formValidate.phone,
        };
        // 海外订单证件类型和证件号码
        if (this.IS_OVERSEAS) {
          data["customs_clearance_type"] = this.formValidate.customs_clearance_type || "";
          data["customs_clearance_info"] = this.formValidate.customs_clearance_info || "";
        }

        // 对拆分订单或合并订单操作修改地址的二次提醒
        if(this.ISSPLIT === '1') {
          this.$Modal.fcWarning({
            title: '提示',
            content: '请注意该张订单为拆分订单，请确认是否修改地址？',
            showCancel: true,
            onOk: () => {
              this.modifyAddress(data);
            },
          });
          return
        }
        if(this.ISMERGE === '1') {
          this.$Modal.fcWarning({
            title: '提示',
            content: '请注意该张订单为合并订单，请确认是否修改地址？',
            showCancel: true,
            onOk: () => {
              this.modifyAddress(data);
            },
          });
          return
        }
        this.modifyAddress(data);
      },

      // 调用修改地址接口
      modifyAddress(data) {
        network.post('/p/cs/addressModify', data).then((res) => {
          if (res.data.code == 0) {
            this.$Message.success(res.data.message);//修改成功提示
            if(this.ORDERSTATUS==4){
              network.post('/p/cs/orderShopUpdate', {objid:this.pageMsgId}).then((res1) => {
                  if(res1.data.code==0){
                      this.jumpNewOrder=true
                      setTimeout(()=>{
                        this.jumpNewOrder=false
                        const { fullPath } = this.$route;
                        const {
                          keepAliveModuleName,
                          tableName,
                        } = this.$store.state.global.activeTab;
                        this.$store.commit('global/tabCloseAppoint', {
                          tableName,
                          routeFullPath: fullPath,
                          keepAliveModuleName,
                        // stopRouterPush: true,
                        });
                        // 跳转
                        R3.store.commit('global/tabOpen', {
                            type: 'tableDetailAction' || 'C',
                            label: '订单编辑',
                            customizedModuleName: 'OrderManagementEditor',
                            customizedModuleId: res1.data.data,
                        })
                      },1000)

                  }
              })
            }else{
              this.getConfigData(); // 刷新
              this.formValidate.desc = '';
              this.showBuyerModal = false;
              this.hideAll=true
            }
          }else if (res.data.code == -5){
            this.$Message.error({
                content: res.data.message,
                duration: 3
            });//修改失败提示
          }else if (res.data.code == -10){
            this.$Message.warning({
                content: res.data.message,
                duration: 3
            });//修改成功但同步淘宝平台失败提示
            if(this.ORDERSTATUS==4&&this.PLATFORM==2){
                network.post('/p/cs/orderShopUpdate', {objid:this.pageMsgId}).then((res1) => {
                    if(res1.data.code==0){
                        this.jumpNewOrder=true
                        setTimeout(()=>{
                          this.jumpNewOrder=false
                          const { fullPath } = this.$route;
                          const {
                            keepAliveModuleName,
                            tableName,
                          } = this.$store.state.global.activeTab;
                          this.$store.commit('global/tabCloseAppoint', {
                            tableName,
                            routeFullPath: fullPath,
                            keepAliveModuleName,
                          // stopRouterPush: true,
                          });
                          // 跳转
                          R3.store.commit('global/tabOpen', {
                              type: 'tableDetailAction' || 'C',
                              label: '订单编辑',
                              customizedModuleName: 'OrderManagementEditor',
                              customizedModuleId: res1.data.data,
                          })
                        },1000)
                    }
                })

            }else{
              this.getConfigData(); // 刷新
              this.formValidate.desc = '';
              this.showBuyerModal = false;
              this.hideAll=true
            }
          }
        });
      },

      cancel() {
        if(this.encryptColumns.includes('RECEIVPROVINCENAME') || this.encryptColumns.includes('RECEIVPROVINCE:REGIONNAME')) {
          this.formValidate.province = '***'
        }
        if(this.encryptColumns.includes('RECEIVCITYNAME') || this.encryptColumns.includes('RECEIVCITY:REGIONNAME')) {
          this.formValidate.city = '***'
        }
        if(this.encryptColumns.includes('RECEIVAREANAME') || this.encryptColumns.includes('RECEIVAREA:REGIONNAME')) {
          this.formValidate.area = '***'
        }
        // this.getConfigData(); // 刷新
        this.smartProvince='', // 智能识别省
        this.smartCity='', // 智能识别市
        this.smartArea='', // 智能识别区
        this.formValidate.desc = '';
        this.showBuyerModal = false;
        // this.hideAll=true;
        // this.showOwntext=true;
        // this.douyinData.token = '';
        this.toHideAll();
      },
      // 修改卖家备注 保存
      okSellerMark() {
        if (this.formValidate1.ORDERFLAG == '0') {
          document.getElementsByClassName('changeColor')[0].style.color = 'grey';
        } else if (this.formValidate1.ORDERFLAG == '1') {
          document.getElementsByClassName('changeColor')[0].style.color = '#eb4832';
        } else if (this.formValidate1.ORDERFLAG == '2') {
          document.getElementsByClassName('changeColor')[0].style.color = 'yellow';
        } else if (this.formValidate1.ORDERFLAG == '3') {
          document.getElementsByClassName('changeColor')[0].style.color = 'green';
        } else if (this.formValidate1.ORDERFLAG == '4') {
          document.getElementsByClassName('changeColor')[0].style.color = '#25adeb';
        } else if (this.formValidate1.ORDERFLAG == '5') {
          document.getElementsByClassName('changeColor')[0].style.color = 'purple';
        } else if (this.formValidate1.ORDERFLAG == '6') {
          document.getElementsByClassName('changeColor')[0].style.color = 'pink';
        } else if (this.formValidate1.ORDERFLAG == '7') {
          document.getElementsByClassName('changeColor')[0].style.color = '#51ef15';
        } else if (this.formValidate1.ORDERFLAG == '8') {
          document.getElementsByClassName('changeColor')[0].style.color = 'orange';
        } else if (this.formValidate1.ORDERFLAG == '9') {
          document.getElementsByClassName('changeColor')[0].style.color = '#2538eb';
        }
        // let virtual = {
        //   table: 'T_V_OMSONLINEORDER',
        //   objId: this.pageMsgId,
        //   fixedData: {
        //     T_V_OMSONLINEORDER: {
        //       ORDERFLAG: this.formValidate1.ORDERFLAG,
        //       SELLERMEMO: this.formValidate1.SELLERMEMO,
        //     },
        //   },
        // };
        let virtual = {
          ids:[this.pageMsgId],
          param:{
            T_V_OMSONLINEORDER:[
              {
                "SUBPARAM":this.formValidate1.SELLERMEMO,
                "ORDERFLAG":this.formValidate1.ORDERFLAG
              }
            ]
          },
          tableName:"T_V_OMSONLINEORDER",
          actionName:"T_V_OMSONLINEORDER_修改卖家备注",
          isContainsParam:true
        }
        // network.post('/p/cs/objectSave', virtual).then((res) => {
        network.post('/p/cs/modifyRemark',virtual).then(res => {
          if (res.data.code == 0) {
            if(this.ORDERSTATUS==4){
                network.post('/p/cs/orderShopUpdate', {objid:this.pageMsgId}).then((res1) => {
                  if(res1.data.code==0){
                      this.jumpNewOrder=true
                      setTimeout(()=>{
                        this.jumpNewOrder=false
                        const { fullPath } = this.$route;
                        const {
                          keepAliveModuleName,
                          tableName,
                        } = this.$store.state.global.activeTab;
                        this.$store.commit('global/tabCloseAppoint', {
                          tableName,
                          routeFullPath: fullPath,
                          keepAliveModuleName,
                        // stopRouterPush: true,
                        });
                        // 跳转
                        R3.store.commit('global/tabOpen', {
                            type: 'tableDetailAction' || 'C',
                            label: '订单编辑',
                            customizedModuleName: 'OrderManagementEditor',
                            customizedModuleId: res1.data.data,
                        })
                      },1000)
                  }else if(res1.data.code==1) { // 配货中订单只是修改成功，不作废原单生成新单，仅刷新页面
                    this.getConfigData(); // 刷新
                    this.showSellerModal = false;
                  }
                  })
            }else{
              this.getConfigData(); // 刷新
              this.showSellerModal = false;
            }

          }
        });
      },
      // 修改卖家备注 保存并同步
      saveSellerMark() {
        if (this.formValidate1.ORDERFLAG == '0') {
          document.getElementsByClassName('changeColor')[0].style.color = 'grey';
        } else if (this.formValidate1.ORDERFLAG == '1') {
          document.getElementsByClassName('changeColor')[0].style.color = '#eb4832';
        } else if (this.formValidate1.ORDERFLAG == '2') {
          document.getElementsByClassName('changeColor')[0].style.color = 'yellow';
        } else if (this.formValidate1.ORDERFLAG == '3') {
          document.getElementsByClassName('changeColor')[0].style.color = 'green';
        } else if (this.formValidate1.ORDERFLAG == '4') {
          document.getElementsByClassName('changeColor')[0].style.color = '#25adeb';
        } else if (this.formValidate1.ORDERFLAG == '5') {
          document.getElementsByClassName('changeColor')[0].style.color = 'purple';
        } else if (this.formValidate1.ORDERFLAG == '6') {
          document.getElementsByClassName('changeColor')[0].style.color = 'pink';
        } else if (this.formValidate1.ORDERFLAG == '7') {
          document.getElementsByClassName('changeColor')[0].style.color = '#51ef15';
        } else if (this.formValidate1.ORDERFLAG == '8') {
          document.getElementsByClassName('changeColor')[0].style.color = 'orange';
        } else if (this.formValidate1.ORDERFLAG == '9') {
          document.getElementsByClassName('changeColor')[0].style.color = '#2538eb';
        }
        network
          .get(
            `/p/cs/upLoadeTaoBaoMemo?orderId=${this.pageMsgId}&flag=${this.formValidate1.ORDERFLAG}&type=0&memo=${encodeURIComponent(this.formValidate1.SELLERMEMO)}`
          )
          .then((res) => {
            if (res.data.code == 0) {
              // this.$Message.success({
              //   content: res.data.message,
              //   duration: 3
              // })
              this.$Modal.fcWarning({
                title: '提示',
                mask: true,
                showCancel: false,
                content: res.data.message,
              })
              if(this.ORDERSTATUS==4){
                network.post('/p/cs/orderShopUpdate', {objid:this.pageMsgId}).then((res1) => {
                  if(res1.data.code==0){
                      this.jumpNewOrder=true
                      setTimeout(()=>{
                        this.jumpNewOrder=false
                        const { fullPath } = this.$route;
                        const {
                          keepAliveModuleName,
                          tableName,
                        } = this.$store.state.global.activeTab;
                        this.$store.commit('global/tabCloseAppoint', {
                          tableName,
                          routeFullPath: fullPath,
                          keepAliveModuleName,
                        // stopRouterPush: true,
                        });
                        // 跳转
                        R3.store.commit('global/tabOpen', {
                            type: 'tableDetailAction' || 'C',
                            label: '订单编辑',
                            customizedModuleName: 'OrderManagementEditor',
                            customizedModuleId: res1.data.data,
                        })
                      },1000)
                    }
                  })
              }else{
                this.getConfigData(); // 刷新
                this.showSellerModal = false;
              }
            }else if(res.data.code == -10){
              // this.$Message.warning({
              //   content: res.data.message,
              //   duration: 3
              // });//修改成功但同步淘宝平台失败提示
              this.$Modal.fcWarning({
                title: '提示',
                mask: true,
                showCancel: false,
                content: res.data.message,
              })
              this.getConfigData(); // 刷新
              this.showSellerModal = false;
            }
          });
      },

      // 修改内部备注 取消
      cancelInterDesc() {
        this.getConfigData(); // 刷新
        this.showinterModal = false;
      },
      // 修改内部备注 保存
      okInterDesc() {
        // let params = {
        //   ids: [this.pageMsgId],
        //   tableName: 'T_V_OMSONLINEORDER',
        //   actionName: 'T_V_OMSONLINEORDER_修改内部备注_SP',
        //   param: { T_V_OMSONLINEORDER: [{SUBPARAM: this.interDesc}] },
        //   isContainsParam: true
        // };
        let params = {
          ids:[this.pageMsgId],
          param:{
            T_V_OMSONLINEORDER:[
              {
                "SUBPARAM":this.interDesc,
              }
            ]
          },
          tableName:"T_V_OMSONLINEORDER",
          actionName:"T_V_OMSONLINEORDER_修改内部备注",
          isContainsParam:true
        }
        // network.post('/p/cs/exeAction', params).then((res) => {
          network.post('/p/cs/modifyRemark', params).then((res) => {
          if(this.ORDERSTATUS==4){
            this.showinterModal = false;
            network.post('/p/cs/orderShopUpdate', {objid:this.pageMsgId}).then((res1) => {
              if(res1.data.code==0){
                  this.jumpNewOrder=true
                  setTimeout(()=>{
                    this.jumpNewOrder=false
                    const { fullPath } = this.$route;
                    const {
                      keepAliveModuleName,
                      tableName,
                    } = this.$store.state.global.activeTab;
                    this.$store.commit('global/tabCloseAppoint', {
                      tableName,
                      routeFullPath: fullPath,
                      keepAliveModuleName,
                    // stopRouterPush: true,
                    });
                    // 跳转
                    R3.store.commit('global/tabOpen', {
                        type: 'tableDetailAction' || 'C',
                        label: '订单编辑',
                        customizedModuleName: 'OrderManagementEditor',
                        customizedModuleId: res1.data.data,
                    })
                  },1000)
              }else if(res1.data.code==1) { // 配货中订单只是修改成功，不作废原单生成新单，仅刷新页面
                this.getConfigData(); // 刷新
                this.showinterModal = false;
              }
            })
          }else{
            this.getConfigData(); // 刷新
            this.showinterModal = false;
          }
        });

      },
      // 修改内部备注 取消
      cancelWmsDesc() {
        this.getConfigData(); // 刷新
        this.showwmsModal = false;
      },
      // 修改内部备注 保存
      okWmsDesc() {
        let params = {
          ids:[this.pageMsgId],
          param:{
            T_V_OMSONLINEORDER:[
              {
                "SUBPARAM":this.wmsDesc,
              }
            ]
          },
          tableName:"T_V_OMSONLINEORDER",
          actionName:"T_V_OMSONLINEORDER_修改WMS备注",
          isContainsParam:true
        }
          network.post('/p/cs/modifyRemark', params).then((res) => {
          if(this.ORDERSTATUS==4){
            this.showwmsModal = false;
            network.post('/p/cs/orderShopUpdate', {objid:this.pageMsgId}).then((res1) => {
              if(res1.data.code==0){
                  this.jumpNewOrder=true
                  setTimeout(()=>{
                    this.jumpNewOrder=false
                    const { fullPath } = this.$route;
                    const {
                      keepAliveModuleName,
                      tableName,
                    } = this.$store.state.global.activeTab;
                    this.$store.commit('global/tabCloseAppoint', {
                      tableName,
                      routeFullPath: fullPath,
                      keepAliveModuleName,
                    // stopRouterPush: true,
                    });
                    // 跳转
                    R3.store.commit('global/tabOpen', {
                        type: 'tableDetailAction' || 'C',
                        label: '订单编辑',
                        customizedModuleName: 'OrderManagementEditor',
                        customizedModuleId: res1.data.data,
                    })
                  },1000)
              }else if(res1.data.code==1) { // 配货中订单只是修改成功，不作废原单生成新单，仅刷新页面
                this.getConfigData(); // 刷新
                this.showwmsModal = false;
              }
            })
          }else{
            this.getConfigData(); // 刷新
            this.showwmsModal = false;
          }
        });

      },
      cancelSellerMark() {
        this.getConfigData(); // 刷新
        this.showSellerModal = false;
      },
      // 修改订单明细的规格
      okSKUSPEC() {
        let data = [
          {
            ID: this.tableData[this.specIndex].ID,
            SKU: this.SKUAfter,
          },
        ];
        // let virtual = {
        //   table: 'T_V_OMSONLINEORDER',
        //   objId: this.pageMsgId,
        //   fixedData: {
        //     T_OMSONLINEORDERPRODUCT: data,
        //     T_V_OMSONLINEORDER: {},
        //   },
        // };
        const currentSku = this.tableData[this.specIndex]
        const params = {
          onLineOrderId: this.pageMsgId,
          proId: this.tableData[this.specIndex].ID,
          productDTOS: {
            actualAmount: currentSku.ACTUALAMOUNT,
            id: currentSku.ID,
            num: currentSku.NUM,
            productCode: currentSku.PRODUCTCODE,
            sku: this.SKUAfter,
          }
        }
        network
          .post('/p/cs/orderProductUpdate', params)
          .then((res) => {
            if (res.data.code == 0) {
              let msg={
                "id": this.pageMsgId,
                "logType": "订单修改商品",
                "message": '订单商品由'+this.changeItemSKUOld+'修改为'+this.SKUAfter
              }
              network.post('/p/cs/order/save/log', msg).then((resLog) => {
                if(resLog.data.code==0){
                  if(this.ORDERSTATUS==4){
                    network.post('/p/cs/orderShopUpdate', {objid:this.pageMsgId}).then((res1) => {
                      if(res1.data.code==0){
                          this.jumpNewOrder=true
                          setTimeout(()=>{
                            this.jumpNewOrder=false
                            const { fullPath } = this.$route;
                            const {
                              keepAliveModuleName,
                              tableName,
                            } = this.$store.state.global.activeTab;
                            this.$store.commit('global/tabCloseAppoint', {
                              tableName,
                              routeFullPath: fullPath,
                              keepAliveModuleName,
                            // stopRouterPush: true,
                            });
                            // 跳转
                            R3.store.commit('global/tabOpen', {
                                type: 'tableDetailAction' || 'C',
                                label: '订单编辑',
                                customizedModuleName: 'OrderManagementEditor',
                                customizedModuleId: res1.data.data,
                            })
                          },1000)
                        }
                      })
                  }else{
                    this.getConfigData(); // 刷新
                  }
                }
              })
            } else {
              this.tableData[this.specIndex].SKU = this.SKUMiddle;
              this.tableData = this.tableData.concat([]);
              this.getConfigData(); // 刷新
            }
          })
          .catch((error) => {
            if (error.response) {
              if (error.response.status == 500) {
                this.tableData[this.specIndex].SKU = this.SKUMiddle;
                this.tableData = this.tableData.concat([]);
              }
            } else if (error.request) {
              console.log(error.request);
            } else {
              console.log('Error', error.message);
            }
            console.log(error.config);
          });
      },
      // 取消修改商品
      cancelSKUSPEC() {
        this.tableData[this.specIndex].SKU = this.SKUMiddle;
        this.tableData = this.tableData.concat([]);
        if(this.detailShowType == 'classicStyle'){
          this.tableCurrentData = this.tableData.slice(this.pageSize*(this.currentPage - 1),this.pageSize*this.currentPage)
        }
        this.$forceUpdate();
      },
      // 点击跳转到快递100
      toExpressQuery(expressqueryaddress,logisticsnumbernow){
        let logisticsnumber = ''
        let EXPRESSQUERYADDRESS = ''
        if(logisticsnumbernow){
          logisticsnumber = logisticsnumbernow
        }else {
          logisticsnumber = this.LOGISTICSNUMBER
        }
        if(expressqueryaddress){
          EXPRESSQUERYADDRESS = expressqueryaddress
        }else {
          EXPRESSQUERYADDRESS = this.EXPRESSQUERYADDRESS
        }
        if(logisticsnumber){
          let params = {
            dataid: this.OMSID,
            datatype: 1
          }
          network.post('/p/cs/userclick/add',params).then(res => {}) // 点击跳转到快递100前记录点击信息
          let text = logisticsnumber
          let inputElement = document.createElement('input')
          inputElement.value = text;
          document.body.appendChild(inputElement);
          inputElement .select(); //选中文本
          document.execCommand("copy"); //执行浏览器复制命令
          inputElement.remove();
          // console.log("复制成功")
          if(EXPRESSQUERYADDRESS){
            window.open(EXPRESSQUERYADDRESS+logisticsnumber,'_blank')
          }else{
            this.$Message.warning('当前快递公司暂未维护，快递单号已复制到剪切板');
            setTimeout(()=>{
               window.open('https://www.kuaidi100.com/','_blank')
            },1000)
          }
        }
      },

      // 获取包裹信息列表数据
      getPackageList() {
        let params = {
          orderId: this.pageMsgId,
          page: this.currentPackagePage,
          pageSize: this.pageSizePackage
        }
        network.post('/p/cs/order/packages/queryList',params).then(res => {
          if(res.data.code == 0){
            if(res.data.data.resultList && res.data.data.resultList.length > 0){
              this.packageGoodsData = res.data.data.resultList;

              console.log(this.packageGoodsData)
              this.totalPackage = res.data.data.total;
              this.defaultIndex = 0;
              this.clickPackageId = res.data.data.resultList[0].logisticsNumber;
              this.choosedSKU = res.data.data.resultList[0].sku;
              this.getBatchOrQrcodeList();
            }
          }
        })
      },
      // 包裹信息包裹明细分页事件
      changePagePackage(val) {
        this.currentPackagePage = val;
        this.getPackageList();
      },
      changeSizePackage(val) {
        this.pageSizePackage = val;
        this.getPackageList();
      },
      saveClickPackage(e){
        this.clickPackageId = e.logisticsNumber;
        this.choosedSKU = e.sku;
        this.getBatchOrQrcodeList();
      },
      // 获取批次/唯一码信息列表数据
      getBatchOrQrcodeList() {
        let params = {
          orderId: this.pageMsgId,
          logisticsNumber: this.clickPackageId,
          sku: this.choosedSKU,
          page: this.currentBatchOrQrcodePage,
          pageSize: this.pageSizeBatchOrQrcode
        }
        network.post('/p/cs/order/packages/batch',params).then(res => {
         if(res.data.code == 0){
           this.batchOrQrcodeData = res.data.data.resultList;
           this.totalBatchOrQrcode = res.data.data.total;
         }
        })
      },
      // 包裹信息批次/唯一码分页事件
      changePageBatchOrQrcode(val) {
        this.currentBatchOrQrcodePage = val
        this.getBatchOrQrcodeList()
      },
      changeSizeBatchOrQrcode(val) {
        this.pageSizeBatchOrQrcode = val
        this.getBatchOrQrcodeList()
      },

      // hover获取订单商品明细所在仓库库存
      getWMSHOUSEqty(item,index) {
        if(!this.tableData[index].SKUWMSHOUSENUM){
          let params = {
            id: item.ID,
            sku: item.SKU
          }
          network.post('/p/cs/order/store/stock/qtyfee',params).then(res => {
            if(res.data.code == 0) {
              if(res.data.data.qtyfeeItems.length > 0){
                this.tableData[index].SKUWMSHOUSENUM = res.data.data.qtyfeeItems
              }
              this.tableData = JSON.parse(JSON.stringify(this.tableData))
            }
          })
        }
      },
      // 云仓派单日志
      showpdLog() {
        let params = {
          YQ_ORDER_ID: this.pageMsgId,
          IS_SPLIT: this.ISSPLIT //是否拆单
        }
        network.post('/p/cs/erp/o2oso/splitlog',params).then(res => {
          if(res.data.code == 0){
            this.pdlogtableData = res.data.data;
          }
        })
        this.showpdLogShow = true;
      },

      tooltipRenderHeader(tip) {
        return (h, params) => {
          return h('span', [
            h('Poptip', {
              style: {},
              props: {
                trigger: 'hover',
                transfer: true,
                wordWrap: true,
                content: 'content',
                placement: 'top'

              },
              scopedSlots: {
                default: () => h('div', {
                  style: {},
                  domProps: {
                    innerHTML: `<span>${params.column.title}</span> <i class="iconfont comment iconios-information-circle-outline" style="color: orangered;vertical-align: -1px;"></i>`
                  }
                }),
                content: () => h('div', {
                  style: {
                    width: '100px',
                    lineHeight: '16px'
                  },
                  domProps: {
                    innerHTML: `<span>${tip}</span>`
                  }
                }),
              },
            })
          ]);
        }
      },
    },
  };
</script>
<style lang="less" >
// body {
//   overflow: unset !important;
// }
  .demo-table{
      color:#999999;
      font-style: italic;
  }
// .requireIcon:before {
//     content: '*';
//     display: inline-block;
//     margin-right: 4px;
//     line-height: 1;
//     font-family: SimSun;
//     font-size: 12px;
//     color: #ed4014;
//     left: 10px;
//     position: absolute;
//     top: 10px;
// }
.SKUgoods /deep/.ark-select-dropdown {
  left: auto !important;
  top: auto !important;
}
.jtStyle /deep/ .ark-steps-stepSlot {
  background-color: #f9f9f9;
}
.content_item .ark-poptip {
  display: flex;
  align-items: center;
}
.centerContent {
  .ark-tabs-tabpane {
    .order_status {
      // width: 25px;
      margin-left: 4px;
      height: 25px;
      padding: 0 4px;
      text-align: center;
      line-height: 20px;
      display: inline-block;
      .order_status_text {
        font-size: 12px;
      }
    }
    .ISMERGE,.ALLHOST {
      border: 2px solid #147ac1;
      .ISMERGE_text,.ALLHOST_text {
        color: #147ac1;
      }
    }
    .ISINTERECEPT {
      border: 2px solid #b22020;
      .ISINTERECEPT_text {
        color: #b22020;
      }
    }
    .DELIVERY_TIMELINESS_STATUS {
      border: 2px solid #b22020;
      .DELIVERY_TIMELINESS_STATUS_text {
        color: #b22020;
      }
    }
    .IS_OUTSTOCK {
      border: 2px solid #b22020;
      .IS_OUTSTOCK_text {
        color: #b22020;
      }
    }
    .ISINRETURNMONEY {
      border: 2px solid #b22020;
      .ISINRETURNMONEY_text {
        color: #b22020;
      }
    }
    .RETURNSTATUS {
      border: 2px solid #db9bdb;
      .RETURNSTATUS_text {
        color: #db9bdb;
      }
    }
    .ISGIFT {
      border: 2px solid #060;
      .ISGIFT_text {
        color: #060;
      }
    }
    .ISLOCK{
      border: 2px solid #b22020;
      .ISLOCK_text {
        color: #b22020;
      }
    }
    .ISINIT {
      border: 2px solid var(--primary-color);
      .ISINIT_text {
        color: var(--primary-color);
      }
    }
    .ISSPLIT {
      border: 2px solid #147ac1;
      .ISSPLIT_text {
        color: #147ac1;
      }
    }
    .ORDERTYPE {
      border: 2px solid #147ac1;
      .ORDERTYPE_text {
        color: #147ac1;
      }
    }
    .NOORDERTYPE{
      display: none;
    }
    .ORDERTYPEtwo {
      display: none;
    }
    .ISPRINTLOGISTIC {
      border: 2px solid #147ac1;
      .ISPRINTLOGISTIC_text {
        color: #147ac1;
      }
    }
    .ORDERFROM {
      border: 2px solid #147ac1;
      .ORDERFROM_text {
        color: #147ac1;
      }
    }
    .NOORDERFROM{
      display: none;
    }
    .ISINVOICE {
      border: 2px solid #147ac1;
      .ISINVOICE_text {
        color: #147ac1;
      }
    }
    .ARAMOUNT {
      border: 2px solid #b22020;
      .ARAMOUNT_text {
        color: #b22020;
      }
    }
    .NOARAMOUNT{
      display: none;
    }
    .NOPRESALESTATUS {
      border: 2px solid #b22020;
      .NOPRESALESTATUS_text {
        color: #b22020;
      }
    }
    .PAYTYPE {
      border: 2px solid #147ac1;
      .PAYTYPE_text {
        color: #147ac1;
      }
    }
    .PRESALESTATUS {
      border: 2px solid #060;
      .PRESALESTATUS_text {
        color: #060;
      }
    }
    .V_LOGISTICS_CREATE{
      border: 2px solid #060;
      .V_LOGISTICS_CREATE_text {
        color: #060;
      }
    }
    .ISEMBARGO {
      border: 2px solid #d0021b;
      .ISEMBARGO_text {
        color: #d0021b;
      }
    }
    .ISPREPACKORDER {
      border: 2px solid #d0021b;
      .ISPREPACKORDER_text {
        color: #d0021b;
      }
    }
    .HASVIRTUAL{
      border: 2px solid var(--primary-color);
      .HASVIRTUAL_text {
        color: var(--primary-color);
      }
    }
    .ISSELFPICK {
      border: 2px solid var(--primary-color);
      .ISSELFPICK_text {
        color: var(--primary-color);
      }
    }
    .ISCHECKORDER,.ISCHECKORDER_QIC {
      border: 2px solid var(--primary-color);
      .ISCHECKORDER_text, .ISCHECKORDER_QIC_text {
        color: var(--primary-color);
      }
    }
    .FLAG_REPLACESTRATEGY {
      border: 2px solid var(--primary-color);
      .FLAG_REPLACESTRATEGY_text {
        color: var(--primary-color);
      }
    }
    .IS_TRANSIT {
      border: 2px solid var(--primary-color);
      .IS_TRANSIT_text {
        color: var(--primary-color);
      }
    }
    .IS_SALE_SINKING {
      border: 2px solid #147ac1;
      .IS_SALE_SINKING_text {
        color: #147ac1;
      }
    }
    .RESERVATION_TYPE {
      border: 2px solid #147ac1;
      .RESERVATION_TYPE_text {
        color: #147ac1;
      }
    }
    .ALLHOSTNO {
      border: 2px solid rgb(70, 0, 102);
      .V_LOGISTICS_CREATE_text {
        color: #060;
      }
    }
    .AUTOAUDITSTATUS {
      border: 2px solid #b22020;
      .AUTOAUDITSTATUS_text {
        color: #b22020;
      }
    }
    .PRESALESTATUS {
      border: 2px solid #40e0d0;
      .PRESALESTATUS_text {
        color: #40e0d0;
      }
    }
    .JCORDER {
      border: 2px solid #060;
      .JCORDER_text {
        color: #060;
      }
    }
    .DELIVERGOODS {
      border: 2px solid #b22020;
      .DELIVERGOODS_text {
        color: #b22020;
      }
    }
    .ISLG {
      border: 2px solid #b22020;
      .ISLG_text {
        color: #b22020;
      }
    }
    .TMGJORDER{
      border: 2px solid #060;
      .TMGJORDER_text {
        color: #060;
      }
    }
    // .LACKSTOCKFLAG {
    //   border: 2px solid #deb887;
    //   .LACKSTOCKFLAG_text {
    //     color: #deb887;
    //   }
    // }
    .PROMISE_SERVICE {
      border: 2px solid #147ac1;
      .PROMISE_SERVICE_text {
        color: #147ac1;
      }
    }
    .LOGISTICS_STATUS {
      border: 2px solid #060;
      .LOGISTICS_STATUS_text {
        color: #060;
      }
    }
    .PREISINTERECEPT{
       border: 2px solid #147ac1;
      .PREISINTERECEPT_text {
        color: #147ac1;
      }
    }
    .USER_TAG0{
       border: 2px solid #147ac1;
      .USER_TAG0_text {
        color: #147ac1;
      }
    }
    .USER_TAG1{
       border: 2px solid #147ac1;
      .USER_TAG1_text {
        color: #147ac1;
      }
    }
    .USER_TAG2{
       border: 2px solid #147ac1;
      .USER_TAG2_text {
        color: #147ac1;
      }
    }
    .USER_TAG3{
       border: 2px solid #147ac1;
      .USER_TAG3_text {
        color: #147ac1;
      }
    }
    .IS_OVERSEAS{
      border: 2px solid #147ac1;
      .IS_OVERSEAS_text {
        color: #147ac1;
      }
    }
    .IS_BLACK,
    .OVERSEAS_ABNORMAL{
      border: 2px solid #ff0000;
      .IS_BLACK_text,
      .OVERSEAS_ABNORMAL_text {
        color: #ff0000;
      }
    }
    .NOPREISINTERECEPT{
       border: 2px solid #db9bdb;
      .NOPREISINTERECEPT_text {
        color: #db9bdb;
      }
    }
    .FLAG_YUN,.ISPRINTLOGISTIC,.ISPARTOUT,.WMSCANCELSTATUSSUCCESS, .IS_HOME_DELIVERY_SERVICE {
      border: 2px solid #0000ff;
      .FLAG_YUN_text,.ISPRINTLOGISTIC_text,.ISPARTOUT_text,.WMSCANCELSTATUSSUCCESS_text,.IS_HOME_DELIVERY_SERVICE_text {
        color: #0000ff;
      }
    }
    .FLAG_LOGISTICS, .FLAG_WAYBILLFAIL,.EXCEEDSEND,.ISPRICEABNORMAL,.FLAG_ADDR,.ISBEYONDNOPAY, .CAPITAL_OCCUPATION_STATUS, .WMSCANCELSTATUSFIAL{
      border: 2px solid #ff0000;
      .FLAG_LOGISTICS_text, .FLAG_WAYBILLFAIL_text, .EXCEEDSEND_text, .ISPRICEABNORMAL_text, .FLAG_ADDR_text, .ISBEYONDNOPAY_text, .CAPITAL_OCCUPATION_STATUS_text, .WMSCANCELSTATUSFIAL_text {
        color: #ff0000;
      }
    }
    // 小时达
    .TBXSD {
      border: 2px solid #0000ff;
      .TBXSD_text {
        color: #0000ff;
      }
    }
  }
}
.offlineStorePop .ark-poptip-body{
  background: rgba(70, 76, 91, 0.9);
  border-radius: 4px;
  // background: #eee;
}
.offlineStorePop.ark-poptip-popper[x-placement^="top"] .ark-poptip-arrow:after {
  border-top-color: rgba(70, 76, 91, 0.9);
  // border-top-color: #eee;
}
.offlineStorePop.ark-poptip-popper {
  min-width: 88px;
}
.modifyBuyer .ark-form-item {
  width: 100%;
}

.popQtyfreeBox{
  background-color: #323642;
  max-height: 300px;
  overflow-y: auto;
  border-radius: 4px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
  opacity: 0.9;
}
.popQtyfreeBox.ark-poptip-popper[x-placement^="top"],.popQtyfreeBox.ark-poptip-popper[x-placement^="bottom"] {
  padding: unset;
}
.popQtyfreeBox.ark-poptip-popper[x-placement="top"] .ark-poptip-arrow,.popQtyfreeBox.ark-poptip-popper[x-placement^="bottom"] .ark-poptip-arrow {
  display: none;
}
.order-sign-wrap {
  line-height: 26px;
  max-width: 660px;
  // 订单标记
  .order-sign-cell {
    border: 1px solid;
    padding: 2px 4px;
    border-radius: 4px;
    &:not(:first-child) {
      margin-left: 4px;
    }
  }
}
</style>
<style lang="less" scoped>
.toggleButtonType {
  color: #333;
}
.jtStyle /deep/ .ark-steps-stepSlot {
  background-color: #f9f9f9;
}
.toBlue:hover {
  color: #1d539e;
}
.text1 /deep/ .ark-input {
  height: 80px;
  resize: none;
  background-color: #f5f5f5;
}
.text2 /deep/ .ark-input {
  height: 150px;
  resize: none;
}
.showOtherAllModal .text2 /deep/ .ark-input {
  height: auto;
  resize: both;
}
.showOtherAllModal .form /deep/ .ark-form-item {
  width: 50%;
  margin-bottom: 16px;
  display: inline-block;
}
.modify {
  font-weight: 600;
  cursor: pointer;
}
.centerContent /deep/ .ark-tabs-tab {
  /* height: 20px; */
  font-size: 14px;
  font-family: PingFangSC-Semibold, PingFang SC;
  font-weight: 600;
  /* color: #000000; */
  /* line-height: 20px; */
}
.centerContent /deep/ .ark-tabs-bar {
  background-color: white;
}
.centerContent {
  position: relative;
  background-color: #f9f9f9;
  .returnBtn, .processBtn {
    width: 74px;
    height: 27px;
    background: var(--primary-color);
    border-radius: 25px;
    position: absolute;
    top: 0px;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 14px;
    font-family: PingFangSC-Semibold, PingFang SC;
    font-weight: 600;
    color: #ffffff;
  }
  .processBtn {
    right: 90px;
  }
  .returnBtn:hover,.processBtn:hover {
    cursor: pointer;
  }
}

.contentName {
   min-width: 66px; // 88px;

  height: 24px;
  font-size: 12px;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: #999999;
  line-height: 24px;
}
.content_item {
  display: flex;
  align-items: center;
  .contentMsg {
    flex: 1;
    font-size: 12px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    // color: #000000;
    line-height: 26px;
  }
}
.topContent /deep/ .ark-steps {
  display: flex;
  align-items: center;
  justify-content: center;
}
.topContent {
  width: 100%;
  height: 158px;
  background-color: #f9f9f9 !important;
  padding: 23px 18px;
  margin-bottom: 23px;

  .ark-steps-item:nth-child(odd) {
    width: calc(100% / 52 * 7) !important;
    /deep/ .ark-steps-tail {
      top: 58px;

      > i:after {
        background: #e8eaec;
      }
    }
  }
  .ark-steps-item:nth-child(even) {
    width: calc(100% / 52 * 2) !important;
    /deep/ .ark-steps-tail {
      top: 15px;
      > i:after {
        background: #e8eaec;
      }
    }
  }
 .ark-steps-item:last-child{
   width: 62px !important;
 }
  .stepItem {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #f9f9f9;
    .stepTitle {
      height: 20px;
      font-size: 14px;
      font-family: PingFangSC-Semibold, PingFang SC;
      font-weight: 600;
      color: #333333;
      line-height: 20px;
    }
    .stepImg {
      margin: 8px 0;
      width: 50px;
      height: 50px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      background: #c1c1c1;
    }
    .stepData {
      width: 100%;
      height: 14px;
      font-size: 12px;
      font-family: Helvetica;
      color: #999999;
      line-height: 14px;
    }
    .stepTime {
      width: 100%;
      height: 14px;
      font-size: 12px;
      font-family: Helvetica;
      color: #999999;
    }
  }
  .stepItem1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #f9f9f9;
    .stepTitle {
      height: 20px;
      font-size: 14px;
      font-family: PingFangSC-Semibold, PingFang SC;
      font-weight: 600;
      color: #0f3365;
      line-height: 20px;
    }
    .stepImg {
      margin: 8px 0;
      width: 50px;
      height: 50px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      background-color: var(--primary-color);
      /* background: linear-gradient(147deg, #1d539e 0%, #0f3365 100%); */
      /* box-shadow: 0px 3px 4px 0px #183d71; */
      /* background-size: 100% 100%; */
      /* background-image: url(../../assets/orderEditorImg/pay1.png); */
    }
    .stepData {
      width: 100%;
      height: 14px;
      font-size: 12px;
      font-family: Helvetica;
      color: #999999;
      line-height: 14px;
    }
    .stepTime {
      width: 100%;
      height: 14px;
      font-size: 12px;
      font-family: Helvetica;
      color: #999999;
    }
  }
}
.orderMessage {
  display: flex;
  border: 1px solid #e1e1e1;
}
.message_left {
  position: relative;
  width: 444px;
  height: 280px;
  background: #f9f9f9;
  border: 1px solid #e1e1e1;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  .title {
    width: 100%;
    height: 37px;
    background: #eef1f5;
    border-radius: 5px;
    padding-left: 20px;
    font-size: 16px;
    font-family: Helvetica;
    font-weight: 400;
    color: #000000;
    line-height: 37px;
  }
  .content {
    width: 100%;
    padding: 10px 16px 0 28px;
    flex: 1;
    overflow-y: scroll;
    word-break: break-word;
  }
  .bottom {
    width: 100%;
    height: 47px;
    position: absolute;
    bottom: 0;
    display: flex;
    .bottom-son {
      height: 100%;
      width: 50%;
      display: flex;
      justify-content: center;
      align-items: center;
      border: 1px solid #e1e1e1;
      span {
        font-size: 14px;
        font-family: Helvetica;
        color: var(--primary-color);
        line-height: 14px;
      }
    }
  }
}
.message_right {
  width: 80%;
  padding: 0 15px;
  position: relative;
  .orderMember {
    display: flex;
    margin-top: 23px;
    .orderIcon {
      margin-left: 14px;
    }
    .orderIcon.HOST {
      margin-left: 0px;
    }
  }

  .moneyItem {
    display: flex;
    align-items: center;
  }
  .moneyItem_left {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .moneyMember {
    margin-top: 8px;
    color: var(--primary-color);
  }
  .moneySymbol {
    height: 12px;
    font-size: 12px;
    line-height: 100%;
    /* margin: 0 17px; */
  }
}
.orderTable {
  // border: 1px solid #e5e5e5;
  margin-top: 6px;
  .title {
    width: 100%;
    height: 38px;
    background: #eef1f5;
    border-radius: 5px;
    padding-left: 20px;
    padding-right: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e5e5e5;
  }
  .content {
    background-color: #fff;
    // overflow-x: scroll;
  }
  .content-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    .ark-checkbox-wrapper{
      padding-top:10px
    }
  }
  .actionBtn {
    padding: 16px 16px 0;
  }
  .bgColor{
    background-color: #F8F8F8;
    color: #999999 !important;
    .selectBox /deep/.ark-select-selected-value{
      color: #999999 !important;
    }
  }
  .detailItem{
    min-height: 112px;
    display: flex;
    padding: 16px;
    border-bottom: 1px solid #e5e5e5;
    border-left: 1px solid #e5e5e5;
    border-right: 1px solid #e5e5e5;
    justify-content: space-between;
    .selectBox /deep/ .ark-select-arrow{
      right: 1px !important;
    }
    .content_item{
      display: flex;
      // height: 100%;
      align-items: center;
      .contentName{
        // min-width: 42px;
        height: 29px;
        line-height: 27px;
        color: #999;
        text-align: right;
      }
      .contentMsg{
        height: 100%;
        max-width: 160px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        line-height: 29px;
        color: #666666;
      }
    }
    .isHide{
      // display: none;
      // opacity: 0;
      visibility: hidden;
    }
    .imgBox{
      z-index: 999;
      width:80px;
      height:80px;
      position:relative;
      margin-right: 16px;
    }
    .logobox{
      display:flex;
      height: 26px;
      margin-bottom: 4px;
      margin-right:4px;
      align-items: center;
      .box{
        margin-right: 4px;
        padding: 0 1px;
        text-align: center;
        line-height: 20px;
        border-radius: 2px;
        transform: scale(0.9);
      }
    }
    .btn{
      cursor: pointer;
        line-height: 16px;
        margin-bottom: 15px;
    }
    .btn:hover{
        text-decoration:underline
      }
  }
}
.orderTableOne {
  width: 50%;
}
.tipsPlatformText {
    color: red;
    font-size: 14px;
    margin-bottom: 10px;
    padding-left: 10px;
  }
  .hidePoint{
    cursor: pointer
  }
  .hideImg{
    display: none;
  }
  .wangwangIcon {
    width: 20px;
    vertical-align: middle;
    margin-top: -3px;
    margin-left: 8px;
  }
.packageMsgBox {
  display: flex;
  width: 100%;
}
.packageMsgBox:first-child {
  .getReturnTable {
    width: calc(100% - 12px);
    margin-right: 12px;
  }
}
.packageMsgBox:last-child {
  .getReturnTable {
    width: calc(100% - 12px);
    margin-left: 12px;
  }
}
.pageContent {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    padding-right: 12px;
  }
  .TIDBOX {
    font-size: 16px;
    color: #000;
    border: 1px solid #e5e5e5;
    border-bottom: none;
    margin-top: 16px;
    padding-top: 16px;
    padding-left: 16px;
  }
  .ModifyGoodsTitle {
    font-size: 16px;
    color: #333;
    font-weight: bold;
    margin-bottom: 16px;
  }
  .changeIcon {
    position: absolute;
    top: 50%;
    left: -10px;
    border: 1px solid #aaa;
    border-radius: 10px;
    background: #fff;
    width: 20px;
    height: 20px;
    line-height: 14px;
    text-align: center;
    i {
      cursor:default;
    }
  }

  // 其他信息
  .other-info {
    .fold-wrap {
      width: 80px;
      margin-top: 8px;
      cursor: pointer;
      display: flex;
      align-items: center;
    }
  }
  .modifyAddress .ark-form-inline .ark-form-item {
    width: 100%;
  }
  // .ark-select-single .ark-select-selection {
  //   width: 200px;
  // }
</style>
