From 38f00f0f0b95e80e20caa9cf5e5e485d0425b8c9 Mon Sep 17 00:00:00 2001 From: tom <tom.he@highdatas.com> Date: 星期四, 01 八月 2024 22:30:40 +0800 Subject: [PATCH] tj --- module/md/page/customer/page/customer_basic_acct.html | 268 ++++++++++++++++++++++++++++++++-------------------- 1 files changed, 164 insertions(+), 104 deletions(-) diff --git a/module/md/page/customer/page/customer_basic_acct.html b/module/md/page/customer/page/customer_basic_acct.html index 45c6e89..34d8cec 100644 --- a/module/md/page/customer/page/customer_basic_acct.html +++ b/module/md/page/customer/page/customer_basic_acct.html @@ -71,6 +71,12 @@ 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, @@ -89,7 +95,9 @@ meta_account_position_list: [], meta_account_change: [], + formFields_criteria: [], formData_change: {}, + formdata_rule_group:[], formAttr: { istitle: false, @@ -173,62 +181,6 @@ this.popupParames = clone(Root.popupParames); this.title = this.popupParames.title || this.popupParames.text if (this.popupParames.data) { - // var formdata_ = {} - // let formdata_ = { - // account_name, - // actor_code, - // actor_name, - // authorize_province, - // authorize_province_remark, - // bu_id, - // bu_name, - // business_address, - // business_email, - // business_need_code, - // business_need_name, - // business_need_others, - // business_person, - // business_phone, - // check_error, - // code, - // combined_score, - // company_id, - // company_name, - // create_time, - // creator_id, - // creator_name, - // credit_amt, - // credit_available, - // degree, - // file_authorization_name, - // file_authorization_id, - // h_rowindex, - // id, - // is_frozen, - // objective_score, - // open_date, - // opening_reason, - // org_id, - // org_ncc_id, - // platform_account_code, - // platform_account_id, - // platform_account_name, - // platform_org_id, - // remark, - // settlement, - // state_code, - // state_name, - // subjective_score, - // update_time, - - // } = clone(this.popupParames.data); - // this.formData = {} - // 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 } @@ -523,6 +475,31 @@ // 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鏀惧叆(鑰屼笉鏄斁鍏bj_) 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) + } + else { + me.formdata_rule_group.map(g=>{ + if (g.group_code== e.group_code) { + g.children.push(e) + } + }) + } + }) + } me.initData(); // 浠ユ湇鍔$殑鏂瑰紡璋冪敤鐨� Loading 闇�瑕佸紓姝ュ叧闂� @@ -638,7 +615,25 @@ 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 formData_criteria_ = result.data.md_org_account_criteria + me.formFields_criteria.map(g => { + formData_criteria_.map(e => { + if (g.id == e.criteria_id) { + Object.assign(e,g) + } + }) + }) + me.formdata_rule_group.map(g => { + g.children = [] + formData_criteria_.map(v => { + if (v.group_code == g.group_code) { + // v['content_before'] = g.content_before + g.children.push(v) + } + }) + }) + } if (result.meta) { var metaBydataname = {}; for (var dataname_ in result.meta) { @@ -760,6 +755,8 @@ //璁剧疆瀛楁浜嬩欢 me.tableFieldClick(); } + //鏁版嵁澶勭悊 + var formData_ = {}; if (me.accountnccdata.id) { @@ -1435,7 +1432,6 @@ // return // } - console.log(param); // return 0 Server.call("root/data/" + operator_, param, function(result) { console.log(result); @@ -1503,56 +1499,13 @@ // 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]] - // } - - // // 濡傛灉宸茬粡瀛樿繃鍒檌d淇濇寔涓嶅彉 - // 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] - // }; - - // // 濡傛灉宸茬粡瀛樿繃鍒檌d淇濇寔涓嶅彉 - // 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) { @@ -1563,6 +1516,14 @@ tableData_.push(row_); }) + if (tableData_.length == 0) { + Root.message({ + type: 'warning', + message: '璇峰厛娣诲姞鏄庣粏鏁版嵁' + }); + me.iscommit = false + return + } if (tableData_.length == 0) { Root.message({ type: 'warning', @@ -1589,6 +1550,26 @@ } } + 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.org_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_; @@ -1607,8 +1588,6 @@ return } - console.log(param); - // return Server.call("root/data/" + operator_, param, function(result) { console.log(result); if (result.success) { @@ -1893,6 +1872,87 @@ </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%"> -- Gitblit v1.8.0