This commit is contained in:
aihe 2024-05-27 11:01:17 +08:00
parent e37f536301
commit 0f9451ada3
10 changed files with 30 additions and 19 deletions

View File

@ -51,7 +51,7 @@
<view class="edm-input-item"> <view class="edm-input-item">
<tpx-text-item label="物品单价"> <tpx-text-item label="物品单价">
<template v-slot:right> <template v-slot:right>
<tpx-input placeholder="请填写" v-model:value="modelInfo.price" inputAlign="right" type="digit" suffix="CNY"></tpx-input> <tpx-input placeholder="请填写" v-model:value="modelInfo.price" inputAlign="right" _digit="5" suffix="CNY"></tpx-input>
</template> </template>
</tpx-text-item> </tpx-text-item>
</view> </view>

View File

@ -47,7 +47,7 @@
<view class="pt-20"> <view class="pt-20">
<u-row custom-style="flex: 1"> <u-row custom-style="flex: 1">
<text class="font-26 pr-10">总费用</text> <text class="font-26 pr-10">总费用</text>
<tpx-input v-model:value="modelInfo.freight" :isWhite="true" type="digit" <tpx-input v-model:value="modelInfo.freight" :isWhite="true" _digit="5"
custom-style="width: 120rpx;height: 46rpx;" suffix="CNY"></tpx-input> custom-style="width: 120rpx;height: 46rpx;" suffix="CNY"></tpx-input>
</u-row> </u-row>
</view> </view>

View File

@ -46,7 +46,7 @@
<template v-slot:right> <template v-slot:right>
<u-input placeholder="" v-model="modelInfo.prepareInEstFee" inputAlign="right" <u-input placeholder="" v-model="modelInfo.prepareInEstFee" inputAlign="right"
custom-style="width: 366rpx;flex: none;border:0;border-radius: 10rpx;background-color: #F6F6F6;padding: 11rpx 20rpx;" custom-style="width: 366rpx;flex: none;border:0;border-radius: 10rpx;background-color: #F6F6F6;padding: 11rpx 20rpx;"
placeholder-style="color: #999; " type="digit" placeholder-style="color: #999; " _digit="5"
> >
<template #suffix> <template #suffix>
<text class="font-26 clr-sub pl-10">CNY</text> <text class="font-26 clr-sub pl-10">CNY</text>

View File

@ -7,13 +7,13 @@
<view style="width: 70%;"> <view style="width: 70%;">
<u-row justify="between"> <u-row justify="between">
<u-col span="3.7"> <u-col span="3.7">
<tpx-input v-model:value="modelInfo.length" @change="calculateVplume" placeholder="长" inputAlign="right" suffix="cm" type="digit"></tpx-input> <tpx-input v-model:value="modelInfo.length" @change="calculateVplume" placeholder="长" inputAlign="right" suffix="cm" _digit="5"></tpx-input>
</u-col> </u-col>
<u-col span="3.7"> <u-col span="3.7">
<tpx-input v-model:value="modelInfo.width" @change="calculateVplume" placeholder="宽" inputAlign="right" suffix="cm" type="digit"></tpx-input> <tpx-input v-model:value="modelInfo.width" @change="calculateVplume" placeholder="宽" inputAlign="right" suffix="cm" _digit="5"></tpx-input>
</u-col> </u-col>
<u-col span="3.7"> <u-col span="3.7">
<tpx-input v-model:value="modelInfo.height" @change="calculateVplume" placeholder="高" inputAlign="right" suffix="cm" type="digit"></tpx-input> <tpx-input v-model:value="modelInfo.height" @change="calculateVplume" placeholder="高" inputAlign="right" suffix="cm" _digit="5"></tpx-input>
</u-col> </u-col>
</u-row> </u-row>
</view> </view>

View File

@ -12,7 +12,7 @@
<u-row justify="between"> <u-row justify="between">
<text class="font-28 font-weight">包裹重量</text> <text class="font-28 font-weight">包裹重量</text>
<view> <view>
<tpx-input v-model:value="modelInfo.billWeight" placeholder="" inputAlign="right" suffix="kg" type="digit"></tpx-input> <tpx-input v-model:value="modelInfo.billWeight" placeholder="" inputAlign="right" suffix="kg" _digit="5"></tpx-input>
</view> </view>
</u-row> </u-row>
</view> </view>
@ -21,7 +21,7 @@
<u-row justify="between" align="top"> <u-row justify="between" align="top">
<text class="font-28 pt-20 font-weight">总体积</text> <text class="font-28 pt-20 font-weight">总体积</text>
<view v-if="totalVolume || true"> <view v-if="totalVolume || true">
<tpx-input v-model:value="modelInfo.totalVolume" placeholder="" inputAlign="right" suffix="m³" type="digit"></tpx-input> <tpx-input v-model:value="modelInfo.totalVolume" placeholder="" inputAlign="right" suffix="m³" _digit="5"></tpx-input>
</view> </view>
</u-row> </u-row>
</view> </view>

View File

