6 Commits e798baa28d ... 737834c29f

Author SHA1 Message Date
  Mcal 737834c29f fix:修改《订单列表》js中i18n的缺失 1 week ago
  Mcal 5d2a6a6a5b fix:修改《货币管理》js中i18n的缺失 1 week ago
  Mcal 018a72e686 feat:添加《桌码管理》i18n多语言 1 week ago
  Mcal 1c07a88634 Merge branch 'lyz_dev' of http://1.94.207.143:3000/chongqing/store-admin into lyz_dev 1 week ago
  Mcal 62011bff76 fix:修复《商户管理》i18n中js的翻译缺失 1 week ago
  Mcal b0768245b9 feat:添加《店铺列表》的i18n 1 week ago
8 changed files with 1503 additions and 1073 deletions
  1. 2 2
      .env.development
  2. 169 5
      src/locales/en.json
  3. 170 2
      src/locales/zh.json
  4. 89 96
      src/views/currency/list.vue
  5. 119 93
      src/views/merchant/index.vue
  6. 281 250
      src/views/order/index.vue
  7. 381 354
      src/views/store/list.vue
  8. 292 271
      src/views/table/index.vue

+ 2 - 2
.env.development

@@ -12,8 +12,8 @@ VUE_APP_PUBLIC_PATH = '/'
 
 # 后端接口地址
 # 黄  雯后台
-VUE_APP_SERVER_URL = 'http://192.168.1.44:8080'
+# VUE_APP_SERVER_URL = 'http://192.168.1.44:8080'
 
 # 彭正高后台
-# VUE_APP_SERVER_URL = 'http://192.168.1.110:8080'
+VUE_APP_SERVER_URL = 'http://192.168.1.110:8080'
 

+ 169 - 5
src/locales/en.json

@@ -71,7 +71,29 @@
     "pleaseEnterRefundRemark": "Please enter the refund remark",
     "confirm": "Confirm",
     "cancel": "Cancel",
-    "detail":{
+    "totalAmountRequired": "The total amount cannot be empty.",
+    "verifyCodeRequired": "The verification code cannot be empty.",
+    "expressCompanyRequired": "The express company cannot be empty.",
+    "expressNoRequired": "The express number cannot be empty.",
+    "refundAmountRequired": "The refund amount cannot be empty.",
+    "correctRefundAmount": "Please enter a correct refund amount.",
+    "enable": "Enable",
+    "disable": "Disable",
+    "confirmChangeOrderStatus": "Are you sure you want to {action} the order with order number “{orderSn}”?",
+    "statusChangeSuccess": "{action} successfully",
+    "verifySuccess": "Verification successful!",
+    "modifySuccess": "Modification successful!",
+    "modifyError": "An error occurred during modification.",
+    "modifyOrder": "Modify Order",
+    "requestProcessing": "Request is being processed...",
+    "submitExpressSuccess": "Logistics information submitted successfully!",
+    "refundAmountExceed": "The refund amount cannot exceed the total order amount!",
+    "submitRefundSuccess": "Refund submitted successfully!",
+    "confirmDeleteOrder": "Are you sure you want to delete the data item with order number “{orderSn}”?",
+    "deleteSuccess": "Delete successfully",
+    "printSendSuccess": "Printing sent successfully!",
+    "printSendFail": "Printing sent failed!",
+    "detail": {
       "basicInfo": "Basic Information",
       "orderNumber": "Order Number",
       "totalAmount": "Total Amount",
@@ -96,7 +118,7 @@
       "quantity": "Quantity"
     }
   },
-  "currency":{
+  "currency": {
     "currency": "Currency",
     "pleaseEnterCurrencyNameOrSymbol": "Please enter the currency name or symbol",
     "search": "Search",
@@ -111,9 +133,19 @@
     "pleaseEnterCurrencyName": "Please enter the currency name",
     "pleaseEnterCurrencySymbol": "Please enter the currency symbol",
     "confirm": "Confirm",
-    "cancel": "Cancel"
+    "cancel": "Cancel",
+    "currencyNameRequired": "The currency name cannot be empty.",
+    "currencySymbolRequired": "The currency symbol cannot be empty.",
+    "enable": "Enable",
+    "disable": "Disable",
+    "confirmChangeStatus": "Are you sure you want to {action} the store “{name}”?",
+    "statusChangeSuccess": "{action} successfully",
+    "addNewCurrency": "Add New Currency",
+    "modifySuccess": "Modify successfully",
+    "addSuccess": "Add successfully",
+    "editCurrency": "Edit Currency"
   },
-  "merchant":{
+  "merchant": {
     "merchantNumber": "Merchant Number",
     "pleaseEnterMerchantNumber": "Please enter the merchant number",
     "merchantName": "Merchant Name",
@@ -165,6 +197,138 @@
     "disabledLabel": "N",
     "disabled": "Disabled",
     "confirm": "Confirm",
-    "cancel": "Cancel"
+    "cancel": "Cancel",
+    "merchantNumberRequired": "The merchant number cannot be empty.",
+    "merchantNumberLengthRange": "The length of the merchant number must be between 5 and 30.",
+    "merchantNameRequired": "The merchant name cannot be empty.",
+    "merchantNameLengthRange": "The length of the merchant name must be between 2 and 50.",
+    "enable": "Enable",
+    "disable": "Disable",
+    "confirmChangeStatus": "Are you sure you want to {action} the merchant “{name}”?",
+    "statusChangeSuccess": "{action} successfully",
+    "addNewMerchant": "Add New Merchant",
+    "modifySuccess": "Modify successfully",
+    "addSuccess": "Add successfully",
+    "editMerchant": "Edit Merchant",
+    "confirmDelete": "Are you sure you want to delete the data item “{name}”?",
+    "deleteSuccess": "Delete successfully"
+  },
+  "storeList": {
+    "list": {
+      "storeName": "Store Name",
+      "pleaseEnterStoreName": "Please enter the store name",
+      "status": "Status",
+      "enabledKey": "A",
+      "enabled": "Enabled",
+      "disabledKey": "N",
+      "disabled": "Disabled",
+      "search": "Search",
+      "reset": "Reset",
+      "addNewStore": "Add New Store",
+      "ID": "ID",
+      "belongingMerchant": "Belonging Merchant",
+      "contactPerson": "Contact Person",
+      "phoneNumber": "Phone Number",
+      "address": "Address",
+      "createTime": "Creation Time",
+      "operation": "Operation",
+      "modify": "Modify",
+      "delete": "Delete",
+      "storeName": "Store Name",
+      "pleaseEnterStoreName": "Please enter the store name",
+      "merchantLogo": "Merchant Logo",
+      "clickToModifyTip": "(Tip: Click the picture to modify.)",
+      "belongingMerchant": "Belonging Merchant",
+      "pleaseSelectBelongingMerchant": "Please select the belonging merchant",
+      "selectCurrency": "Select Currency",
+      "pleaseSelectCurrency": "Please select the currency",
+      "contactPersonName": "Contact Person Name",
+      "pleaseEnterContactPersonName": "Please enter the contact person's name",
+      "contactPersonPhone": "Contact Person Phone",
+      "pleaseEnterContactPersonPhone": "Please enter the contact person's phone number",
+      "storeDetailedAddress": "Store Detailed Address",
+      "pleaseEnterStoreDetailedAddress": "Please enter the store's detailed address",
+      "businessHours": "Business Hours",
+      "pleaseEnterBusinessHours": "Please enter the store's business hours",
+      "remarkInfo": "Remark Information",
+      "pleaseEnterRemarkInfo": "Please enter the remark information content",
+      "status": "Status",
+      "enabledKey": "A",
+      "enabledLabel": "A",
+      "enabled": "Enabled",
+      "disabledKey": "N",
+      "disabledLabel": "N",
+      "disabled": "Disabled",
+      "confirm": "Confirm",
+      "cancel": "Cancel",
+      "storeNameLengthRange": "The length of the store name must be between 2 and 30 characters.",
+      "belongingMerchantRequired": "The belonging merchant cannot be empty.",
+      "contactPersonNameRequired": "The contact person's name cannot be empty.",
+      "contactPersonNameLengthRange": "The length of the contact person's name must be between 2 and 30 characters.",
+      "contactPersonPhoneRequired": "The contact person's phone number cannot be empty.",
+      "contactPersonPhoneLengthRange": "The length of the contact person's phone number must be between 6 and 30 characters.",
+      "currencyRequired": "The currency cannot be empty.",
+      "enabled": "Enable",
+      "disabled": "Disable",
+      "confirmChangeStatus": "Are you sure you want to {action} the store “{storeName}”?",
+      "statusChangeSuccess": "{action} successfully",
+      "addNewStore": "Add New Store",
+      "modifySuccess": "Modify successfully",
+      "addSuccess": "Add successfully",
+      "editStore": "Edit Store",
+      "confirmDelete": "Are you sure you want to delete the data item “{name}”?",
+      "deleteSuccess": "Delete successfully"
+    },
+    "info": {}
+  },
+  "tableManagement": {
+    "tableCode": "Table Code",
+    "pleaseEnterTableCode": "Please enter the table code",
+    "status": "Status",
+    "enabledKey": "A",
+    "enabled": "Enabled",
+    "disabledKey": "N",
+    "disabled": "Disabled",
+    "search": "Search",
+    "reset": "Reset",
+    "addNewTableCode": "Add New Table Code",
+    "ID": "ID",
+    "tableEncoding": "Table Encoding",
+    "belongingStore": "Belonging Store",
+    "publicOwnership": "Public Ownership",
+    "createTime": "Creation Time",
+    "operation": "Operation",
+    "modify": "Modify",
+    "delete": "Delete",
+    "tableEncoding": "Table Encoding",
+    "pleaseEnterTableEncoding": "Please enter the table encoding, e.g., A01",
+    "belongingStore": "Belonging Store",
+    "pleaseSelectBelongingStore": "Please select the belonging store",
+    "remarkInfo": "Remark Information",
+    "pleaseEnterRemarkInfo": "Please enter the remark information content",
+    "sort": "Sort",
+    "sortTip": "Tip: The smaller the value, the higher the ranking.",
+    "status": "Status",
+    "enabledKey": "A",
+    "enabledLabel": "A",
+    "enabled": "Enabled",
+    "disabledKey": "N",
+    "disabledLabel": "N",
+    "disabled": "Disabled",
+    "confirm": "Confirm",
+    "cancel": "Cancel",
+    "tableCodeRequired": "The table code cannot be empty.",
+    "tableCodeLengthRange": "The length of the table code must be between 2 and 30 characters.",
+    "belongingStoreRequired": "The belonging store cannot be empty.",
+    "enable": "Enable",
+    "disable": "Disable",
+    "confirmChangeTableStatus": "Are you sure you want to {action} the table code “{tableCode}”?",
+    "statusChangeSuccess": "{action} successfully",
+    "addNewTableCode": "Add New Table Code",
+    "modifySuccess": "Modify successfully",
+    "addSuccess": "Add successfully",
+    "editTableCode": "Edit Table Code",
+    "confirmDeleteTableCode": "Are you sure you want to delete the data item “{tableCode}”?",
+    "deleteSuccess": "Delete successfully"
   }
 }

+ 170 - 2
src/locales/zh.json

@@ -65,6 +65,29 @@
     "pleaseEnterRefundRemark": "请输入退款备注",
     "confirm": "确定",
     "cancel": "取消",
+    "totalAmountRequired": "总金额不能为空",
+    "verifyCodeRequired": "核销码不能为空",
+    "expressCompanyRequired": "物流公司不能为空",
+    "expressNoRequired": "物流单号不能为空",
+    "refundAmountRequired": "退款金额不能为空",
+    "correctRefundAmount": "请输入正确的退款金额",
+    "enable": "启用",
+    "disable": "禁用",
+    "confirmChangeOrderStatus": "确认要 {action} 订单号为 “{orderSn}” 的订单吗?",
+    "statusChangeSuccess": "{action} 成功",
+    "verifySuccess": "核销成功!",
+    "modifySuccess": "修改成功!",
+    "modifyError": "修改出错啦",
+    "modifyOrder": "修改订单",
+    "requestProcessing": "请求处理中...",
+    "submitExpressSuccess": "提交物流信息成功!",
+    "refundAmountExceed": "退款金额不能大于订单总金额!",
+    "submitRefundSuccess": "提交退款成功!",
+    "confirmDeleteOrder": "是否确认删除订单号为 “{orderSn}” 的数据项?",
+    "deleteSuccess": "删除成功",
+    "printSendSuccess": "打印发送成功!",
+    "printSendFail": "打印发送失败!",
+    
     "detail":{
       "basicInfo": "基础信息",
       "orderNumber": "订单号",
@@ -105,7 +128,17 @@
     "pleaseEnterCurrencyName": "请输入货币名称",
     "pleaseEnterCurrencySymbol": "请输入货币符号",
     "confirm": "确定",
-    "cancel": "取消"
+    "cancel": "取消",
+    "currencyNameRequired": "货币名称不能为空",
+    "currencySymbolRequired": "货币符号不能为空",
+    "enable": "启用",
+    "disable": "禁用",
+    "confirmChangeStatus": "确认要 {action} “{name}” 店铺吗?",
+    "statusChangeSuccess": "{action} 成功",
+    "addNewCurrency": "新增货币",
+    "modifySuccess": "修改成功",
+    "addSuccess": "新增成功",
+    "editCurrency": "编辑货币"
   },
   "merchant":{
     "merchantNumber": "商户号",
@@ -159,6 +192,141 @@
     "disabledLabel": "N",
     "disabled": "禁用",
     "confirm": "确定",
-    "cancel": "取消"
+    "cancel": "取消",
+    "merchantNumberRequired": "商户号不能为空",
+    "merchantNumberLengthRange": "商户号长度必须介于5至30之间",
+    "merchantNameRequired": "商户名称不能为空",
+    "merchantNameLengthRange": "商户名称长度必须介于 2 和 50 之间",
+    "enable": "启用",
+    "disable": "禁用",
+    "confirmChangeStatus": "确认要 {action} “{name}” 商户吗?",
+    "statusChangeSuccess": "{action} 成功",
+    "addNewMerchant": "新增商户",
+    "modifySuccess": "修改成功",
+    "addSuccess": "新增成功",
+    "editMerchant": "编辑商户",
+    "confirmDelete": "是否确认删除“{name}”的数据项?",
+    "deleteSuccess": "删除成功"
+  },
+  "storeList":{
+    "list":{
+      "storeName": "店铺名称",
+      "pleaseEnterStoreName": "请输入店铺名称",
+      "status": "状态",
+      "enabledKey": "A",
+      "enabled": "启用",
+      "disabledKey": "N",
+      "disabled": "禁用",
+      "search": "搜索",
+      "reset": "重置",
+      "addNewStore": "新增店铺",
+      "ID": "ID",
+      "belongingMerchant": "所属商户",
+      "contactPerson": "联系人",
+      "phoneNumber": "手机号",
+      "address": "地址",
+      "createTime": "创建时间",
+      "operation": "操作",
+      "modify": "修改",
+      "delete": "删除",
+      "storeName": "店铺名称",
+      "pleaseEnterStoreName": "请输入店铺名称",
+      "merchantLogo": "商户logo",
+      "clickToModifyTip": "(提示:点击图片修改)",
+      "belongingMerchant": "所属商户",
+      "pleaseSelectBelongingMerchant": "请选择所属商户",
+      "selectCurrency": "选择货币",
+      "pleaseSelectCurrency": "请选择货币",
+      "contactPersonName": "联系人姓名",
+      "pleaseEnterContactPersonName": "请输入联系人姓名",
+      "contactPersonPhone": "联系人电话",
+      "pleaseEnterContactPersonPhone": "请输入联系人电话",
+      "storeDetailedAddress": "店铺详细地址",
+      "pleaseEnterStoreDetailedAddress": "请输入店铺详细地址",
+      "businessHours": "营业时间",
+      "pleaseEnterBusinessHours": "请输入店铺营业时间",
+      "remarkInfo": "备注信息",
+      "pleaseEnterRemarkInfo": "请输入备注信息内容",
+      "status": "状态",
+      "enabledKey": "A",
+      "enabledLabel": "A",
+      "enabled": "启用",
+      "disabledKey": "N",
+      "disabledLabel": "N",
+      "disabled": "禁用",
+      "confirm": "确定",
+      "cancel": "取消",
+      "storeNameRequired": "店铺名称不能为空",
+      "storeNameLengthRange": "店铺名称长度必须介于 2 和 30 之间",
+      "belongingMerchantRequired": "所属商户不能为空",
+      "contactPersonNameRequired": "联系人姓名不能为空",
+      "contactPersonNameLengthRange": "联系人姓名长度必须介于 2 和 30 之间",
+      "contactPersonPhoneRequired": "联系人电话不能为空",
+      "contactPersonPhoneLengthRange": "联系人电话长度必须介于 6 和 30 之间",
+      "currencyRequired": "货币不能为空",
+      "enabled": "启用",
+      "disabled": "禁用",
+      "confirmChangeStatus": "确认要 {action} “{storeName}” 店铺吗?",
+      "statusChangeSuccess": "{action} 成功",
+      "addNewStore": "新增店铺",
+      "modifySuccess": "修改成功",
+      "addSuccess": "新增成功",
+      "editStore": "编辑店铺",
+      "confirmDelete": "是否确认删除“{name}”的数据项?",
+      "deleteSuccess": "删除成功"
+    },
+    "info":{
+      
+    }
+  },
+  "tableManagement": {
+    "tableCode": "桌码",
+    "pleaseEnterTableCode": "请输入桌码",
+    "status": "状态",
+    "enabledKey": "A",
+    "enabled": "启用",
+    "disabledKey": "N",
+    "disabled": "禁用",
+    "search": "搜索",
+    "reset": "重置",
+    "addNewTableCode": "新增桌码",
+    "ID": "ID",
+    "tableEncoding": "桌子编码",
+    "belongingStore": "所属店铺",
+    "publicOwnership": "公共所有",
+    "createTime": "创建时间",
+    "operation": "操作",
+    "modify": "修改",
+    "delete": "删除",
+    "tableEncoding": "桌子编码",
+    "pleaseEnterTableEncoding": "请输入桌子编码,如:A01",
+    "belongingStore": "所属店铺",
+    "pleaseSelectBelongingStore": "请选择所属店铺",
+    "remarkInfo": "备注信息",
+    "pleaseEnterRemarkInfo": "请输入备注信息内容",
+    "sort": "排序",
+    "sortTip": "提示:数值越小,排行越靠前",
+    "status": "状态",
+    "enabledKey": "A",
+    "enabledLabel": "A",
+    "enabled": "启用",
+    "disabledKey": "N",
+    "disabledLabel": "N",
+    "disabled": "禁用",
+    "confirm": "确定",
+    "cancel": "取消",
+    "tableCodeRequired": "桌码不能为空",
+    "tableCodeLengthRange": "桌码长度必须介于 2 和 30 之间",
+    "belongingStoreRequired": "所属店铺不能为空",
+    "enable": "启用",
+    "disable": "禁用",
+    "confirmChangeTableStatus": "确认要 {action} “{tableCode}” 桌码吗?",
+    "statusChangeSuccess": "{action} 成功",
+    "addNewTableCode": "新增桌码",
+    "modifySuccess": "修改成功",
+    "addSuccess": "新增成功",
+    "editTableCode": "编辑桌码",
+    "confirmDeleteTableCode": "是否确认删除“{tableCode}”的数据项?",
+    "deleteSuccess": "删除成功"
   }
 }

