entrustManagement.vue 9.8 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 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366
<template>
  <view>
    <view id="header">
      <!--新增委托navbar-->
      <view class="navbar u-p-t-20 u-p-r-30 u-p-b-20 u-p-l-30 u-flex">
        <u-icon name="arrow-left" color="#000" @click="$Router.back()"></u-icon>
        <text class="u-flex-1 text-center">款式委托</text>
        <text @click="goEntrustList">上架单</text>
      </view>
      <view class="u-p-30">
        <u-search placeholder="请输入款式名称或面料名称" v-model="keyword"
                  border-color="#e1e1e1" height="76"
                  bg-color="#fff" :show-action="false"></u-search>
      </view>
      <view class="status-list u-flex bg-fff">
        <view v-for="(status,index) in statusList"
              class="status-item u-flex-1 text-center"
              :class="[activeStatus === index ? 'active' : '']"
              @click="setActiveStatus(index)"
        >
          {{status.label}}
        </view>
      </view>
    </view>
    <view id="body" class="body u-p-r-30 u-p-l-30" :style="{ bottom: footerHeight + 'px', top: headerHeight+ 'px'}">
      <view v-if="activeStatus === 0">
        <view class="u-p-t-24 u-p-b-24">待上架:300款</view>
        <view class="entrust bg-fff u-p-30">
          <view class="entrust-title u-flex">
            <!--          :name="index === selectedIndex ? 'checkmark-circle-fill': 'checkmark-circle'"-->
            <u-icon name="checkmark-circle"
                    color="#000" size="40"
                    @click="triggerSelectItem()"
            />
            <text class="u-flex-1 u-p-l-30">
              加厚荷兰绒绒布布料(<text class="active-color">1</text>/3)
            </text>
            <u-icon name="arrow-down"
                    color="#000" size="40"
                    @click="triggerToggle()"
            />
          </view>
          <view class="u-flex u-p-t-30">
            <u-icon name="checkmark-circle"
                    color="#000" size="40"
                    @click="triggerSelectItem()"
            />
            <view class="item u-flex-1 u-flex u-p-l-30">
              <view class="item-img"></view>
              <view class="u-flex-1 u-p-l-20">
                <view class="item-title u-line-1 u-font-28">男装-上装-青年-时尚休闲</view>
                <view class="u-flex u-m-t-6 u-m-b-6">
                  <view class="u-m-r-40 label u-font-24">款号</view>
                  <view class="u-line-1 u-flex-1 content u-font-24">
                    11
                  </view>
                </view>
                <view class="u-flex u-m-t-6 u-m-b-6">
                  <view class="u-m-r-40 label u-font-24">所选面料</view>
                  <view class="u-line-1 u-flex-1 content u-font-24">
                    11
                  </view>
                </view>
                <view class="item-tags">
                  <view class="item-tag u-font-20">
                    标签
                  </view>
                  <view class="item-tag u-font-20">
                    标签
                  </view>
                </view>
              </view>
            </view>
          </view>

        </view>
      </view>
      <view v-if="activeStatus === 1">
        <view class="u-p-t-24 u-p-b-24">已上架:300款</view>
        <view class="entrust bg-fff u-p-30">
          <view class="entrust-title u-flex">
            <text class="u-flex-1 u-p-l-30">
              加厚荷兰绒绒布布料(3)
            </text>
            <u-icon name="arrow-down"
                    color="#000" size="40"
                    @click="triggerToggle()"
            />
          </view>
          <view class="u-flex u-p-t-30">
            <view class="item u-flex-1 u-flex u-p-l-30">
              <view class="item-img"></view>
              <view class="u-flex-1 u-p-l-20">
                <view class="item-title u-line-1 u-font-28">男装-上装-青年-时尚休闲</view>
                <view class="u-flex u-m-t-6 u-m-b-6">
                  <view class="u-m-r-40 label u-font-24">款号</view>
                  <view class="u-line-1 u-flex-1 content u-font-24">
                    11
                  </view>
                </view>
                <view class="u-flex u-m-t-6 u-m-b-6">
                  <view class="u-m-r-40 label u-font-24">所选面料</view>
                  <view class="u-line-1 u-flex-1 content u-font-24">
                    11
                  </view>
                </view>
                <view class="item-tags">
                  <view class="item-tag u-font-20">
                    标签
                  </view>
                  <view class="item-tag u-font-20">
                    标签
                  </view>
                </view>
              </view>
            </view>
          </view>

        </view>
      </view>
      <view v-if="activeStatus === 2">
        <view class="u-p-t-24 u-p-b-24">全部:300款</view>
        <view class="entrust bg-fff u-p-30">
          <view class="entrust-title u-flex">
            <view class="entrust-tip"></view>
            <text class=" u-flex-1 u-p-l-30">
              加厚荷兰绒绒布布料(3)
            </text>
            <text>已上架</text>
          </view>
          <view class="u-flex u-p-t-30">
            <view class="item u-flex-1 u-flex u-p-l-30">
              <view class="item-img"></view>
              <view class="u-flex-1 u-p-l-20">
                <view class="u-flex u-m-t-6 u-m-b-6">
                  <view class="u-m-r-40 label ">款号</view>
                  <view class="u-line-1 u-flex-1 content">
                    11
                  </view>
                </view>
                <view class="u-flex u-m-t-6 u-m-b-6">
                  <view class="u-m-r-40 label">所选面料</view>
                  <view class="u-line-1 u-flex-1 content">
                    11
                  </view>
                </view>
                <view class="item-tags">
                  <view class="item-tag u-font-20">
                    标签
                  </view>
                  <view class="item-tag u-font-20">
                    标签
                  </view>
                </view>
              </view>
            </view>
          </view>

        </view>
      </view>
    </view>
    <view id="footer" class="footer" v-if="activeStatus === 0">
      <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">
            一键上架(3)
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
import dom from "@/mixins/dom";

