mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 21:59:12 +08:00
开发完成排班工鞥呢
This commit is contained in:
parent
a455bd5927
commit
bb7524929c
BIN
public/components/.DS_Store
vendored
BIN
public/components/.DS_Store
vendored
Binary file not shown.
@ -0,0 +1,41 @@
|
||||
<div id="addScheduleClassesStaffModel" class="modal fade" role="dialog"
|
||||
aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<h3 class="m-t-none m-b "><span>
|
||||
<vc:i18n name="添加" namespace="addScheduleClassesStaff"></vc:i18n>
|
||||
</span></h3>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
<div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span>
|
||||
<vc:i18n name='员工' namespace='addScheduleClassesStaff'></vc:i18n>
|
||||
</span></label>
|
||||
<div class="col-sm-10">
|
||||
<vc:create path="property/selectStaffs"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button"
|
||||
v-on:click="saveScheduleClassesStaffInfo()"><i class="fa fa-check"></i>
|
||||
<span>
|
||||
<vc:i18n name="保存"></vc:i18n>
|
||||
</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
|
||||
data-dismiss="modal">
|
||||
<span>
|
||||
<vc:i18n name="取消"></vc:i18n>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,78 @@
|
||||
(function (vc) {
|
||||
|
||||
vc.extends({
|
||||
propTypes: {
|
||||
callBackListener: vc.propTypes.string, //父组件名称
|
||||
callBackFunction: vc.propTypes.string //父组件监听方法
|
||||
},
|
||||
data: {
|
||||
addScheduleClassesStaffInfo: {
|
||||
|
||||
scheduleId: '',
|
||||
|
||||
staffs: []
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('addScheduleClassesStaff', 'openAddScheduleClassesStaffModal', function (_param) {
|
||||
vc.copyObject(_param,$that.addScheduleClassesStaffInfo);
|
||||
vc.emit('selectStaffs', 'setStaffs',$that.addScheduleClassesStaffInfo.staffs);
|
||||
$('#addScheduleClassesStaffModel').modal('show');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
addScheduleClassesStaffValidate() {
|
||||
return vc.validate.validate({
|
||||
addScheduleClassesStaffInfo: vc.component.addScheduleClassesStaffInfo
|
||||
}, {
|
||||
'addScheduleClassesStaffInfo.scheduleId': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "排班ID不能为空"
|
||||
},
|
||||
],
|
||||
});
|
||||
},
|
||||
saveScheduleClassesStaffInfo: function () {
|
||||
if (!vc.component.addScheduleClassesStaffValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return;
|
||||
}
|
||||
vc.http.apiPost(
|
||||
'/scheduleClasses.saveScheduleClassesStaff',
|
||||
JSON.stringify(vc.component.addScheduleClassesStaffInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#addScheduleClassesStaffModel').modal('hide');
|
||||
vc.component.clearAddScheduleClassesStaffInfo();
|
||||
vc.emit('scheduleClassesStaffManage', 'listScheduleClassesStaff', {});
|
||||
return;
|
||||
}
|
||||
vc.toast(_json.msg);
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.toast(errInfo);
|
||||
});
|
||||
},
|
||||
clearAddScheduleClassesStaffInfo: function () {
|
||||
vc.component.addScheduleClassesStaffInfo = {
|
||||
scheduleId: '',
|
||||
staffs: []
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc);
|
||||
@ -0,0 +1,19 @@
|
||||
<div class="modal fade" id="deleteScheduleClassesStaffModel" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel"> <span><vc:i18n name="请确认您的操作!"></vc:i18n></span></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<tr align="center"><th><span><vc:i18n name="确定删除班次员工" namespace="deleteScheduleClassesStaff"></vc:i18n></span></th></tr>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" v-on:click="closeDeleteScheduleClassesStaffModel()"><span><vc:i18n name="点错了"></vc:i18n></span></button>
|
||||
<button type="button" class="btn btn-primary" v-on:click="deleteScheduleClassesStaff()"><span><vc:i18n name="确认删除!"></vc:i18n></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,49 @@
|
||||
(function(vc,vm){
|
||||
|
||||
vc.extends({
|
||||
data:{
|
||||
deleteScheduleClassesStaffInfo:{
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod:function(){
|
||||
|
||||
},
|
||||
_initEvent:function(){
|
||||
vc.on('deleteScheduleClassesStaff','openDeleteScheduleClassesStaffModal',function(_params){
|
||||
vc.component.deleteScheduleClassesStaffInfo = _params;
|
||||
$('#deleteScheduleClassesStaffModel').modal('show');
|
||||
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
deleteScheduleClassesStaff:function(){
|
||||
vc.http.apiPost(
|
||||
'/scheduleClasses.deleteScheduleClassesStaff',
|
||||
JSON.stringify(vc.component.deleteScheduleClassesStaffInfo),
|
||||
{
|
||||
emulateJSON:true
|
||||
},
|
||||
function(json,res){
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#deleteScheduleClassesStaffModel').modal('hide');
|
||||
vc.emit('scheduleClassesStaffManage','listScheduleClassesStaff',{});
|
||||
return ;
|
||||
}
|
||||
vc.toast(_json.msg);
|
||||
},
|
||||
function(errInfo,error){
|
||||
console.log('请求失败处理');
|
||||
vc.toast(json);
|
||||
});
|
||||
},
|
||||
closeDeleteScheduleClassesStaffModel:function(){
|
||||
$('#deleteScheduleClassesStaffModel').modal('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc,window.vc.component);
|
||||
BIN
public/pages/property/.DS_Store
vendored
BIN
public/pages/property/.DS_Store
vendored
Binary file not shown.
@ -106,6 +106,10 @@
|
||||
_openPlanStaff: function (_inspectionPlan) {
|
||||
$that.scheduleClassesInfo.inspectionPlanStaffModel = true;
|
||||
vc.emit('inspectionPlanStaffManage', 'listScheduleClassesStaff', _inspectionPlan);
|
||||
},
|
||||
_scheduleClassesStaff:function(_scheduleClasses){
|
||||
vc.jumpToPage('/#/pages/property/scheduleClassesStaffManage?scheduleId='+_scheduleClasses.scheduleId)
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -0,0 +1,75 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5><span>
|
||||
<vc:i18n name="班次员工" namespace="scheduleClassesStaffManage"></vc:i18n>
|
||||
</span></h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<button type="button" class="btn btn-white btn-sm"
|
||||
v-on:click="vc.goBack()">
|
||||
<vc:i18n name="返回" ></vc:i18n>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary btn-sm"
|
||||
v-on:click="_openAddScheduleClassesStaffModal()">
|
||||
<i class="glyphicon glyphicon-plus"></i>
|
||||
<span>
|
||||
<vc:i18n name="添加" namespace="scheduleClassesStaffManage"></vc:i18n>
|
||||
</span>
|
||||
</button>
|
||||
</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"><span>
|
||||
<vc:i18n name='员工ID' namespace='scheduleClassesStaffManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='员工名称' namespace='scheduleClassesStaffManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='创建时间' namespace='scheduleClassesStaffManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='操作'></vc:i18n>
|
||||
</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="scheduleClassesStaff in scheduleClassesStaffManageInfo.scheduleClassesStaffs">
|
||||
<td class="text-center">{{scheduleClassesStaff.staffId}}</td>
|
||||
<td class="text-center">{{scheduleClassesStaff.staffName}}</td>
|
||||
<td class="text-center">{{scheduleClassesStaff.createTime}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openDeleteScheduleClassesStaffModel(scheduleClassesStaff)"><span>
|
||||
<vc:i18n name='删除'></vc:i18n>
|
||||
</span></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="property/addScheduleClassesStaff" callBackListener="" callBackFunction=""></vc:create>
|
||||
<vc:create path="property/deleteScheduleClassesStaff"></vc:create>
|
||||
|
||||
</div>
|
||||
@ -0,0 +1,83 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
scheduleClassesStaffManageInfo: {
|
||||
scheduleClassesStaffs: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
scsId: '',
|
||||
conditions: {
|
||||
scheduleId: '',
|
||||
storeId: '',
|
||||
staffId: '',
|
||||
staffName: '',
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
$that.scheduleClassesStaffManageInfo.conditions.scheduleId = vc.getParam('scheduleId');
|
||||
vc.component._listScheduleClassesStaffs(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function () {
|
||||
|
||||
vc.on('scheduleClassesStaffManage', 'listScheduleClassesStaff', function (_param) {
|
||||
vc.component._listScheduleClassesStaffs(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
vc.component._listScheduleClassesStaffs(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_listScheduleClassesStaffs: function (_page, _rows) {
|
||||
|
||||
vc.component.scheduleClassesStaffManageInfo.conditions.page = _page;
|
||||
vc.component.scheduleClassesStaffManageInfo.conditions.row = _rows;
|
||||
let param = {
|
||||
params: vc.component.scheduleClassesStaffManageInfo.conditions
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('/scheduleClasses.listScheduleClassesStaff',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _scheduleClassesStaffManageInfo = JSON.parse(json);
|
||||
vc.component.scheduleClassesStaffManageInfo.total = _scheduleClassesStaffManageInfo.total;
|
||||
vc.component.scheduleClassesStaffManageInfo.records = _scheduleClassesStaffManageInfo.records;
|
||||
vc.component.scheduleClassesStaffManageInfo.scheduleClassesStaffs = _scheduleClassesStaffManageInfo.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.scheduleClassesStaffManageInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_openAddScheduleClassesStaffModal: function () {
|
||||
vc.emit('addScheduleClassesStaff', 'openAddScheduleClassesStaffModal', {
|
||||
scheduleId:$that.scheduleClassesStaffManageInfo.conditions.scheduleId
|
||||
});
|
||||
},
|
||||
_openDeleteScheduleClassesStaffModel: function (_scheduleClassesStaff) {
|
||||
vc.emit('deleteScheduleClassesStaff', 'openDeleteScheduleClassesStaffModal', _scheduleClassesStaff);
|
||||
},
|
||||
_queryScheduleClassesStaffMethod: function () {
|
||||
vc.component._listScheduleClassesStaffs(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_moreCondition: function () {
|
||||
if (vc.component.scheduleClassesStaffManageInfo.moreCondition) {
|
||||
vc.component.scheduleClassesStaffManageInfo.moreCondition = false;
|
||||
} else {
|
||||
vc.component.scheduleClassesStaffManageInfo.moreCondition = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user