|
@@ -33,7 +33,7 @@
|
|
<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-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-danger btn-sm" onclick="IwbTableResetSearch(this)">重置</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</form>
|
|
@@ -59,17 +59,31 @@
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
<input type="hidden" id="sub_id" />
|
|
<input type="hidden" id="sub_id" />
|
|
<div class="fv-row form-group mb-3">
|
|
<div class="fv-row form-group mb-3">
|
|
- <label for="sub_project_name" class="form-label required">工程名称</label>
|
|
|
|
- <input type="text" class="form-control" name="sub_project_name" id="sub_project_name" placeholder="请输入" required />
|
|
|
|
|
|
+ <label for="device_name" class="form-label required">设备名称</label>
|
|
|
|
+ <input type="text" class="form-control" name="device_name" id="device_name" placeholder="请输入设备名称" required />
|
|
</div>
|
|
</div>
|
|
<div class="fv-row form-group mb-3">
|
|
<div class="fv-row form-group mb-3">
|
|
- <label for="project_desc" class="form-label">上传数据</label>
|
|
|
|
- <textarea type="text" class="form-control" name="project_desc" id="project_desc" placeholder="请输入" ></textarea>
|
|
|
|
|
|
+ <label for="device_model" class="form-label required">规格型号</label>
|
|
|
|
+ <input type="text" class="form-control" name="device_model" id="device_model" placeholder="请输入规格型号" required />
|
|
</div>
|
|
</div>
|
|
<div class="fv-row form-group mb-3">
|
|
<div class="fv-row form-group mb-3">
|
|
- <label for="project_desc" class="form-label">删除原数据文件</label>
|
|
|
|
- <input type="checkbox" class="form-check-input" name="delete_file" id="delete_file"/>
|
|
|
|
|
|
+ <label for="device_count" class="form-label required">数量</label>
|
|
|
|
+ <input type="text" class="form-control" name="device_count" id="device_count" placeholder="请输入数量" required />
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="fv-row form-group mb-3">
|
|
|
|
+ <label for="device_unit" class="form-label required">单位</label>
|
|
|
|
+ <input type="text" class="form-control" name="device_unit" id="device_unit" placeholder="请输入单位" required />
|
|
|
|
+ </div>
|
|
|
|
+ <div class="fv-row form-group mb-3">
|
|
|
|
+ <label for="standard_no" class="form-label ">定额编号</label>
|
|
|
|
+ <input type="text" class="form-control" name="standard_no" id="standard_no" placeholder="请输入定额编号" />
|
|
|
|
+ </div>
|
|
|
|
+ <div class="form-check mb-3">
|
|
|
|
+ <input class="form-check-input" type="checkbox" value="" id="is_query" name="delete_file"/>
|
|
|
|
+ <label class="form-check-label" for="is_query">
|
|
|
|
+ 是否查询知识库
|
|
|
|
+ </label>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
@@ -83,6 +97,7 @@
|
|
{% endblock %}
|
|
{% endblock %}
|
|
{% block page_scripts %}
|
|
{% block page_scripts %}
|
|
<script>
|
|
<script>
|
|
|
|
+ ChangeHeadMenu("#project_menu")
|
|
const projectId='{{sub_project.project_id}}',subId = '{{sub_project.id}}';
|
|
const projectId='{{sub_project.project_id}}',subId = '{{sub_project.id}}';
|
|
const table = '#table',
|
|
const table = '#table',
|
|
$modal = $("#modal");
|
|
$modal = $("#modal");
|
|
@@ -115,7 +130,6 @@
|
|
data:'standard_no',
|
|
data:'standard_no',
|
|
width:'120px'
|
|
width:'120px'
|
|
},
|
|
},
|
|
-
|
|
|
|
{
|
|
{
|
|
title:'处理状态',
|
|
title:'处理状态',
|
|
data:'process_status',
|
|
data:'process_status',
|
|
@@ -157,6 +171,20 @@
|
|
width:'280px',
|
|
width:'280px',
|
|
render:function (row) {
|
|
render:function (row) {
|
|
let str = '';
|
|
let str = '';
|
|
|
|
+ if (row.process_status === 0){
|
|
|
|
+ str += `<span class="btn btn-light-success" onclick="StartProcessItem('${row.id}')">开始处理</span>`;
|
|
|
|
+ }else if(row.process_status === 2){
|
|
|
|
+ str += `<span class="btn btn-light-warning" onclick="ReStartProcessItem('${row.id}')">重新处理</span>`;
|
|
|
|
+ }else if(row.process_status === 3){
|
|
|
|
+ str+= `<span class="btn btn-light-danger" onclick="ReStartProcessItem('${row.id}')">重新处理</span>`;
|
|
|
|
+ }
|
|
|
|
+ if (row.send_status === 0 && row.process_status !== 1){
|
|
|
|
+ str += `<span class="btn btn-light-success" onclick="StartSendItem('${row.id}')">开始发送</span>`;
|
|
|
|
+ }else if(row.send_status === 2 && row.process_status !== 1){
|
|
|
|
+ str += `<span class="btn btn-light-warning" onclick="ReStartSendItem('${row.id}')">重新发送</span>`;
|
|
|
|
+ }else if(row.send_status === 3 && row.process_status !== 1){
|
|
|
|
+ str += `<span class="btn btn-light-danger" onclick="ReStartSendItem('${row.id}')">重新发送</span>`;
|
|
|
|
+ }
|
|
str+=`<span class="btn btn-light-success" onclick="Edit('${row.id}')">编辑</span>`;
|
|
str+=`<span class="btn btn-light-success" onclick="Edit('${row.id}')">编辑</span>`;
|
|
str+=`<span class="btn btn-light-danger" onclick="Delete('${row.id}')">删除</span>`;
|
|
str+=`<span class="btn btn-light-danger" onclick="Delete('${row.id}')">删除</span>`;
|
|
return str
|
|
return str
|
|
@@ -184,14 +212,27 @@
|
|
|
|
|
|
function SaveProject() {
|
|
function SaveProject() {
|
|
const subId = $('#sub_id').val();
|
|
const subId = $('#sub_id').val();
|
|
- const projectName= $('#sub_project_name').val();
|
|
|
|
|
|
+
|
|
|
|
+ const deviceName = $modal.find('#device_name').val(),
|
|
|
|
+ deviceModel = $modal.find('#device_model').val(),
|
|
|
|
+ deviceUnit = $modal.find('#device_unit').val(),
|
|
|
|
+ deviceCount = $modal.find('#device_count').val(),
|
|
|
|
+ standardNo = $modal.find('#standard_no').val(),
|
|
|
|
+ isQuery = $modal.find('#is_query').is(':checked')?'true':'false'
|
|
IwbAjax_2({
|
|
IwbAjax_2({
|
|
url:`/api/sub_item/save/${projectId}/${subId}`,
|
|
url:`/api/sub_item/save/${projectId}/${subId}`,
|
|
data:{
|
|
data:{
|
|
id: subId,
|
|
id: subId,
|
|
project_id: project_id,
|
|
project_id: project_id,
|
|
- sub_project_name: projectName,
|
|
|
|
|
|
+ device_name: deviceName,
|
|
|
|
+ device_model: deviceModel,
|
|
|
|
+ device_unit: deviceUnit,
|
|
|
|
+ device_count: deviceCount,
|
|
|
|
+ standard_no: standardNo,
|
|
|
|
+ is_query: isQuery,
|
|
},
|
|
},
|
|
|
|
+ table:table,
|
|
|
|
+ modal:$modal,
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
@@ -203,6 +244,19 @@
|
|
})
|
|
})
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ function StartProcessItem(id){
|
|
|
|
+ ConfirmUrl('确定开始处理吗?',`/api/sub_item/start_process/${id}`,table)
|
|
|
|
+ }
|
|
|
|
+ function ReStartProcessItem(id){
|
|
|
|
+ ConfirmUrl('确定重新处理吗?',`/api/sub_item/start_process/${id}`,table)
|
|
|
|
+ }
|
|
|
|
+ function StartSendItem(id){
|
|
|
|
+ ConfirmUrl('确定开始发送吗?',`/api/sub_item/start_send/${id}`,table)
|
|
|
|
+ }
|
|
|
|
+ function ReStartSendItem(id){
|
|
|
|
+ ConfirmUrl('确定重新发送吗?',`/api/sub_item/start_send/${id}`,table)
|
|
|
|
+ }
|
|
</script>
|
|
</script>
|
|
|
|
|
|
{% endblock %}
|
|
{% endblock %}
|