@ -2,6 +2,7 @@
<u-input shape="circle" :placeholder="placeholder" :modelValue="value" :clearable="clearable" <u-input shape="circle" :placeholder="placeholder" :modelValue="value" :clearable="clearable"
:custom-style="inputStyle" :readonly="readonly" :type="type" :inputAlign="inputAlign" :custom-style="inputStyle" :readonly="readonly" :type="type" :inputAlign="inputAlign"
:placeholder-style="`color: #999;${placeholderStyle};` " @change="handleChange" :placeholder-style="`color: #999;${placeholderStyle};` " @change="handleChange"
:formatter="formatter"
> >
<template v-if="suffix" #suffix> <template v-if="suffix" #suffix>
<text class="font-26 clr-sub pl-10">{{suffix}}</text> <text class="font-26 clr-sub pl-10">{{suffix}}</text>
@ -55,6 +56,8 @@
return '' return ''
} }
}, },
_digit:{ // 保留小数位
},
customStyle:{ customStyle:{
default () { default () {
return '' return ''
@ -88,6 +91,14 @@
handleChange(val){ handleChange(val){
this.$emit('change', val) this.$emit('change', val)
this.$emit('update:value', val) this.$emit('update:value', val)
},
formatter(val) {
if(this._digit) {
let reg = new RegExp(`^\\d*(\\.?\\d{0,${this._digit}})`, 'g')
let newVal = val.match(reg)[0]
return newVal
}
return val
} }
} }
} }

View File

@ -80,6 +80,7 @@
searchParam: { searchParam: {
billCode: '', billCode: '',
_date: [], _date: [],
scanStatTyp: 2 // 到件
}, },
resData: { list: [] } resData: { list: [] }
} }
@ -97,9 +98,8 @@
methods: { methods: {
async getListFun(param){ async getListFun(param){
let cpParam = JSON.parse(JSON.stringify(param)) let cpParam = JSON.parse(JSON.stringify(param))
cpParam['params.scanStatType'] = 2 // 到件 cpParam.beginScanDate = cpParam._date[0]
cpParam['params.beginScanDate'] = cpParam._date[0] cpParam.endScanDate = cpParam._date[1]
cpParam['params.endScanDate'] = cpParam._date[1]
let res = await apiService.queryScanWaybillList(cpParam) let res = await apiService.queryScanWaybillList(cpParam)
return res return res
}, },

View File

@ -80,6 +80,7 @@
searchParam: { searchParam: {
billCode: '', billCode: '',
_date: [], _date: [],
scanStatType: 3, // 派件
}, },
resData: { list: [] } resData: { list: [] }
} }
@ -97,9 +98,8 @@
methods: { methods: {
async getListFun(param){ async getListFun(param){
let cpParam = JSON.parse(JSON.stringify(param)) let cpParam = JSON.parse(JSON.stringify(param))
cpParam['params.scanStatType'] = 3 // 派件 cpParam.beginScanDate = cpParam._date[0]
cpParam['params.beginScanDate'] = cpParam._date[0] cpParam.endScanDate = cpParam._date[1]
cpParam['params.endScanDate'] = cpParam._date[1]
let res = await apiService.queryScanWaybillList(cpParam) let res = await apiService.queryScanWaybillList(cpParam)
return res return res
}, },

View File

@ -80,6 +80,7 @@
searchParam: { searchParam: {
billCode: '', billCode: '',
_date: [], _date: [],
scanStatType: 1, // 发件
}, },
resData: { list: [] } resData: { list: [] }
} }
@ -97,9 +98,8 @@
methods: { methods: {
async getListFun(param){ async getListFun(param){
let cpParam = JSON.parse(JSON.stringify(param)) let cpParam = JSON.parse(JSON.stringify(param))
cpParam['params.scanStatType'] = 1 // 发件 cpParam.beginScanDate = cpParam._date[0]
cpParam['params.beginScanDate'] = cpParam._date[0] cpParam.endScanDate = cpParam._date[1]
cpParam['params.endScanDate'] = cpParam._date[1]
let res = await apiService.queryScanWaybillList(cpParam) let res = await apiService.queryScanWaybillList(cpParam)
return res return res
}, },

View File

@ -64,7 +64,7 @@
<view class="yunf-input-item" > <view class="yunf-input-item" >
<tpx-text-item label="重量"> <tpx-text-item label="重量">
<template v-slot:right> <template v-slot:right>
<tpx-input v-model:value="submitParam.billWeight" placeholder="" inputAlign="right" suffix="kg" type="digit"></tpx-input> <tpx-input v-model:value="submitParam.billWeight" placeholder="" inputAlign="right" suffix="kg" _digit="5"></tpx-input>
</template> </template>
</tpx-text-item> </tpx-text-item>
</view> </view>
@ -72,7 +72,7 @@
<view class="yunf-input-item" > <view class="yunf-input-item" >
<tpx-text-item label="体积"> <tpx-text-item label="体积">
<template v-slot:right> <template v-slot:right>
<tpx-input v-model:value="submitParam.totalVolume" placeholder="" inputAlign="right" suffix="m³" type="digit"></tpx-input> <tpx-input v-model:value="submitParam.totalVolume" placeholder="" inputAlign="right" suffix="m³" _digit="5"></tpx-input>
</template> </template>
</tpx-text-item> </tpx-text-item>
</view> </view>