<template>
  <v-header title="申请售后" backgroundColor="#fff">

    <view class="screen_all flex">
      <view class="flex-all-1 overflow apply-after-container">
        <scroll-view class="screen_all" scroll-y>
          <view class="apply-after-screen">
            <view class="apply-after-header apply-after-modal">
              <view class="apply-after-header-item row aCenter"
                v-for="(item,index) in inputData"
                :key="index"
                    @click="openSelectModal(item)"
              >
                <view class="flex-all-1">{{item.label}}</view>
                <view class="line-1 apply-after-header-value">{{item.data[item.value] ? item.data[item.value].label : ''}}</view>
                <text class="iconfont iconfont-more apply-after-header-more"></text>
              </view>
            </view>

            <view class="apply-after-modal apply-after-footer">
              <view class="row aCenter apply-after-footer-title">
                <view class="apply-after-footer-label">{{introduce.target || ''}}金额:</view>
                <view class="flex-all-1 overflow">
                  <view class="line-1">￥{{item.price}}</view>
                </view>
              </view>
              <view class="row aCenter apply-after-footer-title">
                <view class="apply-after-footer-label">商品名称:</view>
                <view class="flex-all-1 overflow">
                  <view class="line-1">{{item.name}}</view>
                </view>
              </view>
              <view class="apply-after-footer-title">{{introduce.target || ''}}说明:</view>
              <view class="apply-after-textarea">
                <textarea class="screen_all" v-model="textarea" maxlength="300" :placeholder="'请说明'+(introduce.targetLabel || introduce.target || '')+'原因'"></textarea>
              </view>
              <view class="apply-after-footer-title">相关图片:</view>
              <view class="apply-after-upload-wrap">
                <upload custom :max="5" :row="4" :padding="60"  v-model="images">
                  <view class="screen_all center apply-after-upload relative">
                    <text class="iconfont iconfont-puls apply-after-upload-puls"></text>
                    <view class="center absolute apply-after-upload-number">{{images.length}}/5</view>
                  </view>
                </upload>
              </view>
            </view>
          </view>
        </scroll-view>
      </view>
      <view class="apply-after-button-wrap">
        <view @click="submit" class="apply-after-button center">提交申请</view>
      </view>
    </view>

    <v-select v-model="select" :data="useSelectItem.data" @change="changeSelect" :select="useSelectItem.value"></v-select>

  </v-header>
</template>

<script>
import mixins from './mixins';
import vHeader from '@/components/v-header/main';
import vSelect from '@/components/v-select/main';
import upload from '@/components/upload/main';
export default {
  name: "apply-after",
  mixins,
  components:{
    vHeader,
    vSelect,
    upload
  }
}
</script>

<style src="./style.scss" lang="scss">

</style>