|
@@ -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;
|