This commit is contained in:
aihe 2024-05-24 12:40:41 +08:00
parent 863513f1d7
commit f5c5172d55
6 changed files with 31 additions and 538 deletions

View File

@ -1,101 +0,0 @@
<template>
<tpx-dialog :show="show" title="选择国家" @onClose="handleCloseModal()">
<view class="shet-cont">
<!-- 关键字搜索框 -->
<tpx-search placeholder="请输入" v-model:value="keyword" bgColor="#FFF"></tpx-search>
<view class="mt-20 mb-10">
<tpx-tags :list="hisList" :value="value" type="single" @onItemClick="handleHisItemClick"></tpx-tags>
</view>
<view class="">
<tpx-checkitems :list="dataList.filter(v=> !keyword || (v.title.indexOf(keyword) > -1))" :value="value" v-slot="dlCurrent" min-checked="1" type="single"
@onChange="handleDataItemChange"
>
<view slot class="mt-20" :style="`background-color: #F6F6F6;padding: 12rpx;border-radius: 8rpx;border: 1rpx solid ${dlCurrent.checked?'#B12D29':'transparent'};`">
<u-row justify="between">
<u-col span="10">
<u-text size="28" :text="dlCurrent.item.title" ></u-text>
</u-col>
<view span="2" class="com-chk-icon">
<u-checkbox-group>
<u-checkbox :checked="dlCurrent.checked" shape="circle" size="32" activeColor="#B12D29"></u-checkbox>
</u-checkbox-group>
</view>
</u-row>
</view>
</tpx-checkitems>
</view>
</view>
</tpx-dialog>
</template>
<script>
export default {
// computed: {
// filDataList() {
// return []
// },
// },
props: {
show: {
default () {
return false
}
},
value: {
default () {
return ''
}
}
},
data() {
return {
hisList: [
{ title: '柬埔寨', val: 1 },
{ title: '越南', val: 2 }
],
dataList: [
{ title: '柬埔寨', val: 1 },
{ title: '越南', val: 2 },
{ title: '泰国', val: 3 },
{ title: '巴厘岛', val: 4 }
],
keyword: ''
}
},
created() {
},
onHide() {
},
unmounted() {},
methods: {
handleCloseModal() {
this.$emit('update:show', false)
},
handleHisItemClick(res) {
this.updateValue(res.val)
},
handleDataItemChange(val) {
this.updateValue(val)
},
updateValue(val) {
this.$emit('onChange', val)
this.$emit('update:value', val)
this.handleCloseModal()
}
}
}
</script>
<style scoped lang="scss">
.shet-cont{
padding: 10rpx 0 30rpx 0;
}
</style>

View File

