Explorar o código

Merge remote-tracking branch 'origin/master'

yu jie %!s(int64=4) %!d(string=hai) anos
pai
achega
2c3574ba29

+ 20 - 10
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_order_summary/components/listed/index.vue

@@ -56,17 +56,20 @@
                 <a-input-number class="dialogInput"
                                 style="width: 140px"
                                 :min="0"
-                                :suffix="selectedRow.enumdicname"
                                 v-model:value="formState.OrderQty"
                                 placeholder="请输入挂牌数量" />
+                <span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
               </a-form-item>
             </a-col>
             <a-col :span="12">
               <a-form-item label="起摘数量"
-                           class="relative">
-                <a-input class="commonInput"
-                         :suffix="selectedRow.enumdicname"
-                         style="width: 140px" />
+                           class="relative"
+                           name="DelistMinQty">
+                <a-input-number class="commonInput"
+                                :min="0"
+                                v-model:value="formState.DelistMinQty"
+                                style="width: 140px" />
+                <span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
                 <div class="tip">最小单位:1{{selectedRow.enumdicname}}</div>
               </a-form-item>
             </a-col>
@@ -112,7 +115,7 @@
                           placeholder="请择交易所">
                                 </a-select>-->
                 <a-select class="inlineFormSelect ml5"
-                          @change="groupsChange"
+                          @change="handleGoodsGroups"
                           style="width: 135px"
                           v-model:value="formState.goodsgroupid"
                           placeholder="请选择商品">
@@ -124,6 +127,7 @@
                 <a-select class="inlineFormSelect ml5"
                           style="width: 135px"
                           v-model:value="formState.goodsid"
+                          @change="handleGoodsChange"
                           placeholder="请选择合约">
                   <a-select-option v-for="item in goodsList"
                                    :value="item.goodsid"
