Files
GX.O3.WMS/APK/APP_O3/pages/apply/moreapply/barindex.vue
T

1213 lines
27 KiB
Vue
Executable File

<template>
<view class="content">
<view class="type-select-box">
<p class="cps">源 单 类</p>
<input type="text" style='border-color: #007AFF;border:2px solid #E8E8E8 ;' v-model="CKText" @input="CKonKeyInput"
@confirm="ckbegin()" :focus="isFocusK" />
<p class="retback" @click="del()">
删除
</p>
</view>
<view class="type-select-box">
<p class="cps">源单编号</p>
<input type="text" style='border-color: #007AFF;border:2px solid #E8E8E8' v-model="CWText" @confirm="cwbegin() "
:focus="isFocusw">
<!-- <p @click="sqr()" class="retback">
确定
</p> -->
<p @click="back()" class="retback">
返回
</p>
</view>
<view class="type-select-box">
<p class="cps">供 应 商</p>
<input type="text" style='border-color: #007AFF;border:2px solid #E8E8E8; ' v-model="BarcodeText" @input="onKeyInput"
:focus="isFocus" @confirm="begincreat()" />
<p class="retback" @tap="tj()">
提交
</p>
</view>
<view class="example-block">
<!-- <view class="table">
<z-table :textAlign="selectContent[nowType].textAlign" :titleTextAlign="selectContent[nowType].titleTextAlign"
:tableData="nowData" :columns="nowColumn" @onSort="doSort" :stickSide="selectContent[nowType].stickSide"
:showBottomSum="selectContent[nowType].showBottomSum" :showLoading="false" :emptyText='selectContent[nowType].emptyText'
:tableHeight='selectContent[nowType].tableHeight' @click="rowClick" :showSelect="selectContent[nowType].showSelect"
@onSelect="tableSelect"></z-table>
</view> -->
<view class="table">
<z-table :textAlign="selectContent[nowType].textAlign" :titleTextAlign="selectContent[nowType].titleTextAlign"
:tableData="nowData" :columns="nowColumn" @onSort="doSort" :stickSide="selectContent[nowType].stickSide"
:showBottomSum="selectContent[nowType].showBottomSum" :showLoading="false" :emptyText='selectContent[nowType].emptyText'
:tableHeight='selectContent[nowType].tableHeight' @onClick="rowClick" :showSelect="selectContent[nowType].showSelect"
@onSelect="tableSelect"></z-table>
</view>
</view>
</view>
</template>
<script>
// import zTable from "../../components/z-table/z-table.vue";
// import uniTag from "@/components/uni-tag/uni-tag.vue";
export default {
data() {
return {
isFocusK: true,
isFocusw: false,
isFocus: false,
names: "扫码",
CWText: "",
CKText: "",
BarcodeText: "",
title: "zTable使用示例",
showUpData: false,
nowType: 0,
nowData: true,
nowColumn: false,
nowHtml: '',
myDebounce: this.debounce(this.setTable),
showLoading: false,
showSelect: true,
// 设置区域
selectContent: [{
id: '',
name: '', // 功能名
textAlign: 'center', // 内容对齐方式
titleTextAlign: 'center', // 表头对齐方式
tableData: 'baseTableData', // 表格数据
columns: 'baseColumns', // 表格列内容
stickSide: false, // 左侧固定
showBottomSum: false, // 底部显示统计
emptyText: '暂无数据', // 表格内容为空时显示的内容
tableHeight: false, // 表格高度
showSelect: true, // 开启选择功能
sort: true,
html: 'baseHtml',
}, ],
baseTableData: [],
baseColumns: [{
title: "气瓶条码",
key: "FAirBottleBarcode",
width: 300
},
{
title: "当前仓库",
key: "FStockName",
width: 200
},
{
title: "下一仓库",
key: "FNextStockName",
width: 200
},
{
title: "仓位名称",
key: "FStockPlaceName",
width: 400
},
{
title: "气瓶钢号",
key: "FAirBottleNumber",
width: 300
},
{
title: "末次检验日期",
key: "FLastTestDate",
width: 300
}, {
title: "下次检验日期",
key: "FNextTestDate",
width: 300
},
{
title: "物料代码",
key: "FMaterialNumber",
width: 300
},
{
title: "物料名称",
key: "FMaterialName",
width: 300
}, {
title: "物料规格",
key: "FMaterialModel",
width: 300
},
{
title: "气瓶容积",
key: "FVolume",
width: 300
}, {
title: "气瓶种类",
key: "FMode",
width: 300
}, {
title: "单位内编码",
key: "FSize",
width: 300
},
],
}
},
onLoad() {
this.shows();
//this.showtab();
},
components: {
// zTable,
// uniTag
},
watch: {
nowType: {
handler() {
this.nowData = false
this.nowColumn = false
this.myDebounce()
},
immediate: true
}
},
methods: {
//扫描仓库
ckbegin: function() {
var that = this;
const DBAias = uni.getStorageSync('DBAias');
//const result = uni.getStorageSync('result');
const UserID = uni.getStorageSync('UserID');
const IsEachCheck = uni.getStorageSync('IsEachCheck');
const CKText = uni.getStorageSync("CKText");
const CKTag = uni.getStorageSync("CKTag");
const CKReadOnly = uni.getStorageSync("CKReadOnly");
// uni.scanCode({
// success: function(res) {
// if (res.errMsg == "scanCode:ok") {
// //this.BarcodeText = '';
// //uni.setStorageSync('result', res.result);
// that.CKText = res.result;
// uni.setStorageSync('ck', that.CKText)
// console.log(that.CKText)
// } else {
// uni.showToast({
// title: res.errMsg
// });
// }
// setTimeout(() => {
// //this.focusInert();
// //this.showtab();
// }, 0)
// },
// });
// //console.log(that.CKText)
// const ck = uni.getStorageSync('ck')
// console.log(DBAias)
// console.log(UserID)
// console.log(CKTag)
uni.request({
url: that.baseUrl + '/api/stock/StockOpen',
method: 'GET',
data: {
DBAias: DBAias,
UserID: UserID,
CKTag: CKTag,
CKtext: that.CKText
},
success: rt => {
uni.showToast({
icon: "none",
title: rt.data.Data[0].FName,
});
//console.log(ck)
//console.log(ck)
console.log(rt.data.Status)
console.log(rt.data.Data[0].FInterID)
console.log(rt.data.Data[0].FName)
if (rt.data.Status == 200) {
that.isFocusK = false;
uni.setStorageSync('FInterID', rt.data.Data[0].FInterID);
//uni.setStorageSync('FNumber',res.data.Data.FNumber)
console.log(rt.data.Data[0].FInterID)
setTimeout(function() {
that.isFocusw = true;
}, 500);
} else {
that.isFocusK = true;
uni.showToast({
icon: "none",
title: rt.data.Message
})
}
},
fail: () => {
setTimeout(function() {
uni.showToast({
icon: "none",
title: "请检查网络"
})
}, 10000);
},
complete: () => {
}
});
},
//扫描仓位
cwbegin: function() {
var that = this;
const ckid = uni.getStorageSync('FInterID')
const DBAias = uni.getStorageSync('DBAias');
const result = uni.getStorageSync('result');
const UserID = uni.getStorageSync('UserID');
const IsEachCheck = uni.getStorageSync('IsEachCheck');
//const CKText = uni.getStorageSync("CKText");
const CKTag = uni.getStorageSync("CKTag");
const CKReadOnly = uni.getStorageSync("CKReadOnly");
if (that.CKText.length <= 0) {
uni.showToast({
title: "请先扫描仓库"
});
that.isFocusK = true;
return false;
}
// uni.scanCode({
// success: function(res) {
// if (res.errMsg == "scanCode:ok") {
// //this.BarcodeText = '';
// uni.setStorageSync('result', res.result);
// this.CWText = res.result;
// } else {
// uni.showToast({
// title: res.errMsg
// });
// }
// //this.isFocus = true;
// setTimeout(() => {
// //this.focusInert();
// //this.showtab();
// }, 0)
// }.bind(this)
// });
uni.request({
url: that.baseUrl + '/api/stock/StockPlaceOpen',
method: 'GET',
data: {
DBAias: DBAias,
UserID: UserID,
CKTag: ckid,
CWtext: that.CWText,
CKText: that.CKText,
},
success: res => {
if (res.data.Status == 200) {
uni.showToast({
icon: "none",
title: res.data.Data[0].FName,
duration: 2500,
});
//uni.setStorageSync('FItemID', res.data.Data[0].FItemID);
that.isFocusw = false;
setTimeout(function() {
that.isshows();
}, 500);
} else {
that.isFocusw = true;
uni.showToast({
icon: "none",
title: res.data.Message
})
}
},
fail: () => {
setTimeout(function() {
uni.showToast({
icon: "none",
title: "请检查网络"
})
}, 10000);
},
complete: () => {}
});
},
//扫码
isshows: function() {
var that = this;
setTimeout(function() {
that.isFocus = true;
}, 500);
setTimeout(function() {
that.isFocus = false;
}, 1000);
},
begincreat: function() {
var that = this;
if (that.CKText.length <= 0 || that.CWText <= 0) {
uni.showToast({
title: "请按顺序扫描"
});
//that.isFocus = true;
return false;
}
setTimeout(function() {
that.isFocus = true;
}, 500);
console.log("调接口了")
that.showtab();
},
// begincreat: function() {
// var that = this;
// that.showtab();
// /* uni.scanCode({
// success: function(res) {
// if (res.errMsg == "scanCode:ok") {
// //this.BarcodeText = '';
// uni.setStorageSync('result', res.result);
// this.BarcodeText = res.result;
// this.showtab();
// } else {
// uni.showToast({
// title: res.errMsg
// });
// }
// //this.isFocus = true;
// setTimeout(() => {
// //this.focusInert();
// //this.showtab();
// }, 0)
// }.bind(this)
// }); */
// },
focusInert: function() {
this.isFocus = true;
},
onKeyInput: function(e) {
if (this.BarcodeText.length >= 1) {
this.names = "确认";
} else if (this.BarcodeText == 0) {
this.names = "扫码";
}
console.log(e.detail.value)
},
// CKonKeyInput: function(e) {
// if (e.detail.value == 'k') {
// uni.reLaunch({
// url: '/pages/select/indexs'
// })
// }
// },
changeType(index) {
if (this.nowType === index) return
this.nowType = index
},
setTable() {
this.nowData = this.$data[this.selectContent[this.nowType].tableData]
this.nowColumn = this.$data[this.selectContent[this.nowType].columns]
this.nowHtml = this.$data[this.selectContent[this.nowType].html]
},
sqr: function() {
this.showtab();
},
// //扫码功能
// sqr: function() {
// // this.isFocus = true;
// console.log('初始值:' + this.isFocus)
// const rest = uni.getStorageSync('result');
// const liis = uni.getStorageSync("lists");
// if (this.BarcodeText.length == 0) {
// //启用短暂手机振动
// uni.vibrateLong({
// success: function() {
// console.log('success');
// }
// });
// //uni.removeStorageSync('result')
// const sqr = uni.getStorageSync('sqr');
// uni.scanCode({
// success: function(res) {
// if (res.errMsg == "scanCode:ok") {
// uni.setStorageSync('result', res.result);
// } else {
// uni.showToast({
// title: res.data.errMsg
// });
// }
// //this.isFocus = true;
// console.log(' 扫码成功后' + this.isFocus)
// setTimeout(() => {
// }, 0)
// }.bind(this)
// });
// } else if (this.BarcodeText.length >= 1) {
// this.names = "确认";
// var list = [];
// var that = this;
// const DBAias = uni.getStorageSync('DBAias');
// const result = uni.getStorageSync('result');
// const UserID = uni.getStorageSync('UserID');
// const IsEachCheck = uni.getStorageSync('IsEachCheck');
// const CKText = uni.getStorageSync("CKText");
// const CKTag = uni.getStorageSync("CKTag");
// const CKReadOnly = uni.getStorageSync("CKReadOnly");
// //点击执行
// uni.request({
// url: this.baseUrl + '/api/stock/GetBarcode',
// method: 'GET',
// data: {
// FType: 'X',
// DBAias: DBAias,
// UserID: UserID,
// BarcodeText: this.BarcodeText,
// IsEachCheck: IsEachCheck,
// CKtext: this.CKText,
// CKTag: CKTag,
// CKReadOnly: CKReadOnly,
// //CWText: "08.01",
// },
// success: res => {
// //console.log(res.data.Data.CKText);
// if (res.data.Status == 200) {
// for (let i = 0; i < that.baseTableData.length; i++) {
// if (that.baseTableData[i].IsContainer == true && that.baseTableData[i].FContainerID == res.data.Data.FAirBottleBarcode) {
// uni.showToast({
// title: "重复码",
// icon: 'none'
// });
// return false;
// } else if (that.baseTableData[i].IsContainer == false && that.baseTableData[i].FAirBottleID == res.data.Data
// .FAirBottleID) {
// uni.showToast({
// title: "重复码",
// icon: 'none'
// });
// return false;
// } else if (that.baseTableData[i].FAirBottleBarcode == res.data.Data.FAirBottleBarcode) {
// uni.showToast({
// title: "重复码",
// icon: 'none'
// });
// console.log('相同项为' + that.baseTableData[i].FAirBottleBarcode);
// return false;
// }
// }
// //if(res.data.Data.IsContainer==true && res.data.Data.FContainerID ==res.data.Data.BarcodeTag)
// console.log(res.data.Status)
// list = res.data.Data
// this.baseTableData.push(list);
// console.log(this.baseTableData);
// } else {
// //启用短暂手机振动
// uni.vibrateLong({
// success: function() {
// console.log('success');
// }
// });
// uni.showToast({
// title: res.data.Message,
// icon: 'none'
// });
// }
// },
// fail: () => {
// setTimeout(function() {
// uni.showToast({
// icon: "none",
// title: "请检查网络"
// })
// }, 10000);
// },
// complete: () => {
// this.isFocus = true;
// },
// });
// }
// },
//获取表格单据信息
showtab: function() {
console.log("先进来看看")
var list = [];
var that = this;
//var lsits = JSON.stringify(that.baseTableData);
const DBAias = uni.getStorageSync('DBAias');
const result = uni.getStorageSync('result');
const UserID = uni.getStorageSync('UserID');
const IsEachCheck = uni.getStorageSync('IsEachCheck');
//const CKText = uni.getStorageSync("CKText");
const CKTag = uni.getStorageSync("CKTag");
const CKReadOnly = uni.getStorageSync("CKReadOnly");
//const liis=uni.getStorageSync("lists");
uni.request({
url: that.baseUrl + '/api/stock/GetBarcode',
method: 'GET',
data: {
FType: 'X',
DBAias: DBAias,
UserID: UserID,
BarcodeText: this.BarcodeText,
IsEachCheck: IsEachCheck,
CKText: this.CKText,
CKTag: CKTag,
CKReadOnly: CKReadOnly,
CWText: this.CWText,
},
success: res => {
//console.log(res.data.Data.CKText);
if (res.data.Status == 200) {
for (let i = 0; i < that.baseTableData.length; i++) {
if (that.baseTableData[i].IsContainer == true && that.baseTableData[i].FContainerID == res.data.Data.FAirBottleBarcode) {
uni.showToast({
title: "重复扫码",
icon: 'none'
});
that.isshows();
this.BarcodeText='';
return false;
} else if (that.baseTableData[i].IsContainer == false && that.baseTableData[i].FAirBottleID == res.data.Data
.FAirBottleID) {
uni.showToast({
title: "重复扫码",
icon: 'none'
});
that.isshows();
this.BarcodeText='';
return false;
} else if (that.baseTableData[i].FAirBottleBarcode == res.data.Data.FAirBottleBarcode) {
uni.showToast({
title: "重复扫码",
icon: 'none'
});
console.log('相同项为' + that.baseTableData[i].FAirBottleBarcode);
that.isshows();
this.BarcodeText='';
return false;
}
}
console.log(res.data.Data.FAirBottleBarcode);
console.log(result)
//if(res.data.Data.IsContainer==true && res.data.Data.FContainerID ==res.data.Data.BarcodeTag)
//console.log(res.data.Status)
//list = res.data.Data;
// 保存下来的list
//uni.setStorageSync("lists", list.FAirBottleBarcode);
that.baseTableData.push(res.data.Data);
list = that.baseTableData;
console.log(JSON.stringify(that.baseTableData))
that.BarcodeText = '';
that.isshows();
} else {
that.isshows();
//启用短暂手机振动
uni.vibrateLong({
success: function() {
console.log('success');
}
});
uni.showToast({
title: res.data.Message,
icon: 'none'
});
}
//console.log(list)
},
fail: () => {
setTimeout(function() {
uni.showToast({
icon: "none",
title: "请检查网络"
})
}, 2500);
},
complete: () => {},
});
},
//获取信息页面初始化
shows: function() {
var that = this;
const DBAias = uni.getStorageSync('DBAias');
const UserID = uni.getStorageSync('UserID');
console.log('账套' + DBAias)
console.log(UserID)
uni.request({
url: that.baseUrl + '/api/stock/Init',
method: 'GET',
data: {
FType: 'X',
DBAias: DBAias,
UserID: UserID
},
success: res => {
if (res.data.Status == 200) {
console.log(res.data.Data.CKText);
console.log(res.data.Data.IsEachCheck);
//that.CKText = res.data.Data.CKText;
uni.setStorageSync("IsEachCheck", res.data.Data.IsEachCheck)
uni.setStorageSync("CKTag", res.data.Data.CKTag)
uni.setStorageSync("CKReadOnly", res.data.Data.CKReadOnly)
uni.setStorageSync("PrgKey", res.data.Data.PrgKey)
uni.setStorageSync("FType", res.data.Data.FType)
// uni.setStorageSync("CWText",res.data.Data.CWText)
} else {
//启用短暂手机振动
uni.vibrateLong({
success: function() {
console.log('success');
}
});
uni.showToast({
title: res.data.Message,
icon: 'none'
});
}
},
fail: () => {
setTimeout(function() {
uni.showToast({
icon: "none",
title: "请检查网络"
})
}, 2500);
},
complete: () => {},
});
},
//删除样式
del: function(e) {
var thas = this;
const inkey = uni.getStorageSync("inkey");
console.log('下标获取值为:' + inkey);
//console.log(thas.baseTableData)
//启用短暂手机振动
uni.vibrateShort({
success: function() {
console.log('success');
}
});
for (let i = 0; i < thas.baseTableData.length; i++) {
if (thas.baseTableData[i].FPCNumber != "") {
if (thas.baseTableData[i].FPCNumber == thas.baseTableData[i].FPCNumber) {
thas.baseTableData.splice(i, 1);
console.log("相同数据被删除")
}
}
}
if (inkey.length > 1) {
uni.showToast({
icon: "none",
title: "请单个删除"
})
this.isshows();
return false;
}
uni.showModal({
title: '提示',
content: '确定删除数据吗?',
showCancel: true,
cancelText: '取消',
confirmText: '确定',
success: res => {
if (res.confirm) {
console.log('删除前数据' + JSON.stringify(thas.baseTableData))
thas.baseTableData.splice(inkey, 1);
this.baseTableData = thas.baseTableData;
this.isshows();
console.log('删除后数据' + JSON.stringify(this.baseTableData))
uni.showToast({
title: '删除成功'
});
} else if (res.cancel) {
this.isshows();
}
},
fail: () => {},
complete: () => {}
});
},
//提交事件
tj: function() {
if (this.CKText.length <= 0 || this.CWText <= 0) {
uni.showToast({
title: "框内信息不完整"
});
return false;
}
const DBAias = uni.getStorageSync('DBAias');
const UserID = uni.getStorageSync('UserID');
const userName = uni.getStorageSync('userName');
const IsEachCheck = uni.getStorageSync('IsEachCheck');
const PrgKey = uni.getStorageSync("PrgKey")
const FType = uni.getStorageSync("FType")
console.log("zt" + DBAias)
console.log("is" + UserID)
console.log("na" + userName)
var that = this;
console.log(JSON.stringify(that.baseTableData))
uni.request({
url: that.baseUrl + '/api/stock/submit/?' + 'DBAias=' + DBAias + '&' + 'UserID=' + UserID + '&' + 'UserName=' +
userName,
method: 'POST',
header: {
'Content-type': 'application/x-www-form-urlencoded',
//'contentType': "application/json; charset=utf-8*"
},
// JSON.stringify(that.baseTableData)
data: {
// DBAias: DBAias,
// UserID: UserID,
// UserName: userName,
BarcodeListStr: JSON.stringify(that.baseTableData),
IsEachCheck: IsEachCheck,
PrgKey: "MT08",
FType: "X",
},
success: res => {
if (res.data.Status == 200) {
setTimeout(function() {
uni.showToast({
icon: "success",
title: "数据提交中"
})
that.isFocus = true;
}, 0);
setTimeout(function() {
uni.showToast({
title: res.data.Message,
icon: 'none'
})
}, 1000);
setTimeout(function() {
uni.reLaunch({
url: '/pages/select/allocation'
})
}, 1500)
} else {
setTimeout(function() {
uni.showToast({
icon: "none",
title: "数据提交中"
})
}, 0);
setTimeout(function() {
uni.showToast({
title: res.data.Message,
icon: 'none'
})
}, 2000);
}
},
fail: (err) => {
uni.hideLoading();
console.log(err)
},
complete: () => {}
});
},
debounce(fn, time = 1000) {
let timer = null
return function() {
if (timer) clearTimeout(timer)
timer = setTimeout(fn, time)
}
},
doSort(res) {
uni.showToast({
title: `点击了${res.key}的排序, 排序方式为${res.type}`,
icon: "none"
})
},
rowClick(item) {
uni.showToast({
title: `${JSON.stringify(item)}数据被点击`,
icon: 'none'
})
},
back: function() {
uni.reLaunch({
url: '/pages/select/indexs'
})
},
//选择下标元素
tableSelect: function(selectList) {
var that = this;
//console.log(this.baseTableData[selectList]);
console.log(selectList);
uni.setStorageSync("inkey", selectList);
// uni.showToast({
// title: `选择下标为${selectList.join(',')}的元素`,
// icon: 'none'
// })
}
}
};
</script>
<style lang="scss">
.z-table {
background-color: #F5FFFA;
color: #333333;
//font-size: 20upx;
display: run-in;
}
.ttsp {
width: 2rem;
height: 2rem;
padding-top: -10px;
padding-left: 20px;
}
.retback {
font-size: 16px;
margin-bottom: 10px;
// border: 2px solid #555555;
// border-radius: 3px;
// width: 3px;
// height: 20px;
// background-color: #555555;
// color: #F1F1F1
}
.bt {
font-size: 16px;
font-style: auto;
border-radius: 10px;
color: #555555;
margin-bottom: 10px;
}
.retback {
width: 3rem;
}
.type-select-box {
background-color: #E8E8E8;
}
.cps {
font-size: 15px;
font-style: auto;
width: 4rem;
color: #808080;
}
.content {
padding: 20rpx;
font-size: 24rpx;
}
.logo {
display: block;
height: 144rpx;
width: 144rpx;
margin: 0 auto;
margin-top: 50rpx;
}
.version {
text-align: center;
color: #fff;
}
.table {
text-align: center;
}
.title {
margin-bottom: 20rpx;
font-size: 24rpx;
color: #fff;
}
.block-title {
position: sticky;
top: var(--window-top);
padding: 40rpx 0 !important;
text-align: center;
background: #f7f9ff;
z-index: 99;
}
.example-block {
padding: 20rpx;
margin: 20rpx -20rpx;
background: #f7f9ff;
}
.example-title {
font-size: 30rpx;
font-weight: bold;
margin: 30rpx 0 10rpx;
}
.example-explain {
font-size: 24rpx;
}
.explain-title {
margin-top: 30rpx;
padding-bottom: 10rpx;
font-size: 28rpx;
border-bottom: solid 2rpx #ccc;
}
.explain-context {
margin-top: 10rpx;
color: #8f8f94;
}
.explain {
display: flex;
}
.explain-text {
flex: 1;
margin-left: 20rpx;
}
.codes {
padding: 20rpx;
background: #333;
color: #fff;
box-sizing: border-box;
}
.codes text {
white-space: nowrap;
}
.toggle-btn {
margin: 10rpx 0;
padding: 10rex;
color: #1c1;
}
.select-btn {
display: inline-block;
width: 200rpx;
margin-top: 20rpx;
font-size: 24rpx;
}
.type-select-box {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: 20rpx;
margin: 0 -20rpx;
background: #f7f9ff;
}
.type-select-box-title {
width: 100%;
margin-bottom: 20rpx;
font-size: 36rpx;
}
.type-select-item {
flex: 1;
padding: 20rpx;
margin-right: 10rpx;
margin-bottom: 10rpx;
white-space: nowrap;
border: solid 2rpx #066;
border-radius: 4rpx;
font-size: 28rpx;
background: #fff;
color: #006666;
text-align: center;
&.selected {
background: #066;
color: #fff;
}
}
</style>