formlist-add.html 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/xhtml" ng-app="app">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  5. <meta http-equiv="Pragma" content="no-cache" />
  6. <meta http-equiv="Cache-Control" content="no-cache" />
  7. <meta http-equiv="Expires" content="0" />
  8. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  9. <title>表单详情</title>
  10. <link href="../../AFrontEnd/css/animate.css" rel="stylesheet" />
  11. <link href="../../AFrontEnd/css/fontawesome/css/font-awesome.css" rel="stylesheet" />
  12. <link href="../../AFrontEnd/css/bootstrap.css" rel="stylesheet" />
  13. <link href="../../AFrontEnd/css/style.css" rel="stylesheet" />
  14. <script>document.write("<link href='../../AFrontEnd/css/special.css?time=" + new Date().getTime() + "' rel='stylesheet'>");</script>
  15. <script>document.write("<link href='css/formlist.css?time=" + new Date().getTime() + "' rel='stylesheet'>");</script>
  16. </head>
  17. <body>
  18. <div class="sp-page" ng-controller="formlistAddCtrl as ctl" ng-cloak>
  19. <div class="loading" ng-if="ctl.loading">
  20. <div class="loading-msg">
  21. <h3>数据加载中,请等待</h3>
  22. <div class="spinner">
  23. <div class="bounce1"></div>
  24. <div class="bounce2"></div>
  25. <div class="bounce3"></div>
  26. </div>
  27. </div>
  28. </div>
  29. <div class="sp-detail-left">
  30. <div class="sp-msg-left-top"><i class="fa fa-th-large"></i> 表单设置</div>
  31. <div class="sp-page-pad">
  32. <div class="sp-msg-left-bottom">
  33. <div class="sp-lh-18 sp-color-gray">
  34. <span class="sp-col-40 sp-pad-0">表单标识:</span>
  35. <span class="sp-col-60 sp-pad-0" ng-bind="ctl.formsingle.CKEY"></span>
  36. </div>
  37. <div class="sp-lh-18 sp-color-gray">
  38. <span class="sp-col-40 sp-pad-0">表单名称:</span>
  39. <span class="sp-col-60 sp-pad-0" ng-bind="ctl.formsingle.CNAME"></span>
  40. </div>
  41. <div class="sp-lh-20 sp-text-right sp-mt-10 sp-mb-10">
  42. <span title="修改表单" ng-click="ctl.editBasicForm()" style="cursor: pointer; padding-right: 5px;">
  43. <i class="fa fa-edit sp-mr-5"></i>修 改
  44. </span>
  45. <span title="新建子表" ng-click="ctl.openAddSubLayer()" style="cursor: pointer; padding-right: 5px;">
  46. <i class="icon-plus sp-mr-5"></i>新 建
  47. </span>
  48. </div>
  49. <div class="sp-page" id="formAddPart" style="overflow: auto;">
  50. <div class="sp-msg-left-lh" ng-class="{'sp-msg-left-active':ctl.active.STATUS==$index}" ng-repeat="item in ctl.subFormData" ng-click="ctl.getMsgData($index,item)">
  51. <div class="sp-col-10"><i class="icon-folder"></i> </div>
  52. <div class="sp-col-70" ng-bind="item.CNAME"></div>
  53. <div class="sp-col-20 sp-text-right">
  54. <i class="fa fa-pencil" title="编辑" ng-click="ctl.editSubForm(item)"></i>
  55. <i class="fa fa-trash" ng-if="$index!=0" style="padding-right: 0;" title="删除" ng-click="ctl.delSubForm(item)"></i>
  56. </div>
  57. </div>
  58. <!-- <div class="sp-msg-left-lh" ng-click="ctl.getMsgData(1,0)">
  59. <div class="sp-col-10"><i class="icon-folder"></i> </div>
  60. <div class="sp-col-70">项目进展情况项目进展情况</div>
  61. <div class="sp-col-20 sp-text-right">
  62. <i class="fa fa-pencil" title="编辑" ng-click="ctl.editSubForm(1)"></i>
  63. <i class="fa fa-trash" style="padding-right: 0;" title="删除" ng-click="ctl.delSubForm(1)"></i>
  64. </div>
  65. </div> -->
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. <div class="sp-detail-right">
  71. <div class="sp-page-mgn" style="margin: 0 0.7%">
  72. <div class="sp-page-pad">
  73. <div class="sp-page" id="div_fieldPart">
  74. <div class="sp-page">
  75. <div class="sp-page-col">
  76. <div class="sp-page-title">
  77. <span>表单详情</span>
  78. <!-- <span class="sp-page-back" ng-click="ctl.btnGoBack()"><i class="icon-back"></i> 返回上一级</span>-->
  79. </div>
  80. </div>
  81. <div class="sp-page-col sp-pull-right">
  82. <span class="sp-btn-blue-outline sp-btn-radius sp-btn-sm" ng-click="ctl.addFormField()"><i class="fa fa-plus sp-mr-5"></i>新 建</span>
  83. <span class="sp-btn-blue-outline sp-btn-radius sp-btn-sm" ng-click="ctl.previewForm()"><i class="fa fa-search-plus sp-mr-5"></i>预 览</span>
  84. <span class="sp-btn-blue-outline sp-btn-radius sp-btn-sm" ng-click="ctl.reBuildForm()"><i class="icon-folder-add sp-mr-5"></i>重建表单</span>
  85. <span class="sp-btn-blue-outline sp-btn-radius sp-btn-sm" ng-click="ctl.saveAs()"><i class="icon-check-1 sp-mr-5"></i>另存为</span>
  86. <span class="sp-btn-blue-outline sp-btn-radius sp-btn-sm" ng-click="ctl.btnGoBack()"><i class="fa fa-reply"></i> 返回</span>
  87. </div>
  88. </div>
  89. <div class="sp-line-gray"></div>
  90. <div class="sp-page" id="formTablePart" style="overflow-y: auto;">
  91. <table class="sp-table">
  92. <thead>
  93. <tr>
  94. <th style="width: 60px;">序号</th>
  95. <th>列名</th>
  96. <th>中文名</th>
  97. <th>数据类型</th>
  98. <th>宽度</th>
  99. <th>小数</th>
  100. <th>编辑类型</th>
  101. <th>初始值</th>
  102. <th>必需项</th>
  103. <th>数据子表</th>
  104. <th width="100">操作</th>
  105. </tr>
  106. </thead>
  107. <tbody>
  108. <tr ng-repeat="item in ctl.formFieldData">
  109. <td ng-bind="$index+1"></td>
  110. <td ng-bind="item.CODE"></td>
  111. <td ng-bind="item.CNAME"></td>
  112. <td ng-bind="item.CKIND"></td>
  113. <td ng-bind="item.CLENGTH"></td>
  114. <td ng-bind="item.DECI"></td>
  115. <td ng-bind="item.EKIND_set"></td>
  116. <td ng-bind="item.INITVAL_set"></td>
  117. <td ng-bind="item.ISMUST"></td>
  118. <td ng-bind="item.TCHILD"></td>
  119. <td style="width:80px;">
  120. <button ng-click="ctl.editFormField(item)" class="sp-new-logo-edit" ng-disabled="item.CREKIND=='SYS'" title="编辑"></button>
  121. <button ng-click="ctl.delFormField(item.COLID)" class="sp-new-logo-delete sp-ml-10" ng-disabled="item.CREKIND=='SYS'" title="删除"></button>
  122. </td>
  123. </tr>
  124. </tbody>
  125. </table>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. <!-- 编辑基本表单 -->
  132. <div class="sp-layer" data-title="更新信息" id="layer_editBasicForm" style="width:500px;">
  133. <div class="sp-layer-body">
  134. <table class="sp-grid-job">
  135. <tbody>
  136. <tr>
  137. <td>表单分类</td>
  138. <td>
  139. <select ng-model="ctl.form.formkinds">
  140. <option ng-repeat="item in ctl.optionFormkinds" value="{{item.PKID}}" ng-bind="item.CNAME"></option>
  141. </select>
  142. </td>
  143. </tr>
  144. <tr>
  145. <td style="width:100px;">表单标识</td>
  146. <td class="sp-text-left sp-indent-5" ng-bind="ctl.form.ckey"></td>
  147. </tr>
  148. <tr>
  149. <td>表单名称</td>
  150. <td><input type="text" class="sp-input" class="sp-input" ng-model="ctl.form.cname" sp-required /></td>
  151. </tr>
  152. <tr>
  153. <td>表单类型</td>
  154. <td>
  155. <select ng-model="ctl.form.ctype">
  156. <option ng-repeat="item in ctl.formTypeAray" value="{{item.cval}}" ng-bind="item.cname"></option>
  157. </select>
  158. </td>
  159. </tr>
  160. <tr>
  161. <td>表单简称</td>
  162. <td><input type="text" class="sp-input" ng-model="ctl.form.shortname" /></td>
  163. </tr>
  164. <tr>
  165. <td>描述</td>
  166. <td><input type="text" class="sp-input" ng-model="ctl.form.explain" /></td>
  167. </tr>
  168. </tbody>
  169. </table>
  170. <div class="sp-page sp-text-center sp-mt-20">
  171. <button class="sp-btn-blue sp-btn-radius" ng-click="ctl.editBasicFormTrue()">
  172. <i class="fa fa-check sp-mr-5"></i>提 交</button>
  173. <button class="sp-btn-default sp-btn-radius" ng-click="ctl.editBasicFormCancel()">
  174. <i class="fa fa-close sp-mr-5"></i>取 消</button>
  175. </div>
  176. </div>
  177. </div>
  178. <!-- 新建、编辑子表 -->
  179. <div class="sp-layer" id="layer_addSubForm" ng-keydown="ctl.keyLogin(1)" style="width: 500px;">
  180. <div class="sp-layer-head">
  181. <div class="sp-page sp-text-center sp-font16">
  182. <span ng-bind="ctl.subForm.layertitle"></span>
  183. <div class="sp-layer-close" title="关闭" onclick="sp.closeCenter('.sp-layer')">
  184. ×
  185. </div>
  186. </div>
  187. </div>
  188. <div class="sp-layer-body">
  189. <table class="sp-grid-job">
  190. <tbody>
  191. <tr ng-if="ctl.subForm.edit">
  192. <td style="width:100px;">子表标识</td>
  193. <td class="sp-text-left sp-indent-5" ng-bind="ctl.subForm.billkey"></td>
  194. </tr>
  195. <tr>
  196. <td>子表名称</td>
  197. <td><input type="text" class="sp-input" ng-model="ctl.subForm.cname" sp-required /></td>
  198. </tr>
  199. <tr>
  200. <td>子表类型</td>
  201. <td>
  202. <select ng-model="ctl.subForm.type">
  203. <option value="NORMAL">一般表</option>
  204. <option value="FILETBL">附件表</option>
  205. <option value="CODETBL">代码表</option>
  206. <option value="TREESTAL">树状表</option>
  207. </select>
  208. </td>
  209. </tr>
  210. </tbody>
  211. </table>
  212. <div class="sp-page sp-text-center sp-mt-20">
  213. <button class="sp-btn-blue sp-btn-radius" ng-click="ctl.addSubFormTrue()">
  214. <i class="fa fa-check sp-mr-5"></i>提 交</button>
  215. <button class="sp-btn-default sp-btn-radius" ng-click="ctl.addSubFormCancel()">
  216. <i class="fa fa-close sp-mr-5"></i>取 消</button>
  217. </div>
  218. </div>
  219. </div>
  220. <!-- 新建、编辑列字段 -->
  221. <div class="sp-layer" id="layer_formField" ng-keydown="ctl.keyLogin(2)" style="width: 700px;">
  222. <div class="sp-layer-head">
  223. <div class="sp-page sp-text-center sp-font16">
  224. <span ng-bind="ctl.field.layertitle"></span>
  225. <div class="sp-layer-close" title="关闭" onclick="sp.closeCenter('.sp-layer')">
  226. ×
  227. </div>
  228. </div>
  229. </div>
  230. <div class="sp-layer-body">
  231. <table class="sp-grid-job">
  232. <tbody>
  233. <tr>
  234. <td style="width:100px;">列名</td>
  235. <td style="width: 240px;" colspan="2">
  236. <input type="text" class="sp-input" ng-model="ctl.field.code" sp-required />
  237. </td>
  238. <td style="width:100px;">中文名称</td>
  239. <td colspan="2">
  240. <input type="text" class="sp-input" ng-model="ctl.field.cname" sp-required />
  241. </td>
  242. </tr>
  243. <tr>
  244. <td>提示</td>
  245. <td colspan="5"><input type="text" class="sp-input" ng-model="ctl.field.coltips" /></td>
  246. </tr>
  247. <tr>
  248. <td>数据类型</td>
  249. <td style="width: 200px;">
  250. <select ng-model="ctl.field.ckind" ng-change="ctl.changeColumnType()">
  251. <option ng-repeat="item in ctl.columnType" value="{{item.cval}}" ng-bind="item.set_cname"></option>
  252. </select>
  253. </td>
  254. <td class="ng-hide" ng-show="ctl.field.ckind=='datetime'"></td>
  255. <td class="ng-hide" ng-show="ctl.field.ckind=='datetime'" style="width: 120px;"></td>
  256. <td class="ng-hide" ng-show="ctl.field.ckind!='datetime'">宽度</td>
  257. <td class="ng-hide" ng-show="ctl.field.ckind!='datetime'" style="width: 120px;"><input type="number" class="sp-input" ng-model="ctl.field.clength"/></td>
  258. <td class="ng-hide" ng-show="ctl.field.deci==0"></td>
  259. <td class="ng-hide" ng-show="ctl.field.deci==0" style="width: 120px;"></td>
  260. <td class="ng-hide" ng-show="ctl.field.deci!=0">小数</td>
  261. <td class="ng-hide" ng-show="ctl.field.deci!=0" style="width: 120px;"><input type="number" class="sp-input" ng-model="ctl.field.deci" /></td>
  262. </tr>
  263. <tr>
  264. <td>编辑类型</td>
  265. <td>
  266. <select ng-model="ctl.field.ekind" ng-change="ctl.changeControlType()">
  267. <option ng-repeat="item in ctl.controlType" value="{{item.cval}}" ng-bind="item.set_cname"></option>
  268. </select>
  269. </td>
  270. <td>初始值</td>
  271. <td>
  272. <select ng-model="ctl.field.initval" ng-change="ctl.changeInitValType()">
  273. <option ng-repeat="item in ctl.initValType" value="{{item.cval}}" ng-bind="item.cname"></option>
  274. </select>
  275. </td>
  276. <td>必需项</td>
  277. <td>
  278. <select ng-model="ctl.field.ismust">
  279. <option value="否">否</option>
  280. <option value="是">是</option>
  281. </select>
  282. </td>
  283. </tr>
  284. <tr>
  285. <td>显示格式</td>
  286. <td colspan="5"><input type="text" class="sp-input" ng-model="ctl.field.rowall" /></td>
  287. </tr>
  288. <tr>
  289. <td>函数设置</td>
  290. <td colspan="5">
  291. <input type="text" class="sp-input" ng-model="ctl.field.colfunc" />
  292. </td>
  293. </tr>
  294. <tr class="ng-hide" ng-show="ctl.field.ekind_select">
  295. <td colspan="6" class="sp-bg-gray">编辑类型设置</td>
  296. </tr>
  297. <tr class="ng-hide" ng-show="ctl.field.ekind_select">
  298. <td>数据子表</td>
  299. <td colspan="2">
  300. <select ng-model="ctl.field.tchild" ng-change="ctl.changeOptionEkind()">
  301. <option ng-repeat="item in ctl.optionEkind" value="{{item.BILLKEY}}" ng-bind="item.CNAME"></option>
  302. </select>
  303. </td>
  304. <td>数据列</td>
  305. <td colspan="2">
  306. <select ng-model="ctl.field.tdata">
  307. <option ng-repeat="item in ctl.optionEkindItem" value="{{item.CODE}}" ng-bind="item.CNAME"></option>
  308. </select>
  309. </td>
  310. </tr>
  311. <tr class="ng-hide" ng-show="ctl.field.ekind_select">
  312. <td>显示列</td>
  313. <td colspan="2">
  314. <select ng-model="ctl.field.tshow">
  315. <option ng-repeat="item in ctl.optionEkindItem" value="{{item.CODE}}" ng-bind="item.CNAME"></option>
  316. </select>
  317. </td>
  318. <td>子表条件</td>
  319. <td colspan="2">
  320. <input type="text" class="sp-input" ng-model="ctl.field.twhere"/>
  321. </td>
  322. </tr>
  323. <tr class="ng-hide" ng-show="ctl.field.initval_init">
  324. <td colspan="6" class="sp-bg-gray">初始值设置</td>
  325. </tr>
  326. <tr class="ng-hide" ng-show="ctl.field.initval_init">
  327. <td>来源表</td>
  328. <td colspan="2">
  329. <select ng-model="ctl.field.initable" ng-change="ctl.changeOptionInitval()">
  330. <option ng-repeat="item in ctl.optionInitval" value="{{item.BILLKEY}}" ng-bind="item.CNAME"></option>
  331. </select>
  332. </td>
  333. <td>来源列</td>
  334. <td colspan="2">
  335. <select ng-model="ctl.field.initcol">
  336. <option ng-repeat="item in ctl.optionInitvalItem" value="{{item.CODE}}" ng-bind="item.CNAME"></option>
  337. </select>
  338. </td>
  339. </tr>
  340. <tr class="ng-hide" ng-show="ctl.field.initval_init">
  341. <td>更新条件</td>
  342. <td colspan="2">
  343. <select ng-model="ctl.field.initc">
  344. <option value="0">按项目总编号更新</option>
  345. <option value="1">按申请编号更新</option>
  346. </select>
  347. </td>
  348. <td>更新模式</td>
  349. <td colspan="2">
  350. <select ng-model="ctl.field.initm">
  351. <option value="NEWITEM">最新一条</option>
  352. <option value="ALLITEM">全部记录</option>
  353. </select>
  354. </td>
  355. </tr>
  356. <tr class="ng-hide" ng-show="ctl.field.initval_auto">
  357. <td colspan="6" class="sp-bg-gray">自增编号设置</td>
  358. </tr>
  359. <tr class="ng-hide" ng-show="ctl.field.initval_auto">
  360. <td>前缀</td>
  361. <td>
  362. <select ng-model="ctl.field.codehead">
  363. <option ng-repeat="item in ctl.autoCodeHeadArray" value="{{item.cval}}" ng-bind="item.cname"></option>
  364. </select>
  365. </td>
  366. <td>中间字号</td>
  367. <td>
  368. <input type="text" class="sp-input" ng-model="ctl.field.codebody" />
  369. </td>
  370. <td>结尾</td>
  371. <td>
  372. <input type="text" class="sp-input" ng-model="ctl.field.codetail" />
  373. </td>
  374. </tr>
  375. </tbody>
  376. </table>
  377. <div class="sp-lh-18 sp-color-gray sp-mt-10 sp-indent-20">显示格式:例如 F5(小数点保留五位),yyyy-MM-dd(2012-10-03)</div>
  378. <div class="sp-lh-18 sp-color-gray sp-indent-20">函数设置:例如 onclick=openMain() | onchange=openEdit(this)</div>
  379. <div class="sp-page sp-text-center sp-mt-20">
  380. <button class="sp-btn-blue sp-btn-radius" ng-click="ctl.addFormfieldTrue()">
  381. <i class="fa fa-check sp-mr-5"></i>提 交</button>
  382. <button class="sp-btn-default sp-btn-radius" ng-click="ctl.addFormfieldCancel()">
  383. <i class="fa fa-close sp-mr-5"></i>取 消</button>
  384. </div>
  385. </div>
  386. </div>
  387. <!-- 另存为 -->
  388. <div class="sp-layer" id="layer_saveAs" data-title="表单另存为" style="width:500px;">
  389. <div class="sp-layer-body">
  390. <table class="sp-grid-job">
  391. <tbody>
  392. <tr>
  393. <td style="width:120px;">新表单分类</td>
  394. <td>
  395. <select ng-model="ctl.other.newformkinds">
  396. <option ng-repeat="item in ctl.other.optionformkinds" value="{{item.PKID}}" ng-bind="item.CNAME"></option>
  397. </select>
  398. </td>
  399. </tr>
  400. <tr>
  401. <td>新表单标识</td>
  402. <td><input type="text" class="sp-input" ng-model="ctl.other.newckye" /></td>
  403. </tr>
  404. <tr>
  405. <td>新表单名称</td>
  406. <td><input type="text" class="sp-input" ng-model="ctl.other.newformname" /></td>
  407. </tr>
  408. <tr>
  409. <td>是否包含视图</td>
  410. <td>
  411. <select ng-model="ctl.other.includeformedit">
  412. <option value="0">否</option>
  413. <option value="1">是</option>
  414. </select>
  415. </td>
  416. </tr>
  417. </tbody>
  418. </table>
  419. <div class="sp-page sp-text-center sp-mt-20">
  420. <button class="sp-btn-blue sp-btn-sm sp-btn-radius" ng-click="ctl.saveAsSubmit()">
  421. <i class="fa fa-check sp-mr-5"></i>提 交</button>
  422. <button class="sp-btn-default sp-btn-sm sp-btn-radius" onclick="sp.layerhide();">
  423. <i class="fa fa-close sp-mr-5"></i>取 消</button>
  424. </div>
  425. </div>
  426. </div>
  427. </div>
  428. <script src="../../AFrontEnd/js/jquery/jquery-2.1.4.min.js"></script>
  429. <script src="../../AFrontEnd/js/angularjs/angular.js"></script>
  430. <script src="../../AFrontEnd/js/angularjs/dirPagination.js"></script>
  431. <script src="../../apiurljs.js"></script>
  432. <script src="../../js/sm4.js"></script>
  433. <script>document.write('<scri' + 'pt src="../../AFrontEnd/js/special/special.js?time=' + new Date().getTime() + '" type="text/javascript"></s' + 'cript>');</script>
  434. <script>document.write('<scri' + 'pt src="js/formlist-add.js?time=' + new Date().getTime() + '" type="text/javascript"></s' + 'cript>');</script>
  435. <script src="../../AFrontEnd/js/special/spng.js"></script>
  436. <script src="../../AFrontEnd/js/special/spngvld.js"></script>
  437. </body>
  438. </html>