소스 검색

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP2.0_WEB into master

Administrator 4 년 전
부모
커밋
259600bdaf

+ 37 - 1
public/proto/mtp.proto

@@ -1006,6 +1006,7 @@ message HedgePlanOperateReq {
 	optional string ClientTicket = 7; // string 客户端流水号
 	optional HedgePlanInfo Info = 8; // HedgePlanInfo 套保计划信息
 }
+
 // 套保计划操作响应 0 18 3
 message HedgePlanOperateRsp {
 	optional MessageHead Header = 1; // MessageHead 消息头
@@ -1124,6 +1125,41 @@ message ERMCPAreaInOutStockApplyRsp {
 	optional uint64 InOutApplyID = 4; // uint64 申请ID
 }
 
+// 套保品种修改请求 0 29 133
+message ErmsMiddelGoodsEditReq {
+    optional MessageHead Header = 1; // MessageHead
+    optional uint64 middlegoodsid = 2; // uint64 套保品种ID
+    optional int32 goodsunitid = 3; // int32 单位ID
+    optional uint64 relatedgoodsid = 4; // uint64 关联交易商品ID
+    optional double evaluateratio = 5; // double 估价系数
+    optional int32 qtydecimalplace = 6; // int32 数量小数位
+    optional uint64 modifierid = 7; // uint64 修改人
+    optional int32 relatedgoodstype = 8; // int32 关联商品类型 - 1:期货合约 2:现货品种
+    optional double needhedgeratio = 9; // double 套保比率
+    optional uint64 areauserid = 10; // uint64 机构用户ID
+    optional uint64 goodsgroupid = 11; // uint64 关联期货品种ID
+    optional string remark = 12; // string 备注
+}
+// 套保品种修改响应 0 29 134
+message ErmsMiddelGoodsEditRsp {
+    optional MessageHead Header = 1; // MessageHead 消息头
+    optional int32 RetCode = 2; // int32 返回码
+    optional string RetDesc = 3; // string 描述信息
+    optional uint64 middlegoodsid = 4; // uint64 套保品种ID
+}
 
-
+// 现货品种停用请求 0 29 129
+message DeliveryGoodsCancelReq {
+    optional MessageHead Header = 1; // MessageHead
+    optional uint64 wrstandardid = 2; // uint64 现货商品ID
+    optional int32 isvalid = 3; // int32 是否有效 - 0:无效 1:有效
+}
+// 现货品种停用响应 0 29 130
+message DeliveryGoodsCancelRsp {
+    optional MessageHead Header = 1; // MessageHead 消息头
+    optional int32 RetCode = 2; // int32 返回码
+    optional string RetDesc = 3; // string 描述信息
+    optional uint64 wrstandardid = 4; // uint64 现货商品ID
+    optional uint64 deliverygoodsid = 5; // uint64 现货品种ID
+}
 

+ 25 - 8
src/assets/styles/mixin.less

@@ -419,13 +419,6 @@
 
         }
     }
-    .pl40 {
-        .ant-form-item-label {
-            label {
-                padding-left: 40px;
-            }
-        }
-    }
     .relative.ant-form-item {
         position: relative;
         // .itemTip {
@@ -436,6 +429,10 @@
             position: absolute;
             font-size: 14px;
             color: @m-grey1;
+            width: 100%;
+            div:nth-child(2){
+                margin-top: -10px;
+            }
         }
         .ant-form-item-control {
             width: 200px;
@@ -450,6 +447,13 @@
             margin: 0 auto;
         }
     }
+    .pl40.ant-form-item {
+        .ant-form-item-label {
+            label {
+                padding-left: 40px;
+            }
+        }
+    }
 }
 .ant-select-single {
     .ant-select-selector {
@@ -609,6 +613,12 @@
         cursor: pointer;
     }
 }
+.fl {
+    float: left;
+}
+.fr {
+    float: right;
+}
 .ml10 {
     margin-left: 10px;
 }
@@ -630,6 +640,9 @@
 .mt30 {
     margin-top: 30px;
 }
+.mb40 {
+    margin-bottom: 40px !important;
+}
 .grey {
     color: @m-grey2;
 }
