瀏覽代碼

结汇bug修改

asd26269546 1 年之前
父節點
當前提交
fbeef297d3

+ 1 - 1
src/components/byForm/index.vue

@@ -69,7 +69,7 @@
                 v-model="formData[i.selectProp]"
                 :placeholder="i.selectPlaceholder || $t('common.pleaseSelect')"
                 @change="(e) => commonsEmit(e, i)"
-                :disabled="i.disabled ? i.disabled : false"
+                :disabled="i.disabled || i.selectDisabled ? true : false"
                 :readonly="i.readonly ? i.readonly : false"
                 style="width: 80px">
                 <el-option :label="j.title || j.name || j.label" :value="j.id || j.value" v-for="j in i.data" :key="j.id"> </el-option>

+ 26 - 15
src/views/finance/fundManage/accountStatement/index.vue

@@ -112,7 +112,7 @@
       >
       </byForm>
       <template #footer>
-        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+        <el-button @click="settlementModal = false" size="large">取 消</el-button>
         <el-button type="primary" @click="settlementSubmitForm()" size="large"
           >确 定</el-button
         >
@@ -809,14 +809,19 @@ const formData = reactive({
 
 const settlementModal = ref(false);
 const openSettlementModal = (type, row) => {
-  modalType.value = type;
-  if (type == "add") {
-    formData2.data = {
-      transactionTime: moment().format("yyyy-MM-DD HH:mm:ss"),
-    };
-  } else {
-    formData2.data = { ...row };
-  }
+  formData3.data = { 
+    accountManagementId:null,
+    amount:null,
+    currency:null,
+    inAccountManagementId:null,
+    inAmount:null,
+    inCurrency:"CNY",
+    rate:null,
+    commissionAmount:null,
+    commissionCurrency:null,
+    remarks:null,
+    businessId:null,
+  };
   settlementModal.value = true;
 };
 
@@ -827,7 +832,7 @@ const formData3 = reactive({
     currency:null,
     inAccountManagementId:null,
     inAmount:null,
-    inCurrency:null,
+    inCurrency:"CNY",
     rate:null,
     commissionAmount:null,
     commissionCurrency:null,
@@ -838,7 +843,16 @@ const formData3 = reactive({
 const submit3 = ref(null);
 const settlementSubmitForm = () => {
   submit3.value.handleSubmit(() => {
+    //汇出汇入账号不能相同
+    if(formData3.data.accountManagementId === formData3.data.inAccountManagementId) {
+      ElMessage({
+        message:"汇出汇入账号不能相同",
+        type: "error",
+      });
+      return
+    }
     loadingDialog.value = true;
+    
     proxy.post("/accountRunningWater/exchangeSettlement", formData3.data).then(
       () => {
         ElMessage({
@@ -881,10 +895,7 @@ const settlementFormConfig = computed(() => {
         
         //判断value的类型
         if (isNaN(value)) {
-          formData3.data.inCurrency = formData3.data.currency;
           formData3.data.commissionCurrency = formData3.data.currency;
-          console.log(formData3.data.inAmount)
-          
         } else {
           if (value != "") {
             if (value.indexOf(".") > -1) {
@@ -911,6 +922,7 @@ const settlementFormConfig = computed(() => {
       label: "汇入金额",
       prop: "inAmount",
       itemWidth: 60,
+      selectDisabled:true,
       data: accountCurrency.value,
       placeholder: "请输入",
       selectPlaceholder: "币种",
@@ -918,9 +930,7 @@ const settlementFormConfig = computed(() => {
       fn: (value) => {
         //判断value的类型
         if (isNaN(value)) {
-          formData2.data.inCurrency = formData2.data.currency;
           formData2.data.commissionCurrency = formData2.data.currency;
-          
         } else {
           if (value != "") {
             if (value.indexOf(".") > -1) {
@@ -968,6 +978,7 @@ const settlementFormConfig = computed(() => {
       type: "select",
       prop: "businessId",
       label: "选择合同",
+      filterable:true,
       data: contractList2.value,
     },
   ];

+ 26 - 15
src/views/finance/fundManage/flow/index.vue

@@ -334,7 +334,7 @@
       >
       </byForm>
       <template #footer>
-        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+        <el-button @click="settlementModal = false" size="large">取 消</el-button>
         <el-button type="primary" @click="settlementSubmitForm()" size="large"
           >确 定</el-button
         >
@@ -399,14 +399,19 @@ const sourceList = ref({
 const contractList2 = ref([])
 const settlementModal = ref(false);
 const openSettlementModal = (type, row) => {
-  modalType.value = type;
-  if (type == "add") {
-    formData2.data = {
-      transactionTime: moment().format("yyyy-MM-DD HH:mm:ss"),
-    };
-  } else {
-    formData2.data = { ...row };
-  }
+  formData3.data = { 
+    accountManagementId:null,
+    amount:null,
+    currency:null,
+    inAccountManagementId:null,
+    inAmount:null,
+    inCurrency:"CNY",
+    rate:null,
+    commissionAmount:null,
+    commissionCurrency:null,
+    remarks:null,
+    businessId:null,
+  };
   settlementModal.value = true;
 };
 
@@ -458,7 +463,7 @@ const formData3 = reactive({
     currency:null,
     inAccountManagementId:null,
     inAmount:null,
-    inCurrency:null,
+    inCurrency:"CNY",
     rate:null,
     commissionAmount:null,
     commissionCurrency:null,
@@ -469,6 +474,14 @@ const formData3 = reactive({
 const submit3 = ref(null);
 const settlementSubmitForm = () => {
   submit3.value.handleSubmit(() => {
+    //汇出汇入账号不能相同
+    if(formData3.data.accountManagementId === formData3.data.inAccountManagementId) {
+      ElMessage({
+        message:"汇出汇入账号不能相同",
+        type: "error",
+      });
+      return
+    }
     loadingDialog.value = true;
     proxy.post("/accountRunningWater/exchangeSettlement", formData3.data).then(
       () => {
@@ -509,13 +522,10 @@ const settlementFormConfig = computed(() => {
       selectPlaceholder: "币种",
       selectProp: "currency",
       fn: (value) => {
-        
+        console.log(formData3.data)
         //判断value的类型
         if (isNaN(value)) {
-          formData3.data.inCurrency = formData3.data.currency;
           formData3.data.commissionCurrency = formData3.data.currency;
-          console.log(formData3.data.inAmount)
-          
         } else {
           if (value != "") {
             if (value.indexOf(".") > -1) {
@@ -545,11 +555,11 @@ const settlementFormConfig = computed(() => {
       data: accountCurrency.value,
       placeholder: "请输入",
       selectPlaceholder: "币种",
+      selectDisabled:true,
       selectProp: "inCurrency",
       fn: (value) => {
         //判断value的类型
         if (isNaN(value)) {
-          formData2.data.inCurrency = formData2.data.currency;
           formData2.data.commissionCurrency = formData2.data.currency;
           
         } else {
@@ -599,6 +609,7 @@ const settlementFormConfig = computed(() => {
       type: "select",
       prop: "businessId",
       label: "选择合同",
+      filterable:true,
       data: contractList2.value,
     },
   ];