Kaynağa Gözat

Latest

master
rpm-mcarman 2 yıl önce
ebeveyn
işleme
891d9ba104
7 değiştirilmiş dosya ile 5384 ekleme ve 512 silme
  1. +206
    -0
      app/api/BOM/NewBomItem.json
  2. +3
    -0
      app/api/BOM/UpdateBomItem.json
  3. +1133
    -1
      app/api/Parts/Seach.json
  4. +0
    -5
      app/config/routes.json
  5. +3908
    -497
      public/dmxAppConnect/config.js
  6. +4
    -0
      views/.wappler_folder.json
  7. +130
    -9
      views/dspec.ejs

+ 206
- 0
app/api/BOM/NewBomItem.json Dosyayı Görüntüle

@@ -0,0 +1,206 @@
{
"meta": {
"options": {
"linkedFile": "/views/dspec.ejs",
"linkedForm": "frm_newbomitem"
},
"$_POST": [
{
"type": "text",
"fieldName": "newbompn",
"name": "newbompn"
},
{
"type": "text",
"fieldName": "newbomdesc",
"name": "newbomdesc"
},
{
"type": "text",
"fieldName": "newbomold",
"name": "newbomold"
},
{
"type": "text",
"fieldName": "newbomnew",
"name": "newbomnew"
},
{
"type": "number",
"fieldName": "bomdspecid",
"name": "bomdspecid"
},
{
"type": "number",
"fieldName": "newbompnid",
"name": "newbompnid"
}
]
},
"exec": {
"steps": {
"name": "api",
"module": "api",
"action": "send",
"options": {
"url": "http://localhost:8080/api/v1.0/boms/wapplerinsert",
"method": "POST",
"schema": [
{
"type": "object",
"name": "data",
"sub": [
{
"type": "number",
"name": "updateuserid"
},
{
"type": "text",
"name": "old"
},
{
"type": "text",
"name": "new"
},
{
"type": "number",
"name": "id"
},
{
"type": "number",
"name": "createuserid"
},
{
"type": "number",
"name": "viewlocation"
}
]
},
{
"type": "object",
"name": "headers",
"sub": [
{
"type": "text",
"name": "access-control-allow-headers"
},
{
"type": "text",
"name": "access-control-allow-methods"
},
{
"type": "text",
"name": "access-control-allow-origin"
},
{
"type": "text",
"name": "access-control-expose-headers"
},
{
"type": "text",
"name": "connection"
},
{
"type": "text",
"name": "content-length"
},
{
"type": "text",
"name": "content-type"
},
{
"type": "text",
"name": "date"
}
]
}
],
"dataType": "json",
"data": {
"updatedate": "{{NOW}}",
"viewlocationid": "14",
"id": null,
"old": "{{$_POST.newbomold}}",
"createdate": "2023-11-14T12:51:06Z",
"designspecid": "26259{{$_POST.bomdspecid}}",
"createuserid": "-1",
"new": "{{$_POST.newbomnew}}",
"updateuserid": "-1",
"partnumberid": "{{$_POST.newbompnid}}"
}
},
"output": true,
"meta": [
{
"type": "object",
"name": "data",
"sub": [
{
"type": "number",
"name": "updateuserid"
},
{
"type": "text",
"name": "old"
},
{
"type": "text",
"name": "new"
},
{
"type": "number",
"name": "id"
},
{
"type": "number",
"name": "createuserid"
},
{
"type": "number",
"name": "viewlocation"
}
]
},
{
"type": "object",
"name": "headers",
"sub": [
{
"type": "text",
"name": "access-control-allow-headers"
},
{
"type": "text",
"name": "access-control-allow-methods"
},
{
"type": "text",
"name": "access-control-allow-origin"
},
{
"type": "text",
"name": "access-control-expose-headers"
},
{
"type": "text",
"name": "connection"
},
{
"type": "text",
"name": "content-length"
},
{
"type": "text",
"name": "content-type"
},
{
"type": "text",
"name": "date"
}
]
}
],
"outputType": "object"
}
}
}

+ 3
- 0
app/api/BOM/UpdateBomItem.json Dosyayı Görüntüle

