Browse Source

fix: 1.点餐历程的多语言

suwenjiang 1 month ago
parent
commit
716e604296

+ 106 - 2
src/renderer/i18n/languages/en.json

@@ -29,5 +29,109 @@
     "openNewWindow": "Open new window",
     "openDocument": "Open document",
     "changeLanguage": "Change language"
-  }
-}
+  },
+  "ding-dan-da-yin-yu-lan": "Order Print Preview",
+  "zhuo-ma": "Table Code",
+  "dan-hao": "Order Number",
+  "hui-yuan-ming-cheng": "Member Name",
+  "hui-yuan-hao-ma": "Member Number",
+  "hui-yuan-xin-xi": "Member Information",
+  "wu": "None",
+  "shou-huo-ren-ming": "Recipient Name",
+  "lian-xi-dian-hua": "Contact Phone",
+  "xiang-xi-di-zhi": "Detailed Address",
+  "ding-dan-lei-xing": "Order Type",
+  "ding-dan-shi-jian": "Order Time",
+  "you-hui-jin-e": "Discount Amount",
+  "ying-shou-jin-e": "Receivable Amount",
+  "da-yin": "Print",
+  "qu-xiao": "Cancel",
+  "wu-shang-pin-shou-kuan": "Non-commodity payment collection",
+  "shou-kuan-jin-e": "Payment amount:",
+  "qing-shu-ru-shou-kuan-jin-e": "Please enter the payment amount",
+  "dan-wei": "Unit",
+  "bei-zhu-xin-xi": "Remarks:",
+  "qing-shu-ru-bei-zhu-xin-xi": "Please enter remarks",
+  "que-ding-shou-kuan": "Confirm payment collection",
+  "jin-e-bu-neng-wei-kong": "The amount cannot be empty",
+  "qing-shu-ru-1-10-wei-shu-zi": "Please enter a 1 - 10 digit number",
+  "zhi-fu-jie-suan": "Payment Settlement",
+  "xuan-ze-qia-quan": "Select Coupons",
+  "zan-wu-ke-yong-qia-quan": "No available coupons",
+  "qing-xuan-ze-zhi-fu-fang-shi": "Please select a payment method",
+  "xian-jin-zhi-fu": "Cash Payment",
+  "yu-e-zhi-fu": "Balance Payment",
+  "wei-xin-zhi-fu": "WeChat Payment",
+  "zhi-fu-bao-zhi-fu": "Alipay Payment",
+  "jie-suan-xin-xi": "Settlement Information",
+  "ke-yong-ka-quan": "Available Coupons",
+  "qing-xuan-ze-ka-quan": "Please select a coupon",
+  "zhe-kou-zhe": "Discounter",
+  "qing-shu-ru-zhe-kou": "Please enter the discount",
+  "li-jian": "Immediate Discount",
+  "yuan": "Yuan",
+  "qing-shu-ru-li-jian-jin-e": "Please enter the immediate discount amount",
+  "ying-fu-jin-e": "Payable Amount",
+  "shou-ji-hao": "Phone Number",
+  "hui-yuan-hao": "Member Number",
+  "ke-yong-yu-e": "Available Balance",
+  "ke-yong-ji-fen": "Available Points",
+  "zan-wu": "Not available",
+  "chong-xin-xuan-ze": "Re-select",
+  "dang-qian-wei-you-ke": "Currently a guest",
+  "guan-lian-hui-yuan": "Associate with a member",
+  "yi-guan-lian": "Associated",
+  "guan-lian-yuan-gong": "Associate with an employee",
+  "yu-e-zhi-fu-xu-guan-lian-hui-yuan-xin-xi": "You need to associate member information for balance payment!",
+  "qing-xian-guan-lian-hui-yuan-xin-xi": "Please associate member information first!",
+  "que-ding-shi-yong-gai-qia-quan-ma": "Are you sure you want to use this coupon?",
+  "qing-xian-xuan-ze-zhi-fu-fang-shi": "Please select a payment method first!",
+  "shou-yin-zhu-ye": "Cashier Homepage",
+  "ding-dan-guan-li": "Order Management",
+  "tui-chu": "Exit",
+  "qing-dian-ji-que-ding-shou-kuan": "Please click to confirm the payment collection!",
+  "que-ding-zhu-xiao-bing-tui-chu-xi-tong-ma": "Are you sure you want to log out and exit the system?",
+  "ti-shi": "Prompt",
+  "que-ding": "Confirm",
+  "tui-chu-cheng-gong": "Logged out successfully",
+  "bao-qian-wei-cha-xun-dao-shang-pin-xin-xi": "Sorry, no product information was found!",
+  "qing-xian-que-ren-shang-pin-gui-ge": "Please confirm the product specifications first!",
+  "ci-cao-zuo-jiang-qing-kong-shi-fou-ji-xu": "This operation will clear the data. Are you sure you want to continue?",
+  "shan-chu-cheng-gong": "Deleted successfully!",
+  "yi-qu-xiao-shan-chu": "Deletion cancelled",
+  "qing-xian-tian-jia-jie-suan-shang-pin": "Please add settlement products first!",
+  "bao-qian-ding-dan-cao-zuo-yi-chang": "Sorry, there was an error with the order operation!",
+  "huan-ying-shi-yong": "Welcome to use",
+  "cashierDesk": "Cashier Desk",
+  "hello": "Hello",
+  "zong-jian-shu": "Total quantity",
+  "zong-jin-e": "Total amount",
+  "gua-dan": "Hang order",
+  "qu-dan": "Retrieve order",
+  "ti-jiao-jie-suan": "Submit settlement",
+  "cha-xun-shang-pin": "Search for products",
+  "jia-ru-jie-suan": "Add to settlement",
+  "xiu-gai": "Modify",
+  "fa-huo": "Ship",
+  "geng-duo": "More",
+  "cha-kan-xiang-qing": "View details",
+  "da-yin-xiao-piao": "Print receipt",
+  "gua-dan-lie-biao": "List of hanging orders",
+  "ti-shi-qing-xuan-ze-yi-ge-kong-bai-wei-zhi-gua-dan": "Prompt: Please select an empty position to hang the order",
+  "jian-shu": "Quantity",
+  "jin-e": "Amount",
+  "kong-bai-wei-zhi": "Empty position",
+  "close": "Close",
+  "zan-wu-jie-suan-shang-pin": "No settlement products available",
+  "searchTips": "Please enter product keywords: product name, barcode, product ID",
+  "all": "All",
+  "zan-wu-shang-pin": "No products available",
+  "xuan-ze-shang-pin-gui-ge": "Select product specifications",
+  "xian-jin-zhi-fu-0": "Cash payment",
+  "qing-shu-ru-li-jian-jin-e-0": "Please enter the immediate discount amount",
+  "zhi-fu-jie-guo": "Payment result",
+  "zhi-fu-cheng-gong": "Payment successful",
+  "zhi-fu-shi-bai": "Payment failed",
+  "zheng-zai-zhi-fu-zhong": "Payment in progress",
+  "que-ren": "Confirm"
+}

+ 102 - 1
src/renderer/i18n/languages/zh-CN.json

@@ -29,5 +29,106 @@
     "openNewWindow": "打开新窗口",
     "openDocument": "打开文档",
     "changeLanguage": "切换语言"
