优化派单界面

This commit is contained in:
java110 2020-07-01 14:13:38 +08:00
parent 6c397e95a1
commit 6103c58a0e
10 changed files with 66 additions and 31 deletions

4
app.js
View File

@ -33,8 +33,8 @@ let opts = {
//app.use('/callComponent',proxy('https://app.demo.winqi.cn/',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('/callComponent',proxy('http://192.168.1.16:8012',opts));
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
app.use('/callComponent',proxy('http://192.168.1.16:8012',opts));
//app.listen(3000);

View File

@ -6,7 +6,14 @@
<div class="ibox-content">
<div>
<div>
<div class="form-group row">
<div class="form-group row" v-if="dispatchRepairInfo.action=='BACK'">
<label class="col-sm-2 col-form-label">上级处理人</label>
<div class="col-sm-10">
<input v-model="dispatchRepairInfo.staffName" type="text"
placeholder="必填,请填写上级处理人" disabled="disabled" class="form-control">
</div>
</div>
<div class="form-group row" v-else>
<label class="col-sm-2 col-form-label">报修师傅</label>
<div class="col-sm-10">
<select class="custom-select" v-model="dispatchRepairInfo.staffId">
@ -24,7 +31,7 @@
<div class="ibox-content">
<button class="btn btn-primary float-right" type="button"
v-on:click="dispatchRepairInfo()"><i class="fa fa-check"></i>&nbsp;提交
v-on:click="_dispatchRepairInfo()"><i class="fa fa-check"></i>&nbsp;提交
</button>
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
data-dismiss="modal">取消

View File

@ -8,6 +8,7 @@
staffId: '',
staffName: '',
context: '',
action: '',
repairTypeUsers: []
}
},
@ -18,7 +19,13 @@
vc.on('dispatchRepair', 'openDispatchRepairModal', function (_repair) {
$that.dispatchRepairInfo.repairType = _repair.repairType;
$that.dispatchRepairInfo.repairId = _repair.repairId;
$that._listRepairTypeUsers()
$that.dispatchRepairInfo.action = _repair.action;
$that._listRepairTypeUsers();
if(_repair.hasOwnProperty('action') && _repair.action == 'BACK'){
$that.dispatchRepairInfo.staffId = _repair.preStaffId;
$that.dispatchRepairInfo.staffName = _repair.preStaffName;
}
$('#dispatchRepairModel').modal('show');
});
},
@ -57,7 +64,13 @@
]
});
},
dispatchRepairInfo: function () {
_dispatchRepairInfo: function () {
$that.dispatchRepairInfo.repairTypeUsers.forEach(item => {
if (item.staffId == $that.dispatchRepairInfo.staffId) {
$that.dispatchRepairInfo.staffName = item.staffName;
}
});
if (!vc.component.dispatchRepairValidate()) {
vc.toast(vc.validate.errInfo);
@ -65,11 +78,6 @@
}
vc.component.dispatchRepairInfo.communityId = vc.getCurrentCommunity().communityId;
$that.dispatchRepairInfo.repairTypeUsers.forEach(item => {
if(item.staffId == $that.dispatchRepairInfo.staffId){
$that.dispatchRepairInfo.staffName = item.staffName;
}
});
vc.http.apiPost(
@ -80,7 +88,8 @@
},
function (json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
if (res.status == 200) {
let _json = JSON.parse(json);
if (_json.code == 0) {
//关闭model
$('#dispatchRepairModel').modal('hide');
vc.component.clearDispatchRepairInfo();
@ -88,7 +97,7 @@
return;
}
vc.toast(json);
vc.toast(_json.msg);
},
function (errInfo, error) {
@ -105,6 +114,7 @@
staffId: '',
staffName: '',
context: '',
action: '',
repairTypeUsers: []
};
},

View File

@ -89,17 +89,11 @@
<td class="text-center">{{ownerRepair.repairName}}</td>
<td class="text-center">{{ownerRepair.tel}}</td>
<td class="text-center">{{ownerRepair.appointmentTime}}</td>
<td class="text-center">{{ownerRepair.repairDispatchStateName}}</td>
<td class="text-center">{{ownerRepair.stateName}}</td>
<td class="text-right">
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-bind:disabled="ownerRepair.repairDispatchState == '10002' || ownerRepair.repairDispatchState == '10003'"
v-on:click="_openDealRepair(ownerRepair)">办理
</button>
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openDispatchRepairDetail(ownerRepair)">详情
v-on:click="_openRepairDetail(ownerRepair)">详情
</button>
</div>
</td>

View File

@ -52,14 +52,13 @@
};
//发送get请求
vc.http.get('myRepairDispatch',
'list',
vc.http.apiGet('ownerRepair.listStaffFinishRepairs',
param,
function(json,res){
var _myRepairDispatchInfo=JSON.parse(json);
vc.component.myRepairDispatchInfo.total = _myRepairDispatchInfo.total;
vc.component.myRepairDispatchInfo.records = _myRepairDispatchInfo.records;
vc.component.myRepairDispatchInfo.ownerRepairs = _myRepairDispatchInfo.ownerRepairs;
vc.component.myRepairDispatchInfo.ownerRepairs = _myRepairDispatchInfo.data;
vc.emit('pagination','init',{
total:vc.component.myRepairDispatchInfo.records,
currentPage:_page
@ -80,6 +79,9 @@
vc.component.myRepairDispatchInfo.moreCondition = true;
}
},
_openRepairDetail: function (_repairPool) {
vc.jumpToPage('/admin.html#/pages/property/ownerRepairDetail?repairId=' + _repairPool.repairId)
},
_closeRepairDispatchOrder:function(_orderInfo){
var _repairDispatchParam = {
repairId:vc.component.myRepairDispatchInfo.currentRepairId,

View File

@ -29,6 +29,7 @@
vc.jumpToPage('/admin.html#/pages/property/repairPoolManage');
return;
}
$that.ownerRepairDetailInfo.repairId = repairId;
$that._listRepairPools()
},

View File

@ -91,11 +91,22 @@
<td class="text-center">{{ownerRepair.appointmentTime}}</td>
<td class="text-center">{{ownerRepair.stateName}}</td>
<td class="text-right">
<div class="btn-group" v-if="ownerRepair.state == '1000'">
<div class="btn-group" >
<button class="btn-white btn btn-xs"
v-on:click="_openDispatchRepair(ownerRepair)">派
v-on:click="_openDispatchRepairModel(ownerRepair)">转
</button>
</div>
<div class="btn-group" v-if="ownerRepair.preStaffId != '-1'">
<button class="btn-white btn btn-xs"
v-on:click="_openBackRepairModel(ownerRepair)">退单
</button>
</div>
<div class="btn-group" >
<button class="btn-white btn btn-xs"
v-on:click="_openDispatchRepair(ownerRepair)">办结
</button>
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openDispatchRepairDetail(ownerRepair)">详情
@ -120,5 +131,7 @@
</div>
</div>
<vc:create path="property/dispatchRepair"></vc:create>
</div>

View File

@ -92,8 +92,7 @@
};
//发送get请求
vc.http.get('repairDispatchManage',
'list',
vc.http.apiGet('ownerRepair.listStaffRepairs',
param,
function(json,res){
var _repairDispatchManageInfo=JSON.parse(json);
@ -127,6 +126,14 @@
}else{
vc.component.repairDispatchManageInfo.moreCondition = true;
}
},
_openDispatchRepairModel:function(_repair){
_repair.action="TRANSFER";
vc.emit('dispatchRepair', 'openDispatchRepairModal',_repair);
},
_openBackRepairModel:function(_repair){
_repair.action="BACK";
vc.emit('dispatchRepair', 'openDispatchRepairModal',_repair);
}

View File

@ -80,7 +80,7 @@
<th class="text-center">联系方式</th>
<th class="text-center">预约时间</th>
<th class="text-center">状态</th>
<th class="text-center">操作</th>
<th class="text-right">操作</th>
</tr>
</thead>
<tbody>
@ -91,8 +91,8 @@
<td class="text-center">{{repairPool.tel}}</td>
<td class="text-center">{{repairPool.appointmentTime}}</td>
<td class="text-center">{{repairPool.stateName}}</td>
<td class="text-center">
<div class="btn-group" v-if="repairPool.repairWay == '200'">
<td class="text-right">
<div class="btn-group" v-if="repairPool.repairWay == '200' && repairPool.state == '1000'">
<button class="btn-white btn btn-xs"
v-on:click="_openDispatchRepairModel(repairPool)">派单
</button>

View File

@ -93,6 +93,7 @@
}
},
_openDispatchRepairModel:function(_repair){
_repair.action = "DISPATCH";
vc.emit('dispatchRepair', 'openDispatchRepairModal',_repair);
},
_listRepairSettings: function (_page, _rows) {