소스 검색

feat:“添加设备类型筛选数据功能”

soobin 2 년 전
부모
커밋
d67921162f

+ 16 - 7
src/assets/language/en.json

@@ -17,6 +17,7 @@
     "paymentMethod": "Payment method",
     "allDevices": "All devices",
     "commodityType": "Commodity type",
+    "machineType": "Device type",
     "whole": "whole",
     "noPaymentRequired": "No payment required",
     "coin": "Coin",
@@ -35,8 +36,11 @@
     "orderStatus": "Order Status",
     "allSuboUsers": "All subordinate users",
     "companies": "Company platform",
+    "machines": "Device type",
     "sz": "Sunzee",
-    "sc": "Sevencloud"
+    "sc": "Sevencloud",
+    "MG": "Marshmallow",
+    "POP": "Popcorn"
   },
   "navBar": {
     "homePage": "home page",
@@ -746,7 +750,7 @@
     "discountCode": "0% discount code",
     "paymentPlatform": "payment platform",
     "convergence": "Convergence",
-    "shandePayment": "Shande Payment",
+    "huifuPaymnt": "Huifu payment",
     "modificationSubmission": "Modification submission",
     "merchantType": "Merchant type",
     "contactName": "Contact Name",
@@ -823,12 +827,13 @@
     "clickSearch": "Click Search",
     "selectFullTime": "Select full time",
     "refundAmount": "Refund amount",
-    "refundTip": "Refund please be careful, otherwise it will affect statistics!",
+    "refundTip": "Please treat the refund carefully, it will affect the data statistics!",
+    "totalRefund": "Total refund",
     "refundQuantity": "Refund quantity",
     "refundPlace": "Please select product refund",
     "refundCheck": "Do you confirm the refund ?",
     "accountBalance": "Account balance",
-    "refundSubmit": "Submit applications",
+    "refundSubmit": "Submit",
     "requestFailed": "Request failed"
   },
   "orderExport": {
@@ -1202,10 +1207,14 @@
     "patternStatistics": "Pattern statistics",
     "salesStatistics": "Sales statistics",
     "companyTypeLabel": "Company type",
-    "companyTypePlaceholder": "Please select a companytype",
+    "companyTypePlaceholder": "Please select a company type",
     "whole": "All",
     "sz": "Sunzee",
     "sc": "Sevencloud",
+    "machineType": "Device type",
+    "machineTypePlace": "Please select a device type",
+    "MG": "Marshmallow",
+    "POP": "Popcorn",
     "seleWeekDateRangeNotSeveDays": "The date range of the selected week cannot exceed 7 days!!!",
     "rankMethod": "Ranking method"
   },
@@ -1235,8 +1244,8 @@
     "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",