+ 89 - 96
src/views/currency/list.vue

@@ -140,7 +140,7 @@
     getStoreInfo,
     saveStore,
   } from "@/api/store";
-  import {saveCurrency,getCurrencyList} from '@/api/currency'
+  import {saveCurrency,getCurrencyList,updateCurrency} from '@/api/currency'
   export default {
     name: "StoreList",
     components: {
@@ -198,11 +198,18 @@
         // 表单校验
         rules: {
           name: [
-            { required: true, message: "货币名称不能为空", trigger: "blur" },
-
+              { 
+                  required: true, 
+                  message: this.$t('currency.currencyNameRequired'), 
+                  trigger: "blur" 
+              }
           ],
-          symbol:[
-            { required: true, message: "货币符号不能为空", trigger: "blur" },
+          symbol: [
+              { 
+                  required: true, 
+                  message: this.$t('currency.currencySymbolRequired'), 
+                  trigger: "blur" 
+              }
           ]
         },
       };
@@ -213,139 +220,125 @@
     methods: {
       // 查询列表
       getList() {
-        this.loading = true;
-        getCurrencyList(this.queryParams).then(
-          (response) => {
-            console.log('res;',response)
-            this.list = response.data
-            this.total = response.total
-            this.loading = false;
-          }
-        );
+          this.loading = true;
+          getCurrencyList(this.queryParams).then(
+              (response) => {
+                  console.log('res;', response);
+                  this.list = response.data;
+                  this.total = response.total;
+                  this.loading = false;
+              }
+          );
       },
       // 搜索按钮操作
       handleQuery() {
-        this.queryParams.page = 1;
-        this.getList();
+          this.queryParams.page = 1;
+          this.getList();
       },
       // 重置按钮操作
       resetQuery() {
-        this.dateRange = [];
-        this.resetForm("queryForm");
-        this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
-        this.handleQuery();
+          this.dateRange = [];
+          this.resetForm("queryForm");
+          this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
+          this.handleQuery();
       },
       // 状态修改
       handleStatusChange(row) {
-        let text = row.status == "A" ? "启用" : "禁用";
-        this.$modal
-          .confirm("确认要" + text + '"' + row.name + '"店铺吗?')
-          .then(function () {
-            return updateStoreStatus(row.id, row.status);
-          })
-          .then(() => {
-            this.$modal.msgSuccess(text + "成功");
-          })
-          .catch(function () {
-            row.status = row.status === "N" ? "A" : "N";
-          });
+          let text = row.status === "A" ? this.$t('currency.enable') : this.$t('currency.disable');
+          const confirmMsg = this.$t('currency.confirmChangeStatus', { action: text, name: row.name });
+          this.$modal
+            .confirm(confirmMsg)
+            .then(() => {
+                  return updateStoreStatus(row.id, row.status);
+              })
+            .then(() => {
+                  const successMsg = this.$t('currency.statusChangeSuccess', { action: text });
+                  this.$modal.msgSuccess(successMsg);
+              })
+            .catch(() => {
+                  row.status = row.status === "N" ? "A" : "N";
+              });
       },
       // 多选框选中数据
       handleSelectionChange(selection) {
-        this.ids = selection.map((item) => item.operId);
-        this.multiple = !selection.length;
+          this.ids = selection.map((item) => item.operId);
+          this.multiple = !selection.length;
       },
       // 排序触发事件
       handleSortChange(column, prop, order) {
-        this.queryParams.orderByColumn = column.prop;
-        this.queryParams.isAsc = column.order;
-        this.getList();
+          this.queryParams.orderByColumn = column.prop;
+          this.queryParams.isAsc = column.order;
+          this.getList();
       },
       // 新增按钮操作
       handleAdd() {
-        this.reset();
-        this.open = true;
-        this.title = "新增货币";
+          this.reset();
+          this.open = true;
+          this.title = this.$t('currency.addNewCurrency');
       },
       // 表单重置
       reset() {
-        this.form = {
-          id: "",
-          name: "",
-          symbol:'',
-        };
-        this.resetForm("form");
+          this.form = {
+              id: "",
+              name: "",
+              symbol: ''
+          };
+          this.resetForm("form");
       },
       // 取消按钮
       cancel() {
-        this.open = false;
-        this.reset();
+          this.open = false;
+          this.reset();
       },
       // 提交按钮
       submitForm: function () {
-        this.$refs["form"].validate((valid) => {
-          if (valid) {
-            if(this.form.id){
-              updateCurrency(this.form).then((response) => {
-                this.$modal.msgSuccess('修改成功')
-                this.open = false
-                this.getList()
-              })
-            }else{
-                saveCurrency(this.form).then(response => {
-                    this.$modal.msgSuccess("新增成功");
-                    this.open = false;
-                    this.getList();
-                });
-            }
-            // if (this.form.id) {
-            //   saveStore(this.form).then((response) => {
-            //     this.$modal.msgSuccess("修改成功");
-            //     this.open = false;
-            //     this.getList();
-            //   });
-            // } else {
-            //   saveStore(this.form).then((response) => {
-            //     this.$modal.msgSuccess("新增成功");
-            //     this.open = false;
-            //     this.getList();
-            //   });
-            // }
-          }
-        });
+          this.$refs["form"].validate((valid) => {
+              if (valid) {
+                  if (this.form.id) {
+                      updateCurrency(this.form).then((response) => {
+                          this.$modal.msgSuccess(this.$t('currency.modifySuccess'));
+                          this.open = false;
+                          this.getList();
+                      });
+                  } else {
+                      saveCurrency(this.form).then(response => {
+                          this.$modal.msgSuccess(this.$t('currency.addSuccess'));
+                          this.open = false;
+                          this.getList();
+                      });
+                  }
+              }
+          });
       },
       // 二维码
       handleQrCode(row) {
-        this.qr = { type: "store", id: row.id };
-        this.openQrCode = true;
+          this.qr = { type: "store", id: row.id };
+          this.openQrCode = true;
       },
       // 关闭二维码
       closeDialog() {
-        this.openQrCode = false;
+          this.openQrCode = false;
       },
       // 修改按钮操作
       handleUpdate(row) {
-        this.reset();
-
-        this.title = "编辑货币";
-        this.open = true;
-        const {id,name,symbol} = row
-        this.form={id,name,symbol}
-
+          this.reset();
+          this.title = this.$t('currency.editCurrency');
+          this.open = true;
+          const { id, name, symbol } = row;
+          this.form = { id, name, symbol };
       },
-
       handleUploadSuccess(file) {
-        this.form.logo = file.data.fileName;
+          this.form.logo = file.data.fileName;
       },
       handleUploadLicenseSuccess(file) {
-        this.form.license = file.data.fileName;
+          this.form.license = file.data.fileName;
       },
       handleUploadCertSuccess(file) {
-        this.form.wxCertPath = file.data.fileName;
-        this.wxCertPath = file.data.fileName;
-      },
-    },
-  };
+          this.form.wxCertPath = file.data.fileName;
+          this.wxCertPath = file.data.fileName;
+      }
+    }
+  };  
   </script>
   <style scoped>
   .common-dialog >>> .el-upload--picture-card {

+ 119 - 93
src/views/merchant/index.vue

@@ -349,18 +349,41 @@ export default {
         name: '',
         status: ''
       },
-      // 表单校验
       rules: {
-        type: [{ required: true, message: '商户号不能为空', trigger: 'blur' }],
+        type: [
+            { 
+                required: true, 
+                message: this.$t('merchant.merchantNumberRequired'), 
+                trigger: 'blur' 
+            }
+        ],
         no: [
-          { required: true, message: '商户号不能为空', trigger: 'blur' },
-          { min: 5, max: 30, message: '商户号长度必须介于5至30之间', trigger: 'blur' }
+            { 
+                required: true, 
+                message: this.$t('merchant.merchantNumberRequired'), 
+                trigger: 'blur' 
+            },
+            { 
+                min: 5, 
+                max: 30, 
+                message: this.$t('merchant.merchantNumberLengthRange'), 
+                trigger: 'blur' 
+            }
         ],
         name: [
-          { required: true, message: '商户名称不能为空', trigger: 'blur' },
-          { min: 2, max: 30, message: '商户名称长度必须介于 2 和 50 之间', trigger: 'blur' }
+            { 
+                required: true, 
+                message: this.$t('merchant.merchantNameRequired'), 
+                trigger: 'blur' 
+            },
+            { 
+                min: 2, 
+                max: 30, 
+                message: this.$t('merchant.merchantNameLengthRange'), 
+                trigger: 'blur' 
+            }
         ]
-      }
+    }
     }
   },
   created() {
@@ -369,127 +392,130 @@ export default {
   methods: {
     // 查询日志
     getList() {
-      this.loading = true
-      getMerchantList(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
-        this.list = response.data.dataList.content
-        this.total = response.data.dataList.totalElements
-        this.imagePath = response.data.imagePath
-        this.typeOptions = response.data.typeList
-        this.loading = false
-      })
+        this.loading = true;
+        getMerchantList(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
+            this.list = response.data.dataList.content;
+            this.total = response.data.dataList.totalElements;
+            this.imagePath = response.data.imagePath;
+            this.typeOptions = response.data.typeList;
+            this.loading = false;
+        });
     },
     // 搜索按钮操作
     handleQuery() {
-      this.queryParams.page = 1
-      this.getList()
+        this.queryParams.page = 1;
+        this.getList();
     },
     // 重置按钮操作
     resetQuery() {
-      this.resetForm('queryForm')
-      this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
-      this.handleQuery()
+        this.resetForm('queryForm');
+        this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
+        this.handleQuery();
     },
     // 状态修改
     handleStatusChange(row) {
-      let text = row.status == '1' ? '启用' : '禁用'
-      this.$modal
-        .confirm('确认要' + text + '"' + row.name + '"商户吗?')
-        .then(function () {
-          return updateMerchantStatus(row.id, row.status)
-        })
-        .then(() => {
-          this.$modal.msgSuccess(text + '成功')
-        })
-        .catch(function () {
-          row.status = row.status === 'A' ? 'A' : 'D'
-        })
+        let text = row.status === '1' ? this.$t('merchant.enable') : this.$t('merchant.disable');
+        const confirmMsg = this.$t('merchant.confirmChangeStatus', { action: text, name: row.name });
+        this.$modal
+           .confirm(confirmMsg)
+           .then(() => {
+                return updateMerchantStatus(row.id, row.status);
+            })
+           .then(() => {
+                const successMsg = this.$t('merchant.statusChangeSuccess', { action: text });
+                this.$modal.msgSuccess(successMsg);
+            })
+           .catch(() => {
+                row.status = row.status === 'A' ? 'A' : 'D';
+            });
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.id)
-      this.multiple = !selection.length
+        this.ids = selection.map((item) => item.id);
+        this.multiple = !selection.length;
     },
     // 排序触发事件
     handleSortChange(column, prop, order) {
-      this.queryParams.orderByColumn = column.prop
-      this.queryParams.isAsc = column.order
-      this.getList()
+        this.queryParams.orderByColumn = column.prop;
+        this.queryParams.isAsc = column.order;
+        this.getList();
     },
     // 新增按钮操作
     handleAdd() {
-      this.reset()
-      this.open = true
-      this.title = '新增商户'
+        this.reset();
+        this.open = true;
+        this.title = this.$t('merchant.addNewMerchant');
     },
     // 表单重置
     reset() {
-      this.form = {
-        id: '',
-        no: '',
-        name: '',
-        logo: '',
-        license: '',
-        wxAppId: '',
-        wxAppSecret: '',
-        wxOfficialAppId: '',
-        wxOfficialAppSecret: '',
-        description: '',
-        status: 'A'
-      }
-      this.resetForm('form')
+        this.form = {
+            id: '',
+            no: '',
+            name: '',
+            logo: '',
+            license: '',
+            wxAppId: '',
+            wxAppSecret: '',
+            wxOfficialAppId: '',
+            wxOfficialAppSecret: '',
+            description: '',
+            status: 'A'
+        };
+        this.resetForm('form');
     },
     // 取消按钮
     cancel() {
-      this.open = false
-      this.reset()
+        this.open = false;
+        this.reset();
     },
     // 提交按钮
     submitForm: function () {
-      this.$refs['form'].validate((valid) => {
-        if (valid) {
-          if (this.form.id) {
-            saveMerchant(this.form).then((response) => {
-              this.$modal.msgSuccess('修改成功')
-              this.open = false
-              this.getList()
-            })
-          } else {
-            saveMerchant(this.form).then((response) => {
-              this.$modal.msgSuccess('新增成功')
-              this.open = false
-              this.getList()
-            })
-          }
-        }
-      })
+        this.$refs['form'].validate((valid) => {
+            if (valid) {
+                if (this.form.id) {
+                    saveMerchant(this.form).then((response) => {
+                        this.$modal.msgSuccess(this.$t('merchant.modifySuccess'));
+                        this.open = false;
+                        this.getList();
+                    });
+                } else {
+                    saveMerchant(this.form).then((response) => {
+                        this.$modal.msgSuccess(this.$t('merchant.addSuccess'));
+                        this.open = false;
+                        this.getList();
+                    });
+                }
+            }
+        });
     },
     // 修改按钮操作
     handleUpdate(row) {
-      const app = this
-      app.reset()
-      const id = row.id || this.ids
-      getMerchantInfo(id).then((response) => {
-        app.form = response.data.merchantInfo
-        app.open = true
-        app.title = '编辑商户'
-      })
+        const app = this;
+        app.reset();
+        const id = row.id || this.ids;
+        getMerchantInfo(id).then((response) => {
+            app.form = response.data.merchantInfo;
+            app.open = true;
+            app.title = this.$t('merchant.editMerchant');
+        });
     },
     // 删除按钮操作
     handleDelete(row) {
-      const name = row.name || this.id
-      this.$modal
-        .confirm('是否确认删除"' + name + '"的数据项?')
-        .then(function () {
-          return updateMerchantStatus(row.id, 'D')
-        })
-        .then(() => {
-          this.getList()
-          this.$modal.msgSuccess('删除成功')
-        })
-        .catch(() => {})
+        const name = row.name || this.id;
+        const confirmMsg = this.$t('merchant.confirmDelete', { name });
+        this.$modal
+           .confirm(confirmMsg)
+           .then(() => {
+                return updateMerchantStatus(row.id, 'D');
+            })
+           .then(() => {
+                this.getList();
+                this.$modal.msgSuccess(this.$t('merchant.deleteSuccess'));
+            })
+           .catch(() => {});
     },
     handleUploadSuccess(file) {
-      this.form.logo = file.data.fileName
+        this.form.logo = file.data.fileName;
     }
   }
 }

