mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
优化询价人设置
This commit is contained in:
parent
59b42a7b5f
commit
843df49c80
@ -0,0 +1,65 @@
|
||||
<div id="addInspectionPlanStaffModel" class="modal fade" tabindex="-1" 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 ">添加巡检人</h3>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
<div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">执行人员</label>
|
||||
<div class="col-sm-3">
|
||||
<vc:create path="frame/orgSelect2"
|
||||
parentModal="addInspectionPlanStaffModel"
|
||||
callBackListener="addInspectionPlanStaffInfo"
|
||||
callBackFunction="notify"
|
||||
namespace="addInspectionPlanStaff"
|
||||
></vc:create>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<vc:create path="frame/departmentSelect2"
|
||||
parentModal="addInspectionPlanStaffModel"
|
||||
callBackListener="addInspectionPlanStaffInfo"
|
||||
callBackFunction="notify"
|
||||
namespace="addInspectionPlanStaff"
|
||||
></vc:create>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<vc:create path="frame/staffSelect2"
|
||||
parentModal="addInspectionPlanStaffModel"
|
||||
callBackListener="addInspectionPlanStaffInfo"
|
||||
callBackFunction="notify"
|
||||
namespace="addInspectionPlanStaff"
|
||||
></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">开始时间</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addInspectionPlanStaffInfo.startTime" type="text"
|
||||
placeholder="必填,请填写开始时间" class="form-control addInspectionPlanStaffStartTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">结束时间</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addInspectionPlanStaffInfo.endTime" type="text" placeholder="必填,请填写结束时间"
|
||||
class="form-control addInspectionPlanStaffEndTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button"
|
||||
v-on:click="_saveInspectionPlanStaff()"><i class="fa fa-check"></i> 保存
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;" v-on:click="cleanInspectionPlanStaffAddModel()"
|
||||
data-dismiss="modal">取消
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,168 @@
|
||||
(function (vc) {
|
||||
|
||||
vc.extends({
|
||||
data: {
|
||||
addInspectionPlanStaffInfo: {
|
||||
inspectionPlanId: '',
|
||||
staffId: '',
|
||||
staffName: '',
|
||||
startTime: '',
|
||||
endTime: ''
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
vc.component._initAddInspectionPlanStaffDateInfo();
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('addInspectionPlanStaff', 'openAddInspectionPlanStaffModal', function () {
|
||||
$('#addInspectionPlanStaffModel').modal('show');
|
||||
});
|
||||
|
||||
vc.on("addInspectionPlanStaff", "notify", function (_param) {
|
||||
if (_param.hasOwnProperty("staffId")) {
|
||||
vc.component.addInspectionPlanStaffInfo.staffId = _param.staffId;
|
||||
vc.component.addInspectionPlanStaffInfo.staffName = _param.staffName;
|
||||
}
|
||||
if (_param.hasOwnProperty("inspectionRouteId")) {
|
||||
vc.component.addInspectionPlanStaffInfo.inspectionRouteId = _param.inspectionRouteId;
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
methods: {
|
||||
addInspectionPlanStaffValidate() {
|
||||
return vc.validate.validate({
|
||||
addInspectionPlanStaffInfo: vc.component.addInspectionPlanStaffInfo
|
||||
}, {
|
||||
'addInspectionPlanStaffInfo.inspectionPlanId': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "巡检计划不能为空"
|
||||
}
|
||||
],
|
||||
'addInspectionPlanStaffInfo.staffId': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "执行人不能为空"
|
||||
}
|
||||
],
|
||||
'addInspectionPlanStaffInfo.staffName': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "执行人员不能为空"
|
||||
}
|
||||
],
|
||||
'addInspectionPlanStaffInfo.startTime': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "开始时间不能为空"
|
||||
},
|
||||
{
|
||||
limit: "dateTime",
|
||||
param: "",
|
||||
errInfo: "计计划开始时间不是有效的时间格式"
|
||||
},
|
||||
],
|
||||
'addInspectionPlanStaffInfo.endTime': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "结束时间不能为空"
|
||||
},
|
||||
{
|
||||
limit: "dateTime",
|
||||
param: "",
|
||||
errInfo: "计划结束时间不是有效的时间格式"
|
||||
},
|
||||
]
|
||||
});
|
||||
},
|
||||
_initAddInspectionPlanStaffDateInfo: function () {
|
||||
//vc.component.addInspectionPlanStaffInfo.startTime = vc.dateFormat(new Date().getTime());
|
||||
$('.addInspectionPlanStaffStartTime').datetimepicker({
|
||||
language: 'zh-CN',
|
||||
format: 'hh:ii',
|
||||
initTime: true,
|
||||
startView: 'day',
|
||||
autoClose: 1,
|
||||
todayBtn: true
|
||||
|
||||
});
|
||||
$('.addInspectionPlanStaffStartTime').datetimepicker()
|
||||
.on('changeDate', function (ev) {
|
||||
var value = $(".addInspectionPlanStaffStartTime").val();
|
||||
vc.component.addInspectionPlanStaffInfo.startTime = value;
|
||||
});
|
||||
$('.addInspectionPlanStaffEndTime').datetimepicker({
|
||||
language: 'zh-CN',
|
||||
format: 'hh:ii',
|
||||
initTime: true,
|
||||
startView: 'day',
|
||||
autoClose: 1,
|
||||
todayBtn: true
|
||||
});
|
||||
$('.addInspectionPlanStaffEndTime').datetimepicker()
|
||||
.on('changeDate', function (ev) {
|
||||
var value = $(".addInspectionPlanStaffEndTime").val();
|
||||
vc.component.addInspectionPlanStaffInfo.endTime = value;
|
||||
});
|
||||
},
|
||||
_saveInspectionPlanStaff: function () {
|
||||
if (!vc.component.addInspectionPlanValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return;
|
||||
}
|
||||
|
||||
vc.component.addInspectionPlanStaffInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
|
||||
vc.http.apiPost(
|
||||
'inspectionPlanStaff.saveInspectionPlanStaff',
|
||||
JSON.stringify(vc.component.addInspectionPlanStaffInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
if (res.status == 200) {
|
||||
//关闭model
|
||||
$('#addInspectionPlanModel').modal('hide');
|
||||
vc.emit('inspectionPlanStaffManage','listInspectionPoint', {
|
||||
inspectionPlanId:$that.addInspectionPlanStaffInfo.inspectionPlanId
|
||||
});
|
||||
vc.component.clearaddInspectionPlanStaffInfo();
|
||||
return;
|
||||
}
|
||||
vc.toast(json);
|
||||
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
|
||||
vc.toast(errInfo);
|
||||
|
||||
});
|
||||
},
|
||||
clearaddInspectionPlanStaffInfo: function () {
|
||||
vc.component.addInspectionPlanStaffInfo = {
|
||||
inspectionPlanId: '',
|
||||
staffId: '',
|
||||
staffName: '',
|
||||
startTime: '',
|
||||
endTime: ''
|
||||
};
|
||||
},
|
||||
cleanInspectionPlanStaffAddModel: function () {
|
||||
vc.component.clearaddInspectionPlanStaffInfo();
|
||||
//员工select2
|
||||
vc.emit('addInspectionPlanStaff', 'staffSelect2', 'clearStaff', {});
|
||||
vc.emit('addInspectionPlanStaff', 'departmentSelect2', 'clearDepartment', {});
|
||||
vc.emit('addInspectionPlanStaff', 'orgSelect2', 'clearOrg', {});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc);
|
||||
@ -133,7 +133,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="inspectionPlanManageInfo.inspectionPlanStaffModel == true">
|
||||
<div v-show="inspectionPlanManageInfo.inspectionPlanStaffModel == true">
|
||||
<vc:create path="/pages/property/inspectionPlanStaffManage"></vc:create>
|
||||
</div>
|
||||
|
||||
|
||||
@ -58,8 +58,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <vc:create path="property/chooseInspectionRoutePoint" emitListener="inspectionRoutePointManage"
|
||||
<vc:create path="property/addInspectionPlanStaff" emitListener="inspectionRoutePointManage"
|
||||
emitFunction="listInspectionPoint"></vc:create>
|
||||
|
||||
<!--
|
||||
<vc:create path="property/deleteInspectionRoutePoint"></vc:create> -->
|
||||
</div>
|
||||
@ -63,7 +63,7 @@
|
||||
);
|
||||
},
|
||||
_openAddInspectionPlanStaffModal:function(){
|
||||
vc.emit('chooseInspectionRoutePoint','openchooseInspectionRoutePointModal',$that.inspectionPlanStaffManageInfo);
|
||||
vc.emit('addInspectionPlanStaff','openAddInspectionPlanStaffModal',$that.inspectionPlanStaffManageInfo);
|
||||
},
|
||||
_openDeleteInspectionPlanStaffModel:function(_inspectionPoint){
|
||||
_inspectionPoint.inspectionPlanId = $that.inspectionPlanStaffManageInfo.inspectionPlanId;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user