Whlabelstockup.php 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620
  1. <?php defined('BASEPATH') OR exit('No direct script access allowed');
  2. class whlabelstockup extends Start_Controller {
  3. public function __construct(){
  4. parent::__construct();
  5. $this->load->library('session');
  6. $this->load->_model('Model_whlabel_stockup','whlabel_stockup');
  7. $this->load->_model('Model_whlabel','whlabel');
  8. $this->load->_model('Model_whlabeltransport','whlabeltransport');
  9. $this->load->_model('Model_classid','classid');
  10. $this->load->_model('Model_whlabel_qh','whlabel_qh');
  11. $this->load->_model('Model_typeclass','typeclass');
  12. $this->load->_model('Model_whlabel_type','whlabel_type');
  13. $this->load->_model('Model_whlabel_bh','whlabel_bh');
  14. $this->load->_model('Model_shop','shop');
  15. $this->load->_model('Model_purchase','purchase');
  16. $this->load->_model('Model_apiyy','apiyy');
  17. $this->load->_model('Model_excel','excel');
  18. $this->load->_model('Model_whlabel_bh_transfer','whlabel_bh_transfer');
  19. }
  20. //定义方法的调用规则 获取URI第二段值
  21. public function _remap($arg,$arg_array)
  22. {
  23. if($arg == 'count')
  24. {
  25. $this->_count();
  26. }
  27. else if($arg == 'xd')
  28. {
  29. $this->_xd($arg_array);
  30. }
  31. else if($arg == 'excel')
  32. {
  33. $this->_excel();
  34. }
  35. else
  36. {
  37. $this->_index();
  38. }
  39. }
  40. //管理
  41. public function _index()
  42. {
  43. $wt = array();
  44. $whlabel_type = $this->whlabel_type->find_all();
  45. foreach ($whlabel_type as $v)
  46. {
  47. $wt[$v['id']] = $v['title'];
  48. }
  49. $post = $this->input->post(NULL, TRUE);
  50. if(isset($post['page']))
  51. {
  52. $page = $this->input->post('page',true);
  53. $perpage = $this->input->post('perpage',true);
  54. $sku = $this->input->post('sku',true);
  55. $jm = $this->input->post('jm',true);
  56. $text = $this->input->post('text',true);
  57. $type = $this->input->post('type',true);
  58. $repair = $this->input->post('repair',true);
  59. $stockup = $this->input->post('stockup',true);
  60. $outbound = $this->input->post('outbound',true);
  61. $lacecolor = $this->input->post('lacecolor',true);
  62. $category = $this->input->post('category',true);
  63. $size = $this->input->post('size',true);
  64. $grade = $this->input->post('grade',true);
  65. $color = $this->input->post('color',true);
  66. $lowe = $this->input->post('lowe',true);
  67. $lacetype = $this->input->post('lacetype',true);
  68. $haircap = $this->input->post('haircap',true);
  69. $density = $this->input->post('density',true);
  70. $where = "1=1";
  71. if($lacecolor)
  72. {
  73. $where .= " and features like '%-$lacecolor-%'";
  74. }
  75. if($lacetype)
  76. {
  77. $where .= " and features like '%-$lacetype-%'";
  78. }
  79. if($category)
  80. {
  81. $where .= " and features like '%-$category-%'";
  82. }
  83. if($size)
  84. {
  85. $where .= " and features like '%-$size-%'";
  86. }
  87. if($grade)
  88. {
  89. $where .= " and features like '%-$grade-%'";
  90. }
  91. if($color)
  92. {
  93. $where .= " and features like '%-$color-%'";
  94. }
  95. if($lowe)
  96. {
  97. $where .= " and features like '%-$lowe-%'";
  98. }
  99. if($haircap)
  100. {
  101. $where .= " and features like '%-$haircap-%'";
  102. }
  103. if($density)
  104. {
  105. $where .= " and features like '%-$density-%'";
  106. }
  107. if($sku)
  108. {
  109. $where .= " and sku like '%$sku%'";
  110. }
  111. if($jm)
  112. {
  113. $where .= " and jm = '$jm'";
  114. }
  115. if($text)
  116. {
  117. $where .= " and text = '$text'";
  118. }
  119. if($type)
  120. {
  121. $where .= " and type = '$type'";
  122. }
  123. if($repair != '')
  124. {
  125. $where .= " and repair = '$repair'";
  126. }
  127. if($stockup != '')
  128. {
  129. $where .= " and stockup = '$stockup'";
  130. }
  131. if($outbound != '')
  132. {
  133. $where .= " and outbound = '$outbound'";
  134. }
  135. //数据排序
  136. $order_str = "repair desc";//备货预警从大到小
  137. if(empty($page))
  138. {
  139. $start = 0;
  140. $perpage = 1;
  141. }
  142. else
  143. {
  144. $start = ($page - 1)*$perpage;
  145. }
  146. //取得信息列表
  147. $info_list = $this->whlabel_stockup->find_all($where,'id,sku,jm,us,uszt,cs,xc,type,st,seven,thirty,availableday,lackday,zd,repair,stockup,outbound,bhnum',$order_str,$start,$perpage);
  148. foreach ($info_list as $key=>$value)
  149. {
  150. $data = $this->whlabel_stockup->read($value['id']);
  151. $bh = $this->whlabel_bh->find_all("sku = '".$data['bhsku']."' and features = '".$data['features']."' and time > '".(time()-7*24*3600)."'");
  152. $info_list[$key]['sku'] = '<p>'.$value['sku'].'</p>';
  153. foreach ($bh as $v)
  154. {
  155. $printnum = $this->whlabel_bh_transfer->get_number($v['number']);
  156. if(isset($printnum['ctime11']) && $printnum['ctime11'] > 0)
  157. {
  158. continue;
  159. }
  160. $info_list[$key]['sku'] .= '<p style="color: #2084db;">'.date('Y-m-d',$v['time']).' 备货数量:'.$v['bhnum'].' 未入库</p>';
  161. }
  162. if($value['repair'] == 0)
  163. {
  164. $info_list[$key]['repair'] = '/';
  165. }
  166. else
  167. {
  168. $info_list[$key]['repair'] = '补货';
  169. }
  170. if($value['stockup'] == 0)
  171. {
  172. $info_list[$key]['stockup'] = '/';
  173. }
  174. else
  175. {
  176. $info_list[$key]['stockup'] = '备货';
  177. }
  178. if($value['outbound'] == 0)
  179. {
  180. $info_list[$key]['outbound'] = '正常';
  181. }
  182. else
  183. {
  184. $info_list[$key]['outbound'] = '异常';
  185. }
  186. if(isset($wt[$value['type']]))
  187. {
  188. $info_list[$key]['type'] = $wt[$value['type']];
  189. }
  190. else
  191. {
  192. $info_list[$key]['type'] = '未设置';
  193. }
  194. $info_list[$key]['cs'] = $value['us']+$value['uszt'];
  195. $info_list[$key]['bhnum'] = '<p><input value="'.$value['bhnum'].'" name="xd" type="text" style="width:80%;margin:0 10%;padding:5px 0;border: 1px #ccc solid;font-size: 13px;text-align: center;color: #333;border-radius: 5px;"></p><p><b id="xf'.$key.'" class="xd">下单</b></p>';
  196. }
  197. $total = $this->whlabel_stockup->find_count($where);
  198. $pagenum = ceil($total/$perpage);
  199. $over = $total-($start+$perpage);
  200. $rows = array('total'=>$total,'over'=>$over,'pagenum'=>$pagenum,'rows'=>($info_list));
  201. echo json_encode($rows);exit;
  202. }
  203. $this->_Template('whlabelstockup',$this->data);
  204. }
  205. public function _count()
  206. {
  207. $c = array();
  208. $time = time();
  209. $typeclass = array();
  210. $tc = $this->typeclass->find_all();
  211. foreach ($tc as $v)
  212. {
  213. $typeclass[$v['id']] = $v;
  214. }
  215. $classid = $this->classid->sku();
  216. $info_list = $this->whlabel->find_pc('warehouse=5','sku,purchase,features','*','id asc');
  217. $this->db->truncate('whlabel_stockup');
  218. $this->db->trans_begin();
  219. $asd = 0;
  220. foreach ($info_list as $key=>$value)
  221. {
  222. $features = str_replace(array('-163-','-164-','-165-','-166-'),'-',$value['features']);
  223. $features = explode('-',trim($features,'-'));
  224. $pm = $classid;
  225. $jm = $classid;
  226. $bhsku = array();
  227. $bmpx = array(13=>'',16=>'',18=>'',25=>'',26=>'',41=>'');
  228. foreach($features as $k=>$v)
  229. {
  230. if(isset($typeclass[$v]) && isset($bmpx[$typeclass[$v]['classid']]))
  231. {
  232. if($typeclass[$v]['bm'] != '')
  233. {
  234. $bmpx[$typeclass[$v]['classid']] = $typeclass[$v]['bm'];
  235. }
  236. }
  237. if($v != 0)
  238. {
  239. if($k != 'size')
  240. {
  241. $title .= $typeclass[$v]['title']." ";
  242. }
  243. $bhsku[$typeclass[$v]['classid']] = $typeclass[$v]['bqsku'];
  244. if(!isset($typeclass[$v]))
  245. {
  246. continue;
  247. }
  248. if(isset($pm[$typeclass[$v]['classid']]))
  249. {
  250. if(stripos($typeclass[$v]['zh'],'|') !== false)
  251. {
  252. $tz = explode('|',$typeclass[$v]['zh']);
  253. $pm[$typeclass[$v]['classid']] = $tz[0];
  254. }
  255. else
  256. {
  257. $pm[$typeclass[$v]['classid']] = $typeclass[$v]['zh'];
  258. }
  259. }
  260. if(isset($jm[$typeclass[$v]['classid']]))
  261. {
  262. $jm[$typeclass[$v]['classid']] = $typeclass[$v]['jm'];
  263. }
  264. }
  265. }
  266. $jm = array_filter($jm);
  267. $zh = implode(" ",$pm);
  268. $zh = str_replace('自然色 ','',trim($zh,' '));
  269. $zh = str_replace(array(' ',' ',' ',' ',' ',' ',' '),' ',$zh);
  270. $zh = preg_replace("/\r\n|\r|\n/",'',$zh);//中文
  271. $bhsku = array_filter($bhsku);//去除空值
  272. $post['bhsku'] = implode("-",$bhsku);
  273. $post['bm'] = '03'.implode("",$bmpx);
  274. $post['features'] = $value['features'];
  275. $post['title'] = $value['title'];
  276. $post['sku'] = $value['sku'];
  277. $post['jm'] = implode("-",$jm);//简码
  278. $post['zh'] = $zh;
  279. $post['us'] = $this->whlabel->find_count('state = 0 and warehouse = 5 and sku = "'.$value['sku'].'" and features = "'.$value['features'].'"');//美仓库存
  280. $post['xc'] = $this->whlabel->find_count('state = 0 and warehouse = 13 and features = "'.$value['features'].'"');//许昌库存
  281. $qh = $this->whlabel_qh->get_data($value['features'],date('Ym',$time));
  282. if(isset($qh['num']))
  283. {
  284. if($post['us']+$post['xc'] < 1 && $qh['gxtime'] < date('Ymd',$time))
  285. {
  286. $this->whlabel_qh->save(array("num"=>$qh['num']+1,"gxtime"=>date('Ymd',$time)),$qh['id']);
  287. $qh['num'] += 1;
  288. }
  289. }
  290. else
  291. {
  292. $this->whlabel_qh->insert(array("sku"=>$value['sku'],"features"=>$value['features'],"num"=>0,"gtime"=>date('Ym',$time),"gxtime"=>date('Ymd',$time)));
  293. $qh['num'] = 0;
  294. }
  295. $zt = $this->whlabeltransport->find_all('sku = "'.$value['sku'].'" and warehouse = 5 and features = "'.$value['features'].'" and cz = "0"');
  296. $post['uszt'] = array_sum(array_column($zt,'num'));//在途库存
  297. $post['type'] = $value['type'];//等级类型
  298. //$post['text'] = $value['text'];//备注
  299. $post['seven'] = $this->whlabel->find_count('sku = "'.$value['sku'].'" and features = "'.$value['features'].'" and outk > "'.($time-7*24*3600).'" and outk < "'.$time.'"');//7天出库
  300. $post['st'] = $this->whlabel->find_count('sku = "'.$value['sku'].'" and features = "'.$value['features'].'" and outk > "'.($time-14*24*3600).'" and outk < "'.($time-7*24*3600).'"');//前7天出库
  301. $post['thirty'] = $this->whlabel->find_count('sku = "'.$value['sku'].'" and features = "'.$value['features'].'" and outk > "'.($time-30*24*3600).'" and outk < "'.$time.'"');//30天出库
  302. $post['zd'] = $this->whlabel->find_count('sku = "'.$value['sku'].'" and state = 0 and zd != "" and features = "'.$value['features'].'"');//占单数量
  303. if($post['thirty'] > 0 && 30-$qh['num'] > 0)
  304. {
  305. $post['availableday'] = sprintf("%01.1f",($post['uszt']+$post['us']-$post['zd'])/($post['thirty']/(30-$qh['num'])));//预计可用天数
  306. }
  307. else
  308. {
  309. $post['availableday'] = sprintf("%01.1f",($post['uszt']-$post['zd']));
  310. }
  311. $post['lackday'] = $qh['num'];//本月缺货天数
  312. $post['repair'] = '0';//是否需要补货
  313. if($value['type'] > 0 && $value['type'] < 5 && $post['availableday'] < 40)
  314. {
  315. $post['repair'] = '1';//补货
  316. }
  317. $post['stockup'] = '0';
  318. if(($post['uszt']+$post['xc']) < $post['thirty'])
  319. {
  320. $post['stockup'] = '1';//备货
  321. }
  322. $post['outbound'] = '0';//正常
  323. if($post['seven'] > 0)
  324. {
  325. if($post['seven'] >= $post['seven']*2)
  326. {
  327. $post['outbound'] = '1';//异常
  328. }
  329. }
  330. $bhnum = $post['thirty']/30*40-($post['uszt']+$post['us']-$post['zd']);// 30天出库/30天*40天-(在途+美仓-占单)
  331. if($bhnum > 0)
  332. {
  333. $post['bhnum'] = $bhnum;
  334. }
  335. else
  336. {
  337. $post['bhnum'] = 0;
  338. }
  339. $asd++;
  340. $this->whlabel_stockup->insert($post);
  341. }
  342. if ($this->db->trans_status() === FALSE)
  343. {
  344. $this->db->trans_rollback();
  345. }
  346. else
  347. {
  348. $this->db->trans_commit();
  349. }
  350. echo $asd;
  351. }
  352. public function _xd($arg_array)
  353. {
  354. $tc = $this->typeclass->find_all();
  355. $typeclass = array();
  356. foreach ($tc as $v)
  357. {
  358. $tcjm[$v['id']] = array($v['jm'],$v['classid']);
  359. $typeclass[$v['id']] = array('zh'=>$v['zh'],'classid'=>$v['classid'],'bm'=>$v['bm'],'title'=>$v['title'],'jm'=>$v['jm'],'bqsku'=>$v['bqsku']);
  360. }
  361. $post = $this->input->post(NULL, TRUE);
  362. if(isset($post['bhid']))
  363. {
  364. $id = $this->input->post('bhid',true);
  365. $data = $this->whlabel_stockup->read($id);
  366. $jm = $data['jm'];
  367. $sku = $data['bhsku'];
  368. $pm = $data['zh'];
  369. $title = $data['title'];
  370. $post['bm'] = $data['bm'];
  371. $post['features'] = $data['features'];
  372. $post['num'] = $this->input->post('num',true);
  373. $ztime = $this->input->post('ztime',true);
  374. $post['ztime'] = strtotime($ztime);
  375. $post['jm'] = $jm;
  376. $post['sku'] = $sku;
  377. $post['pm'] = $pm;
  378. $post['title'] = $title;
  379. if($ztime)
  380. {
  381. $post['ztime'] = strtotime($ztime);
  382. }
  383. $time = time();
  384. $post['time'] = $time;//操作时间
  385. $post['printnum'] = $time;
  386. $post['type'] = 0;
  387. $post['number'] = date('YmdHis',time()).rand(100,999);
  388. //传输料号开始
  389. $lc = 0;
  390. $lh = $this->apiyy->get_cjlp(array('jm'=>$post['jm'],'title'=>$post['title'],'zh'=>$post['pm'],'bm'=>$post['bm']));
  391. if(isset($lh['Data'][0]))
  392. {
  393. if($lh['Data'][0]['m_isSucess'] != 1)
  394. {
  395. if($lh['Data'][0]['m_errorMsg'] != '料号 已存在,请重新输入!')
  396. {
  397. echo json_encode(array('msg'=>$lh['Data'][0]['m_errorMsg'],'bm'=>$post['bm'],'jm'=>$post['jm'],'success'=>false));exit;
  398. }
  399. }
  400. }
  401. else
  402. {
  403. echo json_encode(array('msg'=>'料号错误','cs'=>json_encode($lh),'success'=>false));exit;
  404. }
  405. if($this->whlabel_bh->insert($post))
  406. {
  407. echo json_encode(array('msg'=>'添加成功','success'=>true));exit;
  408. }
  409. else
  410. {
  411. echo json_encode(array('msg'=>'添加失败,请重试','success'=>false));exit;
  412. }
  413. }
  414. $w = $this->shop->find_all("yyid != ''");
  415. $this->data['yyck'] = $w;
  416. $whlabelstockup = $this->whlabel_stockup->read($arg_array[0]);
  417. $this->data['whlabelstockup'] = $whlabelstockup ;
  418. $this->data['num'] = $arg_array[1];
  419. $purchase = $this->purchase->find_all("yyid != ''");
  420. $this->data['purchase'] = $purchase;
  421. $this->_Template('whlabelstockup_xd',$this->data);
  422. }
  423. public function _excel()
  424. {
  425. $user = $this->user->get_api($_SESSION['api']);
  426. if($user)
  427. {
  428. $fgshop = "";$sid = "";
  429. $user = explode('|',trim($user['shop'],'|'));
  430. foreach ($user as $value)
  431. {
  432. $fgshop .= " shop = ".$value." or";
  433. $sid .= " id = ".$value." or";
  434. }
  435. }
  436. $post = $this->input->get(NULL, TRUE);
  437. if(isset($post['a']))
  438. {
  439. $sku = $this->input->get('sku',true);
  440. $jm = $this->input->get('jm',true);
  441. $text = $this->input->get('text',true);
  442. $type = $this->input->get('type',true);
  443. $repair = $this->input->get('repair',true);
  444. $stockup = $this->input->get('stockup',true);
  445. $outbound = $this->input->get('outbound',true);
  446. $lacecolor = $this->input->get('lacecolor',true);
  447. $category = $this->input->get('category',true);
  448. $size = $this->input->get('size',true);
  449. $grade = $this->input->get('grade',true);
  450. $color = $this->input->get('color',true);
  451. $lowe = $this->input->get('lowe',true);
  452. $lacetype = $this->input->get('lacetype',true);
  453. $haircap = $this->input->get('haircap',true);
  454. $density = $this->input->get('density',true);
  455. $where = "1=1";
  456. if($lacecolor)
  457. {
  458. $where .= " and features like '%-$lacecolor-%'";
  459. }
  460. if($lacetype)
  461. {
  462. $where .= " and features like '%-$lacetype-%'";
  463. }
  464. if($category)
  465. {
  466. $where .= " and features like '%-$category-%'";
  467. }
  468. if($size)
  469. {
  470. $where .= " and features like '%-$size-%'";
  471. }
  472. if($grade)
  473. {
  474. $where .= " and features like '%-$grade-%'";
  475. }
  476. if($color)
  477. {
  478. $where .= " and features like '%-$color-%'";
  479. }
  480. if($lowe)
  481. {
  482. $where .= " and features like '%-$lowe-%'";
  483. }
  484. if($haircap)
  485. {
  486. $where .= " and features like '%-$haircap-%'";
  487. }
  488. if($density)
  489. {
  490. $where .= " and features like '%-$density-%'";
  491. }
  492. if($sku)
  493. {
  494. $where .= " and sku = '$sku'";
  495. }
  496. if($jm)
  497. {
  498. $where .= " and jm = '$jm'";
  499. }
  500. if($text)
  501. {
  502. $where .= " and text = '$text'";
  503. }
  504. if($type)
  505. {
  506. $where .= " and type = '$type'";
  507. }
  508. if($repair != '')
  509. {
  510. $where .= " and repair = '$repair'";
  511. }
  512. if($stockup != '')
  513. {
  514. $where .= " and stockup = '$stockup'";
  515. }
  516. if($outbound != '')
  517. {
  518. $where .= " and outbound = '$outbound'";
  519. }
  520. //数据排序
  521. $order_str = "repair desc";//备货预警从大到小
  522. $dowid = $this->input->get('a');
  523. $wid = "";
  524. if($dowid != "")
  525. {
  526. $id_arr = explode(',',rtrim($dowid,','));
  527. $wid .= " id = 0 or";
  528. foreach ($id_arr as $v)
  529. {
  530. $wid .= " id = '$v' or";
  531. }
  532. $wid = " and (".rtrim($wid,'or').")";
  533. }
  534. $info_list = $this->whlabel_stockup->find_all($where.$wid,'id,sku,jm,us,uszt,cs,xc,type,st,seven,thirty,availableday,lackday,zd,repair,stockup,outbound,bhnum',$order_str);
  535. foreach ($info_list as $key=>$value)
  536. {
  537. $data = $this->whlabel_stockup->read($value['id']);
  538. $bh = $this->whlabel_bh->find_all("sku = '".$data['bhsku']."' and features = '".$data['features']."' and time > '".(time()-7*24*3600)."'");
  539. $info_list[$key]['sku'] = '<p>'.$value['sku'].'</p>';
  540. foreach ($bh as $v)
  541. {
  542. $info_list[$key]['sku'] .= '<p style="color: #2084db;">'.date('Y-m-d',$v['time']).' 备货数量:'.$v['bhnum'].'</p>';
  543. }
  544. if($value['repair'] == 0)
  545. {
  546. $info_list[$key]['repair'] = '/';
  547. }
  548. else
  549. {
  550. $info_list[$key]['repair'] = '补货';
  551. }
  552. if($value['stockup'] == 0)
  553. {
  554. $info_list[$key]['stockup'] = '/';
  555. }
  556. else
  557. {
  558. $info_list[$key]['stockup'] = '备货';
  559. }
  560. if($value['outbound'] == 0)
  561. {
  562. $info_list[$key]['outbound'] = '正常';
  563. }
  564. else
  565. {
  566. $info_list[$key]['outbound'] = '异常';
  567. }
  568. if(isset($wt[$value['type']]))
  569. {
  570. $info_list[$key]['type'] = $wt[$value['type']];
  571. }
  572. else
  573. {
  574. $info_list[$key]['type'] = '未设置';
  575. }
  576. $info_list[$key]['cs'] = $value['us']+$value['uszt'];
  577. unset($info_list[$key]['id']);
  578. }
  579. }
  580. $title = '预警及备货'.date('Y-m-d H:i',time());
  581. $titlename = "<table border=1>
  582. <tr>
  583. <td>SKU</td>
  584. <td>用友料号</td>
  585. <td>美仓库存</td>
  586. <td>在途</td>
  587. <td>美仓库存+在途</td>
  588. <td>许昌库存</td>
  589. <td>等级</td>
  590. <td>前周出库</td>
  591. <td>近7天出库</td>
  592. <td>近30天出库</td>
  593. <td>预计可用天数</td>
  594. <td>本月缺货</td>
  595. <td>占单数量</td>
  596. <td>补货预警</td>
  597. <td>备货提醒</td>
  598. <td>出库异常</td>
  599. <td>需要备货</td>
  600. </tr>
  601. </table>";
  602. $filename = $title.".xls";
  603. $tail = "\n";
  604. $this->excel->get_fz2($info_list,$titlename,$filename,$tail);
  605. }
  606. }