+ 281 - 250
src/views/order/index.vue

@@ -596,25 +596,53 @@ export default {
       },
       // 表单校验
       rules: {
-        amount: [{ required: true, message: '总金额不能为空', trigger: 'blur' }]
+          amount: [
+              { 
+                  required: true, 
+                  message: this.$t('orderList.totalAmountRequired'), 
+                  trigger: 'blur' 
+              }
+          ]
       },
       // 核销表单校验
       vFormRules: {
-        verifyCode: [{ required: true, message: '核销码不能为空', trigger: 'blur' }]
+          verifyCode: [
+              { 
+                  required: true, 
+                  message: this.$t('orderList.verifyCodeRequired'), 
+                  trigger: 'blur' 
+              }
+          ]
       },
       eFormRules: {
-        expressCompany: [{ required: true, message: '物流公司不能为空', trigger: 'blur' }],
-        expressNo: [{ required: true, message: '物流单号不能为空', trigger: 'blur' }]
+          expressCompany: [
+              { 
+                  required: true, 
+                  message: this.$t('orderList.expressCompanyRequired'), 
+                  trigger: 'blur' 
+              }
+          ],
+          expressNo: [
+              { 
+                  required: true, 
+                  message: this.$t('orderList.expressNoRequired'), 
+                  trigger: 'blur' 
+              }
+          ]
       },
       rFormRules: {
-        refundAmount: [
-          { required: true, message: '退款金额不能为空', trigger: 'blur' },
-          {
-            pattern: /((^[1-9]\d*)|^0)(\.\d{0,2}){0,1}$/,
-            message: `请输入正确的退款金额`,
-            trigger: 'blur'
-          }
-        ]
+          refundAmount: [
+              { 
+                  required: true, 
+                  message: this.$t('orderList.refundAmountRequired'), 
+                  trigger: 'blur' 
+              },
+              {
+                  pattern: /((^[1-9]\d*)|^0)(\.\d{0,2}){0,1}$/,
+                  message: this.$t('orderList.correctRefundAmount'),
+                  trigger: 'blur'
+              }
+          ]
       }
     }
   },
