tBGoodsInfo-unknown-add.jsp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <!DOCTYPE html>
  4. <html lang="zh-CN">
  5. <head>
  6. <meta charset="utf-8">
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  8. <title>货品信息</title>
  9. <t:base type="jquery,easyui,tools"></t:base>
  10. <meta name="description" content="">
  11. <meta name="viewport" content="width=device-width, initial-scale=1">
  12. <link rel="stylesheet" href="online/template/ledefault/css/vendor.css">
  13. <link rel="stylesheet" href="online/template/ledefault/css/bootstrap-theme.css">
  14. <link rel="stylesheet" href="online/template/ledefault/css/bootstrap.css">
  15. <link rel="stylesheet" href="online/template/ledefault/css/app.css">
  16. <link rel="stylesheet" href="plug-in/Validform/css/metrole/style.css" type="text/css"/>
  17. <link rel="stylesheet" href="plug-in/Validform/css/metrole/tablefrom.css" type="text/css"/>
  18. <script type="text/javascript" src="plug-in/jquery/jquery-1.9.0.js"></script>
  19. <script type="text/javascript" src="plug-in/tools/dataformat.js"></script>
  20. <script type="text/javascript" src="plug-in/easyui/jquery.easyui.min.1.3.2.js"></script>
  21. <script type="text/javascript" src="plug-in/easyui/locale/zh-cn.js"></script>
  22. <script type="text/javascript" src="plug-in/tools/syUtil.js"></script>
  23. <script type="text/javascript" src="plug-in/My97DatePicker/WdatePicker.js"></script>
  24. <script type="text/javascript" src="plug-in/lhgDialog/lhgdialog.min.js"></script>
  25. <script type="text/javascript" src="plug-in/tools/curdtools_zh-cn.js"></script>
  26. <script type="text/javascript" src="plug-in/tools/easyuiextend.js"></script>
  27. <script type="text/javascript" src="plug-in/Validform/js/Validform_v5.3.1_min_zh-cn.js"></script>
  28. <script type="text/javascript" src="plug-in/Validform/js/Validform_Datatype_zh-cn.js"></script>
  29. <script type="text/javascript" src="plug-in/Validform/js/datatype_zh-cn.js"></script>
  30. <script type="text/javascript" src="plug-in/Validform/plugin/passwordStrength/passwordStrength-min.js"></script>
  31. <link rel="stylesheet" href="plug-in/uploadify/css/uploadify.css" type="text/css"></link>
  32. <script type="text/javascript" src="plug-in/uploadify/jquery.uploadify-3.1.js"></script>
  33. <link rel="stylesheet" href="plug-in/umeditor/themes/default/css/umeditor.css" type="text/css"></link>
  34. <script type="text/javascript" src="plug-in/umeditor/umeditor.config.js"></script>
  35. <script type="text/javascript" src="plug-in/umeditor/umeditor.min.js"></script>
  36. <script type="text/javascript" src="plug-in/umeditor/lang/zh-cn/zh-cn.js"></script>
  37. </head>
  38. <script type="text/javascript">
  39. $(function() {
  40. var selfId = "";
  41. $('#cc').combotree({
  42. url : 'tBGoodsCategoryController.do?setPGoodsCategory&selfId=' + selfId,
  43. width: 317.25,
  44. onSelect : function(node) {
  45. //console.info(node.text);
  46. }
  47. });
  48. //if('${empty pid}' == 'false') { // 设置新增页面时的父级
  49. //$('#cc').combotree('setValue', '${pid}');
  50. //}
  51. });
  52. $(document).ready(function(){
  53. /* init();
  54. $("#jform_tab .con-wrapper").hide(); //Hide all tab content
  55. $("#jform_tab li:first").addClass("active").show(); //Activate first tab
  56. $("#jform_tab .con-wrapper:first").show(); //Show first tab content
  57. //On Click Event
  58. $("#jform_tab li").click(function() {
  59. $("#jform_tab li").removeClass("active"); //Remove any "active" class
  60. $(this).addClass("active"); //Add "active" class to selected tab
  61. $("#jform_tab .con-wrapper").hide(); //Hide all tab content
  62. var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
  63. $(activeTab).fadeIn(); //Fade in the active content
  64. //$(""+activeTab).show();
  65. if( $(activeTab).html()!="") {
  66. return false;
  67. }else{
  68. $(activeTab).html('正在加载内容,请稍后...');
  69. var url = $(this).attr("tab-ajax-url");
  70. $.post(url, {}, function(data) {
  71. //$(this).attr("tab-ajax-cached", true);
  72. $(activeTab).html(data);
  73. });
  74. }
  75. return false;
  76. }); */
  77. });
  78. //初始化下标
  79. function resetTrNum(tableId) {
  80. $tbody = $("#"+tableId+"");
  81. $tbody.find('>tr').each(function(i){
  82. $(':input, select', this).each(function(){
  83. var $this = $(this), name = $this.attr('name'), val = $this.val();
  84. if(name!=null){
  85. if (name.indexOf("#index#") >= 0){
  86. $this.attr("name",name.replace('#index#',i));
  87. }else{
  88. var s = name.indexOf("[");
  89. var e = name.indexOf("]");
  90. var new_name = name.substring(s+1,e);
  91. $this.attr("name",name.replace(new_name,i));
  92. }
  93. }
  94. });
  95. $(this).find('div[name=\'xh\']').html(i+1);
  96. });
  97. }
  98. function init(){
  99. var tabHead =$("#jform_tab li:first");
  100. var tabBox = $("#jform_tab .con-wrapper:first");
  101. var url = tabHead.attr("tab-ajax-url");
  102. tabBox.html('正在加载内容,请稍后...');
  103. $.post(url, {}, function(data) {
  104. tabBox.html(data);
  105. //tabHead.attr("tab-ajax-cached", true);
  106. });
  107. }
  108. </script>
  109. <body>
  110. <form id="formobj" action="tBGoodsInfoController.do?doAdd&unknown=1" name="formobj" method="post"><input type="hidden" id="btn_sub" class="btn_sub"/>
  111. <input type="hidden" id="btn_sub" class="btn_sub"/>
  112. <div class="tab-wrapper">
  113. <!-- tab -->
  114. <ul class="nav nav-tabs">
  115. <li role="presentation" class="active"><a href="javascript:void(0);">货品信息</a></li>
  116. </ul>
  117. <!-- tab内容 -->
  118. <div class="con-wrapper" style="display: block;">
  119. <div class="row form-wrapper">
  120. <div class="row show-grid">
  121. <div class="col-xs-3 text-center">
  122. <span color="red" class="requiredIcon">*</span><b>货品名称:</b>
  123. </div>
  124. <div class="col-xs-3">
  125. <input id="goodsName" name="goodsName" type="text" class="form-control" maxlength="20" datatype="s1-20">
  126. <span class="Validform_checktip" style="float:left;height:0px;"></span>
  127. <label class="Validform_label" style="display: none">货品名称</label>
  128. </div>
  129. <div class="col-xs-3 text-center">
  130. <b>规格型号:</b>
  131. </div>
  132. <div class="col-xs-3">
  133. <input id="specification" name="specification" type="text" readonly="readonly" class="form-control" value="未知规格型号" maxlength="20" ignore="ignore">
  134. <span class="Validform_checktip" style="float:left;height:0px;"></span>
  135. <label class="Validform_label" style="display: none">规格型号</label>
  136. </div>
  137. </div>
  138. <div class="row show-grid">
  139. <div class="col-xs-3 text-center">
  140. <span color="red" class="requiredIcon">*</span><b>所属分类:</b>
  141. </div>
  142. <div class="col-xs-3">
  143. <%-- <t:dictSelect field="belongCategory" type="list" extendJson="{class:'form-control',style:'width:150px'}"
  144. dictTable="t_b_goods_category" dictField="id" dictText="category_name" hasLabel="false" title="所属分类"></t:dictSelect>--%>
  145. <input id="cc" name="belongCategory" style="float:left;height:20px;" value="ff8080816aaeea68016ad3f390370ee1">
  146. <span class="Validform_checktip" style="float:left;height:0px;"></span>
  147. <label class="Validform_label" style="display: none">所属分类</label>
  148. </div>
  149. <%--
  150. <div class="col-xs-3 text-center">
  151. <b>品牌:</b>
  152. </div>
  153. <div class="col-xs-3">
  154. <input id="brand" name="brand" type="text" class="form-control" maxlength="20" datatype="s1-20" ignore="ignore">
  155. <span class="Validform_checktip" style="float:left;height:0px;"></span>
  156. <label class="Validform_label" style="display: none">品牌</label>
  157. </div>
  158. </div>
  159. <div class="row show-grid">
  160. <div class="col-xs-3 text-center">
  161. <span color="red" class="requiredIcon">*</span><b>默认供应商:</b>
  162. </div>
  163. <div class="col-xs-3">
  164. <t:dictSelect id="defaultProvider" field="defaultProvider" extendJson="{class:'form-control',style:'width:150px'}"
  165. type="list" dictTable="t_b_related_units" dictField="id" dictText="unit_name" hasLabel="false" title="默认供应商" datatype="*"></t:dictSelect>
  166. <span class="Validform_checktip" style="float:left;height:0px;"></span>
  167. <label class="Validform_label" style="display: none">默认供应商</label>
  168. </div>
  169. --%>
  170. <div class="col-xs-3 text-center">
  171. <span color="red" class="requiredIcon">*</span><b>基本单位:</b>
  172. </div>
  173. <div class="col-xs-3">
  174. <t:dictSelect field="baseUnit" type="list" extendJson="{class:'form-control',style:'width:150px'}"
  175. typeGroupCode="metering_calcu_unit" hasLabel="false" title="基本单位" datatype="*"></t:dictSelect>
  176. <span class="Validform_checktip" style="float:left;height:0px;"></span>
  177. <label class="Validform_label" style="display: none">基本单位</label>
  178. </div>
  179. </div>
  180. <%-- <div class="row show-grid">
  181. <div class="col-xs-3 text-center">
  182. <span color="red" class="requiredIcon">*</span> <b>采购时默认计量单位:</b>
  183. </div>
  184. <div class="col-xs-3">
  185. <t:dictSelect field="purchaseUnit" type="list" extendJson="{class:'form-control',style:'width:150px'}"
  186. typeGroupCode="metering_calcu_unit" hasLabel="false" title="采购单位" datatype="*"></t:dictSelect>
  187. <span class="Validform_checktip" style="float:left;height:0px;"></span>
  188. <label class="Validform_label" style="display: none">采购时默认计量单位</label>
  189. </div>
  190. <div class="col-xs-3 text-center">
  191. <span color="red" class="requiredIcon">*</span> <b>申购时默认计量单位:</b>
  192. </div>
  193. <div class="col-xs-3">
  194. <t:dictSelect field="salesUnit" type="list" extendJson="{class:'form-control',style:'width:150px'}"
  195. typeGroupCode="metering_calcu_unit" hasLabel="false" title="申购单位" datatype="*"></t:dictSelect>
  196. <span class="Validform_checktip" style="float:left;height:0px;"></span>
  197. <label class="Validform_label" style="display: none">申购单位</label>
  198. </div>
  199. </div>
  200. --%>
  201. <div class="row show-grid">
  202. <div class="col-xs-3 text-center">
  203. <b>货品描述:</b>
  204. </div>
  205. <div class="col-xs-3">
  206. <textarea id="goodsDesc" class="form-control" rows="6" name="goodsDesc" maxlength="100"></textarea>
  207. <span class="Validform_checktip" style="float:left;height:0px;"></span>
  208. <label class="Validform_label" style="display: none">货品描述</label>
  209. </div>
  210. <div class="col-xs-2 text-center"><b></b></div>
  211. <div class="col-xs-4"></div>
  212. </div>
  213. </div>
  214. </div>
  215. <div class="con-wrapper" style="display: block;"></div>
  216. </div>
  217. <script type="text/javascript">
  218. $(function(){
  219. //查看模式情况下,删除和上传附件功能禁止使用
  220. if(location.href.indexOf("load=detail")!=-1){
  221. $(".jeecgDetail").hide();
  222. }
  223. if(location.href.indexOf("mode=read")!=-1){
  224. //查看模式控件禁用
  225. $("#formobj").find(":input").attr("disabled","disabled");
  226. }
  227. if(location.href.indexOf("mode=onbutton")!=-1){
  228. //其他模式显示提交按钮
  229. $("#sub_tr").show();
  230. }
  231. });
  232. var neibuClickFlag = false;
  233. function neibuClick() {
  234. neibuClickFlag = true;
  235. $('#btn_sub').trigger('click');
  236. }
  237. </script>
  238. <%--
  239. <div id="jform_tab" class="tab-wrapper">
  240. <!-- tab -->
  241. <ul class="nav nav-tabs">
  242. <li role="presentation" tab-ajax-url="tBGoodsInfoController.do?tBPriceInfoList&id=${tBGoodsInfoPage.id}"><a href="#con-wrapper1">价格信息</a></li>
  243. <!--<li role="presentation" tab-ajax-url="tBGoodsInfoController.do?tBStockInfoList&id=${tBGoodsInfoPage.id}"><a href="#con-wrapper0">库存信息</a></li>-->
  244. </ul>
  245. <div class="con-wrapper" id="con-wrapper0" style="display: none;"></div>
  246. <div class="con-wrapper" id="con-wrapper1" style="display: none;"></div>
  247. </div>
  248. --%>
  249. <div align="center" id = "sub_tr" style="display: none;" > <input type="button" value="提交" onclick="neibuClick();" class="ui_state_highlight"></div>
  250. <script type="text/javascript">
  251. $(function() {
  252. $("#formobj").Validform({
  253. tiptype: 1,
  254. btnSubmit: "#btn_sub",
  255. btnReset: "#btn_reset",
  256. ajaxPost: true,
  257. beforeSubmit: function(curform) {
  258. var tag = true;
  259. //提交前处理
  260. return tag;
  261. },
  262. usePlugin: {
  263. passwordstrength: {
  264. minLen: 6,
  265. maxLen: 18,
  266. trigger: function(obj, error) {
  267. if (error) {
  268. obj.parent().next().find(".Validform_checktip").show();
  269. obj.find(".passwordStrength").hide();
  270. } else {
  271. $(".passwordStrength").show();
  272. obj.parent().next().find(".Validform_checktip").hide();
  273. }
  274. }
  275. }
  276. },
  277. callback: function(data) {
  278. if (data.success == true) {
  279. var win = frameElement.api.opener;
  280. win.reloadTable();
  281. win.tip(data.msg);
  282. frameElement.api.close();
  283. } else {
  284. if (data.responseText == '' || data.responseText == undefined) {
  285. $.messager.alert('错误', data.msg);
  286. $.Hidemsg();
  287. } else {
  288. try {
  289. var emsg = data.responseText.substring(data.responseText.indexOf('错误描述'), data.responseText.indexOf('错误信息'));
  290. $.messager.alert('错误', emsg);
  291. $.Hidemsg();
  292. } catch(ex) {
  293. $.messager.alert('错误', data.responseText + '');
  294. }
  295. }
  296. return false;
  297. }
  298. }
  299. });
  300. });
  301. </script>
  302. </form>
  303. <!-- 添加 产品明细 模版 -->
  304. <table style="display:none" id="add_tBStockInfo_table">
  305. <tbody id="add_tBStockInfo_table_template">
  306. <tr>
  307. <th scope="row"><div name="xh"></div></th>
  308. <td><input style="width:20px;" type="checkbox" name="ck"/></td>
  309. <td align="left">
  310. <input name="tBStockInfoList[#index#].referenceCost" maxlength="10"
  311. type="text" class="form-control" style="width:120px;" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/"><b> 元</b>
  312. <span class="Validform_checktip" style="float:left;height:0px;"></span>
  313. <label class="Validform_label" style="display: none;">参考成本</label>
  314. </td>
  315. <td align="left">
  316. <input name="tBStockInfoList[#index#].arrivalCycle" maxlength="5"
  317. type="text" class="form-control" style="width:120px;" datatype="n1-5" ignore="ignore"><b> 天</b>
  318. <label class="Validform_label" style="display: none;">到货周期</label>
  319. </td>
  320. <td align="left">
  321. <input name="tBStockInfoList[#index#].minStock" maxlength="10"
  322. type="text" class="form-control" style="width:120px;" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/"><b> 基本单位</b>
  323. <label class="Validform_label" style="display: none;">最低库存</label>
  324. </td>
  325. <td align="left">
  326. <input name="tBStockInfoList[#index#].maxStock" maxlength="10"
  327. type="text" class="form-control" style="width:120px;" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/"><b> 基本单位</b>
  328. <label class="Validform_label" style="display: none;">最高库存</label>
  329. </td>
  330. </tr>
  331. </tbody>
  332. </table>
  333. <table style="display:none" id="add_tBPriceInfo_table">
  334. <tbody id="add_tBPriceInfo_table_template">
  335. <tr>
  336. <th scope="row"><div name="xh"></div></th>
  337. <td><input style="width:20px;" type="checkbox" name="ck"/></td>
  338. <td align="left">
  339. <t:dictSelect field="tBPriceInfoList[#index#].meteringUnit" type="list" extendJson="{class:'form-control',style:'width:150px'}"
  340. typeGroupCode="metering_calcu_unit" defaultVal="" hasLabel="false" title="计量单位" datatype="*"></t:dictSelect>
  341. <label class="Validform_label" style="display: none;">计量单位</label>
  342. </td>
  343. <td align="left">
  344. <input name="tBPriceInfoList[#index#].conversion" maxlength="10"
  345. type="text" class="form-control" style="width:130px;" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/">
  346. <label class="Validform_label" style="display: none;">与基本单位换算</label>
  347. </td>
  348. <td align="left">
  349. <input name="tBPriceInfoList[#index#].retailPrice" maxlength="10"
  350. type="text" class="form-control" style="width:120px;" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/">
  351. <label class="Validform_label" style="display: none;">对外价格</label>
  352. </td>
  353. <td align="left">
  354. <input name="tBPriceInfoList[#index#].setPrice1" maxlength="10"
  355. type="text" class="form-control" style="width:120px;" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/">
  356. <label class="Validform_label" style="display: none;">采购价格</label>
  357. </td>
  358. </tr>
  359. </tbody>
  360. </table>
  361. <script src = "webpage/cn/com/lzt/goodsinfo/tBGoodsInfo.js"></script>
  362. </body>
  363. </html>