Bladeren bron

🐞 fix(【drp-价格申报单】): 调价类型字段改为字典类型

问题原因:当最近价格为0,系统按照含税单价-最近价格取到了价格差,价格差有值且大于0,所以保存价格申报单时提示调价类型为涨价  解决方案:①当最近价格为0,则单价差也置为0。保存成功,调价类型为空,最近价格为0,单价差为0 ②最近价格不等于0,再计算单价差。单价差=含税单价-最近价格。单价差大于0,调价类型为涨价;单价差小于0,调价类型为降价

20240619384
002390 11 maanden geleden
bovenliggende
commit
8ac884da19

+ 20 - 16
src/views/purchase/apply/add/columns.js

@@ -275,13 +275,17 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "isPriceAdjustmentName", title: "调价类型" },
+          item: { key: "isPriceAdjustment", title: "调价类型" },
           attr: {
-            value: '无',
-            formatter: (prop) => {
-              const { priceDiffer } = prop;
-              return (prop.isPriceAdjustment = priceDiffer > 0 ? '涨价' : priceDiffer < 0 ? '降价' : '无');
-            },
+            value: 'no',
+            is: "el-select",
+            dictName: "price_adjustment_type",
+            disabled: true,
+            // value: '无',
+            // formatter: (prop) => {
+            //   const { priceDiffer } = prop;
+            //   return (prop.isPriceAdjustment = priceDiffer > 0 ? '涨价' : priceDiffer < 0 ? '降价' : '无');
+            // },
           },
         },
         {
@@ -453,16 +457,16 @@ export default function useColumns() {
         },
         // { item: { key: "createByName", title: "创建人名称" }, attr: {} },
         // { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
-        {
-          item: { key: "isPriceAdjustment", title: "", width: 10 },
-          attr: {
-            value: 'no',
-            // formatter: (prop) => {
-            //   const { priceDiffer } = prop;
-            //   return (prop.isPriceAdjustment = priceDiffer > 0 ? 'up' : priceDiffer < 0 ? 'down' : 'no');
-            // },
-          },
-        },
+        // {
+        //   item: { key: "isPriceAdjustment", title: "", width: 10 },
+        //   attr: {
+        //     value: 'no',
+        //     // formatter: (prop) => {
+        //     //   const { priceDiffer } = prop;
+        //     //   return (prop.isPriceAdjustment = priceDiffer > 0 ? 'up' : priceDiffer < 0 ? 'down' : 'no');
+        //     // },
+        //   },
+        // },
         // 采购换算率隐藏
         {
           item: { key: "conversionRate", title: "", required: true, width: 5 },

+ 21 - 17
src/views/purchase/apply/copy/columns.js

@@ -275,13 +275,17 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "isPriceAdjustmentName", title: "调价类型" },
+          item: { key: "isPriceAdjustment", title: "调价类型" },
           attr: {
-            value: '无',
-            formatter: (prop) => {
-              const { priceDiffer } = prop;
-              return (prop.isPriceAdjustment = priceDiffer > 0 ? '涨价' : priceDiffer < 0 ? '降价' : '无');
-            },
+            value: 'no',
+            is: "el-select",
+            dictName: "price_adjustment_type",
+            disabled: true,
+            // value: '无',
+            // formatter: (prop) => {
+            //   const { priceDiffer } = prop;
+            //   return (prop.isPriceAdjustment = priceDiffer > 0 ? '涨价' : priceDiffer < 0 ? '降价' : '无');
+            // },
           },
         },
         {
@@ -454,17 +458,17 @@ export default function useColumns() {
         },
         // { item: { key: "createByName", title: "创建人名称" }, attr: {} },
         // { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
-        {
-          // 调价类型
-          item: { key: "isPriceAdjustment", title: "", width: 10 },
-          attr: {
-            value: 'no',
-            // formatter: (prop) => {
-            //   const { priceDiffer } = prop;
-            //   return (prop.isPriceAdjustment = priceDiffer > 0 ? 'up' : priceDiffer < 0 ? 'down' : 'no');
-            // },
-          },
-        },
+        // {
+        //   // 调价类型
+        //   item: { key: "isPriceAdjustment", title: "", width: 10 },
+        //   attr: {
+        //     value: 'no',
+        //     // formatter: (prop) => {
+        //     //   const { priceDiffer } = prop;
+        //     //   return (prop.isPriceAdjustment = priceDiffer > 0 ? 'up' : priceDiffer < 0 ? 'down' : 'no');
+        //     // },
+        //   },
+        // },
         // 采购换算率隐藏
         {
           item: { key: "conversionRate", title: "采购换算率", required: true, width: 5 },

+ 20 - 16
src/views/purchase/apply/edit/columns.js

@@ -275,13 +275,17 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "isPriceAdjustmentName", title: "调价类型" },
+          item: { key: "isPriceAdjustment", title: "调价类型" },
           attr: {
-            value: '无',
-            formatter: (prop) => {
-              const { priceDiffer } = prop;
-              return (prop.isPriceAdjustment = priceDiffer > 0 ? '涨价' : priceDiffer < 0 ? '降价' : '无');
-            },
+            value: 'no',
+            is: "el-select",
+            dictName: "price_adjustment_type",
+            disabled: true,
+            // value: '无',
+            // formatter: (prop) => {
+            //   const { priceDiffer } = prop;
+            //   return (prop.isPriceAdjustment = priceDiffer > 0 ? '涨价' : priceDiffer < 0 ? '降价' : '无');
+            // },
           },
         },
         {
@@ -454,16 +458,16 @@ export default function useColumns() {
         },
         // { item: { key: "createByName", title: "创建人名称" }, attr: {} },
         // { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
-        {
-          item: { key: "isPriceAdjustment", title: "", width: 10 },
-          attr: {
-            value: 'no',
-            // formatter: (prop) => {
-            //   const { priceDiffer } = prop;
-            //   return (prop.isPriceAdjustment = priceDiffer > 0 ? 'up' : priceDiffer < 0 ? 'down' : 'no');
-            // },
-          },
-        },
+        // {
+        //   item: { key: "isPriceAdjustment", title: "", width: 10 },
+        //   attr: {
+        //     value: 'no',
+        //     // formatter: (prop) => {
+        //     //   const { priceDiffer } = prop;
+        //     //   return (prop.isPriceAdjustment = priceDiffer > 0 ? 'up' : priceDiffer < 0 ? 'down' : 'no');
+        //     // },
+        //   },
+        // },
         // 采购换算率隐藏
         {
           item: { key: "conversionRate", title: "采购换算率", required: true, width: 5 },

+ 3 - 1
src/views/purchase/apply/see/columns.js

@@ -170,8 +170,10 @@ export default function useColumns() {
           },
         },
         {
-          item: { width: 100, key: "isPriceAdjustmentName", title: "调价类型" },
+          item: { width: 100, key: "isPriceAdjustment", title: "调价类型" },
           attr: {
+            is: "el-dict-tag",
+            dictName: "price_adjustment_type",
           },
         },
         {