            <template>
                  <div class="app-container calendar-list-container">
        <el-form  ref="addForm" :model="ysorderShowInfo" label-position="left" label-width="100px"
                  style='width:96%;margin-left:10px'>
                <div class = "userbox">
                  <div class = "boxtitle" id="footer">订单信息</div>
                  <el-row :gutter="24" style="margin-top:20px;">
                  <el-col :xs="23" :sm="23" :md="12" :lg="6" :xl="6">
                    <div class="grid-content bg-purple">
                      <el-form-item  :label="$t('order.orderno')" >
                        <div class="block">
                          <el-input v-model="ysorderShowInfo.od_no" :disabled="true" style="width: 100%;"> </el-input>
                        </div>
                      </el-form-item>
                    </div>
                  </el-col>
                  <el-col :xs="23" :sm="23" :md="11" :lg="6" :xl="6">
                    <div class="grid-content bg-purple">
                      <el-form-item  :label="$t('order.packageamount')" >
                        <div class="block">
                          <el-input-number v-model="ysorderShowInfo.od_order_amount" :disabled="true" style="width: 100%;" :controls=false :precision="2" :max="9999999" > </el-input-number>
                        </div>
                      </el-form-item>
                    </div>
                  </el-col>
                   <el-col :xs="23" :sm="23" :md="12" :lg="6" :xl="6">
                    <div class="grid-content bg-purple">
                      <el-form-item  :label="$t('order.status')" prop="od_user_name">
                        <div class="block">
                          <el-input v-model="ysorderShowInfo.od_status" :disabled="true" style="width: 100%;"> </el-input>
                        </div>
                      </el-form-item>
                    </div>
                  </el-col>
                    <el-col :xs="23" :sm="23" :md="11" :lg="5" :xl="5">
                    <div class="grid-content bg-purple">
                      <el-form-item  :label="$t('order.toPaid')" prop="od_phone" >
                        <div class="block">
                          <el-input-number v-model="od_order_pay_amount" :disabled="true" style="width: 100%;" :controls=false :precision="2" :max="9999999" > </el-input-number>
                        </div>
                      </el-form-item>
                    </div>
                  </el-col>
                  </el-row>
                  <el-row :gutter="24" >
                  <el-col :xs="23" :sm="23" :md="12" :lg="6" :xl="6">
                    <div class="grid-content bg-purple">
                      <el-form-item  :label="$t('order.user')" prop="od_user_name" >
                        <div class="block">
                          <el-input v-model="ysorderShowInfo.od_username" :disabled="true" style="width: 100%;"> </el-input>
                        </div>
                      </el-form-item>
                    </div>
                  </el-col>
                    <el-col :xs="23" :sm="23" :md="11" :lg="6" :xl="6">
                    <div class="grid-content bg-purple" >
                      <el-form-item  :label="$t('order.date')" prop="od_phone" >
                        <div class="block">
                          <el-input v-model="ysorderShowInfo.od_date" :disabled="true" style="width: 100%;" > </el-input>
                        </div>
                      </el-form-item>
                    </div>
                  </el-col>
                  <el-col :xs="23" :sm="23" :md="12" :lg="6" :xl="6" v-if="ysorderShowInfo.od_status === '用户退单' ">
                    <div class="grid-content bg-purple" >
                      <el-form-item  :label="$t('order.od_refund')" prop="od_user_name" >
                        <div class="block">
                           <el-input-number v-model="od_refund" style="width: 100%;" :controls=false :disabled=true :precision="2" :max="9999999"> </el-input-number>
                        </div>
                      </el-form-item>
                    </div>
                  </el-col>
                  <el-col v-if="ysorderShowInfo.od_status === '用户退单' " :xs="23" :sm="23" :md="11" :lg="5" :xl="5">
                    <div class="grid-content bg-purple" >
                      <el-form-item  :label="$t('order.return_comments')" prop="od_user_name" >
                        <div class="block">
                           <el-input
                                type="textarea"
                                style="width: 100%;"
                                :rows="3"
                                :disabled="true"
                                :maxlength = 200
                                v-model="od_comment">
                            </el-input>
                        </div>
                      </el-form-item>
                    </div>
                  </el-col>
                  </el-row>
                </div>
                <div class = "userbox2">
                  <div class = "boxtitle" id="footer">用户信息</div>
                  <el-row :gutter="24" style="margin-bottom:20px;margin-top:20px;">
                  <el-col :xs="23" :sm="23" :md="12" :lg="6" :xl="6">
                    <div class="grid-content bg-purple" >
                      <el-form-item  :label="$t('order.username')" prop="od_user_name">
                        <div class="block">
                          <el-input v-model="ysorderShowInfo.od_user_name" :disabled="true" style="width:100%;"> </el-input>
                        </div>
                      </el-form-item>
                    </div>
                  </el-col>
                    <el-col :xs="23" :sm="23" :md="11" :lg="6" :xl="6">
                    <div class="grid-content bg-purple">
                      <el-form-item  :label="$t('order.cmphone')" prop="od_phone">
                        <div class="block">
                          <el-input v-model="ysorderShowInfo.od_phone" :disabled="true" style="width:100%;"> </el-input>
                        </div>
                      </el-form-item>
                    </div>
                  </el-col>
                  <el-col :xs="23" :sm="23" :md="12" :lg="6" :xl="6">
                    <div class="grid-content bg-purple">
                      <el-form-item  :label="$t('order.od_user_address')" >
                        <div class="block">
                          <el-input v-model="ysorderShowInfo.od_user_address" :disabled="true" style="width:100%;" > </el-input>
                        </div>
                      </el-form-item>
                    </div>
                  </el-col>
                  <el-col :xs="23" :sm="23" :md="11" :lg="5" :xl="5">
                    <div class="grid-content bg-purple">
                      <el-form-item  :label="$t('order.od_expected_date')" >
                        <div class="block">
                          <el-date-picker v-model="ysorderShowInfo.od_expected_date" :disabled="true" value-format="yyyy-MM-dd"  align="right" type="date" placeholder="选择日期" :picker-options="pickerOptions1" style="width:100%;">
                          </el-date-picker>
                        </div>
                      </el-form-item>
                    </div>
                  </el-col>
                </el-row>
                </div>
                <div class = "userbox2">
                  <div class = "boxtitle" id="footer">服务范围</div>
                  <el-row :gutter="24"  style="margin-top: 25px;">
                  <el-col :xs="23" :sm="23" :md="12" :lg="6" :xl="6">
                    <div class="grid-content bg-purple">
                      <el-form-item  :label="$t('order.cityid')" prop="od_cityid">
                        <div class="block">
                          <el-select class="filter-item" v-model="ysorderShowInfo.od_cityid"  :disabled="true" filterable  style="width: 100%;"  >
                          <el-option v-for="item in citysOptions" :key="item.branche_code" :label="item.branche_name" :value="item.branche_code">
                          </el-option>
                          </el-select>
                        </div>
                      </el-form-item>
                    </div>
                  </el-col>
                  <el-col :xs="23" :sm="23" :md="11" :lg="6" :xl="6">
                    <div class="grid-content bg-purple" >
                      <el-form-item  :label="$t('order.contract')" prop="od_contract" >
                        <div class="block">
                          <el-input v-model="ysorderShowInfo.od_contract" :disabled="true" style="width: 100%;"> </el-input>
                        </div>
                      </el-form-item>
                    </div>
                  </el-col>
                    <el-col :xs="23" :sm="23" :md="12" :lg="6" :xl="6">
                    <div class="grid-content bg-purple">
                      <el-form-item  :label="$t('order.packageid')" prop="od_product_id" >
                        <div class="block">
                          <el-select class="filter-item" :disabled="true" v-model="ysorderShowInfo.od_product_id" default-first-optionplaceholder="请选择套餐" style="width: 100%;">
                            <el-option v-for="item in packageoptions" :key="item.p_code" :label="item.p_name" :value="item.p_code">
                            </el-option>
                          </el-select>
                        </div>
                      </el-form-item>
                    </div>
                  </el-col>
                    <el-col :xs="23" :sm="23" :md="11" :lg="5" :xl="5">
                    <div class="grid-content bg-purple">
                      <el-form-item  :label="$t('order.days')" prop="od_product_item_id" >
                        <div class="block">
                          <el-input v-model="ysorderShowInfo.od_product_item_id" :disabled="true" style="width:100%;"> </el-input>
                        </div>
                      </el-form-item>
                    </div>
                  </el-col>
                </el-row>
                  <el-row :gutter="24">
                  <el-col :xs="23" :sm="23" :md="12" :lg="6" :xl="6">
                    <div class="grid-content bg-purple">
                      <el-form-item  :label="$t('order.startdate')" prop="od_startdate" >
                        <div class="block">
                          <el-date-picker v-model="ysorderShowInfo.od_startdate" :disabled="true" value-format="yyyy-MM-dd" align="right" type="date" placeholder="选择日期" :picker-options="pickerOptions1" style="width: 100%;">
                          </el-date-picker>
                        </div>
                      </el-form-item>
                    </div>
                  </el-col>
                    <el-col :xs="23" :sm="23" :md="11" :lg="6" :xl="6">
                    <div class="grid-content bg-purple" >
                      <el-form-item  :label="$t('order.enddate')" prop="od_enddate" >
                        <div class="block">
                          <el-date-picker v-model="ysorderShowInfo.od_enddate" :disabled="true" value-format="yyyy-MM-dd" align="right" type="date" placeholder="选择日期" :picker-options="pickerOptions1" style="width: 100%;">
                          </el-date-picker>
                        </div>
                      </el-form-item>
                    </div>
                  </el-col>
                  <el-col :xs="23" :sm="23" :md="12" :lg="6" :xl="6">
                    <div class="grid-content bg-purple">
                      <el-form-item  :label="$t('order.mmid')" prop="od_mmid">
                        <div class="block">
                          <el-select class="filter-item" v-model="ysorderShowInfo.od_mmid" filterable  :disabled="true" style="width: 100%;">
                          <el-option v-for="item in mmsoptions" :key="item.id" :label="item.truename" :value="item.id">
                          </el-option>
                          </el-select>
                        </div>
                      </el-form-item>
                    </div>
                  </el-col>
                  <el-col :xs="23" :sm="23" :md="11" :lg="5" :xl="5">
                    <div class="grid-content bg-purple">
                      <el-form-item  :label="$t('order.consultant')" prop="od_consultantid">
                        <div class="block">
                      <el-select class="filter-item" v-model="ysorderShowInfo.od_consultantid" :disabled="true" filterable  style="width: 100%;">
                      <el-option v-for="item in consultantOptions" :key="item.id" :label="item.name" :value="item.id">
                      </el-option>
                      </el-select>
                        </div>
                      </el-form-item>
                    </div>
                  </el-col>
                  </el-row>
                  <el-row :gutter="24" >
                  <el-col :xs="23" :sm="23" :md="12" :lg="6" :xl="6">
                    <div class="grid-content bg-purple">
                      <el-form-item  :label="$t('order.introducer')" prop="od_introducer_phone">
                        <div class="block">
                          <el-select class="filter-item" v-model="ysorderShowInfo.od_introducer_phone" :disabled="true" filterable  style="width: 100%;">
                          <el-option v-for="item in IntroducerOptions" :key="item.wv_phone" :label="item.wv_phone" :value="item.wv_phone">
                          </el-option>
                          </el-select>
                        </div>
                      </el-form-item>
                    </div>
                  </el-col>
                  </el-row>
                </div>
                <div class = "userbox2">
                <div class = "boxtitle" id="footer">优惠信息</div>
                <el-row :gutter="24" style="margin-top: 25px;" v-if='ysorderShowInfo.od_promotion_discount>0'>
                  <el-col :xs="23" :sm="23" :md="12" :lg="12" :xl="12">
                    <el-form-item  label="活动优惠" prop="od_consultantid">
                      <div class="block">
                        <el-select class="filter-item" v-model="ysorderShowInfo.od_promotion_id" filterable :disabled="true"  style="width: 205px;margin-left:9px;">
                          <el-option v-for="item in promotionOptions" :key="item.id" :label="item.po_name" :value="item.id">
                          </el-option>
                        </el-select>
                        <el-input-number v-model="ysorderShowInfo.od_promotion_discount" :disabled="true" style="width: 250px;margin-left:40px;" :controls=false :precision="2" :max="9999999"> </el-input-number>
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="24" style="margin-top: 25px;" v-if='ysorderShowInfo.od_mgm_discount>0'>
                  <el-col :xs="23" :sm="23" :md="12" :lg="12" :xl="12">
                    <el-form-item  label="介绍优惠" prop="od_consultantid">
                      <div class="block">
                      <el-input-number v-model="ysorderShowInfo.od_mgm_discount" :disabled="true" style="width:100%;" :controls=false :precision="2" :max="9999999"> </el-input-number>
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="24" style="margin-top: 25px;" v-if='ysorderShowInfo.od_other_discount>0'>
                    <el-col :xs="23" :sm="23" :md="12" :lg="12" :xl="12">
                    <el-form-item  label="其他优惠" prop="od_consultantid">
                      <div class="block">
                        <el-input-number v-model="ysorderShowInfo.od_other_discount" :disabled="true" style="width: 100%;" :controls=false :precision="2" :max="9999999"> </el-input-number>
                      </div>
                    </el-form-item>
                    </el-col>
                </el-row>
                <el-row :gutter="24" style="margin-top: 25px" v-if='ysorderShowInfo.od_mgm_discount<=0&&ysorderShowInfo.od_other_discount<=0&&ysorderShowInfo.od_promotion_discount<=0'>
                  <el-col :xs="23" :sm="23" :md="12" :lg="12" :xl="12">
                    <el-form-item  label="没有优惠" prop="od_consultantid">
                    </el-form-item>
                  </el-col>
                </el-row>
              </div>
               <div class = "userbox2">
                <div class = "boxtitle" id="footer">支付信息</div>
                <div :key='id' v-for='(item,id) in ysCustomerPayList' :label="item">
                <el-row :gutter="24" style="margin-top:25px;" v-if="ysCustomerPayList != undefined && ysCustomerPayList.length >0">
                  <el-col :xs="16" :sm="16" :md="16" :lg="16" :xl="16">
                       <el-row :gutter="24">
                         <el-col :span="12">
                           <div class="grid-content bg-purple">
                            <el-form-item  :label="$t('order.payment_steps')">
                              <div class="block">
                                <el-input v-model="item.payment_steps" :disabled="true" style="width: 100%;" > </el-input>
                              </div>
                            </el-form-item>
                          </div>
                         </el-col>
                         <el-col :span="12">
                           <div class="grid-content bg-purple">
                            <el-form-item  :label="$t('order.payment_amount')">
                              <div class="block">
                                <el-input v-model="item.cp_payamount" :disabled="true" style="width: 100%;" > </el-input>
                              </div>
                            </el-form-item>
                          </div>
                         </el-col>
                       </el-row>
                       <el-row :gutter="24">
                         <el-col :span="12">
                           <div class="grid-content bg-purple">
                            <el-form-item  :label="$t('order.date')">
                              <div class="block">
                                <el-input v-model="item.cp_date" :disabled="true" style="width: 100%;" > </el-input>
                              </div>
                            </el-form-item>
                          </div>
                         </el-col>
                         <el-col :span="12">
                           <div class="grid-content bg-purple">
                            <el-form-item  :label="$t('order.paytype')">
                              <div class="block">
                                <el-input v-model="item.cp_paytype" :disabled="true" style="width: 100%;" > </el-input>
                              </div>
                            </el-form-item>
                          </div>
                         </el-col>
                       </el-row>
                       <el-row :gutter="24">
                         <el-col :span="12">
                           <div class="grid-content bg-purple">
                            <el-form-item  :label="$t('order.out_trade_no')">
                              <div class="block">
                                <el-input v-model="item.out_trade_no" :disabled="true" style="width: 100%;" > </el-input>
                              </div>
                            </el-form-item>
                          </div>
                         </el-col>
                         <el-col :span="12">
                           <div class="grid-content bg-purple">
                            <el-form-item  :label="$t('order.muser')">
                              <div class="block">
                                <el-input v-model="item.cp_username" :disabled="true" style="width: 100%;" > </el-input>
                              </div>
                            </el-form-item>
                          </div>
                         </el-col>
                       </el-row>
                       <el-row :gutter="18">
                         <el-col :span="6">
                         </el-col>
                       </el-row>
                  </el-col>
                  <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                    <div class="grid-content bg-purple">
                      <el-form-item  :label="$t('order.payvoucher')" prop="np">
                        <div class="demo-image__preview" v-if="item.voucherImg != null">
                          <el-image 
                            style="width: 150px; height: 200px"
                            :src="item.voucherImg" 
                            :preview-src-list="item.voucherImgList">
                          </el-image>
                        </div>
                      </el-form-item>
                    </div>
                  </el-col>
                </el-row>
                </div>
                <el-row :gutter="24" style="margin-top: 25px" v-if="ysCustomerPayList == undefined || ysCustomerPayList.length ==0">
                  <el-col :xs="23" :sm="23" :md="12" :lg="12" :xl="12">
                    <el-form-item  label="没有支付" prop="od_consultantid">
                    </el-form-item>
                  </el-col>
                </el-row>
               </div>
               
               <div class = "userbox2">
                <div class = "boxtitle" id="footer">月嫂服务信息</div>
                <el-table :key='orderMMtableKey' :data="orderMMList" v-loading="orderMMLoading" element-loading-text="加载中......" border fit
                        highlight-current-row
                        style="width: 90%;margin-top:20px;margin-left:5%;margin-right:5%;">
                <el-table-column type="index" align="center" :label="$t('table.seq')" width="50">
                </el-table-column>
                <el-table-column align="center" :label="$t('order.mmid')">
                  <template slot-scope="scope">
                    <span>{{scope.row.od_mmname}}</span>
                  </template>
                </el-table-column>
                <el-table-column align="center" :label="$t('order.startdate')">
                  <template slot-scope="scope">
                    <span >{{scope.row.od_startdate}}</span>
                  </template>
                </el-table-column>
                <el-table-column align="center" :label="$t('order.enddate')">
                  <template slot-scope="scope">
                    <span>{{scope.row.od_enddate}}</span>
                  </template>
                </el-table-column>
                <el-table-column align="center" :label="$t('equipment.cp_comments')">
                  <template slot-scope="scope">
                    <span>{{scope.row.od_comment}}</span>
                  </template>
                </el-table-column>
                <el-table-column align="center" :label="$t('order.startdateNew')">
                  <template slot-scope="scope">
                    <span>{{scope.row.od_changeDate}}</span>
                  </template>
                </el-table-column>
                <el-table-column align="center" :label="$t('order.muser')">
                  <template slot-scope="scope">
                    <span>{{scope.row.od_username}}</span>
                  </template>
                </el-table-column>
              </el-table>
              <div class="pagination-container" style="margin-bottom:20px;text-align:right;margin-right:4%;">
                <el-pagination
                  small
                  layout="prev, pager, next"
                  :total="orderMMtotal"
                  :page-size="orderMMlimit"
                  @size-change="orderMMSizeChange" @current-change="orderMMCurrentChange"
                  :current-page="orderMMpage">
                </el-pagination>
              </div>
              </div>
            </el-form>
        <el-dialog title="Reading statistics" :visible.sync="dialogPvVisible">
          <el-table :data="pvData" border fit highlight-current-row style="width: 100%">
            <el-table-column prop="key" label="Channel"></el-table-column>
            <el-table-column prop="pv" label="Pv"></el-table-column>
          </el-table>
          <span slot="footer" class="dialog-footer">
            <el-button type="primary" @click="dialogPvVisible = false">{{$t('table.confirm')}}</el-button>
          </span>
        </el-dialog>
      </div>
  </template> 
  <script>
    import { fetchPv, updateArticle, queryOrderPayPhoto } from '@/api/article'
    import { getQueryPromotionOfflines } from '@/api/promotion'
    import waves from '@/directive/waves' // 水波纹指令
    import { parseTime } from '@/utils'
    import { selectByOdNo, queryCustomerPayAndVoucher, selectYSOrderServiceLog, queryYSOrderReturn } from '@/api/order'
    import Fullcalendar from 'vue-fullcalendar'
    var demoEvents = []
    // arr to obj ,such as { CN : "China", US : "USA" }
    export default {
      components: { Fullcalendar },
      name: 'ysordershow22',
      directives: {
        waves
      },
      data() {
        return {
          orderMMtableKey: 0,
          orderMMList: null,
          orderMMLoading: true,
          orderMMpage: 1,
          orderMMlimit: 10,
          orderMMtotal: null,
          od_comment: null,
          od_refund: null,
          queryOrderMM: {
            limit: 10,
            page: 1,
            od_no: null
          },
          od_order_pay_amount: 0,
          branchesOptions: [],
          IntroducerOptions: [],
          citysOptions: [],
          packageoptions: [],
          consultantOptions: [],
          mmsoptions: [],
          promotionOptions: [],
          pickerOptions1: {
            shortcuts: [{
              text: '今天',
              onClick(picker) {
                picker.$emit('pick', new Date())
              }
            }, {
              text: '昨天',
              onClick(picker) {
                const date = new Date()
                date.setTime(date.getTime() - 3600 * 1000 * 24)
                picker.$emit('pick', date)
              }
            }, {
              text: '一周前',
              onClick(picker) {
                const date = new Date()
                date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
                picker.$emit('pick', date)
              }
            }]
          },
          fcEvents: demoEvents,
          calendarlist: {
            title: undefined,
            start: undefined,
            end: undefined,
            cssClass: undefined
          },
          dialogImageUrl: undefined,
          dialogVisible: false,
          certificateKey: 0,
          trainkey: 0,
          list: null,
          total: null,
          listLoading: true,
          page: 1,
          limit: 10,
          listQuery: {
            page: 1,
            limit: 10,
            id: 1
          },
          fileListvoucher: [],
          ysorderShowInfo: {
            od_no: null,
            od_user_name: null,
            od_user_address: null,
            od_expected_date: null,
            od_status: null,
            od_phone: null,
            od_startdate: null,
            od_enddate: null,
            od_mmid: null,
            od_product_id: null,
            od_product_item_id: null,
            od_cityid: null,
            od_contract: null,
            od_consultantid: null,
            od_introducer_phone: null,
            od_introducer_consultant: null,
            od_order_amount: null,
            od_order_pay_amount: null,
            od_mgm_discount: null,
            od_promotion_discount: null,
            od_other_discount: null,
            od_rebate_amount: null,
            od_promotion_id: null,
            od_earnestpay: null,
            od_balancepay: null,
            od_ismdj: null,
            od_mdjstartdate: null,
            od_mdjenddate: null,
            od_user: null,
            od_date: null
          },
          seachQuery: {
            od_no: null
          },
          seachQueryEarnestPay: {
            cp_orderno: null
          },
          queryEarnestPayVoucher: {
            eh_code: null,
            cv_orderstaus: 2
          },
          queryBalancePayVoucher: {
            eh_code: null,
            cv_orderstaus: 3
          },
          fileListEarnestPayVoucher: [],
          fileListBalancePayVoucher: [],
          ysCustomerPayList: [],
          ysOrderBalancePay: {
            cp_paytype: null,
            cp_payamount: null,
            cp_usercode: null,
            cp_date: null,
            cp_username: null,
            cv_filepath: null
          },
          queryequipmentpay: {
            cp_orderno: null
          },
          ysorderShowInforeturn: {
            er_return_mortagage: null,
            er_usercode: null,
            er_date: null
          },
          queryequipmentreturn: {
            eh_code: null
          },
          queryMMstock: {
            servant_code: undefined
          },
          listEquipmentLog: {
            ei_code: null,
            page: 1,
            limit: 10
          },
          showReviewer: false,
          trainoptions: '',
          modifyresult: '',
          train_name: '',
          visible2: false,
          deltraininfo: {
            id: undefined
          },
          dialogFormVisible: false,
          dialogStatus: '',
          textMap: {
            update: 'Edit',
            create: '添加月嫂'
          },
          dialogPvVisible: false,
          pvData: [],
          downloadLoading: false,
          view: {
            name: undefined,
            path: undefined,
            title: undefined
          }
        }
      },
      destroyed() {
        this.view.name = 'ysordershow'
        this.view.path = '/order/ysorder_show'
        this.view.title = 'ysordershow'
        this.$store.dispatch('delVisitedViews', this.view)
      },
      created() {
        this.getlist()
      },
      methods: {
        getlist() {
          this.seachQuery.od_no = this.$route.params.od_no
          this.seachQueryEarnestPay.cp_orderno = this.$route.params.od_no
          selectByOdNo(this.seachQuery).then(response => {
            this.ysorderShowInfo = response.data
            this.ysorderShowInfo.od_no = response.data.od_no
            this.ysorderShowInfo.od_user_name = response.data.od_user_name
            this.ysorderShowInfo.od_user_address = response.data.od_user_address
            if (response.data.od_status === 1) {
              this.ysorderShowInfo.od_status = '已保存'
            } else if (response.data.od_status === 2) {
              this.ysorderShowInfo.od_status = '部分支付'
            } else if (response.data.od_status === 3) {
              this.ysorderShowInfo.od_status = '全部支付'
            } else if (response.data.od_status === 4) {
              this.ysorderShowInfo.od_status = '服务完成'
            } else if (response.data.od_status === 9) {
              this.ysorderShowInfo.od_status = '用户退单'
              var queryReturnInfo = {
                od_no: null
              }
              queryReturnInfo.od_no = this.$route.params.od_no
              queryYSOrderReturn(queryReturnInfo).then(response => {
                this.od_comment = response.data.od_comment
                this.od_refund = response.data.od_refund
              })
            } else {
              this.ysorderShowInfo.od_status = '未知'
            }
            this.ysorderShowInfo.od_phone = response.data.od_phone
            this.ysorderShowInfo.od_startdate = response.data.od_startdate
            this.ysorderShowInfo.od_enddate = response.data.od_enddate
            this.ysorderShowInfo.od_mmid = response.data.od_mmname
            this.ysorderShowInfo.od_product_id = response.data.od_product_name
            this.ysorderShowInfo.od_product_item_id = response.data.od_product_item_id
            this.ysorderShowInfo.od_cityid = response.data.od_cityidname
            this.ysorderShowInfo.od_contract = response.data.od_contract
            this.ysorderShowInfo.od_consultantid = response.data.od_consultantname
            this.ysorderShowInfo.od_introducer_phone = response.data.od_introducer_phone
            this.ysorderShowInfo.od_introducer_consultant = response.data.od_introducer_consultant
            this.ysorderShowInfo.od_order_amount = parseFloat(response.data.od_order_amount).toFixed(2)
            this.ysorderShowInfo.od_order_pay_amount = response.data.od_order_pay_amount
            this.ysorderShowInfo.od_mgm_discount = response.data.od_mgm_discount
            this.ysorderShowInfo.od_promotion_discount = response.data.od_promotion_discount
            this.ysorderShowInfo.od_other_discount = response.data.od_other_discount
            this.ysorderShowInfo.od_rebate_amount = response.data.od_rebate_amount
            this.ysorderShowInfo.od_promotion_id = response.data.od_promotion_id
            this.ysorderShowInfo.od_ismdj = response.data.od_ismdj
            this.ysorderShowInfo.od_mdjstartdate = response.data.od_mdjstartdate
            this.ysorderShowInfo.od_mdjenddate = response.data.od_mdjenddate
            this.ysorderShowInfo.od_user = response.data.od_username
            this.ysorderShowInfo.od_date = response.data.od_date
            queryCustomerPayAndVoucher(this.seachQueryEarnestPay).then(res => {
              var pay_amount_temp = 0
              for (var i = 0; i < res.data.length; i++) {
                var customerPayTemp = {
                  payment_steps: null,
                  cp_payamount: null,
                  cp_date: null,
                  cp_paytype: null,
                  out_trade_no: null,
                  cp_username: null,
                  voucherImg: null,
                  voucherImgList: null
                }
                var imgListTemp = []
                customerPayTemp.payment_steps = res.data[i].payment_steps
                customerPayTemp.cp_payamount = res.data[i].cp_payamount
                customerPayTemp.cp_date = res.data[i].cp_date
                customerPayTemp.cp_paytype = res.data[i].cp_paytype
                customerPayTemp.out_trade_no = res.data[i].out_trade_no
                customerPayTemp.cp_username = res.data[i].cp_username
                customerPayTemp.voucherImg = res.data[i].cv_filepath
                imgListTemp.push(res.data[i].cv_filepath)
                customerPayTemp.voucherImgList = imgListTemp
                this.ysCustomerPayList.push(customerPayTemp)
                pay_amount_temp = pay_amount_temp + res.data[i].cp_payamount
              }
              this.od_order_pay_amount = parseFloat(response.data.od_order_amount - response.data.od_mgm_discount - response.data.od_promotion_discount - response.data.od_other_discount).toFixed(2) - pay_amount_temp
            })
          })
          this.queryEarnestPayVoucher.eh_code = this.$route.params.od_no
          queryOrderPayPhoto(this.queryEarnestPayVoucher).then(response7 => {
            this.fileListEarnestPayVoucher = response7.data
          })
          getQueryPromotionOfflines().then(response6 => {
            this.promotionOptions = response6.data
            this.promotionOptions.push({ id: 999001, po_name: '临时活动' })
          })
          this.queryOrderMM.od_no = this.$route.params.od_no
          selectYSOrderServiceLog(this.queryOrderMM).then(response => {
            this.orderMMList = response.data.items
            this.orderMMtotal = response.data.total
            this.orderMMLoading = false
          })
        },
        beforeUpdate(file) {
          if (file.size > 1000000) {
            this.$message.error('上传照片大于1M！')
            return false
          }
        },
        handleModifyStatus(row, status) {
          this.$message({
            message: '操作成功',
            type: 'success'
          })
          row.status = status
        },
        handleCreate() {
          this.resetmminfo()
          this.dialogStatus = 'create'
          this.dialogFormVisible = true
          this.$nextTick(() => {
            this.$refs['addTrains'].clearValidate()
          })
        },
        handleUpdate(row) {
          this.temp = Object.assign({}, row) // copy obj
          this.temp.timestamp = new Date(this.temp.timestamp)
          this.dialogStatus = 'update'
          this.dialogFormVisible = true
          this.$nextTick(() => {
            this.$refs['dataForm'].clearValidate()
          })
        },
        updateData() {
          this.$refs['dataForm'].validate((valid) => {
            if (valid) {
              const tempData = Object.assign({}, this.temp)
              tempData.timestamp = +new Date(tempData.timestamp) // change Thu Nov 30 2017 16:41:05 GMT+0800 (CST) to 1512031311464
              updateArticle(tempData).then(() => {
                for (const v of this.list) {
                  if (v.id === this.temp.id) {
                    const index = this.list.indexOf(v)
                    this.list.splice(index, 1, this.temp)
                    break
                  }
                }
                this.dialogFormVisible = false
                this.$notify({
                  title: '成功',
                  message: '更新成功',
                  type: 'success',
                  duration: 2000
                })
              })
            }
          })
        },
        handleDelete(row) {
          this.$notify({
            title: '成功',
            message: '删除成功',
            type: 'success',
            duration: 2000
          })
          const index = this.list.indexOf(row)
          this.list.splice(index, 1)
        },
        handleFetchPv(pv) {
          fetchPv(pv).then(response => {
            this.pvData = response.data.pvData
            this.dialogPvVisible = true
          })
        },
        handleDownload() {
          this.downloadLoading = true
          import('@/vendor/Export2Excel').then(excel => {
            const tHeader = ['timestamp', 'title', 'type', 'importance', 'status']
            const filterVal = ['timestamp', 'title', 'type', 'importance', 'status']
            const data = this.formatJson(filterVal, this.list)
            excel.export_json_to_excel(tHeader, data, 'table-list')
            this.downloadLoading = false
          })
        },
        formatJson(filterVal, jsonData) {
          return jsonData.map(v => filterVal.map(j => {
            if (j === 'timestamp') {
              return parseTime(v[j])
            } else {
              return v[j]
            }
          }))
        },
        cancelEdit() {
          this.getList()
        },
        orderMMSizeChange(val) {
          this.eorderMMlimit = val
          this.queryOrderMM.limit = val
          this.queryOrderMM.page = this.orderMMpage
          this.orderMMFilter()
        },
        orderMMCurrentChange(val) {
          this.orderMMpage = val
          this.queryOrderMM.limit = this.orderMMlimit
          this.queryOrderMM.page = val
          this.orderMMFilter()
        },
        orderMMFilter() {
          this.queryOrderMM.page = this.orderMMpage
          this.queryOrderMM.limit = this.orderMMlimit
          this.queryType = 'query'
          this.listLoading = true
          selectYSOrderServiceLog(this.queryOrderMM).then(response => {
            this.orderMMList = response.data.items
            this.orderMMtotal = response.data.total
            this.orderMMLoading = false
          })
        },
        handlePictureCardPreview(file) {
          this.dialogImageUrl = file.url
          this.dialogVisible = true
        }
      }
    }
  </script>
