master
嘉祥 詹 2024-09-15 22:58:07 +08:00
parent 49c14c3612
commit fd39f359c9
4 changed files with 15 additions and 3 deletions

View File

@ -1867,7 +1867,7 @@ namespace QuotationMaker.Controllers
}
}
string sqlString = "select * from projectView where project_isdel = 'N' and project_creative_uid in (" + user_uid_list + ") and project_createdate >= '" + startDateTime.ToString("yyyy/MM/dd") + "' and project_createdate <= '" + endDateTime.ToString("yyyy/MM/dd 23:59:59") + "'";
string sqlString = "select * from projectView where project_isdel = 'N' and project_creative_uid in (" + user_uid_list + ") and project_createdate >= '" + startDateTime.ToString("yyyy/MM/dd") + "' and project_createdate <= '" + endDateTime.ToString("yyyy/MM/dd 23:59:59") + "' and dept_uid = '" + dept_uid + "'";
ret.projectViews = conn.Query<projectView>(sqlString).ToList();
ret.ret = "yes";

View File

@ -179,6 +179,11 @@ $(document).ready(function () {
$('#dept_select').on('change', function () {
$('#dt-responsive').DataTable().ajax.reload();
});
$('#search_btn').on('click', function () {
$('#dt-responsive').DataTable().ajax.reload();
});
$('#projectNewBtn').on('click', function () {
$('#project_method').val('add');
$('#clientProjectModal').modal("toggle");
@ -1428,7 +1433,14 @@ function buttonHistoryClick(obj) {
var quotation_row = historyDataTable.row(historyRowPos).data();
if (type == "excel") {
var formData = {
quotation_uid: quotation_uid,
quotation_version: quotation_version
}
$.redirect('/Api/exportXlsx', formData);
}
if (type == 'save_in_same') {
$('#save_to_same_quotation_uid').val(quotation_uid);
@ -2134,7 +2146,7 @@ function loadHistoryTable() {
drowdownHtml += '</div>&nbsp;';
ret += drowdownHtml;
ret += '<button type="button" data-uid="' + row.quotation_uid + '" data-version="' + row.quotation_version + '" data-method="view" class="btn btn-icon btn-secondary" ><i class="fa fa-eye fa-fw"></i> <span class="sr-only">View</span></button>';
ret += '<button type="button" data-uid="' + row.quotation_uid + '" data-version="' + row.quotation_version + '" data-method="excel" class="btn btn-sm btn-icon btn-secondary" ><i class="far fa-file-excel"></i> <span class="sr-only">Excel</span></button>';
return ret;
}
}, {
@ -2293,7 +2305,7 @@ function loadQuotationTable() {
ret += '<button type="button" data-uid="' + row.quotation_uid + '" data-version="' + row.quotation_version + '" data-method="edit" class="btn btn-sm btn-icon btn-secondary" ><i class="fa fa-pencil-alt"></i> <span class="sr-only">Edit</span></button>&nbsp;';
ret += '<button type="button" data-uid="' + row.quotation_uid + '" data-version="' + row.quotation_version + '" data-method="del" class="btn btn-sm btn-icon btn-secondary"><i class="far fa-trash-alt"></i> <span class="sr-only">Remove</span></button>&nbsp;';
ret += '<button type="button" data-uid="' + row.quotation_uid + '" data-version="' + row.quotation_version + '" data-method="history" class="btn btn-sm btn-icon btn-secondary" ><i class="oi oi-list"></i> <span class="sr-only">History</span></button>&nbsp;';
ret += '<button type="button" data-uid="' + row.quotation_uid + '" data-version="' + row.quotation_version + '" data-method="excel" class="btn btn-sm btn-icon btn-secondary" ><i class="far fa-file-excel"></i> <span class="sr-only">History</span></button>';
ret += '<button type="button" data-uid="' + row.quotation_uid + '" data-version="' + row.quotation_version + '" data-method="excel" class="btn btn-sm btn-icon btn-secondary" ><i class="far fa-file-excel"></i> <span class="sr-only">Excel</span></button>';
return ret;
}
}

Binary file not shown.

Binary file not shown.