|
@@ -1106,6 +1106,24 @@ $(document).ready(function () {
|
|
|
const X = $('#tender-list').find('.result').eq(now-1).offset().top;
|
|
|
$('#tender-list').scrollTop(X - $('#tender-list').offset().top + $('#tender-list').scrollTop() -30);
|
|
|
});
|
|
|
+
|
|
|
+ $('body').on('blur', '#coo_table .edit-company', function () {
|
|
|
+ const id = $(this).data('id');
|
|
|
+ const newVal = $(this).val();
|
|
|
+ const cooInfo = _.find(ledger_cooperation_list, { id: id });
|
|
|
+ if(cooInfo && cooInfo.company !== newVal) {
|
|
|
+ const data = {
|
|
|
+ type: 'company',
|
|
|
+ id,
|
|
|
+ company: newVal,
|
|
|
+ };
|
|
|
+ postData('/tender/' + cur_tenderid + '/shenpi/audit/save', data, function (result) {
|
|
|
+ const lcindex = _.findIndex(ledger_cooperation_list, { id: id });
|
|
|
+ cooInfo.company = newVal;
|
|
|
+ ledger_cooperation_list.splice(lcindex, 1, cooInfo);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
});
|
|
|
|
|
|
function setRightData(datas, coolist) {
|
|
@@ -1197,7 +1215,7 @@ function setLeftTable(ledgerList, coolist, uid, title) {
|
|
|
html += `<tr>` +
|
|
|
`<td>${sc.code} ${sc.name}</td>` +
|
|
|
`<td><p class="mb-0">${sc.pwd}</p><a href="javascript:void(0);" data-lid="${sc.ledger_id}" data-uid="${sc.user_id}" data-pwd="${sc.pwd}" class="edit-pwd">修改</a> <a href="javascript:void(0)" data-lid="${sc.ledger_id}" data-uid="${sc.user_id}" class="del-pwd text-danger">移除</a></td>` +
|
|
|
- `<td>${pichtml}</td>` +
|
|
|
+ `<td>${pichtml}</td><td><input type="text" class="form-control form-control-sm edit-company" data-id="${sc.id}" value="${sc.company}" placeholder="输入单位名称或备注"></td>` +
|
|
|
`</tr>`;
|
|
|
}
|
|
|
$('#coo_table').html(html);
|