|
@@ -152,8 +152,8 @@ const nav_template = `<ul id="nav_tab" class="nav nav-tabs nav-line-tabs nav-lin
|
|
<input type="text" class="form-control form-control-sm w-200px" placeholder="请输入关键字" name="keyword" />
|
|
<input type="text" class="form-control form-control-sm w-200px" placeholder="请输入关键字" name="keyword" />
|
|
</div>
|
|
</div>
|
|
<div class="btn-group ms-5">
|
|
<div class="btn-group ms-5">
|
|
- <button type="button" class="btn btn-primary btn-sm" onclick="IwbTableSearch(this)">查询</button>
|
|
|
|
- <button type="button" class="btn btn-danger btn-sm" onclick="IwbTableResetSearch(this)">重置</button>
|
|
|
|
|
|
+ <button type="button" class="btn btn-primary btn-sm" onclick="IwbTableSearch(this);clear()">查询</button>
|
|
|
|
+ <button type="button" class="btn btn-danger btn-sm" onclick="IwbTableResetSearch(this);clear()">重置</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
@@ -166,14 +166,23 @@ let table_add_quota_btn_template = `<button type="button" class="quota_add_btn b
|
|
//`<button type="button" class="quota_add_btn btn btn-primary btn-sm" onclick="Add_Quota('{0}')">添加定额</button>`
|
|
//`<button type="button" class="quota_add_btn btn btn-primary btn-sm" onclick="Add_Quota('{0}')">添加定额</button>`
|
|
|
|
|
|
const $modalQuota = $('#modal_quota'), $modalChapter = $('#modal_chapter')
|
|
const $modalQuota = $('#modal_quota'), $modalChapter = $('#modal_chapter')
|
|
-let $rightBox, $rightBoxHeader, $rightBoxBody, $taskBox, $quotaBox, budget_id, item_code
|
|
|
|
|
|
+let $rightBox, $rightBoxHeader, $rightBoxBody, $taskBox, $quotaBox, budget_id, item_code, task_timer,
|
|
|
|
+ task_query_count = 0
|
|
|
|
|
|
console.log(`加载项目:${project_id}`)
|
|
console.log(`加载项目:${project_id}`)
|
|
InitBody()
|
|
InitBody()
|
|
|
|
+
|
|
|
|
+function clear() {
|
|
|
|
+ task_query_count = 0
|
|
|
|
+ clearTimeout(task_timer)
|
|
|
|
+}
|
|
|
|
+
|
|
$(function () {
|
|
$(function () {
|
|
BuildChapterInfo()
|
|
BuildChapterInfo()
|
|
$(window).on('resize', AdjustBoxHeight)
|
|
$(window).on('resize', AdjustBoxHeight)
|
|
- RenderChapterSelect()
|
|
|
|
|
|
+ if (task_id) {
|
|
|
|
+ RenderChapterSelect()
|
|
|
|
+ }
|
|
})
|
|
})
|
|
|
|
|
|
function InitBody() {
|
|
function InitBody() {
|
|
@@ -280,6 +289,7 @@ function BuildChapterInfo() {
|
|
function RenderRightBox(data) {
|
|
function RenderRightBox(data) {
|
|
console.log('RenderRightBox', arguments)
|
|
console.log('RenderRightBox', arguments)
|
|
$rightBoxBody.data('data', data)
|
|
$rightBoxBody.data('data', data)
|
|
|
|
+ clear()
|
|
$rightBox.find('input[name="budget_id"]').val(data.budget_id);
|
|
$rightBox.find('input[name="budget_id"]').val(data.budget_id);
|
|
$rightBox.find('input[name="project_id"]').val(project_id);
|
|
$rightBox.find('input[name="project_id"]').val(project_id);
|
|
$rightBox.find('input[name="item_id"]').val(data.item_id);
|
|
$rightBox.find('input[name="item_id"]').val(data.item_id);
|
|
@@ -291,6 +301,7 @@ function RenderRightBox(data) {
|
|
}
|
|
}
|
|
|
|
|
|
function RenderRightBox_Custom(data) {
|
|
function RenderRightBox_Custom(data) {
|
|
|
|
+
|
|
$('.table_radio_box .form-check').hide()
|
|
$('.table_radio_box .form-check').hide()
|
|
$quotaBox.data("table-url", `/api/quota/list/task/${task_id}`)
|
|
$quotaBox.data("table-url", `/api/quota/list/task/${task_id}`)
|
|
QuotaNavTab(data)
|
|
QuotaNavTab(data)
|
|
@@ -634,14 +645,14 @@ function Send_Quota_Batch(budget_id) {
|
|
ids.push(row.id)
|
|
ids.push(row.id)
|
|
}
|
|
}
|
|
const ids_str = ids.join(','), insert_ids_str = insert_ids.join(','), update_ids_str = update_ids.join(',')
|
|
const ids_str = ids.join(','), insert_ids_str = insert_ids.join(','), update_ids_str = update_ids.join(',')
|
|
- let str = `<div class="">确定批量推送这些数据吗?部分数据只能新增,无法覆盖,请谨慎操作!</div>`
|
|
|
|
|
|
+ let str = `<div class="mb-3 fw-bold">确定批量推送这些数据吗?</div>`
|
|
if (insert_ids_str) {
|
|
if (insert_ids_str) {
|
|
str += `<div class="text-primary d-flex align-items-center"><strong style="white-space: nowrap">新增ID:</strong>${insert_ids_str}</div>`
|
|
str += `<div class="text-primary d-flex align-items-center"><strong style="white-space: nowrap">新增ID:</strong>${insert_ids_str}</div>`
|
|
}
|
|
}
|
|
if (update_ids_str) {
|
|
if (update_ids_str) {
|
|
str += `<div class="text-danger d-flex align-items-center"><strong style="white-space: nowrap">覆盖(修改)ID:</strong>${update_ids_str}</div>`
|
|
str += `<div class="text-danger d-flex align-items-center"><strong style="white-space: nowrap">覆盖(修改)ID:</strong>${update_ids_str}</div>`
|
|
}
|
|
}
|
|
- SendQuota(str, ids_str, budget_id, true, true)
|
|
|
|
|
|
+ SendQuota(str, ids_str, budget_id, !!update_ids_str, true)
|
|
} else {
|
|
} else {
|
|
MsgWarning('没有选择数据,请选择要推送的数据!')
|
|
MsgWarning('没有选择数据,请选择要推送的数据!')
|
|
}
|
|
}
|