-  }
+  },
+  "huan-ying-shi-yong": "欢迎使用",
+  "cashierDesk": "收银台",
+  "hello": "您好",
+  "zong-jian-shu": "总件数",
+  "zong-jin-e": "总金额",
+  "gua-dan": "挂单",
+  "qu-dan": "取单",
+  "ti-jiao-jie-suan": "提交结算",
+  "wu-shang-pin-shou-kuan": "无商品收款",
+  "cha-xun-shang-pin": "查询商品",
+  "jia-ru-jie-suan": "加入结算",
+  "qu-xiao": "取 消",
+  "xiu-gai": "修改",
+  "fa-huo": "发货",
+  "geng-duo": "更多",
+  "cha-kan-xiang-qing": "查看详情",
+  "da-yin-xiao-piao": "打印小票",
+  "que-ding": "确 定",
+  "gua-dan-lie-biao": "挂单列表",
+  "ti-shi-qing-xuan-ze-yi-ge-kong-bai-wei-zhi-gua-dan": "提示:请选择一个空白位置挂单",
+  "jian-shu": "件数",
+  "jin-e": "金额",
+  "kong-bai-wei-zhi": "空白位置",
+  "close": "关闭",
+  "zan-wu-jie-suan-shang-pin": "暂无结算商品",
+  "searchTips": "请输入商品关键字:商品名称、条码、商品ID",
+  "all": "全部",
+  "zan-wu-shang-pin": "暂无商品",
+  "xuan-ze-shang-pin-gui-ge": "选择商品规格",
+  "xian-jin-zhi-fu": "现金支付",
+  "xian-jin-zhi-fu-0": "现金支付",
+  "jie-suan-xin-xi": "结算信息",
+  "ke-yong-ka-quan": "可用卡券",
+  "qing-xuan-ze-ka-quan": "请选择卡券",
+  "bei-zhu-xin-xi": "备注信息",
+  "zhe-kou-zhe": "折扣:(折)",
+  "li-jian": "立减",
+  "yuan": "元",
+  "qing-shu-ru-li-jian-jin-e": "请输入立减金额",
+  "qing-shu-ru-li-jian-jin-e-0": "请输入立减金额",
+  "you-hui-jin-e": "优惠金额",
+  "ying-fu-jin-e": "应付金额",
+  "hui-yuan-xin-xi": "会员信息",
+  "que-ding-shou-kuan": "确定收款",
+  "zhi-fu-jie-guo": "支付结果",
+  "zhi-fu-cheng-gong": "支付成功",
+  "zhi-fu-shi-bai": "支付失败",
+  "zheng-zai-zhi-fu-zhong": "正在支付中",
+  "que-ren": "确 认",
+  "ding-dan-da-yin-yu-lan": "订单打印预览",
+  "zhuo-ma": "桌码",
+  "dan-hao": "单号",
+  "hui-yuan-ming-cheng": "会员名称",
+  "hui-yuan-hao-ma": "会员号码",
+  "wu": "无",
+  "shou-huo-ren-ming": "收货人名",
+  "lian-xi-dian-hua": "联系电话",
+  "xiang-xi-di-zhi": "详细地址",
+  "ding-dan-lei-xing": "订单类型",
+  "ding-dan-shi-jian": "订单时间",
+  "ying-shou-jin-e": "应收金额",
+  "da-yin": "打印",
+  "shou-kuan-jin-e": "收款金额:",
+  "qing-shu-ru-shou-kuan-jin-e": "请输入收款金额",
+  "dan-wei": "单位",
+  "qing-shu-ru-bei-zhu-xin-xi": "请输入备注信息",
+  "jin-e-bu-neng-wei-kong": "金额不能为空",
+  "qing-shu-ru-1-10-wei-shu-zi": "请输入1 - 10位数字",
+  "zhi-fu-jie-suan": "支付结算",
+  "xuan-ze-qia-quan": "选择卡券",
+  "zan-wu-ke-yong-qia-quan": "暂无可用卡券",
+  "qing-xuan-ze-zhi-fu-fang-shi": "请选择支付方式",
+  "yu-e-zhi-fu": "余额支付",
+  "wei-xin-zhi-fu": "微信支付",
+  "zhi-fu-bao-zhi-fu": "支付宝支付",
+  "ke-yong-yu-e": "可用余额",
+  "ke-yong-ji-fen": "可用积分",
+  "zan-wu": "暂无",
+  "chong-xin-xuan-ze": "重新选择",
+  "dang-qian-wei-you-ke": "当前为游客",
+  "guan-lian-hui-yuan": "关联会员",
+  "yi-guan-lian": "已关联",
+  "guan-lian-yuan-gong": "关联员工",
+  "yu-e-zhi-fu-xu-guan-lian-hui-yuan-xin-xi": "余额支付需关联会员信息!",
+  "qing-xian-guan-lian-hui-yuan-xin-xi": "请先关联会员信息!",
+  "que-ding-shi-yong-gai-qia-quan-ma": "确定使用该卡券吗?",
+  "qing-xian-xuan-ze-zhi-fu-fang-shi": "请先选择支付方式!",
+  "shou-yin-zhu-ye": "收银主页",
+  "ding-dan-guan-li": "订单管理",
+  "tui-chu": "退出",
+  "qing-dian-ji-que-ding-shou-kuan": "请点击确定收款!",
+  "que-ding-zhu-xiao-bing-tui-chu-xi-tong-ma": "确定注销并退出系统吗?",
+  "ti-shi": "提示",
+  "tui-chu-cheng-gong": "退出成功",
+  "bao-qian-wei-cha-xun-dao-shang-pin-xin-xi": "抱歉,未查询到商品信息!",
+  "qing-xian-que-ren-shang-pin-gui-ge": "请先确认商品规格!",
+  "ci-cao-zuo-jiang-qing-kong-shi-fou-ji-xu": "此操作将清空, 是否继续?",
+  "shan-chu-cheng-gong": "删除成功!",
+  "yi-qu-xiao-shan-chu": "已取消删除",
+  "qing-xian-tian-jia-jie-suan-shang-pin": "请先添加结算商品!",
+  "bao-qian-ding-dan-cao-zuo-yi-chang": "抱歉,订单操作异常!"
 }

+ 10 - 6
src/renderer/views/cashier/components/hangUpDialog.vue

@@ -1,13 +1,17 @@
 <template>
   <el-dialog
     class="common-dialog"
-    title="挂单列表"
+    :title="$t('gua-dan-lie-biao')"
     :visible="showDialog"
     @close="close"
     width="1000px"
     destroy-on-close
   >
-    <el-alert title="提示:请选择一个空白位置挂单" type="warning" :closable="false"></el-alert>
+    <el-alert
+      :title="$t('ti-shi-qing-xuan-ze-yi-ge-kong-bai-wei-zhi-gua-dan')"
+      type="warning"
+      :closable="false"
+    ></el-alert>
     <div class="order-list">
       <div class="order-item" v-for="orderInfo in orderList">
         <div class="info" v-if="!orderInfo.isEmpty">
@@ -23,8 +27,8 @@
             <!-- <div class="item">
               会员:{{ orderInfo.memberInfo ? orderInfo.memberInfo.name : '游客' }}
             </div> -->
-            <div class="item">件数:{{ orderInfo.num }}</div>
-            <div class="item">金额:¥{{ orderInfo.amount }}</div>
+            <div class="item">{{ $t('jian-shu') }}:{{ orderInfo.num }}</div>
+            <div class="item">{{ $t('jin-e') }}:¥{{ orderInfo.amount }}</div>
             <div class="item time">{{ orderInfo.dateTime }}</div>
           </div>
         </div>
@@ -33,13 +37,13 @@
             {{ orderInfo.hangNo }}
             <span @click="remove(orderInfo.hangNo)" class="remove el-icon-delete"></span>
           </div>
-          <div class="tips">空白位置</div>
+          <div class="tips">{{ $t('kong-bai-wei-zhi') }}</div>
         </div>
       </div>
     </div>
     <div class="clearfix"></div>
     <div slot="footer" class="dialog-footer">
-      <el-button type="primary" class="main-button" @click="close()">关闭</el-button>
+      <el-button type="primary" class="main-button" @click="close()">{{ $t('close') }}</el-button>
     </div>
   </el-dialog>
 </template>

+ 56 - 32
src/renderer/views/cashier/components/noGoodsCashier.vue

@@ -1,80 +1,104 @@
 <template>
   <!-- 积分变更对话框 -->
-  <el-dialog title="无商品收款" :visible.sync="showDialog" class="common-dialog" width="700px" @close="close" destroy-on-close>
+  <el-dialog
+    :title="$t('wu-shang-pin-shou-kuan')"
+    :visible.sync="showDialog"
+    class="common-dialog"
+    width="700px"
+    @close="close"
+    destroy-on-close
+  >
     <el-form ref="form" :model="form" :rules="rules" label-width="120px">
       <el-row>
         <el-col :span="24">
