|
@@ -10,6 +10,7 @@ $(document).ready(function() {
|
|
|
{title: '项目名称/合同名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 360, formatter: '@', readOnly: 'readOnly.code', wordWrap: true},
|
|
{title: '项目名称/合同名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 360, formatter: '@', readOnly: 'readOnly.code', wordWrap: true},
|
|
|
{title: '创建人', colSpan: '1', rowSpan: '2', field: 'username', hAlign: 1, width: 80, formatter: '@', readOnly: true},
|
|
{title: '创建人', colSpan: '1', rowSpan: '2', field: 'username', hAlign: 1, width: 80, formatter: '@', readOnly: true},
|
|
|
{title: '合同金额', colSpan: '1', rowSpan: '2', field: 'total_price', hAlign: 2, width: 120, formatter: '@', readOnly: true},
|
|
{title: '合同金额', colSpan: '1', rowSpan: '2', field: 'total_price', hAlign: 2, width: 120, formatter: '@', readOnly: true},
|
|
|
|
|
+ {title: '合同类型', colSpan: '1', rowSpan: '2', field: 'type', hAlign: 0, width: 120, readOnly: 'readOnly.type', cellType: 'customizeCombo', comboItems: types, cellTypeKey: 1},
|
|
|
{title: '合同状态', colSpan: '1', rowSpan: '2', field: 'status', hAlign: 1, width: 100, formatter: '@', readOnly: true, getValue:'getValue.status', foreColor:'foreColor.status'},
|
|
{title: '合同状态', colSpan: '1', rowSpan: '2', field: 'status', hAlign: 1, width: 100, formatter: '@', readOnly: true, getValue:'getValue.status', foreColor:'foreColor.status'},
|
|
|
],
|
|
],
|
|
|
emptyRows: 0,
|
|
emptyRows: 0,
|
|
@@ -59,6 +60,9 @@ $(document).ready(function() {
|
|
|
calc: function (data) {
|
|
calc: function (data) {
|
|
|
return !permission_edit || (data && data.children && data.children.length > 0);
|
|
return !permission_edit || (data && data.children && data.children.length > 0);
|
|
|
},
|
|
},
|
|
|
|
|
+ type: function (data) {
|
|
|
|
|
+ return !(data && data.c_code && !data.settle_code && (data.uid === user_id || permission_edit_contract));
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|
|
|
const getStackedBarTip = function (data) {
|
|
const getStackedBarTip = function (data) {
|
|
@@ -597,6 +601,10 @@ $(document).ready(function() {
|
|
|
const col = info.sheet.zh_setting.cols[info.col];
|
|
const col = info.sheet.zh_setting.cols[info.col];
|
|
|
const sortData = info.sheet.zh_dataType === 'tree' ? info.sheet.zh_tree.nodes : info.sheet.zh_data;
|
|
const sortData = info.sheet.zh_dataType === 'tree' ? info.sheet.zh_tree.nodes : info.sheet.zh_data;
|
|
|
const node = sortData[info.row];
|
|
const node = sortData[info.row];
|
|
|
|
|
+ if (col.field === 'type' && contractCol.readOnly.type(node)) {
|
|
|
|
|
+ SpreadJsObj.reLoadRowData(info.sheet, info.row);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
const data = {
|
|
const data = {
|
|
|
id: node.id,
|
|
id: node.id,
|
|
@@ -928,7 +936,7 @@ $(document).ready(function() {
|
|
|
};
|
|
};
|
|
|
if (permission_edit) {
|
|
if (permission_edit) {
|
|
|
contractSpread.bind(spreadNS.Events.EditStarting, contractTreeSpreadObj.editStarting);
|
|
contractSpread.bind(spreadNS.Events.EditStarting, contractTreeSpreadObj.editStarting);
|
|
|
- contractSpread.bind(spreadNS.Events.EditEnded, contractTreeSpreadObj.editEnded);
|
|
|
|
|
|
|
+ // contractSpread.bind(spreadNS.Events.EditEnded, contractTreeSpreadObj.editEnded);
|
|
|
contractSpread.bind(spreadNS.Events.ButtonClicked, contractTreeSpreadObj.buttonClicked);
|
|
contractSpread.bind(spreadNS.Events.ButtonClicked, contractTreeSpreadObj.buttonClicked);
|
|
|
contractSpread.bind(spreadNS.Events.ClipboardPasting, contractTreeSpreadObj.clipboardPasting);
|
|
contractSpread.bind(spreadNS.Events.ClipboardPasting, contractTreeSpreadObj.clipboardPasting);
|
|
|
contractSpread.bind(spreadNS.Events.ClipboardChanging, function (e, info) {
|
|
contractSpread.bind(spreadNS.Events.ClipboardChanging, function (e, info) {
|
|
@@ -985,6 +993,7 @@ $(document).ready(function() {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
|
|
+ contractSpread.bind(spreadNS.Events.EditEnded, contractTreeSpreadObj.editEnded);
|
|
|
if (permission_add) {
|
|
if (permission_add) {
|
|
|
contractContextMenuOptions.items.create2 = {
|
|
contractContextMenuOptions.items.create2 = {
|
|
|
name: '新增合同',
|
|
name: '新增合同',
|
|
@@ -1765,6 +1774,7 @@ $(document).ready(function() {
|
|
|
total_price: $('#cons-add input[name="total_price"]').val(),
|
|
total_price: $('#cons-add input[name="total_price"]').val(),
|
|
|
party_b: $('#cons-add input[name="party_b"]').val(),
|
|
party_b: $('#cons-add input[name="party_b"]').val(),
|
|
|
remark: $('#cons-add textarea[name="remark"]').val(),
|
|
remark: $('#cons-add textarea[name="remark"]').val(),
|
|
|
|
|
+ type: $('#cons-add select[name="type"]').val(),
|
|
|
}
|
|
}
|
|
|
if (!data.code) {
|
|
if (!data.code) {
|
|
|
toastr.error('请输入合同编号');
|
|
toastr.error('请输入合同编号');
|