@@ -1159,7 +1172,11 @@ select:-webkit-autofill,
 input:-internal-autofill-selected {
     background-color: @m-grey21 !important;
 }
-
+.login {
+    input:-webkit-autofill {
+        box-shadow: inset 0 0 0 1000px @m-white0;
+    }
+}
 .ant-checkbox-group.commonCheckboxGroup {
     .ant-checkbox-wrapper {
         color: @m-white0;

+ 1 - 0
src/layout/components/top.vue

@@ -66,6 +66,7 @@ export default defineComponent({
                 if (i === -1) {
                     // 切换左边菜单栏
                     name = value.code;
+                    index.value = ['0'];
                 } else {
                     // 切换右边上面tab 栏
                     index.value = [`${i}`];

+ 5 - 0
src/services/funcode/index.ts

@@ -109,4 +109,9 @@ export const funCode: Code = {
     // 库存审核 - 审核通过
     AreaInOutApplyAuditPassReq: 1179658,  /// 机构出入库申请审核通过请求(1179658)
     AreaInOutApplyAuditPassRsp: 1179659,  /// 机构出入库申请审核通过响应(1179659)
+
+    // 套保品种修改
+    ErmsMiddelGoodsEditReq: 1900677, // 套保品种修改请求
+    ErmsMiddelGoodsEditRsp: 1900678, // 套保品种修改响应
+
 };

+ 80 - 2
src/services/proto/delivery/index.ts

@@ -1,7 +1,11 @@
 import APP from "@/services";
 import { getSelectedAccountId, getUserId } from '@/services/bus/account';
 import { getLongTypeLoginID } from '@/services/bus/login';
-import { DeliveryGoodsApplyReq } from "@/services/proto/delivery/interface";
+import {
+    DeliveryGoodsApplyReq,
+    DeliveryGoodsCancelReq,
+    ErmsMiddelGoodsEditReq
+} from "@/services/proto/delivery/interface";
 import { buildProtoReq50, parseProtoRsp50 } from "@/services/socket/protobuf/buildReq";
 import { Callback } from "@/utils/websocket";
 
@@ -14,7 +18,7 @@ export const addDeliveryGoodsApply = (param: DeliveryGoodsApplyReq): Promise<any
         const req = {
             version: "3.2",
             userid: getUserId(),
-            loginid: getLongTypeLoginID() ,
+            loginid: getLongTypeLoginID(),
         };
         const params = {
             protobufName: 'DeliveryGoodsApplyReq',
@@ -39,4 +43,78 @@ export const addDeliveryGoodsApply = (param: DeliveryGoodsApplyReq): Promise<any
             onFail: (err) => reject(err.message),
         } as Callback);
     });
+}
+
+/**
+ * 修改套保品种请求 ErmsMiddelGoodsEditReq 只能修改比率 但是其它参数也必须传
+ */
+export const ermsMiddelGoodsEdit = (param: ErmsMiddelGoodsEditReq): Promise<any> => {
+    param.areauserid = APP.get('userAccount').memberuserid // 机构用户id
+    return new Promise((resolve, reject) => {
+        const userid = getUserId()
+        const req = {
+            version: "3.2",
+            userid,
+            loginid: getLongTypeLoginID(),
+        };
+        param.modifierid = userid
+        const params = {
+            protobufName: 'ErmsMiddelGoodsEditReq',
+            funCodeName: 'ErmsMiddelGoodsEditReq',
+            reqParams: Object.assign(req, param),
+            msgHeadParams: {
+                AccountID: getSelectedAccountId() === null ? 0 : getSelectedAccountId(),
+                MarketID: 18,   // 目前写死
+                GoodsID: 0, // 目前写死
+            }
+        };
+        const package50 = buildProtoReq50(params);
+        APP.sendTradingServer(package50, undefined, {
+            onSuccess: (res) => {
+                const { isSuccess, result } = parseProtoRsp50(res, 'ErmsMiddelGoodsEditRsp');
+                if (isSuccess) {
+                    resolve(result);
+                } else {
+                    reject(result);
+                }
+            },
+            onFail: (err) => reject(err.message),
+        } as Callback);
+    });
+}
+
+/**
+ * 现货品种停用请求
+ */
+export const deliveryGoodsCancel = (param: DeliveryGoodsCancelReq): Promise<any> => {
+
+    return new Promise((resolve, reject) => {
+        const req = {
+            version: "3.2",
+            userid: getUserId(),
+            loginid: getLongTypeLoginID(),
+        };
+        const params = {
+            protobufName: 'DeliveryGoodsCancelReq',
+            funCodeName: 'DeliveryGoodsCancelReq',
+            reqParams: Object.assign(req, param),
+            msgHeadParams: {
+                AccountID: getSelectedAccountId() === null ? 0 : getSelectedAccountId(),
+                MarketID: 18,   // 目前写死
+                GoodsID: 0, // 目前写死
+            }
+        };
+        const package50 = buildProtoReq50(params);
+        APP.sendTradingServer(package50, undefined, {
+            onSuccess: (res) => {
+                const { isSuccess, result } = parseProtoRsp50(res, 'DeliveryGoodsCancelRsp');
+                if (isSuccess) {
+                    resolve(result);
+                } else {
+                    reject(result);
+                }
+            },
+            onFail: (err) => reject(err.message),
+        } as Callback);
+    });
 }

+ 34 - 0
src/services/proto/delivery/interface.ts

@@ -31,4 +31,38 @@ export interface WRSConvertDetailEx {
     middlegoodsid: number // uint64 套保品种ID(接口为3.1及以下版本时传套保品种ID,否则传期货品种ID)
     unitid: number // uint64 单位ID
     convertratio: number // double 套保系数
+}
+
+// 套保品种修改请求 0 29 133
+export interface ErmsMiddelGoodsEditReq {
+    middlegoodsid: number; // uint64 套保品种ID
+    goodsunitid: number; // int32 单位ID
+    relatedgoodsid: number; // uint64 关联交易商品ID
+    evaluateratio: number; // double 估价系数
+    qtydecimalplace: number; // int32 数量小数位
+    modifierid?: number; // uint64 修改人
+    relatedgoodstype: number; // int32 关联商品类型 - 1:期货合约 2:现货品种
+    needhedgeratio: number; // double 套保比率
+    areauserid?: number; // uint64 机构用户ID
+    goodsgroupid: number; // uint64 关联期货品种ID
+    remark: string; // string 备注
+}
+// 套保品种修改响应 0 29 134
+export interface ErmsMiddelGoodsEditRsp {
+    RetCode: number; // int32 返回码
+    RetDesc: string; // string 描述信息
+    middlegoodsid: number; // uint64 套保品种ID
+}
+
+// 现货品种停用请求 0 29 129
+export interface DeliveryGoodsCancelReq {
+    wrstandardid: string; // uint64 现货商品ID
+    isvalid?: number; // int32 是否有效 - 0:无效 1:有效
+}
+// 现货品种停用响应 0 29 130
+export interface DeliveryGoodsCancelRsp {
+    RetCode: string; // int32 返回码
+    RetDesc: string; // string 描述信息
+    wrstandardid: number; // uint64 现货商品ID
+    deliverygoodsid: number; // uint64 现货品种ID
 }

+ 3 - 2
src/services/proto/hedgeplan/index.ts

@@ -1,7 +1,7 @@
 // 套保计划
 import APP from "@/services";
 import { getSelectedAccountId, getUserId } from "@/services/bus/account";
-import { ErmcpHedgePlanReq } from "@/services/proto/hedgeplan/interface";
+import {ErmcpHedgePlanReq, HedgePlanOperateReq} from "@/services/proto/hedgeplan/interface";
 import { buildProtoReq50, parseProtoRsp50 } from "@/services/socket/protobuf/buildReq";
 import { Callback } from "@/utils/websocket";
 import moment from "moment";
@@ -46,9 +46,10 @@ export const hedgePlanReq = (param: ErmcpHedgePlanReq): Promise<any> => {
  * 老的计划操作接口 我只负责撤销 传5则进行撤销 !!!!! 注意
  * @param param
  */
-export const oldHedgePlanReq = (param: any): Promise<any> => {
+export const oldHedgePlanReq = (param: HedgePlanOperateReq): Promise<any> => {
     param.OperateSrc = 2; // 操作来源-1:管理端2:终端
     param.ClientTicket = uuidv4(); // 流水号
+    param.Remark = ''
     param.UserID = getUserId()
     return new Promise((resolve, reject) => {
         const params = {

+ 41 - 59
src/views/business/purchase/components/invoice/index.vue

@@ -34,7 +34,7 @@
         </a-row>
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-item :label="selectedRow.contracttype===1? '采购方': '销售方'">
+            <a-form-item :label="'销售方'">
               <span class="white">{{ formatValue(selectedRow.accountname) }}</span>
             </a-form-item>
           </a-col>
@@ -44,97 +44,79 @@
             </a-form-item>
           </a-col>
         </a-row>
+      </a-form>
+    </fieldset>
+    <fieldset class="formFieldSet">
+      <legend>已登记信息</legend>
+      <a-form class="inlineForm">
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-item label="合同签署量">
-              <span class="white">{{ formatValue(selectedRow.qty + selectedRow.enumdicname) }}</span>
+            <a-form-item label="贷款总额">
+              <span class="white">499999000.00元</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
-            <a-form-item label="合同暂定价">
-              <span class="white">{{ formatValue(selectedRow.price) }}</span>
+            <a-form-item label="保证金">
+              <span class="white">1000000元</span>
             </a-form-item>
           </a-col>
-        </a-row>
-        <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-item label="点价合约">
-              <span class="white">{{ formatValue(selectedRow.goodsname) }}</span>
+            <a-form-item label="其他费用">
+              <span class="white">500.00元</span>
             </a-form-item>
           </a-col>
-        </a-row>
-      </a-form>
-    </fieldset>
-    <fieldset class="formFieldSet">
-      <legend>已登记信息</legend>
-      <a-form class="inlineForm">
-        <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-item label="已定价量">
-              <span class="white">{{ selectedRow.pricedqty + selectedRow.enumdicname }}</span>
+            <a-form-item label="合计总额">
+              <span class="white">505990500.00元</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
-            <a-form-item label="已点均价">
-              <span class="white">{{ formatValue(selectedRow.pricedavg) }}</span>
+            <a-form-item label="已支付额 ">
+              <span class="white">500.00元</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="已收票额">
+              <span class="white">505990500.00元</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-item label="预收票额">
+              <span class="white">--</span>
             </a-form-item>
           </a-col>
         </a-row>
       </a-form>
     </fieldset>
     <fieldset class="formFieldSet">
-      <legend>本次点价信息</legend>
+      <legend>本次发票信息</legend>
       <a-form class="inlineForm"
               ref="formRef"
               :model="formState"
               :rules="rules">
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-item label="点价价格"
+            <a-form-item label="收票金额"
+                         class="relative mb40"
                          name="PricedPrice">
-              <a-input-number class="dialogInput"
-                              style="width: 200px"
-                              v-model:value="formState.PricedPrice"
-                              :min="0"
-                              placeholder="请输入点价价格" />
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="升贴水">
-              <span class="white">{{ formatValue(selectedRow.pricemove) }}</span>
-            </a-form-item>
-          </a-col>
-        </a-row>
-
-        <a-row :gutter="24">
-          <a-col :span="12">
-            <a-form-item label="商品价格">
-              <span class="white">{{ Number(selectedRow.pricemove) + Number(formState.PricedPrice) }}</span>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="点价数量"
-                         name="PricedQty"
-                         class="relative">
-              <a-input-number class="dialogInput"
+              <a-input class="dialogInput"
                               style="width: 200px"
-                              v-model:value="formState.PricedQty"
-                              :min="0"
-                              :max="selectedRow.unpricedqty"
-                              placeholder="请输入点价数量" />
+                              suffix="元"
+                              placeholder="请输入收票金额" />
               <div class="tip">
-                <span>未定价量<span class="white">{{selectedRow.unpricedqty}}{{selectedRow.enumdicname}} </span></span>
-                <a class="blue ml10"
-                   @click="formState.PricedQty = selectedRow.unpricedqty"> 全部登记</a>
+                <div>应收票额:4090500.00元</div>
+                <div><a class="blue fr">全部登记</a></div>
               </div>
             </a-form-item>
           </a-col>
-        </a-row>
-
-        <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-item label="点价金额">
-              <span class="white">{{( Number(selectedRow.pricemove) + Number(formState.PricedPrice)) * formState.PricedQty }}</span>
+            <a-form-item label="发票附件" class="mb40">
+              <div class="upload">
+                <a-upload action="">
+                  <a-button class="uploadBtn">上传</a-button>
+                </a-upload>
+                <div class="look">查看附件</div>
+              </div>
             </a-form-item>
           </a-col>
         </a-row>

+ 1 - 1
src/views/business/purchase/components/someprice/index.vue

@@ -125,7 +125,7 @@
                               :min="0"
                               :max="selectedRow.unpricedqty"
                               placeholder="请输入点价数量" />
-              <div class="tip">
+              <div class="tip mt10">
                 <span>未定价量<span class="white">{{ selectedRow.unpricedqty }}{{ selectedRow.enumdicname }}</span> </span>
                 <a class="blue ml10"
                    @click="formState.PricedQty = selectedRow.unpricedqty"> 全部登记</a>

+ 1 - 1
src/views/business/purchase/components/storage/index.vue

@@ -79,7 +79,7 @@
                         style="width: 200px"
                         placeholder="请选择品类"
                         v-model:value="selectedRow.wrstandardid"
-                        disabled>
+                        readonly>
                   <a-select-option v-for="option in gmlist" :key="option.wrstandardid" :value="option.wrstandardid">{{option.wrstandardname}}</a-select-option>
               </a-select>
             </a-form-item>

+ 9 - 5
src/views/information/goods/components/disable/index.vue

@@ -1,7 +1,7 @@
 <template>
-  <!-- 停用客户资料-->
+  <!-- 停用现货品种-->
   <a-modal class="commonModal warehouse-disable"
-           title="停用客户资料"
+           title="停用现货品种"
            v-model:visible="visible"
            centered
            :maskClosable="maskClosableFlag"
@@ -117,27 +117,31 @@ import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
 import { formatValue } from '@/common/methods';
 import { getStatusName } from '@/views/information/custom/setup';
 import { Modal } from 'ant-design-vue';
+import { stopDeliveryGoods } from '@/views/information/goods/components/setup';
+import { ErmcpDeliveryGoodsDetailEx } from '@/services/go/ermcp/goodsInfo/interface';
 
 export default defineComponent({
     name: 'custom-disable',
     components: {},
     props: {
         selectedRow: {
-            type: Object as PropType<QueryCustomInfoType>,
+            type: Object as PropType<ErmcpDeliveryGoodsDetailEx>,
             default: {},
         },
     },
     setup(props) {
         const { visible, cancel } = closeModal('goods_info_spot_normal_disable');
         const maskClosableFlag = ref<boolean>(false);
-        const { loading, ModifyUserInfo } = updateUserAccount();
+        const loading = ref<boolean>(false);
         function submit() {
             Modal.confirm({
                 title: '是否确认停用客户资料',
                 okText: '确认停用',
                 cancelText: '取消',
                 onOk() {
-                    ModifyUserInfo(props.selectedRow.userid, 6);
+                    stopDeliveryGoods(props.selectedRow.data.deliverygoodsid.toString(), loading).then((res) => {
+                        cancel();
+                    });
                 },
                 onCancel() {
                     console.log('Cancel');

+ 3 - 1
src/views/information/goods/components/hedgingDetail/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <!-- 修改客户资料 -->
+  <!-- 套保品种详情 -->
   <a-modal class="commonModal modify-custom"
            title="详情"
            v-if="visible"
@@ -8,6 +8,8 @@
            :maskClosable="maskClosableFlag"
            @cancel="cancel"
            width="890px">
+
+
     <template #footer>
       <a-button key="submit"
                 type="primary"

+ 61 - 15
src/views/information/goods/components/hedgingModify/index.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 修改套保品种 -->
-  <a-modal class="commonModal modify-custom"
+  <a-modal class="commonModal fieldsetForm modify-custom"
            title="修改套保品种"
            v-if="visible"
            v-model:visible="visible"
@@ -23,24 +23,27 @@
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="套保品种名称">
-              <span>{{selctedMG.mg.middlegoodsname}}</span>
+              <span class="white">{{selctedMG.mg.middlegoodsname}}</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
             <a-form-item label="单位">
-              <span>{{getGoodsUnitEnumItemName(selctedMG.mg.goodsunitid)}}</span>
+              <span class="white">{{getGoodsUnitEnumItemName(selctedMG.mg.goodsunitid)}}</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
             <a-form-item label="当前套保比例">
-              <span>{{(selctedMG.mg.needhedgeratio * 100).toFixed(2)}}%</span>
+              <span class="white">{{(selctedMG.mg.needhedgeratio * 100).toFixed(2)}}%</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
-            <a-form-item label="修改后套保比例">
-              <a-input class="dialogInput"
-                       v-model:value="domain.wrstandardname"
-                       placeholder="请输入品类"></a-input>
+            <a-form-item label="修改后套保比例"
+                         name="needhedgeratio">
+              <a-input-number class="dialogInput"
+                              style="width: 200px"
+                              type="number"
+                              placeholder="请输入套保比例"
+                              v-model:value="formState.needhedgeratio" />
             </a-form-item>
           </a-col>
         </a-row>
@@ -50,7 +53,7 @@
         <a-row :gutter="24">
           <a-col :span="24">
             <a-form-item label="备注">
-              <span>{{selctedMG.mg.remark}}</span>
+              <span class="white">{{selctedMG.mg.remark}}</span>
             </a-form-item>
           </a-col>
         </a-row>
@@ -60,26 +63,66 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, PropType, ref } from 'vue';
+import { defineComponent, PropType, ref, toRaw } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import { initData } from '@/common/methods/index';
 import { initMG } from '../../list/hedging-variety/setup';
 import { Ermcp3MiddleGoodsDetail2 } from '@/services/go/ermcp/goodsInfo/interface';
 import { getGoodsUnitEnumItemName } from '@/common/constants/enumsName';
+import { handleForm } from './setup';
+import { ermsMiddelGoodsEdit } from '@/services/proto/delivery';
+import { message } from 'ant-design-vue';
+import { ErmsMiddelGoodsEditReq } from '@/services/proto/delivery/interface';
 
 export default defineComponent({
     name: 'modify-custom',
     components: {},
-    selctedMG: {
-        default: initMG,
-        type: Object as PropType<Ermcp3MiddleGoodsDetail2>,
+    props: {
+        selctedMG: {
+            default: initMG,
+            type: Object as PropType<Ermcp3MiddleGoodsDetail2>,
+        },
     },
-    setup() {
+
+    setup(props, context) {
         const { visible, cancel } = closeModal('goods_info_hedge_normal_modify');
 
+        const { rules, formState, formRef } = handleForm();
+
         const loading = ref<boolean>(false);
         function submit() {
-            cancel();
+            formRef.value
+                .validate()
+                .then(() => {
+                    loading.value = true;
+                    const { middlegoodsid, goodsunitid, relatedgoodsid, evaluateratio, qtydecimalplace, relatedgoodstype, goodsgroupid, remark } = props.selctedMG.mg;
+                    const param: ErmsMiddelGoodsEditReq = {
+                        middlegoodsid, // uint64 套保品种ID
+                        goodsunitid, // int32 单位ID
+                        relatedgoodsid, // uint64 关联交易商品ID
+                        evaluateratio, // double 估价系数
+                        qtydecimalplace, // int32 数量小数位
+                        // modifierid,// uint64 修改人
+                        relatedgoodstype, // int32 关联商品类型 - 1:期货合约 2:现货品种
+                        needhedgeratio: formState.needhedgeratio as number, // double 套保比率
+                        // areauserid?,// uint64 机构用户ID
+                        goodsgroupid, // uint64 关联期货品种ID
+                        remark, // string 备注
+                    };
+                    ermsMiddelGoodsEdit(param)
+                        .then(() => {
+                            message.success('修改成功!');
+                            cancel();
+                            context.emit('refresh', true);
+                        })
+                        .catch((err) => {
+                            message.error(err);
+                        })
+                        .finally(() => (loading.value = false));
+                })
+                .catch((error: any) => {
+                    console.log('error', error);
+                });
         }
         initData(() => {});
         return {
@@ -89,6 +132,9 @@ export default defineComponent({
             loading,
             maskClosableFlag: false,
             getGoodsUnitEnumItemName,
+            rules,
+            formState,
+            formRef,
         };
     },
 });

+ 24 - 0
src/views/information/goods/components/hedgingModify/setup.ts

@@ -0,0 +1,24 @@
+import { ermsMiddelGoodsEdit } from "@/services/proto/delivery";
+import { ErmsMiddelGoodsEditReq } from "@/services/proto/delivery/interface";
+import { reactive, ref, UnwrapRef } from "vue";
+/**
+ * 表单
+ * @returns 
+ */
+export function handleForm() {
+    interface FormState {
+        needhedgeratio: number | null
+    }
+    const formRef = ref();
+    const formState: UnwrapRef<FormState> = reactive({
+        needhedgeratio: null,
+    })
+    const rules = {
+        needhedgeratio: [{ required: true, message: '请输入套保比例', trigger: 'blur', type: 'number' }],
+    }
+    return { rules, formState, formRef }
+}
+
+export function modifyAction(param: ErmsMiddelGoodsEditReq) {
+    ermsMiddelGoodsEdit(param)
+}

+ 2 - 0
src/views/information/goods/components/modify/index.vue

@@ -124,6 +124,7 @@
               <a-form-item :name="['gldwrstandards',index,'convertfactor']"
                            :rules="rules.gldwrstandards.convertfactor">
                 <a-input-number class="dialogInput"
+                                style="width: 200px"
                                 v-model:value="domain.convertfactor"
                                 placeholder="请输入标仓系数"></a-input-number>
               </a-form-item>
@@ -246,6 +247,7 @@
               <a-form-item :name="['wrsconvertdetails', index, 'convertratio']"
                            :rules="rules.wrsconvertdetails.convertratio">
                 <a-input-number class="dialogInput"
+                                style="width: 200px"
                                 v-model:value="domain.convertratio"
                                 placeholder="请输入套保系数"></a-input-number>
               </a-form-item>

+ 6 - 5
src/views/information/goods/components/rightHedging/index.vue

@@ -10,8 +10,8 @@
           {{selctedMG.mg.middlegoodsname}}({{getGoodsUnitEnumItemName(selctedMG.mg.goodsunitid)}})
         </span>
         <span class="green ml10">{{selctedMG.mg.isvalid ? '正常' : '停用'}}</span>
-        <span>套保比例{{(selctedMG.mg.needhedgeratio * 100).toFixed(2)}}%</span>
-        <span>套利比例100%</span>
+        <span class="green ml10">套保比例{{(selctedMG.mg.needhedgeratio * 100).toFixed(2)}}%</span>
+        <span class="green ml10">套利比例100%</span>
       </div>
       <div class="tltBtns">
         <template v-if="isNormal">
@@ -134,13 +134,14 @@
         </a-collapse-panel>
       </a-collapse>
     </div>
-    <HedgingDetail @selctedMG="selctedMG" />
-    <HedgingModify @selctedMG="selctedMG" />
+    <HedgingDetail :selctedMG="selctedMG" />
+    <HedgingModify :selctedMG="selctedMG" />
+
   </div>
 </template>
 
 <script lang="ts">
-import { defineComponent, PropType } from 'vue';
+import { defineComponent, PropType, reactive } from 'vue';
 import { initMG } from '@/views/information/goods/list/hedging-variety/setup';
 import { Ermcp3MiddleGoodsDetail2 } from '@/services/go/ermcp/goodsInfo/interface';
 import { initData } from '@/common/methods';

+ 1 - 1
src/views/information/goods/components/rightSpot/index.vue

@@ -113,7 +113,7 @@
       </a-collapse>
     </div>
     <Modify :selctedDeliveryGoods="selctedDeliveryGoods" />
-    <Disable />
+    <Disable :selectedRow="selctedDeliveryGoods" />
     <SpotDetail />
   </div>
 </template>

+ 41 - 0
src/views/information/goods/components/setup.ts

@@ -0,0 +1,41 @@
+import {DeliveryGoodsSign} from "@/views/information/goods/setup";
+import {commonResultInfo, getRequestResultInfo} from "@/common/methods/request";
+import {hedgePlanReq} from "@/services/proto/hedgeplan";
+import {deliveryGoodsCancel} from "@/services/proto/delivery";
+import {DeliveryGoodsCancelReq} from "@/services/proto/delivery/interface";
+import {Ref} from "vue";
+
+/**
+ * 现货品种停用请求
+ * @param req
+ * @param loading
+ */
+export function stopDeliveryGoods(wrstandardid: string, loading: Ref<boolean>) :Promise<string>{
+    const sign = getRequestResultInfo(DeliveryGoodsSign, 0)  // 接口请求后的返回提示 这里统一进行管理
+    const result = deliveryGoodsCancel(reqDeliveryGoodsBuilder(wrstandardid, 0))
+    return commonResultInfo(result, sign, loading)
+}
+
+/**
+ * 现货品种恢复请求
+ * @param req
+ * @param loading
+ */
+export function resumeDeliveryGoods(wrstandardid: string, loading: Ref<boolean>) :Promise<string>{
+    const sign = getRequestResultInfo(DeliveryGoodsSign, 1)  // 接口请求后的返回提示 这里统一进行管理
+    const result = deliveryGoodsCancel(reqDeliveryGoodsBuilder(wrstandardid, 1))
+    return commonResultInfo(result, sign, loading)
+}
+
+
+/**
+ * 这里组装请求
+ * @param wrstandardid
+ * @param type 0: 停用 1: 恢复
+ */
+export function reqDeliveryGoodsBuilder(wrstandardid: string, type: number) :DeliveryGoodsCancelReq{
+    return {
+        wrstandardid: wrstandardid,
+        isvalid: type
+    } as DeliveryGoodsCancelReq
+}

+ 1 - 1
src/views/information/goods/components/spotDetail/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <!-- 修改客户资料 -->
+  <!-- 现货品种详情 -->
   <a-modal class="commonModal modify-custom"
            title="详情"
            v-if="visible"

+ 1 - 3
src/views/information/goods/list/hedging-variety/index.vue

@@ -37,15 +37,13 @@ export default defineComponent({
         AddGoods,
     },
     setup() {
-        // 控制弹窗
-        const { openAction: addAction } = openModal('goods_info_hedge_normal_modify');
         const { loading, menuList, isNormal, selctedMG, queryMG, chooseDG } = handleMG();
 
         initData(() => {
             // 加载数据在这里
             queryMG();
         });
-        return { addAction, loading, selctedMG, chooseDG, isNormal, menuList };
+        return { loading, selctedMG, chooseDG, isNormal, menuList };
     },
 });
 </script>

+ 10 - 0
src/views/information/goods/setup.ts

@@ -1,6 +1,7 @@
 import { getThirdMenuData } from '@/common/setup/table/button';
 import { MenuList } from '@/services/go/ermcp/goodsInfo/interface';
 import { Ref, ref } from 'vue';
+import {ResultInfo} from "@/common/methods/request";
 
 interface MenuType {
     menuList: Ref<MenuList[]>;
@@ -25,3 +26,12 @@ export function getInitMenuData(code: 'goods_info_spot' | 'goods_info_hedge'): M
     return { menuList, menuMap }
 }
 
+
+
+/************** 接口请求相关提示 ****************/
+
+// 停用提示
+export const DeliveryGoodsSign = new Map<number, ResultInfo>([
+    [0, ['停用现货品种成功', '停用现货品种失败:']],
+    [1, ['恢复现货品种成功', '恢复现货品种失败:']],
+])