-          <el-form-item label="收款金额:" prop="amount">
-            <el-input v-model="form.amount" placeholder="请输入收款金额" style="width: 200px" maxlength="150" />
-            <div class="form-tips">( 单位:元 )</div>
+          <el-form-item :label="$t('shou-kuan-jin-e')" prop="amount">
+            <el-input
+              v-model="form.amount"
+              :placeholder="$t('qing-shu-ru-shou-kuan-jin-e')"
+              style="width: 200px"
+              maxlength="150"
+            />
+            <div class="form-tips">( {{ $t('dan-wei') }} : {{ $t('yuan') }} )</div>
           </el-form-item>
         </el-col>
       </el-row>
       <el-row>
         <el-col :span="24">
-          <el-form-item class="recharge-item" prop="remark" label="备注信息:">
-            <el-input v-model="form.remark" type="textarea" rows="3" placeholder="请输入备注信息" maxlength="255" />
+          <el-form-item class="recharge-item" :label="$t('bei-zhu-xin-xi')" prop="remark">
+            <el-input
+              v-model="form.remark"
+              type="textarea"
+              rows="3"
+              :placeholder="$t('qing-shu-ru-bei-zhu-xin-xi')"
+              maxlength="255"
+            />
           </el-form-item>
         </el-col>
       </el-row>
     </el-form>
     <div slot="footer" class="dialog-footer">
-      <el-button type="primary" class="main-button" @click="submitForm">确定收款</el-button>
-      <el-button @click="close">取消</el-button>
+      <el-button type="primary" class="main-button" @click="submitForm">
+        {{ $t('que-ding-shou-kuan') }}
+      </el-button>
+      <el-button @click="close">{{ $t('qu-xiao') }}</el-button>
     </div>
   </el-dialog>
 </template>
 
 <script>
 export default {
-  name: "noGoodsCashier",
+  name: 'noGoodsCashier',
   props: {
-    showDialog:{
-      type:[Boolean],
-      default:()=>false
-    }
+    showDialog: {
+      type: [Boolean],
+      default: () => false,
+    },
   },
   data() {
     return {
       // 遮罩层
       loading: false,
       // 表单参数
-      form: {  amount: '', remark: '' },
+      form: { amount: '', remark: '' },
       // 表单校验
       rules: {
         amount: [
-          { required: true, message: "金额不能为空", trigger: "blur" },
-          { pattern: /^[0-9]{1,10}$/, message: `请输入1-10位数字`, trigger: 'blur' }
-        ]
-      }
-    };
+          { required: true, message: this.$t('jin-e-bu-neng-wei-kong'), trigger: 'blur' },
+          {
+            pattern: /^[0-9]{1,10}$/,
+            message: this.$t('qing-shu-ru-1-10-wei-shu-zi'),
+            trigger: 'blur',
+          },
+        ],
+      },
+    }
   },
   watch: {
     showDialog(value) {
       if (value) {
-          this.form.amount = '';
-          this.form.remark = '';
+        this.form.amount = ''
+        this.form.remark = ''
       }
-    }
+    },
   },
   methods: {
     // 取消按钮
     close() {
-      this.$emit('closeDialog', 'openNoGoodsCashierDialog');
+      this.$emit('closeDialog', 'openNoGoodsCashierDialog')
     },
     // 重置表单
     reset() {
-      this.form.amount = '';
-      this.form.remark = '';
+      this.form.amount = ''
+      this.form.remark = ''
     },
     // 提交按钮
-    submitForm: function() {
-      this.$refs["form"].validate(valid => {
+    submitForm: function () {
+      this.$refs['form'].validate((valid) => {
         if (valid) {
-            this.$emit('submit', this.form);
+          this.$emit('submit', this.form)
         }
-      });
-    }
-  }
-};
+      })
+    },
+  },
+}
 </script>

File diff suppressed because it is too large
+ 485 - 328
src/renderer/views/cashier/components/orderList.vue


+ 200 - 152
src/renderer/views/cashier/components/orderPrintDialog.vue

@@ -1,127 +1,175 @@
 <template>
-    <el-dialog class="common-dialog" title="订单打印预览" :visible="showDialog" width="380px" @close="cancel" append-to-body destroy-on-close>
-        <div v-if="orderInfo.id" class="print-area" id="printArea">
-            <div class="base-info">
-                <div class="name" v-if="storeInfo">{{ storeInfo.name }}</div>
-                <div class="table" v-if="orderInfo.tableInfo"><span>桌码:</span>{{ orderInfo.tableInfo.code }}</div>
-                <div class="no"><span>单号:</span>{{ orderInfo.orderSn }}</div>
-            </div>
-            <div>****************************************</div>
-            <div class="goods-list" v-if="orderInfo.goods.length > 0">
-              <div class="goods-item" v-for="(goodsInfo, index) in orderInfo.goods">
-                <span class="item">{{ index+1 }}.{{ goodsInfo.name }}</span>
-                <span class="item">x{{ goodsInfo.num }}</span>
-                <span class="item">¥{{ goodsInfo.price }}</span>
-              </div>
-            </div>
-            <div v-if="orderInfo.goods.length > 0">****************************************</div>
-            <div class="member-info">
-              <div class="item" v-if="orderInfo.isVisitor == 'N'"><span class="t">会员名称:</span>{{ orderInfo.userInfo.name }}</div>
-              <div class="item" v-if="orderInfo.isVisitor == 'N'"><span class="t">会员号码:</span>{{ orderInfo.userInfo.userNo ? orderInfo.userInfo.userNo : '-' }}</div>
-              <div class="item" v-if="orderInfo.isVisitor == 'Y'"><span class="t">会员信息:</span>无</div>
-            </div>
-            <div v-if="orderInfo.orderMode == 'express' && orderInfo.address">****************************************</div>
-            <div class="address-info" v-if="orderInfo.orderMode == 'express' && orderInfo.address">
-              <div class="item">收货人名:{{ orderInfo.address.name ? orderInfo.address.name : '-' }}</div>
-              <div class="item">联系电话:{{ orderInfo.address.mobile ? orderInfo.address.mobile : '无' }}</div>
-              <div class="item">详细地址:{{orderInfo.address.provinceName}}{{orderInfo.address.cityName}}{{orderInfo.address.regionName}}{{orderInfo.address.detail}}</div>
-            </div>
-            <div>****************************************</div>
-            <div class="total-info">
-              <div class="item">订单类型:{{ orderInfo.typeName }}</div>
-              <div class="item">订单时间:{{ orderInfo.createTime }}</div>
-              <div class="item">优惠金额:<span class="discount">¥{{ orderInfo.discount.toFixed(2) }}</span></div>
-              <div class="item">应收金额:<span class="amount">¥{{ orderInfo.payAmount.toFixed(2) }}</span></div>
-            </div>
+  <el-dialog
+    class="common-dialog"
+    :title="$t('ding-dan-da-yin-yu-lan')"
+    :visible="showDialog"
+    width="380px"
+    @close="cancel"
+    append-to-body
+    destroy-on-close
+  >
+    <div v-if="orderInfo.id" class="print-area" id="printArea">
+      <div class="base-info">
+        <div class="name" v-if="storeInfo">{{ storeInfo.name }}</div>
+        <div class="table" v-if="orderInfo.tableInfo">
+          <span>{{ $t('zhuo-ma') }}:</span>
+          {{ orderInfo.tableInfo.code }}
         </div>
-        <div slot="footer" class="dialog-footer">
-            <el-button type="primary" class="main-button" @click="handlePrint(printObj)" v-print="printObj">打印</el-button>
-            <el-button @click="cancel()">取消</el-button>
+        <div class="no">
+          <span>{{ $t('dan-hao') }}:</span>
+          {{ orderInfo.orderSn }}
         </div>