export default {
  name: "entrustManagement",
  mixins:[dom],
  data(){
    return{
      keyword: '',

      activeStatus: 0,
      statusList: [
        {label: '待上架', value: '1'},
        {label: '已上架', value: '2'},
        {label: '全部', value: '3'},
      ]
    }
  },
  methods:{
    resetPage(){
      this.getHeaderHeight();
      this.getFooterHeight();
    },
    setActiveStatus(index){
      this.activeStatus = index;
      this.resetPage();
    },

    triggerSelectItem(){

    },
    triggerToggle(){

    },
    goEntrustList(){
      this.$Router.push({
        path: '/pages/material/entrustList'
      })
    }
  }
}
</script>

<style scoped lang="scss">
$h-color: #AF8D66;
$activeColor: #DDA973;
$color: rgba(175,141,102,0.10);
$main-color: #fff;
@mixin vue-flex($direction: row) {
  /* #ifndef APP-NVUE */
  display: flex;
  flex-direction: $direction;
  /* #endif */
}
.active-color{ color: $color}
.bg-fff{ background: #fff;}
.item{
  width: 100%;
  margin-bottom: 28rpx;

  &--round{
    border-radius: 16rpx;
    border: 1px solid rgba(0,0,0,0.10);
  }
  &--status{
    left: 0;
    top: 0;
    position: absolute;
  }
  &-img{
    width: 160rpx;
    height: 160rpx;
    //height: 100%
  }
  &-title{}
  &-desc{}
  &-tags{

  }
  &-tag{
    padding: 6rpx 2px;
    background: $color;
    text-align: center;
    color: $h-color;
    display: inline-block;
    margin-right: 10rpx;
  }
}
.entrust{
  border-radius: 8rpx;
  &-tip{
    width: 8rpx;
    height: 32rpx;
    background: #af8d66;
    border-radius: 6rpx;
  }
}
.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;
      }
    }
  }
}
.label{
  color: rgba(0,0,0,0.40);
  font-size: 28rpx;
  min-width: 140rpx;
}
.context{
  color: #000;
  font-size: 28rpx;
}
.status-list{
  height: 80rpx;
  border-top-right-radius: 8rpx;
  border-top-left-radius: 8rpx;
  .status-item{
    color: #666;
    font-size: 28rpx;
    &.active{
      font-size: 32rpx;
      color:$activeColor;
    }
  }
}
.body{
  position: absolute;
  background: rgba(239,239,239,0.61);
  width: 100%;
  height: auto;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  overflow-y: auto;
}

.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;
    .button{
      border: 1px solid #333;
      border-radius: 44rpx;
      width: 100%;
      height: 88rpx;
      line-height: 88rpx;
      text-align: center;
      font-size: 34rpx;
      &-default{
        background: #333;
        color: #fff;
      }
    }
  }
}
</style>