@@ -624,321 +652,324 @@ export default {
   methods: {
     // 查询订单
     getList() {
-      const app = this
-      app.loading = true
-      app.queryParams.storeIds = app.storeIds ? app.storeIds.join(',') : ''
-      getOrderList(app.queryParams).then((response) => {
-        this.list = response.data.paginationResponse.content
-        this.total = response.data.paginationResponse.totalElements
-        this.typeList = response.data.typeList
-        this.statusList = response.data.statusList
-        this.payStatusList = response.data.payStatusList
-        this.orderModeList = response.data.orderModeList
-        this.payTypeList = response.data.payTypeList
-        this.storeList = response.data.storeList
-        this.expressCompanyList = response.data.expressCompanyList
-        this.loading = false
-      })
+        const app = this;
+        app.loading = true;
+        app.queryParams.storeIds = app.storeIds ? app.storeIds.join(',') : '';
+        getOrderList(app.queryParams).then((response) => {
+            this.list = response.data.paginationResponse.content;
+            this.total = response.data.paginationResponse.totalElements;
+            this.typeList = response.data.typeList;
+            this.statusList = response.data.statusList;
+            this.payStatusList = response.data.payStatusList;
+            this.orderModeList = response.data.orderModeList;
+            this.payTypeList = response.data.payTypeList;
+            this.storeList = response.data.storeList;
+            this.expressCompanyList = response.data.expressCompanyList;
+            this.loading = false;
+        });
     },
     // 搜索按钮操作
     handleQuery(isExport) {
-      this.queryParams.page = 1
-      if (isExport) {
-        this.exportExcel()
-      } else {
-        this.getList()
-      }
+        this.queryParams.page = 1;
+        if (isExport) {
+            this.exportExcel();
+        } else {
+            this.getList();
+        }
     },
     // 导出excel
     exportExcel() {
-      this.download('backendApi/order/export', {
-        ...this.queryParams
-      })
+        this.download('backendApi/order/export', {
+           ...this.queryParams
+        });
     },
     // 重置按钮操作
     resetQuery() {
-      this.queryParams.status = ''
-      this.queryParams.mobile = ''
-      this.queryParams.orderMode = ''
-      this.queryParams.orderSn = ''
-      this.queryParams.storeIds = ''
-      this.storeIds = []
-      this.resetForm('queryForm')
-      this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
-      this.handleQuery()
+        this.queryParams.status = '';
+        this.queryParams.mobile = '';
+        this.queryParams.orderMode = '';
+        this.queryParams.orderSn = '';
+        this.queryParams.storeIds = '';
+        this.storeIds = [];
+        this.resetForm('queryForm');
+        this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
+        this.handleQuery();
     },
     // 状态修改
     handleStatusChange(row) {
-      let text = row.status == 'A' ? '启用' : '禁用'
-      this.$modal
-        .confirm('确认要' + text + '"' + row.orderSn + '"吗?')
-        .then(function () {
-          return updateOrderStatus(row.id, row.status)
-        })
-        .then(() => {
-          this.$modal.msgSuccess(text + '成功')
-        })
-        .catch(function () {
-          row.status = row.status === 'N' ? 'A' : 'N'
-        })
+        let text = row.status === 'A' ? this.$t('orderList.enable') : this.$t('orderList.disable');
+        const confirmMsg = this.$t('orderList.confirmChangeOrderStatus', { action: text, orderSn: row.orderSn });
+        this.$modal
+           .confirm(confirmMsg)
+           .then(() => {
+                return updateOrderStatus(row.id, row.status);
+            })
+           .then(() => {
+                const successMsg = this.$t('orderList.statusChangeSuccess', { action: text });
+                this.$modal.msgSuccess(successMsg);
+            })
+           .catch(() => {
+                row.status = row.status === 'N' ? 'A' : 'N';
+            });
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.id)
-      this.multiple = !selection.length
+        this.ids = selection.map((item) => item.id);
+        this.multiple = !selection.length;
     },
     // 排序触发事件
     handleSortChange(column, prop, order) {
-      this.queryParams.orderByColumn = column.prop
-      this.queryParams.isAsc = column.order
-      this.getList()
+        this.queryParams.orderByColumn = column.prop;
+        this.queryParams.isAsc = column.order;
+        this.getList();
     },
     // 表单重置
     reset() {
-      this.form = {
-        orderId: '',
-        orderSn: '',
-        status: 'A',
-        amount: '',
-        discount: '',
-        remark: '',
-        orderMode: 'oneself'
-      }
-      this.resetForm('form')
+        this.form = {
+            orderId: '',
+            orderSn: '',
+            status: 'A',
+            amount: '',
+            discount: '',
+            remark: '',
+            orderMode: 'oneself'
+        };
+        this.resetForm('form');
     },
     // 取消按钮
     cancel() {
-      this.open = false
-      this.reset()
+        this.open = false;
+        this.reset();
     },
     // 取消核销按钮
     cancelVForm() {
-      this.openVerify = false
-      this.vForm.orderId = ''
-      this.vForm.orderSn = ''
-      this.vForm.verifyCode = ''
+        this.openVerify = false;
+        this.vForm.orderId = '';
+        this.vForm.orderSn = '';
+        this.vForm.verifyCode = '';
     },
     // 提交核销按钮
     submitVForm: function () {
-      this.$refs['vForm'].validate((valid) => {
-        if (valid) {
-          verifyOrder(this.vForm).then((response) => {
-            this.$modal.msgSuccess('核销成功!')
-            this.cancelVForm()
-            this.getList()
-          })
-        }
-      })
+        this.$refs['vForm'].validate((valid) => {
+            if (valid) {
+                verifyOrder(this.vForm).then((response) => {
+                    this.$modal.msgSuccess(this.$t('orderList.verifySuccess'));
+                    this.cancelVForm();
+                    this.getList();
+                });
+            }
+        });
     },
     // 提交修改按钮
     submitForm: function () {
-      this.$refs['form'].validate((valid) => {
-        if (valid) {
-          saveOrder(this.form)
-            .then((response) => {
-              this.$modal.msgSuccess('修改成功!')
-              this.open = false
-              this.getList()
-            })
-            .catch(function () {
-              this.$modal.msgError('修改出错啦')
-            })
-        }
-      })
+        this.$refs['form'].validate((valid) => {
+            if (valid) {
+                saveOrder(this.form)
+                   .then((response) => {
+                        this.$modal.msgSuccess(this.$t('orderList.modifySuccess'));
+                        this.open = false;
+                        this.getList();
+                    })
+                   .catch(() => {
+                        this.$modal.msgError(this.$t('orderList.modifyError'));
+                    });
+            }
+        });
     },
     // 查看详情按钮操作
     handleView(row) {
-      this.$router.push({ path: '/order/detail?orderId=' + row.id })
+        this.$router.push({ path: '/order/detail?orderId=' + row.id });
     },
     // 修改按钮操作
     handleUpdate(row) {
-      const app = this
-      app.reset()
-      const id = row.id || this.ids
-      getOrderInfo(id).then((response) => {
-        let orderInfo = response.data.orderInfo
-        if (orderInfo) {
-          app.form.orderId = orderInfo.id
-          app.form.orderSn = orderInfo.orderSn
-          app.form.amount = orderInfo.amount
-          app.form.discount = orderInfo.discount
-          app.form.remark = orderInfo.remark
-          app.form.status = orderInfo.status
-          app.form.orderMode = orderInfo.orderMode + ''
-        }
-        this.open = true
-        this.title = '修改订单'
-      })
+        const app = this;
+        app.reset();
+        const id = row.id || this.ids;
+        getOrderInfo(id).then((response) => {
+            let orderInfo = response.data.orderInfo;
+            if (orderInfo) {
+                app.form.orderId = orderInfo.id;
+                app.form.orderSn = orderInfo.orderSn;
+                app.form.amount = orderInfo.amount;
+                app.form.discount = orderInfo.discount;
+                app.form.remark = orderInfo.remark;
+                app.form.status = orderInfo.status;
+                app.form.orderMode = orderInfo.orderMode + '';
+            }
+            this.open = true;
+            this.title = this.$t('orderList.modifyOrder');
+        });
     },
     // 核销按钮操作
     handleVerify(row) {
-      const app = this
-      const id = row.id || this.ids
-      getOrderInfo(id).then((response) => {
-        let orderInfo = response.data.orderInfo
-        if (orderInfo) {
-          app.vForm.orderId = orderInfo.id
-          app.vForm.orderSn = orderInfo.orderSn
-          app.vForm.remark = orderInfo.remark
-        }
-        app.openVerify = true
-      })
+        const app = this;
+        const id = row.id || this.ids;
+        getOrderInfo(id).then((response) => {
+            let orderInfo = response.data.orderInfo;
+            if (orderInfo) {
+                app.vForm.orderId = orderInfo.id;
+                app.vForm.orderSn = orderInfo.orderSn;
+                app.vForm.remark = orderInfo.remark;
+            }
+            app.openVerify = true;
+        });
     },
     // 发货按钮
     handleExpress(row) {
-      const app = this
-      const id = row.id || this.ids
-      getOrderInfo(id).then((response) => {
-        let orderInfo = response.data.orderInfo
-        if (orderInfo) {
-          app.eForm.orderId = orderInfo.id
-          app.eForm.orderSn = orderInfo.orderSn
-          app.eForm.expressNo = orderInfo.expressInfo ? orderInfo.expressInfo.expressNo : ''
-          app.eForm.expressCompany = orderInfo.expressInfo
-            ? orderInfo.expressInfo.expressCompany
-            : ''
-        }
-        app.openExpress = true
-      })
+        const app = this;
+        const id = row.id || this.ids;
+        getOrderInfo(id).then((response) => {
+            let orderInfo = response.data.orderInfo;
+            if (orderInfo) {
+                app.eForm.orderId = orderInfo.id;
+                app.eForm.orderSn = orderInfo.orderSn;
+                app.eForm.expressNo = orderInfo.expressInfo ? orderInfo.expressInfo.expressNo : '';
+                app.eForm.expressCompany = orderInfo.expressInfo
+                   ? orderInfo.expressInfo.expressCompany
+                    : '';
+            }
+            app.openExpress = true;
+        });
     },
     // 取消发货按钮
     cancelEForm() {
-      this.openExpress = false
-      this.eForm.orderId = ''
-      this.eForm.orderSn = ''
-      this.eForm.expressCompany = ''
-      this.eForm.expressNo = ''
+        this.openExpress = false;
+        this.eForm.orderId = '';
+        this.eForm.orderSn = '';
+        this.eForm.expressCompany = '';
+        this.eForm.expressNo = '';
     },
     // 提交发货按钮
     submitEForm: function () {
-      const app = this
-      if (app.loading) {
-        app.$modal.msgError('请求处理中...')
-      }
-      app.$refs['eForm'].validate((valid) => {
-        if (valid) {
-          app.loading = true
-          const param = {
-            orderId: app.eForm.orderId,
-            orderSn: app.eForm.orderSn,
-            expressCompany: app.eForm.expressCompany,
-            expressNo: app.eForm.expressNo
-          }
-          delivered(param).then((response) => {
-            app.$modal.msgSuccess('提交物流信息成功!')
-            app.cancelEForm()
-            app.getList()
-            app.loading = false
-          })
+        const app = this;
+        if (app.loading) {
+            app.$modal.msgError(this.$t('orderList.requestProcessing'));
         }
-      })
+        app.$refs['eForm'].validate((valid) => {
+            if (valid) {
+                app.loading = true;
+                const param = {
+                    orderId: app.eForm.orderId,
+                    orderSn: app.eForm.orderSn,
+                    expressCompany: app.eForm.expressCompany,
+                    expressNo: app.eForm.expressNo
+                };
+                delivered(param).then((response) => {
+                    app.$modal.msgSuccess(this.$t('orderList.submitExpressSuccess'));
+                    app.cancelEForm();
+                    app.getList();
+                    app.loading = false;
+                });
+            }
+        });
     },
     // 取消退款按钮
     cancelRForm() {
-      this.openRefundDialog = false
-      this.rForm.orderId = ''
-      this.rForm.orderSn = ''
-      this.rForm.payAmount = ''
-      this.rForm.payType = ''
-      this.rForm.refundAmount = ''
-      this.rForm.remark = ''
+        this.openRefundDialog = false;
+        this.rForm.orderId = '';
+        this.rForm.orderSn = '';
+        this.rForm.payAmount = '';
+        this.rForm.payType = '';
+        this.rForm.refundAmount = '';
+        this.rForm.remark = '';
     },
     // 提交退款按钮
     submitRForm: function () {
-      const app = this
-      if (app.loading) {
-        app.$modal.msgError('请求处理中...')
-      }
-      if (parseFloat(app.rForm.refundAmount) > parseFloat(app.rForm.amount)) {
-        app.$modal.msgError('退款金额不能大于订单总金额!')
-        return false
-      }
-      app.$refs['rForm'].validate((valid) => {
-        if (valid) {
-          app.loading = true
-          doRefund(app.rForm).then((response) => {
-            app.$modal.msgSuccess('提交退款成功!')
-            app.cancelRForm()
-            app.getList()
-            app.loading = false
-          })
+        const app = this;
+        if (app.loading) {
+            app.$modal.msgError(this.$t('orderList.requestProcessing'));
+        }
+        if (parseFloat(app.rForm.refundAmount) > parseFloat(app.rForm.amount)) {
+            app.$modal.msgError(this.$t('orderList.refundAmountExceed'));
+            return false;
         }
-      })
+        app.$refs['rForm'].validate((valid) => {
+            if (valid) {
+                app.loading = true;
+                doRefund(app.rForm).then((response) => {
+                    app.$modal.msgSuccess(this.$t('orderList.submitRefundSuccess'));
+                    app.cancelRForm();
+                    app.getList();
+                    app.loading = false;
+                });
+            }
+        });
     },
     // 删除按钮操作
     handleDelete(row) {
-      const name = row.orderSn
-      this.$modal
-        .confirm('是否确认删除订单号为"' + name + '"的数据项?')
-        .then(function () {
-          return deleteOrder(row.id)
-        })
-        .then(() => {
-          this.getList()
-          this.$modal.msgSuccess('删除成功')
-        })
-        .catch(() => {})
+        const name = row.orderSn;
+        const confirmMsg = this.$t('orderList.confirmDeleteOrder', { orderSn: name });
+        this.$modal
+           .confirm(confirmMsg)
+           .then(() => {
+                return deleteOrder(row.id);
+            })
+           .then(() => {
+                this.getList();
+                this.$modal.msgSuccess(this.$t('orderList.deleteSuccess'));
+            })
+           .catch(() => {});
     },
     // 打印小票(本地打印)
     handlePrint(row) {
-      const app = this
-      app.orderInfo = {}
-      app.storeInfo = {}
-      const id = row.id || this.ids
-      getOrderInfo(id).then((response) => {
-        let orderInfo = response.data.orderInfo
-        if (orderInfo) {
-          app.orderInfo = orderInfo
-          app.storeInfo = orderInfo.storeInfo
-        }
-        app.openOrderPrintDialog = true
-      })
+        const app = this;
+        app.orderInfo = {};
+        app.storeInfo = {};
+        const id = row.id || this.ids;
+        getOrderInfo(id).then((response) => {
+            let orderInfo = response.data.orderInfo;
+            if (orderInfo) {
+                app.orderInfo = orderInfo;
+                app.storeInfo = orderInfo.storeInfo;
+            }
+            app.openOrderPrintDialog = true;
+        });
     },
     // 打印小票(云打印)
     handlePrintCloud(row) {
-      const app = this
-      const orderId = row.id || this.ids
-      doPrint(orderId).then((response) => {
-        let result = response.data
-        if (result) {
-          app.$modal.msgSuccess('打印发送成功!')
-        } else {
-          app.$modal.msgError('打印发送失败!')
-        }
-      })
+        const app = this;
+        const orderId = row.id || this.ids;
+        doPrint(orderId).then((response) => {
+            let result = response.data;
+            if (result) {
+                app.$modal.msgSuccess(this.$t('orderList.printSendSuccess'));
+            } else {
+                app.$modal.msgError(this.$t('orderList.printSendFail'));
+            }
+        });
     },
     // 退款
     handleRefund(row) {
-      const app = this
-      app.rForm.orderId = row.id
-      app.rForm.orderSn = row.orderSn
-      app.rForm.payAmount = row.payAmount
-      app.rForm.payType = getName(app.payTypeList, row.payType)
-      app.openRefundDialog = true
+        const app = this;
+        app.rForm.orderId = row.id;
+        app.rForm.orderSn = row.orderSn;
+        app.rForm.payAmount = row.payAmount;
+        app.rForm.payType = getName(app.payTypeList, row.payType);
+        app.openRefundDialog = true;
     },
     // 关掉打印对话框
     closePrintDialog() {
-      this.openOrderPrintDialog = false
+        this.openOrderPrintDialog = false;
     },
     // 更多操作触发
     handleCommand(command, row) {
-      switch (command) {
-        case 'handleDelete':
-          this.handleDelete(row)
-          break
-        case 'handlePrint':
-          this.handlePrint(row)
-          break
-        case 'handlePrintCloud':
-          this.handlePrintCloud(row)
-          break
-        case 'handleRefund':
-          this.handleRefund(row)
-          break
-        default:
-          this.handleView(row)
-          break
-      }
+        switch (command) {
+            case 'handleDelete':
+                this.handleDelete(row);
+                break;
+            case 'handlePrint':
+                this.handlePrint(row);
+                break;
+            case 'handlePrintCloud':
+                this.handlePrintCloud(row);
+                break;
+            case 'handleRefund':
+                this.handleRefund(row);
+                break;
+            default:
+                this.handleView(row);
+                break;
+        }
     }
   }
 }

+ 381 - 354
src/views/store/list.vue

@@ -1,84 +1,85 @@
 <template>
   <div class="app-container">
     <el-form
-      :model="queryParams"
-      class="main-search"
-      ref="queryForm"
-      size="small"
-      :inline="true"
-      v-show="showSearch"
-      label-width="68px"
+        :model="queryParams"
+        class="main-search"
+        ref="queryForm"
+        size="small"
+        :inline="true"
+        v-show="showSearch"
+        label-width="68px"
     >
-      <el-form-item label="店铺名称" prop="name">
-        <el-input
-          v-model="queryParams.name"
-          placeholder="请输入店铺名称"
-          clearable
-          style="width: 240px"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="状态" prop="status">
-        <el-select
-          v-model="queryParams.status"
-          placeholder="状态"
-          clearable
-          style="width: 240px"
-        >
-          <el-option key="A" label="启用" value="A" />
-          <el-option key="N" label="禁用" value="N" />
-        </el-select>
-      </el-form-item>
-      <el-form-item>
-        <el-button
-          type="primary"
-          icon="el-icon-search"
-          size="mini"
-          @click="handleQuery"
-          >搜索</el-button
-        >
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
-          >重置</el-button
-        >
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['store:add']"
-          >新增店铺</el-button
-        >
-      </el-form-item>
+        <el-form-item :label="$t('storeList.list.storeName')" prop="name">
+            <el-input
+                v-model="queryParams.name"
+                :placeholder="$t('storeList.list.pleaseEnterStoreName')"
+                clearable
+                style="width: 240px"
+                @keyup.enter.native="handleQuery"
+            />
+        </el-form-item>
+        <el-form-item :label="$t('storeList.list.status')" prop="status">
+            <el-select
+                v-model="queryParams.status"
+                :placeholder="$t('storeList.list.status')"
+                clearable
+                style="width: 240px"
+            >
+                <el-option :key="$t('storeList.list.enabledKey')" :label="$t('storeList.list.enabled')" :value="A" />
+                <el-option :key="$t('storeList.list.disabledKey')" :label="$t('storeList.list.disabled')" :value="N" />
+            </el-select>
+        </el-form-item>
+        <el-form-item>
+            <el-button
+                type="primary"
+                icon="el-icon-search"
+                size="mini"
+                @click="handleQuery"
+            >
+                {{ $t('storeList.list.search') }}
+            </el-button>
+            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">
+                {{ $t('storeList.list.reset') }}
+            </el-button>
+            <el-button
+                type="primary"
+                plain
+                icon="el-icon-plus"
+                size="mini"
+                @click="handleAdd"
+                v-hasPermi="['store:add']"
+            >
+                {{ $t('storeList.list.addNewStore') }}
+            </el-button>
+        </el-form-item>
     </el-form>
 
     <el-table
-      ref="tables"
-      v-loading="loading"
-      :data="list"
-      @selection-change="handleSelectionChange"
-      :default-sort="defaultSort"
-      @sort-change="handleSortChange"
+        ref="tables"
+        v-loading="loading"
+        :data="list"
+        @selection-change="handleSelectionChange"
+        :default-sort="defaultSort"
+        @sort-change="handleSortChange"
     >
-      <el-table-column label="ID" prop="id" width="55">
-        <template slot-scope="scope">
-          <span>{{ showIdLastFour(scope.row.id) }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="店铺名称" align="center" prop="name" />
-      <el-table-column
-        label="所属商户"
-        align="center"
-        prop="merchantName"
-        width="160"
-      >
-        <template slot-scope="scope">
-          <span>{{
-            scope.row.merchantName ? scope.row.merchantName : "-"
-          }}</span>
-        </template>
-      </el-table-column>
-      <!-- <el-table-column label="默认店铺" align="center" prop="isDefault">
+        <el-table-column :label="$t('storeList.list.ID')" prop="id" width="55">
+            <template slot-scope="scope">
+                <span>{{ showIdLastFour(scope.row.id) }}</span>
+            </template>
+        </el-table-column>
+        <el-table-column :label="$t('storeList.list.storeName')" align="center" prop="name" />
+        <el-table-column
+            :label="$t('storeList.list.belongingMerchant')"
+            align="center"
+            prop="merchantName"
+            width="160"
+        >
+            <template slot-scope="scope">
+                <span>{{ scope.row.merchantName? scope.row.merchantName : "-" }}</span>
+            </template>
+        </el-table-column>
+        <el-table-column :label="$t('storeList.list.contactPerson')" align="center" prop="contact" />
+              <!-- <el-table-column label="默认店铺" align="center" prop="isDefault">
         <template slot-scope="scope">
           <el-switch
             v-model="scope.row.isDefault"
@@ -88,40 +89,39 @@
           ></el-switch>
         </template>
       </el-table-column> -->
-      <el-table-column label="联系人" align="center" prop="contact" />
-      <el-table-column label="手机号" align="center" prop="phone" />
-      <el-table-column label="地址" align="center" prop="address" />
-      <el-table-column
-        label="创建时间"
-        align="center"
-        prop="createTime"
-        sortable="custom"
-        :sort-orders="['descending', 'ascending']"
-        width="180"
-      >
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createTime) }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="状态" align="center" prop="status">
-        <template slot-scope="scope">
-          <el-switch
-            v-model="scope.row.status"
-            active-value="A"
-            inactive-value="N"
-            v-hasPermi="['store:add']"
-            @change="handleStatusChange(scope.row)"
-          ></el-switch>
-        </template>
-      </el-table-column>
-      <el-table-column
-        label="操作"
-        align="center"
-        width="180"
-        class-name="small-padding fixed-width"
-      >
-        <template slot-scope="scope">
-          <!-- <el-button
+        <el-table-column :label="$t('storeList.list.phoneNumber')" align="center" prop="phone" />
+        <el-table-column :label="$t('storeList.list.address')" align="center" prop="address" />
+        <el-table-column
+            :label="$t('storeList.list.createTime')"
+            align="center"
+            prop="createTime"
+            sortable="custom"
+            :sort-orders="['descending', 'ascending']"
+            width="180"
+        >
+            <template slot-scope="scope">
+                <span>{{ parseTime(scope.row.createTime) }}</span>
+            </template>
+        </el-table-column>
+        <el-table-column :label="$t('storeList.list.status')" align="center" prop="status">
+            <template slot-scope="scope">
+                <el-switch
+                    v-model="scope.row.status"
+                    active-value="A"
+                    inactive-value="N"
+                    v-hasPermi="['store:add']"
+                    @change="handleStatusChange(scope.row)"
+                ></el-switch>
+            </template>
+        </el-table-column>
+        <el-table-column
+            :label="$t('storeList.list.operation')"
+            align="center"
+            width="180"
+            class-name="small-padding fixed-width"
+        >
+            <template slot-scope="scope">
+                        <!-- <el-button
             size="mini"
             type="text"
             icon="el-icon-copy-document"
