This commit is contained in:
aihe 2024-05-04 01:17:45 +08:00
parent 92e11321c1
commit e2c892ef55
6 changed files with 32 additions and 20 deletions

View File

@ -1,5 +1,6 @@
import { goto } from "./untool"; import { goto } from "./untool";
import { showToast, showLoading, hideLoading } from "./untool" import { showToast, showLoading, hideLoading } from "./untool"
import { setSessionXToken } from "@/session"
// 请求接口 // 请求接口
function dealRequest(def, url, param) { function dealRequest(def, url, param) {
@ -65,10 +66,9 @@ function handleResponse({
resolve(data) resolve(data)
} else { } else {
if ( code == 401) { // 统一判断需要认证, 并作页面跳转 if ( code == 401) { // 统一判断需要认证, 并作页面跳转
setSessionXToken()
showToast(msg) showToast(msg)
setTimeout(() => { goto("login/login", 2)
goto("login/login", 2)
}, 3500)
return reject({ return reject({
code: {} code: {}
}); });

View File

@ -10,7 +10,7 @@
</view> </view>
<view class="dt-cont"> <view class="dt-cont">
<view class="dt-block mt-10"> <view class="dt-block mt-10">
<tpx-tags v-model:value="checkedGoodId" type="single" :list="hotGoods"></tpx-tags> <tpx-tags v-model:value="checkedGoodId" type="single" :list="goodsRes.list.slice(0,6)" @onChange="handleChooseGood"></tpx-tags>
</view> </view>
</view> </view>
</view> </view>
@ -26,7 +26,7 @@
<view class="edm-input-item"> <view class="edm-input-item">
<tpx-select v-model:value="checkedGoodId" v-model:resObject="goodsRes" :getListFun="getGoodsList" :transKeyVal="{valKey: 'goodsCode',titleKey: 'goodsName'}" <tpx-select v-model:value="checkedGoodId" v-model:resObject="goodsRes" :getListFun="getGoodsList" :transKeyVal="{valKey: 'goodsCode',titleKey: 'goodsName'}"
mode="drop" mode="drop"
:searchParam="goodsSearchParam" @onChange="handleWayChange" :searchParam="goodsSearchParam" @onChange="handleChooseGood"
> >
<u-input placeholder="物品名称" v-model="modelInfo.goodsName" font-size="26" <u-input placeholder="物品名称" v-model="modelInfo.goodsName" font-size="26"
custom-style="border-radius: 30rpx;padding: 10rpx 20rpx;" custom-style="border-radius: 30rpx;padding: 10rpx 20rpx;"
@ -40,7 +40,7 @@
<template v-slot:right> <template v-slot:right>
<u-input placeholder="请填写" v-model="modelInfo.cargoQty" inputAlign="right" font-size="26" <u-input placeholder="请填写" v-model="modelInfo.cargoQty" inputAlign="right" font-size="26"
custom-style="border:0;border-radius: 10rpx;padding: 14rpx 20rpx;" custom-style="border:0;border-radius: 10rpx;padding: 14rpx 20rpx;"
placeholder-style="color: #999; " placeholder-style="color: #999; " type="number"
> >
<template #suffix> <template #suffix>
<text class="font-26 clr-sub pl-10">件</text> <text class="font-26 clr-sub pl-10">件</text>
@ -55,7 +55,7 @@
<template v-slot:right> <template v-slot:right>
<u-input placeholder="请填写" v-model="modelInfo.price" inputAlign="right" font-size="26" <u-input placeholder="请填写" v-model="modelInfo.price" inputAlign="right" font-size="26"
custom-style="border:0;border-radius: 10rpx;padding: 14rpx 20rpx;" custom-style="border:0;border-radius: 10rpx;padding: 14rpx 20rpx;"
placeholder-style="color: #999; " placeholder-style="color: #999; " type="number"
> >
<template #suffix> <template #suffix>
<text class="font-26 clr-sub pl-10">CNY</text> <text class="font-26 clr-sub pl-10">CNY</text>
@ -201,10 +201,10 @@
modelInfo: {}, modelInfo: {},
goodsRes: { list: [] }, goodsRes: { list: [] },
checkedGoodId: '', checkedGoodId: '',
hotGoods: [ // hotGoods: [
{ title: '热门1', val: 1 }, // { title: '604', val: 1 },
{ title: '热门2', val: 2 }, // { title: '热门2', val: 2 },
] // ]
} }
}, },
created() { created() {
@ -225,6 +225,13 @@
this.$emit('onSure', this.modelInfo) this.$emit('onSure', this.modelInfo)
this.$emit('update:value', this.modelInfo) this.$emit('update:value', this.modelInfo)
this.handleCloseModal() this.handleCloseModal()
},
handleChooseGood(val) {
const item = this.goodsRes.list.filter(t=> t.val == val)[0]
this.modelInfo = {
...this.modelInfo,
...item
}
} }
} }
} }

