浏览代码

feat(计价方式): 在多个模块中添加计价方式列并更新字典列表

yusheng 6 月之前
父节点
当前提交
9476f07af4

+ 12 - 1
src/BIZComponents/inventoryTableDetails.vue

@@ -88,7 +88,7 @@
   // import fileMain from '@/components/addDoc/index.vue';
   import { contactQueryByCategoryIdsAPI } from '@/api/bpm/components/supplierManage/contact';
   const dayjs = require('dayjs');
-  import { lbjtList, levelList } from '@/enum/dict.js';
+  import { lbjtList, levelList,pricingWayList } from '@/enum/dict.js';
   import timeDialog from '@/components/timeDialog/index.vue';
 
   export default {
@@ -217,6 +217,17 @@
             label: '规格',
             slot: 'specification',
             align: 'center'
+          },
+          {
+            width: 140,
+            prop: 'pricingWay',
+            label: '计价方式',
+            align: 'center',
+            fixed: 'left',
+            formatter: (row, column) => {
+              return pricingWayList.find((item) => item.id == row.pricingWay)
+                ?.name;
+            }
           }
         ];
         // 条件显示的新增字段列(仅当quoteType为2时显示)

+ 5 - 6
src/enum/dict.js

@@ -102,9 +102,7 @@ export default {
   冲差范围: 'adjust_range',
   调整类型: 'adjust_price_type',
   取样类型: 'quality_method_code',
-  质检计划类型: 'inspection_plan_type',
-
-
+  质检计划类型: 'inspection_plan_type'
 };
 
 export const numberList = [
@@ -122,7 +120,7 @@ export const numberList = [
   'ledger',
   'patrol_cycle',
   'quality_method_code',
-  'inspection_plan_type',
+  'inspection_plan_type'
 ];
 //报价单-是否接受拆单
 export const acceptUnpackoptions = [
@@ -160,8 +158,9 @@ export const proStatusEnum = [
 ];
 // 计价方式
 export const pricingWayList = [
-  { id: 1, name: '按数量计费' },
-  { id: 2, name: '按重量计费' }
+  { id: 1, name: '按数量计价' },
+  { id: 2, name: '按重量计价' },
+  { id: 3, name: '按增重计价' }
 ];
 //来源类型
 export const relationTypeOption = {

+ 12 - 1
src/views/bpm/handleTask/components/purchaseOrder/detailDialog.vue

@@ -220,7 +220,7 @@
   // import fileMain from '@/components/addDoc/index.vue';
   import { orderSourceType, outsourceSceneList } from '@/enum/dict';
   import { lbjtList } from '@/enum/dict.js';
-  import { levelList } from '@/enum/dict.js';
+  import { levelList,pricingWayList } from '@/enum/dict.js';
   export default {
     mixins: [dictMixins],
     // components: { fileMain },
@@ -323,6 +323,17 @@
             slot: 'productBrand',
             align: 'center'
           },
+          {
+            width: 140,
+            prop: 'pricingWay',
+            label: '计价方式',
+            align: 'center',
+            fixed: 'left',
+            formatter: (row, column) => {
+              return pricingWayList.find((item) => item.id == row.pricingWay)
+                ?.name;
+            }
+          },
           {
             width: 120,
             prop: 'modelType',

+ 12 - 15
src/views/bpm/handleTask/components/purchaseOrder/invoice/receiptInfo.vue

@@ -99,7 +99,7 @@
   import { reviewStatusEnum } from '@/enum/dict';
   import dictMixins from '@/mixins/dictMixins';
   import { lbjtList } from '@/enum/dict.js';
-  import { levelList } from '@/enum/dict.js';
+  import { levelList,pricingWayList } from '@/enum/dict.js';
   // import fileMain from '@/components/addDoc/index.vue';
   export default {
     // components: { fileMain },
@@ -321,20 +321,17 @@
           //   slot: 'weightUnit',
           //   align: 'center'
           // },
-          // {
-          //   width: 160,
-          //   prop: 'pricingWay',
-          //   label: '计价方式',
-          //   slot: 'pricingWay',
-          //   align: 'center',
-          //   formatter: (row, column) => {
-          //     return row.pricingWay == 1
-          //       ? '按数量计费'
-          //       : row.pricingWay == 2
-          //       ? '按重量计费'
-          //       : '';
-          //   }
-          // },
+          {
+            width: 140,
+            prop: 'pricingWay',
+            label: '计价方式',
+            align: 'center',
+            fixed: 'left',
+            formatter: (row, column) => {
+              return pricingWayList.find((item) => item.id == row.pricingWay)
+                ?.name;
+            }
+          },
           {
             minWidth: 120,
             prop: 'goodsLevel',

+ 13 - 3
src/views/bpm/handleTask/components/purchaseOrder/invoiceConfirm/detailDialog.vue

@@ -139,7 +139,7 @@
 
 <script>
   import dictMixins from '@/mixins/dictMixins';
-  import { levelList } from '@/enum/dict.js';
+  import { levelList,pricingWayList } from '@/enum/dict.js';
   import { getReceiveConfirmDetail } from '@/api/bpm/components/purchasingManage/invoiceConfirm';
 
   let formDef = {
@@ -288,14 +288,24 @@
             width: 150,
             prop: 'confirmCount',
             label: '确认数量',
-              formatter: (row, column) => {
+            formatter: (row, column) => {
               if (row.confirmCount) {
                 return row.confirmCount + ' ' + row.measuringUnit;
               }
             },
             align: 'center'
           },
-
+          {
+            width: 140,
+            prop: 'pricingWay',
+            label: '计价方式',
+            align: 'center',
+            fixed: 'left',
+            formatter: (row, column) => {
+              return pricingWayList.find((item) => item.id == row.pricingWay)
+                ?.name;
+            }
+          },
           // {
           //   width: 80,
           //   prop: 'measuringUnit',

+ 12 - 1
src/views/bpm/handleTask/components/purchaseOrder/outSourceSend/detailDialog.vue

@@ -101,7 +101,7 @@
   import { mapActions } from 'vuex';
   import dictMixins from '@/mixins/dictMixins';
   import { lbjtList } from '@/enum/dict.js';
-  import { levelList } from '@/enum/dict.js';
+  import { levelList, pricingWayList } from '@/enum/dict.js';
 
   export default {
     // components: { fileMain },
@@ -271,6 +271,17 @@
             },
             align: 'center'
           },
+          {
+            width: 140,
+            prop: 'pricingWay',
+            label: '计价方式',
+            align: 'center',
+            fixed: 'left',
+            formatter: (row, column) => {
+              return pricingWayList.find((item) => item.id == row.pricingWay)
+                ?.name;
+            }
+          },
           // {
           //   width: 100,
           //   prop: 'weightUnit',

+ 12 - 8
src/views/bpm/handleTask/components/purchaseOrder/returnGoods/detailDialog.vue

@@ -187,7 +187,7 @@
   import add from '@/views/bpm/outgoingManagement/outbound.vue';
   import detailDialog from '@/views/bpm/outgoingManagement/details.vue';
   import { reviewStatusEnum } from '@/enum/dict';
-  import { levelList } from '@/enum/dict.js';
+  import { levelList,pricingWayList } from '@/enum/dict.js';
 
   export default {
     components: {
@@ -294,13 +294,17 @@
             },
             align: 'center'
           },
-          // {
-          //   width: 80,
-          //   prop: 'measuringUnit',
-          //   label: '计量单位',
-          //   slot: 'measuringUnit',
-          //   align: 'center'
-          // },
+           {
+            width: 140,
+            prop: 'pricingWay',
+            label: '计价方式',
+            align: 'center',
+            fixed: 'left',
+            formatter: (row, column) => {
+              return pricingWayList.find((item) => item.id == row.pricingWay)
+                ?.name;
+            }
+          },
           {
             width: 120,
             prop: 'singleWeight',

+ 14 - 10
src/views/bpm/handleTask/components/saleOrder/entrustedReceive/detailDialog.vue

@@ -134,6 +134,7 @@
   import { deepClone } from '@/components/FormGenerator/utils/index';
   // import fileMain from '@/components/addDoc/index.vue';
   import dictMixins from '@/mixins/dictMixins';
+  import { pricingWayList } from '@/enum/dict';
 
   export default {
     mixins: [dictMixins],
@@ -266,7 +267,7 @@
             prop: 'singleWeight',
             label: '单重',
             slot: 'singleWeight',
-                      formatter: (row, column) => {
+            formatter: (row, column) => {
               if (row.singleWeight) {
                 return row.singleWeight + ' ' + row.weightUnit;
               }
@@ -278,21 +279,24 @@
             prop: 'receiveTotalWeight',
             label: '收货总重',
             slot: 'receiveTotalWeight',
-                                  formatter: (row, column) => {
+            formatter: (row, column) => {
               if (row.receiveTotalWeight) {
                 return row.receiveTotalWeight + ' ' + row.weightUnit;
               }
             },
             align: 'center'
           },
-          // {
-          //   width: 100,
-          //   prop: 'weightUnit',
-          //   label: '重量单位',
-          //   slot: 'weightUnit',
-            
-          //   align: 'center'
-          // },
+          {
+            width: 140,
+            prop: 'pricingWay',
+            label: '计价方式',
+            align: 'center',
+            fixed: 'left',
+            formatter: (row, column) => {
+              return pricingWayList.find((item) => item.id == row.pricingWay)
+                ?.name;
+            }
+          },
           // {
           //   width: 160,
           //   prop: 'pricingWay',

+ 4 - 12
src/views/bpm/handleTask/components/saleOrder/exceptionManagement/addOrEditDialog.vue

@@ -99,7 +99,7 @@
     getById,
     update
   } from '@/api/bpm/components/saleManage/exceptionManagement.js';
-  import { relationTypeOption } from '@/enum/dict.js';
+  import { relationTypeOption,pricingWayList } from '@/enum/dict.js';
 
   export default {
     mixins: [dictMixins],
@@ -181,13 +181,7 @@
             align: 'center'
           },
 
-          // {
-          //   minWidth: 100,
-          //   prop: 'saleCount',
-          //   label: '发货数量',
-          //   showOverflowTooltip: true,
-          //   align: 'center'
-          // },
+
           {
             minWidth: 100,
             prop: 'totalCount',
@@ -267,16 +261,14 @@
             prop: 'modelKey',
             label: '机型',
             showOverflowTooltip: true,
-            align: 'center',
-
+            align: 'center'
           },
           {
             minWidth: 120,
             prop: 'colorKey',
             showOverflowTooltip: true,
             label: '颜色',
-            align: 'center',
-
+            align: 'center'
           },
           {
             width: 220,

+ 12 - 9
src/views/bpm/handleTask/components/saleOrder/invoice/detailDialog.vue

@@ -203,7 +203,7 @@
   import { lbjtList } from '@/enum/dict.js';
   import detailDialog from '@/views/bpm/outgoingManagement/details.vue';
   import tabMixins from '@/mixins/tableColumnsMixin';
-  import { levelList } from '@/enum/dict.js';
+  import { levelList,pricingWayList } from '@/enum/dict.js';
   import { getSummaries } from '@/utils/util.js';
 
   export default {
@@ -406,14 +406,17 @@
             headerSlot: 'headerTotalCount',
             align: 'center'
           },
-          // {
-          //   width: 150,
-          //   prop: 'saleUnit',
-          //   label: '单位',
-          //   slot: 'saleUnit',
-          //   headerSlot: 'headerTotalCount',
-          //   align: 'center'
-          // },
+            {
+            width: 140,
+            prop: 'pricingWay',
+            label: '计价方式',
+            align: 'center',
+            fixed: 'left',
+            formatter: (row, column) => {
+              return pricingWayList.find((item) => item.id == row.pricingWay)
+                ?.name;
+            }
+          },
           {
             width: 120,
             prop: 'totalCount',

+ 12 - 15
src/views/bpm/handleTask/components/saleOrder/invoiceConfirm/detailDialog.vue

@@ -198,7 +198,7 @@
   import add from '@/views/bpm/outgoingManagement/outbound.vue';
   // import fileMain from '@/components/addDoc/index.vue';
   import { getSendSaleOrderConfirmDetail } from '@/api/bpm/components/saleManage/invoiceConfirm';
-  import { levelList } from '@/enum/dict.js';
+  import { levelList, pricingWayList } from '@/enum/dict.js';
 
   export default {
     mixins: [dictMixins],
@@ -429,20 +429,17 @@
             showOverflowTooltip: true,
             align: 'center'
           },
-          // {
-          //   width: 160,
-          //   prop: 'pricingWay',
-          //   label: '计价方式',
-          //   slot: 'pricingWay',
-          //   align: 'center',
-          //   formatter: (row, column) => {
-          //     return row.pricingWay == 1
-          //       ? '按数量计费'
-          //       : row.pricingWay == 2
-          //       ? '按重量计费'
-          //       : '';
-          //   }
-          // },
+          {
+            width: 140,
+            prop: 'pricingWay',
+            label: '计价方式',
+            align: 'center',
+            fixed: 'left',
+            formatter: (row, column) => {
+              return pricingWayList.find((item) => item.id == row.pricingWay)
+                ?.name;
+            }
+          },
           {
             width: 160,
             prop: 'goodsPriceType',

+ 29 - 7
src/views/bpm/handleTask/components/saleOrder/returnGoods/detailDialog.vue

@@ -153,7 +153,7 @@
 
     <div style="margin-top: 20px">
       <add
-        v-if="taskDefinitionKey == 'warehouseManager'&&form.id" 
+        v-if="taskDefinitionKey == 'warehouseManager' && form.id"
         ref="add"
         :form="form"
         :sourceBizNo="form.returnNo"
@@ -179,7 +179,7 @@
   } from '@/api/bpm/components/saleManage/saleorder';
   import { getFile } from '@/api/system/file';
   import dictMixins from '@/mixins/dictMixins';
-  import { reviewStatusEnum } from '@/enum/dict';
+  import { reviewStatusEnum ,pricingWayList} from '@/enum/dict';
   import inventoryTabledetail from '@/BIZComponents/inventoryTableDetails.vue';
   import inventoryTable from '@/BIZComponents/inventoryTable.vue';
   // import fileMain from '@/components/addDoc/index.vue';
@@ -246,6 +246,17 @@
             slot: 'productCategoryName',
             align: 'center'
           },
+          {
+            width: 140,
+            prop: 'pricingWay',
+            label: '计价方式',
+            align: 'center',
+            fixed: 'left',
+            formatter: (row, column) => {
+              return pricingWayList.find((item) => item.id == row.pricingWay)
+                ?.name;
+            }
+          },
           {
             width: 160,
             prop: 'batchNo',
@@ -301,8 +312,7 @@
             label: '图号/件号',
             showOverflowTooltip: true
           },
- 
-   
+
           {
             width: 120,
             prop: 'customerMark',
@@ -459,7 +469,7 @@
             slot: 'discountTotalPrice',
             align: 'center'
           },
-       
+
           {
             width: 200,
             prop: 'guaranteePeriod',
@@ -547,6 +557,17 @@
             showOverflowTooltip: true,
             align: 'center'
           },
+          {
+            width: 140,
+            prop: 'pricingWay',
+            label: '计价方式',
+            align: 'center',
+            fixed: 'left',
+            formatter: (row, column) => {
+              return pricingWayList.find((item) => item.id == row.pricingWay)
+                ?.name;
+            }
+          },
           {
             minWidth: 120,
             prop: 'productName',
@@ -758,13 +779,14 @@
           }
 
           if (this.taskDefinitionKey == 'warehouseManager') {
-            this.form.returnStorageData = await this.$refs.add.getReturnStorage();
+            this.form.returnStorageData =
+              await this.$refs.add.getReturnStorage();
           }
 
           let commitData = Object.assign({}, this.form, {
             redressProductList
           });
-          
+
           return commitData;
         } catch (error) {
           console.log(error);

+ 12 - 15
src/views/bpm/handleTask/components/saleOrder/saleReturnGoods/detailDialog.vue

@@ -170,7 +170,7 @@
   import detailDialog from '@/views/bpm/stockManagement/details.vue';
   import fileUpload from '@/components/upload/fileUpload.vue';
   // import fileMain from '@/components/addDoc/index.vue';
-  import { levelList } from '@/enum/dict.js';
+  import { levelList,pricingWayList } from '@/enum/dict.js';
 
   export default {
     mixins: [dictMixins],
@@ -309,20 +309,17 @@
             showOverflowTooltip: true,
             align: 'center'
           },
-          // {
-          //   width: 160,
-          //   prop: 'pricingWay',
-          //   label: '计价方式',
-          //   slot: 'pricingWay',
-          //   align: 'center',
-          //   formatter: (row, column) => {
-          //     return row.pricingWay == 1
-          //       ? '按数量计费'
-          //       : row.pricingWay == 2
-          //       ? '按重量计费'
-          //       : '';
-          //   }
-          // },
+           {
+            width: 140,
+            prop: 'pricingWay',
+            label: '计价方式',
+            align: 'center',
+            fixed: 'left',
+            formatter: (row, column) => {
+              return pricingWayList.find((item) => item.id == row.pricingWay)
+                ?.name;
+            }
+          },
           {
             width: 160,
             prop: 'goodsPriceType',