初始上传
This commit is contained in:
751
addon/cashier/source/os/common/css/common.scss
Executable file
751
addon/cashier/source/os/common/css/common.scss
Executable file
@@ -0,0 +1,751 @@
|
||||
// 基础flex布局
|
||||
.uni-flex {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.uni-flex-item {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.uni-row {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.uni-column {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.w-full {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.flex-1 {
|
||||
flex: 1;
|
||||
}
|
||||
.justify-start {
|
||||
-webkit-box-pack: start;
|
||||
-ms-flex-pack: start;
|
||||
-webkit-justify-content: flex-start;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.justify-between {
|
||||
justify-content: space-between;
|
||||
}
|
||||
.justify-center{
|
||||
justify-content: center;
|
||||
}
|
||||
.items-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.text-color {
|
||||
color: $primary-color;
|
||||
}
|
||||
|
||||
.items-end {
|
||||
align-items: end;
|
||||
}
|
||||
|
||||
.items-baseline {
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.items-flex-end {
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.flex-shrink-0 {
|
||||
-ms-flex-negative: 0;
|
||||
-webkit-flex-shrink: 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.flex-grow-0 {
|
||||
-webkit-box-flex: 0;
|
||||
-ms-flex-positive: 0;
|
||||
-webkit-flex-grow: 0;
|
||||
flex-grow: 0;
|
||||
}
|
||||
|
||||
.self-end {
|
||||
align-self: flex-end;
|
||||
}
|
||||
|
||||
.justify-self-auto {
|
||||
-ms-grid-column-align: auto;
|
||||
justify-self: auto;
|
||||
}
|
||||
|
||||
.flex-col {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
-webkit-flex-direction: column;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.content-start {
|
||||
-ms-flex-line-pack: start;
|
||||
-webkit-align-content: flex-start;
|
||||
align-content: flex-start;
|
||||
}
|
||||
|
||||
.flex-wrap {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.justify-end {
|
||||
-webkit-box-pack: end;
|
||||
-ms-flex-pack: end;
|
||||
-webkit-justify-content: flex-end;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
// 高度填充
|
||||
.height-all {
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
// 公共区块样式
|
||||
.common-wrap {
|
||||
box-sizing: border-box;
|
||||
background: #fff;
|
||||
// margin: .15rem .2rem;
|
||||
|
||||
// &:first-child {
|
||||
// margin-right: 0;
|
||||
// }
|
||||
|
||||
// &:last-child {
|
||||
// margin-right: .14rem;
|
||||
// }
|
||||
}
|
||||
|
||||
// 公共滚动条样式
|
||||
.common-scrollbar,
|
||||
.common-scrollbar .uni-scroll-view {
|
||||
&::-webkit-scrollbar {
|
||||
width: 0.06rem;
|
||||
height: 0.06rem;
|
||||
background-color: rgba($color: #000000, $alpha: 0);
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
border-radius: 0.06rem;
|
||||
box-shadow: inset 0 0 0.06rem rgba(45, 43, 43, 0.45);
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
// 公共头像样式
|
||||
.common-headimg {
|
||||
overflow: hidden;
|
||||
border-radius: 50%;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
// 公共tab切换
|
||||
.common-tab-wrap {
|
||||
height: 0.53rem;
|
||||
border-bottom: 0.01rem solid #e6e6e6;
|
||||
display: flex;
|
||||
padding: 0 0.2rem;
|
||||
position: relative;
|
||||
|
||||
.tab-item {
|
||||
height: 0.53rem;
|
||||
line-height: 0.53rem;
|
||||
padding: 0 0.2rem;
|
||||
cursor: pointer;
|
||||
|
||||
&:first-child {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
&.active-bar {
|
||||
color: $primary-color;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0.03rem;
|
||||
border-radius: 0.02rem;
|
||||
background: $primary-color;
|
||||
bottom: -0.01rem;
|
||||
left: 0;
|
||||
transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||
}
|
||||
}
|
||||
|
||||
// 公共表格操作样式
|
||||
.common-table-action {
|
||||
text {
|
||||
margin-left: 0.1rem;
|
||||
color: $primary-color;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
|
||||
&:hover {
|
||||
color: var(--primary-color-light-2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 公共表格批量操作样式
|
||||
.common-table-batch {
|
||||
display: flex;
|
||||
|
||||
button {
|
||||
width: auto !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 0.02rem;
|
||||
box-sizing: border-box;
|
||||
|
||||
&::after {
|
||||
border-radius: 0.02rem;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
// 主要按钮
|
||||
.primary-btn {
|
||||
background: $primary-color !important;
|
||||
color: #fff !important;
|
||||
font-size: 0.14rem;
|
||||
|
||||
&::after {
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--primary-color-light-2) !important;
|
||||
}
|
||||
|
||||
&[disabled] {
|
||||
background: var(--primary-color-light-6) !important;
|
||||
border-color: var(--primary-color-light-6) !important;
|
||||
color: #fff !important;
|
||||
|
||||
&:hover {
|
||||
background: var(--primary-color-light-6) !important;
|
||||
border-color: var(--primary-color-light-6) !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 默认按钮
|
||||
.default-btn {
|
||||
font-size: 0.14rem;
|
||||
background: #fff !important;
|
||||
color: #606266 !important;
|
||||
border-color: #606266 !important;
|
||||
|
||||
&:hover {
|
||||
color: $primary-color !important;
|
||||
border-color: $primary-color !important;
|
||||
}
|
||||
|
||||
&:hover:after {
|
||||
border-color: $primary-color !important;
|
||||
}
|
||||
|
||||
&[plain] {
|
||||
color: $primary-color !important;
|
||||
border-color: $primary-color !important;
|
||||
background-color: var(--primary-color-light-9) !important;
|
||||
|
||||
&:after {
|
||||
border-color: $primary-color !important;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: $primary-color !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
&[disabled] {
|
||||
color: #ddd !important;
|
||||
border-color: #e6e6e6 !important;
|
||||
background: #f5f5f5 !important;
|
||||
|
||||
&:after {
|
||||
border-color: #e6e6e6 !important;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: #ddd !important;
|
||||
border-color: #e6e6e6 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&[disabled] {
|
||||
color: #ddd !important;
|
||||
border-color: #e6e6e6 !important;
|
||||
background: #f5f5f5 !important;
|
||||
|
||||
&:after {
|
||||
border-color: #e6e6e6 !important;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: #ddd !important;
|
||||
border-color: #e6e6e6 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 公共数字键盘 */
|
||||
.keyboard-wrap {
|
||||
width: 5rem;
|
||||
margin-top: 0.2rem;
|
||||
display: flex;
|
||||
|
||||
.num-wrap {
|
||||
flex: 1;
|
||||
width: 0;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
|
||||
.key-item {
|
||||
margin: 0.1rem 0.1rem 0 0;
|
||||
background: #f5f5f5;
|
||||
min-width: calc((100% - 0.3rem) / 3);
|
||||
text-align: center;
|
||||
padding: 0.15rem 0;
|
||||
border-radius: 0.05rem;
|
||||
font-size: 0.16rem;
|
||||
font-weight: bold;
|
||||
transition: all 0.3s;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
&.empty:hover {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.action-wrap {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 1rem;
|
||||
|
||||
.delete,
|
||||
.confirm {
|
||||
background: #f5f5f5;
|
||||
min-width: calc((100% - 0.3rem) / 3);
|
||||
text-align: center;
|
||||
padding: 0.15rem 0;
|
||||
margin-top: 0.1rem;
|
||||
border-radius: 0.05rem;
|
||||
font-size: 0.16rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
|
||||
&:hover {
|
||||
background: #ddd;
|
||||
}
|
||||
}
|
||||
|
||||
.confirm {
|
||||
flex: 1;
|
||||
background: $primary-color;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
|
||||
&:hover {
|
||||
background: var(--primary-color-light-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.cursor-pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
/* 单行超出隐藏 */
|
||||
.using-hidden {
|
||||
word-break: break-all;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
white-space: break-spaces;
|
||||
}
|
||||
|
||||
/* 多行超出隐藏 */
|
||||
.multi-hidden {
|
||||
word-break: break-all;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
.w-full {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.h-full {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.overflow-ellipsis {
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.truncate {
|
||||
overflow: hidden;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
button::after {
|
||||
-webkit-transform: none;
|
||||
transform: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button[type=default] {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.border-0 {
|
||||
border-width: 0 !important;
|
||||
}
|
||||
|
||||
uni-switch .uni-switch-input.uni-switch-input-checked {
|
||||
background-color: $primary-color;
|
||||
border-color: $primary-color;
|
||||
}
|
||||
|
||||
//二次确认弹框
|
||||
.confirm-pop {
|
||||
width: 3rem;
|
||||
// min-height: 1.5rem;
|
||||
border-radius: 0.06rem;
|
||||
background: #ffffff;
|
||||
box-sizing: border-box;
|
||||
padding: 0.2rem;
|
||||
|
||||
.title {
|
||||
font-size: 0.16rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 0.3rem;
|
||||
|
||||
.btn {
|
||||
width: auto;
|
||||
padding: 0 0.15rem;
|
||||
margin: 0;
|
||||
height: 0.35rem;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.btn:last-child {
|
||||
margin-left: 0.1rem;
|
||||
}
|
||||
}
|
||||
|
||||
&.message {
|
||||
width: 5.2rem;
|
||||
min-height: 3.2rem;
|
||||
background: #ffffff;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0.15rem;
|
||||
|
||||
&:after {
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
content: '';
|
||||
height: 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 100%;
|
||||
height: 0.5rem;
|
||||
border-bottom: 0.01rem solid #e6e6e6;
|
||||
text-align: center;
|
||||
line-height: 0.5rem;
|
||||
font-size: 0.16rem;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
|
||||
.iconguanbi1 {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
right: 0.15rem;
|
||||
font-size: 0.18rem;
|
||||
}
|
||||
}
|
||||
|
||||
.textarea-box {
|
||||
margin: 0.15rem;
|
||||
height: 2.2rem;
|
||||
border: 0.01rem solid #e6e6e6;
|
||||
border-radius: 0.06rem;
|
||||
padding: 0.15rem;
|
||||
box-sizing: border-box;
|
||||
|
||||
.textarea {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.save {
|
||||
width: calc(100% - 0.3rem);
|
||||
float: right;
|
||||
margin: 0.15rem;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//开单左侧主体头部会员信息展示样式
|
||||
.cashregister-header-box {
|
||||
padding: 0.20rem;
|
||||
border-bottom: 0.01rem solid #e6e6e6;
|
||||
padding-bottom: 0.1rem;
|
||||
|
||||
.search-box {
|
||||
.head-search {
|
||||
display: flex;
|
||||
|
||||
.search-switch {
|
||||
width: 0.7rem;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
margin-left: 0.1rem;
|
||||
display: flex;
|
||||
border-width: 0.01rem;
|
||||
border-style: solid;
|
||||
border-color: #e6e6e6;
|
||||
height: 0.3rem;
|
||||
align-items: center;
|
||||
padding-left: 0.05rem;
|
||||
width: calc(100% - 1.3rem);
|
||||
|
||||
.iconfont {
|
||||
}
|
||||
|
||||
input {
|
||||
margin-left: 0.05rem;
|
||||
}
|
||||
}
|
||||
|
||||
.search-btn {
|
||||
width: 0.55rem;
|
||||
margin-left: 0.1rem;
|
||||
padding: 0 0.1rem;
|
||||
height: 0.32rem;
|
||||
font-size: 0.12rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.order-time {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.title {
|
||||
user-select: none;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
height: 0.3rem;
|
||||
padding: 0 0.1rem 0 0.1rem;
|
||||
box-sizing: border-box;
|
||||
border-radius: 0.02rem;
|
||||
border: 0.01rem solid #e5e5e5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 0.14rem;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.uni-date {
|
||||
flex: 1;
|
||||
margin-left: 0.1rem;
|
||||
}
|
||||
.uni-date-x {
|
||||
height: 0.28rem;
|
||||
}
|
||||
}
|
||||
.header {
|
||||
margin-top: 0.14rem;
|
||||
// height: 0.86rem;
|
||||
font-size: 0.2rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0.14rem;
|
||||
padding-right: 0.12rem;
|
||||
background: linear-gradient(270deg, #515A6E 0%, #19233E 100%);
|
||||
border-radius: 0.04rem;
|
||||
|
||||
.header-image {
|
||||
width: 0.48rem;
|
||||
height: 0.48rem;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.headimg{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.member-nameplate{
|
||||
width: 0.52rem;
|
||||
height: 0.18rem;
|
||||
background-size: 100% 100%;
|
||||
font-size: 0.1rem;
|
||||
font-weight: 600;
|
||||
color: #793913;
|
||||
line-height: 0.16rem;
|
||||
text-align: center;
|
||||
margin-top: -0.09rem;
|
||||
z-index: 2;
|
||||
background-image: url('@/static/member/info_bg.png');
|
||||
}
|
||||
}
|
||||
.head-info {
|
||||
flex: 1;
|
||||
margin-left: 0.1rem;
|
||||
|
||||
.name {
|
||||
font-size: 0.16rem;
|
||||
color: #F4C89A;
|
||||
display: flex;
|
||||
margin-bottom: 0.04rem;
|
||||
max-width: 1.6rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
.mobile {
|
||||
width: 0.88rem;
|
||||
height: 0.2rem;
|
||||
font-size: 0.14rem;
|
||||
font-weight: 800;
|
||||
line-height: 0.2rem;
|
||||
}
|
||||
|
||||
.text {
|
||||
// max-width: 0.8rem;
|
||||
font-size: 0.12rem;
|
||||
line-height: 0.2rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.nickname{
|
||||
max-width: 0.44rem;
|
||||
font-size: 0.12rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
display: inline-block;
|
||||
line-height: 0.2rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.head-info-bottom {
|
||||
font-size: 0.12rem;
|
||||
font-weight: 500;
|
||||
color: #F0F0F0;
|
||||
line-height: 0.17rem;
|
||||
&.point{
|
||||
margin-bottom: 0.02rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.switch {
|
||||
text-align: center;
|
||||
line-height: 0.3rem;
|
||||
padding: 0 0.05rem;
|
||||
overflow: hidden;
|
||||
font-size: $uni-font-size-sm;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
-ms-flex-negative: 0;
|
||||
-webkit-flex-shrink: 0;
|
||||
flex-shrink: 0;
|
||||
border-radius: 0.04rem;
|
||||
&::after{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.menber-open{
|
||||
width: 0.68rem;
|
||||
}
|
||||
.replace-member{
|
||||
margin-left: 0.06rem;
|
||||
width: 0.36rem;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
//返回上一级
|
||||
.title-back{
|
||||
margin-bottom: 0.2rem;
|
||||
.left{
|
||||
margin-left: 0.05rem;
|
||||
}
|
||||
.iconqianhou1{
|
||||
font-size: 0.17rem;
|
||||
}
|
||||
text{
|
||||
font-size: 0.18rem !important;
|
||||
line-height: 1;
|
||||
}
|
||||
.content{
|
||||
margin: -0.02rem 0.05rem 0 0.05rem;
|
||||
}
|
||||
}
|
||||
|
||||
.bg-primary-color-9{
|
||||
background-color: var(--primary-color-light-9) !important;
|
||||
}
|
||||
140
addon/cashier/source/os/common/css/form.scss
Executable file
140
addon/cashier/source/os/common/css/form.scss
Executable file
@@ -0,0 +1,140 @@
|
||||
$label-width: 1.1rem;
|
||||
|
||||
.common-form{
|
||||
&.fixd{
|
||||
padding-bottom: .88rem !important;
|
||||
.common-btn-wrap{
|
||||
position: fixed;
|
||||
z-index: 2;
|
||||
background-color: #fff;
|
||||
bottom: 0;
|
||||
left: .9rem;
|
||||
right: .07rem;
|
||||
padding-bottom: .05rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 0;
|
||||
button{
|
||||
flex: 1;
|
||||
height: .4rem;
|
||||
line-height: .4rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.common-form-item{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
margin-bottom: .15rem;
|
||||
.form-label{
|
||||
padding: .09rem .15rem;
|
||||
text-align: right;
|
||||
width: $label-width;
|
||||
box-sizing: border-box;
|
||||
.required{
|
||||
color: red;
|
||||
margin-right: 0.03rem;
|
||||
}
|
||||
}
|
||||
.form-input{
|
||||
height: .35rem;
|
||||
line-height: .35rem;
|
||||
width: 100%;
|
||||
padding-left: .1rem;
|
||||
box-sizing: border-box;
|
||||
font-size: 0.14rem;
|
||||
}
|
||||
.form-inline{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.form-input-inline{
|
||||
width: 1.9rem;
|
||||
border: .01rem solid #e6e6e6;
|
||||
margin-right: 10px;
|
||||
background-color: #fff;
|
||||
font-size: 0.14rem;
|
||||
&.short{
|
||||
width: .5rem;
|
||||
}
|
||||
&.long{
|
||||
width: 4rem;
|
||||
}
|
||||
}
|
||||
.form-input-block{
|
||||
flex: 1;
|
||||
border: .01rem solid #e6e6e6;
|
||||
background-color: #fff;
|
||||
}
|
||||
.form-mid{
|
||||
margin-right: .1rem;
|
||||
}
|
||||
.form-word-aux{
|
||||
margin-right: .1rem;
|
||||
color: #999;
|
||||
font-size: $uni-font-size-base;
|
||||
}
|
||||
.form-word-aux-line{
|
||||
flex-basis: 100%;
|
||||
color: #999;
|
||||
margin-left: $label-width;
|
||||
margin-top: .1rem;
|
||||
}
|
||||
/deep/ .input-placeholder{
|
||||
font-size: $uni-font-size-base;
|
||||
}
|
||||
.form-checkbox-group, .form-radio-group{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.form-checkbox-item, .form-radio-item{
|
||||
margin-right: 26rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
/deep/ .uni-radio-input, .uni-checkbox-input{
|
||||
width: .18rem;
|
||||
height: .18rem;
|
||||
}
|
||||
}
|
||||
.common-btn-wrap{
|
||||
margin-left: $label-width;
|
||||
button{
|
||||
display: inline-block;
|
||||
padding: 0 .2rem;
|
||||
|
||||
height: .36rem;
|
||||
line-height: .36rem;
|
||||
font-size: $uni-font-size-base;
|
||||
}
|
||||
.screen-btn{
|
||||
background-color: $primary-color;
|
||||
color: #fff;
|
||||
margin-right: .1rem;
|
||||
&::after{
|
||||
border-width: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.uni-radio-wrapper{
|
||||
.uni-radio-input-checked{
|
||||
background-color: $primary-color!important;
|
||||
border-color: $primary-color!important;
|
||||
}
|
||||
.uni-radio-input:hover{
|
||||
border-color: $primary-color!important;
|
||||
}
|
||||
}
|
||||
.uni-checkbox-wrapper{
|
||||
.uni-checkbox-input-checked{
|
||||
color: $primary-color!important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (any-hover: hover) {
|
||||
uni-radio:not([disabled]) .uni-radio-input:hover {
|
||||
border-color: $primary-color !important;
|
||||
}
|
||||
}
|
||||
474
addon/cashier/source/os/common/css/iconfont.css
Executable file
474
addon/cashier/source/os/common/css/iconfont.css
Executable file
@@ -0,0 +1,474 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 3668609 */
|
||||
src: url('//at.alicdn.com/t/c/font_3668609_3k15vrcn5ip.woff2?t=1731148726122') format('woff2'),
|
||||
url('//at.alicdn.com/t/c/font_3668609_3k15vrcn5ip.woff?t=1731148726122') format('woff'),
|
||||
url('//at.alicdn.com/t/c/font_3668609_3k15vrcn5ip.ttf?t=1731148726122') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.iconshoukuan-:before {
|
||||
content: "\e645";
|
||||
}
|
||||
|
||||
.icondianzicheng:before {
|
||||
content: "\edaf";
|
||||
}
|
||||
|
||||
.iconbenji:before {
|
||||
content: "\e77a";
|
||||
}
|
||||
|
||||
.iconshengyinV6xx1:before {
|
||||
content: "\e70a";
|
||||
}
|
||||
|
||||
.iconshengyin-jingyinV6xx:before {
|
||||
content: "\e6ff";
|
||||
}
|
||||
|
||||
.iconwenhao:before {
|
||||
content: "\e72d";
|
||||
}
|
||||
|
||||
.iconhuaxiangfenxi:before {
|
||||
content: "\ec14";
|
||||
}
|
||||
|
||||
.iconmenpos:before {
|
||||
content: "\e652";
|
||||
}
|
||||
|
||||
.iconhuiyuanzhucedengluguanli:before {
|
||||
content: "\e609";
|
||||
}
|
||||
|
||||
.iconsaomiaoerweima:before {
|
||||
content: "\e663";
|
||||
}
|
||||
|
||||
.icon31hongbao:before {
|
||||
content: "\e605";
|
||||
}
|
||||
|
||||
.iconshanchu:before {
|
||||
content: "\e718";
|
||||
}
|
||||
|
||||
.icontuodong:before {
|
||||
content: "\e884";
|
||||
}
|
||||
|
||||
.iconhuiyuanma:before {
|
||||
content: "\e68d";
|
||||
}
|
||||
|
||||
.icona-xingzhuang2:before {
|
||||
content: "\e679";
|
||||
}
|
||||
|
||||
.iconmima:before {
|
||||
content: "\e67a";
|
||||
}
|
||||
|
||||
.iconyanzhengma:before {
|
||||
content: "\e67b";
|
||||
}
|
||||
|
||||
.icondelete:before {
|
||||
content: "\e615";
|
||||
}
|
||||
|
||||
.iconzhanghuyue:before {
|
||||
content: "\e60e";
|
||||
}
|
||||
|
||||
.iconshourujiesuan:before {
|
||||
content: "\e655";
|
||||
}
|
||||
|
||||
.iconqingchushujuku:before {
|
||||
content: "\e632";
|
||||
}
|
||||
|
||||
.iconpeisong:before {
|
||||
content: "\e626";
|
||||
}
|
||||
|
||||
.iconyunshangchuan:before {
|
||||
content: "\e604";
|
||||
}
|
||||
|
||||
.iconnavicon-chps:before {
|
||||
content: "\e64d";
|
||||
}
|
||||
|
||||
.iconyuyue:before {
|
||||
content: "\e65f";
|
||||
}
|
||||
|
||||
.icontianmaopeisonganzhuang:before {
|
||||
content: "\e603";
|
||||
}
|
||||
|
||||
.iconyunshupeisong:before {
|
||||
content: "\e621";
|
||||
}
|
||||
|
||||
.icontiaobodan:before {
|
||||
content: "\e670";
|
||||
}
|
||||
|
||||
.iconchukudan:before {
|
||||
content: "\e671";
|
||||
}
|
||||
|
||||
.iconrukudan:before {
|
||||
content: "\e674";
|
||||
}
|
||||
|
||||
.iconyuyuedingdan:before {
|
||||
content: "\e8a2";
|
||||
}
|
||||
|
||||
.iconkucunguanli:before {
|
||||
content: "\e613";
|
||||
}
|
||||
|
||||
.iconkucunpandian:before {
|
||||
content: "\e675";
|
||||
}
|
||||
|
||||
.icondayin:before {
|
||||
content: "\e61d";
|
||||
}
|
||||
|
||||
.icongongyingshang:before {
|
||||
content: "\e61f";
|
||||
}
|
||||
|
||||
.icondingdandingdanchaxun:before {
|
||||
content: "\e791";
|
||||
}
|
||||
|
||||
.icondingdan:before {
|
||||
content: "\e62f";
|
||||
}
|
||||
|
||||
.icon12jiaobanbiao:before {
|
||||
content: "\e6b1";
|
||||
}
|
||||
|
||||
.iconhexiao:before {
|
||||
content: "\e606";
|
||||
}
|
||||
|
||||
.iconqia:before {
|
||||
content: "\e782";
|
||||
}
|
||||
|
||||
.iconicon_yingyongguanli:before {
|
||||
content: "\eb8f";
|
||||
}
|
||||
|
||||
.iconyuyueguanli:before {
|
||||
content: "\e62c";
|
||||
}
|
||||
|
||||
.iconkaidan:before {
|
||||
content: "\e61b";
|
||||
}
|
||||
|
||||
.iconinvisible:before {
|
||||
content: "\e9af";
|
||||
}
|
||||
|
||||
.iconyanjing5:before {
|
||||
content: "\e728";
|
||||
}
|
||||
|
||||
.icondianpu:before {
|
||||
content: "\e66e";
|
||||
}
|
||||
|
||||
.iconxiala:before {
|
||||
content: "\e6b9";
|
||||
}
|
||||
|
||||
.iconfanhui:before {
|
||||
content: "\e64a";
|
||||
}
|
||||
|
||||
.iconfuxuankuang1:before {
|
||||
content: "\e68e";
|
||||
}
|
||||
|
||||
.iconfuxuankuang2:before {
|
||||
content: "\e68f";
|
||||
}
|
||||
|
||||
.iconcheckbox_weiquanxuan:before {
|
||||
content: "\e650";
|
||||
}
|
||||
|
||||
.iconwushuju:before {
|
||||
content: "\e642";
|
||||
}
|
||||
|
||||
.iconqianhou1:before {
|
||||
content: "\e640";
|
||||
}
|
||||
|
||||
.iconqianhou2:before {
|
||||
content: "\e641";
|
||||
}
|
||||
|
||||
.iconguanbi:before {
|
||||
content: "\e600";
|
||||
}
|
||||
|
||||
.iconright-s:before {
|
||||
content: "\e627";
|
||||
}
|
||||
|
||||
.iconleft-s:before {
|
||||
content: "\e628";
|
||||
}
|
||||
|
||||
.icongengduo:before {
|
||||
content: "\e63c";
|
||||
}
|
||||
|
||||
.icon31sousuo:before {
|
||||
content: "\e601";
|
||||
}
|
||||
|
||||
.iconguanbi1:before {
|
||||
content: "\e723";
|
||||
}
|
||||
|
||||
.iconsanjiao_xia:before {
|
||||
content: "\e63d";
|
||||
}
|
||||
|
||||
.iconjifen:before {
|
||||
content: "\e659";
|
||||
}
|
||||
|
||||
.iconxianjin:before {
|
||||
content: "\e637";
|
||||
}
|
||||
|
||||
.iconhongbao:before {
|
||||
content: "\e672";
|
||||
}
|
||||
|
||||
.iconchengchangzhi:before {
|
||||
content: "\e633";
|
||||
}
|
||||
|
||||
.iconyouhuiquan1:before {
|
||||
content: "\e6f1";
|
||||
}
|
||||
|
||||
.iconyinhangqia:before {
|
||||
content: "\e936";
|
||||
}
|
||||
|
||||
.iconwxpay:before {
|
||||
content: "\e611";
|
||||
}
|
||||
|
||||
.icontubiao_zhifu_zhifubaozhifu:before {
|
||||
content: "\e690";
|
||||
}
|
||||
|
||||
.iconduigou1:before {
|
||||
content: "\e64f";
|
||||
}
|
||||
|
||||
.iconchenggong:before {
|
||||
content: "\e644";
|
||||
}
|
||||
|
||||
.iconfuwuguanli:before {
|
||||
content: "\e625";
|
||||
}
|
||||
|
||||
.iconliuliangshuju:before {
|
||||
content: "\e62d";
|
||||
}
|
||||
|
||||
.iconkehuguanli:before {
|
||||
content: "\e697";
|
||||
}
|
||||
|
||||
.iconqitajilu:before {
|
||||
content: "\e622";
|
||||
}
|
||||
|
||||
.icondingdanguanli:before {
|
||||
content: "\e634";
|
||||
}
|
||||
|
||||
.iconcaiwubaobiao:before {
|
||||
content: "\e6e7";
|
||||
}
|
||||
|
||||
.iconyingyeshujuguanliputong:before {
|
||||
content: "\e62e";
|
||||
}
|
||||
|
||||
.iconjichuban-sanjidaohang-kehushuju:before {
|
||||
content: "\e649";
|
||||
}
|
||||
|
||||
.icontubiaozhizuomoban-:before {
|
||||
content: "\e60c";
|
||||
}
|
||||
|
||||
.iconbangzhu:before {
|
||||
content: "\e61c";
|
||||
}
|
||||
|
||||
.iconweb-icon-:before {
|
||||
content: "\e6d6";
|
||||
}
|
||||
|
||||
.icon065chakandingdan:before {
|
||||
content: "\e643";
|
||||
}
|
||||
|
||||
.icongengduo1:before {
|
||||
content: "\e73a";
|
||||
}
|
||||
|
||||
.iconsaoyisaosaoma:before {
|
||||
content: "\e751";
|
||||
}
|
||||
|
||||
.iconjia:before {
|
||||
content: "\e8e1";
|
||||
}
|
||||
|
||||
.iconfuwudingdan:before {
|
||||
content: "\e616";
|
||||
}
|
||||
|
||||
.iconchongzhidingdan:before {
|
||||
content: "\e64b";
|
||||
}
|
||||
|
||||
.iconhuiyuandingdan:before {
|
||||
content: "\e602";
|
||||
}
|
||||
|
||||
.iconshangpinguanli:before {
|
||||
content: "\e619";
|
||||
}
|
||||
|
||||
.iconshoukadingdan:before {
|
||||
content: "\e623";
|
||||
}
|
||||
|
||||
.iconshouyindingdanjine:before {
|
||||
content: "\e739";
|
||||
}
|
||||
|
||||
.iconyundanguanli:before {
|
||||
content: "\e6cc";
|
||||
}
|
||||
|
||||
.icongoumaicika:before {
|
||||
content: "\e673";
|
||||
}
|
||||
|
||||
.iconjishi:before {
|
||||
content: "\e935";
|
||||
}
|
||||
|
||||
.icontuichu:before {
|
||||
content: "\e66f";
|
||||
}
|
||||
|
||||
.icondizhi:before {
|
||||
content: "\e614";
|
||||
}
|
||||
|
||||
.iconshijian:before {
|
||||
content: "\e629";
|
||||
}
|
||||
|
||||
.iconjian:before {
|
||||
content: "\e620";
|
||||
}
|
||||
|
||||
.iconweixinzhifu:before {
|
||||
content: "\e635";
|
||||
}
|
||||
|
||||
.iconjifen1:before {
|
||||
content: "\e65e";
|
||||
}
|
||||
|
||||
.iconzhifubaozhifu:before {
|
||||
content: "\e651";
|
||||
}
|
||||
|
||||
.iconyouhui-:before {
|
||||
content: "\e607";
|
||||
}
|
||||
|
||||
.iconyouhuiquan:before {
|
||||
content: "\e7d8";
|
||||
}
|
||||
|
||||
.iconhongbao1:before {
|
||||
content: "\e662";
|
||||
}
|
||||
|
||||
.iconyue:before {
|
||||
content: "\e6b7";
|
||||
}
|
||||
|
||||
.iconduihao:before {
|
||||
content: "\e654";
|
||||
}
|
||||
|
||||
.iconsaomaqiang:before {
|
||||
content: "\e631";
|
||||
}
|
||||
|
||||
.iconjianmianjine:before {
|
||||
content: "\e6ab";
|
||||
}
|
||||
|
||||
.iconxuanzhong:before {
|
||||
content: "\e7df";
|
||||
}
|
||||
|
||||
.iconxianjin1:before {
|
||||
content: "\e62a";
|
||||
}
|
||||
|
||||
.iconyuan_checkbox:before {
|
||||
content: "\e72f";
|
||||
}
|
||||
|
||||
.iconyuan_checked:before {
|
||||
content: "\e733";
|
||||
}
|
||||
|
||||
.iconzengpin:before {
|
||||
content: "\e693";
|
||||
}
|
||||
|
||||
.icontuikuanjilu:before {
|
||||
content: "\e73b";
|
||||
}
|
||||
20
addon/cashier/source/os/common/js/config.js
Executable file
20
addon/cashier/source/os/common/js/config.js
Executable file
@@ -0,0 +1,20 @@
|
||||
var app = {
|
||||
appkey: 'cashier',
|
||||
version: '5.5.3',
|
||||
version_no: '553250709001',
|
||||
}
|
||||
|
||||
var config = {
|
||||
// 站点ID
|
||||
siteId: 0,
|
||||
// api请求地址 https://abc.com
|
||||
baseUrl: '{{$baseUrl}}',
|
||||
// 图片域名 https://abc.com
|
||||
imgDomain: '{{$imgDomain}}',
|
||||
//长链接 wss://abc.com/wss
|
||||
webSocket: '{{$webSocket}}',
|
||||
// app版本信息
|
||||
app: app,
|
||||
}
|
||||
|
||||
export default config;
|
||||
110
addon/cashier/source/os/common/js/http.js
Executable file
110
addon/cashier/source/os/common/js/http.js
Executable file
@@ -0,0 +1,110 @@
|
||||
import Config from './config.js'
|
||||
import Util from './util.js'
|
||||
|
||||
const app_type = 'pc';
|
||||
const app_type_name = 'PC';
|
||||
|
||||
export default {
|
||||
sendRequest(params) {
|
||||
var method = params.method ?? 'POST', // 请求方式
|
||||
url = Config.baseUrl + params.url, // 请求路径
|
||||
data = {
|
||||
app_type,
|
||||
app_type_name
|
||||
};
|
||||
|
||||
if (uni.getStorageSync('cashierToken')) data.token = uni.getStorageSync('cashierToken');
|
||||
|
||||
if (uni.getStorageSync('siteId')) data.site_id = uni.getStorageSync('siteId');
|
||||
|
||||
if (uni.getStorageSync('globalStoreId')) data.store_id = uni.getStorageSync('globalStoreId');
|
||||
|
||||
if (params.data != undefined) Object.assign(data, params.data);
|
||||
|
||||
if (params.async === false) {
|
||||
//同步
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.request({
|
||||
url: url,
|
||||
method: method,
|
||||
data: data,
|
||||
header: params.header || {
|
||||
'content-type': 'application/x-www-form-urlencoded;application/json'
|
||||
},
|
||||
dataType: params.dataType || 'json',
|
||||
responseType: params.responseType || 'json',
|
||||
success: (res) => {
|
||||
if (res.data.code == -10009 || res.data.code == -10010) {
|
||||
uni.removeStorage({
|
||||
key: 'cashierToken'
|
||||
});
|
||||
if (Util.getCurrRoute() != 'pages/login/login') {
|
||||
Util.redirectTo('/pages/login/login', {}, 'reLaunch');
|
||||
return;
|
||||
}
|
||||
}
|
||||
resolve(res.data);
|
||||
},
|
||||
fail: (res) => {
|
||||
reject(res);
|
||||
},
|
||||
complete: (res) => {
|
||||
// reject(res);
|
||||
}
|
||||
});
|
||||
})
|
||||
} else {
|
||||
//异步
|
||||
uni.request({
|
||||
url: url,
|
||||
method: method,
|
||||
data: data,
|
||||
header: params.header || {
|
||||
'content-type': 'application/x-www-form-urlencoded;application/json'
|
||||
},
|
||||
dataType: params.dataType || 'json',
|
||||
responseType: params.responseType || 'text',
|
||||
success: (res) => {
|
||||
if (res.data.code == -10009 || res.data.code == -10010) {
|
||||
uni.removeStorage({
|
||||
key: 'cashierToken'
|
||||
});
|
||||
if (Util.getCurrRoute() != 'pages/login/login') {
|
||||
Util.redirectTo('/pages/login/login', {}, 'reLaunch');
|
||||
return;
|
||||
}
|
||||
}
|
||||
typeof params.success == 'function' && params.success(res.data);
|
||||
},
|
||||
fail: (res) => {
|
||||
typeof params.fail == 'function' && params.fail(res);
|
||||
},
|
||||
complete: (res) => {
|
||||
typeof params.complete == 'function' && params.complete(res);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
post(url, params) {
|
||||
const option = {
|
||||
url,
|
||||
method: 'post',
|
||||
async: false
|
||||
};
|
||||
return this.sendRequest({
|
||||
...params,
|
||||
...option
|
||||
});
|
||||
},
|
||||
get(url, params) {
|
||||
const option = {
|
||||
url,
|
||||
method: 'get',
|
||||
async: false
|
||||
};
|
||||
return this.sendRequest({
|
||||
...params,
|
||||
...option
|
||||
});
|
||||
}
|
||||
}
|
||||
150
addon/cashier/source/os/common/js/mixin.js
Executable file
150
addon/cashier/source/os/common/js/mixin.js
Executable file
@@ -0,0 +1,150 @@
|
||||
import {mapGetters} from 'vuex';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 左侧菜单,支持触发的按键集合
|
||||
menuKeyCode: ['F6', 'F7', 'F8', 'F9', 'F10', 'F11'],
|
||||
themeColor: ''
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
|
||||
this.setNavigationBarTitleText();
|
||||
|
||||
// 监听键盘回调
|
||||
window.POS_HOTKEY_CALLBACK = (control, code) => {
|
||||
this.$store.commit('billing/setIsShowCashBox',true);
|
||||
// 触发左侧菜单按键回调
|
||||
this.menuTriggerKeyCodeCallBack(code);
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
cashierToken() {
|
||||
return uni.getStorageSync('cashierToken');
|
||||
},
|
||||
...mapGetters([
|
||||
'rootSize', 'defaultImg', 'addon', 'menu', 'userInfo', 'themeConfig',
|
||||
'globalStoreId', 'globalStoreInfo', 'globalMemberId', 'globalMemberInfo'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'globalStoreInfo.store_id': {
|
||||
handler(nval, oval) {
|
||||
if (oval && typeof this.switchStoreAfter == 'function') {
|
||||
this.switchStoreAfter();
|
||||
this.setNavigationBarTitleText();
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
themeConfig:{
|
||||
handler(nval,oval){
|
||||
if(nval && oval && oval.color && nval.color != oval.color) {
|
||||
this.loadThemeColor();
|
||||
}
|
||||
},
|
||||
deep:true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 设置页面标题
|
||||
*/
|
||||
setNavigationBarTitleText() {
|
||||
let pages = getCurrentPages();
|
||||
let currentPage = pages[pages.length - 1];
|
||||
if (currentPage && currentPage.$holder && currentPage.$holder.navigationBarTitleText) {
|
||||
let title = currentPage.$holder.navigationBarTitleText;
|
||||
if (this.globalStoreInfo) title += '-' + this.globalStoreInfo.store_name;
|
||||
if (title != currentPage.$holder.navigationBarTitleText) uni.setNavigationBarTitle({
|
||||
title: title
|
||||
})
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
this.setNavigationBarTitleText();
|
||||
}, 800)
|
||||
}
|
||||
},
|
||||
// 触发左侧菜单按键回调
|
||||
menuTriggerKeyCodeCallBack(code) {
|
||||
if (this.menuKeyCode.indexOf(code) != -1) {
|
||||
let data = null;
|
||||
for (let i = 0; i < this.menu.length; i++) {
|
||||
let item = this.menu[i];
|
||||
if (item.keyCode == code) {
|
||||
data = item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (data) {
|
||||
|
||||
// #ifdef H5
|
||||
if (data.path == this.$route.path) return;
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
if (data.path == '/' + this.$mp.page.route) return;
|
||||
// #endif
|
||||
|
||||
this.$util.redirectTo(data.path, data.query ?? {});
|
||||
}
|
||||
}
|
||||
},
|
||||
themeColorSet() {
|
||||
let theme = this.themeConfig;
|
||||
this.themeColor = `--primary-color:${theme.color};`;
|
||||
for (let i = 9; i >= 1; i--) {
|
||||
let color = this.$util.colourBlend(theme.color, '#ffffff', (i / 10));
|
||||
this.themeColor += `--primary-color-light-${i}:${color};`;
|
||||
}
|
||||
},
|
||||
loadThemeColor(){
|
||||
let time = setInterval(() => {
|
||||
let theme = this.themeConfig;
|
||||
if (theme && theme.color) {
|
||||
this.themeColorSet();
|
||||
clearInterval(time);
|
||||
}
|
||||
}, 50);
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
/**
|
||||
* 金额格式化
|
||||
* @param {Object} money
|
||||
*/
|
||||
moneyFormat(money) {
|
||||
if (isNaN(money)) return money;
|
||||
return parseFloat(money).toFixed(2);
|
||||
},
|
||||
/**
|
||||
* 时间格式化
|
||||
* @param {Object} time 时间戳
|
||||
* @param {Object} format 输出格式
|
||||
*/
|
||||
timeFormat(time, format = 'Y-m-d H:i:s') {
|
||||
var date = new Date();
|
||||
date.setTime(time * 1000);
|
||||
|
||||
var y = date.getFullYear();
|
||||
var m = date.getMonth() + 1;
|
||||
var d = date.getDate();
|
||||
var h = date.getHours();
|
||||
var i = date.getMinutes();
|
||||
var s = date.getSeconds();
|
||||
|
||||
format = format.replace('Y', y);
|
||||
format = format.replace('m', (m < 10 ? '0' + m : m));
|
||||
format = format.replace('d', (d < 10 ? '0' + d : d));
|
||||
format = format.replace('H', (h < 10 ? '0' + h : h));
|
||||
format = format.replace('i', (i < 10 ? '0' + i : i));
|
||||
format = format.replace('s', (s < 10 ? '0' + s : s));
|
||||
|
||||
return format;
|
||||
},
|
||||
mobileFormat(mobile) {
|
||||
return mobile.substring(0, 4 - 1) + '****' + mobile.substring(6 + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
14
addon/cashier/source/os/common/js/pos.js
Executable file
14
addon/cashier/source/os/common/js/pos.js
Executable file
@@ -0,0 +1,14 @@
|
||||
// import { ipcRenderer } from 'electron';
|
||||
export default {
|
||||
send(call, param) {
|
||||
if (window.ipcRenderer != undefined) {
|
||||
window.ipcRenderer.send(call, param);
|
||||
}
|
||||
if (window.POS_ != undefined) {
|
||||
window.POS_.send(call, param);
|
||||
}
|
||||
//window.ipcRenderer.send('Print', '渲染进程')
|
||||
//window.ipcRenderer.invoke('Print', '渲染进程')
|
||||
},
|
||||
|
||||
}
|
||||
51
addon/cashier/source/os/common/js/storage.js
Executable file
51
addon/cashier/source/os/common/js/storage.js
Executable file
@@ -0,0 +1,51 @@
|
||||
import Config from './config.js'
|
||||
|
||||
const prefix = Config.baseUrl.replace(/(http:\/\/)|(https:\/\/)/g, '');
|
||||
var oldPrefix = uni.getStorageSync('prefix');
|
||||
|
||||
// 域名不一致,清空
|
||||
if (oldPrefix != prefix) {
|
||||
uni.clearStorageSync();
|
||||
}
|
||||
uni.setStorageSync('prefix', prefix);
|
||||
|
||||
const handleKey = (key) => {
|
||||
const storageKey = (prefix ? `${prefix}_` : '') + key;
|
||||
return storageKey;
|
||||
};
|
||||
|
||||
export function uniStorage() {
|
||||
const setStorageSync = uni.setStorageSync;
|
||||
const setStorage = uni.setStorage;
|
||||
const getStorage = uni.getStorage;
|
||||
const getStorageSync = uni.getStorageSync;
|
||||
const removeStorage = uni.removeStorage;
|
||||
const removeStorageSync = uni.removeStorageSync;
|
||||
|
||||
uni.setStorage = (options) => {
|
||||
options.key = handleKey(options.key);
|
||||
setStorage(options)
|
||||
};
|
||||
|
||||
uni.setStorageSync = (key, data) => {
|
||||
setStorageSync(handleKey(key), data)
|
||||
};
|
||||
|
||||
uni.getStorage = (options) => {
|
||||
options.key = handleKey(options.key);
|
||||
getStorage(options)
|
||||
};
|
||||
|
||||
uni.getStorageSync = (key) => {
|
||||
return getStorageSync(handleKey(key))
|
||||
};
|
||||
|
||||
uni.removeStorage = (options) => {
|
||||
options.key = handleKey(options.key);
|
||||
removeStorage(options)
|
||||
};
|
||||
|
||||
uni.removeStorageSync = (key) => {
|
||||
return removeStorageSync(handleKey(key))
|
||||
}
|
||||
}
|
||||
340
addon/cashier/source/os/common/js/util.js
Executable file
340
addon/cashier/source/os/common/js/util.js
Executable file
@@ -0,0 +1,340 @@
|
||||
import Config from './config.js'
|
||||
import Store from '@/store/index.js'
|
||||
|
||||
export default {
|
||||
/**
|
||||
* 页面跳转
|
||||
* @param {string} to 跳转链接 /pages/idnex/index
|
||||
* @param {Object} param 参数 {key : value, ...}
|
||||
* @param {string} mode 模式
|
||||
*/
|
||||
redirectTo(to, param, mode) {
|
||||
let tabbar = [
|
||||
"/pages/billing/index", // 开单
|
||||
"/pages/reserve/index", // 预约
|
||||
"/pages/buycard/index", // 售卡
|
||||
"/pages/recharge/index", // 充值
|
||||
"/pages/verify/index" // 核销
|
||||
];
|
||||
if (tabbar.indexOf(to) != -1) mode = 'tabbar';
|
||||
|
||||
Store.commit('app/setCurrRoute', to);
|
||||
let url = to;
|
||||
if (param != undefined) {
|
||||
Object.keys(param).forEach(function (key) {
|
||||
if (url.indexOf('?') != -1) {
|
||||
url += "&" + key + "=" + param[key];
|
||||
} else {
|
||||
url += "?" + key + "=" + param[key];
|
||||
}
|
||||
});
|
||||
}
|
||||
switch (mode) {
|
||||
case 'tabbar':
|
||||
// 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面。
|
||||
uni.switchTab({
|
||||
url
|
||||
});
|
||||
break;
|
||||
case 'redirectTo':
|
||||
// 关闭当前页面,跳转到应用内的某个页面。
|
||||
uni.redirectTo({
|
||||
url
|
||||
});
|
||||
break;
|
||||
case 'reLaunch':
|
||||
// 关闭所有页面,打开到应用内的某个页面。
|
||||
uni.reLaunch({
|
||||
url
|
||||
});
|
||||
break;
|
||||
default:
|
||||
// 保留当前页面,跳转到应用内的某个页面
|
||||
uni.navigateTo({
|
||||
url
|
||||
});
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 图片路径转换
|
||||
* @param {String} img_path 图片地址
|
||||
* @param {Object} params 参数,针对商品、相册里面的图片区分大中小,size: big、mid、small
|
||||
*/
|
||||
img(img_path, params) {
|
||||
var path = "";
|
||||
if (img_path != undefined && img_path != "") {
|
||||
if (img_path.split(',').length > 1) {
|
||||
img_path = img_path.split(',')[0];
|
||||
}
|
||||
if (params && img_path) {
|
||||
// 过滤默认图
|
||||
let arr = img_path.split(".");
|
||||
let suffix = arr[arr.length - 1];
|
||||
arr.pop();
|
||||
arr[arr.length - 1] = arr[arr.length - 1] + "_" + params.size.toUpperCase();
|
||||
arr.push(suffix);
|
||||
img_path = arr.join(".");
|
||||
}
|
||||
if (img_path.indexOf("http://") == -1 && img_path.indexOf("https://") == -1) {
|
||||
path = Config.imgDomain + "/" + img_path;
|
||||
} else {
|
||||
path = img_path;
|
||||
}
|
||||
}
|
||||
return path;
|
||||
},
|
||||
/**
|
||||
* 验证当前数组或对象是否为空
|
||||
* @param param 校验对象
|
||||
*/
|
||||
checkIsNotNull(param) {
|
||||
if (param) {
|
||||
if (typeof (param) == 'object') {
|
||||
if (Array.isArray(param)) {
|
||||
if (param.length > 0) return true
|
||||
} else {
|
||||
if (JSON.stringify(param) != '{}') return true
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
/**
|
||||
* 金额格式化
|
||||
* @param {Object} money
|
||||
*/
|
||||
moneyFormat(money) {
|
||||
if (isNaN(parseFloat(money))) return money;
|
||||
return parseFloat(money).toFixed(2);
|
||||
},
|
||||
/**
|
||||
* 时间格式化
|
||||
* @param {Object} time 时间戳
|
||||
* @param {Object} format 输出格式
|
||||
*/
|
||||
timeFormat(time, format = 'y-m-d h:i:s') {
|
||||
//一律用小写转换
|
||||
format = format.toLowerCase();
|
||||
if(time == 0) return '--';
|
||||
var date = new Date();
|
||||
date.setTime(time * 1000);
|
||||
|
||||
var y = date.getFullYear();
|
||||
var m = date.getMonth() + 1;
|
||||
var d = date.getDate();
|
||||
var h = date.getHours();
|
||||
var i = date.getMinutes();
|
||||
var s = date.getSeconds();
|
||||
|
||||
format = format.replace('y', y);
|
||||
format = format.replace('m', (m < 10 ? '0' + m : m));
|
||||
format = format.replace('d', (d < 10 ? '0' + d : d));
|
||||
format = format.replace('h', (h < 10 ? '0' + h : h));
|
||||
format = format.replace('i', (i < 10 ? '0' + i : i));
|
||||
format = format.replace('s', (s < 10 ? '0' + s : s));
|
||||
|
||||
return format;
|
||||
},
|
||||
/**
|
||||
* 日期格式转时间戳
|
||||
* @param {Object} string
|
||||
*/
|
||||
timeTurnTimeStamp(string) {
|
||||
var f = string.split(' ', 2);
|
||||
var d = (f[0] ? f[0] : '').split('-', 3);
|
||||
var t = (f[1] ? f[1] : '').split(':', 3);
|
||||
return (new Date(
|
||||
parseInt(d[0], 10) || null,
|
||||
(parseInt(d[1], 10) || 1) - 1,
|
||||
parseInt(d[2], 10) || null,
|
||||
parseInt(t[0], 10) || null,
|
||||
parseInt(t[1], 10) || null,
|
||||
parseInt(t[2], 10) || null
|
||||
)).getTime() / 1000;
|
||||
},
|
||||
/**
|
||||
* 获取当前页面路由
|
||||
*/
|
||||
getCurrRoute() {
|
||||
let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
|
||||
return routes.length ? routes[routes.length - 1].route : '';
|
||||
},
|
||||
/**
|
||||
* 显示消息提示框
|
||||
* @param {Object} params 参数
|
||||
*/
|
||||
showToast(params = {}) {
|
||||
params.title = params.title || "";
|
||||
params.icon = params.icon || "none";
|
||||
// params.position = params.position || 'bottom';
|
||||
params.duration = params.duration || 1500;
|
||||
uni.showToast(params);
|
||||
if (params.success) params.success();
|
||||
},
|
||||
/*
|
||||
* 深度拷贝对象
|
||||
* @param {Object} obj
|
||||
*/
|
||||
deepClone(obj) {
|
||||
const isObject = function (obj) {
|
||||
return typeof obj == 'object';
|
||||
}
|
||||
|
||||
if (!isObject(obj)) {
|
||||
throw new Error('obj 不是一个对象!')
|
||||
}
|
||||
//判断传进来的是对象还是数组
|
||||
let isArray = Array.isArray(obj)
|
||||
let cloneObj = isArray ? [] : {}
|
||||
//通过for...in来拷贝
|
||||
for (let key in obj) {
|
||||
cloneObj[key] = isObject(obj[key]) ? this.deepClone(obj[key]) : obj[key]
|
||||
}
|
||||
return cloneObj
|
||||
},
|
||||
/**
|
||||
* 图片选择加上传
|
||||
* @param num
|
||||
* @param params
|
||||
* @param callback
|
||||
* @param url
|
||||
*/
|
||||
upload: function (num, params, callback, url) {
|
||||
const app_type = 'pc';
|
||||
const app_type_name = 'PC';
|
||||
|
||||
var data = {
|
||||
token: uni.getStorageSync('cashierToken'),
|
||||
app_type: app_type,
|
||||
app_type_name: app_type_name
|
||||
}
|
||||
data = Object.assign(data, params);
|
||||
|
||||
var imgs_num = num;
|
||||
var _self = this;
|
||||
|
||||
uni.chooseImage({
|
||||
count: imgs_num,
|
||||
sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera'], //从相册或者拍照
|
||||
success: async function (res) {
|
||||
const tempFilePaths = res.tempFilePaths;
|
||||
var _data = data;
|
||||
var imgs = [];
|
||||
for (var i = 0; i < tempFilePaths.length; i++) {
|
||||
var path = await _self.upload_file_server(tempFilePaths[i], _data, params.path, url);
|
||||
imgs.push(path);
|
||||
}
|
||||
|
||||
typeof callback == 'function' && callback(imgs);
|
||||
},
|
||||
fail: err => {
|
||||
console.log('图片上传错误', err)
|
||||
}
|
||||
});
|
||||
},
|
||||
//上传
|
||||
upload_file_server(tempFilePath, data, path, url = "") {
|
||||
if (url) {
|
||||
var uploadUrl = Config.baseUrl + url
|
||||
} else {
|
||||
var uploadUrl = Config.baseUrl + '/cashier/storeapi/upload/' + path
|
||||
}
|
||||
data.site_id = uni.getStorageSync('siteId');
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.uploadFile({
|
||||
url: uploadUrl,
|
||||
filePath: tempFilePath,
|
||||
name: 'file',
|
||||
formData: data,
|
||||
success: function (res) {
|
||||
var path_str = JSON.parse(res.data);
|
||||
if (path_str.code >= 0) {
|
||||
resolve(path_str.data.pic_path);
|
||||
} else {
|
||||
reject("error");
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 验证手机号
|
||||
* @param {string} mobile 被验证的mobile
|
||||
* @return {object} 验证后的结果
|
||||
**/
|
||||
verifyMobile(mobile) {
|
||||
var parse =/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(mobile);
|
||||
return parse;
|
||||
},
|
||||
clearStoreData() {
|
||||
Store.commit('app/setGlobalStoreInfo', null);
|
||||
Store.commit('app/setGlobalStoreId', 0);
|
||||
Store.commit('app/setGlobalMemberInfo', null);
|
||||
Store.commit('app/setUserInfo', null);
|
||||
Store.commit('app/setMenu', []);
|
||||
|
||||
// 开单
|
||||
Store.commit('billing/setGoodsData', {});
|
||||
Store.commit('billing/setPendOrderId',0);
|
||||
Store.commit('billing/setGoodsIds', []);
|
||||
Store.commit('billing/setOrderData', {});
|
||||
Store.commit('billing/setActive', '');
|
||||
Store.commit('billing/setIsScanTrigger', false);
|
||||
|
||||
// 售卡
|
||||
Store.commit('buycard/setGoodsData', {});
|
||||
Store.commit('buycard/setOrderData', {});
|
||||
Store.commit('buycard/setActive', '');
|
||||
|
||||
// 充值
|
||||
Store.commit('recharge/setActive', '');
|
||||
},
|
||||
/**
|
||||
* 颜色减值
|
||||
* @param {Object} c1
|
||||
* @param {Object} c2
|
||||
* @param {Object} ratio
|
||||
*/
|
||||
colourBlend(c1, c2, ratio) {
|
||||
ratio = Math.max(Math.min(Number(ratio), 1), 0)
|
||||
let r1 = parseInt(c1.substring(1, 3), 16)
|
||||
let g1 = parseInt(c1.substring(3, 5), 16)
|
||||
let b1 = parseInt(c1.substring(5, 7), 16)
|
||||
let r2 = parseInt(c2.substring(1, 3), 16)
|
||||
let g2 = parseInt(c2.substring(3, 5), 16)
|
||||
let b2 = parseInt(c2.substring(5, 7), 16)
|
||||
let r = Math.round(r1 * (1 - ratio) + r2 * ratio)
|
||||
let g = Math.round(g1 * (1 - ratio) + g2 * ratio)
|
||||
let b = Math.round(b1 * (1 - ratio) + b2 * ratio)
|
||||
r = ('0' + (r || 0).toString(16)).slice(-2)
|
||||
g = ('0' + (g || 0).toString(16)).slice(-2)
|
||||
b = ('0' + (b || 0).toString(16)).slice(-2)
|
||||
return '#' + r + g + b
|
||||
},
|
||||
//商品类型字典
|
||||
goodsClassDict:{
|
||||
real:1,
|
||||
virtual:2,
|
||||
virtualcard:3,
|
||||
service:4,
|
||||
card:5,
|
||||
weigh:6,
|
||||
},
|
||||
setLocalConfig(obj){
|
||||
var local_config = this.getLocalConfig();
|
||||
local_config = Object.assign(local_config, obj);
|
||||
uni.setStorageSync('local_config', local_config);
|
||||
},
|
||||
getLocalConfig(){
|
||||
var local_config = uni.getStorageSync('local_config');
|
||||
if(!local_config) local_config = {};
|
||||
local_config = Object.assign({
|
||||
printerSelectType:'all',
|
||||
printerSelectIds:[],
|
||||
}, local_config);
|
||||
return local_config;
|
||||
},
|
||||
}
|
||||
173
addon/cashier/source/os/common/js/validate.js
Executable file
173
addon/cashier/source/os/common/js/validate.js
Executable file
@@ -0,0 +1,173 @@
|
||||
/**
|
||||
* 数据验证(表单验证)
|
||||
*/
|
||||
module.exports = {
|
||||
error: '',
|
||||
check: function(data, rule) {
|
||||
for (var i = 0; i < rule.length; i++) {
|
||||
if (!rule[i].checkType) {
|
||||
return true;
|
||||
}
|
||||
if (!rule[i].name) {
|
||||
return true;
|
||||
}
|
||||
if (!rule[i].errorMsg) {
|
||||
return true;
|
||||
}
|
||||
if (!data[rule[i].name]) {
|
||||
this.error = rule[i].errorMsg;
|
||||
return false;
|
||||
}
|
||||
switch (rule[i].checkType) {
|
||||
case 'custom':
|
||||
if (typeof rule[i].validate == 'function') {
|
||||
if (!rule[i].validate(data[rule[i].name])) {
|
||||
this.error = rule[i].errorMsg;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'required':
|
||||
var reg = new RegExp('/[\S]+/');
|
||||
if (reg.test(data[rule[i].name])) {
|
||||
this.error = rule[i].errorMsg;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'string':
|
||||
var reg = new RegExp('^.{' + rule[i].checkRule + '}$');
|
||||
if (!reg.test(data[rule[i].name])) {
|
||||
this.error = rule[i].errorMsg;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'int':
|
||||
var reg = new RegExp('^(-[1-9]|[1-9])[0-9]{' + rule[i].checkRule + '}$');
|
||||
if (!reg.test(data[rule[i].name])) {
|
||||
this.error = rule[i].errorMsg;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'between':
|
||||
if (!this.isNumber(data[rule[i].name])) {
|
||||
this.error = rule[i].errorMsg;
|
||||
return false;
|
||||
}
|
||||
var minMax = rule[i].checkRule.split(',');
|
||||
minMax[0] = Number(minMax[0]);
|
||||
minMax[1] = Number(minMax[1]);
|
||||
if (data[rule[i].name] > minMax[1] || data[rule[i].name] < minMax[0]) {
|
||||
this.error = rule[i].errorMsg;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'betweenD':
|
||||
var reg = /^-?[1-9][0-9]?$/;
|
||||
if (!reg.test(data[rule[i].name])) {
|
||||
this.error = rule[i].errorMsg;
|
||||
return false;
|
||||
}
|
||||
var minMax = rule[i].checkRule.split(',');
|
||||
minMax[0] = Number(minMax[0]);
|
||||
minMax[1] = Number(minMax[1]);
|
||||
if (data[rule[i].name] > minMax[1] || data[rule[i].name] < minMax[0]) {
|
||||
this.error = rule[i].errorMsg;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'betweenF':
|
||||
var reg = /^-?[0-9][0-9]?.+[0-9]+$/;
|
||||
if (!reg.test(data[rule[i].name])) {
|
||||
this.error = rule[i].errorMsg;
|
||||
return false;
|
||||
}
|
||||
var minMax = rule[i].checkRule.split(',');
|
||||
minMax[0] = Number(minMax[0]);
|
||||
minMax[1] = Number(minMax[1]);
|
||||
if (data[rule[i].name] > minMax[1] || data[rule[i].name] < minMax[0]) {
|
||||
this.error = rule[i].errorMsg;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'same':
|
||||
if (data[rule[i].name] != rule[i].checkRule) {
|
||||
this.error = rule[i].errorMsg;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'notsame':
|
||||
if (data[rule[i].name] == rule[i].checkRule) {
|
||||
this.error = rule[i].errorMsg;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'email':
|
||||
var reg = /^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/;
|
||||
if (!reg.test(data[rule[i].name])) {
|
||||
this.error = rule[i].errorMsg;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'phoneno':
|
||||
var reg = /^\d{11}$/;
|
||||
if (!reg.test(data[rule[i].name])) {
|
||||
this.error = rule[i].errorMsg;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'zipcode':
|
||||
var reg = /^[0-9]{6}$/;
|
||||
if (!reg.test(data[rule[i].name])) {
|
||||
this.error = rule[i].errorMsg;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'reg':
|
||||
var reg = new RegExp(rule[i].checkRule);
|
||||
if (!reg.test(data[rule[i].name])) {
|
||||
this.error = rule[i].errorMsg;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'in':
|
||||
if (rule[i].checkRule.indexOf(data[rule[i].name]) == -1) {
|
||||
this.error = rule[i].errorMsg;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'notnull':
|
||||
if (data[rule[i].name] == 0 || data[rule[i].name] == undefined || data[rule[i].name] ==
|
||||
null || data[rule[i].name]
|
||||
.length < 1) {
|
||||
this.error = rule[i].errorMsg;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'lengthMin':
|
||||
if (data[rule[i].name].length < rule[i].checkRule) {
|
||||
this.error = rule[i].errorMsg;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'lengthMax':
|
||||
if (data[rule[i].name].length > rule[i].checkRule) {
|
||||
this.error = rule[i].errorMsg;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'numberId':
|
||||
var pattern = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
|
||||
if (!pattern.test(data[rule[i].name])) {
|
||||
this.error = rule[i].errorMsg;
|
||||
return false
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
isNumber: function(checkVal) {
|
||||
var reg = /^-?[1-9][0-9]?.?[0-9]*$/;
|
||||
return reg.test(checkVal);
|
||||
}
|
||||
}
|
||||
243
addon/cashier/source/os/common/menu/store.js
Executable file
243
addon/cashier/source/os/common/menu/store.js
Executable file
@@ -0,0 +1,243 @@
|
||||
export default [{
|
||||
title: '开单',
|
||||
icon: 'iconkaidan',
|
||||
path: '/pages/billing/index',
|
||||
name: 'billing',
|
||||
keyCode: 'F6' // 触发按键
|
||||
},
|
||||
{
|
||||
title: '售卡',
|
||||
icon: 'iconqia',
|
||||
path: '/pages/buycard/index',
|
||||
name: 'buycard',
|
||||
keyCode: 'F7' // 触发按键
|
||||
},
|
||||
{
|
||||
title: '充值',
|
||||
icon: 'iconchongzhidingdan',
|
||||
path: '/pages/recharge/index',
|
||||
name: 'recharge',
|
||||
keyCode: 'F8' // 触发按键
|
||||
},
|
||||
{
|
||||
title: '订单',
|
||||
icon: 'icondingdan',
|
||||
path: '/pages/order/orderlist',
|
||||
name: 'order_list',
|
||||
keyCode: 'F9' // 触发按键
|
||||
},
|
||||
{
|
||||
title: '会员',
|
||||
icon: 'iconkehuguanli',
|
||||
path: '/pages/member/list',
|
||||
name: 'member_list',
|
||||
keyCode: 'F10' // 触发按键
|
||||
},
|
||||
{
|
||||
title: '核销',
|
||||
icon: 'iconhexiao',
|
||||
path: '/pages/verify/index',
|
||||
name: 'verify_index',
|
||||
keyCode: 'F11' // 触发按键
|
||||
},
|
||||
{
|
||||
title: '更多',
|
||||
icon: 'iconicon_yingyongguanli',
|
||||
childshow: true,
|
||||
children: [{
|
||||
title: '收银',
|
||||
children: [{
|
||||
title: '开单',
|
||||
icon: 'iconkaidan',
|
||||
path: '/pages/billing/index',
|
||||
name: 'billing'
|
||||
},
|
||||
{
|
||||
title: '售卡',
|
||||
icon: 'iconqia',
|
||||
path: '/pages/buycard/index',
|
||||
name: 'buycard'
|
||||
},
|
||||
{
|
||||
title: '核销',
|
||||
icon: 'iconhexiao',
|
||||
path: '/pages/verify/index',
|
||||
name: 'verify_index'
|
||||
},
|
||||
{
|
||||
title: '预约',
|
||||
icon: 'iconyuyueguanli',
|
||||
path: '/pages/reserve/index',
|
||||
name: 'reserve_index',
|
||||
addon: 'cardservice'
|
||||
},
|
||||
{
|
||||
title: '充值',
|
||||
icon: 'iconchongzhidingdan',
|
||||
path: '/pages/recharge/index',
|
||||
name: 'recharge'
|
||||
},
|
||||
{
|
||||
title: '交班',
|
||||
icon: 'icon12jiaobanbiao',
|
||||
path: '/pages/index/change_shifts',
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '管理',
|
||||
children: [{
|
||||
title: '商品管理',
|
||||
icon: 'iconshangpinguanli',
|
||||
path: '/pages/goods/goodslist',
|
||||
name: 'goods_list'
|
||||
},
|
||||
{
|
||||
title: '会员管理',
|
||||
icon: 'iconkehuguanli',
|
||||
path: '/pages/member/list',
|
||||
name: 'member_list'
|
||||
},
|
||||
{
|
||||
title: '员工管理',
|
||||
icon: 'iconjishi',
|
||||
path: '/pages/user/list',
|
||||
name: 'user_list'
|
||||
},
|
||||
{
|
||||
title: '订单管理',
|
||||
icon: 'icondingdan',
|
||||
path: '/pages/order/orderlist',
|
||||
name: 'order_list'
|
||||
},
|
||||
{
|
||||
title: '退款维权',
|
||||
icon: 'iconjishi',
|
||||
path: '/pages/order/orderrefund',
|
||||
name: 'order_refund_list'
|
||||
},
|
||||
{
|
||||
title: '交班记录',
|
||||
icon: 'icon12jiaobanbiao',
|
||||
path: '/pages/index/change_shiftsrecord',
|
||||
name: 'change_shifts_record_list'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '营销',
|
||||
name : 'promotion',
|
||||
children:[{
|
||||
title:'优惠券',
|
||||
icon:'icon31hongbao',
|
||||
path:'/pages/marketing/coupon_list',
|
||||
name:'coupon_list'
|
||||
}]
|
||||
},
|
||||
{
|
||||
title: '库存',
|
||||
name: 'stock',
|
||||
children: [{
|
||||
title: '出库单',
|
||||
icon: 'iconchukudan',
|
||||
path: '/pages/stock/wastage',
|
||||
name: 'stock_wastage',
|
||||
addon: 'stock'
|
||||
},
|
||||
{
|
||||
title: '入库单',
|
||||
icon: 'iconrukudan',
|
||||
path: '/pages/stock/storage',
|
||||
name: 'stock_storage',
|
||||
addon: 'stock'
|
||||
},
|
||||
{
|
||||
title: '调拨单',
|
||||
icon: 'icontiaobodan',
|
||||
path: '/pages/stock/allocate',
|
||||
name: 'stock_allocate',
|
||||
addon: 'stock'
|
||||
},
|
||||
{
|
||||
title: '库存盘点',
|
||||
icon: 'iconkucunpandian',
|
||||
path: '/pages/stock/check',
|
||||
name: 'stock_check',
|
||||
addon: 'stock'
|
||||
},
|
||||
{
|
||||
title: '库存管理',
|
||||
icon: 'iconkucunguanli',
|
||||
path: '/pages/stock/manage',
|
||||
name: 'stock_manage',
|
||||
addon: 'stock'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '数据',
|
||||
children: [{
|
||||
title: '门店结算',
|
||||
icon: 'iconshourujiesuan',
|
||||
path: '/pages/store/settlement',
|
||||
addon: 'store',
|
||||
name: 'store_settlement'
|
||||
},
|
||||
{
|
||||
title: '营业数据',
|
||||
icon: 'iconyingyeshujuguanliputong',
|
||||
path: '/pages/stat/index',
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '设置',
|
||||
children: [{
|
||||
title: '门店设置',
|
||||
icon: 'icongongyingshang',
|
||||
path: '/pages/store/index',
|
||||
name: 'store_config_root',
|
||||
},
|
||||
{
|
||||
title: '收款设置',
|
||||
icon: 'iconshoukuan-',
|
||||
path: '/pages/collectmoney/config',
|
||||
// name: 'collectmoney_config',
|
||||
},
|
||||
{
|
||||
title: '预约设置',
|
||||
icon: 'iconyuyue',
|
||||
path: '/pages/reserve/config',
|
||||
name: 'reserve_config',
|
||||
addon: 'cardservice'
|
||||
},
|
||||
{
|
||||
title: '小票打印',
|
||||
icon: 'icondayin',
|
||||
name: 'printer_config',
|
||||
path: '/pages/printer/list',
|
||||
},
|
||||
{
|
||||
title: '配送员',
|
||||
icon: 'iconpeisong',
|
||||
path: '/pages/store/deliver',
|
||||
name: 'store_deliver_config'
|
||||
},
|
||||
{
|
||||
title: '电子秤管理',
|
||||
icon: 'icondianzicheng',
|
||||
name: 'heavt_config',
|
||||
path: '/pages/scale/list',
|
||||
addon: 'scale'
|
||||
},
|
||||
{
|
||||
title: '本机设置',
|
||||
icon: 'iconbenji',
|
||||
path: '/pages/local/config',
|
||||
name: 'local_config',
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user