| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399 |
- <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@include file="/context/mytags.jsp"%>
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <title>货品信息</title>
- <t:base type="jquery,easyui,tools"></t:base>
- <meta name="description" content="">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="online/template/ledefault/css/vendor.css">
- <link rel="stylesheet" href="online/template/ledefault/css/bootstrap-theme.css">
- <link rel="stylesheet" href="online/template/ledefault/css/bootstrap.css">
- <link rel="stylesheet" href="online/template/ledefault/css/app.css">
-
- <link rel="stylesheet" href="plug-in/Validform/css/metrole/style.css" type="text/css"/>
- <link rel="stylesheet" href="plug-in/Validform/css/metrole/tablefrom.css" type="text/css"/>
- <script type="text/javascript" src="plug-in/jquery/jquery-1.9.0.js"></script>
- <script type="text/javascript" src="plug-in/tools/dataformat.js"></script>
- <script type="text/javascript" src="plug-in/easyui/jquery.easyui.min.1.3.2.js"></script>
- <script type="text/javascript" src="plug-in/easyui/locale/zh-cn.js"></script>
- <script type="text/javascript" src="plug-in/tools/syUtil.js"></script>
- <script type="text/javascript" src="plug-in/My97DatePicker/WdatePicker.js"></script>
- <script type="text/javascript" src="plug-in/lhgDialog/lhgdialog.min.js"></script>
- <script type="text/javascript" src="plug-in/tools/curdtools_zh-cn.js"></script>
- <script type="text/javascript" src="plug-in/tools/easyuiextend.js"></script>
- <script type="text/javascript" src="plug-in/Validform/js/Validform_v5.3.1_min_zh-cn.js"></script>
- <script type="text/javascript" src="plug-in/Validform/js/Validform_Datatype_zh-cn.js"></script>
- <script type="text/javascript" src="plug-in/Validform/js/datatype_zh-cn.js"></script>
- <script type="text/javascript" src="plug-in/Validform/plugin/passwordStrength/passwordStrength-min.js"></script>
- <link rel="stylesheet" href="plug-in/uploadify/css/uploadify.css" type="text/css"></link>
- <script type="text/javascript" src="plug-in/uploadify/jquery.uploadify-3.1.js"></script>
- <link rel="stylesheet" href="plug-in/umeditor/themes/default/css/umeditor.css" type="text/css"></link>
- <script type="text/javascript" src="plug-in/umeditor/umeditor.config.js"></script>
- <script type="text/javascript" src="plug-in/umeditor/umeditor.min.js"></script>
- <script type="text/javascript" src="plug-in/umeditor/lang/zh-cn/zh-cn.js"></script>
- </head>
- <script type="text/javascript">
- $(function() {
- var selfId = "";
- $('#cc').combotree({
- url : 'tBGoodsCategoryController.do?setPGoodsCategory&selfId=' + selfId,
- width: 317.25,
- onSelect : function(node) {
- //console.info(node.text);
- }
- });
- //if('${empty pid}' == 'false') { // 设置新增页面时的父级
- //$('#cc').combotree('setValue', '${pid}');
- //}
- });
-
- $(document).ready(function(){
- /* init();
- $("#jform_tab .con-wrapper").hide(); //Hide all tab content
- $("#jform_tab li:first").addClass("active").show(); //Activate first tab
- $("#jform_tab .con-wrapper:first").show(); //Show first tab content
-
-
- //On Click Event
- $("#jform_tab li").click(function() {
- $("#jform_tab li").removeClass("active"); //Remove any "active" class
- $(this).addClass("active"); //Add "active" class to selected tab
- $("#jform_tab .con-wrapper").hide(); //Hide all tab content
- var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
- $(activeTab).fadeIn(); //Fade in the active content
- //$(""+activeTab).show();
- if( $(activeTab).html()!="") {
- return false;
- }else{
- $(activeTab).html('正在加载内容,请稍后...');
- var url = $(this).attr("tab-ajax-url");
- $.post(url, {}, function(data) {
- //$(this).attr("tab-ajax-cached", true);
- $(activeTab).html(data);
-
- });
- }
- return false;
- }); */
- });
- //初始化下标
- function resetTrNum(tableId) {
- $tbody = $("#"+tableId+"");
- $tbody.find('>tr').each(function(i){
- $(':input, select', this).each(function(){
- var $this = $(this), name = $this.attr('name'), val = $this.val();
- if(name!=null){
- if (name.indexOf("#index#") >= 0){
- $this.attr("name",name.replace('#index#',i));
- }else{
- var s = name.indexOf("[");
- var e = name.indexOf("]");
- var new_name = name.substring(s+1,e);
- $this.attr("name",name.replace(new_name,i));
- }
- }
- });
- $(this).find('div[name=\'xh\']').html(i+1);
- });
- }
-
- function init(){
- var tabHead =$("#jform_tab li:first");
- var tabBox = $("#jform_tab .con-wrapper:first");
- var url = tabHead.attr("tab-ajax-url");
- tabBox.html('正在加载内容,请稍后...');
- $.post(url, {}, function(data) {
- tabBox.html(data);
- //tabHead.attr("tab-ajax-cached", true);
- });
- }
- </script>
- <body>
- <form id="formobj" action="tBGoodsInfoController.do?doAdd&unknown=1" name="formobj" method="post"><input type="hidden" id="btn_sub" class="btn_sub"/>
-
- <input type="hidden" id="btn_sub" class="btn_sub"/>
-
-
- <div class="tab-wrapper">
- <!-- tab -->
- <ul class="nav nav-tabs">
- <li role="presentation" class="active"><a href="javascript:void(0);">货品信息</a></li>
- </ul>
- <!-- tab内容 -->
- <div class="con-wrapper" style="display: block;">
- <div class="row form-wrapper">
- <div class="row show-grid">
- <div class="col-xs-3 text-center">
- <span color="red" class="requiredIcon">*</span><b>货品名称:</b>
- </div>
- <div class="col-xs-3">
- <input id="goodsName" name="goodsName" type="text" class="form-control" maxlength="20" datatype="s1-20">
- <span class="Validform_checktip" style="float:left;height:0px;"></span>
- <label class="Validform_label" style="display: none">货品名称</label>
- </div>
-
-
- <div class="col-xs-3 text-center">
- <b>规格型号:</b>
- </div>
- <div class="col-xs-3">
- <input id="specification" name="specification" type="text" readonly="readonly" class="form-control" value="未知规格型号" maxlength="20" ignore="ignore">
- <span class="Validform_checktip" style="float:left;height:0px;"></span>
- <label class="Validform_label" style="display: none">规格型号</label>
- </div>
- </div>
-
-
- <div class="row show-grid">
- <div class="col-xs-3 text-center">
- <span color="red" class="requiredIcon">*</span><b>所属分类:</b>
- </div>
- <div class="col-xs-3">
- <%-- <t:dictSelect field="belongCategory" type="list" extendJson="{class:'form-control',style:'width:150px'}"
- dictTable="t_b_goods_category" dictField="id" dictText="category_name" hasLabel="false" title="所属分类"></t:dictSelect>--%>
- <input id="cc" name="belongCategory" style="float:left;height:20px;" value="ff8080816aaeea68016ad3f390370ee1">
- <span class="Validform_checktip" style="float:left;height:0px;"></span>
- <label class="Validform_label" style="display: none">所属分类</label>
- </div>
-
- <%--
- <div class="col-xs-3 text-center">
- <b>品牌:</b>
- </div>
- <div class="col-xs-3">
- <input id="brand" name="brand" type="text" class="form-control" maxlength="20" datatype="s1-20" ignore="ignore">
- <span class="Validform_checktip" style="float:left;height:0px;"></span>
- <label class="Validform_label" style="display: none">品牌</label>
- </div>
- </div>
-
-
- <div class="row show-grid">
- <div class="col-xs-3 text-center">
- <span color="red" class="requiredIcon">*</span><b>默认供应商:</b>
- </div>
- <div class="col-xs-3">
- <t:dictSelect id="defaultProvider" field="defaultProvider" extendJson="{class:'form-control',style:'width:150px'}"
- type="list" dictTable="t_b_related_units" dictField="id" dictText="unit_name" hasLabel="false" title="默认供应商" datatype="*"></t:dictSelect>
- <span class="Validform_checktip" style="float:left;height:0px;"></span>
- <label class="Validform_label" style="display: none">默认供应商</label>
- </div>
- --%>
-
- <div class="col-xs-3 text-center">
- <span color="red" class="requiredIcon">*</span><b>基本单位:</b>
- </div>
- <div class="col-xs-3">
- <t:dictSelect field="baseUnit" type="list" extendJson="{class:'form-control',style:'width:150px'}"
- typeGroupCode="metering_calcu_unit" hasLabel="false" title="基本单位" datatype="*"></t:dictSelect>
- <span class="Validform_checktip" style="float:left;height:0px;"></span>
- <label class="Validform_label" style="display: none">基本单位</label>
- </div>
- </div>
-
-
- <%-- <div class="row show-grid">
- <div class="col-xs-3 text-center">
- <span color="red" class="requiredIcon">*</span> <b>采购时默认计量单位:</b>
- </div>
- <div class="col-xs-3">
- <t:dictSelect field="purchaseUnit" type="list" extendJson="{class:'form-control',style:'width:150px'}"
- typeGroupCode="metering_calcu_unit" hasLabel="false" title="采购单位" datatype="*"></t:dictSelect>
- <span class="Validform_checktip" style="float:left;height:0px;"></span>
- <label class="Validform_label" style="display: none">采购时默认计量单位</label>
- </div>
-
-
- <div class="col-xs-3 text-center">
- <span color="red" class="requiredIcon">*</span> <b>申购时默认计量单位:</b>
- </div>
- <div class="col-xs-3">
- <t:dictSelect field="salesUnit" type="list" extendJson="{class:'form-control',style:'width:150px'}"
- typeGroupCode="metering_calcu_unit" hasLabel="false" title="申购单位" datatype="*"></t:dictSelect>
- <span class="Validform_checktip" style="float:left;height:0px;"></span>
- <label class="Validform_label" style="display: none">申购单位</label>
- </div>
- </div>
- --%>
-
- <div class="row show-grid">
- <div class="col-xs-3 text-center">
- <b>货品描述:</b>
- </div>
- <div class="col-xs-3">
- <textarea id="goodsDesc" class="form-control" rows="6" name="goodsDesc" maxlength="100"></textarea>
- <span class="Validform_checktip" style="float:left;height:0px;"></span>
- <label class="Validform_label" style="display: none">货品描述</label>
- </div>
- <div class="col-xs-2 text-center"><b></b></div>
- <div class="col-xs-4"></div>
- </div>
- </div>
- </div>
-
- <div class="con-wrapper" style="display: block;"></div>
- </div>
-
-
- <script type="text/javascript">
- $(function(){
- //查看模式情况下,删除和上传附件功能禁止使用
- if(location.href.indexOf("load=detail")!=-1){
- $(".jeecgDetail").hide();
- }
-
- if(location.href.indexOf("mode=read")!=-1){
- //查看模式控件禁用
- $("#formobj").find(":input").attr("disabled","disabled");
- }
- if(location.href.indexOf("mode=onbutton")!=-1){
- //其他模式显示提交按钮
- $("#sub_tr").show();
- }
- });
- var neibuClickFlag = false;
- function neibuClick() {
- neibuClickFlag = true;
- $('#btn_sub').trigger('click');
- }
- </script>
- <%--
- <div id="jform_tab" class="tab-wrapper">
- <!-- tab -->
- <ul class="nav nav-tabs">
- <li role="presentation" tab-ajax-url="tBGoodsInfoController.do?tBPriceInfoList&id=${tBGoodsInfoPage.id}"><a href="#con-wrapper1">价格信息</a></li>
- <!--<li role="presentation" tab-ajax-url="tBGoodsInfoController.do?tBStockInfoList&id=${tBGoodsInfoPage.id}"><a href="#con-wrapper0">库存信息</a></li>-->
- </ul>
-
- <div class="con-wrapper" id="con-wrapper0" style="display: none;"></div>
- <div class="con-wrapper" id="con-wrapper1" style="display: none;"></div>
- </div>
- --%>
-
- <div align="center" id = "sub_tr" style="display: none;" > <input type="button" value="提交" onclick="neibuClick();" class="ui_state_highlight"></div>
- <script type="text/javascript">
- $(function() {
- $("#formobj").Validform({
- tiptype: 1,
- btnSubmit: "#btn_sub",
- btnReset: "#btn_reset",
- ajaxPost: true,
- beforeSubmit: function(curform) {
- var tag = true;
- //提交前处理
- return tag;
- },
- usePlugin: {
- passwordstrength: {
- minLen: 6,
- maxLen: 18,
- trigger: function(obj, error) {
- if (error) {
- obj.parent().next().find(".Validform_checktip").show();
- obj.find(".passwordStrength").hide();
- } else {
- $(".passwordStrength").show();
- obj.parent().next().find(".Validform_checktip").hide();
- }
- }
- }
- },
- callback: function(data) {
- if (data.success == true) {
- var win = frameElement.api.opener;
- win.reloadTable();
- win.tip(data.msg);
- frameElement.api.close();
- } else {
- if (data.responseText == '' || data.responseText == undefined) {
- $.messager.alert('错误', data.msg);
- $.Hidemsg();
- } else {
- try {
- var emsg = data.responseText.substring(data.responseText.indexOf('错误描述'), data.responseText.indexOf('错误信息'));
- $.messager.alert('错误', emsg);
- $.Hidemsg();
- } catch(ex) {
- $.messager.alert('错误', data.responseText + '');
- }
- }
- return false;
- }
- }
- });
- });
- </script>
-
- </form>
- <!-- 添加 产品明细 模版 -->
- <table style="display:none" id="add_tBStockInfo_table">
- <tbody id="add_tBStockInfo_table_template">
- <tr>
- <th scope="row"><div name="xh"></div></th>
- <td><input style="width:20px;" type="checkbox" name="ck"/></td>
- <td align="left">
- <input name="tBStockInfoList[#index#].referenceCost" maxlength="10"
- type="text" class="form-control" style="width:120px;" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/"><b> 元</b>
- <span class="Validform_checktip" style="float:left;height:0px;"></span>
- <label class="Validform_label" style="display: none;">参考成本</label>
- </td>
-
- <td align="left">
- <input name="tBStockInfoList[#index#].arrivalCycle" maxlength="5"
- type="text" class="form-control" style="width:120px;" datatype="n1-5" ignore="ignore"><b> 天</b>
- <label class="Validform_label" style="display: none;">到货周期</label>
- </td>
- <td align="left">
- <input name="tBStockInfoList[#index#].minStock" maxlength="10"
- type="text" class="form-control" style="width:120px;" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/"><b> 基本单位</b>
- <label class="Validform_label" style="display: none;">最低库存</label>
- </td>
- <td align="left">
- <input name="tBStockInfoList[#index#].maxStock" maxlength="10"
- type="text" class="form-control" style="width:120px;" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/"><b> 基本单位</b>
- <label class="Validform_label" style="display: none;">最高库存</label>
- </td>
-
- </tr>
- </tbody>
- </table>
- <table style="display:none" id="add_tBPriceInfo_table">
- <tbody id="add_tBPriceInfo_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="tBPriceInfoList[#index#].meteringUnit" type="list" extendJson="{class:'form-control',style:'width:150px'}"
- typeGroupCode="metering_calcu_unit" defaultVal="" hasLabel="false" title="计量单位" datatype="*"></t:dictSelect>
- <label class="Validform_label" style="display: none;">计量单位</label>
- </td>
- <td align="left">
- <input name="tBPriceInfoList[#index#].conversion" maxlength="10"
- type="text" class="form-control" style="width:130px;" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/">
- <label class="Validform_label" style="display: none;">与基本单位换算</label>
- </td>
- <td align="left">
- <input name="tBPriceInfoList[#index#].retailPrice" maxlength="10"
- type="text" class="form-control" style="width:120px;" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/">
- <label class="Validform_label" style="display: none;">对外价格</label>
- </td>
- <td align="left">
- <input name="tBPriceInfoList[#index#].setPrice1" maxlength="10"
- type="text" class="form-control" style="width:120px;" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/">
- <label class="Validform_label" style="display: none;">采购价格</label>
- </td>
-
- </tr>
- </tbody>
- </table>
- <script src = "webpage/cn/com/lzt/goodsinfo/tBGoodsInfo.js"></script>
- </body>
- </html>
|