@@ -0,0 +1,3 @@
{
"exec": {}
}

+ 1133
- 1
app/api/Parts/Seach.json
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 0
- 5
app/config/routes.json Dosyayı Görüntüle

@@ -26,11 +26,6 @@
"path": "/parttype",
"page": "parttype",
"layout": "main"
},
{
"path": "/repeattest",
"page": "repeattest",
"layout": "main"
}
]
}

+ 3908
- 497
public/dmxAppConnect/config.js
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 4
- 0
views/.wappler_folder.json Dosyayı Görüntüle

@@ -30,5 +30,9 @@
"repeattest.ejs": {
"layoutPage": "main",
"description": ""
},
"search.ejs": {
"layoutPage": "main",
"description": ""
}
}

+ 130
- 9
views/dspec.ejs Dosyayı Görüntüle

@@ -1,9 +1,14 @@
<!-- Wappler include head-page="layouts/main" fontawesome_5="cdn" bootstrap5="local" is="dmx-app" id="dspec" appconnect="local" components="{dmxTyped:{},dmxStateManagement:{},dmxBootstrap5Modal:{},dmxFormatter:{},dmxValidator:{},dmxScheduler:{}}" -->
<dmx-api-action id="api_allpartcodes" noload="true" url="http://vapor.prelub.com/api/v1.0/partcodes"></dmx-api-action>
<!-- Wappler include head-page="layouts/main" fontawesome_5="cdn" bootstrap5="local" is="dmx-app" id="dspec" appconnect="local" components="{dmxTyped:{},dmxStateManagement:{},dmxBootstrap5Modal:{},dmxFormatter:{},dmxValidator:{},dmxScheduler:{},dmxDataTraversal:{},dmxBootstrap5TableGenerator:{},dmxBootstrap5Navigation:{}}" -->
<dmx-api-action id="api_getcodebyid" noload="true" url="http://vapor.prelub.com/api/v1.0/partcodes/" dmx-bind:url="'http://vapor.prelub.com/api/v1.0/partcodes/'+modal1.txt_parentid.value"></dmx-api-action>
<dmx-api-action id="api_bom" noload="true"></dmx-api-action>
<dmx-api-action id="api_allpartcodes" url="http://vapor.prelub.com/api/v1.0/partcodes"></dmx-api-action>
<dmx-api-action id="api_maxpn" url="http://vapor.prelub.com/api/v1.0/pns/max"></dmx-api-action>
<dmx-api-action id="api_partcodes" noload="true" url="http://vapor.prelub.com/api/v1.0/partcodes/bytype/0" dmx-bind:url="'http://vapor.prelub.com/api/v1.0/partcodes/bytype/'+modal1.sel_parttypes.value"></dmx-api-action>
<dmx-api-action id="api_childcodes" noload="true" url="http://vapor.prelub.com/api/v1.0/partcodes/byparent/" dmx-bind:url="'http://vapor.prelub.com/api/v1.0/partcodes/byparent/'+modal1.sel_nonproductionparts.value"></dmx-api-action>
<dmx-api-action id="api_partcodes" noload="true" url="http://vapor.prelub.com/api/v1.0/partcodes/bytype/0" dmx-bind:url="'http://vapor.prelub.com/api/v1.0/partcodes/bytype/'+modal1.sel_parttypes.selectedValue"></dmx-api-action>
<dmx-api-action id="api_childcodes" noload="true" url="http://vapor.prelub.com/api/v1.0/partcodes/byparent/" dmx-bind:url="'http://vapor.prelub.com/api/v1.0/partcodes/byparent/'+modal1.txt_parentid.value"></dmx-api-action>
<dmx-api-action id="api_parttypes" url="http://vapor.prelub.com/api/v1.0/parttypes"></dmx-api-action>
<dmx-api-action id="api1" url="http://localhost:8080/api/v1.0/designspecs/max/" dmx-bind:url="'http://vapor.prelub.com/api/v1.0/designspecs/max/'+query1.data.id"></dmx-api-action>
<dmx-array id="arr_boms1" dmx-bind:items="api1.data.boms.values(`(viewlocationid == 1)`)"></dmx-array>
<dmx-query-manager id="query1"></dmx-query-manager>
<div class="modal" id="modal1" is="dmx-bs5-modal" tabindex="-1" dmx-bind:show="!query1.data.id">
<div class="modal-dialog" role="document">
<div class="modal-content">
@@ -12,18 +17,19 @@
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<input id="txt_parentid" name="parentid" type="text" class="form-control">

