加入开店审核功能

This commit is contained in:
java110 2021-03-10 18:36:21 +08:00
parent 4acce4b19a
commit fad5142af4
2 changed files with 188 additions and 0 deletions

View File

@ -0,0 +1,62 @@
<div class=" animated fadeInRight ecommerce">
<div class="row">
<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">店铺logo</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="shop in auditOpenShopInfo.shops">
<td class="text-center">{{shop.shopLogo}}</td>
<td class="text-center">{{shop.shopName}}</td>
<td class="text-center">{{shop.stateName}}</td>
<td class="text-center">{{shop.shopLogo}}</td>
<td class="text-center">{{shop.shopName}}</td>
<td class="text-center">{{shop.stateName}}</td>
<td class="text-center">{{shop.stateName}}</td>
<td class="text-center">
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openDetailPurchaseApplyModel(auditOrder)">查看
</button>
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openAuditOrderModel(auditOrder)">审核
</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>
<vc:create path="common/audit" callBackListener="myAuditOrders" callBackFunction="notifyAudit"></vc:create>
</div>

View File

@ -0,0 +1,126 @@
/**
审核订单
**/
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
auditOpenShopInfo: {
shops: [],
total: 0,
records: 1,
moreCondition: false,
userName: '',
currentUserId:vc.getData('/nav/getUserInfo').userId,
conditions: {
AuditOrdersId: '',
userName: '',
auditLink: '',
},
orderInfo:'',
procure:false
}
},
_initMethod: function () {
vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
$that._loadStepStaff();
},
_initEvent: function () {
vc.on('myAuditOrders', 'listAuditOrders', function (_param) {
vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('pagination', 'page_event', function (_currentPage) {
vc.component._listAuditOrders(_currentPage, DEFAULT_ROWS);
});
vc.on('myAuditOrders','notifyAudit',function(_auditInfo){
vc.component._auditOrderInfo(_auditInfo);
});
},
methods: {
_listAuditOrders: function (_page, _rows) {
vc.component.auditOpenShopInfo.conditions.page = _page;
vc.component.auditOpenShopInfo.conditions.row = _rows;
var param = {
params: vc.component.auditOpenShopInfo.conditions
};
//发送get请求
vc.http.get('myAuditOrders',
'list',
param,
function (json, res) {
var _auditOpenShopInfo = JSON.parse(json);
vc.component.auditOpenShopInfo.total = _auditOpenShopInfo.total;
vc.component.auditOpenShopInfo.records = _auditOpenShopInfo.records;
vc.component.auditOpenShopInfo.shops = _auditOpenShopInfo.resourceOrders;
vc.emit('pagination', 'init', {
total: vc.component.auditOpenShopInfo.records,
currentPage: _page
});
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_openAuditOrderModel: function (_auditOrder) {
vc.component.auditOpenShopInfo.orderInfo = _auditOrder;
vc.emit('audit','openAuditModal',{});
},
_queryAuditOrdersMethod: function () {
vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
},
_openDetailPurchaseApplyModel:function(_purchaseApply){
vc.jumpToPage("/admin.html#/pages/common/purchaseApplyDetail?applyOrderId="+_purchaseApply.applyOrderId+"&resOrderType="+_purchaseApply.resOrderType);
},
//提交审核信息
_auditOrderInfo: function (_auditInfo) {
console.log("提交得参数:"+_auditInfo);
_auditInfo.taskId = vc.component.auditOpenShopInfo.orderInfo.taskId;
_auditInfo.applyOrderId = vc.component.auditOpenShopInfo.orderInfo.applyOrderId;
//发送get请求
vc.http.post('myAuditOrders',
'audit',
JSON.stringify(_auditInfo),
{
emulateJSON: true
},
function (json, res) {
vc.toast("处理成功");
vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
}, function (errInfo, error) {
console.log('请求失败处理');
vc.toast("处理失败:" + errInfo);
}
);
},
_finishAuditOrder:function(_auditOrder){
let _auditInfo = {
taskId: _auditOrder.taskId,
applyOrderId: _auditOrder.applyOrderId,
state:'1200',
remark:'处理结束'
};
//发送get请求
vc.http.post('myAuditOrders',
'audit',
JSON.stringify(_auditInfo),
{
emulateJSON: true
},
function (json, res) {
vc.toast("处理成功");
vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
}, function (errInfo, error) {
console.log('请求失败处理');
vc.toast("处理失败:" + errInfo);
}
);
}
}
});
})(window.vc);