Commit 81e45888 authored by youjie's avatar youjie

no message

parent 3f3bd968
...@@ -204,7 +204,8 @@ ...@@ -204,7 +204,8 @@
<li> <li>
<span> <span>
<em>{{$t('commonPickUp.Pick_resName')}}</em> <em>{{$t('commonPickUp.Pick_resName')}}</em>
<el-select v-model="msg.DiningID" :placeholder="$t('pub.pleaseSel')" filterable> <el-select v-model="msg.DiningIDList" :placeholder="$t('pub.pleaseSel')"
multiple collapse-tags filterable @change="getMultipleChoice" style="width: 300px;">
<el-option :label="$t('pub.unlimitedSel')" :value="defaultSelectValue"></el-option> <el-option :label="$t('pub.unlimitedSel')" :value="defaultSelectValue"></el-option>
<el-option v-for="item in DinnerList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option> <el-option v-for="item in DinnerList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select> </el-select>
...@@ -276,6 +277,8 @@ ...@@ -276,6 +277,8 @@
Year: 0, Year: 0,
Month: 0, Month: 0,
DiningID: 0, DiningID: 0,
DiningIDList:[],
DiningIDs: [],
QStatus:0, QStatus:0,
loading: false, loading: false,
uid:0, uid:0,
...@@ -297,6 +300,27 @@ ...@@ -297,6 +300,27 @@
}; };
}, },
methods: { methods: {
// 多选餐厅
getMultipleChoice(){
if(this.msg.DiningIDList.length>1){
if(this.msg.DiningIDList.at(-1)==0){
this.msg.DiningIDList = [0]
}else if(this.msg.DiningIDList.at(-1)!=0){
this.msg.DiningIDList.forEach((x,index)=>{
if(x==0){
this.msg.DiningIDList.splice(index,1)
}
})
}
this.msg.DiningID = 0
this.msg.DiningIDs = this.msg.DiningIDList.join(',')
}
if(this.msg.DiningIDList.length==1){
this.msg.DiningID = this.msg.DiningIDList[0]
this.msg.DiningIDs = ''
}
},
stockColor: function (type) { stockColor: function (type) {
if (type === 1) { if (type === 1) {
return 'hasStock_1' return 'hasStock_1'
...@@ -405,14 +429,21 @@ ...@@ -405,14 +429,21 @@
}, },
//下载餐厅统计 //下载餐厅统计
DownLoadDinnerSalesBoard() { DownLoadDinnerSalesBoard() {
if (this.msg.DiningID <= 0) { if (this.msg.DiningIDList&&this.msg.DiningIDList.length==0) {
this.Info(this.$t('sm.qxzcanting')); this.Info(this.$t('sm.qxzcanting'));
return; return;
} }
let url
if(this.msg.DiningID>0){
url = 'dinner_get_downloadDinnerSalesBoard'
}else{
url ='dinner_get_downloadDinnerSalesBoardNew'
}
this.msg.uid=this.getLocalStorage().EmployeeId; this.msg.uid=this.getLocalStorage().EmployeeId;
this.msg.loading = true; this.msg.loading = true;
let fileName = this.$t('ground.cantxiazai') + this.$commonUtils.getCurrentDate() + ".xls"; let fileName = this.$t('ground.cantxiazai') + this.$commonUtils.getCurrentDate() + ".xls";
this.GetLocalFile("dinner_get_downloadDinnerSalesBoard", this.msg, fileName,
this.GetLocalFile(url, this.msg, fileName,
res => { res => {
this.msg.loading = false; this.msg.loading = false;
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment