| | |
| | | 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> |