<!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 src="../../../js/vue/vue.js"></script> <script src="../../../js/vue/element-ui/lib/index.js"></script> <script src="../../../js/vue/axios/dist/axios.min.js"></script> <script src="../../../js/myelement.js?v=20220425"></script> <script src="../../../js/vue/page.js?v=20220425"></script> <link href="../../../js/vue/element-ui/lib/theme-chalk/index.css" rel="stylesheet"> <link href="../../../css/myelement.css?v=20220425" rel="stylesheet"> <link href="../../../css/iconfont.css" rel="stylesheet"> <link href="../../../css/page.css?v=20220425" rel="stylesheet"> <link href="//at.alicdn.com/t/font_2374495_mkoo966o0uo.css" rel="stylesheet"> </head> <body> <div id="vbody"> <div id="page_root"> <div ref="popup_body" style="padding-right: 20px;"> <div class="el-dialog_header h_header" style="position: relative;"> <div class="dialog-title" style="padding: 10px 20px;"> <i class="iconfont icon-customermanagement"></i> <span> {{title}} </span> </div> </div> <div style="height: 550px; "> <div class="el-dialog_body" style="height: 510px;"> <el-form > <el-form-item :label="isfreeze ? '选择ç¦ç”¨æ–¹å¼' : '选择激活方å¼' "> <el-select v-model="freeze_type" placeholder=""> <el-option label="处方è¯" value="CFY"></el-option> <el-option label="特è¯" value="TY"></el-option> <el-option label="OTC" value="OTC"></el-option> </el-select> </el-form-item> </el-form> <h-form ref="form2" :form-attr="formAttr_ba" :table-fields="tableFields_ba" :form-data="formData" v-on:show-popup="showPopup" > </h-form> </div> </div> <div class="el-dialog_footer"> <el-button-group v-if="approval" style="margin: 0px 20px;"> <el-button @click="onShowApproval">审批记录</el-button> </el-button-group> <el-button-group v-if="formData.id && formData.delivery_status=='refuse'" style="margin: 0px 20px;"> <el-button type="danger" @click="onrefuseApproval">æ’¤ 销</el-button> <el-button type="success" @click="onpassApproval">冿¬¡æäº¤</el-button> </el-button-group> <el-button type="default" @click="closeDialog">å– æ¶ˆ</el-button> </div> </div> <!-- <el-dialog :title="isfreeze ? '冻结备案' : '激活备案'" :visible.sync="dialog_freeze" v-if="dialog_freeze" width="900px"> <el-form > <el-form-item :label="isfreeze ? '选择ç¦ç”¨æ–¹å¼' : '选择激活方å¼' "> <el-select v-model="freeze_type" placeholder=""> <el-option label="处方è¯" value="CFY"></el-option> <el-option label="特è¯" value="TY"></el-option> <el-option label="OTC" value="OTC"></el-option> </el-select> </el-form-item> </el-form> <h-form ref="form2" :form-attr="formAttr_ba" :table-fields="tableFields_ba" :form-data="formData_ba" v-on:show-popup="showPopup" > </h-form> <div slot="footer" class="dialog-footer"> <el-button @click="dialog_freeze = false" type="txt">å– æ¶ˆ</el-button> <el-button-group v-if="selectedrow.id && selectedrow.delivery_status=='refuse'" style="margin: 0px 20px;"> <el-button type="danger" @click="onrefuseApproval">æ’¤ 销</el-button> <el-button type="success" @click="onpassApproval">冿¬¡æäº¤</el-button> </el-button-group> <el-button-group v-else style="margin: 0px 20px;"> <el-button type="primary" @click="submitFreeze()">{{isfreeze ? '冻 结' : 'æ¿€ æ´»'}}</el-button> </el-button-group> </div> </el-dialog> --> <el-dialog title="å¡«å†™åŽŸå› " :visible.sync="reasonvisible" height="50%"> <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 10}" placeholder="è¯·è¾“å…¥åŽŸå› " v-model="textarea2"> </el-input> <el-button type="primary" size="small" @click="onPopupByUploadFileAll()">ä¸Šä¼ é™„ä»¶</el-button> <span> {{attachment_name}}</span> <div slot="footer" class="dialog-footer" > <el-button type="default" @click="reasonvisible = false">å– æ¶ˆ</el-button> <el-button type="primary" @click="saveReason" :loading="loading_approval">ç¡® 定</el-button> </div> </el-dialog> <el-dialog title="未审批完的备案和资质" :visible.sync="dialog_notapproval"> <h-table :table-fields="notApprovalFields" :table-data="notApprovalData" > </h-table> </el-dialog> <el-dialog :visible.sync="dingResult" width="40vw" height="50vh" :show-close="false" :close-on-click-modal="false" :close-on-press-escape="false"> <span>{{dingResultTxt}}</span> <div style="min-height: 150px;"></div> </el-dialog> </div> <div id="page_loading" style="position: absolute; top:0px; width: 100vw; height: 100vh;"> <div class="spinner"> <div class="cube1"></div> <div class="cube2"></div> </div> </div> </div> <script type="text/javascript"> new ListVue({ el: "#vbody", data: { emp_id: localStorage.getItem("emp_id"), emp_code: localStorage.getItem("emp_code"), roleList: [], title: "", iframe_url: "../../approval/ApprovalList_page.html", isallinput: false, isallrefuse: false, isapprovaledit: false, iscustomerchange: false, iscustomereditchange: false, notdisabled: false, showRowEdit: false, isrowinput: false, approval:false, loading_save: false, loading_submit: false, loading_approval: false, submitreason_type: "", submitreason_dialog: false, submitreason: "", loading_submitreason: false, form_dataname: "salesOrder", dataname: "delivery_mapping", //filterFieldsName: "customer_acct", formFieldsName: "customer_acct", tabaleFieldsName: "customer_factory",// rolecode: window.top.userinfo.user.rolecode, acctObj: {}, act_type: "", showform: true, formAttr: { title: "商业基本信æ¯", istitle: true, columnnumber: 3, labelwidth: "100px", labelposition: "left", //"right", size: "medium", disabled: true, border: "0px solid #c6c6c600", }, formFields: [], formData: {}, isOldContrast: true, formDataOld: {}, oldFormData: {}, activeNames: "1", refresh_formzz: true, file_zs: {}, file_zsold: {}, warningzs: {}, file_img: false, zzimg: {}, zzimgList: [], file_txt: false, selectZZType: "ZGL01", selectZZName: "", tableFields_zz: [ {isshow: "T", field: "num", name: "åºå·"}, {isshow: "T", field: "licence_date", name: "å‘è¯æ—¥æœŸ", type: "date"}, {isshow: "T", field: "ia", name: "å‘è¯æœºæž„"}, {isshow: "T", field: "license_term", name: "失效日期", type: "date"}, {isshow: "T", field: "scope", name: "范围", type: "textarea", textarearows: 10, maxlength: 1000}, ], isWithinEditTableData: true, licenceList: [], attachment_type_zzobj: {}, formAttr_zz: { istitle: false, title: "è¯ç…§è¯¦æƒ…", columnnumber: 1, labelwidth: "150px", labelposition: "right", size: "medium", border: "3px solid #c6c6c600", disabled: true, formatter: function(data, fields) { } }, attachment_type_zs: [], attachment_type_zs_customer: [], attachment_type_kp: [ {code: "prove_file_id", name: "é“¶è¡Œå¼€æˆ·è¯æ˜Ž", namecode: "prove_file_name"}, {code: "invoice_file_id", name: "开票资料", namecode: "invoice_file_name"}, ], formAttr_kp: { istitle: false, title: "开票信æ¯", columnnumber: 1, labelwidth: "130px", labelposition: "right", size: "medium", disabled: true, border: "3px solid #c6c6c600", formatter: function(data, fields) { } }, formAttr_kp_act: { istitle: true, title: "有效开票信æ¯", columnnumber: 1, labelwidth: "150px", labelposition: "right", size: "medium", border: "3px solid #c6c6c600", disabled: true, formatter: function(data, fields) { } }, filetypeMappin: { "ZGL01": { "num": "RegNum", "scope": "Business", "licence_date": "SetDate", "license_term": "Period" }, "ZGL03": { "num": "num", "scope": "scope", "licence_date": "licence_date", "license_term": "license_term" }, "ZGL06": { "num": "num", "scope": "scope", "licence_date": "licence_date", "license_term": "license_term" }, }, tableFields_kp: [ {isshow: "T", field: "bank_name", name: "开户银行", align: "center"}, {isshow: "T", field: "bank_account", name: "é“¶è¡Œå¸æˆ·", align: "center"}, {isshow: "T", field: "bank_account_name", name: "叿ˆ·åç§°", align: "center", width: "100"}, //{isshow: "T", field: "bank_delete", name: "是å¦å¤±æ•ˆ", align: "center", width: "100", type:"select", options: [{label: "å¦",value: 0}, {label: "是",value: 1}]}, {isshow: "T", field: "bank_address", name: "开票地å€", align: "center", width: "100"}, {isshow: "T", field: "bank_tel", name: "开票电è¯", align: "center"}, //{isshow: "T", field: "active", name: "当å‰ç³»ç»Ÿä½¿ç”¨", align: "center", type:"select", options: [{label: "未用",value: 0}, {label: "使用",value: 1}]}, ], formData_kp: {}, formData_kpold: {}, dataRequest: [ { isClientMode: false, code: "md_code", label: "md_description", name: "hierarchy", filter: "long_code like '01!0101!010102!010102628!01010218!20210420-0001%'" }, { isClientMode: false, code: "code", label: "name", name: "division_level1", filter: " level='1' and active='1'" }, { isClientMode: false, code: "code", label: "name", name: "deliveryOrganizationOpen", }, { isClientMode: false, code: "code", label: "value", name: "dictitem", filter: " parent_id='customer_part'" }, { isClientMode: false, isnotoption: true,//䏿˜¯é€‰æ‹©é¡¹çš„é¢„åŠ è½½ code: "code", label: "value", name: "roleEditAble", filter: " type='accountCustomerDelivery'" }, { isClientMode: false, code: "send_code", label: "code", dataname: "division_level1", name: "mdm_province_mapping", filter: " level='1' and active='1'" }, { isClientMode: false, isnotoption: true,//䏿˜¯é€‰æ‹©é¡¹çš„é¢„åŠ è½½ code: "code", label: "value", name: "customerRequiredByRoleid", dataname: "getCustomerRequiredByRoleid", filter: "1=1", url: "root/data/procedure", paramObjBydefault: { returnType: "entityset", role_id: window.top.roleid_str.replace(/;/g,"','") } }, ], dataRequestObj: {}, customerRequiredByRoleid: [], customerRequiredByRoleidTypeObj: { licence_zz: {}, business: {}, delivery: {}, }, customerRequiredByRoleidTypeList: {}, tableFields: [], tableData2: [], tableData2_thisoldobj: {}, tableDataOld: [], tableDataOldObj: {}, tableDataChange: {}, tableHeight2: 250, formData2:[], isRefresh: true, selectFormField: {}, operation_type: "", selectrow: {}, close:true, productDetail: [], sum_noRate_: 0, updatetime: createDatetime(), type_act: "", reasonvisible:false, canceltype: "", reasonvisible_flowid: "", textarea2: '', attachment: "", attachment_name: "", passOrRefuse:false, seal:false, part_dialog: false, formAttr_part: { title: "å‘货主体信æ¯", istitle: true, columnnumber: 2, labelwidth: "130px", labelposition: "right", //"right", size: "medium", border: "0px solid #c6c6c600", //disabled: true }, tableFields_part: [ {isshow: "T", field: "delivery_part_code", name: "å‘货主体", required: true, type: "select", options: [], props: {value: "code", label: "name", checkStrictly: true}}, {isshow: "T", field: "customer_part_code", name: "客户主体", required: true, type: "select", options: [], props: {value: "code", label: "value", checkStrictly: true}}, {isshow: "T", field: "business_type", name: "商业属性", required: true, type: "select", options: [{code: 1, name: "直管"}, {code: 2, name: "éžç›´ç®¡"}], props: {value: "code", label: "name", checkStrictly: true}}, {isshow: "T", field: "customer_identity", name: "客户身份", required: true, type: "select", options: [{code: 1, name: "ç»é”€"}, {code: 2, name: "分销"}, {code: 3, name: "直销"}], props: {value: "code", label: "name", checkStrictly: true}}, {isshow: "T", field: "business_operate_name", name: "商业æ“作人", required: true, type: "popup"}, {isshow: "T", field: "business_operate_code", name: "æ“作人编ç ",labelwidth: "130px", disabled: true}, {isshow: "T", field: "remark", name: "å¤‡æ¡ˆåŽŸå› ", required: true}, {isshow: "T", field: "file_name", name: "附件", type: "span", buttonname:"é™„ä»¶ä¸Šä¼ "}, ], formData_part: {}, dialog_notapproval: false, notApprovalFields: [ {isshow: "T", field: "delivery_part_name", name: "主体åç§°"}, {isshow: "T", field: "delivery_status", name: "备案状æ€", width: "100", formatter: "formatter_OrderState"}, {isshow: "T", field: "cer_status", name: "资质状æ€", width: "100", formatter: "formatter_OrderState"}, ], notApprovalData: [], checkfFields: ["delivery_part_code", "customer_part_code", "business_operate_code", "customer_identity", "business_type"], fromDing: false, dingResult: false, dingResultTxt: "", old_data_syxx: {}, isfreeze: false, freeze_type: "", formAttr_ba: { istitle: false, title: "商业备案编辑", columnnumber: 2, labelwidth: "130px", labelposition: "right", size: "medium", border: "10px solid #c6c6c600" }, tableFields_ba: [ {isshow: "T", field: "delivery_part_code", name: "å‘货主体", required: true, disabled: true, type: "select", options: [], props: {value: "code", label: "name", checkStrictly: true}}, {isshow: "T", field: "customer_part_code", name: "客户主体", required: true, type: "select", options: [], props: {value: "code", label: "value", checkStrictly: true}}, //{isshow: "T", field: "customer_identity", name: "客户身份", required: true, type: "select", options: [{code: 1, name: "ç»é”€"}, {code: 2, name: "分销"}, {code: 3, name: "直销"}], props: {value: "code", label: "name", checkStrictly: true}}, {isshow: "T", field: "business_type", name: "商业属性", required: true, type: "select", options: [{code: 1, name: "直管"}, {code: 2, name: "éžç›´ç®¡"}], props: {value: "code", label: "name", checkStrictly: true}}, {isshow: "T", field: "business_operate_name", name: "商业æ“作人", required: true, type: "popup"}, {isshow: "T", field: "business_operate_code", name: "æ“作人编ç ", disabled: true} //{isshow: "T", field: "remark", name: "å¤‡æ¡ˆåŽŸå› ", required: true}, //{isshow: "T", field: "file_name", name: "附件", type: "span", buttonname:"é™„ä»¶ä¸Šä¼ "}, ], }, created() { var me = this; var hierarchy_ = { id: localStorage.getItem("hierarchy_id"), name: localStorage.getItem("hierarchy_name"), code: localStorage.getItem("hierarchy_code"), }; this.popupParames = clone(Root.popupParames); /* if (this.popupParames.delta) { this.act_type = this.popupParames.delta.act_type; } */ if (this.popupParames.data) { let formData1 = {}; formData1 = clone(this.popupParames.data); me.freeze_type = formData1.part_type; me.isfreeze = formData1.freeze; me.formData = clone(formData1); } if (this.popupParames.title) { this.title = clone(this.isfreeze ? '冻结备案' : '激活备案' + this.popupParames.title); } }, mounted() { var me = this; if (this.dataRequest.length) { var result = {}; this.loadRequestData(this.dataRequest, result, function(data) { me.dataRequestObj = data; if (me.dataRequestObj.customerRequiredByRoleid) { me.customerRequiredByRoleid = clone(me.dataRequestObj.customerRequiredByRoleid) var customerRequiredByRoleidTypeObj = {}; var customerRequiredByRoleidTypeList = {}; me.customerRequiredByRoleid.map(cfr=>{ if (!customerRequiredByRoleidTypeObj[cfr.type]) { customerRequiredByRoleidTypeObj[cfr.type] = {}; customerRequiredByRoleidTypeList[cfr.type] = []; } customerRequiredByRoleidTypeObj[cfr.type][cfr.field] = cfr; customerRequiredByRoleidTypeList[cfr.type].push(cfr); }) me.customerRequiredByRoleidTypeObj = clone(customerRequiredByRoleidTypeObj); me.customerRequiredByRoleidTypeList = clone(customerRequiredByRoleidTypeList); } if (me.popupParames.sceneCode == "versionapproval") { //me.isapprovaledit = true; } me.initData(); }); } else { this.initData(); } var urlParam = getGetParams(this.popupParames.url); for(let key in urlParam) { if(key == "fromDing") { this.fromDing = urlParam[key]; } } this.$nextTick(() => { // 以æœåŠ¡çš„æ–¹å¼è°ƒç”¨çš„ Loading 需è¦å¼‚æ¥å…³é— document.getElementById('page_root').style.display = "block"; document.getElementById('page_loading').style.display = "none"; //釿–°è®¾ç½®å¼¹çª—宽高 this.$nextTick(function(){ let w_ = this.$refs.popup_body.offsetWidth + "px"; let h_ = this.$refs.popup_body.offsetHeight + "px"; Root.setPopupWH(w_, h_); }) }); }, methods:{ onServerInitData(data) { var me = this.data; me.filterFields = data.filterFields; me.formFields = data.formFields; me.tableFields = data.tableFields; if(me.filterFields.length > 0) { me.filterFields.map(e=>{ me.filterFieldsObj[e.field] = e; }); } if(me.formFields.length > 0) { me.formFields.map(e=>{ me.formFieldsObj[e.field] = e; }); } if(me.tableFields.length > 0) { me.tableFields.map(e=>{ me.tableFieldsObj[e.field] = e; }); } }, initData() { let me = this; this.getAttachmentType(); if(this.acctObj.id) { this.getInfoForm(); this.getInfoKP(); this.getTableDelivery(); if (!this.formAttr.disabled && this.acctObj.old_id && this.popupParames.sceneCode != "version") { this.getInfoOldForm();//oldFormData//å˜æ›´ç”¨ } if (this.acctObj.old_id) { this.getInfoFormOld();//formDataOld//差异显示用 } } else { if (me.popupParames.sceneCode == "add_mdm") { this.getInfoKP(); } this.getInitOption(); } }, setKHDataByMDM(data){ var me = this; //è®¾ç½®å•†ä¸šä¿¡æ¯ var mdmdata = clone(data); //this.formData = {}; //this.acctObj = {}; //å•†ä¸šä¿¡æ¯ var formData1 = {}; this.formFields.map(ff=>{ if (mdmdata[ff.field]) { formData1[ff.field] = mdmdata[ff.field]; } }); if(formData1.md_code) { formData1.old_code = formData1.md_code.toString() } formData1.apply_dep_code = localStorage.getItem("hierarchy_code"); formData1.apply_dep_name = localStorage.getItem("hierarchy_name"); formData1.operator_code = localStorage.getItem("emp_code"); formData1.operator_name = localStorage.getItem("emp_name"); var formData_ = clone(this.formData); for(var k in formData_) { if (formData_[k] && !formData1[k]) { formData1[k] = formData_[k]; } } this.formData = clone(formData1); this.acctObj = clone(formData1); this.getInitOption(); //设置è¯ç…§ä¿¡æ¯ var zzList = clone(data.licenceList); this.attachment_type_zs.map(e=>{ if (e.code != "ZGL01") { me.file_zs[e.code] = {}; } zzList.map(zz=>{ if (zz.type == e.code) { if (e.code == "ZGL01") { for (var z in zz) { if(zz[z]) { me.file_zs[e.code][z] = zz[z]; } } } else { me.file_zs[e.code] = zz; } } }); }); //è®¾ç½®å¼€ç¥¨ä¿¡æ¯ me.formData_kp = {}; if (data.bankInfo) { me.formData_kp = clone(data.bankInfo); } }, getAttachmentType() { let me = this; let param_table = { isClientMode: false, dataname: "attachment_type", filter: "active=1", orderby: "order_no" } this.attachment_type_zs = [];//è¯ä¹¦ this.attachment_type_zs_customer = [];//商业信æ¯è¯ä¹¦ this.attachment_type_zb = [];//è´¨ä¿ Server.call("root/data/getEntitySet", param_table, function(result) { console.log(result); if (result && result.data && result.data.entityset) { var attachmentTypes_ = result.data.entityset; var requiredFields_zz = me.customerRequiredByRoleidTypeObj.licence_zz; //var requiredFields_zb = me.customerRequiredByRoleidTypeObj.licence_zb; attachmentTypes_.map(e=>{ if(!me.file_zs[e.code]) { me.file_zs[e.code] = {}; } if (e.owned_by) { if (e.mandatory) { e.rules = []; let required_ = { required: true, message: "请输入"+e.name, trigger: "blur" }; e.rules.push(required_); } if (requiredFields_zz[e.code] && (requiredFields_zz[e.code].is_required == "T" || requiredFields_zz[e.code].roleis_required == "T")) { //e.required = true; e.rules = []; let required_ = { required: true, message: "请输入"+e.name, trigger: "blur" }; e.rules.push(required_); } else if (requiredFields_zz[e.code]) { //e.required = false; e.rules = null; } if(e.code == "ZGL01" || e.code == "ZG25E") { me.attachment_type_zs_customer.push(e); } me.attachment_type_zs.push(e); } else { me.attachment_type_zb.push(e); } me.attachment_type_zzobj[e.code] = e; }); } me.getInfoZZ(); }); }, getInfoOldForm() { var me = this; var customer_id_ = this.acctObj.old_id; var dataname_ = "agCustomer"; let param_ = { isClientMode: false, dataname: dataname_, filter: "id='" + customer_id_ + "'", } Server.call("root/data/getEntitySet", param_, function(result) { console.log(result); if (result && result.data && result.data.entityset && result.data.entityset.length>0) { me.oldFormData = clone(result.data.entityset[0]); } }); }, getInfoFormOld() { var me = this; var customer_id_ = this.acctObj.old_id; var dataname_ = "agCustomer"; let param_ = { isClientMode: false, dataname: dataname_, filter: "id='" + customer_id_ + "'", } Server.call("root/data/getEntitySet", param_, function(result) { console.log(result); if (result && result.data && result.data.entityset && result.data.entityset.length>0) { me.formDataOld = clone(result.data.entityset[0]); } }); }, getInfoForm() { var me = this; var customer_id_ = this.acctObj.id; //å®¡æ‰¹æ—¶ï¼Œæ ¹æ®æ˜Žç»†æ•°æ®ä¸çš„customer_id if(this.acctObj.customer_id) { customer_id_ = this.acctObj.customer_id; } /* var dataname_ = "customerNow"; if (this.acctObj.ag == 1) { dataname_ = "agCustomer"; } */ var dataname_ = "agCustomer"; let param_ = { isClientMode: false, dataname: dataname_, filter: "id='" + customer_id_ + "'", } Server.call("root/data/getEntitySet", param_, function(result) { console.log(result); if (result && result.data) { var formData_ = result.data.entityset[0]; if (me.popupParames.sceneCode == "version") { me.oldFormData = clone(formData_); formData_.id = null; formData_.old_id = clone(me.acctObj.id); formData_.flow_id = null; formData_.freeze = null; formData_.status = null; formData_.create_time = null; } me.formData = formData_; me.old_data_syxx = clone(formData_); me.getInitOption(); } }); }, getInfoZZ() { var me = this; if (me.popupParames.sceneCode == "add_mdm") { if (this.popupParames.data.licenceList && this.popupParames.data.licenceList.length) { var zzList = clone(this.popupParames.data.licenceList); zzList.map(zz=>{ me.file_zs[zz.type] = zz; }); } } else { var customer_uscc_ = this.acctObj.uscc; var filter_ = "customer_uscc='" + customer_uscc_ + "'"; var dataname_ = "agCustomerLicence"; if(this.acctObj.customer_id) { //filter_ = "customer_id='" + this.acctObj.customer_id + "'"; //dataname_ = "customerLicenceMapping"; } let param_ = { isClientMode: false, dataname: dataname_, filter: filter_, orderby: "create_time desc" } if(!this.acctObj.customer_id) { param_.empId = localStorage.getItem("emp_id"); param_.subFilter = "customer_id = '" + this.acctObj.id + "'" } else { param_.subFilter = "customer_id = '" + this.acctObj.customer_id + "'" } Server.call("root/data/getEntitySet", param_, function(result) { console.log(result); if (result && result.data && result.data.entityset && result.data.entityset.length > 0) { //me.licenceList = result.data.entityset; result.data.entityset.map(e=>{ me.file_zs[e.type] = e; }); me.getInfoZZOld(result.data.entityset); } }); } }, getInfoZZOld(table) { var me = this; this.file_zsold = {}; var ids_ = ""; table.map(t=>{ if (t.old_id) { if (!ids_) { ids_ = "'" + t.old_id + "'"; } else { ids_ += ",'" + t.old_id + "'"; } } }); if (ids_) { var filter_ = " customer_licence_mapping.id in (" + ids_ + ")"; var dataname_mapping = "agCustomerLicence"; let param_table = { isClientMode: false, dataname: dataname_mapping, filter: filter_, subFilter: ' 1=1 ' } Server.call("root/data/getEntitySet", param_table, function(result_) { console.log(result_); if (result_ && result_.data && result_.data.entityset && result_.data.entityset.length > 0) { result_.data.entityset.map(e=>{ me.file_zsold[e.type] = e; }); } }); } }, getInfoKP() { var me = this; if (me.popupParames.sceneCode == "add_mdm") { if (this.popupParames.data.bankInfo) { me.formData_kp = clone(this.popupParames.data.bankInfo); } } else { var customer_uscc_ = this.acctObj.uscc; var filter_ = "customer_uscc='" + customer_uscc_ + "'"; var dataname_ = "agCustomerInvoice"; if(this.acctObj.customer_id) { //filter_ = "customer_id='" + this.acctObj.customer_id + "'"; //dataname_ = "customerInvoiceMapping"; } let param_ = { isClientMode: false, dataname: dataname_, filter: filter_, orderby: "create_time desc" } if(!this.acctObj.customer_id) { param_.empId = localStorage.getItem("emp_id"); param_.subFilter = "customer_id = '" + this.acctObj.id + "'"; } else { param_.subFilter = "customer_id = '" + this.acctObj.customer_id + "'" } Server.call("root/data/getEntitySet", param_, function(result) { console.log(result); if (result && result.data && result.data.entityset && result.data.entityset.length) { me.formData_kp = result.data.entityset[0]; var table_ = []; table_.push(result.data.entityset[0]); me.getInfoKPOld(table_); } }); } }, getInfoKPOld(table) { var me = this; this.formData_kpold = {}; var ids_ = ""; table.map(t=>{ if (t.old_id) { if (!ids_) { ids_ = "'" + t.old_id + "'"; } else { ids_ += ",'" + t.old_id + "'"; } } }); if (ids_) { var filter_ = " id in (" + ids_ + ")"; var dataname_mapping = "agCustomerInvoice"; let param_table = { isClientMode: false, dataname: dataname_mapping, filter: filter_, } param_table.subFilter = "1=1" Server.call("root/data/getEntitySet", param_table, function(result_) { console.log(result_); if (result_ && result_.data && result_.data.entityset && result_.data.entityset.length) { me.formData_kpold = result_.data.entityset[0]; } }); } }, getTableDelivery() { var me = this; var customer_uscc_ = this.acctObj.uscc; var filter_ = "customer_uscc='" + customer_uscc_ + "'"; var dataname_mapping = "agCustomerDeliveryLineRaw";//"delivery_mapping"; filter_ += " and cdm.used = 1 and ((cdm.flow_id is null and cdm.create_operate_code='"+ localStorage.getItem("emp_code") +"') or (cdm.flow_id is not null and flows.status in ('refuse', 'working', 'open')) )" if(this.acctObj.customer_id) { filter_ = "id='" + this.acctObj.id + "'"; dataname_mapping = "agCustomerDelivery";//"delivery_mapping"; filter_ += " and a.used = 1 and ((a.flow_id is null and a.create_operate_code='"+ localStorage.getItem("emp_code") +"') or (a.flow_id is not null and a.status in ('refuse', 'working', 'open')))" } let param_table = { isClientMode: false, dataname: dataname_mapping, filter: filter_, } if(!this.acctObj.customer_id) { param_table.empId = localStorage.getItem("emp_id"); } me.tableData2 = []; me.tableloading = true; me.tableData2_thisoldobj = {}; Server.call("root/data/getEntitySet", param_table, function(result_) { me.tableloading = false; console.log(result_); if (result_ && result_.data && result_.data.entityset && result_.data.entityset.length > 0) { me.tableData2 = result_.data.entityset; result_.data.entityset.map(e=>{ me.tableData2_thisoldobj[e.id] = e; }); me.getTableDataOld(result_.data.entityset); } }); }, getTableDataOld(table) { var me = this; this.tableDataOld = []; this.tableDataOldObj = {}; var tableDataObj_ = {}; var ids_mapping = {}; var ids_ = ""; var notCompareField = ["update_time"]; table.map(t=>{ if (t.old_id) { tableDataObj_[t.id] = t; ids_mapping[t.old_id] = t.id; if (!ids_) { ids_ = "'" + t.old_id + "'"; } else { ids_ += ",'" + t.old_id + "'"; } } }); if (ids_) { var filter_ = " a.id in (" + ids_ + ")"; var dataname_mapping = "agCustomerDelivery"; let param_table = { isClientMode: false, dataname: dataname_mapping, filter: filter_, } Server.call("root/data/getEntitySet", param_table, function(result_) { console.log(result_); if (result_ && result_.data && result_.data.entityset && result_.data.entityset.length > 0) { me.tableDataOld = result_.data.entityset; var tableDataOldObj_ = {}; me.tableDataOld.map(o=>{ notCompareField.map(f=>{ o[f] = tableDataObj_[ids_mapping[o.id]][f]; }) tableDataOldObj_[ids_mapping[o.id]] = o; }); me.tableDataOldObj = tableDataOldObj_; } }); } //tableDataOldObj }, getInitOption() { var me = this; this.formFields.map(e=>{ if (e.type == "select" && e.options && e.options.length == 0 && this.formData[e.field]) { if (e.field == "country") { let param_ = { isClientMode: false, filter: " level='0' and active='1' and code='" + this.formData[e.field] + "'", } Server.call("root/data/getEntitySet/division_level0", param_, function(result){ options_ = result.data.entityset; e.options = options_; me.showform = false; me.$nextTick(() => { me.showform = true; }); }); } else if (e.field == "province") { if (e.selectparent) { if(!this.formData[e.selectparent]) { e.options = [] } else { var code_ = this.formData[e.selectparent]; let param_ = { isClientMode: false, filter: " level='1' and active='1' and EXISTS( SELECT * from md_division p where code='" + code_ + "' and md_division.parent_id = p.id)", } Server.call("root/data/getEntitySet/division_level1", param_, function(result){ options_ = result.data.entityset; e.options = options_; me.showform = false; me.$nextTick(() => { me.showform = true; }); }); } } } else if (e.field == "city") { if (e.selectparent) { if(!this.formData[e.selectparent]) { e.options = [] } else { var code_ = this.formData[e.selectparent]; let param_ = { isClientMode: false, filter: " level='2' and active='1' and EXISTS( SELECT * from md_division p where code='" + code_ + "' and md_division.parent_id = p.id)", } Server.call("root/data/getEntitySet/division_level2", param_, function(result){ options_ = result.data.entityset; e.options = options_; me.showform = false; me.$nextTick(() => { me.showform = true; }); }); } } } else if (e.field == "county") { if (e.selectparent) { if(!this.formData[e.selectparent]) { e.options = [] } else { var code_ = this.formData[e.selectparent]; let param_ = { isClientMode: false, filter: " level='3' and active='1' and EXISTS( SELECT * from md_division p where code='" + code_ + "' and md_division.parent_id = p.id)", } Server.call("root/data/getEntitySet/division_level3", param_, function(result){ options_ = result.data.entityset; e.options = options_; me.showform = false; me.$nextTick(() => { me.showform = true; }); }); } } } } }) }, //saveAfter closeDialog() { /* if (this.popupParames.totab){ Root.tab.removeItem(Root.tab.selected); Root.tab.open(me.popupParames.parentOption, false); } else { Root.hidePopup(); } */ this.saveAfter(); }, checkDataByJC() { var bo_ = false; //è¯ç…§æ£€æŸ¥ //bo_ = this.checkDataByZZ(); return bo_; }, checkDataByZZ() { var bo = false; var me = this; //资质è¯ç…§ me.warningzs = {}; if(me.file_zs.ZGL01 && me.file_zs.ZGL01.file_id) { me.attachment_type_zs.map(t=>{ if (me.file_zs[t.code].file_id) { me.tableFields_zz.map(f=>{ if (f.required && !me.file_zs[t.code][f.field]) { me.warningzs[t.code] = true; bo = true; } }) } }) } else {//资质è¯ç…§æ²¡æœ‰ bo = true; me.warningzs.ZGL01 = true; } return bo; }, verification(id_) { let me = this; var bo_ = false; if (!this.formData.uscc) { Root.message({ type: 'warning', message: "没有统一信用代ç " }) return; } let param_table = { isClientMode: false, dataname: "getStatusByCustomerUscc", returnType: "entityset", filter: "customer_delivery_mapping.customer_uscc = '" + this.formData.uscc + "'" } Server.call("root/data/procedure", param_table, function(result) { console.log(result); me.notApprovalData = []; if (result.data.entityset && result.data.entityset.length) { me.dialog_notapproval = true; me.notApprovalData = result.data.entityset; } else { bo_ = true; } if (bo_) { me.doSubmitForm(id_); } }); }, //商业撤销 cancelEditForm() { this.canceltype = "customer"; this.textarea2 = ""; this.reasonvisible = true; this.reasonvisible_flowid = this.formData.flow_id; this.passOrRefuse = false; this.type_act = "accountCustomerDelivery"; }, /* onrefuseApproval(){ this.textarea2 = ""; this.reasonvisible = true; this.reasonvisible_flowid = this.formData.flow_id; this.passOrRefuse = false; this.type_act = "accountCustomerCertification"; }, saveReason(){ this.loading_approval = true; if(this.passOrRefuse){ this.passApproval(true,this.textarea2) }else{ if(this.textarea2 != ""){ this.passApproval(false,this.textarea2) } else{ Root.message({ type: 'warning', message: 'è¯·å¡«å†™åŽŸå› ' }); this.loading_approval = false; } } }, //审批 passApproval(pass_,reason_) { let me = this; if(reason_) { //åŽ»é™¤ä¸¤ç«¯çš„ç©ºæ ¼ reason_ = reason_.replace(/(^\s*)|(\s*$)/g, ""); //去除ä¸é—´çš„回车æ¢è¡Œ reason_ = reason_.replace(/[\r\n]/g,""); } var variable_map_ = { reason: reason_, stict: false } if (this.acctObj.freeze) { variable_map_ = { reason: reason_, stict: false, province: me.acctObj.record_province, partType: me.acctObj.part_type, businessType: me.acctObj.business_type, customerPartCode: me.acctObj.customer_part_code, operateCode: me.acctObj.operator_code } } if (this.attachment) { variable_map_.attachment = this.attachment; } let param = { flow_id: this.acctObj.cer_flow_id, pass: pass_, variable_map: variable_map_, business_type: this.type_act, isClientMode: false } Server.call("root/api/dealAct", param, function(result) { console.log(result); me.loading_approval = true; if (result.success){ Root.message({ type: 'success', message: '审批æˆåŠŸ' }); }else{ Root.message({ type: 'warning', message: '审批失败' }); } me.saveAfter(); }); }, */ submitEditForm() { var me = this; var actpassword_ = localStorage.getItem("actpassword"); if (actpassword_) { var config = { text: "æµç¨‹éªŒè¯", url: "../tool/popup_actpassword.html", callback: function(obj, callback) { me.do_submitEditForm(); if (callback) { callback(); } } }; this.doPopupByPublic(config); } else { this.do_submitEditForm(); } }, do_submitEditForm() { this.issubmit = true; this.saveForm(true);//æ‹’ç»åŽçš„æäº¤ }, submitForm() { var me = this; var actpassword_ = localStorage.getItem("actpassword"); if (actpassword_) { var config = { text: "æµç¨‹éªŒè¯", url: "../tool/popup_actpassword.html", callback: function(obj, callback) { me.dosubmitForm(); if (callback) { callback(); } } }; this.doPopupByPublic(config); } else { this.dosubmitForm(); } }, dosubmitForm() { this.issubmit = true; this.saveForm();//å˜æ›´åŽçš„æäº¤ }, saveForm(isrefuse) { var me = this; let params = clone(this.formData); if (me.oldFormData.id && (params.md_description != me.oldFormData.md_description || params.record_province != me.oldFormData.record_province)) { Root.confirm('更改商业å称或备案çœä»½æäº¤åŽå°†å†»ç»“其所有备案数æ®', '冻结æç¤º', { confirmButtonText: 'ç»§ç»æ›´æ”¹', cancelButtonText: 'å– æ¶ˆ', type: 'warning' }).then(() => { //ç»§ç»æäº¤ me.dosaveForm(params, isrefuse); }).catch(() => { //å–æ¶ˆæ›´æ”¹ï¼ŒåŽèŽ·å–之å‰çš„æ•°æ®å¹¶æ›´æ”¹æœ¬æ¬¡çš„æ•°æ® params.md_description = me.oldFormData.md_description; params.record_province = me.oldFormData.record_province; me.issubmit = false; me.dosaveForm(params, isrefuse); }); } else { me.dosaveForm(params, isrefuse); } }, dosaveForm(params, isrefuse) { var me = this; if (!params.old_id && me.formData.status) { params.old_id = this.acctObj.id; } else { params.strict = false; } if (!params.uscc) { Root.message({ type: 'warning', message: '请先设置统一社会信用代ç ' }); return } //è¯ç…§ var licenceList_ = []; this.attachment_type_zs.map(zs=>{ var zsobj_ = me.file_zs[zs.code]; if (zsobj_.file_id) { if(zsobj_.customer_id && zsobj_.customer_id != me.formData.id) { zsobj_.old_id = clone(zsobj_.id); zsobj_.id = null; zsobj_.create_time = null; } licenceList_.push(zsobj_); } }); if (licenceList_.length) { params.licence_list = licenceList_; }else { params.licence_list = null; } //开票 var formData_kp_notnull = false; for (var kp_ in me.formData_kp) { if (kp_ == "customer_id" && me.formData_kp.customer_id != me.formData.id) { me.formData_kp.old_id = clone(me.formData_kp.id); me.formData_kp.id = null; me.formData_kp.create_time = null; } formData_kp_notnull = true; } if (formData_kp_notnull) { if(!me.formData_kp.customer_uscc) { me.formData_kp.customer_uscc = this.formData.uscc; } if(this.formData.id && !me.formData_kp.customer_id) { me.formData_kp.customer_id = this.formData.id; } params.invoice = me.formData_kp; }else { params.invoice = null; } params.dataName = "agCustomer"; params.type = "update"; params.isClientMode = false; Server.call("root/customer/saveCustomer", params, function(result) { console.log(result); me.formData.id = result.data.id; var result_ = result; if (result && result.success) { if(me.issubmit) { me.issubmit = false; //æäº¤æ£€æµ‹ var id_ = params.id; if(!id_) { id_ = result.data.id; } if (isrefuse) { me.doSubmitEditForm(); } else { let param_table = { isClientMode: false, dataname: "getCustomerStatus", returnType: "entityset", filter: "uscc='" + me.formData.uscc + "'" } Server.call("root/data/procedure", param_table, function(result_t) { console.log(result_t); if (result_t.data.entityset && result_t.data.entityset.length) { Root.message({ type: 'warning', message: '该商业已å˜åœ¨æµç¨‹' }); me.saveAfter(); } else { me.verification(id_); } }); } /* var bo_ = me.checkDataByJC(); if (bo_) {//true:å˜åœ¨æ£€æŸ¥ä¸é€šè¿‡æ•°æ® return } var id_ = params.id; if(!id_) { id_ = result.data.id; } var param_submit = { isClientMode: false, id: id_, } Server.call("root/customer/commitModifyCustomer", param_submit, function(result2) { console.log(result2); Root.message({ type: 'success', message: 'æäº¤æˆåŠŸ' }); me.saveAfter(); }); */ /* var param_submit = { isClientMode: false, business_id: id_, business_type: "accountCustomer" } Server.call("root/api/startAct", param_submit, function(result1) { console.log(result1); let param_act = { id: id_, flow_id: result1.data.activitiId }; param_act.isClientMode = false; param_act.dataname = "agcustomer"; Server.call("root/data/updateEntity", param_act, function(result2) { console.log(result2); Root.message({ type: 'success', message: 'æäº¤æˆåŠŸ' }); //me.saveAfter(); }); }); */ } else { Root.message({ type: 'success', message: 'ä¿å˜æˆåŠŸ' }); me.saveAfter(); } } }, function(result1) { console.log(result1); me.issubmit = false; if (result1.message) { Root.message({ type: 'error', message: result1.message }); } }) }, doSubmitForm(id_) { var me = this; var bo_ = me.checkDataByJC(); if (bo_) {//true:å˜åœ¨æ£€æŸ¥ä¸é€šè¿‡æ•°æ® return } /* var internationPart_ = false; if (me.formData.apply_dep_code && me.formData.apply_dep_code == "202105180005") { internationPart_ = true; } */ var param_submit = { isClientMode: false, id: id_, /* variable_map:{ internationPart:internationPart_ } */ } Server.call("root/customer/commitModifyCustomer", param_submit, function(result2) { console.log(result2); Root.message({ type: 'success', message: 'æäº¤æˆåŠŸ' }); //å˜æ›´æäº¤å•†ä¸šä¿¡æ¯æ—¥å¿— me.saveAfter("syxx"); //me.saveAfter(); }); }, doSubmitEditForm() { var me = this; var internationPart_ = false; if (this.formData.apply_dep_code && this.formData.apply_dep_code == "202105180005") { internationPart_ = true; } let param_act = { flow_id: this.formData.flow_id, pass: true, variable_map:{ reason: "调整æäº¤", internationPart: internationPart_ }, business_type: "accountCustomerDelivery", isClientMode: false, } Server.call("root/api/dealAct", param_act, function(result1) { console.log(result1); if (result1.success){ Root.message({ type: 'success', message: 'æäº¤æˆåŠŸ' }); //æ‹’æŽ¥åŽæäº¤å•†ä¸šä¿¡æ¯æ—¥å¿— me.saveAfter("syxx"); }else{ Root.message({ type: 'warning', message: 'æäº¤å¤±è´¥' }); } me.saveAfter(); }); }, submitRowTable() { var me = this; var actpassword_ = localStorage.getItem("actpassword"); if (actpassword_) { var config = { text: "æµç¨‹éªŒè¯", url: "../tool/popup_actpassword.html", callback: function(obj, callback) { me.dosubmitRowTable(); if (callback) { callback(); } } }; this.doPopupByPublic(config); } else { this.dosubmitRowTable(); } }, dosubmitRowTable() { this.issubmit = true; this.saveRowTable(); }, saveRowTable() { var me = this; //æ ¡éªŒä¸€æ¡åœ¨ä¸åœ¨æ•°ç»„ä¸ï¼› this.checkDataByRow(this.tableData2, this.selectrow, "edit", function() { me.doSaveRowTable(); }, function() { me.selectrow = {}; me.issubmit = false; Root.message({ type: 'warning', message: 'å·²å˜åœ¨ç›¸åŒæ•°æ®' }); return }); }, doSaveRowTable() { var me = this; var row = clone(this.selectrow); let params = row; params.customer_id = this.formData.id; params.customer_uscc = this.formData.uscc; params.isClientMode = false; Server.call("root/customer/saveCustomerDelivery", params, function(result) { console.log(result); var result_ = result; if (result && result.success) { me.selectrow.id = result.data.id; if(me.issubmit) { me.issubmit = false; var id_ = params.id; if(!id_) { id_ = result.data.id; } var internationPart_ = false; if (me.formData.apply_dep_code && me.formData.apply_dep_code == "202105180005") { internationPart_ = true; } var param_submit = { isClientMode: false, businessId: id_, businessType: "accountCustomerDelivery", variableMap: { deliveryPartCode: row.delivery_part_code, province: me.acctObj.record_province, internationPart: internationPart_ } } Server.call("root/api/startAct", param_submit, function(result1) { console.log(result1); let param_act = { id: id_, flow_id: result1.data.data.activitiId }; param_act.isClientMode = false; param_act.dataname = "agCustomerDelivery"; Server.call("root/data/updateEntity", param_act, function(result2) { console.log(result2); me.selectrow.status = "working"; Root.message({ type: 'success', message: 'æäº¤æˆåŠŸ' }); //啿¡ä¸»ä½“æäº¤æ—¥å¿— me.saveAfter("fhzt"); }); }); } else { Root.message({ type: 'success', message: 'ä¿å˜æˆåŠŸ' }); me.saveAfter("fhzt"); } } }) }, refusesubmitRowTable() { var me = this; var actpassword_ = localStorage.getItem("actpassword"); if (actpassword_) { var config = { text: "æµç¨‹éªŒè¯", url: "../tool/popup_actpassword.html", callback: function(obj, callback) { me.dorefusesubmitRowTable(); if (callback) { callback(); } } }; this.doPopupByPublic(config); } else { this.dorefusesubmitRowTable(); } }, dorefusesubmitRowTable() { this.issubmit = true; this.saveRefusesuRowTable(); }, refusecancelRowTable() { var row = clone(this.selectrow); this.canceltype = "customer_delivery"; this.textarea2 = ""; this.reasonvisible = true; this.reasonvisible_flowid = row.flow_id; this.passOrRefuse = false; this.type_act = "accountCustomerDelivery"; }, saveRefusesuRowTable() { var me = this; var row = clone(this.selectrow); let params = row; params.customer_id = this.formData.id; params.customer_uscc = this.formData.uscc; params.isClientMode = false; Server.call("root/customer/saveCustomerDelivery", params, function(result) { console.log(result); var result_ = result; if (result && result.success) { if(me.issubmit) { me.issubmit = false; var internationPart_ = false; if (me.formData.apply_dep_code && me.formData.apply_dep_code == "202105180005") { internationPart_ = true; } let param_act = { flow_id: row.flow_id, pass: true, variable_map:{ reason: "调整æäº¤", internationPart: internationPart_ }, business_type: "accountCustomerDelivery", isClientMode: false, } Server.call("root/api/dealAct", param_act, function(result1) { console.log(result1); me.loading_approval = false; if (result1.success){ Root.message({ type: 'success', message: 'æäº¤æˆåŠŸ' }); //啿¡ä¸»ä½“调整æäº¤æ—¥å¿— }else{ Root.message({ type: 'warning', message: 'æäº¤å¤±è´¥' }); } me.saveAfter(); }); } else { Root.message({ type: 'success', message: 'ä¿å˜æˆåŠŸ' }); //me.saveAfter(); } } }) }, handleChange(tab) { this.file_img = false; this.file_txt = false; this.selectZZName = ""; this.selectZZType = "ZGL01"; this.zzimg = {}; this.zzimgList = []; }, submitTables(code) { this.submitreason_type = code; this.submitreason = ""; this.loading_submitreason = false; this.submitreason_dialog = true; }, saveSubmit() { var me = this; var actpassword_ = localStorage.getItem("actpassword"); if (actpassword_) { var config = { text: "æµç¨‹éªŒè¯", url: "../tool/popup_actpassword.html", callback: function(obj, callback) { /* Root.message({ type: 'success', message: 'æµç¨‹éªŒè¯é€šè¿‡' }); */ me.dosubmitTables(); if (callback) { callback(); } } }; this.doPopupByPublic(config); } else { /* Root.message({ type: 'warning', message: '没有æµç¨‹éªŒè¯å¯†ç ' }); */ this.dosubmitTables(); } }, dosubmitTables() { if (this.submitreason_type == "scsykh") {//首次商业开户 this.issubmit = true; this.loading_submit = true; this.loading_submitreason = true; this.saveTables(); } }, saveTables() { var me = this; //æ ¡éªŒæ•°ç»„ä¸æ˜¯å¦æœ‰é‡å¤æ•°æ®checkDataByR this.checkDataByArray(this.tableData2, function() { me.doSaveTables(); }, function() { me.issubmit = false; me.loading_submit = false; me.submitreason_dialog = false; Root.message({ type: 'warning', message: 'å˜åœ¨ç›¸åŒæ•°æ®' }); return }); }, doSaveTables() { var me = this; me.loading_save = true; var param = clone(this.formData); if (!param.uscc) { Root.message({ type: 'warning', message: '请先设置统一社会信用代ç ' }); return } //备案明细 param.delivery_list = this.tableData2; //è¯ç…§ var licenceList_ = []; this.attachment_type_zs.map(zs=>{ var zsobj_ = me.file_zs[zs.code]; if (zsobj_.file_id) { //zsobj_.code = zs.attachment_code; licenceList_.push(zsobj_); } }); if (licenceList_.length) { param.licence_list = licenceList_; }else { param.licence_list = null; } //开票 var formData_kp_notnull = false; for (var kp_ in me.formData_kp) { formData_kp_notnull = true; } if (formData_kp_notnull) { if(!me.formData_kp.customer_uscc) { me.formData_kp.customer_uscc = this.formData.uscc; } if(this.formData.id && !me.formData_kp.customer_id) { me.formData_kp.customer_id = this.formData.id; } param.invoice = me.formData_kp; }else { param.invoice = null; } param.type = "create"; param.isClientMode = false; Server.call("root/customer/saveCustomer", param, function(result) { var result_ = result; me.loading_save = false; if (result && result.success) { if(me.issubmit) { me.issubmit = false; var bo_ = me.checkDataByJC(); if (bo_) {//true:å˜åœ¨æ£€æŸ¥ä¸é€šè¿‡æ•°æ® return } var id_ = param.id; if(!id_) { id_ = result.data.id; } var internationPart_ = false; if (me.formData.apply_dep_code && me.formData.apply_dep_code == "202105180005") { internationPart_ = true; } var param_submit = { isClientMode: false, id: id_, submitreason: me.submitreason, variable_map:{ internationPart:internationPart_ }, } Server.call("root/customer/batchCommitByAccountCustomer", param_submit, function(result1) { console.log(result1); me.loading_submit = false; me.submitreason_dialog = false; if (result1.success) { Root.message({ type: 'success', message: 'æäº¤æˆåŠŸ' }); //首次商业开户日志 me.saveAfter(); } else if (result1.message) { Root.message({ type: 'error', message: result1.message }); } }, function(result1) { console.log(result1); me.loading_submit = false; me.submitreason_dialog = false; if (result1.message) { Root.message({ type: 'error', message: result1.message }); } }); } else { Root.message({ type: 'success', message: 'ä¿å˜æˆåŠŸ' }); me.saveAfter(); } } }, function(result1) { console.log(result1); me.loading_save = false; me.loading_submit = false; me.issubmit = false; me.submitreason_dialog = false; if (result1.message) { Root.message({ type: 'error', message: result1.message }); } }) }, row_act() { let me = this; me.do_act(businessId_, "exists", me.dataname, key, function(result1){ let paramObj = {}; for (var k in me.selectedrow) { paramObj[k] = me.selectedrow[k]; } paramObj[field_] = new_val; paramObj.flow_id = result1.data.activitiId; let param = paramObj; param.isClientMode = false; param.dataname = me.dataname; Server.call("root/data/updateEntity/"+ param.dataname, param, function(result) { console.log(result); Root.message({ type: 'success', message: success_val }); me.onQuery(); }); }); }, do_act(businessId_, businessType, dataname, key, callback) { let me = this; var param_act = { isClientMode: false, businessId: businessId_,// row.id, businessType: businessType, } Server.call("rootact/act/start/"+ key, param_act, function(result1) { console.log(result1); if(callback) { callback(result1); } }); }, saveAfter(logcode) { var me = this; if (logcode) { var logtype = "";//日志类型 var operatelogdataobj = {//æ—¥å¿—å¤´ä¿¡æ¯ businessid: me.selectRole.id, businessname: me.selectRole.name, dataname: "sysRoleMapping", operateremark: "æ·»åŠ è§’è‰²å…³è”商业" }; var fieldobjlist = [];//日志详情 /* var l_ = { type: "add", field: "business_id", fieldname: "角色关è”商业", currentdata: p.business_id } */ var isclose = true;//是å¦å…³é—Tab或弹窗 if (logcode == "syxx") {//å•†ä¸šä¿¡æ¯ logtype = "customerCreate"; operatelogdataobj = {//æ—¥å¿—å¤´ä¿¡æ¯ businessid: me.formData.id, businessname: me.formData.uscc, dataname: "agCustomer", operateremark: "商业信æ¯è°ƒæ•´" }; var isArray = false; var dataFields = me.formFields; var old_data = clone(me.old_data_syxx); var new_data = clone(me.formData); fieldobjlist = me.getDataDifference(dataFields, old_data, new_data, isArray); } else if (logcode == "fhzt") {//å‘货主体 logtype = "customerDelivery"; var row = clone(this.selectrow); if(row.id) { operatelogdataobj = {//æ—¥å¿—å¤´ä¿¡æ¯ businessid: row.id, businessname: row.delivery_part_name + me.formData.uscc, dataname: "agCustomerDelivery", operateremark: "å‘货主体调整" }; var isArray = false; var dataFields = me.tableFields_part; var old_data = {}; if (row.old_id && me.tableDataOldObj[row.old_id]) {//idå˜äº†ï¼Œå˜æ›´æ”¹å˜ old_data = clone(me.tableDataOldObj[row.old_id]); } if (me.tableData2_thisoldobj[row.id]) {//id没å˜ï¼Œæ•°æ®æ”¹å˜ï¼Œæµç¨‹ä¸çš„调整 old_data = clone(me.tableData2_thisoldobj[row.id]); } var new_data = clone(row); fieldobjlist = me.getDataDifference(dataFields, old_data, new_data, isArray); } else { this.doSaveAfter(); } } else if (logcode == "zzxx") {//èµ„è´¨ä¿¡æ¯ logtype = "customerDeliveryCertification"; } me.setlog(logtype, operatelogdataobj, fieldobjlist, isclose) } else { this.doSaveAfter(); } }, setlog(logtype, operatelogdataobj, fieldobjlist, isclose) { var me = this; me.addlog(logtype, operatelogdataobj, fieldobjlist, function(){ if (isclose) { me.saveAfter(); } }); }, doSaveAfter() { var me = this; if(this.popupParames.callback) { let obj = { //row: this.formData } this.popupParames.callback(obj, function() { if (me.popupParames.totab){ Root.tab.removeItem(Root.tab.selected); Root.tab.open(me.popupParames.parentOption, false); } else { Root.hidePopup(); } }); } else { alert("该按键事件缺失ï¼") } }, saveTables2() { if (!this.formData.manager_part_name || !this.formData.delivery_part_code || !this.formData.customer_name || !this.formData.customer_consignee_address || !this.formData.customer_consignee_user_name || !this.formData.customer_consignee_phone) { Root.message({ type: 'warning', message: '请填写必填项' }); return; } var array_ = []; for (var i = 0;i< this.tableData2.length;i++) { var row = this.tableData2[i]; var row_ = {}; var sales_type_ = ""; row_.id = row.id ? row.id : ""; row_.count = row.standrad_cnt; //ä»¶æ•° if(row.sales_type == "æ£å¸¸é”€å”®"){ sales_type_ = "1" }else if(row.sales_type == "æ ·å“销售"){ sales_type_ = "2" }else{ sales_type_ = "3" } row_.rebateAmt = row.rebate_amt; row_.salesType = sales_type_; //销售类型。。æ£å¸¸é”€å”® row_.taxRate = row.tax_rate; //税率 row_.agreementRecordId = row.agreement_record_id?row.agreement_record_id:""; //åè®®id row.agreementRecordId row_.remark = row.remark; if(row_.agreementRecordId != ""){ array_.push(row_); } } let param = { isClientMode: false, id: this.formData.id ? this.formData.id : "", customerId: this.formData.customer_id, bizDate: this.formData.biz_date, settleType:this.formData.settle_type, salesBusinessType: this.formData.sales_business_type == "分期收款" || this.formData.sales_business_type == "1"?"1":"2", agreementRecordId: this.formData.agreementRecordId ? this.formData.agreementRecordId:"",//this.formData.agreementRecordId, //åè®®id contractNo :this.formData.contract_no ? this.formData.contract_no:"", contractFileId :this.formData.ids || "", subSalesOrderList: array_, customerConsignee: { //æ”¶è´§ä¿¡æ¯ id: this.formData.addressid?this.formData.addressid:"",//this.formData.addressid, userName: this.formData.customer_consignee_user_name, address: this.formData.customer_consignee_address? this.formData.customer_consignee_address:"", phone: this.formData.customer_consignee_phone }, } let me = this; /* Server.call("root/order/saveSalesOrder", param, function(result) { console.log(result); if(result.success){ if(me.formData.continueCommit){ let param_ = { orderId:result.data.id, eventType:"commit", dataType:"sales", isClientMode: false, } Server.call("root/order/onEvent", param_, function(result_) { console.log(result_); if (result_.success){ Root.message({ type: 'success', message: 'æäº¤æˆåŠŸ' }); }else{ Root.confirm(result_.data.message + ',确定直接æäº¤å—?', 'æç¤º', { confirmButtonText: "æäº¤", cancelButtonText: 'å–æ¶ˆ', type: 'warning' }).then(() => { let param = { orderId:result.data.id, eventType:"commit", dataType:"sales", isClientMode: false, extra:{ mandatory:true }, } Server.call("root/order/onEvent", param, function(result) { console.log(result); if (result.success){ Root.message({ type: 'success', message: 'æäº¤æˆåŠŸ' }); Root.tab.removeItem(Root.tab.selected); Root.tab.open(me.popupParames.parentOption, true); }else{ Root.message({ type: 'warning', message: 'æäº¤å¤±è´¥' }); } }); }).catch(() => { Root.message({ type: 'info', message: '已喿¶ˆ' }); }); } }); } else{ Root.message({ type: 'success', message: 'ä¿å˜æˆåŠŸ' }); Root.tab.removeItem(Root.tab.selected); Root.tab.open(me.popupParames.parentOption, true); } } else{ Root.message({ type: 'warning', message: result.message }); } }); */ }, showCredit(code, row) { let me = this; if (me.formData.customername) { Root.popupParames = { url: "../tool/credit_status.html", }; Root.showPopup(Root.popupParames); } else { Root.message({ type: 'warning', message: '请先选择客户' }); } }, rowChange(row, type) { //tc /* var id_ = row.id; if (this.tableDataChange[id_]) { this.tableDataChange[id_].data = row; } else { var changeRow_ = { type: type, data: row }; this.tableDataChange[id_] = changeRow_; } */ //t2 if (type == "add") { this.tableData2.unshift(row); this.selectrow = {}; } else if (type == "del") { this.tableData2.remove(this.selectrow); } else if (type == "edit") { this.tableData2.remove(this.selectrow); this.selectrow = {}; this.tableData2.unshift(row); if (this.isapprovaledit) { this.selectrow = clone(row); this.saveRowTable(); } } /* var sum_noRate_ = 0 ; var available_amt = 0 ; var formData_ = clone(this.formData); this.tableData2.map(e=>{ sum_noRate_ += (e.product_amt || 0 ) * 1; available_amt += (e.rebate_amt || 0) * 1 }) formData_.available_amt = available_amt; formData_.amt = sum_noRate_; this.formData = formData_; */ /* this.isRefresh = false; this.$nextTick(function(){ */ this.isRefresh = true; //}) }, addTableData() { if (!this.formData.uscc) { Root.message({ type: 'warning', message: '请先设置统一社会信用代ç ' }); return } this.operation_type = "add"; var tableFields_part_ = clone(this.tableFields_part); tableFields_part_.map(e=>{ if(e.field == "delivery_part_code") { e.disabled = false; } }) this.tableFields_part = tableFields_part_; this.part_dialog = true; this.formData_part = { customer_uscc: this.formData.uscc, create_operate_name: localStorage.getItem("emp_name"), create_operate_code: localStorage.getItem("emp_code"), create_operate_id: localStorage.getItem("emp_id") }; if (this.acctObj.id) { this.formData_part.customer_id = this.acctObj.id; } /* if (this.selectrow != {}) { this.selectrow.isWithinEdit = false; } var id_ = uuid_short(); var tax_rate_ = "13"; var sales_type_ = "æ£å¸¸é”€å”®"; var row_ = { isWithinEdit: true, id: id_, tax_rate:tax_rate_, sales_type:sales_type_, }; for (var i = 0; i < this.tableFields.length; i++) { let field_ = this.tableFields[i].field; if (field_ == "parent_id") { row_[field_] = this.formData.id; } else if (field_ == "sales_type") { row_[field_] = "æ£å¸¸é”€å”®"; } else if (field_ == "tax_rate") { row_[field_] = "13"; } else { row_[field_]=""; } } this.selectrow = row_; this.rowChange(row_, "add"); */ }, editTableData() { this.operation_type = "edit"; var row = clone(this.selectrow); if (!row.customer_uscc) { Root.message({ type: 'warning', message: '请先选ä¸ä¸€æ¡æ•°æ®' }); return } if (row.status == "working") { Root.message({ type: 'warning', message: 'æ¤æ•°æ®æ£åœ¨å®¡æ‰¹ä¸' }); return } if (row.status == "open") { Root.message({ type: 'warning', message: 'æ¤æ•°æ®å·²å®¡æ‰¹é€šè¿‡' }); return } this.formData_part = row; this.part_dialog = true; }, editTableDataByAct() { this.operation_type = "edit"; var row = clone(this.selectrow); if (!row.customer_uscc) { Root.message({ type: 'warning', message: '请先选ä¸ä¸€æ¡æ•°æ®' }); return } var tableFields_part_ = clone(this.tableFields_part); tableFields_part_.map(e=>{ if(e.field == "delivery_part_code") { e.disabled = true; } }) this.tableFields_part = tableFields_part_; this.formData_part = row; this.part_dialog = true; }, notActiveTableData() { var me = this; var row = clone(this.selectrow); /* if (!row.id) { Root.message({ type: 'warning', message: '请先选ä¸ä¸€æ¡æ•°æ®' }); return } else */ if(!row.id && row.delivery_part_code) { Root.confirm('ç¡®å®šåˆ é™¤-' + row.delivery_part_code + '-å—?', 'åˆ é™¤æç¤º', { confirmButtonText: 'åˆ é™¤', cancelButtonText: 'å–æ¶ˆ', type: 'warning' }).then(() => { me.rowChange(row, "del"); Root.message({ type: 'success', message: 'åˆ é™¤æˆåŠŸ!' }); }).catch(() => { Root.message({ type: 'info', message: '已喿¶ˆåˆ 除' }); }); } else if(!row.id) { me.rowChange(row, "del"); } else {//有id Root.confirm('ç¡®å®šåˆ é™¤-' + row.delivery_part_code + '-å—?', 'åˆ é™¤æç¤º', { confirmButtonText: 'åˆ é™¤', cancelButtonText: 'å–æ¶ˆ', type: 'warning' }).then(() => { let param_table = { isClientMode: false, dataname: "agCustomerDelivery", id: row.id } Server.call("root/data/deleteEntity", param_table, function(result) { console.log(result); me.rowChange(row, "del") Root.message({ type: 'success', message: 'åˆ é™¤æˆåŠŸ!' }); }); }).catch(() => { Root.message({ type: 'info', message: '已喿¶ˆåˆ 除' }); }); } }, saveFormPart() { var me = this; var checkResults = this.$refs.form12.checkForm(); if (!checkResults) { return } /* if (!this.formData_part.remark) { Root.message({ type: 'warning', message: 'è¯·å¡«å†™å¤‡æ¡ˆåŽŸå› ' }); } */ var type = "add"; if (this.formData_part.id || this.operation_type == "edit") { type = "edit"; } else { } //æ ¡éªŒä¸€æ¡åœ¨ä¸åœ¨æ•°ç»„ä¸ï¼› this.checkDataByRow(this.tableData2, this.formData_part, type, function() { me.rowChange(clone(me.formData_part), type); var tableFields_part_ = clone(me.tableFields_part); tableFields_part_.map(e=>{ if(e.field == "delivery_part_code") { e.disabled = false; } }) me.tableFields_part = tableFields_part_; me.part_dialog = false; }, function() { Root.message({ type: 'warning', message: 'å·²å˜åœ¨ç›¸åŒæ•°æ®' }); return }); }, checkDataByRow(array, row, type, callback, errorcallback) { var me = this; var bo_ = false;//ä¸å˜åœ¨é‡å¤ this.checkfFields; var row_txt = ""; this.checkfFields.map(k=>{ row_txt += row[k]; }); if (type == "add") { //看array䏿˜¯å¦å˜åœ¨row array.map(a=>{ var a_row = a; var a_row_txt = ""; this.checkfFields.map(k=>{ a_row_txt += a_row[k]; }); if (a_row_txt == row_txt) { bo_ = true; } }); } else if (type == "edit") { //看arrayä¸é™¤selectrow外䏿˜¯å¦å˜åœ¨row array.map(a=>{ if (a.id == me.selectrow.id) {} else { var a_row = a; var a_row_txt = ""; this.checkfFields.map(k=>{ a_row_txt += a_row[k]; }); if (a_row_txt == row_txt) { bo_ = true; } } }); } if(bo_) { errorcallback(); } else { callback(); } }, checkDataByArray(array, callback, errorcallback) { var me = this; var bo_ = false;//ä¸å˜åœ¨é‡å¤ var array_txt_obj = {}; //看array䏿˜¯å¦å˜åœ¨é‡å¤æ•°æ® array.map(a=>{ var a_row = a; var a_row_txt = ""; this.checkfFields.map(k=>{ a_row_txt += a_row[k]; }); if (array_txt_obj[a_row_txt]) { bo_ = true; } else { array_txt_obj[a_row_txt] = a; } }); if(bo_) { errorcallback(); } else { callback(); } }, rowClick(obj) { this.isrowinput = false; //if (this.selectrow != {}) { // this.selectrow.isWithinEdit = false; //} var row = this.selectrow = obj.row; //obj.row.isWithinEdit = obj.row.isWithinEdit ? false : true; if (!this.selectrow.id || (this.selectrow.id && (this.selectrow.status == "input" || this.selectrow.status == "refuse")) || !this.selectrow.status) { this.isrowinput = true; } // if (row.status == "working") { // Root.message({ // type: 'warning', // message: 'æ¤æ•°æ®æ£åœ¨å®¡æ‰¹ä¸' // }); // return // } // if (row.status == "open") { // Root.message({ // type: 'warning', // message: 'æ¤æ•°æ®å·²å®¡æ‰¹é€šè¿‡' // }); // return // } }, onCellClick(config, obj) { var clickContext = this.selectCellField.clickContext; var row_ = obj.row; if(this.selectCellField.field == "file_name") { if (!obj.row.file_id) { Root.message({ type: 'warning', message: '没有附件文件' }); return } //////////// let fileid = clone(obj.row.file_id); let fileName = clone(obj.row.file_name); let index1 = fileName.lastIndexOf("."); let index2 = fileName.length; let suffix = fileName.substring(index1, index2).toLowerCase(); //åŽç¼€å if (suffix == ".png" || suffix == ".jpg") { var fileids_ = []; fileids_.push(fileid) row_ = { filetype: "img", fileids: fileids_ }; clickContext.url = "../tool/popup_file.html"; } else if (suffix == ".pdf") { var row = { fileid: fileid, filename: fileName } var config = { totab: true, icon: "icon-product", text: "附件预览", id: "pdf_" + fileid, url: "../tool/popup_file_pdf.html", data: row, delta: {}, callback: function(obj, callback) { if (callback) { callback(); } } }; this.doPopupByPublic(config); return false; } else {//åªå¯ä¸‹è½½ï¼Œä¸å¯é¢„览 handleDownload(fileid); } ///////// } if(this.selectCellField.field == "status" && obj.row.flow_id){ // clickContext.url = ""; // if(obj.row.status && obj.row.status != 'input' && obj.row.flow_id){ // clickContext.url = window.top.RootSetting.url_act + "act/diagram/" + obj.row.flow_id; // } clickContext.url = "../approval/ApprovalList.html"; clickContext.delta = { flow_id: obj.row.flow_id, title: obj.row.delivery_part_name } clickContext.width = "75vw"; clickContext.height = "65vh"; clickContext.hide_close = true; } if (clickContext && clickContext.type == "popup" && clickContext.url) { config.combine({ hide_close: clickContext.hide_close, url: clickContext.url, sceneCode: clickContext.sceneCode, data: row_, delta: clickContext.delta ? clickContext.delta : {}, width: clickContext.width, }) } else { return false; } return true; }, /* cellClick(scope) {//status let me = this; let row = scope.row; let field = scope.column.property; var text_ = this.formData.md_description + row.delivery_part_code; var id_ = "licence" + row.id; if (field == "licence"){ //this.getFormData(row); var config = { totab: true, width: "1500px", icon: "icon-product", text: text_, id: id_, url: "../md/customer/customer_licence.html", data: row, delta: this.formData, callback: function(obj, callback) { //me.uploadFileAfter(obj); if (callback) { callback(); } } }; this.doPopupByPublic(config); } }, */ Getfilter(filter_,filter){ let me = this; //管ç†ä¸»ä½“åç§° if (me.formData.manager_part_name) { var filter1 = "" if(me.formData.manager_part_name == "otc" || me.formData.manager_part_name == "OTC"){ filter1 = "OTC" }else{ filter1 = "处方è¯" } filter_ += " and agreementRecord.manager_part_name = '"+filter1+"'" } //å‘货主体 if (me.formData.delivery_part_name && filter != "delivery_part_name") { filter_ += " and agreementRecord.delivery_part_name = '"+ me.formData.delivery_part_name +"'" } //客户åç§° if (me.formData.customer_id && filter != "customer_name") { filter_ += " and agreementRecord.customer_id = '"+ me.formData.customer_id +"'" } //区域 if (me.formData.province_name && filter != "province_name") { filter_ += " and agreementRecord.province_name = '"+ me.formData.province_name +"'" } //业务部门 if (me.formData.business_depart_name && filter != "business_depart_name") { filter_ += " and agreementRecord.business_depart_name = '"+ me.formData.business_depart_name +"'" } if (me.formData.business_type ) { filter_ += " and agreementRecord.business_type = '"+ me.formData.business_type +"'" } return filter_ }, saveForm_approval() { var me = this; let params = clone(this.formData); me.dosaveForm_approval(params); }, dosaveForm_approval(params) { var me = this; /* if (!params.old_id && me.formData.status && ) { params.old_id = this.acctObj.id; } else { params.strict = false; } */ params.strict = false; if (!params.uscc) { Root.message({ type: 'warning', message: '请先设置统一社会信用代ç ' }); return } //è¯ç…§ var licenceList_ = []; for (var k in me.file_zs) { if (me.file_zs[k].file_id) { if(me.file_zs[k].customer_id && me.file_zs[k].customer_id != me.formData.id) { me.file_zs[k].old_id = clone(me.file_zs[k].id); me.file_zs[k].id = null; me.file_zs[k].create_time = null; } licenceList_.push(me.file_zs[k]); } } if (licenceList_.length) { params.licence_list = licenceList_; }else { params.licence_list = null; } //return //开票 var formData_kp_notnull = false; for (var kp_ in me.formData_kp) { if (kp_ == "customer_id" && me.formData_kp.customer_id != me.formData.id) { me.formData_kp.old_id = clone(me.formData_kp.id); me.formData_kp.id = null; me.formData_kp.create_time = null; } formData_kp_notnull = true; } if (formData_kp_notnull) { if(!me.formData_kp.customer_uscc) { me.formData_kp.customer_uscc = this.formData.uscc; } if(this.formData.id && !me.formData_kp.customer_id) { me.formData_kp.customer_id = this.formData.id; } params.invoice = me.formData_kp; }else { params.invoice = null; } params.dataName = "agCustomer"; params.type = "update"; params.isClientMode = false; Server.call("root/customer/saveCustomer", params, function(result) { console.log(result); me.formData.id = result.data.id; var result_ = result; if (result && result.success) { me.textarea2 = ""; me.reasonvisible = true; me.reasonvisible_flowid = me.acctObj.flow_id; me.passOrRefuse = true; me.type_act = "accountCustomerDelivery"; } }, function(result1) { console.log(result1); if (result1.message) { Root.message({ type: 'error', message: result1.message }); } }) }, onreturnApproval() { this.returnApproval(this.acctObj.flow_id); }, onpassApproval(){ var bo = true; this.textarea2 = ""; this.reasonvisible = true; this.passOrRefuse = true; this.type_act = "deliveryFreeze"; }, onrefuseApproval(){ this.canceltype = "customer_delivery"; this.textarea2 = ""; this.reasonvisible = true; this.passOrRefuse = false; this.type_act = "deliveryFreeze"; }, onrefuseApproval(){ this.textarea2 = ""; this.reasonvisible = true; this.reasonvisible_flowid = this.acctObj.flow_id; this.passOrRefuse = false; this.type_act = "accountCustomerDelivery"; }, saveReason() { var me = this; var actpassword_ = localStorage.getItem("actpassword"); if (actpassword_) { var config = { text: "æµç¨‹éªŒè¯", url: "../tool/popup_actpassword.html", callback: function(obj, callback) { me.dosaveReason(); if (callback) { callback(); } } }; this.doPopupByPublic(config); } else { this.dosaveReason(); } }, dosaveReason(){ this.loading_approval = true; if(this.passOrRefuse){ this.passApproval(true,this.textarea2) }else{ if(this.textarea2 != ""){ this.passApproval(false,this.textarea2) } else{ Root.message({ type: 'warning', message: 'è¯·å¡«å†™åŽŸå› ' }); this.loading_approval = false; } } }, //审批 passApproval(pass_, reason_) { let me = this; if(reason_) { //åŽ»é™¤ä¸¤ç«¯çš„ç©ºæ ¼ reason_ = reason_.replace(/(^\s*)|(\s*$)/g, ""); //去除ä¸é—´çš„回车æ¢è¡Œ reason_ = reason_.replace(/[\r\n]/g,""); } var variable_map_ = { reason: reason_ } var deliveryObj_ = clone(this.formData); if (deliveryObj_.freeze) {//冻结 variable_map_ = { reason: reason_, stict: false, id: me.formData.id, recordProvince: me.formData.record_province, partType: me.freeze_type, businessType: me.formData.business_type, customerPartCode: me.formData.customer_part_code, operateCode: me.formData.business_operate_code, } } else {//激活 variable_map_ = { reason: reason_, stict: false, id: me.formData.id, recordProvince: me.formData.record_province, partType: me.freeze_type, businessType: me.formData.business_type, customerPartCode: me.formData.customer_part_code, operateCode: me.formData.business_operate_code, } } if (this.attachment) { variable_map_.attachment = this.attachment; } let param = { flow_id: this.formData.flow_id, pass: pass_, variable_map: variable_map_, business_type: this.type_act,//business_type: "accountCustomerDelivery" isClientMode: false } Server.call("root/api/dealAct", param, function(result) { console.log(result); me.loading_approval = false; if (result.success){ if (me.canceltype == "customer_delivery") { //me.formData; //me.selectrow; me.cancelAfter(function() { Root.message({ type: 'success', message: '审批æˆåŠŸ' }); if(me.fromDing) { me.dingResult = true; me.dingResultTxt = "审批æˆåŠŸ" } me.saveAfter(); }); } else { Root.message({ type: 'success', message: '审批æˆåŠŸ' }); if(me.fromDing) { me.dingResult = true; me.dingResultTxt = "审批æˆåŠŸ" return; } me.saveAfter(); } } else { Root.message({ type: 'warning', message: '审批失败' }); if(me.fromDing) { me.dingResult = true; me.dingResultTxt = "审批失败" return; } me.saveAfter(); } }); }, passApproval222(pass_, reason_) { let me = this; if(reason_) { //åŽ»é™¤ä¸¤ç«¯çš„ç©ºæ ¼ reason_ = reason_.replace(/(^\s*)|(\s*$)/g, ""); //去除ä¸é—´çš„回车æ¢è¡Œ reason_ = reason_.replace(/[\r\n]/g,""); } var variable_map_ = { reason: reason_ } var deliveryObj_ = clone(this.tableData2[0]); var operateCode_ = me.formData.operator_code; if (this.acctObj.part_type && this.acctObj.part_type != "") { operateCode_ = me.acctObj.business_operate_code; } if (deliveryObj_.freeze) { if(deliveryObj_.part_type === null || deliveryObj_.part_type === undefined) { deliveryObj_.part_type = "" } variable_map_ = { reason: reason_, stict: false, province: me.formData.record_province, partType: deliveryObj_.part_type, businessType: deliveryObj_.business_type, customerPartCode: deliveryObj_.customer_part_code, operateCode: operateCode_ } } else { if(deliveryObj_.part_type === null || deliveryObj_.part_type === undefined) { deliveryObj_.part_type = "" } variable_map_ = { reason: reason_, stict: false, province: me.formData.record_province, partType: deliveryObj_.part_type, businessType: deliveryObj_.business_type, customerPartCode: deliveryObj_.customer_part_code, operateCode: operateCode_ } } if (this.attachment) { variable_map_.attachment = this.attachment; } var internationPart_ = false; if (me.formData.apply_dep_code && me.formData.apply_dep_code == "202105180005") { internationPart_ = true; } variable_map_.internationPart = internationPart_ //return let param = { flow_id: this.reasonvisible_flowid, pass: pass_, variable_map: variable_map_, business_type: this.type_act,//business_type: "accountCustomerDelivery" isClientMode: false, } Server.call("root/api/dealAct", param, function(result) { console.log(result); me.loading_approval = false; if (result.success){ if (me.canceltype == "customer_delivery") { //me.formData; //me.selectrow; me.cancelAfter(function() { Root.message({ type: 'success', message: '审批æˆåŠŸ' }); if(me.fromDing) { me.dingResult = true; me.dingResultTxt = "审批æˆåŠŸ" } me.saveAfter(); }); } else { Root.message({ type: 'success', message: '审批æˆåŠŸ' }); if(me.fromDing) { me.dingResult = true; me.dingResultTxt = "审批æˆåŠŸ" return; } me.saveAfter(); } } else { Root.message({ type: 'warning', message: '审批失败' }); if(me.fromDing) { me.dingResult = true; me.dingResultTxt = "审批失败" return; } me.saveAfter(); } }); }, //å®¡æ‰¹æ‹’ç» /* refuseApproval(dataType_,reason_) { let me = this; var row = this.selectedrow; var id = ""; if(dataType_ == "deliver"){ id = this.formData.deo_id } else{ id = this.formData.id } let param = { orderId:id, eventType:"approvalFail", dataType:dataType_, extra:{ variableMap:{ reason:reason_} }, isClientMode: false, } Server.call("root/order/onEvent", param, function(result) { console.log(result); Root.message({ type: 'success', message: 'æ‹’ç»å®¡æ‰¹æˆåŠŸ' }); this.reasonvisible = false; Root.tab.removeItem(Root.tab.selected); Root.tab.open(me.popupParames.parentOption, true); }); }, */ cancelAfter(callback) { var me = this; if (me.canceltype == "customer_delivery") {//å‘货主体冻结/激活撤销 var param_ = { isClientMode: false, id: me.formData.id, dataname: "agCustomerDelivery", used: 0, active: 0 } Server.call("root/data/updateEntity", param_, function(result) { console.log(result); if (result && result.success) { if (me.formData.old_id) {//å˜åœ¨old_id var param_o = { isClientMode: false, id: me.formData.old_id, dataname: "agCustomerDelivery", used: 1, active: 1 } Server.call("root/data/updateEntity", param_o, function(result) { console.log(result); if (result && result.success) { if (callback) { callback(); } } }); } else { if (callback) { callback(); } } } }); } }, checkCustomerAndDelivery(){ if (this.formData.delivery_part_name && this.formData.delivery_part_name != "" && this.formData.customer_name && this.formData.customer_name != "") { let me = this; let param_ = { isClientMode: false, dataname: "deliveryType", code:this.formData.delivery_part_code, } Server.call("root/data/getEntity", param_, function(result) { if (result.data.entity.sap) { let param_sap = { isClientMode: false, customerId:me.formData.customer_id } Server.call("root/order/checkCustomerLicence", param_sap, function(result) { if(result.success){ Root.message({ type: 'warning', message: result.data.data.message }); //me.reason1 = result.data.data.message; } }); } else{ //U8é¢„ç•™æŽ¥å£ let url = window.top.RootSetting.url_stock + "order/checkLicence/" + me.formData.customer_id; axios.get(url, { }) .then(data => {   console.log(data); if (data.data.success){ Root.message({ type: 'warning', message: data.data.data.message }); }else{ Root.message({ type: 'warning', message: data.data.data.message }); } }) .catch( (error) => { console.log(error); }); } }); } }, onshowFilterPopup(filter) { var me = this; var fieldObj_ = filter.obj; var formData_part_ = clone(me.formData_part); var field_ = fieldObj_.field; if (field_ == "business_operate_name") { Root.showPopup({ url: "../md/customer/popup/employee_list.html", delta: { isvemployeeall: false }, width: 800, height: 550, callback: function(result, callback) { formData_part_[field_] = result.row.md_description; formData_part_.business_operate_code = result.row.md_code; formData_part_.business_operate_id = result.row.id; me.formData_part = formData_part_; if (callback) { callback(); } } }); } }, showPopup(filter) {//tableFields_baObj var me = this; var fieldObj_ = filter.obj; var formData_part_ = clone(me.formData); var field_ = fieldObj_.field; if (field_ == "business_operate_name") { Root.showPopup({ url: "../md/customer/popup/employee_list.html", delta: { isvemployeeall: true }, width: 800, height: 550, callback: function(result, callback) { formData_part_[field_] = result.row.md_description; formData_part_.business_operate_code = result.row.md_code; formData_part_.business_operate_id = result.row.id; me.formData = formData_part_; if (callback) { callback(); } } }); } }, buttonClick(obj) { if (obj.obj.field == "uscc") { this.onPopupByUploadFile("ZGL01", true, "zz"); } else if (obj.obj.field == "file_name") { this.onPopupByUploadFile(null, null, "syxxfj");//商业信æ¯ç¦é™„ä»¶ } }, formcallspanClick(obj) { if (obj.obj.field == "file_name" && this.formData.file_id) { this.onDownloadFileByFileId(this.formData.file_id); } }, buttonClick_part(obj) { this.onPopupByUploadFile(null, null, "fhztfj");//å‘货主体附件 }, cellVisibleChange(obj) { let options_ = []; if (obj.field == "country") { let param_ = { isClientMode: false, filter: " level='0' and active='1'", } Server.call("root/data/getEntitySet/division_level0", param_, function(result){ options_ = result.data.entityset; obj.options = options_; }); } else if (obj.field == "province") { if (obj.selectparent) { if(!this.formData[obj.selectparent]) { obj.options = [] } else { var code_ = this.formData[obj.selectparent]; let param_ = { isClientMode: false, filter: " level='1' and active='1' and EXISTS( SELECT * from md_division p where code='" + code_ + "' and md_division.parent_id = p.id)", } Server.call("root/data/getEntitySet/division_level1", param_, function(result){ options_ = result.data.entityset; obj.options = options_; }); } } } else if (obj.field == "city") { if (obj.selectparent) { if(!this.formData[obj.selectparent]) { obj.options = [] } else { var code_ = this.formData[obj.selectparent]; let param_ = { isClientMode: false, filter: " level='2' and active='1' and EXISTS( SELECT * from md_division p where code='" + code_ + "' and md_division.parent_id = p.id)", } Server.call("root/data/getEntitySet/division_level2", param_, function(result){ options_ = result.data.entityset; obj.options = options_; }); } } } else if (obj.field == "county") { if (obj.selectparent) { if(!this.formData[obj.selectparent]) { obj.options = [] } else { var code_ = this.formData[obj.selectparent]; let param_ = { isClientMode: false, filter: " level='3' and active='1' and EXISTS( SELECT * from md_division p where code='" + code_ + "' and md_division.parent_id = p.id)", } Server.call("root/data/getEntitySet/division_level3", param_, function(result){ options_ = result.data.entityset; obj.options = options_; }); } } } }, selectchange(obj){ /* this.tableFields_new let field = obj.fieldobj.field; let row = obj.data; if (field == "address") { let val = row[field]; let name_ = ""; let length_ = val.length; if (length_ > 0) { id_ = val[length_ - 1]; name_ = this.tableFields_new[id_].field2 } this.formData.field6 = name_; } */ }, onformChange(obj) { var me = this; var formField_ = obj.fieldobj; if (formField_.field == "uscc" && this.formData.uscc) { let uscc_val = this.formData.uscc; me.doCheckUscc(uscc_val); } /* if (formField_.field == "md_description" || formField_.field == "record_province") { Root.confirm('更改商业å称或备案çœä»½æäº¤åŽå°†å†»ç»“其所有备案数æ®', '冻结æç¤º', { confirmButtonText: 'ç»§ç»æ›´æ”¹', cancelButtonText: 'å–æ¶ˆæ›´æ”¹', type: 'warning' }).then(() => { //ç»§ç»æäº¤ }).catch(() => { //å–æ¶ˆæ›´æ”¹ï¼ŒåŽèŽ·å–之å‰çš„æ•°æ®å¹¶æ›´æ”¹æœ¬æ¬¡çš„æ•°æ® }); } */ }, onformSelectChange(obj) { var me = this; var formField_ = obj.fieldobj; if (formField_.field == "province" && !this.formData.record_province) { this.formData.record_province = clone(this.formData.province) } }, doCheckUscc(uscc_val) { var me = this; var filter_ = "uscc='" + uscc_val + "'"; if (this.formData.id) { filter_ += " and id <> '" + this.formData.id + "'"; } var param_ = { isClientMode: false, dataname: "accountCustomer", filter: filter_, } Server.call("root/data/getEntitySet", param_, function(result) { console.log(result); if (result && result.data) { var data_ = result.data.entityset; if (data_.length == 0) { me.getMDMByUscc(uscc_val); } else { Root.confirm('å·²å˜åœ¨' + uscc_val , 'æç¤º', { confirmButtonText: 'å–æ¶ˆæœ¬æ¬¡æ“作', cancelButtonText: 'å–æ¶ˆ', type: 'warning' }).then(() => { me.closeDialog(); }).catch(() => { me.formData.uscc = ""; }); } } }); }, getMDMByUscc(uscc_val) { var me = this; var filter_ = "c.uscc= '" + uscc_val + "'"; if (this.formData.id) { filter_ = "c.uscc= '" + uscc_val + "' and c.id <>'" + this.formData.id + "'"; } let param_table = { isClientMode: false, dataname: "getUnOpenCustomer", returnType: "entityset", filter: filter_ } Server.call("root/data/procedure", param_table, function(result) { console.log(result); if (result.data.entityset && result.data.entityset.length > 0) { var row_ = result.data.entityset[0]; Root.message({ type: 'warning', message: row_.create_operate_name + '已创建该商业' }); me.formData.uscc = ""; } else { let param_mdm = { isClientMode: false, } Server.call("mdm/check/uscc/" + uscc_val, param_mdm, function(result) { console.log(result); if (result.success) { var row = result.data; Root.confirm('MDMä¸å·²å˜åœ¨ï¼Œæ˜¯å¦å¼€æˆ·' + row.md_description + '?', '开户æç¤º', { confirmButtonText: '使用MDMæ•°æ®è¦†ç›–开户信æ¯', cancelButtonText: 'å–æ¶ˆ',//'釿–°è¾“入统一信用代ç ', type: 'warning' }).then(() => { if(row.record_province) { row.record_province = me.dataRequestObj.map.mdm_province_mapping[row.record_province] } me.setKHDataByMDM(row); }).catch(() => { me.formData.uscc = ""; }); } }, function(error) { console.log(error); /* if(!error.success && error.message) { Root.message({ type: 'error', message: error.message }); } */ }); } }) }, showFileImgByFileId(file_id, file_name) { this.zzimg = {}; this.zzimgList = []; this.file_txt = false; if(file_id) { var fileid = file_id; let fileName = clone(file_name); let index1 = fileName.lastIndexOf("."); let index2 = fileName.length; let suffix = fileName.substring(index1, index2).toLowerCase(); //åŽç¼€å if (suffix == ".png" || suffix == ".jpg") { var zzimg_ = { id: fileid, url: getDownloadFileUrl(fileid) } this.zzimgList.push(zzimg_.url); this.zzimg = zzimg_; this.file_img = true; } else if (suffix == ".pdf") { var row = { fileid: fileid, filename: fileName } var config = { totab: true, icon: "icon-product", text: "附件预览", id: "pdf_" + fileid, url: "../tool/popup_file_pdf.html", data: row, delta: {}, callback: function(obj, callback) { if (callback) { callback(); } } }; this.doPopupByPublic(config); } else {//åªå¯ä¸‹è½½ï¼Œä¸å¯é¢„览 var zzimg_ = { id: fileid } this.zzimg = zzimg_; this.file_img = true; } // var zzimg_ = { // id: fileid, // url: getDownloadFileUrl(fileid) // } // this.zzimgList.push(zzimg_.url); // this.zzimg = zzimg_; // this.file_img = true; } }, showFileImg(type) { this.zzimg = {}; this.zzimgList = []; this.file_txt = false; if(this.file_zs[type].file_id) { var fileid = this.file_zs[type].file_id; let fileName = clone(this.file_zs[type].file_name); let index1 = fileName.lastIndexOf("."); let index2 = fileName.length; let suffix = fileName.substring(index1, index2).toLowerCase(); //åŽç¼€å if (suffix == ".png" || suffix == ".jpg") { var zzimg_ = { id: fileid, url: getDownloadFileUrl(fileid) } this.zzimgList.push(zzimg_.url); this.zzimg = zzimg_; this.file_img = true; } else if (suffix == ".pdf") { var row = { fileid: fileid, filename: fileName } var config = { totab: true, icon: "icon-product", text: "附件预览", id: "pdf_" + fileid, url: "../tool/popup_file_pdf.html", data: row, delta: {}, callback: function(obj, callback) { if (callback) { callback(); } } }; this.doPopupByPublic(config); } else {//åªå¯ä¸‹è½½ï¼Œä¸å¯é¢„览 var zzimg_ = { id: fileid } this.zzimg = zzimg_; this.file_img = true; } } }, onDownloadFileByFileId(fileid) { handleDownload(fileid); }, showFileTxt(type) { //this.file_zs[type]; var me = this; /* if(me.isapprovaledit) { me.formAttr_zz.disabled = true; } else { me.formAttr_zz.disabled = false; } */ this.file_img = false; this.file_txt = true; this.selectZZName = this.attachment_type_zzobj[type].name; this.selectZZType = type; if (!me.formAttr_zz.disabled) { this.$nextTick(() => { var aa = me.$refs.form_zzxx.checkForm(); }) } }, delFile(zz_code, type, filetypename, row) {// var me = this; Root.confirm('ç¡®å®šåˆ é™¤-' + filetypename + '-的附件å—?', 'åˆ é™¤æç¤º', { confirmButtonText: 'åˆ é™¤', cancelButtonText: 'å–æ¶ˆ', type: 'warning' }).then(() => { me.doDelFile(zz_code, type, row); }).catch(() => { Root.message({ type: 'info', message: '已喿¶ˆåˆ 除' }); }); }, doDelFile(zz_code, type, row) { row.file_id = ""; row.file_name = ""; if (type == "zz") { } else if (type == "kp") { } else if (type == "fhztfj") { } else if (type == "syxxfj") { } Root.message({ type: 'success', message: 'å·²åˆ é™¤ï¼Œä¿å˜åŽç”Ÿæ•ˆ' }); }, onPopupByUploadFile(zz_code, isupform, type) { var me = this; var analysistype_ = ""; var delta_ = {filetypelist: []}; if(zz_code == "ZGL01") { analysistype_ = "BizLicense"; delta_ = {filetypelist: [".png", ".jpg"], analysistype: analysistype_} } else if(zz_code == "ZGL03") { analysistype_ = "BizYPLicence"; delta_ = {filetypelist: [".png", ".jpg"], analysistype: analysistype_} } else if(zz_code == "ZGL06") { analysistype_ = "BizGSP"; delta_ = {filetypelist: [".png", ".jpg"], analysistype: analysistype_} } var config = { totab: false, width: "1500px", icon: "icon-product", text: "é™„ä»¶ä¸Šä¼ ", id: "popupByUploadFile", url: "../tool/popup_uploadFile.html", data: {}, delta: delta_, callback: function(obj, callback) { me.uploadFileAfter(zz_code, obj, isupform, type); // me.fileList = obj.row[0]; if (callback) { callback(); } } }; this.doPopupByPublic(config); }, doPopupByPublic(config) { if (config.totab) { if (config.url) { if (config.text.length > 4) { config.text = config.text.substr(0, 4) + "..."; } } var parames = { totab: true, url: config.url, sceneCode: config.sceneCode, data: config.data, delta: config.delta, disabled: config.disabled, disabledone: config.disabledone, operationtype: config.operationtype, parentOption: window.top.tab.selected.option }; Root.popupParames = parames; window.top.tab.open(config); } else { this.doPopup(config); } }, uploadFileAfter(zz_code, obj, isupform, type) { //this.file_zs[zz_code] = obj.id; var me = this; if (type == "zz") { this.uploadFormByZZ(zz_code, obj, isupform); } else if (type == "kp") { this.uploadFormByKP(zz_code, obj); } else if (type == "fhztfj") { this.uploadFormByfhztfj(obj); } else if (type == "syxxfj") { this.uploadFormBysyxxfj(obj); } }, uploadFormByZZ(zz_code, obj, isupform) { //this.file_zs[zz_code] = obj.id; var me = this; var licenceObj_ = {}; var file_zs_ = clone(this.file_zs); if (file_zs_[zz_code] && file_zs_[zz_code].id) { licenceObj_ = file_zs_[zz_code]; } else { file_zs_[zz_code] = {}; } var file_ = obj.row[0]; var filetxt = obj.filetxt; if((zz_code == "ZGL01" || zz_code == "ZGL03" || zz_code == "ZGL06") && !filetxt) { Root.message({ type: 'warning', message: '没有解æžåˆ°æ•°æ®' }); } else if(zz_code == "ZGL01" || zz_code == "ZGL03" || zz_code == "ZGL06") { /* if (!filetxt) { Root.message({ type: 'warning', message: '没有解æžåˆ°æ•°æ®' }); return } */ var bo_Check_ZGL01 = true; if(zz_code == "ZGL01" && (me.iscustomerchange || me.iscustomereditchange || me.isapprovaledit || me.formData.old_id)) { if (this.formData.uscc == filetxt["RegNum"]) { bo_Check_ZGL01 = false; } else { Root.message({ type: 'warning', message: "统一信用代ç 与之å‰ä¸åŒ" }); return; } } if (zz_code == "ZGL01" && (!this.formData.uscc || isupform)) { var formData_ = clone(this.formData); if(filetxt && filetxt["RegNum"]) { if (filetxt["RegNum"].length > 25) { filetxt["RegNum"] = ""; } var uscc_val = filetxt["RegNum"]; formData_.uscc = uscc_val; formData_.md_description = filetxt["Name"]; formData_.legal_rep = filetxt["Person"]; formData_.address = filetxt["Address"]; this.formData = formData_; if (bo_Check_ZGL01) { me.doCheckUscc(uscc_val); } } } if (filetxt) { for (var k in this.filetypeMappin[zz_code]) { var txt = filetxt[this.filetypeMappin[zz_code][k]]; if (!txt) { continue } if (k == "num" && txt && txt.length > 25) { txt = ""; } if (k == "licence_date") {//"SetDate": "1998å¹´11月" txt = txt.toString(); txt = txt.replace("å¹´", "-"); txt = txt.replace("月", "-"); txt = txt.replace("æ—¥", ""); if(txt && txt.search(/^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$/) == -1) { txt = "" } licenceObj_[k] = txt; } if (k == "license_term") {//"Period": "1998å¹´11月至长期" var txtList = txt.split("至"); if(txtList[0] == "年月日"){ txt = "2099-12-31"; } else { if (txtList.length > 1) { if(txtList[1].indexOf("长期") != -1){ txt = "2099-12-31"; } else { txt = txtList[1]; txt = txt.replace("å¹´", "-"); txt = txt.replace("月", "-"); txt = txt.replace("æ—¥", ""); if(txt && txt.search(/^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$/) == -1) { txt = "" } //licenceObj_[k] = txt; } } else if (txtList.length == 1) { txt = txtList[0]; if(txt.indexOf("长期") != -1){ txt = "2099-12-31"; } txt = txt.replace("å¹´", "-"); txt = txt.replace("月", "-"); txt = txt.replace("æ—¥", ""); if(txt && txt.search(/^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$/) == -1) { txt = "" } } } licenceObj_[k] = txt; } else { licenceObj_[k] = txt; } } } } var zzObj = this.attachment_type_zzobj[zz_code]; licenceObj_.type = zzObj.code; licenceObj_.type_name = zzObj.name; licenceObj_.file_id = file_.id; licenceObj_.file_name = file_.name; licenceObj_.only_attachment = zzObj.only_attachment; licenceObj_.owned_by = zzObj.owned_by; if (this.formData.id) { licenceObj_.customer_id = this.formData.id; } file_zs_[zz_code] = licenceObj_; this.file_zs = file_zs_; /* this.refresh_formzz = false; this.$nextTick(() => { me.refresh_formzz = true; }) */ }, uploadFormByKP(zz_code, obj){ var me = this; var file_ = obj.row[0]; var from_ = clone(this.formData_kp); from_[zz_code] = file_.id; if (zz_code == "prove_file_id") { from_.prove_file_name = file_.name; } else if (zz_code == "invoice_file_id") { from_.invoice_file_name = file_.name; } this.formData_kp = from_; }, uploadFormByfhztfj(obj){ var me = this; var file_ = obj.row[0]; var from_ = clone(this.formData_part); from_.file_id = file_.id; from_.file_name = file_.name; this.formData_part = from_; }, uploadFormBysyxxfj(obj){ var me = this; var file_ = obj.row[0]; var from_ = clone(this.formData); from_.file_id = file_.id; from_.file_name = file_.name; this.formData = from_; }, onPopupByUploadFileAll() { var me = this; this.attachment = ""; this.attachment_name = ""; var config = { totab: false, width: "1500px", icon: "icon-product", text: "é™„ä»¶ä¸Šä¼ ", id: "popupByUploadFile", url: "../tool/popup_uploadFile.html", data: {}, delta: {filetypelist: []}, callback: function(obj, callback) { var file_ = obj.row[0]; me.attachment = file_.id; me.attachment_name = file_.name; if (callback) { callback(); } } }; this.doPopupByPublic(config); }, onShowApproval() { var me = this; let param = { isClientMode: false, flowId: this.acctObj.flow_id } Server.call("root/order/getHistoryTask/", param, function(result) { console.log(result); if (result && result.data) { me.getApprovalRecord(result.data); } }); }, getApprovalRecord(data) { let me = this; var config = { hide_close: true, width: "900px", height:"600px", url: "../approval/ApprovalList.html", data: data, delta: { flow_id: this.acctObj.flow_id, title: this.title }, }; this.doPopupByPublic(config); }, } }); </script> <style> .h_header { padding: 0px !important; } .zs_ .el-form-item { position: relative; line-height: 34px !important; } .zs_ .el-form-item__label { font-size: 12px; line-height: 20px; position: absolute; bottom: 5px; } .zs_ .el-form-item__content { line-height: 34px !important; } .zs_ .close_file { float: left; } .zs_ .close_file:hover { color: red; font-weight: bold; cursor: pointer; } .item_badge { margin-top: 0px; margin-right: 0px; } .el-image-viewer__wrapper .el-icon-circle-close { color: #c00606; } .fj_button .el-button--small, .fj_button .el-button--small.is-round { padding: 9px 9px; } .header { height: 21px; } .el-dialog__header { border-bottom: 0; } .el-dialog__body { text-align: center; /* height: 200px; */ } </style> </body> </html>