<style>
  .el-form--label-left .el-form-item__label{
    text-align:right
  }
  .el-rate{
    line-height: 0;
    margin-top:8px;
  }
  .el-checkbox.el-checkbox {
      margin-left: 30px;
  }
  .el-input-number .el-input__inner {
    text-align: right;
  }
  .userbox {
    width: 100%;
    border: 1px solid #ebebeb;
  }
  .userbox2 {
    margin-top: 28px;
    width: 100%;
    border: 1px solid #ebebeb;
  }
  .boxtitle {
    width: 15%;
    background-color: #ffffff;
    height: 20px;
    font-size:1rem;
    margin-top: -10px;
    margin-left: 2%;
    margin-right: 2%;
    text-align: center;
  }
   .discountBox {
    margin-top: 20rpx;
  }
  #footer{
    font-size: 0.4rem;
  }
  @media only screen and (min-width:768px){
    #footer{font-size: 0.8rem;}
  }
  @media only screen and (min-width:992px){
    #footer{font-size:1rem;}
  }
  @media only screen and (min-width:2000px){
    #footer{font-size:1.4rem;}
  }
  #discount{
    font-size: 0.8rem;
    color: #606266;
    font-weight: 700;
  }
  @media only screen and (min-width:768px){
    #discount{
      font-size: 0.9rem;
      color: #606266;
      font-weight: 700;
    }
  }
  @media only screen and (min-width:992px){
    #discount{
      font-size:0.9rem;
      color: #606266;
      font-weight: 700;
    }
  }
  @media only screen and (min-width:2000px){
    #discount{
      font-size:0.9rem;
      color: #606266;
      font-weight: 700;
    }
  }
                </style>