|
|
@@ -10,8 +10,9 @@
|
|
|
<slot name="header"></slot>
|
|
|
</CellGroup>
|
|
|
<CellGroup title="交收信息" inset>
|
|
|
- <Field name="wrstandardname" label="点选仓单" placeholder="请选择" input-align="right" :rules="formRules.wrstandardname"
|
|
|
- v-model="checkedRow.wrstandardname" @click="showWarehouseReceipt = true" is-link readonly />
|
|
|
+ <Field name="wrstandardname" label="点选仓单" placeholder="请选择" input-align="right"
|
|
|
+ :rules="formRules.wrstandardname" v-model="checkedRow.wrstandardname"
|
|
|
+ @click="showWarehouseReceipt = true" is-link readonly />
|
|
|
<template v-if="checkedRow.deliverygoodsid">
|
|
|
<Cell title="持有人" :value="checkedRow.username" />
|
|
|
<Cell title="仓库" :value="checkedRow.warehousename" />
|
|
|
@@ -73,6 +74,7 @@ const refresh = shallowRef(false) // 是否刷新父组件数据
|
|
|
const formRef = shallowRef<FormInstance>()
|
|
|
const checkedRow = shallowRef<Partial<Model.WrDeliveryAvalidHoldLBRsp>>({}) //选中的点选仓单
|
|
|
const showWarehouseReceipt = shallowRef(false)
|
|
|
+const quote = futuresStore.getGoodsQuote(props.goodsId) // 商品实时盘面
|
|
|
|
|
|
const formData = reactive<Partial<Proto.DeliveryOrderReq>>({
|
|
|
ClientType: ClientType.Web,
|
|
|
@@ -92,8 +94,7 @@ const { data: deliveryRelation } = useRequest(queryDeliveryRelation, {
|
|
|
|
|
|
// 数量步长
|
|
|
const qtyStep = computed(() => {
|
|
|
- const quote = futuresStore.getGoodsQuote(props.goodsId)
|
|
|
- const { agreeunit = 1 } = quote.value ?? {}
|
|
|
+ const { agreeunit = 0 } = quote.value ?? {}
|
|
|
const { mindeliveryqty = 0, rratio1 = 0, rratio2 = 0 } = deliveryRelation.value ?? {}
|
|
|
if (rratio2 && rratio1) {
|
|
|
return agreeunit * mindeliveryqty * (rratio2 / rratio1)
|
|
|
@@ -120,9 +121,11 @@ const formRules: { [key: string]: FieldRule[] } = {
|
|
|
}
|
|
|
}],
|
|
|
DeliveryQty: [{
|
|
|
- message: '请输入交收数量',
|
|
|
validator: () => {
|
|
|
- return !!formData.DeliveryQty
|
|
|
+ if (formData.DeliveryQty) {
|
|
|
+ return formData.DeliveryQty % qtyStep.value === 0 ? true : '数量只能是' + qtyStep.value + '的整数倍'
|
|
|
+ }
|
|
|
+ return '请输入交收数量'
|
|
|
}
|
|
|
}],
|
|
|
}
|