New file |
| | |
| | | <!doctype html> |
| | | <html> |
| | | <head> |
| | | <meta charset="utf-8"><meta http-equiv="Expires" content="0"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-control" content="no-cache"><meta http-equiv="Cache" content="no-cache"> |
| | | <title>经销商开户信息</title> |
| | | |
| | | <script type="text/javascript"> |
| | | var pageVue = null; |
| | | function loadJsCss(callback) { |
| | | var jscss_urls = []; |
| | | window.top.initJsCss(document, jscss_urls, callback); |
| | | }; |
| | | |
| | | function initVue() { |
| | | new FormVue({ |
| | | el: "#vbody", |
| | | data: { |
| | | dataname: "md_org_account", |
| | | table_dataname: "md_org_account_position", |
| | | |
| | | change_dataname: "md_org_account_change", |
| | | title: "经销商开户信息", |
| | | // 预加载设置 |
| | | dataRequest: [ |
| | | { |
| | | name: "md_org_master", // 公司下拉项 |
| | | dataname: "md_org_master", |
| | | // url: "root/data/newEntity", |
| | | // paramsobj: {dataname: "md_org_data"}, |
| | | isnotoption: false, //true:不是选项 |
| | | code:"id",//是下拉选项时设置 |
| | | label:"short_name",//是下拉选项时设置 |
| | | filter: "", |
| | | orderby: "name" |
| | | }, |
| | | { |
| | | name: "md_bu", // BU下拉项 |
| | | dataname: "md_bu_org", |
| | | // url: "root/data/newEntity", |
| | | // paramsobj: {dataname: "md_org_data"}, |
| | | isnotoption: false, //true:不是选项 |
| | | code:"bu_id",//是下拉选项时设置 |
| | | label:"bu_name",//是下拉选项时设置 |
| | | filter: "state_code='Open'", |
| | | orderby: "" |
| | | }, |
| | | // { |
| | | // name: "md_bu_product", // 产品下拉项 |
| | | // dataname: "md_bu_product", |
| | | // isnotoption: false, //true:不是选项 |
| | | // code:"id",//是下拉选项时设置 |
| | | // label:"product_name",//是下拉选项时设置 |
| | | // filter: "", |
| | | // orderby: "product_name" |
| | | // }, |
| | | { |
| | | name: "md_geo_province", // 省份下拉项 |
| | | dataname: "md_geo_province", |
| | | isnotoption: false, //true:不是选项 |
| | | code:"name",//是下拉选项时设置 |
| | | label:"name",//是下拉选项时设置 |
| | | filter: "", |
| | | orderby: "name" |
| | | }, |
| | | |
| | | { |
| | | name: "meta_account_position_list", // 业务负责人字段 |
| | | dataname: "md_org_account_position", |
| | | url: "root/data/getEntitySet", |
| | | paramsobj: {dataname: "md_org_account_position", attachMeta: true, filter: "1<>1"}, |
| | | isnotoption: true, //true:不是选项 |
| | | filter: "1<>1", |
| | | }, |
| | | { |
| | | name: "md_org_account_criteria_rule", //rule答卷字段 |
| | | dataname: "md_org_account_criteria_rule", |
| | | isnotoption: true, //true:不是选项 |
| | | filter: "", |
| | | }, |
| | | ], |
| | | options_md_org_master: [], |
| | | isExistsAccount: false, |
| | | exists_account: {}, // |
| | | md_bu_org_obj: {}, |
| | | options_md_bu: [], |
| | | options_md_geo_province: [], |
| | | old_md_org_account_product_obj: {}, |
| | | old_md_org_account_province_obj: {}, |
| | | productobj_map: {}, |
| | | md_bu_product_bu_obj: {}, |
| | | options_tree_product: [], |
| | | options_province: [], |
| | | options_tree_province: [], |
| | | |
| | | meta_account_position_list: [], |
| | | |
| | | meta_account_change: [], |
| | | formFields_criteria: [], |
| | | formData_change: {}, |
| | | formdata_rule_group:[], |
| | | |
| | | formAttr: { |
| | | istitle: false, |
| | | title: "表单名称", |
| | | columnnumber: 4, |
| | | labelwidth: "100px", |
| | | labelposition: "left",//"left",// right//top |
| | | size: "mini", |
| | | border: "10px solid #c6c6c600", |
| | | disabled: true |
| | | }, |
| | | formAttr_change: { |
| | | istitle: false, |
| | | title: "表单名称", |
| | | columnnumber: 4, |
| | | labelwidth: "100px", |
| | | labelposition: "left",//"left",// right//top |
| | | size: "mini", |
| | | border: "10px solid #c6c6c600", |
| | | disabled: false |
| | | }, |
| | | tableAttr: { |
| | | istitle: true, |
| | | title: "我方业务负责人", |
| | | isborder: true, // 显示表格的网格线 |
| | | toolbarobj: {} |
| | | }, |
| | | accountnccdata: {}, // NCC的数据(含经销商和公司信息) |
| | | orgdata: {}, |
| | | formFields: [], |
| | | newformData: { |
| | | //id: uuid_short(), |
| | | // code: createCode("BA"), |
| | | // create_time: createDatetime(), |
| | | credit_amt: 0, |
| | | state_code: "Input", |
| | | state_name: "草稿", |
| | | }, |
| | | newchangeformData: { |
| | | state_code: "Input", |
| | | state_name: "草稿", |
| | | }, |
| | | formData: {}, |
| | | |
| | | isRefresh: true, |
| | | tableFields: [], |
| | | newTableData: { |
| | | md_position__name:"", |
| | | position_id:"", |
| | | is_editable: false, |
| | | is_share: false, |
| | | rate_share: "", |
| | | }, |
| | | tableData: [], |
| | | tablebuttonclick: [], |
| | | |
| | | //按键权限设置 |
| | | table_isedit: false, // 表格可编辑 |
| | | isedit: false,//提交前编辑,保存/提交 |
| | | isrefuseedit: false,//拒绝后编辑,保存/再次提交 |
| | | isapproval: false,//审批,同意/拒绝/转办/退回 |
| | | isChange: false, // 是变更申请 |
| | | iscommit: false,//提交标记 |
| | | |
| | | //弹窗参数 |
| | | popupParames: {}, |
| | | //字段设置 |
| | | tablefieldClick: {}, |
| | | formfieldClick: {}, |
| | | |
| | | dheight: null, // 主体高度 |
| | | |
| | | // 审批 |
| | | reasonvisible: false, // 审批备注填写弹窗 |
| | | approveremark: "", // 审批备注 |
| | | passOrRefuse: false, // 通过或拒绝 |
| | | loading_pass: false, |
| | | |
| | | }, |
| | | created() { |
| | | this.popupParames = clone(Root.popupParames); |
| | | this.title = this.popupParames.title || this.popupParames.text |
| | | if (this.popupParames.data) { |
| | | this.formData = this.popupParames.data |
| | | } |
| | | |
| | | var customer_id = "" |
| | | if (this.popupParames.delta && this.popupParames.delta.accountnccdata) { |
| | | this.accountnccdata = clone(this.popupParames.delta.accountnccdata); |
| | | customer_id = this.accountnccdata.org_id; |
| | | } |
| | | else if (this.popupParames.delta && this.popupParames.delta.orgdata) { |
| | | this.orgdata = clone(this.popupParames.delta.orgdata); |
| | | customer_id = this.accountnccdata.id; |
| | | } |
| | | else if (this.formData.id) { |
| | | customer_id = this.formData.org_ncc_id; |
| | | } |
| | | |
| | | // 添加已开户的预加载,为了判断唯一性 |
| | | if (customer_id) { |
| | | var exists_account = { |
| | | name: "exists_account", // 公司下拉项 |
| | | dataname: "md_org_account", |
| | | // url: "root/data/newEntity", |
| | | // paramsobj: {dataname: "md_org_data"}, |
| | | isnotoption: true, //true:不是选项 |
| | | filter: "org_id='" + customer_id + "' and md_org_account.state_code in ('Open', 'OpeningApproval')", |
| | | } |
| | | if (this.formData.id) { |
| | | exists_account.filter += " and md_org_account.id<>'" + this.formData.id + "'" |
| | | } |
| | | this.dataRequest.push(exists_account); |
| | | } |
| | | |
| | | if (this.popupParames.sceneCode) { |
| | | if (this.popupParames.sceneCode == "add") {//新增 |
| | | //动态获取默认数据 |
| | | var newEntity_ = { |
| | | name: "newEntity", |
| | | url: "root/data/newEntity", |
| | | paramsobj: {dataname: this.dataname}, |
| | | isnotoption: true, //true:不是选项 |
| | | } |
| | | this.dataRequest.push(newEntity_); |
| | | |
| | | this.isedit = true; |
| | | this.table_isedit = true; |
| | | this.formAttr.disabled = false; |
| | | this.tablebuttonClick_ywlxr(); |
| | | } |
| | | else if (this.popupParames.sceneCode == "browse") {//只读 |
| | | this.formAttr.disabled = true; |
| | | } |
| | | else if (this.popupParames.sceneCode == "close") {//关户 |
| | | // this.formAttr.disabled = true; |
| | | this.change_dataname = "md_org_account_close"; |
| | | this.newchangeformData.type_code = "close"; |
| | | this.newchangeformData.type_name = "关户申请"; |
| | | var meta_account_change = { |
| | | name: "meta_account_change", // 业务负责人字段 |
| | | dataname: "md_org_account_change", |
| | | url: "root/data/getEntity", |
| | | paramsobj: {dataname: "md_org_account_change", id:"1", attachMeta: true}, |
| | | isnotoption: true, //true:不是选项 |
| | | filter: "", |
| | | } |
| | | this.dataRequest.push(meta_account_change); |
| | | |
| | | var newChangeEntity_ = { |
| | | name: "newChangeEntity", |
| | | url: "root/data/newEntity", |
| | | paramsobj: {dataname: this.change_dataname}, |
| | | isnotoption: true, //true:不是选项 |
| | | } |
| | | this.dataRequest.push(newChangeEntity_); |
| | | |
| | | this.isChange = true; |
| | | |
| | | this.table_isedit = false; |
| | | this.formAttr.disabled = true; |
| | | this.tablebuttonClick_ywlxr(); |
| | | } |
| | | else if (this.popupParames.sceneCode == "change") {//变更 |
| | | // 获取变更头字段 |
| | | var meta_account_change = { |
| | | name: "meta_account_change", // 业务负责人字段 |
| | | dataname: "md_org_account_change", |
| | | url: "root/data/getEntity", |
| | | paramsobj: {dataname: "md_org_account_change", id:"1", attachMeta: true}, |
| | | isnotoption: true, //true:不是选项 |
| | | filter: "", |
| | | } |
| | | this.dataRequest.push(meta_account_change); |
| | | |
| | | var newChangeEntity_ = { |
| | | name: "newChangeEntity", |
| | | url: "root/data/newEntity", |
| | | paramsobj: {dataname: this.change_dataname}, |
| | | isnotoption: true, //true:不是选项 |
| | | } |
| | | this.dataRequest.push(newChangeEntity_); |
| | | |
| | | this.isChange = true; |
| | | |
| | | this.table_isedit = true; |
| | | this.formAttr.disabled = false; |
| | | this.tablebuttonClick_ywlxr(); |
| | | } |
| | | else if (this.popupParames.sceneCode == "edit") {//编辑 |
| | | this.isedit = true; |
| | | this.table_isedit = true; |
| | | this.formAttr.disabled = false; |
| | | this.tablebuttonClick_ywlxr(); |
| | | } |
| | | else if (this.popupParames.sceneCode == "approval") {//审批 |
| | | this.formAttr.disabled = true; |
| | | this.isapproval = true; |
| | | } |
| | | else if (this.popupParames.sceneCode == "refuseedit") {//拒绝后的编辑 |
| | | this.isrefuseedit = true; |
| | | this.formAttr.disabled = false; |
| | | this.tablebuttonClick_ywlxr(); |
| | | } |
| | | } |
| | | }, |
| | | |
| | | mounted() { |
| | | var me = this; |
| | | var title_h = 0; |
| | | if (me.popupParames.totab){ |
| | | title_h = 42; |
| | | } |
| | | me.dheight = document.documentElement.clientHeight - 50 - title_h; |
| | | |
| | | //预加载数据 |
| | | if (this.dataRequest && this.dataRequest.length) { |
| | | var result = {}; |
| | | this.loadRequestData(this.dataRequest, result, function(data) { |
| | | me.dataRequestObj = data; |
| | | //预加载数据后给哪些字段设置options或formatterjson |
| | | if (me.dataRequestObj.newEntity) { |
| | | var formData = clone(me.dataRequestObj.newEntity.data[me.dataname]); |
| | | formData['company_id'] = '1181' |
| | | formData['company_name'] = '汇宇制药' |
| | | formData['bu_id'] = 'BU-GM' |
| | | formData['bu_name'] = '肿瘤' |
| | | // formData.product_category_name = []; |
| | | if (me.newformData) { |
| | | let formData_ = clone(formData); |
| | | |
| | | for (var k in me.newformData) { |
| | | if (!formData_[k]) { |
| | | formData_[k] = me.newformData[k]; |
| | | } |
| | | } |
| | | |
| | | me.formData = formData_; |
| | | } |
| | | } |
| | | |
| | | if (me.dataRequestObj.meta_account_position_list) { |
| | | me.meta_account_position_list = me.dataRequestObj.meta_account_position_list.meta.md_org_account_position.fields; |
| | | } |
| | | |
| | | // new 变更信息 |
| | | if (me.dataRequestObj.newChangeEntity) { |
| | | var formData = clone(me.dataRequestObj.newChangeEntity.data[me.change_dataname]); |
| | | // formData.product_category_name = []; |
| | | if (me.newchangeformData) { |
| | | let formData_ = clone(formData); |
| | | |
| | | for (var k in me.newchangeformData) { |
| | | if (!formData_[k]) { |
| | | formData_[k] = me.newchangeformData[k]; |
| | | } |
| | | } |
| | | |
| | | me.formData_change = formData_; |
| | | } |
| | | } |
| | | // 获取变更的字段 |
| | | if (me.dataRequestObj.meta_account_change) { |
| | | var meta_account_change_ = me.dataRequestObj.meta_account_change.meta.md_org_account_change.fields; |
| | | meta_account_change_.map(f=>{ |
| | | f.isshow = "T"; |
| | | f.group_name = "变更信息" |
| | | if (me.popupParames.sceneCode == "close" && f.field == "type_code") { //当为关户时,变更类型不可更改 |
| | | f.readonly = true |
| | | f.optionsgroup = "account_type_close" |
| | | } |
| | | else if (f.field == "type_code") { //变更类型的下拉控制 |
| | | console.log(f.optionsgroup); |
| | | f.optionsgroup = "account_type" |
| | | } |
| | | |
| | | if(f.field == "termination_date") {//终止日期范围设置 |
| | | f.pickerOptions = { |
| | | disabledDate: function(time) { |
| | | var currentDate = new Date(); |
| | | currentDate.setDate(currentDate.getDate() - 1); |
| | | return time < currentDate |
| | | }, |
| | | cellClassName: function(date) { |
| | | return "aaaa"; |
| | | } |
| | | } |
| | | } |
| | | // if (dataname_ == "md_org_account" && f.field == "company_id") { |
| | | // f.options = me.options_md_org_master; |
| | | // } |
| | | }) |
| | | |
| | | me.meta_account_change = meta_account_change_; |
| | | } |
| | | |
| | | |
| | | if (me.dataRequestObj.md_org_master) { |
| | | me.options_md_org_master = me.dataRequestObj.md_org_master; |
| | | } |
| | | |
| | | if (me.dataRequestObj.exists_account) { |
| | | var exists_account_ = []; |
| | | var exists_account_ = {}; |
| | | exists_account_ = me.dataRequestObj.exists_account; |
| | | exists_account_.map(account=>{ |
| | | // 公司 + BU + 开户类型 + 经销商 |
| | | var account_id_filter = account.company_id + account.bu_id + account.actor_code + account.org_id |
| | | exists_account_[account_id_filter] = account.id; |
| | | }) |
| | | me.exists_account = clone(exists_account_) |
| | | } |
| | | |
| | | if (me.dataRequestObj.md_bu) { |
| | | // exists_account |
| | | var md_bu_org_obj_ = {}; |
| | | var options_md_bu = []; |
| | | var md_bu_list = clone(me.dataRequestObj.md_bu); |
| | | md_bu_list.map(bl=>{ |
| | | if (!md_bu_org_obj_[bl.company_id]) { |
| | | md_bu_org_obj_[bl.company_id] = []; |
| | | } |
| | | // if (!exists_account_[bl.code]) { |
| | | md_bu_org_obj_[bl.company_id].push(bl); |
| | | // } |
| | | }) |
| | | me.md_bu_org_obj = clone(md_bu_org_obj_) |
| | | // me.options_md_bu = me.dataRequestObj.md_bu; |
| | | } |
| | | // options_tree_product |
| | | // if (me.dataRequestObj.md_bu_product) { |
| | | // var md_bu_product_array_ = clone(me.dataRequestObj.md_bu_product); |
| | | // var md_bu_product_line_obj_ = {}; |
| | | // var md_bu_product_line_array_ = []; |
| | | // var md_bu_product_bu_obj_ = {}; |
| | | // var productobj_map_ = {}; |
| | | |
| | | // md_bu_product_array_.map(p=>{ |
| | | // if (!md_bu_product_line_obj_[p.product_line_id]) { |
| | | // productobj_map_[p.product_line_id] = p.product_line_name; |
| | | // md_bu_product_line_obj_[p.product_line_id] = { |
| | | // code: p.product_line_id, |
| | | // value: p.product_line_name, |
| | | // bu_id: p.bu_id, |
| | | // children: [], |
| | | // } |
| | | // } |
| | | // var p_ = { |
| | | // code: p.product_id, |
| | | // value: p.product_name |
| | | // } |
| | | // productobj_map_[p.product_id] = p.product_name; |
| | | // md_bu_product_line_obj_[p.product_line_id].children.push(p_); |
| | | // }) |
| | | |
| | | // me.productobj_map = clone(productobj_map_); |
| | | |
| | | // for (var line in md_bu_product_line_obj_) { |
| | | // md_bu_product_line_array_.push(md_bu_product_line_obj_[line]); |
| | | // } |
| | | |
| | | // md_bu_product_line_array_.map(l=>{ |
| | | // if (!md_bu_product_bu_obj_[l.bu_id]) { |
| | | // md_bu_product_bu_obj_[l.bu_id] = [] |
| | | // } |
| | | // md_bu_product_bu_obj_[l.bu_id].push(l); |
| | | // }) |
| | | // me.md_bu_product_bu_obj = clone(md_bu_product_bu_obj_); |
| | | // // me.options_tree_product = md_bu_product_bu_obj[bu_id]; |
| | | // } |
| | | |
| | | // options_tree_province |
| | | if (me.dataRequestObj.md_geo_province) { |
| | | var options_tree_province_ = listTOListGroup(me.dataRequestObj.md_geo_province, "area", "value"); |
| | | // me.options_tree_province = options_tree_province_; |
| | | me.options_province = clone(me.dataRequestObj.md_geo_province); |
| | | } |
| | | if (me.dataRequestObj.md_org_account_criteria_rule) { |
| | | var obj_ = {} |
| | | me.formFields_criteria = me.dataRequestObj.md_org_account_criteria_rule; |
| | | me.formFields_criteria.map(e=>{ |
| | | if (!obj_[e.group_code]) { |
| | | var obj = {} |
| | | obj_[e.group_code] = e.group_code |
| | | obj_[e.group_name] = e.group_name |
| | | //obj_用作检测是否重复,若未重复,则将该obj放入(而不是放入obj_) 构建的formdata_rule_group结构如下 |
| | | // formdata_rule_group:[{group_name:'客观评分',group_code:'Objective',children:[]},{group_name:'主观评分',group_code:'Subjective',children:[]}], |
| | | obj['group_code'] = e.group_code |
| | | obj['group_name'] = e.group_name |
| | | obj['type_code'] = e.type_code |
| | | obj['type_name'] = e.type_name |
| | | obj['children'] = [] |
| | | // obj.children.push(e) |
| | | me.formdata_rule_group.push(obj) |
| | | } |
| | | }) |
| | | } |
| | | me.initData(); |
| | | |
| | | // 以服务的方式调用的 Loading 需要异步关闭 |
| | | me.$nextTick(() => { |
| | | hideLoading(); |
| | | }); |
| | | }); |
| | | } |
| | | else { |
| | | this.initData(); |
| | | // 以服务的方式调用的 Loading 需要异步关闭 |
| | | me.$nextTick(() => { |
| | | hideLoading(); |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | methods:{ |
| | | //关闭弹窗 |
| | | closeDialog() { |
| | | var me = this; |
| | | if (me.popupParames.totab){ |
| | | Root.tab.removeItem(Root.tab.selected); |
| | | Root.tab.open(me.popupParames.parentOption, false); |
| | | } |
| | | else { |
| | | Root.hidePopup(); |
| | | } |
| | | }, |
| | | //关闭前调回调 |
| | | saveAfter() { |
| | | var me = this; |
| | | if(this.popupParames.callback) { |
| | | let obj = { |
| | | //row: this.formData |
| | | } |
| | | this.popupParames.callback(obj, function() { |
| | | me.closeDialog(); |
| | | }); |
| | | } |
| | | else { |
| | | me.closeDialog(); |
| | | } |
| | | }, |
| | | |
| | | // 事件 |
| | | tablebuttonClick_ywlxr() { |
| | | var me = this; |
| | | var tablebuttonClick = []; |
| | | tablebuttonClick = [ |
| | | { |
| | | // name: "新增", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: this.table_isedit, |
| | | code: "add", isselected: false, classname: "", |
| | | onclick: function(obj) { |
| | | // popup_position |
| | | // 获取授权产品 |
| | | if (!me.formData.bu_id) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请先选择BU' |
| | | }); |
| | | return; |
| | | } |
| | | else { |
| | | me.openPositionTree("add", function(popupobj){ |
| | | var table_row = clone(me.newTableData); |
| | | table_row.position_id = popupobj.row.id; |
| | | table_row.md_position_hierarchy__position_path = popupobj.row.md_position_hierarchy__position_path; |
| | | table_row.md_position_hierarchy__employee_name = popupobj.row.md_position_hierarchy__employee_name; |
| | | |
| | | me.addTableData(table_row) |
| | | }); |
| | | } |
| | | |
| | | } |
| | | }, |
| | | { |
| | | // name: "删除", , // icon: "el-icon-edit", |
| | | isbuttonshow: this.table_isedit, type: "danger", |
| | | code: "delete", isselected: true, classname: "", |
| | | onclick: function(obj) { |
| | | var row = obj.selectedList[0]; |
| | | var txt = clone(row.md_position_hierarchy__position_path) + clone(row.md_position_hierarchy__employee_name); |
| | | me.deleteDataById(row.id, me.table_dataname, "【" + txt + "】", function(){ |
| | | me.tableData.splice(obj.selectRowIndex, 1); |
| | | |
| | | var tableData_ = clone(me.tableData); |
| | | if (row.is_main_approver) { |
| | | if (tableData_.length) { |
| | | tableData_[0].is_main_approver = true; |
| | | me.tableData = clone(tableData_); |
| | | } |
| | | } |
| | | }) |
| | | // me.tableData.remove(obj.selectedList[0]) |
| | | // obj.selectedList |
| | | // me.closeData('browse', obj.selectedList[0]); |
| | | // me.closeData(); |
| | | |
| | | |
| | | } |
| | | }, |
| | | ] |
| | | |
| | | this.tablebuttonclick = tablebuttonClick; |
| | | }, |
| | | |
| | | initData() { |
| | | let me = this |
| | | var id_ = null; |
| | | if (this.formData.id) { |
| | | id_ = this.formData.id; |
| | | } |
| | | this.getRowDataById(id_, function(result) {//查询后的回调,用于获取字段的 |
| | | if (result.data.md_org_account_criteria && result.data.md_org_account_criteria.length>0) { |
| | | var criteria_data = [] |
| | | me.formData_criteria = result.data.md_org_account_criteria |
| | | me.formFields_criteria.map(f=>{ |
| | | me.formData_criteria.map(v=>{ |
| | | if (f.id == v.criteria_id) { |
| | | var obj_ = {} |
| | | Object.assign(obj_,f,v) |
| | | criteria_data.push(obj_) |
| | | } |
| | | }) |
| | | }) |
| | | me.formdata_rule_group.map(g => { |
| | | criteria_data.map(v => { |
| | | if (v.group_code == g.group_code) { |
| | | g.children.push(v) |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | else { |
| | | me.formdata_rule_group.map(g=>{ |
| | | me.formFields_criteria.map(f=>{ |
| | | if(f.group_code == g.group_code) { |
| | | g.children.push(f) |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | if (result.meta) { |
| | | var metaBydataname = {}; |
| | | for (var dataname_ in result.meta) { |
| | | var formFields_ = []; |
| | | var metas = clone(result.meta[dataname_].fields); |
| | | |
| | | if (dataname_ == "md_org_account_position") { |
| | | metas = clone(me.meta_account_position_list); |
| | | } |
| | | |
| | | metas.map(f=>{ |
| | | f.isshow = "T"; |
| | | |
| | | if (dataname_ == "md_org_account" && f.field == "company_id") { |
| | | f.options = me.options_md_org_master; |
| | | } |
| | | else if (dataname_ == "md_org_account" && f.field == "actor_code") { |
| | | if (me.isChange) { |
| | | f.readonly = true |
| | | } |
| | | if (me.formData.md_org__source && me.formData.md_org__source == "NCC") { |
| | | f.optionsgroup = "actor_ncc"; |
| | | } |
| | | else if (me.formData.md_org__source && me.formData.md_org__source == "DMS") { |
| | | f.optionsgroup = "actor_dms"; |
| | | } |
| | | |
| | | } |
| | | else if (dataname_ == "md_org_account" && f.field == "authorize_province") { |
| | | f.options = me.options_province; |
| | | f.isfilterable = true |
| | | } |
| | | else if (dataname_ == "md_org_account" && f.field == "bu_id") { |
| | | f.options = [] |
| | | if (me.isChange) { |
| | | f.readonly = true |
| | | } |
| | | } |
| | | else if (dataname_ == "md_org_account" && me.accountnccdata.id && (f.field == "company_name" || f.field == "account_name")) { |
| | | f.inputtype = "span"; |
| | | } |
| | | else if (dataname_ == "md_org_account" && me.isChange && (f.field == "company_name" || f.field == "account_name")) { |
| | | f.inputtype = "span"; |
| | | } |
| | | else if (dataname_ == "md_org_account" && me.orgdata.id && f.field == "account_name") { |
| | | f.inputtype = "span"; |
| | | } |
| | | else if (dataname_ == "md_org_account" && f.field == "company_name") { |
| | | f.inputtype = "span"; |
| | | } |
| | | else if (dataname_ == "md_org_account_position") { |
| | | if (f.field == "md_org_account__account_name" |
| | | || f.field == "creator_name" |
| | | || f.field == "create_time" |
| | | || f.field == "update_time" |
| | | || f.field == "md_org_account__actor_name" |
| | | || f.field == "md_org_account__company_name" |
| | | || f.field == "md_org_account__bu_name") { |
| | | f.isshow = "F"; |
| | | } |
| | | if (f.field == "md_position__name") { |
| | | f.inputtype = "popup" |
| | | } |
| | | |
| | | } |
| | | |
| | | // 在授权省份说明前加授权产品和授权省份 |
| | | // if (dataname_ == "md_org_account" && f.field == "authorize_province_remark") { |
| | | // if (result.meta["md_org_account_product"].fields) { |
| | | // var metas_ = clone(result.meta["md_org_account_product"].fields); |
| | | // metas_.map(mp=>{ |
| | | // if (mp.field == "product_id") { |
| | | // mp.isshow = "T"; |
| | | // mp.colspan = 2; |
| | | // mp.group_name = "开户信息"; |
| | | // // mp.props = {label: "value", value: "code", multiple: true, checkStrictly: true}; |
| | | // mp.props = {label: "value", value: "code", multiple: true}; |
| | | // if (me.formData.bu_id) { |
| | | // mp.options = clone(me.md_bu_product_bu_obj[me.formData.bu_id]); |
| | | // } |
| | | // else { |
| | | // mp.options = []; |
| | | // } |
| | | // formFields_.push(clone(mp)); |
| | | // } |
| | | // }) |
| | | // } |
| | | // if (result.meta["md_org_account_province"] && result.meta["md_org_account_province"].fields) { |
| | | // var metas_ = clone(result.meta["md_org_account_province"].fields); |
| | | // metas_.map(mp=>{ |
| | | // if (mp.field == "province") { |
| | | // mp.isshow = "T"; |
| | | // mp.colspan = 2; |
| | | // mp.group_name = "开户信息"; |
| | | // mp.props = {label: "value", value: "code", multiple: true }; |
| | | // mp.options = me.options_tree_province; |
| | | // formFields_.push(clone(mp)); |
| | | // } |
| | | // }) |
| | | // } |
| | | // } |
| | | |
| | | formFields_.push(clone(f)); |
| | | }) |
| | | |
| | | if (dataname_ == "md_org_account") { |
| | | me.formFields = clone(formFields_); |
| | | } |
| | | else if (dataname_ == "md_org_account_position") { |
| | | me.tableFields = clone(formFields_); |
| | | } |
| | | |
| | | // metaBydataname[dataname_] = clone(formFields_); |
| | | } |
| | | |
| | | //字段数组转字段obj,目的为了筛选时获取字段属性 |
| | | me.fieldsToFieldsObj(); |
| | | |
| | | //设置字段事件 |
| | | me.tableFieldClick(); |
| | | } |
| | | //数据处理 |
| | | |
| | | |
| | | var formData_ = {}; |
| | | if (me.accountnccdata.id) { |
| | | formData_ = { |
| | | // NCCid |
| | | org_ncc_id: me.accountnccdata.id, |
| | | // 公司 |
| | | company_id: me.accountnccdata.company_id, |
| | | company_name: me.accountnccdata.company_name, |
| | | |
| | | // 经销商 |
| | | org_id: me.accountnccdata.org_id, |
| | | account_name: me.accountnccdata.md_org__name, |
| | | business_address: me.accountnccdata.md_org__business_address, |
| | | |
| | | // 经销商关联信息 |
| | | business_person: me.accountnccdata.md_org__business_person, |
| | | business_phone: me.accountnccdata.md_org__business_phone, |
| | | business_email: me.accountnccdata.md_org__business_email, |
| | | md_org__license_business_no: me.accountnccdata.md_org__license_business_no, |
| | | md_org__register_address: me.accountnccdata.md_org__register_address, |
| | | md_org__code: me.accountnccdata.md_org__code, |
| | | md_org__ncc_code: me.accountnccdata.md_org__ncc_code, |
| | | md_org__province: me.accountnccdata.md_org__province, |
| | | md_org__city: me.accountnccdata.md_org__city, |
| | | md_org__county: me.accountnccdata.md_org__county, |
| | | |
| | | md_org__receive_address: me.accountnccdata.md_org__receive_address, |
| | | md_org__receiver_name: me.accountnccdata.md_org__receiver_name, |
| | | md_org__receiver_phone: me.accountnccdata.md_org__receiver_phone, |
| | | |
| | | } |
| | | for (var k in me.formData) { |
| | | if (me.formData[k]){ |
| | | formData_[k] = me.formData[k]; |
| | | } |
| | | } |
| | | } |
| | | else if (me.orgdata.id) { |
| | | formData_ = { |
| | | // 经销商 |
| | | org_id: me.orgdata.id, |
| | | account_name: me.orgdata.name, |
| | | business_address: me.orgdata.business_address, |
| | | |
| | | // 经销商关联信息 |
| | | business_person: me.orgdata.business_person, |
| | | business_phone: me.orgdata.business_phone, |
| | | business_email: me.orgdata.business_email, |
| | | md_org__license_business_no: me.orgdata.license_business_no, |
| | | md_org__register_address: me.orgdata.register_address, |
| | | md_org__code: me.orgdata.code, |
| | | md_org__ncc_code: me.orgdata.ncc_code, |
| | | md_org__province: me.orgdata.province, |
| | | md_org__city: me.orgdata.city, |
| | | md_org__county: me.orgdata.county, |
| | | |
| | | md_org__receive_address: me.orgdata.receive_address, |
| | | md_org__receiver_name: me.orgdata.receiver_name, |
| | | md_org__receiver_phone: me.orgdata.receiver_phone, |
| | | } |
| | | for (var k in me.formData) { |
| | | if (me.formData[k]){ |
| | | formData_[k] = me.formData[k]; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (me.rowData[me.dataname]) { |
| | | formData_ = me.rowData[me.dataname]; |
| | | } |
| | | |
| | | // 如果选择了公司, 则bu的下拉项根据公司来 |
| | | if (formData_.company_id) { |
| | | var formFields_ = clone(me.formFields); |
| | | formFields_.map(f=>{ |
| | | if (f.field == "bu_id") { |
| | | if (me.md_bu_org_obj[formData_.company_id] && me.md_bu_org_obj[formData_.company_id].length) { |
| | | f.options = clone(me.md_bu_org_obj[formData_.company_id]) |
| | | } |
| | | } |
| | | }) |
| | | |
| | | me.formFields = clone(formFields_); |
| | | } |
| | | |
| | | if (me.rowData[me.table_dataname]) { |
| | | me.tableData = me.rowData[me.table_dataname]; |
| | | } |
| | | |
| | | // if (me.rowData["md_org_account_product"]) { |
| | | // var product_id_ = [] |
| | | // me.old_md_org_account_product_obj = {}; |
| | | // me.rowData["md_org_account_product"].map(p=>{ |
| | | // me.old_md_org_account_product_obj[p.product_line_id + p.product_id] = p; |
| | | // var select_p_ = [p.product_line_id, p.product_id]; |
| | | // product_id_.push(select_p_); |
| | | // }) |
| | | // formData_.product_id = product_id_ |
| | | // } |
| | | // if (me.rowData["md_org_account_province"]) { |
| | | // var province_id_ = [] |
| | | // me.old_md_org_account_province_obj = {}; |
| | | // me.rowData["md_org_account_province"].map(p=>{ |
| | | // me.old_md_org_account_province_obj[p.area + p.province] = p; |
| | | // var select_p_ = [p.area, p.province]; |
| | | // province_id_.push(select_p_); |
| | | // }) |
| | | // formData_.province = province_id_; |
| | | // } |
| | | |
| | | // 设置初始化数据 |
| | | me.formData = getDataByFields(formData_, me.formFields); |
| | | |
| | | /* |
| | | param.data["md_org_account_product"] = table_products_; |
| | | param.data["md_org_account_province"] = table_provinces_; |
| | | if (r == "product_id") { |
| | | var products_ = entity_[r]; |
| | | products_.map(p=>{ |
| | | var p_ = { |
| | | product_line_id: p[0] |
| | | }; |
| | | if (p.length == 2) { |
| | | p_.product_id = p[1]; |
| | | } |
| | | |
| | | table_products_.push(p_); |
| | | }) |
| | | } |
| | | else if (r == "province") { |
| | | var provinces_ = entity_[r]; |
| | | provinces_.map(p=>{ |
| | | var p_ = { |
| | | area: p[0], |
| | | province: p[1] |
| | | }; |
| | | table_provinces_.push(p_); |
| | | }) |
| | | } |
| | | |
| | | */ |
| | | |
| | | |
| | | // 业务负责人 |
| | | me.getPositionDataByAccountId(); |
| | | }) |
| | | }, |
| | | |
| | | openPositionTree(sceneCode, callback) { |
| | | var me = this; |
| | | var data_ = {}; |
| | | var text_ = "岗位负责人" |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "500px", |
| | | height: "80vh", |
| | | icon: "icon-product", |
| | | text: text_ + "选择", |
| | | id: "popup_position",//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/popup/page/popup_position.html", |
| | | data: data_, |
| | | delta: { |
| | | company_id: me.formData.company_id, |
| | | bu_id: me.formData.bu_id, |
| | | select_position: this.tableData // position_id |
| | | }, |
| | | // filter: "org_id='"+ me.selectedrow.org_id + "' and bu_id='" + me.selectedrow.bu_id + "'", |
| | | sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(popupobj, popupcallback) { |
| | | callback(popupobj) |
| | | |
| | | if (popupcallback) { |
| | | popupcallback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | deleteDataById(id, dataname, confirm_txt, callback){ |
| | | var me = this; |
| | | var formData_ = clone(me.formData); |
| | | Root.confirm('确定删除该' + "我方业务负责人" + confirm_txt + '吗?', '删除提示', { |
| | | confirmButtonText: '删除', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | if (id) { |
| | | let param = { |
| | | dataname: dataname, |
| | | id: id |
| | | } |
| | | Server.call("root/data/deleteEntity", param, function(result) { |
| | | console.log(result); |
| | | if (result && result.data) { |
| | | callback(); |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | callback(); |
| | | } |
| | | |
| | | }).catch(() => { |
| | | Root.message({ |
| | | type: 'info', |
| | | message: '已取消删除' |
| | | }); |
| | | }); |
| | | |
| | | }, |
| | | |
| | | getPositionDataByAccountId() { |
| | | var me = this; |
| | | if (!this.formData.id) { |
| | | return |
| | | } |
| | | var params = { |
| | | dataname: "md_org_account_position", |
| | | filter: [ |
| | | {"field": "parent_id", "value": this.formData.id}, |
| | | ] |
| | | } |
| | | Server.call("root/data/getEntitySet", params, function(result) { |
| | | if (result && result.data && result.data.entityset && result.data.entityset.length) { |
| | | var data_ = result.data.entityset; |
| | | me.tableData = data_; |
| | | } |
| | | |
| | | me.$nextTick(() => { |
| | | me.isRefresh = true; |
| | | me.$forceUpdate(); |
| | | }); |
| | | }) |
| | | }, |
| | | |
| | | tableFieldClick() { |
| | | var me = this; |
| | | //表单字段事件设置 |
| | | this.formfieldClick = { |
| | | |
| | | actor_code: { |
| | | select: { |
| | | onchange: function(obj) { |
| | | obj.data.actor_code = obj.selectoption.code || ""; |
| | | obj.data.actor_name = obj.selectoption.value || ""; |
| | | } |
| | | } |
| | | }, |
| | | company_id: { |
| | | select: { |
| | | onchange: function(obj) { |
| | | obj.data.company_name = obj.selectoption.value || ""; |
| | | |
| | | //更改bu下拉项 |
| | | var formFields_ = clone(me.formFields); |
| | | formFields_.map(f=>{ |
| | | if (f.field == "bu_id") { |
| | | if (me.md_bu_org_obj[me.formData.company_id] && me.md_bu_org_obj[me.formData.company_id].length) { |
| | | f.options = clone(me.md_bu_org_obj[me.formData.company_id]) |
| | | } |
| | | } |
| | | }) |
| | | me.formFields = clone(formFields_); |
| | | } |
| | | } |
| | | }, |
| | | bu_id: { |
| | | select: { |
| | | onchange: function(obj) { |
| | | obj.data.bu_name = obj.selectoption.value || ""; |
| | | obj.data.product_id = []; |
| | | var formFields_ = clone(me.formFields); |
| | | |
| | | formFields_.map(f=>{ |
| | | if (f.field == "product_id") { |
| | | if (obj.selectoption.id) { |
| | | f.options = clone(me.md_bu_product_bu_obj[obj.selectoption.id]); |
| | | } |
| | | else { |
| | | f.options = []; |
| | | } |
| | | } |
| | | }) |
| | | me.formFields = clone(formFields_); |
| | | } |
| | | } |
| | | }, |
| | | business_need_code: { |
| | | select: { |
| | | onchange: function(obj) { |
| | | obj.data.business_need_name = obj.selectoption.value || ""; |
| | | } |
| | | } |
| | | }, |
| | | |
| | | platform_account_name: { |
| | | popup: { |
| | | onclick: function(obj) {//弹窗点击事件 |
| | | var filter_ = " 1=1 " |
| | | if (me.formData.bu_name) { |
| | | // filter_ = "company_name='" + this.formData.company_name + "' and bu_name='" + this.formData.bu_name + "' and actor_code='Platform'" |
| | | filter_ = "bu_name='" + me.formData.bu_name + "' and actor_code='Platform'" |
| | | } |
| | | else { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请先选择BU' |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | //打开开户平台弹窗 |
| | | me.openAccount(filter_, "add", obj, function(popupobj){ |
| | | let row_ = clone(me.formData); |
| | | row_.platform_account_id = popupobj.row.id; |
| | | row_.platform_account_code = popupobj.row.code; |
| | | row_.platform_org_id = popupobj.row.org_id; |
| | | row_.platform_account_name = popupobj.row.account_name; |
| | | |
| | | me.formData = clone(row_); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | replace_account_name: { |
| | | popup: { |
| | | onclick: function(obj) {//弹窗点击事件 |
| | | var filter_ = " md_org_account.id<>'"+ me.formData.id +"' and bu_name='" + me.formData.bu_name + "'" |
| | | // var filter_ = " md_org_account.id<>'"+ me.formData_change.host_id +"'" |
| | | |
| | | //打开开户平台弹窗 |
| | | me.openAccount(filter_, "add", obj, function(popupobj){ |
| | | let row_ = clone(me.formData_change); |
| | | row_.replace_account_id = popupobj.row.id; |
| | | row_.replace_account_code = popupobj.row.code; |
| | | row_.replace_account_name = popupobj.row.account_name; |
| | | me.formData_change = clone(row_); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | |
| | | |
| | | // 变更类型 |
| | | type_code: { |
| | | select: { |
| | | onchange: function(obj) { |
| | | obj.data.type_name = obj.selectoption.value || ""; |
| | | } |
| | | } |
| | | }, |
| | | }; |
| | | |
| | | //表格字段事件设置 |
| | | this.tablefieldClick = { |
| | | is_main_approver: { |
| | | input: { |
| | | onchange: function(obj) { |
| | | // |
| | | var tableData_ = clone(me.tableData); |
| | | var index_ = obj.$index; |
| | | if (obj.row.is_main_approver) { // 该行设置为主销售, 如果还有其他行,则其他行的主销售标识消失 |
| | | // tableData_ |
| | | for (var i = 0; i < tableData_.length; i++) { |
| | | var row_ = tableData_[i]; |
| | | if (i != index_) { |
| | | row_.is_main_approver = false; |
| | | } |
| | | } |
| | | } |
| | | else { // 该行取消主销售标识时,设置第一行的为主销售 |
| | | tableData_[0].is_main_approver = true; |
| | | } |
| | | me.tableData = clone(tableData_); |
| | | } |
| | | }, |
| | | }, |
| | | md_position__name: { |
| | | popup: { |
| | | onclick: function(obj) {//弹窗点击事件 |
| | | //打开岗位弹窗 |
| | | me.openPositionEmployee("add", obj, function(popupobj){ |
| | | var ywlxr_tableData_ = clone(me.tableData); |
| | | let row_ = clone(ywlxr_tableData_[obj.$index]); |
| | | row_.md_position__name = popupobj.row.name; |
| | | row_.position_id = popupobj.row.id; |
| | | row_.region = popupobj.row.region; |
| | | row_.md_employee__name = popupobj.row.remark; |
| | | ywlxr_tableData_[obj.$index] = row_; |
| | | me.tableData = clone(ywlxr_tableData_); |
| | | // me.$set(obj,"row", row_) |
| | | // me.$forceUpdate() |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | }, |
| | | openOrg(sceneCode, filter, callback) { |
| | | var me = this; |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "800px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "选择客商", |
| | | id: "popup_customer",//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/popup/page/popup_customer.html", |
| | | data: {}, |
| | | delta: "", |
| | | // filter: "category_code='"+ me.positiondata.org_id + "' and bu_id='" + me.positiondata.bu_id + "'", |
| | | filter: filter, |
| | | sceneCode: "add",//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(popupobj, popupcallback) { |
| | | callback(popupobj); |
| | | if (popupcallback) { |
| | | popupcallback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | openAccount(filter, sceneCode, obj, callback) { |
| | | var me = this; |
| | | var data_ = {}; |
| | | var filter_ = ""; |
| | | |
| | | if (filter) { |
| | | filter_ = filter; |
| | | } |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "平台经销商选择", |
| | | id: "popup_account",//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/popup/page/popup_account.html", |
| | | data: data_, |
| | | delta: {}, |
| | | // filter: "org_id='"+ me.selectedrow.org_id + "' and bu_id='" + me.selectedrow.bu_id + "'", |
| | | filter: filter_, |
| | | sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(popupobj, popupcallback) { |
| | | callback(popupobj); |
| | | if (popupcallback) { |
| | | popupcallback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | openPositionEmployee(sceneCode, obj, callback) { |
| | | var me = this; |
| | | var data_ = {}; |
| | | // if (sceneCode == "edit") { |
| | | // data_ = obj.selectedList[0] |
| | | // } |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "800px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "岗位选择", |
| | | id: "popup_position_employee_list",//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/popup/page/popup_position_employee_list.html", |
| | | data: data_, |
| | | delta: {}, |
| | | // filter: "org_id='"+ me.selectedrow.org_id + "' and bu_id='" + me.selectedrow.bu_id + "'", |
| | | filter: "md_position.bu_id='" + this.formData.bu_id + "'", |
| | | sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(popupobj, popupcallback) { |
| | | callback(popupobj); |
| | | if (popupcallback) { |
| | | popupcallback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | addTableData(row) { |
| | | if (this.tableData.length == 0) { |
| | | row.is_main_approver = true; |
| | | } |
| | | else { |
| | | row.is_main_approver = false; |
| | | } |
| | | this.tableData.unshift(row); |
| | | // this.rowChange(table_row, "add", this.table_dataname); |
| | | }, |
| | | |
| | | delData(scope) { |
| | | let me = this; |
| | | let row = scope.row; |
| | | let index_ = scope.$index; |
| | | |
| | | Root.confirm('确定删除数据【' + row.md_position__name + '】吗?', '删除提示', { |
| | | confirmButtonText: '删除', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | me.rowChange(row, "del", me.table_dataname); |
| | | }).catch(() => { |
| | | Root.message({ |
| | | type: 'info', |
| | | message: '已取消删除' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | rowChange(row, type, tablename) { |
| | | var me = this; |
| | | if (type == "add") { |
| | | if (this.tableData.length == 0) { |
| | | row.is_main_approver = true; |
| | | } |
| | | this.tableData.unshift(row); |
| | | } |
| | | else if (type == "del") { |
| | | if (row.id) { |
| | | let param = { |
| | | dataname: tablename, |
| | | id: row.id |
| | | } |
| | | |
| | | Server.call("root/data/deleteEntity", param, function(result) { |
| | | console.log(result); |
| | | if (result && result.data) { |
| | | me.tableData.remove(row); |
| | | Root.message({ |
| | | type: 'success', |
| | | message: '删除成功!' |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | this.tableData.remove(row); |
| | | } |
| | | } |
| | | else { |
| | | |
| | | } |
| | | }, |
| | | |
| | | //提交 |
| | | submitRowTable() { |
| | | var me = this; |
| | | if (this.isChange) { // 变更提交 |
| | | var bo_change = this.$refs.change.checkForm(); |
| | | if (!bo_change) { |
| | | bo_ = false; |
| | | Root.message({ |
| | | type: 'error', |
| | | message: '请填写必填项' |
| | | }); |
| | | return |
| | | } |
| | | this.iscommit = true; |
| | | this.saveChangeRowTable(); |
| | | } |
| | | else { // 开户提交 |
| | | var bo_JCXX = this.$refs.JCXX.checkForm(); |
| | | |
| | | if (!bo_JCXX) { |
| | | bo_ = false; |
| | | Root.message({ |
| | | type: 'error', |
| | | message: '请填写必填项' |
| | | }); |
| | | return |
| | | } |
| | | |
| | | if (this.formData.business_email) { // 填写了邮箱,则更新md_org中的邮箱信息 |
| | | var param = { |
| | | dataname: "md_org_account", |
| | | id: this.formData.org_id, |
| | | data: { |
| | | md_org: { |
| | | id: this.formData.org_id, |
| | | business_email: this.formData.business_email |
| | | } |
| | | } |
| | | } |
| | | Server.call("root/data/saveEntity", param, function(result) { |
| | | me.iscommit = true; |
| | | me.saveRowTable(); |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }, |
| | | // 变更提交保存 |
| | | saveChangeRowTable() { |
| | | var me = this; |
| | | var operator_ = "saveEntity";// 变更保存 |
| | | if(me.iscommit) { |
| | | // operator_ = "commit";//变更提交 |
| | | operator_ = "toChange";//变更提交 |
| | | |
| | | if (this.formData_change.type_code == "close") { |
| | | operator_ = "toClose";//变更提交 |
| | | } |
| | | else { |
| | | operator_ = "toChange";//变更提交 |
| | | } |
| | | } |
| | | |
| | | var change_entity = clone(this.formData_change); |
| | | var entity_ = clone(this.formData); |
| | | change_entity.host_id = entity_.id |
| | | change_entity.account_id = entity_.id |
| | | change_entity.account_code = entity_.code |
| | | change_entity.account_name = entity_.account_name |
| | | change_entity.bu_id = entity_.bu_id |
| | | change_entity.bu_name = entity_.bu_name |
| | | change_entity.company_id = entity_.company_id |
| | | change_entity.company_name = entity_.company_name |
| | | change_entity.org_id = entity_.org_id |
| | | |
| | | var entity = {}; |
| | | for (var r in entity_) { |
| | | if (entity_[r] || entity_[r] == "" || entity_[r] == false || entity_[r] == 0) { |
| | | entity[r] = entity_[r]; |
| | | } |
| | | } |
| | | |
| | | var tableData_ = []; |
| | | this.tableData.map(r=>{ |
| | | var row_ = {}; |
| | | for (var k in r) { |
| | | if (r[k] || r[k] == false || r[k] == 0) { |
| | | row_[k] = r[k]; |
| | | } |
| | | } |
| | | tableData_.push(row_); |
| | | }) |
| | | |
| | | if (tableData_.length == 0) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请先添加明细数据' |
| | | }); |
| | | me.iscommit = false |
| | | return |
| | | } |
| | | |
| | | let param = { |
| | | dataname: this.change_dataname, |
| | | data: {}, |
| | | host: {}, |
| | | } |
| | | if (change_entity.id) { |
| | | param.id = change_entity.id |
| | | } |
| | | |
| | | param.data[this.change_dataname] = change_entity; |
| | | param.host[this.dataname] = entity; |
| | | param.host[this.table_dataname] = tableData_; |
| | | |
| | | // 校验是否存在变更或关户中的数据 |
| | | // var account_entity_id_filter = entity.company_id + entity.bu_id + entity.actor_code + entity.org_id |
| | | // if (me.exists_account[account_entity_id_filter] && me.exists_account[account_entity_id_filter] != entity.id) { |
| | | // Root.message({ |
| | | // type: 'warning', |
| | | // message: "经销商" + entity.account_name + "已开过户,在" + entity.company_name + entity.bu + entity.actor_name + "中" |
| | | // }); |
| | | // me.iscommit = false |
| | | // return |
| | | // } |
| | | |
| | | // return 0 |
| | | Server.call("root/data/" + operator_, param, function(result) { |
| | | console.log(result); |
| | | if (result.success) { |
| | | if(me.iscommit){ |
| | | me.iscommit = false; |
| | | Root.message({ |
| | | type: 'success', |
| | | message: '提交成功' |
| | | }); |
| | | me.saveAfter(); |
| | | } |
| | | else { |
| | | Root.message({ |
| | | type: 'success', |
| | | message: '保存成功' |
| | | }); |
| | | me.saveAfter(); |
| | | } |
| | | } |
| | | }, function(errorresult) { |
| | | console.log("错误信息", errorresult); |
| | | if (errorresult.messages && errorresult.messages.count && errorresult.messages.count.error) { |
| | | if (errorresult.messages.list) { |
| | | me.iscommit = false; |
| | | var config = { |
| | | totab: false, |
| | | // width: "1200px", |
| | | // height: 800, |
| | | icon: "icon-product", |
| | | text: "错误信息", |
| | | url: "module/tool/page/popup_error_messages.html", |
| | | data: {}, |
| | | delta: errorresult.messages.list, |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | } |
| | | } |
| | | else { |
| | | me.iscommit = false; |
| | | Root.message({ |
| | | type: 'error', |
| | | message: '提交失败' |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // 开户保存 |
| | | saveRowTable() { |
| | | var me = this; |
| | | var operator_ = "saveEntity";//保存 |
| | | if(me.iscommit) { |
| | | operator_ = "commit";//提交 |
| | | } |
| | | |
| | | var entity_ = clone(this.formData); |
| | | var entity = {}; |
| | | // var table_products_ = []; |
| | | // var table_provinces_ = []; |
| | | |
| | | for (var r in entity_) { |
| | | if (entity_[r] || entity_[r] == 0) { |
| | | entity[r] = entity_[r]; |
| | | } |
| | | } |
| | | |
| | | var tableData_ = []; |
| | | var md_org_account_criteria_ = [] |
| | | this.tableData.map(r=>{ |
| | | var row_ = {}; |
| | | for (var k in r) { |
| | | if (r[k] || r[k] == false || r[k] == 0) { |
| | | row_[k] = r[k]; |
| | | } |
| | | } |
| | | tableData_.push(row_); |
| | | }) |
| | | |
| | | if (tableData_.length == 0) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请先添加明细数据' |
| | | }); |
| | | me.iscommit = false |
| | | return |
| | | } |
| | | if (tableData_.length == 0) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请先添加明细数据' |
| | | }); |
| | | me.iscommit = false |
| | | return |
| | | } |
| | | |
| | | let param = { |
| | | dataname: 'md_org_account', |
| | | data: {}, |
| | | } |
| | | if (me.formData.id) { |
| | | param.id = me.formData.id |
| | | } |
| | | if(me.iscommit) { |
| | | // param.to_state = "OpeningApproval";//提交 |
| | | if (me.formData.org_ncc_id) { |
| | | // param.refer = { |
| | | // dataname: "md_org_account", |
| | | // id: me.formData.org_ncc_id |
| | | // } |
| | | } |
| | | |
| | | } |
| | | if (me.formData_criteria && me.formData_criteria.length > 0) { //不是新增 |
| | | me.formdata_rule_group.map(group => {// |
| | | group.children.map(unitobj => { |
| | | if (!unitobj.criteria_value) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请先添加明细数据' |
| | | }); |
| | | me.iscommit = false |
| | | return |
| | | } |
| | | var row_ = { |
| | | id: unitobj.id, |
| | | parent_id: me.formData.id, |
| | | criteria_id: unitobj.criteria_id, |
| | | criteria_value: unitobj.criteria_value, |
| | | remark: unitobj.remark ? unitobj.remark : '', |
| | | } |
| | | md_org_account_criteria_.push(row_); |
| | | }) |
| | | }) |
| | | } |
| | | else { |
| | | me.formdata_rule_group.map(group => {// |
| | | group.children.map(unitobj => { |
| | | if (!unitobj.criteria_value) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请先添加明细数据' |
| | | }); |
| | | me.iscommit = false |
| | | return |
| | | } |
| | | var row_ = { |
| | | parent_id: me.formData.id, |
| | | criteria_id: unitobj.id, |
| | | criteria_value: unitobj.criteria_value, |
| | | remark: unitobj.remark ? unitobj.remark : '', |
| | | } |
| | | md_org_account_criteria_.push(row_); |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | param.data["md_org_account_criteria"] = md_org_account_criteria_.length ? md_org_account_criteria_ : null; |
| | | |
| | | param.data[this.dataname] = entity; |
| | | param.data[this.table_dataname] = tableData_; |
| | | |
| | | // param.data["md_org_account_product"] = table_products_; |
| | | // param.data["md_org_account_province"] = table_provinces_; |
| | | |
| | | // 校验唯一性 |
| | | var account_entity_id_filter = entity.company_id + entity.bu_id + entity.actor_code + entity.org_id |
| | | if (me.exists_account[account_entity_id_filter] && me.exists_account[account_entity_id_filter] != entity.id) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: "经销商" + entity.account_name + "已开过户,在" + entity.company_name + entity.bu_name + entity.actor_name + "中" |
| | | }); |
| | | me.iscommit = false |
| | | return |
| | | } |
| | | |
| | | Server.call("root/data/" + operator_, param, function(result) { |
| | | console.log(result); |
| | | if (result.success) { |
| | | if(me.iscommit){ |
| | | me.iscommit = false; |
| | | Root.message({ |
| | | type: 'success', |
| | | message: '提交成功' |
| | | }); |
| | | me.saveAfter(); |
| | | } |
| | | else { |
| | | Root.message({ |
| | | type: 'success', |
| | | message: '保存成功' |
| | | }); |
| | | me.saveAfter(); |
| | | } |
| | | } |
| | | }, function(errorresult) { |
| | | console.log("错误信息", errorresult); |
| | | if (errorresult.messages && errorresult.messages.count && errorresult.messages.count.error) { |
| | | if (errorresult.messages.list) { |
| | | me.iscommit = false; |
| | | var config = { |
| | | totab: false, |
| | | // width: "1200px", |
| | | // height: 800, |
| | | icon: "icon-product", |
| | | text: "错误信息", |
| | | url: "module/tool/page/popup_error_messages.html", |
| | | data: {}, |
| | | delta: errorresult.messages.list, |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | } |
| | | } |
| | | else { |
| | | me.iscommit = false; |
| | | Root.message({ |
| | | type: 'error', |
| | | message: '提交失败' |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // 通过或拒绝 |
| | | onShowApproval(passOrRefuse) { |
| | | this.approveremark = ""; |
| | | this.reasonvisible = true;//审批备注填写弹窗 |
| | | this.passOrRefuse = passOrRefuse;// commit下一个状态;approve通过;gohome;//拒绝 goback;//回退 |
| | | }, |
| | | saveReason() { |
| | | this.loading_pass = true; |
| | | if(this.passOrRefuse == "commit" || this.passOrRefuse == "approve"){ |
| | | this.doApproval(); |
| | | } |
| | | else{ |
| | | if(this.approveremark != ""){ |
| | | this.doApproval(); |
| | | } |
| | | else{ |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请填写原因' |
| | | }); |
| | | this.loading_pass = false; |
| | | } |
| | | } |
| | | }, |
| | | doApproval() { |
| | | var me = this; |
| | | me.doRunApproval(); |
| | | |
| | | // this.getMachine(function(next_step, up_step) { // |
| | | // me.doRunApproval(next_step, up_step); |
| | | // }); |
| | | }, |
| | | |
| | | getMachine(callback) { |
| | | var me = this; |
| | | let param = { |
| | | dataname: "md_org_account", |
| | | } |
| | | Server.call("root/state/getMachine", param, function(result) { |
| | | var next_step = {}; // 向下流程 |
| | | var up_step = {}; // 向上流程 |
| | | |
| | | if (result && result.machine && result.machine.detail) { |
| | | result.machine.detail.map(md=>{ |
| | | next_step[md.from_code] = md.to_code; |
| | | up_step[md.to_code] = md.from_code; |
| | | }) |
| | | |
| | | callback(next_step, up_step); |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | doRunApproval(next_step, up_step) { |
| | | var me = this; |
| | | if (!next_step) { |
| | | next_step = {} |
| | | } |
| | | if (!up_step) { |
| | | up_step = {} |
| | | } |
| | | |
| | | // this.passOrRefuse;//首次开户-通过 |
| | | // commit // 下一个状态 |
| | | // approve // 通过 |
| | | // gohome // 拒绝 |
| | | // goback // 回退 |
| | | |
| | | var to_state_ = ""; |
| | | if (this.passOrRefuse == "commit") { |
| | | to_state_ = next_step[this.formData.state_code]; |
| | | } |
| | | else if (this.passOrRefuse == "approve") { |
| | | // to_state_ = up_step[this.formData.state_code]; |
| | | } |
| | | else if (this.passOrRefuse == "gohome") { |
| | | // to_state_ = up_step[this.formData.state_code]; |
| | | } |
| | | else if (this.passOrRefuse == "goback") { |
| | | to_state_ = up_step[this.formData.state_code]; |
| | | } |
| | | |
| | | let param = { |
| | | dataname: "md_org_partnership", |
| | | id: me.formData.id, |
| | | remark: this.approveremark |
| | | } |
| | | if (to_state_) { |
| | | param.to_state = to_state_ |
| | | } |
| | | // |
| | | // return |
| | | Server.call("root/data/" + this.passOrRefuse, param, function(result) { |
| | | me.loading_pass = false; |
| | | console.log(result); |
| | | if (me.passOrRefuse == "commit" || me.passOrRefuse == "approve") { |
| | | Root.message({ |
| | | type: 'success', |
| | | message: '审批成功' |
| | | }); |
| | | } |
| | | else if (me.passOrRefuse == "goback") { |
| | | Root.message({ |
| | | type: 'success', |
| | | message: '已退回' |
| | | }); |
| | | } |
| | | else if (me.passOrRefuse == "gohome") { |
| | | Root.message({ |
| | | type: 'success', |
| | | message: '已拒绝' |
| | | }); |
| | | } |
| | | me.saveAfter(); |
| | | }, function(errorresult) { |
| | | console.log("错误信息", errorresult); |
| | | me.loading_pass = false; |
| | | if (errorresult.messages && errorresult.messages.count && errorresult.messages.count.error) { |
| | | if (errorresult.messages.list) { |
| | | var config = { |
| | | totab: false, |
| | | // width: "1200px", |
| | | // height: 800, |
| | | icon: "icon-product", |
| | | text: "错误信息", |
| | | url: "module/tool/page/popup_error_messages.html", |
| | | data: {}, |
| | | delta: errorresult.messages.list, |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | |
| | | } |
| | | } |
| | | else { |
| | | Root.message({ |
| | | type: 'error', |
| | | message: '审批失败' |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | loadJsCss(function () { |
| | | initVue(); |
| | | }); |
| | | </script> |
| | | <style> |
| | | /* 在vue.js中 v-cloak 这个指令是防止页面加载时出现 vuejs 的变量名而设计的 */ |
| | | [v-cloak] { |
| | | display: none !important; |
| | | } |
| | | |
| | | .h_change_body { |
| | | border: 1px solid #C0C4CC; |
| | | border-radius: 4px; |
| | | padding: 5px; |
| | | box-sizing: border-box; |
| | | } |
| | | .me_h_itemgroup_row { |
| | | margin-bottom: 10px; |
| | | } |
| | | .me_h_itemgroup_row .me_h_unitlabel:before { |
| | | content: '*'; |
| | | color: #F56C6C; |
| | | margin-right: 4px; |
| | | } |
| | | .me_h_itemgroup_row .me_h_nounitlabel:before { |
| | | content: '*'; |
| | | color: #F56C6C00; |
| | | margin-right: 4px; |
| | | } |
| | | .itemgroup_row_item { |
| | | text-align: left; |
| | | } |
| | | </style> |
| | | |
| | | </head> |
| | | |
| | | <body style="margin: 0px;"> |
| | | <div v-cloak id="vbody"> |
| | | <div id="page_root"> |
| | | <div ref="popup_body" style="padding: 0 20px;"> |
| | | <div v-if="popupParames.totab" class="el-dialog__header"> |
| | | <div class="dialog-title"> |
| | | <i class="iconfont icon-customermanagement"></i> |
| | | <span> {{title}}</span> |
| | | </div> |
| | | </div> |
| | | <div :style="{height: dheight + 'px', 'overflow-y': 'auto'}"> |
| | | <div class="el-dialog__body"> |
| | | <div v-if="isChange && meta_account_change.length"> |
| | | <h-form |
| | | ref="change" |
| | | :form-attr="formAttr_change" |
| | | :table-fields="meta_account_change" |
| | | :form-data="formData_change" |
| | | :table-field-click="formfieldClick" |
| | | > |
| | | </h-form> |
| | | </div> |
| | | <div :class="meta_account_change.length ? 'h_change_body' : ''"> |
| | | <h-form |
| | | ref="JCXX" |
| | | :form-attr="formAttr" |
| | | :table-fields="formFields" |
| | | :form-data="formData" |
| | | :table-field-click="formfieldClick" |
| | | > |
| | | </h-form> |
| | | <div class="h_BU"> |
| | | <div > |
| | | <!-- <div class="h_title"> |
| | | <i class="iconfont icon-fuzhushuxian" style="color: #0270c1;"></i><span style="font-size: 14px;">我方业务负责人</span> |
| | | </div> --> |
| | | <div style="padding: 0px;"> |
| | | <h-table v-if="tableFields.length" |
| | | ref="table1" |
| | | :table-attr="tableAttr" |
| | | :table-fields="tableFields" |
| | | :table-data="tableData" |
| | | :table-field-click="tablefieldClick" |
| | | :isfilterfield="false" |
| | | :isdraggableorder="false" |
| | | :table-buttons-click="tablebuttonclick" |
| | | :is-pagination="false" |
| | | :is-highlight-row="true" |
| | | :isbasicfilterfields="false" |
| | | |
| | | :is-within-edit-table-data="table_isedit" |
| | | > |
| | | </h-table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | <div class="el-dialog__body" style="width: 100%; float: right; " > |
| | | <div v-if="formFields.length>0" > |
| | | <div class="h_table_title"><i class="iconfont icon-fuzhushuxian" style="color: rgb(2, 112, 193);"></i><span style="font-size: 16px;">遴选条件</span></div> |
| | | </i> |
| | | <!-- <el-row style="display: flex;flex-direction: row;justify-content:space-between;padding-left: 91px;padding-top: 10px;" > |
| | | <el-col :span="16"><div class="itemgroup_field"><span>评分项</span></div></el-col> |
| | | <el-col :span="8"><div class="itemgroup_field"><span>评分</span></div></el-col> |
| | | </el-row> --> |
| | | <div style="width: 100%;height: 5px;margin: 10px 0px 25px 0px;background-color: gainsboro; opacity: 40%;"></div> |
| | | <template v-for="(formgroup, k) in formdata_rule_group.filter(e=>e.type_code == 'Selection')" > |
| | | <div style="display: flex;justify-content: space-between;padding: 5px;"> |
| | | <div style="width: 7%; display: flex; align-items: center; justify-content: center; text-align: center;font-weight: bold;border-right: 3px solid gainsboro;"> |
| | | <div style="display: flex;justify-content: center;align-items: center;margin-right: 15px;"> |
| | | <!-- {{formgroup.groupname}} --> |
| | | {{formgroup.group_name}} |
| | | </div> |
| | | </div> |
| | | <div style="width: 93%;padding: 0 10px;"> |
| | | |
| | | <el-row v-for="(unitobj, kc) in formgroup.children" :key="'YWNL' + k + kc" class="me_h_itemgroup_row"> |
| | | <el-col :span="6" class="itemgroup_row_item"> |
| | | <div> |
| | | <span :class="[unitobj.required_no ? 'me_h_nounitlabel' : 'me_h_unitlabel']" style="font-size: 12px;"> |
| | | <!-- {{unitobj.content_before}} --> |
| | | {{unitobj.content_before}} |
| | | </span> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="18" > |
| | | <div v-if="unitobj.content_type == 'textarea'"> |
| | | <el-input :disabled="formAttr.disabled" style="width:100%" type="textarea" |
| | | v-model="unitobj.criteria_value"> |
| | | </el-input> |
| | | </div> |
| | | <div v-else-if="unitobj.content_type == 'radio' && !unitobj.dictionary_id"> |
| | | <el-radio-group :disabled="formAttr.disabled" v-model="unitobj.criteria_value"> |
| | | <el-radio label="T">是</el-radio> |
| | | <el-radio label="F">否</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | <div v-else-if="unitobj.content_type == 'radio' && unitobj.dictionary_id"> |
| | | <el-radio-group v-model="unitobj.criteria_value"> |
| | | <el-radio :disabled="formAttr.disabled" v-for="(r, k) in unitobj.options" :key="unitobj.id + k" :label="r.code">{{r.value}}</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | <div v-else-if="unitobj.content_type == 'input'"> |
| | | <el-input :disabled="formAttr.disabled" style="width:100%" |
| | | v-model="unitobj.criteria_value"> |
| | | </el-input> |
| | | </div> |
| | | <div v-else-if="unitobj.content_type == 'date'"> |
| | | <el-date-picker |
| | | :disabled="formAttr.disabled" |
| | | style="width:100%" type="date" value-format="yyyy-MM-dd" |
| | | v-model="unitobj.criteria_value"> |
| | | </el-date-picker> |
| | | </div> |
| | | <div v-else-if="unitobj.content_type == 'upload'"> |
| | | <table> |
| | | <tr> |
| | | <td align="left" style="width: 100%; padding: 0px; overflow: hidden; border-bottom: 1px solid #DCDFE6;"> |
| | | <span class="h_cellclick" @click="buttonArrayClick(unitobj, {code:'showfile'})">{{unitobj.criteria_value}}</span> |
| | | </td> |
| | | <td > |
| | | <template v-if="isBusiness && unitobj.criteria_value"> |
| | | <el-button :disabled="formAttr.disabled" type="primary" style="padding: 5px;" @click="buttonArrayClick(unitobj, {code:'delfile'})" icon="el-icon-delete" class="form_delfile">删除附件</el-button> |
| | | </template > |
| | | |
| | | <template v-else-if="isBusiness && !unitobj.criteria_value"> |
| | | <el-button :disabled="formAttr.disabled" type="primary" style="padding: 5px;" @click="buttonArrayClick(unitobj, {code:'upload'})" icon="el-icon-upload" class="form_uploadfile">附件上传</el-button> |
| | | </template > |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | | <div style="width: 100%;height: 5px;margin-top: 25px;background-color: gainsboro;opacity: 40%"></div> |
| | | </template > |
| | | </div> |
| | | </div> |
| | | <div class="el-dialog__body" style="width: 100%; float: right; " > |
| | | <div v-if="formFields.length>0 " > |
| | | <div class="h_table_title"><i class="iconfont icon-fuzhushuxian" style="color: rgb(2, 112, 193);"></i><span style="font-size: 16px;">评估表</span></div> |
| | | </i> |
| | | <!-- <el-row style="display: flex;flex-direction: row;justify-content:space-between;padding-left: 91px;padding-top: 10px;" > |
| | | <el-col :span="16"><div class="itemgroup_field"><span>评分项</span></div></el-col> |
| | | <el-col :span="8"><div class="itemgroup_field"><span>评分</span></div></el-col> |
| | | </el-row> --> |
| | | <div style="width: 100%;height: 5px;margin: 10px 0px 25px 0px;background-color: gainsboro; opacity: 40%;"></div> |
| | | <template v-for="(formgroup, k) in formdata_rule_group.filter(e=>e.type_code == 'Evaluation')"> |
| | | <div style="display: flex;justify-content: space-between;padding: 5px;"> |
| | | <div style="width: 7%; display: flex; align-items: center; justify-content: center; text-align: center;font-weight: bold;border-right: 3px solid gainsboro;"> |
| | | <div style="display: flex;justify-content: center;align-items: center;margin-right: 15px;"> |
| | | <!-- {{formgroup.groupname}} --> |
| | | {{formgroup.group_name}} |
| | | </div> |
| | | </div> |
| | | <div style="width: 93%;padding: 0 10px;"> |
| | | |
| | | <el-row v-for="(unitobj, kc) in formgroup.children" :key="'YWNL' + k + kc" class="me_h_itemgroup_row"> |
| | | <el-col :span="6" class="itemgroup_row_item"> |
| | | <div> |
| | | <span :class="[unitobj.required_no ? 'me_h_nounitlabel' : 'me_h_unitlabel']" style="font-size: 12px;"> |
| | | <!-- {{unitobj.content_before}} --> |
| | | {{unitobj.content_before}} |
| | | </span> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="18" > |
| | | <div v-if="unitobj.content_type == 'textarea'"> |
| | | <el-input :disabled="formAttr.disabled" style="width:100%" type="textarea" |
| | | v-model="unitobj.criteria_value"> |
| | | </el-input> |
| | | </div> |
| | | <div v-else-if="unitobj.content_type == 'radio' && !unitobj.dictionary_id"> |
| | | <el-radio-group :disabled="formAttr.disabled" v-model="unitobj.criteria_value"> |
| | | <el-radio label="T">是</el-radio> |
| | | <el-radio label="F">否</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | <div v-else-if="unitobj.content_type == 'radio' && unitobj.dictionary_id"> |
| | | <el-radio-group v-model="unitobj.criteria_value"> |
| | | <el-radio :disabled="formAttr.disabled" v-for="(r, k) in unitobj.options" :key="unitobj.id + k" :label="r.code">{{r.value}}</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | <div v-else-if="unitobj.content_type == 'input'"> |
| | | <el-input :disabled="formAttr.disabled" style="width:100%" |
| | | v-model="unitobj.criteria_value"> |
| | | </el-input> |
| | | </div> |
| | | <div v-else-if="unitobj.content_type == 'date'"> |
| | | <el-date-picker |
| | | :disabled="formAttr.disabled" |
| | | style="width:100%" type="date" value-format="yyyy-MM-dd" |
| | | v-model="unitobj.criteria_value"> |
| | | </el-date-picker> |
| | | </div> |
| | | <div v-else-if="unitobj.content_type == 'upload'"> |
| | | <table> |
| | | <tr> |
| | | <td align="left" style="width: 100%; padding: 0px; overflow: hidden; border-bottom: 1px solid #DCDFE6;"> |
| | | <span class="h_cellclick" @click="buttonArrayClick(unitobj, {code:'showfile'})">{{unitobj.criteria_value}}</span> |
| | | </td> |
| | | <td > |
| | | <template v-if="isBusiness && unitobj.criteria_value"> |
| | | <el-button :disabled="formAttr.disabled" type="primary" style="padding: 5px;" @click="buttonArrayClick(unitobj, {code:'delfile'})" icon="el-icon-delete" class="form_delfile">删除附件</el-button> |
| | | </template > |
| | | |
| | | <template v-else-if="isBusiness && !unitobj.criteria_value"> |
| | | <el-button :disabled="formAttr.disabled" type="primary" style="padding: 5px;" @click="buttonArrayClick(unitobj, {code:'upload'})" icon="el-icon-upload" class="form_uploadfile">附件上传</el-button> |
| | | </template > |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | | <div style="width: 100%;height: 5px;margin-top: 25px;background-color: gainsboro;opacity: 40%"></div> |
| | | </template > |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-dialog title="填写原因" :visible.sync="reasonvisible" height="50%"> |
| | | <el-input |
| | | type="textarea" |
| | | :autosize="{ minRows: 2, maxRows: 10}" |
| | | placeholder="请输入原因" |
| | | v-model="approveremark"> |
| | | </el-input> |
| | | |
| | | <div slot="footer" class="dialog-footer" > |
| | | <el-button size="small" type="default" @click="reasonvisible = false">取 消</el-button> |
| | | <el-button size="small" type="primary" :loading="loading_pass" @click="saveReason">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <div class="el-dialog__footer"> |
| | | <el-button-group style="margin-right: 80px;" > |
| | | <el-button size="small" v-if="isapproval" type="warning" plain @click="onShowApproval('gohome')">退回到申请人</el-button> |
| | | <el-button size="small" v-if="isapproval" type="danger" plain @click="onShowApproval('goback')">退回到上一步</el-button> |
| | | </el-button-group> |
| | | <el-button size="small" type="default" @click="closeDialog">取 消</el-button> |
| | | <el-button size="small" v-if="!isChange && isedit" type="success" @click="submitRowTable":icon="buttonsconfig.submit.icon">{{buttonsconfig.submit.name}}</el-button> |
| | | |
| | | <el-button size="small" v-if="isChange" type="success" @click="submitRowTable":icon="buttonsconfig.submit.icon">{{buttonsconfig.submit.name}}</el-button> |
| | | |
| | | <el-button size="small" v-if="isrefuseedit" type="success" @click="">再次提交</el-button> |
| | | |
| | | <el-button size="small" v-if="isapproval" type="success" @click="onShowApproval('approve')">通 过</el-button> |
| | | <!-- <el-button size="small" v-if="isapproval" type="danger" @click="onShowApproval('goback')">拒 绝</el-button> --> |
| | | <!-- <el-button size="small" v-if="isapproval" type="primary" @click="">转 办</el-button> --> |
| | | <!-- <el-button size="small" v-if="isapproval" type="success" @click="onShowApproval('gohome')">退 回</el-button> --> |
| | | </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 class="cube2"></div> |
| | | </div> |
| | | </div> |
| | | </body> |
| | | </html> |