增加layout页面组件

This commit is contained in:
aihe 2024-04-29 14:51:51 +08:00
parent 6e573512a7
commit b247fdf803
5 changed files with 251 additions and 214 deletions

View File

@ -167,6 +167,7 @@ const dateRangeList = [
]
const pageEventNames = {
globalClick: "globalClick", // 全局页面 click事件
chooseAddress: "chooseAddress", // 地址选择
}

View File

@ -0,0 +1,36 @@
<template>
<view @click="handleClick" style="height: 100%;">
<slot></slot>
</view>
</template>
<script>
import { pageEventNames } from "@/common/enum"
export default {
props: {
},
data() {
return {
}
},
created() {
},
onHide() {
},
unmounted() {},
methods: {
handleClick() {
uni.$emit(pageEventNames.globalClick)
}
}
}
</script>
<style scoped lang="scss">
</style>

View File

@ -33,6 +33,8 @@
import ContentItems from "./content-items"
import DefaultSelectInput from "./default-select-input"
import { transListKeyTitle } from "@/common/util"
import { pageEventNames } from "@/common/enum"
const modeEnum = {
sheet: 'sheet',
drop: 'drop'
@ -141,18 +143,15 @@
}
},
created() {
uni.$on('click', this.handleDocumentClick);
// document.addEventListener('click', this.handleDocumentClick)
uni.$on(pageEventNames.globalClick, this.handleDocumentClick);
},
unmounted() {
uni.$off('click', this.handleDocumentClick);
// document.removeEventListener('click', this.handleDocumentClick)
uni.$off(pageEventNames.globalClick, this.handleDocumentClick);
},
methods: {
handleDocumentClick(){
debugger
this.show = false
},
handleSelectSwitch() {

View File

@ -1,238 +1,239 @@
<template>
<tpx-layout>
<template v-slot:body>
<view class="com-jianju pos-rlt pb-30" style="padding-top: 2rpx;">
<view class="blcok-white">
<u-row justify="between">
<view style="width: 130rpx;">运单号</view>
<view style="flex:1;">
<tpx-scan-input v-model:value="submitParam.billCode"></tpx-scan-input>
</view>
<view class="pl-10">
<u-button @click="handleCreateOrderNo()"
custom-style="font-size: 28rpx;padding:0 10rpx;height: 74rpx;" :plain="true" >系统生成</u-button>
</view>
</u-row>
<u-row justify="between" custom-style="margin-top:20rpx;">
<view style="width: 130rpx;">客户</view>
<view style="flex:1;">
<tpx-select v-model:resObject="kehuRes" :getListFun="getCustomerUserList" :transKeyVal="{valKey: 'customerCode',titleKey: 'customerFullName'}" v-model:value="submitParam.customerCode" :isWhite="true"></tpx-select>
</view>
</u-row>
</view>
<tpx-page>
<tpx-layout>
<template v-slot:body>
<view class="com-jianju pos-rlt pb-30" style="padding-top: 2rpx;">
<view class="blcok-white">
<u-row justify="between">
<view style="width: 130rpx;">运单号</view>
<view style="flex:1;">
<tpx-scan-input v-model:value="submitParam.billCode"></tpx-scan-input>
</view>
<view class="pl-10">
<u-button @click="handleCreateOrderNo()"
custom-style="font-size: 28rpx;padding:0 10rpx;height: 74rpx;" :plain="true" >系统生成</u-button>
</view>
</u-row>
<u-row justify="between" custom-style="margin-top:20rpx;">
<view style="width: 130rpx;">客户</view>
<view style="flex:1;">
<tpx-select v-model:resObject="kehuRes" :getListFun="getCustomerUserList" :transKeyVal="{valKey: 'customerCode',titleKey: 'customerFullName'}" v-model:value="submitParam.customerCode" :isWhite="true"></tpx-select>
</view>
</u-row>
</view>
<view class="com-section mt-30" @click="goto('post/detail')">
<u-row justify="space-between">
<text>订单号:TWO291929</text>
<u-icon name="bag" size="42"></u-icon>
</u-row>
</view>
<view class="blcok-white">
<!-- 地址选择 -->
<bpe-addressinfo-tmp v-model:value="submitParam"></bpe-addressinfo-tmp>
</view>
<view class="com-section mt-30" @click="goto('post/detail')">
<u-row justify="space-between">
<text>订单号:TWO291929</text>
<u-icon name="bag" size="42"></u-icon>
</u-row>
</view>
<view class="blcok-white">
<!-- 地址选择 -->
<bpe-addressinfo-tmp v-model:value="submitParam"></bpe-addressinfo-tmp>
</view>
<view class="com-section mt-30">路线信息</view>
<view class="blcok-white" style="padding-top: 0;padding-bottom: 0;">
<view>
<template v-if="submitParam.reciever.country && submitParam.sender.country">
<view class="com-section mt-30">路线信息</view>
<view class="blcok-white" style="padding-top: 0;padding-bottom: 0;">
<view>
<template v-if="submitParam.reciever.country && submitParam.sender.country">
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.transLine" v-model:resObject="wayRes" :getListFun="getTransLineList" :transKeyVal="{valKey: 'lineCode',titleKey: 'lineName'}" :customInput="true"
:searchParam="waySearchParam" @onChange="handleWayChange"
>
<tpx-text-item label="线路" :value="submitParam.transLine" :list="wayRes.list"></tpx-text-item>
</tpx-select>
</view>
</template>
<template v-if="submitParam.transLine">
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.productType" v-model:resObject="productRes" :getListFun="getTransProductList" :transKeyVal="{valKey: 'prodCode',titleKey: 'prodName'}" :isWhite="true" :customInput="true"
:searchParam="productSearchParam"
>
<tpx-text-item label="产品类型" :value="submitParam.productType" :list="productRes.list"></tpx-text-item>
</tpx-select>
</view>
</template>
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.transLine" v-model:resObject="wayRes" :getListFun="getTransLineList" :transKeyVal="{valKey: 'lineCode',titleKey: 'lineName'}" :customInput="true"
:searchParam="waySearchParam" @onChange="handleWayChange"
<tpx-select v-model:value="submitParam.customsEclaration" :list="dicData.emis_declare_mode"
mode="drop" customInput="true"
>
<tpx-text-item label="线路" :value="submitParam.transLine" :list="wayRes.list"></tpx-text-item>
<tpx-text-item label="报关方式" :value="submitParam.customsEclaration" :list="dicData.emis_declare_mode"></tpx-text-item>
</tpx-select>
</view>
</template>
<template v-if="submitParam.transLine">
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.productType" v-model:resObject="productRes" :getListFun="getTransProductList" :transKeyVal="{valKey: 'prodCode',titleKey: 'prodName'}" :isWhite="true" :customInput="true"
:searchParam="productSearchParam"
<tpx-select v-model:value="submitParam.customsClear" :list="dicData.emis_customs_clear"
mode="drop" customInput="true"
>
<tpx-text-item label="产品类型" :value="submitParam.productType" :list="productRes.list"></tpx-text-item>
<tpx-text-item label="清关方式" :value="submitParam.customsClear" :list="dicData.emis_customs_clear"></tpx-text-item>
</tpx-select>
</view>
</template>
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.customsEclaration" :list="dicData.emis_declare_mode"
mode="drop" customInput="true"
>
<tpx-text-item label="报关方式" :value="submitParam.customsEclaration" :list="dicData.emis_declare_mode"></tpx-text-item>
</tpx-select>
</view>
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.customsClear" :list="dicData.emis_customs_clear"
mode="drop" customInput="true"
>
<tpx-text-item label="清关方式" :value="submitParam.customsClear" :list="dicData.emis_customs_clear"></tpx-text-item>
</tpx-select>
</view>
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.pickupMethod" :list="dicData.emis_qujian_fangshi"
mode="drop" customInput="true"
>
<tpx-text-item label="取件方式" :value="submitParam.pickupMethod" :list="dicData.emis_qujian_fangshi"></tpx-text-item>
</tpx-select>
</view>
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.operateEmployeeCode" v-model:resObject="caozuoRes" :getListFun="getOpStaffList" :transKeyVal="{valKey: 'empCode',titleKey: 'empName'}" :customInput="true">
<tpx-text-item label="操作员" :value="submitParam.operateEmployeeCode" :list="caozuoRes.list"></tpx-text-item>
</tpx-select>
</view>
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.takePieceEmployeeCode" v-model:resObject="shoupaiRes" :getListFun="getRSDStaffList" :transKeyVal="{valKey: 'empCode',titleKey: 'empName'}" :customInput="true">
<tpx-text-item label="收派员" :value="submitParam.takePieceEmployeeCode" :list="shoupaiRes.list"></tpx-text-item>
</tpx-select>
</view>
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.paymentType" :list="dicData.emis_payment_type"
mode="drop" customInput="true"
>
<tpx-text-item label="付款方式" :value="submitParam.paymentType" :list="dicData.emis_payment_type"></tpx-text-item>
</tpx-select>
<view v-if="submitParam.paymentType == 6" class="pt-10">
<u-textarea v-model="submitParam.feeRemaker" border="surround" height="120" placeholder="备注"
maxlength="50" count></u-textarea>
</view>
</view>
<view v-if="submitParam.paymentType == 2 || submitParam.paymentType == 4 || submitParam.paymentType == 5" class="yunf-input-item">
<tpx-select v-model:value="submitParam.custNo" v-model:resObject="yuejieRes" :getListFun="getMonthpayAccountList" :transKeyVal="{valKey: 'custNo',titleKey: 'custName'}" :customInput="true"
@onChange="handleYueJieSelect"
>
<tpx-text-item label="月结账户" :value="submitParam.custNo" :list="yuejieRes.list"></tpx-text-item>
</tpx-select>
</view>
<template v-if="submitParam.custNo">
<view class="yunf-input-item">
<tpx-text-item label="月结编号" :value="submitParam.custNo"></tpx-text-item>
<tpx-select v-model:value="submitParam.pickupMethod" :list="dicData.emis_qujian_fangshi"
mode="drop" customInput="true"
>
<tpx-text-item label="取件方式" :value="submitParam.pickupMethod" :list="dicData.emis_qujian_fangshi"></tpx-text-item>
</tpx-select>
</view>
<view class="yunf-input-item">
<tpx-text-item label="销售联系人" :value="submitParam.salesmenName"></tpx-text-item>
<tpx-select v-model:value="submitParam.operateEmployeeCode" v-model:resObject="caozuoRes" :getListFun="getOpStaffList" :transKeyVal="{valKey: 'empCode',titleKey: 'empName'}" :customInput="true">
<tpx-text-item label="操作员" :value="submitParam.operateEmployeeCode" :list="caozuoRes.list"></tpx-text-item>
</tpx-select>
</view>
<view class="yunf-input-item">
<tpx-text-item label="回款联系人" :value="submitParam.payeeName"></tpx-text-item>
<tpx-select v-model:value="submitParam.takePieceEmployeeCode" v-model:resObject="shoupaiRes" :getListFun="getRSDStaffList" :transKeyVal="{valKey: 'empCode',titleKey: 'empName'}" :customInput="true">
<tpx-text-item label="收派员" :value="submitParam.takePieceEmployeeCode" :list="shoupaiRes.list"></tpx-text-item>
</tpx-select>
</view>
</template>
<view v-if="submitParam.transLine" class="yunf-input-item">
<tpx-select v-model:value="submitParam.destinationCode" v-model:resObject="destPostRes" :getListFun="getDestPositionList" :transKeyVal="{valKey: 'destCode',titleKey: 'destName'}" :isWhite="true" :customInput="true"
:searchParam="destPostParam" @onChange="handleDestPostChange"
>
<tpx-text-item label="目的地" :value="submitParam.destinationCode" :list="destPostRes.list"></tpx-text-item>
</tpx-select>
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.paymentType" :list="dicData.emis_payment_type"
mode="drop" customInput="true"
>
<tpx-text-item label="付款方式" :value="submitParam.paymentType" :list="dicData.emis_payment_type"></tpx-text-item>
</tpx-select>
<view v-if="submitParam.paymentType == 6" class="pt-10">
<u-textarea v-model="submitParam.feeRemaker" border="surround" height="120" placeholder="备注"
maxlength="50" count></u-textarea>
</view>
</view>
<view v-if="submitParam.paymentType == 2 || submitParam.paymentType == 4 || submitParam.paymentType == 5" class="yunf-input-item">
<tpx-select v-model:value="submitParam.custNo" v-model:resObject="yuejieRes" :getListFun="getMonthpayAccountList" :transKeyVal="{valKey: 'custNo',titleKey: 'custName'}" :customInput="true"
@onChange="handleYueJieSelect"
>
<tpx-text-item label="月结账户" :value="submitParam.custNo" :list="yuejieRes.list"></tpx-text-item>
</tpx-select>
</view>
<template v-if="submitParam.custNo">
<view class="yunf-input-item">
<tpx-text-item label="月结编号" :value="submitParam.custNo"></tpx-text-item>
</view>
<view class="yunf-input-item">
<tpx-text-item label="销售联系人" :value="submitParam.salesmenName"></tpx-text-item>
</view>
<view class="yunf-input-item">
<tpx-text-item label="回款联系人" :value="submitParam.payeeName"></tpx-text-item>
</view>
</template>
<view v-if="submitParam.transLine" class="yunf-input-item">
<tpx-select v-model:value="submitParam.destinationCode" v-model:resObject="destPostRes" :getListFun="getDestPositionList" :transKeyVal="{valKey: 'destCode',titleKey: 'destName'}" :isWhite="true" :customInput="true"
:searchParam="destPostParam" @onChange="handleDestPostChange"
>
<tpx-text-item label="目的地" :value="submitParam.destinationCode" :list="destPostRes.list"></tpx-text-item>
</tpx-select>
</view>
<view v-if="submitParam.destinationCode" class="yunf-input-item">
<tpx-text-item label="目的网点" :value="submitParam.dispatchUnderlingSite"></tpx-text-item>
</view>
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.warehouseInNo" v-model:resObject="wareRes" :getListFun="getWarehouseInList" :transKeyVal="{valKey: 'inNo',titleKey: 'inNo'}" :isWhite="true" :customInput="true"
searchParam="" type="multiple"
>
<tpx-text-item label="进仓单" :value="submitParam.warehouseInNo" :list="wareRes.list"></tpx-text-item>
</tpx-select>
</view>
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.dispatchMethod" :list="dicData.emis_tab_dispatch_mode"
mode="drop" customInput="true"
>
<tpx-text-item label="派送方式" :value="submitParam.dispatchMethod" :list="dicData.emis_tab_dispatch_mode"></tpx-text-item>
</tpx-select>
</view>
<view class="yunf-input-item">
<tpx-text-item label="寄件短信">
<template v-slot:right>
<text class="pr-20 clr-sub">是否短信</text>
<u-switch v-model="submitParam.blMessage" active-color="#B12D29" size="34"></u-switch>
</template>
</tpx-text-item>
</view>
<view class="yunf-input-item">
<tpx-text-item label="收件短信">
<template v-slot:right>
<text class="pr-20 clr-sub">是否短信</text>
<u-switch v-model="submitParam.blAcceptMessage" active-color="#B12D29" size="34"></u-switch>
</template>
</tpx-text-item>
</view>
</view>
<view v-if="submitParam.destinationCode" class="yunf-input-item">
<tpx-text-item label="目的网点" :value="submitParam.dispatchUnderlingSite"></tpx-text-item>
</view>
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.warehouseInNo" v-model:resObject="wareRes" :getListFun="getWarehouseInList" :transKeyVal="{valKey: 'inNo',titleKey: 'inNo'}" :isWhite="true" :customInput="true"
searchParam="" type="multiple"
>
<tpx-text-item label="进仓单" :value="submitParam.warehouseInNo" :list="wareRes.list"></tpx-text-item>
</tpx-select>
</view>
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.dispatchMethod" :list="dicData.emis_tab_dispatch_mode"
mode="drop" customInput="true"
>
<tpx-text-item label="派送方式" :value="submitParam.dispatchMethod" :list="dicData.emis_tab_dispatch_mode"></tpx-text-item>
</tpx-select>
</view>
<view class="yunf-input-item">
<tpx-text-item label="寄件短信">
<template v-slot:right>
<text class="pr-20 clr-sub">是否短信</text>
<u-switch v-model="submitParam.blMessage" active-color="#B12D29" size="34"></u-switch>
</template>
</tpx-text-item>
</view>
<view class="yunf-input-item">
<tpx-text-item label="收件短信">
<template v-slot:right>
<text class="pr-20 clr-sub">是否短信</text>
<u-switch v-model="submitParam.blAcceptMessage" active-color="#B12D29" size="34"></u-switch>
</template>
</tpx-text-item>
</view>
</view>
<view class="com-section mt-30" @click="handleDialogClick(goodChooseModal)">
<u-row justify="space-between">
<text>发货信息(进仓情况)</text>
<u-icon name="edit-pen" size="42"></u-icon>
</u-row>
</view>
<view class="blcok-white">
<bpe-goodstatic-tmp v-model:value="submitParam"></bpe-goodstatic-tmp>
</view>
<view class="com-section mt-30">
<u-row justify="space-between">
<text>计费信息</text>
</u-row>
</view>
<view class="blcok-white">
<bpe-cost-tmp v-model:value="submitParam"></bpe-cost-tmp>
</view>
<view class="com-section mt-30">
<u-row justify="space-between">
<text>备注</text>
</u-row>
</view>
<view class="blcok-white">
<u-textarea v-model="submitParam.remark" border="surround" height="120" placeholder="备注"
maxlength="50" count></u-textarea>
</view>
</view>
<view class="com-section mt-30" @click="handleDialogClick(goodChooseModal)">
<u-row justify="space-between">
<text>发货信息(进仓情况)</text>
<u-icon name="edit-pen" size="42"></u-icon>
</template>
<template v-slot:footer>
<view class="pos-rlt blcok-white" style="border-radius: 0;margin-top: 0;">
<u-row>
<u-button size="large" shape="circle"
custom-style="width: 260rpx;height:80rpx;font-size: 30rpx;" :plain="true" type="primary">保存</u-button>
<u-button size="large" shape="circle"
custom-style="width: 400rpx;height:80rpx;font-size: 30rpx;" type="primary" >确认并打印</u-button>
</u-row>
</view>
<view class="blcok-white">
<bpe-goodstatic-tmp v-model:value="submitParam"></bpe-goodstatic-tmp>
</view>
<view class="com-section mt-30">
<u-row justify="space-between">
<text>计费信息</text>
</u-row>
</view>
<view class="blcok-white">
<bpe-cost-tmp v-model:value="submitParam"></bpe-cost-tmp>
</view>
<view class="com-section mt-30">
<u-row justify="space-between">
<text>备注</text>
</u-row>
</view>
<view class="blcok-white">
<u-textarea v-model="submitParam.remark" border="surround" height="120" placeholder="备注"
maxlength="50" count></u-textarea>
</view>
</template>
</tpx-layout>
<buns-edit-sheet percentHeight="70" title="商品信息" v-model:show="goodChooseModal.show" v-model:value="submitParam" v-slot="tempObject">
<view class="mb-20">托寄货物描述</view>
<bpe-gooditem-edit-tmp :value="tempObject.value"></bpe-gooditem-edit-tmp>
<view class="mt-30">
<bpe-goodphoto-tmp title="货物照片" :value="tempObject.value" filedName="goodsPics"></bpe-goodphoto-tmp>
</view>
</template>
<template v-slot:footer>
<view class="pos-rlt blcok-white" style="border-radius: 0;margin-top: 0;">
<u-row>
<u-button size="large" shape="circle"
custom-style="width: 260rpx;height:80rpx;font-size: 30rpx;" :plain="true" type="primary">保存</u-button>
<u-button size="large" shape="circle"
custom-style="width: 400rpx;height:80rpx;font-size: 30rpx;" type="primary" >确认并打印</u-button>
</u-row>
<view class="mt-30">
<bpe-good-kuaidi-tmp :value="tempObject.value"></bpe-good-kuaidi-tmp>
</view>
</template>
</tpx-layout>
<buns-edit-sheet percentHeight="70" title="商品信息" v-model:show="goodChooseModal.show" v-model:value="submitParam" v-slot="tempObject">
<view class="mb-20">托寄货物描述</view>
<bpe-gooditem-edit-tmp :value="tempObject.value"></bpe-gooditem-edit-tmp>
<view class="mt-30">
<bpe-goodphoto-tmp title="货物照片" :value="tempObject.value" filedName="goodsPics"></bpe-goodphoto-tmp>
</view>
<view class="mt-30">
<bpe-good-kuaidi-tmp :value="tempObject.value"></bpe-good-kuaidi-tmp>
</view>
<view class="mt-30">
<bpe-goodsize-tmp :value="tempObject.value"></bpe-goodsize-tmp>
</view>
</buns-edit-sheet>
<view class="mt-30">
<bpe-goodsize-tmp :value="tempObject.value"></bpe-goodsize-tmp>
</view>
</buns-edit-sheet>
</tpx-page>
</template>
<script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB