This commit is contained in:
aihe 2024-08-02 16:57:05 +08:00
parent 0ae5f3eff9
commit 3291c0d456
4 changed files with 82 additions and 27 deletions

View File

@ -85,13 +85,20 @@
.w-full{ .w-full{
width: 100%; width: 100%;
} }
.text-singe-line { .text-singe-line, .text-1-line {
word-break: break-all; word-break: break-all;
overflow: hidden; overflow: hidden;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.text-2-line {
word-break: break-all;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.label-text{ .label-text{
position: relative; position: relative;
display: inline-block; display: inline-block;

View File

@ -12,11 +12,12 @@
<view class="dt-block" > <view class="dt-block" >
<view class="dt-cont"> <view class="dt-cont">
<view v-if="showMode!=1" class="edm-input-item"> <view v-if="showMode!=1" class="edm-input-item pos-rlt">
<view class="mt-30 lbRequiredDot" style="position: absolute;"></view>
<tpx-select v-model:value="checkedGoodId" v-model:resObject="goodsRes" :getListFun="getGoodsList" :transKeyVal="{valKey: 'goodsName',titleKey: 'goodsName'}" <tpx-select v-model:value="checkedGoodId" v-model:resObject="goodsRes" :getListFun="getGoodsList" :transKeyVal="{valKey: 'goodsName',titleKey: 'goodsName'}"
mode="drop" @onChange="handleChooseGood" mode="drop" @onChange="handleChooseGood"
> >
<tpx-input v-model:value="modelInfo.goodsName" placeholder="物品名称"></tpx-input> <tpx-textarea v-model:value="modelInfo.goodsName" placeholder="物品名称" :autoHeight="true" :height="40"></tpx-textarea>
</tpx-select> </tpx-select>
</view> </view>
@ -40,11 +41,15 @@
</view> </view>
<view class="edm-input-item"> <view class="edm-input-item">
<tpx-select v-model:value="modelInfo.nationArea" v-model:resObject="countryRes" :getListFun="getCountryList" :transKeyVal="{valKey: 'name',titleKey: 'name'}"
mode="drop"
>
<tpx-text-item label="原产地"> <tpx-text-item label="原产地">
<template v-slot:right> <template v-slot:right>
<tpx-input placeholder="请填写" v-model:value="modelInfo.nationArea" inputAlign="right"></tpx-input> <tpx-input placeholder="请填写" v-model:value="modelInfo.nationArea" inputAlign="right"></tpx-input>
</template> </template>
</tpx-text-item> </tpx-text-item>
</tpx-select>
</view> </view>
</view> </view>
@ -162,6 +167,7 @@
data() { data() {
return { return {
goodsRes: { list: [] }, goodsRes: { list: [] },
countryRes: { list: [] },
checkedGoodId: '', checkedGoodId: '',
hotGoods: [ hotGoods: [
] ]
@ -177,6 +183,7 @@
methods: { methods: {
getGoodsList: apiService.getGoodsList, getGoodsList: apiService.getGoodsList,
getCountryList: apiService.getEmisCountry,
async initData() { async initData() {
this.checkedGoodId = '' this.checkedGoodId = ''

View File

@ -1,8 +1,11 @@
<template> <template>
<view class="pb-20"> <view class="pb-20">
<view> <u-row>
<text class="clr-sub pr-10">货物名称</text> {{modelInfo.goodsInfo}} <view class="clr-sub pr-10">货物名称</view>
<view class="text-1-line" style="flex: 1;">
{{modelInfo.goodsInfo}}
</view> </view>
</u-row>
<!-- <view class="pt-10"> <!-- <view class="pt-10">
<text class="clr-sub pr-10">货物大类</text> {{modelInfo.goodsType}} <text class="clr-sub pr-10">货物大类</text> {{modelInfo.goodsType}}
</view> --> </view> -->
@ -10,8 +13,8 @@
</view> </view>
<view v-for="(item) in modelInfo.cargoList" class="yditem"> <view v-for="(item) in modelInfo.cargoList" class="yditem">
<view class="ydi-lab"> <view class="font-weight text-1-line">
<text class="font-weight">{{item.goodsName}}</text> {{item.goodsName}}
</view> </view>
<u-row justify="between" custom-style="flex-wrap: wrap;"> <u-row justify="between" custom-style="flex-wrap: wrap;">
@ -23,29 +26,55 @@
{{item.height || '0'}}cm {{item.height || '0'}}cm
</view> </view>
</u-col> </u-col>
<u-col v-if="item.nationArea" span="6">
<view class="pt-5"> <u-col v-if="item.price" span="6">
<text class="clr-sub pr-10">产地</text>{{item.nationArea}}
</view>
</u-col>
<u-col span="12">
<u-row justify="between">
<view class="pt-5"> <view class="pt-5">
<text class="clr-sub pr-10">件数</text>{{item.cargoQty}} <text class="clr-sub pr-10">件数</text>{{item.cargoQty}}
</view> </view>
<view class="pt-5">
<text class="clr-sub pr-10">体积</text>
{{item.volume || '0'}}m³
</view>
</u-row>
</u-col> </u-col>
<u-col v-if="item.price" span="6">
<view class="pt-5">
<text class="clr-sub pr-10">体积</text>{{item.volume || '0'}}m³
</view>
</u-col>
<u-col v-if="item.price" span="6"> <u-col v-if="item.price" span="6">
<view class="pt-5"> <view class="pt-5">
<text class="clr-sub pr-10">单价</text>{{item.price}} CNY <text class="clr-sub pr-10">单价</text>{{item.price}} CNY
</view> </view>
</u-col> </u-col>
<u-col v-if="item.nationArea" span="6">
<view class="pt-5">
<text class="clr-sub pr-10">产地</text>{{item.nationArea}}
</view>
</u-col>
<u-col v-if="item.brand" span="6">
<view class="pt-5">
<text class="clr-sub pr-10">品牌</text>{{item.brand}}
</view>
</u-col>
<u-col v-if="item.material" span="6">
<view class="pt-5">
<text class="clr-sub pr-10">材质</text>{{item.material}}
</view>
</u-col>
<u-col v-if="item.purpose" span="6">
<view class="pt-5">
<text class="clr-sub pr-10">用途</text>{{item.purpose}}
</view>
</u-col>
<u-col v-if="item.ingredients" span="6">
<view class="pt-5">
<text class="clr-sub pr-10">成分</text>{{item.ingredients}}
</view>
</u-col>
<u-col v-if="item.supplier" span="6">
<view class="pt-5">
<text class="clr-sub pr-10">供应商</text>{{item.supplier}}
</view>
</u-col>
</u-row> </u-row>
</view> </view>

View File

@ -1,8 +1,10 @@
<template> <template>
<u-textarea shape="circle" placeholder-style="" <u-textarea shape="circle" placeholder-style=""
:modelValue="value" :clearable="true" :placeholder="placeholder" :modelValue="value" :clearable="true" :placeholder="placeholder"
custom-style="border-radius: 10rpx;padding: 15rpx 20rpx;" height="160" custom-style="border-radius: 10rpx;padding: 15rpx 20rpx;"
@change="handleChange" @change="handleChange"
:height="height"
:autoHeight="autoHeight"
></u-textarea> ></u-textarea>
</template> </template>
@ -19,6 +21,16 @@
return '' return ''
} }
}, },
height:{
default () {
return 160
}
},
autoHeight:{
default () {
return false
}
},
}, },
data() { data() {
}, },