feat(wms): update input components to disable controls and enhance user selection

pull/345/head
YunaiV 2026-05-19 16:16:28 +08:00
parent 09c19526bb
commit 9c57ae07a6
4 changed files with 15 additions and 16 deletions

View File

@ -215,26 +215,26 @@ defineExpose({
<div class="flex w-full gap-1"> <div class="flex w-full gap-1">
<ElInputNumber <ElInputNumber
v-model="row.length" v-model="row.length"
:controls="false"
:min="0" :min="0"
:precision="DIMENSION_PRECISION" :precision="DIMENSION_PRECISION"
class="!w-1/3" class="!w-1/3"
controls-position="right"
placeholder="长" placeholder="长"
/> />
<ElInputNumber <ElInputNumber
v-model="row.width" v-model="row.width"
:controls="false"
:min="0" :min="0"
:precision="DIMENSION_PRECISION" :precision="DIMENSION_PRECISION"
class="!w-1/3" class="!w-1/3"
controls-position="right"
placeholder="宽" placeholder="宽"
/> />
<ElInputNumber <ElInputNumber
v-model="row.height" v-model="row.height"
:controls="false"
:min="0" :min="0"
:precision="DIMENSION_PRECISION" :precision="DIMENSION_PRECISION"
class="!w-1/3" class="!w-1/3"
controls-position="right"
placeholder="高" placeholder="高"
/> />
</div> </div>
@ -243,18 +243,18 @@ defineExpose({
<div class="flex flex-col gap-2 py-1"> <div class="flex flex-col gap-2 py-1">
<ElInputNumber <ElInputNumber
v-model="row.netWeight" v-model="row.netWeight"
:controls="false"
:min="0" :min="0"
:precision="WEIGHT_PRECISION" :precision="WEIGHT_PRECISION"
class="!w-full" class="!w-full"
controls-position="right"
placeholder="净重" placeholder="净重"
/> />
<ElInputNumber <ElInputNumber
v-model="row.grossWeight" v-model="row.grossWeight"
:controls="false"
:min="0" :min="0"
:precision="WEIGHT_PRECISION" :precision="WEIGHT_PRECISION"
class="!w-full" class="!w-full"
controls-position="right"
placeholder="毛重" placeholder="毛重"
/> />
</div> </div>
@ -263,18 +263,18 @@ defineExpose({
<div class="flex flex-col gap-2 py-1"> <div class="flex flex-col gap-2 py-1">
<ElInputNumber <ElInputNumber
v-model="row.costPrice" v-model="row.costPrice"
:controls="false"
:min="0" :min="0"
:precision="PRICE_PRECISION" :precision="PRICE_PRECISION"
class="!w-full" class="!w-full"
controls-position="right"
placeholder="成本价" placeholder="成本价"
/> />
<ElInputNumber <ElInputNumber
v-model="row.sellingPrice" v-model="row.sellingPrice"
:controls="false"
:min="0" :min="0"
:precision="PRICE_PRECISION" :precision="PRICE_PRECISION"
class="!w-full" class="!w-full"
controls-position="right"
placeholder="销售价" placeholder="销售价"
/> />
</div> </div>

View File

@ -166,11 +166,11 @@ export function useGridFormSchema(): VbenFormSchema[] {
{ {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
clearable: true,
api: getSimpleUserList, api: getSimpleUserList,
clearable: true,
filterable: true,
labelField: 'nickname', labelField: 'nickname',
placeholder: '请选择创建用户', placeholder: '请选择创建用户',
filterable: true,
valueField: 'id', valueField: 'id',
}, },
fieldName: 'creator', fieldName: 'creator',
@ -179,11 +179,11 @@ export function useGridFormSchema(): VbenFormSchema[] {
{ {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
clearable: true,
api: getSimpleUserList, api: getSimpleUserList,
clearable: true,
filterable: true,
labelField: 'nickname', labelField: 'nickname',
placeholder: '请选择更新用户', placeholder: '请选择更新用户',
filterable: true,
valueField: 'id', valueField: 'id',
}, },
fieldName: 'updater', fieldName: 'updater',

View File

@ -82,11 +82,11 @@ export function useGridFormSchema(): VbenFormSchema[] {
{ {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
clearable: true,
api: getSimpleUserList, api: getSimpleUserList,
clearable: true,
filterable: true,
labelField: 'nickname', labelField: 'nickname',
placeholder: '请选择创建用户', placeholder: '请选择创建用户',
filterable: true,
valueField: 'id', valueField: 'id',
}, },
fieldName: 'creator', fieldName: 'creator',
@ -95,11 +95,11 @@ export function useGridFormSchema(): VbenFormSchema[] {
{ {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
clearable: true,
api: getSimpleUserList, api: getSimpleUserList,
clearable: true,
filterable: true,
labelField: 'nickname', labelField: 'nickname',
placeholder: '请选择更新用户', placeholder: '请选择更新用户',
filterable: true,
valueField: 'id', valueField: 'id',
}, },
fieldName: 'updater', fieldName: 'updater',

View File

@ -518,7 +518,6 @@ const [Modal, modalApi] = useVbenModal({
{ {
label: '作废', label: '作废',
type: 'danger', type: 'danger',
link: true,
auth: ['wms:shipment-order:cancel'], auth: ['wms:shipment-order:cancel'],
onClick: handleFormCancel, onClick: handleFormCancel,
}, },