allocationViewDetail.php 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>耗材调拨申请</title>
  6. <link href="/css/ims/base.css" rel="stylesheet">
  7. <link href="/css/ims/ims.css" rel="stylesheet">
  8. <link rel="stylesheet" type="text/css" href="/css/ims/bootstrap.min.css" />
  9. <link rel="stylesheet" type="text/css" href="/css/ims/ace.min.css" />
  10. <link rel="stylesheet" type="text/css" href="/css/ims/jquery.datetimepicker.css" />
  11. <style>
  12. .ims-box {
  13. margin: 20px;
  14. }
  15. .screen {
  16. padding-left: 20px;
  17. height: 44px;
  18. line-height: 44px;
  19. background-color: #eff4fa;
  20. }
  21. .screen li {
  22. float: left;
  23. margin-right: 65px;
  24. }
  25. .bg-d9bf6e {
  26. margin-left: 5px;
  27. padding: 0 20px;
  28. color: #fff;
  29. background-color: #d9bf6e;
  30. }
  31. .list {
  32. padding: 0 40px;
  33. /*margin-top: 40px;*/
  34. overflow: hidden;
  35. }
  36. .list h2 {
  37. line-height: 30px;
  38. font-size: 14px;
  39. }
  40. .list .student-list_box {
  41. width: 500px;
  42. margin-bottom: 15px;
  43. }
  44. .list .student-list_box>ul {
  45. height: 260px;
  46. overflow: auto;
  47. padding: 20px;
  48. background-color: #eef3ff;
  49. }
  50. .list .student-list_box li {
  51. line-height: 30px;
  52. cursor: pointer;
  53. }
  54. .list .student-list {
  55. display: none;
  56. margin-left: 20px;
  57. }
  58. .list .student-list li.active .btn-select_all {
  59. display: inline-block;
  60. }
  61. .list .student-list span {
  62. cursor: pointer;
  63. }
  64. .list .btn-select_all {
  65. margin-left: 84px;
  66. color: #2977ff;
  67. }
  68. .student-name_box li {
  69. position: relative;
  70. margin-left: 28px;
  71. line-height: 30px;
  72. }
  73. .student-name_box input {
  74. position: absolute;
  75. left: 155px;
  76. top: 8px;
  77. }
  78. .btn-select_all,
  79. .student-name_box {
  80. display: none;
  81. }
  82. .student-selected {
  83. width: 320px;
  84. height: 300px;
  85. overflow: auto;
  86. }
  87. .student-selected li {
  88. float: left;
  89. margin-right: 24px;
  90. margin-bottom: 12px;
  91. width: 280px;
  92. height: 26px;
  93. line-height: 26px;
  94. text-indent: 20px;
  95. background-color: #f2f2f2;
  96. }
  97. .student-selected .btn-delete {
  98. float: right;
  99. margin-right: 20px;
  100. color: red;
  101. cursor: pointer;
  102. }
  103. .btn-confirm_purchase {
  104. display: block;
  105. margin: 0 auto;
  106. margin-top: 100px;
  107. margin-bottom: 50px;
  108. width: 430px;
  109. line-height: 54px;
  110. color: #fff;
  111. font-family: PingFangSC-Regular, "PingFang SC";
  112. font-weight: 400;
  113. font-style: normal;
  114. font-size: 20px;
  115. text-align: center;
  116. background-color: #2977ff;
  117. cursor: pointer;
  118. }
  119. .sale-table input {
  120. border: 1px solid #ccc;
  121. border-radius: 4px;
  122. }
  123. #imgPreview {
  124. display: inline-block;
  125. margin-top: 12px;
  126. }
  127. #imgPreview > img {
  128. max-width: 100px;
  129. max-height: 100px;
  130. margin-right: 5px;
  131. }
  132. .layui-layer-btn .layui-layer-btn0 {
  133. border-color: #2977ff !important;
  134. background-color: #2977ff !important;
  135. color: #fff;
  136. }
  137. .stop-layer-box, .resubmit-layer-box, .delete-layer-box {
  138. line-height: 140px;
  139. text-align: center;
  140. }
  141. .disable-btn{
  142. background-color: #666666;
  143. border: 1px solid #666666!important;
  144. }
  145. </style>
  146. </head>
  147. <body>
  148. <h3 class="sale-title">耗材调拨申请</h3>
  149. <input type="hidden" name="itemName">
  150. <input type="hidden" name="itemSpec">
  151. <input type="hidden" name="itemCode">
  152. <input type="hidden" name="unitId">
  153. <div class="sale-table">
  154. <table width="100%">
  155. <tr>
  156. <th><em class="red">*</em>调拨单标题</th>
  157. <td colspan="3">
  158. <?php echo $title?>
  159. </td>
  160. </tr>
  161. <tr>
  162. <th><em class="red">*</em>申请发货仓库</th>
  163. <td >
  164. <?php echo $deliverName;?>
  165. </td>
  166. <th><em class="red">*</em>发货仓库管理员</th>
  167. <td >
  168. <?php echo $consignorName;?>
  169. </td>
  170. </tr>
  171. <tr>
  172. <th><em class="red">*</em>接收仓库</th>
  173. <td >
  174. <?php echo $receiveName?>
  175. </td>
  176. <th><em class="red">*</em>申请接收时间</th>
  177. <td >
  178. <input type="text" readonly class="" value="<?php echo $receiveDate;?>"/>
  179. </td>
  180. </tr>
  181. <tr>
  182. <th><em class="red">*</em>收货人</th>
  183. <td >
  184. <input type="text" id="receiveUser" readonly name="receiveUser" class="diy_select_input" value="<?php echo $receiveUser;?>">
  185. </td>
  186. <th><em class="red">*</em>收货电话</th>
  187. <td >
  188. <input type="text" readonly id="telephone" name="telephone" class="diy_select_input" value="<?php echo $telephone;?>">
  189. </td>
  190. </tr>
  191. <tr>
  192. <th><em class="red">*</em>详细地址</th>
  193. <td colspan="3">
  194. <input type="text" readonly id="address" name="address" class="use-explain" value="<?php echo $address;?>">
  195. </td>
  196. </tr>
  197. <tr>
  198. <th><em class="red">*</em>发货凭证</th>
  199. <td colspan="3">
  200. <div id="imgPreview">
  201. <?php foreach($images as $val):?>
  202. <img src="<?php echo $val;?>">
  203. <?php endforeach;?>
  204. </div>
  205. </td>
  206. </tr>
  207. <tr>
  208. <th>备注</th>
  209. <td colspan="3">
  210. <textarea name="remark" readonly cols="50" class="use-explain" rows="5"><?php echo $remark;?></textarea>
  211. </td>
  212. </tr>
  213. </table>
  214. <button type="button" class="label-primary-s create-allocation disable-btn">添加品目</button>
  215. <table width="100%" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable" id="P_list">
  216. <tr>
  217. <td>品目名称</td>
  218. <td>品目类型</td>
  219. <td>品目数量</td>
  220. <td>库存数</td>
  221. <td>单位</td>
  222. <td>操作</td>
  223. </tr>
  224. <?php
  225. if(isset($allocateDetail) && $allocateDetail){
  226. foreach($allocateDetail as $val){
  227. ?>
  228. <tr class="allocateDetail" id="<?php echo $val['itemId']?>">
  229. <td><?php echo $val['itemName']?></td>
  230. <td><?php echo $val['typeName']?></td>
  231. <td><input readonly type="text" name="num" class="num" value="<?php echo $val['applyNo']?>"></td>
  232. <td><?php echo $val['invNo']?></td>
  233. <td><?php echo $val['unitName']?></td>
  234. <td></td>
  235. </tr>
  236. <?php
  237. }
  238. }
  239. ?>
  240. </table>
  241. <button type="button" class="label-primary-s bth-s create-part disable-btn">添加零件类型</button>
  242. <table width="100%" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable" id="P_list">
  243. <tr>
  244. <td>零件类型</td>
  245. <td>使用设备编号</td>
  246. <td>设备名称</td>
  247. <td>设备规格</td>
  248. <td>申请数量</td>
  249. <td>操作</td>
  250. </tr>
  251. <?php
  252. if(isset($partDetail) && $partDetail){
  253. foreach($partDetail as $val){
  254. ?>
  255. <tr>
  256. <td><?php echo $val['partName']?></td>
  257. <td><?php echo $val['fixedCode']?></td>
  258. <td><?php echo $val['itemName']?></td>
  259. <td><?php echo $val['itemSpec']?></td>
  260. <td><?php echo $val['applyNo']?></td>
  261. <td></td>
  262. </tr>
  263. <?php
  264. }
  265. }
  266. ?>
  267. </table>
  268. <button type="button" class="label-primary-s bth-s create-part disable-btn">问调表</button>
  269. <table width="100%" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable" id="P_list">
  270. <tr>
  271. <td>品目名称</td>
  272. <td>问调表</td>
  273. </tr>
  274. <?php
  275. if(isset($survey) && $survey){
  276. foreach($survey as $val){
  277. ?>
  278. <tr id="<?php echo $val['id']?>" fixedCode="<?php echo $val['fixedCode']?>" appearanceFineness="<?php echo $val['appearanceFineness']?>" printingEffect="<?php echo $val['printingEffect']?>" scanPaperJam="<?php echo $val['scanPaperJam']?>" printPaperJam="<?php echo $val['printPaperJam']?>" isSettlement="<?php echo $val['isSettlement']?>">
  279. <td><?php echo $val['fixedCode']?></td>
  280. <td>
  281. <a class="viewSurvey" editable="0">查看</a>
  282. <?php if($val['isSettlement']==0):?>
  283. <a class="viewSurvey" editable="1">编辑</a>
  284. <?php endif;?>
  285. </td>
  286. </tr>
  287. <?php
  288. }
  289. }
  290. ?>
  291. </table>
  292. </div>
  293. <div class="sale-submit" style="margin-top: 25px;">
  294. <input type="hidden" name="atCode" value='<?php echo $atCode?>'>
  295. <input type="hidden" name="atId" value='<?php echo $atId?>'>
  296. <button type="button" class=" label-primary-s bth-s" id="savebutton" onclick="window.history.go(-1);">返回</button>
  297. <button type="button" class=" label-primary-s bth-s" id="viewLog" >日志</button>
  298. </div>
  299. <!-- 编辑名单弹层 -->
  300. <div class="layer-edit">
  301. <p class="red"></p>
  302. <div class="list">
  303. <div class="student-list_box fl">
  304. <span>品目类型</span>
  305. <select name="pm_type" class="pm_type">
  306. <option value="0">选择类型</option>
  307. <?php
  308. if(isset($pm_type) && $pm_type){
  309. foreach ($pm_type as $val){
  310. echo '<option value="'.$val['typeId'].'">'.$val['typeName'].'</option>';
  311. }
  312. }
  313. ?>
  314. </select>
  315. <span>品目名称</span>
  316. <input type="text" name="pm_name" value="">
  317. <button class="search_pm">查询</button>
  318. </div>
  319. <table class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
  320. <tr>
  321. <td></td>
  322. <td>品目编号</td>
  323. <td>品目名称</td>
  324. <td>品目类型</td>
  325. <td>库存数</td>
  326. </tr>
  327. <tbody class="item_list">
  328. </tbody>
  329. </table>
  330. <div class="fr">
  331. <a href="#" class="prev">上一页</a>
  332. <span class="now_page">1</span>/<span class="last_page">1</span>
  333. <a href="#" class="next">下一页</a>
  334. </div>
  335. </div>
  336. </div>
  337. <!--日志弹层-->
  338. <link rel="stylesheet" href="/css/cylet.css" />
  339. <style>
  340. .class-modal-body-1{overflow: auto;height:400px;}
  341. .class-modal-body-1 td{font-size:14px;line-height:200%;}
  342. </style>
  343. <div class="confirmbox-mask" style="display: none" id="classModal">
  344. <div class="class-modal">
  345. </div>
  346. </div>
  347. <div class="confirmbox-mask" style="display: none" id="classModal-1">
  348. <form name="table_set">
  349. <div class="class-modal-1">
  350. <i class="icon icon-close-1"></i><div class="class-modal-head-1">日志</div>
  351. <div class="class-modal-body-1">
  352. <table>
  353. <?php
  354. if($logList){
  355. foreach ($logList as $val){
  356. echo '<tr>';
  357. echo '<td><img src="/images/right_head.png"></td>';
  358. echo '<td width="40%">'.$val['createTime'].'</td>';
  359. echo '<td width="50%">【'.$val['userName'].'】'.$val['info'].'</td>';
  360. echo '</tr>';
  361. }
  362. }
  363. ?>
  364. </table>
  365. </div>
  366. </div>
  367. </form>
  368. </div>
  369. <!--30天问调表-->
  370. <div id="survey-form">
  371. <h3>XXX30天问调表</h3>
  372. <form action="" method="post" name="survey-form" id="survey">
  373. <p><span class="red">*</span>1.外观成色</p>
  374. <label><input type="radio" name="appearanceFineness" value="25">良好 </label>
  375. <label> <input type="radio" name="appearanceFineness" value="20">一般</label>
  376. <p><span class="red">*</span>2.打印效果</p>
  377. <label> <input type="radio" name="printingEffect" value="25">良好</label>
  378. <label> <input type="radio" name="printingEffect" value="20">一般</label>
  379. <p><span class="red">*</span>3.扫描卡纸</p>
  380. <label> <input type="radio" name="scanPaperJam" value="25">良好:500张左右卡一张</label>
  381. <label><input type="radio" name="scanPaperJam" value="20">一般:300张左右卡一张</label>
  382. <label><input type="radio" name="scanPaperJam" value="15">较差:100张左右卡一张</label>
  383. <p><span class="red">*</span>4.打印卡纸</p>
  384. <label><input type="radio" name="printPaperJam" value="25">良好:500张左右卡一张</label>
  385. <label><input type="radio" name="printPaperJam" value="20">一般:300张左右卡一张</label>
  386. <label><input type="radio" name="printPaperJam" value="15">较差:100张左右卡一张</label>
  387. </form>
  388. </div>
  389. </body>
  390. <script>
  391. $('.icon-close-1').click(function(){
  392. $('#classModal-1').hide();
  393. });
  394. $('#viewLog').click(function(){
  395. $('#classModal-1').show();
  396. });
  397. $(function(){
  398. var surveyBtn=true;
  399. $('.viewSurvey').click(function(){
  400. objTr=$(this).closest('tr');
  401. var fixedCode=objTr.attr('fixedCode'),
  402. id=objTr.attr('id'),
  403. appearanceFineness=objTr.attr('appearanceFineness'),
  404. printingEffect=objTr.attr('printingEffect'),
  405. scanPaperJam=objTr.attr('scanPaperJam'),
  406. printPaperJam=objTr.attr('printPaperJam'),
  407. isSettlement=objTr.attr('isSettlement');
  408. editable=$(this).attr('editable');
  409. document.getElementById('survey').reset();
  410. $('#survey-form').find('h3').html(fixedCode+'设备30天问调表');
  411. $('input[name=appearanceFineness][value='+appearanceFineness+']').prop('checked',true);
  412. $('input[name=printingEffect][value='+printingEffect+']').prop('checked',true);
  413. $('input[name=scanPaperJam][value='+scanPaperJam+']').prop('checked',true);
  414. $('input[name=printPaperJam][value='+printPaperJam+']').prop('checked',true);
  415. if(editable==0){
  416. $('#survey-form').find('input').attr('disabled',true);
  417. layer.open({
  418. type: 1,
  419. title: fixedCode+'设备30天问调表',
  420. btn: [ '关闭'],
  421. area: ['800px', '680px'], //宽高
  422. btnAlign: 'c',
  423. content: $('#survey-form'),
  424. yes: function (index, layero) {
  425. layer.closeAll();
  426. }
  427. });
  428. }else{
  429. $('#survey-form').find('input').attr('disabled',false);
  430. layer.open({
  431. type: 1,
  432. title: fixedCode+'设备30天问调表',
  433. btn: [ '提交'],
  434. area: ['800px', '680px'], //宽高
  435. btnAlign: 'c',
  436. content: $('#survey-form'),
  437. yes: function (index, layero) {
  438. if(!surveyBtn){
  439. return false;
  440. }
  441. appearanceFineness=$('input[name=appearanceFineness]:checked').val();
  442. printingEffect=$('input[name=printingEffect]:checked').val();
  443. scanPaperJam=$('input[name=scanPaperJam]:checked').val();
  444. printPaperJam=$('input[name=printPaperJam]:checked').val();
  445. if(appearanceFineness==undefined){
  446. layer.msg('请选择外观成色');
  447. return false;
  448. }
  449. if(printingEffect==undefined){
  450. layer.msg('请选择打印效果');
  451. return false;
  452. }
  453. if(scanPaperJam==undefined){
  454. layer.msg('请选择扫描卡纸');
  455. return false;
  456. }
  457. if(printPaperJam==undefined){
  458. layer.msg('请选择打印卡纸');
  459. return false;
  460. }
  461. surveyBtn=false;
  462. $.ajax({
  463. type: 'post',
  464. url: "<?php echo Yii::app()->createUrl('imsSale/editExperience');?>",
  465. data: {"appearanceFineness":appearanceFineness,"printingEffect":printingEffect,"scanPaperJam":scanPaperJam,"printPaperJam":printPaperJam,"id":id},
  466. dataType: 'json',
  467. success:function(res){
  468. surveyBtn=true;
  469. if(res.status==1){
  470. layer.msg('提交成功',{
  471. icon: 1
  472. }, function(){
  473. layer.closeAll();
  474. });
  475. }else{
  476. if(res.msg!=undefined){
  477. layer.msg(res.msg)
  478. }else{
  479. layer.msg('提交失败')
  480. }
  481. }
  482. }
  483. });
  484. }
  485. });
  486. }
  487. });
  488. })
  489. </script>
  490. </html>