修复 用章类型
This commit is contained in:
parent
10e3ec0af3
commit
b053cdba0f
|
@ -140,4 +140,39 @@
|
||||||
updateSecondaryDepartments(initialPrimaryDepartmentId, initialSecondaryDepartmentId);
|
updateSecondaryDepartments(initialPrimaryDepartmentId, initialSecondaryDepartmentId);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function () {
|
||||||
|
// 动态生成id_seal_type的select选项
|
||||||
|
var sealTypeOptions = [
|
||||||
|
{ value: '公章', text: '公章' },
|
||||||
|
{ value: '法人章', text: '法人章' },
|
||||||
|
{ value: '合同章', text: '合同章' },
|
||||||
|
{ value: '财务章', text: '财务章' },
|
||||||
|
{ value: '其他', text: '其他' }
|
||||||
|
];
|
||||||
|
|
||||||
|
var $sealTypeSelect = $('<select>', {
|
||||||
|
class: 'form-control',
|
||||||
|
id: 'id_seal_type',
|
||||||
|
name: 'seal_type'
|
||||||
|
});
|
||||||
|
|
||||||
|
$.each(sealTypeOptions, function (index, option) {
|
||||||
|
$sealTypeSelect.append($('<option>', {
|
||||||
|
value: option.value,
|
||||||
|
text: option.text
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
|
||||||
|
// 替换现有的#id_seal_type元素
|
||||||
|
$('#id_seal_type').replaceWith($sealTypeSelect);
|
||||||
|
|
||||||
|
// 如果需要在选择时执行某些操作,可以添加监听器
|
||||||
|
$('#id_seal_type').change(function() {
|
||||||
|
var selectedSealType = $(this).val();
|
||||||
|
console.log('选择的用印类型是:' + selectedSealType);
|
||||||
|
// 在这里添加其他需要的处理逻辑
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
|
@ -118,6 +118,10 @@
|
||||||
data-id="{{ item|get_pk_value }}"
|
data-id="{{ item|get_pk_value }}"
|
||||||
data-bs-toggle="modal"
|
data-bs-toggle="modal"
|
||||||
data-bs-target="#addEditModal">编辑</a>
|
data-bs-target="#addEditModal">编辑</a>
|
||||||
|
<a href="#" class="edit-btn" style="color: red"
|
||||||
|
data-id="{{ item|get_pk_value }}"
|
||||||
|
data-bs-toggle="modal"
|
||||||
|
data-bs-target="#addEditModal">删除</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% empty %}
|
{% empty %}
|
||||||
|
|
Loading…
Reference in New Issue