Просмотр исходного кода

JLHWEB: 1、历史报价新增字段,及其样式

JohnnyChan 1 неделя назад
Родитель
Сommit
e7011fe6c9

+ 44 - 4
JLHWEB/src/components/ToastWidget/HistoryPrice/components/Item.vue

@@ -24,7 +24,7 @@
           {{ isFilterTime(item.cmpdate) }}
         </span>
       </header>
-      <section class="flx-justify-between mt-4">
+      <section class="flx-justify-between mt-4" style="align-items: flex-start">
         <!-- <div style="margin: auto; margin-top: 0">
           <AvatarIcon size="small" :username="item.empname"></AvatarIcon>
         </div> -->
@@ -52,24 +52,64 @@
           <span class="text-h5-b text-primary-text">
             {{ isFilterPrice(item?.dannum_cost1) }}
           </span>
+          <div class="text-f-c text-disable">不含税出厂价</div>
+          <span class="text-h5-b text-primary-text">
+            {{ isFilterPrice(item?.dijia_cost1) }}
+          </span>
         </div>
         <div class="oa-flow-item__right-content-title flx-col flx-center">
           <div class="text-f-c text-disable">小单金额</div>
           <span class="text-h5-b text-primary-text">
             {{ isFilterPrice(item?.dannum_cost4) }}
           </span>
+          <div class="text-f-c text-disable">不含税出厂价</div>
+          <span class="text-h5-b text-primary-text">
+            {{ isFilterPrice(item?.dijia_cost4) }}
+          </span>
         </div>
         <div class="oa-flow-item__right-content-title flx-col flx-center">
           <div class="text-f-c text-disable">标准金额</div>
           <span class="text-h5-b text-primary-text">
             {{ isFilterPrice(item?.dannum_cost2) }}
           </span>
+          <div class="text-f-c text-disable">不含税出厂价</div>
+          <span class="text-h5-b text-primary-text">
+            {{ isFilterPrice(item?.dijia_cost2) }}
+          </span>
         </div>
         <div class="oa-flow-item__right-content-title flx-col flx-center">
           <div class="text-f-c text-disable">大单金额</div>
           <span class="text-h5-b text-primary-text">
             {{ isFilterPrice(item?.dannum_cost3) }}
           </span>
+          <div class="text-f-c text-disable">不含税出厂价</div>
+          <span class="text-h5-b text-primary-text">
+            {{ isFilterPrice(item?.dijia_cost3) }}
+          </span>
+        </div>
+        <div class="oa-flow-item__right-content-title flx-col flx-center">
+          <div class="text-f-c text-disable">FOB费</div>
+          <span class="text-h5-b text-primary-text">
+            {{ isFilterPrice(item?.dannum_cost1) }}
+          </span>
+        </div>
+        <div class="oa-flow-item__right-content-title flx-col flx-center">
+          <div class="text-f-c text-disable">柜型</div>
+          <span class="text-h5-b text-primary-text">
+            {{ isFilterPrice(item?.dannum_cost4) }}
+          </span>
+        </div>
+        <div class="oa-flow-item__right-content-title flx-col flx-center">
+          <div class="text-f-c text-disable">税率</div>
+          <span class="text-h5-b text-primary-text">
+            {{ isFilterPrice(item?.dannum_cost2) }}
+          </span>
+        </div>
+        <div class="oa-flow-item__right-content-title flx-col flx-center">
+          <div class="text-f-c text-disable">佣金点数</div>
+          <span class="text-h5-b text-primary-text">
+            {{ isFilterPrice(item?.dannum_cost3) }}
+          </span>
         </div>
         <!-- </div> -->
       </section>
