| | |
| | | title: "数量单确认", |
| | | //Tab项设置 |
| | | tabs_d: [ |
| | | {code: "matched", name: "匹配数量单", dataname: "md_org_customer", filterTxt: "", orderby: "md_org.update_time desc, md_org.code"}, |
| | | {code: "notmatched", name: "不匹配数量单", dataname: "md_org_account", filterTxt: "(md_org_account.state_code='OpeningApproval' or md_org_account.state_code='Open' or md_org_account.state_code='CooperateApproval')", orderby: "md_org_account.update_time desc, md_org_account.code"}, |
| | | {code: "Open", name: "已确认数量单", dataname: "md_org_partnership", filterTxt: "md_org_account.state_code='Incooperation'", orderby: "md_org_account.update_time desc, md_org_account.code"}, |
| | | {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",}, |
| | | |
| | | { 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, |
| | |
| | | //设置工具栏事件 |
| | | 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); |
| | | // var metas = clone(result.meta[me.selectTabObj.dataname].fields); |
| | | var filterFields_ = []; |
| | | var tableFields_ = []; |
| | | |
| | | metas.map(f=>{ |
| | | f.isshow = "T"; |
| | | 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"; |
| | | // } |
| | | // } |
| | | |
| | | if(me.selectTabObj.code == "distributorlist" && f.field == 'ncc_code'){ |
| | | f.isshow = "F"; |
| | | f.isfilter = false; |
| | | if (f.field != 'state_code') { |
| | | filterFields_.push(clone(f)) |
| | | |
| | | } |
| | | |
| | | if(f.field == 'category_code' || f.field == 'is_preload' || f.field == 'credit_amt' || f.field == 'credit_available' || f.field == 'order_date' || f.field == 'hope_delivery' || f.field == 'amt_available'){ |
| | | f.isshow = "F"; |
| | | } |
| | | if (f.isfilter) { |
| | | if (f.field == "state_name") { |
| | | 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)); |
| | | }) |
| | | |
| | |
| | | if (!me.selectTabObj.filterFields || (me.selectTabObj.filterFields && me.selectTabObj.filterFields.length == 0)) { |
| | | |
| | | me.selectTabObj.filterFields = clone(filterFields_); |
| | | me.selectTabObj.tableFields = clone(tableFields_); |
| | | me.selectTabObj.tableFields = clone(me.default_tableFields[me.activeTabName]); |
| | | |
| | | //字段数组转字段obj,目的为了筛选时获取字段属性 |
| | | me.fieldsToFieldsObj(); |
| | |
| | | var filterfieldClick = {}; |
| | | //表格字段事件设置 |
| | | tablefieldClick.All = { |
| | | |
| | | state_name: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: "",//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "流程步骤", |
| | | id: "customer_acct" + obj.row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/tool/page/popup_workflow_step_user.html?v=2023020703", |
| | | data: obj.row, |
| | | delta: {machine_code: "Org_Account_Open", dataname: "md_org_account"}, |
| | | sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | md_org__code: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: "",//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | var url = "customer_acct.html"; |
| | | if (obj.row.state_code == 'CloseingApproval' || obj.row.state_code == 'Rejected' || obj.row.state_code == 'CloseingSaleInput' || obj.row.state_code == 'Closed') { |
| | | url = "customer_close.html"; |
| | | } |
| | | var row = {} |
| | | if (me.activeTabName == "matched" || me.activeTabName == "distributorlist") { // 客商信息 |
| | | row = obj.row; |
| | | } |
| | | else if (me.activeTabName == "nccsy") { // NCC首营 |
| | | row = { |
| | | id: obj.row.org_id, |
| | | }; |
| | | } |
| | | else { |
| | | row = { |
| | | id: obj.row.org_id, |
| | | }; |
| | | } |
| | | |
| | | url = "customer_basic.html"; |
| | | |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "客商信息详情", |
| | | id: "customer_acct" + row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/" + url, |
| | | data: row, |
| | | delta: {closeCode:"1"}, |
| | | sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | code: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: "",//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | var url = "customer_basic_acct.html"; |
| | | if (obj.row.state_code == 'CloseingApproval' || obj.row.state_code == 'Rejected' || obj.row.state_code == 'CloseingSaleInput' || obj.row.state_code == 'Closed') { |
| | | url = "customer_close.html"; |
| | | } |
| | | if (me.activeTabName == "matched" || me.activeTabName == "distributorlist") { // 客商信息 |
| | | url = "customer_basic.html"; |
| | | } |
| | | else if (me.activeTabName == "nccsy") { // NCC首营 |
| | | url = "customer_ncc.html"; |
| | | } |
| | | |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "80vh", |
| | | icon: "icon-product", |
| | | text: "客商信息详情", |
| | | id: "customer_acct" + obj.row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/" + url, |
| | | data: obj.row, |
| | | delta: {closeCode:"1"}, |
| | | sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | |
| | | name: { |
| | | input: { |
| | | valuekey: "name", // 输入框搜索时的选项对应字段 |
| | | onQuerySearch: function(obj, callback) { // 输入框搜索事件 |
| | | let param_ = { |
| | | dataname: "md_org_customer", |
| | | filter: obj.fieldobj.field + " like '%" + obj.inputstring + "%'", |
| | | orderby: obj.fieldobj.field |
| | | } |
| | | Server.call("root/data/getEntitySet", param_, function(result) { |
| | | var inputoptions_ = [] |
| | | if (result && result.data && result.data.entityset) { |
| | | inputoptions_ = result.data.entityset; |
| | | callback(inputoptions_) |
| | | } |
| | | else { |
| | | callback(inputoptions_) |
| | | } |
| | | |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | tablefieldClick.Change = { |
| | | state_name: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: ["草稿","录入"],//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "流程步骤", |
| | | id: "customer_acct" + obj.row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | 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(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | type_name: {//类型 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: "", |
| | | notclick_bindfield: [], |
| | | onclick: function(obj) { |
| | | //打开 |
| | | // me.openBrowseDetail(obj) |
| | | me.openChangeCustomerUser('browse', obj.row) |
| | | }, |
| | | }, |
| | | }, |
| | | |
| | | }; |
| | | |
| | | tablefieldClick.matched = { |
| | | state_name: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: ["未生效"],//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "600px", |
| | | height: "450px", |
| | | icon: "icon-product", |
| | | text: "开户信息", |
| | | id: "popup_account_state" + obj.row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/popup/page/popup_account_state.html", |
| | | data: obj.row, |
| | | // dataname:me.selectTabObj.dataname, |
| | | filter:"org_id='" + obj.row.id + "'", //标识2:无对应的字段进行过滤 |
| | | delta: {from: "customer_list_account"}, |
| | | sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | md_org__code: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: "",//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | var url = "customer_acct.html"; |
| | | if (obj.row.state_code == 'CloseingApproval' || obj.row.state_code == 'Rejected' || obj.row.state_code == 'CloseingSaleInput' || obj.row.state_code == 'Closed') { |
| | | url = "customer_close.html"; |
| | | } |
| | | /* |
| | | tabs_d: [ |
| | | {code: "matched", name: "客商列表", dataname: "md_org", filterTxt: "actor_id<>'Master'", orderby: "update_time desc, code"}, |
| | | {code: "nccsy", name: "NCC首营", dataname: "md_org_account_ncc", filterTxt: "1=1", orderby: "update_time desc, code"}, |
| | | {code: "notmatched", name: "待开户", dataname: "md_org_account", filterTxt: "md_org_account.state_code='Input'", orderby: "update_time desc, code"}, |
| | | {code: "Open", name: "已开户", dataname: "md_org_account", filterTxt: "md_org_account.state_code='Open'", orderby: "update_time desc, code"}, |
| | | {code: "Close", name: "已关闭", dataname: "md_org_account", filterTxt: "md_org_account.state_code='Close'", orderby: "update_time desc, code"}, |
| | | {code: "All", name: "全部", dataname: "md_org_account", filterTxt: "1=1", orderby: "md_org_account.update_time desc, code"}, |
| | | {code: "Change", name: "变更申请", dataname: "md_org_account_change", orderby: "update_time desc"}, |
| | | ], |
| | | |
| | | */ |
| | | var row = {} |
| | | if (me.activeTabName == "matched") { // 客商信息 |
| | | row = obj.row; |
| | | } |
| | | else if (me.activeTabName == "nccsy") { // NCC首营 |
| | | row = { |
| | | id: obj.row.org_id, |
| | | }; |
| | | } |
| | | |
| | | url = "customer_basic.html"; |
| | | |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "客商信息详情", |
| | | id: "customer_acct" + row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/" + url, |
| | | data: row, |
| | | delta: {closeCode:"1"}, |
| | | sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | code: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: "",//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | var url = "customer_acct.html"; |
| | | if (obj.row.state_code == 'CloseingApproval' || obj.row.state_code == 'Rejected' || obj.row.state_code == 'CloseingSaleInput' || obj.row.state_code == 'Closed') { |
| | | url = "customer_close.html"; |
| | | } |
| | | /* |
| | | tabs_d: [ |
| | | {code: "matched", name: "客商列表", dataname: "md_org", filterTxt: "actor_id<>'Master'", orderby: "update_time desc, code"}, |
| | | {code: "nccsy", name: "NCC首营", dataname: "md_org_account_ncc", filterTxt: "1=1", orderby: "update_time desc, code"}, |
| | | {code: "notmatched", name: "待开户", dataname: "md_org_account", filterTxt: "md_org_account.state_code='Input'", orderby: "update_time desc, code"}, |
| | | {code: "Open", name: "已开户", dataname: "md_org_account", filterTxt: "md_org_account.state_code='Open'", orderby: "update_time desc, code"}, |
| | | {code: "Close", name: "已关闭", dataname: "md_org_account", filterTxt: "md_org_account.state_code='Close'", orderby: "update_time desc, code"}, |
| | | {code: "All", name: "全部", dataname: "md_org_account", filterTxt: "1=1", orderby: "md_org_account.update_time desc, code"}, |
| | | {code: "Change", name: "变更申请", dataname: "md_org_account_change", orderby: "update_time desc"}, |
| | | ], |
| | | |
| | | */ |
| | | if (me.activeTabName == "matched") { // 客商信息 |
| | | url = "customer_basic.html"; |
| | | } |
| | | else if (me.activeTabName == "nccsy") { // NCC首营 |
| | | url = "customer_ncc.html"; |
| | | } |
| | | |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "客商信息详情", |
| | | id: "customer_acct" + obj.row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/" + url, |
| | | data: obj.row, |
| | | delta: {closeCode:"1"}, |
| | | sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | |
| | | name: { |
| | | input: { |
| | | valuekey: "name", // 输入框搜索时的选项对应字段 |
| | | onQuerySearch: function(obj, callback) { // 输入框搜索事件 |
| | | let param_ = { |
| | | dataname: "md_org_customer", |
| | | filter: obj.fieldobj.field + " like '%" + obj.inputstring + "%'", |
| | | orderby: obj.fieldobj.field |
| | | } |
| | | Server.call("root/data/getEntitySet", param_, function(result) { |
| | | var inputoptions_ = [] |
| | | if (result && result.data && result.data.entityset) { |
| | | inputoptions_ = result.data.entityset; |
| | | callback(inputoptions_) |
| | | } |
| | | else { |
| | | callback(inputoptions_) |
| | | } |
| | | |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | }; |
| | | tablefieldClick.nccsy = { |
| | | state_name: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: ["DMS未开户"],//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "600px", |
| | | height: "450px", |
| | | icon: "icon-product", |
| | | text: "开户信息", |
| | | id: "popup_account_state" + obj.row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/popup/page/popup_account_state.html", |
| | | data: obj.row, |
| | | dataname: "md_org_account", |
| | | filter:"md_org_account.org_ncc_id='" + obj.row.id + "'",//标识2:没有可点击的值,待验证 |
| | | delta: {from: "customer_list_account"}, |
| | | sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | md_org__code: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: "",//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | var url = "customer_acct.html"; |
| | | if (obj.row.state_code == 'CloseingApproval' || obj.row.state_code == 'Rejected' || obj.row.state_code == 'CloseingSaleInput' || obj.row.state_code == 'Closed') { |
| | | url = "customer_close.html"; |
| | | } |
| | | /* |
| | | tabs_d: [ |
| | | {code: "matched", name: "客商列表", dataname: "md_org", filterTxt: "actor_id<>'Master'", orderby: "update_time desc, code"}, |
| | | {code: "nccsy", name: "NCC首营", dataname: "md_org_account_ncc", filterTxt: "1=1", orderby: "update_time desc, code"}, |
| | | {code: "notmatched", name: "待开户", dataname: "md_org_account", filterTxt: "md_org_account.state_code='Input'", orderby: "update_time desc, code"}, |
| | | {code: "Open", name: "已开户", dataname: "md_org_account", filterTxt: "md_org_account.state_code='Open'", orderby: "update_time desc, code"}, |
| | | {code: "Close", name: "已关闭", dataname: "md_org_account", filterTxt: "md_org_account.state_code='Close'", orderby: "update_time desc, code"}, |
| | | {code: "All", name: "全部", dataname: "md_org_account", filterTxt: "1=1", orderby: "md_org_account.update_time desc, code"}, |
| | | {code: "Change", name: "变更申请", dataname: "md_org_account_change", orderby: "update_time desc"}, |
| | | ], |
| | | |
| | | */ |
| | | var row = {} |
| | | if (me.activeTabName == "matched") { // 客商信息 |
| | | row = obj.row; |
| | | } |
| | | else if (me.activeTabName == "nccsy") { // NCC首营 |
| | | row = { |
| | | id: obj.row.org_id, |
| | | }; |
| | | } |
| | | |
| | | url = "customer_basic.html"; |
| | | |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "客商信息详情", |
| | | id: "customer_acct" + row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/" + url, |
| | | data: row, |
| | | delta: {closeCode:"1"}, |
| | | sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | code: {//字段事件设置 |
| | | val: {//有值时的点击事件 |
| | | notclick_val: "",//不可点击的值,1、是数组["11","22"];2、以“;”分隔的字符串"111;222" |
| | | notclick_bindfield: [],//当该字段值等于指定字段值时不可点击["filterfield": "111"] |
| | | onclick: function(obj) {//数据值点击事件 |
| | | var url = "customer_acct.html"; |
| | | if (obj.row.state_code == 'CloseingApproval' || obj.row.state_code == 'Rejected' || obj.row.state_code == 'CloseingSaleInput' || obj.row.state_code == 'Closed') { |
| | | url = "customer_close.html"; |
| | | } |
| | | |
| | | if (me.activeTabName == "matched") { // 客商信息 |
| | | url = "customer_basic.html"; |
| | | } |
| | | else if (me.activeTabName == "nccsy") { // NCC首营 |
| | | url = "customer_ncc.html"; |
| | | } |
| | | |
| | | var config = { |
| | | totab: true, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "客商信息详情", |
| | | id: "customer_acct" + obj.row.id,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/" + url, |
| | | data: obj.row, |
| | | delta: {closeCode:"1"}, |
| | | sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | }, |
| | | }, |
| | | |
| | | name: { |
| | | input: { |
| | | valuekey: "name", // 输入框搜索时的选项对应字段 |
| | | onQuerySearch: function(obj, callback) { // 输入框搜索事件 |
| | | let param_ = { |
| | | dataname: "md_org_customer", |
| | | filter: obj.fieldobj.field + " like '%" + obj.inputstring + "%'", |
| | | orderby: obj.fieldobj.field |
| | | } |
| | | Server.call("root/data/getEntitySet", param_, function(result) { |
| | | var inputoptions_ = [] |
| | | if (result && result.data && result.data.entityset) { |
| | | inputoptions_ = result.data.entityset; |
| | | callback(inputoptions_) |
| | | } |
| | | else { |
| | | callback(inputoptions_) |
| | | } |
| | | |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | if (this.activeTabName == "Change") { |
| | | this.selectTabObj.tablefieldClick = tablefieldClick[this.activeTabName]; |
| | | } |
| | |
| | | var tablebuttonClick = {}; |
| | | tablebuttonClick.matched = [ |
| | | { |
| | | isbuttonshow: me.cbuttons_r.add ? me.cbuttons_r.add : false,type:"primary", |
| | | code: "add",isselected: false,classname: "", |
| | | onclick: function(obj) { |
| | | me.openCustomer('add') |
| | | } |
| | | }, |
| | | { |
| | | isbuttonshow: me.cbuttons_r.customerEdit ? me.cbuttons_r.customerEdit : false,type:"primary", |
| | | code: "edit",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0] && selectRowList[0].state_code == "Input") { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | me.openCustomer('edit') |
| | | } |
| | | }, |
| | | { |
| | | name: "转预合作", isbuttonshow: true,type:"success",icon: "el-icon-news", |
| | | name: "确认", isbuttonshow: true,type:"success",icon: "el-icon-news", |
| | | code: "account",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0] && (selectRowList[0].state_code == "Open" || selectRowList[0].state_code == "Prepared")) { |
| | | if (selectRowList[0] ) { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | |
| | | // obj.selectedList |
| | | // me.closeData('browse', obj.selectedList[0]); |
| | | // me.commitData(obj.selectedList[0]); |
| | | obj.selectedList[0]['company_id'] = '1181' |
| | | obj.selectedList[0]['company_name'] = '汇宇制药' |
| | | obj.selectedList[0]['bu_id'] = 'BU-GM' |
| | | obj.selectedList[0]['bu_name'] = '肿瘤' |
| | | console.log(obj.selectedList[0]) |
| | | me.openCustomerUser('add', obj.selectedList[0]); |
| | | |
| | | } |
| | | }, |
| | | { |
| | | 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) { |
| | | |
| | | } |
| | | }, |
| | | // { |
| | |
| | | // 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: "delete", isselected: true, classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true ; |
| | | if (selectRowList[0] && selectRowList[0].state_code == 'Input') { |
| | | bo_ = false |
| | | } |
| | | return bo_; |
| | | }, |
| | | onclick: function(obj) { |
| | | me.delData() |
| | | // obj.selectedList |
| | | // me.closeData('browse', obj.selectedList[0]); |
| | | // me.closeData(); |
| | | } |
| | | }, |
| | | |
| | | |
| | | // { |
| | | // // name: "终止", // type: "primary", // icon: "el-icon-edit", |
| | |
| | | // }, |
| | | ] |
| | | |
| | | tablebuttonClick.nccsy = [ |
| | | { |
| | | name: "开户", isbuttonshow: me.cbuttons_r.accountOpenNCC ? me.cbuttons_r.accountOpenNCC : false,type:"success",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) { |
| | | me.openCustomerUserByNCCId('add', obj.selectedList[0]) |
| | | } |
| | | }, |
| | | ] |
| | | tablebuttonClick.Open = [{ |
| | | name: "重发邮件", isbuttonshow: me.cbuttons_r.accountClose ? me.cbuttons_r.accountClose : false,type:"primary",icon: "el-icon-message", |
| | | code: "account",isselected: true,classname: "",isloading: false, |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0] && selectRowList[0].state_code == 'Open') { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | obj.buttonobj.isloading = true |
| | | me.toAccountMail(obj.selectedList[0], function(){ |
| | | obj.buttonobj.isloading = false |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | { |
| | | name: "退出", isbuttonshow: me.cbuttons_r.accountClose ? me.cbuttons_r.accountClose : false,type:"danger",icon: "el-icon-circle-close", |
| | | code: "account",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0] && selectRowList[0].state_code == 'InCooperation') { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | // me.closeData(); |
| | | me.openCustomerUser('close', obj.selectedList[0]) |
| | | } |
| | | }, |
| | | { |
| | | name: "变更", isbuttonshow: me.cbuttons_r.accountChange ? me.cbuttons_r.accountChange : false,type:"primary",icon: "el-icon-share", |
| | | code: "change",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0] && selectRowList[0].state_code == 'InCooperation') { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | me.openCustomerUser('change', obj.selectedList[0]) |
| | | } |
| | | }, |
| | | // { |
| | | // name: "编辑", isbuttonshow: me.cbuttons_r.accountCloseEdit ? me.cbuttons_r.accountCloseEdit : false,type:"primary",icon: "el-icon-edit-outline", |
| | | // code: "account",isselected: true,classname: "", |
| | | // disabled: function(selectRowList) { |
| | | // var bo_ = true; |
| | | // if (selectRowList[0] && (selectRowList[0].state_code == 'Rejected' || selectRowList[0].state_code == 'CloseingSaleInput')) { |
| | | // bo_ = false; |
| | | // } |
| | | // return bo_ |
| | | // }, |
| | | // onclick: function(obj) { |
| | | // me.closeDataEdit(); |
| | | // } |
| | | // }, |
| | | { |
| | | name: "等级设置", type: "primary", icon: "el-icon-edit", |
| | | // isbuttonshow: me.cbuttons_r.edit_degree ? me.cbuttons_r.edit_degree : false, |
| | | isbuttonshow: true, |
| | | code: "edit_degree", isselected: true, classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0]) { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | // var row = obj.selectedList[0]; |
| | | var fieldobjlist = [ |
| | | {isshow: "T", field: "degree", name: "等级", type: "input"} |
| | | ] |
| | | me.editFieldsByFieldList(fieldobjlist, obj.selectedList[0], function(suspendData){ |
| | | var selectedList_ = clone(obj.selectedList); |
| | | selectedList_.map(row=>{ |
| | | fieldobjlist.map(f=>{ |
| | | row[f.field] = suspendData[f.field] |
| | | }) |
| | | }) |
| | | me.onSaveDataByFieldLsit(selectedList_, me.selectTabObj.dataname, fieldobjlist, function(){ |
| | | me.onQuery(); |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | ] |
| | | |
| | | tablebuttonClick.notmatched = [ |
| | | { |
| | | name: "转合作", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.commitData ? me.cbuttons_r.commitData : false, type: "success", |
| | | code: "toCooperation", isselected: true, classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true ; |
| | | if (selectRowList[0] && selectRowList[0].state_code == 'Open') { |
| | | bo_ = false |
| | | } |
| | | return bo_; |
| | | }, |
| | | onclick: function(obj) { |
| | | |
| | | // obj.selectedList |
| | | // me.closeData('browse', obj.selectedList[0]); |
| | | // me.commitData(obj.selectedList[0]); |
| | | me.commitnCustomerUser('edit', obj.selectedList[0]); |
| | | } |
| | | }, |
| | | |
| | | { |
| | | // name: "详情", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.formdetail ? me.cbuttons_r.formdetail : false, |
| | | code: "formdetail", isselected: true, classname: "", |
| | | onclick: function(obj) { |
| | | // obj.selectedList |
| | | me.openCustomerUser('browse', obj.selectedList[0]); |
| | | } |
| | | }, |
| | | { |
| | | // name: "编辑", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.accountEdit ? me.cbuttons_r.accountEdit : false, |
| | | code: "edit", isselected: true, classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true ; |
| | | if (selectRowList[0] && selectRowList[0].state_code == 'Input') { |
| | | bo_ = false |
| | | } |
| | | return bo_; |
| | | }, |
| | | onclick: function(obj) { |
| | | // obj.selectedList |
| | | me.openCustomerUser('edit', obj.selectedList[0]); |
| | | } |
| | | }, |
| | | { |
| | | name: "等级设置", type: "primary", icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.edit_degree ? me.cbuttons_r.edit_degree : false, |
| | | // isbuttonshow: true, |
| | | code: "edit_degree", isselected: true, classname: "", |
| | | { |
| | | name: "冻结", isbuttonshow: true,type:"danger",icon: "el-icon-news", |
| | | code: "account",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0]) { |
| | |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | // var row = obj.selectedList[0]; |
| | | var fieldobjlist = [ |
| | | {isshow: "T", field: "degree", name: "等级", type: "input"} |
| | | ] |
| | | me.editFieldsByFieldList(fieldobjlist, obj.selectedList[0], function(suspendData){ |
| | | var selectedList_ = clone(obj.selectedList); |
| | | selectedList_.map(row=>{ |
| | | fieldobjlist.map(f=>{ |
| | | row[f.field] = suspendData[f.field] |
| | | }) |
| | | }) |
| | | me.onSaveDataByFieldLsit(selectedList_, me.selectTabObj.dataname, fieldobjlist, function(){ |
| | | me.onQuery(); |
| | | }); |
| | | }); |
| | | |
| | | } |
| | | }, |
| | | { |
| | | // name: "删除", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.delete ? me.cbuttons_r.delete : false, type: "danger", |
| | | code: "delete", isselected: true, classname: "", |
| | | name: "解除冻结", isbuttonshow: true,type:"warning",icon: "el-icon-news", |
| | | code: "account",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true ; |
| | | if (selectRowList[0] && selectRowList[0].state_code == 'Input') { |
| | | bo_ = false |
| | | } |
| | | return bo_; |
| | | var bo_ = true; |
| | | if (selectRowList[0]) { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | me.delData() |
| | | // obj.selectedList |
| | | // me.closeData('browse', obj.selectedList[0]); |
| | | // me.closeData(); |
| | | |
| | | } |
| | | }, |
| | | |
| | | ] |
| | | |
| | | tablebuttonClick.All = [ |
| | | { |
| | | // name: "详情", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.formdetail ? me.cbuttons_r.formdetail : false, |
| | | code: "formdetail", isselected: true, classname: "", |
| | | onclick: function(obj) { |
| | | // obj.selectedList |
| | | me.openCustomerUser('browse', obj.selectedList[0]); |
| | | } |
| | | }, |
| | | { |
| | | name: "等级设置", type: "primary", icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.edit_degree ? me.cbuttons_r.edit_degree : false, |
| | | code: "edit_degree", isselected: true, classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0]) { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | // var row = obj.selectedList[0]; |
| | | var fieldobjlist = [ |
| | | {isshow: "T", field: "degree", name: "等级", type: "input"} |
| | | ] |
| | | me.editFieldsByFieldList(fieldobjlist, obj.selectedList[0], function(suspendData){ |
| | | var selectedList_ = clone(obj.selectedList); |
| | | selectedList_.map(row=>{ |
| | | fieldobjlist.map(f=>{ |
| | | row[f.field] = suspendData[f.field] |
| | | }) |
| | | }) |
| | | me.onSaveDataByFieldLsit(selectedList_, me.selectTabObj.dataname, fieldobjlist, function(){ |
| | | me.onQuery(); |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | ] |
| | | tablebuttonClick.Change = [ |
| | | // { |
| | | // name: "关户", isbuttonshow: me.cbuttons_r.accountClose ? me.cbuttons_r.accountClose : false,type:"danger",icon: "el-icon-circle-close", |
| | | // code: "account",isselected: true,classname: "", |
| | | // disabled: function(selectRowList) { |
| | | // var bo_ = true; |
| | | // if (selectRowList[0] && selectRowList[0].type_code == "close" && selectRowList[0].state_code == 'Input') { |
| | | // bo_ = false; |
| | | // } |
| | | // return bo_ |
| | | // }, |
| | | // onclick: function(obj) { |
| | | // // me.closeData(); |
| | | // me.openChangeCustomerUser('edit', obj.selectedList[0]) |
| | | // } |
| | | // }, |
| | | { |
| | | name: "编辑", isbuttonshow: me.cbuttons_r.accountChange ? me.cbuttons_r.accountChange : false,type:"primary",icon: "el-icon-edit", |
| | | code: "edit",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0] && (selectRowList[0].state_code == 'Input')) { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | me.openChangeCustomerUser('edit', obj.selectedList[0]) |
| | | } |
| | | }, |
| | | ] |
| | | |
| | | if (tablebuttonClick[this.activeTabName]) { |
| | | this.selectTabObj.tablebuttonClick = tablebuttonClick[this.activeTabName]; |
| | | } |
| | | else if (this.activeTabName == "distributorlist") { |
| | | this.selectTabObj.tablebuttonClick = tablebuttonClick.matched; |
| | | } |
| | | |
| | | else { |
| | | this.selectTabObj.tablebuttonClick = [] |
| | | } |
| | |
| | | |
| | | <div :class="page_title == 'right' ? 'h_page_button_left' : 'h_page_button_right'"> |
| | | |
| | | <div style="float: right;" v-show= "selectTabObj.code == 'nccsy'"> |
| | | <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 v-show= "cbuttons_r.DownloadTemplate ? cbuttons_r.DownloadTemplate : false" type="primary" @click="DownloadTemplate" icon="el-icon-download">开户模板下载</el-button> |
| | | <el-button v-show= "cbuttons_r.imports ? cbuttons_r.imports : false" type="primary" @click="onPopupByUploadFile" icon="el-icon-upload2">批量开户导入</el-button> |
| | | <el-button type="primary" @click="" icon="el-icon-download">导出确认单</el-button> |
| | | <el-button type="primary" @click="" icon="el-icon-download">导出确认单费用明细</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> --> |
| | |
| | | <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 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> --> |