Browse Source

添加汇付相关功能,新建test-sunzee分支,用于测试。

soobin 2 years ago
parent
commit
7d9133d57b
59 changed files with 2773 additions and 1262 deletions
  1. 7 1
      package.json
  2. 1 1
      public/index.html
  3. BIN
      src/assets/home/M3.png
  4. BIN
      src/assets/home/M8.png
  5. BIN
      src/assets/home/_M3.png
  6. 127 65
      src/assets/language/en.json
  7. 110 43
      src/assets/language/zh.json
  8. 2 2
      src/components/commom/kDialog/index.less
  9. 69 45
      src/components/typeSelectList/index.vue
  10. 5 1
      src/main.js
  11. 28 22
      src/router/index.js
  12. 38 0
      src/service/huifuMch/index.js
  13. 1 1
      src/service/login.js
  14. 8 0
      src/service/popPayment.js
  15. 8 0
      src/service/taskMessage/index.js
  16. 4 0
      src/service/test.js
  17. 1 1
      src/styles/alarmClock/index.less
  18. 1 1
      src/styles/deviceOper/index.less
  19. 1 1
      src/styles/deviceSet/index.less
  20. 1 1
      src/styles/doSugar/index.less
  21. 1 1
      src/styles/modulation/index.less
  22. 159 34
      src/styles/orderCenter/index.less
  23. 8 5
      src/styles/orderExport/index.less
  24. 1 1
      src/styles/recharge/index.less
  25. 1 1
      src/styles/uniPay/index.less
  26. 1 1
      src/styles/viewLogs/index.less
  27. 2 2
      src/utils/config.js
  28. 1 0
      src/views/accountPer/add.vue
  29. 0 172
      src/views/bindWechat.vue
  30. 1 1
      src/views/device/alarmClock.vue
  31. 1 1
      src/views/device/customLogo.vue
  32. 71 95
      src/views/device/deviceSearch.vue
  33. 1 1
      src/views/device/deviceSet.vue
  34. 1 1
      src/views/device/doSugar.vue
  35. 59 58
      src/views/device/index.vue
  36. 1 1
      src/views/device/modulation.vue
  37. 1 1
      src/views/device/openDoor.vue
  38. 1 1
      src/views/device/recharge.vue
  39. 1 1
      src/views/device/toDaySugarList.vue
  40. 1 1
      src/views/device/viewLogs/index.vue
  41. 13 12
      src/views/home/index.vue
  42. 41 0
      src/views/huifuMch/index.less
  43. 652 0
      src/views/huifuMch/index.vue
  44. 467 0
      src/views/huifuMch/update.vue
  45. 4 3
      src/views/login.vue
  46. 279 132
      src/views/orderCenter/index.vue
  47. 144 73
      src/views/orderExport/index.vue
  48. 101 0
      src/views/popPayment.vue
  49. 1 1
      src/views/register.vue
  50. 132 171
      src/views/robotRanking.vue
  51. 46 46
      src/views/role/add.vue
  52. 0 8
      src/views/shandeMch/index.less
  53. 0 98
      src/views/shandeMch/index.vue
  54. 7 4
      src/views/taskMessage/joinpayMchCheck/index.vue
  55. 59 34
      src/views/taskMessage/joinpayMchCheck/info/index.vue
  56. 1 1
      src/views/uniPay/index.vue
  57. 61 114
      src/views/user.vue
  58. 38 0
      src/views/weChatPay.vue
  59. 2 1
      vue.config.js

+ 7 - 1
package.json

@@ -12,11 +12,13 @@
   },
   "dependencies": {
     "@amap/amap-jsapi-loader": "^1.0.1",
+    "@vant/area-data": "^1.5.0",
     "@vant/touch-emulator": "^1.4.0",
     "airwallex-payment-elements": "latest",
     "axios": "^0.20.0",
     "better-scroll": "^2.3.0",
     "big.js": "^6.2.1",
+    "compressorjs": "^1.2.1",
     "core-js": "^3.6.5",
     "crypto-js": "^4.1.1",
     "dayjs": "^1.11.7",
@@ -31,7 +33,8 @@
     "vue-i18n": "^9.1.10",
     "vue-router": "^4.0.0-beta.13",
     "vue2-verify": "^1.1.5",
-    "vuex": "^4.1.0"
+    "vuex": "^4.1.0",
+    "wx-js-sdk-1.6.0": "^1.0.4"
   },
   "devDependencies": {
     "@vue/cli-plugin-babel": "~4.5.0",
@@ -62,6 +65,9 @@
     "rules": {
       "no-irregular-whitespace": "off",
       "no-mixed-spaces-and-tabs": 0
+    },
+    "globals": {
+      "WeixinJSBridge": false
     }
   },
   "browserslist": [

+ 1 - 1
public/index.html

@@ -6,7 +6,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
-    <title>shenze</title>
+    <title>Sunzee</title>
     <link rel="stylesheet" href="./fontIcon.css">
     <script type="text/javascript" src="./echarts.min.js"></script>
     <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>

BIN
src/assets/home/M3.png


BIN
src/assets/home/M8.png


BIN
src/assets/home/_M3.png


+ 127 - 65
src/assets/language/en.json

@@ -17,7 +17,7 @@
     "paymentMethod": "Payment method",
     "allDevices": "All devices",
     "commodityType": "Commodity type",
-    "whole": "whole",
+    "whole": "All",
     "noPaymentRequired": "No payment required",
     "coin": "Coin",
     "notes": "Notes",
@@ -33,7 +33,10 @@
     "refunding": "refunding",
     "refunded": "Refunded",
     "orderStatus": "Order Status",
-    "allSuboUsers": "All subordinate users"
+    "allSuboUsers": "All subordinate users",
+    "companies": "Company platform",
+    "sz": "Sunzee",
+    "sc": "Sevencloud"
   },
   "navBar": {
     "homePage": "home page",
@@ -304,7 +307,7 @@
     "remoteSugarMaking": "Remote sugar making",
     "outDoor": "Outer door",
     "inDoor": "Inner door",
-	"status": "Status",
+    "status": "Status",
     "openRemind": "Remind",
     "openRemindOut": "Are you sure you want to switch the outer door?",
     "openRemindIn": "Are you sure you want to switch the Inner door?",
@@ -313,7 +316,7 @@
     "parameterSetting": "Parameter setting",
     "operationConfirmation": "Operation confirmation",
     "pleaseConfirmAgainWhetherToOperate": "Please confirm again whether to operate",
-	"IllThinkAboutItAgain": "Cancel",
+    "IllThinkAboutItAgain": "Cancel",
     "restartSucceeded": "Restart succeeded",
     "deleteDeviceSucceed": "Delete device successfully",
     "sleepSuccessfully": "Sleep successfully",
@@ -331,6 +334,8 @@
     "merchantNamePlaceholder": "Please enter the merchant name",
     "equipmentTypeLabel": "Equipment type",
     "equipmentTypePlaceholder": "Please select a device type",
+    "companyTypeLabel": "Company type",
+    "companyTypePlaceholder": "Please select a companytype",
     "equipmentModelLabel": "Equipment model",
     "equipmentModelPlaceholder": "Please select a device model",
     "powerOnStatus": "Power on status",
@@ -341,6 +346,8 @@
     "clickSearch": "Click Search",
     "spunSugar": "棉花糖",
     "popcorn": "popcorn",
+    "sz": "Sunzee",
+    "sc": "Sevencloud",
     "startUp": "Start up",
     "shutdown": "shutdown",
     "enable": "enable",
@@ -385,9 +392,9 @@
     "furnaceHeadTemperature": "furnace head temperature",
     "temperatureInCabinet": "Temperature in cabinet",
     "humidityInCabinet": "Humidity in cabinet",
-	"showGoods": "Block or display goods",
-	"editCheck": "Are you sure about the change?",
-	"unknownError": "Unknown error!",
+    "showGoods": "Block or display goods",
+    "editCheck": "Are you sure about the change?",
+    "unknownError": "Unknown error!",
     "degree": "degree",
     "volume": "volume",
     "alarmContent": "Alarm content",
@@ -403,8 +410,8 @@
     "pleaseSelectAMachine": "Please select a machine",
     "quantityPurchased": "Quantity purchased",
     "pleaseEnterThePurchaseQuantity": "Please enter the purchase quantity",
-	"download": "Download",
-	"downloading": "Downloading...",
+    "download": "Download",
+    "downloading": "Downloading...",
     "month": "month",
     "weChat": "WeChat",
     "alipay": "Alipay",
@@ -443,7 +450,7 @@
       "customLogoSucceed": "Custom logo success"
     },
     "deleteDevice": "Delete Device",
-	"viewLogs": "View logs",
+    "viewLogs": "View logs",
     "noPosition": "No positioning",
     "equipLocation": "Equipment location",
     "position": "Position",
@@ -469,7 +476,7 @@
     "sureUpdate": "Are you sure you want to update",
     "coupon": "coupon",
     "adRule": "Advertising rules",
-	"changePassword": "Changing device password",
+    "changePassword": "Changing device password",
     "editAdRule": {
       "title": "Edit Rule",
       "ruleName": "Rule Name",
@@ -481,17 +488,17 @@
       "title": "Goods display setting",
       "equipmentName": "Equipment name"
     },
-	"devicePasswordPage":{
-		"title":"Changing device password",
-		"equipmentName":"Equipment name",
-		"deivcePwd": "Equipment password",
-		"adminPassword": "Administrator password",
-		"guestPassword": "Secondary administrator password",
-		"checkDeivcePwd": "Confirm password",
-		"passwordPlaceholder": "Please enter a password of more than 6 characters",
-		"passwordCheckRequired": "Please enter your password again",
-		"passwordMatch": "Two passwords do not match"
-	},
+    "devicePasswordPage": {
+      "title": "Changing device password",
+      "equipmentName": "Equipment name",
+      "deivcePwd": "Equipment password",
+      "adminPassword": "Administrator password",
+      "guestPassword": "Secondary administrator password",
+      "checkDeivcePwd": "Confirm password",
+      "passwordPlaceholder": "Please enter a password of more than 6 characters",
+      "passwordCheckRequired": "Please enter your password again",
+      "passwordMatch": "Two passwords do not match"
+    },
     "flowerType": "Flower type",
     "flowerTypePlace": "Please select the flower type"
   },
@@ -574,7 +581,7 @@
     "totalIncome": "Total income",
     "productNum": "Sales volume",
     "numberOfOrders": "Order quantity",
-	"salesAmount": "Sales amount",
+    "salesAmount": "Sales amount",
     "commonTools": "commonTools",
     "deviceManagement": "Device management",
     "discountCode": "discountCode",
@@ -760,6 +767,7 @@
     "state": "state",
     "paymentMethod": "Payment method",
     "creationTime": "Creation time",
+    "paymentTime": "Payment time",
     "initiateRefund": "Initiate refund",
     "toBePaid": "To be paid",
     "onlinePayment": "Online payment",
@@ -794,13 +802,13 @@
     "clickSearch": "Click Search",
     "selectFullTime": "Select full time",
     "refundAmount": "Refund amount",
-	"refundTip": "Make sure the amount corresponds to the quantity, otherwise it will affect the statistics!",
-	"refundQuantity":"Refund quantity",
-    "refundAmountPlace": "Please enter the refund amount",
-    "most": "most ",
-	"at":"",
+    "refundTip": "Refund please be careful, otherwise it will affect statistics!",
+    "refundQuantity": "Refund quantity",
+    "refundPlace": "Please select product refund",
+    "refundCheck": "Do you confirm the refund ?",
     "accountBalance": "Account balance",
-	"refundSubmit": "Submit applications"
+    "refundSubmit": "Submit applications",
+    "requestFailed": "Request failed"
   },
   "orderExport": {
     "orderAnalysis": "Order Analysis",
@@ -814,6 +822,7 @@
     "totalSales": "Total sales",
     "machines": "Machines",
     "superior": "Superior",
+    "address": "Address",
     "searchPop": {
       "title": "Filter by the following criteria",
       "orderNo": "Order No",
@@ -825,7 +834,12 @@
       "mainOver": "Mainland/overseas",
       "mainOverPlace": "Please select Mainland/overseas",
       "mainland": "mainland",
-      "overseas": "overseas"
+      "overseas": "overseas",
+      "companyTypeLabel": "Company type",
+      "companyTypePlaceholder": "Please select a companytype",
+      "whole": "All",
+      "sz": "Sunzee",
+      "sc": "Sevencloud"
     }
   },
   "role": {
@@ -854,7 +868,7 @@
     "labelMan": "Label management",
     "apkMan": "Apk management",
     "merchantMan": "Merchant management",
-	"accountOperation": "Account operation",
+    "accountOperation": "Account operation",
     "modifyRole": "Modify Role",
     "whole": "whole",
     "roleAddedSuccessfully": "Role added successfully",
@@ -872,22 +886,71 @@
     "illThinkAboutItAgain": "I'll think about it again",
     "confirm": "confirm"
   },
-  "shandeMch": {
+  "huifuMch": {
     "standbyWithdrawalAccountNo": "Standby withdrawal account No",
     "merchantType": "Merchant type",
     "personal": "personal",
     "enterprise": "enterprise",
-    "shandebaoAccountNameLabel": "Shandebao account name",
-    "shandebaoAccountNamePlaceholder": "Please enter Shandebao account name",
-    "shandebaoAccountNumberLabel": "Shandebao account number",
-    "shandebaoAccountNumberPlaceholder": "Please enter Shandebao account number",
-    "interBankNoLabel": "Inter bank No",
-    "interBankNoPlaceholder": "Please enter the inter-bank number",
-    "nameOfDepositBankLabel": "Name of deposit bank",
-    "nameOfDepositBankPlaceholder": "Please enter the name of the deposit bank",
+    "huifuRegName": "Merchant name",
+    "huifuRegNamePlaceholder": "Please enter the merchant name",
+    "shortNameLabel": "Merchant abbreviation",
+    "shortNamePlaceholder": "Please enter short name of merchant",
+    "companyFoundDate": "Establishment time",
+    "companyFoundDatePlaceholder": "Please select the establishment time",
+    "licenseCode": "Business license number",
+    "licenseCodePlaceholder": "Please enter your business license number",
+    "huifuContactName": "Contact name",
+    "huifuContactNamePlaceholder": "Please enter the contact name",
+    "huifuContactMobile": "Contact mobile",
+    "huifuContactMobilePlaceholder": "Please enter the Contact mobile",
+    "huifuContactEmail": "Contact email",
+    "huifuContactEmailPlaceholder": "Please enter the Contact Email",
+    "huifuBusinessAddress": "Business address",
+    "huifuBusinessAddressPlaceholder": "Please select a business address",
+    "huifuOperatingAddress": "Detailed address",
+    "huifuOperatingAddressPlaceholder": "Please enter the full address",
+    "huifuRegisteredAddress": "Registered address",
+    "huifuRegisteredAddressPlaceholder": "Please select a registered address",
+    "huifuRegDetail": "Register full address",
+    "huifuRegDetailPlaceholder": "Please enter your register full address",
+    "huifuServicePhone": "Customer service number",
+    "huifuServicePhonePlaceholder": "Please enter the customer service number",
+    "cardType": "Account type",
+    "personalAccount": "Personal account",
+    "corporateAccount": "Corporate account",
+    "huifuCardName": "Card name",
+    "huifuCardNamePlaceholder": "Please enter the Card name",
+    "huifuCardNo": "Card number",
+    "huifuCardNoPlaceholder": "Please enter the Card number",
+    "branchCode": "Bank Code",
+    "branchCodePlaceholder": "Please enter the bank code",
+    "openLicenceNo": "Basic Deposit Account Number OR Approval Number",
+    "openLicenceNoPlaceholder": "Please enter your basic deposit account number or approval number",
+    "huifuBankAddress": "Bank address",
+    "huifuBankAddressPlaceholder": "Please select a Bank address",
+    "huifuMp": "Billing phone number",
+    "huifuMpPlaceholder": "Please select a Billing phone number",
+    "huifuCertNo": "ID number",
+    "huifuCertNoPlaceholder": "Please enter your ID number",
+    "huifuCertNoMessage": "Please enter the correct ID number",
+    "certAddress": "Id card address",
+    "certAddressPlaceholder": "Please enter your ID address",
+    "certType": "Certificate validity type",
+    "permanent": "Permanent",
+    "noPermanent": "Non-permanent",
+    "beginDate": "Start date",
+    "beginDatePlaceholder": "Please select a start date",
+    "endDate": "Expiration date",
+    "endDatePlaceholder": "Please select an expiration date",
+    "sms": "Verification code",
+    "smsPlaceholder": "Please enter the verification code",
+    "sendSms": "Send verification code",
+    "replaysInSeconds": "Replays in seconds",
+    "successSend": "Successfully sent to",
     "submit": "Submit",
     "submittedSuccessfully": "Submitted successfully",
-    "submitFailed": "Submit failed"
+    "submitFailed": "Submit failed",
+    "update": "Edit"
   },
   "subLedgerManage": {
     "exportOfShandeLedgerData": "exportOfShandeLedgerData",
@@ -968,9 +1031,10 @@
     },
     "joinpayMchCheck": {
       "convergence": "Convergence",
-      "shande": "Shande",
+      "huifu": "Huifu",
       "withAccoDetail": "Withdrawal account details",
       "merchantName": "Merchant name",
+      "shortName": "Merchant abbreviation",
       "merchantType": "Merchant type",
       "contactName": "Contact Name",
       "indiOrPersName": "Name of legal person/individual",
@@ -994,18 +1058,12 @@
       "manuSettByMercPlatform": "Manually settled by merchant platform",
       "day": "day",
       "merchantID": "Merchant ID",
-      "nameOfDepoBank": "Name of deposit bank",
-      "bankNo": "Bank No",
-      "nameOfPayee": "Name of payee",
-      "beneAccoNo": "beneficiary account no",
-      "lastCleaBalance": "Last clearing balance",
-      "balaToBeSettled": "Balance to be settled",
-      "lastSettTime": "Last settlement time",
-      "todaCollBalance": "Today's collection balance",
-      "clearBalance": "Cleared balance",
-      "ShandebaoType": "Shandebao type",
-      "enterpriseShandebao": "Enterprise Shandebao",
-      "personalShandebao": "Personal Shandebao"
+      "phone": "Contact Phone",
+      "email": "Contact Email",
+      "certNo": "ID Card",
+      "cardName": "Card Name",
+      "mp": "Billing Phone",
+      "successful": "Successful"
     }
   },
   "uniPay": {
@@ -1099,8 +1157,8 @@
     "emailCodeRequired": "Please enter the email verification code",
     "registerButton": "Register",
     "replaysInSeconds": "Replays in seconds",
-	"emailRegistration": "Email registration",
-	"phoneRegistration": "Phone registration"
+    "emailRegistration": "Email registration",
+    "phoneRegistration": "Phone registration"
   },
   "robotRanking": {
     "machineSalesRanking": "Machine sales ranking",
@@ -1122,6 +1180,11 @@
     "changeTypePlace": "Please select statistics method",
     "patternStatistics": "Pattern statistics",
     "salesStatistics": "Sales statistics",
+    "companyTypeLabel": "Company type",
+    "companyTypePlaceholder": "Please select a companytype",
+    "whole": "All",
+    "sz": "Sunzee",
+    "sc": "Sevencloud",
     "seleWeekDateRangeNotSeveDays": "The date range of the selected week cannot exceed 7 days!!!",
     "rankMethod": "Ranking method"
   },
@@ -1151,7 +1214,7 @@
     "logOutContent": "Are you sure you want to log out",
     "corrEmailPlace": "Please enter the correct email address",
     "corrPhonePlace": "Please enter the correct mobile number",
-    "bindWechat":"Bind WeChat"
+    "bindWechat": "Bind WeChat"
   },
   "bindWechat": {
     "cancel": "Cancel",
@@ -1228,13 +1291,12 @@
     "M506": "Outer Loop Button"
   },
   "accountOperation": {
-  	"title": "Acount operation",
-  	"accountAuthority": "Account authority",
-  	"distributionSettings": "Distribution Settings",
-  	"withdrawalAccountNo": "Standby withdrawal account No",
-  	"standbyWithdrawalAccountNo": "Standby withdrawal account No",
-  	"merchantManagement": "Merchant management",
-  	"labelMan": "Label management"
-  	
+    "title": "Acount operation",
+    "accountAuthority": "Account authority",
+    "distributionSettings": "Distribution Settings",
+    "withdrawalAccountNo": "Standby withdrawal account No",
+    "standbyWithdrawalAccountNo": "Standby withdrawal account No",
+    "merchantManagement": "Merchant management",
+    "labelMan": "Label management"
   }
 }

+ 110 - 43
src/assets/language/zh.json

@@ -33,7 +33,10 @@
     "refunding":"退款中",
     "refunded":"已退款",
     "orderStatus":"订单状态",
-    "allSuboUsers":"所有下级用户"
+    "allSuboUsers":"所有下级用户",
+    "companies": "公司平台",
+    "sz": "申泽",
+    "sc": "七云"
   },
   "navBar": {
     "homePage": "首页",
@@ -328,6 +331,8 @@
     "merchantNamePlaceholder": "请输入商家名",
     "equipmentTypeLabel": "设备类型",
     "equipmentTypePlaceholder": "请选择设备类型",
+    "companyTypeLabel": "公司平台",
+    "companyTypePlaceholder": "请选择公司平台",
     "equipmentModelLabel": "设备机型",
     "equipmentModelPlaceholder": "请选择设备机型",
     "powerOnStatus": "开机状态",
@@ -338,6 +343,8 @@
     "clickSearch": "点击搜索",
     "spunSugar": "棉花糖",
     "popcorn": "爆米花",
+    "sz":"申泽",
+    "sc":"七云",
     "startUp": "开机",
     "shutdown": "关机",
     "enable": "启用",
@@ -377,17 +384,17 @@
     "sleepState": "睡眠状态",
     "sleeping": "睡眠中",
     "notSleeping": "未睡眠",
-	"sleepDesc": "睡眠描述",
-	"SuspendBusiness": "暂停营业",
-	"sleepDescPlace": "请输入睡眠描述",
+	  "sleepDesc": "睡眠描述",
+	  "SuspendBusiness": "暂停营业",
+	  "sleepDescPlace": "请输入睡眠描述",
     "lastRefreshTime": "最近刷新时间",
     "machineUniqueCode": "机器唯一编码",
     "furnaceHeadTemperature": "炉头温度",
     "temperatureInCabinet": "柜内温度",
     "humidityInCabinet": "柜内湿度",
-	"showGoods": "屏蔽/显示商品",
-	"editCheck": "是否确认更改?",
-	"unknownError": "未知错误!",
+	  "showGoods": "屏蔽/显示商品",
+	  "editCheck": "是否确认更改?",
+	  "unknownError": "未知错误!",
     "degree":"度",
     "volume": "音量",
     "alarmContent": "报警内容",
@@ -719,7 +726,7 @@
     "discountCode": "0折优惠码",
     "paymentPlatform": "支付平台",
     "convergence": "汇聚",
-    "shandePayment": "杉德支付",
+    "shandePayment": "杉德",
     "modificationSubmission": "修改提交",
     "merchantType": "商户类型",
     "contactName": "联系人姓名",
@@ -749,9 +756,9 @@
     "productNum": "销售量",
     "numberOfOrders": "订单数",
     "orderDetails": "订单明细",
-    "exportToExcel": "导出excel",
+    "exportToExcel": "导出 excel",
     "equipmentNo": "设备编号",
-	"equipmentName": "设备名称",
+	  "equipmentName": "设备名称",
     "tradeName": "商品名称",
     "dividingDomesticService": "分佣",
     "business": "商家",
@@ -761,6 +768,7 @@
     "state": "状态",
     "paymentMethod": "支付方式",
     "creationTime": "创建时间",
+    "paymentTime": "支付时间",
     "initiateRefund": "发起退款",
     "toBePaid": "待支付",
     "onlinePayment": "线上支付",
@@ -795,13 +803,13 @@
     "clickSearch": "点击搜索",
     "selectFullTime": "选择完整时间",
     "refundAmount":"退款金额",
-	"refundTip": "确保金额与数量对应,否则会影响统计!",
-	"refundQuantity":"退款数量",
-    "refundAmountPlace":"请输入退款金额",
-    "most":"最多",
-	"at":"个",
+	  "refundTip": "退款请慎重,否则会影响统计!",
+	  "refundQuantity":"退款数量",
+    "refundPlace":"请选择退款商品",
+    "refundCheck": "是否确认退款?",
     "accountBalance":"账户余额",
-	"refundSubmit": "提交申请"
+	  "refundSubmit": "提交申请",
+    "requestFailed": "请求失败"
   },
   "orderExport": {
     "orderAnalysis": "订单分析",
@@ -815,6 +823,7 @@
     "totalSales":"总销售额",
     "machines":"台机器",
     "superior":"所属上级",
+    "address": "地址",
     "searchPop":{
       "title":"根据以下条件筛选",
       "orderNo":"订单编号",
@@ -826,7 +835,12 @@
       "mainOver":"大陆/海外",
       "mainOverPlace":"请选择大陆/海外",
       "mainland":"大陆",
-      "overseas":"海外"
+      "overseas":"海外",
+      "companyTypeLabel": "公司平台",
+      "companyTypePlaceholder":"请选择公司平台",
+      "whole":"全部",
+      "sz": "申泽",
+      "sc": "七云"
     }
   },
   "role": {
@@ -873,22 +887,75 @@
     "illThinkAboutItAgain": "我再想想",
     "confirm": "确认"
   },
-  "shandeMch": {
+  "huifuMch": {
     "standbyWithdrawalAccountNo": "备用提现账号",
     "merchantType": "商户类型",
     "personal": "个人",
     "enterprise": "企业",
-    "shandebaoAccountNameLabel": "杉德宝账号名称",
-    "shandebaoAccountNamePlaceholder": "请输入杉德宝账号名称",
-    "shandebaoAccountNumberLabel": "杉德宝账号号码",
-    "shandebaoAccountNumberPlaceholder": "请输入杉德宝账号号码",
-    "interBankNoLabel": "联行号",
-    "interBankNoPlaceholder": "请输入联行号",
-    "nameOfDepositBankLabel": "开户行名称",
-    "nameOfDepositBankPlaceholder": "请输入开户行名称",
+    "huifuRegName": "商户名称",
+    "huifuRegNamePlaceholder": "请输入商户名称",
+    "shortNameLabel": "商户简称",
+    "shortNamePlaceholder": "请输入商户简称",
+    "companyFoundDate": "成立时间",
+    "licenseCode": "营业执照编号",
+    "licenseCodePlaceholder": "请输入营业执照编号",
+    "companyFoundDatePlaceholder": "请选择成立时间",
+    "validityType": "营业执照有效期类型",
+    "huifuContactName": "联系人姓名",
+    "huifuContactNamePlaceholder": "请输入联系人姓名",
+    "huifuContactMobile": "联系人号码",
+    "huifuContactMobilePlaceholder": "请输入联系人号码",
+    "huifuContactMobileMessage": "请输入正确的手机号码",
+    "huifuContactEmail": "联系人邮箱",
+    "huifuContactEmailPlaceholder": "请输入联系人邮箱",
+    "huifuContactEmailMessage": "请输入正确的邮箱地址",
+    "huifuBusinessAddress": "经营地址",
+    "huifuBusinessAddressPlaceholder": "请选择经营地址",
+    "huifuOperatingAddress": "经营详细地址",
+    "huifuOperatingAddressPlaceholder": "请输入经营详细地址",
+    "huifuRegisteredAddress": "注册地址",
+    "huifuRegisteredAddressPlaceholder": "请选择注册地址",
+    "huifuRegDetail": "注册详细地址",
+    "huifuRegDetailPlaceholder": "请输入注册详细地址",
+    "huifuServicePhone": "客服电话",
+    "huifuServicePhonePlaceholder": "请输入客服电话",
+    "cardType": "结算账户类型",
+    "personalAccount": "个人账户",
+    "corporateAccount": "对公账户",
+    "huifuCardName": "卡户名",
+    "huifuCardNamePlaceholder": "请输入卡户名",
+    "huifuCardNo": "结算卡号",
+    "huifuCardNoPlaceholder": "请输入结算卡号",
+    "huifuCardNoMessage": "请输入正确的银行卡号",
+    "huifuMp": "结算手机号",
+    "huifuMpPlaceholder": "请输入结算手机号",
+    "branchCode": "联行号",
+    "branchCodePlaceholder": "请输入联行号",
+    "openLicenceNo": "基本存款账户编号或核准号",
+    "openLicenceNoPlaceholder": "请输入基本存款账户编号或核准号",
+    "huifuBankAddress": "银行地址",
+    "huifuBankAddressPlaceholder": "请选择银行地址",
+    "huifuCertNo": "身份证号",
+    "huifuCertNoPlaceholder": "请输入身份证号",
+    "huifuCertNoMessage": "请输入正确的身份证号码",
+    "certAddress": "身份证地址",
+    "certAddressPlaceholder": "请输入身份证地址",
+    "certType": "身份证有效期类型",
+    "permanent": "长期有效",
+    "noPermanent": "非长期有效",
+    "beginDate": "有效开始日期",
+    "beginDatePlaceholder": "请选择有效开始日期",
+    "endDate": "有效截止日期",
+    "endDatePlaceholder": "请选择有效截止日期",
+    "sms": "短信验证码",
+    "smsPlaceholder": "请输入短信验证码",
+    "sendSms": "发送验证码",
+    "replaysInSeconds": "秒后可重发",
+    "successSend": "已成功发送到",
     "submit": "提交",
     "submittedSuccessfully": "提交成功",
-    "submitFailed": "提交失败"
+    "submitFailed": "提交失败",
+    "update": "修改"
   },
   "subLedgerManage": {
     "exportOfShandeLedgerData": "杉德分账数据导出",
@@ -970,9 +1037,10 @@
     },
     "joinpayMchCheck":{
       "convergence":"汇聚",
-      "shande":"杉德",
+      "huifu":"汇付",
       "withAccoDetail":"提现账号详情",
       "merchantName":"商户名称",
+      "shortName": "商户简称",
       "merchantType":"商户类型",
       "contactName":"联系人姓名",
       "indiOrPersName":"法人/个人姓名",
@@ -995,19 +1063,13 @@
       "autoSettByConvergence":"由汇聚自动结算",
       "manuSettByMercPlatform":"由商户平台手工结算",
       "day":"日",
-      "merchantID":"商户id",
-      "nameOfDepoBank":"开户行名称",
-      "bankNo":"银行号",
-      "nameOfPayee":"收款人名称",
-      "beneAccoNo":"收款人账号",
-      "lastCleaBalance":"上一次清算余额",
-      "balaToBeSettled":"待清算余额",
-      "lastSettTime":"上一次结算时间",
-      "todaCollBalance":"今日收款余额",
-      "clearBalance":"已清算余额",
-      "ShandebaoType":"杉德宝类型",
-      "enterpriseShandebao":"企业杉德宝",
-      "personalShandebao":"个人杉德宝"
+      "merchantID":"商户ID",
+      "phone":"联系人号码",
+      "email":"联系人邮箱",
+      "certNo": "身份证号",
+      "cardName": "卡户名",
+      "mp": "结算手机号",
+      "successful": "审核成功"
     }
   },
   "uniPay": {
@@ -1103,8 +1165,8 @@
     "emailCodeRequired": "请输入邮箱验证码",
     "registerButton": "注册",
     "replaysInSeconds": "秒后可重发",
-	"emailRegistration": "邮箱注册",
-	"phoneRegistration": "手机注册"
+	  "emailRegistration": "邮箱注册",
+	  "phoneRegistration": "手机注册"
   },
   "robotRanking": {
     "machineSalesRanking":"机器销售排行榜",
@@ -1126,6 +1188,11 @@
     "changeTypePlace":"请选择统计方式",
     "patternStatistics":"花型统计",
     "salesStatistics":"销售额统计",
+    "companyTypeLabel": "公司平台",
+    "companyTypePlaceholder":"请选择公司平台",
+    "whole":"全部",
+    "sz": "申泽",
+    "sc": "七云",
     "seleWeekDateRangeNotSeveDays":"选择周的日期范围不能超过7天!!!",
     "rankMethod":"排行方式"
   },