@@ -129,25 +129,26 @@
             @click="handleQrCode(scope.row)"
             >二维码</el-button
           > -->
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            >修改</el-button
-          >
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            v-hasPermi="['store:add']"
-            @click="handleDelete(scope.row)"
-            >删除</el-button
-          >
-        </template>
-      </el-table-column>
+                <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-edit"
+                    @click="handleUpdate(scope.row)"
+                >
+                    {{ $t('storeList.list.modify') }}
+                </el-button>
+                <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-delete"
+                    v-hasPermi="['store:add']"
+                    @click="handleDelete(scope.row)"
+                >
+                    {{ $t('storeList.list.delete') }}
+                </el-button>
+            </template>
+        </el-table-column>
     </el-table>
-
     <pagination
       v-show="total > 0"
       :total="total"
@@ -158,45 +159,45 @@
 
     <!-- 添加或修改对话框 -->
     <el-dialog
-      :title="title"
-      :visible.sync="open"
-      class="common-dialog"
-      width="800px"
-      append-to-body
+        :title="title"
+        :visible.sync="open"
+        class="common-dialog"
+        width="800px"
+        append-to-body
     >
-      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="店铺名称" prop="name">
-              <el-input
-                v-model="form.name"
-                placeholder="请输入店铺名称"
-                maxlength="30"
-              />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="9">
-            <el-form-item label="商户logo" prop="logo">
-              <el-upload
-                :action="uploadAction"
-                list-type="picture-card"
-                :class="{ hide: hideUpload }"
-                :file-list="uploadFiles"
-                :auto-upload="true"
-                :show-file-list="false"
-                :headers="uploadHeader"
-                :on-success="handleUploadSuccess"
-              >
-                <img v-if="form.logo" :src="imagePath + form.logo" class="list-img" />
-                <i v-if="!form.logo" class="el-icon-plus"></i>
-              </el-upload>
-            </el-form-item>
-          </el-col>
-          <p class="form-tips">(提示:点击图片修改)</p>
-        </el-row>
-        <!-- <el-row>
+        <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('storeList.list.storeName')" prop="name">
+                        <el-input
+                            v-model="form.name"
+                            :placeholder="$t('storeList.list.pleaseEnterStoreName')"
+                            maxlength="30"
+                        />
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="9">
+                    <el-form-item :label="$t('storeList.list.merchantLogo')" prop="logo">
+                        <el-upload
+                            :action="uploadAction"
+                            list-type="picture-card"
+                            :class="{ hide: hideUpload }"
+                            :file-list="uploadFiles"
+                            :auto-upload="true"
+                            :show-file-list="false"
+                            :headers="uploadHeader"
+                            :on-success="handleUploadSuccess"
+                        >
+                            <img v-if="form.logo" :src="imagePath + form.logo" class="list-img" />
+                            <i v-if="!form.logo" class="el-icon-plus"></i>
+                        </el-upload>
+                    </el-form-item>
+                </el-col>
+                <p class="form-tips">{{ $t('storeList.list.clickToModifyTip') }}</p>
+            </el-row>
+                    <!-- <el-row>
           <el-col :span="24">
             <el-form-item label="是否默认店铺">
               <el-radio-group v-model="form.isDefault">
