Browse Source

1、修复部分报价所有人能见问题
2、修复复制报价无法删除副规格问题
3、修复复制配置录入类型配置项,覆盖类型问题

MY 4 days ago
parent
commit
43d03d049e

+ 13 - 9
JLHWEB/src/components/ToastWidget/HistoryPrice/components/Item.vue

@@ -52,8 +52,8 @@
           <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">
+          <div class="text-f-c text-disable" v-if="isSuper">不含税出厂价</div>
+          <span class="text-h5-b text-primary-text" v-if="isSuper">
             {{ isFilterPrice(item?.dijia_cost1) }}
           </span>
         </div>
@@ -62,8 +62,8 @@
           <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">
+          <div class="text-f-c text-disable" v-if="isSuper">不含税出厂价</div>
+          <span class="text-h5-b text-primary-text" v-if="isSuper">
             {{ isFilterPrice(item?.dijia_cost4) }}
           </span>
         </div>
@@ -72,8 +72,8 @@
           <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">
+          <div class="text-f-c text-disable" v-if="isSuper">不含税出厂价</div>
+          <span class="text-h5-b text-primary-text" v-if="isSuper">
             {{ isFilterPrice(item?.dijia_cost2) }}
           </span>
         </div>
@@ -82,12 +82,12 @@
           <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">
+          <div class="text-f-c text-disable" v-if="isSuper">不含税出厂价</div>
+          <span class="text-h5-b text-primary-text" v-if="isSuper">
             {{ isFilterPrice(item?.dijia_cost3) }}
           </span>
         </div>
-        <div class="oa-flow-item__right-content-title flx-col flx-center">
+        <div class="oa-flow-item__right-content-title flx-col flx-center" v-if="isSuper">
           <div class="text-f-c text-disable">FOB费</div>
           <span class="text-h5-b text-primary-text">
             {{ isFilterPrice(item?.dannum_cost1) }}
@@ -122,6 +122,7 @@ import { ref, watch } from "vue";
 import { formatTime, formatAmount3 } from "@/utils/index";
 import { Calendar } from "@element-plus/icons-vue";
 import { isFilterPrice } from "@/utils/index";
+import { useGlobalStore } from "@/stores/modules/global";
 
 interface wigetProps {
   item: any;
@@ -136,6 +137,9 @@ interface wigetProps {
   nowtime?: string;
 }
 
+const globalStore = useGlobalStore();
+const isSuper = globalStore.isSuper;
+
 const props = withDefaults(defineProps<wigetProps>(), {
   // item: {},
   current: undefined

+ 7 - 4
JLHWEB/src/views/erpapi/mattressInterface/hooks/index.tsx

@@ -1931,16 +1931,19 @@ export const useHooks = (t?: any) => {
       });
     } else if (isPz === 1) {
       // 复制配置 FEAT:只复制录入和选择类型的配置,生产信息不覆盖
-      const NEED_PROPS = ["bj_inputtype", "bj_namemx"];
       res.mxList.forEach(mx => copyMap.set(`${mx.erp_pzid}`, mx));
 
       state.mattressYWList = visibleData.map(mx => {
         const key = `${mx.erp_pzid}`;
         if (copyMap.has(key) && (mx.bj_inputtype === 1 || mx.bj_inputtype === 0 || mx.bj_pzname.includes("床网"))) {
           matchQty++;
-          NEED_PROPS.forEach(prop => {
-            mx[prop] = copyMap.get(key)[prop];
-          });
+          if (mx.bj_inputtype === 2) {
+            mx.bj_namemx = copyMap.get(key).bj_namemx;
+          } else {
+            mx.bj_inputtype = copyMap.get(key).bj_inputtype;
+            mx.bj_namemx = copyMap.get(key).bj_namemx;
+          }
+
           mx.haschange = 1;
         } else {
           mx.haschange = 0;

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

@@ -2964,7 +2964,7 @@ const toDelMx_subSpecs = () => {
     if (curRecords.length) {
       try {
         curRecords.forEach((record: any) => {
-          if (record.erp_mtrlid > 0) {
+          if (orderStatus.value != "copy" && record.erp_mtrlid > 0) {
             throw new Error(`该规格(${record.mattress_width}*${record.mattress_length})已生成ERP物料,不能删除`);
           }
         });