@ -1,172 +0,0 @@
<template>
<tpx-dialog :show="show" title="付款方式" @onClose="handleCloseModal()">
<view style="position: relative;height: calc(60vh);">
<tpx-layout>
<template v-slot:body>
<view class="shet-cont">
<view class="">
<tpx-checkitems :list="dataList"
v-model:value="model.value" v-slot="dlCurrent" min-checked="1" type="single"
@onChange="handleDataItemChange"
>
<view :class="`pay-item ${dlCurrent.checked?'active':''} `">
<u-row justify="between" style="margin-bottom: 10rpx;">
<u-col span="10">
<u-text size="30" :text="dlCurrent.item.title"></u-text>
</u-col>
<view v-if="dlCurrent.item.val != payTypeEnum.postMonth" span="2" class="com-chk-icon">
<u-checkbox-group>
<u-checkbox :checked="dlCurrent.checked" shape="circle" size="32" activeColor="#B12D29"></u-checkbox>
</u-checkbox-group>
</view>
</u-row>
<u-text v-if="dlCurrent.item.desc" size="28" :text="dlCurrent.item.desc" color="#999"></u-text>
<view v-if="dlCurrent.item.val == payTypeEnum.other" class="pb-20">
<u-textarea v-model="model.otherDesc" border="surround" height="120" placeholder="请填写"
maxlength="50" count></u-textarea>
</view>
<view v-if="dlCurrent.item.val == payTypeEnum.postMonth" class="pt-20">
<tpx-checkitems :list="cardList"
v-model:value="model.cardId" v-slot="caCurrent" min-checked="1" type="single"
>
<view slot class="pt-10 pb-10">
<u-row justify="between">
<u-col span="10">
{{caCurrent.item.title}}
</u-col>
<view span="2" class="com-chk-icon">
<u-checkbox-group>
<u-checkbox :checked="caCurrent.checked" shape="circle" size="32" activeColor="#B12D29"></u-checkbox>
</u-checkbox-group>
</view>
</u-row>
</view>
</tpx-checkitems>
<u-row @click="goto('user/monthCardList?type=choose')">
<uni-icons type="wallet" size="18" color="#B12D29"></uni-icons>
<text style="font-size: 28rpx;color: #B12D29;" class="pl-10">管理月结卡</text>
</u-row>
</view>
</view>
</tpx-checkitems>
</view>
</view>
</template>
<template v-slot:footer>
<view class="blcok-white-noradius" style="margin-top: 0;margin-bottom: 0;">
<u-button @click="handleEditItem()" type="primary" size="large" shape="circle"
custom-style="height:80rpx;font-size: 30rpx;"
>确认</u-button>
</view>
</template>
</tpx-layout>
</view>
</tpx-dialog>
</template>
<script>
import { payTypeEnum } from "@/common/enum"
import { goto } from "@/common/untool"
export default {
// computed: {
// filDataList() {
// return []
// },
// },
props: {
show: {
default () {
return false
}
},
value: {
default () {
return ''
}
},
otherDesc: {
default () {
return ''
}
},
cardId: {
default () {
return ''
}
}
},
data() {
return {
...(JSON.parse(JSON.stringify({payTypeEnum}))),
model: {
value: this.value,
cardId: this.cardId,
otherDesc: this.otherDesc
},
dataList: [
{ title: '寄付现结', val: 1, desc: '快递员取件后,寄方可通过在线支付,扫码,现金等方式付款' },
{ title: '到付', val: 2, desc: '签收后,收方可通过在线支付,扫码,现金等方式付款' },
{ title: '其他', val: payTypeEnum.other, desc: '' },
{ title: '寄付月结', val: payTypeEnum.postMonth, desc: '按月结算运费,需提前开通月结卡' }
],
cardList: [
{ title: '上海风向电子科技有限公司', val: 1},
{ title: '浙江宁波时尚制衣有限公司', val: 2 }
],
}
},
created() {
},
onHide() {
},
unmounted() {},
methods: {
goto,
handleCloseModal() {
this.$emit('update:show', false)
},
handleDataItemChange(val) {
},
updateValue(val) {
},
handleEditItem() {
const { value, cardId, otherDesc } = this.model
this.$emit('onChange', this.model)
this.$emit('update:value', value)
this.$emit('update:cardId', cardId)
this.$emit('update:otherDesc', otherDesc)
this.handleCloseModal()
}
}
}
</script>
<style scoped lang="scss">
.shet-cont{
padding: 10rpx 0 30rpx 0;
}
.pay-item {
margin-bottom: 30rpx;
padding: 20rpx 30rpx;
background: #F6F6F6;
border-radius: 20rpx;
border: 2rpx solid transparent;
&.active {
border-color: $uni-color-primary;
}
}
</style>

View File

