emis-sapp/pages/service/list.vue

119 lines
2.9 KiB
Vue
Raw Normal View History

2023-12-10 05:53:38 +00:00
<template>
2024-07-17 16:02:14 +00:00
<tpx-page>
<tpx-layout>
<template v-slot:header>
<view class="pgb-header">
<view class="com-jianju">
2024-08-02 07:52:06 +00:00
<view class="pos-rlt">
<tpx-search placeholder="选择地址" :value="getAddressDetail(searchParam, false)"></tpx-search>
<view @click="showAddress" class="pos-abt-all"></view>
</view>
2024-07-17 16:02:14 +00:00
</view>
2023-12-13 02:27:58 +00:00
</view>
2024-07-17 16:02:14 +00:00
</template>
<template v-slot:body>
<view class="pos-abt-all">
<tpx-scroll-view v-model:resObject="resData" :searchParam="searchParam" :getListFun="getListFun"
ref="listRef"
>
<view class="pgb-cont">
<view>
<view v-for="(item) in resData.list" class="blcok-white radius-20 mb-20" style="margin-top: 0;"
@click="handleTODetail(item)"
>
<u-text :text="item.siteName" size="30" :bold="true" lines="1"></u-text>
<u-text margin="10rpx 0 0 0" :text="`地址:${item.address}`" size="28" color="#999" lines="2"></u-text>
<u-row custom-style="margin-top: 20rpx;" justify="between">
<view>联系人:{{item.principal || '-'}}</view>
<view>电话:{{item.phone || '-'}}</view>
</u-row>
</view>
</view>
2023-12-10 05:53:38 +00:00
</view>
2024-07-17 16:02:14 +00:00
</tpx-scroll-view>
2023-12-10 05:53:38 +00:00
</view>
2024-07-17 16:02:14 +00:00
</template>
</tpx-layout>
2023-12-10 05:53:38 +00:00
2024-07-17 16:02:14 +00:00
<buns-address-sheet v-model:show="addressModal.show" v-model:value="addressModal.values" @onSure="handleAddressChoose"></buns-address-sheet>
</tpx-page>
2023-12-10 05:53:38 +00:00
</template>
<script>
2024-07-17 16:02:14 +00:00
import * as apiService from "@/common/api"
import { addressNameCodeMap } from "@/common/enum"
import { getAddressDetail, setAddresModalParam } from "@/common/util"
2023-12-10 05:53:38 +00:00
export default {
props: {
// hasLeftWin: {
// type: Boolean
// }
},
computed: {
},
data() {
return {
searchParam: {
},
2024-07-17 16:02:14 +00:00
resData: { list: [] },
2023-12-10 05:53:38 +00:00
queryOption: {},
2024-07-17 16:02:14 +00:00
addressModal: {
show: false,
values: {
regIds: [],
regNames: []
}
},
2023-12-10 05:53:38 +00:00
}
},
onLoad(queryOption) {
this.queryOption = queryOption
this.initData();
},
onUnload() {
},
methods: {
2024-07-19 10:23:50 +00:00
getAddressDetail,
2024-07-17 16:02:14 +00:00
getListFun: apiService.getSendSiteList,
2023-12-10 05:53:38 +00:00
initData(){
2024-07-17 16:02:14 +00:00
2023-12-10 05:53:38 +00:00
},
2024-07-17 16:02:14 +00:00
handleEditItem(item={}) {
2023-12-10 05:53:38 +00:00
},
2024-07-17 16:02:14 +00:00
showAddress(){
this.addressModal.values = setAddresModalParam(this.searchParam);
this.addressModal.show = true
2023-12-10 05:53:38 +00:00
},
2024-07-17 16:02:14 +00:00
handleAddressChoose(data) {
2024-07-19 10:23:50 +00:00
addressNameCodeMap.map((nameCodeMap, index)=> {
this.searchParam[nameCodeMap.codeKey] = data.regIds[index]
2024-07-17 16:02:14 +00:00
this.searchParam[nameCodeMap.nameKey] = data.regNames[index]
})
2023-12-10 05:53:38 +00:00
},
}
}
</script>
<style lang="scss">
@import '@/common/uni-nvue.scss';
page {
background-color: #F6F6F6;
height: 100% !important;
}
</style>
<style scoped lang="scss">
.pgb-header {
// padding-top: --status-bar-height;
padding-top: 30rpx;
padding-bottom: 30rpx;
2023-12-13 02:27:58 +00:00
background-color: #FFF;
2023-12-10 05:53:38 +00:00
position: relative;
}
.pgb-cont{
2024-07-17 16:02:14 +00:00
padding: 30rpx 30rpx 0 30rpx;
2023-12-10 05:53:38 +00:00
}
</style>