<!doctype html> <html> <head> <meta charset="utf-8"><meta http-equiv="Expires" content="0"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-control" content="no-cache"><meta http-equiv="Cache" content="no-cache"> <title>æ•°æ®ç±»åž‹</title> <script src="../../../../jsnew/elementDefault.js?v=20220425"></script> <script src="../../../../jsnew/vue/vue.js"></script> <script src="../../../../jsnew/vue/element-ui/element-ui_15/index.js"></script> <script src="../../../../jsnew/myelement.js?v=20220425"></script> <script src="../../../../jsnew/page.js?v=20220425"></script> <!-- <script src="../../../setting.js"></script> --> <link href="../../../../jsnew/vue/element-ui/element-ui_15/theme-chalk/index.css" rel="stylesheet"> <link href="../../../../jsnew/myelement.css?v=20220426" rel="stylesheet"> <link href="../../../../jsnew/theme.css?v=20220426" rel="stylesheet"> <link href="../../../../css/iconfont.css" rel="stylesheet"> <link href="../../../../jsnew/page.css?v=20220425" rel="stylesheet"> <link href="//at.alicdn.com/t/font_2374495_13ltsxm2eor.css" rel="stylesheet"> </head> <body style="margin: 0px;"> <div v-cloak id="vbody"> <div id="page_root"> <div class="topbar" style="display: flex; justify-content: space-between;"> <span>{{title}}</span> <div style="margin-right: 18px;float: right;"> <el-button-group style="margin-left: 3px"> <!-- <el-button :disabled="!(selectedrow && selectedrow.id)" @click="editData">ç¼– 辑</el-button> --> </el-button-group> </div> </div> <div class="topbar-line"> <div class="query-bar"> <h-form-filter ref="form1" :form-attr="filterAttr" :table-fields="filterFields" :form-data="filterObj" :table-field-click="filterfieldClick" :isdraggableorder="false" v-on:on-query="onQuery" v-on:on-init-query="onInitFilter" v-on:order-fields="orderFilterFields" > </h-form-filter> </div> </div> <div class="h_dialog__body"> <h-table v-if="isRefresh" ref="table1" :table-fields="tableFields" :table-data="tableData" :is-edit-table-data="isEditTableData" :pagesize="pagesize" :pagenum="pagenum" :total="total" :table-height="tableHeight" :table-field-click="tablefieldClick" :is-show-index="false" :tableloading="tableloading" :isdraggableorder="true" :is-highlight-row="true" v-on:row-click="rowClick" v-on:get-data="getData" v-on:edit-data="editData" v-on:del-data="delData" v-on:order-fields="orderTableFields" > </h-table> </div> </div> </div> <div id="page_loading" style="position: absolute; top:0px; width: 100vw; height: 50vh;"> <div class="spinner"> <div class="cube1"></div> <div class="cube2"></div> </div> </div> <script type="text/javascript"> function initVue() { new ListVue({ el: "#vbody", data: { dataname: "iv_book_balance", title: "æ•°æ®ç±»åž‹", default_filterFields: [ {isshow: "T", field: "flow_type", name: "æ•°æ®ç±»åž‹", filterfield:"", filteroperator: "like", type: ""}, ], default_tableFields: [ {isshow: "T", field: "isactive", name: "是å¦å¯ç”¨", width: "100", type: "switch",}, {isshow: "T", field: "code", name: "ç¼–ç ", width: "150", }, {isshow: "T", field: "flow_type", name: "æ•°æ®ç±»åž‹", width: "250",}, {isshow: "T", field: "remark", name: "说明", width: "200", align: "left", isminwidth: true,}, {isshow: "T", field: "orderno", name: "排åº", width: "100", }, ], tableFields: [], tableData: [ { id: "001", isactive: true, flow_type: "æµå‘-å‘货退货明细", remark: "æµå‘-å‘货退货明细", }, { id: "002", isactive: true, flow_type: "æµå‘-定版æµå‘", remark: "æµå‘-定版æµå‘", }, { id: "003", isactive: true, flow_type: "æµå‘-回款明细", remark: "æµå‘-回款明细", }, { id: "004", isactive: true, flow_type: "æµå‘-销账明细", remark: "æµå‘-销账明细", }, ], filterfieldClick: {}, tablefieldClick: {}, formfieldClick: {}, }, created() { }, mounted() { //èŽ·å–æ•°æ® this.initData(); this.$nextTick(() => { // 以æœåŠ¡çš„æ–¹å¼è°ƒç”¨çš„ Loading 需è¦å¼‚æ¥å…³é— hideLoading(); }); }, methods:{ onInitFilter() { //清空 this.filterObj = {}; this.selectedrow = {}; this.initData(); }, onQuery() { this.initData(); }, initData() { var me = this; if (!me.filterFields || (me.filterFields && me.filterFields.length == 0)) { me.filterFields = clone(me.default_filterFields); me.tableFields = clone(me.default_tableFields); me.formFields2 = clone(me.default_formFields2); //å—æ®µæ•°ç»„è½¬å—æ®µobj me.fieldsToFieldsObj(); //è®¾ç½®å—æ®µäº‹ä»¶ me.tableFieldClick(); } this.tableDataAfter(); // this.onQuery(function(result, callback) {//查询åŽçš„回调,用于获å–å—æ®µçš„ // if (result.meta && result.meta[me.dataname] && result.meta[me.dataname].fields) { // var metas = clone(result.meta[me.dataname].fields); // var filterFields_ = []; // var tableFields_ = []; // metas.map(f=>{ // f.isshow = "T"; // if (f.isfilter) { // filterFields_.push(clone(f)); // } // else { // var filter_f = clone(f); // filter_f.isshow = "F"; // filterFields_.push(filter_f); // } // tableFields_.push(clone(f)); // }) // if (!me.filterFields || (me.filterFields && me.filterFields.length == 0)) { // me.filterFields = clone(filterFields_); // me.tableFields = clone(tableFields_); // //å—æ®µæ•°ç»„è½¬å—æ®µobj // me.fieldsToFieldsObj(); // //è®¾ç½®å—æ®µäº‹ä»¶ // me.tableFieldClick(); // } // } // if (callback) { // callback(); // } // }); }, tableFieldClick() { var me = this; //ç›é€‰å—段事件设置 this.filterfieldClick = { }; //è¡¨æ ¼å—æ®µäº‹ä»¶è®¾ç½® this.tablefieldClick = { flow_type: { val: { onclick: function(obj) {//æ•°æ®å€¼ç‚¹å‡»äº‹ä»¶ me.showInfo(obj) }, } } }; //表å•å—æ®µäº‹ä»¶è®¾ç½® this.formfieldClick = { }; }, showInfo(obj) { var me = this; var config = { totab: true, //true: 以Tabå¯¼èˆªçš„æ–¹å¼æ‰“å¼€ width: "900px", height: "900px", icon: "icon-product", text: "æµå‘ä¿¡æ¯", id: "flow_type_info" + obj.row.id,//totab: trueæ—¶éœ€è®¾ç½®ï¼Œç”¨äºŽåˆ¤æ–æ˜¯å¦å·²æ‰“å¼€æ¤é¡µé¢ url: "../agreement/policy/registration/flow_type_info.html", data: obj.row, delta: {}, sceneCode: "edit",//"refuseedit",//"approval", //"add"//"browse", callback: function(obj, callback) { if (callback) { callback(); } } }; me.doPopupByPublic(config); }, editData() { let me = this; var row = me.selectedrow; var config = { totab: true, //true: 以Tabå¯¼èˆªçš„æ–¹å¼æ‰“å¼€ width: "500px", height: "300px", icon: "icon-product", text: "æ•°æ®ç±»åž‹", id: "nation_province_info",//totab: trueæ—¶éœ€è®¾ç½®ï¼Œç”¨äºŽåˆ¤æ–æ˜¯å¦å·²æ‰“å¼€æ¤é¡µé¢ url: "../tradeDiscount/priceManage/nation_province_info.html", data: row, delta: {}, sceneCode: "edit",//"refuseedit",//"approval", //"add"//"browse", callback: function(obj, callback) { me.onQuery(); if (callback) { callback(); } } }; me.doPopupByPublic(config); }, // rowClick(obj) { // this.selectedrow = obj.row; // }, } }); }; initVue(); </script> <style> /* 在vue.jsä¸ v-cloak 这个指令是防æ¢é¡µé¢åŠ è½½æ—¶å‡ºçŽ° vuejs çš„å˜é‡å而设计的 */ [v-cloak] { display: none !important; } </style> </body> </html>