@@ -206,80 +207,80 @@
             </el-form-item>
           </el-col>
         </el-row> -->
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="所属商户" prop="merchantId">
-              <el-select v-model="form.merchantId" placeholder="请选择所属商户">
-                <el-option
-                  v-for="item in merchantOptions"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.id"
-                  :disabled="item.status !== 'A'"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="选择货币" prop="currencyId">
-              <el-select v-model="form.currencyId" placeholder="请选择货币">
-                <el-option
-                  v-for="item in currencyOptions"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.id"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="联系人姓名" prop="contact">
-              <el-input
-                v-model="form.contact"
-                placeholder="请输入联系人姓名"
-                maxlength="30"
-              />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="联系人电话" prop="phone">
-              <el-input
-                v-model="form.phone"
-                placeholder="请输入联系人电话"
-                maxlength="30"
-              />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="店铺详细地址" prop="address">
-              <el-input
-                v-model="form.address"
-                placeholder="请输入店铺详细地址"
-                maxlength="200"
-              />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="营业时间" prop="hours">
-              <el-input
-                v-model="form.hours"
-                placeholder="请输入店铺营业时间"
-                maxlength="100"
-              />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <!-- <el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('storeList.list.belongingMerchant')" prop="merchantId">
+                        <el-select v-model="form.merchantId" :placeholder="$t('storeList.list.pleaseSelectBelongingMerchant')">
+                            <el-option
+                                v-for="item in merchantOptions"
+                                :key="item.id"
+                                :label="item.name"
+                                :value="item.id"
+                                :disabled="item.status!== 'A'"
+                            ></el-option>
+                        </el-select>
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('storeList.list.selectCurrency')" prop="currencyId">
+                        <el-select v-model="form.currencyId" :placeholder="$t('storeList.list.pleaseSelectCurrency')">
+                            <el-option
+                                v-for="item in currencyOptions"
+                                :key="item.id"
+                                :label="item.name"
+                                :value="item.id"
+                            ></el-option>
+                        </el-select>
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('storeList.list.contactPersonName')" prop="contact">
+                        <el-input
+                            v-model="form.contact"
+                            :placeholder="$t('storeList.list.pleaseEnterContactPersonName')"
+                            maxlength="30"
+                        />
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('storeList.list.contactPersonPhone')" prop="phone">
+                        <el-input
+                            v-model="form.phone"
+                            :placeholder="$t('storeList.list.pleaseEnterContactPersonPhone')"
+                            maxlength="30"
+                        />
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('storeList.list.storeDetailedAddress')" prop="address">
+                        <el-input
+                            v-model="form.address"
+                            :placeholder="$t('storeList.list.pleaseEnterStoreDetailedAddress')"
+                            maxlength="200"
+                        />
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('storeList.list.businessHours')" prop="hours">
+                        <el-input
+                            v-model="form.hours"
+                            :placeholder="$t('storeList.list.pleaseEnterBusinessHours')"
+                            maxlength="100"
+                        />
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <!-- <el-row>
           <el-col :span="24">
             <el-form-item label="店铺纬度" prop="latitude">
               <el-input
@@ -453,33 +454,32 @@
             </el-form-item>
           </el-col>
         </el-row> -->
-
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="备注信息">
-              <el-input
-                v-model="form.description"
-                type="textarea"
-                placeholder="请输入备注信息内容"
-              ></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="状态">
-              <el-radio-group v-model="form.status">
-                <el-radio key="A" label="A" value="A">启用</el-radio>
-                <el-radio key="N" label="N" value="N">禁用</el-radio>
-              </el-radio-group>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确定</el-button>
-        <el-button @click="cancel">取消</el-button>
-      </div>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('storeList.list.remarkInfo')">
+                        <el-input
+                            v-model="form.description"
+                            type="textarea"
+                            :placeholder="$t('storeList.list.pleaseEnterRemarkInfo')"
+                        ></el-input>
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('storeList.list.status')">
+                        <el-radio-group v-model="form.status">
+                            <el-radio :key="$t('storeList.list.enabledKey')" :label="$t('storeList.list.enabledLabel')" value="A">{{ $t('storeList.list.enabled') }}</el-radio>
+                            <el-radio :key="$t('storeList.list.disabledKey')" :label="$t('storeList.list.disabledLabel')" value="N">{{ $t('storeList.list.disabled') }}</el-radio>
+                        </el-radio-group>
+                    </el-form-item>
+                </el-col>
+            </el-row>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+            <el-button type="primary" @click="submitForm">{{ $t('storeList.list.confirm') }}</el-button>
+            <el-button @click="cancel">{{ $t('storeList.list.cancel') }}</el-button>
+        </div>
     </el-dialog>
     <FuintQrCode :showDialog="openQrCode" :qr="qr" @closeDialog="closeDialog" />
   </div>
