增加组件
This commit is contained in:
parent
18e0bdeca7
commit
a9bec68feb
3
App.vue
3
App.vue
@ -8,6 +8,9 @@
|
|||||||
import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update';
|
import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
globalData: {
|
||||||
|
|
||||||
|
},
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
console.log(
|
console.log(
|
||||||
|
|||||||
@ -20,8 +20,8 @@ const payTypeEnum = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const payTypeList = [
|
const payTypeList = [
|
||||||
{ title: '待取件', val: payTypeEnum.postNow },
|
{ title: '寄付现结', val: payTypeEnum.postNow },
|
||||||
{ title: '已取件', val: payTypeEnum.toNow },
|
{ title: '到付现结', val: payTypeEnum.toNow },
|
||||||
{ title: '寄付月结', val: payTypeEnum.postMonth },
|
{ title: '寄付月结', val: payTypeEnum.postMonth },
|
||||||
{ title: '到付月结', val: payTypeEnum.toMonth },
|
{ title: '到付月结', val: payTypeEnum.toMonth },
|
||||||
{ title: '第三方付款', val: payTypeEnum.outNow },
|
{ title: '第三方付款', val: payTypeEnum.outNow },
|
||||||
|
|||||||
178
components/buns-paytype-sheet/buns-paytype-sheet.vue
Normal file
178
components/buns-paytype-sheet/buns-paytype-sheet.vue
Normal file
@ -0,0 +1,178 @@
|
|||||||
|
<template>
|
||||||
|
<tpx-dialog :show="show" title="付款方式" @onClose="handleCloseModal()">
|
||||||
|
<view style="position: relative;height: calc(70vh);">
|
||||||
|
<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="chk-icon">
|
||||||
|
<u-checkbox :checked="dlCurrent.checked" shape="circle" size="32" activeColor="#B12D29"></u-checkbox>
|
||||||
|
</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="160" 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="chk-icon">
|
||||||
|
<u-checkbox :checked="caCurrent.checked" shape="circle" size="32" activeColor="#B12D29"></u-checkbox>
|
||||||
|
</view>
|
||||||
|
</u-row>
|
||||||
|
</view>
|
||||||
|
</tpx-checkitems>
|
||||||
|
|
||||||
|
|
||||||
|
<u-row>
|
||||||
|
<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">
|
||||||
|
<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"
|
||||||
|
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() {
|
||||||
|
|
||||||
|
},
|
||||||
|
destroyed() {},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
handleCloseModal() {
|
||||||
|
this.$emit('update:show', false)
|
||||||
|
|
||||||
|
},
|
||||||
|
handleDataItemChange(val) {
|
||||||
|
},
|
||||||
|
updateValue(val) {
|
||||||
|
|
||||||
|
},
|
||||||
|
handleEditItem() {
|
||||||
|
const { value, cardId } = this.model.value
|
||||||
|
this.$emit('onChange', this.model)
|
||||||
|
this.$emit('update:value', value)
|
||||||
|
this.$emit('update:cardId', cardId)
|
||||||
|
this.$emit('update:otherDesc', otherDesc)
|
||||||
|
debugger
|
||||||
|
this.handleCloseModal()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.shet-cont{
|
||||||
|
min-height: 300rpx;
|
||||||
|
padding: 10rpx 0 30rpx 0;
|
||||||
|
}
|
||||||
|
.chk-icon{
|
||||||
|
position: relative;
|
||||||
|
&::after {
|
||||||
|
position: absolute;
|
||||||
|
content: ' ';
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 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>
|
||||||
@ -148,7 +148,7 @@
|
|||||||
</u-row>
|
</u-row>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="padding: 30rpx 0;border-bottom: 2rpx solid #F6F6F6;;">
|
<view @click="handleDialogClick(paytypeModal)" style="padding: 30rpx 0;border-bottom: 2rpx solid #F6F6F6;;">
|
||||||
<u-row>
|
<u-row>
|
||||||
<view>
|
<view>
|
||||||
<u-text text="付款方式" size="28" :bold="true"></u-text>
|
<u-text text="付款方式" size="28" :bold="true"></u-text>
|
||||||
@ -235,14 +235,13 @@
|
|||||||
<buns-country-sheet v-model:show="countryModal.show" v-model:value="submitParam.countryId"></buns-country-sheet>
|
<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-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-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>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import getCdnUrl from "@/common/getCdnUrl"
|
import getCdnUrl from "@/common/getCdnUrl"
|
||||||
import { sendTypeEnum, sendTypeList } from "@/common/enum"
|
import { sendTypeEnum, sendTypeList } from "@/common/enum"
|
||||||
import {
|
import { goto } from "@/common/untool"
|
||||||
goto
|
|
||||||
} from "@/common/untool"
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
// hasLeftWin: {
|
// hasLeftWin: {
|
||||||
@ -274,14 +273,18 @@
|
|||||||
stockRoomModal: {
|
stockRoomModal: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
|
paytypeModal: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
submitParam: {
|
submitParam: {
|
||||||
stockRoomId: '',
|
stockRoomId: '',
|
||||||
countryId: '',
|
countryId: '',
|
||||||
wayId: '',
|
wayId: '',
|
||||||
tips: [],
|
|
||||||
type: sendTypeList[0].val,
|
type: sendTypeList[0].val,
|
||||||
|
paytype: '',
|
||||||
otherDes: '',
|
otherDes: '',
|
||||||
prodId: 1
|
prodId: 1,
|
||||||
|
tips: [],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user