This commit is contained in:
java110 2023-09-19 15:57:10 +08:00
commit 01f9d53421
6 changed files with 81 additions and 60 deletions

View File

@ -34,19 +34,19 @@
_initEvent: function() {
vc.on('editOwner', 'openEditOwnerModal', function(_owner) {
if (_owner.address == null || _owner.address == undefined || _owner.address == '') {
vc.component.editOwnerInfo.address = "";
$that.editOwnerInfo.address = "";
}
//清理 上次数据
$that.clearEditOwnerInfo();
vc.copyObject(_owner, vc.component.editOwnerInfo);
vc.copyObject(_owner, $that.editOwnerInfo);
//根据memberId 查询 照片信息
vc.component.editOwnerInfo.ownerPhoto = _owner.urls && _owner.urls.length > 0 ? _owner.urls[0] : '';
vc.component.editOwnerInfo.ownerPhotoUrl = _fileUrl + "?objId=" +
vc.component.editOwnerInfo.memberId + "&communityId=" + vc.getCurrentCommunity().communityId + "&fileTypeCd=10000&time=" + new Date();
$that.editOwnerInfo.ownerPhoto = _owner.urls && _owner.urls.length > 0 ? _owner.urls[0] : '';
$that.editOwnerInfo.ownerPhotoUrl = _fileUrl + "?objId=" +
$that.editOwnerInfo.memberId + "&communityId=" + vc.getCurrentCommunity().communityId + "&fileTypeCd=10000&time=" + new Date();
$('#editOwnerModel').modal('show');
vc.component._initAddOwnerMediaForEdit();
$that._initAddOwnerMediaForEdit();
if (_owner.hasOwnProperty('ownerAttrDtos')) {
let _ownerAttrDtos = _owner.ownerAttrDtos;
_ownerAttrDtos.forEach(item => {
@ -63,7 +63,7 @@
methods: {
editOwnerValidate: function() {
return vc.validate.validate({
editOwnerInfo: vc.component.editOwnerInfo
editOwnerInfo: $that.editOwnerInfo
}, {
'editOwnerInfo.name': [{
limit: "required",
@ -100,18 +100,18 @@
});
},
editOwnerMethod: function() {
if (!vc.component.editOwnerValidate()) {
if (!$that.editOwnerValidate()) {
vc.toast(vc.validate.errInfo);
return;
}
vc.component.editOwnerInfo.communityId = vc.getCurrentCommunity().communityId;
$that.editOwnerInfo.communityId = vc.getCurrentCommunity().communityId;
//编辑时 ownerPhoto 中内容不是照片内容,则清空
if (vc.component.editOwnerInfo.ownerPhotoUrl.indexOf(_fileUrl) != -1) {
vc.component.editOwnerInfo.ownerPhotoUrl = "";
if ($that.editOwnerInfo.ownerPhotoUrl.indexOf(_fileUrl) != -1) {
$that.editOwnerInfo.ownerPhotoUrl = "";
}
vc.http.apiPost(
'/owner.editOwner',
JSON.stringify(vc.component.editOwnerInfo), {
JSON.stringify($that.editOwnerInfo), {
emulateJSON: true
},
function(json, res) {
@ -139,7 +139,7 @@
_attrs.forEach(item => {
item.value = '';
})
vc.component.editOwnerInfo = {
$that.editOwnerInfo = {
componentTitle: _componentTitle,
ownerId: '',
memberId: '',
@ -165,8 +165,8 @@
navigator.msGetUserMedia || null;
},
_initAddOwnerMediaForEdit: function() {
if (vc.component._editUserMedia()) {
vc.component.editOwnerInfo.videoPlaying = false;
if ($that._editUserMedia()) {
$that.editOwnerInfo.videoPlaying = false;
var constraints = {
video: {
width: 208,
@ -185,17 +185,17 @@
video.srcObject = stream;
}
video.play();
vc.component.editOwnerInfo.videoPlaying = true;
$that.editOwnerInfo.videoPlaying = true;
}, function(error) {
vc.component.editOwnerInfo.videoPlaying = false;
$that.editOwnerInfo.videoPlaying = false;
});
} else {
vc.component.editOwnerInfo.videoPlaying = false;
$that.editOwnerInfo.videoPlaying = false;
console.log("初始化视频失败");
}
},
_takePhotoForEdit: function() {
if (vc.component.editOwnerInfo.videoPlaying) {
if ($that.editOwnerInfo.videoPlaying) {
var canvas = document.getElementById('canvasForEdit');
var video = document.getElementById('ownerPhotoForEdit');
let w = video.videoWidth;
@ -217,7 +217,7 @@
var data = canvas.toDataURL('image/jpeg', 0.3);
// 改为异步上传图片
this._doUploadImageEditOwner(vc.dataURLtoFile(data, $that.editOwnerInfo.name));
// vc.component.editOwnerInfo.ownerPhoto = data;
// $that.editOwnerInfo.ownerPhoto = data;
//document.getElementById('photo').setAttribute('src', data);
} else {
vc.toast('未检测到摄像头');
@ -260,8 +260,8 @@
return;
}
var data = JSON.parse(json);
vc.component.editOwnerInfo.ownerPhoto = data.fileId;
vc.component.editOwnerInfo.ownerPhotoUrl = data.url;
$that.editOwnerInfo.ownerPhoto = data.fileId;
$that.editOwnerInfo.ownerPhotoUrl = data.url;
},
function(errInfo, error) {
console.log('请求失败处理');
@ -270,13 +270,13 @@
);
},
_reOpenVedioForEdit: function() {
vc.component.editOwnerInfo.ownerPhoto = "";
vc.component.editOwnerInfo.ownerPhotoUrl = "";
vc.component._initAddOwnerMediaForEdit();
$that.editOwnerInfo.ownerPhoto = "";
$that.editOwnerInfo.ownerPhotoUrl = "";
$that._initAddOwnerMediaForEdit();
},
_closeVedioForEdit: function() {
if (vc.component.editOwnerInfo.mediaStreamTrack != null) {
vc.component.editOwnerInfo.mediaStreamTrack.stop();
if ($that.editOwnerInfo.mediaStreamTrack != null) {
$that.editOwnerInfo.mediaStreamTrack.stop();
}
},
_loadEditOwnerAttrSpec: function() {
@ -308,7 +308,7 @@
// obtainEditAge: function() {
// // $that.checkIdCard($that.editOwnerInfo.idCard);
// // let param = {
// // idCard: vc.component.editOwnerInfo.idCard,
// // idCard: $that.editOwnerInfo.idCard,
// // communityId: vc.getCurrentCommunity().communityId
// // };
// // //发送get请求
@ -320,7 +320,7 @@
// // //vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
// // let _json = JSON.parse(json);
// // if (res.status == 200) {
// // vc.component.editOwnerInfo.age = _json.age;
// // $that.editOwnerInfo.age = _json.age;
// // } else {
// // vc.toast(_json.msg);
// // }

View File

@ -99,13 +99,13 @@
.on('changeDate', function (ev) {
var value = $(".roomCreateFeeStartTime").val();
var start = Date.parse(new Date(value));
var end = Date.parse(new Date(vc.component.roomCreateFeeAddInfo.endTime));
if (!vc.component.roomCreateFeeAddInfo.feeFlag && !vc.component.roomCreateFeeAddInfo.feeTypeCd && start - end >= 0) {
var end = Date.parse(new Date($that.roomCreateFeeAddInfo.endTime));
if (!$that.roomCreateFeeAddInfo.feeFlag && !$that.roomCreateFeeAddInfo.feeTypeCd && start - end >= 0) {
vc.toast("计费起始时间必须小于计费终止时间");
$(".roomCreateFeeStartTime").val('');
vc.component.roomCreateFeeAddInfo.startTime = "";
$that.roomCreateFeeAddInfo.startTime = "";
} else {
vc.component.roomCreateFeeAddInfo.startTime = value;
$that.roomCreateFeeAddInfo.startTime = value;
}
});
$('.roomCreateFeeEndTime').datetimepicker({
@ -121,14 +121,14 @@
$('.roomCreateFeeEndTime').datetimepicker()
.on('changeDate', function (ev) {
var value = $(".roomCreateFeeEndTime").val();
var start = Date.parse(new Date(vc.component.roomCreateFeeAddInfo.startTime));
var start = Date.parse(new Date($that.roomCreateFeeAddInfo.startTime));
var end = Date.parse(new Date(value));
if (start - end >= 0) {
vc.toast("计费终止时间必须大于计费起始时间");
$(".roomCreateFeeEndTime").val('');
vc.component.roomCreateFeeAddInfo.endTime = "";
$that.roomCreateFeeAddInfo.endTime = "";
} else {
vc.component.roomCreateFeeAddInfo.endTime = value;
$that.roomCreateFeeAddInfo.endTime = value;
}
});
//防止多次点击时间插件失去焦点

View File

@ -1,7 +1,8 @@
<div>
<div class="row margin-top-lg">
<div class="col-lg-2 padding-right-xs padding-left-xl">
<select class="custom-select custom-select-sm" v-model="simplifyFeeReceiptInfo.objType" @change="_changeSimplifyFeeReceiptFeeTypeCd(simplifyFeeReceiptInfo.objType)">
<select class="custom-select custom-select-sm" v-model="simplifyFeeReceiptInfo.objType"
@change="_changeSimplifyFeeReceiptFeeTypeCd(simplifyFeeReceiptInfo.objType)">
<option disabled value="">{{vc.i18n('请选择收费类型','simplifyFeeReceipt')}}</option>
<option selected value="3333">{{vc.i18n('房屋费','simplifyFeeReceipt')}}</option>
<option value="6666">{{vc.i18n('车位费','simplifyFeeReceipt')}}</option>
@ -9,14 +10,16 @@
</select>
</div>
<div class="col-lg-2 padding-right-xs padding-left-xl" v-if="simplifyFeeReceiptInfo.objType == '6666'">
<select class="custom-select custom-select-sm" v-model="simplifyCarFeeInfo.carId" @change="changeSimplifyFeeReceiptCar()">
<select class="custom-select custom-select-sm" v-model="simplifyCarFeeInfo.carId"
@change="changeSimplifyFeeReceiptCar()">
<option disabled value="">{{vc.i18n('请选择车辆','simplifyFeeReceipt')}}</option>
<option v-for="(item,index) in simplifyFeeReceiptInfo.ownerCars" :value="item.carId">{{item.carNum}}
</option>
</select>
</div>
<div class="col-lg-2 padding-right-xs padding-left-xl" v-else-if="simplifyFeeReceiptInfo.objType == '7777'">
<select class="custom-select custom-select-sm" v-model="simplifyCarFeeInfo.contractId" @change="changeSimplifyFeeReceiptCar()">
<select class="custom-select custom-select-sm" v-model="simplifyCarFeeInfo.contractId"
@change="changeSimplifyFeeReceiptCar()">
<option disabled value="">{{vc.i18n('请选择合同','simplifyFeeReceipt')}}</option>
<option v-for="(item,index) in simplifyFeeReceiptInfo.ownerContracts" :value="item.contractId">
{{item.contractCode}}
@ -24,7 +27,8 @@
</select>
</div>
<div class="col-lg-2 padding-right-xs padding-left-xl" v-if="simplifyFeeReceiptInfo.objType != '7777'">
<select class="custom-select custom-select-sm" v-model="simplifyFeeReceiptInfo.ownerFlag" @change="_queryFeeReceiptMethod()">
<select class="custom-select custom-select-sm" v-model="simplifyFeeReceiptInfo.ownerFlag"
@change="_queryFeeReceiptMethod()">
<option value="F">{{vc.i18n('当前','simplifyFeeReceipt')}}{{simplifyFeeReceiptInfo.objType ==
'6666'?'车辆':'房屋'}}
</option>
@ -34,22 +38,25 @@
</select>
</div>
<div class="col-lg-1 padding-right-xs padding-left-xl input-group-sm">
<input v-model="simplifyFeeReceiptInfo.receiptCode" type="text"
:placeholder="vc.i18n('收据编号','simplifyFeeReceipt')" class="form-control ">
<input v-model="simplifyFeeReceiptInfo.receiptCode" type="text"
:placeholder="vc.i18n('收据编号','simplifyFeeReceipt')" class="form-control ">
</div>
<div class="col-lg-1 padding-right-xs padding-left-xl">
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_queryFeeReceiptMethod()">查询
v-on:click="_queryFeeReceiptMethod()">查询
</button>
</div>
<div class="col-lg-2 padding-right-xs padding-left-xl" v-if="simplifyFeeReceiptInfo.objType != '6666' ">
</div>
<div class="col-lg-4 text-right padding-right-lg">
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px" v-on:click="_printFeeReceipt()">打印
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_printFeeReceipt()">打印
</button>
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px" v-on:click="_printFeeSmallReceipt()">打印小票
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_printFeeSmallReceipt()">打印小票
</button>
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px" v-on:click="_printApplyFeeReceipt()">申请单
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_printApplyFeeReceipt()">申请单
</button>
</div>
</div>
@ -58,7 +65,8 @@
<thead>
<tr>
<th class="text-center">
<input type="checkbox" class="i-checks" v-bind:checked="simplifyFeeReceiptInfo.quan == true" @click="checkAllReceipt($event)">
<input type="checkbox" class="i-checks" v-bind:checked="simplifyFeeReceiptInfo.quan == true"
@click="checkAllReceipt($event)">
</th>
<th class="text-center">
<vc:i18n name="收据编号" namespace="simplifyFeeReceipt"></vc:i18n>
@ -70,39 +78,42 @@
{{_getFeeObjName(simplifyFeeReceiptInfo.objType)}}
</th>
<th class="text-center">
<span><vc:i18n name="业主" namespace="simplifyFeeReceipt"></vc:i18n></span>
<vc:i18n name="业主" namespace="simplifyFeeReceipt"></vc:i18n>
</th>
<th class="text-center">
<span><vc:i18n name="费用项目" namespace="simplifyFeeReceipt"></vc:i18n></span>
<vc:i18n name="费用项目" namespace="simplifyFeeReceipt"></vc:i18n>
</th>
<th class="text-center">
<span><vc:i18n name="收费时间段" namespace="simplifyFeeReceipt"></vc:i18n></span>
<vc:i18n name="收费时间段" namespace="simplifyFeeReceipt"></vc:i18n>
</th>
<th class="text-center">
<span><vc:i18n name="总金额" namespace="simplifyFeeReceipt"></vc:i18n></span>
<vc:i18n name="总金额" namespace="simplifyFeeReceipt"></vc:i18n>
</th>
<th class="text-center">
<span><vc:i18n name="缴费时间" namespace="simplifyFeeReceipt"></vc:i18n></span>
<vc:i18n name="缴费时间" namespace="simplifyFeeReceipt"></vc:i18n>
</th>
<th class="text-center">
<span><vc:i18n name="收据" namespace="simplifyFeeReceipt"></vc:i18n></span>ID
<vc:i18n name="收据ID" namespace="simplifyFeeReceipt"></vc:i18n>
</th>
</tr>
</thead>
<tbody>
<tr v-for="feeReceipt in simplifyFeeReceiptInfo.feeReceipts">
<td class="text-center">
<input type="checkbox" class="i-checks checReceiptItem" v-bind:value="feeReceipt.receiptId" v-model="simplifyFeeReceiptInfo.selectReceipts">
<input type="checkbox" class="i-checks checReceiptItem" v-bind:value="feeReceipt.receiptId"
v-model="simplifyFeeReceiptInfo.selectReceipts">
</td>
<td class="text-center">{{feeReceipt.receiptCode}}
</td>
<td class="text-center">{{_getFeeObjName(feeReceipt.objType)}}
<span><vc:i18n name="费" namespace="simplifyFeeReceipt"></vc:i18n></span>
<span>
<vc:i18n name="费" namespace="simplifyFeeReceipt"></vc:i18n>
</span>
</td>
<td class="text-center">{{feeReceipt.objName}}</td>
<td class="text-center">{{feeReceipt.payObjName}}</td>
<td class="text-center">{{feeReceipt.feeName}}</td>
<td class="text-center">{{vc.dateFormat(feeReceipt.startTime)}}~<br/>
<td class="text-center">{{vc.dateFormat(feeReceipt.startTime)}}~<br />
<span class="text-center" v-if="feeReceipt.startTime >= feeReceipt.endTime">
{{vc.dateFormat(feeReceipt.endTime)}}
</span>

View File

@ -101,8 +101,12 @@
if (_json.code != '0') {
return;
}
$that._listSimplifyFeeDetails(DEFAULT_PAGE, DEFAULT_ROWS);
//$that._listSimplifyFeeDetails(DEFAULT_PAGE, DEFAULT_ROWS);
$('#generatorReceiptModel').modal('hide');
setTimeout(function(){
vc.emit('simplifyAcceptance', 'doSearch','simplifyHisFee')
},1000)
//
},
function(errInfo, error) {

View File

@ -1,12 +1,12 @@
<div>
<div class="bg-white padding-sm border-radius">
<button type="button" class="btn btn-white btn-sm" style="margin-left:10px" v-on:click="_openFeeImportExcel()">
<button type="button" class="btn btn-white btn-sm" v-if="vc.hasPrivilege('502022073096990007')" style="margin-left:10px" v-on:click="_openFeeImportExcel()">
<vc:i18n name="自定义模板" namespace="roomCreateFee"></vc:i18n>
</button>
<button type="button" class="btn btn-white btn-sm" style="margin-left:10px" v-on:click="_openDoCreateRoomFee()">
<button type="button" class="btn btn-white btn-sm" v-if="vc.hasPrivilege('502022073096990007')" style="margin-left:10px" v-on:click="_openDoCreateRoomFee()">
<vc:i18n name="自定义导入" namespace="roomCreateFee"></vc:i18n>
</button>
<button type="button" class="btn btn-white btn-sm" style="margin-left:10px"
<button type="button" class="btn btn-white btn-sm" v-if="vc.hasPrivilege('502022073096990007')" style="margin-left:10px"
v-on:click="_openRoomCreateFeeAddModal(null,true)">
<i class="fa fa-plus"></i>
<span><vc:i18n name="批量创建" namespace="roomCreateFee"></vc:i18n></span>

View File

@ -72,6 +72,12 @@
$that.simplifyAcceptanceInfo.searchValue = _param.roomName;
$that.simplifyAcceptanceInfo.searchPlaceholder = "请输入房屋编号 楼栋-单元-房屋 如1-1-1";
$that._doSearch();
});
vc.on('simplifyAcceptance', 'doSearch', function (_tab) {
$that._doSearch();
setTimeout(function(){
$that.changeTab(_tab)
},2000)
})
},
methods: {