123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
- <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
- <title></title>
- <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
- <link rel="stylesheet" type="text/css" href="../../css/aui.css"/>
- <link rel="stylesheet" href="../../css/projeck.css">
- <style>
- html,body{
- /*background: #FAFAFA;*/
- background: #FAFAFA;
- max-height: 100%
- }
- .get_materials_storage_list {
- margin: 70px 15px 0 15px;
- background: #fff;
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- justify-content: space-around;
- border-radius: 5px;
- }
- .get_materials_storage_list_item {
- background: #fff;
- width: 30%;
- margin-top: 10px;
- display: flex;
- flex-flow: column;
- justify-content: flex-start;
- align-items: center;
- }
- .get_materials_storage_list_item img {
- width: 40px;
- height: 40px;
- border-radius: 40px;
- display: block;
- }
- .storage-name {
- width: 50px;
- padding-top: 5px;
- white-space: wrap; /*超出的空白区域不换行*/
- overflow: hidden; /*超出隐藏*/
- text-overflow: ellipsis; /*文本超出显示省略号*/
- }
- /*物资*/
- /*物资搜索输入框*/
- .api_seach_material{
- display: flex;
- padding: 0 15px;
- box-sizing: border-box;
- background: #f1f5f7;
- width: 90%;
- margin: auto;
- margin-top: 10px;
- justify-content: space-between;
- /*border-bottom: 1px solid #ebebeb;*/
- }
- .api_seach_material_box{
- height: auto;
- width: 100%;
- position: fixed;
- top: 0;
- left: 0;
- z-index: 1000;
- background: #fff;
- }
- .api_seach_material input{
- box-sizing: border-box;
- height: 44px;
- padding-left: 15px;
- border: none;
- outline: none;
- padding-right: 40px;
- -webkit-tap-highlight-color:rgba(0,0,0,0);
- -webkit-tap-highlight-color: transparent;
- }
- .right_api_seach {
- display: flex;
- align-items: center;
- width: 100px;
- color: #262626;
- }
- .api_seach_btn {
- padding-left: 15px;
- }
- </style>
- </head>
- <body>
- <!-- 顶部搜索框 -->
- <div style="padding-bottom:10px;"class="api_seach_material_box relative after-borders">
- <div class="api_seach_material" id="api_seach_material">
- <input type="text" name="" value="" placeholder="请输入需要查询的物资" autofocus="autofocus" class="info" id="info_input">
- <div class="right_api_seach" onclick="getDepiction()">
- <div class="api_seach_meterial_line">
- |
- </div>
- <div class="api_seach_btn">
- 搜索
- </div>
- </div>
- </div>
- </div>
- <!-- 物资仓库 -->
- <div class="get_materials_storage_list relative after-borders" id='materials_storage_list'>
- </div>
- <div class="noText hide">
- <img src="../../image/noText.png" alt="">
- </div>
- </body>
- </html>
- <!-- 仓库页面 -->
- <script type="text/template" id="templateMaterialStorage">
- {{~it:value}}
- <div class="get_materials_storage_list_item" onclick="getMaterialClassify('{{=value.id}}')">
- <img src="{{=value.thumb}}">
- <div class="storage-name">{{=value.name}}</div>
- </div>
- {{~}}
- </script>
- <script type="text/javascript" src="../../script/api.js"></script>
- <script src="../../script/doT.min.js" charset="utf-8"></script>
- <script src="../../script/config.js" charset="utf-8"></script>
- <script type="text/javascript">
- </script>
- <script>
- var toast = new auiToast();
- apiready = function () {
- getMaterialStorageList();
- console.log('1212121212');
- }
- const getMaterialStorageList = (depiction) => {
- $http.fnReuestData(UrlRouter.getMaterialStorageList, '', 'get', '',handleMaterStorageCb);
- }
- const handleMaterStorageCb = (ret,err) => {
- if (ret.code === 0) {
- $apis.html(materials_storage_list,'#templateMaterialStorage',ret.data);
- toast.hide()
- } else {
- toast.hide()
- api.toast({
- msg: '获取信息失败',
- duration: 2000,
- location: 'top'
- });
- }
- }
- function getMaterialClassify (id) {
- let pageParams = {
- id: id
- }
- $event.openTabLayout('materialsClassify_win','materialsClassify_win','物资分类',pageParams);
- }
- function getDepiction() {
- const material_name = $api.val($api.byId('info_input'));
- let pageParams = {
- material_name: material_name
- }
- $api.val($api.byId('info_input'), '');
- $event.openTabLayout('materialsList','materialsList','物资列表',pageParams);
- }
- </script>
|