New file |
| | |
| | | <!doctype html> |
| | | <html> |
| | | <head> |
| | | <meta charset="utf-8"><meta http-equiv="Expires" content="0"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-control" content="no-cache"><meta http-equiv="Cache" content="no-cache"> |
| | | <title>保证金申请</title> |
| | | |
| | | <script type="text/javascript"> |
| | | var pageVue = null; |
| | | function loadJsCss(callback) { |
| | | var jscss_urls = []; |
| | | window.top.initJsCss(document, jscss_urls, callback); |
| | | }; |
| | | |
| | | function initVue() { |
| | | new FormVue({ |
| | | el: "#vbody", |
| | | data: { |
| | | dataname: "md_org_account_criteria", |
| | | title: "保证金申请", |
| | | newformData: { |
| | | id: uuid_short(), |
| | | // code: createCode("D"), |
| | | // code: createCode("BA"), |
| | | create_time: createDatetime(), |
| | | state_code: "Closed", |
| | | state_name: "未生效", |
| | | // creator_name: window.top.vue.userinfo.name, |
| | | // type_code: "", |
| | | // type_name: "", |
| | | source: "DMS", |
| | | is_master: "F", |
| | | is_frozen: "F", |
| | | is_distributor: false, |
| | | category_name: "客户", |
| | | category_code: "Customer", |
| | | business_phone: null, |
| | | business_email: null, |
| | | |
| | | }, |
| | | dataRequest: [ |
| | | { |
| | | name: "md_geo_province", |
| | | dataname: "md_geo_province", |
| | | isnotoption: false, //true:不是选项 |
| | | code:"id",//是下拉选项时设置 |
| | | label:"name",//是下拉选项时设置 |
| | | filter: "", |
| | | orderby: "name" |
| | | }, |
| | | { |
| | | name: "md_geo_city", |
| | | dataname: "md_geo_city", |
| | | isnotoption: false, //true:不是选项 |
| | | code:"id",//是下拉选项时设置 |
| | | label:"name",//是下拉选项时设置 |
| | | filter: "", |
| | | orderby: "name" |
| | | }, |
| | | { |
| | | name: "md_geo_county", |
| | | dataname: "md_geo_county", |
| | | isnotoption: false, //true:不是选项 |
| | | code:"id",//是下拉选项时设置 |
| | | label:"name",//是下拉选项时设置 |
| | | filter: "", |
| | | orderby: "name" |
| | | } |
| | | ], |
| | | options_md_geo_province: [], |
| | | md_geo_city_obj: {}, |
| | | md_geo_county_obj:{}, |
| | | formAttr: { |
| | | istitle: false, |
| | | title: "表单名称", |
| | | columnnumber: 2, |
| | | labelwidth: "120px", |
| | | labelposition: "left",//"left",// right//top |
| | | size: "mini", |
| | | border: "10px solid #c6c6c600" |
| | | }, |
| | | |
| | | formFields: [], |
| | | default_formFields: [ |
| | | //{isshow: "T", field: "category_id", name: "协议类型-ID", width: "100"}, |
| | | {isshow: "F", field: "state_name", name: "状态名称", width: "70",default_value:'草稿'}, |
| | | {isshow: "T", field: "type", name: "申请类型", width: "70",algin:'left',inputtype:'select',options:[{code:'receive',value:'保证金接收'},{code:'refuse',value:'保证金退回'},{code:'transfer',value:'保证金转让'},{code:'reduce',value:'保证金扣减'}]}, |
| | | // {isshow: "T", field: "state_code", name: "状态编码", width: "70",filter_field:'state_code',filter_operator:'=',input_type:'capsuletag',input_type_filter:'select',options_key:'standard',options_pattern:'{^草稿^:^info^,^生效^:^success^,^审批中^:^warning^}'}, |
| | | //{isshow: "T", field: "template_id", name: "模板-ID", width: "100"}, |
| | | {isshow: "T", field: "customer_code", name: "推广商编码", width: "100"}, |
| | | {isshow: "T", field: "customer_name", name: "推广商名称", width: "100"}, |
| | | {isshow: "T", field: "amt", name: "金额", width: "100",inputtype:'input',formatter:'formatter_money',align:'right'}, |
| | | {isshow: "T", field: "remark", name: "备注", width: "100",inputtype:'textarea',align:'right',}, |
| | | ], |
| | | |
| | | formData: {}, |
| | | |
| | | //按键权限设置 |
| | | isedit: false,//提交前编辑,保存/提交 |
| | | isrefuseedit: false,//拒绝后编辑,保存/再次提交 |
| | | isapproval: false,//审批,同意/拒绝/转办/退回 |
| | | |
| | | iscommit: false,//提交标记 |
| | | |
| | | //弹窗参数 |
| | | popupParames: {}, |
| | | //字段设置 |
| | | tablefieldClick: {}, |
| | | formfieldClick: {}, |
| | | dheight: null |
| | | }, |
| | | 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.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_); |
| | | |
| | | // if (this.newformData) { |
| | | // let formData_ = clone(this.formData); |
| | | |
| | | // for (var k in this.newformData) { |
| | | // formData_[k] = this.newformData[k]; |
| | | // } |
| | | // this.formData = formData_; |
| | | // } |
| | | this.isedit = true; |
| | | } |
| | | else if (this.popupParames.sceneCode == "browse") {//只读 |
| | | this.formAttr.disabled = true; |
| | | } |
| | | else if (this.popupParames.sceneCode == "edit") {//编辑 |
| | | this.isedit = true; |
| | | } |
| | | else if (this.popupParames.sceneCode == "approval") {//审批 |
| | | this.formAttr.disabled = true; |
| | | this.isapproval = true; |
| | | } |
| | | else if (this.popupParames.sceneCode == "refuseedit") {//拒绝后的编辑 |
| | | this.isrefuseedit = true; |
| | | } |
| | | } |
| | | }, |
| | | |
| | | mounted() { |
| | | var me = this; |
| | | var title_h = 0; |
| | | if (me.popupParames.totab){ |
| | | title_h = 42; |
| | | } |
| | | me.dheight = document.documentElement.clientHeight - 50 - title_h; |
| | | |
| | | //预加载数据 |
| | | if (this.dataRequest && this.dataRequest.length) { |
| | | var result = {}; |
| | | this.loadRequestData(this.dataRequest, result, function(data) { |
| | | me.dataRequestObj = data; |
| | | //预加载数据后给哪些字段设置options或formatterjson |
| | | if (me.dataRequestObj.md_geo_province) { |
| | | me.options_md_geo_province = me.dataRequestObj.md_geo_province |
| | | } |
| | | if (me.dataRequestObj.md_geo_city) { |
| | | var md_geo_city_obj_ = {}; |
| | | var options_md_geo_city_ = [] |
| | | var options_md_geo_city_ = clone(me.dataRequestObj.md_geo_city) |
| | | options_md_geo_city_.map(o=>{ |
| | | if (!md_geo_city_obj_[o.province]) { |
| | | md_geo_city_obj_[o.province] = [] |
| | | } |
| | | md_geo_city_obj_[o.province].push(o) |
| | | }) |
| | | me.md_geo_city_obj = clone(md_geo_city_obj_) |
| | | } |
| | | if (me.dataRequestObj.md_geo_county) { |
| | | var md_geo_county_obj_ = {}; |
| | | var options_md_geo_county_ = [] |
| | | var options_md_geo_county_ = clone(me.dataRequestObj.md_geo_county) |
| | | options_md_geo_county_.map(o=>{ |
| | | if (!md_geo_county_obj_[o.city]) { |
| | | md_geo_county_obj_[o.city] = [] |
| | | } |
| | | md_geo_county_obj_[o.city].push(o) |
| | | }) |
| | | me.md_geo_county_obj = clone(md_geo_county_obj_) |
| | | } |
| | | |
| | | 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_; |
| | | } |
| | | } |
| | | |
| | | |
| | | // data.agm_template.map(c=>{ |
| | | // me.options_templateobj[c[me.props_template.value]] = c; |
| | | // }) |
| | | |
| | | // let agm_template_ = ArrayToTree(clone(data.agm_template), "name", "parent_id"); |
| | | // me.options_category = agm_template_; |
| | | |
| | | me.initData(); |
| | | }); |
| | | } |
| | | else { |
| | | this.initData(); |
| | | } |
| | | |
| | | // 以服务的方式调用的 Loading 需要异步关闭 |
| | | this.$nextTick(() => { |
| | | hideLoading(); |
| | | |
| | | //重新设置弹窗宽高 |
| | | // this.$nextTick(function(){ |
| | | // //let w_ = this.$refs.popup_body.offsetWidth + "px"; |
| | | // let w_ = "900px"; |
| | | // let h_ = this.$refs.popup_body.offsetHeight + "px"; |
| | | // Root.setPopupWH(w_, h_); |
| | | // }) |
| | | }); |
| | | }, |
| | | |
| | | 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.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 == "province") { |
| | | f.isfilterable = true |
| | | f.options = me.options_md_geo_province; |
| | | } |
| | | // if (me.popupParames.sceneCode == "add" && f.field == "name") { |
| | | // f.inputtype = "input" |
| | | // } |
| | | // if (me.popupParames.sceneCode == "add" && f.field == "license_business_no") { |
| | | // f.inputtype = "input" |
| | | // } |
| | | // if (me.popupParames.sceneCode == "add" && f.field == "register_address") { |
| | | // f.inputtype = "input" |
| | | // } |
| | | // if (me.popupParames.sceneCode == "add" && f.field == "business_address") { |
| | | // f.inputtype = "input" |
| | | // } |
| | | formFields_.push(clone(f)); |
| | | }) |
| | | if (!me.formFields || (me.formFields && me.formFields.length == 0)) { |
| | | me.formFields = clone(me.default_formFields); |
| | | |
| | | //字段数组转字段obj,目的为了筛选时获取字段属性 |
| | | me.fieldsToFieldsObj(); |
| | | |
| | | //设置字段事件 |
| | | me.tableFieldClick(); |
| | | } |
| | | me.formData = getDataByFields(me.formData, me.formFields); |
| | | |
| | | if (me.rowData[me.dataname]) { |
| | | me.formData = clone(me.rowData[me.dataname]); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | tableFieldClick() { |
| | | var me = this; |
| | | //表格字段事件设置 |
| | | this.tablefieldClick = {}; |
| | | |
| | | //表单字段事件设置 |
| | | this.formfieldClick = { |
| | | province: {//字段事件设置 |
| | | select: { |
| | | onchange: function(obj, refreshCallback) {//下拉展开事件 |
| | | obj.data.province = obj.selectoption.value || ""; |
| | | obj.data.city = ""; |
| | | obj.data.county = ""; |
| | | refreshCallback(); |
| | | // me.$set(me.tabsobj.DDWL, "formData", me.tabsobj.DDWL.formData); |
| | | // var formData_ = clone(me.tabsobj.DDWL.formData); |
| | | // me.tabsobj.DDWL.formData = formData_; |
| | | }, |
| | | }, |
| | | }, |
| | | city: {//字段事件设置 |
| | | visible: { |
| | | onchange: function(obj,row,callback) {//下拉展开事件 |
| | | if (me.formData.province) { |
| | | var formFields_ = clone(me.formFields); |
| | | formFields_.map(f=>{ |
| | | if (f.field == "city") { |
| | | if (me.md_geo_city_obj[me.formData.province] && me.md_geo_city_obj[me.formData.province].length) { |
| | | f.options = clone(me.md_geo_city_obj[me.formData.province]) |
| | | } |
| | | } |
| | | }) |
| | | me.formFields = clone(formFields_); |
| | | } |
| | | } |
| | | }, |
| | | select: { |
| | | onchange: function(obj,refreshCallback) {//下拉展开事件 |
| | | obj.data.city = obj.selectoption.value || ""; |
| | | obj.data.county = ""; |
| | | refreshCallback() |
| | | }, |
| | | }, |
| | | }, |
| | | county: { |
| | | visible: { |
| | | onchange: function(fieldObj, row, callback) {//下拉展开事件 |
| | | if (me.formData.city) { |
| | | var formFields_ = clone(me.formFields); |
| | | formFields_.map(f=>{ |
| | | if (f.field == "county") { |
| | | if (me.md_geo_county_obj[me.formData.city] && me.md_geo_county_obj[me.formData.city].length) { |
| | | f.options = clone(me.md_geo_county_obj[me.formData.city]) |
| | | } |
| | | } |
| | | }) |
| | | me.formFields = clone(formFields_); |
| | | } |
| | | }, |
| | | }, |
| | | select: { |
| | | onchange: function(obj,refreshCallback) {//下拉展开事件 |
| | | obj.data.county = obj.selectoption.value |
| | | refreshCallback() |
| | | } |
| | | } |
| | | }, |
| | | }; |
| | | }, |
| | | |
| | | open_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(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_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 |
| | | |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | 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() { |
| | | //必填项校验 |
| | | var bo1 = this.$refs.form1.checkForm(); |
| | | if(!bo1){ |
| | | Root.message({ |
| | | type: 'error', |
| | | message: '请填写必填项' |
| | | }); |
| | | return; |
| | | } |
| | | this.iscommit = true; |
| | | this.saveRowTable(); |
| | | }, |
| | | |
| | | //保存 |
| | | saveRowTable() { |
| | | var me = this; |
| | | var operator_ = "save";//保存 |
| | | |
| | | 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_, |
| | | 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(); |
| | | } |
| | | } |
| | | }, function(errorresult) { |
| | | console.log("错误信息", errorresult); |
| | | if (errorresult.messages && errorresult.messages.count && errorresult.messages.count.error) { |
| | | if (errorresult.messages.list) { |
| | | me.iscommit = false; |
| | | var config = { |
| | | totab: false, |
| | | // width: "1200px", |
| | | // height: 800, |
| | | icon: "icon-product", |
| | | text: "错误信息", |
| | | url: "module/tool/page/popup_error_messages.html", |
| | | data: {}, |
| | | delta: errorresult.messages.list, |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | } |
| | | } |
| | | else 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: '提交失败' |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | 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 v-if="popupParames.totab" class="el-dialog__header"> |
| | | <div class="dialog-title"> |
| | | <i class="iconfont icon-customermanagement"></i> |
| | | <span> {{title}}</span> |
| | | </div> |
| | | </div> |
| | | <div :style="{height: dheight + 'px', 'overflow-y': 'auto'}"> |
| | | <!-- <div style="position: absolute; top:40px; bottom: 50px; left: 0px; right: 0px; overflow-y: auto;"> --> |
| | | <div class="el-dialog__body"> |
| | | <h-form |
| | | ref="form1" |
| | | :form-attr="formAttr" |
| | | :table-fields="formFields" |
| | | :form-data="formData" |
| | | :table-field-click="formfieldClick" |
| | | > |
| | | </h-form> |
| | | </div> |
| | | </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> |
| | | <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> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="page_loading" style="position: absolute; top:0px; width: 100vw; height: 50vh;"> |
| | | <div class="spinner"> |
| | | <div class="cube1"></div> |
| | | <div class="cube2"></div> |
| | | </div> |
| | | </div> |
| | | </body> |
| | | </html> |
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 ListVue({ |
| | | el: "#vbody", |
| | | data: { |
| | | dataname: "wm_book_detail", |
| | | title: "保证金流水", |
| | | orderby: "wm_book_detail.valid_to, wm_book_detail.product_name, wm_book_detail.spec", |
| | | dataRequest: [], |
| | | dataRequestObj: {}, |
| | | |
| | | filterfieldClick: {}, |
| | | tablefieldClick: {}, |
| | | formfieldClick: {}, |
| | | cbuttons_r: {}, |
| | | ctabs_r: {}, |
| | | isCustomer: false, |
| | | |
| | | saveUser: "", |
| | | qty_total_sum: 0, |
| | | qty_frozen_sum: 0, |
| | | qty_available_sum: 0, |
| | | }, |
| | | |
| | | created() { |
| | | this.isCustomer = window.top.vue.isCustomer |
| | | }, |
| | | |
| | | mounted() { |
| | | var me = this; |
| | | |
| | | if (window.top.tab.selected.option.page_id) { |
| | | getPageByPageId(window.top.tab.selected.option.page_id, function(result){ |
| | | me.cbuttons_r = result.buttons_r; |
| | | // me.ctabs_r = result.tabs_r; |
| | | |
| | | |
| | | //预加载数据 |
| | | if (me.dataRequest && me.dataRequest.length) { |
| | | var result = {}; |
| | | me.loadRequestData(me.dataRequest, result, function(data) { |
| | | me.dataRequestObj = data; |
| | | //获取数据 |
| | | me.initData(); |
| | | me.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭 |
| | | hideLoading(); |
| | | }); |
| | | }); |
| | | } |
| | | else { |
| | | //获取数据 |
| | | me.initData(); |
| | | me.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭 |
| | | hideLoading(); |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | methods:{ |
| | | initData() { |
| | | var me = this; |
| | | this.onQuery(function(result, callback) {//查询后的回调,用于获取字段的 |
| | | if (result.meta && result.meta[me.dataname] && result.meta[me.dataname].fields) { |
| | | var metas = clone(result.meta[me.dataname].fields); |
| | | var filterFields_ = []; |
| | | var tableFields_ = []; |
| | | |
| | | metas.map(f=>{ |
| | | f.isshow = "T"; |
| | | |
| | | if (f.isfilter) { |
| | | filterFields_.push(clone(f)); |
| | | } |
| | | else { |
| | | var filter_f = clone(f); |
| | | filter_f.isshow = "F"; |
| | | filterFields_.push(filter_f); |
| | | } |
| | | |
| | | tableFields_.push(clone(f)); |
| | | }) |
| | | if (!me.filterFields || (me.filterFields && me.filterFields.length == 0)) { |
| | | me.filterFields = clone(filterFields_); |
| | | me.tableFields = clone(tableFields_); |
| | | |
| | | //字段数组转字段obj,目的为了筛选时获取字段属性 |
| | | me.fieldsToFieldsObj(); |
| | | |
| | | //设置字段事件 |
| | | me.tableFieldClick(); |
| | | } |
| | | } |
| | | |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | onQueryAfter() { |
| | | var tableData_ = clone(this.tableData); |
| | | var today = new Date(); // 获取当前日期 |
| | | var day90_ = new Date(today.getTime() + 90 * (24 * 60 * 60 * 1000)); // 获取90天后的日期 |
| | | tableData_.map(r=>{ |
| | | if (r.valid_to && new Date(r.valid_to) < day90_) { |
| | | r.h_classname = "h_valid_to" |
| | | } |
| | | }) |
| | | this.tableData = clone(tableData_); |
| | | this.getSummary() |
| | | }, |
| | | |
| | | getSummary() { |
| | | var me = this; |
| | | var filter = me.getFilterData(); |
| | | var sum_f = [] |
| | | if (me.dataname == "wm_book_detail") { |
| | | sum_f = ["qty_total", "qty_frozen", "qty_available"] |
| | | } |
| | | else { |
| | | return |
| | | } |
| | | let param = { |
| | | dataname: me.dataname, |
| | | sum: sum_f, |
| | | filter: filter |
| | | } |
| | | Server.call("root/data/getSummary", param, function(result) { |
| | | var qty_total_sum_ = 0 // 库存数量汇总 |
| | | var qty_frozen_sum_ = 0 // 冻结数量汇总 |
| | | var qty_available_sum_ = 0 // 可用数量汇总 |
| | | if (result.data.qty_total_sum) { |
| | | qty_total_sum_ = result.data.qty_total_sum |
| | | } |
| | | if (result.data.qty_frozen_sum) { |
| | | qty_frozen_sum_ = result.data.qty_frozen_sum |
| | | } |
| | | if (result.data.qty_available_sum) { |
| | | qty_available_sum_ = result.data.qty_available_sum |
| | | } |
| | | |
| | | me.qty_total_sum = qty_total_sum_ |
| | | me.qty_frozen_sum = qty_frozen_sum_ |
| | | me.qty_available_sum = qty_available_sum_ |
| | | }) |
| | | }, |
| | | |
| | | tableFieldClick() { |
| | | var me = this; |
| | | //筛选字段事件设置 |
| | | this.filterfieldClick = { |
| | | |
| | | }; |
| | | |
| | | //表格字段事件设置 |
| | | this.tablefieldClick = { |
| | | |
| | | }; |
| | | |
| | | //表单字段事件设置 |
| | | this.formfieldClick = { |
| | | |
| | | }; |
| | | }, |
| | | |
| | | onDownload() { |
| | | let me = this; |
| | | var filter_ = "1 = 1"; |
| | | filter_ = this.getFilterData(filter_); |
| | | |
| | | let param = { |
| | | ioname:"export_wm_book_detail", |
| | | orderby: "", |
| | | filter: filter_, |
| | | token: Root.getToken() |
| | | } |
| | | window.top.vue.textdownloadForm(param); |
| | | }, |
| | | DownloadTemplate() { |
| | | var pathurl = "template/1.导入模板/库存导入.xlsx"; |
| | | handleDownload(pathurl); |
| | | }, |
| | | |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | loadJsCss(function () { |
| | | initVue(); |
| | | }); |
| | | </script> |
| | | <style> |
| | | /* 在vue.js中 v-cloak 这个指令是防止页面加载时出现 vuejs 的变量名而设计的 */ |
| | | [v-cloak] { |
| | | display: none !important; |
| | | } |
| | | .h_valid_to td.el-table__cell{ |
| | | background-color: #e5b506 !important; |
| | | } |
| | | </style> |
| | | |
| | | </head> |
| | | |
| | | <body style="margin: 0px;"> |
| | | <div v-cloak id="vbody"> |
| | | <div id="page_root"> |
| | | <div class="topbar"> |
| | | <span>{{title}}</span> |
| | | |
| | | <div style="float: right; "> |
| | | <el-button-group style="margin-left: 3px;"> |
| | | <el-button v-show="cbuttons_r.import" @click="DownloadTemplate">模板下载</el-button> |
| | | <el-button v-show="cbuttons_r.import" @click="onPopupByUploadFile":icon="buttonsconfig.import.icon">{{buttonsconfig.import.name}}</el-button> |
| | | <el-button v-show="cbuttons_r.export" type="primary" @click="onDownload" :icon="buttonsconfig.export.icon">{{buttonsconfig.export.name}}</el-button> |
| | | </el-button-group> |
| | | </div> |
| | | <div style="float: right;margin-right: 10%;"> |
| | | <span>库存数量汇总:{{qty_total_sum}}</span> |
| | | <span>冻结数量汇总:{{qty_frozen_sum}}</span> |
| | | <span>可用数量汇总:{{qty_available_sum}}</span> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="h_dialog__body"> |
| | | <h-table |
| | | v-if="isRefresh" |
| | | ref="table1" |
| | | :table-fields="tableFields" |
| | | :table-data="tableData" |
| | | :is-edit-table-data="isEditTableData" |
| | | :pagesize="pagesize" |
| | | :pagenum="pagenum" |
| | | :total="total" |
| | | :table-height="tableHeight" |
| | | :table-field-click="tablefieldClick" |
| | | :tableloading="tableloading" |
| | | :isdraggableorder="cbuttons_r.Set" |
| | | |
| | | v-on:get-data="getData" |
| | | v-on:edit-data="editData" |
| | | v-on:del-data="delData" |
| | | v-on:row-click="rowClick" |
| | | v-on:order-fields="orderTableFields"> |
| | | </h-table> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="page_loading" style="position: absolute; top:0px; width: 100vw; height: 50vh;"> |
| | | <div class="spinner"> |
| | | <div class="cube1"></div> |
| | | <div class="cube2"></div> |
| | | </div> |
| | | </div> |
| | | |
| | | </body> |
| | | </html> |
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() { |
| | | pageVue = new TabTableVue({ |
| | | el: "#vbody", |
| | | data: { |
| | | title: "保证金管理", |
| | | |
| | | //Tab项设置 |
| | | tabs_d: [ |
| | | // {code: "Input", name: "草稿", dataname: "md_target_dealer", filterTxt: "(state_code='Input' or state_code = 'Rejected')", orderby: "update_time desc"}, |
| | | // // {code: "UnderApproval", name: "审批中", dataname: "so_implant", filterTxt: "state_code='UnderApproval'", orderby: "doc_date desc"}, |
| | | // // {code: "Open", name: "审批完成", dataname: "so_implant", filterTxt: "state_code='Open'", orderby: "doc_date desc"}, |
| | | // // {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: "List", name: "保证金明细", dataname: "md_target_dealer", filterTxt: "", orderby: ""}, |
| | | {code: "Flow", name: "保证金流水", dataname: "md_target_dealer", filterTxt: "", orderby: ""}, |
| | | // {code: "Apply", name: "指标申请", dataname: "md_target_apply", filterTxt: "1 = 1", orderby: "update_time desc"}, |
| | | ], |
| | | tabs: [], |
| | | tabsobj: {}, |
| | | |
| | | filterFields: [], |
| | | tableFields: [], |
| | | default_filterFields: [ |
| | | {isshow: "T", field: "year", name: "年份", filterfield:"", filteroperator: "like"}, |
| | | {isshow: "T", field: "customer_code", name: "推广商编码", filterfield:"", filteroperator: "like"}, |
| | | {isshow: "T", field: "customer_name", name: "推广商名称", filterfield:"", filteroperator: "like"}, |
| | | ], |
| | | default_tableFields: [ |
| | | //{isshow: "T", field: "category_id", name: "协议类型-ID", width: "100"}, |
| | | {isshow: "F", field: "state_code", name: "状态编码", width: "70"}, |
| | | {isshow: "T", field: "state_name", name: "状态名称", type:"tag", tagtype: '{^草稿^:^info^,^生效^:^success^,^关闭^:^danger^}', width: "80"}, |
| | | // {isshow: "T", field: "state_code", name: "状态编码", width: "70",filter_field:'state_code',filter_operator:'=',input_type:'capsuletag',input_type_filter:'select',options_key:'standard',options_pattern:'{^草稿^:^info^,^生效^:^success^,^审批中^:^warning^}'}, |
| | | //{isshow: "T", field: "template_id", name: "模板-ID", width: "100"}, |
| | | {isshow: "T", field: "month", name: "申请日期", width: "100"}, |
| | | {isshow: "T", field: "code", name: "台账编码", width: "100"}, |
| | | {isshow: "T", field: "name", name: "申请类型", width: "100"}, |
| | | {isshow: "T", field: "code", name: "推广商编码", width: "100"}, |
| | | {isshow: "T", field: "name", name: "推广商名称", width: "220"}, |
| | | {isshow: "T", field: "amt", name: "金额", width: "100",formatter:'formatter_money',align:'right',prefix:'¥'}, |
| | | {isshow: "T", field: "remark", name: "备注", width: "100",formatter:'formatter_money',align:'right',isminwidth:'T'}, |
| | | ], |
| | | cbuttons_r: {}, |
| | | ctabs_r: {}, |
| | | dataRequest: [ |
| | | // { |
| | | // name: "machine_state", |
| | | // dataname: "v_state_machine_state", |
| | | // // url: "root/data/newEntity", |
| | | // // paramsobj: {dataname: "md_org_data", type_code:"Distributor"}, |
| | | // isnotoption: false, //true:不是选项 |
| | | // code:"code",//是下拉选项时设置 |
| | | // label:"name",//是下拉选项时设置 |
| | | // // orderby: "index_no", |
| | | // filter: "parent_id='md_target_dealer'", |
| | | // }, |
| | | ], |
| | | dataRequestObj: {}, |
| | | }, |
| | | created() {}, |
| | | |
| | | mounted() { |
| | | var me = this; |
| | | if (window.top.tab.selected.option.page_id) { |
| | | this.title = window.top.tab.selected.option.menutitle |
| | | getPageByPageId(window.top.tab.selected.option.page_id, function(result){ |
| | | me.cbuttons_r = result.buttons_r; |
| | | // me.ctabs_r = result.tabs_r; |
| | | |
| | | // var tabsarr = []; |
| | | // me.tabs_d.map(e=>{ |
| | | // if(me.ctabs_r[e.code]){ |
| | | // tabsarr.push(e) |
| | | // } |
| | | // }) |
| | | // me.tabs = tabsarr; |
| | | |
| | | me.tabs = me.tabs_d; |
| | | //预加载数据 |
| | | if (me.dataRequest && me.dataRequest.length) { |
| | | var result = {}; |
| | | me.loadRequestData(me.dataRequest, result, function(data) { |
| | | me.dataRequestObj = data; |
| | | |
| | | if(me.tabs.length>0){ |
| | | me.activeTabName = me.tabs[0].code; |
| | | } |
| | | //初始化Tabs |
| | | me.initTabsPage(function() { |
| | | //获取数据 |
| | | me.initData(); |
| | | }); |
| | | me.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭 |
| | | hideLoading(); |
| | | }); |
| | | }); |
| | | } |
| | | else { |
| | | if(me.tabs.length>0){ |
| | | me.activeTabName = me.tabs[0].code; |
| | | } |
| | | //初始化Tabs |
| | | me.initTabsPage(function() { |
| | | //获取数据 |
| | | me.initData(); |
| | | }); |
| | | me.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭 |
| | | hideLoading(); |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | methods:{ |
| | | onhandleClick() { |
| | | this.initData(); |
| | | }, |
| | | |
| | | initData() { |
| | | var me = this; |
| | | me.tableButtonClick(); |
| | | this.doQueryByTab(function(result, callback) {//查询后的回调,用于获取字段的 |
| | | if (result.meta && result.meta[me.selectTabObj.dataname] && result.meta[me.selectTabObj.dataname].fields) { |
| | | var metas = clone(result.meta[me.selectTabObj.dataname].fields); |
| | | var filterFields_ = []; |
| | | var tableFields_ = []; |
| | | |
| | | metas.map(f=>{ |
| | | f.isshow = "T"; |
| | | tableFields_.push(clone(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); |
| | | } |
| | | } |
| | | |
| | | |
| | | //字段数组转字段obj,目的为了筛选时获取字段属性 |
| | | me.fieldsToFieldsObj(); |
| | | |
| | | //设置字段事件 |
| | | me.tableFieldClick(); |
| | | |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | tableFieldClick() { |
| | | var me = this; |
| | | var tablefieldClick = {}; |
| | | this.selectTabObj.tablefieldClick = tablefieldClick[this.activeTabName]; |
| | | }, |
| | | tableButtonClick() { |
| | | var me = this; |
| | | var tablebuttonClick = {}; |
| | | tablebuttonClick.List = [ |
| | | { |
| | | isbuttonshow: true, |
| | | type:"primary", |
| | | code: "add", |
| | | isselected: false, |
| | | classname: "", |
| | | onclick: function(obj) { |
| | | me.openCustomer('add',obj.selectedList[0]) |
| | | } |
| | | }, |
| | | ] |
| | | me.selectTabObj.tablebuttonClick = tablebuttonClick[this.activeTabName] |
| | | }, |
| | | openCustomer(sceneCode, obj) { |
| | | let me = this; |
| | | var row = {} |
| | | if (sceneCode == "edit" || sceneCode == "browse") { |
| | | row = me.selectTabObj.selectedrow; |
| | | if(!row){ |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请选择一条数据' |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | var config = { |
| | | totab: true, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "保证金" + (row.customer_code ? ("-" + row.customer_code) : ""), |
| | | id: "deposit_apply" + (row.id? row.id : "add") + sceneCode, |
| | | url: "module/md/page/customer/page/deposit_apply.html", |
| | | data: row, |
| | | delta: {}, |
| | | sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | loadJsCss(function () { |
| | | initVue(); |
| | | }); |
| | | </script> |
| | | <style> |
| | | /* 在vue.js中 v-cloak 这个指令是防止页面加载时出现 vuejs 的变量名而设计的 */ |
| | | [v-cloak] { |
| | | display: none !important; |
| | | } |
| | | .el-tabs__nav-scroll { |
| | | overflow: hidden; |
| | | position: relative; |
| | | padding-left: 20px; |
| | | } |
| | | </style> |
| | | |
| | | </head> |
| | | |
| | | <body style="margin: 0px;"> |
| | | <div v-cloak id="vbody"> |
| | | <div id="page_root"> |
| | | <div class="topbar"> |
| | | <span :class="page_title == 'right' ? 'h_page_title_right' : 'h_page_title_left'"><span class="h_page_title_txt">{{title}}</span></span> |
| | | |
| | | <div :class="page_title == 'right' ? 'h_page_button_left' : 'h_page_button_right'"> |
| | | <el-button-group style="margin-left: 3px"> |
| | | <el-button v-show="cbuttons_r.export" @click="onDownload" :icon="buttonsconfig.export.icon">{{buttonsconfig.export.name}}</el-button> |
| | | </el-button-group> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <el-tabs v-model="activeTabName" @tab-click="handleClick"> |
| | | <el-tab-pane v-for="(tab, k) in tabs" :label="tab.name" :name="tab.code" :key="k"></el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | <div class="h_dialog__body"> |
| | | <h-table |
| | | v-if="isRefresh && selectTabObj.tableFields" |
| | | ref="table1" |
| | | :table-fields="selectTabObj.tableFields" |
| | | :table-data="selectTabObj.tableData" |
| | | :is-edit-table-data="selectTabObj.isEditTableData" |
| | | :pagesize="selectTabObj.pagesize" |
| | | :pagenum="selectTabObj.pagenum" |
| | | :total="selectTabObj.total" |
| | | :table-height="selectTabObj.tableHeight" |
| | | :table-field-click="selectTabObj.tablefieldClick" |
| | | :is-show-index="selectTabObj.isShowIndex" |
| | | :tableloading="tableloading" |
| | | :is-highlight-row="selectTabObj.isHighlightRow" |
| | | :isdraggableorder="cbuttons_r.Set" |
| | | :filtersobj="selectTabObj.filterObj" |
| | | :table-buttons-click="selectTabObj.tablebuttonClick" |
| | | |
| | | v-on:get-data="getData" |
| | | v-on:edit-data="editData" |
| | | v-on:row-click="rowClick" |
| | | v-on:del-data="delData" |
| | | v-on:order-fields="orderTableFields" |
| | | > |
| | | </h-table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="page_loading" style="position: absolute; top:0px; width: 100vw; height: 50vh;"> |
| | | <div class="spinner"> |
| | | <div class="cube1"></div> |
| | | <div class="cube2"></div> |
| | | </div> |
| | | </div> |
| | | |
| | | </body> |
| | | </html> |
| | |
| | | // // {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_target_dealer", filterTxt: "", orderby: ""}, |
| | | {code: "History", name: "历史评估", dataname: "md_target_dealer", filterTxt: "", orderby: ""}, |
| | | {code: "Current", name: "当前评估", dataname: "md_org", filterTxt: "1=1", orderby: ""}, |
| | | {code: "History", name: "历史评估", dataname: "md_org", filterTxt: "1=1", orderby: ""}, |
| | | // {code: "Apply", name: "指标申请", dataname: "md_target_apply", filterTxt: "1 = 1", orderby: "update_time desc"}, |
| | | ], |
| | | tabs: [], |
| | |
| | | {isshow: "T", field: "customer_name", name: "推广商名称", filterfield:"", filteroperator: "like"}, |
| | | ], |
| | | default_tableFields: [ |
| | | // {isshow: "F", field: "id", name: "id", width: "70"}, |
| | | //{isshow: "T", field: "category_id", name: "协议类型-ID", width: "100"}, |
| | | {isshow: "T", field: "year", name: "年份", width: "70"}, |
| | | {isshow: "T", field: "date", name: "评估日期", width: "100"}, |
| | | //{isshow: "T", field: "template_id", name: "模板-ID", width: "100"}, |
| | | {isshow: "T", field: "month", name: "月份", width: "70"}, |
| | | {isshow: "T", field: "customer_code", name: "推广商编码", width: "100"}, |
| | | {isshow: "T", field: "customer_name", name: "推广商名称", width: "220"}, |
| | | {isshow: "T", field: "code", name: "推广商编码", width: "100"}, |
| | | {isshow: "T", field: "name", name: "推广商名称", width: "220",align:'left',isminwidth:'T'}, |
| | | {isshow: "T", field: "score", name: "综合得分", width: "100"}, |
| | | {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"}, |
| | | // {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"}, |
| | | |
| | | ]}, |
| | | // ]}, |
| | | ], |
| | | cbuttons_r: {}, |
| | | ctabs_r: {}, |
| | |
| | | |
| | | initData() { |
| | | var me = this; |
| | | me.tableButtonClick(); |
| | | this.doQueryByTab(function(result, callback) {//查询后的回调,用于获取字段的 |
| | | if (result.meta && result.meta[me.selectTabObj.dataname] && result.meta[me.selectTabObj.dataname].fields) { |
| | | var metas = clone(result.meta[me.selectTabObj.dataname].fields); |
| | |
| | | var me = this; |
| | | var tablefieldClick = {}; |
| | | this.selectTabObj.tablefieldClick = tablefieldClick[this.activeTabName]; |
| | | }, |
| | | tableButtonClick() { |
| | | var me = this; |
| | | var tablebuttonClick = {}; |
| | | tablebuttonClick.Current = [ |
| | | { |
| | | isbuttonshow: true, |
| | | type:"primary", |
| | | code: "edit", |
| | | isselected: true, |
| | | classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0]) { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | me.openCustomer('edit',obj.selectedList[0]) |
| | | } |
| | | }, |
| | | { |
| | | // isbuttonshow: me.cbuttons_r.formdetail, |
| | | isbuttonshow: true, |
| | | type:"primary", |
| | | code: "formdetail", |
| | | isselected: true, |
| | | classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0]) { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | me.openCustomer('browse',obj.selectedList[0]) |
| | | } |
| | | } |
| | | ]; |
| | | tablebuttonClick.History = [ |
| | | { |
| | | // isbuttonshow: me.cbuttons_r.formdetail, |
| | | isbuttonshow: true, |
| | | type:"primary", |
| | | code: "formdetail", |
| | | isselected: true, |
| | | classname: "", |
| | | disabled: function(selectRowList) { |
| | | var bo_ = true; |
| | | if (selectRowList[0]) { |
| | | bo_ = false; |
| | | } |
| | | return bo_ |
| | | }, |
| | | onclick: function(obj) { |
| | | me.openCustomer('browse',obj.selectedList[0]) |
| | | } |
| | | } |
| | | ] |
| | | me.selectTabObj.tablebuttonClick = tablebuttonClick[this.activeTabName] |
| | | }, |
| | | openCustomer(sceneCode, obj) { |
| | | let me = this; |
| | | var row = {} |
| | | if (sceneCode == "edit" || sceneCode == "browse") { |
| | | row = me.selectTabObj.selectedrow; |
| | | if(!row){ |
| | | Root.message({ |
| | | type: 'warning', |
| | | message: '请选择一条数据' |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | var config = { |
| | | totab: true, //true: 以Tab导航的方式打开 |
| | | width: "1100px", |
| | | height: "520px", |
| | | icon: "icon-product", |
| | | text: "推广商信息" + (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, |
| | | delta: {}, |
| | | sceneCode: sceneCode,//"refuseedit",//"approval", //"add"//"browse", |
| | | callback: function(obj, callback) { |
| | | me.onQuery(); |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | }, |
| | | |
| | | } |
| | |
| | | :is-highlight-row="selectTabObj.isHighlightRow" |
| | | :isdraggableorder="cbuttons_r.Set" |
| | | :filtersobj="selectTabObj.filterObj" |
| | | :table-buttons-click="selectTabObj.tablebuttonClick" |
| | | |
| | | v-on:get-data="getData" |
| | | v-on:edit-data="editData" |
New file |
| | |
| | | <!doctype html> |
| | | <html> |
| | | <head> |
| | | <meta charset="utf-8"><meta http-equiv="Expires" content="0"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-control" content="no-cache"><meta http-equiv="Cache" content="no-cache"> |
| | | <title>推广商评估信息</title> |
| | | |
| | | <script type="text/javascript"> |
| | | var pageVue = null; |
| | | function loadJsCss(callback) { |
| | | var jscss_urls = []; |
| | | window.top.initJsCss(document, jscss_urls, callback); |
| | | }; |
| | | |
| | | function initVue() { |
| | | new FormVue({ |
| | | el: "#vbody", |
| | | data: { |
| | | dataname: "md_org_account_criteria", |
| | | title: "推广商评估信息", |
| | | newformData: { |
| | | id: uuid_short(), |
| | | // code: createCode("D"), |
| | | // code: createCode("BA"), |
| | | create_time: createDatetime(), |
| | | state_code: "Closed", |
| | | state_name: "未生效", |
| | | // creator_name: window.top.vue.userinfo.name, |
| | | // type_code: "", |
| | | // type_name: "", |
| | | source: "DMS", |
| | | is_master: "F", |
| | | is_frozen: "F", |
| | | is_distributor: false, |
| | | category_name: "客户", |
| | | category_code: "Customer", |
| | | business_phone: null, |
| | | business_email: null, |
| | | |
| | | }, |
| | | dataRequest: [ |
| | | { |
| | | name: "md_org_account_criteria_rule", |
| | | dataname: "md_org_account_criteria_rule", |
| | | isnotoption: true, //true:不是选项 |
| | | filter: "", |
| | | }, |
| | | // { |
| | | // name: "md_geo_city", |
| | | // dataname: "md_geo_city", |
| | | // isnotoption: false, //true:不是选项 |
| | | // code:"id",//是下拉选项时设置 |
| | | // label:"name",//是下拉选项时设置 |
| | | // filter: "", |
| | | // orderby: "name" |
| | | // }, |
| | | // { |
| | | // name: "md_geo_county", |
| | | // dataname: "md_geo_county", |
| | | // isnotoption: false, //true:不是选项 |
| | | // code:"id",//是下拉选项时设置 |
| | | // label:"name",//是下拉选项时设置 |
| | | // filter: "", |
| | | // orderby: "name" |
| | | // } |
| | | ], |
| | | options_md_geo_province: [], |
| | | md_geo_city_obj: {}, |
| | | md_geo_county_obj:{}, |
| | | formAttr: { |
| | | istitle: false, |
| | | title: "表单名称", |
| | | columnnumber: 2, |
| | | labelwidth: "120px", |
| | | labelposition: "left",//"left",// right//top |
| | | size: "mini", |
| | | border: "10px solid #c6c6c600" |
| | | }, |
| | | |
| | | formFields: [], |
| | | |
| | | formData: {}, |
| | | formData_: [], |
| | | formData_group:[], |
| | | formdata_obj:[{group_name:'客观评分',group_code:'Objective',children:[]},{group_name:'主观评分',group_code:'Subjective',children:[]}], |
| | | |
| | | //按键权限设置 |
| | | isedit: false,//提交前编辑,保存/提交 |
| | | isrefuseedit: false,//拒绝后编辑,保存/再次提交 |
| | | isapproval: false,//审批,同意/拒绝/转办/退回 |
| | | |
| | | iscommit: false,//提交标记 |
| | | |
| | | //弹窗参数 |
| | | popupParames: {}, |
| | | //字段设置 |
| | | tablefieldClick: {}, |
| | | formfieldClick: {}, |
| | | dheight: null |
| | | }, |
| | | 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.sceneCode) { |
| | | if (this.popupParames.sceneCode == "add") {//新增 |
| | | |
| | | |
| | | } |
| | | 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_); |
| | | 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_); |
| | | |
| | | // if (this.newformData) { |
| | | // let formData_ = clone(this.formData); |
| | | |
| | | // for (var k in this.newformData) { |
| | | // formData_[k] = this.newformData[k]; |
| | | // } |
| | | // this.formData = formData_; |
| | | // } |
| | | this.isedit = true; |
| | | this.isedit = true; |
| | | } |
| | | else if (this.popupParames.sceneCode == "approval") {//审批 |
| | | this.formAttr.disabled = true; |
| | | this.isapproval = true; |
| | | } |
| | | else if (this.popupParames.sceneCode == "refuseedit") {//拒绝后的编辑 |
| | | this.isrefuseedit = true; |
| | | } |
| | | } |
| | | }, |
| | | |
| | | mounted() { |
| | | var me = this; |
| | | var title_h = 0; |
| | | if (me.popupParames.totab){ |
| | | title_h = 42; |
| | | } |
| | | me.dheight = document.documentElement.clientHeight - 50 - title_h; |
| | | |
| | | //预加载数据 |
| | | if (this.dataRequest && this.dataRequest.length) { |
| | | var result = {}; |
| | | this.loadRequestData(this.dataRequest, result, function(data) { |
| | | me.dataRequestObj = data; |
| | | //预加载数据后给哪些字段设置options或formatterjson |
| | | if (me.dataRequestObj.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 |
| | | } |
| | | }) |
| | | }) |
| | | 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_ = {}; |
| | | var options_md_geo_county_ = [] |
| | | var options_md_geo_county_ = clone(me.dataRequestObj.md_geo_county) |
| | | options_md_geo_county_.map(o=>{ |
| | | if (!md_geo_county_obj_[o.city]) { |
| | | md_geo_county_obj_[o.city] = [] |
| | | } |
| | | md_geo_county_obj_[o.city].push(o) |
| | | }) |
| | | me.md_geo_county_obj = clone(md_geo_county_obj_) |
| | | } |
| | | |
| | | |
| | | |
| | | // data.agm_template.map(c=>{ |
| | | // me.options_templateobj[c[me.props_template.value]] = c; |
| | | // }) |
| | | |
| | | // let agm_template_ = ArrayToTree(clone(data.agm_template), "name", "parent_id"); |
| | | // me.options_category = agm_template_; |
| | | |
| | | me.initData(); |
| | | }); |
| | | } |
| | | else { |
| | | this.initData(); |
| | | } |
| | | |
| | | // 以服务的方式调用的 Loading 需要异步关闭 |
| | | this.$nextTick(() => { |
| | | hideLoading(); |
| | | |
| | | //重新设置弹窗宽高 |
| | | // this.$nextTick(function(){ |
| | | // //let w_ = this.$refs.popup_body.offsetWidth + "px"; |
| | | // let w_ = "900px"; |
| | | // let h_ = this.$refs.popup_body.offsetHeight + "px"; |
| | | // Root.setPopupWH(w_, h_); |
| | | // }) |
| | | }); |
| | | }, |
| | | |
| | | 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; |
| | | |
| | | }, |
| | | |
| | | tableFieldClick() { |
| | | var me = this; |
| | | //表格字段事件设置 |
| | | this.tablefieldClick = {}; |
| | | |
| | | //表单字段事件设置 |
| | | this.formfieldClick = { |
| | | province: {//字段事件设置 |
| | | select: { |
| | | onchange: function(obj, refreshCallback) {//下拉展开事件 |
| | | obj.data.province = obj.selectoption.value || ""; |
| | | obj.data.city = ""; |
| | | obj.data.county = ""; |
| | | refreshCallback(); |
| | | // me.$set(me.tabsobj.DDWL, "formData", me.tabsobj.DDWL.formData); |
| | | // var formData_ = clone(me.tabsobj.DDWL.formData); |
| | | // me.tabsobj.DDWL.formData = formData_; |
| | | }, |
| | | }, |
| | | }, |
| | | city: {//字段事件设置 |
| | | visible: { |
| | | onchange: function(obj,row,callback) {//下拉展开事件 |
| | | if (me.formData.province) { |
| | | var formFields_ = clone(me.formFields); |
| | | formFields_.map(f=>{ |
| | | if (f.field == "city") { |
| | | if (me.md_geo_city_obj[me.formData.province] && me.md_geo_city_obj[me.formData.province].length) { |
| | | f.options = clone(me.md_geo_city_obj[me.formData.province]) |
| | | } |
| | | } |
| | | }) |
| | | me.formFields = clone(formFields_); |
| | | } |
| | | } |
| | | }, |
| | | select: { |
| | | onchange: function(obj,refreshCallback) {//下拉展开事件 |
| | | obj.data.city = obj.selectoption.value || ""; |
| | | obj.data.county = ""; |
| | | refreshCallback() |
| | | }, |
| | | }, |
| | | }, |
| | | county: { |
| | | visible: { |
| | | onchange: function(fieldObj, row, callback) {//下拉展开事件 |
| | | if (me.formData.city) { |
| | | var formFields_ = clone(me.formFields); |
| | | formFields_.map(f=>{ |
| | | if (f.field == "county") { |
| | | if (me.md_geo_county_obj[me.formData.city] && me.md_geo_county_obj[me.formData.city].length) { |
| | | f.options = clone(me.md_geo_county_obj[me.formData.city]) |
| | | } |
| | | } |
| | | }) |
| | | me.formFields = clone(formFields_); |
| | | } |
| | | }, |
| | | }, |
| | | select: { |
| | | onchange: function(obj,refreshCallback) {//下拉展开事件 |
| | | obj.data.county = obj.selectoption.value |
| | | refreshCallback() |
| | | } |
| | | } |
| | | }, |
| | | }; |
| | | }, |
| | | |
| | | open_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(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_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 |
| | | |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | 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() { |
| | | //必填项校验 |
| | | var bo1 = this.$refs.form1.checkForm(); |
| | | if(!bo1){ |
| | | Root.message({ |
| | | type: 'error', |
| | | message: '请填写必填项' |
| | | }); |
| | | return; |
| | | } |
| | | this.iscommit = true; |
| | | this.saveRowTable(); |
| | | }, |
| | | |
| | | //保存 |
| | | saveRowTable() { |
| | | var me = this; |
| | | var operator_ = "save";//保存 |
| | | |
| | | 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_, |
| | | 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(); |
| | | } |
| | | } |
| | | }, function(errorresult) { |
| | | console.log("错误信息", errorresult); |
| | | if (errorresult.messages && errorresult.messages.count && errorresult.messages.count.error) { |
| | | if (errorresult.messages.list) { |
| | | me.iscommit = false; |
| | | var config = { |
| | | totab: false, |
| | | // width: "1200px", |
| | | // height: 800, |
| | | icon: "icon-product", |
| | | text: "错误信息", |
| | | url: "module/tool/page/popup_error_messages.html", |
| | | data: {}, |
| | | delta: errorresult.messages.list, |
| | | callback: function(obj, callback) { |
| | | if (callback) { |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | me.doPopupByPublic(config); |
| | | } |
| | | } |
| | | else 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: '提交失败' |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | loadJsCss(function () { |
| | | initVue(); |
| | | }); |
| | | </script> |
| | | <style> |
| | | |
| | | /* 在vue.js中 v-cloak 这个指令是防止页面加载时出现 vuejs 的变量名而设计的 */ |
| | | [v-cloak] { |
| | | display: none !important; |
| | | } |
| | | .box-card { |
| | | border: 1px solid #DCDFE6 !important; |
| | | -webkit-box-shadow: 0 2px 4px 0 rgb(0 0 0 / 12%), 0 0 6px 0 rgb(0 0 0 / 4%) !important; |
| | | box-shadow: 0 2px 4px 0 rgb(0 0 0 / 12%), 0 0 6px 0 rgb(0 0 0 / 4%) !important; |
| | | } |
| | | .box-card > .el-card__body { |
| | | padding: 0px; |
| | | } |
| | | |
| | | .box-card .el-tabs--border-card>.el-tabs__content { |
| | | padding: 0px 15px !important; |
| | | } |
| | | |
| | | .box-card .el-tabs--border-card { |
| | | border: 0px; |
| | | box-shadow: none; |
| | | } |
| | | .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; |
| | | } |
| | | .h_cellclick { |
| | | color: #1d1da1; |
| | | text-decoration: underline; |
| | | cursor: pointer; |
| | | } |
| | | </style> |
| | | |
| | | </head> |
| | | |
| | | <body style="margin: 0px;"> |
| | | <div v-cloak id="vbody"> |
| | | <div id="page_root"> |
| | | <div ref="popup_body" style="padding: 0 20px;"> |
| | | <div v-if="popupParames.totab" class="el-dialog__header"> |
| | | <div class="dialog-title"> |
| | | <i class="iconfont icon-customermanagement"></i> |
| | | <span> {{title}}</span> |
| | | </div> |
| | | </div> |
| | | <div :style="{height: dheight + 'px', 'overflow-y': 'auto'}"> |
| | | <!-- <div style="position: absolute; top:40px; bottom: 50px; left: 0px; right: 0px; 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 > |
| | | <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-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"> |
| | | <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="12" class="itemgroup_row_item"> |
| | | <div> |
| | | <span :class="[unitobj.required_no ? 'me_h_nounitlabel' : 'me_h_unitlabel']" style="font-size: 13px;"> |
| | | <!-- {{unitobj.content_before}} --> |
| | | {{unitobj.content_before}} |
| | | </span> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" > |
| | | <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> |
| | | </div> |
| | | </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> |
| | | <!-- <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> --> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="page_loading" style="position: absolute; top:0px; width: 100vw; height: 50vh;"> |
| | | <div class="spinner"> |
| | | <div class="cube1"></div> |
| | | <div class="cube2"></div> |
| | | </div> |
| | | </div> |
| | | </body> |
| | | </html> |