This commit is contained in:
parent
7e5b2a5e19
commit
14d7b60982
|
@ -22,8 +22,8 @@
|
|||
<div class="card-tit">
|
||||
{{ item.farm_name }}
|
||||
</div>
|
||||
<div class="card-text">养殖户: {{ item.master }}</div>
|
||||
<div class="card-cotnet">
|
||||
<div>商户姓名: {{ item.master }}</div>
|
||||
<div class="login" @click="lookFarmDetail(item)">查看详情</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -129,6 +129,9 @@ const handTown = (e)=>{
|
|||
streetCode: e.code
|
||||
}).then(res=>{
|
||||
farmList.value = res.data.farmList || [];
|
||||
// for(let i=0;i<10;i++){
|
||||
// farmList.value = [...farmList.value, ...res.data.farmList]
|
||||
// }
|
||||
flag.value = true;
|
||||
})
|
||||
}
|
||||
|
@ -188,13 +191,13 @@ const sendFn = (event, data = '') => {
|
|||
overflow-y: auto;
|
||||
|
||||
.card {
|
||||
width: 378px;
|
||||
height: 223px;
|
||||
width: 370px;
|
||||
height: 148px;
|
||||
margin-bottom: 10px;
|
||||
background-image: url('/static/img/breedScreen/bg.png');
|
||||
background-image: url('/static/img/breedScreen/bg.webp');
|
||||
background-size: 100% 100%;
|
||||
font-size: 16px;
|
||||
padding: 10px;
|
||||
padding: 10px 20px;
|
||||
color: white;
|
||||
position: relative;
|
||||
|
||||
|
@ -206,6 +209,11 @@ const sendFn = (event, data = '') => {
|
|||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.card-text{
|
||||
white-space: nowrap;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.card-cotnet {
|
||||
margin-top: 50px;
|
||||
|
||||
|
|
|
@ -16,15 +16,23 @@
|
|||
<button @click="sendFn('more_order')">更多订单</button>
|
||||
</div> -->
|
||||
|
||||
|
||||
<img src="/static/img/tradeScreen/FH.png" @click="router.go(-1)" class="back-btn" alt="">
|
||||
<img
|
||||
src="/static/img/tradeScreen/FH.png"
|
||||
@click="router.go(-1)"
|
||||
class="back-btn"
|
||||
alt=""
|
||||
/>
|
||||
<div class="cont" v-if="flag">
|
||||
<div class="title">三轮车配送</div>
|
||||
<div class="card-list">
|
||||
<div class="card" v-for="(item, index) in vehicleList" :key="index" @click="sendFn('c_car_index', item)">
|
||||
<div class="card-tit">
|
||||
|
||||
</div>
|
||||
<div class="scorll">
|
||||
<div
|
||||
class="card"
|
||||
v-for="(item, index) in vehicleList"
|
||||
:key="index"
|
||||
@click="sendFn('c_car_index', item)"
|
||||
>
|
||||
<div class="card-tit"></div>
|
||||
<div class="card-cotnet">
|
||||
<div>{{ item.courier_name }}</div>
|
||||
<div>{{ item.license }}</div>
|
||||
|
@ -33,134 +41,141 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<areaChose v-else channel="user-logistics-datav" @handTown="handTown" @handArea="handArea"></areaChose>
|
||||
</div>
|
||||
<areaChose
|
||||
v-else
|
||||
channel="user-logistics-datav"
|
||||
@handTown="handTown"
|
||||
@handArea="handArea"
|
||||
></areaChose>
|
||||
<div class="area" @click="flag = !flag">
|
||||
<div class="area-top">
|
||||
<div class="town">{{ chooseInfo.area.name || '未选择' }}</div>
|
||||
<div class="town">{{ chooseInfo.town.name || '未选择' }}</div>
|
||||
<div class="town">{{ chooseInfo.area.name || "未选择" }}</div>
|
||||
<div class="town">{{ chooseInfo.town.name || "未选择" }}</div>
|
||||
</div>
|
||||
<div class="area-bottom"></div>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
<script setup scoped>
|
||||
import { ref, reactive } from "vue"
|
||||
import { sendMsg } from "@/api.js"
|
||||
import axios from "axios"
|
||||
import areaChose from "@/view/components/areaChose.vue"
|
||||
import { vehicleListApi } from "@/api.js"
|
||||
import {useRouter} from "vue-router"
|
||||
const router = useRouter()
|
||||
import { ref, reactive } from "vue";
|
||||
import { sendMsg } from "@/api.js";
|
||||
import axios from "axios";
|
||||
import areaChose from "@/view/components/areaChose.vue";
|
||||
import { vehicleListApi } from "@/api.js";
|
||||
import { useRouter } from "vue-router";
|
||||
const router = useRouter();
|
||||
|
||||
const nowPages = ref('index');
|
||||
const nowPages = ref("index");
|
||||
const flag = ref(true);
|
||||
|
||||
// 镇列表
|
||||
const options = [
|
||||
{
|
||||
value: '510502',
|
||||
label: '江阳区',
|
||||
value: "510502",
|
||||
label: "江阳区",
|
||||
},
|
||||
{
|
||||
value: '510503',
|
||||
label: '纳溪区',
|
||||
value: "510503",
|
||||
label: "纳溪区",
|
||||
},
|
||||
{
|
||||
value: '510504',
|
||||
label: '龙马潭区',
|
||||
value: "510504",
|
||||
label: "龙马潭区",
|
||||
},
|
||||
{
|
||||
value: '510521',
|
||||
label: '泸县',
|
||||
value: "510521",
|
||||
label: "泸县",
|
||||
},
|
||||
{
|
||||
value: '510522',
|
||||
label: '合江县 ',
|
||||
value: "510522",
|
||||
label: "合江县 ",
|
||||
},
|
||||
{
|
||||
value: '510524',
|
||||
label: '叙永县 ',
|
||||
value: "510524",
|
||||
label: "叙永县 ",
|
||||
},
|
||||
{
|
||||
value: '510525',
|
||||
label: '古蔺县 ',
|
||||
value: "510525",
|
||||
label: "古蔺县 ",
|
||||
},
|
||||
]
|
||||
];
|
||||
// 区列表
|
||||
const townOptions = []
|
||||
const townOptions = [];
|
||||
|
||||
const changeArea = (e) => {
|
||||
townCode.value = ''
|
||||
getTownList()
|
||||
options.forEach(item => {
|
||||
townCode.value = "";
|
||||
getTownList();
|
||||
options.forEach((item) => {
|
||||
if (item.value == e) {
|
||||
sendFn('choserArea', { name: item.label, code: item.value })
|
||||
sendFn("choserArea", { name: item.label, code: item.value });
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const changeTown = (e) => {
|
||||
console.log(e)
|
||||
townOptions.forEach(item => {
|
||||
console.log(e);
|
||||
townOptions.forEach((item) => {
|
||||
if (item.value == e) {
|
||||
sendFn('choseTown', { name: item.label })
|
||||
sendFn("choseTown", { name: item.label });
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const chooseInfo = ref({
|
||||
area: {
|
||||
code: '510521',
|
||||
name: '泸县'
|
||||
code: "510521",
|
||||
name: "泸县",
|
||||
},
|
||||
town: {}
|
||||
town: {},
|
||||
});
|
||||
const handArea = (e)=>{
|
||||
const handArea = (e) => {
|
||||
chooseInfo.value.area = e;
|
||||
chooseInfo.value.town = {};
|
||||
getLandList();
|
||||
}
|
||||
};
|
||||
|
||||
const handTown = (e)=>{
|
||||
const handTown = (e) => {
|
||||
chooseInfo.value.town = e;
|
||||
getLandList();
|
||||
}
|
||||
};
|
||||
|
||||
const getTownList = () => {
|
||||
townOptions.splice(0, 99999999)
|
||||
axios.get(`https://crmeb-test.shop.lihaink.cn/api/city/get_street?area_code=${chooseInfo.value.area.code}`)
|
||||
townOptions.splice(0, 99999999);
|
||||
axios
|
||||
.get(
|
||||
`https://crmeb-test.shop.lihaink.cn/api/city/get_street?area_code=${chooseInfo.value.area.code}`
|
||||
)
|
||||
.then(function (res) {
|
||||
res.data.data.forEach(item => {
|
||||
res.data.data.forEach((item) => {
|
||||
townOptions.push({
|
||||
value: item.code,
|
||||
label: item.name
|
||||
})
|
||||
})
|
||||
label: item.name,
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
const vehicleList=ref([])
|
||||
const vehicleList = ref([]);
|
||||
const getLandList = async () => {
|
||||
let res = await vehicleListApi({
|
||||
areaCode: chooseInfo.value.area.code,
|
||||
streetCode: chooseInfo.value.town.code
|
||||
})
|
||||
vehicleList.value=res.data.list
|
||||
streetCode: chooseInfo.value.town.code,
|
||||
});
|
||||
vehicleList.value = res.data.list;
|
||||
|
||||
}
|
||||
// for (let i = 0; i < 10; i++) {
|
||||
// vehicleList.value = [...vehicleList.value, ...res.data.list];
|
||||
// }
|
||||
};
|
||||
|
||||
|
||||
getTownList()
|
||||
getLandList()
|
||||
getTownList();
|
||||
getLandList();
|
||||
// 发送消息
|
||||
const page = ref(1)
|
||||
const sendFn = (event, data = '') => {
|
||||
const page = ref(1);
|
||||
const sendFn = (event, data = "") => {
|
||||
if (data.page) page.value = data.page;
|
||||
sendMsg({ channel: 'user-logistics-datav', event, data })
|
||||
}
|
||||
sendMsg({ channel: "user-logistics-datav", event, data });
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.cont {
|
||||
|
@ -174,31 +189,30 @@ const sendFn = (event, data = '') => {
|
|||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
overflow-y: auto;
|
||||
background-image: url('/static/img/breedScreen/vebg.webp');
|
||||
background-image: url("/static/img/breedScreen/vebg.webp");
|
||||
|
||||
.title{
|
||||
.title {
|
||||
position: absolute;
|
||||
left: 80px;
|
||||
top: 14%;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.card-list{
|
||||
.card-list {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
padding: 120px 70px;
|
||||
|
||||
}
|
||||
|
||||
top: 110px;
|
||||
left: 70px;
|
||||
bottom: 100px;
|
||||
right: 70px;
|
||||
overflow-x: auto;
|
||||
.scorll {
|
||||
display: flex;
|
||||
.card {
|
||||
flex-shrink: 0;
|
||||
width: 190px;
|
||||
height: 260px;
|
||||
margin-bottom: 10px;
|
||||
background-image: url('/static/img/breedScreen/item.webp');
|
||||
background-image: url("/static/img/breedScreen/item.webp");
|
||||
background-size: 100% 100%;
|
||||
font-size: 16px;
|
||||
padding: 10px;
|
||||
|
@ -210,7 +224,7 @@ const sendFn = (event, data = '') => {
|
|||
text-align: center;
|
||||
|
||||
.card-tit {
|
||||
color: #00D6DD;
|
||||
color: #00d6dd;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
@ -225,7 +239,7 @@ const sendFn = (event, data = '') => {
|
|||
height: 34px;
|
||||
text-align: center;
|
||||
line-height: 34px;
|
||||
background-image: url('/static/img/tradeScreen/DL.png');
|
||||
background-image: url("/static/img/tradeScreen/DL.png");
|
||||
background-size: 100% 100%;
|
||||
margin-top: 20px;
|
||||
position: absolute;
|
||||
|
@ -234,24 +248,22 @@ const sendFn = (event, data = '') => {
|
|||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.cont::-webkit-scrollbar {
|
||||
.card-list::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
background-color: #153041;
|
||||
}
|
||||
|
||||
.cont::-webkit-scrollbar-track {
|
||||
.card-list::-webkit-scrollbar-track {
|
||||
background-color: #153041;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #084D89;
|
||||
background-color: #084d89;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
|
@ -262,7 +274,6 @@ const sendFn = (event, data = '') => {
|
|||
top: 70px;
|
||||
left: 60.96px;
|
||||
z-index: 9;
|
||||
|
||||
}
|
||||
|
||||
.area {
|
||||
|
@ -279,20 +290,18 @@ const sendFn = (event, data = '') => {
|
|||
justify-content: space-around;
|
||||
|
||||
.town {
|
||||
background-image: url('/static/img/tradeScreen/areaA.png');
|
||||
background-image: url("/static/img/tradeScreen/areaA.png");
|
||||
background-size: 100% 100%;
|
||||
width: 160.12px;
|
||||
height: 30.94px;
|
||||
text-align: center;
|
||||
line-height: 10px;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.area-bottom {
|
||||
background-image: url('/static/img/tradeScreen/areaB.png');
|
||||
background-image: url("/static/img/tradeScreen/areaB.png");
|
||||
width: 558px;
|
||||
height: 57px;
|
||||
background-size: 100% 100%;
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
Loading…
Reference in New Issue