|
@@ -676,7 +676,7 @@ $(document).ready(() => {
|
|
|
if (def && def.color) return def.color;
|
|
|
}
|
|
|
|
|
|
- return checkUtils.billsOver(data, checkTzMeasureType(), stagePos) ? '#f8d7da' : defaultColor;
|
|
|
+ return hintOver && checkUtils.billsOver(data, checkTzMeasureType(), stagePos) ? '#f8d7da' : defaultColor;
|
|
|
} else {
|
|
|
return defaultColor;
|
|
|
}
|
|
@@ -770,7 +770,7 @@ $(document).ready(() => {
|
|
|
}
|
|
|
}
|
|
|
if (checkTzMeasureType()) {
|
|
|
- return checkUtils.posOver(data) ? '#f8d7da' : defaultColor;
|
|
|
+ return hintOver && checkUtils.posOver(data) ? '#f8d7da' : defaultColor;
|
|
|
}
|
|
|
};
|
|
|
sjsSettingObj.setGridSelectStyle(posSpreadSetting);
|
|
@@ -847,6 +847,9 @@ $(document).ready(() => {
|
|
|
});
|
|
|
|
|
|
const stageTreeSpreadObj = {
|
|
|
+ cut: function (sheet, sel, callback) {
|
|
|
+ callback(true);
|
|
|
+ },
|
|
|
loadExprToInput(sheet) {
|
|
|
const sel = sheet.getSelections()[0];
|
|
|
const col = sheet.zh_setting.cols[sel.col], cell = sheet.getCell(sel.row, sel.col);
|
|
@@ -1396,6 +1399,7 @@ $(document).ready(() => {
|
|
|
slSpread.bind(spreadNS.Events.TopRowChanged, stageTreeSpreadObj.topRowChanged);
|
|
|
slSpread.bind(spreadNS.Events.EditStarting, stageTreeSpreadObj.editStarting);
|
|
|
slSpread.bind(spreadNS.Events.ButtonClicked, stageTreeSpreadObj.buttonClicked);
|
|
|
+ SpreadJsObj.addCutEvents(slSpread, stageTreeSpreadObj.cut);
|
|
|
SpreadJsObj.addDeleteBind(slSpread, stageTreeSpreadObj.deletePress);
|
|
|
if (!readOnly) {
|
|
|
$('#bills-expr').bind('change onblur', function () {
|
|
@@ -1571,9 +1575,12 @@ $(document).ready(() => {
|
|
|
shoufangdanSpr: '---',
|
|
|
shoufangdan: {
|
|
|
name: '生成收方单',
|
|
|
+ visible: function(key, opt) {
|
|
|
+ if (cur_uid === stage.user_id) return true;
|
|
|
+ },
|
|
|
disabled: function (key, opt) {
|
|
|
const node = SpreadJsObj.getSelectObject(slSpread.getActiveSheet());
|
|
|
- if (!node || !node.b_code || !node.is_leaf) return true;
|
|
|
+ if (!node || !node.b_code || !node.is_leaf || cur_uid !== stage.user_id) return true;
|
|
|
},
|
|
|
callback: function (key, opt) {
|
|
|
const node = SpreadJsObj.getSelectObject(slSpread.getActiveSheet());
|
|
@@ -2049,7 +2056,7 @@ $(document).ready(() => {
|
|
|
SpreadJsObj.resetTopAndSelect(spSpread.getActiveSheet());
|
|
|
// 加载中间计量
|
|
|
stageIm.init(stage, imType, tenderInfo.decimal);
|
|
|
- stageIm.loadData(result.ledgerData, result.posData, result.detailData, result.changeData);
|
|
|
+ stageIm.loadData(result.ledgerData, result.posData, result.detailData, result.changeData, result.detailAtt);
|
|
|
|
|
|
errorList.loadHisErrorData();
|
|
|
checkList.loadHisCheckData();
|
|
@@ -2206,9 +2213,12 @@ $(document).ready(() => {
|
|
|
},
|
|
|
'shoufangdan': {
|
|
|
name: '生成收方单',
|
|
|
+ visible: function(key, opt) {
|
|
|
+ if (cur_uid === stage.user_id) return true;
|
|
|
+ },
|
|
|
disabled: function (key, opt) {
|
|
|
const node = SpreadJsObj.getSelectObject(spSpread.getActiveSheet());
|
|
|
- if (!node) return true;
|
|
|
+ if (!node || cur_uid !== stage.user_id) return true;
|
|
|
},
|
|
|
callback: function (key, opt) {
|
|
|
const node = SpreadJsObj.getSelectObject(spSpread.getActiveSheet());
|
|
@@ -2463,6 +2473,7 @@ $(document).ready(() => {
|
|
|
class Detail {
|
|
|
constructor (obj) {
|
|
|
const self = this;
|
|
|
+
|
|
|
this.spreadSetting = {
|
|
|
cols: [
|
|
|
{title: '编号', colSpan: '1', rowSpan: '1', field: 'code', hAlign: 0, width: 80, formatter: '@', readOnly: true},
|
|
@@ -2472,6 +2483,12 @@ $(document).ready(() => {
|
|
|
title: stage.im_type === imType.tz.value ? '本期计量金额' : '本期计量数量',
|
|
|
colSpan: '1', rowSpan: '1', field: 'jl', hAlign: 2, width: 85, formatter: '@', readOnly: true
|
|
|
},
|
|
|
+ {
|
|
|
+ title: '附件', colSpan: '1', rowSpan: '1', field: 'attachment', hAlign: 0, width: 60, readOnly: true, cellType: 'imageBtn',
|
|
|
+ normalImg: '#rela-file-icon', hoverImg: '#rela-file-hover', getValue: function (data) {
|
|
|
+ return data.attachment ? data.attachment.length : 0;
|
|
|
+ }
|
|
|
+ },
|
|
|
],
|
|
|
headRows: 1,
|
|
|
emptyRows: 0,
|
|
@@ -2482,6 +2499,10 @@ $(document).ready(() => {
|
|
|
font: '12px 微软雅黑',
|
|
|
readOnly: readOnly,
|
|
|
selectedBackColor: '#fffacd',
|
|
|
+ imageClick: function (data) {
|
|
|
+ self.makeAttTable(data);
|
|
|
+ $('#im-file').modal('show');
|
|
|
+ }
|
|
|
};
|
|
|
this.spread = SpreadJsObj.createNewSpread(obj[0]);
|
|
|
this.sheet = this.spread.getActiveSheet();
|
|
@@ -2515,6 +2536,7 @@ $(document).ready(() => {
|
|
|
updateData.unit_price = data.unit_price;
|
|
|
updateData.pid = data.pid;
|
|
|
updateData.pos_name = data.pos_name;
|
|
|
+ updateData.im_type = data.im_type;
|
|
|
}
|
|
|
if (data.custom_define.indexOf('doc_code') === -1) {
|
|
|
updateData.custom_define = data.custom_define;
|
|
@@ -2561,6 +2583,7 @@ $(document).ready(() => {
|
|
|
updateData.unit_price = data.unit_price;
|
|
|
updateData.pid = data.pid;
|
|
|
updateData.pos_name = data.pos_name;
|
|
|
+ updateData.im_type = data.im_type;
|
|
|
}
|
|
|
if (data.custom_define.indexOf('doc_code') === -1) {
|
|
|
updateData.custom_define = data.custom_define;
|
|
@@ -2633,6 +2656,7 @@ $(document).ready(() => {
|
|
|
updateData.unit_price = data.unit_price;
|
|
|
updateData.pid = data.pid;
|
|
|
updateData.pos_name = data.pos_name;
|
|
|
+ updateData.im_type = data.im_type;
|
|
|
}
|
|
|
if (regRst) {
|
|
|
updateData.doc_code = text.substr(0, regRst.index) + (parseInt(regRst[0]) + iRow + 1);
|
|
@@ -2669,10 +2693,92 @@ $(document).ready(() => {
|
|
|
this._initImTypeSetRela();
|
|
|
this._initModifyDetail();
|
|
|
this._initLocateRela();
|
|
|
+ this._initAttRela();
|
|
|
// 草图相关
|
|
|
this._initImageRela();
|
|
|
this.reBuildImData();
|
|
|
}
|
|
|
+ makeAttTable (data) {
|
|
|
+ let html = [];
|
|
|
+ if (data.attachment) {
|
|
|
+ for (const att of data.attachment) {
|
|
|
+ const delHtml = (parseInt(att.uid) === userID && (att.renew || stage.status !== auditConst.status.checked))
|
|
|
+ ? '<a class="delete-att text-danger" href="javascript:void(0);" data-imid="'+ data.att_uuid +'" data-attid="'+ att.file_id +'" title="删除"><i class="fa fa-remove "></i></a>'
|
|
|
+ : '';
|
|
|
+ html.push('<tr><td style="width: 200px">' + att.filename + att.fileext + '</td><td>' + att.username + '</td><td>' + att.in_time + '</td>',
|
|
|
+ '<td><a href="'+ window.location.pathname + '/im-file/download?im_id='+ data.att_uuid +'&file_id='+ att.file_id +'" title="下载"><i class="fa fa-download "></i></a> ',
|
|
|
+ delHtml, '</td></tr>');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $('#im-attList').html(html.join(''));
|
|
|
+ };
|
|
|
+ _initAttRela() {
|
|
|
+ // 上传附件
|
|
|
+ const self = this;
|
|
|
+ $('#upload-im-file').change(function () {
|
|
|
+ const files = this.files;
|
|
|
+ const sels = self.sheet.getSelections();
|
|
|
+ const select = SpreadJsObj.getSelectObject(self.sheet);
|
|
|
+ if (!select) return;
|
|
|
+
|
|
|
+ const formData = new FormData();
|
|
|
+ const baseInfo = {};
|
|
|
+ if (select.att_uuid) {
|
|
|
+ baseInfo.uuid = select.att_uuid;
|
|
|
+ } else {
|
|
|
+ baseInfo.im_type = select.im_type;
|
|
|
+ baseInfo.lid = select.lid;
|
|
|
+ baseInfo.pid = select.pid;
|
|
|
+ baseInfo.code = select.code;
|
|
|
+ baseInfo.name = select.name;
|
|
|
+ baseInfo.unit = select.unit;
|
|
|
+ baseInfo.unit_price = select.unit_price;
|
|
|
+ baseInfo.pos_name = select.pos_name;
|
|
|
+ }
|
|
|
+ formData.append('base', JSON.stringify(baseInfo));
|
|
|
+
|
|
|
+ for (const file of files) {
|
|
|
+ if (file === undefined) {
|
|
|
+ toast('未选择上传文件!', 'error');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ const filesize = file.size;
|
|
|
+ if (filesize > 30 * 1024 * 1024) {
|
|
|
+ toast('存在上传文件大小过大!', 'error');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ const fileext = '.' + file.name.toLowerCase().split('.').splice(-1)[0];
|
|
|
+ if (whiteList.indexOf(fileext) === -1) {
|
|
|
+ toast('只能上传指定格式的附件!', 'error');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ formData.append('size', filesize);
|
|
|
+ formData.append('file[]', file);
|
|
|
+ }
|
|
|
+ postDataWithFile(window.location.pathname + '/im-file/upload', formData, function (data) {
|
|
|
+ stageIm.loadUpdateDetailAtt(data);
|
|
|
+ SpreadJsObj.reLoadRowData(self.sheet, sels[0].row);
|
|
|
+ self.makeAttTable(select);
|
|
|
+ $('#upload-im-file').val('');
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ // 删除附件
|
|
|
+ $('body').on('click', '.delete-att' ,function () {
|
|
|
+ const sels = self.sheet.getSelections();
|
|
|
+ const select = SpreadJsObj.getSelectObject(self.sheet);
|
|
|
+ if (!select) return;
|
|
|
+
|
|
|
+ const uuid = $(this).attr('data-imid');
|
|
|
+ const file_id = $(this).attr('data-attid');
|
|
|
+
|
|
|
+ postData(window.location.pathname + '/im-file/del', { uuid, file_id }, function (result) {
|
|
|
+ stageIm.loadUpdateDetailAtt(result);
|
|
|
+ SpreadJsObj.reLoadRowData(self.sheet, sels[0].row);
|
|
|
+ self.makeAttTable(select);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
_initImTypeSetRela() {
|
|
|
const self = this;
|
|
|
const gatherConfirmPopover = {
|
|
@@ -2700,14 +2806,14 @@ $(document).ready(() => {
|
|
|
const jlCol = self.spreadSetting.cols.find(function (x) {return x.field === 'jl'});
|
|
|
jlCol.title = '本期计量金额';
|
|
|
SpreadJsObj.reLoadSheetHeader(self.sheet);
|
|
|
- $('#type-title-contract').text('本期合同计量金额');
|
|
|
- $('#type-title-qc').text('本期变更计量金额');
|
|
|
+ $('[name=type-title-contract]').text('本期合同计量金额');
|
|
|
+ $('[name=type-title-qc]').text('本期变更计量金额');
|
|
|
} else {
|
|
|
const jlCol = self.spreadSetting.cols.find(function (x) {return x.field === 'jl'});
|
|
|
jlCol.title = '本期计量数量';
|
|
|
SpreadJsObj.reLoadSheetHeader(self.sheet);
|
|
|
- $('#type-title-contract').text('本期合同计量数量');
|
|
|
- $('#type-title-qc').text('本期变更计量数量');
|
|
|
+ $('[name=type-title-contract]').text('本期合同计量数量');
|
|
|
+ $('[name=type-title-qc]').text('本期变更计量数量');
|
|
|
}
|
|
|
if (stage.im_type === imType.bb.value || stage.im_type === imType.bw.value) {
|
|
|
$('#show-jldy').parent().show();
|
|
@@ -2759,6 +2865,7 @@ $(document).ready(() => {
|
|
|
$('i', obj).remove();
|
|
|
}
|
|
|
$('#im-pre').val(stage.im_pre ? stage.im_pre : '');
|
|
|
+ $('#im-start-num').val(stage.im_start_num ? stage.im_start_num : '');
|
|
|
const typeArr = $('div[name="im-type"]');
|
|
|
for (const t of typeArr) {
|
|
|
if (parseInt($(t).attr('im-type')) === stage.im_type) {
|
|
@@ -2770,28 +2877,38 @@ $(document).ready(() => {
|
|
|
});
|
|
|
// 提交 中间计量模式
|
|
|
$('#choose-ok').click(() => {
|
|
|
+ let startNum;
|
|
|
+ try {
|
|
|
+ startNum = parseInt($('#im-start-num').val());
|
|
|
+ if (!startNum || startNum <= 0) throw '起始编号请输入正整数';
|
|
|
+ } catch (err) {
|
|
|
+ toastr.error("起始编号请输入正整数");
|
|
|
+ return;
|
|
|
+ }
|
|
|
const chooseType = _.find($('div[name="im-type"]', '#im-type'), function (it) {
|
|
|
return it.style.cursor !== 'pointer';
|
|
|
});
|
|
|
const data = {
|
|
|
im_type: parseInt($(chooseType).attr('im-type')),
|
|
|
im_pre: $('#im-pre').val(),
|
|
|
+ im_start_num: startNum,
|
|
|
};
|
|
|
postData(window.location.pathname + '/detail/build', data, function (result) {
|
|
|
stage.im_type = data.im_type;
|
|
|
stage.im_pre = data.im_pre;
|
|
|
+ stage.im_start_num = data.im_start_num;
|
|
|
if (stage.im_type === imType.tz.value || stage.im_type === imType.bb.value) {
|
|
|
const jlCol = self.spreadSetting.cols.find(function (x) {return x.field === 'jl'});
|
|
|
jlCol.title = '本期计量金额';
|
|
|
SpreadJsObj.reLoadSheetHeader(self.sheet);
|
|
|
- $('#type-title-contract').text('本期合同计量金额');
|
|
|
- $('#type-title-qc').text('本期变更计量金额');
|
|
|
+ $('[name=type-title-contract]').text('本期合同计量金额');
|
|
|
+ $('[name=type-title-qc]').text('本期变更计量金额');
|
|
|
} else {
|
|
|
const jlCol = self.spreadSetting.cols.find(function (x) {return x.field === 'jl'});
|
|
|
jlCol.title = '本期计量数量';
|
|
|
SpreadJsObj.reLoadSheetHeader(self.sheet);
|
|
|
- $('#type-title-contract').text('本期合同计量数量');
|
|
|
- $('#type-title-qc').text('本期变更计量数量');
|
|
|
+ $('[name=type-title-contract]').text('本期合同计量数量');
|
|
|
+ $('[name=type-title-qc]').text('本期变更计量数量');
|
|
|
}
|
|
|
if (stage.im_type === imType.bb.value || stage.im_type === imType.bw.value) {
|
|
|
$('#show-jldy').parent().show();
|
|
@@ -3044,6 +3161,7 @@ $(document).ready(() => {
|
|
|
updateData.unit_price = data.unit_price;
|
|
|
updateData.pid = data.pid;
|
|
|
updateData.pos_name = data.pos_name;
|
|
|
+ updateData.im_type = data.im_type;
|
|
|
updateData.custom_define = [];
|
|
|
}
|
|
|
let infoUpdate = false;
|
|
@@ -3255,6 +3373,7 @@ $(document).ready(() => {
|
|
|
updateData.unit_price = data.unit_price;
|
|
|
updateData.pid = data.pid;
|
|
|
updateData.pos_name = data.pos_name;
|
|
|
+ updateData.im_type = data.im_type;
|
|
|
}
|
|
|
if (items.length > 0) {
|
|
|
const itemInfo = [];
|
|
@@ -4345,16 +4464,83 @@ $(document).ready(() => {
|
|
|
$('#shoufang-flie-list').html(html);
|
|
|
postData(window.location.pathname + '/shoufang/file', { sfid: id }, function (result) {
|
|
|
for (const att of result) {
|
|
|
- html += `<tr><td>${att.filename}${att.fileext}</td><td>${moment(att.in_time).format('YYYY-MM-DD HH:mm')}</td><td>` +
|
|
|
- `<a href="${att.filepath}" target="_blank"><i class="fa fa-download"></i></a>` + makeDelHtml(att.id) +`</td></tr>`;
|
|
|
+ html += `<tr><td>${att.filename}${att.fileext} ` + makeEditHtml(att.id, att.filename, att.fileext, att.extra_upload) +
|
|
|
+ `<td>${moment(att.in_time).format('YYYY-MM-DD HH:mm')}</td><td>` +
|
|
|
+ `<a href="${att.filepath}" target="_blank"><i data-toggle="tooltip" data-placement="left" data-original-title="下载" class="fa fa-download"></i></a>` + makeViewHtml(att.viewpath) + makeDelHtml(att.id, att.extra_upload) +`</td></tr>`;
|
|
|
}
|
|
|
$('#shoufang-flie-list').html(html);
|
|
|
- $('[data-toggle="tooltip"]').tooltip();
|
|
|
+ $('[data-toggle="tooltip"]').tooltip()
|
|
|
});
|
|
|
|
|
|
- function makeDelHtml(fid) {
|
|
|
- return sfAttDelPower ? '<a href="javascript:void(0)" data-sfid="'+ id +'" data-id="'+ fid +'" title="删除" class="del-shoufang-att text-danger ml-3"><i data-toggle="tooltip" data-placement="left" data-original-title="删除" class="fa fa-remove"></i></a>' : '';
|
|
|
+ function makeViewHtml(viewpath) {
|
|
|
+ return viewpath ? `<a href="${viewpath}" target="_blank" class="ml-1"><i data-toggle="tooltip" data-placement="left" data-original-title="预览" class="fa fa-eye"></i></a>` : '';
|
|
|
}
|
|
|
+
|
|
|
+ function makeDelHtml(fid, extra_upload) {
|
|
|
+ return sfAttDelPower &&
|
|
|
+ (stage.status !== auditConst.status.checked || (stage.status === auditConst.status.checked && extra_upload)) ?
|
|
|
+ '<a href="javascript:void(0)" data-sfid="'+ id +'" data-id="'+ fid +'" title="删除" class="del-shoufang-att pull-right text-danger mr-2">' +
|
|
|
+ '<i data-toggle="tooltip" data-placement="left" data-original-title="删除" class="fa fa-remove"></i></a>' : '';
|
|
|
+ }
|
|
|
+ });
|
|
|
+ function makeEditHtml(fid, filename, fileext, extra_upload) {
|
|
|
+ return sfAttDelPower &&
|
|
|
+ (stage.status !== auditConst.status.checked || (stage.status === auditConst.status.checked && extra_upload)) ?
|
|
|
+ '<a href="javascript:void(0)" data-filename="' + filename + '" data-fileext="'+ fileext +'" data-id="'+ fid +'" class="edit-shoufang-att ml-1">' +
|
|
|
+ '<i data-toggle="tooltip" data-placement="left" data-original-title="修改文件名" class="fa fa-pencil"></i></a></td>' : ''
|
|
|
+ }
|
|
|
+ // 修改收方单附件文件名
|
|
|
+ $('body').on('click', '.edit-shoufang-att', function () {
|
|
|
+ $(this).children('i').tooltip('hide');
|
|
|
+ const fid = $(this).data('id');
|
|
|
+ const filename = $(this).data('filename');
|
|
|
+ const fileext = $(this).data('fileext');
|
|
|
+ const html = `<div class="input-group input-group-sm">
|
|
|
+ <input type="text" class="form-control" value="${filename}" placeholder="输入文件名" aria-describedby="button-${fid}" style="width:50px">
|
|
|
+ <div class="input-group-append" id="button-${fid}">
|
|
|
+ <button class="btn btn-outline-primary shoufang-att-confirm-btn" data-filename="${filename}" data-fileext="${fileext}" data-fid="${fid}" type="button">确认</button>
|
|
|
+ <button class="btn btn-outline-secondary shoufang-att-cancel-btn" data-filename="${filename}" data-fileext="${fileext}" data-fid="${fid}" type="button">取消</button>
|
|
|
+ </div>
|
|
|
+ </div>`;
|
|
|
+ $(this).parents('td').html(html);
|
|
|
+ });
|
|
|
+ // 确认修改文件名
|
|
|
+ $('body').on('click', '.shoufang-att-confirm-btn', function () {
|
|
|
+ const validText = $.trim($(this).parents('td').find('input').val());
|
|
|
+ const orgValue = $.trim($(this).data('filename'));
|
|
|
+ const fileext = $(this).data('fileext');
|
|
|
+ const fid = $(this).data('fid');
|
|
|
+ if (!validText) {
|
|
|
+ toastr.error('文件名不能为空');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ // const reg = /^[0-9a-zA-Z\-_\u4e00-\u9fa5]+$/;
|
|
|
+ if(validText.indexOf('.') !== -1 || validText.indexOf(' ') !== -1) {
|
|
|
+ toastr.error('文件名中不能包含.字符和空格');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(validText == orgValue) {
|
|
|
+ const html = `${orgValue}${fileext} ` + makeEditHtml(fid, orgValue, fileext, 1);
|
|
|
+ $(this).parents('td').html(html);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const data = {
|
|
|
+ id: fid,
|
|
|
+ filename: validText,
|
|
|
+ };
|
|
|
+ const _self = $(this);
|
|
|
+ postData('/wap/shoufang/editfile', data, function (result) {
|
|
|
+ const html = `${validText}${fileext} ` + makeEditHtml(fid, validText, fileext, 1);
|
|
|
+ _self.parents('td').html(html);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ // 取消修改文件名
|
|
|
+ $('body').on('click', '.shoufang-att-cancel-btn', function () {
|
|
|
+ const fid = $(this).data('fid');
|
|
|
+ const filename = $(this).data('filename');
|
|
|
+ const fileext = $(this).data('fileext');
|
|
|
+ const html = `${filename}${fileext} ` + makeEditHtml(fid, filename, fileext, 1);
|
|
|
+ $(this).parents('td').html(html);
|
|
|
});
|
|
|
// 删除收方单附件
|
|
|
$('body').on('click', '.del-shoufang-att', function () {
|
|
@@ -4432,12 +4618,14 @@ function getShouFangList(currPageNum = 1) {
|
|
|
'<a href="javascript:void(0);" data-id="'+ att.id +'" class="show-shoufang-node mr-1" data-toggle="tooltip" data-placement="left" data-original-title="定位"><i class="fa fa-crosshairs"></i></a> ' +
|
|
|
'<a href="javascript:void(0);" data-id="'+ att.id +'" class="show-shoufang-report mr-1"><i data-toggle="tooltip" data-placement="left" data-original-title="预览" class="fa fa-eye"></i></a> ' +
|
|
|
// '<a href="javascript:void(0);"><i data-toggle="tooltip" data-placement="left" data-original-title="下载" class="fa fa-download"></i></a> ' +
|
|
|
- makeDelHtml(att.id) +
|
|
|
+ makeDelHtml(att.id, att.extra_upload) +
|
|
|
'</td></tr>';
|
|
|
}
|
|
|
|
|
|
- function makeDelHtml(id) {
|
|
|
- return cur_uid === stage.user_id ? '<a href="javascript:void(0);" data-id="'+ id +'" data-toggle="modal" data-target="#shoufangdelete" class="ml-3 text-danger del-shoufang">' +
|
|
|
+ function makeDelHtml(id, extra_upload) {
|
|
|
+ return cur_uid === stage.user_id &&
|
|
|
+ (stage.status !== auditConst.status.checked || (stage.status === auditConst.status.checked && extra_upload)) ?
|
|
|
+ '<a href="javascript:void(0);" data-id="'+ id +'" data-toggle="modal" data-target="#shoufangdelete" class="ml-3 text-danger del-shoufang">' +
|
|
|
'<i data-toggle="tooltip" data-placement="left" data-original-title="删除" class="fa fa-remove"></i></a>' : '';
|
|
|
}
|
|
|
$('#shoufang-table').html(html);
|
|
@@ -4465,13 +4653,13 @@ function makeReportData(sfid) {
|
|
|
replace_key_params['KEY_子目号及子目名称'] = ledger_code + ' ' + lData.name;
|
|
|
replace_key_params['KEY_桩号及工程部位'] = pos_name;
|
|
|
const req_params = {
|
|
|
- rpt_tpl_id: window.location.host === '127.0.0.1:7002' || window.location.host === 'jlqa.smartcost.com.cn:7002' ? 1784 : 2138, // 1784(qa的,外网是2138)
|
|
|
+ rpt_tpl_id: window.location.host === '127.0.0.1:7002' || window.location.host === 'jlqa.smartcost.com.cn:7002' ? 1784 : (window.location.host === 'jluat.smartcost.com.cn' ? 315 : 2138), // 1784(qa的,外网是2138)
|
|
|
pageSize: 'A4',
|
|
|
project_id: tender.project_id,
|
|
|
tender_id: tender.id,
|
|
|
stage_id: stage.id,
|
|
|
};
|
|
|
- const rpt_name = tender.name + '-第' + stage.order + '期-' + (pos_name ? pos_name : ledger_code + '-' + lData.name);
|
|
|
+ const rpt_name = tender.name + '-第' + stage.order + '期-' + ledger_code + (pos_name ? '/' + pos_name : '-' + lData.name);
|
|
|
const qrCodePath = sfInfo.qrcode;
|
|
|
return [qrCodePath, replace_key_params, req_params, rpt_name];
|
|
|
}
|