<!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=20220425" 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"> <span>{{title}}</span> <div style="margin-right: 18px;float: right;"> <el-button-group style="margin-left: 3px"> <el-button @click="exportList">导 出</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" v-on:get-data="getData" v-on:edit-data="editData" v-on:del-data="delData" v-on:order-fields="orderTableFields" > </h-table> </div> </div> <el-dialog title="ç¾æ”¶åè®®" :visible.sync="reasonvisible" height="50%"> <el-form label-width="100px"> <el-form-item label="ç¾æ”¶åè®®å·"> <el-input v-model="textarea2_no" placeholder="输入åè®®å·" style="width: 100%;"></el-input> </el-form-item> <el-form-item label="备注"> <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 10}" placeholder="备注" v-model="textarea2" style="width: 100%;"> </el-input> </el-form-item> </el-form> <div class="dialog-footer" style="float: right;margin-top: 30px;"> <el-button type="default" @click="reasonvisible = false">å– æ¶ˆ</el-button> <el-button type="primary" @click="signingAgreement">ç¡® 定</el-button> </div> </el-dialog> </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: "agm_record_qtfy", title: "å‰å°è´¹ç”¨å¤‡æ¡ˆæ˜Žç»†è¡¨", dataurl: "rootjemin/data/getEntitySet", filterTxt: " type = 'qtfy' ", orderby: "update_time desc", default_filterFields: [ {isshow: "T", field: "detail_no", name: "明细编ç ", filterfield:"", filteroperator: "like", type: ""}, ], default_tableFields: [ {isshow: "T", field: "state_name", name: "状æ€",}, {isshow: "T", field: "detail_no", name: "明细编ç ", isshow: "T", width: "150",}, {isshow: "T", field: "process_type", name: "æµç¨‹ç±»åž‹",}, {isshow: "T", field: "apply_code", name: "申请人编ç ", type:"span", width: "150",}, {isshow: "T", field: "apply_name", name: "申请人åç§°", type:"span", width: "150",}, {isshow: "T", field: "department", name: "申请部门", type:"span",}, {isshow: "T", field: "apply_date", name: "申请日期", type:"span", type: "date",}, {isshow: "T", field: "apply_province", name: "申请çœä»½", type:"select",}, {isshow: "T",field: "begin_date", name: "开始时间", width: "100", type:"date", formatter: "formatter_date"}, {isshow: "T",field: "end_date", name: "ç»“æŸæ—¶é—´", width: "100", type:"date", formatter: "formatter_date"}, {isshow: "T", field: "customer_code", name: "商业编ç ", width: "150", type: "select",}, {isshow: "T", field: "customer_name", name: "商业åç§°", width: "200", type:"span",}, {isshow: "T", field: "customer_person_code", name: "商业æ“作人编ç ", width: "150", type:"span",}, {isshow: "T", field: "customer_person", name: "商业æ“作人", width: "100", type:"span",}, {isshow: "T", field: "product_code", name: "å“ç§ç¼–ç ", width: "150", type:"select",}, {isshow: "T", field: "product_name", name: "å“å", width: "200", type: "span", align: "left"}, {isshow: "T", field: "spec", name: "è§„æ ¼", width: "100", type: "span",}, {isshow: "T", field: "net_code", name: "网点编ç ", width: "100", type: "span",}, {isshow: "T", field: "net_name", name: "网点åç§°", width: "200", type: "select", align: "left"}, {isshow: "T", field: "target_price", name: "䏿 ‡ä»·", width: "100", type: "input", formatter: "formatter_money", align: "right"}, {isshow: "T", field: "origin_price", name: "商业供货价", width: "100", type: "input", formatter: "formatter_money", align: "right"}, {isshow: "T", field: "gap_price", name: "补差å•ä»·", width: "100", type: "input", formatter: "formatter_money", align: "right"}, {isshow: "T", field: "gap_rate", name: "补差扣率", width: "100", type: "span", }, {isshow: "T", field: "pay_type", name: "支付方å¼", width: "100", type: "span"}, {isshow: "T", field: "pay_time", name: "兑付周期", width: "100", align: "right", type: "select",}, {isshow: "T", field: "is_agency", name: "æ˜¯å¦æ‰˜ç®¡", width: "100", align: "right"}, // {isshow: "T", field: "agree_no", name: "å议编ç ", width: "100", align: "right", type: "span",}, {isshow: "T", field: "remark", name: "明细备注", type: "input", width: "150"}, ], filterfieldClick: {}, tablefieldClick: {}, formfieldClick: {}, reasonvisible: false, textarea2: '', textarea2_no: '', dataRequest: [ { name: "md_province", url: "rootjemin/data/getEntitySet", paramsobj: {dataname: "md_division", filter: "level = '1'"}, isnotoption: false, //true:䏿˜¯é€‰é¡¹ } ], }, created() { }, mounted() { var me = this; let re = false if (window.top.vue.userinfo.user.roleList && window.top.vue.userinfo.user.roleList.length > 0) { window.top.vue.userinfo.user.roleList.map(s => { if (s.id && (s.id == "sp071" || s.id == "sp097" || s.id == "0" || s.id == "sp003")) { re = true } }) } if (!re) { this.filterTxt += " and creator_code = '" + window.top.vue.userinfo.employee.code + "' " } //èŽ·å–æ•°æ® if (this.dataRequest && this.dataRequest.length) { var result = {}; this.loadRequestData(this.dataRequest, result, function(data) { me.dataRequestObj = data; //é¢„åŠ è½½æ•°æ®åŽç»™å“ªäº›å—段设置options或formatterjson //èŽ·å–æ•°æ® me.initData(); }); } else { //èŽ·å–æ•°æ® this.initData(); } this.$nextTick(() => { // 以æœåŠ¡çš„æ–¹å¼è°ƒç”¨çš„ Loading 需è¦å¼‚æ¥å…³é— hideLoading(); }); }, methods:{ signingAgreementOuter() { this.reasonvisible = true; }, signingAgreement() { let me = this; var date_ = dateFormat(new Date(),"yyyy-MM-dd"); let param_ = { dataname:"agm_record", data: { id: this.selectedrow.id, has_sign: 1, sign_remark: this.textarea2, sign_no: this.textarea2_no, sign_time: date_, sign_operate_code: window.top.userinfo.employee.code, sign_operate_name: window.top.userinfo.employee.name } } Server.call("rootjemin/data/saveEntity", param_, function(result) { if(result && result.success) { Root.message({ type:"success", message:"ç¾æ”¶æˆåŠŸ" }) } me.doQuery() }) this.reasonvisible = false; }, exportList() { this.oldFilterTxt = clone(this.filterTxt) if(this.filterObj && this.filterObj.status == 'close') { this.filterTxt += " and ara.status = 'close' " } else if(this.filterObj && this.filterObj.status == 'freeze') { this.filterTxt += " and ar.freeze = 'T' and ara.status = 'open' " } else if(this.filterObj && this.filterObj.status == 'end') { this.filterTxt += " and ar.freeze <> 'T' and ar.end_date < now() and ara.status = 'open' and ar.termination_date is null" } else if(this.filterObj && this.filterObj.status == 'termination') { this.filterTxt += " and ar.freeze <> 'T' and ar.termination_date < now() and ara.status = 'open' " } else if(this.filterObj && this.filterObj.status == 'active') { this.filterTxt += " and ara.status = 'open' and ar.freeze <> 'T' and ar.start_date < now() and ar.end_date > now() and ar.termination_date is null " } else if(this.filterObj && this.filterObj.status == 'notactive') { this.filterTxt += " and ara.status = 'open' and ar.start_date > now() and ar.freeze <> 'T' and ar.termination_date is null " } else if(this.filterObj && this.filterObj.status == 'cancel') { this.filterTxt += " and ara.status = 'open' and ar.freeze <> 'T' and ar.cancel_date is not null " } else { this.filterTxt += " and (ara.status = 'open' or status = 'close') " } exportList('recordQtfyExport', this.getFilterData()) this.queryAfter() }, getFilterData: function(filter, isnotencode) { var filter_ = filter ? filter : "1=1"; for(var k in this.filterObj) { if (k == 'status') { continue } let k_val = this.filterObj[k]; if (k_val && typeof(k_val) == "string") { //åŽ»é™¤ä¸¤ç«¯çš„ç©ºæ ¼ this.filterObj[k] = k_val = k_val.replace(/(^\s*)|(\s*$)/g, ""); //去除两端的Tab this.filterObj[k] = k_val = k_val.replace(/(^\t*)|(\t*$)/g, ""); } let fieldObj_ = this.filterFieldsObj[k]; if (!fieldObj_) { continue } let type_ = fieldObj_.type; let valfield_ = fieldObj_.valfield; if (type_ == "popup" && valfield_) { k_val = this.filterObj[valfield_]; if (!this.filterObj[valfield_] && this.filterObj[k]) { k_val = this.filterObj[k]; } } let field_ = fieldObj_.field; let filteroperator_ = "equal"; let isnull = false; let ornullval_ = fieldObj_.ornullval; if (ornullval_) { var nullvals_ = ornullval_.split(";"); nullvals_.map(v=>{ if (v == k_val) { isnull = true; } }); } if (fieldObj_.filterfield) { field_ = fieldObj_.filterfield } if (fieldObj_.filteroperator) { filteroperator_ = fieldObj_.filteroperator } if (k_val && k_val != "" && k_val.length) { filter_ = getFilterByFilterType(filter_, type_, field_, k_val, filteroperator_, isnull); } } if (Object.keys(this.filterObjBydefault).length) { for(var k in this.filterObjBydefault) { let k_val = this.filterObjBydefault[k]; filter_ += " and " + k + " = '" + k_val +"'"; } } if (this.filterTxt) { filter_ += " and " + this.filterTxt; } if (isnotencode) { return filter_; } else { return encodeURI(filter_); } }, 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); // //å—æ®µæ•°ç»„è½¬å—æ®µ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) { if (f.field == 'province_name') { f.isfilterable = true me.dataRequestObj.md_province.data.entityset.map(e => { e.value = e.name e.code = e.name }) f.options = me.dataRequestObj.md_province.data.entityset } filterFields_.push(clone(f)); } else { var filter_f = clone(f); filter_f.isshow = "F"; filterFields_.push(filter_f); } tableFields_.push(clone(f)); }) var termination_date = { isshow: "T",field: "termination_date", name: "ç»ˆæ¢æ—¥æœŸ", width: "150", type:"date", formatter: "formatter_date" }; var termination_operate_name = { isshow: "T",field: "termination_operate_name", name: "终æ¢äºº", width: "100", type:"", formatter: "" }; tableFields_.push(termination_date); tableFields_.push(termination_operate_name); if (!me.filterFields || (me.filterFields && me.filterFields.length == 0)) { me.filterFields = clone(filterFields_); me.tableFields = clone(tableFields_); var tableFields_2 = listTOTableFieldsGroup(me.tableFields, "table_group_name", "name"); me.tableFields = clone(tableFields_2); //å—æ®µæ•°ç»„è½¬å—æ®µobj me.fieldsToFieldsObj(); //è®¾ç½®å—æ®µäº‹ä»¶ me.tableFieldClick(); } } if (callback) { callback(); } }); }, doQuery: function(callback) { let me = this; this.oldFilterTxt = clone(this.filterTxt) if(this.filterObj && this.filterObj.status == 'close') { this.filterTxt += " and ara.status = 'close' " } else if(this.filterObj && this.filterObj.status == 'freeze') { this.filterTxt += " and ar.freeze = 'T' and ara.status = 'open' " } else if(this.filterObj && this.filterObj.status == 'end') { this.filterTxt += " and ar.freeze <> 'T' and ar.end_date < now() and ara.status = 'open' and ar.termination_date is null" } else if(this.filterObj && this.filterObj.status == 'termination') { this.filterTxt += " and ar.freeze <> 'T' and ar.termination_date < now() and ara.status = 'open' " } else if(this.filterObj && this.filterObj.status == 'active') { this.filterTxt += " and ara.status = 'open' and ar.freeze <> 'T' and ar.start_date < now() and ar.end_date > now() and ar.termination_date is null " } else if(this.filterObj && this.filterObj.status == 'notactive') { this.filterTxt += " and ara.status = 'open' and ar.start_date > now() and ar.freeze <> 'T' and ar.termination_date is null " } else if(this.filterObj && this.filterObj.status == 'cancel') { this.filterTxt += " and ara.status = 'open' and ar.freeze <> 'T' and ar.cancel_date is not null " } else { this.filterTxt += " and (ara.status = 'open' or status = 'close') " } let filter_ = "1=1"; this.filterList = []; this.selectedrow = {}; for(var k in this.filterObj) { if (k == 'status') { continue } let k_val = this.filterObj[k]; /* let fieldObj_ = this.filterFieldsObj[k]; let type_ = fieldObj_.type; let field_ = fieldObj_.field; */ if (k_val && typeof(k_val) == "string") { //åŽ»é™¤ä¸¤ç«¯çš„ç©ºæ ¼ this.filterObj[k] = k_val = k_val.replace(/(^\s*)|(\s*$)/g, ""); //去除两端的Tab this.filterObj[k] = k_val = k_val.replace(/(^\t*)|(\t*$)/g, ""); } let fieldObj_ = this.filterFieldsObj[k]; if (!fieldObj_) { continue } if (!fieldObj_) { fieldObj_ = { field: k } } let type_ = fieldObj_.type; let valfield_ = fieldObj_.valfield; if (type_ == "popup" && valfield_) { k_val = this.filterObj[valfield_]; } let field_ = fieldObj_.field; let filteroperator_ = "equal"; let isnull = false; let ornullval_ = fieldObj_.ornullval; if (ornullval_) { var nullvals_ = ornullval_.split(";"); nullvals_.map(v=>{ if (v == k_val) { isnull = true; } }); } if (fieldObj_.filterfield) { field_ = fieldObj_.filterfield } if (fieldObj_.filteroperator) { filteroperator_ = fieldObj_.filteroperator } //ä¼ æ¡ä»¶æ•°ç»„ç”±åŽç«¯æ‹¼æŽ¥ç›é€‰æ•°æ® /* let filterListObj_ = { field: field_, val: k_val, type: filteroperator_ } this.filterList.push(filterListObj_); */ //ä¼ æ¡ä»¶æ•°æ®æœ‰å‰ç«¯æ‹¼æŽ¥ if (k_val && k_val != "" && k_val.length) { filter_ = getFilterByFilterType(filter_, type_, field_, k_val, filteroperator_, isnull); } } if (Object.keys(this.filterObjBydefault).length) { for(var k in this.filterObjBydefault) { let k_val = this.filterObjBydefault[k]; if (k_val.indexOf(',') != -1) {//包å«è‹±æ–‡","用in filter_ += " and " + k + " in ('" + k_val +"')"; } else { filter_ += " and " + k + " ='" + k_val +"'"; } } } if (this.filterTxt) { filter_ += " and " + this.filterTxt; } var attachmeta_ = false; if (!this.tableFields || (this.tableFields && this.tableFields.length == 0)) { attachmeta_ = true; } let param_ = { dataname: this.dataname, filterList: this.filterList, filter: filter_, orderby: this.orderby, page: { pageno: this.pagenum, pagesize: this.pagesize }, attachMeta: attachmeta_ } if (Object.keys(this.paramObjBydefault).length) { for(var k in this.paramObjBydefault) { let k_val = this.paramObjBydefault[k]; param_[k] = k_val; } } me.tableData = []; //me.total = 0; me.tableloading = true; Server.call(me.dataurl, param_, function(result) { me.tableloading = false; if (result && result.meta) { me.data_tablename_map = result.meta } if (result && result.data && result.data.entityset) { if (result.data.page && result.data.page.recordcount && me.pagenum > 1 && result.data.page.recordcount < (me.pagenum - 1) * me.pagesize) { me.pagenum = 1; me.doQuery(callback); return; } var data_ = result.data.entityset; me.tableData = data_; me.total = result.data.page ? result.data.page.recordcount : 0; } else { me.total = 0; } me.queryAfter(); if (callback) { callback(result, function() { me.tableDataAfter(); }); } }, function(){ me.tableloading = false; }); }, queryAfter() { let me = this if (me.tableData.length > 0) { let tableData = clone(me.tableData) tableData.map(s => { if (s.freeze && s.freeze == 'T') s.freeze = '是' else s.freeze = 'å¦' }) me.tableData = tableData } this.filterTxt = clone(this.oldFilterTxt) }, tableFieldClick() { var me = this; //ç›é€‰å—段事件设置 this.filterfieldClick = { }; //è¡¨æ ¼å—æ®µäº‹ä»¶è®¾ç½® this.tablefieldClick = { status: {//å—æ®µäº‹ä»¶è®¾ç½® val: {//有值时的点击事件 onclick: function(obj) {//æ•°æ®å€¼ç‚¹å‡»äº‹ä»¶ var config = { totab: false, //true: 以Tabå¯¼èˆªçš„æ–¹å¼æ‰“å¼€ width: "900px", height: "500px", icon: "icon-product", text: "", id: obj.row.id,//totab: trueæ—¶éœ€è®¾ç½®ï¼Œç”¨äºŽåˆ¤æ–æ˜¯å¦å·²æ‰“å¼€æ¤é¡µé¢ url: "../approval_new/ApprovalList_page_new.html?flow_id=" + obj.row.flow_id, data: obj.row, delta: {}, sceneCode: "change",//"refuseedit",//"approval", //"add"//"browse", callback: function(obj, callback) { if (callback) { callback(); } } }; me.doPopupByPublic(config); }, }, }, }; //表å•å—æ®µäº‹ä»¶è®¾ç½® this.formfieldClick = { }; }, showInfo(obj) { var me = this; var config = { totab: true, //true: 以Tabå¯¼èˆªçš„æ–¹å¼æ‰“å¼€ width: "900px", height: "900px", icon: "icon-product", text: "分销政ç–ä¿¡æ¯æŸ¥çœ‹", id: "front_fee_info" + "browse" + obj.row.id,//totab: trueæ—¶éœ€è®¾ç½®ï¼Œç”¨äºŽåˆ¤æ–æ˜¯å¦å·²æ‰“å¼€æ¤é¡µé¢ url: "../agreement/policy/front_fee_info.html", data: obj.row, delta: {}, sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse", callback: function(obj, callback) { if (callback) { callback(); } } }; me.doPopupByPublic(config); }, opentest() { var me = this; Root.message({ type: 'success', message: 'åŽç¼€ç‚¹å‡»äº‹ä»¶' }); var config = { totab: false, //true: 以Tabå¯¼èˆªçš„æ–¹å¼æ‰“å¼€ width: "900px", height: "900px", icon: "icon-product", text: "è¡¨å•æ ·ä¾‹é¡µé¢", id: "test_page",//totab: trueæ—¶éœ€è®¾ç½®ï¼Œç”¨äºŽåˆ¤æ–æ˜¯å¦å·²æ‰“å¼€æ¤é¡µé¢ //url: "module/system/page/coming.html", url: "module/system/page/sample/sample_form.html", data: {}, delta: {}, sceneCode: "edit", //"add"//"browse", callback: function(obj, callback) { me.onQuery(); if (callback) { callback(); } } }; me.doPopupByPublic(config); }, addData() { let me = this; var config = { totab: false, //true: 以Tabå¯¼èˆªçš„æ–¹å¼æ‰“å¼€ width: "500px", height: "300px", icon: "icon-product", text: "产å“ä¿¡æ¯", id: "product_edit",//totab: trueæ—¶éœ€è®¾ç½®ï¼Œç”¨äºŽåˆ¤æ–æ˜¯å¦å·²æ‰“å¼€æ¤é¡µé¢ url: "module/md/page/product/page/product_edit.html", data: {}, delta: {}, sceneCode: "add",//"refuseedit",//"approval", //"add"//"browse", callback: function(obj, callback) { me.onQuery(); if (callback) { callback(); } } }; me.doPopupByPublic(config); }, onEditData(config, scope) { var me = this; var row = scope.row; //1. empty row if (!row || !row.id) { Root.message({ type: 'warning', message: '请选择è¦ç¼–辑的数æ®' }); return false; } //3. popup var config = { totab: false, //true: 以Tabå¯¼èˆªçš„æ–¹å¼æ‰“å¼€ width: "500px", height: "300px", icon: "icon-product", text: "产å“线信æ¯", id: "product_edit" + row.id,//totab: trueæ—¶éœ€è®¾ç½®ï¼Œç”¨äºŽåˆ¤æ–æ˜¯å¦å·²æ‰“å¼€æ¤é¡µé¢ url: "module/md/page/product/page/product_edit.html", data: row, delta: null, sceneCode: "edit",//"refuseedit",//"approval", //"add"//"browse", callback: function(obj, callback) { me.onQuery(); if (callback) { callback(); } } }; me.doPopupByPublic(config); }, } }); }; initVue(); </script> <style> /* 在vue.jsä¸ v-cloak 这个指令是防æ¢é¡µé¢åŠ è½½æ—¶å‡ºçŽ° vuejs çš„å˜é‡å而设计的 */ [v-cloak] { display: none !important; } </style> </body> </html>