@@ -570,39 +570,59 @@ export default {
       // 表单校验
       rules: {
         name: [
-          { required: true, message: "店铺名称不能为空", trigger: "blur" },
-          {
-            min: 2,
-            max: 30,
-            message: "店铺名称长度必须介于 2 和 30 之间",
-            trigger: "blur",
-          },
+            { 
+                required: true, 
+                message: this.$t('storeList.list.storeNameRequired'), 
+                trigger: "blur" 
+            },
+            {
+                min: 2,
+                max: 30,
+                message: this.$t('storeList.list.storeNameLengthRange'),
+                trigger: "blur",
+            },
         ],
         merchantId: [
-          { required: true, message: "所属商户不能为空", trigger: "blur" },
+            { 
+                required: true, 
+                message: this.$t('storeList.list.belongingMerchantRequired'), 
+                trigger: "blur" 
+            },
         ],
         contact: [
-          { required: true, message: "联系人姓名不能为空", trigger: "blur" },
-          {
-            min: 2,
-            max: 30,
-            message: "联系人姓名长度必须介于 2 和 30 之间",
-            trigger: "blur",
-          },
+            { 
+                required: true, 
+                message: this.$t('storeList.list.contactPersonNameRequired'), 
+                trigger: "blur" 
+            },
+            {
+                min: 2,
+                max: 30,
+                message: this.$t('storeList.list.contactPersonNameLengthRange'),
+                trigger: "blur",
+            },
         ],
         phone: [
-          { required: true, message: "联系人电话不能为空", trigger: "blur" },
-          {
-            min: 6,
-            max: 30,
-            message: "联系人电话长度必须介于 6 和 30 之间",
-            trigger: "blur",
-          },
+            { 
+                required: true, 
+                message: this.$t('storeList.list.contactPersonPhoneRequired'), 
+                trigger: "blur" 
+            },
+            {
+                min: 6,
+                max: 30,
+                message: this.$t('storeList.list.contactPersonPhoneLengthRange'),
+                trigger: "blur",
+            },
         ],
         currencyId: [
-          { required: true, message: "货币不能为空", trigger: "blur" },
+            { 
+                required: true, 
+                message: this.$t('storeList.list.currencyRequired'), 
+                trigger: "blur" 
+            },
         ],
-      },
+    },
     };
   },
   created() {
@@ -642,18 +662,24 @@ export default {
     },
     // 状态修改
     handleStatusChange(row) {
-      let text = row.status == 'A' ? '启用' : '禁用'
-      this.$modal
-        .confirm('确认要' + text + '"' + row.name + '"店铺吗?')
-        .then(function () {
-          return updateStoreStatus(row.id, row.status)
-        })
-        .then(() => {
-          this.$modal.msgSuccess(text + '成功')
-        })
-        .catch(function () {
-          row.status = row.status === 'N' ? 'A' : 'N'
-        })
+        // 根据状态获取对应的文本,使用 $t 函数从 i18n 中获取翻译
+        let text = row.status === 'A' ? this.$t('storeList.list.enabled') : this.$t('storeList.list.disabled');
+        // 从 i18n 中获取确认提示信息,并将店铺名称和操作文本动态插入
+        let confirmMsg = this.$t('storeList.list.confirmChangeStatus', { action: text, storeName: row.name });
+
+        this.$modal
+          .confirm(confirmMsg)
+          .then(() => {
+                return updateStoreStatus(row.id, row.status);
+            })
+          .then(() => {
+                // 从 i18n 中获取操作成功的提示信息,并将操作文本动态插入
+                let successMsg = this.$t('storeList.list.statusChangeSuccess', { action: text });
+                this.$modal.msgSuccess(successMsg);
+            })
+          .catch(() => {
+                row.status = row.status === 'N' ? 'A' : 'N';
+            });
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
@@ -668,81 +694,82 @@ export default {
     },
     // 新增按钮操作
     handleAdd() {
-      this.reset()
-      this.open = true
-      this.title = '新增店铺'
+        this.reset();
+        this.open = true;
+        this.title = this.$t('storeList.list.addNewStore');
     },
     // 表单重置
     reset() {
-      this.form = {
-        id: '',
-        name: '',
-        // logo: "",
-        merchantId: this.$store.getters.merchantId,
-        status: 'A'
-        // isDefault: "N",
-        // wxCertPath: "",
-      }
-      this.resetForm('form')
+        this.form = {
+            id: '',
+            name: '',
+            // logo: "",
+            merchantId: this.$store.getters.merchantId,
+            status: 'A'
+            // isDefault: "N",
+            // wxCertPath: "",
+        };
+        this.resetForm('form');
     },
     // 取消按钮
     cancel() {
-      this.open = false
-      this.reset()
+        this.open = false;
+        this.reset();
     },
     // 提交按钮
     submitForm: function () {
-      this.$refs['form'].validate((valid) => {
-        if (valid) {
-          if (this.form.id) {
-            saveStore(this.form).then((response) => {
-              this.$modal.msgSuccess('修改成功')
-              this.open = false
-              this.getList()
-            })
-          } else {
-            saveStore(this.form).then((response) => {
-              this.$modal.msgSuccess('新增成功')
-              this.open = false
-              this.getList()
-            })
-          }
-        }
-      })
+        this.$refs['form'].validate((valid) => {
+            if (valid) {
+                if (this.form.id) {
+                    saveStore(this.form).then((response) => {
+                        this.$modal.msgSuccess(this.$t('storeList.list.modifySuccess'));
+                        this.open = false;
+                        this.getList();
+                    });
+                } else {
+                    saveStore(this.form).then((response) => {
+                        this.$modal.msgSuccess(this.$t('storeList.list.addSuccess'));
+                        this.open = false;
+                        this.getList();
+                    });
+                }
+            }
+        });
     },
     // 二维码
     handleQrCode(row) {
-      this.qr = { type: 'store', id: row.id }
-      this.openQrCode = true
+        this.qr = { type: 'store', id: row.id };
+        this.openQrCode = true;
     },
     // 关闭二维码
     closeDialog() {
-      this.openQrCode = false
+        this.openQrCode = false;
     },
     // 修改按钮操作
     handleUpdate(row) {
-      this.reset()
-      const id = row.id || this.ids
-      getStoreInfo(id).then((response) => {
-        this.form = response.data.storeInfo
-        this.wxCertPath = this.form.wxCertPath
-        this.open = true
-        this.title = '编辑店铺'
-      })
+        this.reset();
+        const id = row.id || this.ids;
+        getStoreInfo(id).then((response) => {
+            this.form = response.data.storeInfo;
+            this.wxCertPath = this.form.wxCertPath;
+            this.open = true;
+            this.title = this.$t('storeList.list.editStore');
+        });
     },
     // 删除按钮操作
     handleDelete(row) {
-      const name = row.name || this.id
-      this.$modal
-        .confirm('是否确认删除"' + name + '"的数据项?')
-        .then(function () {
-          return updateStoreStatus(row.id, 'D')
-        })
-        .then(() => {
-          this.getList()
-          this.$modal.msgSuccess('删除成功')
-        })
-        .catch(() => {})
+        const name = row.name || this.id;
+        const confirmMsg = this.$t('storeList.list.confirmDelete', { name });
+        this.$modal
+          .confirm(confirmMsg)
+          .then(() => {
+                return updateStoreStatus(row.id, 'D');
+            })
+          .then(() => {
+                this.getList();
+                this.$modal.msgSuccess(this.$t('storeList.list.deleteSuccess'));
+            })
+          .catch(() => {});
     },
     handleUploadSuccess(file) {
       this.form.logo = file.data.fileName

+ 292 - 271
src/views/table/index.vue

@@ -1,124 +1,130 @@
 <template>
   <div class="app-container">
     <el-form
-      :model="queryParams"
-      class="main-search"
-      ref="queryForm"
-      size="small"
-      :inline="true"
-      v-show="showSearch"
-      label-width="68px"
+        :model="queryParams"
+        class="main-search"
+        ref="queryForm"
+        size="small"
+        :inline="true"
+        v-show="showSearch"
+        label-width="68px"
     >
-      <el-form-item label="桌码" prop="code">
-        <el-input
-          v-model="queryParams.code"
-          placeholder="请输入桌码"
-          clearable
-          style="width: 240px"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="状态" prop="status">
-        <el-select v-model="queryParams.status" placeholder="状态" clearable style="width: 240px">
-          <el-option key="A" label="启用" value="A" />
-          <el-option key="N" label="禁用" value="N" />
-        </el-select>
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">
-          搜索
-        </el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['table:index']"
-        >
-          新增桌码
-        </el-button>
-      </el-form-item>
+        <el-form-item :label="$t('tableManagement.tableCode')" prop="code">
+            <el-input
+                v-model="queryParams.code"
+                :placeholder="$t('tableManagement.pleaseEnterTableCode')"
+                clearable
+                style="width: 240px"
+                @keyup.enter.native="handleQuery"
+            />
+        </el-form-item>
+        <el-form-item :label="$t('tableManagement.status')" prop="status">
+            <el-select
+                v-model="queryParams.status"
+                :placeholder="$t('tableManagement.status')"
+                clearable
+                style="width: 240px"
+            >
+                <el-option :key="$t('tableManagement.enabledKey')" :label="$t('tableManagement.enabled')" :value="A" />
+                <el-option :key="$t('tableManagement.disabledKey')" :label="$t('tableManagement.disabled')" :value="N" />
+            </el-select>
+        </el-form-item>
+        <el-form-item>
+            <el-button
+                type="primary"
+                icon="el-icon-search"
+                size="mini"
+                @click="handleQuery"
+            >
+                {{ $t('tableManagement.search') }}
+            </el-button>
+            <el-button
+                icon="el-icon-refresh"
+                size="mini"
+                @click="resetQuery"
+            >
+                {{ $t('tableManagement.reset') }}
+            </el-button>
+            <el-button
+                type="primary"
+                plain
+                icon="el-icon-plus"
+                size="mini"
+                @click="handleAdd"
+                v-hasPermi="['table:index']"
+            >
+                {{ $t('tableManagement.addNewTableCode') }}
+            </el-button>
+        </el-form-item>
     </el-form>
 
     <el-table
-      ref="tables"
-      v-loading="loading"
-      :data="list"
-      @selection-change="handleSelectionChange"
-      :default-sort="defaultSort"
-      @sort-change="handleSortChange"
+        ref="tables"
+        v-loading="loading"
+        :data="list"
+        @selection-change="handleSelectionChange"
+        :default-sort="defaultSort"
+        @sort-change="handleSortChange"
     >
-      <el-table-column label="ID" prop="id" width="60">
-        <template slot-scope="scope">
-          <span>{{ showIdLastFour(scope.row.id) }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="桌子编码" align="center" prop="code" />
-      <!-- <el-table-column label="人数限制" align="center" prop="maxPeople" /> -->
-      <el-table-column label="所属店铺" align="center" prop="store">
-        <template slot-scope="scope">
-          <span v-if="scope.row.storeId && scope.row.storeId > 0">
-            <span>{{ getName(storeList, scope.row.storeId) }}</span>
-          </span>
-          <span v-else>公共所有</span>
-        </template>
-      </el-table-column>
-      <el-table-column
-        label="创建时间"
-        align="center"
-        prop="createTime"
-        sortable="custom"
-        :sort-orders="['descending', 'ascending']"
-        width="180"
-      >
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createTime) }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="状态" align="center" prop="status">
-        <template slot-scope="scope">
-          <el-switch
-            v-model="scope.row.status"
-            active-value="A"
-            inactive-value="N"
-            v-hasPermi="['table:index']"
-            @change="handleStatusChange(scope.row)"
-          ></el-switch>
-        </template>
-      </el-table-column>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-        <template slot-scope="scope">
-          <!-- <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-copy-document"
-            v-hasPermi="['table:index']"
-            @click="handleQrCode(scope.row)"
-          >
-            二维码
-          </el-button> -->
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            v-hasPermi="['table:index']"
-            @click="handleUpdate(scope.row)"
-          >
-            修改
-          </el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            v-hasPermi="['table:index']"
-            @click="handleDelete(scope.row)"
-          >
-            删除
-          </el-button>
-        </template>
-      </el-table-column>
+        <el-table-column :label="$t('tableManagement.ID')" prop="id" width="60">
+            <template slot-scope="scope">
+                <span>{{ showIdLastFour(scope.row.id) }}</span>
+            </template>
+        </el-table-column>
+        <el-table-column :label="$t('tableManagement.tableEncoding')" align="center" prop="code" />
+        <el-table-column :label="$t('tableManagement.belongingStore')" align="center" prop="store">
+            <template slot-scope="scope">
+                <span v-if="scope.row.storeId && scope.row.storeId > 0">
+                    <span>{{ getName(storeList, scope.row.storeId) }}</span>
+                </span>
+                <span v-else>{{ $t('tableManagement.publicOwnership') }}</span>
+            </template>
+        </el-table-column>
+        <el-table-column
+            :label="$t('tableManagement.createTime')"
+            align="center"
+            prop="createTime"
+            sortable="custom"
+            :sort-orders="['descending', 'ascending']"
+            width="180"
+        >
+            <template slot-scope="scope">
+                <span>{{ parseTime(scope.row.createTime) }}</span>
+            </template>
+        </el-table-column>
+        <el-table-column :label="$t('tableManagement.status')" align="center" prop="status">
+            <template slot-scope="scope">
+                <el-switch
+                    v-model="scope.row.status"
+                    active-value="A"
+                    inactive-value="N"
+                    v-hasPermi="['table:index']"
+                    @change="handleStatusChange(scope.row)"
+                ></el-switch>
+            </template>
+        </el-table-column>
+        <el-table-column :label="$t('tableManagement.operation')" align="center" class-name="small-padding fixed-width">
+            <template slot-scope="scope">
+                <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-edit"
+                    v-hasPermi="['table:index']"
+                    @click="handleUpdate(scope.row)"
+                >
+                    {{ $t('tableManagement.modify') }}
+                </el-button>
+                <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-delete"
+                    v-hasPermi="['table:index']"
+                    @click="handleDelete(scope.row)"
+                >
+                    {{ $t('tableManagement.delete') }}
+                </el-button>
+            </template>
+        </el-table-column>
     </el-table>
 
     <pagination
@@ -129,79 +135,76 @@
       @pagination="getList"
     />
 
-    <!-- 添加或修改对话框 -->
-    <el-dialog
-      :title="title"
-      :visible.sync="open"
-      class="common-dialog"
-      width="800px"
-      append-to-body
+   <!-- 添加或修改对话框 -->
+   <el-dialog
+        :title="title"
+        :visible.sync="open"
+        class="common-dialog"
+        width="800px"
+        append-to-body
     >
-      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="桌子编码" prop="code">
-              <el-input v-model="form.code" placeholder="请输入桌子编码,如:A01" maxlength="30" />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="所属店铺" prop="storeId">
-              <el-select v-model="form.storeId" placeholder="请选择所属店铺">
-                <el-option
-                  v-for="item in storeList"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.id"
-                  :disabled="item.status !== 'A'"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <!-- <el-row>
-          <el-col :span="24">
-            <el-form-item label="人数上限" prop="maxPeople">
-              <el-input-number v-model="form.maxPeople" :min="0"/>
-            </el-form-item>
-          </el-col>
-        </el-row> -->
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="备注信息">
-              <el-input
-                v-model="form.description"
-                type="textarea"
-                rows="3"
-                placeholder="请输入备注信息内容"
-              ></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="排序" prop="sort">
-              <el-input-number v-model="form.sort" :min="0" />
-              <div class="form-tips">提示:数值越小,排行越靠前</div>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="状态">
-              <el-radio-group v-model="form.status">
-                <el-radio key="A" label="A" value="A">启用</el-radio>
-                <el-radio key="N" label="N" value="N">禁用</el-radio>
-              </el-radio-group>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确定</el-button>
-        <el-button @click="cancel">取消</el-button>
-      </div>
+        <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+            <el-row>
+                <el-col :span="12">
+                    <el-form-item :label="$t('tableManagement.tableEncoding')" prop="code">
+                        <el-input
+                            v-model="form.code"
+                            :placeholder="$t('tableManagement.pleaseEnterTableEncoding')"
+                            maxlength="30"
+                        />
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('tableManagement.belongingStore')" prop="storeId">
+                        <el-select v-model="form.storeId" :placeholder="$t('tableManagement.pleaseSelectBelongingStore')">
+                            <el-option
+                                v-for="item in storeList"
+                                :key="item.id"
+                                :label="item.name"
+                                :value="item.id"
+                                :disabled="item.status!== 'A'"
+                            ></el-option>
+                        </el-select>
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('tableManagement.remarkInfo')">
+                        <el-input
+                            v-model="form.description"
+                            type="textarea"
+                            rows="3"
+                            :placeholder="$t('tableManagement.pleaseEnterRemarkInfo')"
+                        ></el-input>
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('tableManagement.sort')" prop="sort">
+                        <el-input-number v-model="form.sort" :min="0" />
+                        <div class="form-tips">{{ $t('tableManagement.sortTip') }}</div>
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="24">
+                    <el-form-item :label="$t('tableManagement.status')">
+                        <el-radio-group v-model="form.status">
+                            <el-radio :key="$t('tableManagement.enabledKey')" :label="$t('tableManagement.enabledLabel')" value="A">{{ $t('tableManagement.enabled') }}</el-radio>
+                            <el-radio :key="$t('tableManagement.disabledKey')" :label="$t('tableManagement.disabledLabel')" value="N">{{ $t('tableManagement.disabled') }}</el-radio>
+                        </el-radio-group>
+                    </el-form-item>
+                </el-col>
+            </el-row>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+            <el-button type="primary" @click="submitForm">{{ $t('tableManagement.confirm') }}</el-button>
+            <el-button @click="cancel">{{ $t('tableManagement.cancel') }}</el-button>
+        </div>
     </el-dialog>
 
     <FuintQrCode :showDialog="openQrCode" :qr="qr" @closeDialog="closeDialog" />
@@ -255,10 +258,25 @@ export default {
       // 表单校验
       rules: {
         code: [
-          { required: true, message: '桌码不能为空', trigger: 'blur' },
-          { min: 2, max: 30, message: '桌码长度必须介于 2 和 30 之间', trigger: 'blur' }
+            { 
+                required: true, 
+                message: this.$t('tableManagement.tableCodeRequired'), 
+                trigger: 'blur' 
+            },
+            { 
+                min: 2, 
+                max: 30, 
+                message: this.$t('tableManagement.tableCodeLengthRange'), 
+                trigger: 'blur' 
+            }
         ],
-        storeId: [{ required: true, message: '所属店铺不能为空', trigger: 'blur' }]
+        storeId: [
+            { 
+                required: true, 
+                message: this.$t('tableManagement.belongingStoreRequired'), 
+                trigger: 'blur' 
+            }
+        ]
       }
     }
   },
@@ -268,128 +286,131 @@ export default {
   methods: {
     // 查询列表
     getList() {
-      this.loading = true
-      getTableList(this.queryParams).then((response) => {
-        this.list = response.data.paginationResponse.content
-        this.total = response.data.paginationResponse.totalElements
-        this.storeList = response.data.storeList
-        this.imagePath = response.data.imagePath
-        this.loading = false
-      })
+        this.loading = true;
+        getTableList(this.queryParams).then((response) => {
+            this.list = response.data.paginationResponse.content;
+            this.total = response.data.paginationResponse.totalElements;
+            this.storeList = response.data.storeList;
+            this.imagePath = response.data.imagePath;
+            this.loading = false;
+        });
     },
     // 搜索按钮操作
     handleQuery() {
-      this.queryParams.page = 1
-      this.getList()
+        this.queryParams.page = 1;
+        this.getList();
     },
     // 重置按钮操作
     resetQuery() {
-      this.resetForm('queryForm')
-      this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
-      this.handleQuery()
+        this.resetForm('queryForm');
+        this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
+        this.handleQuery();
     },
     // 状态修改
     handleStatusChange(row) {
-      let text = row.status == 'A' ? '启用' : '禁用'
-      this.$modal
-        .confirm('确认要' + text + '"' + row.code + '"桌码吗?')
-        .then(function () {
-          return updateTableStatus(row.id, row.status)
-        })
-        .then(() => {
-          this.$modal.msgSuccess(text + '成功')
-        })
-        .catch(function () {
-          row.status = row.status === 'N' ? 'A' : 'N'
-        })
+        let text = row.status === 'A' ? this.$t('tableManagement.enable') : this.$t('tableManagement.disable');
+        const confirmMsg = this.$t('tableManagement.confirmChangeTableStatus', { action: text, tableCode: row.code });
+        this.$modal
+           .confirm(confirmMsg)
+           .then(() => {
+                return updateTableStatus(row.id, row.status);
+            })
+           .then(() => {
+                const successMsg = this.$t('tableManagement.statusChangeSuccess', { action: text });
+                this.$modal.msgSuccess(successMsg);
+            })
+           .catch(() => {
+                row.status = row.status === 'N' ? 'A' : 'N';
+            });
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.operId)
-      this.multiple = !selection.length
+        this.ids = selection.map((item) => item.operId);
+        this.multiple = !selection.length;
     },
     // 排序触发事件
     handleSortChange(column, prop, order) {
-      this.queryParams.orderByColumn = column.prop
-      this.queryParams.isAsc = column.order
-      this.getList()
+        this.queryParams.orderByColumn = column.prop;
+        this.queryParams.isAsc = column.order;
+        this.getList();
     },
     // 新增按钮操作
     handleAdd() {
-      this.reset()
-      this.open = true
-      this.title = '新增桌码'
+        this.reset();
+        this.open = true;
+        this.title = this.$t('tableManagement.addNewTableCode');
     },
     // 表单重置
     reset() {
-      this.form = {
-        id: '',
-        code: '',
-        description: '',
-        storeId: '',
-        maxPeople: 0,
-        sort: 0,
-        status: 'A'
-      }
-      this.resetForm('form')
+        this.form = {
+            id: '',
+            code: '',
+            description: '',
+            storeId: '',
+            maxPeople: 0,
+            sort: 0,
+            status: 'A'
+        };
+        this.resetForm('form');
     },
     // 取消按钮
     cancel() {
-      this.open = false
-      this.reset()
+        this.open = false;
+        this.reset();
     },
     // 提交按钮
     submitForm: function () {
-      this.$refs['form'].validate((valid) => {
-        if (valid) {
-          if (this.form.id) {
-            saveTable(this.form).then((response) => {
-              this.$modal.msgSuccess('修改成功')
-              this.open = false
-              this.getList()
-            })
-          } else {
-            saveTable(this.form).then((response) => {
-              this.$modal.msgSuccess('新增成功')
-              this.open = false
-              this.getList()
-            })
-          }
-        }
-      })
+        this.$refs['form'].validate((valid) => {
+            if (valid) {
+                if (this.form.id) {
+                    saveTable(this.form).then((response) => {
+                        this.$modal.msgSuccess(this.$t('tableManagement.modifySuccess'));
+                        this.open = false;
+                        this.getList();
+                    });
+                } else {
+                    saveTable(this.form).then((response) => {
+                        this.$modal.msgSuccess(this.$t('tableManagement.addSuccess'));
+                        this.open = false;
+                        this.getList();
+                    });
+                }
+            }
+        });
     },
     // 二维码
     handleQrCode(row) {
-      this.qr = { page: '/pages/category/index', type: 'table', id: row.id }
-      this.openQrCode = true
+        this.qr = { page: '/pages/category/index', type: 'table', id: row.id };
+        this.openQrCode = true;
     },
     // 关闭二维码
     closeDialog() {
-      this.openQrCode = false
+        this.openQrCode = false;
     },
     // 修改按钮操作
     handleUpdate(row) {
-      this.reset()
-      const id = row.id || this.ids
-      getTableInfo(id).then((response) => {
-        this.form = response.data.tableInfo
-        this.open = true
-        this.title = '编辑桌码'
-      })
+        this.reset();
+        const id = row.id || this.ids;
+        getTableInfo(id).then((response) => {
+            this.form = response.data.tableInfo;
+            this.open = true;
+            this.title = this.$t('tableManagement.editTableCode');
+        });
     },
     // 删除按钮操作
     handleDelete(row) {
-      const code = row.code || this.id
-      this.$modal
-        .confirm('是否确认删除"' + code + '"的数据项?')
-        .then(function () {
-          return updateTableStatus(row.id, 'D')
-        })
-        .then(() => {
-          this.getList()
-          this.$modal.msgSuccess('删除成功')
-        })
-        .catch(() => {})
+        const code = row.code || this.id;
+        const confirmMsg = this.$t('tableManagement.confirmDeleteTableCode', { tableCode: code });
+        this.$modal
+           .confirm(confirmMsg)
+           .then(() => {
+                return updateTableStatus(row.id, 'D');
+            })
+           .then(() => {
+                this.getList();
+                this.$modal.msgSuccess(this.$t('tableManagement.deleteSuccess'));
+            })
+           .catch(() => {});
     }
   }
 }