diff --git a/Layout/default/Preorder/Index.php b/Layout/default/Preorder/Index.php
index 64f41c837..838abbd3c 100644
--- a/Layout/default/Preorder/Index.php
+++ b/Layout/default/Preorder/Index.php
@@ -1019,14 +1019,24 @@
return false;
}
- $.post("=self::getUrl("Preorder","Api")?>",
- {
- 'do': "createWorkorder",
- id: pid,
+ $("#preorder-detail-" + pid + "-rimo button.create-workorder").prop("disabled", true);
+ $("#preorder-detail-" + pid + "-rimo .workorder-container").append("
");
+
+
+ $.ajax({
+ url: "=self::getUrl("Preorder","Api")?>",
+ method: "POST",
+ data: {
+ do: "createWorkorder",
+ id: pid,
},
- function(success) {
- if(success.status == "OK") {
- wo = success.result;
+ context: {
+ pid: pid
+ },
+ dataType: 'json',
+ success: function(response) {
+ if(response.status == "OK") {
+ wo = response.result;
html = '