-    "airwallex":"Airwallex"
+    "bindWechat": "Bind WeChat",
+    "airwallex": "Airwallex"
   },
   "bindWechat": {
     "cancel": "Cancel",

+ 83 - 71
src/assets/language/zh.json

@@ -17,6 +17,7 @@
     "paymentMethod": "支付方式",
     "allDevices": "所有设备",
     "commodityType": "商品类型",
+    "machineType": "设备类型",
     "whole": "全部",
     "noPaymentRequired": "无需支付",
     "coin": "硬币",
@@ -28,15 +29,18 @@
     "weChatScanning": "微信主扫",
     "antiScanningOfAlipay": "支付宝反扫",
     "weChatBackScanning": "微信反扫",
-    "unpaid":"未支付",
-    "paid":"已支付",
-    "refunding":"退款中",
-    "refunded":"已退款",
-    "orderStatus":"订单状态",
-    "allSuboUsers":"所有下级用户",
+    "unpaid": "未支付",
+    "paid": "已支付",
+    "refunding": "退款中",
+    "refunded": "已退款",
+    "orderStatus": "订单状态",
+    "allSuboUsers": "所有下级用户",
     "companies": "公司平台",
+    "machines": "设备类型",
     "sz": "申泽",
-    "sc": "七云"
+    "sc": "七云",
+    "MG": "棉花糖",
+    "POP":"爆米花"
   },
   "navBar": {
     "homePage": "首页",
@@ -348,8 +352,8 @@
     "clickSearch": "点击搜索",
     "spunSugar": "棉花糖",
     "popcorn": "爆米花",
-    "sz":"申泽",
-    "sc":"七云",
+    "sz": "申泽",
+    "sc": "七云",
     "startUp": "开机",
     "shutdown": "关机",
     "enable": "启用",
@@ -747,7 +751,7 @@
     "discountCode": "0折优惠码",
     "paymentPlatform": "支付平台",
     "convergence": "汇聚",
-    "shandePayment": "杉德",
+    "huifuPaymnt": "汇付",
     "modificationSubmission": "修改提交",
     "merchantType": "商户类型",
     "contactName": "联系人姓名",
@@ -823,11 +827,12 @@
     "endTime": "结束时间",
     "clickSearch": "点击搜索",
     "selectFullTime": "选择完整时间",
-    "refundAmount":"退款金额",
-    "refundPlace":"请选择退款商品",
+    "refundAmount": "退款金额",
+    "refundPlace": "请选择退款商品",
     "refundCheck": "是否确认退款?",
     "requestFailed": "请求失败",
-    "refundTip": "确保金额与数量对应,否则会影响统计!",
+    "refundTip": "退款请慎重对待,会影响数据统计!",
+    "totalRefund": "退款总额",
     "refundQuantity": "退款数量",
     "refundAmountPlace": "请输入退款金额",
     "most": "最多",
@@ -844,27 +849,30 @@
     "orderDetails": "订单明细",
     "clickFilter": "点击筛选",
     "exportToExcel": "导出excel",
-    "totalSales":"总销售额",
-    "machines":"台机器",
-    "superior":"所属上级",
+    "totalSales": "总销售额",
+    "machines": "台机器",
+    "superior": "所属上级",
     "address": "地址",
-    "searchPop":{
-      "title":"根据以下条件筛选",
-      "orderNo":"订单编号",
-      "orderNoPlace":"请输入订单编号",
-      "busiName":"商户名称",
-      "busiNamePlace":"请输入商户名称",
-      "clearFilter":"清空条件",
-      "filter":"筛选",
-      "mainOver":"大陆/海外",
-      "mainOverPlace":"请选择大陆/海外",
-      "mainland":"大陆",
-      "overseas":"海外",
+    "searchPop": {
+      "title": "根据以下条件筛选",
+      "orderNo": "订单编号",
+      "orderNoPlace": "请输入订单编号",
+      "busiName": "商户名称",
+      "busiNamePlace": "请输入商户名称",
+      "clearFilter": "清空条件",
+      "filter": "筛选",
+      "mainOver": "大陆/海外",
+      "mainOverPlace": "请选择大陆/海外",
+      "mainland": "大陆",
+      "overseas": "海外",
       "companyTypeLabel": "公司平台",
-      "companyTypePlaceholder":"请选择公司平台",
-      "whole":"全部",
+      "companyTypePlaceholder": "请选择公司平台",
+      "whole": "全部",
       "sz": "申泽",
-      "sc": "七云"
+      "sc": "七云",
+      "machineTypePlace": "请选择设备类型",
+      "MG": "棉花糖",
+      "POP": "爆米花"
     }
   },
   "role": {
@@ -1058,37 +1066,37 @@
         "filterBtn": "点击查询"
       }
     },
