huangbin преди 4 години
родител
ревизия
04b5e6ea50

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

@@ -391,7 +391,7 @@ export default defineComponent({
                 // 品类
                 formState.gldwrstandards = gmlist.map((e) => {
                     const { wrstandardid, wrstandardname, convertfactor, unitid } = e;
-                    return { wrstandardid, wrstandardname, convertfactor, unitid };
+                    return { wrstandardid, wrstandardname, convertfactor: convertfactor.toString(), unitid };
                 });
                 // 品牌
                 formState.glddgfactoryItems = gblist.map((e) => {
@@ -401,7 +401,7 @@ export default defineComponent({
                 // 套保信息
                 formState.wrsconvertdetails = mgList.map((e) => {
                     const { goodsgroupid, goodsunitid, enumdicname } = e.mg;
-                    return { middlegoodsid: goodsgroupid, unitid: goodsunitid, unitidName: enumdicname, convertratio: e.convertratio };
+                    return { middlegoodsid: goodsgroupid, unitid: goodsunitid, unitidName: enumdicname, convertratio: e.convertratio.toString() };
                 });
             }
         });

+ 2 - 2
src/views/information/goods/components/modify/interface.ts

@@ -2,7 +2,7 @@ export interface GLDWRStandardEx {
     wrstandardid?: number // uint64 型号ID(修改时有值)
     wrstandardname: string // string 型号名称
     unitid: number | undefined// uint64 单位ID
-    convertfactor: number | null// double 标仓系数(接口为3.1及以上版本时传)
+    convertfactor: string// double 标仓系数(接口为3.1及以上版本时传)
 }
 
 // 现货商品品牌数据 0 29 173
@@ -16,7 +16,7 @@ export interface WRSConvertDetailEx {
     middlegoodsid: number | undefined // uint64 套保品种ID(接口为3.1及以下版本时传套保品种ID,否则传期货品种ID)
     unitid: number | null// uint64 单位ID
     unitidName: string;
-    convertratio: number | null// double 套保系数
+    convertratio: string// double 套保系数
 }
 export interface FormState {
     deliverygoodscode?: string // string 交割商品代码(新增时有值)

+ 4 - 4
src/views/information/goods/components/modify/setup.ts

@@ -66,13 +66,13 @@ export function handleFromState() {
         type: 1,// int32 类型 1 新增 2 修改
         remark: '', // string 备注
         gldwrstandards: [
-            { wrstandardname: '', unitid: undefined, convertfactor: null, }
+            { wrstandardname: '', unitid: undefined, convertfactor: '', }
         ], //        GLDWRStandardEx 现货商品型号数据
         glddgfactoryItems: [
             { dgfactoryitemvalue: '', }
         ], //   GLDDGFactoryItemEx 现货商品品牌数据
         wrsconvertdetails: [
-            { middlegoodsid: undefined, unitid: null, unitidName: '', convertratio: null, }
+            { middlegoodsid: undefined, unitid: null, unitidName: '', convertratio: '', }
         ], // WRSConvertDetailEx 现货商品折算配置明细数据
     });
     type Key = 'gldwrstandards' | 'glddgfactoryItems' | 'wrsconvertdetails'
@@ -82,11 +82,11 @@ export function handleFromState() {
      */
     function addOne(key: Key): void {
         if (key === 'gldwrstandards') {
-            formState[key].push({ wrstandardname: '', unitid: undefined, convertfactor: null })
+            formState[key].push({ wrstandardname: '', unitid: undefined, convertfactor: '' })
         } else if (key === 'glddgfactoryItems') {
             formState[key].push({ dgfactoryitemvalue: '', })
         } else if (key === 'wrsconvertdetails') {
-            formState[key].push({ middlegoodsid: undefined, unitid: null, unitidName: '', convertratio: null, })
+            formState[key].push({ middlegoodsid: undefined, unitid: null, unitidName: '', convertratio: '', })
         }
     }
     /**