|
@@ -3526,68 +3526,85 @@ export const useHooks = (t?: any) => {
|
|
|
{
|
|
|
field: "dannum_cost1",
|
|
|
render: (scope: any) => {
|
|
|
- if (scope.row.moneyrate > 1) {
|
|
|
- return (
|
|
|
- <div>
|
|
|
- <span class="text-f-s" style="color: var(--lj-color-gray-7)">
|
|
|
- $
|
|
|
- </span>
|
|
|
- {formatAmount3({ val: floatDiv(scope.row.dannum_cost1, scope.row.moneyrate) })}
|
|
|
- </div>
|
|
|
- );
|
|
|
+ if (scope.row.dannum_cost1) {
|
|
|
+ if (scope.row.moneyrate > 1) {
|
|
|
+ return (
|
|
|
+ <div>
|
|
|
+ <span class="text-f-s" style="color: var(--lj-color-gray-7)">
|
|
|
+ $
|
|
|
+ </span>
|
|
|
+ {formatAmount3({ val: floatDiv(scope.row.dannum_cost1, scope.row.moneyrate) })}
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ return formatAmount3({ val: scope.row.dannum_cost1 });
|
|
|
+ }
|
|
|
} else {
|
|
|
- return formatAmount3({ val: scope.row.dannum_cost1 });
|
|
|
+ return scope.row.dannum_cost1;
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
field: "dannum_cost2",
|
|
|
render: (scope: any) => {
|
|
|
- if (scope.row.moneyrate > 1) {
|
|
|
- return (
|
|
|
- <div>
|
|
|
- <span class="text-f-s" style="color: var(--lj-color-gray-7)">
|
|
|
- $
|
|
|
- </span>
|
|
|
- {formatAmount3({ val: floatDiv(scope.row.dannum_cost2, scope.row.moneyrate) })}
|
|
|
- </div>
|
|
|
- );
|
|
|
+ if (scope.row.dannum_cost2) {
|
|
|
+ if (scope.row.moneyrate > 1) {
|
|
|
+ return (
|
|
|
+ <div>
|
|
|
+ <span class="text-f-s" style="color: var(--lj-color-gray-7)">
|
|
|
+ $
|
|
|
+ </span>
|
|
|
+ {formatAmount3({ val: floatDiv(scope.row.dannum_cost2, scope.row.moneyrate) })}
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ return formatAmount3({ val: scope.row.dannum_cost2 });
|
|
|
+ }
|
|
|
} else {
|
|
|
- return formatAmount3({ val: scope.row.dannum_cost2 });
|
|
|
+ return scope.row.dannum_cost2;
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
field: "dannum_cost3",
|
|
|
render: (scope: any) => {
|
|
|
- if (scope.row.moneyrate > 1) {
|
|
|
- return (
|
|
|
- <div>
|
|
|
- <span class="text-f-s" style="color: var(--lj-color-gray-7)">
|
|
|
- $
|
|
|
- </span>
|
|
|
- {formatAmount3({ val: floatDiv(scope.row.dannum_cost3, scope.row.moneyrate) })}
|
|
|
- </div>
|
|
|
- );
|
|
|
+ if (scope.row.dannum_cost3) {
|
|
|
+ if (scope.row.moneyrate > 1) {
|
|
|
+ return (
|
|
|
+ <div>
|
|
|
+ <span class="text-f-s" style="color: var(--lj-color-gray-7)">
|
|
|
+ $
|
|
|
+ </span>
|
|
|
+ {formatAmount3({ val: floatDiv(scope.row.dannum_cost3, scope.row.moneyrate) })}
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ return formatAmount3({ val: scope.row.dannum_cost3 });
|
|
|
+ }
|
|
|
} else {
|
|
|
- return formatAmount3({ val: scope.row.dannum_cost3 });
|
|
|
+ return scope.row.dannum_cost3;
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
field: "dannum_cost4",
|
|
|
render: (scope: any) => {
|
|
|
- if (scope.row.moneyrate > 1) {
|
|
|
- return (
|
|
|
- <div>
|
|
|
- <span class="text-f-s" style="color: var(--lj-color-gray-7)">
|
|
|
- $
|
|
|
- </span>
|
|
|
- {formatAmount3({ val: floatDiv(scope.row.dannum_cost4, scope.row.moneyrate) })}
|
|
|
- </div>
|
|
|
- );
|
|
|
+ console.log("scope.row.moneyrate :>> ", scope);
|
|
|
+ if (scope.row.dannum_cost4) {
|
|
|
+ if (scope.row.moneyrate > 1) {
|
|
|
+ return (
|
|
|
+ <div>
|
|
|
+ <span class="text-f-s" style="color: var(--lj-color-gray-7)">
|
|
|
+ $
|
|
|
+ </span>
|
|
|
+ {formatAmount3({ val: floatDiv(scope.row.dannum_cost4, scope.row.moneyrate) })}
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ return formatAmount3({ val: scope.row.dannum_cost4 });
|
|
|
+ }
|
|
|
} else {
|
|
|
- return formatAmount3({ val: scope.row.dannum_cost4 });
|
|
|
+ return scope.row.dannum_cost4;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -4499,6 +4516,7 @@ export const useHooks = (t?: any) => {
|
|
|
// return <></>;
|
|
|
}
|
|
|
|
|
|
+ console.log("垫层 row.formulakind :>> ", row.formulakind, _mtrltypeItem);
|
|
|
let params = {
|
|
|
mtrltype: _mtrltypeItem?.value,
|
|
|
pricelistid: _pricelistid
|