mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 10:00:56 +08:00
Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunityWeb
This commit is contained in:
commit
c07e5bda95
@ -8,6 +8,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ibox-content">
|
<div class="ibox-content">
|
||||||
|
<div class="form-group row">
|
||||||
|
<button v-for="(item,index) in contractTypeManageInfo.contractTypeAttrs" class="btn btn-primary float-right" style="margin-right: 10px;margin-top: 10px;" type="button" v-on:click="insertAttrs(item)">
|
||||||
|
{{item}}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">模板内容</label>
|
<label class="col-sm-2 col-form-label">模板内容</label>
|
||||||
<div class="col-sm-10 ">
|
<div class="col-sm-10 ">
|
||||||
@ -16,7 +21,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ibox-content">
|
<div class="ibox-content">
|
||||||
<button class="btn btn-primary float-right" type="button" v-on:click="saveTemplateInfo()"><i
|
<button class="btn btn-primary float-right" type="button" v-on:click="saveTemplateInfo()"><i
|
||||||
class="fa fa-check"></i> 提交
|
class="fa fa-check"></i> 提交
|
||||||
|
|||||||
@ -71,6 +71,9 @@
|
|||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
insertAttrs: function (_attr) {
|
||||||
|
$('.summernote').summernote('editor.insertText',_attr)
|
||||||
|
},
|
||||||
clearaddTemplateViewInfo: function () {
|
clearaddTemplateViewInfo: function () {
|
||||||
vc.component.addTemplateViewInfo = {
|
vc.component.addTemplateViewInfo = {
|
||||||
contractTypeId: '',
|
contractTypeId: '',
|
||||||
|
|||||||
@ -8,6 +8,9 @@
|
|||||||
data: {
|
data: {
|
||||||
contractTypeManageInfo: {
|
contractTypeManageInfo: {
|
||||||
contractTypes: [],
|
contractTypes: [],
|
||||||
|
contractTypeAttrs: [],
|
||||||
|
contractTypeSpec: '',
|
||||||
|
templatecontent: '',
|
||||||
total: 0,
|
total: 0,
|
||||||
records: 1,
|
records: 1,
|
||||||
moreCondition: false,
|
moreCondition: false,
|
||||||
@ -38,7 +41,6 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
_listContractTypes: function (_page, _rows) {
|
_listContractTypes: function (_page, _rows) {
|
||||||
|
|
||||||
vc.component.contractTypeManageInfo.conditions.page = _page;
|
vc.component.contractTypeManageInfo.conditions.page = _page;
|
||||||
vc.component.contractTypeManageInfo.conditions.row = _rows;
|
vc.component.contractTypeManageInfo.conditions.row = _rows;
|
||||||
var param = {
|
var param = {
|
||||||
@ -78,8 +80,54 @@
|
|||||||
_openContractTypeSpecModel: function (_contractType) {
|
_openContractTypeSpecModel: function (_contractType) {
|
||||||
vc.jumpToPage('/admin.html#/pages/admin/contractTypeSpecManage?contractTypeId=' + _contractType.contractTypeId);
|
vc.jumpToPage('/admin.html#/pages/admin/contractTypeSpecManage?contractTypeId=' + _contractType.contractTypeId);
|
||||||
},
|
},
|
||||||
|
_loadContractAttrs: function (_contractTypeId) {
|
||||||
|
var param = {
|
||||||
|
params: {
|
||||||
|
page: 1,
|
||||||
|
row: 1,
|
||||||
|
contractTypeId: _contractTypeId
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//发送模板get请求
|
||||||
|
vc.http.apiGet('/contract/printContractTemplate',
|
||||||
|
param,
|
||||||
|
function (json, res) {
|
||||||
|
let _info = JSON.parse(json);
|
||||||
|
let _data = _info.data;
|
||||||
|
$that.contractTypeManageInfo.contractTypeAttrs = [];
|
||||||
|
// 合同信息
|
||||||
|
$that.contractdata = _data.contract[0];
|
||||||
|
|
||||||
|
//合同属性
|
||||||
|
$that.contractTypeManageInfo.contractTypeSpec = _data.contractTypeSpec;
|
||||||
|
$that.contractTypeManageInfo.contractTypeSpec.forEach(function (e) {
|
||||||
|
let rname = e.specName;
|
||||||
|
let reg = '#' + rname + '#';
|
||||||
|
$that.contractTypeManageInfo.contractTypeAttrs.push(reg);
|
||||||
|
});
|
||||||
|
//基本属性
|
||||||
|
$that.baseRepalce = _data.baseRepalce;
|
||||||
|
if ($that.baseRepalce) {
|
||||||
|
$that.baseRepalce.forEach(function (e) {
|
||||||
|
let rname = e.name;
|
||||||
|
let rkey = e.key;
|
||||||
|
var contractarr = Object.keys($that.contractdata);
|
||||||
|
for (var a in contractarr) {
|
||||||
|
if (rkey == contractarr[a]) {
|
||||||
|
let reg = '#' + rname + '#';
|
||||||
|
$that.contractTypeManageInfo.contractTypeAttrs.push(reg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, function (errInfo, error) {
|
||||||
|
console.log('请求失败处理');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
_openContractTemplate: function (_contractType) {
|
_openContractTemplate: function (_contractType) {
|
||||||
$that.contractTypeManageInfo.componentShow = '';
|
$that.contractTypeManageInfo.componentShow = '';
|
||||||
|
vc.component._loadContractAttrs(_contractType.contractTypeId);
|
||||||
vc.emit('addTemplateView', 'openTemplate', _contractType);
|
vc.emit('addTemplateView', 'openTemplate', _contractType);
|
||||||
},
|
},
|
||||||
_moreCondition: function () {
|
_moreCondition: function () {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user