Przeglądaj źródła

feat: 为销售订单、采购订单和合同添加默认交易方式配置

liujt 2 miesięcy temu
rodzic
commit
991c74d813

+ 11 - 9
src/views/contractManage/contractBook/components/addDialog.vue

@@ -829,6 +829,7 @@
   import { getSaleOrderDetail } from '@/api/saleManage/saleorder';
   import PaymentCollectionPlan from '@/BIZComponents/paymentCollectionPlan/Index.vue'
   import { shippingModeOp, shippingModePurchaseOp, transactionMethodsOp } from '@/enum/dict.js';
+  import { parameterGetByCode } from '@/api/main/index.js';
 
   export default {
     props: {
@@ -952,14 +953,6 @@
         activeName: '1',
         payWayOptions: [],
         delDetailIds: [],
-        paymentTypeOptions: [
-          { id: 1, name: '固定' },
-          { id: 2, name: '分期' }
-        ],
-        pricingWayList: [
-          { id: 1, name: '按数量计价' },
-          { id: 2, name: '按重量计价' }
-        ],
 
         processList: [
           {
@@ -1045,7 +1038,8 @@
         groupTreeData: [],
         // 组织机构平铺数据
         groupData: [],
-        companyInfo: {}
+        companyInfo: {},
+        defaultTransactionMode: 1,
       };
     },
     computed: {
@@ -1151,6 +1145,12 @@
         this.enterprisePage.push(...res.list);
         this.getEnterprise();
       });
+      //交易方式//1 先票后款 2 先款后票
+      parameterGetByCode({
+        code: 'eom_contract_add_transactionMode'
+      }).then((res) => {
+        this.defaultTransactionMode = +res.value;
+      });
     },
 
     methods: {
@@ -1653,7 +1653,9 @@
         this.contractBookTypeList = copyObj(this.categoryTreeList[0].children);
         console.log('contractBookTypeList!!!', this.contractBookTypeList)
         if (type == 'add') {
+          console.log('this.defaultTransactionMode!!!', this.defaultTransactionMode)
           let userInfo = this.$store.getters.user.info;
+          this.form.transactionMode = this.defaultTransactionMode;
           this.isUpdate = false;
           userInfo.id = userInfo.userId;
           this.changePersonel();

+ 9 - 0
src/views/purchasingManage/purchaseOrder/components/addDialogNew.vue

@@ -768,6 +768,7 @@
   import { shippingModePurchaseOp, transactionMethodsOp } from '@/enum/dict.js';
   import { formatDate } from '@/utils/dateUtils';
   import { formatPrice } from '@/BIZComponents/setProduct.js';
+  import { parameterGetByCode } from '@/api/main/index.js';
 
   export default {
     mixins: [dictMixins],
@@ -911,6 +912,7 @@
         winnerSuppleIds: '',
         shippingModePurchaseOp,
         transactionMethodsOp,
+        defaultTransactionMode: 1,
       };
     },
     computed: {
@@ -1021,6 +1023,12 @@
       this.getGroupAll();
       this.getEnterprisePage();
       this.changePersonel();
+      //交易方式//1 先票后款 2 先款后票
+      parameterGetByCode({
+        code: 'eom_contract_add_transactionMode'
+      }).then((res) => {
+        this.defaultTransactionMode = +res.value;
+      });
     },
     methods: {
       //选择退货单
@@ -1964,6 +1972,7 @@
         }
         if (type == 'add') {
           // console.log('enterprisePage~~~~~', this.enterprisePage);
+          this.form.transactionMode = this.defaultTransactionMode;
           this.isUpdate = false;
           if (this.enterprisePage.length > 0) {
             this.form.partaName = this.enterprisePage[0]?.name;

+ 9 - 1
src/views/saleManage/saleOrder/components/addDialogNew.vue

@@ -954,7 +954,8 @@
         isBatchNo: 0,
         isTaxRate: 0,
         isSinglePrice: 0,
-        isDeptAndPerson: 0
+        isDeptAndPerson: 0,
+        defaultTransactionMode: 1,
       };
     },
     computed: {
@@ -1038,6 +1039,12 @@
       this.changePersonel();
       this.getGroupAll();
       this.getEnterprisePage();
+      //交易方式//1 先票后款 2 先款后票
+      parameterGetByCode({
+        code: 'eom_contract_add_transactionMode'
+      }).then((res) => {
+        this.defaultTransactionMode = +res.value;
+      });
       //批次号是否必填//0否 1是
       parameterGetByCode({
         code: 'eom_saleOrder_entrusted_batchNo'
@@ -1736,6 +1743,7 @@
         this.visible = true;
 
         if (type == 'add') {
+          this.form.transactionMode = this.defaultTransactionMode;
           this.isUpdate = false;
           if (this.enterprisePage.length > 0) {
             this.form.partbName = this.enterprisePage[0].name;