Merge branch 'master' of http://highdatas.com:9000/r/promotion/promotion_html
| | |
| | | margin-bottom: 30px; |
| | | } */ |
| | | |
| | | .h_table .el-table__body-wrapper { |
| | | /* .h_table .el-table__body-wrapper { |
| | | overflow-y: auto !important; |
| | | overflow-x: auto !important; |
| | | } |
| | | } */ |
| | | |
| | | .h_form .el-form-item--mini.el-form-item, .el-form-item--small.el-form-item { |
| | | margin-bottom: 0px !important; |
| | |
| | | param.data[this.form_dataname] = entity; |
| | | //param.data[this.table_dataname] = table_entityset; |
| | | |
| | | Server.call("root/data/saveEntity", param, function(result) { |
| | | Server.call("root/data/saveEntity", param, function(result) { // |
| | | console.log(result); |
| | | if (result.success) { |
| | | if(me.isCommit){ |
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: "agm_agreement", |
| | | title: "协议信息", |
| | | |
| | | formAttr: { |
| | | istitle: false, |
| | | title: "表单名称", |
| | | columnnumber: 4, |
| | | labelwidth: "100px", |
| | | labelposition: "left",//"left",// right//top |
| | | size: "mini", |
| | | border: "10px solid #c6c6c600" |
| | | }, |
| | | formFields: [], |
| | | newformData: { |
| | | // agreement_no: createCode("XY"), |
| | | state_code: "Input", |
| | | state_name: "录入", |
| | | is_generate: false, |
| | | // creator_id: |
| | | }, |
| | | formData: {}, |
| | | //字段设置 |
| | | formfieldClick: {}, |
| | | |
| | | //按键权限设置 |
| | | isedit: false,//提交前编辑,保存/提交 |
| | | isrefuseedit: false,//拒绝后编辑,保存/再次提交 |
| | | isapproval: false,//审批,同意/拒绝/转办/退回 |
| | | iscommit: false,//提交标记 |
| | | loading_save: false, |
| | | |
| | | //审批相关变量 |
| | | reasonvisible:false,//审批通过或拒绝填写原因 |
| | | approveremark: '',//填写理由 |
| | | passOrRefuse:false, |
| | | loading_pass: false, |
| | | |
| | | //高度 |
| | | p_height: null, |
| | | |
| | | //弹窗参数 |
| | | popupParames: {}, |
| | | |
| | | dataRequest: [ |
| | | { |
| | | name: "agm_category", // 协议类型下拉 |
| | | //url: "root/front/getOneDictionary", |
| | | //paramsobj: { code: "OrgType", }, |
| | | isnotoption: false, //true:不是选项 |
| | | code:"id",//是下拉选项时设置 |
| | | label:"name",//是下拉选项时设置 |
| | | }, |
| | | |
| | | { |
| | | 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" |
| | | }, |
| | | ], |
| | | |
| | | copyAdd: false, |
| | | formDatas_old: [], |
| | | |
| | | isRefresh: true, |
| | | tabs: [ |
| | | {code: "tab1", name: "产品/区域", dataname: "", filterTxt: "", orderby: "", |
| | | tableFields: [ |
| | | {isshow: "T", field: "product_id", name: "产品范围", type: "cascader", options: [], props:{label: "value", value: "code", multiple: true}, colspan: 2, required: true}, |
| | | {isshow: "T", field: "province", name: "销售省份", type: "cascader", options: [], props:{label: "value", value: "code", multiple: true}, colspan: 2}, |
| | | ], |
| | | formData: { |
| | | province: [], |
| | | product_id: [], |
| | | }, |
| | | formAttr: { |
| | | istitle: false, |
| | | title: "表单名称", |
| | | columnnumber: 2, |
| | | labelwidth: "100px", |
| | | labelposition: "left",//"left",// right//top |
| | | size: "mini", |
| | | border: "10px solid #c6c6c600", |
| | | disabled: false |
| | | }, |
| | | }, |
| | | // {code: "tab2", name: "签约医院", dataname: "md_org_account_hospital", filterTxt: "1<>1", orderby: "", |
| | | // tableFields: [], |
| | | // tableData: [], |
| | | // tablefieldClick: {}, |
| | | // tablebuttonClick: {}, |
| | | // }, |
| | | {code: "tab3", name: "签约医院", dataname: "md_target_dealer", filterTxt: "1<>1", orderby: "", |
| | | tableFields: [], |
| | | tableData: [], |
| | | tablefieldClick: {}, |
| | | tablebuttonClick: {}, |
| | | }, |
| | | // {code: "tab4", name: "价格政策", dataname: "md_prod_price_detail", filterTxt: "1<>1", orderby: "", |
| | | // tableFields: [], |
| | | // tableData: [], |
| | | // tablefieldClick: {}, |
| | | // tablebuttonClick: {}, |
| | | // }, |
| | | // {code: "tab6", name: "买赠政策", dataname: "agm_record_gift", filterTxt: "1<>1", orderby: "", |
| | | // tableFields: [], |
| | | // tableData: [], |
| | | // tablefieldClick: {}, |
| | | // tablebuttonClick: {}, |
| | | // }, |
| | | // {code: "tab7", name: "折扣政策", dataname: "agm_record_rate", filterTxt: "1<>1", orderby: "", |
| | | // tableFields: [], |
| | | // tableData: [], |
| | | // tablefieldClick: {}, |
| | | // tablebuttonClick: {}, |
| | | // }, |
| | | // {code: "tab5", name: "附件", dataname: "md_sku", filterTxt: "1<>1", orderby: ""}, |
| | | |
| | | ], |
| | | activeTabName:"", |
| | | selectTabObj: {}, |
| | | TabObjMap: {}, |
| | | |
| | | productobj_map: {}, |
| | | md_bu_product_obj: {}, // 产品范围下拉 |
| | | options_tree_province: [], // 区域省份下拉 |
| | | |
| | | options_category: [], |
| | | options_categoryobj: {}, |
| | | options_template: [], |
| | | options_templateobj: {}, |
| | | |
| | | old_agm_record_product_obj: {}, |
| | | old_agm_record_province_obj: {}, |
| | | }, |
| | | created() { |
| | | this.popupParames = clone(Root.popupParames); |
| | | this.title = this.popupParames.title || this.popupParames.text; |
| | | |
| | | if (this.popupParames.data) { |
| | | this.formData = clone(this.popupParames.data); |
| | | } |
| | | if (this.popupParames.delta || this.popupParames.delta.rows) { |
| | | this.formDatas_old = clone(this.popupParames.delta.rows); |
| | | // console.log(this.formDatas_old); |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | else if (this.popupParames.sceneCode == "browse") {//只读 |
| | | this.formAttr.disabled = true; |
| | | this.tabs[0].formAttr.disabled = true; |
| | | } |
| | | else if (this.popupParames.sceneCode == "copyAdd") {//只读 |
| | | this.copyAdd = true; |
| | | this.isedit = true; |
| | | } |
| | | else if (this.popupParames.sceneCode == "edit") {//编辑 |
| | | this.isedit = true; |
| | | } |
| | | else if (this.popupParames.sceneCode == "change") {//变更 |
| | | this.formAttr.disabled = true; |
| | | this.tabs[0].formAttr.disabled = true; |
| | | } |
| | | else if (this.popupParames.sceneCode == "approval") {//审批 |
| | | this.formAttr.disabled = true; |
| | | this.isapproval = true; |
| | | this.tabs[0].formAttr.disabled = true; |
| | | } |
| | | else if (this.popupParames.sceneCode == "refuseedit") {//拒绝后的编辑 |
| | | this.isrefuseedit = true; |
| | | } |
| | | } |
| | | }, |
| | | |
| | | mounted() { |
| | | this.activeTabName = "tab1"; |
| | | var me = this; |
| | | me.p_height = document.documentElement.clientHeight*1 - 91; |
| | | |
| | | //预加载数据 |
| | | 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.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 (data.agm_category) { |
| | | data.agm_category.map(c=>{ |
| | | me.options_categoryobj[c.id] = c; |
| | | }) |
| | | |
| | | let agm_category_ = ArrayToTree(clone(data.agm_category), "name", "parent_id"); |
| | | me.options_category = agm_category_; |
| | | } |
| | | |
| | | // 产品范围下拉 |
| | | if (me.dataRequestObj.md_bu_product) { |
| | | var md_bu_product_array_ = clone(me.dataRequestObj.md_bu_product); |
| | | var md_bu_product_obj_ = {}; |
| | | var productobj_map_ = {}; |
| | | |
| | | md_bu_product_array_.map(p=>{ |
| | | if (!md_bu_product_obj_[p.bu_id]) { |
| | | md_bu_product_obj_[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_obj_[p.bu_id].children.push(p_); |
| | | }) |
| | | me.md_bu_product_obj = clone(md_bu_product_obj_) |
| | | me.productobj_map = clone(productobj_map_); |
| | | } |
| | | |
| | | // 区域省份下拉 |
| | | if (me.dataRequestObj.md_geo_province) { |
| | | // var options_tree_province_ = listTOListGroup(me.dataRequestObj.md_geo_province, "area", "value"); |
| | | me.options_tree_province = clone(me.dataRequestObj.md_geo_province); |
| | | } |
| | | |
| | | // me.initData(); |
| | | }); |
| | | } |
| | | else { |
| | | // me.initData(); |
| | | } |
| | | |
| | | // 以服务的方式调用的 Loading 需要异步关闭 |
| | | }, |
| | | |
| | | 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(); |
| | | } |
| | | }, |
| | | |
| | | initData() { |
| | | let me = this; |
| | | var id_ = null; |
| | | if (this.formData.id) { |
| | | id_ = this.formData.id; |
| | | } |
| | | // this.selectTabObj = clone(this.TabObjMap[this.activeTabName]); |
| | | this.getRowDataById(id_, function(result) {//查询后的回调,用于获取字段的 |
| | | if (result.meta && result.meta[me.dataname] && result.meta[me.dataname].fields) { |
| | | var metas = clone(result.meta[me.dataname].fields); |
| | | var formFields_ = []; |
| | | |
| | | metas.map(f=>{ |
| | | f.isshow = "T"; |
| | | if (f.field == "category_id") { |
| | | f.options = clone(me.options_category); |
| | | } |
| | | if (f.field == "agreement_no" || f.field == "logistics_code" || f.field == "template_attachment_name" || f.field == "contract_attachment_name") { |
| | | f.isshow = "F"; |
| | | } |
| | | |
| | | formFields_.push(clone(f)); |
| | | }) |
| | | |
| | | if (!me.formFields || (me.formFields && me.formFields.length == 0)) { |
| | | me.formFields = clone(formFields_); |
| | | |
| | | //字段数组转字段obj,目的为了筛选时获取字段属性 |
| | | me.fieldsToFieldsObj(); |
| | | } |
| | | |
| | | // 协议类型的赋值 |
| | | if (me.formData.category_id) { |
| | | me.formData.category_id_temp = clone(me.formData.category_id); |
| | | me.getParents(me.formData.category_id, me.options_categoryobj, [], function(parent_ids){ |
| | | me.formData.category_id = parent_ids; |
| | | me.$set(me.formData, "category_id", parent_ids); |
| | | }); |
| | | } |
| | | // 回挂附件的赋值 |
| | | if (me.rowData["agm_agreement_file"] && me.rowData["agm_agreement_file"].length) { |
| | | var comeback_attachment_name_ = [] |
| | | me.rowData["agm_agreement_file"].map(f=>{ |
| | | var f_ = { |
| | | id: f.id, |
| | | file_name: f.file_name |
| | | } |
| | | comeback_attachment_name_.push(f_); |
| | | }) |
| | | me.$set(me.formData, "comeback_attachment_name", comeback_attachment_name_); |
| | | } |
| | | |
| | | var formFields_ = clone(me.formFields); |
| | | formFields_.map(f=>{ |
| | | if (f.field == "template_attachment_name") { // 自动生成 |
| | | f.isshow = "F"; |
| | | if (me.rowData["agm_agreement"] && me.rowData["agm_agreement"].is_generate) { |
| | | f.isshow = "T"; |
| | | } |
| | | } |
| | | if (f.field == "contract_attachment_name") { // 手工上传 |
| | | f.isshow = "F"; |
| | | if (!me.rowData["agm_agreement"] || (me.rowData["agm_agreement"] && !me.rowData["agm_agreement"].is_generate)) { |
| | | f.isshow = "T"; |
| | | } |
| | | } |
| | | }) |
| | | me.formFields = clone(formFields_); |
| | | |
| | | |
| | | me.setTabObjMap(result.meta, me.rowData); |
| | | |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | setTabObjMap(metas, datas) { |
| | | var me = this; |
| | | // tabs: [ |
| | | // {code: "tab1", name: "产品/区域", dataname: "md_sku", filterTxt: "1<>1", orderby: ""}, |
| | | // {code: "tab2", name: "医院授权", dataname: "agm_authorization", filterTxt: "1<>1", orderby: ""}, |
| | | // {code: "tab3", name: "指标", dataname: "md_target_dealer", filterTxt: "customer_id=''", orderby: ""}, |
| | | // {code: "tab4", name: "价格", dataname: "md_sku", filterTxt: "1<>1", orderby: ""}, |
| | | // // {code: "tab5", name: "附件", dataname: "md_sku", filterTxt: "1<>1", orderby: ""}, |
| | | // {code: "tab6", name: "政策", dataname: "agm_record", filterTxt: "1<>1", orderby: ""}, |
| | | // ], |
| | | this.tabs.map(tab=>{ |
| | | if (tab.code == "tab1") { |
| | | tab.tableFields.map(f=>{ |
| | | if (f.field == "product_id") { |
| | | if (me.formData.bu_id && me.md_bu_product_obj[me.formData.bu_id]) { |
| | | f.options = clone(me.md_bu_product_obj[me.formData.bu_id].children); |
| | | } |
| | | else { |
| | | f.options = []; |
| | | } |
| | | } |
| | | else if (f.field == "province") { |
| | | f.options = clone(me.options_tree_province); |
| | | } |
| | | }) |
| | | // agm_record_province |
| | | // agm_record_product |
| | | |
| | | if (datas["agm_record_product"]) { |
| | | var product_id_ = [] |
| | | me.old_agm_record_product_obj = {}; |
| | | datas["agm_record_product"].map(p=>{ |
| | | me.old_agm_record_product_obj[p.product_id] = p; |
| | | var select_p_ = [p.product_id]; |
| | | product_id_.push(select_p_); |
| | | }) |
| | | tab.formData.product_id = product_id_ |
| | | } |
| | | if (datas["agm_record_province"]) { |
| | | var province_id_ = [] |
| | | me.old_agm_record_province_obj = {}; |
| | | datas["agm_record_province"].map(p=>{ |
| | | me.old_agm_record_province_obj[p.province] = p; |
| | | var select_p_ = [p.province]; |
| | | province_id_.push(select_p_); |
| | | }) |
| | | tab.formData.province = province_id_; |
| | | } |
| | | } |
| | | else if (tab.code == "tab2" || tab.code == "tab3" || tab.code == "tab4" || tab.code == "tab6" || tab.code == "tab7") { |
| | | var metas_ = metas[tab.dataname].fields; |
| | | var tableFields_ = []; |
| | | metas_.map(f=>{ |
| | | f.isshow = "T"; |
| | | if (tab.code == "tab2") { |
| | | if (f.field == "md_hospital__code" || f.field == "md_hospital__name" || f.field == "hospital_code" || f.field == "hospital_name") { |
| | | f.isshow = "T"; |
| | | } |
| | | else { |
| | | f.isshow = "F"; |
| | | } |
| | | } |
| | | |
| | | if (f.field == "agreement_no" || f.field == "company_name" || f.field == "bu_name" || f.field == "state_name" |
| | | || f.field == "md_org__code" || f.field == "md_org__name" || f.field == "customer_code"|| f.field == "customer_name" |
| | | || f.field == "creator_name" || f.field == "create_time" || f.field == "update_time" |
| | | || f.field == "source" || f.field == "account_name" || f.field == "record_name" || f.field == "record_no") { |
| | | f.isshow = "F"; |
| | | } |
| | | if (me.isedit && (f.field == "date_from" || f.field == "date_to")) { |
| | | f.inputtype = "date"; |
| | | f.required = false; |
| | | f.width = "150"; |
| | | |
| | | } |
| | | else { |
| | | f.inputtype = "span"; |
| | | } |
| | | if (f.field == "category_id") { |
| | | f.options = clone(me.options_category); |
| | | } |
| | | |
| | | if (tab.code == "tab4" && f.field == "bu_name") { |
| | | f.isshow = "T"; |
| | | } |
| | | |
| | | tableFields_.push(clone(f)); |
| | | }) |
| | | tab.tableFields = clone(tableFields_); |
| | | tab.tableData = clone(datas[tab.dataname]); |
| | | } |
| | | |
| | | this.TabObjMap[tab.code] = clone(tab); |
| | | }) |
| | | // 设置字段事件 |
| | | this.tableFieldClick(); |
| | | // 表格按键事件 |
| | | this.tableButtonClick(); |
| | | |
| | | this.selectTabObj = clone(this.TabObjMap[this.activeTabName]); |
| | | }, |
| | | |
| | | //拿到所有的父节点id |
| | | getParents(id, treemap, list, callback) { |
| | | list.unshift(id); |
| | | if (treemap[id].parent_id) { |
| | | this.getParents(treemap[id].parent_id, treemap, list, callback) |
| | | } |
| | | else { |
| | | callback(list); |
| | | } |
| | | }, |
| | | |
| | | tableButtonClick() { |
| | | var me = this; |
| | | var tablebuttonClick = {}; |
| | | // 授权医院 |
| | | tablebuttonClick.tab2 = [ |
| | | // { |
| | | // name: "新增", type: "primary", icon: "el-icon-plus", |
| | | // isbuttonshow: this.isedit, |
| | | // code: "add", isselected: false, classname: "", |
| | | // onclick: function(obj) { |
| | | // // obj.selectedList |
| | | // if (!me.formData.company_name) { |
| | | // Root.message({ |
| | | // type: 'warning', |
| | | // message: '请先选择公司' |
| | | // }); |
| | | // return |
| | | // } |
| | | // if (!me.formData.bu) { |
| | | // Root.message({ |
| | | // type: 'warning', |
| | | // message: '请先选择BU' |
| | | // }); |
| | | // return |
| | | // } |
| | | |
| | | // me.openAccountHospital('addhospital', obj.selectedList[0]); |
| | | // } |
| | | // }, |
| | | { |
| | | isbuttonshow: this.isedit, |
| | | code: "add", isselected: false, classname: "", |
| | | onclick: function(obj) { |
| | | if (!me.formData.company_name) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请先选择公司' |
| | | }); |
| | | return |
| | | } |
| | | if (!me.formData.bu_name) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请先选择BU' |
| | | }); |
| | | return |
| | | } |
| | | //打开医院库弹窗 |
| | | me.openHospital("add", obj, function(popupobj){ |
| | | let row_ = clone(me.formData); |
| | | var list_h = clone(popupobj.list) |
| | | |
| | | var tableData_ = clone(me.TabObjMap["tab2"].tableData); |
| | | list_h.map(h=>{ |
| | | var h_ = { |
| | | hospital_id: clone(h.hospital_id), |
| | | id: "", |
| | | agreement_id: me.formData.id, |
| | | // agreement_no: me.formData.agreement_no, // 保存上的都是初始编码0000, |
| | | account_id: me.formData.account_id, |
| | | |
| | | company_id: me.formData.company_id, |
| | | company_name: me.formData.company_name, |
| | | bu_id: me.formData.bu_id, |
| | | bu_name: me.formData.bu_name, |
| | | org_id: me.formData.customer_id, |
| | | md_org__name: me.formData.customer_name, |
| | | md_hospital__code: h.md_hospital__code, |
| | | md_hospital__name: h.md_hospital__name, |
| | | |
| | | hospital_code: h.md_hospital__code, |
| | | hospital_name: h.md_hospital__name, |
| | | } |
| | | |
| | | tableData_.unshift(clone(h_)); |
| | | }) |
| | | |
| | | me.TabObjMap["tab2"].tableData = clone(tableData_); |
| | | if (me.selectTabObj.code == "tab2") { |
| | | me.selectTabObj = clone(me.TabObjMap["tab2"]); |
| | | } |
| | | |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | // { |
| | | // // name: "编辑", // type: "primary", // icon: "el-icon-edit", |
| | | // isbuttonshow: this.isedit, |
| | | // code: "edit", isselected: true, classname: "", |
| | | // onclick: function(obj) { |
| | | // // obj.selectedList |
| | | // me.openAccountHospital('edithospital', obj.selectedList[0]); |
| | | // } |
| | | // }, |
| | | { |
| | | // name: "删除", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: this.isedit, type: "danger", |
| | | code: "delete", isselected: true, classname: "", |
| | | onclick: function(obj) { |
| | | var row = obj.selectedList[0]; |
| | | var txt = clone(row.md_hospital__name); |
| | | |
| | | me.deleteDataById(row.id, me.selectTabObj.dataname, "【" + txt + "】", function() { |
| | | me.TabObjMap["tab2"].tableData.splice(obj.selectRowIndex, 1); |
| | | me.selectTabObj = clone(me.TabObjMap["tab2"]); |
| | | // me.getAccountHospitalByAgreementId(); |
| | | }) |
| | | } |
| | | }, |
| | | ] |
| | | // 指标 |
| | | tablebuttonClick.tab3 = [ |
| | | { |
| | | // name: "新增", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: this.isedit || me.popupParames.sceneCode == "change", |
| | | code: "add", isselected: false, classname: "", |
| | | onclick: function(obj) { |
| | | var options_product_ = []; |
| | | me.TabObjMap["tab1"].tableFields.map(f=>{ |
| | | if (f.field == "product_id") { |
| | | options_product_ = clone(f.options); |
| | | } |
| | | }) |
| | | // 获取授权产品 |
| | | if (options_product_.length == 0) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '没有授权产品' |
| | | }); |
| | | return; |
| | | } |
| | | else { |
| | | me.openTargetDealer('addTarget', obj.selectedList[0], options_product_); |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | // name: "编辑", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: this.isedit, |
| | | code: "edit", isselected: true, classname: "", |
| | | onclick: function(obj) { |
| | | // obj.selectedList |
| | | var options_product_ = []; |
| | | me.TabObjMap["tab1"].tableFields.map(f=>{ |
| | | if (f.field == "product_id") { |
| | | options_product_ = clone(f.options); |
| | | } |
| | | }) |
| | | // 获取授权产品 |
| | | if (options_product_.length == 0) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '没有授权产品' |
| | | }); |
| | | return; |
| | | } |
| | | else { |
| | | me.openTargetDealer('editTarget', obj.selectedList[0], options_product_, obj.selectRowIndex); |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | // name: "删除", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: this.isedit, type: "danger", |
| | | code: "delete", isselected: true, classname: "", |
| | | onclick: function(obj) { |
| | | var row = obj.selectedList[0]; |
| | | var txt = clone(row.product_name); |
| | | me.deleteDataById(row.id, me.selectTabObj.dataname, "【" + txt + "】", function() { |
| | | me.TabObjMap["tab3"].tableData.splice(obj.selectRowIndex, 1); |
| | | // me.TabObjMap["tab3"].tableData.removeobj(row); |
| | | me.selectTabObj = clone(me.TabObjMap["tab3"]); |
| | | }) |
| | | } |
| | | }, |
| | | ] |
| | | // 价格政策 |
| | | tablebuttonClick.tab4 = [ |
| | | { |
| | | // name: "新增", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: this.isedit, |
| | | code: "add", isselected: false, classname: "", |
| | | onclick: function(obj) { |
| | | var options_product_ = []; |
| | | |
| | | // 获取授权产品 |
| | | if (me.TabObjMap["tab1"].formData.product_id.length == 0) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请先设置【产品/区域】中的产品范围' |
| | | }); |
| | | return; |
| | | } |
| | | else { |
| | | me.openPolicyList("add", "price", function(popupobj){ |
| | | // 创建一个新的买赠备案 root/data/newEntity |
| | | me.toSaveRecord("price", popupobj, function(newrow){ |
| | | var tableData_ = clone(me.TabObjMap["tab4"].tableData); |
| | | var formData_ = clone(me.formData); |
| | | if (newrow) { |
| | | newrow.type_code = 'Customer' |
| | | if (formData_.date_from) { |
| | | newrow.date_from = formData_.date_from |
| | | } |
| | | if (formData_.date_to) { |
| | | newrow.date_to = formData_.date_to |
| | | } |
| | | |
| | | tableData_.unshift(clone(newrow)); |
| | | } |
| | | |
| | | me.TabObjMap["tab4"].tableData = clone(tableData_); |
| | | if (me.selectTabObj.code == "tab4") { |
| | | me.selectTabObj = clone(me.TabObjMap["tab4"]); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | // name: "删除", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: this.isedit, type: "danger", |
| | | code: "delete", isselected: true, classname: "", |
| | | onclick: function(obj) { |
| | | var row = obj.selectedList[0]; |
| | | var txt = clone(row.product_name); |
| | | me.deleteDataById(row.id, me.selectTabObj.dataname, "【" + txt + "】", function(){ |
| | | // me.getPolicyListByAgreementId("price"); |
| | | me.TabObjMap["tab4"].tableData.splice(obj.selectRowIndex, 1); |
| | | me.selectTabObj = clone(me.TabObjMap["tab4"]); |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | |
| | | // { |
| | | // // name: "新增", // type: "primary", // icon: "el-icon-edit", |
| | | // isbuttonshow: this.isedit, |
| | | // code: "add", isselected: false, classname: "", |
| | | // onclick: function(obj) { |
| | | // var options_product_ = []; |
| | | |
| | | // // 获取授权产品 |
| | | // if (me.TabObjMap["tab1"].formData.product_id.length == 0) { |
| | | // Root.message({ |
| | | // type: 'warning', |
| | | // message: '请先设置【产品/区域】中的产品范围' |
| | | // }); |
| | | // return; |
| | | // } |
| | | // else { |
| | | // var product_ids_ = clone(me.TabObjMap["tab1"].formData.product_id); |
| | | // var product_line_obj_ = {}; |
| | | // product_ids_.map(pis=>{ |
| | | // if (!product_line_obj_[pis[0]]) { |
| | | // product_line_obj_[pis[0]] = { |
| | | // code: pis[0], |
| | | // value: me.productobj_map[pis[0]], |
| | | // children: [], |
| | | // } |
| | | // } |
| | | // var p_ = { |
| | | // code: pis[1], |
| | | // value: me.productobj_map[pis[1]] |
| | | // } |
| | | |
| | | // product_line_obj_[pis[0]].children.push(p_); |
| | | // }) |
| | | |
| | | // for (var line_ in product_line_obj_) { |
| | | // options_product_.push(product_line_obj_[line_]); |
| | | // } |
| | | // me.openPriceDetail('addbyagreement', obj.selectedList[0], options_product_); |
| | | // } |
| | | // } |
| | | // }, |
| | | // { |
| | | // // name: "编辑", // type: "primary", // icon: "el-icon-edit", |
| | | // isbuttonshow: this.isedit, |
| | | // code: "edit", isselected: true, classname: "", |
| | | // onclick: function(obj) { |
| | | // // obj.selectedList |
| | | // var options_product_ = []; |
| | | |
| | | // // 获取授权产品 |
| | | // if (me.TabObjMap["tab1"].formData.product_id.length == 0) { |
| | | // Root.message({ |
| | | // type: 'warning', |
| | | // message: '请先设置【产品/区域】中的产品范围' |
| | | // }); |
| | | // return; |
| | | // } |
| | | // else { |
| | | // me.openPriceDetail('editbyagreement', obj.selectedList[0], options_product_); |
| | | // } |
| | | // } |
| | | // }, |
| | | // { |
| | | // // name: "删除", // type: "primary", // icon: "el-icon-edit", |
| | | // isbuttonshow: this.isedit, type: "danger", |
| | | // code: "delete", isselected: true, classname: "", |
| | | // onclick: function(obj) { |
| | | // var row = obj.selectedList[0]; |
| | | // var txt = clone(row.product_name); |
| | | // me.deleteDataById(row.id, me.selectTabObj.dataname, "【" + txt + "】", function(){ |
| | | // me.getProdPriceByAgreementId(); |
| | | // }) |
| | | // } |
| | | // }, |
| | | ] |
| | | // 买赠政策 |
| | | tablebuttonClick.tab6 = [ |
| | | { |
| | | // name: "新增", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: this.isedit, |
| | | code: "add", isselected: false, classname: "", |
| | | onclick: function(obj) { |
| | | var options_product_ = []; |
| | | |
| | | // 获取授权产品 |
| | | if (me.TabObjMap["tab1"].formData.product_id.length == 0) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请先设置【产品/区域】中的产品范围' |
| | | }); |
| | | return; |
| | | } |
| | | else { |
| | | me.openPolicyList("add", "gift", function(popupobj){ |
| | | // 创建一个新的买赠备案 root/data/newEntity |
| | | me.toSaveRecord("gift", popupobj, function(newrow){ |
| | | var tableData_ = clone(me.TabObjMap["tab6"].tableData); |
| | | var formData_ = clone(me.formData); |
| | | if (newrow) { |
| | | if (formData_.date_from) { |
| | | newrow.date_from = formData_.date_from |
| | | } |
| | | if (formData_.date_to) { |
| | | newrow.date_to = formData_.date_to |
| | | } |
| | | |
| | | tableData_.unshift(clone(newrow)); |
| | | } |
| | | |
| | | me.TabObjMap["tab6"].tableData = clone(tableData_); |
| | | if (me.selectTabObj.code == "tab6") { |
| | | me.selectTabObj = clone(me.TabObjMap["tab6"]); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | // name: "删除", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: this.isedit, type: "danger", |
| | | code: "delete", isselected: true, classname: "", |
| | | onclick: function(obj) { |
| | | var row = obj.selectedList[0]; |
| | | var txt = clone(row.policy_no) + clone(row.policy_name) + clone(row.product_name); |
| | | me.deleteDataById(row.id, me.selectTabObj.dataname, "【" + txt + "】", function(){ |
| | | // me.getPolicyListByAgreementId("gift"); |
| | | me.TabObjMap["tab6"].tableData.splice(obj.selectRowIndex, 1); |
| | | me.selectTabObj = clone(me.TabObjMap["tab6"]); |
| | | }) |
| | | } |
| | | }, |
| | | ] |
| | | |
| | | // 折扣政策 |
| | | tablebuttonClick.tab7 = [ |
| | | { |
| | | // name: "新增", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: this.isedit, |
| | | code: "add", isselected: false, classname: "", |
| | | onclick: function(obj) { |
| | | var options_product_ = []; |
| | | |
| | | // 获取授权产品 |
| | | if (me.TabObjMap["tab1"].formData.product_id.length == 0) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请先设置【产品/区域】中的产品范围' |
| | | }); |
| | | return; |
| | | } |
| | | else { |
| | | me.openPolicyList("add", "rate", function(popupobj){ |
| | | me.toSaveRecord("rate", popupobj, function(newrow){ |
| | | var tableData_ = clone(me.TabObjMap["tab7"].tableData); |
| | | var formData_ = clone(me.formData); |
| | | if (newrow) { |
| | | if (formData_.date_from) { |
| | | newrow.date_from = formData_.date_from |
| | | } |
| | | if (formData_.date_to) { |
| | | newrow.date_to = formData_.date_to |
| | | } |
| | | tableData_.unshift(clone(newrow)); |
| | | } |
| | | |
| | | me.TabObjMap["tab7"].tableData = clone(tableData_); |
| | | if (me.selectTabObj.code == "tab7") { |
| | | me.selectTabObj = clone(me.TabObjMap["tab7"]); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | // name: "删除", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: this.isedit, type: "danger", |
| | | code: "delete", isselected: true, classname: "", |
| | | onclick: function(obj) { |
| | | var row = obj.selectedList[0]; |
| | | var txt = clone(row.policy_no) + clone(row.policy_name) + clone(row.discount_name); |
| | | me.deleteDataById(row.id, me.selectTabObj.dataname, "【" + txt + "】", function(){ |
| | | // me.getPolicyListByAgreementId("rate"); |
| | | me.TabObjMap["tab7"].tableData.splice(obj.selectRowIndex, 1); |
| | | me.selectTabObj = clone(me.TabObjMap["tab7"]); |
| | | }) |
| | | } |
| | | }, |
| | | ] |
| | | |
| | | for (var tabcode in this.TabObjMap) { |
| | | if (tablebuttonClick[tabcode]) { |
| | | this.TabObjMap[tabcode].tablebuttonClick = tablebuttonClick[tabcode]; |
| | | } |
| | | else { |
| | | this.TabObjMap[tabcode].tablebuttonClick = []; |
| | | } |
| | | } |
| | | }, |
| | | |
| | | toSaveRecord(typecode, policyobj, callback) { |
| | | var me = this; |
| | | var newdataname = "agm_record" |
| | | if (typecode == "price") { |
| | | newdataname = "md_prod_price_detail" |
| | | } |
| | | var newEntityParam = { |
| | | dataname: newdataname |
| | | } |
| | | Server.call("root/data/newEntity", newEntityParam, function(result) { |
| | | var newdata = clone(result.data[newdataname]); |
| | | |
| | | let formData_ = clone(me.formData); |
| | | let row_ = clone(policyobj.row); |
| | | for (var k in newdata) { |
| | | if (k != "id" && row_[k]) { |
| | | if (k == "policy_name") { |
| | | newdata["discount_name"] = row_[k]; |
| | | } |
| | | |
| | | newdata[k] = row_[k]; |
| | | } |
| | | } |
| | | |
| | | // newdata.policy_id = clone(row_.id); |
| | | newdata.record_id = clone(row_.id); |
| | | newdata.record_name = clone(row_.policy_name); |
| | | |
| | | newdata.agreement_id = formData_.id; |
| | | newdata.agreement_no = formData_.agreement_no; |
| | | newdata.company_name = formData_.company_name; |
| | | newdata.bu_name = formData_.bu_name; |
| | | |
| | | newdata.account_id = formData_.account_id; |
| | | newdata.org_id = formData_.customer_id; |
| | | // newdata.account_code = formData_.customer_code; |
| | | newdata.account_code = formData_.customer_code; |
| | | newdata.account_name = formData_.customer_name; |
| | | |
| | | newdata.state_code = "Input" |
| | | newdata.state_name = "录入" |
| | | newdata.date_from = "" |
| | | newdata.date_to = "" |
| | | newdata.source = "协议分解" |
| | | |
| | | newdata.company_id = me.formData.company_id |
| | | newdata.bu_id = me.formData.bu_id |
| | | callback(newdata); |
| | | // 保存到备案 |
| | | // let param = { |
| | | // dataname: me.selectTabObj.dataname, |
| | | // data: {} |
| | | // } |
| | | // param.data[me.selectTabObj.dataname] = newdata |
| | | // Server.call("root/data/saveEntity", param, function(result) { |
| | | // me.getPolicyListByAgreementId(typecode); |
| | | // }); |
| | | }); |
| | | }, |
| | | |
| | | openHospital(sceneCode, obj, callback) { |
| | | var me = this; |
| | | var data_ = {}; |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "800px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "医院选择", |
| | | id: "popup_hospitalToList",//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/popup/page/popup_hospitalToList.html", |
| | | data: data_, |
| | | delta: {}, |
| | | // filter: "org_id='"+ me.selectedrow.org_id + "' and bu_id='" + me.selectedrow.bu_id + "'", |
| | | filter: "", |
| | | sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(popupobj, popupcallback) { |
| | | callback(popupobj); |
| | | if (popupcallback) { |
| | | popupcallback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | openAccountHospital(sceneCode, seletrow) { |
| | | let me = this; |
| | | var row = {} |
| | | if (sceneCode == "addhospital") { |
| | | row = { |
| | | agreement_id: me.formData.id, |
| | | agreement_no: me.formData.agreement_no, |
| | | account_id: me.formData.account_id, |
| | | |
| | | company_id: me.formData.company_id, |
| | | company_name: me.formData.company_name, |
| | | bu_id: me.formData.bu_id, |
| | | bu_name: me.formData.bu_name, |
| | | org_id: me.formData.customer_id, |
| | | md_org__name: me.formData.customer_name, |
| | | } |
| | | } |
| | | else if (sceneCode == "edithospital" || sceneCode == "browse") { |
| | | row = seletrow; |
| | | if(!row.id){ |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请选择一条数据' |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "授权医院 " + (row.md_hospital__name ? row.md_hospital__name : ""), |
| | | id: "customer_basic_acct_yysq" + row.id + sceneCode,//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/customer_basic_acct_yysq.html", |
| | | data: row, |
| | | delta: {}, |
| | | sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.getAccountHospitalByAgreementId(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | openTargetDealer(sceneCode, obj, options_product_, selectRowIndex) { |
| | | let me = this; |
| | | var row = {}; |
| | | // 年份+公司+BU+经销商 |
| | | var text_ = ""; |
| | | if(this.formData.company_name && this.formData.bu_name && this.formData.customer_name) { |
| | | text_ = this.formData.company_name + "【" + this.formData.bu_name + "】" + this.formData.customer_name; |
| | | } |
| | | else { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请先选择经销商' |
| | | }); |
| | | return; |
| | | } |
| | | if (sceneCode == "editTarget" || sceneCode == "browse") { |
| | | row = clone(obj); |
| | | if(!row.id){ |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请选择一条数据' |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "商业指标-" + text_, |
| | | id: "popup_target_dealer_edit",//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/popup/page/popup_target_dealer_edit.html", |
| | | data: row, |
| | | delta: { |
| | | agreementdata: this.formData, |
| | | options_product: options_product_, |
| | | productobj_map: clone(me.productobj_map) |
| | | }, |
| | | sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(popupobj, callback) { |
| | | var tableData_ = clone(me.TabObjMap["tab3"].tableData); |
| | | if (sceneCode == "addTarget" && popupobj.row) { |
| | | tableData_.unshift(clone(popupobj.row)); |
| | | } |
| | | else if (sceneCode == "editTarget" && popupobj.row) { |
| | | tableData_[selectRowIndex] = clone(popupobj.row); |
| | | } |
| | | |
| | | me.TabObjMap["tab3"].tableData = clone(tableData_); |
| | | if (me.selectTabObj.code == "tab3") { |
| | | me.selectTabObj = clone(me.TabObjMap["tab3"]); |
| | | } |
| | | |
| | | // me.getTargetDealerByAgreementId(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | // openPriceDetail(sceneCode, obj, options_product_) { |
| | | // let me = this; |
| | | // var row = {}; |
| | | // var text = ""; |
| | | |
| | | // if (!me.formData.customer_id) { |
| | | // Root.message({ |
| | | // type: 'warning', |
| | | // message: '请选择经销商' |
| | | // }); |
| | | // return; |
| | | // } |
| | | |
| | | // // type_code: "", // Standard标准价目表、Customer经销商价目表 |
| | | // if (sceneCode == "addbyagreement") { |
| | | // row = { |
| | | // source: "协议分解", |
| | | // agreement_id: me.formData.id, |
| | | // agreement_no: me.formData.agreement_no, |
| | | // company_id: me.formData.company_id, |
| | | // company_name: me.formData.company_name, |
| | | // bu_id: me.formData.bu_id, |
| | | // bu_name: me.formData.bu_name, |
| | | |
| | | // account_id: me.formData.account_id, |
| | | // customer_id: me.formData.customer_id, |
| | | // customer_code: me.formData.customer_code, |
| | | // customer_name: me.formData.customer_name, |
| | | // }; |
| | | // } |
| | | // else if (sceneCode == "editbyagreement" || sceneCode == "browse") { |
| | | // row = obj; |
| | | // if(!row){ |
| | | // Root.message({ |
| | | // type: 'warning', |
| | | // message: '请选择一条数据' |
| | | // }); |
| | | // return; |
| | | // } |
| | | |
| | | // if (row.customer_name) { |
| | | // text = row.customer_name; |
| | | // } |
| | | // if (row.product_name) { |
| | | // text += "【" + row.product_name + "】"; |
| | | // } |
| | | // if (row.spec) { |
| | | // text += row.spec; |
| | | // } |
| | | |
| | | // if (text) { |
| | | // text = "-" + text; |
| | | // } |
| | | // } |
| | | |
| | | // var config = { |
| | | // totab: false, //true: 以Tab导航的方式打开 |
| | | // width: "1100px", |
| | | // height: "520px", |
| | | // icon: "icon-product", |
| | | // text: "协议价格" + text, |
| | | // id: "price_list_basic_edit" + row.id + sceneCode,//totab: true时需设置,用于判断是否已打开此页面 |
| | | // url: "module/md/page/product/page/price_list_basic_edit.html", |
| | | // data: row, |
| | | // delta: { |
| | | // agreementdata: this.formData, |
| | | // options_product: options_product_, |
| | | // productobj_map: clone(me.productobj_map) |
| | | // }, |
| | | // sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse", |
| | | // callback: function(obj, callback) { |
| | | // me.getProdPriceByAgreementId(); |
| | | // if (callback) { |
| | | // callback(); |
| | | // } |
| | | // } |
| | | // }; |
| | | // me.doPopupByPublic(config); |
| | | // }, |
| | | |
| | | openPolicyList(sceneCode, typecode, callback) { |
| | | var me = this; |
| | | var data_ = {}; |
| | | var text_ = me.selectTabObj.name |
| | | var dataname = "agm_policy_gift"; |
| | | if (typecode == "rate") { |
| | | dataname = "agm_policy_rate" |
| | | } |
| | | else if (typecode == "price") { |
| | | dataname = "agm_policy_price" |
| | | } |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: text_ + "选择", |
| | | id: "popup_policy",//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/popup/page/popup_policy.html", |
| | | dataname: dataname, |
| | | data: data_, |
| | | delta: {}, |
| | | // filter: "org_id='"+ me.selectedrow.org_id + "' and bu_id='" + me.selectedrow.bu_id + "'", |
| | | filter: "agm_policy.state_code='Open' and agm_policy.type_code='" + typecode + "'", |
| | | sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(popupobj, popupcallback) { |
| | | callback(popupobj) |
| | | |
| | | if (popupcallback) { |
| | | popupcallback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | tableFieldClick() { |
| | | var me = this; |
| | | //表单字段事件设置 |
| | | this.formfieldClick = { |
| | | is_generate: { |
| | | val: { |
| | | onchange: function(obj) { |
| | | var formFields_ = clone(me.formFields); |
| | | formFields_.map(f=>{ |
| | | if (f.field == "template_attachment_name") { // 自动生成 |
| | | f.isshow = "F"; |
| | | if (me.formData["is_generate"]) { |
| | | f.isshow = "T"; |
| | | } |
| | | } |
| | | if (f.field == "contract_attachment_name") { // 手工上传 |
| | | f.isshow = "F"; |
| | | if (!me.formData["is_generate"]) { |
| | | f.isshow = "T"; |
| | | } |
| | | } |
| | | }) |
| | | me.formFields = clone(formFields_); |
| | | } |
| | | } |
| | | }, |
| | | |
| | | contract_attachment_name: { |
| | | buttonarray: { |
| | | onclick: function(obj) { |
| | | var filenamefield = obj.obj.field; |
| | | var fileidfield = "contract_attachment_id"; |
| | | // 单附件 |
| | | if(obj.buttonobj && obj.buttonobj.code == "showfile"){ |
| | | me.showFileImgByFileId(filenamefield, fileidfield, me.dataname); |
| | | }else if (obj.buttonobj && obj.buttonobj.code == "upload"){ |
| | | me.onPopupByUploadFile(filenamefield, fileidfield, me.dataname); |
| | | }else if (obj.buttonobj && obj.buttonobj.code == "delfile"){ |
| | | me.deleteByFileId(filenamefield, fileidfield, obj); |
| | | } |
| | | |
| | | // 多附件 |
| | | // if(obj.buttonobj && obj.buttonobj.code == "showfilebyfile"){ |
| | | // me.showFileImgByFileId_n(filenamefield, obj.buttonobj.fileobj, obj.formdata); |
| | | // }else if (obj.buttonobj && obj.buttonobj.code == "uploadlist"){ |
| | | // me.onPopupByUploadFile_n(filenamefield, fileidfield, "agm_agreement", obj.formdata); |
| | | // }else if (obj.buttonobj && obj.buttonobj.code == "delfilebyfile"){ |
| | | // me.deleteByFileId_n(filenamefield, obj.buttonobj.fileobj, obj.formdata); |
| | | // } |
| | | }, |
| | | } |
| | | }, |
| | | category_id:{ |
| | | val: { |
| | | onchange: function(obj) { |
| | | let row_ = clone(me.formData); |
| | | if (Array.isArray(row_.category_id)) { |
| | | row_.category_id_temp = row_.category_id[row_.category_id.length - 1]; |
| | | var selectoption = me.options_categoryobj[row_.category_id_temp]; |
| | | row_.category_name = selectoption.name; |
| | | // 获取协议类型对应的模板 |
| | | me.getTemplateByCategoryId(selectoption.id); |
| | | } |
| | | |
| | | me.formData = clone(row_); |
| | | } |
| | | } |
| | | }, |
| | | // template_id:{ |
| | | // val: { |
| | | // onchange: function(obj) { |
| | | // let row_ = clone(me.formData); |
| | | // if (Array.isArray(row_.template_id)) { |
| | | // row_.template_id_temp = row_.template_id[row_.template_id.length - 1]; |
| | | // var selectoption = me.options_templateobj[row_.template_id_temp]; |
| | | |
| | | // row_.template_name = selectoption.name; |
| | | // row_.template_attachment_id = selectoption.template_attachment_id; |
| | | // row_.template_attachment_name = selectoption.template_attachment; |
| | | // } |
| | | // me.formData = clone(row_); |
| | | // } |
| | | // } |
| | | // }, |
| | | customer_name: { |
| | | popup: { |
| | | onclick: function(obj) {//弹窗点击事件 |
| | | //打开开户库弹窗 |
| | | me.openAccount("add", obj, function(popupobj){ |
| | | let row_ = clone(me.formData); |
| | | row_.customer_id = popupobj.row.org_id; |
| | | row_.company_id = popupobj.row.company_id; |
| | | row_.company_name = popupobj.row.company_name; |
| | | row_.bu_id = popupobj.row.bu_id; |
| | | row_.bu_name = popupobj.row.bu_name; |
| | | row_.customer_code = popupobj.row.code; |
| | | row_.customer_name = popupobj.row.account_name; |
| | | row_.account_id = popupobj.row.id; |
| | | row_.account_actor_name = popupobj.row.actor_name; |
| | | me.formData = clone(row_); |
| | | |
| | | me.getAccountPByAccountId(popupobj.row.id); |
| | | me.getAccountHospitalByAgreementId(); |
| | | |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | comeback_attachment_name: { |
| | | buttonarray: { |
| | | onclick: function(obj) { |
| | | var filenamefield = obj.obj.field; |
| | | // var fileidfield = "comeback_attachment_name"; |
| | | var fileidfield = "comeback_attachment_id"; |
| | | // 单附件 |
| | | if(obj.buttonobj && obj.buttonobj.code == "showfile"){ |
| | | me.showFileImgByFileId(filenamefield, fileidfield, me.dataname); |
| | | }else if (obj.buttonobj && obj.buttonobj.code == "upload"){ |
| | | me.onPopupByUploadFile(filenamefield, fileidfield, me.dataname); |
| | | }else if (obj.buttonobj && obj.buttonobj.code == "delfile"){ |
| | | me.deleteByFileId(filenamefield, fileidfield, obj); |
| | | } |
| | | |
| | | // 多附件 |
| | | // if(obj.buttonobj && obj.buttonobj.code == "showfilebyfile"){ |
| | | // me.showFileImgByFileId_n(filenamefield, obj.buttonobj.fileobj, obj.formdata); |
| | | // }else if (obj.buttonobj && obj.buttonobj.code == "uploadlist"){ |
| | | // me.onPopupByUploadFile_n(filenamefield, fileidfield, "agm_agreement", obj.formdata); |
| | | // }else if (obj.buttonobj && obj.buttonobj.code == "delfilebyfile"){ |
| | | // me.deleteByFileId_n(filenamefield, obj.buttonobj.fileobj, obj.formdata); |
| | | // } |
| | | }, |
| | | |
| | | } |
| | | }, |
| | | |
| | | |
| | | template_attachment_name: {//字段事件设置 |
| | | buttonarray: { |
| | | onclick: function(obj) { |
| | | var filenamefield = obj.obj.field; |
| | | // var fileidfield = "template_attachment_id"; |
| | | var fileidfield = "template_attachment_name"; |
| | | if(obj.buttonobj && obj.buttonobj.code == "showfile"){ |
| | | me.showFileImgByFileId(filenamefield, fileidfield, "agm_template"); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | date_from: {//起始日期 |
| | | val: { |
| | | onchange: function(obj) { |
| | | //开始日期要早于截止日期 |
| | | if (obj.data.date_from && obj.data.date_to) { |
| | | if (new Date(obj.data.date_from) > new Date(obj.data.date_to)) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '起始日期不能晚于终止日期' |
| | | }); |
| | | obj.data.date_from = null; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | date_to: {//终止日期 |
| | | val: { |
| | | onchange: function(obj) { |
| | | //截止日期要晚于开始日期 |
| | | if (obj.data.date_from && obj.data.date_to) { |
| | | if (new Date(obj.data.date_from) > new Date(obj.data.date_to)) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '终止日期不能早于起始日期' |
| | | }); |
| | | obj.data.date_to = null; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | }; |
| | | |
| | | var formfieldClick_tab5 = { |
| | | field_fj: { //字段事件设置 |
| | | buttonarray: { |
| | | onclick: function(obj) { |
| | | if(obj.buttonobj && obj.buttonobj.fileobj){ |
| | | me.showFileImgByFileId(obj.buttonobj.fileobj.file_name, obj.buttonobj.fileobj.id); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | |
| | | this.TabObjMap["tab1"].formfieldClick = { |
| | | product_id: { |
| | | val: { |
| | | onchange:function(){ |
| | | me.TabObjMap["tab1"].formData = me.selectTabObj.formData |
| | | } |
| | | } |
| | | }, |
| | | province: { |
| | | val: { |
| | | onchange:function(){ |
| | | me.TabObjMap["tab1"].formData = me.selectTabObj.formData |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | |
| | | // this.TabObjMap["tab5"].formfieldClick = formfieldClick_tab5; |
| | | }, |
| | | |
| | | deleteDataById(id, dataname, confirm_txt, callback){ |
| | | var me = this; |
| | | var formData_ = clone(me.formData); |
| | | Root.confirm('确定删除该' + me.selectTabObj.name + 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: '已取消删除' |
| | | }); |
| | | }); |
| | | |
| | | }, |
| | | |
| | | |
| | | // 获取授权省份和授权产品,根据开户id |
| | | getAccountPByAccountId(account_id) { |
| | | var me = this; |
| | | me.TabObjMap["tab1"].tableFields.map(f=>{ |
| | | if (f.field == "product_id") { |
| | | if (me.formData.bu_id && me.md_bu_product_obj[me.formData.bu_id]) { |
| | | f.options = clone(me.md_bu_product_obj[me.formData.bu_id].children); |
| | | } |
| | | else { |
| | | f.options = []; |
| | | } |
| | | // f.options = clone(md_bu_product_line_array_); |
| | | } |
| | | else if (f.field == "province") { |
| | | f.options = clone(me.options_tree_province); |
| | | } |
| | | }) |
| | | |
| | | if (me.selectTabObj.code == "tab1") { |
| | | me.selectTabObj = clone(me.TabObjMap["tab1"]); |
| | | } |
| | | |
| | | // var me = this; |
| | | // let param_table = { |
| | | // isClientMode: false, |
| | | // dataname: "md_org_account", |
| | | // id: account_id, |
| | | |
| | | // } |
| | | // Server.call("root/data/getEntity", param_table, function(result) { |
| | | // var a = ""; |
| | | // if (result.data) { |
| | | // var rowData_ = clone(result.data); |
| | | // // var md_bu_product_line_array_ = []; |
| | | // // var options_tree_province = []; |
| | | // // if (rowData_["md_org_account_product"]) { |
| | | // // var md_bu_product_array_ = clone(rowData_["md_org_account_product"]); |
| | | // // var md_bu_product_line_obj_ = {}; |
| | | // // var md_bu_product_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]); |
| | | // // } |
| | | // // // me.md_bu_product_obj = clone(md_bu_product_obj_); |
| | | // // } |
| | | |
| | | // // if (rowData_["md_org_account_province"]) { |
| | | // // var province_ = rowData_["md_org_account_province"]; |
| | | // // province_.map(p=>{ |
| | | // // p.value = p.province; |
| | | // // p.code = p.province; |
| | | // // }) |
| | | // // var options_tree_province_ = listTOListGroup(province_, "area", "value"); |
| | | // // options_tree_province = options_tree_province_; |
| | | // // } |
| | | |
| | | // // me.TabObjMap["tab1"].tableFields.map(f=>{ |
| | | // // if (f.field == "product_id") { |
| | | // // if (me.formData.bu_id) { |
| | | // // mp.options = clone(me.md_bu_product_obj[me.formData.bu_id]); |
| | | // // } |
| | | // // else { |
| | | // // mp.options = []; |
| | | // // } |
| | | // // // f.options = clone(md_bu_product_line_array_); |
| | | // // } |
| | | // // else if (f.field == "province") { |
| | | // // f.options = clone(me.options_tree_province); |
| | | // // } |
| | | // // }) |
| | | |
| | | // // if (me.selectTabObj.code == "tab1") { |
| | | // // me.selectTabObj = clone(me.TabObjMap["tab1"]); |
| | | // // } |
| | | // } |
| | | |
| | | // }) |
| | | }, |
| | | // 获取授权医院,根据协议id |
| | | getAccountHospitalByAgreementId() { |
| | | var me = this; |
| | | let param_table = { |
| | | isClientMode: false, |
| | | dataname: "md_org_account_hospital", |
| | | filter: "agreement_id='" + me.formData.id + "'", |
| | | } |
| | | Server.call("root/data/getEntitySet", param_table, function(result) { |
| | | if (result.data.entityset) { |
| | | me.TabObjMap["tab2"].tableData = clone(result.data.entityset); |
| | | if (me.selectTabObj.code == "tab2") { |
| | | me.selectTabObj = clone(me.TabObjMap["tab2"]); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | getTargetDealerByAgreementId() { |
| | | var me = this; |
| | | let param_table = { |
| | | isClientMode: false, |
| | | dataname: "md_target_dealer", |
| | | filter: "agreement_id='" + me.formData.id + "'", |
| | | } |
| | | Server.call("root/data/getEntitySet", param_table, function(result) { |
| | | if (result.data.entityset) { |
| | | me.TabObjMap["tab3"].tableData = clone(result.data.entityset); |
| | | if (me.selectTabObj.code == "tab3") { |
| | | me.selectTabObj = clone(me.TabObjMap["tab3"]); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // 获取价格列表,根据协议id |
| | | getProdPriceByAgreementId() { |
| | | var me = this; |
| | | let param_table = { |
| | | isClientMode: false, |
| | | dataname: "md_prod_price_detail", |
| | | filter: "agreement_id='" + me.formData.id + "'", |
| | | } |
| | | Server.call("root/data/getEntitySet", param_table, function(result) { |
| | | if (result.data.entityset) { |
| | | me.TabObjMap["tab4"].tableData = clone(result.data.entityset); |
| | | if (me.selectTabObj.code == "tab4") { |
| | | me.selectTabObj = clone(me.TabObjMap["tab4"]); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | getPolicyListByAgreementId(typecode) { |
| | | var me = this; |
| | | var tabname = "tab6"; |
| | | var dataname = "agm_record_gift"; // 买赠政策 |
| | | if (typecode == "rate") { |
| | | dataname = "agm_record_rate" // 折扣政策 |
| | | tabname = "tab7" |
| | | } |
| | | if (typecode == "price") { |
| | | dataname = "md_prod_price_detail" // 价格政策 |
| | | tabname = "tab4" |
| | | } |
| | | |
| | | let param_table = { |
| | | isClientMode: false, |
| | | dataname: dataname, |
| | | filter: "agreement_id='" + me.formData.id + "'", |
| | | } |
| | | Server.call("root/data/getEntitySet", param_table, function(result) { |
| | | if (result.data.entityset) { |
| | | me.TabObjMap[tabname].tableData = clone(result.data.entityset); |
| | | if (me.selectTabObj.code == tabname) { |
| | | me.selectTabObj = clone(me.TabObjMap[tabname]); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // 获取协议模板及模板附件,根据协议类型 |
| | | getTemplateByCategoryId(category_id) { |
| | | var me = this; |
| | | let param_table = { |
| | | isClientMode: false, |
| | | dataname: "agm_template", |
| | | filter: "category_id='" + category_id + "'", |
| | | |
| | | } |
| | | Server.call("root/data/getEntitySet", param_table, function(result) { |
| | | if (result.data.entityset) { |
| | | var template_list_ = clone(result.data.entityset); |
| | | template_list_.map(t=>{ |
| | | if (t.template_type_code == "main_template") { // 主模板 |
| | | var formData_ = clone(me.formData); |
| | | formData_.template_id = t.id; |
| | | formData_.template_name = t.name; |
| | | formData_.template_attachment_id = t.template_attachment_id; |
| | | formData_.template_attachment_name = t.template_attachment; |
| | | me.formData = clone(formData_); |
| | | } |
| | | else { // 附录模板 |
| | | |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | openAccount(sceneCode, obj, callback) { |
| | | var me = this; |
| | | var data_ = {}; |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "800px", |
| | | 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: "md_org_account.state_code='Open'", |
| | | sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(popupobj, popupcallback) { |
| | | callback(popupobj); |
| | | if (popupcallback) { |
| | | popupcallback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | showFileImgByFileId_n(filenamefield, fileobj, objformdata){ |
| | | let me = this; |
| | | var formData_ = clone(me.selectTabObj.formData); |
| | | var file_id = ""; |
| | | var file_name = ""; |
| | | var dataname_ = ""; |
| | | if(filenamefield == "contract_attachment_name"){ |
| | | file_id = fileobj.id; |
| | | file_name = fileobj.file_name |
| | | dataname_ = "agm_agreement" |
| | | } |
| | | |
| | | this.zzimg = {}; |
| | | this.zzimgList = []; |
| | | this.file_txt = false; |
| | | if(file_id) { |
| | | var fileid = file_id; |
| | | let fileName = clone(file_name); |
| | | let index1 = fileName.lastIndexOf("."); |
| | | let index2 = fileName.length; |
| | | let suffix = fileName.substring(index1, index2).toLowerCase(); //后缀名 |
| | | if (suffix == ".png" || suffix == ".jpg" || suffix == ".pdf") { |
| | | var row = { |
| | | fileid: fileid, |
| | | dataname: dataname_, |
| | | filename: fileName |
| | | } |
| | | var config = { |
| | | totab: false, |
| | | width: "1200px", |
| | | height: 800, |
| | | icon: "icon-product", |
| | | text: "附件预览", |
| | | id: "pdf_" + fileid, |
| | | url: "module/tool/page/popup_file_pdf.html", |
| | | data: row, |
| | | delta: {}, |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | this.doPopupByPublic(config); |
| | | |
| | | } |
| | | else {//只可下载,不可预览 |
| | | // handleDownloadUrl(fileid,false); |
| | | handleDownload(fileid, dataname_); |
| | | } |
| | | } |
| | | }, |
| | | onPopupByUploadFile_n(filenamefield, fileidfield, dataname, objformdata) { |
| | | var me = this; |
| | | var analysistype_ = ""; |
| | | var sender_id_ = ""; // 业务数据id; |
| | | if (objformdata.id) { |
| | | sender_id_ = objformdata.id; |
| | | } |
| | | var formData_ = clone(me.selectTabObj.formData); |
| | | var delta_ = {filetypelist: [".png", ".jpg",".pdf"]}; //, ".pdf" |
| | | var config = { |
| | | totab: false, |
| | | width: "500px", |
| | | icon: "icon-product", |
| | | text: "附件上传", |
| | | id: "popupByUploadFile", |
| | | url: "module/tool/page/popup_uploadFile.html", |
| | | data: { |
| | | dataName: dataname, |
| | | fileidfieldName: fileidfield, |
| | | id: sender_id_, |
| | | fileNamefieldName: filenamefield |
| | | }, |
| | | delta: delta_, |
| | | callback: function(obj, callback) { |
| | | me.$message({ |
| | | showClose: true, |
| | | message: '上传成功!', |
| | | type: 'success' |
| | | }); |
| | | console.log('附件信息',obj) |
| | | if(filenamefield == "contract_attachment_name"){ |
| | | var f_ = { |
| | | id: obj.row[0].id, |
| | | file_name: decodeURI(obj.row[0].name) |
| | | } |
| | | if (!objformdata[filenamefield]) { |
| | | objformdata[filenamefield] = [] |
| | | } |
| | | objformdata[filenamefield].push(f_); |
| | | // objformdata[filenamefield] = decodeURI(obj.row[0].name); |
| | | // objformdata[fileidfield] = obj.row[0].id; |
| | | if (!objformdata.id) { |
| | | objformdata.id = obj.row[0].sender_id; |
| | | } |
| | | } |
| | | if (!objformdata) { |
| | | me.selectTabObj.formData = formData_; |
| | | } |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | this.doPopupByPublic(config); |
| | | }, |
| | | |
| | | deleteByFileId_n(filenamefield, fileobj, objformdata){ |
| | | var me = this; |
| | | var formData_ = clone(me.formData); |
| | | Root.confirm('确定删除附件【' + fileobj.file_name + '】吗?', '删除提示', { |
| | | confirmButtonText: '删除', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | if (fileobj.id) { |
| | | let param = { |
| | | dataname: "agm_agreement_file", |
| | | id: fileobj.id |
| | | } |
| | | |
| | | Server.call("root/data/deleteEntity", param, function(result) { |
| | | console.log(result); |
| | | if (result && result.data) { |
| | | objformdata[filenamefield].remove(fileobj); |
| | | // me.formData[filenamefield].remove(fileobj); |
| | | |
| | | // me.formData = formData_; |
| | | Root.message({ |
| | | type: 'success', |
| | | message: '删除成功!' |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }).catch(() => { |
| | | Root.message({ |
| | | type: 'info', |
| | | message: '已取消删除' |
| | | }); |
| | | }); |
| | | |
| | | }, |
| | | |
| | | showFileImgByFileId(filenamefield, fileidfield, dataname) { |
| | | let me = this; |
| | | var formData_ = clone(me.formData); |
| | | var file_name = formData_[filenamefield]; |
| | | var file_id = formData_[fileidfield]; |
| | | if(file_id) { |
| | | var fileid = file_id; |
| | | let fileName = clone(file_name); |
| | | let index1 = fileName.lastIndexOf("."); |
| | | let index2 = fileName.length; |
| | | let suffix = fileName.substring(index1, index2).toLowerCase(); //后缀名 |
| | | if (suffix == ".png" || suffix == ".jpg" || suffix == ".pdf") { |
| | | var row = { |
| | | fileid: fileid, |
| | | filename: fileName, |
| | | dataname: dataname |
| | | } |
| | | |
| | | var config = { |
| | | totab: false, |
| | | width: "1000px", |
| | | height: 800, |
| | | icon: "icon-product", |
| | | text: "附件预览", |
| | | id: "pdf_" + fileid, |
| | | url: "module/tool/page/popup_file_pdf.html", |
| | | data: row, |
| | | delta: {}, |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | this.doPopupByPublic(config); |
| | | } |
| | | else {//只可下载,不可预览 |
| | | // handleDownloadUrl(fileid,false); |
| | | handleDownload(fileid, dataname); |
| | | } |
| | | } |
| | | }, |
| | | |
| | | onPopupByUploadFile(filenamefield, fileidfield,dataname) { |
| | | var me = this; |
| | | var analysistype_ = ""; |
| | | var formData_ = clone(me.formData); |
| | | var delta_ = {filetypelist: []}//".png", ".jpg", ".pdf" |
| | | var config = { |
| | | totab: false, |
| | | width: "500px", |
| | | icon: "icon-product", |
| | | text: "附件上传", |
| | | id: "popupByUploadFile", |
| | | url: "module/tool/page/popup_uploadFile.html", |
| | | data: { |
| | | dataName: dataname, |
| | | fileidfieldName: fileidfield, |
| | | id: me.formData.id, |
| | | fileNamefieldName: filenamefield, |
| | | }, |
| | | delta: delta_, |
| | | callback: function(obj, callback) { |
| | | me.$message({ |
| | | showClose: true, |
| | | message: '上传成功!', |
| | | type: 'success' |
| | | }); |
| | | |
| | | if (!formData_[filenamefield]) { |
| | | formData_[filenamefield] = {}; |
| | | } |
| | | formData_[filenamefield] = decodeURI(obj.row[0].name); |
| | | formData_[fileidfield] = obj.row[0].id; |
| | | |
| | | me.formData = formData_; |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | this.doPopupByPublic(config); |
| | | }, |
| | | deleteByFileId(filenamefield, fileidfield, obj){ |
| | | var me = this; |
| | | var formData_ = clone(me.formData); |
| | | Root.confirm('确定删除附件【' + formData_[filenamefield] + '】吗?', '删除提示', { |
| | | confirmButtonText: '删除', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | if (obj.formdata[fileidfield]) { |
| | | let param = { |
| | | dataname: "agm_agreement_file", |
| | | id: obj.formdata[fileidfield], |
| | | } |
| | | |
| | | Server.call("root/data/deleteEntity", param, function(result) { |
| | | console.log(result); |
| | | if (result && result.data) { |
| | | formData_[filenamefield] = ""; |
| | | formData_[fileidfield] = ""; |
| | | me.formData = clone(formData_); |
| | | Root.message({ |
| | | type: 'success', |
| | | message: '删除成功!' |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }).catch(() => { |
| | | Root.message({ |
| | | type: 'info', |
| | | message: '已取消删除' |
| | | }); |
| | | }); |
| | | |
| | | }, |
| | | //提交 |
| | | submitRowTable() { |
| | | this.iscommit = true; |
| | | //必填项校验 |
| | | var bo1 = this.$refs.form1.checkForm(); |
| | | if(!bo1){ |
| | | Root.message({ |
| | | type: 'error', |
| | | message: '请填写必填项' |
| | | }); |
| | | this.iscommit = false; |
| | | return; |
| | | } |
| | | this.saveRowTable(); |
| | | }, |
| | | |
| | | //保存 |
| | | saveRowTable() { |
| | | var me = this; |
| | | var operator_ = "saveEntity";//保存 |
| | | me.loading_save = true; |
| | | if(me.iscommit) { |
| | | operator_ = "commit";//提交 |
| | | } |
| | | |
| | | var entity_ = clone(me.formData); |
| | | |
| | | if (me.copyAdd) { |
| | | var entitys = clone(me.formDatas_old); |
| | | var entity = []; |
| | | entitys.map(es => { |
| | | for (var f in es) { |
| | | if (f == "id") { |
| | | es.source_id = es[f]; |
| | | } |
| | | if (f == "agreement_no" || f == "comeback_attachment_id" || f == "comeback_attachment_name" || f == "state_detail_code" || f == "state_detail_name" || f == "id" || f == "creator_id" || f == "creator_name" || f == "create_time" || f == "update_time") { |
| | | es[f] = ""; |
| | | } |
| | | if (f == "state_code") { |
| | | es[f] = "Input"; |
| | | } |
| | | if (f == "state_name") { |
| | | es[f] = "录入"; |
| | | } |
| | | if (f == "category_id" || f == "category_name" || f == "date_from" || f == "date_to" || f == "remark" || f == "template_attachment_id" || f == "template_attachment_name" || f == "template_id" || f == "template_name") { |
| | | es[f] = entity_[f]; |
| | | } |
| | | } |
| | | entity.push(es); |
| | | }) |
| | | } |
| | | else { |
| | | var entity = {}; |
| | | for (var r in entity_) { |
| | | if (r == "category_id" && entity_["category_id_temp"]) { |
| | | entity[r] = entity_["category_id_temp"]; |
| | | } |
| | | else if (r == "template_id" && entity_["template_id_temp"]) { |
| | | entity[r] = entity_["template_id_temp"]; |
| | | } |
| | | else if (r == "comeback_attachment_name") { |
| | | |
| | | } |
| | | else if (entity_[r] || entity_[r] == "" || entity_[r] == false || entity_[r] == 0) { |
| | | entity[r] = entity_[r]; |
| | | } |
| | | } |
| | | } |
| | | |
| | | var productlist_ = []; |
| | | var provincelist_ = []; |
| | | var account_hospital_ = []; |
| | | var target_dealer_ = []; |
| | | var price_policy_ = []; |
| | | var gift_policy_ = []; |
| | | var rate_policy_ = []; |
| | | |
| | | if (me.TabObjMap["tab1"].formData.product_id.length) { |
| | | var product_ids = clone(me.TabObjMap["tab1"].formData.product_id); |
| | | product_ids.map(pids=>{ |
| | | var p_ = { |
| | | agreement_id: me.formData.id, |
| | | agreement_no: me.formData.agreement_no, |
| | | company_name: me.formData.company_name, |
| | | bu_name: me.formData.bu_name, |
| | | company_id: me.formData.company_id, |
| | | bu_id: me.formData.bu_id, |
| | | |
| | | |
| | | account_id: me.formData.account_id, |
| | | customer_id: me.formData.customer_id, |
| | | customer_code: me.formData.customer_code, |
| | | customer_name: me.formData.customer_name, |
| | | source: "协议分解", |
| | | |
| | | product_id: pids[0], |
| | | product_name: me.productobj_map[pids[0]] |
| | | } |
| | | if (me.old_agm_record_product_obj[pids[0]]) { |
| | | p_.id = me.old_agm_record_product_obj[pids[0]].id |
| | | } |
| | | productlist_.push(p_) |
| | | }) |
| | | } |
| | | if (me.TabObjMap["tab1"].formData.province.length) { |
| | | var provinces = clone(me.TabObjMap["tab1"].formData.province); |
| | | provinces.map(ps=>{ |
| | | var p_ = { |
| | | agreement_id: me.formData.id, |
| | | agreement_no: me.formData.agreement_no, |
| | | company_name: me.formData.company_name, |
| | | bu_name: me.formData.bu_name, |
| | | company_id: me.formData.company_id, |
| | | bu_id: me.formData.bu_id, |
| | | |
| | | account_id: me.formData.account_id, |
| | | customer_id: me.formData.customer_id, |
| | | customer_code: me.formData.customer_code, |
| | | customer_name: me.formData.customer_name, |
| | | source: "协议分解", |
| | | |
| | | // area: ps[0], |
| | | province: ps[0], |
| | | } |
| | | if (me.old_agm_record_province_obj[ps[0]]) { |
| | | p_.id = me.old_agm_record_province_obj[ps[0]].id |
| | | } |
| | | provincelist_.push(p_) |
| | | }) |
| | | } |
| | | |
| | | if (me.TabObjMap["tab2"].tableData.length) { |
| | | account_hospital_ = clone(me.TabObjMap["tab2"].tableData); |
| | | } |
| | | |
| | | if (me.TabObjMap["tab3"].tableData.length) { |
| | | target_dealer_ = clone(me.TabObjMap["tab3"].tableData); |
| | | } |
| | | |
| | | if (me.TabObjMap["tab4"].tableData.length) { |
| | | price_policy_ = clone(me.TabObjMap["tab4"].tableData); |
| | | } |
| | | if (me.TabObjMap["tab6"].tableData.length) { |
| | | gift_policy_ = clone(me.TabObjMap["tab6"].tableData); |
| | | } |
| | | if (me.TabObjMap["tab7"].tableData.length) { |
| | | rate_policy_ = clone(me.TabObjMap["tab7"].tableData); |
| | | } |
| | | |
| | | let param = { |
| | | dataname: me.dataname, |
| | | data: {}, |
| | | } |
| | | if (me.formData.id) { |
| | | param.id = me.formData.id |
| | | } |
| | | // if(me.iscommit) { |
| | | // param.to_state = "OpeningApproval";//提交 |
| | | // } |
| | | |
| | | param.data[me.dataname] = entity; |
| | | |
| | | if (productlist_.length) { |
| | | param.data["agm_record_product"] = productlist_; |
| | | } |
| | | if (provincelist_.length) { |
| | | param.data["agm_record_province"] = provincelist_; |
| | | } |
| | | if (account_hospital_.length) { |
| | | param.data["md_org_account_hospital"] = account_hospital_; |
| | | } |
| | | if (target_dealer_.length) { |
| | | param.data["md_target_dealer"] = target_dealer_; |
| | | } |
| | | |
| | | if (price_policy_.length) { |
| | | // param.data["agm_record_price"] = price_policy_; |
| | | param.data["md_prod_price_detail"] = price_policy_; |
| | | } |
| | | if (gift_policy_.length) { |
| | | param.data["agm_record_gift"] = gift_policy_; |
| | | } |
| | | if (rate_policy_.length) { |
| | | param.data["agm_record_rate"] = rate_policy_; |
| | | } |
| | | |
| | | Server.call("root/data/"+operator_, param, function(result) { |
| | | if (result.success) { |
| | | if (me.iscommit) { |
| | | me.iscommit = false; |
| | | me.loading_save = false; |
| | | Root.message({ |
| | | type: 'success', |
| | | message: '提交成功' |
| | | }); |
| | | } |
| | | else { |
| | | me.loading_save = false; |
| | | 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; |
| | | me.loading_save = 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 if (errorresult.exists_errors && errorresult.exists_errors.length) { |
| | | var messages_list = [] |
| | | var index_ = 0; |
| | | errorresult.exists_errors.map(r=>{ |
| | | index_ ++; |
| | | var messages_ = { |
| | | step: index_, |
| | | level: "Error", |
| | | message: r.title + "【" + r.errors[0].agreement_no + r.errors[0].account_actor_name?r.errors[0].account_actor_name: '' + "】" |
| | | } |
| | | messages_list.push(messages_) |
| | | }) |
| | | 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: messages_list, |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | } |
| | | else { |
| | | if(me.iscommit) { |
| | | me.iscommit = false; |
| | | Root.message({ |
| | | type: 'error', |
| | | message: '提交失败' |
| | | }); |
| | | } |
| | | else { |
| | | me.loading_save = false; |
| | | Root.message({ |
| | | type: 'error', |
| | | message: '保存失败' |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | //审批通过相关数据赋值 |
| | | onPassApproval() { |
| | | this.approveremark = ""; |
| | | this.reasonvisible = true; |
| | | this.passOrRefuse = true; |
| | | }, |
| | | |
| | | //审批拒绝相关数据赋值 |
| | | onRefuseApproval(){ |
| | | this.approveremark = ""; |
| | | this.reasonvisible = true; |
| | | this.passOrRefuse = false; |
| | | }, |
| | | |
| | | //保存通过/拒绝原因 |
| | | saveReason2(){ |
| | | this.loading_pass = true; |
| | | if(this.passOrRefuse){ |
| | | this.doPassApproval(true); |
| | | }else{ |
| | | if(this.approveremark != ""){ |
| | | this.doPassApproval(false); |
| | | } |
| | | else{ |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请填写原因' |
| | | }); |
| | | this.loading_pass = false; |
| | | } |
| | | } |
| | | }, |
| | | |
| | | //审批通过/拒绝 |
| | | doPassApproval(bo) { |
| | | var me = this; |
| | | var state_ = "approve" |
| | | if (!bo) { |
| | | state_ = "reject" |
| | | } |
| | | |
| | | let param = { |
| | | dataname: me.dataname, |
| | | id: me.formData.id, |
| | | remark: me.approveremark, |
| | | } |
| | | Server.call("root/data/" + state_, param, function(result) { |
| | | me.loading_pass = false; |
| | | console.log(result); |
| | | if (bo) { |
| | | Root.message({ |
| | | type: 'success', |
| | | message: '审批成功' |
| | | }); |
| | | me.saveAfter(); |
| | | } |
| | | |
| | | else { |
| | | 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: '审批失败' |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // 通过或拒绝 |
| | | 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(bo) { |
| | | var me = this; |
| | | this.getMachine(function(next_step, up_step) { // |
| | | me.doRunApproval(next_step, up_step); |
| | | }); |
| | | }, |
| | | |
| | | getMachine(callback) { |
| | | var me = this; |
| | | let param = { |
| | | dataname: me.dataname, |
| | | } |
| | | 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; |
| | | 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") { |
| | | |
| | | } |
| | | 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: "agm_agreement", |
| | | id: me.formData.id, |
| | | to_state: to_state_, |
| | | remark: this.approveremark |
| | | } |
| | | // |
| | | // 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: '审批失败' |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | onTabBeforeLeave(tab, oldtab) { |
| | | this.TabObjMap[oldtab] = clone(this.selectTabObj); |
| | | }, |
| | | handleClick() { |
| | | this.isRefresh = false; |
| | | |
| | | this.selectTabObj = {} |
| | | this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭 |
| | | this.selectTabObj = clone(this.TabObjMap[this.activeTabName]); |
| | | this.isRefresh = true; |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | loadJsCss(function () { |
| | | initVue(); |
| | | }); |
| | | </script> |
| | | <style> |
| | | /* 在vue.js中 v-cloak 这个指令是防止页面加载时出现 vuejs 的变量名而设计的 */ |
| | | [v-cloak] { |
| | | display: none !important; |
| | | } |
| | | </style> |
| | | |
| | | </head> |
| | | |
| | | <body style="margin: 0px;"> |
| | | <div v-cloak id="vbody"> |
| | | <div id="page_root"> |
| | | <div ref="popup_body" style="padding: 0 20px;"> |
| | | <div class="el-dialog__header"> |
| | | <div class="dialog-title"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </body> |
| | | </html> |
| | |
| | | label:"name",//是下拉选项时设置 |
| | | filter: "", |
| | | orderby: "name" |
| | | } |
| | | }, |
| | | { |
| | | name: "md_org_account_criteria_rule", |
| | | dataname: "md_org_account_criteria_rule", |
| | | isnotoption: true, //true:不是选项 |
| | | filter: "", |
| | | }, |
| | | ], |
| | | options_md_geo_province: [], |
| | | md_geo_city_obj: {}, |
| | |
| | | }, |
| | | |
| | | formFields: [], |
| | | formFields_criteria: [], |
| | | |
| | | formData: {}, |
| | | |
| | | formData_criteria: {}, |
| | | formData1:[], |
| | | imgLoading:false, |
| | | imgurl:'', |
| | | |
| | | formdata_group:[{group_name:'客观评分',group_code:'Objective',children:[]},{group_name:'主观评分',group_code:'Subjective',children:[]}], |
| | | |
| | | //按键权限设置 |
| | | isedit: false,//提交前编辑,保存/提交 |
| | | isrefuseedit: false,//拒绝后编辑,保存/再次提交 |
| | | isapproval: false,//审批,同意/拒绝/转办/退回 |
| | | isChange:false, |
| | | |
| | | iscommit: false,//提交标记 |
| | | |
| | | // 审批 |
| | | reasonvisible: false, // 审批备注填写弹窗 |
| | | approveremark: "", // 审批备注 |
| | | passOrRefuse: false, // 通过或拒绝 |
| | | loading_pass: false, |
| | | |
| | | //弹窗参数 |
| | | popupParames: {}, |
| | |
| | | this.loadRequestData(this.dataRequest, result, function(data) { |
| | | me.dataRequestObj = data; |
| | | //预加载数据后给哪些字段设置options或formatterjson |
| | | if (me.dataRequestObj.md_org_account_criteria_rule) { |
| | | me.formFields_criteria = me.dataRequestObj.md_org_account_criteria_rule; |
| | | //数据处理 |
| | | me.formdata_group.map(g=>{ |
| | | me.formFields_criteria.map(v=>{ |
| | | if (v.group_code == g.group_code) { |
| | | v['criteria_value'] = null |
| | | v['remark'] = null |
| | | g.children.push(v) |
| | | } |
| | | }) |
| | | }) |
| | | console.log(me.formdata_group) |
| | | } |
| | | if (me.dataRequestObj.md_org_account_criteria && me.dataRequestObj.md_org_account_criteria.data && me.dataRequestObj.md_org_account_criteria.data.entityset.length>0) { |
| | | me.formData_criteria = me.dataRequestObj.md_org_account_criteria.data.entityset |
| | | //数据处理 |
| | | me.formFields_criteria.map(g=>{ |
| | | me.formData_criteria.map(e=>{ |
| | | if (g.id == e.criteria_id) { |
| | | e['group_name'] = g.group_name |
| | | e['group_code'] = g.group_code |
| | | e['content_before'] = g.content_before |
| | | e['content_type'] = g.content_type |
| | | } |
| | | }) |
| | | }) |
| | | me.formdata_group.map(g=>{ |
| | | formData_criteria.map(v=>{ |
| | | if (v.group_code == g.group_code) { |
| | | // v['content_before'] = g.content_before |
| | | g.children.push(v) |
| | | } |
| | | }) |
| | | }) |
| | | console.log(me.formdata_group) |
| | | |
| | | } |
| | | if (me.dataRequestObj.md_geo_province) { |
| | | me.options_md_geo_province = me.dataRequestObj.md_geo_province |
| | | } |
| | |
| | | if (this.formData.id) { |
| | | id_ = this.formData.id; |
| | | } |
| | | |
| | | this.getRowDataById(id_, function(result) {//查询后的回调,用于获取字段的 |
| | | if (result.meta && result.meta[me.dataname] && result.meta[me.dataname].fields) { |
| | | var metas = clone(result.meta[me.dataname].fields); |
| | |
| | | } |
| | | } |
| | | }) |
| | | console.log(me.formdata_group) |
| | | |
| | | }, |
| | | |
| | | tableFieldClick() { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | uploadFileFun_file(one,fileList,type) { |
| | | var me = this; |
| | | me.imgLoading = true |
| | | me.imgurl =URL.createObjectURL(one.raw) //保持文件在本窗口,否则会加载失败 |
| | | // me.imgurl = one.url |
| | | // console.log(one+fileList+type) |
| | | |
| | | }, |
| | | showThumbnail(file, type, num) { |
| | | var me = this; |
| | | |
| | | if(num == "2"){ |
| | | return me.fileUrl; |
| | | } |
| | | if(type == "pic") { |
| | | return file.url; |
| | | } |
| | | console.log(file) |
| | | // var me = this; |
| | | |
| | | // if(num == "2"){ |
| | | // return me.fileUrl; |
| | | // } |
| | | // if(type == "pic") { |
| | | // me.imgurl = file.url |
| | | // return file.url; |
| | | // } |
| | | |
| | | }, |
| | | delyyzz() {//删除营业执照 |
| | | var me = this; |
| | | me.imgurl = ""; |
| | | me.formData1 = [] |
| | | }, |
| | | |
| | | //提交 |
| | | submitRowTable() { |
| | |
| | | this.iscommit = true; |
| | | this.saveRowTable(); |
| | | }, |
| | | |
| | | showCluster() { |
| | | this.$forceUpdate(); |
| | | }, |
| | | 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); |
| | | // }); |
| | | }, |
| | | 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", |
| | | 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: '审批失败' |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | //保存 |
| | | saveRowTable() { |
| | | var me = this; |
| | | var operator_ = "save";//保存 |
| | | var operator_ = "saveEntity";//保存 |
| | | var md_org_account_criteria_ = [] |
| | | |
| | | var entity_ = clone(this.formData); |
| | | var entity = {}; |
| | |
| | | } |
| | | if(me.iscommit) { |
| | | operator_ = "commit";//提交 |
| | | entity.state_code = "Open" |
| | | entity.state_name = "已生效" |
| | | } |
| | | let param = { |
| | | dataname: this.dataname, |
| | |
| | | // operator: operator_, |
| | | data: {}, |
| | | } |
| | | //新增的情况 |
| | | me.formdata_group.map(group => {// |
| | | group.children.map(unitobj => { |
| | | var row_ = { |
| | | id: uuid_short(), |
| | | parent_id: me.formData.id, |
| | | criteria_id: unitobj.id, |
| | | criteria_value: unitobj.criteria_value, |
| | | 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; |
| | | |
| | | |
| | | |
| | | Server.call("root/data/uniqueSaveEntity", param, function(result) { |
| | | Server.call("root/data/"+operator_, param, function(result) { |
| | | console.log(result); |
| | | if (result.success) { |
| | | if(me.iscommit){ |
| | |
| | | [v-cloak] { |
| | | display: none !important; |
| | | } |
| | | .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; |
| | | } |
| | | .ocr_img .el-upload-list--picture-card .el-upload-list__item { |
| | | width: 100% ; |
| | | height: 100% ; |
| | | } |
| | | div .el-upload--picture-card { |
| | | width: 100% ; |
| | | |
| | | } |
| | | </style> |
| | | |
| | | </head> |
| | |
| | | </div> |
| | | <div :style="{height: dheight + 'px', 'overflow-y': 'auto'}"> |
| | | <!-- <div style="position: absolute; top:40px; bottom: 50px; left: 0px; right: 0px; overflow-y: auto;"> --> |
| | | <div class="el-dialog__body"> |
| | | <div class="el-dialog__body" style="width: 20%; float: left;"> |
| | | <el-image |
| | | v-if="imgurl.length>0" |
| | | :style="{width: '100%', 'max-height': dheight + 'px'}" |
| | | :src="imgurl" |
| | | :preview-src-list="[imgurl]"> |
| | | </el-image> |
| | | <el-upload |
| | | v-else-if="!imgurl" |
| | | class="ocr_img" |
| | | action="#" style="margin-top: 15px;margin-bottom: 15px;" accept="image/jpeg,image/gif,image/png" |
| | | ref="reportUpload1" list-type="picture-card" :file-list="formData1" |
| | | :on-change="(file, fileList) => {uploadFileFun_file(file, fileList, '1')}" :auto-upload="false"> |
| | | <!-- <i slot="default" class="el-icon-plus"></i> --> |
| | | <span style="font-size: 14px; color: #909399;">营业执照上传</span> |
| | | <div slot="file" slot-scope="{file}"> |
| | | <img class="el-upload-list__item-thumbnail" :src="showThumbnail(file, 'pic', '1')" alt=""> |
| | | </div> |
| | | </el-upload> |
| | | <el-button v-if="imgurl" size="small" type="danger" @click="delyyzz">删除营业执照</el-button> |
| | | </div> |
| | | |
| | | <div class="el-dialog__body" style="width: 79%; float: right;"> |
| | | <h-form |
| | | ref="form1" |
| | | :form-attr="formAttr" |
| | |
| | | > |
| | | </h-form> |
| | | </div> |
| | | <!-- <div v-if='formFields.length>0' class="el-dialog__body" style="width: 100%; float: right; "> |
| | | <div style="border: 1px solid #C0C4CC ;padding: 5px"> |
| | | <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> |
| | | <div style="width: 100%;height: 5px;margin: 10px 0px 25px 0px;background-color: gainsboro; opacity: 40%;"></div> |
| | | <template v-for="(formgroup, k) in formdata_group"> |
| | | <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.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}} |
| | | </span> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="18" > |
| | | <div v-if="unitobj.content_type == 'textarea'"> |
| | | <el-input 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 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 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 style="width:100%" @input="showCluster" |
| | | v-model="unitobj.criteria_value"> |
| | | </el-input> |
| | | </div> |
| | | <div v-else-if="unitobj.content_type == 'date'"> |
| | | <el-date-picker 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 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 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: 25px 0px;background-color: gainsboro;opacity: 40%"></div> |
| | | </template > |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | <div class="el-dialog__footer" style="position: absolute; bottom: 0px; left: 0px; right: 0px;"> |
| | | <!-- <div class="el-dialog__footer" style="position: absolute; bottom: 0px; left: 0px; right: 0px;"> |
| | | <el-button size="small" type="default" @click="reasonvisible = false">取 消</el-button> |
| | | <el-button size="small" type="default" @click="closeDialog">取 消</el-button> |
| | | <el-button size="small" v-if="isedit || isrefuseedit" type="primary" :loading="loading_save" @click="saveRowTable":icon="buttonsconfig.save.icon">{{buttonsconfig.save.name}}</el-button> |
| | | <el-button size="small" v-if="isedit" type="success" :loading="loading_submit" @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="">通 过</el-button> |
| | | <el-button size="small" v-if="isapproval" type="danger" @click="">拒 绝</el-button> |
| | | <el-button size="small" v-if="isapproval" type="primary" @click="">转 办</el-button> |
| | | <el-button size="small" v-if="isapproval" type="success" @click="">退 回</el-button> |
| | | <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" v-if="isapproval" type="success" @click="onShowApproval('approve')">通 过</el-button> |
| | | </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 || isrefuseedit)" type="primary" @click="saveRowTable":icon="buttonsconfig.save.icon">{{buttonsconfig.save.name}}</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="primary" @click="saveChangeRowTable":icon="buttonsconfig.save.icon">{{buttonsconfig.save.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> |
| | |
| | | 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, |
| | |
| | | meta_account_position_list: [], |
| | | |
| | | meta_account_change: [], |
| | | formFields_criteria: [], |
| | | formData_change: {}, |
| | | formdata_rule_group:[], |
| | | |
| | | formAttr: { |
| | | istitle: false, |
| | |
| | | this.popupParames = clone(Root.popupParames); |
| | | this.title = this.popupParames.title || this.popupParames.text |
| | | if (this.popupParames.data) { |
| | | this.formData = clone(this.popupParames.data); |
| | | if (this.formData.source && !this.formData.md_org__source) { |
| | | this.newformData.md_org__source = this.formData.source; |
| | | } |
| | | else if (this.formData.md_org__ncc_code) { |
| | | this.newformData.md_org__source = "NCC" |
| | | } |
| | | this.formData = this.popupParames.data |
| | | } |
| | | |
| | | var customer_id = "" |
| | |
| | | //预加载数据后给哪些字段设置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); |
| | |
| | | // 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['children'] = [] |
| | | // obj.children.push(e) |
| | | me.formdata_rule_group.push(obj) |
| | | } |
| | | }) |
| | | } |
| | | me.initData(); |
| | | |
| | | // 以服务的方式调用的 Loading 需要异步关闭 |
| | |
| | | id_ = this.formData.id; |
| | | } |
| | | this.getRowDataById(id_, function(result) {//查询后的回调,用于获取字段的 |
| | | console.log(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) { |
| | |
| | | //设置字段事件 |
| | | me.tableFieldClick(); |
| | | } |
| | | //数据处理 |
| | | |
| | | |
| | | var formData_ = {}; |
| | | if (me.accountnccdata.id) { |
| | |
| | | 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, |
| | | 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 (this.formData.business_email) { // 填写了邮箱,则更新md_org中的邮箱信息 |
| | | var param = { |
| | | dataname: "md_org", |
| | | dataname: "md_org_account", |
| | | id: this.formData.org_id, |
| | | data: { |
| | | md_org: { |
| | |
| | | // return |
| | | // } |
| | | |
| | | console.log(param); |
| | | // return 0 |
| | | Server.call("root/data/" + operator_, param, function(result) { |
| | | console.log(result); |
| | |
| | | // var table_provinces_ = []; |
| | | |
| | | for (var r in entity_) { |
| | | // if (r == "product_id") { |
| | | // var products_ = entity_[r]; |
| | | // products_.map(p=>{ |
| | | // var p_ = { |
| | | // product_line_id: p[0], |
| | | // product_line_name: me.productobj_map[p[0]], |
| | | |
| | | // }; |
| | | // if (p.length == 2) { |
| | | // p_.product_id = p[1]; |
| | | // p_.product_name = me.productobj_map[p[1]] |
| | | // } |
| | | |
| | | // // 如果已经存过则id保持不变 |
| | | // if (me.old_md_org_account_product_obj[p[0] + p[1]]) { |
| | | // p_.id = me.old_md_org_account_product_obj[p[0] + p[1]].id |
| | | // } |
| | | |
| | | // // (缺功能)如果本次数据中没有了,则需要删除原数据。目前没有删除动作。 |
| | | |
| | | |
| | | // table_products_.push(p_); |
| | | // }) |
| | | // } |
| | | // else if (r == "province") { |
| | | // var provinces_ = entity_[r]; |
| | | // provinces_.map(p=>{ |
| | | // var p_ = { |
| | | // area: p[0], |
| | | // province: p[1] |
| | | // }; |
| | | |
| | | // // 如果已经存过则id保持不变 |
| | | // if (me.old_md_org_account_province_obj[p[0] + p[1]]) { |
| | | // p_.id = me.old_md_org_account_province_obj[p[0] + p[1]].id |
| | | // } |
| | | |
| | | // // (缺功能)如果本次数据中没有了,则需要删除原数据。目前没有删除动作。 |
| | | |
| | | |
| | | // table_provinces_.push(p_); |
| | | // }) |
| | | // } |
| | | // else |
| | | 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) { |
| | |
| | | tableData_.push(row_); |
| | | }) |
| | | |
| | | if (tableData_.length == 0) { |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请先添加明细数据' |
| | | }); |
| | | me.iscommit = false |
| | | return |
| | | } |
| | | if (tableData_.length == 0) { |
| | | Root.message({ |
| | | type: 'warning', |
| | |
| | | if(me.iscommit) { |
| | | // param.to_state = "OpeningApproval";//提交 |
| | | if (me.formData.org_ncc_id) { |
| | | param.refer = { |
| | | dataname: "md_org_account_ncc", |
| | | id: me.formData.org_ncc_id |
| | | } |
| | | // param.refer = { |
| | | // dataname: "md_org_account", |
| | | // id: me.formData.org_ncc_id |
| | | // } |
| | | } |
| | | |
| | | } |
| | | 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_; |
| | |
| | | return |
| | | } |
| | | |
| | | console.log(param); |
| | | // return |
| | | Server.call("root/data/" + operator_, param, function(result) { |
| | | console.log(result); |
| | | if (result.success) { |
| | |
| | | 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> |
| | |
| | | |
| | | |
| | | </div> |
| | | <div v-if='formFields.length>0' class="el-dialog__body" style="width: 100%; float: right; "> |
| | | <div> |
| | | <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"> |
| | | <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 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 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 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 style="width:100%" |
| | | v-model="unitobj.criteria_value"> |
| | | </el-input> |
| | | </div> |
| | | <div v-else-if="unitobj.content_type == 'date'"> |
| | | <el-date-picker 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 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 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: 25px 0px;background-color: gainsboro;opacity: 40%"></div> |
| | | </template > |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-dialog title="填写原因" :visible.sync="reasonvisible" height="50%"> |
| | |
| | | code: "edit",isselected: true,classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0] && selectRowList[0].source == "DMS") { |
| | | if (selectRowList[0] && selectRowList[0].state_code == "Input") { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | |
| | | } |
| | | }, |
| | | { |
| | | name: "开户", isbuttonshow: me.cbuttons_r.accountOpen ? me.cbuttons_r.accountOpen : false,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].source == "DMS" && !selectRowList[0].is_distributor) { |
| | | if (selectRowList[0] && selectRowList[0].state_code == "Prepared") { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | me.openCustomerUser('add') |
| | | |
| | | // 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: me.cbuttons_r.accountClose ? me.cbuttons_r.accountClose : false,type:"danger",icon: "el-icon-circle-close", |
| | | 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; |
| | |
| | | me.openCustomerUser('edit', obj.selectedList[0]); |
| | | } |
| | | }, |
| | | |
| | | { |
| | | // name: "详情", // type: "primary", // icon: "el-icon-edit", |
| | | isbuttonshow: me.cbuttons_r.formdetail ? me.cbuttons_r.formdetail : false, |
| | |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "客商信息" + (row.name ? row.name : ""), |
| | | text: "推广商信息" + (row.name ? row.name : ""), |
| | | id: "customer_basic" + (row.id? row.id : "add"),//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/customer_basic.html", |
| | | data: row, |
| | |
| | | // // {code: "Closed", name: "失效", dataname:"so_implant", filterTxt: "state_code='Open'",}, |
| | | // {code: "All", name: "全部", dataname: "md_target_dealer", filterTxt: "1 = 1", orderby: "update_time desc"}, |
| | | |
| | | {code: "Current", name: "当前评估", dataname: "md_org", filterTxt: "1=1", orderby: ""}, |
| | | {code: "History", name: "历史评估", dataname: "md_org", filterTxt: "1=1", orderby: ""}, |
| | | {code: "Current", name: "当前评估", dataname: "md_org_account", filterTxt: "1=1", orderby: "update_time desc"}, |
| | | {code: "History", name: "历史评估", dataname: "md_org_account", filterTxt: "1=1", orderby: ""}, |
| | | // {code: "Apply", name: "指标申请", dataname: "md_target_apply", filterTxt: "1 = 1", orderby: "update_time desc"}, |
| | | ], |
| | | tabs: [], |
| | |
| | | metas.map(f=>{ |
| | | f.isshow = "T"; |
| | | tableFields_.push(clone(f)); |
| | | if (f.isfilter) { |
| | | filterFields_.push(clone(f)); |
| | | } |
| | | else { |
| | | var filter_f = clone(f); |
| | | filter_f.isshow = "F"; |
| | | filterFields_.push(filter_f); |
| | | } |
| | | }) |
| | | if (!me.selectTabObj.filterFields || (me.selectTabObj.filterFields && me.selectTabObj.filterFields.length == 0)) { |
| | | me.selectTabObj.filterFields = clone(me.default_filterFields); |
| | | me.selectTabObj.tableFields = clone(me.default_tableFields); |
| | | me.selectTabObj.filterFields = clone(filterFields_); |
| | | me.selectTabObj.tableFields = clone(tableFields_); |
| | | } |
| | | } |
| | | |
| | |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "推广商信息" + (row.customer_code ? ("-" + row.customer_code) : ""), |
| | | text: "推广商评估信息" + (row.customer_code ? ("-" + row.customer_code) : ""), |
| | | id: "evaluation_management_edit" + row.id + sceneCode, |
| | | url: "module/md/page/customer/page/evaluation_management_edit.html", |
| | | data: row, |
| | |
| | | new FormVue({ |
| | | el: "#vbody", |
| | | data: { |
| | | dataname: "md_org_account_criteria", |
| | | // dataname: "md_org_account_criteria", |
| | | dataname: "md_org_account", |
| | | title: "推广商评估信息", |
| | | newformData: { |
| | | id: uuid_short(), |
| | |
| | | |
| | | formFields: [], |
| | | |
| | | formData: {}, |
| | | formData_: [], |
| | | formData_group:[], |
| | | formdata_obj:[{group_name:'客观评分',group_code:'Objective',children:[]},{group_name:'主观评分',group_code:'Subjective',children:[]}], |
| | | formData_criteria: [], //评分表返回的是数组 |
| | | formFields_criteria: [], |
| | | formdata_rule_group:[], |
| | | |
| | | activities: [ |
| | | { |
| | | id:uuid_short(), |
| | | code:uuid_short()+'01', |
| | | content: '临床拜访', |
| | | timestamp: '2024-04-15', |
| | | remark:'测试信息', |
| | | }, |
| | | { |
| | | id:uuid_short(), |
| | | code:uuid_short()+'01', |
| | | content: '提单', |
| | | timestamp: '2024-06-10', |
| | | remark:'测试信息', |
| | | }, |
| | | { |
| | | id:uuid_short(), |
| | | code:uuid_short()+'01', |
| | | content: '临采', |
| | | timestamp: '2024-06-29', |
| | | remark:'测试信息', |
| | | }, |
| | | { |
| | | id:uuid_short(), |
| | | code:uuid_short()+'01', |
| | | content: '过会准备与沟通', |
| | | timestamp: '2024-07-01', |
| | | remark:'测试信息', |
| | | }, |
| | | { |
| | | id:uuid_short(), |
| | | code:uuid_short()+'01', |
| | | content: '入院采购', |
| | | timestamp: '2024-07-15', |
| | | remark:'测试信息', |
| | | }, |
| | | { |
| | | id:uuid_short(), |
| | | code:uuid_short()+'01', |
| | | content: '正式采购', |
| | | timestamp: '', |
| | | remark:'测试信息', |
| | | }, |
| | | ], |
| | | treeData: [{ |
| | | id:1, |
| | | time: '2024推广商流向汇总', |
| | | amt:4200, |
| | | children: [{ |
| | | id:2, |
| | | time: '2024-01季度金额汇总', |
| | | amt:1200, |
| | | children: [{ |
| | | id:6, |
| | | time: '01月金额', |
| | | amt:300, |
| | | }, |
| | | { |
| | | id:7, |
| | | time: '02月金额', |
| | | amt:400, |
| | | }, |
| | | { |
| | | id:8, |
| | | time: '03月金额', |
| | | amt:500, |
| | | }] |
| | | }, |
| | | { |
| | | id:3, |
| | | time: '2024-02季度金额汇总', |
| | | amt:1000, |
| | | children: [{ |
| | | id:9, |
| | | time: '04月金额', |
| | | amt:300, |
| | | }, |
| | | { |
| | | id:10, |
| | | time: '05月金额', |
| | | amt:400, |
| | | }, |
| | | { |
| | | id:11, |
| | | time: '06月金额', |
| | | amt:500, |
| | | }] |
| | | }, |
| | | { |
| | | id:4, |
| | | time: '2024-03季度金额汇总', |
| | | amt:1000, |
| | | children: [{ |
| | | id:12, |
| | | time: '07月金额', |
| | | amt:300, |
| | | }, |
| | | { |
| | | id:13, |
| | | time: '08月金额', |
| | | amt:400, |
| | | }, |
| | | { |
| | | id:14, |
| | | time: '09月金额', |
| | | amt:500, |
| | | }] |
| | | }, |
| | | { |
| | | id:5, |
| | | time: '2024-04季度金额汇总', |
| | | amt:1000, |
| | | children: [{ |
| | | id:15, |
| | | time: '10月金额', |
| | | amt:300, |
| | | }, |
| | | { |
| | | id:16, |
| | | time: '11月金额', |
| | | amt:400, |
| | | }, |
| | | { |
| | | id:17, |
| | | time: '12月金额', |
| | | amt:500, |
| | | }] |
| | | } |
| | | ], |
| | | }], |
| | | treeTxtFormatter: "{time} ¥{amt}", |
| | | currentnodekey: 8, |
| | | defaultExpandedKeys: [2,6], |
| | | maxlevel:6, |
| | | |
| | | tableData:[ |
| | | { |
| | | |
| | | date:'2024-08-01', |
| | | // date:new Date(stamp).toISOString().replace(/T/, ' ').replace(/\..+/, '').substring(0, 19), |
| | | product:'多西他赛注射液', |
| | | qty:'12', |
| | | price:'2000', |
| | | amt:'24000', |
| | | rank:'D', |
| | | sale_employe:'', |
| | | }, |
| | | ], |
| | | isEditTableData: false, |
| | | tableFields: [ |
| | | // {isshow: "F", field: "id", name: "id", width: "70"}, |
| | | //{isshow: "T", field: "category_id", name: "协议类型-ID", width: "100"}, |
| | | {isshow: "T", field: "date", name: "更新日期", width: "100"}, |
| | | //{isshow: "T", field: "template_id", name: "模板-ID", width: "100"}, |
| | | {isshow: "F", field: "code", name: "推广商编码", width: "100"}, |
| | | {isshow: "F", field: "name", name: "推广商名称", width: "220",align:'left',isminwidth:'T'}, |
| | | {isshow: "T", field: "product", name: "产品", width: "100",isminwidth:'T'}, |
| | | {isshow: "T", field: "qty", name: "产品数量", width: "100"}, |
| | | {isshow: "T", field: "price", name: "产品单价", width: "100",formatter:"formatter_money",prefix:'¥'}, |
| | | {isshow: "T", field: "amt", name: "总金额", width: "100",formatter:"formatter_money",prefix:'¥'}, |
| | | {isshow: "T", field: "rank", name: "等级划分", width: "100"}, |
| | | {isshow: "T", field: "sale_employe", name: "归属人员", width: "100"}, |
| | | //{isshow: "T", field: "state_code", name: "协议状态-编码", width: "100"}, |
| | | // {isshow: "T", field: "state_name", name: "客观评估", type:"tag", tagtype: '{^草稿^:^info^,^生效^:^success^,^关闭^:^danger^}', width: "80"}, |
| | | // {isshow: "T", field: "", name: "客观评估", headercolor: "#bdf1ff", children: [ |
| | | // {isshow: "T", field: "completion_rate", name: "完成率", width: "100", headercolor: "#bdf1ff"}, |
| | | // {isshow: "T", field: "exploitation_rate", name: "开发率", width: "100", headercolor: "#bdf1ff"}, |
| | | // {isshow: "T", field: "growth_rate", name: "增长率", width: "100", headercolor: "#bdf1ff"}, |
| | | // {isshow: "T", field: "reach_rate", name: "达标占比", width: "100", headercolor: "#bdf1ff",formatter:"formatter_percent",align:"right",suffix:"%"}, |
| | | // ]}, |
| | | // {isshow: "T", field: "", name: "主观评估", headercolor: "#e5ffab", children: [ |
| | | // {isshow: "T", field: "customer_item", name: "客户评估", width: "100", headercolor: "#e5ffab"}, |
| | | // {isshow: "T", field: "hospital_item", name: "医院评估", width: "100", headercolor: "#e5ffab"}, |
| | | // {isshow: "T", field: "employee_item", name: "销售评估", width: "100", headercolor: "#e5ffab"}, |
| | | |
| | | // ]}, |
| | | ], |
| | | |
| | | stepStatus:['wait','process','finish','error','success'], |
| | | active:0, |
| | | |
| | | //按键权限设置 |
| | | isedit: false,//提交前编辑,保存/提交 |
| | |
| | | |
| | | } |
| | | else if (this.popupParames.sceneCode == "browse") {//只读 |
| | | var newEntity_ = { |
| | | name: "md_org_account_criteria", |
| | | url: "root/data/getEntitySet", |
| | | paramsobj: {dataname: this.dataname,parent_id:this.popupParames.data.id}, |
| | | isnotoption: true, //true:不是选项 |
| | | } |
| | | this.dataRequest.push(newEntity_); |
| | | // var newEntity_ = { |
| | | // name: "md_org_account_criteria", |
| | | // url: "root/data/getEntitySet", |
| | | // paramsobj: {dataname: this.dataname,parent_id:this.popupParames.data.id}, |
| | | // isnotoption: true, //true:不是选项 |
| | | // } |
| | | // this.dataRequest.push(newEntity_); |
| | | this.formAttr.disabled = true; |
| | | } |
| | | else if (this.popupParames.sceneCode == "edit") {//编辑 |
| | | //动态获取默认数据 |
| | | var newEntity_ = { |
| | | name: "md_org_account_criteria", |
| | | url: "root/data/getEntitySet", |
| | | paramsobj: {dataname: this.dataname,parent_id:this.popupParames.data.id}, |
| | | isnotoption: true, //true:不是选项 |
| | | } |
| | | this.dataRequest.push(newEntity_); |
| | | // //动态获取默认数据 |
| | | // var newEntity_ = { |
| | | // name: "md_org_account_criteria", |
| | | // url: "root/data/getEntitySet", |
| | | // paramsobj: {dataname: this.dataname,parent_id:this.popupParames.data.id}, |
| | | // isnotoption: true, //true:不是选项 |
| | | // } |
| | | // this.dataRequest.push(newEntity_); |
| | | |
| | | // if (this.newformData) { |
| | | // let formData_ = clone(this.formData); |
| | |
| | | // } |
| | | // this.formData = formData_; |
| | | // } |
| | | this.isedit = true; |
| | | this.isedit = true; |
| | | } |
| | | else if (this.popupParames.sceneCode == "approval") {//审批 |
| | |
| | | me.dataRequestObj = data; |
| | | //预加载数据后给哪些字段设置options或formatterjson |
| | | if (me.dataRequestObj.md_org_account_criteria_rule) { |
| | | var formData_group_ = [] |
| | | // var formdata_obj = {} |
| | | formData_group_ = me.dataRequestObj.md_org_account_criteria_rule |
| | | me.formData_ = formData_group_ |
| | | me.formData_group = [...new Set(formData_group_.map(e=>e.group_name))] |
| | | // me.formData_group.push(formData_group_.filter(e=>e.group_code == 'Objective')[0]) |
| | | // me.formData_group.push(formData_group_.filter(e=>e.group_code == 'Subjective')[0]) |
| | | // me.formData_group.map(e=>e['children'] = []) |
| | | |
| | | // me.formData_group.map(e=>{ |
| | | // formData_group_.map() |
| | | // }) |
| | | // console.log(me.formData_group) |
| | | // me.formData_group.map(e=>{ |
| | | // // me.formdata_obj[e.group_code] = [] |
| | | // e[children] |
| | | // }) |
| | | // Object.assign() |
| | | } |
| | | if (me.dataRequestObj.md_org_account_criteria) { |
| | | var formData_ = [] |
| | | formData_ = me.dataRequestObj.md_org_account_criteria.data.entityset |
| | | // formData_.m |
| | | me.formData_.map(g=>{ |
| | | formData_.map(e=>{ |
| | | if (g.id == e.criteria_id) { |
| | | e['group_name'] = g.group_name |
| | | e['group_code'] = g.group_code |
| | | e['content_before'] = g.content_before |
| | | e['content_type'] = g.content_type |
| | | } |
| | | }) |
| | | 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['children'] = [] |
| | | // obj.children.push(e) |
| | | me.formdata_rule_group.push(obj) |
| | | } |
| | | }) |
| | | me.formdata_obj.map(g=>{ |
| | | formData_.map(v=>{ |
| | | if (v.group_code == g.group_code) { |
| | | // v['content_before'] = g.content_before |
| | | g.children.push(v) |
| | | } |
| | | }) |
| | | }) |
| | | // formData_.map(e => { |
| | | // e['children'] = me.formData_group.filter(v => v.id == e.criteria_id).length > 0 ? me.formData_group.filter(v => v.id == e.criteria_id)[0] : {} |
| | | // formdata_obj[e.] |
| | | // }) |
| | | console.log(me.formdata_obj) |
| | | |
| | | } |
| | | if (me.dataRequestObj.md_geo_county) { |
| | | var md_geo_county_obj_ = {}; |
| | |
| | | initData() { |
| | | let me = this; |
| | | var id_ = null; |
| | | if (this.formData.id) { |
| | | id_ = this.formData.id; |
| | | } |
| | | this.getRowDataById(id_, function(result) {//查询后的回调,用于获取字段的 |
| | | // if (result.meta && result.meta[me.dataname] && result.meta[me.dataname].fields) { |
| | | |
| | | // } |
| | | 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) { |
| | | me.fieldsToFieldsObj(); |
| | | |
| | | //设置字段事件 |
| | | me.tableFieldClick(); |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | |
| | |
| | | } |
| | | }); |
| | | }, |
| | | open_terminallist(obj) { |
| | | var me = this; |
| | | Root.showPopup({ |
| | | url: "../md/customer/popup/customer_list.html", |
| | | width: 800, |
| | | height: 550, |
| | | data: this.oldObj, |
| | | dataname: "customer", |
| | | callback: function(obj, callback) { |
| | | let formData_ = clone(me.formData); |
| | | formData_.customer_name = obj.row.md_description; |
| | | formData_.customer_code = obj.row.md_code; |
| | | formData_.customer_id = obj.row.id; |
| | | |
| | | me.formData = formData_; |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | open_productlist(obj) { |
| | | var me = this; |
| | | Root.showPopup({ |
| | | url: "../md/product/popup/sku_list.html", |
| | | width: 800, |
| | | height: 550, |
| | | callback: function(obj, callback) { |
| | | let formData_ = clone(me.formData); |
| | | |
| | | formData_.product_id = obj.row.id; |
| | | formData_.product_code = obj.row.md_code; |
| | | formData_.product_name = obj.row.md_description; |
| | | //formData_.spec = obj.row.pack_specification; |
| | | |
| | | me.formData = formData_; |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | tablepopup_customerlist(obj) { |
| | | var me = this; |
| | | Root.showPopup({ |
| | | url: "../md/customer/popup/customer_list.html", |
| | | width: 800, |
| | | height: 550, |
| | | data: this.oldObj, |
| | | dataname: "customer", |
| | | callback: function(callbackobj, callback) { |
| | | obj.row.customer_code = callbackobj.row.md_code |
| | | obj.row.customer_name = callbackobj.row.md_description |
| | | stepClick(index) { |
| | | console.log(index) |
| | | }, |
| | | onNodeClick(data) { |
| | | console.log(data) |
| | | }, |
| | | openDetail(row) { |
| | | |
| | | this.$nextTick(() => { |
| | | this.activities.map(e => { |
| | | if (e.id == row.id) { |
| | | document.getElementById(e.content).classList.add("card-body") |
| | | document.getElementById(e.content).getElementsByClassName("el-descriptions__body")[0].classList.add("card-body") |
| | | } |
| | | else { |
| | | document.getElementById(e.content).classList.remove("card-body") |
| | | document.getElementById(e.content).getElementsByClassName("el-descriptions__body")[0].classList.remove("card-body") |
| | | } |
| | | |
| | | if (e.id == row.id) { |
| | | document.getElementById(e.id).getElementsByClassName("el-timeline-item__node--normal")[0].classList.add("timeline-node") |
| | | } |
| | | else { |
| | | document.getElementById(e.id).getElementsByClassName("el-timeline-item__node--normal")[0].classList.remove("timeline-node") |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | var me = this; |
| | | var data_ = {}; |
| | | var text_ = row.content+"详情" |
| | | var config = { |
| | | totab: false, //true: 以Tab导航的方式打开 |
| | | width: "500px", |
| | | height: "80vh", |
| | | icon: "icon-product", |
| | | text: text_, |
| | | id: uuid_short(),//totab: true时需设置,用于判断是否已打开此页面 |
| | | url: "module/md/page/customer/page/404.html", |
| | | data: data_, |
| | | delta: {}, |
| | | // filter: "org_id='"+ me.selectedrow.org_id + "' and bu_id='" + me.selectedrow.bu_id + "'", |
| | | sceneCode: 'browser',//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(popupobj, popupcallback) { |
| | | callback(popupobj) |
| | | |
| | | if (popupcallback) { |
| | | popupcallback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | openDocument() { |
| | | let me = this; |
| | | var row = {} |
| | | var config = { |
| | | totab: true, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "遴选信息" + (row.customer_code ? ("-" + row.customer_code) : ""), |
| | | id: "evaluation_management_edit", |
| | | url: "module/md/page/customer/page/404.html", |
| | | data: row, |
| | | delta: {}, |
| | | sceneCode: 'browse',//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }); |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | tablepopup_terminallist(obj) { |
| | | var me = this; |
| | | Root.showPopup({ |
| | | url: "../md/customer/popup/customer_list.html", |
| | | width: 800, |
| | | height: 550, |
| | | data: this.oldObj, |
| | | dataname: "customer", |
| | | callback: function(callbackobj, callback) { |
| | | obj.row.terminal_id = callbackobj.row.id |
| | | obj.row.terminal_name = callbackobj.row.md_description |
| | | |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | tablepopup_productlist(obj) { |
| | | var me = this; |
| | | Root.showPopup({ |
| | | url: "../md/product/popup/sku_list.html", |
| | | width: 800, |
| | | height: 550, |
| | | callback: function(callbackobj, callback) { |
| | | obj.row.product_id = callbackobj.row.id; |
| | | obj.row.product_code = callbackobj.row.md_code; |
| | | obj.row.product_name = callbackobj.row.md_description; |
| | | obj.row.spec = callbackobj.row.pack_specification; |
| | | obj.row.pack = callbackobj.row.unit; |
| | | |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | //提交 |
| | | submitRowTable() { |
| | | //必填项校验 |
| | |
| | | //保存 |
| | | saveRowTable() { |
| | | var me = this; |
| | | var operator_ = "save";//保存 |
| | | var operator_ = "saveEntity";//保存 |
| | | //数据检验 |
| | | var formData_criteria_ = [] |
| | | var formData_criteria_new = [] |
| | | var criteria_ = {} |
| | | |
| | | me.formdata_rule_group.map(g=>{ |
| | | formData_criteria_ = formData_criteria_.concat(g.children) |
| | | }) //编辑页面的评分数据和题目 |
| | | // 比较 formData_criteria_与原数据 |
| | | me.formData_criteria.map(fo=>{ |
| | | formData_criteria_.map(fn=>{ |
| | | if (fo.criteria_id == fn.criteria_id) { //fo中新增的题目不参与比较 |
| | | var str1 = fo.criteria_id + fo.criteria_value |
| | | var str2 = fn.criteria_id + fn.criteria_value |
| | | if (str1 === str2){} |
| | | else { |
| | | formData_criteria_new.push(fn) |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | var entity_ = clone(this.formData); |
| | | var entity = {}; |
| | | for (var r in entity_) { |
| | | // if (entity_[r] || entity_[r] == "" || entity_[r] == false || entity_[r] == 0) { |
| | | entity[r] = entity_[r]; |
| | | // } |
| | | } |
| | | if(me.iscommit) { |
| | | operator_ = "commit";//提交 |
| | | entity.state_code = "Open" |
| | | entity.state_name = "已生效" |
| | | } |
| | | // me.formdata_rule_group.map(g=>{ |
| | | |
| | | // }) |
| | | |
| | | // var entity_ = clone(this.formData); |
| | | // var entity = {}; |
| | | // for (var r in entity_) { |
| | | // // if (entity_[r] || entity_[r] == "" || entity_[r] == false || entity_[r] == 0) { |
| | | // entity[r] = entity_[r]; |
| | | // // } |
| | | // } |
| | | // if(me.iscommit) { |
| | | // operator_ = "commit";//提交 |
| | | // entity.state_code = "Open" |
| | | // entity.state_name = "已生效" |
| | | // } |
| | | let param = { |
| | | dataname: this.dataname, |
| | | // dataname: "md_org_customer", |
| | | // operator: operator_, |
| | | dataname: 'md_org_account_criteria', |
| | | data: {}, |
| | | } |
| | | param.data[this.dataname] = entity; |
| | | |
| | | Server.call("root/data/uniqueSaveEntity", 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(); |
| | | } |
| | | if (formData_criteria_new.length > 0) { |
| | | let param = { |
| | | dataname: "md_org_account_criteria", |
| | | data: {}, |
| | | } |
| | | }, 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", |
| | | param.data['md_org_account_criteria'] = formData_criteria_; |
| | | Server.call("root/data/saveEntity", param, function (result) { |
| | | console.log(result); |
| | | if (result.success) { |
| | | let formData_criteria_history = clone(me.formData_criteria) |
| | | formData_criteria_history.map(e =>{ |
| | | e['data_id'] = e.id |
| | | delete e.id |
| | | }) |
| | | let param_ = { |
| | | dataname: 'md_org_account_criteria_history', |
| | | data: {}, |
| | | delta: errorresult.messages.list, |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | param_.data['md_org_account_criteria_history'] = formData_criteria_history; |
| | | Server.call("root/data/saveEntity", param_, function (result2) { |
| | | if (result2.success) { |
| | | Root.message({ |
| | | type: 'success', |
| | | message: '保存成功' |
| | | }); |
| | | me.saveAfter(); |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | |
| | | }); |
| | | } |
| | | } |
| | | else if (errorresult.exists_errors && errorresult.exists_errors.length) { |
| | | var messages_list = [] |
| | | var index_ = 0; |
| | | errorresult.exists_errors.map(r=>{ |
| | | index_ ++; |
| | | var messages_ = { |
| | | step: index_, |
| | | level: "Error", |
| | | message: r.title |
| | | } |
| | | messages_list.push(messages_) |
| | | }) |
| | | 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: messages_list, |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | } |
| | | else { |
| | | me.iscommit = false; |
| | | Root.message({ |
| | | type: 'error', |
| | | message: '提交失败' |
| | | }); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | } |
| | |
| | | text-decoration: underline; |
| | | cursor: pointer; |
| | | } |
| | | div .h_table .h_h_table { |
| | | display: none; |
| | | } |
| | | div .custom-tree-node { |
| | | font-size: 14px; |
| | | } |
| | | div .custom-tree-node .nodeLabel{ |
| | | max-width: 100%; |
| | | } |
| | | div .el-card__header { |
| | | padding: 10px 20px; |
| | | } |
| | | .el-card { |
| | | cursor: pointer; |
| | | } |
| | | .card-body { |
| | | background: #f0f7ff !important; |
| | | /* line-height: 32px; */ |
| | | color: rgba(78, 151, 255, 1) !important; |
| | | } |
| | | .timeline-node { |
| | | background: rgba(78, 151, 255, 1) !important; |
| | | } |
| | | </style> |
| | | |
| | | </head> |
| | |
| | | <div class="dialog-title"> |
| | | <i class="iconfont icon-customermanagement"></i> |
| | | <span> {{title}}</span> |
| | | <el-button style="float: right;right: 10%;" @click="openDocument()">遴选跳转</el-button> |
| | | </div> |
| | | </div> |
| | | <div :style="{height: dheight + 'px', 'overflow-y': 'auto'}"> |
| | |
| | | <div class="el-dialog__body"> |
| | | <!-- <div v-if="showtab.SYPG && activeTabName=='SYPG' && activeTabName_detail=='YWNL'"> --> |
| | | <div> |
| | | <div style="width: 100%; float: right;"> |
| | | <div style=" border: 1px solid #C0C4CC ;padding: 5px"> |
| | | <div > |
| | | <el-row style="display: flex;flex-direction: row;justify-content:space-between;padding-left: 91px;" > |
| | | <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-col :span="6"><div class="itemgroup_field" style="font-size: 14px;font-weight: bold;margin-right: 10px;"><span>评分项</span></div></el-col> |
| | | <el-col :span="18"><div class="itemgroup_field" style="font-size: 14px;font-weight: bold;"><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_obj"> |
| | | <template v-for="(formgroup, k) in formdata_rule_group"> |
| | | <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;"> |
| | |
| | | <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="12" class="itemgroup_row_item"> |
| | | <el-col :span="6" class="itemgroup_row_item"> |
| | | <div> |
| | | <span :class="[unitobj.required_no ? 'me_h_nounitlabel' : 'me_h_unitlabel']" style="font-size: 13px;"> |
| | | <!-- {{unitobj.content_before}} --> |
| | |
| | | </span> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" > |
| | | <el-col :span="18" > |
| | | <div v-if="unitobj.content_type == 'textarea'"> |
| | | <el-input style="width:100%" type="textarea" |
| | | v-model="unitobj.criteria_value"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-row> |
| | | <el-col :span="12" style="padding-right: 10px;" > |
| | | <el-card class="box-card" style="height: 408px;overflow: auto;"> |
| | | <div slot="header" class="clearfix"> |
| | | <span style="font-size: 14px;font-weight: bold;">推广过程</span> |
| | | </div> |
| | | <el-timeline :reverse="false" style="padding-top: 10px;"> |
| | | <!-- <el-timeline-item @click.native="openDetail(activity)" |
| | | v-for="(activity, index) in activities" |
| | | :key="index" |
| | | :timestamp="activity.timestamp"> |
| | | {{activity.content}} |
| | | </el-timeline-item> --> |
| | | <el-timeline-item :reverse="false" :id="row.id" v-for="(row, k) in activities" :key="k" :timestamp="row.timestamp" placement="top"> |
| | | <div @click="openDetail(row)"> |
| | | <el-card :id="row.content" shadow="hover"> |
| | | <el-descriptions :title="row.content" :column="1" size="mini"> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="备注">{{row.remark}}</el-descriptions-item> |
| | | </el-descriptions> |
| | | </el-card> |
| | | </div> |
| | | </el-timeline-item> |
| | | </el-timeline> |
| | | </el-card> |
| | | |
| | | </el-col> |
| | | <el-col :span="12" style="padding-right: 10px;" > |
| | | <el-card class="box-card" style="height: 408px;overflow: auto;"> |
| | | <div slot="header" class="clearfix" style="height: 20%;"> |
| | | <span style="font-size: 14px;font-weight: bold;" >流向汇总</span> |
| | | </div> |
| | | <h-tree |
| | | :isfilter="true" |
| | | :tree-data="treeData" |
| | | :tree-txt-formatter="treeTxtFormatter" |
| | | :currentnodekey="currentnodekey" |
| | | :is-readonly="true" |
| | | :maxlevel="maxlevel" |
| | | :default-expand-all="false" |
| | | :default-expanded-keys="defaultExpandedKeys" |
| | | :isbottomadd="true" |
| | | |
| | | @node-click="onNodeClick" |
| | | > |
| | | </h-tree> |
| | | </el-card> |
| | | |
| | | <!-- |
| | | |
| | | --> |
| | | </div> |
| | | </el-col> |
| | | |
| | | </el-row> |
| | | </div> |
| | | |
| | | <div class="el-dialog__footer" style="position: absolute; bottom: 0px; left: 0px; right: 0px;"> |
| | | <el-button size="small" type="default" @click="closeDialog">取 消</el-button> |
| | | <el-button size="small" v-if="isedit || isrefuseedit" type="primary" :loading="loading_save" @click="saveRowTable":icon="buttonsconfig.save.icon">{{buttonsconfig.save.name}}</el-button> |