-    "joinpayMchCheck":{
-      "convergence":"汇聚",
-      "huifu":"汇付",
-      "withAccoDetail":"提现账号详情",
-      "merchantName":"商户名称",
+    "joinpayMchCheck": {
+      "convergence": "汇聚",
+      "huifu": "汇付",
+      "withAccoDetail": "提现账号详情",
+      "merchantName": "商户名称",
       "shortName": "商户简称",
-      "merchantType":"商户类型",
-      "contactName":"联系人姓名",
-      "indiOrPersName":"法人/个人姓名",
-      "indiOrPersPhone":"法人/个人手机号",
-      "indiOrPersPhoneIdCard":"法人/个人身份证",
-      "idCardValid":"身份证有效期",
-      "accountType":"账号类型",
-      "bankAccountName":"银行账号名称",
-      "bankAccount":"银行账号",
-      "interBankNo":"联行号",
-      "settlMethod":"结算方式",
-      "settlCycle":"结算周期",
-      "businessNature":"经营范围",
-      "businessAddress":"经营地址",
-      "personal":"个人",
-      "indivBusines":"个体工商户",
-      "enterprise":"企业",
-      "debitCard":"借记卡",
-      "corporateAccount":"对公账户",
-      "autoSettByConvergence":"由汇聚自动结算",
-      "manuSettByMercPlatform":"由商户平台手工结算",
-      "day":"日",
-      "merchantID":"商户ID",
-      "phone":"联系人号码",
-      "email":"联系人邮箱",
+      "merchantType": "商户类型",
+      "contactName": "联系人姓名",
+      "indiOrPersName": "法人/个人姓名",
+      "indiOrPersPhone": "法人/个人手机号",
+      "indiOrPersPhoneIdCard": "法人/个人身份证",
+      "idCardValid": "身份证有效期",
+      "accountType": "账号类型",
+      "bankAccountName": "银行账号名称",
+      "bankAccount": "银行账号",
+      "interBankNo": "联行号",
+      "settlMethod": "结算方式",
+      "settlCycle": "结算周期",
+      "businessNature": "经营范围",
+      "businessAddress": "经营地址",
+      "personal": "个人",
+      "indivBusines": "个体工商户",
+      "enterprise": "企业",
+      "debitCard": "借记卡",
+      "corporateAccount": "对公账户",
+      "autoSettByConvergence": "由汇聚自动结算",
+      "manuSettByMercPlatform": "由商户平台手工结算",
+      "day": "日",
+      "merchantID": "商户ID",
+      "phone": "联系人号码",
+      "email": "联系人邮箱",
       "certNo": "身份证号",
       "cardName": "卡户名",
       "mp": "结算手机号",
@@ -1192,7 +1200,7 @@
     "phoneRegistration": "手机注册"
   },
   "robotRanking": {
-    "machineSalesRanking":"机器销售排行榜",
+    "machineSalesRanking": "机器销售排行榜",
     "dailySalesRanking": "日销售排行",
     "today": "今日",
     "yesterday": "昨日",
@@ -1206,18 +1214,22 @@
     "salesRankingThisYear": "年销售排行",
     "thisYear": "今年",
     "lastYear": "去年",
-    "yearPopTitle":"请选择年份",
-    "changeType":"统计方式",
-    "changeTypePlace":"请选择统计方式",
-    "patternStatistics":"花型统计",
-    "salesStatistics":"销售额统计",
+    "yearPopTitle": "请选择年份",
+    "changeType": "统计方式",
+    "changeTypePlace": "请选择统计方式",
+    "patternStatistics": "花型统计",
+    "salesStatistics": "销售额统计",
     "companyTypeLabel": "公司平台",
-    "companyTypePlaceholder":"请选择公司平台",
-    "whole":"全部",
+    "companyTypePlaceholder": "请选择公司平台",
+    "whole": "全部",
     "sz": "申泽",
     "sc": "七云",
-    "seleWeekDateRangeNotSeveDays":"选择周的日期范围不能超过7天!!!",
-    "rankMethod":"排行方式"
+    "machineType": "设备类型",
+    "machineTypePlace": "请选择设备类型",
+    "MG": "棉花糖",
+    "POP": "爆米花",
+    "seleWeekDateRangeNotSeveDays": "选择周的日期范围不能超过7天!!!",
+    "rankMethod": "排行方式"
   },
   "user": {
     "essentialInformation": "基本信息",

+ 12 - 8
src/components/typeSelectList/index.less

@@ -4,23 +4,27 @@
     height: 16px;
     margin: 18px 15px 0 15px;
     justify-content: space-around;
+    display: flex;
+    flex-wrap: wrap;
 
 
 
     .selectIconBox {
       width: 20%;
       display: flex;
+      flex-basis: 33.33%;
+      margin-bottom: 10px;
       flex-wrap: nowrap;
       align-items: center;
       justify-content: center;
-	
-	  .txt4 {
-		  text-align: center;
-		  width: 80%;
-		  overflow: hidden;
-		  text-overflow: ellipsis;
-		  white-space: nowrap;
-	  }
+
+      .txt4 {
+        text-align: center;
+        width: 60%;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
     }
 
     .main7 {

+ 63 - 27
src/components/typeSelectList/index.vue

@@ -39,6 +39,15 @@
         <van-picker :title="$t('typeSelectList.allDevices')" :columns="deviceList" @confirm="deviceConfirm"
           @cancel="deviceCancel" />
       </van-popup>
+      <div class="selectIconBox" @click="machineShow()">
+        <div class="bd2 flex-col"></div>
+        <span class="txt4">{{ machines }}</span>
+        <div class="layer1 flex-col"></div>
+      </div>
+      <van-popup v-model:show="machineType" position="bottom">
+        <van-picker :title="$t('typeSelectList.machineType')" :columns="machineList" @confirm="machineConfirm"
+          @cancel="machineCancel" />
+      </van-popup>
       <!-- <div class="selectIconBox" @click="productShow()">
         <div class="bd2 flex-col"></div>
         <span class="txt4">{{$t('typeSelectList.commodityType')}}</span>
@@ -68,7 +77,7 @@
 
 <script>
 import { onMounted, toRefs, reactive, ref } from "vue";
-import { getAdminList, getEquipmentList, getProductList } from '@/service/typeSelectList';
+import { getAdminList, getEquipmentList } from '@/service/typeSelectList';
 import { getLoginUser } from '@/common/js/utils';
 import { useI18n } from 'vue-i18n';
 
@@ -88,6 +97,8 @@ export default {
     const paymentMethod = ref(t('typeSelectList.paymentMethod'));
     // 公司平台
     const companies = ref(t('typeSelectList.companies'));
+    // 公司平台
+    const machines = ref(t('typeSelectList.machines'));
     // 所有设备
     const allDevices = ref(t('typeSelectList.allDevices'));
     // 订单状态
@@ -99,7 +110,8 @@ export default {
       clientId: '',
       payType: '',
       productNo: '',
-      companyType: ''
+      companyType: '',
+      machineType: ''
     });
     // 商户选择
     const adminTypeShow = ref(false);
@@ -144,6 +156,27 @@ export default {
       outputDate();
     }
     const companyCancel = () => { companyType.value = false; }
+    // 设备类型选择
+    const machineType = ref(false);
+    const machineShow = () => { machineType.value = true; };
+    const machineSouerList = [
+      { text: t('typeSelectList.whole'), values: '' },
+      { text: t('typeSelectList.MG'), values: '0' },
+      { text: t('typeSelectList.POP'), values: '1' },
+    ];
+    const machineList = ref([
+      t('typeSelectList.whole'),
+      t('typeSelectList.MG'),
+      t('typeSelectList.POP'),
+    ]);
+    const machineConfirm = (currentValue) => {
+      machines.value = currentValue;
+      const selectPay = machineSouerList.filter(i => i.text === currentValue);
+      if (selectPay && selectPay.length > 0) { searchParams.machineType = selectPay[0].values; }
+      machineType.value = false;
+      outputDate();
+    }
+    const machineCancel = () => { machineType.value = false; }
     // 支付方式选择
     const payType = ref(false);
     const payShow = () => { payType.value = true; };
@@ -215,30 +248,30 @@ export default {
       }
     }
     // 商品选择
-    const productType = ref(false);
-    const productShow = () => { productType.value = true; };
-    const productList = ref([]);
-    const productSourceList = ref([]);
-    const productConfirm = (currentValue) => {
-      const selectEquipment = equipmentSourceList.value.filter(i => i.productName === currentValue);
-      if (selectEquipment && selectEquipment.length > 0) {
-        searchParams.productNo = selectEquipment[0].no;
-      }
-      productType.value = false;
-      outputDate();
-    }
-    const productCancel = () => { productType.value = false; }
+    // const productType = ref(false);
+    // const productShow = () => { productType.value = true; };
+    // const productList = ref([]);
+    // const productSourceList = ref([]);
+    // const productConfirm = (currentValue) => {
+    //   const selectEquipment = equipmentSourceList.value.filter(i => i.productName === currentValue);
+    //   if (selectEquipment && selectEquipment.length > 0) {
+    //     searchParams.productNo = selectEquipment[0].no;
+    //   }
+    //   productType.value = false;
+    //   outputDate();
+    // }
+    // const productCancel = () => { productType.value = false; }
     // 获取商品列表
-    const getProductListFun = async () => {
-      const { data } = await getProductList({ adminId: user.id });
-      if (data.code) {
-        productList.value = data.data.map(item => {
-          return item.productName
-        });
-        console.log('productList', productList)
-        productSourceList.value = data.data;
-      }
-    }
+    // const getProductListFun = async () => {
+    //   const { data } = await getProductList({ adminId: user.id });
+    //   if (data.code) {
+    //     productList.value = data.data.map(item => {
+    //       return item.productName
+    //     });
+    //     console.log('productList', productList)
+    //     productSourceList.value = data.data;
+    //   }
+    // }
     // 是否商户
     const isShowAdmin = () => { return (user && user.type === 2); }
     // 是否管理员
@@ -277,7 +310,7 @@ export default {
     onMounted(() => {
       getAdminListFun();
       getDeviceListFun();
-      getProductListFun();
+      // getProductListFun();
     });
     return {
       ...toRefs(searchParams),
@@ -293,14 +326,17 @@ export default {
       payType, payList, payShow, payConfirm, payCancel,
       // 公司平台选择
       companyType, companyList, companyShow, companyConfirm, companyCancel,
+      // 设备类型选择
+      machineType, machineList, machineShow, machineConfirm, machineCancel,
       // 设备选择
       deviceType, deviceList, deviceShow, deviceConfirm, deviceCancel,
       // 商品选择
-      productType, productList, productShow, productConfirm, productCancel,
+      // productType, productList, productShow, productConfirm, productCancel,
       // 订单状态
       orderStatusShow, orderStatus, orderStatusList, orderStatusConfirm, orderStatusCancel,
       paymentMethod,
       companies,
+      machines,
       allDevices,
       orderStatusName,
     };

+ 4 - 2
src/styles/orderCenter/index.less

@@ -493,14 +493,16 @@
 
             .word11 {
               height: 13px;
-              width: auto;
+              width: 4.5rem;
               overflow-wrap: break-word;
               color: rgba(64, 77, 116, 1);
               font-size: 13px;
               white-space: nowrap;
               line-height: 14px;
               margin-top: 10px;
-              // margin-bottom: 10px;
+              overflow: hidden;
+              text-overflow: ellipsis;
+              white-space: nowrap;
               display: block;
             }
 

+ 2 - 6
src/views/home/index.vue

@@ -32,7 +32,7 @@
       <dateSelectList v-if="showDataDiv" @update="update($event)"></dateSelectList>
       <typeSelectList v-if="showDataDiv" :isHome="true" @upselectdata="upselectdata($event)"></typeSelectList>
       <!-- 订单数据 -->
-      <div v-if="showDataDiv" class="o-plr-8">
+      <div v-if="showDataDiv" class="o-plr-8 o-pt-10">
         <div class="outer5 flex-col" @click="pushOrderCenter">
           <div class="block5 flex-col">
             <div class="topTitle flex-row justify-end">
@@ -74,17 +74,12 @@
       <template v-else>
         <kNoData v-if="showDataDiv"></kNoData>
       </template> -->
-
       <!-- <div> -->
       <div v-if="showDataDiv && !noData(salesVolume, salesNumber)">
         <div ref="chartBox" class="Chart1 flex-col"></div>
       </div>
       <kNoData v-else></kNoData>
       <!-- </div> -->
-
-
-
-
       <!-- 常用工具 -->
       <div class="outer9 flex-col justify-center">
         <div class="main24 flex-col justify-between">
@@ -222,6 +217,7 @@ export default {
         clientId: typeSelectData.clientId,
         username: typeSelectData.userName, // 商家
         companyType: typeSelectData.companyType, // 公司平台
+        machineType: typeSelectData.machineType, // 设备类型
         equipmentId:
           typeSelectData.equipmentId === "" ? null : typeSelectData.equipmentId,
       };

+ 26 - 20
src/views/merchantManage/set.vue

@@ -8,13 +8,13 @@
           <div class="wrap1 flex-col">
             <div class="section1 flex-row justify-between">
               <span class="word3" :class="{ acttive: tabType === '0' }" @click="tabType = '0'">{{
-                  $t('merchantManage.essentialInformation') }}</span>
+                $t('merchantManage.essentialInformation') }}</span>
               <span class="info1" :class="{ acttive: tabType === '1' }" @click="tabType = '1'">{{
-                  $t('merchantManage.withdrawalData') }}</span>
+                $t('merchantManage.withdrawalData') }}</span>
             </div>
             <!-- <div class="section2 flex-col"></div> -->
             <img class="img1" referrerpolicy="no-referrer"
-                 src="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng8947935ab81635fdedd8124b11e305eef66286421b69c84fef22233014a3fa9a" />
+              src="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng8947935ab81635fdedd8124b11e305eef66286421b69c84fef22233014a3fa9a" />
           </div>
           <div v-if="tabType === '0'">
             <div class="wrap2 l-flex-RC">
@@ -27,21 +27,21 @@
             <span class="info5">{{ $t('merchantManage.subscriptionAdministrator') }}:</span>
             <van-form @submit="onSubmit">
               <van-field v-model="adminObj.name" name="password" :label="$t('merchantManage.fullNameLabel')"
-                         :placeholder="$t('merchantManage.fullNamePlaceholder')"
-                         :rules="[{ required: true, message: $t('merchantManage.fullNamePlaceholder') }]" />
+                :placeholder="$t('merchantManage.fullNamePlaceholder')"
+                :rules="[{ required: true, message: $t('merchantManage.fullNamePlaceholder') }]" />
               <van-field v-model="adminObj.password" name="password" type="password"
-                         :label="$t('merchantManage.passwordLabel')" :placeholder="$t('merchantManage.passwordPlaceholder')" />
+                :label="$t('merchantManage.passwordLabel')" :placeholder="$t('merchantManage.passwordPlaceholder')" />
               <span class="txt3">{{ $t('merchantManage.leavBlanToIndiNoModi') }}</span>
               <van-field v-model="adminObj.checkPassword" name="password" type="password"
-                         :label="$t('merchantManage.confirmPasswordLabel')"
-                         :placeholder="$t('merchantManage.confirmPasswordPlaceholder')" />
+                :label="$t('merchantManage.confirmPasswordLabel')"
+                :placeholder="$t('merchantManage.confirmPasswordPlaceholder')" />
               <van-field v-model="adminObj.email" name="password" :label="$t('merchantManage.mailbox')"
-                         :placeholder="$t('merchantManage.mailboxPlaceholder')" />
+                :placeholder="$t('merchantManage.mailboxPlaceholder')" />
               <van-field v-model="adminObj.phone" name="password" :label="$t('merchantManage.telephone')"
-                         :placeholder="$t('merchantManage.telephonePlaceholder')" />
+                :placeholder="$t('merchantManage.telephonePlaceholder')" />
               <van-field v-model="adminObj.tradeMerchantNo" name="password"
-                         :label="$t('merchantManage.merchantFilingNumberLabel')"
-                         :placeholder="$t('merchantManage.merchantFilingNumberPlaceholder')" />
+                :label="$t('merchantManage.merchantFilingNumberLabel')"
+                :placeholder="$t('merchantManage.merchantFilingNumberPlaceholder')" />
               <div class="van-cell van-field">
                 <div class="van-cell__title van-field__label"><span>{{ $t('merchantManage.domesticOrNot') }}:</span></div>
                 <div class="van-cell__value van-field__value radioBox">
@@ -68,14 +68,14 @@
                   <div class="van-cell__value van-field__value radioBox">
                     <van-radio-group v-model="adminObj.payPlatform" direction="horizontal">
                       <van-radio name="0" icon-size="18px">{{ $t('merchantManage.convergence') }}</van-radio>
-                      <van-radio name="1" icon-size="18px">{{ $t('merchantManage.shandePayment') }}</van-radio>
+                      <van-radio name="1" icon-size="18px">{{ $t('merchantManage.huifuPaymnt') }}</van-radio>
                     </van-radio-group>
                   </div>
                 </div>
               </div>
               <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('merchantManage.modificationSubmission') }}