@ -1,149 +0,0 @@
<template>
<tpx-dialog :show="show" title="选择仓库" @onClose="handleCloseModal()">
<view style="position: relative;height: calc(60vh);">
<tpx-layout>
<template v-slot:body>
<view class="shet-cont">
<!-- 关键字搜索框 -->
<tpx-search placeholder="请输入" v-model:value="keyword" bgColor="#FFF"></tpx-search>
<view class="mt-20 mb-10">
<tpx-tags :list="hisList" v-model:value="model.value" type="single" @onItemClick="handleHisItemClick"></tpx-tags>
</view>
<view class="">
<tpx-checkitems :list="dataList.filter(v=> !keyword || (v.title.indexOf(keyword) > -1))"
v-model:value="model.value" v-slot="dlCurrent" min-checked="1" type="single"
>
<view slot class="mt-20" :style="`background-color: #F6F6F6;padding: 12rpx;border-radius: 8rpx;border: 1rpx solid ${dlCurrent.checked?'#B12D29':'transparent'};`">
<u-row justify="between">
<u-col span="10">
<u-text size="28" :text="dlCurrent.item.title"></u-text>
</u-col>
<view span="2" class="com-chk-icon">
<u-checkbox-group>
<u-checkbox :checked="dlCurrent.checked" shape="circle" size="32" activeColor="#B12D29"></u-checkbox>
</u-checkbox-group>
</view>
</u-row>
<view v-if="dlCurrent.checked" class="w-tem" @click="handleCopy(dlCurrent.item)">
<view style="position: absolute;right: 20rpx;right: 20rpx;">
<!-- <u-icon name="file-text" size="34" color="#999"></u-icon> -->
</view>
<u-row>
<view class="pr-20">
<u-text :text="'李先生'" size="28" :bold="true"></u-text>
</view>
<view>
<u-text :text="'18627068352'" size="28" mode="phone" color="#999"></u-text>
</view>
</u-row>
<u-text :text="'上海市大世界大世界大世界大世界大世界大世界大世界大世界大世界大世界大世界大世界大世界大世界大世界大世界大世界大世界大世界大世界大世界'"
size="24" margin="12rpx 0 0 0" color="#999"
></u-text>
</view>
</view>
</tpx-checkitems>
</view>
</view>
</template>
<template v-slot:footer>
<view class="blcok-white-noradius" style="margin-top: 0;margin-bottom: 0;">
<u-button @click="handleEditItem()" type="primary" size="large" shape="circle"
custom-style="height:80rpx;font-size: 30rpx;"
>确认</u-button>
</view>
</template>
</tpx-layout>
</view>
</tpx-dialog>
</template>
<script>
import { setClipboardData } from "@/common/untool"
export default {
// computed: {
// filDataList() {
// return []
// },
// },
props: {
show: {
default () {
return false
}
},
value: {
default () {
return ''
}
}
},
data() {
return {
model: {
value: this.value,
},
hisList: [
{ title: '柬-铁运', val: 1 },
{ title: '越-铁运', val: 2 },
],
dataList: [
{ title: '柬埔寨-铁卡联运', val: 1 },
{ title: '越南-铁卡联运', val: 2 },
{ title: '泰国-铁卡联运', val: 3 },
{ title: '巴厘岛-铁卡联运', val: 4 },
],
keyword: ''
}
},
created() {
},
onHide() {
},
unmounted() {},
methods: {
handleCloseModal() {
this.$emit('update:show', false)
},
handleHisItemClick(res) {
},
updateValue(val) {
this.model.value = val
},
handleEditItem() {
const { value } = this.model
this.$emit('onChange', this.model)
this.$emit('update:value', value)
this.handleCloseModal()
},
handleCopy(item) {
// setClipboardData(item.title)
}
}
}
</script>
<style scoped lang="scss">
.shet-cont{
padding: 10rpx 0 30rpx 0;
}
.w-tem {
margin-top: 20rpx;
position: relative;
padding: 16rpx;
background: #fff;
border-radius: 10rpx;
border: 2rpx solid transparent;
&.active {
border-color: $uni-color-primary;
}
}
</style>

View File

@ -1,109 +0,0 @@
<template>
<tpx-dialog :show="show" title="选择线路" @onClose="handleCloseModal()">
<view class="shet-cont">
<tpx-scroll-view v-model:resObject="resObject" :searchParam="searchParam" :getListFun="getListFun" size="sm" :showLoadedAll="false" @onListChange="onListChange">
<!-- 关键字搜索框 -->
<tpx-search placeholder="请输入" v-model:value="searchParam.keyword" bgColor="#FFF"></tpx-search>
<view v-if="hisList.length > 0" class="mt-20 mb-10">
<tpx-tags :list="hisList" :value="value" type="single" @onItemClick="handleHisItemClick"></tpx-tags>
</view>
<view class="">
<tpx-checkitems :list="dataList" :value="value" v-slot="dlCurrent" min-checked="1" type="single"
@onChange="handleDataItemChange"
>
<view slot class="mt-20" :style="`background-color: #F6F6F6;padding: 12rpx;border-radius: 8rpx;border: 1rpx solid ${dlCurrent.checked?'#B12D29':'transparent'};`">
<u-row justify="between">
<u-col span="10">
<u-text size="28" :text="dlCurrent.item.title"></u-text>
</u-col>
<view span="2" class="com-chk-icon">
<u-checkbox-group>
<u-checkbox :checked="dlCurrent.checked" shape="circle" size="32" activeColor="#B12D29"></u-checkbox>
</u-checkbox-group>
</view>
</u-row>
</view>
</tpx-checkitems>
</view>
</tpx-scroll-view>
</view>
</tpx-dialog>
</template>
<script>
import * as apiService from "@/common/api"
import { transListKeyTitle } from "@/common/util"
export default {
computed: {
dataList() {
let list = transListKeyTitle({ valKey: 'id', titleKey: 'lineName', list: this.resObject.list })
console.log("====list====", list)
return list
},
},
props: {
show: {
default () {
return false
}
},
value: {
default () {
return ''
}
},
},
data() {
return {
resObject: {
list: []
},
hisList: [
],
searchParam: {
country: '', // 目的国家
fromCountry: '',// 发货国家
keyword: ''
}
}
},
created() {
},
onHide() {
},
unmounted() {},
methods: {
getListFun: apiService.getTransLineList,
handleCloseModal() {
this.$emit('update:show', false)
},
handleHisItemClick(res) {
this.updateValue(res.val)
},
handleDataItemChange(val) {
this.updateValue(val)
},
updateValue(val) {
this.$emit('onChange', val)
this.$emit('update:value', val)
this.handleCloseModal()
},
onListChange(val){
}
}
}
</script>
<style scoped lang="scss">
.shet-cont{
height: calc(60vh);
}
</style>