View File

@ -41,12 +41,12 @@
</tpx-text-item> </tpx-text-item>
</view> </view>
<view class="edm-input-item"> <view v-if="modelInfo.blPrepareInFreight" class="edm-input-item">
<tpx-text-item label="代垫预估"> <tpx-text-item label="代垫预估">
<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; " placeholder-style="color: #999; " type="number"
> >
<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

@ -12,7 +12,7 @@
<u-row justify="between"> <u-row justify="between">
<text class="font-28">包裹重量</text> <text class="font-28">包裹重量</text>
<view> <view>
<tpx-input v-model:value="modelInfo.billWeight" :isWhite="true" placeholder="" suffix="kg"></tpx-input> <tpx-input v-model:value="modelInfo.billWeight" :isWhite="true" placeholder="" suffix="kg" type="number"></tpx-input>
</view> </view>
</u-row> </u-row>
</view> </view>
@ -23,13 +23,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.chang" :isWhite="true" placeholder="长" suffix="cm"></tpx-input> <tpx-input v-model:value="modelInfo.chang" :isWhite="true" placeholder="长" suffix="cm" type="number"></tpx-input>
</u-col> </u-col>
<u-col span="3.7"> <u-col span="3.7">
<tpx-input v-model:value="modelInfo.kuan" :isWhite="true" placeholder="宽" suffix="cm"></tpx-input> <tpx-input v-model:value="modelInfo.kuan" :isWhite="true" placeholder="宽" suffix="cm" type="number"></tpx-input>
</u-col> </u-col>
<u-col span="3.7"> <u-col span="3.7">
<tpx-input v-model:value="modelInfo.gao" :isWhite="true" placeholder="高" suffix="cm"></tpx-input> <tpx-input v-model:value="modelInfo.gao" :isWhite="true" placeholder="高" suffix="cm" type="number"></tpx-input>
</u-col> </u-col>
</u-row> </u-row>

View File

@ -1,6 +1,6 @@
<template> <template>
<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" :custom-style="inputStyle" :readonly="readonly" :type="type"
:placeholder-style="`color: #999;${placeholderStyle};` " @change="handleChange" :placeholder-style="`color: #999;${placeholderStyle};` " @change="handleChange"
> >
<template v-if="suffix" #suffix> <template v-if="suffix" #suffix>
@ -35,6 +35,11 @@
return false return false
} }
}, },
type: {
default () {
return ''
}
},
readonly: { readonly: {
default () { default () {
return false return false

View File

@ -131,8 +131,8 @@ export const getOrderModels = () => {
"prepareInBillCode": undefined, // 快递单号 "prepareInBillCode": undefined, // 快递单号
"prepareInRemark": undefined, // 预入仓自定义标识 "prepareInRemark": undefined, // 预入仓自定义标识
"prepareInSupplier": undefined, // 预入仓供应商 "prepareInSupplier": undefined, // 预入仓供应商
"warehouseInNo": "", // 进仓单号 "warehouseInNo": [], // 进仓单号
"meterRate": undefined, // 泡重比 "meterRate": undefined, // 泡重比
"goodsPics": "", // 货物图片 "goodsPics": [], // 货物图片
} }
} }