浏览代码

Merge remote-tracking branch 'origin/master' into panda-ui

suwenjiang 3 周之前
父节点
当前提交
491e9c3de3

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

@@ -186,7 +186,6 @@
   "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",
   "hui-yuan-hao": "Member Number",
   "ke-yong-yu-e": "Available Balance",
   "ke-yong-ji-fen": "Available Points",
@@ -242,5 +241,19 @@
   "zheng-zai-zhi-fu-zhong": "Payment in progress",
   "que-ren": "Confirm",
   "e-yu": "Russian",
-"sai-er-wei-ya-yu": "Serbian"
+  "sai-er-wei-ya-yu": "Serbian",
+  "que-ding-shan-chu": "Confirm deletion of \"",
+  "de-hui-yuan-xin-xi": "\" member information?",
+  "ti-shi-xiu-gai-hui-yuan-cheng-gong": "Notification: Member modification successful",
+  "ti-shi-xin-zeng-hui-yuan-cheng-gong": "Notification: New member added successfully",
+  "ci-cao-zuo-jiang-shan-chu-gua-dan-shi-fou-ji-xu": "This action will delete pending orders. Continue?",
+  "shan-chu-gua-dan-cheng-gong": "Pending orders deleted successfully",
+  "shi-fou-gua-dan": "Place pending order?",
+  "gua-dan-cheng-gong": "Pending order placed successfully",
+  "yi-qu-xiao-gua-dan": "Pending order canceled",
+  "jin-ru-shou-yin": "Enter POS System",
+  "xi-tong-she-zhi": "System Settings",
+  "ying-fu-jin-e": "Amount Due",
+  "yin-hang-zhi-fu": "Bank Payment",
+  "geng-xin-cai-pin": "Update dish?"
 }

+ 15 - 2
src/renderer/i18n/languages/ru.json

@@ -240,6 +240,19 @@
   "qing-xian-tian-jia-jie-suan-shang-pin": "Пожалуйста, сначала добавьте товары для расчета!",
   "bao-qian-ding-dan-cao-zuo-yi-chang": "Извините, операция с заказом выполнена некорректно!",
   "e-yu": "Русский язык",
-"sai-er-wei-ya-yu": "Сербский язык",
-"ying-fu-jin-e": "Сумма к оплате"
+  "sai-er-wei-ya-yu": "Сербский язык",
+  "ying-fu-jin-e": "Сумма к оплате",
+  "que-ding-shan-chu": "Подтвердите удаление \"",
+  "de-hui-yuan-xin-xi": "\" информацию о члене?",
+  "ti-shi-xiu-gai-hui-yuan-cheng-gong": "Уведомление: Изменение данных участника выполнено успешно",
+  "ti-shi-xin-zeng-hui-yuan-cheng-gong": "Уведомление: Новый участник успешно добавлен",
+  "ci-cao-zuo-jiang-shan-chu-gua-dan-shi-fou-ji-xu": "Это действие удалит отложенные заказы. Продолжить?",
+  "shan-chu-gua-dan-cheng-gong": "Отложенные заказы успешно удалены",
+  "shi-fou-gua-dan": "Создать отложенный заказ?",
+  "gua-dan-cheng-gong": "Отложенный заказ успешно создан",
+  "yi-qu-xiao-gua-dan": "Отложенный заказ отменён",
+  "jin-ru-shou-yin": "Перейти в POS-систему",
+  "xi-tong-she-zhi": "Настройки системы",
+  "yin-hang-zhi-fu": "Банковский платёж",
+  "geng-xin-cai-pin": "Обновить блюдо?"
 }

+ 15 - 2
src/renderer/i18n/languages/sr-Latn.json

@@ -240,6 +240,19 @@
   "qing-xian-tian-jia-jie-suan-shang-pin": "Пожалуйста, прво додajte производе за рачун!",
   "bao-qian-ding-dan-cao-zuo-yi-chang": "Жао нам је, операција нараudzбе је неуспешна!",
   "e-yu": "Руски језик",
-"sai-er-wei-ya-yu": "Српски језик",
-"ying-fu-jin-e": "Iznos za plaćanje"
+  "sai-er-wei-ya-yu": "Српски језик",
+  "ying-fu-jin-e": "Iznos za plaćanje",
+  "que-ding-shan-chu": "Potvrdite brisanje \"",
+  "de-hui-yuan-xin-xi": "\" informacije o članu?",
+  "ti-shi-xiu-gai-hui-yuan-cheng-gong": "Obaveštenje: Uspešna izmena podataka člana",
+  "ti-shi-xin-zeng-hui-yuan-cheng-gong": "Obaveštenje: Novi član uspešno dodat",
+  "ci-cao-zuo-jiang-shan-chu-gua-dan-shi-fou-ji-xu": "Ova radnja će obrisati naloge na čekanju. Nastaviti?",
+  "shan-chu-gua-dan-cheng-gong": "Nalozi na čekanju uspešno obrisani",
+  "shi-fou-gua-dan": "Postaviti nalog na čekanje?",
+  "gua-dan-cheng-gong": "Nalog na čekanju uspešno postavljen",
+  "yi-qu-xiao-gua-dan": "Nalog na čekanju je otkazan",
+  "jin-ru-shou-yin": "Ulaz u POS sistem",
+  "xi-tong-she-zhi": "Sistemske postavke",
+  "yin-hang-zhi-fu": "Bankovna uplata",
+  "geng-xin-cai-pin": "Ažurirati jelo?"
 }

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

@@ -241,6 +241,18 @@
   "bao-qian-ding-dan-cao-zuo-yi-chang": "抱歉,订单操作异常!",
   "e-yu": "俄语",
   "sai-er-wei-ya-yu": "塞尔维亚语",