-    </el-dialog>
+      </div>
+      <div>****************************************</div>
+      <div class="goods-list" v-if="orderInfo.goods.length > 0">
+        <div class="goods-item" v-for="(goodsInfo, index) in orderInfo.goods">
+          <span class="item">{{ index + 1 }}.{{ goodsInfo.name }}</span>
+          <span class="item">x{{ goodsInfo.num }}</span>
+          <span class="item">¥{{ goodsInfo.price }}</span>
+        </div>
+      </div>
+      <div v-if="orderInfo.goods.length > 0">****************************************</div>
+      <div class="member-info">
+        <div class="item" v-if="orderInfo.isVisitor == 'N'">
+          <span class="t">{{ $t('hui-yuan-ming-cheng') }}:</span>
+          {{ orderInfo.userInfo.name }}
+        </div>
+        <div class="item" v-if="orderInfo.isVisitor == 'N'">
+          <span class="t">{{ $t('hui-yuan-hao-ma') }}:</span>
+          {{ orderInfo.userInfo.userNo ? orderInfo.userInfo.userNo : '-' }}
+        </div>
+        <div class="item" v-if="orderInfo.isVisitor == 'Y'">
+          <span class="t">{{ $t('hui-yuan-xin-xi') }}:</span>
+          {{ $t('wu') }}
+        </div>
+      </div>
+      <div v-if="orderInfo.orderMode == 'express' && orderInfo.address">
+        ****************************************
+      </div>
+      <div class="address-info" v-if="orderInfo.orderMode == 'express' && orderInfo.address">
+        <div class="item">
+          {{ $t('shou-huo-ren-ming') }}:{{ orderInfo.address.name ? orderInfo.address.name : '-' }}
+        </div>
+        <div class="item">
+          {{ $t('lian-xi-dian-hua') }}:{{
+            orderInfo.address.mobile ? orderInfo.address.mobile : $t('wu')
+          }}
+        </div>
+        <div class="item">
+          {{ $t('xiang-xi-di-zhi') }}:{{ orderInfo.address.provinceName
+          }}{{ orderInfo.address.cityName }}{{ orderInfo.address.regionName
+          }}{{ orderInfo.address.detail }}
+        </div>
+      </div>
+      <div>****************************************</div>
+      <div class="total-info">
+        <div class="item">{{ $t('ding-dan-lei-xing') }}:{{ orderInfo.typeName }}</div>
+        <div class="item">{{ $t('ding-dan-shi-jian') }}:{{ orderInfo.createTime }}</div>
+        <div class="item">
+          {{ $t('you-hui-jin-e') }}:
+          <span class="discount">¥{{ orderInfo.discount.toFixed(2) }}</span>
+        </div>
+        <div class="item">
+          {{ $t('ying-shou-jin-e') }}:
+          <span class="amount">¥{{ orderInfo.payAmount.toFixed(2) }}</span>
+        </div>
+      </div>
+    </div>
+    <div slot="footer" class="dialog-footer">
+      <el-button
+        type="primary"
+        class="main-button"
+        @click="handlePrint(printObj)"
+        v-print="printObj"
+      >
+        {{ $t('da-yin') }}
+      </el-button>
+      <el-button @click="cancel()">{{ $t('qu-xiao') }}</el-button>
+    </div>
+  </el-dialog>
 </template>
 <script>
 export default {
-    props: {
-      showDialog: {
-        type:[Boolean],
-        default:()=>false
-      },
-      orderInfo: {
-        type:[Object],
-        default:()=>{}
-      },
-      storeInfo: {
-        type:[Object],
-        default:()=>{}
-      }
+  props: {
+    showDialog: {
+      type: [Boolean],
+      default: () => false,
     },
-    data(){
-        return {
-          printObj: {
-            id: "printArea",
-            popTitle: '订单明细',
-            extraCss: '',
-            preview: false,
-            previewTitle: '预览的标题',
-            previewPrintBtnLabel: '预览结束,开始打印',
-            extraHead: '',
-            standard: 'loose'
-          }
-        }
+    orderInfo: {
+      type: [Object],
+      default: () => {},
     },
-    methods: {
-        handlePrint() {
-           this.$emit('closeDialog', 'printOrder');
-        },
-        cancel() {
-           this.$emit('closeDialog', 'printOrder');
-        }
+    storeInfo: {
+      type: [Object],
+      default: () => {},
+    },
+  },
+  data() {
+    return {
+      printObj: {
+        id: 'printArea',
+        popTitle: '订单明细',
+        extraCss: '',
+        preview: false,
+        previewTitle: '预览的标题',
+        previewPrintBtnLabel: '预览结束,开始打印',
+        extraHead: '',
+        standard: 'loose',
+      },
     }
+  },
+  methods: {
+    handlePrint() {
+      this.$emit('closeDialog', 'printOrder')
+    },
+    cancel() {
+      this.$emit('closeDialog', 'printOrder')
+    },
+  },
 }
 </script>
 <style scoped lang="scss">
-   .print-area {
-      font-size: 14px;
-      border: solid 1px #ccc;
-      padding: 30px 10px 30px 10px;
-      overflow: scroll;
-      width: 100%;
-      .base-info {
-          margin-bottom: 10px;
-         .name {
-           font-weight: bold;
-           margin-bottom: 5px;
-         }
-      }
-      .goods-list {
-         margin-top: 10px;
-         margin-bottom: 15px;
-         .goods-item {
-            margin-bottom: 10px;
-         }
-      }
-      .member-info {
-         margin-top: 10px;
-         margin-bottom: 20px;
-         .item {
-            clear: both;
-         }
-      }
-      .address-info {
-         margin-top: 10px;
-         margin-bottom: 20px;
-      }
-      .total-info {
-         .item {
-            margin-bottom: 2px;
-           .amount {
-             font-weight: bold;
-             font-size: 28px;
-           }
-         }
+.print-area {
+  font-size: 14px;
+  border: solid 1px #ccc;
+  padding: 30px 10px 30px 10px;
+  overflow: scroll;
+  width: 100%;
+  .base-info {
+    margin-bottom: 10px;
+    .name {
+      font-weight: bold;
+      margin-bottom: 5px;
+    }
+  }
+  .goods-list {
+    margin-top: 10px;
+    margin-bottom: 15px;
+    .goods-item {
+      margin-bottom: 10px;
+    }
+  }
+  .member-info {
+    margin-top: 10px;
+    margin-bottom: 20px;
+    .item {
+      clear: both;
+    }
+  }
+  .address-info {
+    margin-top: 10px;
+    margin-bottom: 20px;
+  }
+  .total-info {
+    .item {
+      margin-bottom: 2px;
+      .amount {
+        font-weight: bold;
+        font-size: 28px;
       }
-   }
+    }
+  }
+}
 </style>
 <style media="print" lang="scss">
 @page {
@@ -135,51 +183,51 @@ export default {
     margin: 0px;
   }
   body {
-     border: solid 1px #ffffff;
+    border: solid 1px #ffffff;
   }
   #printArea {
-     font-size: 14px;
-     display: block;
-     min-width: 320px;
-     min-height: 420px;
-     margin-top: 60px;
-     .base-info {
-       margin-bottom: 10px;
-       .name {
+    font-size: 14px;
+    display: block;
+    min-width: 320px;
+    min-height: 420px;
+    margin-top: 60px;
+    .base-info {
+      margin-bottom: 10px;
+      .name {
+        font-weight: bold;
+        margin-bottom: 5px;
+      }
+    }
+    .goods-list {
+      margin-bottom: 20px;
+      .goods-item {
+        margin-bottom: 50px;
+        .item {
+          margin-right: 10px;
+          margin-bottom: 10px;
+        }
+      }
+    }
+    .member-info {
+      margin-top: 20px;
+      margin-bottom: 20px;
+      margin-top: 10px;
+      margin-bottom: 20px;
+      .item {
+        clear: both;
+      }
+    }
+    .total-info {
+      margin-top: 20px;
+      margin-bottom: 60px;
+      .item {
+        margin-bottom: 2px;
+        .amount {
           font-weight: bold;
-          margin-bottom: 5px;
-       }
-     }
-     .goods-list {
-        margin-bottom: 20px;
-        .goods-item {
-           margin-bottom: 50px;
-           .item {
-              margin-right: 10px;
-              margin-bottom: 10px;
-           }
+          font-size: 28px;
         }
-     }
-     .member-info {
-       margin-top: 20px;
-       margin-bottom: 20px;
-       margin-top: 10px;
-       margin-bottom: 20px;
-       .item {
-          clear: both;
-       }
-     }
-     .total-info {
-         margin-top: 20px;
-         margin-bottom: 60px;
-         .item {
-           margin-bottom: 2px;
-           .amount {
-             font-weight: bold;
-             font-size: 28px;
-           }
-         }
-     }
+      }
+    }
   }
 }
 </style>

+ 141 - 62
src/renderer/views/cashier/components/payResultDialog.vue

@@ -1,74 +1,153 @@
 <template>
-    <el-dialog class="common-dialog" title="支付结果" :visible="showDialog" @close="submit" width="580px" destroy-on-close>
-          <el-row>
-            <el-col :span="24">
-              <div class="main">
-                <div class="success" v-if="payResult.isSuccess">
-                  <svg t="1666918162017" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1190" width="48" height="48"><path d="M511.2879 0C229.296245 0 0 229.296245 0 511.2879s229.296245 511.2879 511.2879 511.2879 511.2879-229.296245 511.2879-511.2879S793.279555 0 511.2879 0z m0 995.515994C244.962448 995.515994 28.484006 777.613352 28.484006 511.2879S244.962448 28.484006 511.2879 28.484006s482.803894 216.478442 482.803894 482.803894c1.4242 266.325452-216.478442 484.228095-482.803894 484.228094z m215.054242-655.132128l37.029207 37.029208-283.415855 327.566064-42.726009 49.847009-38.453407-49.847009-138.147427-182.297636 37.029207-37.029207 139.571627 105.39082L726.342142 340.383866z" p-id="1191" fill="#ff5b57"></path></svg>
-                  <div class="txt">支付成功</div>
-                </div>
-                <div class="fail" v-if="!payResult.isSuccess && !payResult.isPaying">
-                  <svg t="1666919015577" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2800" width="48" height="48"><path d="M1018.146525 511.98465c0.005117 278.510808-226.653315 503.751921-506.765642 503.603538-279.697876-0.148384-505.875341-226.023964-505.522291-504.84689C6.206526 232.639824 233.417559 7.992245 513.903403 8.416929 792.09186 8.836496 1018.141408 234.579044 1018.146525 511.98465zM512.890301 69.525369c-244.188158-0.281417-445.600919 199.555409-445.703253 442.223914-0.102333 241.634937 200.281977 442.055064 442.648598 442.730465 244.592375 0.680518 446.414471-198.414391 446.982421-440.939629C957.380902 270.56973 756.658892 69.806786 512.890301 69.525369z" p-id="2801" fill="#ff5b57"></path><path d="M769.491511 698.518123c-27.241173 24.841453-50.972308 46.484985-71.561805 65.258062-60.315355-81.416519-120.30836-162.398121-183.079718-247.135362-75.39931 80.541568-136.139349 161.528287-187.423775 251.719902-24.774936-20.44623-48.291171-39.853775-72.92284-60.182321 37.730355-42.309779 74.089442-83.759956 111.221146-124.498916 28.689192-31.477779 57.710968-62.709959 87.878879-92.760186 13.262419-13.211253 11.190166-21.633298-1.361035-33.109999C388.258352 399.295018 324.745076 340.269065 260.812232 281.186829c24.099535-30.817728 28.653375-33.544916 62.300625-9.30723 60.622355 43.675931 119.858092 89.362714 178.213761 136.031899 16.035657 12.822385 25.148454 13.681987 40.344976-0.271184 60.873073-55.899665 126.704202-105.101604 202.456563-143.640394 5.275291 9.12303 9.772848 16.895258 13.380103 23.137601-65.288762 58.033318-129.344406 114.976785-194.346635 172.759386C633.689862 541.46181 701.357877 619.716224 769.491511 698.518123z" p-id="2802" fill="#ff5b57"></path></svg>
-                  <div class="txt">支付失败</div>
-                </div>
-                <div class="fail" v-if="!payResult.isSuccess && payResult.isPaying">
-                  <svg t="1727329936552" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13383" width="48" height="48"><path d="M443.392 178.176m-178.176 0a178.176 178.176 0 1 0 356.352 0 178.176 178.176 0 1 0-356.352 0Z" fill="#ff4949" p-id="13384"></path><path d="M580.608 845.824m-178.176 0a178.176 178.176 0 1 0 356.352 0 178.176 178.176 0 1 0-356.352 0Z" fill="#ff4949" p-id="13385"></path><path d="M845.141333 440.661333m-178.176 0a178.176 178.176 0 1 0 356.352 0 178.176 178.176 0 1 0-356.352 0Z" fill="#ff4949" p-id="13386"></path><path d="M178.858667 583.338667m-178.176 0a178.176 178.176 0 1 0 356.352 0 178.176 178.176 0 1 0-356.352 0Z" fill="#ff4949" p-id="13387"></path></svg>
-                  <div class="txt">正在支付中...</div>
-                </div>
-                <div class="amount-info">
-                  <span>¥<span class="amount">{{ payResult.payAmount.toFixed(2) }}</span></span>
-                </div>
-              </div>
-            </el-col>
-          </el-row>
-        <div slot="footer" class="dialog-footer">
-            <el-button type="danger" class="do-button" @click="printOrder(payResult.orderId)">打印小票</el-button>
-            <el-button type="primary" class="main-button" @click="submit()">确 认</el-button>
+  <el-dialog
+    class="common-dialog"
+    :title="$('zhi-fu-jie-guo')"
+    :visible="showDialog"
+    @close="submit"
+    width="580px"
+    destroy-on-close
+  >
+    <el-row>
+      <el-col :span="24">
+        <div class="main">
+          <div class="success" v-if="payResult.isSuccess">
+            <svg
+              t="1666918162017"
+              class="icon"
+              viewBox="0 0 1024 1024"
+              version="1.1"
+              xmlns="http://www.w3.org/2000/svg"
+              p-id="1190"
+              width="48"
+              height="48"
+            >
+              <path
+                d="M511.2879 0C229.296245 0 0 229.296245 0 511.2879s229.296245 511.2879 511.2879 511.2879 511.2879-229.296245 511.2879-511.2879S793.279555 0 511.2879 0z m0 995.515994C244.962448 995.515994 28.484006 777.613352 28.484006 511.2879S244.962448 28.484006 511.2879 28.484006s482.803894 216.478442 482.803894 482.803894c1.4242 266.325452-216.478442 484.228095-482.803894 484.228094z m215.054242-655.132128l37.029207 37.029208-283.415855 327.566064-42.726009 49.847009-38.453407-49.847009-138.147427-182.297636 37.029207-37.029207 139.571627 105.39082L726.342142 340.383866z"
+                p-id="1191"
+                fill="#ff5b57"
+              ></path>
+            </svg>
+            <div class="txt">{{ $t('zhi-fu-cheng-gong') }}</div>
+          </div>
+          <div class="fail" v-if="!payResult.isSuccess && !payResult.isPaying">
+            <svg
+              t="1666919015577"
+              class="icon"
+              viewBox="0 0 1024 1024"
+              version="1.1"
+              xmlns="http://www.w3.org/2000/svg"
+              p-id="2800"
+              width="48"
+              height="48"
+            >
+              <path
+                d="M1018.146525 511.98465c0.005117 278.510808-226.653315 503.751921-506.765642 503.603538-279.697876-0.148384-505.875341-226.023964-505.522291-504.84689C6.206526 232.639824 233.417559 7.992245 513.903403 8.416929 792.09186 8.836496 1018.141408 234.579044 1018.146525 511.98465zM512.890301 69.525369c-244.188158-0.281417-445.600919 199.555409-445.703253 442.223914-0.102333 241.634937 200.281977 442.055064 442.648598 442.730465 244.592375 0.680518 446.414471-198.414391 446.982421-440.939629C957.380902 270.56973 756.658892 69.806786 512.890301 69.525369z"
+                p-id="2801"
+                fill="#ff5b57"
+              ></path>
+              <path
+                d="M769.491511 698.518123c-27.241173 24.841453-50.972308 46.484985-71.561805 65.258062-60.315355-81.416519-120.30836-162.398121-183.079718-247.135362-75.39931 80.541568-136.139349 161.528287-187.423775 251.719902-24.774936-20.44623-48.291171-39.853775-72.92284-60.182321 37.730355-42.309779 74.089442-83.759956 111.221146-124.498916 28.689192-31.477779 57.710968-62.709959 87.878879-92.760186 13.262419-13.211253 11.190166-21.633298-1.361035-33.109999C388.258352 399.295018 324.745076 340.269065 260.812232 281.186829c24.099535-30.817728 28.653375-33.544916 62.300625-9.30723 60.622355 43.675931 119.858092 89.362714 178.213761 136.031899 16.035657 12.822385 25.148454 13.681987 40.344976-0.271184 60.873073-55.899665 126.704202-105.101604 202.456563-143.640394 5.275291 9.12303 9.772848 16.895258 13.380103 23.137601-65.288762 58.033318-129.344406 114.976785-194.346635 172.759386C633.689862 541.46181 701.357877 619.716224 769.491511 698.518123z"
+                p-id="2802"
+                fill="#ff5b57"
+              ></path>
+            </svg>
+            <div class="txt">{{ $t('zhi-fu-shi-bai') }}</div>
+          </div>
+          <div class="fail" v-if="!payResult.isSuccess && payResult.isPaying">
+            <svg
+              t="1727329936552"
+              class="icon"
+              viewBox="0 0 1024 1024"
+              version="1.1"
+              xmlns="http://www.w3.org/2000/svg"
+              p-id="13383"
+              width="48"
+              height="48"
+            >
+              <path
+                d="M443.392 178.176m-178.176 0a178.176 178.176 0 1 0 356.352 0 178.176 178.176 0 1 0-356.352 0Z"
+                fill="#ff4949"
+                p-id="13384"
+              ></path>
+              <path
+                d="M580.608 845.824m-178.176 0a178.176 178.176 0 1 0 356.352 0 178.176 178.176 0 1 0-356.352 0Z"
+                fill="#ff4949"
+                p-id="13385"
+              ></path>
+              <path
+                d="M845.141333 440.661333m-178.176 0a178.176 178.176 0 1 0 356.352 0 178.176 178.176 0 1 0-356.352 0Z"
+                fill="#ff4949"
+                p-id="13386"
+              ></path>
+              <path
+                d="M178.858667 583.338667m-178.176 0a178.176 178.176 0 1 0 356.352 0 178.176 178.176 0 1 0-356.352 0Z"
+                fill="#ff4949"
+                p-id="13387"
+              ></path>
+            </svg>
+            <div class="txt">{{ $t('zheng-zai-zhi-fu-zhong') }}...</div>
+          </div>
+          <div class="amount-info">
+            <span>
+              ¥
+              <span class="amount">{{ payResult.payAmount.toFixed(2) }}</span>
+            </span>
+          </div>
         </div>
-    </el-dialog>
+      </el-col>
+    </el-row>
+    <div slot="footer" class="dialog-footer">
+      <el-button type="danger" class="do-button" @click="printOrder(payResult.orderId)">
+        {{ $t('da-yin-xiao-piao') }}
+      </el-button>
+      <el-button type="primary" class="main-button" @click="submit()">
+        {{ $t('que-ren') }}
+      </el-button>
+    </div>
+  </el-dialog>
 </template>
 <script>
 export default {
-    props: {
-      showDialog: {
-        type:[Boolean],
-        default:()=>false
-      },
-      payResult: {
-        type:[Object],
-        default:()=>{}
-      }
+  props: {
+    showDialog: {
+      type: [Boolean],
+      default: () => false,
     },
-    data(){
-      return {
-        loading: false,
-      }
+    payResult: {
+      type: [Object],
+      default: () => {},
     },
-    methods: {
-       submit() {
-         this.$emit('closeDialog','payResultDialog');
-       },
-       printOrder(orderId) {
-         this.$emit('closeDialog','payResultDialog');
-         this.$emit('showOrderPrint', orderId);
-       }
+  },
+  data() {
+    return {
+      loading: false,
     }
+  },
+  methods: {
+    submit() {
+      this.$emit('closeDialog', 'payResultDialog')
+    },
+    printOrder(orderId) {
+      this.$emit('closeDialog', 'payResultDialog')
+      this.$emit('showOrderPrint', orderId)
+    },
+  },
 }
 </script>
 <style lang="scss" scoped>
-    .main {
-       height: 140px;
-       padding-top: 10px;
-       text-align: center;
-       font-size: 14px;
-       .txt {
-         margin-top: 8px;
-         font-size: 24px;
-         font-weight: bold;
-       }
-       .amount-info {
-          margin-top: 6px;
-          font-size: 28px;
-       }
-    }
+.main {
+  height: 140px;
+  padding-top: 10px;
+  text-align: center;
+  font-size: 14px;
+  .txt {
+    margin-top: 8px;
+    font-size: 24px;
+    font-weight: bold;
+  }
+  .amount-info {
+    margin-top: 6px;
+    font-size: 28px;
+  }
+}
 </style>

+ 38 - 36
src/renderer/views/cashier/components/settlementDialog.vue

@@ -1,7 +1,7 @@
 <template>
   <el-dialog
     class="common-dialog"
-    title="支付结算"
+    :title="$t('zhi-fu-jie-suan')"
     :visible="showDialog"
     width="1100px"
     @close="cancel"
@@ -10,14 +10,14 @@
     <el-dialog
       class="common-dialog"
       width="800px"
-      title="选择卡券"
+      :title="$t('xuan-ze-qia-quan')"
       :visible.sync="showCouponDialog"
       append-to-body
       destroy-on-close
     >
       <div class="coupon-list">
         <div class="none" v-if="!memberInfo || !myCouponList || myCouponList.length < 1">
-          暂无可用卡券
+          {{ $t('zan-wu-ke-yong-qia-quan') }}
         </div>
         <div class="row" v-for="couponList in myCouponList">
           <div class="item active" v-for="coupon in couponList">
@@ -38,7 +38,7 @@
     <el-form ref="form" label-width="0px">
       <div class="settlement">
         <div class="left">
-          <div class="title">请选择支付方式</div>
+          <div class="title">{{ $t('qing-xuan-ze-zhi-fu-fang-shi') }}</div>
           <div class="content">
             <div
               :class="'pay-item' + (payType == 'CASH' ? ' active' : '')"
@@ -60,7 +60,7 @@
                   fill="#ff5b57"
                 ></path>
               </svg>
-              <div class="name">现金支付</div>
+              <div class="name">{{ $t('xian-jin-zhi-fu-0') }}</div>
             </div>
             <div
               :class="'pay-item' + (payType == 'BALANCE' ? ' active' : '')"
@@ -82,7 +82,7 @@
                   p-id="6472"
                 ></path>
               </svg>
-              <div class="name">余额支付</div>
+              <div class="name">{{ $t('yu-e-zhi-fu') }}</div>
             </div>
             <div
               :class="'pay-item' + (payType == 'MICROPAY' ? ' active' : '')"
@@ -109,7 +109,7 @@
                   p-id="2607"
                 ></path>
               </svg>
-              <div class="name">微信支付</div>
+              <div class="name">{{ $t('wei-xin-zhi-fu') }}</div>
             </div>
             <div
               :class="'pay-item' + (payType == 'ALISCAN' ? ' active' : '')"
@@ -131,16 +131,16 @@
                   p-id="2582"
                 ></path>
               </svg>
-              <div class="name">支付宝支付</div>
+              <div class="name">{{ $t('zhi-fu-bao-zhi-fu') }}</div>
             </div>
           </div>
         </div>
         <div class="main">
-          <div class="title">结算信息</div>
+          <div class="title">{{ $t('jie-suan-xin-xi') }}</div>
           <div class="content">
             <div class="coupon-info">
               <div>
-                可用卡券
+                {{ $t('ke-yong-ka-quan') }}
                 <span class="num">({{ memberInfo ? couponList.length : 0 }})</span>
               </div>
               <el-form-item class="form-item" prop="couponName">
@@ -149,19 +149,19 @@
                   style="width: 450px"
                   @focus="selectCoupon()"
                   v-model="couponName"
-                  placeholder="请选择卡券"
+                  :placeholder="$t('qing-xuan-ze-ka-quan')"
                   clearable
                 />
               </el-form-item>
             </div>
             <div class="remark-info">
-              <div>备注信息:</div>
+              <div>{{ $t('bei-zhu-xin-xi') }}:</div>
               <el-form-item class="form-item" prop="remark">
                 <el-input
                   type="textarea"
                   v-model="remark"
                   ref="remark"
-                  placeholder="请输入备注信息"
+                  :placeholder="$t('qing-shu-ru-bei-zhu-xin-xi')"
                   clearable
                 />
               </el-form-item>
@@ -169,25 +169,25 @@
             <div class="discount-info">
               <el-row>
                 <el-col :span="12">
-                  <div>折扣:(折)</div>
+                  <div>{{ $t('zhe-kou-zhe') }}</div>
                   <el-form-item class="form-item" prop="discount">
                     <el-input
                       type="text"
                       v-model="discountAmount"
                       style="width: 200px"
-                      placeholder="请输入折扣"
+                      :placeholder="$t('qing-shu-ru-zhe-kou')"
                       clearable
                     />
                   </el-form-item>
                 </el-col>
                 <el-col :span="12">
-                  <div>立减:(元)</div>
+                  <div>{{ $t('li-jian') }}:({{ $t('yuan') }})</div>
                   <el-form-item class="form-item" prop="reduce">
                     <el-input
                       type="text"
                       v-model="reduceAmount"
                       style="width: 200px"
-                      placeholder="请输入立减金额"
+                      :placeholder="$t('qing-shu-ru-li-jian-jin-e-0')"
                       clearable
                     />
                   </el-form-item>
@@ -196,18 +196,18 @@
             </div>
             <div class="amount-info">
               <span class="discount-amount">
-                优惠金额:¥
+                {{ $t('you-hui-jin-e') }}:¥
                 <span class="value">{{ discountPrice.toFixed(2) }}</span>
               </span>
               <span class="pay-amount">
-                应付金额:¥
+                {{ $t('ying-fu-jin-e') }}:¥
                 <span class="value">{{ newTotalPrice.toFixed(2) }}</span>
               </span>
             </div>
           </div>
         </div>
         <div class="right">
-          <div class="title">会员信息</div>
+          <div class="title">{{ $t('hui-yuan-xin-xi') }}</div>
           <div class="content">
             <div class="member-info" v-if="memberInfo">
               <div class="base">
@@ -220,21 +220,21 @@
                 </div>
               </div>
               <div class="item">
-                <div class="head">手机号:</div>
-                <div class="value">{{ memberInfo.mobile ? memberInfo.mobile : '暂无' }}</div>
+                <div class="head">{{ $t('shou-ji-hao') }}:</div>
+                <div class="value">{{ memberInfo.mobile ? memberInfo.mobile : $('zan-wu') }}</div>
               </div>
               <div class="item">
-                <div class="head">会员号:</div>
-                <div class="value">{{ memberInfo.userNo ? memberInfo.userNo : '暂无' }}</div>
+                <div class="head">{{ $t('hui-yuan-hao') }}:</div>
+                <div class="value">{{ memberInfo.userNo ? memberInfo.userNo : $('zan-wu') }}</div>
               </div>
               <div class="item">
-                <div class="head">可用余额:</div>
+                <div class="head">{{ $t('ke-yong-yu-e') }}:</div>
                 <div class="value">
                   {{ memberInfo.balance ? memberInfo.balance.toFixed(2) : 0.0 }}(元)
                 </div>
               </div>
               <div class="item">
-                <div class="head">可用积分:</div>
+                <div class="head">{{ $t('ke-yong-ji-fen') }}:</div>
                 <div class="value">{{ memberInfo.point ? memberInfo.point : '0' }}</div>
               </div>
               <div class="re-select">
@@ -245,7 +245,7 @@
                   icon="el-icon-user"
                   @click="bindToMember()"
                 >
-                  重新选择
+                  {{ $t('chong-xin-xuan-ze') }}
                 </el-button>
               </div>
             </div>
@@ -258,7 +258,7 @@
                 icon="el-icon-user"
                 @click="bindToMember()"
               >
-                关联会员
+                {{ $t('guan-lian-hui-yuan') }}
               </el-button>
             </div>
             <div class="staff">
@@ -270,7 +270,7 @@
                 icon="el-icon-user"
                 @click="bindToStaff()"
               >
-                已关联({{ staffInfo.realName }})
+                {{ $t('yi-guan-lian') }}({{ staffInfo.realName }})
               </el-button>
               <el-button
                 v-if="!staffInfo"
@@ -280,7 +280,7 @@
                 icon="el-icon-user"
                 @click="bindToStaff()"
               >
-                关联员工
+                {{ $t('guan-lian-yuan-gong') }}
               </el-button>
             </div>
           </div>
@@ -288,8 +288,10 @@
       </div>
     </el-form>
     <div slot="footer" class="dialog-footer">
-      <el-button type="primary" class="main-button" @click="submit()">确定收款</el-button>
-      <el-button @click="cancel()">取 消</el-button>
+      <el-button type="primary" class="main-button" @click="submit()">
+        {{ $t('que-ding-shou-kuan') }}
+      </el-button>
+      <el-button @click="cancel()">{{ $t('qu-xiao') }}</el-button>
     </div>
   </el-dialog>
 </template>
@@ -383,7 +385,7 @@ export default {
     selectPayType(type) {
       const app = this
       if (type == 'BALANCE' && !app.memberInfo) {
-        app.$alert('余额支付需关联会员信息!')
+        app.$alert(this.$t('yu-e-zhi-fu-xu-guan-lian-hui-yuan-xin-xi'))
         return false
       }
       this.payType = type
@@ -392,7 +394,7 @@ export default {
     selectCoupon() {
       const app = this
       if (!app.memberInfo) {
-        app.$alert('请先关联会员信息!')
+        app.$alert(this.$t('qing-xian-guan-lian-hui-yuan-xin-xi'))
         app.$refs.remark.focus()
         return false
       } else {
@@ -412,7 +414,7 @@ export default {
     useThisCoupon(coupon) {
       const app = this
       app
-        .$confirm('确定使用该卡券吗?')
+        .$confirm(this.$t('que-ding-shi-yong-gai-qia-quan-ma'))
         .then(function () {
           app.$emit('useThisCoupon', coupon)
           app.couponName = coupon.name
@@ -430,7 +432,7 @@ export default {
     submit() {
       const app = this
       if (app.payType == '') {
-        app.$alert('请先选择支付方式!')
+        app.$alert(this.$t('qing-xian-xuan-ze-zhi-fu-fang-shi'))
         return false
       }
       app.$emit('submit', {

+ 66 - 37
src/renderer/views/cashier/index.vue

@@ -9,16 +9,16 @@
       :show-close="false"
     >
       <div class="main">
-        <div class="top-nav">欢迎使用{{ systemName }}</div>
+        <div class="top-nav">{{ $t('huan-ying-shi-yong') }} {{ systemName }}</div>
         <div class="left-side">
           <div class="logo">
             <!-- <i class="logout el-icon-d-arrow-left" @click="logout"></i> -->
-            <div class="title">收银台</div>
+            <div class="title">{{ $t('cashierDesk') }}</div>
             <div class="store" v-if="storeInfo">({{ storeInfo.name }})</div>
-            <div class="account">您好,{{ accountInfo.realName }}!</div>
+            <div class="account">{{ $t('hello') }},{{ accountInfo.realName }}!</div>
           </div>
           <div class="cate">
-            <ul class="nav" >
+            <ul class="nav">
               <li class="nav-item" v-for="menu in menuList">
                 <a
                   :class="'nav-link' + (activeMenu == menu.key ? ' active' : '')"
@@ -97,7 +97,10 @@
                   </div>
                 </div>
                 <div class="empty" v-if="cartList.length < 1">
-                  <el-empty description="暂无结算商品" :image-size="40"></el-empty>
+                  <el-empty
+                    :description="$t('zan-wu-jie-suan-shang-pin')"
+                    :image-size="40"
+                  ></el-empty>
                 </div>
               </div>
             </div>
@@ -105,18 +108,22 @@
           <div class="footer">
             <div class="number">
               <div class="total-num">
-                总件数
+                {{ $t('zong-jian-shu') }}
                 <b class="num">{{ cartTotalNum }}</b>
               </div>
               <div class="total-price">
-                总金额
+                {{ $t('zong-jin-e') }}
                 <b class="num">¥{{ cartTotalPrice ? cartTotalPrice.toFixed(2) : '0.00' }}</b>
               </div>
             </div>
             <div class="options">
-              <div class="cash" @click="hangUp()">挂单 / 取单</div>
-              <div class="submit" v-if="cartTotalNum > 0" @click="doSettlement()">提交结算</div>
-              <div class="submit" v-if="cartTotalNum == 0" @click="doCashier()">无商品收款</div>
+              <div class="cash" @click="hangUp()">{{ $t('gua-dan') }} / {{ $t('qu-dan') }}</div>
+              <div class="submit" v-if="cartTotalNum > 0" @click="doSettlement()">
+                {{ $t('ti-jiao-jie-suan') }}
+              </div>
+              <div class="submit" v-if="cartTotalNum == 0" @click="doCashier()">
+                {{ $t('wu-shang-pin-shou-kuan') }}
+              </div>
             </div>
           </div>
         </div>
@@ -127,7 +134,7 @@
                 v-model="searchForm.keyword"
                 prefix-icon="el-icon-full-screen"
                 @keyup.enter.native="doQueryGoods"
-                placeholder="请输入商品关键字:商品名称、条码、商品ID..."
+                :placeholder="`${$t('searchTips')}...`"
                 clearable
                 class="flex-1 mr-2"
               />
@@ -137,7 +144,7 @@
                 @click="doQueryGoods()"
                 icon="el-icon-search"
               >
-                查询商品
+                {{ $t('cha-xun-shang-pin') }}
               </el-button>
             </div>
             <!-- <el-form class="search-form " ref="searchForm" :inline="true" :model="searchForm">
@@ -156,7 +163,7 @@
               </el-button>
             </el-form> -->
             <el-tabs class="tab-box" v-model="navTab" @tab-click="switchTab">
-              <el-tab-pane label="全部" name="0"></el-tab-pane>
+              <el-tab-pane :label="$t('all')" name="0"></el-tab-pane>
               <el-tab-pane
                 v-for="tab in tabList"
                 :label="tab.name"
@@ -206,7 +213,10 @@
               @pagination="initCashier"
             />
 
-            <el-empty v-if="goodsList.length == 0" description="暂无商品..."></el-empty>
+            <el-empty
+              v-if="goodsList.length == 0"
+              :description="`${$t('zan-wu-shang-pin')}...`"
+            ></el-empty>
           </div>
         </div>
 
@@ -226,7 +236,7 @@
 
     <!-- 规格详情 start-->
     <el-dialog
-      title="选择商品规格"
+      :title="$t('xuan-ze-shang-pin-gui-ge')"
       :visible.sync="openGoodsDialog"
       class="common-dialog"
       append-to-body
@@ -253,8 +263,10 @@
         </div>
       </div>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" class="main-button" @click="addToCart()">加入结算</el-button>
-        <el-button @click="closeGoodsDialog()">取 消</el-button>
+        <el-button type="primary" class="main-button" @click="addToCart()">
+          {{ $t('jia-ru-jie-suan') }}
+        </el-button>
+        <el-button @click="closeGoodsDialog()">{{ $t('qu-xiao') }}</el-button>
       </div>
     </el-dialog>
     <!-- 规格详情 end-->
@@ -407,9 +419,21 @@ export default {
       goodsForm: {},
       // 左侧菜单
       menuList: [
-        { name: '收银主页', key: 'cashier', logo: require('../../assets/images/menu-cooker1.png') },
-        { name: '订单管理', key: 'order', logo: require('../../assets/images/menu-cooker2.png') },
-        { name: '退出', key: 'exit', logo: require('../../assets/images/menu-cooker3.png') },
+        {
+          name: this.$t('shou-yin-zhu-ye'),
+          key: 'cashier',
+          logo: require('../../assets/images/menu-cooker1.png'),
+        },
+        {
+          name: this.$t('ding-dan-guan-li'),
+          key: 'order',
+          logo: require('../../assets/images/menu-cooker2.png'),
+        },
+        {
+          name: this.$t('tui-chu'),
+          key: 'exit',
+          logo: require('../../assets/images/menu-cooker3.png'),
+        },
         //  { name: '会员管理', key: 'member', logo: require('../../assets/images/hot.png') },
         //  { name: '卡券核销', key: 'coupon', logo: require('../../assets/images/life.png') }
       ],
@@ -492,7 +516,7 @@ export default {
           return false
         }
         if (app.openSettlementDialog == true) {
-          app.$alert('请点击确定收款!')
+          app.$alert(this.$t('qing-dian-ji-que-ding-shou-kuan'))
           return false
         }
         if (app.activeMenu == 'cashier') {
@@ -550,15 +574,15 @@ export default {
     // 菜单切换
     switchMenu(menuKey) {
       if (menuKey == 'exit') {
-        this.$confirm('确定注销并退出系统吗?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
+        this.$confirm(this.$t('que-ding-zhu-xiao-bing-tui-chu-xi-tong-ma'), this.$t('ti-shi'), {
+          confirmButtonText: this.$t('que-ding'),
+          cancelButtonText: this.$t('qu-xiao'),
           type: 'warning',
         })
           .then(() => {
             logOut().then(() => {
               Message({
-                message: '退出成功',
+                message: this.$t('tui-chu-cheng-gong'),
                 type: 'success',
               })
               removeUserId()
@@ -638,7 +662,7 @@ export default {
           if (response.data && response.data.length > 0) {
             app.goodsList = response.data
           } else {
-            app.$alert('抱歉,未查询到商品信息!')
+            app.$alert(this.$t('bao-qian-wei-cha-xun-dao-shang-pin-xin-xi'))
             return false
           }
         })
@@ -710,7 +734,7 @@ export default {
               app.isSearch = true
               return false
             } else {
-              app.$alert('抱歉,未查询到商品信息!')
+              app.$alert(this.$t('bao-qian-wei-cha-xun-dao-shang-pin-xin-xi'))
               return false
             }
           })
@@ -730,7 +754,7 @@ export default {
         }
       })
       if (app.goodsInfo.isSingleSpec == 'N' && skuId <= 0) {
-        app.$alert('请先确认商品规格!')
+        app.$alert(this.$t('qing-xian-que-ren-shang-pin-gui-ge'))
         return false
       }
       // 添加到购物车
@@ -763,9 +787,10 @@ export default {
     // 删除购物车
     removeFromCart(cartId) {
       const app = this
-      this.$confirm('此操作将清空, 是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+
+      this.$confirm(this.$t('ci-cao-zuo-jiang-qing-kong-shi-fou-ji-xu'), this.$t('ti-shi'), {
+        confirmButtonText: this.$t('que-ding'),
+        cancelButtonText: this.$t('qu-xiao'),
         type: 'warning',
       })
         .then(() => {
@@ -775,7 +800,7 @@ export default {
                 app.getCartList()
                 this.$message({
                   type: 'success',
-                  message: '删除成功!',
+                  message: this.$t('shan-chu-cheng-gong'),
                 })
               }
             })
@@ -787,7 +812,7 @@ export default {
         .catch(() => {
           this.$message({
             type: 'info',
-            message: '已取消删除',
+            message: this.$t('yi-qu-xiao-shan-chu'),
           })
         })
     },
@@ -858,7 +883,7 @@ export default {
     // 发起结算
     doSettlement() {
       if (this.cartList.length < 1) {
-        this.$alert('请先添加结算商品!')
+        this.$alert(this.$t('qing-xian-tian-jia-jie-suan-shang-pin'))
         return false
       }
       this.getCartList()
@@ -908,7 +933,11 @@ export default {
                 orderId: response.data.orderInfo.id,
               })
             } else {
-              app.$alert(response.data.message ? response.data.message : '抱歉,订单操作异常!')
+              app.$alert(
+                response.data.message
+                  ? response.data.message
+                  : this.$t('bao-qian-ding-dan-cao-zuo-yi-chang'),
+              )
             }
           })
         }
@@ -1154,7 +1183,7 @@ export default {
         display: flex;
         flex-direction: column;
         align-items: center;
-        justify-content:space-around;
+        justify-content: space-around;
         margin: 0px;
         padding: 5px;
         text-align: center;
@@ -1242,7 +1271,7 @@ export default {
       .member-info {
         display: inline-block;
         margin-left: 5px;
-        border-top:none;
+        border-top: none;
         .name {
           margin-left: 2px;
           margin-right: 3px;

Some files were not shown because too many files changed in this diff