Bladeren bron

修改套保品种

huangbin 4 jaren geleden
bovenliggende
commit
daaa72a884

+ 1 - 3
src/services/proto/delivery/index.ts

@@ -49,9 +49,7 @@ export const addDeliveryGoodsApply = (param: DeliveryGoodsApplyReq): Promise<any
  * 修改套保品种请求 ErmsMiddelGoodsEditReq 只能修改比率 但是其它参数也必须传
  */
 export const ermsMiddelGoodsEdit = (param: ErmsMiddelGoodsEditReq): Promise<any> => {
-
-    param.areauserid = APP.get('userInfo').MemberUserid // 机构用户id
-
+    param.areauserid = APP.get('userAccount').memberuserid // 机构用户id
     return new Promise((resolve, reject) => {
         const userid = getUserId()
         const req = {

+ 4 - 5
src/views/information/goods/components/hedgingModify/index.vue

@@ -94,7 +94,7 @@ export default defineComponent({
             formRef.value
                 .validate()
                 .then(() => {
-                    // const param = toRaw(formState);
+                    loading.value = true;
                     const { middlegoodsid, goodsunitid, relatedgoodsid, evaluateratio, qtydecimalplace, relatedgoodstype, goodsgroupid, remark } = props.selctedMG.mg;
                     const param: ErmsMiddelGoodsEditReq = {
                         middlegoodsid, // uint64 套保品种ID
@@ -111,15 +111,14 @@ export default defineComponent({
                     };
                     ermsMiddelGoodsEdit(param)
                         .then(() => {
+                            message.success('修改成功!');
                             cancel();
                             context.emit('refresh', true);
                         })
                         .catch((err) => {
-                            console.log('err', err);
-
                             message.error(err);
-                        });
-                    console.log('param', param);
+                        })
+                        .finally(() => (loading.value = false));
                 })
                 .catch((error: any) => {
                     console.log('error', error);