+  "que-ding-shan-chu": "确定删除\"",
+  "de-hui-yuan-xin-xi": "的会员信息?",
+  "ti-shi-xiu-gai-hui-yuan-cheng-gong": "提示:修改会员成功",
+  "ti-shi-xin-zeng-hui-yuan-cheng-gong": "提示:新增会员成功",
+  "ci-cao-zuo-jiang-shan-chu-gua-dan-shi-fou-ji-xu": "此操作将删除挂单, 是否继续?",
+  "shan-chu-gua-dan-cheng-gong": "删除挂单成功",
+  "shi-fou-gua-dan": "是否挂单?",
+  "gua-dan-cheng-gong": "挂单成功",
+  "yi-qu-xiao-gua-dan": "已取消挂单",
+  "jin-ru-shou-yin": "进入收银",
+  "xi-tong-she-zhi": "系统设置",
   "ying-fu-jin-e": "应付金额",
-  "yin-hang-zhi-fu": "银行支付"
+  "yin-hang-zhi-fu": "银行支付",
+  "geng-xin-cai-pin": "更新菜品?"
 }

+ 28 - 12
src/renderer/views/cashier/components/hangUpDialog.vue

@@ -64,6 +64,10 @@ export default {
       type: [Array],
       default: () => [],
     },
+    hangNo: {
+      type: [String],
+      default: () => '',
+    },
   },
   watch: {
     showDialog(value) {
@@ -84,9 +88,9 @@ export default {
     remove(hangNo) {
       const app = this
       const param = { hangNo: hangNo }
-      this.$confirm('此操作将删除挂单, 是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(this.$t('ci-cao-zuo-jiang-shan-chu-gua-dan-shi-fou-ji-xu'), this.$t('ti-shi'), {
+        confirmButtonText: this.$t('que-ding'),
+        cancelButtonText: this.$t('qu-xiao'),
         type: 'warning',
       })
         .then(() => {
@@ -94,7 +98,7 @@ export default {
             .then((response) => {
               if (response) {
                 Message({
-                  message: '删除挂单成功',
+                  message: this.$t('shan-chu-gua-dan-cheng-gong'),
                   type: 'success',
                 })
                 app.getHangUpList()
@@ -107,23 +111,23 @@ export default {
         .catch(() => {
           this.$message({
             type: 'info',
-            message: '已取消删除',
+            message: this.$t('yi-qu-xiao-shan-chu'),
           })
         })
     },
     // 执行挂单
-    doHangUp(hangNo) {
+    doHangUp(hangNo, msg = this.$t('shi-fou-gua-dan')) {
       const app = this
       if (!app.cartList || app.cartList.length < 1) {
         Message({
-          message: '请先添加结算商品',
+          message: this.$t('qing-xian-tian-jia-jie-suan-shang-pin'),
           type: 'error',
         })
         return false
       }
-      this.$confirm('是否挂单?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+      this.$confirm(this.$t('shi-fou-gua-dan'), this.$t('ti-shi'), {
+        confirmButtonText: this.$t('que-ding'),
+        cancelButtonText: this.$t('qu-xiao'),
         type: 'warning',
       })
         .then(() => {
@@ -140,11 +144,12 @@ export default {
             .then((response) => {
               if (response) {
                 Message({
-                  message: '挂单成功',
+                  message: this.$t('gua-dan-cheng-gong'),
                   type: 'success',
                 })
                 app.getHangUpList()
                 app.$emit('doHangUp')
+                this.$emit('closeDialog', 'hangUpDialog')
               }
             })
             .catch(() => {
@@ -154,7 +159,7 @@ export default {
         .catch(() => {
           this.$message({
             type: 'info',
-            message: '已取消挂单',
+            message: this.$t('yi-qu-xiao-gua-dan'),
           })
         })
     },
@@ -173,6 +178,17 @@ export default {
     },
     // 取单
     getHangUp(hangNo, memberInfo) {
+      //添加判断是否是一个桌子要更新菜品
+      console.log(this.hangNo, 'this.hangNo', hangNo, 'hangNo')
+
+      if (this.hangNo === hangNo) {
+        // this.$emit('updateHangNo')
+        console.log(this.hangNo, hangNo)
+        this.doHangUp(hangNo, this.$t('geng-xin-cai-pin'))
+        this.$emit('closeDialog', 'hangUpDialog')
+
+        return
+      }
       this.$emit('getHangNo', { hangNo: hangNo, memberInfo: memberInfo })
     },
     close() {

+ 1 - 0
src/renderer/views/cashier/index.vue

@@ -338,6 +338,7 @@
       :show-dialog="openHangUpDialog"
       :memberInfo="memberInfo"
       :cartList="cartList"
+      :hangNo="hangNo"
       @getHangNo="getHangNo"
       @doHangUp="doHangUp"
       @closeDialog="closeDialog"

+ 8 - 8
src/renderer/views/home/index.vue

@@ -8,19 +8,19 @@
       :show-close="false"
     >
       <div class="main">
-        <div class="nav">欢迎使用{{ systemName }}</div>
+        <div class="nav">{{ $t('huan-ying-shi-yong') }}{{ systemName }}</div>
         <div class="tool">
           <div class="item" @click="target('/cashier')">
             <i class="el-icon-user"></i>
-            进入收银
+            {{ $t('jin-ru-shou-yin') }}
           </div>
           <div class="item" @click="target('/setting')">
             <i class="el-icon-setting"></i>
-            系统设置
+            {{ $t('xi-tong-she-zhi') }}
           </div>
           <div class="item logout" @click="logout">
             <i class="icon el-icon-switch-button"></i>
-            退出
+            {{ $t('tui-chu') }}
           </div>
         </div>
       </div>
@@ -46,15 +46,15 @@ export default {
       this.$router.push(url)
     },
     logout() {
-      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()