<input id="hdn_newpn" name="text1" type="hidden" class="form-control" placeholder="new part number"><input id="hdn_zeroo" name="text1" type="hidden" class="form-control" value="0">
<p id="para_productionparts">Select Part Type</p>

<select id="sel_parttypes" class="form-select" name="parttypes" dmx-bind:options="api_parttypes.data" optiontext="name" optionvalue="id" dmx-on:changed="run({run:{action:`api_partcodes.load({})`,name:'filter_partcodes',outputType:'text'}})" required="" dmx-bind:value="api1.data.partnumber.partcode.parttype.id">
<select id="sel_parttypes" class="form-select" name="parttypes" dmx-bind:options="api_parttypes.data" optiontext="name" optionvalue="id" required="" dmx-bind:value="api1.data.partnumber.partcode.parttype.id" dmx-on:changed="api_partcodes.load({})">
<option selected="" value="0">Select</option>
</select>
<p id="para_nonproductionparts">Select Parent Part Code</p><select id="sel_nonproductionparts" class="form-select" name="nonproductionparts" dmx-on:changed="run([{run:{action:`api_childcodes.load({})`,name:'setchildren',outputType:'text'}},{run:{action:`sel_productionparts.setSelectedIndex(\'if(selectedValue&gt;0){sel_productionparts.selectedValue=0;}\')`,outputType:'text'}}])" dmx-bind:options="api_partcodes.data" optiontext="name" optionvalue="id" required="" dmx-bind:value="api1.data.partnumber.partcode.id">
<p id="para_nonproductionparts">Select Parent Part Code</p><select id="sel_nonproductionparts" class="form-select" name="nonproductionparts" dmx-on:changed="run([{run:{action:`txt_parentid.setValue(selectedValue)`,name:'SetTextVal',outputType:'text'}},{run:{action:`api_childcodes.load({})`,name:'setchildren',outputType:'text'}},{run:{action:`sel_productionparts.setSelectedIndex(\'if(selectedValue&gt;0){sel_productionparts.selectedValue=0;}\')`,outputType:'text'}}])" dmx-bind:options="api_partcodes.data" optiontext="name" optionvalue="id" required="" dmx-bind:value="api1.data.partnumber.partcode.id">
<option value="0">Select</option>
</select>
<p>Select Part Code</p>
<select id="sel_childpartcode" class="form-select">
<select id="sel_childpartcode" class="form-select" dmx-bind:options="api_childcodes.data" optiontext="name" optionvalue="id" name="childpartcodes" dmx-on:changed="txt_parentid.setValue(selectedValue);api_getcodebyid.load({})">
<option value="0">Select</option>
</select>
<p>Description</p>
@@ -39,8 +45,8 @@
</div>
</div>
</div>
<dmx-query-manager id="query1"></dmx-query-manager>
<dmx-api-action id="api1" url="http://localhost:8080/api/v1.0/designspecs/max/" dmx-bind:url="'http://vapor.prelub.com/api/v1.0/designspecs/max/'+query1.data.id"></dmx-api-action>
<div class="container">
<h1>DSpec</h1>
<div class="row">
@@ -63,6 +69,121 @@
</div>
<div class="row">
<div class="col">
<div class="form-group mb-3 row">
<label for="input3" class="col-sm-2 col-form-label">Effective Date</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="input3" name="input3" aria-describedby="input3_help" placeholder="Enter some text" dmx-bind:value="api1.data.partnumber.createdate">
</div>
</div>
</div>
<div class="col">
<div class="form-group mb-3 row">
<label for="input2" class="col-sm-2 col-form-label">Work Instruction</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="input2" name="input2" aria-describedby="input2_help" placeholder="Enter some text" width="20%" dmx-bind:value="api1.data.workinstruction">
</div>
</div>
</div>
<div class="col">
<div class="form-group mb-3 row">
<label for="input1" class="col-sm-2 col-form-label">Application</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="input1" name="input1" aria-describedby="input1_help" placeholder="Enter some text" dmx-bind:value="api1.data.application">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col">
<p>Reason for change</p>
<textarea id="text1" class="form-control" dmx-bind:value="api1.data.reasonforchange"></textarea>
</div>
</div>
<div class="row">
<div class="col">
<p>Validation of Change</p>
<textarea id="text2" class="form-control" dmx-bind:value="api1.data.validation"></textarea>
</div>
</div>
<div class="row">
<div class="col">
<p>Notes</p>
<textarea id="text3" class="form-control" dmx-bind:value=""></textarea>
</div>
</div>
<div class="row">
<div class="col">
<form id="frm_updatebom" method="post">
<div class="row">
<div class="col">
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th scope="col" class="text-center">Part #</th>
<th scope="col" class="text-center">Description</th>
<th scope="col" class="text-center">Old</th>
<th scope="col" class="text-center">New</th>
<th scop="col" class="text-center">Action</th>
</tr>
</thead>
<tbody is="dmx-repeat" id="repeat1" dmx-bind:repeat="api1.data.boms" key="id">
<tr>
<td style="width: 25%;">
<input id="txt_bomupdateid" name="bomupdateid" type="text" class="form-control" disabled="true" dmx-bind:value="id">
<input id="txt_updatebompn" name="updatebompn" type="text" class="form-control" style="width: 100%;" dmx-bind:value="partnumber.number" disabled="true">
</td>
<td style="width: 50%;">
<input id="txt_updatebomddsc" name="updatebomdescription" type="text" class="form-control" style="width: 100%" dmx-bind:value="partnumber.description" disabled="true">
</td>
<td style="width: 10%">
<input id="txt_updatebomold" name="updatebomold" type="text" class="form-control" dmx-bind:value="old">
</td>
<td style="width: 10%">
<input id="txt_updatebomnew" name="updatebomnew" type="text" style="width: 100%" class="form-control" dmx-bind:value="new">
</td>
<td style="width: 10%">
<button id="btn_bomupdate" class="btn btn-primary" dmx-on:click="api_updatebom.load({})">Update</button>
</td>
</tr>
</tbody>