@@ -112,7 +152,7 @@ const isFilterTime = time => {
 
 <style lang="scss" scoped>
 .oa-flow-item {
-  margin-top: $space-a2;
+  // margin-top: $space-b1;
   padding-top: $space-b1;
   padding-bottom: $space-b1;
   padding-right: $space-b1;
@@ -127,7 +167,7 @@ const isFilterTime = time => {
     position: relative;
     width: 0;
     text-align: right;
-    padding-right: $space-a2;
+    padding-right: $space-b1;
     // line-height: 1;
 
     .icon {
@@ -151,7 +191,7 @@ const isFilterTime = time => {
     }
   }
   &__right {
-    padding-left: $space-a2;
+    padding-left: $space-b1;
     &-content {
       margin-left: $space-a1;
       // border-radius: $br-sm;

+ 4 - 3
JLHWEB/src/components/ToastWidget/HistoryPrice/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="lj-toast-hisprice flx-col">
     <header class="flx">
-      <span class="flx-1 text-h5-b">{{ t("business.detail.historyPrice") }}</span>
+      <span class="flx-1 text-h5-b">{{ `${t("business.detail.historyPrice")}(${title})` }}</span>
       <el-button v-if="!hideClose" circle text :icon="Refresh" @click="refresh(id, typeid, true)"></el-button>
       <el-button v-if="!hideClose" circle text :icon="CloseBold" @click="emit('close-toast')"></el-button>
     </header>
@@ -61,6 +61,7 @@ interface WidgetProps {
    * @description 是否隐藏关闭按钮
    */
   hideClose?: boolean;
+  title: string;
 }
 const props = withDefaults(defineProps<WidgetProps>(), {
   hideClose: false
@@ -121,7 +122,7 @@ watch(
 
 <style lang="scss" scoped>
 .lj-toast-hisprice {
-  width: 480px;
+  width: 600px;
 
   :deep(.el-tabs__header) {
     margin-bottom: 0;
@@ -144,7 +145,7 @@ watch(
       top: 0;
       bottom: 0;
       // height: 100%;
-      transform: translateX($space-a2);
+      transform: translateX($space-b1);
       z-index: -1;
 
       background: repeating-linear-gradient(

+ 5 - 1
JLHWEB/src/styles/var/toastification.scss

@@ -26,12 +26,16 @@ $vt-color-error: var(--lj-color-dust-red-6);
 // $vt-not-mobile: "only screen and (min-width : 600px)";
 // $vt-font-family: "Lato", Helvetica, "Roboto", Arial, sans-serif;
 // $vt-z-index: 9999;
-
+.#{$vt-namespace}__container {
+  width: 640px;
+}
 .#{$vt-namespace}__toast-component-body {
   display: flex;
 }
 .longjoe-toast.#{$vt-namespace}__toast {
   max-height: 96vh;
+  max-width: 640px;
+  padding: 8px 12px;
 
   &--default {
     background-color: var(--lj-color-gray-1);

+ 6 - 3
JLHWEB/src/utils/index.ts

@@ -1116,7 +1116,7 @@ export const formatTime = function (time: string | number, option: string, ifsho
       // 1~6小时
       return Math.ceil(diff / 3600) + "小时前";
     }
-    let hourMins = parseTime(_time, "{h}:{i}");
+    let hourMins = parseTime(_time, "{h}:{i}:{s}");
     let isSameDay = now.setHours(0, 0, 0, 0) - d.setHours(0, 0, 0, 0);
     switch (isSameDay) {
       case 0:
@@ -1127,9 +1127,9 @@ export const formatTime = function (time: string | number, option: string, ifsho
       //     return `前天 ${hourMins}`
     }
     if (now.getFullYear() == d.getFullYear()) {
-      return parseTime(_time, "{m}-{d} {h}:{i}");
+      return parseTime(_time, "{m}-{d} {h}:{i}:{s}");
     } else {
-      return parseTime(_time, "{y}-{m}-{d} {h}:{i}");
+      return parseTime(_time, "{y}-{m}-{d} {h}:{i}:{s}");
     }
   }
 
@@ -1277,6 +1277,9 @@ export const transformTreeData = (data: any) => {
  * @returns
  */
 export const isFilterPrice = (data, digits?: number) => {
+  if (data == null || data == undefined) {
+    return "0";
+  }
   let _digits = digits ?? 2;
   let val = formatAmount3({ val: data }, _digits);
   // 过滤掉末尾的0

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

@@ -2180,7 +2180,7 @@ const orderDefaultAction = [
     label: t("common.viewHistoricalQuotes"),
     clickFunc: () => {
       console.log("LjDetailRef.value._mainData :>> ", LjDetailRef.value._mainData);
-      gotoHisprice(0, { id: LjDetailRef.value._mainData.mattressid, typeid: 1 });
+      gotoHisprice(LjDetailRef.value._mainData.mattresscode, 0, { id: LjDetailRef.value._mainData.mattressid, typeid: 1 });
     }
   }),
   buttonDefault({

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

@@ -2688,7 +2688,7 @@ export const useHooks = (t?: any) => {
    * @param timeout
    * @param params
    */
-  const gotoHisprice = async (timeout = 0, params: any, cbClose?: any) => {
+  const gotoHisprice = async (title: string, timeout = 0, params: any, cbClose?: any) => {
     const toast = useToast();
     toast.clear();
     nextTick(() => {
@@ -2696,6 +2696,7 @@ export const useHooks = (t?: any) => {
         {
           component: ToastHistoryPrice,
           props: {
+            title: title,
             ...params
           },
           listeners: {

+ 4 - 9
JLHWEB/src/views/quote/mattressQuote/index.vue

@@ -206,14 +206,9 @@ const handleClickTable = ({ row, rowIndex, $rowIndex, column, columnIndex, $colu
     funcShowQuoteList(row);
   }
   if (ifShowHisprice.value) {
-    gotoHisprice(
-      0,
-      { id: row.mattressid, typeid: 1 },
-      () => {
-        ifShowHisprice.value = false;
-      },
-      true
-    );
+    gotoHisprice(row.mattresscode, 0, { id: row.mattressid, typeid: 1 }, () => {
+      ifShowHisprice.value = false;
+    });
   }
 };
 
@@ -576,7 +571,7 @@ const action: detailAction[] = [
       }
       ifShowHisprice.value = true;
 
-      gotoHisprice(0, { id: curRecord.mattressid, typeid: 1 }, () => {
+      gotoHisprice(curRecord.mattresscode, 0, { id: curRecord.mattressid, typeid: 1 }, () => {
         ifShowHisprice.value = false;
       });
     }