iefilemaintaindetail.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. <html lang="en">
  2. <head>
  3. <meta charset="UTF-8">
  4. <meta name="viewport" content="widtd=device-widtd, initial-scale=1.0">
  5. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  6. <link rel="stylesheet" type="text/css" href="/static/css/bootstrap.min.css">
  7. <link rel="stylesheet" type="text/css" href="/static/css/css.css">
  8. <link rel="stylesheet" type="text/css" href="/static/css/iefilemaintaindetail.css">
  9. <link rel="stylesheet" type="text/css" href="/static/css/bootstrap-select.min.css">
  10. <script src="/static/js/jquery.min.js"></script>
  11. <script src="/static/js/bootstrap.min.js"></script>
  12. <script src="/static/js/vue-2.4.0.js"></script>
  13. <script src="/static/js/axios.min.js"></script>
  14. <script src="/static/js/vue-Cookies.js"></script>
  15. <script type="text/javascript" src="/static/js/jquery.select.js"></script>
  16. <script src="/static/js/bootstrap-select_new.js"></script>
  17. <!-- 图标js -->
  18. <!-- <script src="/static/js/ionicons.js"></script> -->
  19. <title>Document</title>
  20. </head>
  21. <body>
  22. <div id="app">
  23. <div class="navbar navbar-default">
  24. <div class="container">
  25. <!-- navbar-header用于设置内容横向显示 -->
  26. <div class="navbar-header">
  27. <a href="/index" class="navbar-brand"></a>
  28. </div>
  29. <!-- navbar-nav用来设置横向显示 -->
  30. <!-- navbar-right用来设置右浮动 -->
  31. <!-- hidden-xs用于当屏幕很小的情况下隐藏div里面的内容 -->
  32. <div class="hidden-xs">
  33. <ul class="nav navbar-nav">
  34. <li class="dropdown">
  35. <!--订单一览表-->
  36. <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  37. 订单一览表
  38. <b class="caret"></b>
  39. </a>
  40. <ul class="nav dropdown-menu">
  41. <li><a href="/index">订单一览表</a></li>
  42. </ul>
  43. </li>
  44. <li class="dropdown">
  45. <!--月度产能评估表-->
  46. <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  47. 月度产能评估表
  48. <b class="caret"></b>
  49. </a>
  50. <ul class="nav dropdown-menu">
  51. <li><a href="/depps">月度产能评估表</a></li>
  52. <li><a href="/dessettingtm">车间标准产能设置</a></li>
  53. </ul>
  54. </li>
  55. <li class="dropdown">
  56. <!--月度主排程计划-->
  57. <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  58. 月度主排程计划
  59. <b class="caret"></b>
  60. </a>
  61. <ul class="nav dropdown-menu">
  62. <li><a href="/depps">计划主交期</a></li>
  63. <li><a href="#">计划部门交期</a></li>
  64. </ul>
  65. </li>
  66. <li class="dropdown">
  67. <!--ie文件号管理-->
  68. <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  69. IE工艺文件号管理
  70. <b class="caret"></b>
  71. </a>
  72. <ul class="nav dropdown-menu">
  73. <li><a href="/iefiletm">新增IE工艺文件号</a></li>
  74. <li><a href="/iefilemaintaintm">IE工艺文件号维护</a></li>
  75. <li><a href="/iefilemaintaindetailtm">IE效率明细表</a></li>
  76. <li><a href="/iefilemaintaininfotm">IE效率统计表</a></li>
  77. </ul>
  78. </li>
  79. </ul>
  80. <ul class="nav navbar-nav navbar-right">
  81. <li v-if="username !=''">
  82. <a>{% verbatim %}{{ '欢迎'+username+'!!!' }} {% endverbatim %}</a>
  83. </li>
  84. <li v-else><a href="">请登录</a></li>
  85. <li><a href="/login/" @click="logout()">退出登录</a></li>
  86. </ul>
  87. </div>
  88. </div>
  89. </div>
  90. <!--表头-->
  91. <div class="filter">
  92. <div class="container ">
  93. <label>
  94. <div class="navbar-nav">日期:</div>
  95. <div class="navbar-nav"><input type='date' class="input form-control" v-model='data_timeqi' /></div>
  96. </label>
  97. <label>
  98. <div class="navbar-nav">至:</div>
  99. <div class="navbar-nav"><input type='date' class="input form-control" v-model='data_timezhi' />
  100. </div>
  101. </label>
  102. <label>
  103. <div class="navbar-nav">车间:</div>
  104. <div class="navbar-nav">
  105. <input class="input form-control" id="erp_dep" type="text" autocomplete="off" />
  106. </div>
  107. </label>
  108. <label>
  109. <div class="navbar-nav">IE工艺文件号:</div>
  110. <div class="navbar-nav">
  111. <input class="input form-control" id="iefileno" type="text" autocomplete="off" />
  112. </div>
  113. </label>
  114. <label>
  115. <div class="navbar-nav">结案否:</div>
  116. <div class="navbar-nav">
  117. <select class="input form-control" v-model="cls_id">
  118. <option value="1" selected="selected">全部</option>
  119. <option value="2">结案</option>
  120. <option value="3">未结案</option>
  121. </select>
  122. </div>
  123. </label>
  124. <label class="save def" @click="seek()">
  125. <div class="btn btn-primary navbar-nav">查询</div>
  126. </label>
  127. <label class="save def">
  128. <div class="btn btn-primary navbar-nav" @click="exportaa()">导出数据</div>
  129. </label>
  130. </div>
  131. </div>
  132. <div class="container">
  133. <table class="table table-hover">
  134. <tbody>
  135. <tr v-for="(item,i) in seek_data" ::key="i">
  136. <td v-if="i>0" v-text="i"></td>
  137. <td v-else>行号</td>
  138. <td v-text="item.gdmc_mb"></td>
  139. <td v-text="item.prd_no"></td>
  140. <td v-text="item.prd_name"></td>
  141. <td v-text="item.so_no"></td>
  142. <td v-text="item.zyxt_mb"></td>
  143. <td v-text="item.dep_name"></td>
  144. <td v-text="item.t_wh"></td>
  145. <td v-text="item.t_qty"></td>
  146. <td v-text="item.jjdj_mb"></td>
  147. <td v-text="item.jj_up"></td>
  148. <td v-text="item.mo_bc_qty"></td>
  149. <td v-text="item.mo_ym_qty"></td>
  150. <td v-text="item.cj_qty"></td>
  151. <td v-text="item.job_time"></td>
  152. <td v-text="item.file_serial"></td>
  153. <td v-text="item.xxcn_t_mb"></td>
  154. <td v-text="item.rjcn_t_mb"></td>
  155. <td v-text="item.mo_cli_id"></td>
  156. <td v-text="item.mo_no"></td>
  157. <td v-text="item.mo_qty"></td>
  158. <td v-text="item.ws__mo_qty"></td>
  159. <td v-text="item.sh_mo_qty"></td>
  160. <td v-text="item.dep_qty_sum"></td>
  161. <td v-text="item.total_manpower"></td>
  162. <td v-text="item.s_ie"></td>
  163. </tr>
  164. </tbody>
  165. </table>
  166. </div>
  167. </div>
  168. <!-- 这里是导出数据 -->
  169. <script type="text/javascript" src="/static/js/export/exports.js"></script>
  170. <script>
  171. var vm = new Vue({
  172. el: '#app',
  173. data: {
  174. data_timeqi: '', //查询时间起
  175. data_timezhi: '', //查询时间止
  176. username: '', //登录用户名
  177. seek_data: [], //查询到的数据
  178. cls_id:'1' //结案否
  179. },
  180. mounted() {
  181. // 获取登录名
  182. // this.username=getCookie('username');
  183. this.username = $cookies.get('username')
  184. console.log($cookies.get('username'))
  185. },
  186. methods: {
  187. // 查询
  188. seek() {
  189. var erp_dep = $('#erp_dep').val()
  190. if(erp_dep.indexOf("->") != -1){
  191. erp_dep = erp_dep.split("->")[0]
  192. }
  193. var iefileno = $('#iefileno').val()
  194. if(iefileno.indexOf("->") != -1){
  195. iefileno = iefileno.split("->")[0]
  196. }
  197. axios.get('/iefilemaintaindetail/', {
  198. params: {
  199. erp_dep: erp_dep,
  200. iefileno: iefileno,
  201. data_timeqi: this.data_timeqi,
  202. data_timezhi: this.data_timezhi,
  203. cls_id:this.cls_id
  204. }
  205. }).then(res => {
  206. var data = res.data.data
  207. this.seek_data = data
  208. console.log(this.seek_data)
  209. }).catch(err => {
  210. alert(err.response["data"] + err.response["status"])
  211. })
  212. },
  213. // 导出数据
  214. exportaa() {
  215. // console.log(this.list)
  216. var filter = [];
  217. var title = [];
  218. exportExcel(this.seek_data, 'IE效率明细表', title, filter);
  219. },
  220. //获取当前日期
  221. addDate() {
  222. var date = new Date();
  223. var seperator1 = "-";
  224. var year = date.getFullYear();
  225. var month = date.getMonth() + 1;
  226. var strDate = date.getDate();
  227. if (month >= 1 && month <= 9) {
  228. month = "0" + month;
  229. }
  230. if (strDate >= 0 && strDate <= 9) {
  231. strDate = "0" + strDate;
  232. }
  233. var currentdate = year + seperator1 + month + seperator1 + strDate;
  234. // console.log(currentdate)
  235. this.data_timeqi = this.data_timezhi = currentdate
  236. },
  237. //退出登录
  238. logout() {
  239. console.log("qweq")
  240. axios.delete('/login/', {
  241. params: {
  242. user_1: this.user_1,
  243. pswd: this.pswd,
  244. }
  245. })
  246. .then(res => {
  247. })
  248. .catch(err => {
  249. })
  250. },
  251. },
  252. created() {
  253. this.addDate()
  254. }
  255. });
  256. $(function () {
  257. // 开始写 jQuery 代码...
  258. var timer = null;
  259. // 定义一个公用的搜索接口
  260. // console.log(vm.$data.list)
  261. function getStr(n, url, field, clickif) {
  262. //n为搜索的参数 url为请求的路由,filed是定位表单的id,
  263. //clickif用于判断是否是第一次加载,如果不是第一次加载则需要模拟点击
  264. var search = n
  265. // 配置路由
  266. if (typeof search === 'undefined') {
  267. search = ''
  268. };
  269. // console.log(search)
  270. axios.get(url, {
  271. params: {
  272. search_no: search
  273. }
  274. })
  275. .then(res => {
  276. // alert(res.data)
  277. var data1 = res.data.data
  278. datas = data1
  279. // console.log(datas)
  280. if (datas.length == 0) {
  281. alert("没有搜索到数据")
  282. return
  283. }
  284. $.selectSuggest(field, datas);
  285. // 是否第一次进入
  286. if (clickif !== 1) {
  287. $("#" + field).trigger("click");
  288. }
  289. })
  290. .catch(err => {
  291. Console.log(err.response)
  292. alert(err.response["data"] + err.response["status"])
  293. })
  294. };
  295. //查询部门资料调用
  296. $("#erp_dep").bind("input propertychange", function (event) {
  297. var search = $("#erp_dep").val()
  298. // console.log($("#testInput").val())
  299. timer && clearTimeout(timer);
  300. timer = setTimeout(function () {
  301. getStr(search, '/dept/', 'erp_dep');
  302. }, 1000);
  303. });
  304. getStr('', '/dept/', 'erp_dep', 1);
  305. // 查询ie文件号
  306. $("#iefileno").bind("input propertychange", function (event) {
  307. var search = $("#iefileno").val()
  308. // console.log($("#testInput").val())
  309. timer && clearTimeout(timer);
  310. timer = setTimeout(function () {
  311. getStr(search, '/iefileno/', 'iefileno');
  312. }, 1000);
  313. });
  314. getStr('', '/iefileno/', 'iefileno', 1);
  315. });
  316. </script>
  317. <!-- <script type="text/javascript" src="/static/js/export/jquery-1.8.2.js"></script> -->
  318. </body>
  319. </html>