添加商品更改为POPUP

master
e 2018-10-25 00:56:30 +08:00
parent 84aeb1253e
commit 569c63f19a
9 changed files with 343 additions and 3250 deletions

View File

@ -1040,6 +1040,108 @@ function inputClick(obj,name,code) {
});
}
}
/*
自定义url的弹出
obj:要填充的控件,可以为多个以逗号分隔
name:列表中对应的字段,可以为多个以逗号分隔与obj要对应
url弹出页面的Url
*/
function popClickone(obj,name,url) {
$.dialog.setting.zIndex = getzIndex(true);
var names = name;
var objs = obj;
if(typeof(windowapi) == 'undefined'){
$.dialog({
content: "url:"+url,
zIndex: getzIndex(),
lock : true,
title:"选择",
width:700,
height: 400,
cache:false,
ok: function(){
iframe = this.iframe.contentWindow;
var selected = iframe.getSelectRows();
console.log(selected);
if (selected == '' || selected == null ){
alert("请选择");
return false;
}else {
for(var i1=0;i1<names.length;i1++){
var str = "";
$.each( selected, function(i, n){
if (i==0)
str+= n[names[i1]];
else{
str+= ",";
str+=n[names[i1]];
}
});
if($("#"+objs[i1]).length>=1){
$("#"+objs[i1]).val("");
$("#"+objs[i1]).val(str);
}else{
$("input[name='"+objs[i1]+"']").val("");
$("input[name='"+objs[i1]+"']").val(str);
}
}
return true;
}
},
cancelVal: '关闭',
cancel: true /*为true等价于function(){}*/
});
}else{
$.dialog({
content: "url:"+url,
zIndex: getzIndex(),
lock : true,
title:"选择",
width:700,
height: 400,
parent:windowapi,
cache:false,
ok: function(){
iframe = this.iframe.contentWindow;
var selected = iframe.getSelectRows();
if (selected == '' || selected == null ){
alert("请选择数据E");
return false;
}else {
for(var i1=0;i1<names.length;i1++){
var str = "";
$.each( selected, function(i, n){
if (i==0)
str+= n[names[i1]];
else{
str+= ",";
str+=n[names[i1]];
}
});
if($("#"+objs[i1]).length>=1){
$("#"+objs[i1]).val("");
$("#"+objs[i1]).val(str);
}else{
$("[name='"+objs[i1]+"']").val("");
$("[name='"+objs[i1]+"']").val(str);
}
}
return true;
}
},
cancelVal: '关闭',
cancel: true /*为true等价于function(){}*/
});
}
}
/*
自定义url的弹出
obj:要填充的控件,可以为多个以逗号分隔

View File

@ -1043,7 +1043,105 @@ function inputClick(obj,name,code) {
});
}
}
/*
自定义url的弹出
obj:要填充的控件,可以为多个以逗号分隔
name:列表中对应的字段,可以为多个以逗号分隔与obj要对应
url弹出页面的Url
*/
function popClickone(obj,name,url) {
$.dialog.setting.zIndex = getzIndex(true);
var names = name;
var objs = obj;
if(typeof(windowapi) == 'undefined'){
$.dialog({
content: "url:"+url,
zIndex: getzIndex(),
lock : true,
title:"选择",
width:700,
height: 400,
cache:false,
ok: function(){
iframe = this.iframe.contentWindow;
var selected = iframe.getSelectRows();
if (selected == '' || selected == null ){
alert("请选择Z");
return false;
}else {
for(var i1=0;i1<names.length;i1++){
var str = "";
$.each( selected, function(i, n){
if (i==0)
str+= n[names[i1]];
else{
str+= ",";
str+=n[names[i1]];
}
});
if($("#"+objs[i1]).length>=1){
$("#"+objs[i1]).val("");
$("#"+objs[i1]).val(str);
}else{
$("input[name='"+objs[i1]+"']").val("");
$("input[name='"+objs[i1]+"']").val(str);
}
}
return true;
}
},
cancelVal: '关闭',
cancel: true /*为true等价于function(){}*/
});
}else{
$.dialog({
content: "url:"+url,
zIndex: getzIndex(),
lock : true,
title:"选择",
width:700,
height: 400,
parent:windowapi,
cache:false,
ok: function(){
iframe = this.iframe.contentWindow;
var selected = iframe.getSelectRows();
console.log("11111111111111"+selected);
if (selected == '' || selected == null ){
alert("请选择数据Z");
return false;
}else {
console.log(selected);
for(var i1=0;i1<1;i1++){
var str = "";
$.each( selected, function(i, n){
if (i==0)
str+= n[names];
else{
str+= ",";
str+=n[names];
}
});
$("#"+objs).val("");
$("#"+objs).val(str);
$("[name='"+objs+"']").val("");
$("[name='"+objs+"']").val(str);
}
return true;
}
},
cancelVal: '关闭',
cancel: true /*为true等价于function(){}*/
});
}
}
/*
自定义url的弹出
obj:要填充的控件,可以为多个以逗号分隔

View File

@ -105,6 +105,9 @@
var new_name = name.substring(s+1,e);
$this.attr("name",name.replace(new_name,i));
}
}
});
$(this).find('div[name=\'xh\']').html(i+1);
@ -136,7 +139,6 @@
function SelectChange() {
var selectcusValue = $("select[name='cusCode']").val();
//加载工地
var url = "mvGoodsController.do?setvalue&cusCode="+selectcusValue;
$.ajax({
url:url,
@ -418,11 +420,18 @@
<td align="left">
<%-- <t:dictSelect field="wmImNoticeIList[#index#].goodsCode" type="list" extendJson="{class:'form-control',style:'width:350px'}" --%>
<%-- dictCondition="${wmImNoticeHPage.wherecon}" dictTable="mv_goods" dictField="goods_code" dictText="goods_name" defaultVal="" hasLabel="false" title="商品编码"></t:dictSelect> --%>
<input id="wmImNoticeIList[#index#].goodsCode" name="wmImNoticeIList[#index#].goodsCode" maxlength="32"
ignore="ignore" type="text" style="width:420px;text-align: left" >
<t:choose hiddenName="wmImNoticeIList[#index#].goodsCode" hiddenid="goodsName" url="mvGoodsController.do?list" name="mvGoodsList" width="600" height="410" icon="icon-search" title="选择" textname="goodsName" isInit="true"></t:choose>
<%--<td>--%>
<input id="wmImNoticeIList[#index#].goodsCode" name="wmImNoticeIList[#index#].goodsCode" maxlength="32"
type="text" onclick="popClickone('wmImNoticeIList[#index#].goodsCode','goodsName','mvGoodsController.do?list')" style="width:420px;text-align: left" >
<%--</td>--%>
<%--<input id="wmImNoticeIList[#index#].goodsCode" name="wmImNoticeIList[#index#].goodsCode" maxlength="32" --%>
<%--ignore="ignore" type="text" style="width:420px;text-align: left" >--%>
<%--<t:choose hiddenName="wmImNoticeIList[#index#].goodsCode" hiddenid="goodsName" url="mvGoodsController.do?list" name="mvGoodsList" width="600" height="410" icon="icon-search" title="选择" textname="goodsName" isInit="true"></t:choose>--%>
<%----%>
<%-- <t:choose hiddenName="wmImNoticeIList[#index#].goodsCode" hiddenid="id" url="mdGoodsController.do?list" name="mdGoodsList" --%>
<%-- icon="icon-search" title="common.role.list" textname="wmImNoticeIList[#index#].goodsCode" isclear="true" isInit="true"></t:choose> --%>

View File

@ -367,8 +367,24 @@
<th scope="row"><div name="xh"></div></th>
<td><input style="width:20px;" type="checkbox" name="ck"/></td>
<td align="left">
<t:dictSelect field="wmImNoticeIList[#index#].goodsCode" type="list" extendJson="{class:'form-control',style:'width:350px'}"
dictTable="mv_goods" dictField="goods_code" dictText="goods_name" defaultVal="wmImNoticeIList[#index#].goodsCode" hasLabel="false" title="商品编码"></t:dictSelect>
<%-- <t:dictSelect field="wmImNoticeIList[#index#].goodsCode" type="list" extendJson="{class:'form-control',style:'width:350px'}" --%>
<%-- dictCondition="${wmImNoticeHPage.wherecon}" dictTable="mv_goods" dictField="goods_code" dictText="goods_name" defaultVal="" hasLabel="false" title="商品编码"></t:dictSelect> --%>
<%--<td>--%>
<input id="wmImNoticeIList[#index#].goodsCode" name="wmImNoticeIList[#index#].goodsCode" maxlength="32"
type="text" onclick="popClickone('wmImNoticeIList[#index#].goodsCode','goodsName','mvGoodsController.do?list')" style="width:420px;text-align: left" >
<%--</td>--%>
<%--<input id="wmImNoticeIList[#index#].goodsCode" name="wmImNoticeIList[#index#].goodsCode" maxlength="32" --%>
<%--ignore="ignore" type="text" style="width:420px;text-align: left" >--%>
<%--<t:choose hiddenName="wmImNoticeIList[#index#].goodsCode" hiddenid="goodsName" url="mvGoodsController.do?list" name="mvGoodsList" width="600" height="410" icon="icon-search" title="选择" textname="goodsName" isInit="true"></t:choose>--%>
<%----%>
<%-- <t:choose hiddenName="wmImNoticeIList[#index#].goodsCode" hiddenid="id" url="mdGoodsController.do?list" name="mdGoodsList" --%>
<%-- icon="icon-search" title="common.role.list" textname="wmImNoticeIList[#index#].goodsCode" isclear="true" isInit="true"></t:choose> --%>
<label class="Validform_label" style="display: none;">商品编码</label>
</td>
<td align="left">
@ -379,8 +395,11 @@
</td>
<!-- <td align="left"> -->
<%-- <t:dictSelect field="wmImNoticeIList[#index#].goodsUnit" type="list" extendJson="{class:'form-control',style:'width:250px'}" --%>
<%-- dictTable="ba_unit" dictField="unit_code" dictText="unit_zh_name" defaultVal="" hasLabel="false" title="单位"></t:dictSelect> --%>
<%-- <t:dictSelect field="wmImNoticeIList[#index#].goodsUnit" type="list" extendJson="{class:'form-control'}" --%>
<%-- dictTable="ba_unit" dictField="unit_code" dictText="unit_zh_name" hasLabel="false" title="单位"></t:dictSelect> --%>
<!-- <label class="Validform_label" style="display: none;">单位</label> -->
<!-- </td> -->
@ -393,15 +412,10 @@
<!-- </td> -->
<td align="left">
<t:dictSelect field="wmImNoticeIList[#index#].binPre" type="radio" extendJson="{class:'form-control',style:'width:150px'}"
typeGroupCode="sf_yn" defaultVal="" hasLabel="false" title="收货完成"></t:dictSelect>
typeGroupCode="sf_yn" defaultVal="N" hasLabel="false" title="收货完成"></t:dictSelect>
<label class="Validform_label" style="display: none;">收货完成</label>
</td>
<!-- <td align="left"> -->
<!-- <input name="wmImNoticeIList[#index#].goodsUnit" maxlength="32" -->
<!-- ignore="ignore" -->
<!-- type="text" class="form-control" style="width:120px;" > -->
<!-- <label class="Validform_label" style="display: none;">单位</label> -->
<!-- </td> -->
</tr>
</tbody>
</table>

View File

@ -15,6 +15,9 @@ function resetTrNum(tableId) {
var new_name = name.substring(s+1,e);
$this.attr("name",name.replace(new_name,i));
}
}
if(id!=null){
if (id.indexOf("#index#") >= 0){

File diff suppressed because it is too large Load Diff

View File

@ -457,11 +457,12 @@
<input id="wmOmNoticeIList[#index#].goodsId" name="wmOmNoticeIList[#index#].goodsId" maxlength="32"
ignore="ignore" datatype="*"
type="text" class="form-control searchbox-inputtext" onClick="inputClick(this,'goods_name' ,'mv_goodssels');" style="width:420px;text-align: left" >
<label class="Validform_label" style="display: none;">出货商品</label>
ignore="ignore"
type="text" class="form-control searchbox-inputtext" onclick="popClickone('wmOmNoticeIList[#index#].goodsId','goodsName','mvGoodsController.do?list')" style="width:420px;text-align: left" >
<label class="Validform_label" style="display: none;">出货商品</label>
</td>
<td align="left">
<input name="wmOmNoticeIList[#index#].goodsQua" maxlength="32"
@ -475,25 +476,26 @@
typeGroupCode="sf_yn" hasLabel="false" title="下架任务是否已生成"></t:dictSelect>
<label class="Validform_label" style="display: none;">下架任务是否已生成</label>
</td>
<!-- <td align="left"> -->
<!-- <input name="wmOmNoticeIList[#index#].goodsUnit" maxlength="32" -->
<!-- ignore="ignore" -->
<!-- type="text" class="form-control" style="width:120px;" > -->
<!-- <label class="Validform_label" style="display: none;">出货单位</label> -->
<!-- </td> -->
<!-- <td align="left"> -->
<!-- <input name="wmOmNoticeIList[#index#].goodsProData" maxlength="32" -->
<!-- type="text" class="form-control" onClick="WdatePicker()" style="background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;width:160px;" -->
<!-- ignore="ignore" -->
<!-- > -->
<!-- <label class="Validform_label" style="display: none;">生产日期</label> -->
<!-- </td> -->
<!-- <td align="left"> -->
<!-- <input name="wmOmNoticeIList[#index#].binOm" maxlength="32" -->
<!-- ignore="ignore" -->
<!-- type="text" class="form-control" style="width:120px;" > -->
<!-- <label class="Validform_label" style="display: none;">出货储位</label> -->
<!-- </td> -->
<td align="left">
<input name="wmOmNoticeIList[#index#].binOm" maxlength="32"
ignore="ignore"
type="text" class="form-control" style="width:120px;" >
<label class="Validform_label" style="display: none;">出货储位</label>
</td>
<td align="left">
<input name="wmOmNoticeIList[#index#].binId" maxlength="32"
ignore="ignore"
type="text" class="form-control" style="width:120px;" >
<label class="Validform_label" style="display: none;">出货托盘</label>
</td>
<td align="left">
<input name="wmOmNoticeIList[#index#].goodsProData" maxlength="32"
type="text" class="form-control" onClick="WdatePicker()" style="background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;width:160px;"
ignore="ignore"
>
<label class="Validform_label" style="display: none;">生产日期</label>
</td>
</tr>
</tbody>
</table>

View File

@ -437,52 +437,60 @@
</script>
</form>
<!-- 添加 产品明细 模版 -->
<table style="display:none">
<tbody id="add_wmOmNoticeI_table_template">
<tr>
<th scope="row"><div name="xh"></div></th>
<td><input style="width:20px;" type="checkbox" name="ck"/></td>
<td align="left">
<!-- 添加 产品明细 模版 -->
<table style="display:none">
<tbody id="add_wmOmNoticeI_table_template">
<tr>
<th scope="row"><div name="xh"></div></th>
<td><input style="width:20px;" type="checkbox" name="ck"/></td>
<td align="left">
<%-- <t:dictSelect field="wmOmNoticeIList[#index#].goodsId" type="list" extendJson="{class:'form-control',datatype:'*',style:'width:350px'}" --%>
<%-- dictCondition="${wmOmNoticeHPage.wherecon}" dictTable="mv_goods" dictField="goods_code" dictText="goods_name" defaultVal="" hasLabel="false" title="商品编码"></t:dictSelect> --%>
<t:dictSelect field="wmOmNoticeIList[#index#].goodsId" type="list" extendJson="{class:'form-control',style:'width:350px'}"
dictTable="mv_goods" dictField="goods_code" dictText="goods_name" defaultVal="wmOmNoticeIList[#index#].goodsId" hasLabel="false" title="商品编码"></t:dictSelect>
<label class="Validform_label" style="display: none;">出货商品</label>
</td>
<td align="left">
<input name="wmOmNoticeIList[#index#].goodsQua" maxlength="32"
ignore="ignore"
type="text" class="form-control" style="width:120px;" >
<label class="Validform_label" style="display: none;">出货数量</label>
</td>
<td>
<t:dictSelect field="wmOmNoticeIList[#index#].planSta" type="radio" extendJson="{class:'form-control',style:'width:150px'}"
typeGroupCode="sf_yn" hasLabel="false" title="下架任务是否已生成"></t:dictSelect>
<label class="Validform_label" style="display: none;">下架任务是否已生成</label>
</td>
<!-- <td align="left"> -->
<!-- <input name="wmOmNoticeIList[#index#].goodsQuaok" maxlength="32" -->
<!-- ignore="ignore" -->
<!-- type="text" class="form-control" style="width:120px;" > -->
<!-- <label class="Validform_label" style="display: none;">已经出货数量</label> -->
<!-- </td> -->
<!-- <td align="left"> -->
<!-- <input name="wmOmNoticeIList[#index#].goodsProData" maxlength="32" -->
<!-- type="text" class="form-control" onClick="WdatePicker()" style="background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;width:160px;" -->
<!-- ignore="ignore" -->
<!-- > -->
<!-- <label class="Validform_label" style="display: none;">生产日期</label> -->
<!-- </td> -->
<!-- <td align="left"> -->
<!-- <input name="wmOmNoticeIList[#index#].binOm" maxlength="32" -->
<!-- ignore="ignore" -->
<!-- type="text" class="form-control" style="width:120px;" > -->
<!-- <label class="Validform_label" style="display: none;">出货储位</label> -->
<!-- </td> -->
</tr>
</tbody>
</table>
<input id="wmOmNoticeIList[#index#].goodsId" name="wmOmNoticeIList[#index#].goodsId" maxlength="32"
ignore="ignore"
type="text" class="form-control searchbox-inputtext" onclick="popClickone('wmOmNoticeIList[#index#].goodsId','goodsName','mvGoodsController.do?list')" style="width:420px;text-align: left" >
<label class="Validform_label" style="display: none;">出货商品</label>
</td>
<td align="left">
<input name="wmOmNoticeIList[#index#].goodsQua" maxlength="32"
ignore="ignore"
type="text" class="form-control" style="width:120px;" >
<label class="Validform_label" style="display: none;">出货数量</label>
</td>
<td>
<t:dictSelect field="wmOmNoticeIList[#index#].planSta" type="radio" extendJson="{class:'form-control',style:'width:150px'}"
typeGroupCode="sf_yn" hasLabel="false" title="下架任务是否已生成"></t:dictSelect>
<label class="Validform_label" style="display: none;">下架任务是否已生成</label>
</td>
<td align="left">
<input name="wmOmNoticeIList[#index#].binOm" maxlength="32"
ignore="ignore"
type="text" class="form-control" style="width:120px;" >
<label class="Validform_label" style="display: none;">出货储位</label>
</td>
<td align="left">
<input name="wmOmNoticeIList[#index#].binId" maxlength="32"
ignore="ignore"
type="text" class="form-control" style="width:120px;" >
<label class="Validform_label" style="display: none;">出货托盘</label>
</td>
<td align="left">
<input name="wmOmNoticeIList[#index#].goodsProData" maxlength="32"
type="text" class="form-control" onClick="WdatePicker()" style="background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;width:160px;"
ignore="ignore"
>
<label class="Validform_label" style="display: none;">生产日期</label>
</td>
</tr>
</tbody>
</table>
<script src = "webpage/com/zzjee/wm/wmOmNoticeH.js"></script>
</body>
</html>

File diff suppressed because it is too large Load Diff