</table>
</div>
</div>
</div>
</form>

</div>
</div>
<div class="row">
<div class="col">
<form id="frm_newbomitem" method="post" is="dmx-serverconnect-form" action="/api/BOM/NewBomItem" dmx-on:success="run({run:{action:`api1.load({});api_bom.load({})`,outputType:'text'}})">
<input id="txt_bomdspecid" name="bomdspecid" type="text" class="form-control d-print-none visually-hidden" dmx-bind:value="api1.data.id">
<dmx-api-action id="frmapi_getpartbynum" noload="true" url="http://vapor.prelub.com/api/v1.0/partnumbers/num/" dmx-bind:url="'http://vapor.prelub.com/api/v1.0/partnumbers/num/'+txt_newpnbom.value"></dmx-api-action>
<div class="row">
<div class="col">
<table class="table">
<tbody>
<tr>
<td style="width: 25%">
<input id="txt_newbompnid" name="newbompnid" type="text" class="form-control d-print-none visually-hidden" dmx-bind:value="frmapi_getpartbynum.data.id">
<input id="txt_newpnbom" name="newbompn" type="text" class="form-control" dmx-bind:value="frmapi_getpartbynum.data.number" dmx-on:changed="frmapi_getpartbynum.load({})">
</td>
<td style="width: 50%"><input id="txt_newdesbom" name="newbomdesc" type="text" class="form-control" dmx-bind:value="frmapi_getpartbynum.data.description"></td>
<td style="width: 10%"><input id="txt_newoldbom" name="newbomold" type="text" class="form-control"></td>
<td style="width: 10%"><input id="txt_newnewbom" name="newbomnew" type="text" class="form-control"></td>
<td style="width: 5%">
<button id="btn_savenewbomitem" class="btn btn-primary" type="submit">Add</button>

</td>
</tr>
</tbody>
</table>
</div>
</div>
</form>

</div>
</div>



Yükleniyor…
İptal
Kaydet