+                  $t('merchantManage.modificationSubmission') }}
                 </van-button>
               </van-row>
             </van-form>
@@ -89,15 +89,15 @@
             <div class="kBordBott o-w o-pb-10">
 
               <span class="txt2">{{ $t('merchantManage.nameOfLegalPerson/Individual') }}:{{ adminMchObj.legalPerson
-                }}</span>
+              }}</span>
               <span class="word5">{{ $t('merchantManage.phoneNumberOfLegalPerson/Individual') }}:{{ adminMchObj.phoneNo
-                }}</span>
+              }}</span>
               <span class="word6">{{ $t('merchantManage.legalPerson/IndividualIDNumber') }}:{{ adminMchObj.idCardNo
-                }}</span>
+              }}</span>
               <span class="txt3">{{ $t('merchantManage.validityOfIDCard') }}:{{ adminMchObj.idCardExpiry }}</span>
               <span class="txt4">{{ $t('merchantManage.businessLicenseCode') }}:{{ adminMchObj.licenseNo }}</span>
               <span class="word7">{{ $t('merchantManage.validityOfBusinessLicense') }}:{{ adminMchObj.licenseExpiry
-                }}</span>
+              }}</span>
               <span class="txt5">{{ $t('merchantManage.natureOfBusiness') }}:{{ adminMchObj.manageScope }}</span> <span
                 class="word8">{{ $t('merchantManage.businessAddress') }}:{{ adminMchObj.manageAddr }}</span>
             </div>
