Browse Source

JLHWEB: 修复床垫报价,大侧选择后报错问题

JohnnyChan 2 days ago
parent
commit
8d9c885447

+ 4 - 4
JLHWEB/src/views/quote/mattressQuote/components/Statistic.vue

@@ -1,8 +1,8 @@
 <template>
-  <div style="display: table" @click="handleClick">
+  <div style="display: table">
     <el-row class="statistic-row h-full" :gutter="8" style="width: 180px" :class="{ 'is-admin': userInfo.usermode === 0 }">
       <el-col :span="24" v-for="(item, index) in statisticData" :key="index">
-        <StatisticItem :data="item" v-bind="$attrs" :iforigin="props.iforigin" />
+        <StatisticItem :data="item" v-bind="$attrs" :iforigin="props.iforigin" @click="handleClick(item)" />
       </el-col>
     </el-row>
   </div>
@@ -165,9 +165,9 @@ watch(
   { immediate: true, deep: true }
 );
 
-const handleClick = () => {
+const handleClick = (item: any) => {
   if (userInfo.usermode === 0) {
-    emit("click");
+    emit("click", item);
   }
 };
 </script>

+ 2 - 2
JLHWEB/src/views/quote/mattressQuote/detail.vue

@@ -1593,9 +1593,9 @@ const getData = (params: any) => {
   // return [];
 };
 
-const gotoShowFormula = () => {
+const gotoShowFormula = (data: any) => {
   AllFormulaRef.value.open({
-    dannum_type: LjDetailRef.value._mainData.dannum_type,
+    dannum_type: data.type,
     formula: cmpFormulas.value,
     replace: cmpFormulaReplace.value,
     formula_ori: cmpFormulasOri.value,

+ 2 - 0
JLHWEB/src/views/quote/mattressQuote/hooks/index.tsx

@@ -1427,6 +1427,7 @@ export const useHooks = (t?: any) => {
               formulaid: itm.formulaid,
               sortcode: data.label,
               chastr: data.label,
+              costamt: 0,
               formulakind: Number(itm.formulakind),
               formula: itm.formula,
               useformula: itm.useformula,
@@ -1450,6 +1451,7 @@ export const useHooks = (t?: any) => {
             formulaid: itm.formulaid,
             sortcode: data.label,
             chastr: data.label,
+            costamt: 0,
             formulakind: Number(itm.formulakind),
             formula: itm.formula,
             useformula: itm.useformula,