+ 2 - 2
src/components/commom/kDialog/index.less

@@ -2,10 +2,10 @@
 
   .operCheckBox {
     padding: 0 10px;
-    padding-top: 20px;
+    padding-top: 10px;
 
     .operCheckCon {
-      padding-top: 20px;
+      padding-top: 10px;
       border-top: 1px solid #D7D7E2;
 
       .word10 {

+ 69 - 45
src/components/typeSelectList/index.vue

@@ -9,38 +9,35 @@
         <div class="layer1 flex-col"></div>
       </div>
       <van-popup v-model:show="adminTypeShow" position="bottom">
-        <van-picker
-          :title="$t('typeSelectList.merchant')"
-          :columns="adminList"
-          @confirm="adminConfirm"
-          @cancel="adminCancel"
-        />
+        <van-picker :title="$t('typeSelectList.merchant')" :columns="adminList" @confirm="adminConfirm"
+          @cancel="adminCancel" />
+      </van-popup>
+      <div v-if="isShowCompany()" class="selectIconBox" @click="companyShow()">
+        <div class="section3 flex-col"></div>
+        <span class="txt4">{{ companies }}</span>
+        <div class="layer1 flex-col"></div>
+      </div>
+      <van-popup v-model:show="companyType" position="bottom">
+        <van-picker :title="$t('typeSelectList.companies')" :columns="companyList" @confirm="companyConfirm"
+          @cancel="companyCancel" />
       </van-popup>
       <div class="selectIconBox" @click="payShow()">
         <div class="section3 flex-col"></div>
-        <span class="txt4">{{paymentMethod}}</span>
+        <span class="txt4">{{ paymentMethod }}</span>
         <div class="layer1 flex-col"></div>
       </div>
       <van-popup v-model:show="payType" position="bottom">
-        <van-picker
-          :title="$t('typeSelectList.paymentMethod')"
-          :columns="payList"
-          @confirm="payConfirm"
-          @cancel="payCancel"
-        />
+        <van-picker :title="$t('typeSelectList.paymentMethod')" :columns="payList" @confirm="payConfirm"
+          @cancel="payCancel" />
       </van-popup>
       <div v-if="isShowDevice()" class="selectIconBox" @click="deviceShow()">
         <div class="layer3 flex-col"></div>
-        <span class="txt4">{{allDevices}}</span>
+        <span class="txt4">{{ allDevices }}</span>
         <div class="layer1 flex-col"></div>
       </div>
       <van-popup v-model:show="deviceType" position="bottom">
-        <van-picker
-          :title="$t('typeSelectList.allDevices')"
-          :columns="deviceList"
-          @confirm="deviceConfirm"
-          @cancel="deviceCancel"
-        />
+        <van-picker :title="$t('typeSelectList.allDevices')" :columns="deviceList" @confirm="deviceConfirm"
+          @cancel="deviceCancel" />
       </van-popup>
       <!-- <div class="selectIconBox" @click="productShow()">
         <div class="bd2 flex-col"></div>
@@ -58,16 +55,12 @@
       <!-- 订单状态 -->
       <div v-if="!isHome" class="selectIconBox" @click="orderStatusShow()">
         <div class="section3 flex-col"></div>
-        <span class="txt4">{{orderStatusName}}</span>
+        <span class="txt4">{{ orderStatusName }}</span>
         <div class="layer1 flex-col"></div>
       </div>
       <van-popup v-model:show="orderStatus" position="bottom">
-        <van-picker
-          :title="$t('typeSelectList.orderStatus')"
-          :columns="orderStatusList"
-          @confirm="orderStatusConfirm"
-          @cancel="orderStatusCancel"
-        />
+        <van-picker :title="$t('typeSelectList.orderStatus')" :columns="orderStatusList" @confirm="orderStatusConfirm"
+          @cancel="orderStatusCancel" />
       </van-popup>
     </div>
   </div>
@@ -84,15 +77,17 @@ export default {
   components: {},
   props: {
     // 是否首页
-    isHome:{
-      type:Boolean,
-      default:false,
+    isHome: {
+      type: Boolean,
+      default: false,
     },
   },
   setup(props, { emit }) {
     const { t } = useI18n();
     // 支付方式
     const paymentMethod = ref(t('typeSelectList.paymentMethod'));
+    // 公司平台
+    const companies = ref(t('typeSelectList.companies'));
     // 所有设备
     const allDevices = ref(t('typeSelectList.allDevices'));
     // 订单状态
@@ -103,7 +98,8 @@ export default {
       adminType: '',
       clientId: '',
       payType: '',
-      productNo: ''
+      productNo: '',
+      companyType: ''
     });
     // 商户选择
     const adminTypeShow = ref(false);
@@ -111,14 +107,14 @@ export default {
     const adminList = ref([]);
     const adminConfirm = (currentValue) => {
       searchParams.adminType = (currentValue === t('typeSelectList.allSuboUsers')) ? 'all' : '';
-      searchParams.userName = (currentValue === t('typeSelectList.allSuboUsers')) ? 'all' : (currentValue === t('typeSelectList.thisMerchant'))?user.username:currentValue;
+      searchParams.userName = (currentValue === t('typeSelectList.allSuboUsers')) ? 'all' : (currentValue === t('typeSelectList.thisMerchant')) ? user.username : currentValue;
       adminTypeShow.value = false;
       outputDate();
     }
     const adminCancel = () => { adminTypeShow.value = false; }
     // 获取商家列表
     const getAdminListFun = async () => {
-      const { data } = await getAdminList({adminId: user.id});
+      const { data } = await getAdminList({ adminId: user.id });
       if (data.code === '00000') {
         adminList.value = data.data.map(item => {
           return item.username
@@ -127,6 +123,27 @@ export default {
         adminList.value.unshift(t('typeSelectList.allSuboUsers'));
       }
     }
+    // 公司平台选择
+    const companyType = ref(false);
+    const companyShow = () => { companyType.value = true; };
+    const companySouerList = [
+      { text: t('typeSelectList.whole'), values: '' },
+      { text: t('typeSelectList.sz'), values: '0' },
+      { text: t('typeSelectList.sc'), values: '1' },
+    ];
+    const companyList = ref([
+      t('typeSelectList.whole'),
+      t('typeSelectList.sz'),
+      t('typeSelectList.sc'),
+    ]);
+    const companyConfirm = (currentValue) => {
+      companies.value = currentValue;
+      const selectPay = companySouerList.filter(i => i.text === currentValue);
+      if (selectPay && selectPay.length > 0) { searchParams.companyType = selectPay[0].values; }
+      companyType.value = false;
+      outputDate();
+    }
+    const companyCancel = () => { companyType.value = false; }
     // 支付方式选择
     const payType = ref(false);
     const payShow = () => { payType.value = true; };
@@ -187,14 +204,14 @@ export default {
     const deviceCancel = () => { deviceType.value = false; }
     // 获取设备列表
     const getDeviceListFun = async () => {
-      const { data } = await getEquipmentList({adminId: user.id});
+      const { data } = await getEquipmentList({ adminId: user.id });
       if (data.code === '00000') {
         deviceList.value = data.data.map(item => {
           return item.name
         });
         deviceList.value.unshift(t('typeSelectList.allDevices'));
         equipmentSourceList.value = data.data;
-        equipmentSourceList.value.unshift({name: t('typeSelectList.allDevices'), id: null});
+        equipmentSourceList.value.unshift({ name: t('typeSelectList.allDevices'), id: null });
       }
     }
     // 商品选择
@@ -213,17 +230,19 @@ export default {
     const productCancel = () => { productType.value = false; }
     // 获取商品列表
     const getProductListFun = async () => {
-      const { data } = await getProductList({adminId: user.id});
+      const { data } = await getProductList({ adminId: user.id });
       if (data.code) {
         productList.value = data.data.map(item => {
           return item.productName
         });
-      console.log('productList',productList)
+        console.log('productList', productList)
         productSourceList.value = data.data;
       }
     }
     // 是否商户
     const isShowAdmin = () => { return (user && user.type === 2); }
+    // 是否管理员
+    const isShowCompany = () => { return (user && user.type === 0); }
     // 是否商户及子账户
     const isShowDevice = () => { return (user && (user.type === 2 || user.type === 3)); }
     // 返回参数
@@ -232,12 +251,12 @@ export default {
     const orderStatus = ref(false);
     const orderStatusShow = () => { orderStatus.value = true; };
     const orderStatusList = ref([
-          t('typeSelectList.whole'),
-          t('typeSelectList.unpaid'),
-          t('typeSelectList.paid'),
-          t('typeSelectList.refunding'),
-          t('typeSelectList.refunded'),
-        ]
+      t('typeSelectList.whole'),
+      t('typeSelectList.unpaid'),
+      t('typeSelectList.paid'),
+      t('typeSelectList.refunding'),
+      t('typeSelectList.refunded'),
+    ]
     );
     const orderStatusSouerList = [
       { text: t('typeSelectList.whole'), values: '' },
@@ -254,7 +273,7 @@ export default {
       outputDate();
     }
     const orderStatusCancel = () => { orderStatus.value = false; }
-    
+
     onMounted(() => {
       getAdminListFun();
       getDeviceListFun();
@@ -264,19 +283,24 @@ export default {
       ...toRefs(searchParams),
       // 是否商户
       isShowAdmin,
+      // 是否管理员
+      isShowCompany,
       // 是否商户及子账户
       isShowDevice,
       // 商家选择
       adminTypeShow, adminList, adminShow, adminConfirm, adminCancel,
       // 支付方式选择
       payType, payList, payShow, payConfirm, payCancel,
+      // 公司平台选择
+      companyType, companyList, companyShow, companyConfirm, companyCancel,
       // 设备选择
       deviceType, deviceList, deviceShow, deviceConfirm, deviceCancel,
       // 商品选择
       productType, productList, productShow, productConfirm, productCancel,
       // 订单状态
-      orderStatusShow,orderStatus,orderStatusList,orderStatusConfirm,orderStatusCancel,
+      orderStatusShow, orderStatus, orderStatusList, orderStatusConfirm, orderStatusCancel,
       paymentMethod,
+      companies,
       allDevices,
       orderStatusName,
     };

+ 5 - 1
src/main.js

@@ -3,7 +3,8 @@ import {
   ActionBar, ActionBarIcon, ActionBarButton, Divider, Popup, Overlay, Loading, Dialog, ContactCard, Form, AddressEdit,
   AddressList, Field, CellGroup, Cell, SwipeCell, Icon, Stepper, Card, Checkbox, CheckboxGroup, Button, Swipe, SwipeItem,
   PullRefresh, List, Tab, Tabs, SubmitBar, Toast, Skeleton, RadioGroup, Radio, NoticeBar, ActionSheet, Cascader, Col, Row,
-  Slider, DatetimePicker, Switch, Calendar, Picker, Uploader, Tag, DropdownMenu, DropdownItem, Notify, ConfigProvider
+  Slider, DatetimePicker, Switch, Calendar, Picker, Uploader, Tag, DropdownMenu, DropdownItem, Notify, ConfigProvider, NavBar,
+  Area
 } from 'vant';
 import { Image as VanImage } from 'vant';
 import App from './App.vue'
@@ -78,6 +79,9 @@ app.use(ActionBarButton)
   .use(DropdownItem)
   .use(Notify)
   .use(ConfigProvider)
+  .use(NavBar)
+  .use(Area)
+  
 
 app.use(router)
 app.use(store)

+ 28 - 22
src/router/index.js

@@ -17,7 +17,7 @@ const router = createRouter({
     // 忘记密码页面
     { path: '/forgetpassword', name: 'forgetPassword', component: () => import('@/views/forgetPassword'), meta: { index: 1, noLogin: true } },
     // 绑定微信
-    { path: '/bindWechat', name: 'bindWechat', component: () => import('@/views/bindWechat.vue'), meta: {index: 1, noLogin: true}},
+    { path: '/bindWechat', name: 'bindWechat', component: () => import('@/views/bindWechat.vue'), meta: { index: 1, noLogin: true } },
     // 修改密码页面
     { path: '/changepassword', name: 'changePassword', component: () => import('@/views/changePassword'), meta: { index: 1, noLogin: true } },
     // 设备页面
@@ -28,31 +28,33 @@ const router = createRouter({
     { path: '/editTag', name: 'editTag', component: () => import('@/views/device/tagSet/index.vue'), meta: { index: 1 } },
     // { path: '/deviceOpr', name: 'deviceOpr', component: () => import('@/views/device/deviceOper2.vue'), meta: { index: 1 } },
     // 音量调节
-    { path: '/modulation', name: 'modulation', component: () => import('@/views/device/modulation.vue'), meta: { index: 1} },
-	// 远程开门
-	{ path: '/openDoor', name: 'openDoor', component: () => import('@/views/device/openDoor.vue'), meta: { index: 1} },
+    { path: '/modulation', name: 'modulation', component: () => import('@/views/device/modulation.vue'), meta: { index: 1 } },
+    // 远程开门
+    { path: '/openDoor', name: 'openDoor', component: () => import('@/views/device/openDoor.vue'), meta: { index: 1 } },
     // 远程做糖
-    { path: '/doSugar', name: 'doSugar', component: () => import('@/views/device/doSugar.vue'), meta: { index: 1} },
+    { path: '/doSugar', name: 'doSugar', component: () => import('@/views/device/doSugar.vue'), meta: { index: 1 } },
     // 今日做糖列表
-    { path: '/toDaySugarList', name: 'toDaySugarList', component: () => import('@/views/device/toDaySugarList.vue'), meta: { index: 1} },
+    { path: '/toDaySugarList', name: 'toDaySugarList', component: () => import('@/views/device/toDaySugarList.vue'), meta: { index: 1 } },
     // 定时开关
-    { path: '/alarmClock', name: 'alarmClock', component: () => import('@/views/device/alarmClock.vue'), meta: { index: 1} },
+    { path: '/alarmClock', name: 'alarmClock', component: () => import('@/views/device/alarmClock.vue'), meta: { index: 1 } },
     // 设置闹钟
-    { path: '/alarmClockAdd', name: 'alarmClockAdd', component: () => import('@/views/device/alarmClockSet/index.vue'), meta: { index: 1} },
-    { path: '/alarmClockSet', name: 'alarmClockSet', component: () => import('@/views/device/alarmClockSet/index.vue'), meta: { index: 1} },
+    { path: '/alarmClockAdd', name: 'alarmClockAdd', component: () => import('@/views/device/alarmClockSet/index.vue'), meta: { index: 1 } },
+    { path: '/alarmClockSet', name: 'alarmClockSet', component: () => import('@/views/device/alarmClockSet/index.vue'), meta: { index: 1 } },
     // 参数设置
-    { path: '/paramsSet', name: 'paramsSet', component: () => import('@/views/device/paramsSet/index.vue'), meta: { index: 1} },
-    { path: '/paramsSetInfo', name: 'paramsSetInfo', component: () => import('@/views/device/paramsSet/paramsSetInfo.vue'), meta: { index: 1} },
+    { path: '/paramsSet', name: 'paramsSet', component: () => import('@/views/device/paramsSet/index.vue'), meta: { index: 1 } },
+    { path: '/paramsSetInfo', name: 'paramsSetInfo', component: () => import('@/views/device/paramsSet/paramsSetInfo.vue'), meta: { index: 1 } },
     // 添加分销人
-    { path: '/saveProportion', name: 'saveProportion', component: () => import('@/views/device/saveProportion/index.vue'), meta: { index: 1} },
+    { path: '/saveProportion', name: 'saveProportion', component: () => import('@/views/device/saveProportion/index.vue'), meta: { index: 1 } },
     // 设备充值
-    { path: '/recharge', name: 'recharge', component: () => import('@/views/device/recharge.vue'), meta: { index: 1} },
+    { path: '/recharge', name: 'recharge', component: () => import('@/views/device/recharge.vue'), meta: { index: 1 } },
     // 机器排行
     { path: '/robotranking', name: 'robotranking', component: () => import('@/views/robotRanking.vue'), meta: { index: 1 } },
     // 个人中心
     { path: '/user', name: 'user', component: () => import('@/views/user.vue'), meta: { index: 1 } },
     // 备用提现账号
-    { path: '/shandeMch', name: 'shandeMch', component: () => import('@/views/shandeMch/index'), meta: { index: 1 } },
+    { path: '/huifuMch', name: 'huifuMch', component: () => import('@/views/huifuMch/index'), meta: { index: 1 } },
+    // 汇付信息修改
+    { path: '/huifuMchEdit', name: 'huifuMchEdit', component: () => import('@/views/huifuMch/update'), meta: { index: 1 } },
     // 提现账号
     { path: '/joinpayMch', name: 'joinpayMch', component: () => import('@/views/joinpayMch/index'), meta: { index: 1 } },
     // 自充值
@@ -111,22 +113,26 @@ const router = createRouter({
     { path: '/labelManAdd', name: 'labelManAdd', component: () => import('@/views/labelMan/add'), meta: { index: 1 } },
     // 修改价格
     { path: '/modifyPrice', name: 'modifyPrice', component: () => import('@/views/device/modifyPrice/index'), meta: { index: 1 } },
-	// 屏蔽/展示商品
-	{ path: '/showGoods', name: 'showGoods', component: () => import('@/views/device/showGoods/index'), meta: { index: 1 } },
-	// 修改机器密码
-	{ path: '/devicePassword', name: 'devicePassword', component: () => import('@/views/device/devicePassword/index'), meta: { index: 1 } },
+    // 屏蔽/展示商品
+    { path: '/showGoods', name: 'showGoods', component: () => import('@/views/device/showGoods/index'), meta: { index: 1 } },
+    // 修改机器密码
+    { path: '/devicePassword', name: 'devicePassword', component: () => import('@/views/device/devicePassword/index'), meta: { index: 1 } },
     // 查看定位
-    { path: '/viewPosition', name: 'viewPosition', component: () => import('@/views/device/viewPosition/index'), meta: { index: 1 } },  
+    { path: '/viewPosition', name: 'viewPosition', component: () => import('@/views/device/viewPosition/index'), meta: { index: 1 } },
     // 设备编辑-编辑规则
     { path: '/editAdRule', name: 'editAdRule', component: () => import('@/views/device/editAdRule/index'), meta: { index: 1 } },
     // 跳转空中云汇
     { path: '/hpp', name: 'Hpp', component: () => import('@/views/Hpp.vue'), meta: { index: 1, noLogin: true } },
+    // 跳转汇付微信支付
+    { path: '/weChatPay', name: 'weChatPay', component: () => import('@/views/weChatPay.vue'), meta: { index: 1, noLogin: true } },
+    // 弹出微信支付
+    { path: '/popPayment', name: 'popPayment', component: () => import('@/views/popPayment.vue'), meta: { index: 1, noLogin: true } },
     // 定制logo
-    { path: '/customLogo', name: 'customLogo', component: () => import('@/views/device/customLogo.vue'), meta: { index: 1} },
+    { path: '/customLogo', name: 'customLogo', component: () => import('@/views/device/customLogo.vue'), meta: { index: 1 } },
     // 查看日志
     { path: '/viewLogs', name: 'viewLogs', component: () => import('@/views/device/viewLogs/index'), meta: { index: 1 } },
-	// 账户操作
-	{ path: '/accountOperation', name: 'accountOperation', component: () => import('@/views/accountOperation/index'), meta: { index: 1 } },
+    // 账户操作
+    { path: '/accountOperation', name: 'accountOperation', component: () => import('@/views/accountOperation/index'), meta: { index: 1 } },
     // apk管理,广告管理,订单导出 不是所有的帐号能看到
   ]
 });

+ 38 - 0
src/service/huifuMch/index.js

@@ -0,0 +1,38 @@
+import axios from '@/utils/axios';
+import { stringToUrl } from '@/common/js/utils';
+
+// 商户入驻申请
+export function saveHuifuMch(params) {
+    return axios.post(`/SZWL-SERVER/tHuifuMch/addMerchant`, params);
+}
+
+// 获取审核信息
+export function getHuifuMchCheck(params) {
+    return axios.get(`/SZWL-SERVER/tHuifuMch/getHuifuMchCheck?${stringToUrl(params)}`);
+}
+
+// 上传材料图片
+export function uploadPic(params) {
+    return axios.post(`/SZWL-SERVER/tHuifuMch/uploadPic`, params);
+}
+
+// 提交审核
+export function submitHuifuCheck(params) {
+    return axios.post(`/SZWL-SERVER/tHuifuMch/submitCheck`, params);
+}
+
+// 提交修改审核
+export function updateMerchant(params) {
+    return axios.post(`/SZWL-SERVER/tHuifuMch/updateMerchant`, params);
+}
+
+// 发送验证码
+export function sendSms(params) {
+    return axios.get(`/SZWL-SERVER/tHuifuMch/sendSms?${stringToUrl(params)}`);
+}
+
+// 获取商户号
+export function getHuifuId(params) {
+    return axios.get(`/SZWL-SERVER/tHuifuMch/getHuifuId?${stringToUrl(params)}`);
+}
+

+ 1 - 1
src/service/login.js

@@ -3,7 +3,7 @@ import { stringToUrl } from '@/common/js/utils';
 
 // 登录
 export function login(params) {
-  return axios.post(`/SZWL-SERVER/tAdmin/login?username=${params.username}&password=${params.password}`, params);
+  return axios.post(`/SZWL-SERVER/tAdmin/login?username=${params.username}&password=${params.password}&hostName=${params.hostName}`, params);
 }
 // 根据系统ID获取logo和系统名称
 export function getSys(params) {

+ 8 - 0
src/service/popPayment.js

@@ -0,0 +1,8 @@
+import axios from '../utils/axios';
+import { stringToUrl } from '@/common/js/utils';
+
+
+// 修改密码
+export function getOrderBySn(params) {
+  return axios.get(`/PAY-SERVER/tOrder/getOrderBySn?${stringToUrl(params)}`,params);
+}

+ 8 - 0
src/service/taskMessage/index.js

@@ -17,6 +17,14 @@ export function gettJoinpayMchCheckInfo(params) {
 export function changetJoinpayMchCheckStatus(params) {
   return axios.get(`/SZWL-SERVER/tJoinpayMchCheck/shenhe?${stringToUrl(params)}`);
 }
+// 汇付账号入驻审批
+export function auditAddMerchant(params) {
+  return axios.get(`/SZWL-SERVER/tHuifuMch/auditAddMerchant?${stringToUrl(params)}`);
+}
+// 汇付账号修改审批
+export function auditUpdateMerchant(params) {
+  return axios.get(`/SZWL-SERVER/tHuifuMch/auditUpdateMerchant?${stringToUrl(params)}`);
+}
 // 获取设备列表
 export function getEquipmentList(params) {
   return axios.get(`/SZWL-SERVER/tEquipment/listEquipment?${stringToUrl(params)}`);

+ 4 - 0
src/service/test.js

@@ -88,4 +88,8 @@ export function getJoinPayMch(params) {
 // 保存提现账号
 export function saveJoinPayMch(params) {
     return axios.post(`/SZWL-SERVER/tJoinpayMch/save`, params)
+}
+// 上传图片
+export function uploadPic(params) {
+    return axios.post(`/tHuifuMch/uploadPic`, params)
 }

+ 1 - 1
src/styles/alarmClock/index.less

@@ -1,4 +1,4 @@
-.page {
+.pageClock {
   background-color: rgba(255, 255, 255, 1);
   position: relative;
   width: 100%;

+ 1 - 1
src/styles/deviceOper/index.less

@@ -124,7 +124,7 @@
     }
 }
 
-.page {
+.pageDoor {
     background-color: rgba(255, 255, 255, 1);
     position: relative;
     width: 100%;

+ 1 - 1
src/styles/deviceSet/index.less

@@ -1,4 +1,4 @@
-.page {
+.deviceSetPage {
     background-color: rgba(255, 255, 255, 1);
     position: relative;
     width: 100%;

+ 1 - 1
src/styles/doSugar/index.less

@@ -1,4 +1,4 @@
-.page {
+.sugarPage {
     background-color: rgba(255, 255, 255, 1);
     position: relative;
     width: 100%;

+ 1 - 1
src/styles/modulation/index.less

@@ -1,4 +1,4 @@
-.page {
+.modulationPage {
   background-color: rgba(255, 255, 255, 1);
   position: relative;
   width: 100%;

+ 159 - 34
src/styles/orderCenter/index.less

@@ -4,12 +4,14 @@
     height: calc(100% - 44px);
     overflow: auto;
     overflow-x: hidden;
+    background-color: #f5f5f5;
 
     .main3 {
       width: 100%;
       height: 54px;
       background: rgba(255, 255, 255, 1) url("../../assets/home/line.png") bottom center no-repeat;
       background-size: 100% auto;
+      background-color: #f5f5f5;
       margin-bottom: 21px;
 
       .outer1 {
@@ -231,19 +233,26 @@
     }
 
     .group7 {
-      height: 54px;
+      height: 50px;
       margin-top: 10px;
+      margin-bottom: 10px;
       width: 100%;
       background: rgba(255, 255, 255, 1) url("../../assets/home/line.png") bottom center no-repeat;
-      background-size: 100% auto;
+      background-color: #fff;
+
 
       .main9 {
         width: 100%;
+        padding: 2.5px 10px;
+        height: 30px;
+        display: flex;
+        align-items: center;
+
 
         .wrap1 {
           width: 100%;
-          height: 19px;
-          padding: 0 14px;
+          height: 30px;
+          padding: 0 12px;
 
           .ImageText7 {
             height: 18px;
@@ -316,21 +325,41 @@
 
       .group8 {
         background-color: rgba(255, 255, 255, 1);
-        margin-top: -1px;
+        // margin-top: 1px;
         width: 100%;
         position: relative;
 
         .section4 {
           width: 100%;
-          margin-top: 13px;
+          // margin-top: 13px;
 
           .section5 {
             width: 100%;
-            padding: 14px;
+            height: 150px;
             position: relative;
+            padding: 2.5px 10px;
+            background-color: #f5f5f5;
+
+            .van-card {
+              height: 140px;
+              background-color: #ffff;
+              display: flex;
+              align-items: center;
+              border-radius: 20px;
+              box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
+
+            }
+
+            .van-card__thumb {
+              margin-top: 15px;
+            }
+
+            .van-image__img {
+              object-fit: none !important;
+            }
 
             .sugerPhto {
-              width: 20%;
+              width: 10%;
             }
 
             .sugerImg {
@@ -400,49 +429,66 @@
               height: 13px;
               overflow-wrap: break-word;
               color: rgba(64, 77, 116, 1);
-              font-size: 14px;
+              font-size: 12px;
               text-align: left;
               white-space: nowrap;
               line-height: 14px;
               display: block;
+              // margin-top: 50px;
+            }
+
+            .van-card__footer {
+              position: absolute;
+              top: 112px;
+              right: 15px;
+              width: 60px;
+              overflow-wrap: break-word;
+              color: rgba(64, 77, 116, 1);
+              font-size: 13px;
+              white-space: nowrap;
+              line-height: 14px;
+              display: block;
             }
 
             .info5 {
-              height: 20px;
+              height: 16px;
               overflow-wrap: break-word;
               color: rgba(77, 193, 147, 1);
               font-size: 14px;
               font-family: PingFangSC-Semibold;
               text-align: center;
               white-space: nowrap;
-              line-height: 20px;
+              // line-height: 20px;
               display: block;
-              padding-right: 0.5em;
+              padding-right: 0.2em;
             }
 
             .word12 {
-              height: 30px;
+              height: 23px;
+              width: 45px;
               overflow-wrap: break-word;
               color: rgba(77, 193, 147, 1);
-              font-size: 22px;
+              font-size: 20px;
               font-family: PingFangSC-Semibold;
               text-align: left;
               white-space: nowrap;
               line-height: 30px;
               display: block;
+              padding-right: 0.5em;
             }
 
             .word14 {
-              width: 65px;
-              height: 13px;
+              width: 60px;
+              height: 12px;
               overflow-wrap: break-word;
               color: rgba(229, 154, 109, 1);
-              font-size: 14px;
+              font-size: 12px;
               font-family: PingFangSC-Medium;
               text-align: left;
               white-space: nowrap;
               line-height: 14px;
               display: block;
+              padding-right: 0.5em;
             }
 
             .word11 {
@@ -450,33 +496,44 @@
               width: auto;
               overflow-wrap: break-word;
               color: rgba(64, 77, 116, 1);
-              font-size: 14px;
-              text-align: left;
+              font-size: 13px;
               white-space: nowrap;
               line-height: 14px;
-              margin-top: 30px;
-              margin-bottom: 10px;
+              margin-top: 10px;
+              // margin-bottom: 10px;
               display: block;
             }
 
+            .van-card__bottom {
+              height: 80px;
+              width: 200px;
+            }
+
             .word13 {
-              height: 14px;
+              // height: 14px;
               width: 4.375rem;
               overflow-wrap: break-word;
               color: rgba(64, 77, 116, 1);
-              font-size: 14px;
-              text-align: left;
-              // white-space: nowrap;
+              font-size: 13px;
               line-height: 14px;
               display: block;
-              margin-top: 30px;
-              margin-bottom: 10px;
-              margin-left: 20px;
               overflow: hidden;
               text-overflow: ellipsis;
               white-space: nowrap;
             }
 
+            .time_01 {
+              height: 13px;
+              overflow-wrap: break-word;
+              color: rgba(64, 77, 116, 1);
+              font-size: 12px;
+              text-align: left;
+              white-space: nowrap;
+              line-height: 14px;
+              display: block;
+              margin-top: 40px;
+            }
+
             .main11 {
               position: absolute;
               top: 10px;
@@ -508,7 +565,7 @@
 
           .section6 {
             width: 100%;
-            height: 1px;
+            height: 2px;
             background: url('../../assets/order/itemLine.png') top center no-repeat;
             background-size: 100%;
           }
@@ -894,7 +951,7 @@
     .section1 {
       background-color: rgba(255, 255, 255, 1);
       border-radius: 8px 8px 0px 0px;
-      height: 395px;
+      height: 425px;
       width: 100%;
 
       .group3 {
@@ -992,13 +1049,14 @@
         }
 
         .layer3 {
-          width: 183px;
+          width: 300px;
           height: 18px;
           margin: 8px 0 0 15px;
+          // overflow: auto;
 
           .word2 {
-            width: 26px;
-            height: 18px;
+            width: 90px;
+            height: 14px;
             overflow-wrap: break-word;
             color: rgba(135, 135, 166, 1);
             font-size: 13px;
@@ -1009,15 +1067,18 @@
           }
 
           .info3 {
-            width: 91px;
+            width: 230px;
             height: 18px;
             overflow-wrap: break-word;
             color: rgba(64, 77, 116, 1);
             font-size: 13px;
             text-align: left;
+            text-overflow: ellipsis;
             white-space: nowrap;
+            overflow: hidden;
             line-height: 18px;
             display: block;
+
           }
         }
 
@@ -1165,6 +1226,29 @@
     }
   }
 
+  .btnFooter {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+
+
+    .checkAllBtn {
+      width: 40%;
+      padding-left: 15px;
+      padding-top: 5px;
+      height: 30px;
+    }
+
+    .totalRefund {
+      color: #df5e4c;
+      font-size: 20px;
+      font-family: PingFangSC-Semibold;
+    }
+
+  }
+
+
+
   .cust_vantBorder {
     display: flex;
     justify-content: flex-end;
@@ -1174,6 +1258,47 @@
     flex-direction: column;
     /* 垂直方向上排列子元素 */
 
+    .van-card {
+      background-color: #ffff;
+      width: 100%;
+    }
+
+    .van-card__thumb {
+      width: 60px;
+      height: 60px;
+    }
+
+    .van-image__img {
+      object-fit: contain !important;
+    }
+
+    .van-card__footer {
+      position: absolute;
+      top: 25px;
+      right: 15px;
+      // width: 20px;
+      overflow-wrap: break-word;
+      // color: rgba(64, 77, 116, 1);
+      font-size: 13px;
+      white-space: nowrap;
+      line-height: 14px;
+      display: block;
+    }
+
+    .card01 {
+      display: flex;
+      width: 90%;
+      height: 90px;
+    }
+
+    .van-card__content {
+      height: 50px;
+    }
+
+    .van-card__bottom {
+      margin-bottom: 25px;
+    }
+
     .inputAmount {
       width: 100%;
     }

+ 8 - 5
src/styles/orderExport/index.less

@@ -1,4 +1,4 @@
-.page {
+.orderExpotPage {
     background-color: #fff;
     width: 100%;
     height: calc(100%-44px);
@@ -199,11 +199,11 @@
 
                 .mod10 {
                     width: 100%;
-                    padding: 10px 0;
+                    padding: 5px 0;
 
                     .txt3 {
                         // width: 72px;
-                        height: 13px;
+                        height: 14px;
                         overflow-wrap: break-word;
                         color: rgba(64, 77, 116, 1);
                         font-size: 14px;
@@ -214,8 +214,8 @@
                     }
 
                     .txt4 {
-                        width: 166px;
-                        height: 13px;
+                        width: auto;
+                        height: 14px;
                         overflow-wrap: break-word;
                         color: rgba(64, 77, 116, 1);
                         font-size: 14px;
@@ -232,8 +232,11 @@
                     overflow-wrap: break-word;
                     color: rgba(64, 77, 116, 1);
                     font-size: 13px;
+                    overflow: hidden;
                     text-align: left;
                     line-height: 13px;
+                    text-overflow: ellipsis;
+                    white-space: nowrap;
                     display: block;
                 }
 

+ 1 - 1
src/styles/recharge/index.less

@@ -1,4 +1,4 @@
-.page {
+.rechargePage {
     background-color: rgba(255, 255, 255, 1);
     position: relative;
     width: 100%;

+ 1 - 1
src/styles/uniPay/index.less

@@ -1,4 +1,4 @@
-.page {
+.pageUniPay {
     background-color: rgba(255, 255, 255, 1);
     position: relative;
     width: 375px;

+ 1 - 1
src/styles/viewLogs/index.less

@@ -1,4 +1,4 @@
-.page {
+.viewLogsPage {
 	background-color: rgba(255, 255, 255, 1);
 	position: relative;
 	width: 100%;

+ 2 - 2
src/utils/config.js

@@ -2,8 +2,8 @@ let baseURL;
 // 开发环境
 if (process.env.NODE_ENV === 'development') {
     // 测试的
-    // baseURL = 'http://szwltest.sunzee.com.cn:49002/'
-    baseURL = 'https://szwl.sunzee.com.cn/'
+    baseURL = 'http://szwltest.sunzee.com.cn:49002/'
+    // baseURL = 'https://szwl.sunzee.com.cn/'
     // 正式的
     // baseURL = 'https://sz.sunzee.com.cn/'
     

+ 1 - 0
src/views/accountPer/add.vue

@@ -110,6 +110,7 @@ export default {
       isEnabled: true,
       roleList: "",
       equipmentIds: "",
+      companyType: "0",
     });
     const cofficentForm = ref({
       equipmentNames: "",

+ 0 - 172
src/views/bindWechat.vue

@@ -139,176 +139,4 @@ export default {
 
 <style lang="less" scoped>
 @import "../common/style/mixin";
-//.bindWechat {
-//  display: flex;
-//  flex-wrap: wrap;
-//  flex-direction: row;
-//  align-content: flex-start;
-//
-//  .loginLogoBox {
-//    width: 100%;
-//    text-align: center;
-//
-//    .loginLogo {
-//      width: 216px;
-//      height: 87px;
-//      margin-top: 41px;
-//    }
-//
-//    .languageCon {
-//      right: 10px;
-//      top: 10px;
-//      border: 1px solid #4d6add;
-//      padding: 5px 10px;
-//      border-radius: 10px;
-//    }
-//  }
-//
-//  .loginTitleBox {
-//    width: 100%;
-//
-//    .loginTitle {
-//      // width: 80px;
-//      height: 28px;
-//      overflow-wrap: break-word;
-//      color: #404d74;
-//      font-size: 20px;
-//      font-family: PingFangSC-Medium;
-//      text-align: center;
-//      white-space: nowrap;
-//      line-height: 28px;
-//      display: block;
-//      margin: 8px auto 0 auto;
-//      font-weight: 600;
-//    }
-//  }
-//
-//  .loginFormBox {
-//    width: 100%;
-//    margin-top: 38px;
-//
-//    /deep/ .van-field__body {
-//      height: 100%;
-//    }
-//
-//    .van-form .van-cell {
-//      width: 281px;
-//      height: 38px;
-//      background-color: rgba(255, 255, 255, 1);
-//      border-radius: 2px;
-//      border: 0.5px solid rgba(185, 186, 208, 1);
-//      padding: 0;
-//      color: rgba(168, 168, 197, 1);
-//      font-size: 13px;
-//      margin: 0 auto;
-//      margin-top: 20px;
-//      overflow: visible;
-//
-//      .van-field__control {
-//        height: 38px;
-//        line-height: 38px;
-//        padding: 6px;
-//
-//        &:-internal-autofill-previewed,
-//        &:-internal-autofill-selected {
-//          -webkit-text-fill-color: #323233 !important;
-//          transition: background-color 5000s ease-in-out 0s !important;
-//        }
-//      }
-//
-//      .van-field__control::-webkit-input-placeholder {
-//        color: rgba(168, 168, 197, 1);
-//      }
-//    }
-//
-//    .checkedPasswordBox {
-//      width: 281px;
-//      margin: 20px auto 0 auto;
-//      font-size: 13px;
-//      color: #4d6add;
-//      display: flex;
-//      justify-content: space-between;
-//      height: 13px;
-//      line-height: 13px;
-//
-//      .van-checkbox {
-//        overflow: visible;
-//      }
-//
-//      .van-checkbox__icon {
-//        font-size: 13px;
-//
-//        .van-icon {
-//          width: 12px;
-//          height: 12px;
-//          border-color: #4d6add;
-//        }
-//      }
-//
-//      .van-checkbox__label {
-//        color: #4d6add;
-//        line-height: 13px;
-//      }
-//
-//      .van-checkbox__icon--checked .van-icon-success {
-//        border-color: #4d6add;
-//        background: #4d6add;
-//      }
-//
-//      .van-checkbox__icon--checked .van-icon-success::before {
-//        content: "";
-//        background: #fff;
-//        width: 40%;
-//        height: 40%;
-//        position: absolute;
-//        top: 30%;
-//        left: 30%;
-//        border-radius: 100%;
-//      }
-//
-//      .forgetPassWord {
-//        cursor: pointer;
-//      }
-//    }
-//  }
-//
-//  .loginWithWechat {
-//    display: flex;
-//    justify-content: center;
-//    align-items: center;
-//  }
-//
-//  .wechat-btn {
-//    width: 60px;
-//    height: 60px;
-//    margin: 0;
-//    padding: 0;
-//    border: none;
-//    border-radius: 50%; /* 将按钮样式修改为圆形 */
-//  }
-//
-//  .wechat-icon {
-//    width: 40px;
-//    height: 40px;
-//  }
-//
-//  .buttonBox {
-//    width: 281px;
-//    margin: 20px auto 0 auto;
-//    display: flex;
-//    justify-content: space-between;
-//
-//    .van-button {
-//      width: 120px;
-//      height: 34px;
-//      border: 1px solid rgba(77, 106, 221, 1);
-//      background-color: rgba(77, 106, 221, 1);
-//    }
-//
-//    .register {
-//      background-color: transparent;
-//      color: rgba(77, 106, 221, 1);
-//    }
-//  }
-//}
 </style>

+ 1 - 1
src/views/device/alarmClock.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 设备定时开关列表 -->
-  <div class="page flex-col">
+  <div class="pageClock flex-col">
     <s-header :name="$t('device.timeSwitch')" :noback="false"></s-header>
     <div class="bd1 flex-col">
       <div class="section5 flex-col">

+ 1 - 1
src/views/device/customLogo.vue

@@ -1,6 +1,6 @@
 <template>
   <!--  修改logo  -->
-  <div class="page flex-col">
+  <div class="viewLogsPage flex-col">
     <s-header :name="$t('device.customLogo.customLogo')" :noback="false"></s-header>
     <div class="block2 flex-row justify-between">
       <div class="block3 flex-col"></div>

+ 71 - 95
src/views/device/deviceSearch.vue

@@ -4,24 +4,20 @@
     <van-action-sheet v-model:show="sheetShow" :closeable='false' :title="$t('device.enterAnyInformationToSearch')">
       <div class="content">
         <van-form @submit="onSubmit">
-          <van-field
-              v-model="clientId"
-              name="clientId"
-              :label="$t('device.equipmentNoLabel')"
-              :placeholder="$t('device.equipmentNoPlaceholder')"
-          />
-          <van-field
-              v-model="equipmentName"
-              name="equipmentName"
-              :label="$t('device.equipmentNameLabel')"
-              :placeholder="$t('device.equipmentNamePlaceholder')"
-          />
-          <van-field
-              v-model="adminUserName"
-              name="adminUserName"
-              :label="$t('device.merchantNameLabel')"
-              :placeholder="$t('device.merchantNamePlaceholder')"
-          />
+          <van-field v-model="clientId" name="clientId" :label="$t('device.equipmentNoLabel')"
+            :placeholder="$t('device.equipmentNoPlaceholder')" />
+          <van-field v-model="equipmentName" name="equipmentName" :label="$t('device.equipmentNameLabel')"
+            :placeholder="$t('device.equipmentNamePlaceholder')" />
+          <van-field v-model="adminName" name="adminName" :label="$t('device.merchantNameLabel')"
+            :placeholder="$t('device.merchantNamePlaceholder')" />
+          <div v-if="isShowCompany()">
+            <van-field label-width="86" v-model="companyTypeText" is-link readonly :label="$t('device.companyTypeLabel')"
+              :placeholder="$t('device.companyTypePlaceholder')" @click="companyTypeShow = true" class="field" />
+            <van-popup v-model:show="companyTypeShow" round position="bottom">
+              <van-cascader v-model="companyType" :title="$t('device.companyTypePlaceholder')"
+                :options="companyTypeOptions" @close="companyTypeShow = false" @finish="companyTypeFinish" />
+            </van-popup>
+          </div>
           <!-- <van-field
             v-model="areaName"
             name="areaName"
@@ -31,90 +27,40 @@
           <!-- 设备类型、设备机型 -->
           <van-row>
             <van-col span="12">
-              <van-field
-                  label-width="66"
-                  v-model="machineTypeText"
-                  is-link
-                  readonly
-                  :label="$t('device.equipmentTypeLabel')"
-                  :placeholder="$t('device.equipmentTypePlaceholder')"
-                  @click="machineTypeShow = true"
-                  class="field"
-              />
+              <van-field label-width="66" v-model="machineTypeText" is-link readonly
+                :label="$t('device.equipmentTypeLabel')" :placeholder="$t('device.equipmentTypePlaceholder')"
+                @click="machineTypeShow = true" class="field" />
               <van-popup v-model:show="machineTypeShow" round position="bottom">
-                <van-cascader
-                    v-model="machineType"
-                    :title="$t('device.equipmentTypePlaceholder')"
-                    :options="machineTypeOptions"
-                    @close="machineTypeShow = false"
-                    @finish="machineTypeFinish"
-                />
+                <van-cascader v-model="machineType" :title="$t('device.equipmentTypePlaceholder')"
+                  :options="machineTypeOptions" @close="machineTypeShow = false" @finish="machineTypeFinish" />
               </van-popup>
             </van-col>
             <van-col span="12">
-              <van-field
-                  label-width="66"
-                  v-model="equimentTypeText"
-                  is-link
-                  readonly
-                  :label="$t('device.equipmentModelLabel')"
-                  :placeholder="$t('device.equipmentModelPlaceholder')"
-                  @click="equimentTypeShow = true"
-                  class="field"
-              />
+              <van-field label-width="66" v-model="equimentTypeText" is-link readonly
+                :label="$t('device.equipmentModelLabel')" :placeholder="$t('device.equipmentModelPlaceholder')"
+                @click="equimentTypeShow = true" class="field" />
               <van-popup v-model:show="equimentTypeShow" round position="bottom">
-                <van-cascader
-                    v-model="equimentType"
-                    :title="$t('device.equipmentModelPlaceholder')"
-                    :options="equimentTypeOptions"
-                    @close="equimentTypeShow = false"
-                    @finish="equimentTypeFinish"
-                />
+                <van-cascader v-model="equimentType" :title="$t('device.equipmentModelPlaceholder')"
+                  :options="equimentTypeOptions" @close="equimentTypeShow = false" @finish="equimentTypeFinish" />
               </van-popup>
             </van-col>
           </van-row>
           <!-- 开机状态、设备状态 -->
           <van-row>
             <van-col span="12">
-              <van-field
-                  label-width="66"
-                  v-model="eqeStatusText"
-                  is-link
-                  readonly
-                  :label="$t('device.powerOnStatus')"
-                  :placeholder="$t('device.pleaseSelectThePowerOnStatus')"
-                  @click="eqeStatusShow = true"
-                  class="field"
-              />
+              <van-field label-width="66" v-model="eqeStatusText" is-link readonly :label="$t('device.powerOnStatus')"
+                :placeholder="$t('device.pleaseSelectThePowerOnStatus')" @click="eqeStatusShow = true" class="field" />
               <van-popup v-model:show="eqeStatusShow" round position="bottom">
-                <van-cascader
-                    v-model="eqeStatus"
-                    :title="$t('device.pleaseSelectThePowerOnStatus')"
-                    :options="eqeStatusOptions"
-                    @close="eqeStatusShow = false"
-                    @finish="eqeStatusFinish"
-                />
+                <van-cascader v-model="eqeStatus" :title="$t('device.pleaseSelectThePowerOnStatus')"
+                  :options="eqeStatusOptions" @close="eqeStatusShow = false" @finish="eqeStatusFinish" />
               </van-popup>
             </van-col>
             <van-col span="12">
-              <van-field
-                  label-width="66"
-                  v-model="isUsingText"
-                  is-link
-                  readonly
-                  :label="$t('device.equipmentStatus')"
-                  :placeholder="$t('device.pleaseSelectTheDeviceStatus')"
-                  @click="isUsingShow = true"
-                  class="field"
-              />
+              <van-field label-width="66" v-model="isUsingText" is-link readonly :label="$t('device.equipmentStatus')"
+                :placeholder="$t('device.pleaseSelectTheDeviceStatus')" @click="isUsingShow = true" class="field" />
               <van-popup v-model:show="isUsingShow" round position="bottom">
-                <van-cascader
-                    v-model="isUsing"
-                    :title="$t('device.pleaseSelectTheDeviceStatus')"
-                    :options="isUsingOptions"
-                    @close="isUsingShow = false"
-                    @finish="isUsingFinish"
-                />
+                <van-cascader v-model="isUsing" :title="$t('device.pleaseSelectTheDeviceStatus')"
+                  :options="isUsingOptions" @close="isUsingShow = false" @finish="isUsingFinish" />
               </van-popup>
             </van-col>
           </van-row>
@@ -164,9 +110,9 @@
           <!-- 操作 -->
           <van-row justify="space-around" style="padding: 2em;">
             <van-button class="clearBtn" span="5" round plain type="primary" style="height: 2em; padding: 0 2em;"
-                        @click="registerClick">{{ $t('device.emptyingConditions') }}</van-button>
+              @click="registerClick">{{ $t('device.emptyingConditions') }}</van-button>
             <van-button class="selectBtn" span="5" round type="primary" style="height: 2em; padding: 0 2em;"
-                        native-type="submit">{{ $t('device.clickSearch') }}</van-button>
+              native-type="submit">{{ $t('device.clickSearch') }}</van-button>
           </van-row>
         </van-form>
       </div>
@@ -177,7 +123,7 @@
 <script>
 import { ref } from 'vue';
 import { useI18n } from 'vue-i18n';
-import {styleUrl} from "../../common/js/utils";
+import { getLoginUser, styleUrl } from "../../common/js/utils";
 
 export default {
   setup(prop, context) {
@@ -185,11 +131,15 @@ export default {
     const sheetShow = ref(false);
     const clientId = ref(''); // 设备唯一码_设备编号
     const equipmentName = ref(''); // 设备名称_机器名
-    const adminUserName = ref(''); // 商家名
+    const adminName = ref(''); // 商家名
     const areaName = ref(''); // 设备所在地_地址名
     const machineType = ref(''); // 设备类型
     const machineTypeText = ref(''); // 设备类型 - 页面显示
     const machineTypeShow = ref(false); // 设备类型级联状态
+    const companyType = ref(''); // 公司平台
+    const companyTypeText = ref(''); // 公司平台 - 页面显示
+    const companyTypeShow = ref(false); // 公司平台级联状态
+    const user = getLoginUser(); // 获取登录用户
     const machineTypeOptions = ref([
       {
         text: t('device.spunSugar'),
@@ -200,10 +150,24 @@ export default {
         value: '1',
       }
     ]); // 设备类型级联选项
+    const companyTypeOptions = ref([
+      {
+        text: t('device.sz'),
+        value: '0',
+      },
+      {
+        text: t('device.sc'),
+        value: '1',
+      }
+    ]);
     const machineTypeFinish = ({ selectedOptions }) => {
       machineTypeShow.value = false;
       machineTypeText.value = selectedOptions.map((option) => option.text).join('/');
     }; // 设备类型级联选择
+    const companyTypeFinish = ({ selectedOptions }) => {
+      companyTypeShow.value = false;
+      companyTypeText.value = selectedOptions.map((option) => option.text).join('/');
+    }; // 公司平台级联选择
 
     const equimentType = ref(''); // 设备机型
     const equimentTypeText = ref(''); // 设备机型 - 页面显示
@@ -307,9 +271,10 @@ export default {
       const searchParam = {
         clientId: clientId.value,
         equipmentName: equipmentName.value,
-        adminUserName: adminUserName.value,
+        adminName: adminName.value,
         areaName: areaName.value,
         machineType: machineType.value,
+        companyType: companyType.value,
         equimentType: equimentType.value,
         eqeStatus: eqeStatus.value,
         isUsing: isUsing.value,
@@ -323,10 +288,12 @@ export default {
     const registerClick = () => {
       clientId.value = '';
       equipmentName.value = '';
-      adminUserName.value = '';
+      adminName.value = '';
       areaName.value = '';
       machineType.value = '';
       machineTypeText.value = '';
+      companyType.value = '';
+      companyTypeText.value = '';
       equimentType.value = '';
       equimentTypeText.value = '';
       eqeStatus.value = '';
@@ -342,12 +309,15 @@ export default {
     // 加载样式
     styleUrl('deviceSearch');
 
+    // 是否管理员
+    const isShowCompany = () => { return (user && user.type === 0); }
+
     return {
       sheetShow,
 
       clientId,
       equipmentName,
-      adminUserName,
+      adminName,
       areaName,
 
       machineType,
@@ -362,6 +332,13 @@ export default {
       equimentTypeOptions,
       equimentTypeFinish,
 
+      isShowCompany,
+      companyType,
+      companyTypeText,
+      companyTypeShow,
+      companyTypeOptions,
+      companyTypeFinish,
+
       eqeStatus,
       eqeStatusText,
       eqeStatusShow,
@@ -395,5 +372,4 @@ export default {
 };
 </script>
 
-<style lang="less" scoped>
-</style>
+<style lang="less" scoped></style>

+ 1 - 1
src/views/device/deviceSet.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 设备信息修改 -->
-  <div class="deviceSetPage page flex-col">
+  <div class="deviceSetPage flex-col">
     <s-header :name="$t('device.deviceInformation')" :noback="false"></s-header>
     <van-form @submit="updateDeviceFun">
       <div class="bd1 flex-col">

+ 1 - 1
src/views/device/doSugar.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 远程做糖 -->
-  <div class="page flex-col">
+  <div class="sugarPage flex-col">
     <s-header :name="$t('device.remoteSugarMaking')" :noback="false"></s-header>
     <div class="box1 flex-col">
       <div class="block2 flex-row justify-between">

+ 59 - 58
src/views/device/index.vue

@@ -4,15 +4,15 @@
     <s-header :name="sys ? sys.title : $t('public.sysName')" :noback="false"></s-header>
     <div class="listBox">
       <van-list v-model:loading="loading" v-model:error="error" :error-text="$t('public.requestFailed')"
-                :finished="finished" :finished-text="$t('public.noMore')" offset="300" :immediate-check="false" @load="onLoad">
+        :finished="finished" :finished-text="$t('public.noMore')" offset="300" :immediate-check="false" @load="onLoad">
         <div class="deviceBox1 flex-col">
           <div class="searchRow flex-row justify-between">
             <div class="flex-col">
               <div class="flex-row justify-between bd3">
                 <div class="flex-col outer4"></div>
                 <span class="flex-col txt2">{{
-                    $t("device.dataOverview")
-                  }}</span>
+                  $t("device.dataOverview")
+                }}</span>
               </div>
             </div>
             <div class="flex-col">
@@ -32,16 +32,16 @@
                   <div class="group1 flex-col justify-between align-center">
                     <span class="word4">{{ equipStatus.machineUseNum }}</span>
                     <span class="info1">{{
-                        $t("device.totalNumberOfRuns")
-                      }}</span>
+                      $t("device.totalNumberOfRuns")
+                    }}</span>
                   </div>
                 </div>
                 <div @click="eqeStatusClk('')" class="TextGroup4 flex-col">
                   <div class="main6 flex-col justify-between align-center">
                     <span class="word5">{{ equipStatus.machineTotalNum }}</span>
                     <span class="word6">{{
-                        $t("device.totalNumberOfEquipment")
-                      }}</span>
+                      $t("device.totalNumberOfEquipment")
+                    }}</span>
                   </div>
                 </div>
               </div>
@@ -69,31 +69,31 @@
                   </div>
                 </div>
                 <span class="txt1 o-mt-10">{{ $t("device.affiliatedMerchants") }}:{{
-                    item.adminUserName
-                  }}</span>
+                  item.adminUserName
+                }}</span>
                 <span class="txt1 o-mt-10 kBordBott">{{ $t("device.machineUniqueCode") }}:{{
-                    item.clientId
-                  }}</span>
+                  item.clientId
+                }}</span>
                 <div class="contentBottomCon" v-if="item.checkType">
                   <img class="pic1" referrerpolicy="no-referrer" src="../../assets/home/line.png" />
                   <div class="layer2 flex-row justify-between o-ptb-5 kBordBott">
                     <span class="info1 o-ptb-5 kBordBott">{{ $t("device.sleepState") }}:{{
-                        item.isSleep
-                            ? $t("device.sleeping")
-                            : $t("device.notSleeping")
-                      }}</span>
+                      item.isSleep
+                      ? $t("device.sleeping")
+                      : $t("device.notSleeping")
+                    }}</span>
                   </div>
                   <div v-if="item.isSleep" class="layer3 o-ptb-8">
                     <span class="word1">
                       <div v-if="!sleepDescBoxShow">
                         <van-field colon center class="word2" v-model="item.sleepDesc"
-                                   :placeholder="$t('device.sleepDescPlace')" :label="$t('device.sleepDesc')" label-width="auto">
+                          :placeholder="$t('device.sleepDescPlace')" :label="$t('device.sleepDesc')" label-width="auto">
                           <template #button class="button_1">
                             <van-button size="small" type="primary" @click="sleepDescChg(item.sleepDesc, item.id)">{{
-                                $t("device.confirm") }}
+                              $t("device.confirm") }}
                             </van-button>
                             <van-button size="small" type="primary" @click="editSleepDesc()">{{ $t("device.cancel")
-                              }}</van-button>
+                            }}</van-button>
                           </template>
                         </van-field>
                         <!-- </span> -->
@@ -101,7 +101,7 @@
                       <div v-else>
                         <span class="word3 o-pr-10">{{ $t("device.sleepDesc") }}:</span>
                         <span class="word3">{{ item.sleepDesc == null ? $t("device.SuspendBusiness") :
-                            item.sleepDesc }}</span>
+                          item.sleepDesc }}</span>
                         <van-icon name="edit" size="18" class="editIcon" @click="editSleepDesc()" />
                       </div>
                     </span>
@@ -125,21 +125,21 @@
                   <div>
                     <span v-if="item.latitude" class="txt5 o-ptb-5 kBordBott l-flex-RC">
                       <span class="info1">{{
-                          $t("device.position") }}:</span>
+                        $t("device.position") }}:</span>
                       <van-button @click="viewPosiClk(item)" type="primary">{{
-                          $t("device.view")
-                        }}</van-button>
+                        $t("device.view")
+                      }}</van-button>
                     </span>
                   </div>
                   <van-row class="layer5 o-ptb-10 kBordBott" justify="space-between">
                     <van-col class="word5">{{ $t("device.furnaceHeadTemperature") }}:{{
-                        item.furnaceTm
-                      }}{{ $t("device.degree") }}</van-col>
+                      item.furnaceTm
+                    }}{{ $t("device.degree") }}</van-col>
                     <van-col class="word5">{{ $t("device.temperatureInCabinet") }}:{{
-                        item.cabinetTm
-                      }}{{ $t("device.degree") }}</van-col>
+                      item.cabinetTm
+                    }}{{ $t("device.degree") }}</van-col>
                     <van-col class="word5">{{ $t("device.humidityInCabinet") }}:{{ item.cabinetHd
-                      }}{{ $t("device.degree") }}</van-col>
+                    }}{{ $t("device.degree") }}</van-col>
                   </van-row>
                   <template v-if="item.isMaterialUse === '1'">
                     <van-row justify="space-between" class="sugarTxt o-ptb-10 kBordBott">
@@ -158,8 +158,8 @@
                     </van-row>
                     <div class="sugarTxt o-ptb-10 kBordBott">
                       <span>{{ $t("device.stick") }}:{{
-                          $M_FormatCalcuDecial(item.stick)
-                        }}%</span>
+                        $M_FormatCalcuDecial(item.stick)
+                      }}%</span>
                     </div>
                     <van-row gutter="50" class="sugarTxt o-ptb-10 kBordBott">
                       <van-col>
@@ -175,27 +175,27 @@
                     </span>
                   </template>
                   <span class="info1 o-ptb-8 kBordBott">{{ $t("device.lastRefreshTime") }}:{{
-                      showDateTime(item.lastUpdateTime)
-                    }}</span>
+                    showDateTime(item.lastUpdateTime)
+                  }}</span>
                   <span class="info2 o-ptb-5 kBordBott">{{ $t("device.volume") }}:{{ item.volume }}</span>
                   <span class="info3 o-ptb-10 kBordBott">{{ $t("device.alarmContent") }}:{{
-                      item.alarmList && item.alarmList[0]
-                          ? item.alarmList[0].alarmContent
-                          : item.alarmContent
-                    }}
+                    item.alarmList && item.alarmList[0]
+                    ? item.alarmList[0].alarmContent
+                    : item.alarmContent
+                  }}
                     <span v-if="item.alarmList && item.alarmList[0]" style="color: #4d6add"
-                          @click="clearAlarm(item.alarmList[0])">{{ $t("device.eliminateAlarm") }}</span></span>
+                      @click="clearAlarm(item.alarmList[0])">{{ $t("device.eliminateAlarm") }}</span></span>
                   <div class="editDeviceBtnCon l-flex-center o-mt-10">
                     <div class="l-flex-RC" @click="deviceSet(item)">
                       <span class="c-text-14">{{
-                          $t("device.editDevice")
-                        }}</span>
+                        $t("device.editDevice")
+                      }}</span>
                       <div class="box2 flex-col"></div>
                     </div>
                     <div class="l-flex-RC o-ml-30" @click="deviceOprShow(item)">
                       <span class="c-text-14">{{
-                          $t("device.commonOperations")
-                        }}</span>
+                        $t("device.commonOperations")
+                      }}</span>
                       <div class="box2 flex-col"></div>
                     </div>
                   </div>
@@ -203,8 +203,8 @@
                 <div class="bd6 l-flex-center o-ptb-10" @click="item.checkType = !item.checkType">
                   <div class="l-flex-RC">
                     <span class="info2 o-mr-2">{{
-                        item.checkType ? $t("device.stow") : $t("device.seeMore")
-                      }}</span>
+                      item.checkType ? $t("device.stow") : $t("device.seeMore")
+                    }}</span>
                     <div class="group2 flex-col" :class="{ checkType: item.checkType }"></div>
                   </div>
                 </div>
@@ -219,9 +219,6 @@
     <deviceSearch ref="searchRef" @search="search($event)"></deviceSearch>
     <nav-bar></nav-bar>
   </div>
-  <keep-alive>
-
-  </keep-alive>
 </template>
 
 
@@ -304,15 +301,15 @@ export default {
         }
         // 列表值叠加
         list.value = list.value.concat(
-            data.data.records.map((item) => {
-              if(item.sleepDesc == null) {
-                item.sleepDesc = t("device.SuspendBusiness");
-              }
-              return {
-                ...item,
-                checkType: false,
-              };
-            })
+          data.data.records.map((item) => {
+            if (item.sleepDesc == null) {
+              item.sleepDesc = t("device.SuspendBusiness");
+            }
+            return {
+              ...item,
+              checkType: false,
+            };
+          })
         );
         if (list.value.length === data.data.total) {
           finished.value = true;
@@ -340,6 +337,7 @@ export default {
       searchParams.current = 1;
       searchParams = Object.assign(searchParams, e);
       getList();
+      getMachineNum();
     };
     // 跳转设备编辑
     const deviceSet = (e) => {
@@ -375,8 +373,8 @@ export default {
     };
     const showDateTime = (date) => {
       return date
-          ? dateUtil.formateDate(new Date(date), "yyyy-MM-dd hh:mm:ss")
-          : "";
+        ? dateUtil.formateDate(new Date(date), "yyyy-MM-dd hh:mm:ss")
+        : "";
     };
 
     // 点击查看定位
@@ -419,12 +417,15 @@ export default {
     const equipStatus = ref({});
     // 获取设备情况
     const getMachineNum = () => {
-      Api_postMachineNum({ adminId: user.id }).then((res) => {
+      Api_postMachineNum({
+        adminId: user.id,
+        companyType: searchParams.companyType
+      }).then((res) => {
         equipStatus.value = res.data.data || {};
       });
     };
     // 点击运行总数和总设备数
-    const eqeStatusClk = (val)=>{
+    const eqeStatusClk = (val) => {
       searchParams.eqeStatus = val;
       // 初始化
       searchParams.current = 1;

+ 1 - 1
src/views/device/modulation.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 音量调节 -->
-  <div class="page flex-col">
+  <div class="modulationPage flex-col">
     <s-header :name="$t('device.parameterAdjustment')" :noback="false"></s-header>
     <div class="wrap1 flex-col">
       <div class="box2 flex-col">

+ 1 - 1
src/views/device/openDoor.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 远程开门 -->
-  <div class="page flex-col">
+  <div class="pageDoor flex-col">
     <s-header :name="$t('device.remoteDoorOpening')" :noback="false"></s-header>
     <div class="box1">
       <div class="block2 flex-row justify-between">

+ 1 - 1
src/views/device/recharge.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 设备充值 -->
-  <div class="page flex-col">
+  <div class="rechargePage flex-col">
     <s-header :name="$t('device.equipmentRecharge')" :noback="false"></s-header>
     <div class="box1 flex-col">
       <div class="baseRow flex-row justify-between">

+ 1 - 1
src/views/device/toDaySugarList.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 今日做糖列表 -->
-  <div class="page flex-col">
+  <div class="sugarPage flex-col">
     <s-header :name="$t('device.todaysSugarList')" :noback="false"></s-header>
     <div class="box1 flex-col">
       <div class="block2 flex-row justify-between">

+ 1 - 1
src/views/device/viewLogs/index.vue

@@ -1,6 +1,6 @@
 <template>
   <!--  修改logo  -->
-  <div class="page flex-col">
+  <div class="viewLogsPage flex-col">
     <s-header :name="$t('device.viewLogs')" :noback="false"></s-header>
     <div class="block2 flex-row justify-between">
       <div class="block3 flex-col"></div>

+ 13 - 12
src/views/home/index.vue

@@ -234,6 +234,7 @@ export default {
         payType: typeSelectData.payType,
         clientId: typeSelectData.clientId,
         username: typeSelectData.userName, // 商家
+        companyType: typeSelectData.companyType, // 公司平台
         equipmentId:
             typeSelectData.equipmentId === "" ? null : typeSelectData.equipmentId,
       };
@@ -404,9 +405,9 @@ export default {
         return item === "M19";
       });
       // 查询是否有账号权限
-      const isAccount = user.menuCodeList.some((item) => {
-        return item === "M8";
-      });
+      // const isAccount = user.menuCodeList.some((item) => {
+      //   return item === "M8";
+      // });
       // 如果没有apk管理
       if (!isApkMan) {
         // 如果是公司人,要把apk添加上去
@@ -418,15 +419,15 @@ export default {
         }
       }
       // 如果没有账号权限
-      if (!isAccount) {
-        //  如果是公司人type=0,要把账号权限添加上去
-        if (user.type === 0) {
-          pushToolList.value.push({
-            label: t("home.accountPermission"),
-            value: "M8"
-          });
-        }
-      }
+      // if (!isAccount) {
+      //   //  如果是公司人type=0,要把账号权限添加上去
+      //   if (user.type === 0) {
+      //     pushToolList.value.push({
+      //       label: t("home.accountPermission"),
+      //       value: "M8"
+      //     });
+      //   }
+      // }
     };
     // 常用操作跳转页面
     const pushToolPage = (index) => {

+ 41 - 0
src/views/huifuMch/index.less

@@ -0,0 +1,41 @@
+.huifuPage {
+  width: 100%;
+  background-color: #ffffff;
+  display: flex;
+  overflow: auto;
+  .huifuBox {
+    width: 100%;
+    // border: 1px;
+    // margin-top: 10px;
+    padding: 10px;
+    display: inline-block;
+    background-color: #f6f7f9;
+  }
+  .uploader-container {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    margin-top: 20px;
+    margin-left: 20px;
+    margin-right: 20px;
+    // gap: 10px;
+  }
+
+  .custom-title {
+    margin-right: 4px;
+    vertical-align: middle;
+  }
+
+  .parent-container {
+    display: flex;
+    flex-direction: column;
+    margin-left: 40px;
+    margin-top: 20px;
+    font-size: 14px;
+  }
+  
+  .parent-container > span {
+    margin-bottom: 20px;
+  }
+
+}

+ 652 - 0
src/views/huifuMch/index.vue

@@ -0,0 +1,652 @@
+<template>
+  <!-- 备用提现账号 -->
+  <div class="huifuPage flex-col">
+    <s-header :name="$t('huifuMch.standbyWithdrawalAccountNo')" :noback="false"></s-header>
+    <!-- 申请表单 -->
+    <div class="huifuform flex-col" v-if="showStatus == null">
+      <van-form @submit="onSubmit">
+        <div class="huifuBox">
+          <div class="van-cell van-field">
+            <div class="van-cell__title van-field__label"><span>{{ $t('huifuMch.merchantType') }}</span></div>
+            <div class="van-cell__value van-field__value radioBox">
+              <van-radio-group v-model="type" direction="horizontal">
+                <van-radio name="0" icon-size="18px">{{ $t('huifuMch.personal') }}</van-radio>
+                <van-radio name="1" icon-size="18px">{{ $t('huifuMch.enterprise') }}</van-radio>
+              </van-radio-group>
+            </div>
+          </div>
+          <van-field v-model="regName" name="regName" :label="$t('huifuMch.huifuRegName')"
+            :placeholder="$t('huifuMch.huifuRegNamePlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.huifuRegNamePlaceholder') }]" />
+          <van-field v-model="shortName" name="shortName" :label="$t('huifuMch.shortNameLabel')"
+            :placeholder="$t('huifuMch.shortNamePlaceholder')" />
+          <div v-if="type == 1">
+            <van-field v-model="registeredAddress" is-link readonly name="registeredAddress"
+              :label="$t('huifuMch.huifuRegisteredAddress')"
+              :placeholder="$t('huifuMch.huifuRegisteredAddressPlaceholder')"
+              :rules="[{ required: true, message: $t('huifuMch.huifuRegisteredAddressPlaceholder') }]"
+              @click="showReAddress = true" />
+            <van-field v-model="regDetail" name="regDetail" :label="$t('huifuMch.huifuRegDetail')"
+              :placeholder="$t('huifuMch.huifuRegDetailPlaceholder')"
+              :rules="[{ required: true, message: $t('huifuMch.huifuRegDetailPlaceholder') }]" />
+          </div>
+        </div>
+        <div class="huifuBox" v-if="type == 1">
+          <van-field v-model="companyFoundDate" readonly name="companyFoundDate" :label="$t('huifuMch.companyFoundDate')"
+            :placeholder="$t('huifuMch.companyFoundDatePlaceholder')" @click="showFoundDate = true"
+            :rules="[{ required: true, message: $t('huifuMch.companyFoundDatePlaceholder') }]" />
+          <van-field v-model="licenseCode" name="licenseCode" :label="$t('huifuMch.licenseCode')"
+            :placeholder="$t('huifuMch.licenseCodePlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.licenseCodePlaceholder') }]" />
+          <div class="van-cell van-field">
+            <div class="van-cell__title van-field__label"><span>{{ $t('huifuMch.validityType') }}</span></div>
+            <div class="van-cell__value van-field__value radioBox">
+              <van-radio-group v-model="licenseValidityType" direction="horizontal">
+                <van-radio name="1" icon-size="18px">{{ $t('huifuMch.permanent') }}</van-radio>
+                <van-radio name="0" icon-size="18px">{{ $t('huifuMch.noPermanent') }}</van-radio>
+              </van-radio-group>
+            </div>
+          </div>
+          <van-field v-model="beginDateLicense" readonly name="beginDateLicense" :label="$t('huifuMch.beginDate')"
+            :placeholder="$t('huifuMch.beginDatePlaceholder')" @click="showBeginDateLicense = true"
+            :rules="[{ required: true, message: $t('huifuMch.beginDatePlaceholder') }]" />
+          <van-field v-if="licenseValidityType == 0" v-model="endDateLicense" readonly name="endDateLicense"
+            :label="$t('huifuMch.endDate')" :placeholder="$t('huifuMch.endDatePlaceholder')" @click="showEndDateLicense = true"
+            :rules="[{ required: true, message: $t('huifuMch.endDatePlaceholder') }]" />
+        </div>
+        <div class="huifuBox">
+          <van-field v-model="name" name="name" :label="$t('huifuMch.huifuContactName')"
+            :placeholder="$t('huifuMch.huifuContactNamePlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.huifuContactNamePlaceholder') }]" />
+          <van-field v-model="phone" name="phone" :label="$t('huifuMch.huifuContactMobile')"
+            :placeholder="$t('huifuMch.huifuContactMobilePlaceholder')"
+            :rules="[{ required: true, pattern: /^1[3456789]\d{9}$/, message: $t('huifuMch.huifuContactMobileMessage') }]" />
+          <van-field v-model="email" name="email" :label="$t('huifuMch.huifuContactEmail')"
+            :placeholder="$t('huifuMch.huifuContactEmailPlaceholder')"
+            :rules="[{ required: true, pattern: /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, message: $t('huifuMch.huifuContactEmailMessage') }]" />
+          <van-field v-model="businessAddress" is-link readonly name="businessAddress"
+            :label="$t('huifuMch.huifuBusinessAddress')" :placeholder="$t('huifuMch.huifuBusinessAddressPlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.huifuBusinessAddressPlaceholder') }]"
+            @click="showArea = true" />
+          <van-field v-model="detailAddr" name="detailAddr" :label="$t('huifuMch.huifuOperatingAddress')"
+            :placeholder="$t('huifuMch.huifuOperatingAddressPlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.huifuOperatingAddressPlaceholder') }]" />
+          <van-field v-if="type == 1" v-model="servicePhone" name="servicePhone" :label="$t('huifuMch.huifuServicePhone')"
+            :placeholder="$t('huifuMch.huifuServicePhonePlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.huifuServicePhonePlaceholder') }]" />
+        </div>
+        <div class="huifuBox">
+          <div class="van-cell van-field" v-if="type == 1">
+            <div class="van-cell__title van-field__label"><span>{{ $t('huifuMch.cardType') }}</span></div>
+            <div class="van-cell__value van-field__value radioBox">
+              <van-radio-group v-model="cardType" direction="horizontal">
+                <van-radio name="1" icon-size="18px">{{ $t('huifuMch.personalAccount') }}</van-radio>
+                <van-radio name="0" icon-size="18px">{{ $t('huifuMch.corporateAccount') }}</van-radio>
+              </van-radio-group>
+            </div>
+          </div>
+          <van-field v-model="cardName" name="cardName" :label="$t('huifuMch.huifuCardName')"
+            :placeholder="$t('huifuMch.huifuCardNamePlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.huifuCardNamePlaceholder') }]" />
+          <van-field v-model="cardNo" name="cardNo" :label="$t('huifuMch.huifuCardNo')"
+            :placeholder="$t('huifuMch.huifuCardNoPlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.huifuCardNoPlaceholder') }]" />
+          <van-field v-if="cardType == '1'" v-model="mp" name="mp" :label="$t('huifuMch.huifuMp')"
+            :placeholder="$t('huifuMch.huifuMpPlaceholder')"
+            :rules="[{ required: true, pattern: /^1[3456789]\d{9}$/, message: $t('huifuMch.huifuContactMobileMessage') }]" />
+          <van-field v-if="cardType == 0" v-model="branchCode" name="branchCode" :label="$t('huifuMch.branchCode')"
+            :placeholder="$t('huifuMch.branchCodePlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.branchCodePlaceholder') }]" />
+          <van-field v-if="cardType == 0" v-model="openLicenceNo" name="openLicenceNo"
+            :label="$t('huifuMch.openLicenceNo')" :placeholder="$t('huifuMch.openLicenceNoPlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.openLicenceNoPlaceholder') }]" />
+          <van-field  v-if="cardType == '1'" v-model="bankAddress" is-link readonly name="bankAddress" :label="$t('huifuMch.huifuBankAddress')"
+            :placeholder="$t('huifuMch.huifuBankAddressPlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.huifuBankAddressPlaceholder') }]"
+            @click="showBankAddress = true" />
+          <van-field v-model="certNo" name="certNo" :label="$t('huifuMch.huifuCertNo')"
+            :placeholder="$t('huifuMch.huifuCertNoPlaceholder')"
+            :rules="[{ required: true, pattern: /^\d{17}[\dXx]$/, message: $t('huifuMch.huifuCertNoMessage') }]" />
+          <van-field v-if="cardType == '0'" v-model="certAddress" name="certAddress" :label="$t('huifuMch.certAddress')"
+            :placeholder="$t('huifuMch.certAddressPlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.certAddressPlaceholder') }]" />
+          <div class="van-cell van-field">
+            <div class="van-cell__title van-field__label"><span>{{ $t('huifuMch.certType') }}</span></div>
+            <div class="van-cell__value van-field__value radioBox">
+              <van-radio-group v-model="certValidityType" direction="horizontal">
+                <van-radio name="1" icon-size="18px">{{ $t('huifuMch.permanent') }}</van-radio>
+                <van-radio name="0" icon-size="18px">{{ $t('huifuMch.noPermanent') }}</van-radio>
+              </van-radio-group>
+            </div>
+          </div>
+          <van-field v-model="beginDate" readonly name="beginDate" :label="$t('huifuMch.beginDate')"
+            :placeholder="$t('huifuMch.beginDatePlaceholder')" @click="showBeginDate = true"
+            :rules="[{ required: true, message: $t('huifuMch.beginDatePlaceholder') }]" />
+          <van-field v-if="certValidityType == 0" v-model="endDate" readonly name="endDate"
+            :label="$t('huifuMch.endDate')" :placeholder="$t('huifuMch.endDatePlaceholder')" @click="showEndDate = true"
+            :rules="[{ required: true, message: $t('huifuMch.endDatePlaceholder') }]" />
+        </div>
+        <!-- 地址弹窗 -->
+        <van-popup v-model:show="showArea" position="bottom">
+          <van-area :area-list="areaList" @confirm="onConfirm" @cancel="showArea = false" />
+        </van-popup>
+        <van-popup v-model:show="showBankAddress" position="bottom">
+          <van-area :area-list="areaList" :columns-num="2" @confirm="onConfirmBankAddress"
+            @cancel="showBankAddress = false" />
+        </van-popup>
+        <van-popup v-model:show="showReAddress" position="bottom">
+          <van-area :area-list="areaList" @confirm="onConfirmReAddress" @cancel="showReAddress = false" />
+        </van-popup>
+        <!-- 时间弹窗 -->
+        <van-popup v-model:show="showEndDateLicense" position="bottom">
+          <van-datetime-picker type="date" :min-date="minDate" :max-date="maxDate" @confirm="onConfirmEndDateLicense"
+            @cancel="showEndDateLicense = false" />
+        </van-popup>
+        <van-popup v-model:show="showBeginDateLicense" position="bottom">
+          <van-datetime-picker type="date" :min-date="minDate" :max-date="maxDate" @confirm="onConfirmBeginDateLicense"
+            @cancel="showBeginDateLicense = false" />
+        </van-popup>
+        <van-popup v-model:show="showFoundDate" position="bottom">
+          <van-datetime-picker type="date" :min-date="minDate" :max-date="maxDate" @confirm="onConfirmFoundDate"
+            @cancel="showFoundDate = false" />
+        </van-popup>
+        <van-popup v-model:show="showBeginDate" position="bottom">
+          <van-datetime-picker type="date" :min-date="minDate" :max-date="maxDate" @confirm="onConfirmBeginDate"
+            @cancel="showBeginDate = false" />
+        </van-popup>
+        <van-popup v-model:show="showEndDate" position="bottom">
+          <van-datetime-picker type="date" :min-date="minDate" :max-date="maxDate" @confirm="onConfirmEndDate"
+            @cancel="showEndDate = false" />
+        </van-popup>
+        <van-row justify="space-around" style="padding: 3em; background-color: #f6f7f9;">
+          <van-button span="10" round type="primary" style=" padding: 0 5em" native-type="submit">{{
+            $t('huifuMch.submit') }}
+          </van-button>
+        </van-row>
+      </van-form>
+    </div>
+    <!-- 上传图片 -->
+    <div class="upLoad flex-col" v-if="showStatus == '0'">
+      <van-cell title="身份证" size="large" icon="contact" />
+      <div class="uploader-container">
+        <van-uploader v-model="certBackPic" accept=".jpg,.jpeg,.png" :preview-size="[320, 180]"
+          style="display: block; padding: 0.5em 1em;" :max-size="2 * 1024 * 1024" @oversize="onOversize"
+          :after-read="upCertBackPic" upload-text="点击上传身份证正面照片" capture="camera" image-fit="contain" :max-count="1" />
+        <van-uploader v-model="certFrontPic" accept=".jpg,.jpeg,.png" :preview-size="[320, 180]"
+          style="display: block; padding: 0.5em 1em;" :max-size="2 * 1024 * 1024" @oversize="onOversize"
+          :after-read="upCertFrontPic" upload-text="点击上传身份证背面照片" capture="camera" image-fit="contain" :max-count="1" />
+      </div>
+      <div v-if="type == '1'">
+        <van-cell title="营业执照" size="large" icon="contact" />
+        <div class="uploader-container">
+          <van-uploader v-model="licensePic" accept=".jpg,.jpeg,.png" :preview-size="[320, 180]"
+            style="display: block; padding: 0.5em 1em;" :max-size="2 * 1024 * 1024" @oversize="onOversize"
+            :after-read="upLicensePic" upload-text="点击上传营业执照" capture="camera" image-fit="contain" :max-count="1" />
+        </div>
+      </div>
+      <div v-if="cardType == '1'">
+        <van-cell title="结算卡" size="large" icon="debit-pay" />
+        <div class="uploader-container">
+          <van-uploader v-model="cardFrontPic" accept=".jpg,.jpeg,.png" :preview-size="[320, 180]"
+            style="display: block; padding: 0.5em 1em;" :max-size="2 * 1024 * 1024" @oversize="onOversize"
+            :after-read="upCardFrontPic" upload-text="点击上传结算卡正面照片" capture="camera" image-fit="contain" :max-count="1" />
+        </div>
+      </div>
+      <div v-if="cardType == '0'">
+        <van-cell title="开户许可证" size="large" icon="debit-pay" />
+        <div class="uploader-container">
+          <van-uploader v-model="regAcctPic" accept=".jpg,.jpeg,.png" :preview-size="[320, 180]"
+            style="display: block; padding: 0.5em 1em;" :max-size="2 * 1024 * 1024" @oversize="onOversize"
+            :after-read="upRegAcctPic" upload-text="点击上传开户许可证照片" capture="camera" image-fit="contain" :max-count="1" />
+        </div>
+      </div>
+      <van-row justify="space-around" style="padding: 3em;">
+        <van-button span="10" round type="primary" style=" padding: 0 5em" native-type="sumbit" @click="submitCheck">{{
+          $t('huifuMch.submit') }}
+        </van-button>
+      </van-row>
+    </div>
+    <!-- 审核状态 -->
+    <div v-if="showStatus == '1' || showStatus == '2' || showStatus == '3' || showStatus == '4'">
+      <van-cell value="" size="large">
+        <!-- 使用 title 插槽来自定义标题 -->
+        <template #title>
+          <span class="custom-title">审核状态: </span>
+          <span v-if="showStatus == '1' || showStatus == '4'" class="custom-title" style="color: #FFA500;">审核中</span>
+          <span v-if="showStatus == '2'" class="custom-title" style="color: #00FF00;">审核通过</span>
+          <span v-if="showStatus == '3'" class="custom-title" style="color: #FF0000;">审核失败</span>
+          <!-- <div :style=statusColor value="审核中"></div> -->
+        </template>
+      </van-cell>
+      <div class="parent-container" v-if="huifuMchCheck.type == '0'">
+        <span>{{ $t('huifuMch.merchantType') }}:个人</span>
+        <span>{{ $t('huifuMch.huifuRegName') }}:{{ huifuMchCheck.regName }}</span>
+        <span>{{ $t('huifuMch.shortNameLabel') }}:{{ huifuMchCheck.shortName }}</span>
+        <span>{{ $t('huifuMch.huifuContactName') }}:{{ huifuMchCheck.name }}</span>
+        <span>{{ $t('huifuMch.huifuContactMobile') }}:{{ huifuMchCheck.phone }}</span>
+        <span>{{ $t('huifuMch.huifuContactEmail') }}:{{ huifuMchCheck.email }}</span>
+        <span>{{ $t('huifuMch.huifuBusinessAddress') }}:{{ huifuMchCheck.detailAddr }}</span>
+        <span>{{ $t('huifuMch.huifuCardName') }}:{{ huifuMchCheck.cardName }}</span>
+        <span>{{ $t('huifuMch.huifuCardNo') }}:{{ huifuMchCheck.cardNo }}</span>
+        <span>{{ $t('huifuMch.huifuMp') }}:{{ huifuMchCheck.mp }}</span>
+        <span>{{ $t('huifuMch.huifuCertNo') }}:{{ huifuMchCheck.certNo }}</span>
+      </div>
+      <div class="parent-container" v-if="huifuMchCheck.type == '1'">
+        <span>{{ $t('huifuMch.merchantType') }}:企业</span>
+        <span>{{ $t('huifuMch.huifuRegName') }}:{{ huifuMchCheck.regName }}</span>
+        <span>{{ $t('huifuMch.shortNameLabel') }}:{{ huifuMchCheck.shortName }}</span>
+        <span>{{ $t('huifuMch.companyFoundDate') }}:{{ huifuMchCheck.foundDate }}</span>
+        <span>{{ $t('huifuMch.licenseCode') }}:{{ huifuMchCheck.licenseCode }}</span>
+        <span>{{ $t('huifuMch.huifuRegDetail') }}:{{ huifuMchCheck.regDetail }}</span>
+        <span>{{ $t('huifuMch.huifuContactName') }}:{{ huifuMchCheck.name }}</span>
+        <span>{{ $t('huifuMch.huifuContactMobile') }}:{{ huifuMchCheck.phone }}</span>
+        <span>{{ $t('huifuMch.huifuContactEmail') }}:{{ huifuMchCheck.email }}</span>
+        <span>{{ $t('huifuMch.huifuBusinessAddress') }}:{{ huifuMchCheck.detailAddr }}</span>
+        <span>{{ $t('huifuMch.huifuServicePhone') }}:{{ huifuMchCheck.servicePhone }}</span>
+        <span>{{ $t('huifuMch.cardType') }}:{{ huifuMchCheck.cardType == '1'? $t('huifuMch.personalAccount'):$t('huifuMch.corporateAccount') }}</span>
+        <span>{{ $t('huifuMch.huifuCardName') }}:{{ huifuMchCheck.cardName }}</span>
+        <span>{{ $t('huifuMch.huifuCardNo') }}:{{ huifuMchCheck.cardNo }}</span>
+        <span>{{ $t('huifuMch.huifuMp') }}:{{ huifuMchCheck.mp }}</span>
+        <span>{{ $t('huifuMch.huifuCertNo') }}:{{ huifuMchCheck.certNo }}</span>
+        <span v-if="huifuMchCheck.cardType == '0'">{{ $t('huifuMch.openLicenceNo') }}:{{ huifuMchCheck.openLicenceNo }}</span>
+        <span v-if="huifuMchCheck.cardType == '0'">{{ $t('huifuMch.branchCode') }}:{{ huifuMchCheck.branchCode }}</span>
+      </div>
+      <van-row v-if="showStatus == '2' || showStatus == '3'" justify="space-around" style="padding: 3em;">
+        <van-button span="10" round type="primary" style=" padding: 0 5em" native-type="sumbit" @click="updateHuifu">{{
+          $t('huifuMch.update') }}
+        </van-button>
+      </van-row>
+    </div>
+  </div>
+</template>
+
+<script>
+import { onMounted, reactive, toRefs, ref } from "vue";
+import sHeader from "@/components/SimpleHeader";
+import dateUtil from "@/utils/dateUtil";
+import { Toast } from "vant";
+import { areaList } from "@vant/area-data";
+import { saveHuifuMch, getHuifuMchCheck, uploadPic, submitHuifuCheck } from "@/service/huifuMch";
+import { getLoginUser } from "@/common/js/utils";
+import { useRouter } from "vue-router";
+import { useI18n } from "vue-i18n";
+
+export default {
+  components: { sHeader },
+  setup() {
+    // 引入语言
+    const { t } = useI18n();
+    const router = useRouter();
+    const user = getLoginUser();
+    const huifuMchCheck = ref(null); // 审核信息
+    const businessAddress = ref(''); //经营地址
+    const registeredAddress = ref(''); //注册地址
+    const bankAddress = ref(''); // 银行地址
+    const showArea = ref(false); // 是否弹窗
+    const showBankAddress = ref(false);
+    const showReAddress = ref(false);
+    const companyFoundDate = ref(''); // 成立日期
+    const showFoundDate = ref(false);
+    const beginDateLicense = ref(''); // 营业执照有效开始日期
+    const showBeginDateLicense = ref(false);
+    const endDateLicense = ref(''); // 营业执照有效截止日期
+    const showEndDateLicense= ref(false);
+    const beginDate = ref(''); // 有效期开始日期
+    const showBeginDate = ref(false);
+    const endDate = ref(''); // 有效期截日期
+    const showEndDate = ref(false);
+    const showStatus = ref(null);
+    const certBackPic = ref();
+    const certFrontPic = ref();
+    const cardFrontPic = ref();
+    const licensePic = ref();
+    const regAcctPic = ref();
+    let addParams = reactive({
+      adminId: user.id, // 当前登录账户的id
+      type: '0', // 类型 String 必填 对公企业:type=0; 个人:type=1
+      regName: '', // 商户名称
+      shortName: '', // 商户简称
+      foundDate: '', // 成立时间
+      licenseCode: '', // 营业执照编号
+      licenseValidityType: "1", // 营业执照有效期类型
+      licenseBeginDate: '', // 营业执照有效开始日期
+      licenseEndDate: '', // 营业执照有效截止日期
+      regProvId: '', // 注册省编码
+      regAreaId: '', // 注册市编码
+      regDistrictId: '', // 注册区编码
+      regDetail: '', // 注册详细地址
+      name: '', // 联系人姓名
+      phone: '', // 联系人手机号码
+      email: '', // 联系人邮箱
+      provId: '', // 省编码
+      areaId: '',  // 省编码
+      districtId: '', // 市编码 
+      detailAddr: '', // 经营地址
+      servicePhone: '', // 客服电话
+      cardName: '', // 卡户名
+      cardType: '1', // 结算账户类型,“0”为对公账户,“1”为个人账户
+      cardNo: '', // 银行卡号
+      branchCode: '', // 联行号
+      openLicenceNo: '', // 基本存款账户编号或核准号
+      cardProvId: '', // 省编码
+      cardAreaId: '', // 省编码
+      mp: '', // 结算手机号
+      certNo: '', // 身份证号
+      certAddress: '', // 身份证地址
+      certValidityType: '1', // 身份证有效期类型
+      certBeginDate: '', // 有效期开始日期
+      certEndDate: '', // 有效期截止日期
+    });
+    // 上传身份证正面
+    const upCertBackPic = async (file) => {
+      file.status = 'uploading';
+      file.message = '上传中...';
+      // 此时可以自行将文件上传至服务器
+      // const fileObject = new File([file.content], file.file.name, { type: file.file.type });
+      const formData = new FormData();
+      formData.append('file', file.file, file.file.name);
+      formData.append('adminId', user.id);
+      formData.append('fileType', "F03");
+      console.log(formData.get("file"));
+      try {
+        const { data } = await uploadPic(formData);
+        if (data.code == "00000") {
+          console.log(data);
+          file.status = 'done';
+        } else {
+          file.status = 'failed';
+          file.message = '上传失败';
+        }
+      } catch {
+        file.status = 'failed';
+        file.message = '上传失败';
+      }
+    };
+    // 上传身份证背面
+    const upCardFrontPic = async (file) => {
+      file.status = 'uploading';
+      file.message = '上传中...';
+      // 此时可以自行将文件上传至服务器
+      // const fileObject = new File([file.content], file.file.name, { type: file.file.type });
+      const formData = new FormData();
+      formData.append('file', file.file, file.file.name);
+      formData.append('adminId', user.id);
+      formData.append('fileType', "F13");
+      console.log(formData.get("file"));
+      try {
+        const { data } = await uploadPic(formData);
+        if (data.code == "00000") {
+          console.log(data);
+          file.status = 'done';
+        } else {
+          file.status = 'failed';
+          file.message = '上传失败';
+        }
+      } catch {
+        file.status = 'failed';
+        file.message = '上传失败';
+      }
+    };
+    // 上传结算卡正面
+    const upCertFrontPic = async (file) => {
+      file.status = 'uploading';
+      file.message = '上传中...';
+      // 此时可以自行将文件上传至服务器
+      const fileObject = new File([file.content], file.file.name, { type: file.file.type });
+      const formData = new FormData();
+      formData.append('file', fileObject);
+      formData.append('adminId', user.id);
+      formData.append('fileType', "F02");
+      console.log(formData.get("file"));
+      try {
+        const { data } = await uploadPic(formData);
+        if (data.code == "00000") {
+          console.log(data);
+          file.status = 'done';
+        } else {
+          file.status = 'failed';
+          file.message = '上传失败';
+        }
+      } catch {
+        file.status = 'failed';
+        file.message = '上传失败';
+      }
+    };
+    // 上传营业执照
+    const upLicensePic = async (file) => {
+      file.status = 'uploading';
+      file.message = '上传中...';
+      // 此时可以自行将文件上传至服务器
+      const fileObject = new File([file.content], file.file.name, { type: file.file.type });
+      const formData = new FormData();
+      formData.append('file', fileObject);
+      formData.append('adminId', user.id);
+      formData.append('fileType', "F07");
+      console.log(formData.get("file"));
+      try {
+        const { data } = await uploadPic(formData);
+        if (data.code == "00000") {
+          console.log(data);
+          file.status = 'done';
+        } else {
+          file.status = 'failed';
+          file.message = '上传失败';
+        }
+      } catch {
+        file.status = 'failed';
+        file.message = '上传失败';
+      }
+    };
+    // 上传开户许可证
+    const upRegAcctPic = async (file) => {
+      file.status = 'uploading';
+      file.message = '上传中...';
+      // 此时可以自行将文件上传至服务器
+      const fileObject = new File([file.content], file.file.name, { type: file.file.type });
+      const formData = new FormData();
+      formData.append('file', fileObject);
+      formData.append('adminId', user.id);
+      formData.append('fileType', "F08");
+      console.log(formData.get("file"));
+      try {
+        const { data } = await uploadPic(formData);
+        if (data.code == "00000") {
+          console.log(data);
+          file.status = 'done';
+        } else {
+          file.status = 'failed';
+          file.message = '上传失败';
+        }
+      } catch {
+        file.status = 'failed';
+        file.message = '上传失败';
+      }
+    };
+    const onOversize = (file) => {
+      console.log(file);
+      Toast('文件大小不能超过 2MB');
+    };
+    // 地址选择
+    const onConfirm = (areaValues) => {
+      console.log(areaValues)
+      showArea.value = false;
+      businessAddress.value = areaValues
+        .filter((item) => !!item)
+        .map((item) => item.name)
+        .join('/');
+      addParams.provId = areaValues[0]?.code || '';
+      addParams.areaId = areaValues[1]?.code || '';
+      addParams.districtId = areaValues[2]?.code || '';
+      // addParams.detailAddr = areaValues[0].name + areaValues[1].name + areaValues[2].name;
+    };
+    const onConfirmBankAddress = (areaValues) => {
+      console.log(areaValues)
+      showBankAddress.value = false;
+      bankAddress.value = areaValues
+        .filter((item) => !!item)
+        .map((item) => item.name)
+        .join('/');
+      addParams.cardProvId = areaValues[0]?.code || '';
+      addParams.cardAreaId = areaValues[1]?.code || '';
+    };
+    const onConfirmReAddress = (areaValues) => {
+      showReAddress.value = false;
+      registeredAddress.value = areaValues
+        .filter((item) => !!item)
+        .map((item) => item.name)
+        .join('/');
+      addParams.regProvId = areaValues[0]?.code || '';
+      addParams.regAreaId = areaValues[1]?.code || '';
+      addParams.regDistrictId = areaValues[2]?.code || '';
+    };
+    // 时间选择
+    const onConfirmEndDateLicense = (value) => {
+      endDateLicense.value = dateUtil.formateDate(value, "yyyy-MM-dd");
+      addParams.licenseEndDate = endDateLicense.value.replace(/-/g, "");
+      showEndDateLicense.value = false;
+    };
+    const onConfirmBeginDateLicense = (value) => {
+      beginDateLicense.value = dateUtil.formateDate(value, "yyyy-MM-dd");
+      addParams.licenseBeginDate = beginDateLicense.value.replace(/-/g, "");
+      showBeginDateLicense.value = false;
+    };
+    const onConfirmFoundDate = (value) => {
+      companyFoundDate.value = dateUtil.formateDate(value, "yyyy-MM-dd");
+      addParams.foundDate = companyFoundDate.value.replace(/-/g, "");
+      showFoundDate.value = false;
+    };
+    const onConfirmBeginDate = (value) => {
+      beginDate.value = dateUtil.formateDate(value, "yyyy-MM-dd");
+      addParams.certBeginDate = beginDate.value.replace(/-/g, "");
+      showBeginDate.value = false;
+    };
+    const onConfirmEndDate = (value) => {
+      endDate.value = dateUtil.formateDate(value, "yyyy-MM-dd");
+      addParams.certEndDate = endDate.value.replace(/-/g, "");
+      showEndDate.value = false;
+    };
+    onMounted(async () => {
+      const { data } = await getHuifuMchCheck({ adminId: user.id });
+      console.log(data.data);
+      if (data.data != null) {
+        huifuMchCheck.value = data.data;
+        showStatus.value = huifuMchCheck.value.status;
+        addParams.type = huifuMchCheck.value.type;
+        addParams.cardType = huifuMchCheck.value.cardType;
+      }
+    });
+    // 提交审核
+    const submitCheck = async () => {
+      if (certBackPic.value == null) {
+        Toast("请上传身份证正面照片");
+        return;
+      } else if (certFrontPic.value == null) {
+        Toast("请上传身份证背面照片");
+        return;
+      } 
+      if(addParams.cardType == '1') {
+        if (cardFrontPic.value == null) {
+          Toast("请上传结算卡正面照片");
+          return;
+        }
+      } else {
+        if (licensePic.value == null) {
+          Toast("请上传营业执照照片");
+          return;
+        }
+        if (regAcctPic.value == null) {
+          Toast("请上传开户许可证照片");
+          return;
+        }
+      }
+
+      const { data } = await submitHuifuCheck(addParams);
+      if (data.code == "00000") {
+        console.log(data);
+        Toast.success(t('huifuMch.submittedSuccessfully'));
+        setTimeout(() => {
+          router.go(0);
+        }, 1500);
+      } else {
+        Toast.fail(`${t('huifuMch.submitFailed')} ${data.message}`);
+      }
+    }
+    // 跳转到修改页面
+    const updateHuifu = async () => {
+      router.push("/huifuMchEdit");
+    }
+    // 提交审核表单
+    const onSubmit = async () => {
+      console.log('onSubmit', addParams);
+      saveHuifuMchFun();
+    };
+    const saveHuifuMchFun = async () => {
+      const { data } = await saveHuifuMch(addParams);
+      if (data.code === "00000") {
+        Toast.success(t('huifuMch.submittedSuccessfully'));
+        setTimeout(() => {
+          router.go(0);
+        }, 1500);
+      } else {
+        Toast.fail(`${t('huifuMch.submitFailed')} ${data.message}`);
+      }
+      console.log("onSubmit", data);
+    };
+    return {
+      ...toRefs(addParams),
+      onSubmit,
+      showStatus,
+      businessAddress,
+      bankAddress,
+      registeredAddress,
+      huifuMchCheck,
+      areaList,
+
+      beginDateLicense,
+      endDateLicense,
+      companyFoundDate,
+      beginDate,
+      endDate,
+
+      showArea,
+      showBankAddress,
+      showReAddress,
+      showBeginDateLicense,
+      showEndDateLicense,
+      showFoundDate,
+      showBeginDate,
+      showEndDate,
+
+      onConfirm,
+      onConfirmBankAddress,
+      onConfirmReAddress,
+      onConfirmBeginDateLicense,
+      onConfirmEndDateLicense,
+      onConfirmFoundDate,
+      onConfirmBeginDate,
+      onConfirmEndDate,
+
+      minDate: new Date(2000, 0, 1),
+      maxDate: new Date(2035, 11, 31),
+      licensePic,
+      regAcctPic,
+      certBackPic,
+      certFrontPic,
+      upLicensePic,
+      upRegAcctPic,
+      upCertBackPic,
+      upCertFrontPic,
+      upCardFrontPic,
+      cardFrontPic,
+      submitCheck,
+      onOversize,
+      updateHuifu
+    };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+@import "../../common/style/common.less";
+@import "./index.less";
+</style>

+ 467 - 0
src/views/huifuMch/update.vue

@@ -0,0 +1,467 @@
+<template>
+  <!-- 备用提现账号 -->
+  <div class="huifuPage flex-col">
+    <s-header :name="$t('huifuMch.standbyWithdrawalAccountNo')" :noback="false"></s-header>
+    <!-- 申请表单 -->
+    <div class="huifuform flex-col">
+      <van-form @submit="onSubmit">
+        <div class="huifuBox">
+          <div class="van-cell van-field">
+            <div class="van-cell__title van-field__label"><span>{{ $t('huifuMch.merchantType') }}</span></div>
+            <div class="van-cell__value van-field__value radioBox">
+              <van-radio-group v-model="type" direction="horizontal" disabled>
+                <van-radio name="0" icon-size="18px">{{ $t('huifuMch.personal') }}</van-radio>
+                <van-radio name="1" icon-size="18px">{{ $t('huifuMch.enterprise') }}</van-radio>
+              </van-radio-group>
+            </div>
+          </div>
+          <van-field v-model="regName" name="regName" :label="$t('huifuMch.huifuRegName')"
+            :placeholder="$t('huifuMch.huifuRegNamePlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.huifuRegNamePlaceholder') }]" />
+          <van-field v-model="shortName" name="shortName" :label="$t('huifuMch.shortNameLabel')"
+            :placeholder="$t('huifuMch.shortNamePlaceholder')" />
+          <div v-if="type == 1">
+            <van-field v-model="registeredAddress" is-link readonly name="registeredAddress"
+              :label="$t('huifuMch.huifuRegisteredAddress')"
+              :placeholder="$t('huifuMch.huifuRegisteredAddressPlaceholder')"
+              :rules="[{ required: true, message: $t('huifuMch.huifuRegisteredAddressPlaceholder') }]"
+              @click="showReAddress = true" />
+            <van-field v-model="regDetail" name="regDetail" :label="$t('huifuMch.huifuRegDetail')"
+              :placeholder="$t('huifuMch.huifuRegDetailPlaceholder')"
+              :rules="[{ required: true, message: $t('huifuMch.huifuRegDetailPlaceholder') }]" />
+          </div>
+        </div>
+        <div class="huifuBox" v-if="type == 1">
+          <van-field v-model="companyFoundDate" readonly name="companyFoundDate" :label="$t('huifuMch.companyFoundDate')"
+            :placeholder="$t('huifuMch.companyFoundDatePlaceholder')" @click="showFoundDate = true"
+            :rules="[{ required: true, message: $t('huifuMch.companyFoundDatePlaceholder') }]" />
+          <van-field v-model="licenseCode" name="licenseCode" :label="$t('huifuMch.licenseCode')"
+            :placeholder="$t('huifuMch.licenseCodePlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.licenseCodePlaceholder') }]" />
+          <div class="van-cell van-field">
+            <div class="van-cell__title van-field__label"><span>{{ $t('huifuMch.validityType') }}</span></div>
+            <div class="van-cell__value van-field__value radioBox">
+              <van-radio-group v-model="licenseValidityType" direction="horizontal">
+                <van-radio name="1" icon-size="18px">{{ $t('huifuMch.permanent') }}</van-radio>
+                <van-radio name="0" icon-size="18px">{{ $t('huifuMch.noPermanent') }}</van-radio>
+              </van-radio-group>
+            </div>
+          </div>
+          <van-field v-model="beginDateLicense" readonly name="beginDateLicense" :label="$t('huifuMch.beginDate')"
+            :placeholder="$t('huifuMch.beginDatePlaceholder')" @click="showBeginDateLicense = true"
+            :rules="[{ required: true, message: $t('huifuMch.beginDatePlaceholder') }]" />
+          <van-field v-if="licenseValidityType == 0" v-model="endDateLicense" readonly name="endDateLicense"
+            :label="$t('huifuMch.endDate')" :placeholder="$t('huifuMch.endDatePlaceholder')"
+            @click="showEndDateLicense = true"
+            :rules="[{ required: true, message: $t('huifuMch.endDatePlaceholder') }]" />
+        </div>
+        <div class="huifuBox">
+          <van-field v-model="name" name="name" :label="$t('huifuMch.huifuContactName')"
+            :placeholder="$t('huifuMch.huifuContactNamePlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.huifuContactNamePlaceholder') }]" />
+          <van-field v-model="phone" name="phone" :label="$t('huifuMch.huifuContactMobile')"
+            :placeholder="$t('huifuMch.huifuContactMobilePlaceholder')"
+            :rules="[{ required: true, pattern: /^1[3456789]\d{9}$/, message: $t('huifuMch.huifuContactMobileMessage') }]" />
+          <van-field v-model="email" name="email" :label="$t('huifuMch.huifuContactEmail')"
+            :placeholder="$t('huifuMch.huifuContactEmailPlaceholder')"
+            :rules="[{ required: true, pattern: /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, message: $t('huifuMch.huifuContactEmailMessage') }]" />
+          <van-field v-model="businessAddress" is-link readonly name="businessAddress"
+            :label="$t('huifuMch.huifuBusinessAddress')" :placeholder="$t('huifuMch.huifuBusinessAddressPlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.huifuBusinessAddressPlaceholder') }]"
+            @click="showArea = true" />
+          <van-field v-model="detailAddr" name="detailAddr" :label="$t('huifuMch.huifuOperatingAddress')"
+            :placeholder="$t('huifuMch.huifuOperatingAddressPlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.huifuOperatingAddressPlaceholder') }]" />
+          <van-field v-if="type == 1" v-model="servicePhone" name="servicePhone" :label="$t('huifuMch.huifuServicePhone')"
+            :placeholder="$t('huifuMch.huifuServicePhonePlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.huifuServicePhonePlaceholder') }]" />
+        </div>
+        <div class="huifuBox">
+          <div class="van-cell van-field" v-if="type == 1">
+            <div class="van-cell__title van-field__label"><span>{{ $t('huifuMch.cardType') }}</span></div>
+            <div class="van-cell__value van-field__value radioBox">
+              <van-radio-group v-model="cardType" direction="horizontal">
+                <van-radio name="1" icon-size="18px">{{ $t('huifuMch.personalAccount') }}</van-radio>
+                <van-radio name="0" icon-size="18px">{{ $t('huifuMch.corporateAccount') }}</van-radio>
+              </van-radio-group>
+            </div>
+          </div>
+          <van-field v-model="cardName" name="cardName" :label="$t('huifuMch.huifuCardName')"
+            :placeholder="$t('huifuMch.huifuCardNamePlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.huifuCardNamePlaceholder') }]" />
+          <van-field v-model="cardNo" name="cardNo" :label="$t('huifuMch.huifuCardNo')"
+            :placeholder="$t('huifuMch.huifuCardNoPlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.huifuCardNoPlaceholder') }]" />
+          <van-field v-if="cardType == '1'" v-model="mp" name="mp" :label="$t('huifuMch.huifuMp')"
+            :placeholder="$t('huifuMch.huifuMpPlaceholder')"
+            :rules="[{ required: true, pattern: /^1[3456789]\d{9}$/, message: $t('huifuMch.huifuContactMobileMessage') }]" />
+          <van-field v-if="cardType == 0" v-model="branchCode" name="branchCode" :label="$t('huifuMch.branchCode')"
+            :placeholder="$t('huifuMch.branchCodePlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.branchCodePlaceholder') }]" />
+          <van-field v-if="cardType == 0" v-model="openLicenceNo" name="openLicenceNo"
+            :label="$t('huifuMch.openLicenceNo')" :placeholder="$t('huifuMch.openLicenceNoPlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.openLicenceNoPlaceholder') }]" />
+          <van-field v-if="cardType == '1'" v-model="bankAddress" is-link readonly name="bankAddress"
+            :label="$t('huifuMch.huifuBankAddress')" :placeholder="$t('huifuMch.huifuBankAddressPlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.huifuBankAddressPlaceholder') }]"
+            @click="showBankAddress = true" />
+          <van-field v-model="certNo" name="certNo" :label="$t('huifuMch.huifuCertNo')"
+            :placeholder="$t('huifuMch.huifuCertNoPlaceholder')"
+            :rules="[{ required: true, pattern: /^\d{17}[\dXx]$/, message: $t('huifuMch.huifuCertNoMessage') }]" />
+          <van-field v-if="cardType == '0'" v-model="certAddress" name="certAddress" :label="$t('huifuMch.certAddress')"
+            :placeholder="$t('huifuMch.certAddressPlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.certAddressPlaceholder') }]" />
+          <div class="van-cell van-field">
+            <div class="van-cell__title van-field__label"><span>{{ $t('huifuMch.certType') }}</span></div>
+            <div class="van-cell__value van-field__value radioBox">
+              <van-radio-group v-model="certValidityType" direction="horizontal">
+                <van-radio name="1" icon-size="18px">{{ $t('huifuMch.permanent') }}</van-radio>
+                <van-radio name="0" icon-size="18px">{{ $t('huifuMch.noPermanent') }}</van-radio>
+              </van-radio-group>
+            </div>
+          </div>
+          <van-field v-model="beginDate" readonly name="beginDate" :label="$t('huifuMch.beginDate')"
+            :placeholder="$t('huifuMch.beginDatePlaceholder')" @click="showBeginDate = true"
+            :rules="[{ required: true, message: $t('huifuMch.beginDatePlaceholder') }]" />
+          <van-field v-if="certValidityType == 0" v-model="endDate" readonly name="endDate"
+            :label="$t('huifuMch.endDate')" :placeholder="$t('huifuMch.endDatePlaceholder')" @click="showEndDate = true"
+            :rules="[{ required: true, message: $t('huifuMch.endDatePlaceholder') }]" />
+          <van-field v-model="sms" center clearable :label="$t('huifuMch.sms')"
+            :placeholder="$t('huifuMch.smsPlaceholder')"
+            :rules="[{ required: true, message: $t('huifuMch.smsPlaceholder') }]">
+            <template #button>
+              <van-button size="small" type="primary" @click="sendCode()" :disabled="time !== 0">
+                {{ time === 0 ? $t('huifuMch.sendSms') : time + $t('huifuMch.replaysInSeconds') }}
+              </van-button>
+            </template>
+          </van-field>
+        </div>
+        <!-- 地址弹窗 -->
+        <van-popup v-model:show="showArea" position="bottom">
+          <van-area :area-list="areaList" @confirm="onConfirm" @cancel="showArea = false" />
+        </van-popup>
+        <van-popup v-model:show="showBankAddress" position="bottom">
+          <van-area :area-list="areaList" :columns-num="2" @confirm="onConfirmBankAddress"
+            @cancel="showBankAddress = false" />
+        </van-popup>
+        <van-popup v-model:show="showReAddress" position="bottom">
+          <van-area :area-list="areaList" @confirm="onConfirmReAddress" @cancel="showReAddress = false" />
+        </van-popup>
+        <!-- 时间弹窗 -->
+        <van-popup v-model:show="showEndDateLicense" position="bottom">
+          <van-datetime-picker type="date" :min-date="minDate" :max-date="maxDate" @confirm="onConfirmEndDateLicense"
+            @cancel="showEndDateLicense = false" />
+        </van-popup>
+        <van-popup v-model:show="showBeginDateLicense" position="bottom">
+          <van-datetime-picker type="date" :min-date="minDate" :max-date="maxDate" @confirm="onConfirmBeginDateLicense"
+            @cancel="showBeginDateLicense = false" />
+        </van-popup>
+        <van-popup v-model:show="showFoundDate" position="bottom">
+          <van-datetime-picker type="date" :min-date="minDate" :max-date="maxDate" @confirm="onConfirmFoundDate"
+            @cancel="showFoundDate = false" />
+        </van-popup>
+        <van-popup v-model:show="showBeginDate" position="bottom">
+          <van-datetime-picker type="date" :min-date="minDate" :max-date="maxDate" @confirm="onConfirmBeginDate"
+            @cancel="showBeginDate = false" />
+        </van-popup>
+        <van-popup v-model:show="showEndDate" position="bottom">
+          <van-datetime-picker type="date" :min-date="minDate" :max-date="maxDate" @confirm="onConfirmEndDate"
+            @cancel="showEndDate = false" />
+        </van-popup>
+        <van-row justify="space-around" style="padding: 3em; background-color: #f6f7f9;">
+          <van-button span="10" round type="primary" style=" padding: 0 5em" native-type="submit">{{
+            $t('huifuMch.submit') }}
+          </van-button>
+        </van-row>
+      </van-form>
+    </div>
+  </div>
+</template>
+  
+<script>
+import { onMounted, reactive, toRefs, ref } from "vue";
+import sHeader from "@/components/SimpleHeader";
+import dateUtil from "@/utils/dateUtil";
+import { Toast } from "vant";
+import { areaList } from "@vant/area-data";
+import { getHuifuMchCheck, updateMerchant, sendSms } from "@/service/huifuMch";
+import { getLoginUser, getLocal, setLocal } from "@/common/js/utils";
+import { useRouter } from "vue-router";
+import { useI18n } from "vue-i18n";
+
+export default {
+  components: { sHeader },
+  setup() {
+    // 引入语言
+    const { t } = useI18n();
+    const router = useRouter();
+    const user = getLoginUser();
+    const huifuMchCheck = ref(null); // 审核信息
+    const businessAddress = ref(''); //经营地址
+    const registeredAddress = ref(''); //注册地址
+    const bankAddress = ref(''); // 银行地址
+    const showArea = ref(false); // 是否弹窗
+    const showBankAddress = ref(false);
+    const showReAddress = ref(false);
+    const companyFoundDate = ref(''); // 成立日期
+    const showFoundDate = ref(false);
+    const beginDateLicense = ref(''); // 营业执照有效开始日期
+    const showBeginDateLicense = ref(false);
+    const endDateLicense = ref(''); // 营业执照有效截止日期
+    const showEndDateLicense = ref(false);
+    const beginDate = ref(''); // 有效期开始日期
+    const showBeginDate = ref(false);
+    const endDate = ref(''); // 有效期截日期
+    const showEndDate = ref(false);
+    const showStatus = ref(null);
+    const verCodeTime = reactive({
+      time: 0
+    });
+    let addParams = reactive({
+      adminId: user.id, // 当前登录账户的id
+      type: '0', // 类型 String 必填 对公企业:type=0; 个人:type=1
+      regName: '', // 商户名称
+      shortName: '', // 商户简称
+      foundDate: '', // 成立时间
+      licenseCode: '', // 营业执照编号
+      licenseValidityType: "1", // 营业执照有效期类型
+      licenseBeginDate: '', // 营业执照有效开始日期
+      licenseEndDate: '', // 营业执照有效截止日期
+      regProvId: '', // 注册省编码
+      regAreaId: '', // 注册市编码
+      regDistrictId: '', // 注册区编码
+      regDetail: '', // 注册详细地址
+      name: '', // 联系人姓名
+      phone: '', // 联系人手机号码
+      email: '', // 联系人邮箱
+      provId: '', // 省编码
+      areaId: '',  // 省编码
+      districtId: '', // 市编码 
+      detailAddr: '', // 经营地址
+      servicePhone: '', // 客服电话
+      cardName: '', // 卡户名
+      cardType: '1', // 结算账户类型,“0”为对公账户,“1”为个人账户
+      cardNo: '', // 银行卡号
+      branchCode: '', // 联行号
+      openLicenceNo: '', // 基本存款账户编号或核准号
+      cardProvId: '', // 省编码
+      cardAreaId: '', // 省编码
+      mp: '', // 结算手机号
+      certNo: '', // 身份证号
+      certAddress: '', // 身份证地址
+      certValidityType: '1', // 身份证有效期类型
+      certBeginDate: '', // 有效期开始日期
+      certEndDate: '', // 有效期截止日期
+      sms: '', // 验证码
+    });
+    // 地址选择
+    const onConfirm = (areaValues) => {
+      console.log(areaValues)
+      showArea.value = false;
+      businessAddress.value = areaValues
+        .filter((item) => !!item)
+        .map((item) => item.name)
+        .join('/');
+      addParams.provId = areaValues[0]?.code || '';
+      addParams.areaId = areaValues[1]?.code || '';
+      addParams.districtId = areaValues[2]?.code || '';
+      // addParams.detailAddr = areaValues[0].name + areaValues[1].name + areaValues[2].name;
+    };
+    const onConfirmBankAddress = (areaValues) => {
+      console.log(areaValues)
+      showBankAddress.value = false;
+      bankAddress.value = areaValues
+        .filter((item) => !!item)
+        .map((item) => item.name)
+        .join('/');
+      addParams.cardProvId = areaValues[0]?.code || '';
+      addParams.cardAreaId = areaValues[1]?.code || '';
+    };
+    const onConfirmReAddress = (areaValues) => {
+      showReAddress.value = false;
+      registeredAddress.value = areaValues
+        .filter((item) => !!item)
+        .map((item) => item.name)
+        .join('/');
+      addParams.regProvId = areaValues[0]?.code || '';
+      addParams.regAreaId = areaValues[1]?.code || '';
+      addParams.regDistrictId = areaValues[2]?.code || '';
+    };
+    // 时间选择
+    const onConfirmEndDateLicense = (value) => {
+      endDateLicense.value = dateUtil.formateDate(value, "yyyy-MM-dd");
+      addParams.licenseEndDate = endDateLicense.value.replace(/-/g, "");
+      showEndDateLicense.value = false;
+    };
+    const onConfirmBeginDateLicense = (value) => {
+      beginDateLicense.value = dateUtil.formateDate(value, "yyyy-MM-dd");
+      addParams.licenseBeginDate = beginDateLicense.value.replace(/-/g, "");
+      showBeginDateLicense.value = false;
+    };
+    const onConfirmFoundDate = (value) => {
+      companyFoundDate.value = dateUtil.formateDate(value, "yyyy-MM-dd");
+      addParams.foundDate = companyFoundDate.value.replace(/-/g, "");
+      showFoundDate.value = false;
+    };
+    const onConfirmBeginDate = (value) => {
+      beginDate.value = dateUtil.formateDate(value, "yyyy-MM-dd");
+      addParams.certBeginDate = beginDate.value.replace(/-/g, "");
+      showBeginDate.value = false;
+    };
+    const onConfirmEndDate = (value) => {
+      endDate.value = dateUtil.formateDate(value, "yyyy-MM-dd");
+      addParams.certEndDate = endDate.value.replace(/-/g, "");
+      showEndDate.value = false;
+    };
+    // 将日期格式转换为'YYYY-MM-DD'格式
+    const formatDate = (value) => {
+      const year = value.slice(0, 4);
+      const month = value.slice(4, 6);
+      const day = value.slice(6, 8);
+      return `${year}-${month}-${day}`;
+    };
+    // 发送验证码
+    const sendCode = async () => {
+      const { data } = await sendSms({
+        adminId: user.id,
+      });
+      console.log('seedVerCodeSuccess', data);
+      if (data.code === '00000') {
+        Toast({
+          duration: 2000,
+          message: t('huifuMch.successSend')+'\n' + maskPhoneNumber(data.data.phone)
+        });
+        console.log('seedVerCodeSuccess');
+        verCodeTime.time = 60;
+        verCodeTimeInterval();
+      } else {
+        Toast.fail(data.message);
+      }
+    }
+    // 格式手机号码
+    const maskPhoneNumber = (value) => {
+      const prefix = value.slice(0, 3);
+      const suffix = value.slice(-4);
+      return `${prefix}****${suffix}`;
+    }
+    // 验证码发送成功开始3分钟倒计时
+    const verCodeTimeInterval = () => {
+      verCodeTime.time--;
+      setLocal('registerVerCodeTime', verCodeTime.time)
+      if (verCodeTime.time !== 0) {
+        setTimeout(() => {
+          verCodeTimeInterval();
+        }, 1000);
+      }
+    }
+    //
+    onMounted(async () => {
+      const { data } = await getHuifuMchCheck({ adminId: user.id });
+      console.log(data.data);
+      if (data.data != null) {
+        huifuMchCheck.value = data.data;
+        addParams.type = data.data.type;
+        addParams.regName = data.data.regName;
+        addParams.shortName = data.data.shortName;
+        addParams.name = data.data.name;
+        addParams.phone = data.data.phone;
+        addParams.email = data.data.email;
+        addParams.cardName = data.data.cardName;
+        addParams.cardNo = data.data.cardNo;
+        addParams.provId = data.data.provId;
+        addParams.areaId = data.data.areaId;
+        addParams.districtId = data.data.districtId;
+        addParams.detailAddr = data.data.detailAddr;
+        addParams.cardProvId = data.data.cardProvId;
+        addParams.cardAreaId = data.data.cardAreaId;
+        addParams.mp = data.data.mp;
+        addParams.certNo = data.data.certNo;
+        addParams.certValidityType = data.data.certValidityType;
+        addParams.certBeginDate = data.data.certBeginDate;
+        addParams.certEndDate = data.data.certEndDate;
+        beginDate.value = formatDate(data.data.certBeginDate);
+        endDate.value = formatDate(data.data.certEndDate);
+        businessAddress.value = areaList.province_list[data.data.provId] + '/' + areaList.city_list[data.data.areaId] + '/' + areaList.county_list[data.data.districtId];
+        bankAddress.value = areaList.province_list[data.data.cardProvId] + '/' + areaList.city_list[data.data.cardAreaId]
+        verCodeTime.time = getLocal('registerVerCodeTime');
+        if (verCodeTime.time && verCodeTime.time !== '') {
+          verCodeTime.time = parseInt(verCodeTime.time);
+          if (verCodeTime.time > 0) {
+            verCodeTimeInterval();
+          }
+        } else {
+          verCodeTime.time = 0;
+        }
+      } else {
+        Toast.fail(data.message);
+      }
+    });
+    // 提交修改审核
+    const submitUpdateCheck = async () => {
+      const { data } = await updateMerchant(addParams);
+      if (data.code == "00000") {
+        console.log(data);
+        Toast.success(t('huifuMch.submittedSuccessfully'));
+        setTimeout(() => {
+          router.go(-1);
+        }, 1000);
+      } else {
+        Toast.fail(`${t('huifuMch.submitFailed')} ${data.message}`);
+      }
+    }
+    const onSubmit = async () => {
+      console.log('onSubmit', addParams);
+      submitUpdateCheck();
+    };
+    return {
+      ...toRefs(addParams),
+      ...toRefs( verCodeTime),
+      verCodeTime,
+      sendCode,
+      onSubmit,
+      showStatus,
+      businessAddress,
+      bankAddress,
+      registeredAddress,
+      huifuMchCheck,
+      areaList,
+
+      beginDateLicense,
+      endDateLicense,
+      companyFoundDate,
+      beginDate,
+      endDate,
+
+      showArea,
+      showBankAddress,
+      showReAddress,
+      showBeginDateLicense,
+      showEndDateLicense,
+      showFoundDate,
+      showBeginDate,
+      showEndDate,
+
+      onConfirm,
+      onConfirmBankAddress,
+      onConfirmReAddress,
+      onConfirmBeginDateLicense,
+      onConfirmEndDateLicense,
+      onConfirmFoundDate,
+      onConfirmBeginDate,
+      onConfirmEndDate,
+
+      minDate: new Date(2000, 0, 1),
+      maxDate: new Date(2035, 11, 31),
+      submitUpdateCheck,
+      formatDate,
+      maskPhoneNumber,
+    };
+  },
+};
+</script>
+  
+<style lang="less" scoped>
+@import "../../common/style/common.less";
+@import "./index.less";
+</style>
+  

+ 4 - 3
src/views/login.vue

@@ -71,9 +71,9 @@
 import md5 from "js-md5";
 import {onMounted, ref, computed, reactive} from "vue";
 import {Toast, Dialog, Button} from "vant";
-import {login, getSys, getOpenid} from "../service/login";
-import {setLocal, getLocal, navigatorLanguage, styleUrl} from "../common/js/utils";
-import sHeader from "../components/SimpleHeader";
+import {login, getSys, getOpenid} from "@/service/login";
+import {setLocal, getLocal, navigatorLanguage, styleUrl} from "@/common/js/utils";
+import sHeader from "@/components/SimpleHeader";
 import {useRoute, useRouter} from "vue-router";
 import {useI18n} from "vue-i18n";
 // vant 组件的中英文切换
@@ -146,6 +146,7 @@ export default {
       const {data} = await login({
         username: values.userName,
         password: md5(values.userPwd),
+        hostName: 'Sunzee',
       });
       if (data.code === "00000") {
         setLocal("loginUser", JSON.stringify(data.data));

+ 279 - 132
src/views/orderCenter/index.vue

@@ -4,7 +4,7 @@
     <s-header :name="$t('orderCenter.orderCenter')" :noback="false"></s-header>
     <div class="orderBox">
       <van-list v-model:loading="loading" v-model:error="error" :error-text="$t('public.requestFailed')"
-                :finished="finished" :finished-text="$t('public.noMore')" offset="300" :immediate-check="false" @load="onLoad">
+        :finished="finished" :finished-text="$t('public.noMore')" offset="300" :immediate-check="false" @load="onLoad">
         <div class="main3 flex-col justify-center">
           <div class="outer1 flex-col justify-between">
             <div class="group4 flex-row justify-between">
@@ -60,7 +60,8 @@
         <div class="o-mtb-10" style="height: 10px; background: #f5f5f5"></div>
         <!-- 时间 -->
         <div class="c-text-c c-text-18">
-          {{ $M_FormatTime(searchParams.startDate, 'YYYY-MM-DD') }}--{{ $M_FormatTime(searchParams.endDate, 'YYYY-MM-DD') }}
+          {{ $M_FormatTime(searchParams.startDate, 'YYYY-MM-DD') }}--{{ $M_FormatTime(searchParams.endDate, 'YYYY-MM-DD')
+          }}
         </div>
         <div class="group7 flex-col justify-center">
           <div class="main9 flex-col justify-between">
@@ -87,16 +88,44 @@
             <div class="section4 flex-col">
               <div v-for="(item, index) in orderList" :key="index">
                 <div class="section5 flex-col" @click="orderClick(item)">
-                  <div class="flex-row align-center">
-                    <!--                    <div class="sugerPhto" v-if="showSugerPhoto(item)">
-                      <img class="sugerImg" :src="showSugerPhoto(item)" />
-                    </div> -->
+
+                  <van-card :thumb="showSugerPhoto(item)">
+                    <template #title>
+                      <span class="word13">{{ $t('orderCenter.tradeName') }}:{{ item.productName }}</span>
+                    </template>
+                    <template #desc>
+                      <span class="word11">{{ $t('orderCenter.equipmentName') }}:{{ item.es }}</span>
+                    </template>
+                    <template #price>
+                      <div class="pricBox flex-row align-end" :class="{ orderError: item.status === 0 }">
+                        <span class="txt9">{{ item.statusText }}:</span>
+                        <span class="info5">&yen;</span>
+                        <span class="word12" v-if="item.status === 3">{{ item.price.toFixed(2) }}</span>
+                        <span class="word12" v-else>{{ item.refundAmount == null ? item.price.toFixed(2) : (item.price -
+                          item.refundAmount).toFixed(2) }}</span>
+                        <span class="word14">{{ $t('orderCenter.dividingDomesticService') }}:&yen;{{ showSubcom(item)
+                        }}</span>
+                      </div>
+                    </template>
+                    <template #price-top>
+                      <span class="time_01">{{ $t('orderCenter.paymentTime') }}:{{ showOrderTime(item, 1) }}</span>
+                    </template>
+                    <template #footer>
+                      <span v-if="item.status === 3">x{{ item.refundQuantity }}</span>
+                      <span v-else>x{{ item.refundQuantity == null ? item.productNumber : (item.productNumber -
+                        item.refundQuantity) }}</span>
+                    </template>
+                  </van-card>
+                  <!-- <div class="flex-row align-center">
                     <div class="flex-col">
                       <div class="flex-row align-center">
                         <div class="main10 flex-col"></div>
                         <span class="txt11">{{ showOrderTime(item, 1) }}</span>
                       </div>
                       <div class="flex-row align-center">
+                        <div class="sugerPhto" v-if="showSugerPhoto(item)">
+                          <img class="sugerImg" :src="showSugerPhoto(item)" />
+                        </div>
                         <span class="word11">{{ $t('orderCenter.equipmentNo') }}:{{ showClientId(item) }}</span>
                         <span class="word13">{{ $t('orderCenter.tradeName') }}:{{ item.productName }}</span>
                       </div>
@@ -111,10 +140,10 @@
                           <span class="word12">{{ item.price }}</span>
                         </div>
                         <span class="word14">{{ $t('orderCenter.dividingDomesticService') }}:&yen;{{ showSubcom(item)
-                          }}</span>
+                        }}</span>
                       </div>
                     </div>
-                  </div>
+                  </div> -->
                   <div v-if="typeof item.status === 'undefined'" class="main11 flex-col orderSuccess"></div>
                   <div v-else class="main11 flex-col" :class="{
                     orderSuccess: item.status === 1,
@@ -123,7 +152,7 @@
                     refunded: item.status === 3,
                   }"></div>
                 </div>
-                <div class="section6 flex-col"></div>
+                <!-- <div class="section6 flex-col"></div> -->
               </div>
             </div>
           </div>
@@ -161,6 +190,10 @@
               <span class="word3">{{ $t('orderCenter.distribution') }}</span>
               <span class="word4">{{ showSubcom(refundObject) }}</span>
             </div>
+            <div class="layer4 flex-row justify-between">
+              <span class="word3">{{ $t('orderCenter.equipmentNo') }}</span>
+              <span class="word4">{{ refundObject.clientId }}</span>
+            </div>
             <div class="layer5 flex-row justify-between">
               <span class="txt7">{{ $t('orderCenter.state') }}</span>
               <span class="word5">{{ showStatus(refundObject) }}</span>
@@ -178,7 +211,7 @@
               <span class="info4">{{ refundObject.refundAmount }}</span>
             </div>
             <van-button size="small" v-if="refundObject.status === 1" @click="noticeClk(refundObject)" round
-                        type="primary" style="margin-top: 20px;">
+              type="primary" style="margin-top: 20px;">
               {{ $t('orderCenter.initiateRefund') }}
             </van-button>
           </div>
@@ -187,26 +220,46 @@
     </van-popup>
     <!-- 退款弹窗 -->
     <kDialog :isCloseForConfirm="false" :dialogTitle="$t('orderCenter.refundTip')"
-             :confirmBtnTxt="$t('orderCenter.refundSubmit')" ref="kDialogRef" @confirmclk="confirmClk">
+      :confirmBtnTxt="$t('orderCenter.refundSubmit')" ref="kDialogRef" @confirmclk="confirmClk">
       <template #content>
+
+        <!-- <van-field colon required type="number" clearable v-model="cofficentForm.price" class="inputAmount"
+          :placeholder="$t('orderCenter.refundAmountPlace')" :label="$t('orderCenter.refundAmount')">
+          <template #extra>
+            {{ $t('orderCenter.most') }}¥{{ cofficentForm.maxPrice }}
+          </template>
+        </van-field>
+        <div class="van-cell l-flex-RC">
+          <div class="van-field__label van-field__label--required">
+            <span>{{ $t('orderCenter.refundQuantity') }}: </span>
+          </div>
+          <van-stepper v-model="cofficentForm.productNumber" theme="round" button-size="22"
+            :max="cofficentForm.maxNumber" disable-input />
+          <span class="o-pl-10">{{ $t('orderCenter.most') + cofficentForm.maxNumber + $t('orderCenter.at') }}</span>
+        </div> -->
         <div class="cust_vantBorder l-flex-RC">
-          <van-field colon required type="number" clearable v-model="cofficentForm.price" class="inputAmount"
-                     :placeholder="$t('orderCenter.refundAmountPlace')" :label="$t('orderCenter.refundAmount')">
-            <template #extra>
-              {{ $t('orderCenter.most') }}¥{{ cofficentForm.maxPrice }}
-            </template>
-          </van-field>
-          <div class="van-cell l-flex-RC">
-            <div class="van-field__label van-field__label--required">
-              <span>{{ $t('orderCenter.refundQuantity') }}: </span>
-            </div>
-            <van-stepper v-model="cofficentForm.productNumber" theme="round" button-size="22"
-                         :max="cofficentForm.maxNumber" disable-input />
-            <span class="o-pl-10">{{ $t('orderCenter.most') + cofficentForm.maxNumber + $t('orderCenter.at') }}</span>
+          <div v-for="(item, index) in orderDetails" :key="index" class="card01">
+            <van-checkbox v-model="isChecked[index]" @change="checkGood(index)" icon-size="20px"></van-checkbox>
+            <van-card :price="item.price" :title="item.productName" :thumb="showSugarPic(item.productNo)">
+              <template #footer>
+                <van-stepper v-model="refundNum[index]" @plus="plusRefundGood(index)" @minus="minusRefundGood(index)"
+                  theme="round" button-size="22" disable-input
+                  :max="item.refundQuantity == null ? item.productNumber : (item.productNumber - item.refundQuantity)" />
+              </template>
+            </van-card>
+          </div>
+        </div>
+        <div class="o-mt-5" style="height: 1px; background: #d7d7e2"></div>
+        <div class="btnFooter">
+          <van-checkbox class="checkAllBtn o-mt-5" v-model="checkedAll" @click="checkAll">全选</van-checkbox>
+          <div class="o-mt-5">
+            <span class="">退款总额:</span>
+            <span class="totalRefund o-pr-15">&yen; {{ totalRefund.toFixed(2) }}</span>
           </div>
         </div>
       </template>
     </kDialog>
+    <loading v-model:show="isLoading" />
   </div>
 </template>
 <script>
@@ -223,7 +276,8 @@ import sHeader from "../../components/SimpleHeader";
 import orderSearch from "./orderSearch.vue";
 import { getOrderList, refundOrder } from "../../service/order/index";
 import { Toast } from "vant";
-import { getLoginUser, $M_IsDate,$M_FormatTime,$M_ExportFile, styleUrl } from "../../common/js/utils";
+import { getLoginUser, $M_IsDate, $M_FormatTime, $M_ExportFile, styleUrl } from "../../common/js/utils";
+import { getHuifuId } from "../../service/huifuMch/index";
 import dateUtil from "../../utils/dateUtil";
 import dateSelectList from "../../components/dateSelectList";
 import typeSelectList from "../../components/typeSelectList";
@@ -235,81 +289,164 @@ export default {
   setup() {
     // 批量修改弹窗
     const kDialogRef = ref(null);
-    // 点击批量修改
+    // 订单明细
+    const orderDetails = ref([]);
+    // 退款商品选择状态
+    const isChecked = ref([]);
+    // 全选状态
+    const checkedAll = ref(false);
+    // 退款总额
+    const totalRefund = ref(0);
+    // 退款商户数量
+    const refundNum = ref([]);
+    // 加载状态
+    const isLoading = ref(false);
+    // 监控退款选择框状态
+    const checkGood = (index) => {
+      if (isChecked.value[index]) {
+        totalRefund.value = parseFloat((totalRefund.value + (refundNum.value[index] * orderDetails.value[index].price)).toFixed(2));
+      } else {
+        if (totalRefund.value > 0) {
+          totalRefund.value = parseFloat((totalRefund.value - (refundNum.value[index] * orderDetails.value[index].price)).toFixed(2));
+        }
+      }
+      // 如果都为true,都为全选
+      if (isChecked.value.every((value) => value === true)) {
+        checkedAll.value = true;
+      } else {
+        checkedAll.value = false;
+      }
+    }
+    // 点击增加按钮
+    const plusRefundGood = (index) => {
+      console.log(isChecked.value[index])
+      if (isChecked.value[index]) {
+        totalRefund.value = parseFloat((totalRefund.value + orderDetails.value[index].price).toFixed(2));
+      }
+    }
+    // 点击减少按钮
+    const minusRefundGood = (index) => {
+      console.log(isChecked.value[index])
+      if (isChecked.value[index]) {
+        totalRefund.value = parseFloat((totalRefund.value - orderDetails.value[index].price).toFixed(2));
+      }
+    }
+    // 点击弹出退款弹窗
     const noticeClk = (row) => {
-      console.log('row', row)
-      cofficentForm.price = row.price;
-      cofficentForm.maxPrice = row.price;
+      // console.log('row', row)
+      isChecked.value = [];
+      orderDetails.value = [];
+      refundNum.value = [];
+      checkedAll.value = false;
+      totalRefund.value = 0;
+      console.log("isChecked", isChecked.value);
+      // cofficentForm.price = row.price;
+      // cofficentForm.maxPrice = row.price;
       cofficentForm.id = row.id;
-      cofficentForm.maxNumber = row.productNumber;
-      cofficentForm.productNumber = row.productNumber;
+      // cofficentForm.maxNumber = row.productNumber;
+      // cofficentForm.productNumber = row.productNumber;
+      row.orderDetails.forEach(item => {
+        console.log(item)
+        if (item.refundStatus == '1' || item.refundStatus == '2') {
+          orderDetails.value.push(item);
+          if (item.refundQuantity != null) {
+            refundNum.value.push(item.productNumber - item.refundQuantity);
+          } else {
+            refundNum.value.push(item.productNumber);
+          }
+        }
+      });
+      // 根据orderDetails的长度,向isChecked添加相应数量的false
+      isChecked.value = Array.from({ length: orderDetails.value.length }, () => false);
+      console.log(refundNum.value);
       kDialogRef.value.openDialog();
     };
+    // 点击全选按钮
+    const checkAll = () => {
+      isChecked.value.forEach((item, index) => {
+        if (isChecked.value[index]) {
+          isChecked.value[index] = !isChecked.value[index]
+          checkedAll.value = false;
+        } else {
+          isChecked.value[index] = !isChecked.value[index]
+          checkedAll.value = true;
+        }
+      })
+    }
     // 点击确定按钮
     const confirmClk = () => {
-      if (!cofficentForm.price) {
-        Toast(t('orderCenter.refundAmountPlace'));
-      } else if (cofficentForm.price > cofficentForm.maxPrice) {
-        Toast(t('orderCenter.most') + cofficentForm.maxPrice);
+      cofficentForm.note = "";
+      cofficentForm.productNumber = 0;
+      cofficentForm.price = 0;
+      isChecked.value.forEach((isCheckedValue, index) => {
+        if (isCheckedValue) {
+          cofficentForm.note = cofficentForm.note + orderDetails.value[index].productNo + "-" + refundNum.value[index] + ","
+          cofficentForm.productNumber = cofficentForm.productNumber + refundNum.value[index];
+        }
+      })
+      cofficentForm.price = totalRefund.value;
+      if (cofficentForm.note === "" || cofficentForm.price === 0 || cofficentForm.price === "") {
+        Toast(t('orderCenter.refundPlace'));
+        return;
       } else {
+        console.log(cofficentForm);
         Dialog.confirm({
           // title: "提示",
-          message: t('device.editCheck'),
+          message: t('orderCenter.refundCheck'),
         }).then(() => {
+          isLoading.value = true; // 开始加载
           refundAjax();
+          isLoading.value = false; // 加载完成
+      
           kDialogRef.value.closeDialog();
+        }).catch(() => {
+          return;
         });
       }
     }
     // 退款操作
     const refundAjax = async () => {
-      delete cofficentForm.maxPrice;
-      const { data } = await refundOrder(cofficentForm);
-      console.log('data', data)
-      if (data.code && data.code !== 'B0001') {
-        refundType.value = false;
-        Dialog.alert({
-          message: t('orderCenter.refundSucceeded'),
-        }).then(() => {
-          // on close
-          orderList.value = [];
-          search({});
-        });
-        // Toast.success(t('orderCenter.refundSucceeded'));
-      } else {
-        Toast.fail(data.message);
-      }
+      try {
+        const { data } = await refundOrder(cofficentForm);
+        if (data.code && data.code !== 'B0001') {
+          Dialog.alert({
+            message: t('orderCenter.refundSucceeded'),
+          }).then(() => {
+            refundType.value = false;
+            // on close
+            orderList.value = [];
+            search({});
+          });
+        } else {
+          Toast.fail(data.message);
+        } 
+      } catch (error) {
+        Toast.fail(t('orderCenter.requestFailed'));
+      } 
     };
     // 修改的价格
     const cofficentForm = reactive({
-      price: "",
-      maxPrice: "",
-      maxNumber: "",
+      price: 0,
       id: "",
-      productNumber: ""
+      productNumber: 0,
+      note: 0
     });
     // 引入语言
     const { t } = useI18n();
     // 订单商品图片路径处理
     const showSugerPhoto = (row) => {
-      let imgId = "";
-      // 将note的字段拆解,默认第一个商品图片
-      if (row.note) {
-        const firstGood = row.note.split(",")[0];
-        // 将商品id找出来
-        // 有些商品没有这个id的
-        // 有些商品没有“-”的
-        if (firstGood.indexOf('-') !== -1) {
-          const singleGood = firstGood.split("-");
-          if (singleGood && singleGood.length > 0) {
-            imgId = singleGood[0];
-          }
-        }
-      }
-      if (imgId) {
-        return require(`../../assets/order/spunSugar/goods/${imgId}.png`);
+      // let imgId = "";
+      if (row.orderDetails.length > 0) {
+        // orderDetails.value = row.orderDetails
+        // console.log("orderDetails:", row.orderDetails[0].productNo);
+        return require(`../../assets/order/spunSugar/goods/${row.orderDetails[0].productNo}.png`);
+      } else {
+        return require(`../../assets/order/spunSugar/goods/A15.png`);
       }
-      return imgId;
+    };
+    // 订单明细商品图片路径处理
+    const showSugarPic = (row) => {
+      return require(`../../assets/order/spunSugar/goods/${row}.png`);
     };
     // 如果是空数据
     const noData = (volumes, nums) => {
@@ -320,6 +457,7 @@ export default {
     };
     const user = getLoginUser();
     const searchRef = ref(null);
+    const huifuId = ref(null);
     const orderList = ref([]);
     const orderTotal = ref(0);
     const loading = ref(true);
@@ -346,7 +484,8 @@ export default {
       endDate: "", // 结束时间 Date
       current: 1, // 页数
       size: 20, // 页大小
-      status:"",//支付状态
+      status: "",//支付状态
+      companyType: "", // 公司平台
     });
     let chartType = "day";
     // 获取订单列表数据
@@ -357,16 +496,16 @@ export default {
       const params = Object.assign({}, searchParams);
       if ($M_IsDate(params.startDate)) {
         params.startDate = dateUtil.formateDate(
-            new Date(params.startDate),
-            "yyyy-MM-dd hh:mm:ss"
+          new Date(params.startDate),
+          "yyyy-MM-dd hh:mm:ss"
         );
       } else {
         params.startDate = "";
       }
       if ($M_IsDate(params.endDate)) {
         params.endDate = dateUtil.formateDate(
-            new Date(params.endDate),
-            "yyyy-MM-dd hh:mm:ss"
+          new Date(params.endDate),
+          "yyyy-MM-dd hh:mm:ss"
         );
       } else {
         params.endDate = "";
@@ -379,29 +518,22 @@ export default {
         // 列表值叠加
         if (data.data) {
           orderList.value = orderList.value.concat(
-              data.data.records.map((item) => {
-                return {
-                  ...item,
-                  statusText:
-                      item.altInfo!=null
-                          ? t('orderCenter.onlinePayment')
-                          : t('orderCenter.offlinePayment'),
-                  // item.status && item.status === 0
-                  //   ? t('orderCenter.toBePaid')
-                  //   : item.status
-                  //     ? t('orderCenter.onlinePayment')
-                  //     : t('orderCenter.offlinePayment'),
-                  // productName:
-                  // 	item.pr
-                };
-              })
+            data.data.records.map((item) => {
+              return {
+                ...item,
+                statusText:
+                  item.altInfo != null
+                    ? t('orderCenter.onlinePayment')
+                    : t('orderCenter.offlinePayment'),
+              };
+            })
           );
           orderTotal.value = data.data.total;
           if (
-              data.data.total === 0 ||
-              (data.data.total > 0 &&
-                  orderList.value.length === data.data.total) ||
-              data.data.records.length === 0
+            data.data.total === 0 ||
+            (data.data.total > 0 &&
+              orderList.value.length === data.data.total) ||
+            data.data.records.length === 0
           ) {
             finished.value = true;
           }
@@ -435,9 +567,9 @@ export default {
     };
     // 商户、支付方式、设备、商品选择回调
     const upselectdata = (uSData) => {
-      console.log('uSData', uSData)
+      // console.log('uSData', uSData)
       searchParams = Object.assign(searchParams, uSData);
-      console.log('searchParams', searchParams)
+      // console.log('searchParams', searchParams)
       search();
     };
     // 初始化页面获取列表
@@ -449,6 +581,12 @@ export default {
       if (user) {
         searchParams.adminId = user.id;
         searchParams.userName = user.username;
+        const { data } = await getHuifuId({
+          adminId: user.id,
+        });
+        if (data.code === '00000') {
+          huifuId.value = data.data.huifuId;
+        }
 
         // 获取当天
         let now = new Date();
@@ -468,8 +606,8 @@ export default {
     const gotoOrderExcel = async () => {
       // router.push({ path: "/orderExport" });
       const { headers, data } = await Api_getOnlineExport(searchParams);
-      console.log('headers', headers)
-      console.log('data', data)
+      // console.log('headers', headers)
+      // console.log('data', data)
       $M_ExportFile(data, headers);
     };
     // 订单详情-退款弹窗
@@ -482,15 +620,15 @@ export default {
     };
     const accountDetail = ref({});
     // 获取账户详情
-    const getAccountDetail = (id)=>{
-      getAdminMch({id}).then(res=>{
+    const getAccountDetail = (id) => {
+      getAdminMch({ id }).then(res => {
         accountDetail.value = res.data.data;
       })
     };
     // 订单时间格式转换
-    const showOrderTime = (item,idx) => {
-      if(idx===1){
-        switch(item.status){
+    const showOrderTime = (item, idx) => {
+      if (idx === 1) {
+        switch (item.status) {
           case 1:
             return dateUtil.formateDate(new Date(item.payDate), "yyyy-MM-dd hh:mm:ss");
           case 3:
@@ -498,39 +636,35 @@ export default {
           default:
             return dateUtil.formateDate(new Date(item.createDate), "yyyy-MM-dd hh:mm:ss");
         }
-      }else{
+      } else {
         return item && item.createDate
-            ? dateUtil.formateDate(new Date(item.createDate), "yyyy-MM-dd hh:mm:ss")
-            : "";
+          ? dateUtil.formateDate(new Date(item.createDate), "yyyy-MM-dd hh:mm:ss")
+          : "";
       }
     };
     // 设备编号格式转换
     const showClientId = (item) => {
       return item && item.clientId
-          ? item.clientId.substring(item.clientId.length - 6)
-          : "";
+        ? item.clientId.substring(item.clientId.length - 6)
+        : "";
     };
     // 计算分佣
     const showSubcom = (item) => {
       let subcom = "0";
-      if(item.altInfo){
+      if (item.altInfo) {
         const altInfo = JSON.parse(item.altInfo);
-        if(altInfo&&altInfo.length>0){
+        if (altInfo && altInfo.length > 0) {
           // altInfo这个属性里,最后一个实体的altAmount的值就是他的分佣。
-          subcom = altInfo[altInfo.length-1 ]['altAmount'];
+          subcom = altInfo[altInfo.length - 1]['altAmount'];
+        }
+      }
+      if (item.acctSplitBunch) {
+        const data = JSON.parse(item.acctSplitBunch);
+        const targetObj = data.acct_infos.find(obj => obj.huifu_id === huifuId.value);
+        if (targetObj) {
+          subcom = targetObj.div_amt;
         }
       }
-      // switch (item.type) {
-      //   case 2:
-      //     subcom = (item.price * item.agencyProportion).toFixed(2);
-      //     break;
-      //   case 3:
-      //     subcom = (item.price * item.merchantProportion).toFixed(2);
-      //     break;
-      //   case 4:
-      //     subcom = (item.price * item.personageProportion).toFixed(2);
-      //     break;
-      // }
       return subcom;
     };
     // 弹窗订单状态
@@ -581,20 +715,21 @@ export default {
     const orderNumber = ref(0);
     // 查询图表
     const getStatisticsFun = async () => {
-      console.log('searchParams',searchParams)
+      // console.log('searchParams', searchParams)
       const params = {
         adminId: user.id,
         chartType: chartType,
-        endDate:searchParams.endDate,
+        endDate: searchParams.endDate,
         ifForeign: user.ifForeign,
-        startDate:searchParams.startDate,
+        startDate: searchParams.startDate,
         userName: searchParams.userName,
         clientId:
-            searchParams.clientId === "" ? null : searchParams.clientId,
+          searchParams.clientId === "" ? null : searchParams.clientId,
         equipmentId:
-            searchParams.equipmentId === "" ? null : searchParams.equipmentId,
+          searchParams.equipmentId === "" ? null : searchParams.equipmentId,
         payType:
-            searchParams.payType === "" ? null : searchParams.payType,
+          searchParams.payType === "" ? null : searchParams.payType,
+        companyType: searchParams.companyType,
       };
       const { data } = await getStatistics(params);
       if (data.code && data.data) {
@@ -645,6 +780,18 @@ export default {
       accountDetail,
       $M_FormatTime,
       searchParams,
+      orderDetails,
+      huifuId,
+      showSugarPic,
+      isChecked,
+      refundNum,
+      checkAll,
+      checkedAll,
+      totalRefund,
+      checkGood,
+      plusRefundGood,
+      minusRefundGood,
+      isLoading
     };
   },
 };

+ 144 - 73
src/views/orderExport/index.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 订单分析 -->
-  <div class="page flex-col">
+  <div class="orderExpotPage flex-col">
     <s-header :name="$t('orderExport.orderAnalysis')" :noback="false"></s-header>
     <div class="Body flex-col">
       <div class="mod3 flex-col">
@@ -28,89 +28,107 @@
                     <div class="group5 flex-col"></div>
                     <div class="TextGroup2 flex-col">
                       <span class="txt1 c-text-w6">{{
-                          $t("orderExport.orderDetails")
-                        }}</span>
+                        $t("orderExport.orderDetails")
+                      }}</span>
                     </div>
                   </div>
                 </div>
                 <div class="l-flex-RC">
                   <div class="c-text-13 l-flex-RC text5">
                     <span @click="noticeClk" class="">{{
-                        $t("orderExport.clickFilter")
-                      }}</span>
+                      $t("orderExport.clickFilter")
+                    }}</span>
                     <div class="outer4 flex-col o-ml-6"></div>
                   </div>
                   <div @click="exportOrder()" class="c-text-13 l-flex-RC o-ml-20 c-text-color">
                     <span class="">{{
-                        $t("orderExport.exportToExcel")
-                      }}</span>
+                      $t("orderExport.exportToExcel")
+                    }}</span>
                     <div class="outer4 flex-col o-ml-6"></div>
                   </div>
                 </div>
               </div>
               <img class="img2" referrerpolicy="no-referrer"
-                   src="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng8947935ab81635fdedd8124b11e305eef66286421b69c84fef22233014a3fa9a" />
+                src="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng8947935ab81635fdedd8124b11e305eef66286421b69c84fef22233014a3fa9a" />
             </div>
           </div>
-          <van-pull-refresh disabled v-model="refreshing" @refresh="onRefresh">
-            <van-list v-model="loading" :finished="finished" :finished-text="$t('common.noMoreTxt')" @load="onLoad"
-                      :offset="300" :immediate-check="false">
-              <div v-for="(item, index) in tableData" :key="index" class="orderItem">
-                <div class="mod9 flex-row">
-                  <span class="info7">&yen;</span>
-                  <span class="info8">{{ item.priceTotal }}</span>
-                  <span class="word9">{{ $t("orderExport.totalSales") }}</span>
-                </div>
-                <div class="mod10 flex-row">
-                  <span class="txt3 o-mr-10">{{ item.username }}</span>
-                  <span class="txt4 c-text-line1">{{ item.name }},{{ item.phone }}</span>
-                </div>
-                <span class="info9">{{ item.address }}</span>
-                <div class="mod11 flex-col">
-                  <span v-if="type == 2" class="txt5">{{ item.equipmentTotal }}{{ $t("orderExport.machines") }},{{
-                      $t("orderExport.superior")
-                    }}:{{ item.lastUsername }}</span>
-                  <div v-else class="txt5 l-flex-RC">
-                    <div>{{ item.equipmentType }}</div>
-                    <div class="lineCon o-mlr-6"></div>
-                    <div>{{ item.clientId }}</div>
-                  </div>
+          <!-- <van-pull-refresh disabled v-model="refreshing" @refresh="onRefresh"> -->
+          <van-list v-model:loading="loading" v-model:error="error" :finished="finished"
+            :finished-text="$t('public.noMore')" @load="onLoad" offset="300" immediate-check="false">
+            <div v-for="(item, index) in tableData" :key="index" class="orderItem">
+              <div class="mod9 flex-row">
+                <span class="info7">&yen;</span>
+                <span class="info8">{{ item.priceTotal }}</span>
+                <span class="word9">{{ $t("orderExport.totalSales") }}</span>
+              </div>
+              <div class="mod10 flex-row">
+                <span class="txt3 o-mr-10">{{ item.username }}</span>
+                <span class="txt4 c-text-line1">{{ item.name }}</span><span class="txt4 c-text-line1">,{{ item.phone
+                }}</span>
+              </div>
+              <span class="info9">{{ $t("orderExport.address") }}:{{ item.address }}</span>
+              <div class="mod11 flex-col">
+                <span v-if="type == 2" class="txt5">{{ item.equipmentTotal }}{{ $t("orderExport.machines") }},{{
+                  $t("orderExport.superior")
+                }}:{{ item.lastUsername }}</span>
+                <div v-else class="txt5 l-flex-RC">
+                  <div>{{ item.equipmentType }}</div>
+                  <div class="lineCon o-mlr-6"></div>
+                  <div>{{ item.clientId }}</div>
                 </div>
               </div>
-            </van-list>
-          </van-pull-refresh>
+            </div>
+          </van-list>
+          <!-- </van-pull-refresh> -->
         </div>
       </div>
     </div>
     <!-- 筛选弹窗 -->
     <kDialog :dialogTitle="$t('orderExport.searchPop.title')" :cancelBtnTxt="$t('orderExport.searchPop.clearFilter')"
-             :confirmBtnTxt="$t('orderExport.searchPop.filter')" ref="kDialogRef" @confirmclk="confirmClk"
-             :isCloseForCancel="false" @cancelclk="cancelClk">
+      :confirmBtnTxt="$t('orderExport.searchPop.filter')" ref="kDialogRef" @confirmclk="confirmClk"
+      :isCloseForCancel="false" @cancelclk="cancelClk">
       <template #content>
         <div class="cust_vantBorder">
           <van-field clearable v-model="searchForm.orderNo" :placeholder="$t('orderExport.searchPop.orderNoPlace')"
-                     :label="$t('orderExport.searchPop.orderNo')" />
+            :label="$t('orderExport.searchPop.orderNo')" />
           <van-field clearable v-model="searchForm.busiName" :placeholder="$t('orderExport.searchPop.busiNamePlace')"
-                     :label="$t('orderExport.searchPop.busiName')" />
+            :label="$t('orderExport.searchPop.busiName')" />
           <van-field @click-input="changeTypeInpClk" readonly clearable v-model="searchForm.ifForeignName"
-                     :placeholder="$t('orderExport.searchPop.mainOverPlace')" :label="$t('orderExport.searchPop.mainOver')">
+            :placeholder="$t('orderExport.searchPop.mainOverPlace')" :label="$t('orderExport.searchPop.mainOver')">
             <template #right-icon>
               <div class="l-flex-RC">
-                <van-icon v-if="searchForm.ifForeignName" @click="
-                  searchForm.ifForeignName = '';
-                searchForm.ifForeign = '';
-                                                                      " class="o-mr-6" name="clear" />
+                <van-icon v-if="searchForm.ifForeignName" @click="searchForm.ifForeignName = '';
+                searchForm.ifForeign = '';" class="o-mr-6" name="clear" />
                 <van-icon @click="changeTypeInpClk" name="arrow-down" />
               </div>
             </template>
           </van-field>
+          <van-field v-if="isAdmin()" @click-input="companyTypeInpClk" readonly clearable
+            v-model="searchForm.companyTypeName" :placeholder="$t('orderExport.searchPop.companyTypePlaceholder')"
+            :label="$t('orderExport.searchPop.companyTypeLabel')">
+            <template #right-icon>
+              <div class="l-flex-RC">
+                <van-icon v-if="searchForm.companyTypeName" @click="
+                  searchForm.companyTypeName = '';
+                searchForm.companyType = '';
+                " class="o-mr-6" name="clear" />
+                <van-icon @click="companyTypeInpClk" name="arrow-down" />
+              </div>
+            </template>
+          </van-field>
         </div>
       </template>
     </kDialog>
     <!-- 大陆或海外弹窗 -->
     <van-popup v-model:show="changeTypeShow" position="bottom">
       <van-picker :title="$t('orderExport.searchPop.mainOverPlace')" :columns="changeTypePopList"
-                  :columns-field-names="changeTypePopFieldName" @confirm="changeTypePopConfirm" @cancel="changeTypeShow = false" />
+        :columns-field-names="changeTypePopFieldName" @confirm="changeTypePopConfirm" @cancel="changeTypeShow = false" />
+    </van-popup>
+    <!-- 公司平台弹窗 -->
+    <van-popup v-model:show="companyTypeShow" position="bottom">
+      <van-picker :default-index="chgTypeDefaIdx" :title="$t('orderExport.searchPop.companyTypePlaceholder')"
+        :columns="companyTypePopList" :columns-field-names="changeTypePopFieldName" @confirm="companyTypePopConfirm"
+        @cancel="companyTypeShow = false" />
     </van-popup>
   </div>
 </template>
@@ -132,7 +150,7 @@ export default {
   setup() {
     // 分页
     const pageNo = ref(1);
-    const pageSize = ref(20);
+    const pageSize = ref(10);
     let ruleData = reactive({
       tableData: [],
     });
@@ -140,39 +158,54 @@ export default {
     const loading = ref(true);
     const finished = ref(false);
     // 下拉刷新
-    const refreshing = ref(false);
-    // 初始化页面获取列表
+    // const refreshing = ref(false);
+    const user = getLoginUser();
+    const companyTypeShow = ref(false);
+    // 是否管理员
+    const isAdmin = () => { return (user && user.type === 0); }
+    // 公司平台弹窗
+    const companyTypeInpClk = () => {
+      companyTypeShow.value = true;
+    };
     onMounted(() => {
       // 加载样式
       styleUrl('orderExport');
-      const user = getLoginUser();
+      ruleData.tableData = [];
+      pageNo.value = 1;
       // 今日
       searchParams.startDate = moment().format("YYYY-MM-DD") + " 00:00:00";
       searchParams.endDate = moment().format("YYYY-MM-DD") + " 23:59:59";
       if (user) {
-        onRefresh();
+        // onRefresh();
+        finished.value = false;
+        getList();
       }
     });
     // 下拉刷新
-    const onRefresh = (idx) => {
-      ruleData.tableData = [];
-      // 解决请求两次问题
-      if (!idx) {
-        finished.value = false;
-      }
-      loading.value = true;
-      // 初始化分页
-      pageNo.value = 1;
-      pageSize.value = 20;
-      getList();
-    };
+    // const onRefresh = (idx) => {
+    //   ruleData.tableData = [];
+    //   // 解决请求两次问题
+    //   if (!idx) {
+    //     finished.value = false;
+    //   }
+    //   loading.value = true;
+    //   // 初始化分页
+    //   pageNo.value = 1;
+    //   pageSize.value = 10;
+    //   getList();
+    // };
     // 上拉加载
     const onLoad = () => {
-      pageNo.value++;
-      getList();
+      // if (!finished.value) {
+      //   console.log("1");
+      if (!finished.value) {
+        pageNo.value = pageNo.value + 1;
+        getList();
+      }
     };
     // 获取列表数据
-    const getList = () => {
+    const getList = async () => {
+      finished.value = false;
       // 如果存在chartType去掉
       if (searchParams.chartType) {
         delete searchParams.chartType;
@@ -185,11 +218,12 @@ export default {
         const { data } = res.data;
         console.log('data', data)
         if (data) {
-          refreshing.value = false;
+          // refreshing.value = false;
           ruleData.tableData.push(...data.records);
+          console.log(ruleData.tableData.length);
           // 加载状态结束
           loading.value = false;
-          if (ruleData.tableData.length >= data.total) {
+          if (ruleData.tableData.length < data.size) {
             finished.value = true;
           }
         }
@@ -227,6 +261,11 @@ export default {
       searchForm.ifForeignName = e.name;
       changeTypeShow.value = false;
     };
+    const companyTypePopConfirm = (e) => {
+      searchForm.companyType = e.id;
+      searchForm.companyTypeName = e.name;
+      companyTypeShow.value = false;
+    };
     // 点击导出按钮
     const exportOrder = async () => {
       const param = {
@@ -250,6 +289,7 @@ export default {
       busiName: "",
       ifForeign: "0",
       ifForeignName: "大陆",
+      companyType: "",
     });
     // 点击筛选条件的清空条件按钮
     const cancelClk = () => {
@@ -257,12 +297,14 @@ export default {
       searchForm.busiName = '';
       searchForm.ifForeign = '0';
       searchForm.ifForeignName = '大陆';
+      searchForm.companyType = "";
     };
     // 点击筛选条件的筛选按钮
     const confirmClk = () => {
       searchParams.clientId = searchForm.orderNo;
       searchParams.username = searchForm.busiName;
       searchParams.ifForeign = searchForm.ifForeign;
+      searchParams.companyType = searchForm.companyType;
       getList();
     };
     // 商户设备tab栏
@@ -278,8 +320,26 @@ export default {
         id: 2,
       },
     ]);
+    // 公司平台
+    const companyTypePopList = [
+      {
+        name: t("orderExport.searchPop.whole"),
+        id: "",
+      },
+      {
+        name: t("orderExport.searchPop.sz"),
+        id: "0",
+      },
+      {
+        name: t("orderExport.searchPop.sc"),
+        id: "1",
+      },
+    ];
     // 点击tab
     const tabChg = (e) => {
+      pageNo.value = 1;
+      pageSize.value = 10;
+      ruleData.tableData = [];
       if (e == 1) {
         searchParams.type = 1;
       } else {
@@ -293,7 +353,9 @@ export default {
       username: "",
       startDate: "",
       endDate: "",
-      ifForeign: '0'
+      ifForeign: '0',
+      adminId: user.id,
+      companyType: "",
     });
     // 搜索点击
     const searchClick = () => {
@@ -301,20 +363,28 @@ export default {
     };
     // 今日、明日、本周、本月、其他时间选择回调
     const update = (uDate) => {
+      pageNo.value = 1;
+      pageSize.value = 10;
+      ruleData.tableData = [];
       searchParams = Object.assign(searchParams, uDate);
       searchParams.startDate = dateUtil.formateDate(
-          new Date(searchParams.startDate),
-          "yyyy-MM-dd hh:mm:ss"
+        new Date(searchParams.startDate),
+        "yyyy-MM-dd hh:mm:ss"
       );
       searchParams.endDate = dateUtil.formateDate(
-          new Date(searchParams.endDate),
-          "yyyy-MM-dd hh:mm:ss"
+        new Date(searchParams.endDate),
+        "yyyy-MM-dd hh:mm:ss"
       );
-      onRefresh(1);
+      getList();
+      // onRefresh(1);
     };
     return {
       ...toRefs(searchParams),
+      companyTypePopConfirm,
+      companyTypePopList,
       searchClick,
+      companyTypeInpClk,
+      companyTypeShow,
       update,
       exportOrder,
       tabChg,
@@ -333,10 +403,11 @@ export default {
       pageSize,
       loading,
       finished,
-      refreshing,
-      onRefresh,
+      // refreshing,
+      // onRefresh,
       onLoad,
       getList,
+      isAdmin,
       ...toRefs(ruleData),
     };
   },

+ 101 - 0
src/views/popPayment.vue

@@ -0,0 +1,101 @@
+<template>
+    <div>
+        <van-nav-bar title="订单信息" />
+        <van-card class="my-card" v-for="(orderDetail, index) in orderDetails" :key="index" :num="orderDetail.productNumber"
+            :price="orderDetail.price" :title="orderDetail.productName" :thumb="showSugarPhoto(orderDetail.productNo)" />
+        <van-submit-bar :price="amount" button-color="#07c160" button-text="支付"
+            @click="wxPay()" />
+    </div>
+</template>
+  
+<script>
+import { useRoute } from "vue-router";
+import { Toast, Dialog } from 'vant';
+import { getOrderBySn } from '@/service/popPayment';
+import { onMounted, ref } from "vue";
+
+
+export default {
+    name: 'popPayment',
+
+    setup() {
+        const route = useRoute();
+        const sn = route.query.sn;
+        const status = route.query.status;
+        const order = ref(null);
+        const orderDetails = ref([]);
+        const amount = ref();
+
+        onMounted(async () => {
+            if (status == 1) {
+                Dialog.alert({
+                    message: '订单已支付',
+                    theme: 'round-button',
+                    confirmButtonColor: '#07c160',
+                }).then(() => {
+                    if (typeof window.WeixinJSBridge !== 'undefined') {
+                        window.WeixinJSBridge.call('closeWindow');
+                    } else {
+                        window.close();
+                    }
+                })
+            } else {
+                await getOrder();
+            }
+        });
+        const getOrder = async () => {
+            const { data } = await getOrderBySn({ sn: sn });
+            if (data.code === '00000') {
+                order.value = data.data;
+                orderDetails.value = data.data.orderDetails;
+                console.log("order", order.value);
+                console.log("orderDetails", orderDetails.value[0]);
+                amount.value = order.value.price * 100;
+                // console.log(amount.value);
+            } else { Toast.fail(data.message); }
+
+        };
+        const showSugarPhoto = (no) => {
+            return require(`../assets/order/spunSugar/goods/${no}.png`);
+        };
+        const wxPay = () => {
+            WeixinJSBridge.invoke(
+                'getBrandWCPayRequest', {
+                "appId": "wxcd5b1b2636c9f611",     //公众号ID,由商户传入     
+                "timeStamp": route.query.timeStamp,         //时间戳,自1970年以来的秒数     
+                "nonceStr": route.query.nonceStr, //随机串     
+                "package": route.query.package,
+                "signType": "RSA",         //微信签名方式:     
+                "paySign": route.query.paySign //微信签名 
+            },
+                function (res) {
+                    if (res.err_msg == "get_brand_wcpay_request:ok") {
+                        console.log("支付成功");
+                        Toast.success('支付成功');
+                    } else if (res.err_msg == "get_brand_wcpay_request:cancel") {
+                        console.log("取消支付");
+                        Toast('取消支付');
+                    } else if (res.err_msg == "get_brand_wcpay_request:cancel") {
+                        console.log("支付失败");
+                        Toast.fail('支付失败');
+                    }
+                }
+            )
+        };
+        return {
+            wxPay,
+            getOrder,
+            orderDetails,
+            showSugarPhoto,
+            amount
+        };
+    }
+};
+</script>
+
+<style>
+
+.van-image__img{
+    object-fit: none !important;
+}
+</style>

+ 1 - 1
src/views/register.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 注册 -->
-  <div class="page flex-col registerPage">
+  <div class="flex-col registerPage">
     <s-header :name="$t('register.header')" :noback="false"></s-header>
     <div class="registerFormBox">
       <van-form @submit="registerSubmit">

+ 132 - 171
src/views/robotRanking.vue

@@ -1,9 +1,6 @@
 <template>
   <div class="robotRanking flex-col">
-    <s-header
-        :name="$t('robotRanking.machineSalesRanking')"
-        :noback="true"
-    ></s-header>
+    <s-header :name="$t('robotRanking.machineSalesRanking')" :noback="true"></s-header>
     <div class="box1 flex-col">
       <div class="box3 flex-col">
         <div class="main1 flex-col">
@@ -15,8 +12,8 @@
                     <div class="layer3 flex-col"></div>
                     <div class="TextGroup1 flex-col">
                       <span class="word3">{{
-                          $t("robotRanking.machineSalesRanking")
-                        }}</span>
+                        $t("robotRanking.machineSalesRanking")
+                      }}</span>
                     </div>
                   </div>
                 </div>
@@ -25,93 +22,48 @@
                   <span class="txt3">{{ $t("robotRanking.rankMethod") }}</span>
                 </div>
               </div>
-              <img
-                  class="img1"
-                  referrerpolicy="no-referrer"
-                  src="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng8947935ab81635fdedd8124b11e305eef66286421b69c84fef22233014a3fa9a"
-              />
+              <img class="img1" referrerpolicy="no-referrer"
+                src="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng8947935ab81635fdedd8124b11e305eef66286421b69c84fef22233014a3fa9a" />
             </div>
           </div>
           <div class="l-f l-flex-e o-plr-15">
-            <span class="robotLabelName l-in c-text-13" style="color: #404d74"
-            >{{ $t("robotRanking.dailySalesRanking") }}:</span
-            >
-            <kTabs
-                @tabclk="(e) => tabclk(e, 'day')"
-                :tabList="tabDayList"
-            ></kTabs>
+            <span class="robotLabelName l-in c-text-13" style="color: #404d74">{{ $t("robotRanking.dailySalesRanking")
+            }}:</span>
+            <kTabs @tabclk="(e) => tabclk(e, 'day')" :tabList="tabDayList"></kTabs>
           </div>
-          <div
-              v-if="!totalNoData('day')"
-              ref="dayChartBox"
-              class="mod3 flex-col"
-          ></div>
+          <div v-if="!totalNoData('day')" ref="dayChartBox" class="mod3 flex-col"></div>
           <kNoData v-else></kNoData>
           <div class="groove"></div>
           <div class="l-f l-flex-e o-plr-15">
-            <span
-                class="robotLabelName l-in o-mr-6 c-text-13"
-                style="color: #404d74"
-            >{{ $t("robotRanking.salesRankingThisWeek") }}:</span
-            >
-            <kTabs
-                @tabclk="(e) => tabclk(e, 'week')"
-                :tabList="tabWeekList"
-            ></kTabs>
+            <span class="robotLabelName l-in o-mr-6 c-text-13" style="color: #404d74">{{
+              $t("robotRanking.salesRankingThisWeek") }}:</span>
+            <kTabs @tabclk="(e) => tabclk(e, 'week')" :tabList="tabWeekList"></kTabs>
           </div>
-          <div
-              v-if="!totalNoData('week')"
-              ref="weekChartBox"
-              class="mod5 flex-col"
-          ></div>
+          <div v-if="!totalNoData('week')" ref="weekChartBox" class="mod5 flex-col"></div>
           <kNoData v-else></kNoData>
           <div class="groove"></div>
           <div class="l-f l-flex-e o-plr-15">
-            <span
-                class="robotLabelName l-in o-mr-6 c-text-13"
-                style="color: #404d74"
-            >{{ $t("robotRanking.salesRankingThisMonth") }}:</span
-            >
-            <kTabs
-                @tabclk="(e) => tabclk(e, 'month')"
-                :tabList="tabMonthList"
-            ></kTabs>
+            <span class="robotLabelName l-in o-mr-6 c-text-13" style="color: #404d74">{{
+              $t("robotRanking.salesRankingThisMonth") }}:</span>
+            <kTabs @tabclk="(e) => tabclk(e, 'month')" :tabList="tabMonthList"></kTabs>
           </div>
-          <div
-              v-if="!totalNoData('month')"
-              ref="monthChartBox"
-              class="mod9 flex-col"
-          ></div>
+          <div v-if="!totalNoData('month')" ref="monthChartBox" class="mod9 flex-col"></div>
           <kNoData v-else></kNoData>
           <div class="groove"></div>
           <div class="l-f l-flex-e o-plr-15">
-            <span
-                class="robotLabelName l-in o-mr-6 c-text-13"
-                style="color: #404d74"
-            >{{ $t("robotRanking.salesRankingThisYear") }}:</span
-            >
-            <kTabs
-                @tabclk="(e) => tabclk(e, 'year')"
-                :tabList="tabYearList"
-            ></kTabs>
+            <span class="robotLabelName l-in o-mr-6 c-text-13" style="color: #404d74">{{
+              $t("robotRanking.salesRankingThisYear") }}:</span>
+            <kTabs @tabclk="(e) => tabclk(e, 'year')" :tabList="tabYearList"></kTabs>
           </div>
-          <div
-              v-if="!totalNoData('year')"
-              ref="yearChartBox"
-              class="mod11 flex-col"
-          ></div>
+          <div v-if="!totalNoData('year')" ref="yearChartBox" class="mod11 flex-col"></div>
           <kNoData v-else></kNoData>
           <div class="groove"></div>
         </div>
       </div>
     </div>
     <!-- 筛选弹窗 -->
-    <kDialog
-        :dialogTitle="$t('subLedgerManage.search.title')"
-        :confirmBtnTxt="$t('subLedgerManage.search.screen')"
-        ref="kDialogRef"
-        @confirmclk="confirmClk"
-    >
+    <kDialog :dialogTitle="$t('subLedgerManage.search.title')" :confirmBtnTxt="$t('subLedgerManage.search.screen')"
+      ref="kDialogRef" @confirmclk="confirmClk">
       <template #content>
         <div class="cust_vantBorder">
           <!-- <van-field @click-input="busiInpClk" readonly clearable  v-model="searchForm.businessName"
@@ -124,96 +76,66 @@
               </div>
             </template>
           </van-field> -->
-          <van-field
-              @click-input="changeTypeInpClk"
-              readonly
-              clearable
-              v-model="searchForm.changeTypeName"
-              :placeholder="$t('robotRanking.changeTypePlace')"
-              :label="$t('robotRanking.changeType')"
-          >
+          <van-field @click-input="changeTypeInpClk" readonly clearable v-model="searchForm.changeTypeName"
+            :placeholder="$t('robotRanking.changeTypePlace')" :label="$t('robotRanking.changeType')">
             <template #right-icon>
               <div class="l-flex-RC">
-                <van-icon
-                    v-if="searchForm.changeTypeName"
-                    @click="
-                    searchForm.changeTypeName = '';
-                    searchForm.changeType = '';
-                  "
-                    class="o-mr-6"
-                    name="clear"
-                />
+                <van-icon v-if="searchForm.changeTypeName" @click="
+                  searchForm.changeTypeName = '';
+                searchForm.changeType = '';
+                " class="o-mr-6" name="clear" />
                 <van-icon @click="changeTypeInpClk" name="arrow-down" />
               </div>
             </template>
           </van-field>
+          <van-field v-if="isAdmin()" @click-input="companyTypeInpClk" readonly clearable v-model="searchForm.companyTypeName"
+            :placeholder="$t('robotRanking.companyTypePlaceholder')" :label="$t('robotRanking.companyTypeLabel')">
+            <template #right-icon>
+              <div class="l-flex-RC">
+                <van-icon v-if="searchForm.companyTypeName" @click="
+                  searchForm.companyTypeName = '';
+                searchForm.companyType = '';
+                " class="o-mr-6" name="clear" />
+                <van-icon @click="companyTypeInpClk" name="arrow-down" />
+              </div>
+            </template>
+          </van-field>
         </div>
       </template>
     </kDialog>
     <!-- 商家选择框 -->
     <van-popup v-model:show="busiPopShow" position="bottom">
-      <van-picker
-          :title="$t('subLedgerManage.search.busiPlaceholder')"
-          :columns="busiPopList"
-          :columns-field-names="busiPopFieldName"
-          @confirm="busiPopConfirm"
-          @cancel="busiPopShow = false"
-      />
+      <van-picker :title="$t('subLedgerManage.search.busiPlaceholder')" :columns="busiPopList"
+        :columns-field-names="busiPopFieldName" @confirm="busiPopConfirm" @cancel="busiPopShow = false" />
     </van-popup>
     <!-- 统计方式弹窗 -->
     <van-popup v-model:show="changeTypeShow" position="bottom">
-      <van-picker
-          :default-index="chgTypeDefaIdx"
-          :title="$t('robotRanking.changeTypePlace')"
-          :columns="changeTypePopList"
-          :columns-field-names="yearPopFieldName"
-          @confirm="changeTypePopConfirm"
-          @cancel="changeTypeShow = false"
-      />
+      <van-picker :default-index="chgTypeDefaIdx" :title="$t('robotRanking.changeTypePlace')" :columns="changeTypePopList"
+        :columns-field-names="yearPopFieldName" @confirm="changeTypePopConfirm" @cancel="changeTypeShow = false" />
+    </van-popup>
+    <!-- 公司平台弹窗 -->
+    <van-popup v-model:show="companyTypeShow" position="bottom">
+      <van-picker :default-index="chgTypeDefaIdx" :title="$t('robotRanking.companyTypePlaceholder')"
+        :columns="companyTypePopList" :columns-field-names="yearPopFieldName" @confirm="companyTypePopConfirm"
+        @cancel="companyTypeShow = false" />
     </van-popup>
     <!-- 日的日期选择弹窗 -->
-    <van-calendar
-        @confirm="calendarDayConfirm"
-        v-model:show="dayShow"
-        color="#4d6add"
-        :min-date="minDate"
-        :show-confirm="false"
-    />
+    <van-calendar @confirm="calendarDayConfirm" v-model:show="dayShow" color="#4d6add" :min-date="minDate"
+      :show-confirm="false" />
     <!-- 周的日期选择弹窗 -->
-    <van-calendar
-        @confirm="
-        (e) => {
-          calendarWeekOrMonConfirm(e, 1);
-        }
-      "
-        v-model:show="weekShow"
-        :allow-same-day="true"
-        color="#4d6add"
-        :min-date="minDate"
-        type="range"
-    />
+    <van-calendar @confirm="(e) => {
+      calendarWeekOrMonConfirm(e, 1);
+    }
+      " v-model:show="weekShow" :allow-same-day="true" color="#4d6add" :min-date="minDate" type="range" />
     <!-- 月的日期选择弹窗 -->
-    <van-calendar
-        @confirm="
-        (e) => {
-          calendarWeekOrMonConfirm(e, 2);
-        }
-      "
-        v-model:show="monthShow"
-        :allow-same-day="true"
-        color="#4d6add"
-        :min-date="minDate"
-        type="range"
-    />
+    <van-calendar @confirm="(e) => {
+      calendarWeekOrMonConfirm(e, 2);
+    }
+      " v-model:show="monthShow" :allow-same-day="true" color="#4d6add" :min-date="minDate" type="range" />
     <!-- 年的日期选择弹窗 -->
     <van-popup v-model:show="yearShow" position="bottom">
-      <van-picker
-          :title="$t('robotRanking.yearPopTitle')"
-          :columns="yearPopList"
-          :columns-field-names="yearPopFieldName"
-          @confirm="yearPopConfirm"
-          @cancel="yearShow = false"
-      />
+      <van-picker :title="$t('robotRanking.yearPopTitle')" :columns="yearPopList" :columns-field-names="yearPopFieldName"
+        @confirm="yearPopConfirm" @cancel="yearShow = false" />
     </van-popup>
     <nav-bar></nav-bar>
   </div>
@@ -269,7 +191,14 @@ export default {
     const changeTypeInpClk = () => {
       changeTypeShow.value = true;
     };
+    // 是否管理员
+    const isAdmin = () => { return (user && user.type === 0); }
+    // 公司平台弹窗
+    const companyTypeInpClk = () => {
+      companyTypeShow.value = true;
+    };
     const changeTypeShow = ref(false);
+    const companyTypeShow = ref(false);
     // 默认选中
     const chgTypeDefaIdx = ref(1);
     const changeTypePopList = [
@@ -282,20 +211,40 @@ export default {
         id: 0,
       },
     ];
+
+    const companyTypePopList = [
+      {
+        name: t("robotRanking.whole"),
+        id: "",
+      },
+      {
+        name: t("robotRanking.sz"),
+        id: "0",
+      },
+      {
+        name: t("robotRanking.sc"),
+        id: "1",
+      },
+    ];
     const changeTypePopConfirm = (e) => {
       searchForm.changeType = e.id;
       searchForm.changeTypeName = e.name;
       changeTypeShow.value = false;
     };
+    const companyTypePopConfirm = (e) => {
+      searchForm.companyType = e.id;
+      searchForm.companyTypeName = e.name;
+      companyTypeShow.value = false;
+    };
     // 年的日期选择弹窗
     // 点击确定
     const yearPopConfirm = (e) => {
       console.log("e11", e);
       const year = e.id;
       const startDate =
-          moment().year(year).startOf("year").format("YYYY-MM-DD") + " 00:00:00";
+        moment().year(year).startOf("year").format("YYYY-MM-DD") + " 00:00:00";
       const endDate =
-          moment().year(year).endOf("year").format("YYYY-MM-DD") + " 23:59:59";
+        moment().year(year).endOf("year").format("YYYY-MM-DD") + " 23:59:59";
       getEquipRankList("year", startDate, endDate);
       yearShow.value = false;
     };
@@ -432,24 +381,24 @@ export default {
       todayEnd: moment().format("YYYY-MM-DD") + " 23:59:59",
       // 昨日
       colastdayStart:
-          moment()
-              .day(moment().day() - 1)
-              .format("YYYY-MM-DD") + " 00:00:00",
+        moment()
+          .day(moment().day() - 1)
+          .format("YYYY-MM-DD") + " 00:00:00",
       colastdayEnd:
-          moment()
-              .day(moment().day() - 1)
-              .format("YYYY-MM-DD") + " 23:59:59",
+        moment()
+          .day(moment().day() - 1)
+          .format("YYYY-MM-DD") + " 23:59:59",
       // 这周
       weekStart: moment().weekday(1).format("YYYY-MM-DD") + " 00:00:00",
       weekEnd: moment().weekday(7).format("YYYY-MM-DD") + " 23:59:59",
       // 上周
-      lastWeekStart:moment().week(moment().week() - 1).startOf('week').add(1,'days').format("YYYY-MM-DD") + " 00:00:00",
+      lastWeekStart: moment().week(moment().week() - 1).startOf('week').add(1, 'days').format("YYYY-MM-DD") + " 00:00:00",
       // moment()
       //   .week(moment().week() - 1)
       //   .startOf("week")
       //   .format("YYYY-MM-DD") + " 00:00:00",
 
-      lastWeekEnd:moment().week(moment().week() - 1).endOf('week').add(1,'days').format("YYYY-MM-DD") + " 23:59:59",
+      lastWeekEnd: moment().week(moment().week() - 1).endOf('week').add(1, 'days').format("YYYY-MM-DD") + " 23:59:59",
       // moment()
       //   .week(moment().week() - 1)
       //   .endOf("week")
@@ -460,29 +409,29 @@ export default {
       monthEnd: moment().endOf("month").format("YYYY-MM-DD") + " 23:59:59",
       // 上个月
       lastmonthStart:
-          moment()
-              .month(moment().month() - 1)
-              .startOf("month")
-              .format("YYYY-MM-DD") + " 00:00:00",
+        moment()
+          .month(moment().month() - 1)
+          .startOf("month")
+          .format("YYYY-MM-DD") + " 00:00:00",
       lastmonthEnd:
-          moment()
-              .month(moment().month() - 1)
-              .endOf("month")
-              .format("YYYY-MM-DD") + " 23:59:59",
+        moment()
+          .month(moment().month() - 1)
+          .endOf("month")
+          .format("YYYY-MM-DD") + " 23:59:59",
       // 今年
       yearStart: moment().startOf("year").format("YYYY-MM-DD") + " 00:00:00",
       yearEnd: moment().endOf("year").format("YYYY-MM-DD") + " 23:59:59",
       // 上年
       lastYearStart:
-          moment()
-              .year(moment().year() - 1)
-              .startOf("year")
-              .format("YYYY-MM-DD") + " 00:00:00",
+        moment()
+          .year(moment().year() - 1)
+          .startOf("year")
+          .format("YYYY-MM-DD") + " 00:00:00",
       lastYearEnd:
-          moment()
-              .year(moment().year() - 1)
-              .endOf("year")
-              .format("YYYY-MM-DD") + " 23:59:59",
+        moment()
+          .year(moment().year() - 1)
+          .endOf("year")
+          .format("YYYY-MM-DD") + " 23:59:59",
     });
     // 点击tab
     const tabclk = (e, type) => {
@@ -561,6 +510,7 @@ export default {
       }
     };
     const changeType = ref(0);
+    const companyType = ref(""); // 公司平台
     let chartObj = {
       day: null,
       week: null,
@@ -573,9 +523,11 @@ export default {
         adminId: user.id,
         ifForeign: user.ifForeign,
         changeType: changeType.value, //必填,默认为一0:销售额统计,1:花型统计
+        companyType: companyType.value,
         chartType,
         startDate,
         endDate,
+
       };
       getRankingList(param).then(async (res) => {
         const { data } = res;
@@ -694,9 +646,9 @@ export default {
               },
             ];
             dayChartOption.dataZoom[0]["startValue"] =
-                data.data.categories[data.data.categories.length - 5];
+              data.data.categories[data.data.categories.length - 5];
             dayChartOption.dataZoom[0]["endValue"] =
-                data.data.categories[data.data.categories.length - 1];
+              data.data.categories[data.data.categories.length - 1];
             // 解决resize不起作用,配合onMounted里的方法使用
             switch (chartType) {
               case "day":
@@ -745,6 +697,7 @@ export default {
       // 默认筛选选中
       searchForm.changeTypeName = t("robotRanking.salesStatistics");
       searchForm.changeType = 0;
+      searchForm.companyTypeName = t("robotRanking.whole");
       init();
       window.addEventListener("resize", () => {
         chartObj.day && chartObj.day.resize();
@@ -768,6 +721,8 @@ export default {
       businessName: "",
       changeTypeName: "",
       changeType: "",
+      companyTypeName: "",
+      companyType: ""
     });
     const kDialogRef = ref(null);
     const busiPopShow = ref(false);
@@ -796,6 +751,7 @@ export default {
       } else {
         changeType.value = searchForm.changeType;
       }
+      companyType.value = searchForm.companyType;
       init();
     };
     // 筛选弹窗
@@ -849,13 +805,18 @@ export default {
       changeTypePopList,
       changeTypePopConfirm,
       changeTypeInpClk,
+      companyTypeInpClk,
+      companyTypePopConfirm,
+      companyTypePopList,
+      companyTypeShow,
       totalNoData,
       chgTypeDefaIdx,
+
+      isAdmin,
     };
   },
   components: { sHeader, navBar, kTabs, kDialog, kNoData },
 };
 </script>
 
-<style lang="less" scoped>
-</style>
+<style lang="less" scoped></style>

+ 46 - 46
src/views/role/add.vue

@@ -42,7 +42,7 @@
         </van-row>
       </van-form>
     </div>
-    <van-popup v-model:show="roleShow" round position="bottom">
+    <!-- <van-popup v-model:show="roleShow" round position="bottom">
       <van-cascader
           v-model="roleList"
           :title="$t('role.pleaseSelectARole')"
@@ -59,7 +59,7 @@
           @close="equipmentIdShow = false"
           @finish="onEquipmentIdFinish"
       />
-    </van-popup>
+    </van-popup> -->
   </div>
 </template>
 
@@ -67,7 +67,7 @@
 import { onMounted, reactive, toRefs, ref } from "vue";
 import sHeader from "../../components/SimpleHeader";
 import { Toast } from "vant";
-import { getSysRoleList, getEquipmentList } from "../../service/accountPar/index";
+// import { getSysRoleList, getEquipmentList } from "../../service/accountPar/index";
 import { addSysRole, updateSysRole } from "../../service/role/index";
 import { getLoginUser,$M_Menus, styleUrl } from "../../common/js/utils";
 import { useRouter } from "vue-router";
@@ -85,27 +85,27 @@ export default {
     // 设置的权限
     const menuCodeList = ref([]);
     const roleMenuCode = ref([]);
-    const roleShow = ref(false);
+    // const roleShow = ref(false);
     const roleText = ref("");
-    const roleOptions = ref([]);
-    const onRoleFinish = ({ selectedOptions }) => {
-      roleShow.value = false;
-      roleText.value = selectedOptions[0].text;
-    };
-    const equipmentIdShow = ref(false);
+    // const roleOptions = ref([]);
+    // const onRoleFinish = ({ selectedOptions }) => {
+    //   roleShow.value = false;
+    //   roleText.value = selectedOptions[0].text;
+    // };
+    // const equipmentIdShow = ref(false);
     const equipmentIdText = ref("");
     const equipmentIdsOptions = ref([]);
-    const onEquipmentIdFinish = ({ selectedOptions }) => {
-      equipmentIdShow.value = false;
-      equipmentIdText.value = selectedOptions[0].text;
-    };
+    // const onEquipmentIdFinish = ({ selectedOptions }) => {
+    //   equipmentIdShow.value = false;
+    //   equipmentIdText.value = selectedOptions[0].text;
+    // };
     let addParams = reactive({
       username: "",
       password: "",
       name: "",
       phone: "",
       isEnabled: true,
-      roleList: "",
+      // roleList: "",
       equipmentIds: "",
     });
     let roleItem = null;
@@ -123,8 +123,8 @@ export default {
       }
       // 设置菜单权限
       menuSet();
-      getSysRoleListFun();
-      getEquipmentListFun();
+      // getSysRoleListFun();
+      // getEquipmentListFun();
     });
     // 设置菜单权限
     const menuSet = ()=>{
@@ -143,31 +143,31 @@ export default {
       }
     };
     // 获取角色下拉列表
-    const getSysRoleListFun = async () => {
-      const { data } = await getSysRoleList();
-      if (data.code === "00000") {
-        roleOptions.value = data.data.map((item) => {
-          return { text: item.label, value: item.value };
-        });
-      } else {
-        Toast.fail(data.message);
-      }
-    };
+    // const getSysRoleListFun = async () => {
+    //   const { data } = await getSysRoleList();
+    //   if (data.code === "00000") {
+    //     roleOptions.value = data.data.map((item) => {
+    //       return { text: item.label, value: item.value };
+    //     });
+    //   } else {
+    //     Toast.fail(data.message);
+    //   }
+    // };
     // 获取机器下拉
-    const getEquipmentListFun = async () => {
-      const { data } = await getEquipmentList({ adminId: user.id });
-      if (data.code === "00000") {
-        equipmentIdsOptions.value = data.data.map((item) => {
-          return { text: item.name, value: item.id };
-        });
-        equipmentIdsOptions.value.unshift({
-          text: t("role.whole"),
-          value: "all",
-        });
-      } else {
-        Toast.fail(data.message);
-      }
-    };
+    // const getEquipmentListFun = async () => {
+    //   const { data } = await getEquipmentList({ adminId: user.id });
+    //   if (data.code === "00000") {
+    //     equipmentIdsOptions.value = data.data.map((item) => {
+    //       return { text: item.name, value: item.id };
+    //     });
+    //     equipmentIdsOptions.value.unshift({
+    //       text: t("role.whole"),
+    //       value: "all",
+    //     });
+    //   } else {
+    //     Toast.fail(data.message);
+    //   }
+    // };
 
     const onSubmit = async () => {
       if (roleItem) {
@@ -212,14 +212,14 @@ export default {
       roleName,
       menuCodeList,
       roleMenuCode,
-      roleShow,
+      // roleShow,
       roleText,
-      roleOptions,
-      onRoleFinish,
-      equipmentIdShow,
+      // roleOptions,
+      // onRoleFinish,
+      // equipmentIdShow,
       equipmentIdText,
       equipmentIdsOptions,
-      onEquipmentIdFinish,
+      // onEquipmentIdFinish,
       ...toRefs(addParams),
       onSubmit,
     };

+ 0 - 8
src/views/shandeMch/index.less

@@ -1,8 +0,0 @@
-.shandeMchPage {
-  width: 100%;
-  .shandeMchBox {
-    width: 100%;
-    height: calc(100% - 44px);
-    overflow: auto;
-  }
-}

+ 0 - 98
src/views/shandeMch/index.vue

@@ -1,98 +0,0 @@
-<template>
-  <!-- 备用提现账号 -->
-  <div class="shandeMchPage flex-col">
-    <s-header :name="$t('shandeMch.standbyWithdrawalAccountNo')" :noback="false"></s-header>
-    <div class="accountPerBox flex-col">
-      <van-form @submit="onSubmit">
-        <div class="van-cell van-field">
-          <div class="van-cell__title van-field__label"><span>{{$t('shandeMch.merchantType')}}:</span></div>
-          <div class="van-cell__value van-field__value radioBox">
-            <van-radio-group v-model="type" direction="horizontal">
-              <van-radio name="1" icon-size="18px">{{$t('shandeMch.personal')}}</van-radio>
-              <van-radio name="0" icon-size="18px">{{$t('shandeMch.enterprise')}}</van-radio>
-            </van-radio-group>
-          </div>
-        </div>
-        <van-field v-model="bankName" name="bankName" :label="$t('shandeMch.shandebaoAccountNameLabel')" :placeholder="$t('shandeMch.shandebaoAccountNamePlaceholder')"
-          :rules="[{ required: true, message: $t('shandeMch.shandebaoAccountNamePlaceholder') }]" />
-        <van-field v-model="bankNo" name="bankNo" :label="$t('shandeMch.shandebaoAccountNumberLabel')" :placeholder="$t('shandeMch.shandebaoAccountNumberPlaceholder')"
-          :rules="[{ required: true, message: $t('shandeMch.shandebaoAccountNumberPlaceholder')}]" />
-        <van-field v-model="bankChannelNo" name="bankbankChannelNoName" :label="$t('shandeMch.interBankNoLabel')" :placeholder="$t('shandeMch.interBankNoPlaceholder')"
-          :rules="[{ required: type === '1', message:$t('shandeMch.interBankNoPlaceholder') }]" />
-        <van-field v-model="bankChannelName" name="bankChannelName" :label="$t('shandeMch.nameOfDepositBankLabel')" :placeholder="$t('shandeMch.nameOfDepositBankPlaceholder')"
-          :rules="[{ required: type === '1', message: $t('shandeMch.nameOfDepositBankPlaceholder') }]" />
-        <!-- 操作 -->
-        <van-row justify="space-around" style="padding: 1em">
-          <van-button span="5" round type="primary" style="height: 2em; padding: 0 2em" native-type="submit">{{$t('shandeMch.submit')}}
-          </van-button>
-        </van-row>
-      </van-form>
-    </div>
-  </div>
-</template>
-
-<script>
-import { onMounted, reactive, toRefs } from "vue";
-import sHeader from "@/components/SimpleHeader";
-import { Toast } from "vant";
-import { saveShandeMch, getOneShandeMch } from "@/service/shandeMch";
-import { getLoginUser } from "@/common/js/utils";
-import { useRouter } from "vue-router";
-import { useI18n } from "vue-i18n";
-
-export default {
-  components: { sHeader },
-  setup() {
-    // 引入语言
-    const {t} = useI18n();
-    const router = useRouter();
-    const user = getLoginUser();
-    let addParams = reactive({
-      adminId: user.id, // 当前登录账户的id
-      type: '1', // 类型 String 必填 对公企业:type=0; 个人:type=1
-      bankName: '', // 杉德宝账号名称 String 必填
-      bankNo: '', // 杉德宝账号号码 String 必填
-      bankChannelNo: '', // 联行号 type=0时 必填
-      bankChannelName: '', // 开户行名称 type=0时 必填
-    });
-    onMounted(async () => { getOneShandeMchFun(); });
-    // 获取备用提现账号回显
-    const getOneShandeMchFun = async () => {
-      const { data } = await getOneShandeMch({ adminId: user.id });
-      if (data.code === "00000") {
-        console.log(data);
-        addParams.type = data.data.type;
-        addParams.bankName = data.data.bankName;
-        addParams.bankNo = data.data.bankNo;
-        addParams.bankChannelNo = data.data.bankChannelNo;
-        addParams.bankChannelName = data.data.bankChannelName;
-      } else {
-        Toast.fail(data.message);
-      }
-    };
-    const onSubmit = async () => {
-      console.log('onSubmit', addParams);
-      saveShandeMchFun();
-    };
-    const saveShandeMchFun = async () => {
-      const { data } = await saveShandeMch(addParams);
-      if (data.code === "00000") {
-        Toast.success(t('shandeMch.submittedSuccessfully'));
-        router.push("/user");
-      } else {
-        Toast.fail(`${t('shandeMch.submitFailed')} ${data.message}`);
-      }
-      console.log("onSubmit", data);
-    };
-    return {
-      ...toRefs(addParams),
-      onSubmit,
-    };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-@import "../../common/style/common.less";
-@import "./index.less";
-</style>

+ 7 - 4
src/views/taskMessage/joinpayMchCheck/index.vue

@@ -26,15 +26,15 @@
               <div class="itemBox">
                 <div class="itemRow l-flex-between">
                   <div class="l-flex-RC">
-                    <span class="itemTitle">{{ $t('taskMessage.merchantName') }}:&nbsp;</span>{{ item.altMchName }}
+                    <span class="itemTitle">{{ $t('taskMessage.merchantName') }}:&nbsp;</span>{{ payType==0 ? item.altMchName:item.regName }}
                   </div>
                   <van-icon color="#B9BAD0" name="arrow" />
                 </div>
                 <div class="itemRow">
-                  <span class="itemTitle">{{ $t('taskMessage.contactName') }}:&nbsp;</span>{{ item.busiContactName }}
+                  <span class="itemTitle">{{ $t('taskMessage.contactName') }}:&nbsp;</span>{{ payType==0 ? item.busiContactName:item.name }}
                 </div>
                 <div class="itemRow">
-                  <span class="itemTitle">{{ $t('taskMessage.contactPhoneNumber') }}:&nbsp;</span>{{ item.busiContactMobileNo }}
+                  <span class="itemTitle">{{ $t('taskMessage.contactPhoneNumber') }}:&nbsp;</span>{{ payType==0 ? item.busiContactMobileNo:item.phone }}
                 </div>
                 <div class="itemRow">
                   <span class="itemTitle">{{ $t('taskMessage.applicationTime') }}:&nbsp;</span>{{ showDateTime(item.createDate) }}
@@ -99,6 +99,7 @@ export default {
     });
     const kDialogRef = ref(null);
     const busiPopShow = ref(false);
+    const payType = ref(0); // 支付平台,0为汇聚,1为汇付;
     const searchForm = reactive({
       merchantName: "",
       state: "",
@@ -144,7 +145,7 @@ export default {
         id: 0,
       },
       {
-        name: t('taskMessage.joinpayMchCheck.shande'),
+        name: t('taskMessage.joinpayMchCheck.huifu'),
         icon: "",
         id: 1,
       },
@@ -157,6 +158,7 @@ export default {
         searchGetList()
 
       }
+      payType.value = e.name;
       console.log(e, 'e11111111')
     }
     const router = useRouter();
@@ -246,6 +248,7 @@ export default {
       tabList,
       kTabsRef,
       tabClk,
+      payType,
     };
   },
 };

+ 59 - 34
src/views/taskMessage/joinpayMchCheck/info/index.vue

@@ -173,7 +173,7 @@
     <div v-if="detailType == 1 && infoData" class="joinpayMchCheckBox flex-col">
       <div class="van-cell van-field">
         <div class="van-cell__title van-field__label">
-          <label for="van-field-3-input">{{ $t('taskMessage.joinpayMchCheck.merchantID') }}:</label>
+          <label for="van-field-3-input">{{ $t('taskMessage.joinpayMchCheck.merchantID') }}</label>
         </div>
         <div class="van-cell__value van-field__value">
           <div class="van-field__body">
@@ -183,103 +183,102 @@
       </div>
       <div class="van-cell van-field">
         <div class="van-cell__title van-field__label">
-          <label for="van-field-3-input">{{ $t('taskMessage.joinpayMchCheck.nameOfDepoBank') }}:</label>
+          <label for="van-field-3-input">{{ $t('taskMessage.joinpayMchCheck.merchantType') }}</label>
         </div>
         <div class="van-cell__value van-field__value">
           <div class="van-field__body">
-            {{ infoData.bankChannelName }}
+            {{ infoData.type == 0 ? $t('taskMessage.joinpayMchCheck.personal') :
+              $t('taskMessage.joinpayMchCheck.enterprise') }}
           </div>
         </div>
       </div>
       <div class="van-cell van-field">
         <div class="van-cell__title van-field__label">
-          <label for="van-field-3-input">{{ $t('taskMessage.joinpayMchCheck.bankNo') }}:</label>
+          <label for="van-field-3-input">{{ $t('taskMessage.joinpayMchCheck.merchantName') }}</label>
         </div>
         <div class="van-cell__value van-field__value">
           <div class="van-field__body">
-            {{ infoData.bankChannelNo }}
+            {{ infoData.regName }}
           </div>
         </div>
       </div>
       <div class="van-cell van-field">
         <div class="van-cell__title van-field__label">
-          <label for="van-field-3-input">{{ $t('taskMessage.joinpayMchCheck.nameOfPayee') }}:</label>
+          <label for="van-field-3-input">{{ $t('taskMessage.joinpayMchCheck.shortName') }}</label>
         </div>
         <div class="van-cell__value van-field__value">
           <div class="van-field__body">
-            {{ infoData.bankName }}
+            {{ infoData.shortName }}
           </div>
         </div>
       </div>
       <div class="van-cell van-field">
         <div class="van-cell__title van-field__label">
-          <label for="van-field-3-input">{{ $t('taskMessage.joinpayMchCheck.beneAccoNo') }}:</label>
+          <label for="van-field-3-input">{{ $t('taskMessage.joinpayMchCheck.contactName') }}</label>
         </div>
         <div class="van-cell__value van-field__value">
           <div class="van-field__body">
-            {{ infoData.bankNo }}
+            {{ infoData.name }}
           </div>
         </div>
       </div>
       <div class="van-cell van-field">
         <div class="van-cell__title van-field__label">
-          <label for="van-field-3-input">{{ $t('taskMessage.joinpayMchCheck.lastCleaBalance') }}:</label>
+          <label for="van-field-3-input">{{ $t('taskMessage.joinpayMchCheck.phone') }}</label>
         </div>
         <div class="van-cell__value van-field__value">
           <div class="van-field__body">
-            {{ infoData.lastSettleableBalance }}
+            {{ infoData.phone }}
           </div>
         </div>
       </div>
       <div class="van-cell van-field">
         <div class="van-cell__title van-field__label">
-          <label for="van-field-3-input">{{ $t('taskMessage.joinpayMchCheck.balaToBeSettled') }}:</label>
+          <label for="van-field-3-input">{{ $t('taskMessage.joinpayMchCheck.email') }}</label>
         </div>
         <div class="van-cell__value van-field__value">
           <div class="van-field__body">
-            {{ infoData.settleableBalance }}
+            {{ infoData.email }}
           </div>
         </div>
       </div>
       <div class="van-cell van-field">
         <div class="van-cell__title van-field__label">
-          <label for="van-field-3-input">{{ $t('taskMessage.joinpayMchCheck.lastSettTime') }}:</label>
+          <label for="van-field-3-input">{{ $t('taskMessage.joinpayMchCheck.certNo') }}</label>
         </div>
         <div class="van-cell__value van-field__value">
           <div class="van-field__body">
-            {{ infoData.settleableDate }}
+            {{ infoData.certNo }}
           </div>
         </div>
       </div>
       <div class="van-cell van-field">
         <div class="van-cell__title van-field__label">
-          <label for="van-field-3-input">{{ $t('taskMessage.joinpayMchCheck.todaCollBalance') }}:</label>
+          <label for="van-field-3-input">{{ $t('taskMessage.joinpayMchCheck.cardName') }}</label>
         </div>
         <div class="van-cell__value van-field__value">
           <div class="van-field__body">
-            {{ infoData.todayBalance }}
+            {{ infoData.cardName }}
           </div>
         </div>
       </div>
       <div class="van-cell van-field">
         <div class="van-cell__title van-field__label">
-          <label for="van-field-3-input">{{ $t('taskMessage.joinpayMchCheck.clearBalance') }}:</label>
+          <label for="van-field-3-input">{{ $t('taskMessage.joinpayMchCheck.bankAccount') }}</label>
         </div>
         <div class="van-cell__value van-field__value">
           <div class="van-field__body">
-            {{ infoData.totalSettleableBalance }}
+            {{ infoData.cardNo }}
           </div>
         </div>
       </div>
       <div class="van-cell van-field">
         <div class="van-cell__title van-field__label">
-          <label for="van-field-3-input">{{ $t('taskMessage.joinpayMchCheck.ShandebaoType') }}:</label>
+          <label for="van-field-3-input">{{ $t('taskMessage.joinpayMchCheck.mp') }}</label>
         </div>
         <div class="van-cell__value van-field__value">
           <div class="van-field__body">
-            {{ infoData.type == '0' ? $t('taskMessage.joinpayMchCheck.enterpriseShandebao') :
-                $t('taskMessage.joinpayMchCheck.personalShandebao')
-            }}
+            {{ infoData.mp }}
           </div>
         </div>
       </div>
@@ -290,7 +289,7 @@
           {{ $t('taskMessage.refuse') }}
         </van-button>
         <van-button span="5" round type="primary"
-          style="height: 2em; padding: 0 2em; margin: 0 1em; background: rgb(25 137 250 / 20%); color: #1989fa;"
+          style="height: 2em; padding: 0 2em; margin: 0 1em; background: rgb(25 137 250 / 20%); color: #1989fa; border-color: #1989fa;"
           @click="changeStatusFun('1')">
           {{ $t('taskMessage.agree') }}
         </van-button>
@@ -305,11 +304,14 @@ import { Toast } from "vant";
 import { onMounted, ref } from 'vue';
 import { useRoute, useRouter } from "vue-router";
 import sHeader from "@/components/SimpleHeader";
-import { gettJoinpayMchCheckInfo, changetJoinpayMchCheckStatus } from "@/service/taskMessage";
+import { gettJoinpayMchCheckInfo, changetJoinpayMchCheckStatus, auditAddMerchant, auditUpdateMerchant } from "@/service/taskMessage";
+import { useI18n } from "vue-i18n";
 
 export default {
   components: { sHeader },
   setup() {
+    // 引入语言
+    const { t } = useI18n();
     // 获取用户信息
     const user = getLoginUser();
     const route = useRoute();
@@ -328,10 +330,10 @@ export default {
       // 根据路由参数赋值
       detailType.value = infoType || '';
       getInfoData();
-        // 如果是type大于1,那么不能有操作的权限
-        if(user.type > 1){
-          isOper.value = false;
-        }
+      // 如果是type大于1,那么不能有操作的权限
+      if (user.type > 1) {
+        isOper.value = false;
+      }
     });
     const getInfoData = async () => {
       const { data } = await gettJoinpayMchCheckInfo({ id: infoId, type: infoType });
@@ -339,13 +341,36 @@ export default {
         infoData.value = data.data;
       } else { Toast.fail(data.message); }
       console.log('getInfoData', infoData);
+      console.log(infoData.value.status);
     }
     const changeStatusFun = async (status) => {
-      const { data } = await changetJoinpayMchCheckStatus({ type: infoType, id: infoId, status: status, });
-      if (data.code === '00000') {
-        Toast.success(data.message);
-        router.push({ path: '/taskJoinPayMchCheck' })
-      } else { Toast.fail(data.message); }
+      if (detailType.value == 0) {
+        const { data } = await changetJoinpayMchCheckStatus({ type: infoType, id: infoId, status: status, });
+        if (data.code === '00000') {
+          Toast.success(data.message);
+          router.push({ path: '/taskJoinPayMchCheck' })
+        } else { Toast.fail(data.message); }
+      } else {
+        // 商户入驻
+        if (infoData.value.status == '1') {
+          const { data } = await auditAddMerchant({ id: infoId, status: status, });
+          if (data.code === '00000') {
+            Toast.success(t('taskMessage.joinpayMchCheck.successful'));
+            setTimeout(() => {
+              router.go(-1);
+            }, 1500);
+          } else { Toast.fail(data.message); }
+        } else if (infoData.value.status == '4') {
+          // 商户修改
+          const { data } = await auditUpdateMerchant({ id: infoId, status: status, });
+          if (data.code === '00000') {
+            Toast.success(t('taskMessage.joinpayMchCheck.successful'));
+            setTimeout(() => {
+              router.go(-1);
+            }, 1500);
+          } else { Toast.fail(data.message); }
+        }
+      }
     }
     return {
       infoData,

+ 1 - 1
src/views/uniPay/index.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 自充值 -->
-  <div class="page flex-col">
+  <div class="pageUniPay flex-col">
     <s-header :name="$t('uniPay.selfRecharging')" :noback="false"></s-header>
     <div class="box1 flex-col">
       <van-field v-model="deviceValue" is-link readonly :label="$t('uniPay.selfRecharging')"

+ 61 - 114
src/views/user.vue

@@ -1,10 +1,6 @@
 <template>
   <div class="page flex-col">
-    <s-header
-        :name="sys ? sys.title : $t('public.sysName')"
-        :noback="true"
-        :isFixed="false"
-    ></s-header>
+    <s-header :name="sys ? sys.title : $t('public.sysName')" :noback="true" :isFixed="false"></s-header>
     <div class="userPageBox">
       <div class="userBaseBox">
         <div class="baseRow flex-row justify-between">
@@ -33,112 +29,82 @@
             <span class="userInfoLeft">{{ $t("user.region") }}: </span>
             <div class="cust_vantBorder">
               <div class="filedInpPad">
-                <van-field
-                    @click-input="fieldValueInpClk"
-                    readonly
-                    clearable
-                    v-model="fieldValue"
-                    :placeholder="$t('user.regionPlace')"
-                >
+                <van-field @click-input="fieldValueInpClk" readonly clearable v-model="fieldValue"
+                  :placeholder="$t('user.regionPlace')">
                   <template #right-icon>
                     <div class="l-flex-RC">
-                      <van-icon
-                          v-if="fieldValue"
-                          @click="
-                          fieldValue = '';
-                          accountDetail.areaId = '';
-                        "
-                          class="o-mr-6"
-                          name="clear"
-                      />
-                      <van-icon @click="fieldValueInpClk" name="arrow-down"/>
+                      <van-icon v-if="fieldValue" @click="
+                        fieldValue = '';
+                      accountDetail.areaId = '';
+                      " class="o-mr-6" name="clear" />
+                      <van-icon @click="fieldValueInpClk" name="arrow-down" />
                     </div>
                   </template>
                 </van-field>
               </div>
             </div>
-            <van-icon name="edit" class="editIcon" @click="editClk(4)"/>
+            <van-icon name="edit" class="editIcon" @click="editClk(4)" />
           </div>
           <div v-else class="userInfo l-flex-between">
             <span class="userInfoLeft">{{ $t("user.region") }}: </span>
             <span>{{ fieldValue }}</span>
-            <van-icon name="edit" class="editIcon" @click="editClk(4)"/>
+            <van-icon name="edit" class="editIcon" @click="editClk(4)" />
           </div>
           <!-- 手机号 -->
           <div v-if="!phoneNumberShow" class="userInfo l-flex-between">
             <span class="userInfoLeft">{{ $t("user.phoneNumber") }}: </span>
             <div class="cust_vantBorder">
-              <van-field
-                  class="relationClass"
-                  v-model="cofficentForm.phone"
-                  :placeholder="$t('user.phoneNumberPlace')"
-              >
+              <van-field class="relationClass" v-model="cofficentForm.phone" :placeholder="$t('user.phoneNumberPlace')">
                 <template #button>
-                  <van-button
-                      type="primary"
-                      @click="mailboxChg(cofficentForm.phone, 3)"
-                  >{{ $t("user.confirmLog") }}
+                  <van-button type="primary" @click="mailboxChg(cofficentForm.phone, 3)">{{ $t("user.confirmLog") }}
                   </van-button>
                 </template>
               </van-field>
             </div>
-            <van-icon name="edit" class="editIcon" @click="editClk(3)"/>
+            <van-icon name="edit" class="editIcon" @click="editClk(3)" />
           </div>
           <div v-else class="userInfo l-flex-between">
             <span class="userInfoLeft">{{ $t("user.phoneNumber") }}: </span>
             <span>{{ accountDetail.phone }}</span>
-            <van-icon name="edit" class="editIcon" @click="editClk(3)"/>
+            <van-icon name="edit" class="editIcon" @click="editClk(3)" />
           </div>
           <!-- 邮箱 -->
           <div v-if="!mailboxShow" class="userInfo l-flex-between">
             <span class="userInfoLeft">{{ $t("user.mailbox") }}: </span>
             <div class="cust_vantBorder">
-              <van-field
-                  class="relationClass"
-                  v-model="cofficentForm.mailBox"
-                  :placeholder="$t('user.mailboxPlace')"
-              >
+              <van-field class="relationClass" v-model="cofficentForm.mailBox" :placeholder="$t('user.mailboxPlace')">
                 <template #button>
-                  <van-button
-                      type="primary"
-                      @click="mailboxChg(cofficentForm.mailBox, 2)"
-                  >{{ $t("user.confirmLog") }}
+                  <van-button type="primary" @click="mailboxChg(cofficentForm.mailBox, 2)">{{ $t("user.confirmLog") }}
                   </van-button>
                 </template>
               </van-field>
             </div>
-            <van-icon name="edit" class="editIcon" @click="editClk(2)"/>
+            <van-icon name="edit" class="editIcon" @click="editClk(2)" />
           </div>
           <div v-else class="userInfo l-flex-between">
             <span class="userInfoLeft">{{ $t("user.mailbox") }}: </span>
             <span>{{ accountDetail.email }}</span>
-            <van-icon name="edit" class="editIcon" @click="editClk(2)"/>
+            <van-icon name="edit" class="editIcon" @click="editClk(2)" />
           </div>
           <!-- 关联上级 -->
           <div v-if="!relationType" class="userInfo l-flex-between">
             <span class="userInfoLeft">{{ $t("user.associateParent") }}: </span>
             <div class="cust_vantBorder">
-              <van-field
-                  class="relationClass"
-                  v-model="cofficentForm.associateParent"
-                  :placeholder="$t('user.associateParentPlace')"
-              >
+              <van-field class="relationClass" v-model="cofficentForm.associateParent"
+                :placeholder="$t('user.associateParentPlace')">
                 <template #button>
-                  <van-button
-                      type="primary"
-                      @click="mailboxChg(cofficentForm.associateParent, 1)"
-                  >{{ $t("user.confirmLog") }}
-                  </van-button
-                  >
+                  <van-button type="primary" @click="mailboxChg(cofficentForm.associateParent, 1)">{{
+                    $t("user.confirmLog") }}
+                  </van-button>
                 </template>
               </van-field>
             </div>
-            <van-icon name="edit" class="editIcon" @click="editClk(1)"/>
+            <van-icon name="edit" class="editIcon" @click="editClk(1)" />
           </div>
           <div v-else class="userInfo l-flex-between">
             <span class="userInfoLeft">{{ $t("user.associateParent") }}: </span>
             <span>{{ relationAdminName }}</span>
-            <van-icon name="edit" class="editIcon" @click="editClk(1)"/>
+            <van-icon name="edit" class="editIcon" @click="editClk(1)" />
           </div>
         </div>
       </div>
@@ -151,11 +117,7 @@
         </div>
         <div class="operListBox">
           <!-- 任务消息 -->
-          <div
-              v-if="roleCheck()"
-              class="taskListRow flex-col"
-              @click="pushPageList('/taskMessage')"
-          >
+          <div v-if="roleCheck()" class="taskListRow flex-col" @click="pushPageList('/taskMessage')">
             <div class="taskIcon taskMessageIcon"></div>
             <div class="taskRight">
               <div class="taskTitle">{{ $t("user.taskMessage") }}</div>
@@ -163,10 +125,7 @@
           </div>
 
           <!-- 提现帐号 -->
-          <div
-              class="taskListRow flex-col"
-              @click="pushPageList('/joinpayMch')"
-          >
+          <div class="taskListRow flex-col" @click="pushPageList('/joinpayMch')">
             <div class="taskIcon joinPayMchIcon"></div>
             <div class="taskRight">
               <div class="taskTitle">{{ $t("user.withdrawalAccountNo") }}</div>
@@ -174,14 +133,14 @@
           </div>
 
           <!-- 备用提现账号 -->
-          <!--          <div class="taskListRow flex-col" @click="pushPageList('/shandeMch')">
-                      <div class="taskIcon shandeMchIcon"></div>
-                      <div class="taskRight">
-                        <div class="taskTitle">
-                          {{ $t("user.standbyWithdrawalAccountNo") }}
-                        </div>
-                      </div>
-                    </div>-->
+          <div class="taskListRow flex-col" @click="pushPageList('/huifuMch')">
+            <div class="taskIcon shandeMchIcon"></div>
+            <div class="taskRight">
+              <div class="taskTitle">
+                {{ $t("user.standbyWithdrawalAccountNo") }}
+              </div>
+            </div>
+          </div>
 
           <!-- 绑定微信 -->
           <div v-if="isInWeChat" class="taskListRow flex-col" @click="pushPageList('/bindWechat')">
@@ -195,10 +154,7 @@
           </div>
 
           <!-- 修改密码 -->
-          <div
-              class="taskListRow flex-col"
-              @click="pushPageList('/changepassword')"
-          >
+          <div class="taskListRow flex-col" @click="pushPageList('/changepassword')">
             <div class="taskIcon changePasswordIcon"></div>
             <div class="taskRight">
               <div class="taskTitle">{{ $t("user.changePassword") }}</div>
@@ -224,22 +180,13 @@
     </div>
     <nav-bar></nav-bar>
     <!-- 退出登录弹窗 -->
-    <kDialog
-        :dialogTitle="$t('user.logOutTips')"
-        :cancelBtnTxt="$t('user.cancelLog')"
-        :confirmBtnTxt="$t('user.confirmLog')"
-        ref="kDialogRef"
-        :dialogContent="$t('user.logOutContent')"
-        @confirmclk="confirmClk"
-    >
+    <kDialog :dialogTitle="$t('user.logOutTips')" :cancelBtnTxt="$t('user.cancelLog')"
+      :confirmBtnTxt="$t('user.confirmLog')" ref="kDialogRef" :dialogContent="$t('user.logOutContent')"
+      @confirmclk="confirmClk">
     </kDialog>
     <!-- 地区弹窗 -->
-    <kCascader
-        @getareaname="getAreaName"
-        :selectId="accountDetail.areaId"
-        @areapopfinish="areaPopFinish"
-        ref="kCascaderRef"
-    ></kCascader>
+    <kCascader @getareaname="getAreaName" :selectId="accountDetail.areaId" @areapopfinish="areaPopFinish"
+      ref="kCascaderRef"></kCascader>
   </div>
 </template>
 
@@ -247,11 +194,11 @@
 // 导入地区弹窗
 import kCascader from "@/components/commom/kCascader/index.vue";
 // 导入接口
-import {getAdmin} from "@/service/merchantManage";
-import {updateAdmin} from "@/service/merchantManage";
+import { getAdmin } from "@/service/merchantManage";
+import { updateAdmin } from "@/service/merchantManage";
 // 引入弹窗
 import kDialog from "@/components/commom/kDialog/index.vue";
-import {onMounted, reactive, ref} from "vue";
+import { onMounted, reactive, ref } from "vue";
 import sHeader from "@/components/SimpleHeader";
 import navBar from "@/components/NavBar";
 import {
@@ -259,17 +206,17 @@ import {
   $M_EmailAvailable,
   $M_PhoneTest,
 } from "@/common/js/utils";
-import {useRouter} from "vue-router";
-import {tAdminGetRelation, tAdminSetRelationAdmin} from "@/service/user";
-import {Toast} from "vant";
-import {useI18n} from "vue-i18n";
-import {styleUrl} from "../common/js/utils";
+import { useRouter } from "vue-router";
+import { tAdminGetRelation, tAdminSetRelationAdmin } from "@/service/user";
+import { Toast } from "vant";
+import { useI18n } from "vue-i18n";
+import { styleUrl } from "../common/js/utils";
 
 export default {
-  components: {sHeader, navBar, kDialog, kCascader},
+  components: { sHeader, navBar, kDialog, kCascader },
   setup() {
     // 引入语言
-    const {t} = useI18n();
+    const { t } = useI18n();
     // 账户信息
     const accountDetail = ref({});
     // 控制都去显示隐藏
@@ -330,7 +277,7 @@ export default {
           if (!e) {
             Toast(t("user.associateParentPlace"));
           } else {
-            const {data} = await tAdminSetRelationAdmin({
+            const { data } = await tAdminSetRelationAdmin({
               adminId: user.id,
               username: e,
             });
@@ -353,7 +300,7 @@ export default {
               id: user.id,
               email: e,
             };
-            const {data} = await updateAdmin(params);
+            const { data } = await updateAdmin(params);
             mailboxShow.value = true;
             if (data.code === "00000") {
               Toast(data.message);
@@ -373,7 +320,7 @@ export default {
               id: user.id,
               phone: e,
             };
-            const {data} = await updateAdmin(params);
+            const { data } = await updateAdmin(params);
             phoneNumberShow.value = true;
             if (data.code === "00000") {
               Toast(data.message);
@@ -387,7 +334,7 @@ export default {
     };
     // 获取账户详情
     const getAcccountDetail = () => {
-      getAdmin({id: user.id}).then((res) => {
+      getAdmin({ id: user.id }).then((res) => {
         accountDetail.value = res.data.data;
 
         // 查询地址回显
@@ -407,12 +354,12 @@ export default {
         setTimeout(() => {
           router.push({
             path: "login",
-            query: {relation_admin_id: sys.value.relationAdminId},
+            query: { relation_admin_id: sys.value.relationAdminId },
           });
         }, 200);
       } else {
         setTimeout(() => {
-          router.push({path: "login"});
+          router.push({ path: "login" });
         }, 200);
       }
     };
@@ -431,7 +378,7 @@ export default {
       getAcccountDetail();
     });
     const gettAdminGetRelation = async () => {
-      const {data} = await tAdminGetRelation({
+      const { data } = await tAdminGetRelation({
         relationAdminId: user.relationAdminId,
       });
       if (typeof data === "string") {
@@ -439,13 +386,13 @@ export default {
       }
     };
     const operUnipay = () => {
-      router.push({path: "uniPay"});
+      router.push({ path: "uniPay" });
     };
     const onperExitSys = () => {
       kDialogRef.value.openDialog();
     };
     const pushPageList = (url) => {
-      router.push({path: url});
+      router.push({ path: url });
     };
     const roleCheck = () => {
       if (user.isAdmined) {
@@ -471,7 +418,7 @@ export default {
         id: user.id,
         areaId: e.selectId,
       };
-      const {data} = await updateAdmin(params);
+      const { data } = await updateAdmin(params);
       areaShow.value = true;
       if (data.code === "00000") {
         Toast(data.message);

+ 38 - 0
src/views/weChatPay.vue

@@ -0,0 +1,38 @@
+<template>
+    <div>
+    </div>
+</template>
+  
+<script>
+import { onMounted } from "vue";
+import { useRoute } from "vue-router";
+
+
+export default {
+    name: 'weChatPay',
+
+    setup() {
+        const route = useRoute();
+        console.log(route.query.id);
+        const id = route.query.id;
+        const appId = "wxcd5b1b2636c9f611";
+    
+        onMounted(() => {
+            wxPay();
+        });
+
+
+        const wxPay = () => {
+            // 处理回调接口
+            const redirectUri = encodeURIComponent('http://szwltest.sunzee.com.cn/PAY-SERVER/tOrder/callback');
+            const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirectUri}&response_type=code&scope=snsapi_base&state=${id}&connect_redirect=1#wechat_redirect`;
+            console.log(url)
+            window.location.replace(url);
+        };
+
+        return {
+            wxPay
+        };
+    }
+};
+</script>

+ 2 - 1
vue.config.js

@@ -7,7 +7,8 @@ module.exports = {
   },
   configureWebpack: {
     output: {
-      filename: '[name].[hash].js'
+      filename: '[name].[hash].js',
+      chunkFilename: '[id].[hash].chunk.js'
     }
   },
   devServer: {