@@ -105,7 +105,7 @@
             <div class="block5 flex-row justify-between">
               <span class="txt6">{{ $t('merchantManage.accountType') }}:</span> <span class="word9">{{
                 adminMchObj.bankAccountType === 1 ? $t('merchantManage.debitCard') :
-                    ''
+                ''
               }}{{ adminMchObj.bankAccountType === 4 ? $t('merchantManage.corporateAccount') : '' }}</span>
             </div>
             <span class="word10">{{ $t('merchantManage.bankAccountName') }}:{{ adminMchObj.bankAccountName }}</span>
@@ -180,7 +180,13 @@ export default {
         }
       }
       const { data } = await updateAdmin(params);
-      if (data.code === "00000") { Toast.success(t('merchantManage.modificationSucceeded')); getAdminFun(); } else { Toast.fail(data.message); }
+      if (data.code === "00000") { 
+        Toast.success(t('merchantManage.modificationSucceeded')); 
+        setTimeout(() => {
+          // router.go(0);
+          getAdminFun(); 
+        }, 1500);
+      } else { Toast.fail(data.message); }
       console.log('onSubmit', data);
     }
     return {

+ 60 - 38
src/views/orderCenter/index.vue

@@ -29,7 +29,7 @@
         </div>
         <dateSelectList @update="update($event)"></dateSelectList>
         <typeSelectList @upselectdata="upselectdata($event)"></typeSelectList>
-        <div v-if="!noData(salesVolume, salesNumber, orderNumber)" class="o-plr-8">
+        <div v-if="!noData(salesVolume, salesNumber, orderNumber)" class="o-plr-8 o-pt-15">
           <div class="outer5 flex-col">
             <div class="block5 flex-col">
               <div class="outerBox flex-row">
@@ -210,7 +210,7 @@
               <span class="word8">{{ $t('orderCenter.refunded') }}</span>
               <span class="info4">{{ refundObject.refundAmount }}</span>
             </div>
-            <van-button size="small" v-if="refundObject.status === 1" @click="noticeClk(refundObject)" round
+            <van-button size="small" v-if="refundObject.status === 1 && isRefund" @click="noticeClk(refundObject)" round
               type="primary" style="margin-top: 20px;">
               {{ $t('orderCenter.initiateRefund') }}
             </van-button>
@@ -253,13 +253,12 @@
         <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="">{{ $t('orderCenter.totalRefund') }}:</span>
             <span class="totalRefund o-pr-15">&yen; {{ totalRefund.toFixed(2) }}</span>
           </div>
         </div>
       </template>
     </kDialog>
-    <loading v-model:show="isLoading" />
   </div>
 </template>
 <script>
@@ -319,14 +318,14 @@ export default {
     }
     // 点击增加按钮
     const plusRefundGood = (index) => {
-      console.log(isChecked.value[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])
+      // console.log(isChecked.value[index])
       if (isChecked.value[index]) {
         totalRefund.value = parseFloat((totalRefund.value - orderDetails.value[index].price).toFixed(2));
       }
@@ -334,32 +333,37 @@ export default {
     // 点击弹出退款弹窗
     const noticeClk = (row) => {
       // 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;
-      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);
+      if (row.orderDetails.length > 0) {
+        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;
+        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();
+        });
+        // 根据orderDetails的长度,向isChecked添加相应数量的false
+        isChecked.value = Array.from({ length: orderDetails.value.length }, () => false);
+        // console.log(refundNum.value);
+        kDialogRef.value.openDialog();
+      } else {
+        Toast("请联系管理员");
+        return;
+      }
     };
     // 点击全选按钮
     const checkAll = () => {
@@ -389,7 +393,7 @@ export default {
         Toast(t('orderCenter.refundPlace'));
         return;
       } else {
-        console.log(cofficentForm);
+        // console.log(cofficentForm);
         Dialog.confirm({
           // title: "提示",
           message: t('orderCenter.refundCheck'),
@@ -397,7 +401,7 @@ export default {
           isLoading.value = true; // 开始加载
           refundAjax();
           isLoading.value = false; // 加载完成
-      
+
           kDialogRef.value.closeDialog();
         }).catch(() => {
           return;
@@ -419,10 +423,10 @@ export default {
           });
         } else {
           Toast.fail(data.message);
-        } 
+        }
       } catch (error) {
         Toast.fail(t('orderCenter.requestFailed'));
-      } 
+      }
     };
     // 修改的价格
     const cofficentForm = reactive({
@@ -441,7 +445,14 @@ export default {
         // 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`);
+        if (row.productNo != null) {
+          return require(`../../assets/order/spunSugar/goods/${row.productNo}.png`);
+        }
+        if (row.machineType == null || row.machineType == '0') {
+          return require(`../../assets/order/spunSugar/goods/A01.png`);
+        } else {
+          return require(`../../assets/order/spunSugar/goods/B01.png`);
+        }
       }
     };
     // 订单明细商品图片路径处理
@@ -486,6 +497,7 @@ export default {
       size: 20, // 页大小
       status: "",//支付状态
       companyType: "", // 公司平台
+      machineType: "", // 设备类型
     });
     let chartType = "day";
     // 获取订单列表数据
