123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315 |
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="widtd=device-widtd, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <link rel="stylesheet" type="text/css" href="/static/css/bootstrap.min.css">
- <link rel="stylesheet" type="text/css" href="/static/css/css.css">
- <link rel="stylesheet" type="text/css" href="/static/css/iefilemaintaindetail.css">
- <link rel="stylesheet" type="text/css" href="/static/css/bootstrap-select.min.css">
- <script src="/static/js/jquery.min.js"></script>
- <script src="/static/js/bootstrap.min.js"></script>
- <script src="/static/js/vue-2.4.0.js"></script>
- <script src="/static/js/axios.min.js"></script>
- <script src="/static/js/vue-Cookies.js"></script>
- <script type="text/javascript" src="/static/js/jquery.select.js"></script>
- <script src="/static/js/bootstrap-select_new.js"></script>
- <!-- 图标js -->
- <!-- <script src="/static/js/ionicons.js"></script> -->
- <title>Document</title>
- </head>
- <body>
- <div id="app">
- <div class="navbar navbar-default">
- <div class="container">
- <!-- navbar-header用于设置内容横向显示 -->
- <div class="navbar-header">
- <a href="/index" class="navbar-brand"></a>
- </div>
- <!-- navbar-nav用来设置横向显示 -->
- <!-- navbar-right用来设置右浮动 -->
- <!-- hidden-xs用于当屏幕很小的情况下隐藏div里面的内容 -->
- <div class="hidden-xs">
- <ul class="nav navbar-nav">
- <li class="dropdown">
- <!--订单一览表-->
- <a href="#" class="dropdown-toggle" data-toggle="dropdown">
- 订单一览表
- <b class="caret"></b>
- </a>
- <ul class="nav dropdown-menu">
- <li><a href="/index">订单一览表</a></li>
- </ul>
- </li>
- <li class="dropdown">
- <!--月度产能评估表-->
- <a href="#" class="dropdown-toggle" data-toggle="dropdown">
- 月度产能评估表
- <b class="caret"></b>
- </a>
- <ul class="nav dropdown-menu">
- <li><a href="/depps">月度产能评估表</a></li>
- <li><a href="/dessettingtm">车间标准产能设置</a></li>
- </ul>
- </li>
- <li class="dropdown">
- <!--月度主排程计划-->
- <a href="#" class="dropdown-toggle" data-toggle="dropdown">
- 月度主排程计划
- <b class="caret"></b>
- </a>
- <ul class="nav dropdown-menu">
- <li><a href="/pcydscjhtm">PC月度生产计划(N+7)</a></li>
- <li><a href="/ydzpcjhtm">月度主排程计划</a></li>
- <li><a href="/ympxqjhtm">研磨品需求计划</a></li>
- <li><a href="/btmbxqtm">表头模板需求</a></li>
- </ul>
- </li>
- <li class="dropdown">
- <!--ie文件号管理-->
- <a href="#" class="dropdown-toggle" data-toggle="dropdown">
- IE工艺文件号管理
- <b class="caret"></b>
- </a>
- <ul class="nav dropdown-menu">
- <li><a href="/iefiletm">新增IE工艺文件号</a></li>
- <li><a href="/iefilemaintaintm">IE工艺文件号维护</a></li>
- <li><a href="/iefilemaintaindetailtm">IE效率明细表</a></li>
- <li><a href="/iefilemaintaininfotm">IE效率统计表</a></li>
- </ul>
- </li>
- </ul>
- <ul class="nav navbar-nav navbar-right">
- <li v-if="username !=''">
- <a>{% verbatim %}{{ '欢迎'+username+'!!!' }} {% endverbatim %}</a>
- </li>
- <li v-else><a href="">请登录</a></li>
- <li><a href="/login/" @click="logout()">退出登录</a></li>
- </ul>
- </div>
- </div>
- </div>
- <!--表头-->
- <div class="filter">
- <div class="container ">
- <label>
- <div class="navbar-nav">日期:</div>
- <div class="navbar-nav"><input type='date' class="input form-control" v-model='data_timeqi' /></div>
- </label>
- <label>
- <div class="navbar-nav">至:</div>
- <div class="navbar-nav"><input type='date' class="input form-control" v-model='data_timezhi' />
- </div>
- </label>
- <label>
- <div class="navbar-nav">车间:</div>
- <div class="navbar-nav">
- <input class="input form-control" id="erp_dep" type="text" autocomplete="off" />
- </div>
- </label>
- <label>
- <div class="navbar-nav">IE工艺文件号:</div>
- <div class="navbar-nav">
- <input class="input form-control" id="iefileno" type="text" autocomplete="off" />
- </div>
- </label>
- <label>
- <div class="navbar-nav">结案否:</div>
- <div class="navbar-nav">
- <select class="input form-control" v-model="cls_id">
- <option value="1" selected="selected">全部</option>
- <option value="2">结案</option>
- <option value="3">未结案</option>
- </select>
- </div>
- </label>
- <label class="save def" @click="seek()">
- <div class="btn btn-primary navbar-nav">查询</div>
- </label>
- <label class="save def">
- <div class="btn btn-primary navbar-nav" @click="exportaa()">导出数据</div>
- </label>
- </div>
- </div>
- <div class="container">
- <table class="table table-hover">
- <tbody>
- <tr v-for="(item,i) in seek_data" :key="i">
- <td v-text="item.dep"></td>
- <td v-text="item.dep_name"></td>
- <td v-text="item.tjbz"></td>
- <td v-text="item.qty_fin"></td>
- <td v-text="item.xl"></td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <!-- 这里是导出数据 -->
- <script type="text/javascript" src="/static/js/export/exports.js"></script>
- <script>
- var vm = new Vue({
- el: '#app',
- data: {
- data_timeqi: '', //查询时间起
- data_timezhi: '', //查询时间止
- username: '', //登录用户名
- seek_data: [], //查询到的数据
- cls_id:'1' //结案否
- },
- mounted() {
- // 获取登录名
- // this.username=getCookie('username');
- this.username = $cookies.get('username')
- console.log($cookies.get('username'))
- },
- methods: {
- // 查询
- seek() {
- var erp_dep = $('#erp_dep').val()
- if(erp_dep.indexOf("->") != -1){
- erp_dep = erp_dep.split("->")[0]
- }
- var iefileno = $('#iefileno').val()
- if(iefileno.indexOf("->") != -1){
- iefileno = iefileno.split("->")[0]
- }
- axios.get('/iefilemaintaininfo/', {
- params: {
- erp_dep: erp_dep,
- iefileno: iefileno,
- data_timeqi: this.data_timeqi,
- data_timezhi: this.data_timezhi,
- cls_id:this.cls_id
- }
- }).then(res => {
- var data = res.data.data
- this.seek_data = data
- console.log(this.seek_data)
- }).catch(err => {
- alert(err.response["data"] + err.response["status"])
- })
- },
- // 导出数据
- exportaa() {
- // console.log(this.list)
- var filter = [];
- var title = [];
- exportExcel(this.seek_data, 'IE效率统计表', title, filter);
- },
- //获取当前日期
- addDate() {
- var date = new Date();
- var seperator1 = "-";
- var year = date.getFullYear();
- var month = date.getMonth() + 1;
- var strDate = date.getDate();
- if (month >= 1 && month <= 9) {
- month = "0" + month;
- }
- if (strDate >= 0 && strDate <= 9) {
- strDate = "0" + strDate;
- }
- var currentdate = year + seperator1 + month + seperator1 + strDate;
- // console.log(currentdate)
- this.data_timeqi = this.data_timezhi = currentdate
- },
- //退出登录
- logout() {
- console.log("qweq")
- axios.delete('/login/', {
- params: {
- user_1: this.user_1,
- pswd: this.pswd,
- }
- })
- .then(res => {
- })
- .catch(err => {
- })
- },
- },
- created() {
- this.addDate()
- }
- });
- $(function () {
- // 开始写 jQuery 代码...
- var timer = null;
- // 定义一个公用的搜索接口
- // console.log(vm.$data.list)
- function getStr(n, url, field, clickif) {
- //n为搜索的参数 url为请求的路由,filed是定位表单的id,
- //clickif用于判断是否是第一次加载,如果不是第一次加载则需要模拟点击
- var search = n
- // 配置路由
- if (typeof search === 'undefined') {
- search = ''
- };
- // console.log(search)
- axios.get(url, {
- params: {
- search_no: search
- }
- })
- .then(res => {
- // alert(res.data)
- var data1 = res.data.data
- datas = data1
- // console.log(datas)
- if (datas.length == 0) {
- alert("没有搜索到数据")
- return
- }
- $.selectSuggest(field, datas);
- // 是否第一次进入
- if (clickif !== 1) {
- $("#" + field).trigger("click");
- }
- })
- .catch(err => {
- Console.log(err.response)
- alert(err.response["data"] + err.response["status"])
- })
- };
- //查询部门资料调用
- $("#erp_dep").bind("input propertychange", function (event) {
- var search = $("#erp_dep").val()
- // console.log($("#testInput").val())
- timer && clearTimeout(timer);
- timer = setTimeout(function () {
- getStr(search, '/dept/', 'erp_dep');
- }, 1000);
- });
- getStr('', '/dept/', 'erp_dep', 1);
- // 查询ie文件号
- $("#iefileno").bind("input propertychange", function (event) {
- var search = $("#iefileno").val()
- // console.log($("#testInput").val())
- timer && clearTimeout(timer);
- timer = setTimeout(function () {
- getStr(search, '/iefileno/', 'iefileno');
- }, 1000);
- });
- getStr('', '/iefileno/', 'iefileno', 1);
- });
- </script>
- <!-- <script type="text/javascript" src="/static/js/export/jquery-1.8.2.js"></script> -->
- </body>
- </html>
|