|
|
|
@@ -1,5 +1,5 @@ |
|
|
|
<!-- 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:{},dmxSockets:{}}" --> |
|
|
|
<dmx-api-action id="api_deleteItem" noload="true" url="http://vapor.prelub.com/api/v1.0/boms/" dmx-bind:url="'http://vapor.prelub.com/api/v1.0/boms/'+frm_updatebom.repeat1[0].id" method="delete"></dmx-api-action> |
|
|
|
<dmx-api-action id="api_deleteItem" noload="true" url="http://vapor.prelub.com/api/v1.0/boms/" dmx-bind:url="'http://vapor.prelub.com/api/v1.0/boms/'+frm_updatebom.repeat1[0].id" method="delete" dmx-header:access-control-allow-origin="'*'"></dmx-api-action> |
|
|
|
<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_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> |
|
|
|
@@ -16,26 +16,23 @@ |
|
|
|
<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"> |
|
|
|
<form id="frm_part"> |
|
|
|
<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" 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:`txt_parentid.setValue(selectedValue)`,name:'SetTextVal',outputType:'text'}},{run:{action:`api_childcodes.load({})`,name:'setchildren',outputType:'text'}},{run:{action:`sel_productionparts.setSelectedIndex(\'if(selectedValue>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" 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> |
|
|
|
<textarea id="txt_ptdescription" class="form-control" name="ptdescription" required="" dmx-bind:value="api1.data.partnumber.description"></textarea> |
|
|
|
<p>Comments</p> |
|
|
|
<textarea id="txt_ptcomments" class="form-control" name="comments" required="" dmx-bind:value="api1.data.partnumber.comments"></textarea> |
|
|
|
<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" 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 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>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>Description</p> |
|
|
|
<textarea id="txt_ptdescription" class="form-control" name="ptdescription" required="" dmx-bind:value="api1.data.partnumber.description"></textarea> |
|
|
|
<p>Comments</p> |
|
|
|
<textarea id="txt_ptcomments" class="form-control" name="comments" required="" dmx-bind:value="api1.data.partnumber.comments"></textarea> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
<div class="modal-footer"> |
|
|
|
<button type="button" class="btn btn-danger" data-bs-dismiss="modal" id="btn_closenewpar">Cancel</button> |
|
|
|
@@ -185,6 +182,11 @@ |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="row"> |
|
|
|
<div class="col text-end"> |
|
|
|
<button id="btn1" class="btn text-center btn-danger">Save All</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
<meta name="ac:route" content="/dspec"> |