@@ -585,7 +597,9 @@ export default {
           adminId: user.id,
         });
         if (data.code === '00000') {
-          huifuId.value = data.data.huifuId;
+          if(data.data != null) {
+            huifuId.value = data.data.huifuId;
+          }
         }
 
         // 获取当天
@@ -602,6 +616,12 @@ export default {
         getAccountDetail(user.id);
       }
     });
+
+    // 查询是否有退款权限
+    const isRefund = user.menuCodeList.some((item) => {
+        return item === "M16";
+    });
+
     // 跳转订单导出
     const gotoOrderExcel = async () => {
       // router.push({ path: "/orderExport" });
@@ -730,6 +750,7 @@ export default {
         payType:
           searchParams.payType === "" ? null : searchParams.payType,
         companyType: searchParams.companyType,
+        machineType: searchParams.machineType,
       };
       const { data } = await getStatistics(params);
       if (data.code && data.data) {
@@ -791,7 +812,8 @@ export default {
       checkGood,
       plusRefundGood,
       minusRefundGood,
-      isLoading
+      isLoading,
+      isRefund
     };
   },
 };

+ 57 - 3
src/views/robotRanking.vue

@@ -88,6 +88,18 @@
               </div>
             </template>
           </van-field>
+          <van-field @click-input="machineTypeInpClk" readonly clearable v-model="searchForm.machineTypeName"
+                     :placeholder="$t('robotRanking.machineTypePlace')" :label="$t('robotRanking.machineType')">
+            <template #right-icon>
+              <div class="l-flex-RC">
+                <van-icon v-if="searchForm.machineTypeName" @click="
+                  searchForm.machineTypeName = '';
+                searchForm.machineType = '';
+                " class="o-mr-6" name="clear" />
+                <van-icon @click="machineTypeInpClk" 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')">
@@ -114,9 +126,14 @@
       <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="machineTypeShow" position="bottom">
