|
@@ -216,24 +216,22 @@ function saveData(index, field, value) {
|
|
|
* 药品入库
|
|
|
*/
|
|
|
function saveDrug(data) {
|
|
|
- $("#btn_save").attr('disabled', true);
|
|
|
+ $("#btn_save").attr('disabled', 'disabled');
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: '/thmz/saveYpInDetlYf',
|
|
|
contentType: "application/json;charset=UTF-8",
|
|
|
dataType: "json",
|
|
|
- async: false,
|
|
|
headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
data: JSON.stringify(data),
|
|
|
success: function (res) {
|
|
|
- $("#btn_save").attr('disabled', false);
|
|
|
if (res == '401' || res == 401) {
|
|
|
window.location.href = '/thmz/login/view'
|
|
|
return;
|
|
|
}
|
|
|
+ $("#editModal").modal("hide");
|
|
|
+ $('#tb_table').bootstrapTable('refresh');
|
|
|
if (res.code == 0) {
|
|
|
- $("#editModal").modal("hide");
|
|
|
- $('#tb_table').bootstrapTable('refresh');
|
|
|
successMesage(res);
|
|
|
} else {
|
|
|
errorMesage(res);
|