@@ -186,12 +190,17 @@ export default defineComponent({
     },
     setup(props, context) {
         const { visible, cancel } = _closeModal(context);
-        console.log('selectedRow', props.selectedRow);
         const { rules, formState, formRef } = handlePasswordForm(props.selectedRow);
         const data = props.selectedRow;
         const loading = ref<boolean>(false);
         const { goodsGroup, goodsList, groupsChange, findGoodsCode } = handleGoods();
-
+        function handleGoodsGroups(value: number) {
+            groupsChange(value);
+            formRef.value.validate();
+        }
+        function handleGoodsChange() {
+            formRef.value.validate();
+        }
         function submit() {
             const marketInfo = getMarketRunByTradeMode(17);
             if (marketInfo) {
@@ -244,8 +253,8 @@ export default defineComponent({
                         wrstandardid: props.selectedRow.wrstandardid,
                         DeliveryMonth: moment(res.DeliveryMonth).format('YYYY-MM'), // string 交收月
                         HasWr: 0, // 0 无仓单  1: 有仓单
+                        DelistMinQty: res.DelistMinQty, // 起摘数量
                     };
-                    console.log(param);
                     requestResultLoadingAndInfo(hdWROrder, param, loading, ['挂牌成功', '挂牌失败:']).then(() => {
                         Bus.$emit('spotTrade', true);
                         cancel(true);
@@ -264,7 +273,8 @@ export default defineComponent({
             formRef,
             goodsGroup,
             goodsList,
-            groupsChange,
+            handleGoodsGroups,
+            handleGoodsChange,
         };
     },
 });

+ 1 - 0
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_order_summary/components/listed/interface.ts

@@ -2,6 +2,7 @@ export interface ListingForm {
     WRPriceType: 1 | 2,// 价格方式 1:固定价 2:浮动价
     FixedPrice: number, // 固定价格
     OrderQty: number,
+    DelistMinQty: number,
     PriceMove: number,// 升贴水(浮动价时填写)
     goodsgroupid: number | undefined,
     goodsid: number | undefined,

+ 2 - 0
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_order_summary/components/listed/setup.ts

@@ -13,6 +13,7 @@ export function handlePasswordForm(data: WrPosition) {
         WRPriceType: 1,
         FixedPrice: 0,
         OrderQty: 0,
+        DelistMinQty: 0,
         PriceMove: 1,
         goodsgroupid: undefined,
         goodsid: undefined,
@@ -40,6 +41,7 @@ export function handlePasswordForm(data: WrPosition) {
         FixedPrice: [{ required: true, message: '请输入挂牌价格', trigger: 'blur', type: 'number', min: 1, }],
         OrderQty: [{ required: true, validator: v_num, trigger: 'blur', type: 'number' }],
         PriceMove: [{ required: true, message: '请输入基差', trigger: 'blur', type: 'number', min: 1 }],
+        DelistMinQty: [{ required: true, message: '请输入起摘数量', trigger: 'blur', type: 'number', min: 0, }],
         DeliveryMonth: [{ required: true, message: '请选择交收月', }],
         goodsid: [{ required: true, validator: v_group }],
 

+ 20 - 10
src/views/order/spot_warran/components/spot_warrant_spot_details/components/listing/index.vue

@@ -57,18 +57,20 @@
                 <a-input-number class="dialogInput"
                                 style="width: 140px"
                                 :min="0"
-                                :suffix="selectedRow.enumdicname"
                                 v-model:value="formState.OrderQty"
                                 placeholder="请输入挂牌数量" />
+                <span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
               </a-form-item>
             </a-col>
             <a-col :span="12">
               <a-form-item label="起摘数量"
-                           class="relative">
-                <a-input class="commonInput"
-                         :min="0"
-                         :suffix="selectedRow.enumdicname"
-                         style="width: 140px" />
+                           class="relative"
+                           name="DelistMinQty">
+                <a-input-number class="commonInput"
+                                :min="0"
+                                v-model:value="formState.DelistMinQty"
+                                style="width: 140px" />
+                <span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
                 <div class="tip">最小单位:1{{selectedRow.enumdicname}}</div>
               </a-form-item>
             </a-col>
@@ -99,7 +101,7 @@
                           placeholder="请择交易所">
                                 </a-select>-->
                 <a-select class="inlineFormSelect ml5"
-                          @change="groupsChange"
+                          @change="handleGoodsGroups"
                           style="width: 135px"
                           v-model:value="formState.goodsgroupid"
                           placeholder="请选择商品">
@@ -110,6 +112,7 @@
                 </a-select>
                 <a-select class="inlineFormSelect ml5"
                           style="width: 135px"
+                          @change="handleGoodsChange"
                           v-model:value="formState.goodsid"
                           placeholder="请选择合约">
                   <a-select-option v-for="item in goodsList"
@@ -174,11 +177,17 @@ export default defineComponent({
     },
     setup(props, context) {
         const { visible, cancel } = _closeModal(context);
-        console.log('selectedRow', props.selectedRow);
         const { rules, formState, formRef } = handleForm(props.selectedRow);
         const data = props.selectedRow;
         const loading = ref<boolean>(false);
         const { goodsGroup, goodsList, groupsChange, findGoodsCode } = handleGoods();
+        function handleGoodsGroups(value: number) {
+            groupsChange(value);
+            formRef.value.validate();
+        }
+        function handleGoodsChange() {
+            formRef.value.validate();
+        }
         function submit() {
             const marketInfo = getMarketRunByTradeMode(17);
             if (marketInfo) {
@@ -232,8 +241,8 @@ export default defineComponent({
                         WRTradeGoods: [wrGoodsInfo],
                         wrstandardid: props.selectedRow.wrstandardid,
                         HasWr: 1,
+                        DelistMinQty: res.DelistMinQty, // 起摘数量
                     };
-                    console.log(param);
                     requestResultLoadingAndInfo(hdWROrder, param, loading, ['挂牌成功', '挂牌失败:']).then(() => {
                         Bus.$emit('spotTrade', true);
                         cancel(true);
@@ -254,7 +263,8 @@ export default defineComponent({
             formRef,
             goodsGroup,
             goodsList,
-            groupsChange,
+            handleGoodsGroups,
+            handleGoodsChange,
         };
     },
 });

+ 1 - 0
src/views/order/spot_warran/components/spot_warrant_spot_details/components/listing/interface.ts

@@ -2,6 +2,7 @@ export interface ListingForm {
     WRPriceType: 1 | 2,// 价格方式 1:固定价 2:浮动价
     FixedPrice: number, // 固定价格
     OrderQty: number,
+    DelistMinQty: number,
     PriceMove: number,// 升贴水(浮动价时填写)
     goodsgroupid: number | undefined,
     goodsid: number | undefined,

+ 3 - 1
src/views/order/spot_warran/components/spot_warrant_spot_details/components/listing/setup.ts

@@ -13,6 +13,7 @@ export function handleForm(data: WrHoldLB) {
         WRPriceType: 1,
         FixedPrice: 0,
         OrderQty: 0,
+        DelistMinQty: 0,
         PriceMove: 1,
         goodsgroupid: undefined,
         goodsid: undefined,
@@ -38,9 +39,10 @@ export function handleForm(data: WrHoldLB) {
 
     const rules = {
         FixedPrice: [{ required: true, message: '请输入挂牌价格', trigger: 'blur', type: 'number', min: 1, }],
+        DelistMinQty: [{ required: true, message: '请输入起摘数量', trigger: 'blur', type: 'number', min: 0, }],
         OrderQty: [{ required: true, validator: v_num, trigger: 'blur', type: 'number' }],
         PriceMove: [{ required: true, message: '请输入升贴水', trigger: 'blur', type: 'number', }],
-        goodsid: [{ required: true, validator: v_group }],
+        goodsid: [{ required: true, validator: v_group, }],
     }
     return { rules, formState, formRef }
 }

+ 1 - 1
src/views/order/spot_warran/components/spot_warrant_spot_details/components/pick_up/index.vue

@@ -24,8 +24,8 @@
                                 v-model:value="formState.OutQty"
                                 :min="0"
                                 :max="selectedRow.enableqty"
-                                :suffix="selectedRow.enumdicname"
                                 style="width: 140px" />
+                <span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
               </a-form-item>
             </a-col>
             <a-col :span="12">