121 lines
3.0 KiB
Vue
121 lines
3.0 KiB
Vue
<template>
|
|
<tpx-page>
|
|
<tpx-layout>
|
|
<template v-slot:header>
|
|
<view class="pgb-header">
|
|
<view class="com-jianju">
|
|
<view class="pos-rlt">
|
|
<tpx-search placeholder="请输入关键字" v-model:value="searchParam.searchValue"></tpx-search>
|
|
<!-- <tpx-search placeholder="选择地址" :value="getAddressDetail(searchParam, false)"></tpx-search>
|
|
<view @click="showAddress" class="pos-abt-all"></view> -->
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</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>
|
|
</view>
|
|
</tpx-scroll-view>
|
|
</view>
|
|
</template>
|
|
</tpx-layout>
|
|
|
|
<buns-address-sheet v-model:show="addressModal.show" v-model:value="addressModal.values" @onSure="handleAddressChoose"></buns-address-sheet>
|
|
</tpx-page>
|
|
</template>
|
|
|
|
<script>
|
|
import * as apiService from "@/common/api"
|
|
import { addressNameCodeMap } from "@/common/enum"
|
|
import { getAddressDetail, setAddresModalParam } from "@/common/util"
|
|
|
|
export default {
|
|
props: {
|
|
// hasLeftWin: {
|
|
// type: Boolean
|
|
// }
|
|
},
|
|
computed: {
|
|
|
|
},
|
|
data() {
|
|
return {
|
|
searchParam: {
|
|
searchValue: '',
|
|
},
|
|
resData: { list: [] },
|
|
queryOption: {},
|
|
addressModal: {
|
|
show: false,
|
|
values: {
|
|
regIds: [],
|
|
regNames: []
|
|
}
|
|
},
|
|
}
|
|
},
|
|
onLoad(queryOption) {
|
|
this.queryOption = queryOption
|
|
this.initData();
|
|
},
|
|
onUnload() {
|
|
},
|
|
methods: {
|
|
getAddressDetail,
|
|
getListFun: apiService.getSendSiteList,
|
|
initData(){
|
|
|
|
},
|
|
handleEditItem(item={}) {
|
|
|
|
},
|
|
showAddress(){
|
|
this.addressModal.values = setAddresModalParam(this.searchParam);
|
|
this.addressModal.show = true
|
|
},
|
|
handleAddressChoose(data) {
|
|
addressNameCodeMap.map((nameCodeMap, index)=> {
|
|
this.searchParam[nameCodeMap.codeKey] = data.regIds[index]
|
|
this.searchParam[nameCodeMap.nameKey] = data.regNames[index]
|
|
})
|
|
},
|
|
}
|
|
}
|
|
</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;
|
|
background-color: #FFF;
|
|
position: relative;
|
|
}
|
|
.pgb-cont{
|
|
padding: 30rpx 30rpx 0 30rpx;
|
|
}
|
|
</style> |