View File

@ -14,7 +14,10 @@
<view v-if="mode == modeEnum.sheet">
<tpx-dialog :show="show" :title="placeholder" @onClose="handleSelectSwitch">
<view style="height: calc(60vh);">
<tpx-scroll-view :resObject="filResObject" :searchParam="searchParam" :getListFun="getListFun" size="sm" :showLoadedAll="false" @onListChange="onListChange">
<tpx-scroll-view :resObject="filResObject" :searchParam="filDataSearchParam" :getListFun="getListFun" size="sm" :showLoadedAll="false" @onListChange="onListChange">
<view v-if="showKeyWord" class="mb-10">
<tpx-input v-model:value="keyword" placeholder="请输入关键字" @change="handleKeyWordChange"></tpx-input>
</view>
<content-items :value="value" :list="filDataList" :checkedList="filDatacheckedList" :minChecked="minChecked" :type="type"
:text="text" :vdataType="vdataType" :transKeyVal="transKeyVal"
@onChange="handleDataItemChange"
@ -26,7 +29,10 @@
</view>
<view v-if="mode == modeEnum.drop && show" class="md-drop-cont">
<tpx-scroll-view :maxHeight="dropMaxHeight" :resObject="filResObject" :searchParam="searchParam" :getListFun="getListFun" size="sm" :showLoadedAll="false" @onListChange="onListChange">
<tpx-scroll-view :maxHeight="dropMaxHeight" :resObject="filResObject" :searchParam="filDataSearchParam" :getListFun="getListFun" size="sm" :showLoadedAll="false" @onListChange="onListChange">
<view v-if="showKeyWord" class="mb-10">
<tpx-input v-model:value="keyword" placeholder="请输入关键字" @change="handleKeyWordChange"></tpx-input>
</view>
<content-items :value="value" :list="filDataList" :minChecked="minChecked" :type="type"
:text="text" :vdataType="vdataType" :transKeyVal="transKeyVal"
@onChange="handleDataItemChange"
@ -58,8 +64,18 @@
if(this.transKeyVal) {
list = transListKeyTitle({ ...this.transKeyVal, list: list })
}
// if(!this.getListFun && this.keyword) {
// list = list.filter(t=> t.title?.indexOf?.(this.keyword) > -1)
// }
return list
},
filDataSearchParam() {
let filedName = this.searchFiledName
return {
...this.searchParam,
[filedName]: this.keyword,
}
},
filDatacheckedList() {
let list = (this.getListFun ? this.resObject.checkedList : this.checkedList)
if(Array.isArray(list) && this.transKeyVal) {
@ -70,6 +86,11 @@
filResObject() {
let res = this.getListFun ? this.resObject : { list: this.list, total: this.list.length }
return res
},
showKeyWord() {
// 查接口的列表才有搜索
let bl = !!this.getListFun
return bl
}
},
components: {
@ -175,7 +196,10 @@
return {
componentId: uni.$u.guid(20),
show: false,
modeEnum: Object.assign({}, modeEnum)
modeEnum: Object.assign({}, modeEnum),
keyword: '',
// searchFiledName: this.transKeyVal?.['searchKey'] || '_searchValue',
searchFiledName: this.transKeyVal?.['titleKey'] || '_searchValue'
}
},
created() {
@ -225,6 +249,9 @@
},
handleRootClick() {
uni.$emit(selectDropEventName, this.componentId)
},
handleKeyWordChange(val) {
}
}
}

View File

@ -184,10 +184,7 @@
</view>
</template>
</tpx-layout>
<buns-country-sheet v-model:show="countryModal.show" v-model:value="submitParam.countryId"></buns-country-sheet>
<buns-way-sheet v-model:show="wayModal.show" v-model:value="submitParam.wayId"></buns-way-sheet>
<buns-stockroom-sheet v-model:show="stockRoomModal.show" v-model:value="submitParam.stockRoomId"></buns-stockroom-sheet>
<buns-paytype-sheet v-model:show="paytypeModal.show" v-model:value="submitParam.paytype"></buns-paytype-sheet>
<buns-privacy-dialog v-model:show="privacyModal.show"> </buns-privacy-dialog>
<buns-revtime-sheet v-model:show="revtimeModal.show" v-model:value="submitParam.revtime"></buns-revtime-sheet>
<buns-edit-sheet title="填写预估重量体积" v-model:show="goodChooseModal.show" v-model:value="submitParam" v-slot="tempObject">