-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
变更合同
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
\ No newline at end of file
diff --git a/public/components/admin/editContract/editContract.js b/public/components/admin/editContract/editContract.js
index 2087d1519..2f2aa478f 100644
--- a/public/components/admin/editContract/editContract.js
+++ b/public/components/admin/editContract/editContract.js
@@ -19,18 +19,38 @@
startTime: '',
endTime: '',
signingTime: '',
+ contractTypes: [],
+ contractTypeSpecs: []
}
},
_initMethod: function () {
+ vc.initDateTime('editStartTime', function (_value) {
+ $that.editContractInfo.startTime = _value;
+ });
+ vc.initDateTime('editEndTime', function (_value) {
+ $that.editContractInfo.endTime = _value;
+ });
+ vc.initDateTime('editSigningTime', function (_value) {
+ $that.editContractInfo.signingTime = _value;
+ });
+
+ $that._loadEditContractType();
},
_initEvent: function () {
vc.on('editContract', 'openEditContractModal', function (_params) {
vc.component.refreshEditContractInfo();
$('#editContractModel').modal('show');
vc.copyObject(_params, vc.component.editContractInfo);
- vc.component.editContractInfo.communityId = vc.getCurrentCommunity().communityId;
+ $that._loadContractType(_params);
+ });
+ $('#editContractModel').on('show.bs.modal', function (e) {
+ $(this).css('display', 'block');
+ let modalWidth = $(window).width() * 0.7;
+ $(this).find('.modal-dialog').css({
+ 'max-width': modalWidth
+ });
});
},
methods: {
@@ -252,6 +272,7 @@
});
},
refreshEditContractInfo: function () {
+ let _contractTypes = $that.editContractInfo.contractTypes;
vc.component.editContractInfo = {
contractId: '',
contractName: '',
@@ -269,8 +290,61 @@
startTime: '',
endTime: '',
signingTime: '',
-
+ contractTypes: _contractTypes,
+ contractTypeSpecs: []
}
+ },
+ _loadEditContractType: function () {
+ let param = {
+ params: {
+ page: 1,
+ row: 100
+ }
+ }
+ //发送get请求
+ vc.http.apiGet('/contract/queryContractType',
+ param,
+ function (json, res) {
+ var _contractTypeManageInfo = JSON.parse(json);
+ vc.component.editContractInfo.contractTypes = _contractTypeManageInfo.data;
+ }, function (errInfo, error) {
+ console.log('请求失败处理');
+ }
+ );
+ },
+ _loadContractType: function (_params) {
+ let _attrs = _params.attrs;
+ let param = {
+ params: {
+ page: 1,
+ row: 100,
+ contractTypeId: $that.editContractInfo.contractType
+ }
+ }
+ $that.editContractInfo.contractTypeSpecs = [];
+ vc.http.apiGet('/contract/queryContractTypeSpec',
+ param,
+ function (json, res) {
+ let _contractTypeSpecManageInfo = JSON.parse(json);
+ _contractTypeSpecManageInfo.data.forEach(item => {
+ _attrs.forEach(_attrItem => {
+ if(item.specCd == _attrItem.specCd){
+ item.value = _attrItem.value;
+ }else{
+ item.value = '';
+ }
+
+ })
+ if (item.specShow == 'Y') {
+ item.values = [];
+ //$that._loadAttrValue(item.specCd, item.values);
+ $that.editContractInfo.contractTypeSpecs.push(item);
+ }
+ });
+ }, function (errInfo, error) {
+ console.log('请求失败处理');
+ }
+ );
}
}
});
diff --git a/public/vcCore/vcFramework.js b/public/vcCore/vcFramework.js
index f2f4a1c73..bcf316d08 100644
--- a/public/vcCore/vcFramework.js
+++ b/public/vcCore/vcFramework.js
@@ -1440,6 +1440,25 @@
return year + "" + month + "" + day + "" + hour + "" + minute + "" + second;
};
+ vcFramework.initDateTime = function (_dateStr,_callBack) {
+ $('.' + _dateStr).datetimepicker({
+ language: 'zh-CN',
+ fontAwesome: 'fa',
+ format: 'yyyy-mm-dd hh:ii:ss',
+ initTime: true,
+ initialDate: new Date(),
+ autoClose: 1,
+ todayBtn: true
+
+ });
+ $('.' + _dateStr).datetimepicker()
+ .on('changeDate', function (ev) {
+ var value = $('.' + _dateStr).val();
+ //vc.component.addFeeConfigInfo.startTime = value;
+ _callBack(value);
+ });
+ }
+
})(window.vcFramework);
@@ -2113,7 +2132,7 @@ vc 校验 工具类 -method
(function (vcFramework) {
let _staffPrivilege = vc.getData('hc_staff_privilege');
- if(_staffPrivilege == null){
+ if (_staffPrivilege == null) {
_staffPrivilege = [];
}
vcFramework.hasPrivilege = (_privalege) => {