Переглянути джерело

JLHWEB:1、报价清单导出Excel支持公式计算
2、修复配置、清单无法覆盖问题
3、修复清单保存数值类型问题

JohnnyChan 3 днів тому
батько
коміт
1d36a9504d

+ 9 - 1
JLHWEB/src/views/erpapi/mattressInterface/detail.vue

@@ -709,7 +709,15 @@ const orderDefaultAction = [
             }
             if ($tableYw) {
               const { visibleData } = $tableYw.getTableData();
-              _ywList = visibleData;
+              _ywList = visibleData.map((o, i) => {
+                o.printid = i + 1;
+                o.actual_useqty = Number(o.actual_useqty);
+                o.sh_rate = Number(o.sh_rate);
+                o.ls_rate = Number(o.ls_rate);
+                o.qd_pfgroupqty = Number(o.qd_pfgroupqty);
+                o.ss_rate = Number(o.ss_rate);
+                return o;
+              });
             }
 
             const res = await SaveMattressInterface({

+ 8 - 10
JLHWEB/src/views/erpapi/mattressInterface/hooks/index.tsx

@@ -1887,7 +1887,6 @@ export const useHooks = (t?: any) => {
     const $table = state.YwTableRef?.element;
     let { visibleData } = $table.getTableData();
     const copyMap = new Map();
-    let showData: any = [];
     let matchQty = 0;
 
     const COMMON_PRESERVED_PROPS = ["bj_inputtype", "erp_pzname", "erp_pzcode", "bj_pzname", "bj_namemx", "itemname"];
@@ -1900,7 +1899,7 @@ export const useHooks = (t?: any) => {
         copyMap.set(`${mx.erp_pzid}`, mx);
       });
 
-      showData = res.mxList.map(mx => {
+      state.mattressYWList = res.mxList.map(mx => {
         const key = `${mx.erp_pzid}`;
         if (copyMap.has(key)) {
           matchQty++;
@@ -1922,7 +1921,7 @@ export const useHooks = (t?: any) => {
       const NEED_PROPS = ["bj_inputtype", "bj_namemx"];
       res.mxList.forEach(mx => copyMap.set(`${mx.erp_pzid}`, mx));
 
-      showData = visibleData.map(mx => {
+      state.mattressYWList = visibleData.map(mx => {
         const key = `${mx.erp_pzid}`;
         if (copyMap.has(key) && (mx.bj_inputtype === 1 || mx.bj_inputtype === 0)) {
           matchQty++;
@@ -1937,7 +1936,7 @@ export const useHooks = (t?: any) => {
     } else {
       // 重新生成:  FEAT: 删除所有已经填写的【录入】和【选择)项目,根据核价资料,重新生成所有的【带出】资料
       visibleData.forEach(mx => copyMap.set(`${mx.erp_pzid}`, mx));
-      showData = res.mxList.map(mx => {
+      state.mattressYWList = res.mxList.map(mx => {
         const key = `${mx.erp_pzid}`;
         if (copyMap.has(key)) {
           matchQty++;
@@ -1950,7 +1949,7 @@ export const useHooks = (t?: any) => {
     }
 
     if (res.mxList.length > 0) {
-      await $table.reloadData(showData);
+      await $table.reloadData(state.mattressYWList);
       resetMergeCells();
 
       ElNotification({
@@ -1976,7 +1975,6 @@ export const useHooks = (t?: any) => {
 
     let res = await RefreshMattressInterfaceQd({ mattressid, isPz, isCheck });
 
-    let showData: any = [];
     let matchQty = 0;
 
     const interfaceMap = {};
@@ -2010,7 +2008,7 @@ export const useHooks = (t?: any) => {
       // 刷新清单
       visibleData.forEach(mx => copyMap.set(`${mx.itemname}|${mx.bj_pzname}|${mx.bj_pzname_mx}`, mx));
 
-      showData = res.mxList.map(mx => {
+      state.mattressYWList = res.mxList.map(mx => {
         const key = `${mx.itemname}|${mx.bj_pzname}|${mx.bj_pzname_mx}`;
         if (copyMap.has(key)) {
           matchQty++;
@@ -2037,7 +2035,7 @@ export const useHooks = (t?: any) => {
       ];
       res.mxList.forEach(mx => copyMap.set(`${mx.itemname}|${mx.bj_pzname}|${mx.bj_pzname_mx}`, mx));
 
-      showData = visibleData.map(mx => {
+      state.mattressYWList = visibleData.map(mx => {
         const key = `${mx.itemname}|${mx.bj_pzname}|${mx.bj_pzname_mx}`;
         if (copyMap.has(key)) {
           matchQty++;
@@ -2053,7 +2051,7 @@ export const useHooks = (t?: any) => {
       // 重新刷新清单
       visibleData.forEach(mx => copyMap.set(`${mx.itemname}|${mx.bj_pzname}|${mx.bj_pzname_mx}`, mx));
 
-      showData = res.mxList.map(mx => {
+      state.mattressYWList = res.mxList.map(mx => {
         const key = `${mx.itemname}|${mx.bj_pzname}|${mx.bj_pzname_mx}`;
         if (copyMap.has(key)) {
           matchQty++;
@@ -2066,7 +2064,7 @@ export const useHooks = (t?: any) => {
     }
 
     if (res.mxList.length > 0) {
-      await $table.reloadData(showData);
+      await $table.reloadData(state.mattressYWList);
       resetMergeCellsQd();
 
       ElNotification({

+ 15 - 5
JLHWEB/src/views/quote/mattressQuote/components/QuoteListNew.vue

@@ -74,10 +74,10 @@
           <el-table-column prop="useqty" label="用量" align="right" />
         </template>
         <template v-if="pricePower">
-          <el-table-column prop="costamt_2" label="标准金额" align="right" />
-          <el-table-column prop="costamt_1" label="散单金额" align="right" />
-          <el-table-column prop="costamt_4" label="小单金额" align="right" />
-          <el-table-column prop="costamt_3" label="大单金额" align="right" />
+          <el-table-column prop="costamt_2" label="标准金额" align="right" :formatter="formatter" />
+          <el-table-column prop="costamt_1" label="散单金额" align="right" :formatter="formatter" />
+          <el-table-column prop="costamt_4" label="小单金额" align="right" :formatter="formatter" />
+          <el-table-column prop="costamt_3" label="大单金额" align="right" :formatter="formatter" />
         </template>
       </el-table>
 
@@ -192,6 +192,10 @@ const props = withDefaults(defineProps<WidgetProps>(), {
   iforigin: false
 });
 
+const formatter = (row: any, column: any, cellValue: any, index: any) => {
+  return isFilterPrice(cellValue);
+};
+
 const { prefixCls } = useDesign("ljdrawer-quotelist");
 const { userInfo } = useUserStore();
 const { enumMap, tableData, oriTableData, wf_retrieve_qingdan } = useHooksCpQuote();
@@ -453,7 +457,13 @@ const fields = computed(() => {
       { label: "地区", value: data.area ?? "" },
       { label: "柜型", value: data.cabinet_type ?? "" },
       { label: "管理费用点", value: _managerate ?? "", type: "variable", field: "managerate" },
-      { label: "公司利润点(部门)", value: _com_profitrate ?? "", type: "variable", field: "com_profitrate" },
+      {
+        label: "公司利润点(部门)",
+        value: _com_profitrate ?? "",
+        type: "variable",
+        field: "com_profitrate",
+        jointo: "公司利润点"
+      },
       { label: "部门利润率", value: data.dept_profitrate ?? "", type: "variable", field: "dept_profitrate" }
     ];
   } else {

Різницю між файлами не показано, бо вона завелика
+ 604 - 252
JLHWEB/src/views/quote/mattressQuote/hooks/cpQuote.ts