优化代码

This commit is contained in:
java110 2020-11-13 13:53:41 +08:00
parent c719f79ad4
commit f4afb6cb9c
7 changed files with 187 additions and 13 deletions

8
app.js
View File

@ -36,12 +36,12 @@ let opts = {
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
//app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts));
app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts));
app.use('/callComponent',proxy('http://192.168.1.16:8012',opts));
app.use('/app',proxy('http://192.168.1.16:8012',opts));
//app.use('/callComponent',proxy('http://192.168.1.16:8012',opts));
//app.use('/app',proxy('http://192.168.1.16:8012',opts));
//app.listen(3000);
app.use(express.json());

View File

@ -14,7 +14,7 @@
carState:'SH',
isMore:false,
locationTypeCdName:'',
startTime:''
startTime: vc.dateTimeFormat(new Date().getTime())
}
},
_initMethod: function() {
@ -155,6 +155,7 @@
carState:'SH',
isMore:false,
locationTypeCdName:'',
startTime: vc.dateTimeFormat(new Date().getTime())
};
vc.component.carCreateFeeAddInfo.feeTypeCds = _feeTypeCds;

View File

@ -18,7 +18,7 @@
roomState: ['2001'],
isMore: false,
locationTypeCdName: '',
startTime:''
startTime: vc.dateTimeFormat(new Date().getTime())
}
},
_initMethod: function () {
@ -189,7 +189,7 @@
roomState: ['2001'],
isMore: false,
locationTypeCdName: '',
startTime:''
startTime: vc.dateTimeFormat(new Date().getTime())
};
vc.component.roomCreateFeeAddInfo.feeTypeCds = _feeTypeCds;

View File

@ -2,7 +2,7 @@
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<h5>单明细</h5>
<h5>受理单明细</h5>
<div class="ibox-tools" style="top:10px;">
<button type="button" class="btn btn-primary btn-sm "
v-on:click="_goBack()" style="margin-right:10px">
@ -15,8 +15,8 @@
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">oId</th>
<th class="text-center">bId</th>
<th class="text-center">订单ID</th>
<th class="text-center">业务ID</th>
<th class="text-center">业务类型</th>
<th class="text-center">创建时间</th>
</tr>

View File

@ -48,7 +48,7 @@
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<h5>单信息</h5>
<h5>受理单信息</h5>
<div class="ibox-tools" style="top:10px;"></div>
</div>
<div class="ibox-content">
@ -58,8 +58,8 @@
>
<thead>
<tr>
<th class="text-center">appId</th>
<th class="text-center">oid</th>
<th class="text-center">应用ID</th>
<th class="text-center">订单ID</th>
<th class="text-center">订单类型</th>
<th class="text-center">extTransactionId</th>
<th class="text-center">请求时间</th>

View File

@ -0,0 +1,105 @@
<div class="animated fadeInRight ecommerce">
<div class="row" v-if="storeOrderCartManageInfo.orderDetail == false">
<div class="col-lg-12">
<div class="ibox ">
<div class="ibox-title">
<h5>查询条件</h5>
<div class="ibox-tools" style="top:10px;">
</div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<input type="text" placeholder="订单编号"
v-model="storeOrderCartManageInfo.conditions.oId" class=" form-control">
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<select class="custom-select" v-model="storeOrderCartManageInfo.conditions.orderTypeCd">
<option value="">请选择订单类型</option>
<option value="Q">查询单</option>
<option value="D">受理单</option>
</select>
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<input type="text" placeholder="appid"
v-model="storeOrderCartManageInfo.conditions.appId" class=" form-control">
</div>
</div>
<div class="col-sm-2">
<button type="button" class="btn btn-primary btn-sm"
v-on:click="_queryOrdersMethod()">
<i class="fa fa-search"></i> 查询
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" v-if="storeOrderCartManageInfo.orderDetail == false">
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<h5>订单信息</h5>
<div class="ibox-tools" style="top:10px;"></div>
</div>
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny"
data-page-size="15"
>
<thead>
<tr>
<th class="text-center">订单号</th>
<th class="text-center">商品名称</th>
<th class="text-center">商品规格</th>
<th class="text-center">用户名称</th>
<th class="text-center">支付金额</th>
<th class="text-center">订单状态</th>
<th class="text-center">创建时间</th>
<th class="text-center">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="order in storeOrderCartManageInfo.orderCarts">
<td class="text-center">{{order.appId}}</td>
<td class="text-center">{{order.oId}}</td>
<td class="text-center">{{order.orderTypeCdName}}</td>
<td class="text-center">{{order.extTransactionId}}</td>
<td class="text-center">{{order.requestTime}}</td>
<td class="text-center">{{order.userName}}</td>
<td class="text-center">{{order.createTime}}</td>
<td class="text-right">
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openOrderDetailModel(order)">订单详情
</button>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- 分页 -->
<vc:create path="frame/pagination"></vc:create>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,68 @@
//订单查询
(function(vc){
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data:{
storeOrderCartManageInfo:{
orderCarts:[],
total:0,
records:1,
orderDetail:false,
conditions:{
oId:'',
extTransactionId:'',
orderTypeCd:'',
appId:'',
}
}
},
_initMethod:function(){
vc.component._listOrders(DEFAULT_PAGE, DEFAULT_ROWS);
},
_initEvent:function(){
vc.on('storeOrderCartManage','goBack',function(_param){
vc.component.storeOrderCartManageInfo.orderDetail = false;
});
vc.on('pagination','page_event',function(_currentPage){
vc.component._listOrders(_currentPage,DEFAULT_ROWS);
});
},
methods:{
_listOrders:function(_page, _rows){
vc.component.storeOrderCartManageInfo.conditions.page = _page;
vc.component.storeOrderCartManageInfo.conditions.row = _rows;
var param = {
params:vc.component.storeOrderCartManageInfo.conditions
};
//发送get请求
vc.http.get('cstoreOrderCartManage',
'list',
param,
function(json,res){
var _storeOrderCartManageInfo=JSON.parse(json);
vc.component.storeOrderCartManageInfo.total = _storeOrderCartManageInfo.total;
vc.component.storeOrderCartManageInfo.records = _storeOrderCartManageInfo.records;
vc.component.storeOrderCartManageInfo.orderCarts = _storeOrderCartManageInfo.corderDataVos;
vc.component.storeOrderCartManageInfo.orderCarts.map(item=>{
item.requestTime=item.requestTime.substring(0,4)+"-"+item.requestTime.substring(4,6)+"-"+item.requestTime.substring(6,8)+" "+item.requestTime.substring(8,10)+":"+item.requestTime.substring(10,12)+":"+item.requestTime.substring(12,14)
})
vc.emit('pagination','init',{
total:vc.component.storeOrderCartManageInfo.records,
currentPage:_page
});
},function(errInfo,error){
console.log('请求失败处理');
}
);
},
_queryOrdersMethod:function(){
vc.component._listOrders(DEFAULT_PAGE, DEFAULT_ROWS);
},
_openOrderDetailModel:function(_order){
vc.component.storeOrderCartManageInfo.orderDetail = true;
vc.emit('orderDetailManage','listOrderDetails',_order.cBusiness);
}
}
});
})(window.vc);