|
@@ -0,0 +1,471 @@
|
|
|
+<template>
|
|
|
+ <div class="base-container">
|
|
|
+ <fnHeader showDate></fnHeader>
|
|
|
+ <div class="back-icon" @click="goBack">
|
|
|
+ <img src="@/assets/images/common/back-icon.png" />
|
|
|
+ 返回
|
|
|
+ </div>
|
|
|
+ <div class="custom-content">
|
|
|
+ <div class="custom-l">
|
|
|
+ <div class="box-title">
|
|
|
+ <img src="@/assets/images/common/area-icon.png" alt="" />
|
|
|
+ 选择果树
|
|
|
+ </div>
|
|
|
+ <div class="select-wrap">
|
|
|
+ <el-select class="select-item" v-model="areaVal" placeholder="全区" style="width: 146px">
|
|
|
+ <el-option
|
|
|
+ v-for="item in areaOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ <el-select class="select-item" v-model="typeVal" placeholder="全部品类" style="width: 146px">
|
|
|
+ <el-option
|
|
|
+ v-for="item in typeOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ <el-select class="select-item" v-model="ageVal" placeholder="树龄" style="width: 146px">
|
|
|
+ <el-option
|
|
|
+ v-for="item in ageOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="tree-list">
|
|
|
+ <div
|
|
|
+ class="list-item"
|
|
|
+ :class="{ selected: selectedItems.includes(item.id) }"
|
|
|
+ @click="selecteTree(item.id)"
|
|
|
+ v-for="(item, index) in allTrees"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <div class="tree-icon">
|
|
|
+ <img class="tree-img" src="@/assets/images/foster-home/tree-item.png" alt="" />
|
|
|
+ <div class="tree-type-name-tag">白糖罂</div>
|
|
|
+ </div>
|
|
|
+ <div class="item-center">
|
|
|
+ <div class="center-t">
|
|
|
+ BTY-A25
|
|
|
+ <span class="type-tag">综合:94分</span>
|
|
|
+ <span class="type-tag">生态:92分</span>
|
|
|
+ <span class="type-tag">树龄:5年</span>
|
|
|
+ </div>
|
|
|
+ <div class="center-item p-t-2">单价:<span>12元/斤</span></div>
|
|
|
+ <div class="center-item" v-show="ROLE==1">总认养斤数:<span>215斤</span></div>
|
|
|
+ <div class="center-item progress-wrap" v-show="ROLE==2">
|
|
|
+ 剩余可购:
|
|
|
+ <el-progress :percentage="60" color="#FFD887"><span class="progress-text"><span class="over">150</span>/215斤</span></el-progress>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="custom-r">
|
|
|
+ <div class="second-title">
|
|
|
+ <img src="@/assets/images/common/chart-yellow.png" alt="" />
|
|
|
+ 定制详情
|
|
|
+ </div>
|
|
|
+ <div class="custom-detail">
|
|
|
+ <div class="custom-user">
|
|
|
+ 选择客户:
|
|
|
+ <el-select v-model="selectUser" placeholder="选择客户" style="width: 256px">
|
|
|
+ <el-option
|
|
|
+ v-for="item in userOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="selected-tree" v-show="selectedItems.length">
|
|
|
+ <div class="tree-text">选择果树:</div>
|
|
|
+ <div
|
|
|
+ class="list-item selected"
|
|
|
+ @click="removeFromSelected(item)"
|
|
|
+ v-for="(item, index) in selectedItems"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <div class="tree-icon">
|
|
|
+ <img class="tree-img" src="@/assets/images/foster-home/tree-item.png" alt="" />
|
|
|
+ <div class="tree-type-name-tag">白糖罂</div>
|
|
|
+ </div>
|
|
|
+ <div class="item-center">
|
|
|
+ <div class="center-t">
|
|
|
+ BTY-A25
|
|
|
+ <span class="type-tag">综合:94分</span>
|
|
|
+ <span class="type-tag">生态:92分</span>
|
|
|
+ <span class="type-tag">树龄:5年</span>
|
|
|
+ </div>
|
|
|
+ <div class="center-item p-t-2">单价:<span>12元/斤</span></div>
|
|
|
+ <div class="center-item">总认养斤数:<span>215斤</span></div>
|
|
|
+ </div>
|
|
|
+ <div class="item-icon">
|
|
|
+ <el-icon size="24" color="#E04C4C"><CircleCloseFilled /></el-icon>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="selected-tips" v-show="selectedItems.length === 0">请在左侧选择 果树列表</div>
|
|
|
+ <!-- 渐变主色按钮 -->
|
|
|
+ <div class="btn-group" v-show="selectedItems.length">
|
|
|
+ <div class="btn cancel-btn">取消</div>
|
|
|
+ <div class="btn edit-btn">保存</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+import fnHeader from "@/components/fnHeader.vue";
|
|
|
+import { ref } from "vue";
|
|
|
+import { useRouter } from "vue-router";
|
|
|
+
|
|
|
+const ROLE = 2;
|
|
|
+
|
|
|
+const areaVal = ref(0);
|
|
|
+const areaOptions = ref([
|
|
|
+ { label: "全区", value: 0 },
|
|
|
+ { label: "1区", value: 1 },
|
|
|
+ { label: "2区", value: 2 },
|
|
|
+]);
|
|
|
+const typeVal = ref(0);
|
|
|
+const typeOptions = ref([
|
|
|
+ { label: "全部品类", value: 0 },
|
|
|
+ { label: "白糖罂", value: 1 },
|
|
|
+ { label: "井岗红糯", value: 2 },
|
|
|
+]);
|
|
|
+const ageVal = ref(0);
|
|
|
+const ageOptions = ref([
|
|
|
+ { label: "全部树龄", value: 0 },
|
|
|
+ { label: "0-10年", value: 1 },
|
|
|
+ { label: "10-20年", value: 2 },
|
|
|
+]);
|
|
|
+
|
|
|
+const selectUser = ref(null);
|
|
|
+const userOptions = ref([
|
|
|
+ { label: "张一", value: 1 },
|
|
|
+ { label: "张二", value: 3 },
|
|
|
+ { label: "张三", value: 3 },
|
|
|
+]);
|
|
|
+
|
|
|
+const selectedItems = ref([]);
|
|
|
+function selecteTree(id) {
|
|
|
+ if (!selectedItems.value.includes(id)) {
|
|
|
+ selectedItems.value.push(id);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const allTrees = ref([
|
|
|
+ { id: 1 },
|
|
|
+ { id: 2 },
|
|
|
+ { id: 3 },
|
|
|
+ { id: 4 },
|
|
|
+ { id: 5 },
|
|
|
+ { id: 6 },
|
|
|
+ { id: 7 },
|
|
|
+ { id: 8 },
|
|
|
+ { id: 9 },
|
|
|
+ { id: 10 },
|
|
|
+]);
|
|
|
+const removeFromSelected = (id) => {
|
|
|
+ const index = selectedItems.value.findIndex((item) => item === id);
|
|
|
+ if (index !== -1) {
|
|
|
+ selectedItems.value.splice(index, 1);
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const router = useRouter();
|
|
|
+function goBack() {
|
|
|
+ router.go(-1);
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.base-container {
|
|
|
+ width: 100%;
|
|
|
+ height: 100vh;
|
|
|
+ color: #fff;
|
|
|
+ position: relative;
|
|
|
+ box-sizing: border-box;
|
|
|
+ z-index: 1;
|
|
|
+ background: #000000;
|
|
|
+
|
|
|
+ .back-icon {
|
|
|
+ position: absolute;
|
|
|
+ left: 405px;
|
|
|
+ top: 38px;
|
|
|
+ cursor: pointer;
|
|
|
+ margin-right: 20px;
|
|
|
+ height: 40px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 0 28px;
|
|
|
+ border: 1px solid rgba(255, 255, 255, 0.6);
|
|
|
+ background: rgba(0, 0, 0, 0.2);
|
|
|
+ border-radius: 4px;
|
|
|
+ img {
|
|
|
+ width: 17px;
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .custom-content {
|
|
|
+ width: 100%;
|
|
|
+ height: calc(100% - 74px - 48px);
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 16px 20px 0 20px;
|
|
|
+ .select-wrap {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ ::v-deep {
|
|
|
+ .el-select__wrapper {
|
|
|
+ background: rgba(255, 212, 137, 0.06);
|
|
|
+ box-shadow: 0 0 0 1px rgba(255, 212, 137, 0.3) inset;
|
|
|
+ font-size: 13px;
|
|
|
+ .el-select__input {
|
|
|
+ color: #ffd489;
|
|
|
+ }
|
|
|
+ .el-select__placeholder {
|
|
|
+ color: #ffd489;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .el-select__suffix {
|
|
|
+ color: #ffd489;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .select-item + .select-item {
|
|
|
+ margin-left: 5px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .type-tag {
|
|
|
+ color: #ffd489;
|
|
|
+ background: rgba(255, 212, 137, 0.06);
|
|
|
+ padding: 2px 4px;
|
|
|
+ font-size: 10px;
|
|
|
+ margin-left: 4px;
|
|
|
+ border-radius: 4px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .custom-l {
|
|
|
+ flex: 1;
|
|
|
+ width: calc(100% - 473px);
|
|
|
+ height: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border: 1px solid #444444;
|
|
|
+ background: #191919;
|
|
|
+ border-radius: 8px;
|
|
|
+ padding: 20px 8px 22px 22px;
|
|
|
+ .box-title {
|
|
|
+ font-size: 22px;
|
|
|
+ display: flex;
|
|
|
+ align-items: flex-end;
|
|
|
+ font-family: "PangMenZhengDao";
|
|
|
+ margin-bottom: 16px;
|
|
|
+ img {
|
|
|
+ margin-right: 8px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .tree-list {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ padding-top: 8px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .list-item {
|
|
|
+ background: rgba(255, 255, 255, 0.08);
|
|
|
+ padding: 8px 10px;
|
|
|
+ border-radius: 5px;
|
|
|
+ width: max-content;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ margin-right: 8px;
|
|
|
+ margin-top: 12px;
|
|
|
+ border: 1px solid transparent;
|
|
|
+ cursor: pointer;
|
|
|
+ &.selected {
|
|
|
+ background: rgba(243, 193, 29, 0.1);
|
|
|
+ border-color: #f2d677;
|
|
|
+ }
|
|
|
+ .item-info {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ .tree-icon {
|
|
|
+ position: relative;
|
|
|
+ .tree-type-name-tag {
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ bottom: 0;
|
|
|
+ background: rgba(0, 0, 0, 0.6);
|
|
|
+ border-radius: 0 5px 5px 0;
|
|
|
+ font-size: 10px;
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+ padding: 1px;
|
|
|
+ backdrop-filter: blur(2px);
|
|
|
+ }
|
|
|
+ .tree-img {
|
|
|
+ width: 63px;
|
|
|
+ height: 63px;
|
|
|
+ border-radius: 5px;
|
|
|
+ object-fit: cover;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .item-center {
|
|
|
+ flex: 1;
|
|
|
+ padding-left: 12px;
|
|
|
+ color: #fff;
|
|
|
+ .center-t {
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ .center-item {
|
|
|
+ color: #6c6c6c;
|
|
|
+ font-size: 12px;
|
|
|
+ padding-top: 2px;
|
|
|
+ span {
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ ::v-deep {
|
|
|
+ .el-progress-bar__outer {
|
|
|
+ width: 100px;
|
|
|
+ background: rgba(242, 243, 245, 0.23);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .progress-wrap {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .progress-text {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #999999;
|
|
|
+ .over {
|
|
|
+ color: #FFD489;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .p-t-2 {
|
|
|
+ padding-top: 2px;
|
|
|
+ }
|
|
|
+ .custom-r {
|
|
|
+ width: 473px;
|
|
|
+ height: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ margin-left: 18px;
|
|
|
+ border: 1px solid #444444;
|
|
|
+ background: #191919;
|
|
|
+ border-radius: 8px;
|
|
|
+ .second-title {
|
|
|
+ background: rgba(255, 255, 255, 0.02);
|
|
|
+ border-radius: 8px 8px 0 0;
|
|
|
+ color: #ffd489;
|
|
|
+ font-size: 22px;
|
|
|
+ padding: 14px 12px;
|
|
|
+ }
|
|
|
+ .custom-detail {
|
|
|
+ padding: 16px 12px;
|
|
|
+ height: calc(100% - 60px);
|
|
|
+ box-sizing: border-box;
|
|
|
+ position: relative;
|
|
|
+ .custom-user {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ background: rgba(255, 255, 255, 0.04);
|
|
|
+ padding: 16px 12px;
|
|
|
+ border-radius: 8px;
|
|
|
+ ::v-deep {
|
|
|
+ .el-select__wrapper {
|
|
|
+ background: transparent;
|
|
|
+ box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
|
|
|
+ font-size: 13px;
|
|
|
+ .el-select__input {
|
|
|
+ color: #ffffff;
|
|
|
+ }
|
|
|
+ .el-select__placeholder {
|
|
|
+ color: #ffffff;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .el-select__suffix {
|
|
|
+ color: #ffffff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .selected-tree {
|
|
|
+ // display: flex;
|
|
|
+ margin-top: 12px;
|
|
|
+ background: rgba(255, 255, 255, 0.04);
|
|
|
+ padding: 16px 12px;
|
|
|
+ border-radius: 8px;
|
|
|
+ max-height: calc(100% - 64px - 60px);
|
|
|
+ overflow: auto;
|
|
|
+ box-sizing: border-box;
|
|
|
+ .list-item {
|
|
|
+ width: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ margin-right: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .selected-tips {
|
|
|
+ background: rgba(243, 193, 29, 0.1);
|
|
|
+ border: 1px solid #f3c11d;
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+ border-radius: 8px;
|
|
|
+ height: 50px;
|
|
|
+ line-height: 50px;
|
|
|
+ color: #f3c11d;
|
|
|
+ margin-top: 12px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .btn-group {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: end;
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ right: 0;
|
|
|
+ background: #232323;
|
|
|
+ width: 100%;
|
|
|
+ padding: 10px 12px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border-radius: 0 0 8px 8px;
|
|
|
+ .btn {
|
|
|
+ cursor: pointer;
|
|
|
+ padding: 8px 44px;
|
|
|
+ font-size: 16px;
|
|
|
+ border-radius: 4px;
|
|
|
+ border: 1px solid #ffd489;
|
|
|
+ }
|
|
|
+ .cancel-btn {
|
|
|
+ color: #ffd489;
|
|
|
+ }
|
|
|
+ .edit-btn {
|
|
|
+ background: #ffd489;
|
|
|
+ color: #000000;
|
|
|
+ }
|
|
|
+ .btn + .btn {
|
|
|
+ margin-left: 12px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|