mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 13:56:05 +08:00
优化代码
This commit is contained in:
parent
dd8810a09e
commit
3047ffbbc1
@ -23,28 +23,15 @@
|
||||
<tr v-for="auditOrder in contractApplyAuditOrdersInfo.contractApplyAuditOrders">
|
||||
<td class="text-center">{{auditOrder.contractCode}}</td>
|
||||
<td class="text-center">{{auditOrder.contractName}}</td>
|
||||
<td class="text-center">{{auditOrder.resOrderTypeName}}</td>
|
||||
<td class="text-center">{{auditOrder.contractTypeName}}</td>
|
||||
<td class="text-center">{{auditOrder.stateName}}</td>
|
||||
<td class="text-center">{{auditOrder.createTime}}</td>
|
||||
<td class="text-center">{{auditOrder.signingTime}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openDetailPurchaseApplyModel(auditOrder)">查看
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<div class="btn-group"
|
||||
v-if="contractApplyAuditOrdersInfo.currentUserId != auditOrder.userId">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openAuditOrderModel(auditOrder)">审批
|
||||
</button>
|
||||
</div>
|
||||
<div class="btn-group" v-else>
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_finishAuditOrder(auditOrder)">结束
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@ -12,14 +12,14 @@
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
userName: '',
|
||||
currentUserId:vc.getData('/nav/getUserInfo').userId,
|
||||
currentUserId: vc.getData('/nav/getUserInfo').userId,
|
||||
conditions: {
|
||||
AuditOrdersId: '',
|
||||
userName: '',
|
||||
auditLink: '',
|
||||
},
|
||||
orderInfo:'',
|
||||
procure:false
|
||||
orderInfo: '',
|
||||
procure: false
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
@ -35,7 +35,7 @@
|
||||
vc.component._listAuditOrders(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
|
||||
vc.on('contractApplyAuditOrders','notifyAudit',function(_auditInfo){
|
||||
vc.on('contractApplyAuditOrders', 'notifyAudit', function (_auditInfo) {
|
||||
vc.component._auditOrderInfo(_auditInfo);
|
||||
});
|
||||
},
|
||||
@ -67,85 +67,13 @@
|
||||
},
|
||||
_openAuditOrderModel: function (_auditOrder) {
|
||||
vc.component.contractApplyAuditOrdersInfo.orderInfo = _auditOrder;
|
||||
vc.emit('audit','openAuditModal',{});
|
||||
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.contractApplyAuditOrdersInfo.orderInfo.taskId;
|
||||
_auditInfo.applyOrderId = vc.component.contractApplyAuditOrdersInfo.orderInfo.applyOrderId;
|
||||
//发送get请求
|
||||
vc.http.post('contractApplyAuditOrders',
|
||||
'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('contractApplyAuditOrders',
|
||||
'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);
|
||||
}
|
||||
);
|
||||
},
|
||||
_loadStepStaff: function () {
|
||||
|
||||
var param = {
|
||||
params: {
|
||||
page:1,
|
||||
row:1,
|
||||
staffId: $that.contractApplyAuditOrdersInfo.currentUserId,
|
||||
staffRole: '2002'
|
||||
}
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('workflow.listWorkflowStepStaffs',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _json = JSON.parse(json);
|
||||
if(_json.data.length > 0){
|
||||
$that.contractApplyAuditOrdersInfo.procure = true;
|
||||
}
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
_procureEnterOrder:function(_purchaseApply){
|
||||
vc.jumpToPage("/admin.html#/pages/common/resourceEnterManage?applyOrderId="+_purchaseApply.applyOrderId+"&resOrderType="+_purchaseApply.resOrderType+"&taskId="+_purchaseApply.taskId);
|
||||
_openDetailPurchaseApplyModel: function (_auditOrder) {
|
||||
vc.jumpToPage("/admin.html#/pages/common/contractApplyDetail?contractId=" + _auditOrder.contractId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<div class="btn-group"
|
||||
v-if="contractApplyAuditOrdersInfo.currentUserId != auditOrder.userId">
|
||||
v-if="contractApplyAuditOrdersInfo.currentUserId != auditOrder.startUserId">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openAuditOrderModel(auditOrder)">审批
|
||||
</button>
|
||||
@ -62,5 +62,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<vc:create path="common/audit" callBackListener="myAuditOrders" callBackFunction="notifyAudit"></vc:create>
|
||||
<vc:create path="common/audit" callBackListener="contractApplyAuditOrders" callBackFunction="notifyAudit"></vc:create>
|
||||
</div>
|
||||
@ -18,7 +18,7 @@
|
||||
userName: '',
|
||||
auditLink: '',
|
||||
},
|
||||
orderInfo:'',
|
||||
orderInfo:{},
|
||||
procure:false
|
||||
}
|
||||
},
|
||||
@ -73,16 +73,15 @@
|
||||
vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_openDetailContractApplyModel:function(_auditOrder){
|
||||
vc.jumpToPage("/admin.html#/pages/common/contractApplyDetail?applyOrderId="+_auditOrder.contractId+"&resOrderType="+_auditOrder.resOrderType);
|
||||
vc.jumpToPage("/admin.html#/pages/common/contractApplyDetail?contractId="+_auditOrder.contractId);
|
||||
},
|
||||
//提交审核信息
|
||||
_auditOrderInfo: function (_auditInfo) {
|
||||
console.log("提交得参数:"+_auditInfo);
|
||||
_auditInfo.taskId = vc.component.contractApplyAuditOrdersInfo.orderInfo.taskId;
|
||||
_auditInfo.applyOrderId = vc.component.contractApplyAuditOrdersInfo.orderInfo.applyOrderId;
|
||||
_auditInfo.contractId = vc.component.contractApplyAuditOrdersInfo.orderInfo.contractId;
|
||||
//发送get请求
|
||||
vc.http.post('contractApplyAuditOrders',
|
||||
'audit',
|
||||
vc.http.apiPost('/contract/needAuditContract',
|
||||
JSON.stringify(_auditInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
@ -99,13 +98,12 @@
|
||||
_finishAuditOrder:function(_auditOrder){
|
||||
let _auditInfo = {
|
||||
taskId: _auditOrder.taskId,
|
||||
applyOrderId: _auditOrder.applyOrderId,
|
||||
contractId: _auditOrder.contractId,
|
||||
state:'1200',
|
||||
remark:'处理结束'
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.post('contractApplyAuditOrders',
|
||||
'audit',
|
||||
vc.http.post('/contract/needAuditContract',
|
||||
JSON.stringify(_auditInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
|
||||
@ -86,7 +86,7 @@
|
||||
v-on:click="_openEditContractModel(contract)">修改</button>
|
||||
</div> -->
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openEditContractModel(contract)">查看
|
||||
v-on:click="_viewContract(contract)">查看
|
||||
</button>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
|
||||
@ -82,7 +82,8 @@
|
||||
window.open("/print.html#/pages/admin/printContract?contractTypeId=" + _contract.contractType+"&contractId="+_contract.contractId);
|
||||
},
|
||||
_viewContract:function(_contract){
|
||||
vc.jumpToPage("/admin.html#/pages/admin/contractDetailView?contractId="+_contract.contractId);
|
||||
vc.jumpToPage("/admin.html#/pages/common/contractApplyDetail?contractId="+_contract.contractId);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -5,12 +5,10 @@
|
||||
<div class="ibox-title">
|
||||
<h5>合同信息</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-if="purchaseApplyDetailInfo.resOrderType == '10000'"
|
||||
v-on:click="_printPurchaseApply()">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_printContract()">
|
||||
打印
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary btn-sm"
|
||||
v-on:click="_callBackListPurchaseApply()">
|
||||
<button type="button" class="btn btn-white btn-sm" v-on:click="_goback()">
|
||||
返回
|
||||
</button>
|
||||
</div>
|
||||
@ -147,7 +145,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr v-for="(tItem,index) in auditUsers">
|
||||
<td>{{index+1}}</td>
|
||||
<td>{{tItem.auditName}}</td>
|
||||
|
||||
@ -30,41 +30,34 @@
|
||||
auditUsers: []
|
||||
},
|
||||
_initMethod: function () {
|
||||
vc.component.contractDetailInfo.contractId = vc.getParam('applyOrderId');
|
||||
vc.component.contractDetailInfo.resOrderType = vc.getParam('resOrderType');
|
||||
vc.component._listPurchaseApply(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
vc.component.contractDetailInfo.contractId = vc.getParam('contractId');
|
||||
vc.component._listContractApply(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
$that._loadAuditUser();
|
||||
},
|
||||
_initEvent: function () {
|
||||
|
||||
},
|
||||
methods: {
|
||||
_listPurchaseApply: function (_page, _rows) {
|
||||
_listContractApply: function (_page, _rows) {
|
||||
var param = {
|
||||
params: {
|
||||
page: _page,
|
||||
row: _rows,
|
||||
contractId: vc.component.contractDetailInfo.contractId,
|
||||
resOrderType: vc.component.contractDetailInfo.resOrderType,
|
||||
contractId: vc.component.contractDetailInfo.contractId
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/contract/queryContract',
|
||||
param,
|
||||
function (json) {
|
||||
console.log('json',json);
|
||||
var _purchaseApplyDetailInfo = JSON.parse(json);
|
||||
var _purchaseApply = _purchaseApplyDetailInfo[0];
|
||||
vc.copyObject(_purchaseApply, vc.component.contractDetailInfo);
|
||||
console.log('json', json);
|
||||
var _contractApplyDetailInfo = JSON.parse(json);
|
||||
var _contractApply = _contractApplyDetailInfo.data[0];
|
||||
vc.copyObject(_contractApply, vc.component.contractDetailInfo);
|
||||
}, function () {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
_loadAuditUser: function () {
|
||||
var param = {
|
||||
@ -85,12 +78,12 @@
|
||||
}
|
||||
);
|
||||
},
|
||||
_callBackListPurchaseApply: function () {
|
||||
_goback: function () {
|
||||
vc.getBack();
|
||||
},
|
||||
_printPurchaseApply:function(){
|
||||
window.open("/print.html#/pages/property/printPurchaseApply?applyOrderId="+$that.contractDetailInfo.contractId+"&resOrderType="+$that.contractDetailInfo.resOrderType)
|
||||
//vc.emit('printPurchaseApply', 'openPrintPurchaseApplyModal',vc.component.contractDetailInfo);
|
||||
_printContract: function () {
|
||||
let _contract = $that.contractDetailInfo;
|
||||
window.open("/print.html#/pages/admin/printContract?contractTypeId=" + _contract.contractType + "&contractId=" + _contract.contractId);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user