+      <van-picker :default-index="maTypeDefaIdx" :title="$t('robotRanking.machineTypePlace')" :columns="machineTypePopList"
+        :columns-field-names="yearPopFieldName" @confirm="machineTypePopConfirm" @cancel="machineTypeShow = false" />
+    </van-popup>
     <!-- 公司平台弹窗 -->
     <van-popup v-model:show="companyTypeShow" position="bottom">
-      <van-picker :default-index="chgTypeDefaIdx" :title="$t('robotRanking.companyTypePlaceholder')"
+      <van-picker :default-index="maTypeDefaIdx" :title="$t('robotRanking.companyTypePlaceholder')"
         :columns="companyTypePopList" :columns-field-names="yearPopFieldName" @confirm="companyTypePopConfirm"
         @cancel="companyTypeShow = false" />
     </van-popup>
@@ -198,10 +215,16 @@ export default {
     const companyTypeInpClk = () => {
       companyTypeShow.value = true;
     };
+    // 设备类型弹窗
+    const machineTypeInpClk = () => {
+      machineTypeShow.value = true;
+    };
     const changeTypeShow = ref(false);
+    const machineTypeShow = ref(false);
     const companyTypeShow = ref(false);
     // 默认选中
     const chgTypeDefaIdx = ref(1);
+    const maTypeDefaIdx = ref("");
     const changeTypePopList = [
       {
         name: t("robotRanking.patternStatistics"),
@@ -212,7 +235,20 @@ export default {
         id: 0,
       },
     ];
-
+    const machineTypePopList = [
+      {
+        name: t("robotRanking.whole"),
+        id: "",
+      },
+      {
+        name: t("robotRanking.MG"),
+        id: "0",
+      },
+      {
+        name: t("robotRanking.POP"),
+        id: "1",
+      },
+    ];
     const companyTypePopList = [
       {
         name: t("robotRanking.whole"),
@@ -232,6 +268,11 @@ export default {
       searchForm.changeTypeName = e.name;
       changeTypeShow.value = false;
     };
+    const machineTypePopConfirm = (e) => {
+      searchForm.machineType = e.id;
+      searchForm.machineTypeName = e.name;
+      machineTypeShow.value = false;
+    };
     const companyTypePopConfirm = (e) => {
       searchForm.companyType = e.id;
       searchForm.companyTypeName = e.name;
@@ -512,6 +553,7 @@ export default {
     };
     const changeType = ref(0);
     const companyType = ref(""); // 公司平台
+    const machineType = ref(""); // 设备类型
     let chartObj = {
       day: null,
       week: null,
@@ -525,6 +567,7 @@ export default {
         ifForeign: user.ifForeign,
         changeType: changeType.value, //必填,默认为一0:销售额统计,1:花型统计
         companyType: companyType.value,
+        machineType: machineType.value,
         chartType,
         startDate,
         endDate,
@@ -698,7 +741,7 @@ export default {
       searchForm.changeTypeName = t("robotRanking.salesStatistics");
       searchForm.changeType = 0;
       searchForm.companyTypeName = t("robotRanking.whole");
-
+      searchForm.machineTypeName = t("robotRanking.whole");
       // 查询是否有订单数据权限
       const isOrderData = user.menuCodeList.some((item) => {
         return item === "M4";
@@ -731,6 +774,8 @@ export default {
       businessName: "",
       changeTypeName: "",
       changeType: "",
+      machineTypeName: "",
+      machineType: "",
       companyTypeName: "",
       companyType: ""
     });
@@ -762,6 +807,7 @@ export default {
         changeType.value = searchForm.changeType;
       }
       companyType.value = searchForm.companyType;
+      machineType.value = searchForm.machineType;
       init();
     };
     // 筛选弹窗
@@ -814,11 +860,19 @@ export default {
       changeTypePopList,
       changeTypePopConfirm,
       changeTypeInpClk,
+
       companyTypeInpClk,
       companyTypePopConfirm,
       companyTypePopList,
       companyTypeShow,
+
+      machineTypeInpClk,
+      machineTypePopConfirm,
+      machineTypePopList,
+      machineTypeShow,
+
       totalNoData,
+      maTypeDefaIdx,
       chgTypeDefaIdx,
       isAdmin,
     };

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

@@ -207,7 +207,7 @@ export default {
       const { data } = await updateSysRole(params);
       if (data.code === "00000") {
         Toast.success(t("role.successfullyModifiedRole"));
-        router.push("/role");
+        router.go(-1);
       } else {
         Toast.fail(`${t("role.failedToModifyRole")} ${data.message}`);
       }

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

@@ -35,7 +35,7 @@
         }}</van-button>
       <van-popup v-model:show="uniPayShow" position="center" :style="{ width: '90%', 'text-align': 'center' }">
         <p>{{ $t('uniPay.orderNumber') }}: {{ uniPayObj.sn }}</p>
-        <img :src="uniPayObj.rd_Pic" />
+        <img :src="uniPayObj.rd_Pic" style="max-width: 100%; height: auto;"/>
       </van-popup>
     </div>
   </div>