mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
优化就餐功能
This commit is contained in:
parent
dc875548aa
commit
2e5cc197b9
@ -12,9 +12,7 @@
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<label class="col-sm-3 col-form-label">
|
||||
<span>
|
||||
<span><vc:i18n name="付费对象" namespace="payFeeOrderConfirm"></vc:i18n></span>
|
||||
</span>:
|
||||
<vc:i18n name="付费对象:" namespace="payFeeOrderConfirm"></vc:i18n>
|
||||
</label>
|
||||
<label class="col-sm-8 col-form-label">{{payFeeOrderConfirmInfo.payerObjName}}</label>
|
||||
</div>
|
||||
|
||||
@ -19,11 +19,20 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<div>
|
||||
<input class="form-control" placeholder="请选中后扫码枪扫码" v-model="doDiningInfo.qrCode" @keyup.enter="_doDining()" />
|
||||
<div class="row">
|
||||
<div class="col-lg-3">
|
||||
</div>
|
||||
<div class="col-lg-5">
|
||||
<input class="form-control" id="qrCode" placeholder="请用扫码枪扫二维码" v-model="doDiningInfo.qrCode" @keyup.enter="_doDining()" />
|
||||
</div>
|
||||
<div class="col-lg-1 padding-lr-0 ">
|
||||
<button type="button" class="form-control btn btn-primary" @click="_doDining()">
|
||||
<span><vc:i18n name="就餐" namespace="simplifyAcceptance"></vc:i18n></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="row margin-top">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
@ -39,82 +48,61 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='商品封面' namespace='doDining'></vc:i18n>
|
||||
订单编号
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='名称(编号)' namespace='doDining'></vc:i18n>
|
||||
商品
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='参数' namespace='doDining'></vc:i18n>
|
||||
核销数量
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='预约方式' namespace='doDining'></vc:i18n>
|
||||
就餐日期
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='预约次数' namespace='doDining'></vc:i18n>
|
||||
就餐时间
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='预约数量' namespace='doDining'></vc:i18n>
|
||||
就餐人
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='单价' namespace='doDining'></vc:i18n>
|
||||
就餐人电话
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='有效期' namespace='doDining'></vc:i18n>
|
||||
核销时间
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='开始预约时间' namespace='doDining'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='排序' namespace='doDining'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='状态' namespace='doDining'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='操作'></vc:i18n>
|
||||
备注
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="reserveDining in doDiningInfo.reserveDinings">
|
||||
<td class="text-center" v-if="reserveDining.imgUrl">
|
||||
<img style="width: 60px; height: 60px; border-radius: 5px;" v-bind:src="reserveDining.imgUrl"></img>
|
||||
</td>
|
||||
<td class="text-center" v-else>
|
||||
<img style="width: 60px; height: 60px; border-radius: 5px;" src="/img/noPhoto.jpg">
|
||||
</td>
|
||||
<td class="text-center">{{reserveDining.goodsName}}({{reserveDining.goodsId}})
|
||||
</td>
|
||||
<td class="text-center">{{reserveDining.paramsName}}</td>
|
||||
<td class="text-center">{{reserveDining.paramWay == '1'?'日':'周'}}</td>
|
||||
|
||||
<td class="text-center">{{reserveDining.maxQuantity}}</td>
|
||||
<td class="text-center">{{reserveDining.hoursMaxQuantity}}</td>
|
||||
<td class="text-center">{{reserveDining.price}}</td>
|
||||
<td class="text-center">{{reserveDining.startDate}}~{{reserveDining.endDate}}
|
||||
</td>
|
||||
<td class="text-center">{{reserveDining.startTime}}</td>
|
||||
<td class="text-center">{{reserveDining.sort}}</td>
|
||||
<td class="text-center">{{reserveDining.state=='1001'?'未上线':'上线'}}</td>
|
||||
<tr v-for="reserveDining in doDiningInfo.orders">
|
||||
<td class="text-center">{{item.orderId}}</td>
|
||||
<th class="text-center">
|
||||
{{item.goodsName}}
|
||||
</th>
|
||||
<th class="text-center">
|
||||
{{item.quantity}}
|
||||
</th>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openReserveDiningPersonModel(reserveDining)"><span>
|
||||
<vc:i18n name='预约就餐'></vc:i18n>
|
||||
</span></button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openEditReserveDiningModel(reserveDining)"><span>
|
||||
<vc:i18n name='修改'></vc:i18n>
|
||||
</span></button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openDeleteReserveDiningModel(reserveDining)"><span>
|
||||
<vc:i18n name='删除'></vc:i18n>
|
||||
</span></button>
|
||||
</div>
|
||||
{{item.appointmentTime}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{item.hours}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{item.personName}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{item.personTel}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{item.createTime}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{item.remark}}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
data: {
|
||||
doDiningInfo: {
|
||||
reserveDinings: [],
|
||||
orders:[],
|
||||
total: 0,
|
||||
records: 1,
|
||||
goodsId: '',
|
||||
@ -25,9 +26,18 @@
|
||||
},
|
||||
_initMethod: function() {
|
||||
$that._listReserveDinings(1, 200);
|
||||
|
||||
document.getElementById("qrCode").focus();
|
||||
// 心跳一直 保持 选中
|
||||
setInterval(function(){
|
||||
document.getElementById("qrCode").focus();
|
||||
},5000);
|
||||
vc.component._listReserveConfirms(_currentPage, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function() {
|
||||
|
||||
vc.on('pagination', 'page_event', function(_currentPage) {
|
||||
vc.component._listReserveConfirms(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
|
||||
},
|
||||
methods: {
|
||||
@ -53,10 +63,59 @@
|
||||
},
|
||||
_chooseDining: function(_dining) {
|
||||
$that.doDiningInfo.goodsId = _dining.goodsId;
|
||||
document.getElementById("qrCode").focus();
|
||||
},
|
||||
_doDining: function() {
|
||||
|
||||
}
|
||||
let _data = {
|
||||
communityId:vc.getCurrentCommunity().communityId,
|
||||
goodsId:$that.doDiningInfo.goodsId,
|
||||
qrCode:$that.doDiningInfo.qrCode
|
||||
}
|
||||
|
||||
vc.http.apiPost(
|
||||
'/reserveOrder.doDining',
|
||||
JSON.stringify(_data), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function(json, res) {
|
||||
let _data = JSON.parse(json);
|
||||
if (_data.code != 0) {
|
||||
vc.toast(_data.msg);
|
||||
return;
|
||||
}
|
||||
$that._listReserveConfirms(DEFAULT_PAGE,DEFAULT_ROWS);
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.toast(errInfo);
|
||||
}
|
||||
);
|
||||
},
|
||||
_listReserveConfirms: function(_page, _rows) {
|
||||
$that.doDiningInfo.conditions.page = _page;
|
||||
$that.doDiningInfo.conditions.row = _rows;
|
||||
let param = {
|
||||
params: $that.doDiningInfo.conditions
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/reserveOrder.listReserveGoodsConfirmOrder',
|
||||
param,
|
||||
function(json, res) {
|
||||
let _doDiningInfo = JSON.parse(json);
|
||||
$that.doDiningInfo.total = _doDiningInfo.total;
|
||||
$that.doDiningInfo.records = _doDiningInfo.records;
|
||||
$that.doDiningInfo.orders = _doDiningInfo.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: $that.doDiningInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user