zhangyanpeng
2024-08-04 04bf2cc9cd64a8df7047aaa56bb64ab69a78804b
module/md/page/customer/page/customer_basic_acct.html
@@ -1328,6 +1328,7 @@
                        this.saveChangeRowTable();
                     }
                     else { // 开户提交
                        me.loading_pass = true ;
                        var bo_JCXX = this.$refs.JCXX.checkForm();
                        
                        if (!bo_JCXX) {
@@ -1520,6 +1521,33 @@
                        }
                        tableData_.push(row_);
                     })
                     if (me.formData_criteria && me.formData_criteria.length > 0) { //不是新增
                        me.formdata_rule_group.map(group => {//
                           group.children.map(unitobj => {
                              var row_ = {
                                 id: unitobj.id,
                                 parent_id: me.formData.id,
                                 criteria_id: unitobj.criteria_id,
                                 criteria_value: unitobj.criteria_value,
                                 remark: unitobj.remark ? unitobj.remark : '',
                              }
                              md_org_account_criteria_.push(row_);
                           })
                        })
                     }
                     else {
                        me.formdata_rule_group.map(group => {//
                           group.children.map(unitobj => {
                              var row_ = {
                                 parent_id: me.formData.id,
                                 criteria_id: unitobj.id,
                                 criteria_value: unitobj.criteria_value,
                                 remark: unitobj.remark ? unitobj.remark : '',
                              }
                              md_org_account_criteria_.push(row_);
                           })
                        })
                     }
                     
                     if (tableData_.length == 0) {
                        Root.message({
@@ -1537,7 +1565,14 @@
                        me.iscommit = false
                        return
                     }
                     if (md_org_account_criteria_.some(e=>e.criteria_value == '' || e.criteria_value == null)) {
                        Root.message({
                           type: 'warning',
                           message: '请先添加明细数据'
                        });
                        me.iscommit = false
                        return
                     }
                     let param = {
                        dataname: 'md_org_account',
                        data: {},
@@ -1555,50 +1590,6 @@
                        }
                        
                     }
                     if (me.formData_criteria && me.formData_criteria.length > 0) { //不是新增
                        me.formdata_rule_group.map(group => {//
                           group.children.map(unitobj => {
                              if (!unitobj.criteria_value) {
                                 Root.message({
                                    type: 'warning',
                                    message: '请先添加明细数据'
                                 });
                                 me.iscommit = false
                                 return
                              }
                              var row_ = {
                                 id: unitobj.id,
                                 parent_id: me.formData.id,
                                 criteria_id: unitobj.criteria_id,
                                 criteria_value: unitobj.criteria_value,
                                 remark: unitobj.remark ? unitobj.remark : '',
                              }
                              md_org_account_criteria_.push(row_);
                           })
                        })
                     }
                     else {
                        me.formdata_rule_group.map(group => {//
                           group.children.map(unitobj => {
                              if (!unitobj.criteria_value) {
                                 Root.message({
                                    type: 'warning',
                                    message: '请先添加明细数据'
                                 });
                                 me.iscommit = false
                                 return
                              }
                              var row_ = {
                                 parent_id: me.formData.id,
                                 criteria_id: unitobj.id,
                                 criteria_value: unitobj.criteria_value,
                                 remark: unitobj.remark ? unitobj.remark : '',
                              }
                              md_org_account_criteria_.push(row_);
                           })
                        })
                     }
                     param.data["md_org_account_criteria"] = md_org_account_criteria_.length ? md_org_account_criteria_ : null;
                     
                     param.data[this.dataname] = entity;
@@ -1623,11 +1614,11 @@
                        if (result.success) {
                           if(me.iscommit){
                              me.iscommit = false;
                              Root.message({
                                 type: 'success',
                                 message: '提交成功'
                              });
                              me.saveAfter();
                              // Root.message({
                              //    type: 'success',
                              //    message: '提交成功'
                              // });
                              me.doapprove()
                           }
                           else {
                              Root.message({
@@ -1669,6 +1660,57 @@
                        }
                     });
                  },
                  doapprove(){
                     var me = this
                     me.loading_pass = true;
                     let param = {
                         dataname: "md_org_account",
                         id: me.formData.id,
                        remark: this.approveremark
                     }
                     Server.call("root/data/approve", param, function(result) {
                        me.loading_pass = false;
                           // Root.message({
                           //    type: 'success',
                           //    message: '审批成功'
                           // });
                           Root.message({
                              type: 'success',
                              message: '提交成功'
                           });
                           me.saveAfter()
                     }, function(errorresult) {
                        console.log("错误信息", errorresult);
                        me.loading_pass = false;
                        if (errorresult.messages && errorresult.messages.count && errorresult.messages.count.error) {
                           if (errorresult.messages.list) {
                              var config = {
                                  totab: false,
                                  // width: "1200px",
                                  // height: 800,
                                  icon: "icon-product",
                                  text: "错误信息",
                                  url: "module/tool/page/popup_error_messages.html",
                                  data: {},
                                  delta: errorresult.messages.list,
                                  callback: function(obj, callback) {
                                      if (callback) {
                                          callback();
                                      }
                                  }
                              };
                              me.doPopupByPublic(config);
                           }
                        }
                        else {
                           Root.message({
                              type: 'error',
                              message: '提交失败'
                           });
                        }
                     });
                  },
                  
                  // 通过或拒绝
                  onShowApproval(passOrRefuse) {
@@ -1701,26 +1743,6 @@
                     // this.getMachine(function(next_step, up_step) { // 
                     //    me.doRunApproval(next_step, up_step);
                     // });
                  },
                  getMachine(callback) {
                     var me = this;
                     let param = {
                         dataname: "md_org_account",
                     }
                     Server.call("root/state/getMachine", param, function(result) {
                        var next_step = {}; // 向下流程
                        var up_step = {}; // 向上流程
                        if (result && result.machine && result.machine.detail) {
                           result.machine.detail.map(md=>{
                              next_step[md.from_code] = md.to_code;
                              up_step[md.to_code] = md.from_code;
                           })
                           callback(next_step, up_step);
                        }
                     })
                  },
                  
                  doRunApproval(next_step, up_step) {
@@ -2108,7 +2130,7 @@
                  <el-button size="small" type="default" @click="closeDialog">取 消</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="success" @click="submitRowTable":icon="buttonsconfig.submit.icon">{{buttonsconfig.submit.name}}</el-button>
                  <el-button size="small" v-if="isChange" type="success" :loading="loading_pass" @click="submitRowTable":icon="buttonsconfig.submit.icon">{{buttonsconfig.submit.name}}</el-button>
                  
                  <el-button size="small" v-if="isrefuseedit" type="success" @click="">再次提交</el-button>