splitItem.vue 4.31 KB
Newer Older
李星剑's avatar
李星剑 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
<!--款式委托 拆弹-->
<template>
  <view>
    <!--navbar-->
    <u-navbar title="拆单"
              :border-bottom="false"
              :background="{backgroundColor: 'whitesmoke'}">
    </u-navbar>

    <view class="u-p-30 bg-fff">
      <hs-tip-title title="所选面料"></hs-tip-title>
      <view ></view>
    </view>
    <view class="u-p-30 bg-fff">
      <hs-tip-title title="风格款数要求"></hs-tip-title>
      <view v-for="(item,index) in brandList" :key="index" class="u-p-t-16 u-p-b-30 u-border-bottom">
        <view class="u-flex u-p-b-16">
          <view class="u-line-1 u-flex-1">
            {{item.name}}
          </view>
          <text class="del" @click="del">删除</text>
        </view>
        <u-number-box v-model="item.num"></u-number-box>
      </view>
      <u-button plain @click="addBrandList"  type="primary">+添加风格</u-button>
    </view>

    <u-select
        @confirm="brandSelectCallback"
        safe-area-inset-bottom v-model="brandSelectShow" :list="brandSelectList" mode="mutil-column-auto"></u-select>

    <view class="footer" id="footer">
      <view class="footer-btn">
        <view class="custom-style-round-circle custom-style-btn custom-style">
          <view class="custom-style-left save">保存</view>
          <view class="custom-style-right submit">
            <view class="title">立即发布</view>
            <view class="desc">将被拆分为<text class="color">2个委托</text></view>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
import HsTipTitle from "../../components/hs-tip-title/hs-tip-title";
export default {
  name: "splitItem",
  components: {HsTipTitle},
  data(){
    return{
      brandList: [
        {name: '男装|上装|25~35岁|时尚休闲', num: 12},
        {name: '男装|上装|15~25岁|时尚休闲时尚休闲时', num: 12},
      ],
      brandSelectShow: false,
      timePickerShow: true,
      brandSelectList: [
        {
          value: 1,
          label: '男装',
          children: [
            {
              value: 11,
              label: '上装',
              children:[
                {
                  value: 21,
                  label: '18-25岁',
                  children:[
                    {
                      value: 31,
                      label: '时尚休闲',
                    },
                    {
                      value: 32,
                      label: '运动',
                    }
                  ]
                },
                {
                  value: 22,
                  label: '25-35岁',
                  children:[
                    {
                      value: 33,
                      label: '时尚休闲',
                    },
                    {
                      value: 34,
                      label: '运动',
                    }
                  ]
                },
              ]
            }
          ]
        }
      ],
    }
  },
  methods:{
    addBrandList(){
      this.brandSelectShow = true;
    },
    brandSelectCallback(e){
      this.brandList.push({
        num: 0,
        name: e.map((item) => {
          return item.label
        }).join("|")
      })
    }

  }
}
</script>

<style scoped lang="scss">
@mixin vue-flex($direction: row) {
  /* #ifndef APP-NVUE */
  display: flex;
  flex-direction: $direction;
  /* #endif */
}
.del{
  color: #FA5353;
}
.bg-fff{
  background: #fff;
}
.custom-style{
  color: #fff; height: 88rpx; line-height: 88rpx;
  @include vue-flex;
  &-btn{
    overflow: hidden;
  }
  &-round-circle{
    border-radius: 100rpx;
  }
  /*background: #000;*/
  .custom-style-left{ width: 240rpx; background: #d6d6d6; text-align: center }
  .custom-style-right{ flex: 1; background: rgba(0,0,0,0.80);text-align: center}
  .save{
    font-size: 34rpx;
    color: #000000;
  }
  .submit{
    font-weight: 500;
    font-size: 34rpx;
    line-height: 100%;
    .title{
      margin: 8rpx 0;
    }
    .desc{

      font-size: 20rpx;
      .color{
        color: #DDA973;
      }
    }
  }
}
.footer {
  position: fixed;
  width: 100%;
  bottom: 0;

  z-index: 998;
  background: #fff;
  box-shadow: 0px -4rpx 6rpx 0px rgba(178,182,214,0.10);
  padding-bottom: constant(safe-area-inset-bottom);
  padding-bottom: env(safe-area-inset-bottom);
  .footer-btn{
    padding: 20rpx 60rpx;
  }
}
</style>