|
@@ -1,4 +1,10 @@
|
|
|
const progressCombo = [{ text: '', value: '' }, { text: '进行中', value: '进行中' }, { text: '已完成', value: '已完成' }];
|
|
const progressCombo = [{ text: '', value: '' }, { text: '进行中', value: '进行中' }, { text: '已完成', value: '已完成' }];
|
|
|
|
|
+const progressForeColor = function(data, defaultColor, col) {
|
|
|
|
|
+ if (!data || !col) return defaultColor;
|
|
|
|
|
+ if (data[col.field] === '进行中') return spreadColor.sub_proj.doing;
|
|
|
|
|
+ if (data[col.field] === '已完成') return spreadColor.sub_proj.done;
|
|
|
|
|
+ return defaultColor;
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
$(document).ready(() => {
|
|
$(document).ready(() => {
|
|
|
autoFlashHeight();
|
|
autoFlashHeight();
|
|
@@ -24,7 +30,7 @@ $(document).ready(() => {
|
|
|
cols: [
|
|
cols: [
|
|
|
{title: '序号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 165, formatter: '@', cellType: 'tree'},
|
|
{title: '序号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 165, formatter: '@', cellType: 'tree'},
|
|
|
{title: '阶段/项目名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 210, formatter: '@', cellType: 'autoTip'},
|
|
{title: '阶段/项目名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 210, formatter: '@', cellType: 'autoTip'},
|
|
|
- {title: '成果编制|进度', colSpan: '3|1', rowSpan: '1|1', field: 'edit_progress', hAlign: 1, width: 80, formatter: '@', cellType: 'customizeCombo', comboItems: progressCombo },
|
|
|
|
|
|
|
+ {title: '成果编制|进度', colSpan: '3|1', rowSpan: '1|1', field: 'edit_progress', hAlign: 1, width: 80, formatter: '@', cellType: 'customizeCombo', comboItems: progressCombo, foreColor: progressForeColor },
|
|
|
{
|
|
{
|
|
|
title: '|日期', colSpan: '|1', rowSpan: '|1', field: 'edit_date', hAlign: 2, width: 80, readOnly: true,
|
|
title: '|日期', colSpan: '|1', rowSpan: '|1', field: 'edit_date', hAlign: 2, width: 80, readOnly: true,
|
|
|
formatter: 'yyyy-MM-dd', cellType: 'activeImageBtn', normalImg: '#ellipsis-icon', indent: 5,
|
|
formatter: 'yyyy-MM-dd', cellType: 'activeImageBtn', normalImg: '#ellipsis-icon', indent: 5,
|
|
@@ -33,7 +39,7 @@ $(document).ready(() => {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
{title: '|部门', colSpan: '|1', rowSpan: '|1', field: 'edit_department', hAlign: 2, width: 120, formatter: '@', },
|
|
{title: '|部门', colSpan: '|1', rowSpan: '|1', field: 'edit_department', hAlign: 2, width: 120, formatter: '@', },
|
|
|
- {title: '报审情况|进度', colSpan: '3|1', rowSpan: '1|1', field: 'submit_progress', hAlign: 1, width: 80, formatter: '@', cellType: 'customizeCombo', comboItems: progressCombo },
|
|
|
|
|
|
|
+ {title: '报审情况|进度', colSpan: '3|1', rowSpan: '1|1', field: 'submit_progress', hAlign: 1, width: 80, formatter: '@', cellType: 'customizeCombo', comboItems: progressCombo, foreColor: progressForeColor},
|
|
|
{
|
|
{
|
|
|
title: '|日期', colSpan: '|1', rowSpan: '|1', field: 'submit_date', hAlign: 2, width: 80, readOnly: true,
|
|
title: '|日期', colSpan: '|1', rowSpan: '|1', field: 'submit_date', hAlign: 2, width: 80, readOnly: true,
|
|
|
formatter: 'yyyy-MM-dd', cellType: 'activeImageBtn', normalImg: '#ellipsis-icon', indent: 5,
|
|
formatter: 'yyyy-MM-dd', cellType: 'activeImageBtn', normalImg: '#ellipsis-icon', indent: 5,
|
|
@@ -42,7 +48,7 @@ $(document).ready(() => {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
{title: '|部门', colSpan: '|1', rowSpan: '|1', field: 'submit_department', hAlign: 2, width: 120, formatter: '@', },
|
|
{title: '|部门', colSpan: '|1', rowSpan: '|1', field: 'submit_department', hAlign: 2, width: 120, formatter: '@', },
|
|
|
- {title: '批复情况|进度', colSpan: '4|1', rowSpan: '1|1', field: 'reply_progress', hAlign: 1, width: 80, formatter: '@', cellType: 'customizeCombo', comboItems: progressCombo },
|
|
|
|
|
|
|
+ {title: '批复情况|进度', colSpan: '4|1', rowSpan: '1|1', field: 'reply_progress', hAlign: 1, width: 80, formatter: '@', cellType: 'customizeCombo', comboItems: progressCombo, foreColor: progressForeColor },
|
|
|
{
|
|
{
|
|
|
title: '|日期', colSpan: '|1', rowSpan: '|1', field: 'reply_date', hAlign: 2, width: 80, readOnly: true,
|
|
title: '|日期', colSpan: '|1', rowSpan: '|1', field: 'reply_date', hAlign: 2, width: 80, readOnly: true,
|
|
|
formatter: 'yyyy-MM-dd', cellType: 'activeImageBtn', normalImg: '#ellipsis-icon', indent: 5,
|
|
formatter: 'yyyy-MM-dd', cellType: 'activeImageBtn', normalImg: '#ellipsis-icon', indent: 5,
|
|
@@ -399,7 +405,7 @@ $(document).ready(() => {
|
|
|
for (let iCol = sel.col; iCol < sel.col + sel.colCount; iCol++) {
|
|
for (let iCol = sel.col; iCol < sel.col + sel.colCount; iCol++) {
|
|
|
const col = sheet.zh_setting.cols[iCol];
|
|
const col = sheet.zh_setting.cols[iCol];
|
|
|
const style = sheet.getStyle(iRow, iCol);
|
|
const style = sheet.getStyle(iRow, iCol);
|
|
|
- if (style.locked) continue;
|
|
|
|
|
|
|
+ if (style.locked && col.field.indexOf('_date') < 0) continue;
|
|
|
|
|
|
|
|
data[col.field] = col.type === 'Number' ? 0 : '';
|
|
data[col.field] = col.type === 'Number' ? 0 : '';
|
|
|
bDel = true;
|
|
bDel = true;
|