| | |
| | | <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> |
| | | |
| | | <title>数量单</title> |
| | | <script type="text/javascript"> |
| | | var me = this; |
| | | var pageVue = null; |
| | | function loadJsCss(callback) { |
| | | var jscss_urls = []; |
| | |
| | | }; |
| | | |
| | | function initVue() { |
| | | pageVue = new TabTableVue({ |
| | | new ListVue({ |
| | | el: "#vbody", |
| | | data: { |
| | | title: "数量单确认", |
| | | //Tab项设置 |
| | | tabs_d: [ |
| | | {code: "matched", name: "匹配数量单", dataname: "fee_qty", filterTxt: "state_code='Input'", orderby: ""}, |
| | | {code: "notmatched", name: "不匹配数量单", dataname: "fee_qty", filterTxt: "state_code='Refused'"}, |
| | | {code: "Open", name: "已确认数量单", dataname: "fee_qty", filterTxt: "state_code='Comfirmed'", orderby: ""}, |
| | | ], |
| | | filterTxt: "", |
| | | default_tableFields: { |
| | | matched: [ |
| | | { field: "state_name", name: "状态", isshow: "T", width: "80",input_type_filter:"select",filter_field:"state_code",inputtype:"capsuletag",options_pattern:"{^草稿^:^info^,^生效^:^success^,^审批中^:^warning^}"}, |
| | | { field: "state_code", name: "状态", isshow: "F", width: "80",isnotfilter:'true' }, |
| | | { field: "id", name: "确认单号", isshow: "T", width: "120", isfilter: true }, |
| | | { field: "sale_year", name: "销售年份", isshow: "T", align: "center", width: "80" }, |
| | | { field: "sale_month", name: "销售月份", isshow: "T" ,width: "80"}, |
| | | { field: "date", name: "销售日期", isshow: "T",width: "100",type:"date",formatter:"formatter_date"}, |
| | | { field: "commit_year", name: "统计年份", isshow: "T",width: "80" }, |
| | | { field: "commit_month", name: "统计月份", isshow: "T", width: "80" }, |
| | | { field: "type", name: "类型", isshow: "T",}, |
| | | { field: "sale_code", name: "服务联系人编码", isshow: "T", align: "center",width: "110" }, |
| | | { field: "sale_name", name: "服务联系人", isshow: "T", align: "center", width: "100" }, |
| | | { field: "customer_code", name: "客户编码", isshow: "T", align: "center",width: "100" }, |
| | | { field: "customer_name", name: "客户名称", isshow: "T", align: "left",width: "150" , isfilter: true }, |
| | | { field: "product", name: "产品名称", isshow: "T", align: "left" ,width: "200" }, |
| | | { field: "spec", name: "规格", isshow: "T", align: "center",width: "150" }, |
| | | { field: "agreement_code", name: "协议编号", isshow: "T",width: "100", align: "center", isfilter: true }, |
| | | { field: "invoince_price", name: "开票价", isshow: "T", align: "right",formatter:"formatter_money",width:'120'}, |
| | | { field: "settlement_price", name: "结算低价", isshow: "T", align: "right",formatter:"formatter_money",width:'120' }, |
| | | { field: "tax", name: "税点", isshow: "T", align: "center", }, |
| | | { field: "policy", name: "政策", isshow: "T", align: "center", }, |
| | | { field: "flow_qty", name: "流向数量", isshow: "T", align: "center", }, |
| | | { field: "comfirm_qyt", name: "确认数量", isshow: "T", align: "center", }, |
| | | { field: "return_qty", name: "应返金额", isshow: "T", align: "right",formatter:"formatter_money" }, |
| | | { field: "other_deduction", name: "其余扣款", isshow: "T", align: "right",formatter:"formatter_money" }, |
| | | { field: "returned_qty", name: "实返金额", isshow: "T", align: "right",formatter:"formatter_money" }, |
| | | { field: "deduction_remark", name: "扣款备注", isshow: "T", align: "left",width:'200' }, |
| | | { field: "order_code", name: "订单号", isshow: "T", align: "center", isfilter: true,width:'120' }, |
| | | { field: "order_total", name: "订单金额", isshow: "T", align: "right",formatter:"formatter_money",width:'120' }, |
| | | { field: "order_amt", name: "订单单价", isshow: "T", align: "right",formatter:"formatter_money",width:'120' }, |
| | | { field: "order_state", name: "订单状态", isshow: "T", align: "center",width:'80' }, |
| | | { field: "platform_information", name: "平台信息", isshow: "T", align: "center", }, |
| | | { field: "applicant", name: "申请人", isshow: "T", align: "center", }, |
| | | { field: "product_group", name: "产品组", isshow: "T", align: "center", }, |
| | | { field: "apply_date", name: "申请时间", isshow: "T", align: "center",formatter:"formatter_date",width: "100" }, |
| | | { field: "pre_merger_customer", name: "合并前客户", isshow: "T", align: "center", width: "100" }, |
| | | { field: "last_arrpove_time", name: "最后审批时间", isshow: "T", align: "center",formatter:"formatter_date",width: "100" }, |
| | | { field: "agency_fee_state", name: "代理费用单状态", isshow: "T", align: "center",width: "110" }, |
| | | { field: "freeze", name: "冻结状态", isshow: "T", align: "center", }, |
| | | { field: "ferrze_remark", name: "冻结原因", isshow: "T", align: "left", }, |
| | | ], |
| | | notmatched:[ |
| | | { field: "sale_year", name: "销售年份", isshow: "T", align: "center", width: "80" }, |
| | | { field: "sale_month", name: "销售月份", isshow: "T" ,width: "80"}, |
| | | { field: "commit_year", name: "统计年份", isshow: "T",width: "80" }, |
| | | { field: "commit_month", name: "统计月份", isshow: "T", width: "80" }, |
| | | { field: "type", name: "类型", isshow: "T",}, |
| | | dataname: "fee_working_out_base_qty", |
| | | title: "数量单", |
| | | orderby: "", |
| | | filterfieldClick: {}, |
| | | tablefieldClick: {}, |
| | | formfieldClick: {}, |
| | | |
| | | { field: "agreement_code", name: "协议编号", isshow: "T",width: "100", align: "center", isfilter: true }, |
| | | { field: "no_commit_remark", name: "未提交原因", isshow: "T", align: "center", width:'150' }, |
| | | { field: "customer_code", name: "客户编码", isshow: "T", align: "center",width: "100" }, |
| | | { field: "customer_name", name: "客户名称", isshow: "T", align: "left",width: "150" , isfilter: true }, |
| | | { field: "product", name: "产品名称", isshow: "T", align: "left" ,width: "200" }, |
| | | { field: "spec", name: "规格", isshow: "T", align: "center",width: "150" }, |
| | | { field: "sale_code", name: "服务联系人编码", isshow: "T", align: "center",width: "110" }, |
| | | { field: "sale_name", name: "服务联系人", isshow: "T", align: "center", width: "100" }, |
| | | { field: "flow_qty", name: "流向数量", isshow: "T", align: "center", }, |
| | | { field: "order_code", name: "订单号", isshow: "T", align: "center", isfilter: true,width:'120' }, |
| | | ], |
| | | Open: [ |
| | | { field: "state_name", name: "状态", isshow: "T", width: "80",input_type_filter:"select",filter_field:"state_code",inputtype:"capsuletag",options_pattern:"{^草稿^:^info^,^生效^:^success^,^审批中^:^warning^}"}, |
| | | { field: "state_code", name: "状态", isshow: "F", width: "80" }, |
| | | { field: "id", name: "确认单号", isshow: "T", width: "120", isfilter: true }, |
| | | { field: "sale_year", name: "销售年份", isshow: "T", align: "center", width: "80" }, |
| | | { field: "sale_month", name: "销售月份", isshow: "T" ,width: "80"}, |
| | | { field: "date", name: "销售日期", isshow: "T",width: "100",type:"date",formatter:"formatter_date"}, |
| | | { field: "commit_year", name: "统计年份", isshow: "T",width: "80" }, |
| | | { field: "commit_month", name: "统计月份", isshow: "T", width: "80" }, |
| | | { field: "type", name: "类型", isshow: "T",}, |
| | | { field: "sale_code", name: "服务联系人编码", isshow: "T", align: "center",width: "110" }, |
| | | { field: "sale_name", name: "服务联系人", isshow: "T", align: "center", width: "100" }, |
| | | { field: "customer_code", name: "客户编码", isshow: "T", align: "center",width: "100" }, |
| | | { field: "customer_name", name: "客户名称", isshow: "T", align: "left",width: "100" , isfilter: true }, |
| | | { field: "product", name: "产品名称", isshow: "T", align: "left" ,width: "200" }, |
| | | { field: "spec", name: "规格", isshow: "T", align: "center",width: "150" }, |
| | | { field: "agreement_code", name: "协议编号", isshow: "T",width: "100", align: "center", isfilter: true }, |
| | | { field: "invoince_price", name: "开票价", isshow: "T", align: "center", }, |
| | | { field: "settlement_price", name: "结算低价", isshow: "T", align: "center", }, |
| | | { field: "tax", name: "税点", isshow: "T", align: "center", }, |
| | | { field: "policy", name: "政策", isshow: "T", align: "center", }, |
| | | { field: "flow_qty", name: "流向数量", isshow: "T", align: "center", }, |
| | | { field: "comfirm_qyt", name: "确认数量", isshow: "T", align: "center", }, |
| | | { field: "return_qty", name: "应返金额", isshow: "T", align: "right",formatter:"formatter_money" }, |
| | | { field: "other_deduction", name: "其余扣款", isshow: "T", align: "right",formatter:"formatter_money" }, |
| | | { field: "returned_qty", name: "实返金额", isshow: "T", align: "right",formatter:"formatter_money" }, |
| | | { field: "deduction_remark", name: "扣款备注", isshow: "T", align: "left",width:'200' }, |
| | | { field: "order_code", name: "订单号", isshow: "T", align: "center", isfilter: true,width:'120' }, |
| | | { field: "order_total", name: "订单金额", isshow: "T", align: "right",formatter:"formatter_money",width:'120' }, |
| | | { field: "order_amt", name: "订单单价", isshow: "T", align: "right",formatter:"formatter_money",width:'120' }, |
| | | { field: "order_state", name: "订单状态", isshow: "T", align: "center",width:'80' }, |
| | | { field: "platform_information", name: "平台信息", isshow: "T", align: "center", }, |
| | | { field: "applicant", name: "申请人", isshow: "T", align: "center", }, |
| | | { field: "product_group", name: "产品组", isshow: "T", align: "center", }, |
| | | { field: "apply_date", name: "申请时间", isshow: "T", align: "center",formatter:"formatter_date",width: "100" }, |
| | | { field: "pre_merger_customer", name: "合并前客户", isshow: "T", align: "center", width: "100" }, |
| | | { field: "last_arrpove_time", name: "最后审批时间", isshow: "T", align: "center",formatter:"formatter_date",width: "100" }, |
| | | { field: "agency_fee_state", name: "代理费用单状态", isshow: "T", align: "center",width: "110" }, |
| | | { field: "freeze", name: "冻结状态", isshow: "T", align: "center", }, |
| | | { field: "ferrze_remark", name: "冻结原因", isshow: "T", align: "left", }, |
| | | ], |
| | | }, |
| | | d_tabs: { |
| | | matched: true, |
| | | nccsy: true, |
| | | notmatched: true, |
| | | Open: true, |
| | | Close: true, |
| | | All: true, |
| | | Change: true, |
| | | }, |
| | | |
| | | tabs: [], |
| | | tabsobj: {}, |
| | | |
| | | dataRequest: [ |
| | | |
| | | ], |
| | | dataRequest: [], |
| | | dataRequestObj:{}, |
| | | |
| | | filterFields: [], |
| | | tableFields: [], |
| | | cbuttons_r:{}, |
| | | ctabs_r:{}, |
| | | loading_ncc: false |
| | | isCustomer: false, |
| | | }, |
| | | created() { |
| | | |
| | | this.isCustomer = window.top.vue.isCustomer |
| | | }, |
| | | |
| | | mounted() { |
| | | var me = this; |
| | | if (window.top.tab.selected.option.page_id) { |
| | | this.title = window.top.tab.selected.option.menutitle |
| | | getPageByPageId(window.top.tab.selected.option.page_id, function(result){ |
| | | me.cbuttons_r = result.buttons_r; |
| | | me.ctabs_r = result.tabs_r; |
| | | // me.ctabs_r.distributorlist = true; |
| | | // me.ctabs_r = me.d_tabs |
| | | |
| | | var tabsarr = []; |
| | | me.tabs_d.map(e=>{ |
| | | if(me.ctabs_r[e.code]){ |
| | | tabsarr.push(e) |
| | | } |
| | | }) |
| | | me.tabs = tabsarr; |
| | | |
| | | //预加载 |
| | | //预加载数据 |
| | | if (me.dataRequest && me.dataRequest.length) { |
| | | var result = {}; |
| | | me.loadRequestData(me.dataRequest, result, function(data) { |
| | | me.dataRequestObj = data; |
| | | //预加载数据后给哪些字段设置options或formatterjson |
| | | |
| | | if(me.tabs.length>0){ |
| | | me.activeTabName = me.tabs[0].code; |
| | | } |
| | | |
| | | //初始化Tabs |
| | | me.initTabsPage(function() { |
| | | //获取数据 |
| | | me.initData(); |
| | | }); |
| | | |
| | | me.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭 |
| | | hideLoading(); |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | else { |
| | | if(me.tabs.length>0){ |
| | | me.activeTabName = me.tabs[0].code; |
| | | } |
| | | //初始化Tabs |
| | | me.initTabsPage(function() { |
| | | //获取数据 |
| | | me.initData(); |
| | | }); |
| | | } |
| | | |
| | | me.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭 |
| | | hideLoading(); |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | methods:{ |
| | | // topTabAfter(data, methods) { // 根据参数重新写一个查询事件 |
| | | // this.topTabAfterQuery(data, methods); |
| | | // }, |
| | | onhandleClick() { |
| | | this.initData(); |
| | | }, |
| | | |
| | | initData() { |
| | | var me = this; |
| | | me.tableButtonClick(); |
| | | |
| | | //设置工具栏事件 |
| | | this.doQueryByTab(function(result, callback) {//查询后的回调,用于获取字段的 |
| | | if (result.meta && result.meta[me.selectTabObj.dataname] && result.meta[me.selectTabObj.dataname].fields) { |
| | | // var metas = clone(result.meta[me.selectTabObj.dataname].fields); |
| | | 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_ = []; |
| | | |
| | | me.default_tableFields[me.activeTabName].map(f=>{ |
| | | // f.issortable = "custom" |
| | | // if (me.selectTabObj.code == "matched") { |
| | | // if(f.field == 'state_detail_name' || f.field == 'actor' || f.field == 'business_need_code'){ |
| | | // f.isshow = "F"; |
| | | // } |
| | | // } |
| | | // else if (me.selectTabObj.code == "nccsy") { |
| | | // if(f.field == 'state_name' || f.field == 'state_detail_name' || f.field == 'actor' || f.field == 'business_need_code'){ |
| | | // f.isshow = "F"; |
| | | // } |
| | | // } |
| | | if (f.field != 'state_code') { |
| | | filterFields_.push(clone(f)) |
| | | |
| | | metas.map(f=>{ |
| | | f.isshow = "T"; |
| | | if (f.field == "md_org_account__bu_name") { |
| | | f.optionsgroup = "bu" |
| | | } |
| | | if (f.field == "md_org_account__company_name") { |
| | | f.optionsgroup = "company" |
| | | } |
| | | if (f.field == "province") { |
| | | f.options = me.dataRequestObj.md_province |
| | | } |
| | | |
| | | if (f.field == "is_editable") { |
| | | f.isshow = "F" |
| | | } |
| | | if (me.isCustomer && f.field == "md_position_hierarchy__position_path") { |
| | | f.isshow = "F" |
| | | f.isfilter = false |
| | | } |
| | | |
| | | if (f.isfilter) { |
| | | if (f.field == "state_name") { |
| | | f.filterfield = "state_code"; |
| | | f.options = me.dataRequestObj.machine_state; |
| | | } |
| | | filterFields_.push(clone(f)); |
| | | } |
| | | |
| | | else { |
| | | var filter_f = clone(f); |
| | | filter_f.isshow = "F"; |
| | | filterFields_.push(filter_f); |
| | | } |
| | | |
| | | tableFields_.push(clone(f)); |
| | | }) |
| | | |
| | | // var fbu_ = {isshow: "T", field: "bu", name: "BU", filterfield: "", filteroperator: "like", type: ""}; |
| | | // var ftcompany_ = {isshow: "T", field: "company_name", name: "公司", width: "100"}; |
| | | // var ftbu_ = {isshow: "T", field: "bu", name: "BU", width: "100"}; |
| | | |
| | | // if (me.selectTabObj.code == "matched") { |
| | | |
| | | // } |
| | | // else if (me.selectTabObj.code == "nccsy") { |
| | | // tableFields_.unshift(ftcompany_); |
| | | // } |
| | | // else { |
| | | // filterFields_.unshift(fbu_); |
| | | |
| | | // tableFields_.unshift(ftbu_); |
| | | // tableFields_.unshift(ftcompany_); |
| | | // } |
| | | |
| | | if (!me.selectTabObj.filterFields || (me.selectTabObj.filterFields && me.selectTabObj.filterFields.length == 0)) { |
| | | |
| | | me.selectTabObj.filterFields = clone(filterFields_); |
| | | me.selectTabObj.tableFields = clone(me.default_tableFields[me.activeTabName]); |
| | | if (!me.filterFields || (me.filterFields && me.filterFields.length == 0)) { |
| | | me.filterFields = clone(filterFields_); |
| | | me.tableFields = clone(tableFields_); |
| | | |
| | | //字段数组转字段obj,目的为了筛选时获取字段属性 |
| | | me.fieldsToFieldsObj(); |
| | |
| | | |
| | | tableFieldClick() { |
| | | var me = this; |
| | | var tablefieldClick = {}; |
| | | var filterfieldClick = {}; |
| | | //表格字段事件设置 |
| | | tablefieldClick.All = { |
| | | }; |
| | | |
| | | |
| | | if (this.activeTabName == "Change") { |
| | | this.selectTabObj.tablefieldClick = tablefieldClick[this.activeTabName]; |
| | | } |
| | | else if (this.activeTabName == "matched") { |
| | | this.selectTabObj.tablefieldClick = tablefieldClick[this.activeTabName]; |
| | | } |
| | | else if (this.activeTabName == "nccsy") { |
| | | this.selectTabObj.tablefieldClick = tablefieldClick[this.activeTabName]; |
| | | } |
| | | else { |
| | | this.selectTabObj.tablefieldClick = tablefieldClick.All; |
| | | } |
| | | }, |
| | | |
| | | // 设置表格工具栏按键事件 |
| | | tableButtonClick() { |
| | | var me = this; |
| | | var tablebuttonClick = {}; |
| | | tablebuttonClick.matched = [ |
| | | { |
| | | name: "确认", isbuttonshow: true,type:"success",icon: "el-icon-news", |
| | | code: "account",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0] ) { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | this.tablefieldClick = { |
| | | state_name: {//状态 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: ["草稿","录入"],//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [], |
| | | onclick: function(obj) { |
| | | |
| | | |
| | | } |
| | | }, |
| | | { |
| | | name: "冻结", isbuttonshow: true,type:"danger",icon: "el-icon-news", |
| | | code: "account",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0]) { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | |
| | | } |
| | | }, |
| | | { |
| | | name: "解除冻结", isbuttonshow: true,type:"warning",icon: "el-icon-news", |
| | | code: "account",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0]) { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | |
| | | } |
| | | }, |
| | | // { |
| | | // isbuttonshow: me.cbuttons_r.delete ? me.cbuttons_r.delete : false,type: "danger", |
| | | // code: "delete",isselected: true,classname: "", |
| | | // disabled: function(selectRowList) { |
| | | // var bo_ = true; |
| | | // if (selectRowList[0] && selectRowList[0].source == "DMS") { |
| | | // bo_ = false; |
| | | // } |
| | | // return bo_ |
| | | // }, |
| | | // onclick: function(obj) { |
| | | // me.delData() |
| | | // } |
| | | // }, |
| | | |
| | | // { |
| | | // isbuttonshow: me.cbuttons_r.delete ? me.cbuttons_r.delete : false, type: "danger", |
| | | // code: "repeal", isselected: true, classname:"", |
| | | // disabled: function(selectRowList) { |
| | | // var bo_ = true ; |
| | | // if (selectRowList[0] && selectRowList[0].source == "DMS") { |
| | | // bo_ = false |
| | | // } |
| | | // return bo_; |
| | | // }, |
| | | // onclick: function(obj) { |
| | | // me.repealDataPolicy(obj, obj.selectedList[0]) |
| | | // } |
| | | |
| | | |
| | | // { |
| | | // // name: "终止", // type: "primary", // icon: "el-icon-edit", |
| | | // isbuttonshow: me.cbuttons_r.delete ? me.cbuttons_r.delete : false, type: "danger", |
| | | // code: "suspend", isselected: true, classname: "", |
| | | // islistselected: false, // 是否可以多选 |
| | | // disabled: function(selectRowList, selectedList) { |
| | | // var bo_ = true; |
| | | // if (selectRowList[0] && selectRowList[0].source == "DMS") { |
| | | // bo_ = false; |
| | | // } |
| | | // return bo_ |
| | | // }, |
| | | // onclick: function(obj) { |
| | | // me.onSuspend(function(suspendData){ |
| | | // var selectedList_ = clone(obj.selectedList); |
| | | // selectedList_.map(row=>{ |
| | | // row.suspend_date = suspendData.suspend_date |
| | | // row.suspend_remark = suspendData.suspend_remark |
| | | // }) |
| | | // me.onSaveSuspend(selectedList_); |
| | | // }) |
| | | |
| | | // // me.cancelConfirm(); |
| | | // } |
| | | // }, |
| | | ] |
| | | |
| | | tablebuttonClick.notmatched = [ |
| | | { |
| | | name: "冻结", isbuttonshow: true,type:"danger",icon: "el-icon-news", |
| | | code: "account",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0]) { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | |
| | | } |
| | | }, |
| | | { |
| | | name: "解除冻结", isbuttonshow: true,type:"warning",icon: "el-icon-news", |
| | | code: "account",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0]) { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | |
| | | } |
| | | }, |
| | | |
| | | ] |
| | | |
| | | |
| | | if (tablebuttonClick[this.activeTabName]) { |
| | | this.selectTabObj.tablebuttonClick = tablebuttonClick[this.activeTabName]; |
| | | } |
| | | |
| | | else { |
| | | this.selectTabObj.tablebuttonClick = [] |
| | | } |
| | | }, |
| | | |
| | | toAccountMail(row, callback) { |
| | | var org_id = row.md_org__id; |
| | | var org_code = row.md_org__code; |
| | | var account_id = row.id; |
| | | var business_email = row.business_email; |
| | | |
| | | // 获取用户信息 |
| | | let param_ = { |
| | | dataname: "sys_user", |
| | | filter: "name='" + org_code + ".admin' and is_active='T' and org_id='" + org_id + "'" |
| | | } |
| | | Server.call("root/data/getEntitySet", param_, function(result) { |
| | | if (result && result.data && result.data.entityset && result.data.entityset.length == 1) { |
| | | var user_ = result.data.entityset[0]; |
| | | // 设置用户初始密码 |
| | | let param_u = { |
| | | dataname: "sys_user", |
| | | data: { |
| | | sys_user: { |
| | | id: user_.id, |
| | | password: org_code |
| | | } |
| | | } |
| | | } |
| | | Server.call("root/client/initPassword", param_u, function(result) { |
| | | // 发送邮件通知 |
| | | let param_m = { |
| | | dataname: "md_org_account", |
| | | businessCode: "login", |
| | | id: account_id, |
| | | } |
| | | Server.call("root/data/mail.accountSuccess", param_m, function(result) { |
| | | var config = { |
| | | totab: false, |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "流程步骤", |
| | | id: "popup_workflow_step_user" + obj.row.id, |
| | | url: "module/tool/page/popup_workflow_step_user.html?v=2023020703", |
| | | data: obj.row, |
| | | delta: {},//{machine_code: "Org_Account_Open"}, |
| | | sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | Root.message({ |
| | | type: 'success', |
| | | message: '已发送邮件至' + business_email |
| | | }); |
| | | }) |
| | | }) |
| | | } |
| | | else { |
| | | |
| | | } |
| | | }); |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | commitData(obj) { |
| | | var me = this; |
| | | Root.confirm('确定提交开户' + obj.account_name + '吗?', '提交提示', { |
| | | confirmButtonText: '提交', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | var param = { |
| | | dataname: me.selectTabObj.dataname, |
| | | id: obj.id, |
| | | // to_state: "OpeningApproval" |
| | | } |
| | | if (obj.org_ncc_id) { |
| | | param.refer = { |
| | | dataname: "md_org_account_ncc", |
| | | id: obj.org_ncc_id |
| | | } |
| | | }, |
| | | }, |
| | | code: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: "",//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | var sceneCode_ = "browse"; |
| | | //如果是创建人且是录入状态或退回状态则是编辑状态 |
| | | if (obj.row.creator_id == window.top.vue.userinfo.id && (obj.row.state_code == "Input" || obj.row.state_code == "input" || obj.row.state_code == "Rejected")) { |
| | | sceneCode_ = "edit"; |
| | | } |
| | | |
| | | Server.call("root/data/commit", param, function(result) { |
| | | console.log(result); |
| | | if (result.success) { |
| | | Root.message({ |
| | | type: 'success', |
| | | message: '提交成功' |
| | | }); |
| | | var config = { |
| | | totab: true, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "商业信息 " + (obj.row.name ? obj.row.name : ""), |
| | | id: "customer_edit_browse" + obj.row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/customer_edit.html", |
| | | data: obj.row, |
| | | delta: {closeCode:"1"}, |
| | | sceneCode: sceneCode_,//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | }); |
| | | }).catch(() => { |
| | | Root.message({ |
| | | type: 'info', |
| | | message: '已取消开户' |
| | | }); |
| | | }); |
| | | |
| | | |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | }; |
| | | }, |
| | | |
| | | rowClick(obj){ |
| | | var me = this; |
| | | me.selectTabObj.selectedrow = obj.row; |
| | | me.selectedrow = obj.row; |
| | | }, |
| | | |
| | | repealDataPolicy(obj, row) { |
| | | editData(sceneCode) { |
| | | var me = this; |
| | | Root.confirm('确定作废配送商【' + row.name + '】吗?', '作废提示', { |
| | | confirmButtonText: '作 废', |
| | | cancelButtonText: '取 消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | let param = { |
| | | id: row.id, |
| | | dataname: me.selectTabObj.dataname, |
| | | data: {} |
| | | } |
| | | param.data[me.selectTabObj.dataname] = { |
| | | id: row.id, |
| | | state_code: "Closed", |
| | | state_name: "作废" |
| | | } |
| | | |
| | | Server.call("root/data/saveEntity", param, function(result) { |
| | | console.log(result); |
| | | Root.message({ |
| | | type: 'success', |
| | | message: '已作废' |
| | | }); |
| | | me.onQuery(); |
| | | }); |
| | | }).catch(() => { |
| | | Root.message({ |
| | | type: 'info', |
| | | message: '已取消作废' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | onSuspend(callback) { |
| | | var me = this; |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "400px", |
| | | height: "400px", |
| | | icon: "icon-product", |
| | | text: "终止设置", |
| | | url: "module/tool/page/popup_suspend.html", |
| | | data: {}, |
| | | delta: {}, |
| | | sceneCode: "add", //"add"//"browse", |
| | | callback: function(popupobj, popupcallback) { |
| | | callback(popupobj.row); |
| | | if (popupcallback) { |
| | | popupcallback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | onSaveSuspend(list) { |
| | | var me = this; |
| | | if (list.length) { |
| | | var row = list[0]; |
| | | var param = { |
| | | dataname: me.selectTabObj.dataname, |
| | | data: {}, |
| | | } |
| | | param.data[me.selectTabObj.dataname] = { |
| | | id: row.id, |
| | | suspend_date: row.suspend_date, |
| | | suspend_remark: row.suspend_remark, |
| | | // state_code: "Closed", |
| | | // state_name: "失效", |
| | | }; |
| | | |
| | | var suspend_date_ = dateFormat(new Date(row.suspend_date), "yyyy-MM-dd") |
| | | var new_date_ = dateFormat(new Date(), "yyyy-MM-dd") |
| | | if (suspend_date_ == new_date_) { |
| | | param.data[me.selectTabObj.dataname].state_code = "Closed" |
| | | param.data[me.selectTabObj.dataname].state_name = "失效" |
| | | } |
| | | Server.call("root/data/saveEntity", param, function(result) { |
| | | console.log(result); |
| | | if (result.success) { |
| | | list.remove(row); |
| | | me.onSaveSuspend(list); |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | me.onQuery(); |
| | | } |
| | | |
| | | }, |
| | | |
| | | delData: function(scope) { |
| | | let me = this; |
| | | var row = me.selectTabObj.selectedrow; |
| | | let name_ = "该数据"; |
| | | |
| | | if (!row.id) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '该事件需存在数据ID' |
| | | }); |
| | | return |
| | | } |
| | | if (row.name) { |
| | | name_ = "_" + row.name + "_"; |
| | | } |
| | | |
| | | Root.confirm('确定删除' + name_ + '吗?', '删除提示', { |
| | | confirmButtonText: '删除', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | let param = { |
| | | id: row.id, |
| | | dataname: me.selectTabObj.dataname, |
| | | } |
| | | Server.call("root/data/deleteEntity", param, function(result) { |
| | | Root.message({ |
| | | type: 'success', |
| | | message: '删除成功!' |
| | | }); |
| | | me.onQuery(); |
| | | }); |
| | | }).catch(() => { |
| | | Root.message({ |
| | | type: 'info', |
| | | message: '已取消删除' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | //新增客商 |
| | | openCustomer(sceneCode){ |
| | | let me = this; |
| | | var row = {}; |
| | | if (sceneCode == "edit") { |
| | | row = me.selectTabObj.selectedrow; |
| | | if (!row.id) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请选择一条数据' |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | var config = { |
| | | totab: true, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "推广商信息" + (row.name ? row.name : ""), |
| | | id: "customer_basic" + (row.id? row.id : "add"),//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/customer_basic.html", |
| | | data: row, |
| | | delta: {}, |
| | | sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | //开户 |
| | | openCustomerNCC(sceneCode){ |
| | | let me = this; |
| | | var row = me.selectTabObj.selectedrow; |
| | | var row = me.selectedrow; |
| | | if(!row){ |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请选择一条数据' |
| | | }); |
| | | return; |
| | | } |
| | | var config = { |
| | | totab: true, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "首营信息" + (row.name ? row.name : ""), |
| | | id: "customer_basic_ncc" + row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/customer_basic_ncc.html", |
| | | data: row, |
| | | delta: {}, |
| | | sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | openCustomerUserByNCCId(sceneCode, row) { |
| | | let me = this; |
| | | // var row = {} |
| | | // row = me.selectTabObj.selectedrow; |
| | | if(!row.id) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请选择一条数据' |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | var text_ = "-【" + row.company_name + "】-" + row.md_org__name; |
| | | var data_ = { |
| | | // NCCid |
| | | org_ncc_id: row.id, |
| | | // 公司 |
| | | company_id: row.company_id, |
| | | company_name: row.company_name, |
| | | |
| | | // 客商 |
| | | org_id: row.org_id, |
| | | account_name: row.md_org__name, |
| | | |
| | | // 客商关联信息 |
| | | md_org__code: row.md_org__code, |
| | | md_org__ncc_code: row.md_org__ncc_code, |
| | | |
| | | }; |
| | | var config = { |
| | | totab: true, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "开户信息" + text_, |
| | | id: "customer_basic_acct" + row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/customer_basic_acct.html", |
| | | data: data_, |
| | | delta: {accountnccdata: row}, |
| | | sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | commitnCustomerUser(sceneCode, row) { |
| | | var me = this; |
| | | Root.confirm('确认提交正式合作?', '提交提示', { |
| | | confirmButtonText: '转 合 作', |
| | | cancelButtonText: '取 消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | let param = { |
| | | id: row.id, |
| | | dataname: 'md_org_partnership', |
| | | // data: {} |
| | | } |
| | | // param.data['md_org_partnership'] = row |
| | | |
| | | Server.call("root/data/commit", param, function(result) { |
| | | console.log(result); |
| | | Root.message({ |
| | | type: 'success', |
| | | message: '已提交' |
| | | }); |
| | | me.onQuery(); |
| | | }); |
| | | }).catch(() => { |
| | | Root.message({ |
| | | type: 'info', |
| | | message: '已取消提交' |
| | | }); |
| | | }); |
| | | }, |
| | | openCustomerUser(sceneCode, obj) { |
| | | let me = this; |
| | | var delta_ = {}; |
| | | var row = {}; |
| | | |
| | | var text = "开户信息" |
| | | if (sceneCode == "add") { |
| | | // 客商 |
| | | row = me.selectTabObj.selectedrow; |
| | | delta_ = { |
| | | orgdata: clone(row) |
| | | } |
| | | } |
| | | else if (sceneCode == "change") { |
| | | row = obj |
| | | if(!row.id){ |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请选择一条数据' |
| | | }); |
| | | return; |
| | | } |
| | | text = "变更开户信息" |
| | | } |
| | | else if (sceneCode == "close") { |
| | | row = obj |
| | | if(!row.id){ |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请选择一条数据' |
| | | }); |
| | | return; |
| | | } |
| | | text = "商业关户信息" |
| | | } |
| | | else if (sceneCode == "edit" || sceneCode == "browse" ) { |
| | | row = me.selectTabObj.selectedrow; |
| | | if(!row){ |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请选择一条数据' |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | var config = { |
| | | totab: true, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: text + (row.name ? "-" + row.name : ""), |
| | | id: "customer_basic_acct" + row.id + sceneCode,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/customer_basic_acct.html", |
| | | data: row, |
| | | delta: delta_, |
| | | sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | openChangeCustomerUser(sceneCode, row) { |
| | | let me = this; |
| | | var delta_ = {}; |
| | | var text = "开户变更信息" |
| | | var config = { |
| | | totab: true, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: text + (row.name ? "-" + row.name : ""), |
| | | id: "customer_basic_acct_change" + row.id + sceneCode,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/customer_basic_acct_change.html", |
| | | data: row, |
| | | delta: {type: "change"}, |
| | | sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | openBrowseDetail(obj) { |
| | | var me = this; |
| | | if (!obj.row.type_name) { |
| | | obj.row.type_name = ""; |
| | | } |
| | | var config = { |
| | | totab: true, //true: 以Tab导航的方式打开 |
| | | width: "900px", |
| | | height: "500px", |
| | | icon: "icon-product", |
| | | text: obj.row.org_name + " " + obj.row.type_name + " 变更", |
| | | id: "org_change" + obj.row.id + "_browse",//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/org/page/org_change.html", |
| | | data: obj.row, |
| | | delta: {}, |
| | | sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | //变更 |
| | | changeData() { |
| | | var me = this; |
| | | Root.confirm('确定变更【' + this.selectTabObj.selectedrow.name + '】吗?', '变更提示', { |
| | | confirmButtonText: '变 更', |
| | | cancelButtonText: '取 消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | me.editData(); |
| | | }).catch(() => { |
| | | Root.message({ |
| | | type: 'info', |
| | | message: '已取消变更' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | editData(){ |
| | | var me = this; |
| | | var row = me.selectTabObj.selectedrow; |
| | | if(!row){ |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请选择一条数据' |
| | | }); |
| | | return; |
| | | } |
| | | var config = { |
| | | totab: true, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "商业变更信息", |
| | | id: "customer_change" + row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/customer_change.html", |
| | | text: "数量单编辑", |
| | | id: "popup_edit_fee_qty" + sceneCode + row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/fee/page/popup/popup_edit_fee_qty.html", |
| | | data: row, |
| | | delta: {}, |
| | | sceneCode: "edit",//"refuseedit",//"approval", //"add"//"browse", |
| | | sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | //关户或作废 |
| | | closeData() { |
| | | var me = this; |
| | | var row = me.selectTabObj.selectedrow; |
| | | Root.confirm('确定将【' + row.account_name + '】关户吗?', '关户提示', { |
| | | confirmButtonText: '关 户', |
| | | cancelButtonText: '取 消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | var config = { |
| | | totab: true, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "商业关户信息", |
| | | id: "customer_close" + row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/customer_close.html", |
| | | data: {}, |
| | | delta: {accountdata: row}, |
| | | sceneCode: "add",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }).catch(() => { |
| | | Root.message({ |
| | | type: 'info', |
| | | message: '已取消关户' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | closeDataEdit() { |
| | | var me = this; |
| | | var row = me.selectTabObj.selectedrow; |
| | | |
| | | config = { |
| | | totab: true, |
| | | icon: "icon-product", |
| | | text: "商业关户信息", |
| | | width: "900px", |
| | | height: "900px", |
| | | id: "customer_close" + row.id + "edit", |
| | | url: "module/md/page/customer/page/customer_close.html", |
| | | sceneCode: "edit", |
| | | data: row, |
| | | delta: {}, |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | }, |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | // onDownload() { |
| | | // let me = this; |
| | | // var filter_ = "1 = 1"; |
| | | // // if(me.saveUser != "") { |
| | | // // filter_ = " customer_code = '" + me.saveUser + "'"; |
| | | // // } |
| | | // filter_ = this.getFilterData(filter_); |
| | | |
| | | // let param = { |
| | | // dataname: "orgInfoReport", //'md_org_account', |
| | | // filename: '客商信息导出' + String(new Date().getTime()), |
| | | // filter: filter_, |
| | | // orderby: "update_time desc", |
| | | // token: Root.getToken() |
| | | // } |
| | | |
| | | // textdownloadForm(param); |
| | | // }, |
| | | onDownload_V1() {//get |
| | | |
| | | |
| | | var httpRequest = new XMLHttpRequest(); |
| | | //打开连接,将请求参数拼在url后面 |
| | | httpRequest.open('GET', url, true); |
| | | //设置期望的返回值类型 |
| | | httpRequest.responseType = "blob"; |
| | | //设置请求头,将认证信息放入请求头中 |
| | | httpRequest.setRequestHeader("Authorization","JWT "+Ext.util.Cookies.get("token")); |
| | | |
| | | }, |
| | | |
| | | onDownload() { |
| | | let me = this; |
| | | var filter_ = "1 = 1"; |
| | | filter_ = this.getFilterData(filter_); |
| | | var ioname_ = "export-md-account"; |
| | | var orderby_ = ""; |
| | | |
| | | if (this.selectTabObj.code == "matched" || this.selectTabObj.code == "distributorlist" ) { |
| | | ioname_ = "export_md_org_customer"; |
| | | orderby_ = ""; |
| | | } |
| | | |
| | | console.log("download", filter_); |
| | | let param = { |
| | | sign: "md_org_account", |
| | | filename: '开户客商信息导出' + String(new Date().getTime()), |
| | | sign: "md_org_data", |
| | | filename: '经销商新增导出' + String(new Date().getTime()), |
| | | filter: filter_, |
| | | ioname: ioname_, |
| | | orderby: orderby_, |
| | | orderby: "update_time desc", |
| | | token: Root.getToken() |
| | | } |
| | | // window.top.vue.onDownload(param); |
| | | window.top.vue.textdownloadForm(param); |
| | | |
| | | me.textdownloadForm(param); |
| | | }, |
| | | textdownloadForm(params) {//文件流下载 |
| | | |
| | | textdownloadForm(params) {//post文件流下载 |
| | | let form = document.createElement('form'); |
| | | form.id = 'form_download'; |
| | | form.name = 'form_download'; |
| | |
| | | let input = document.createElement('input') |
| | | input.type = 'hidden' |
| | | input.name = obj; |
| | | input.ioname = "export-md-account"; |
| | | input.value = params[obj] |
| | | form.appendChild(input) |
| | | } |
| | | }; |
| | | form.method = 'get'; //请求方式 |
| | | // form.action = window.top.config.url_root + "root/exports/exportSheetsExcel?token=" + Root.getToken(); |
| | | // form.action = window.top.config.url_root + "root/exports/exportSheetsExcel?token=" + Root.getToken(); |
| | | form.action = window.top.config.url_root + "root/io/exportData?token=" + Root.getToken() + "&ioname=export-md-account" |
| | | // form.action = window.top.config.url_root + "root/io/exportData?token=" + Root.getToken() |
| | | |
| | | form.method = 'post'; //请求方式 |
| | | form.action = window.top.config.url_root + "root/exports/exportSheetsExcel?token=" + Root.getToken(); |
| | | form.submit(); // form表单提交 |
| | | |
| | | document.body.removeChild(form); // 移除创建的元素 |
| | | }, |
| | | |
| | | // DownloadTemplate() { |
| | | // let me = this; |
| | | // let param = { |
| | | // ioname:"export-batch-account", |
| | | // orderby: "", |
| | | // token: Root.getToken() |
| | | // } |
| | | // window.top.vue.textdownloadForm(param); |
| | | // }, |
| | | |
| | | DownloadTemplate() { |
| | | var pathurl = "template/1.导入模板/上线客商导入.xlsx"; |
| | | handleDownload(pathurl); |
| | | }, |
| | | |
| | | onPopupByUploadFile() { |
| | | var me = this; |
| | | var ioname_ = "import_md_org_account" |
| | | var delta_ = { |
| | | filetypelist: [], |
| | | isToDB: true, |
| | | } |
| | | var config = { |
| | | totab: false, |
| | | width: "500px", |
| | | icon: "icon-product", |
| | | text: "数据文件上传", |
| | | id: "popup_uploadFileToDB", |
| | | url: "module/tool/page/popup_uploadFileToDB.html", |
| | | data: { |
| | | // userid: me.userid, |
| | | ioname:ioname_, |
| | | // position_id: me.position_id, |
| | | }, |
| | | delta: delta_, |
| | | callback: function(obj, callback) { |
| | | me.$message({ |
| | | showClose: true, |
| | | message: '上传成功!', |
| | | type: 'success' |
| | | }); |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | this.doPopupByPublic(config); |
| | | }, |
| | | |
| | | getNCC() { |
| | | //org/syncEmployee |
| | | var me = this; |
| | | let param = {} |
| | | this.loading_ncc = true; |
| | | Server.call("root/account/syncNCCustomer", param, function(result) { |
| | | console.log(result); |
| | | me.loading_ncc = false; |
| | | me.onQuery(); |
| | | }, function(){ |
| | | me.loading_ncc = false; |
| | | }) |
| | | |
| | | } |
| | | |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | loadJsCss(function () { |
| | | initVue(); |
| | | }); |
| | | </script> |
| | | <style> |
| | | /* 在vue.js中 v-cloak 这个指令是防止页面加载时出现 vuejs 的变量名而设计的 */ |
| | | [v-cloak] { |
| | | display: none !important; |
| | | } |
| | | .el-tabs__nav-scroll { |
| | | overflow: hidden; |
| | | position: relative; |
| | | padding-left: 20px; |
| | | } |
| | | </style> |
| | | |
| | | </head> |
| | | |
| | | <body style="margin: 0px;"> |
| | |
| | | <span :class="page_title == 'right' ? 'h_page_title_right' : 'h_page_title_left'"><span class="h_page_title_txt">{{title}}</span></span> |
| | | |
| | | <div :class="page_title == 'right' ? 'h_page_button_left' : 'h_page_button_right'"> |
| | | |
| | | <div style="float: right;"> |
| | | <!-- <el-button :disabled="!(selectTabObj.selectedrow && selectTabObj.selectedrow.id )" type="primary" @click="openCustomerUserByNCCId('add')" icon="el-icon-news">开户</el-button> --> |
| | | <el-button-group style="margin-left: 3px;"> |
| | | <el-button type="primary" @click="" icon="el-icon-download">导出确认单</el-button> |
| | | <el-button type="primary" @click="" icon="el-icon-download">导出确认单费用明细</el-button> |
| | | <el-button :disabled="!(selectedrow.id)" @click="editData('edit') " :icon="buttonsconfig.alter.icon":icon="buttonsconfig.alter.icon">{{buttonsconfig.alter.name}}</el-button> |
| | | </el-button-group> |
| | | <el-button v-show= "cbuttons_r.synchronous ? cbuttons_r.synchronous : false" type="primary" @click="getNCC" :loading="loading_ncc" icon="el-icon-refresh-right">同步NCC</el-button> |
| | | <!-- <el-button :disabled="!(selectTabObj.selectedrow && selectTabObj.selectedrow.id )" type="primary" @click="openCustomerNCC('add')" :icon="buttonsconfig.edit.icon">NCC{{buttonsconfig.edit.name}}</el-button> --> |
| | | </div> |
| | | <div style="float: right; " v-show= "selectTabObj.code == 'matched'"> |
| | | <!-- <el-button v-show="cbuttons_r.adminEdit" :disabled="!(selectTabObj.selectedrow && selectTabObj.selectedrow.id)" @click="openCustomer('adminedit')">管理员修改</el-button> --> |
| | | <!-- <el-button-group style="margin-left: 3px;"> --> |
| | | <!-- <el-button type="primary" @click="openCustomer('add')":icon="buttonsconfig.add.icon">{{buttonsconfig.add.name}}</el-button> --> |
| | | <!-- <el-button :disabled="!(selectTabObj.selectedrow && selectTabObj.selectedrow.id && selectTabObj.selectedrow.source == 'DMS' && selectTabObj.selectedrow.source == 'DMS')" type="primary" @click="openCustomer('edit')":icon="buttonsconfig.edit.icon">{{buttonsconfig.edit.name}}</el-button> --> |
| | | <!-- <el-button :disabled="!(selectTabObj.selectedrow && selectTabObj.selectedrow.id && selectTabObj.selectedrow.source == 'DMS')" type="danger" @click="delData" :icon="buttonsconfig.delete.icon">{{buttonsconfig.delete.name}}</el-button> --> |
| | | <!-- <el-button :disabled="!(selectTabObj.selectedrow && selectTabObj.selectedrow.id )" type="primary" @click="">提交审批</el-button> --> |
| | | <!-- </el-button-group> --> |
| | | </div> |
| | | <div style="float: right;" v-show= "selectTabObj.code == 'Open' || selectTabObj.code == 'matched' || selectTabObj.code == 'distributorlist'"> |
| | | <!-- <el-button-group style="margin-left: 3px;"> |
| | | <el-button :disabled="!(selectTabObj.selectedrow && selectTabObj.selectedrow.id && selectTabObj.selectedrow.state_code == 'Open')" type="danger" @click="closeData">关 户</el-button> |
| | | <el-button :disabled="!(selectTabObj.selectedrow && selectTabObj.selectedrow.id && (selectTabObj.selectedrow.state_code == 'Rejected' || selectTabObj.selectedrow.state_code == 'CloseingSaleInput'))" type="primary" @click="closeDataEdit">关户编辑</el-button> |
| | | </el-button-group> --> |
| | | <!-- <el-button v-show= "cbuttons_r.onDownload ? cbuttons_r.onDownload : false" @click="onDownload" :icon="buttonsconfig.export.icon">{{buttonsconfig.export.name}}</el-button> --> |
| | | <!-- <el-button-group style="margin-left: 3px;"> |
| | | <el-button disabled :icon="buttonsconfig.export.icon">{{buttonsconfig.export.name}}</el-button> |
| | | </el-button-group> --> |
| | | |
| | | <el-button v-show="cbuttons_r.export ? cbuttons_r.export : false" @click="onDownload" :icon="buttonsconfig.export.icon">{{buttonsconfig.export.name}}</el-button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div> |
| | | <el-tabs v-model="activeTabName" @tab-click="handleClick"> |
| | | <el-tab-pane v-for="(tab, k) in tabs" :label="tab.name" :name="tab.code" :key="k"></el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | <!-- <div class="topbar-line"> |
| | | <div class="query-bar"> |
| | | <h-form-filter |
| | | v-if="selectTabObj.filterFields" |
| | | ref="form1" |
| | | :form-attr="filterAttr" |
| | | :table-fields="selectTabObj.filterFields" |
| | | :form-data="selectTabObj.filterObj" |
| | | :table-field-click="selectTabObj.filterfieldClick" |
| | | :isdraggableorder="true" |
| | | |
| | | v-on:on-query="onQuery" |
| | | v-on:on-init-query="onInitFilter" |
| | | v-on:on-edit-query="onEditFilter" |
| | | v-on:order-fields="orderFilterFields" |
| | | > |
| | | </h-form-filter> |
| | | </div> |
| | | </div> --> |
| | | <div class="h_dialog__body" v-loading="!isRefresh"> |
| | | <div class="h_dialog__body"> |
| | | <h-table |
| | | v-if="isRefresh && selectTabObj.tableFields" |
| | | v-if="isRefresh" |
| | | ref="table1" |
| | | :table-fields="selectTabObj.tableFields" |
| | | :table-data="selectTabObj.tableData" |
| | | :is-edit-table-data="selectTabObj.isEditTableData" |
| | | :pagesize="selectTabObj.pagesize" |
| | | :pagenum="selectTabObj.pagenum" |
| | | :total="selectTabObj.total" |
| | | :table-height="selectTabObj.tableHeight" |
| | | :table-field-click="selectTabObj.tablefieldClick" |
| | | :table-buttons-click="selectTabObj.tablebuttonClick" |
| | | :filtersobj="selectTabObj.filterObj" |
| | | :isdraggableorder="true" |
| | | :table-fields="tableFields" |
| | | :table-data="tableData" |
| | | :is-edit-table-data="isEditTableData" |
| | | :table-field-click="tablefieldClick" |
| | | :pagesize="pagesize" |
| | | :pagenum="pagenum" |
| | | :total="total" |
| | | :table-height="tableHeight" |
| | | :is-highlight-row="true" |
| | | |
| | | :isdraggableorder="false" |
| | | v-on:get-data="getData" |
| | | |
| | | v-on:cell-click="cellClick" |
| | | v-on:row-click="rowClick" |
| | | v-on:order-fields="orderTableFields" |
| | | v-on:orderby-change="orderbyChange" |
| | | > |
| | | </h-table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div id="page_loading" style="position: absolute; top:0px; width: 100vw; height: 50vh;"> |
| | | <div class="spinner"> |
| | | <div class="cube1"></div> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <style> |
| | | [v-cloak] { |
| | | display: none !important; |
| | | } |
| | | .prefixclass { |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 5px; |
| | | background-color: #e6372b; |
| | | display: inline-block; |
| | | } |
| | | </style> |
| | | </body> |
| | | </html> |