Commit feda776f by mabaofu

更新前段

parents 582b42c8 df6ee642
...@@ -13,25 +13,25 @@ export default { ...@@ -13,25 +13,25 @@ export default {
return Api.post(this.declareParams.trnName+"/init",{params}) return Api.post(this.declareParams.trnName+"/init",{params})
}, },
save(params){ save(params){
return Api.post(this.declareParams.trnName+"/saveData", Utils.getRequestDataFn.call(this, params)) return Api.post(this.declareParams.trnName+"/saveData", this.wrapper(params))
}, },
exeuteCheck(rulePath,params){ exeuteCheck(rulePath,params){
return Api.post(this.declareParams.trnName+"/executeCheck/"+rulePath, Utils.getRequestDataFn.call(this, params)) return Api.post(this.declareParams.trnName+"/executeCheck/"+rulePath, this.wrapper(params))
}, },
executeDefault(rulePath,params) executeDefault(rulePath,params)
{ {
return Api.post(this.declareParams.trnName+"/executeDefault/"+rulePath, Utils.getRequestDataFn.call(this, params)) return Api.post(this.declareParams.trnName+"/executeDefault/"+rulePath, this.wrapper(params))
}, },
executeRule(rulePath,params) executeRule(rulePath,params)
{ {
return Api.post(this.declareParams.trnName+"/executeRule/"+rulePath, Utils.getRequestDataFn.call(this, params)) return Api.post(this.declareParams.trnName+"/executeRule/"+rulePath, this.wrapper(params))
}, },
async checkAll(params){ async checkAll(params){
const res = await Api.post(this.declareParams.trnName+"/checkAll", Utils.getRequestDataFn.call(this, params)) const res = await Api.post(this.declareParams.trnName+"/checkAll", this.wrapper(params))
return res return res
}, },
pedding(params){ pedding(params){
return Api.post(this.declareParams.trnName+"/pending", Utils.getRequestDataFn.call(this, params)) return Api.post(this.declareParams.trnName+"/pending", this.wrapper(params))
}, },
async restoreDisplay() async restoreDisplay()
{ {
...@@ -43,7 +43,7 @@ export default { ...@@ -43,7 +43,7 @@ export default {
}, },
executeNotify(params) executeNotify(params)
{ {
return Api.post(this.declareParams.trnName+"/executeNotify", Utils.getRequestDataFn.call(this, params)) return Api.post(this.declareParams.trnName+"/executeNotify", this.wrapper(params))
}, },
} }
} }
\ No newline at end of file
...@@ -45,7 +45,8 @@ export default { ...@@ -45,7 +45,8 @@ export default {
ruleCheck() { ruleCheck() {
if(!this.pattern) if(!this.pattern)
return return
const keySet = new Set(Object.keys(this.pattern).concat(Object.keys(this.checkRules).concat(Object.keys(this.defaultRules)))) // const keySet = new Set(Object.keys(this.pattern).concat(Object.keys(this.checkRules).concat(Object.keys(this.defaultRules))))
const keySet = new Set(Object.keys(this.pattern).concat(Object.keys(this.defaultRules)))
const res = {}; const res = {};
const that = this; const that = this;
for (let key of keySet.keys()) { for (let key of keySet.keys()) {
...@@ -54,22 +55,22 @@ export default { ...@@ -54,22 +55,22 @@ export default {
rule.push(...that.pattern[key]) rule.push(...that.pattern[key])
} }
const triggerType = that.getTriggerType(key) const triggerType = that.getTriggerType(key)
if(that.checkRules[key]){ // if(that.checkRules[key]){
if (Array.isArray(that.checkRules[key])) { // if (Array.isArray(that.checkRules[key])) {
for (let j = 0; j < that.checkRules[key].length; j++) { // for (let j = 0; j < that.checkRules[key].length; j++) {
const check = that.checkRules[key][j]; // const check = that.checkRules[key][j];
rule.push({ // rule.push({
validator: check.bind(that), // validator: check.bind(that),
trigger: triggerType // trigger: triggerType
}) // })
} // }
} else { // } else {
rule.push({ // rule.push({
validator: that.checkRules[key].bind(that), // validator: that.checkRules[key].bind(that),
trigger: triggerType // trigger: triggerType
}) // })
} // }
} // }
if (that.defaultRules[key]) { if (that.defaultRules[key]) {
rule.push({ rule.push({
validator: that.defaultRules[key].bind(that), validator: that.defaultRules[key].bind(that),
...@@ -97,6 +98,26 @@ export default { ...@@ -97,6 +98,26 @@ export default {
return "blur"; return "blur";
}, },
/** /**
* 以函数形式获取model(请求参数),保证取到的是最新赋值的
* @param {any} params 参数
* @returns
*/
wrapper(params) {
params = params || {}
const fn = async () => {
const that = this;
const data = await new Promise(resolve => {
// 保证前一次请求结果赋值VO完成
setTimeout(() => {
const d = Utils.flatObject(that.model)
resolve(d)
}, 0)
})
return {...data, params}
}
return fn;
},
/**
* 更新Model * 更新Model
* @param {any} data model数据 * @param {any} data model数据
*/ */
......
...@@ -771,7 +771,7 @@ function checkDidgrpRecAvbbyN100(rule, value, callback) { ...@@ -771,7 +771,7 @@ function checkDidgrpRecAvbbyN100(rule, value, callback) {
const that = this; const that = this;
that.exeuteCheck("didgrp.rec.avbby").then(res => { that.exeuteCheck("didgrp.rec.avbby").then(res => {
//TODO //TODO
if (res.respCode == "AAAAAA"){ if (res.respCode == SUCCESS){
Utils.copyValueFromVO(that.model, res.data); Utils.copyValueFromVO(that.model, res.data);
} }
}) })
......
import Api from "~/service/Api" import Api from "~/service/Api"
export default { export default {
onInfbutSearow(){ async onInfbutSearow() {
this.root.$refs.modelForm.validate(async valid => { let rtnmsg = await this.executeRule("infbut_searow")
if(!valid) if (rtnmsg.retcod == SUCCESS) {
return;
let rtnmsg = await Api.post("infpta/infbut_searow",{data:this.model})
if(rtnmsg.retcod == SUCCESS)
{
//TODO 处理数据逻辑 //TODO 处理数据逻辑
} }
else else {
{ this.$notify.error({ title: '错误', message: '服务请求失败!' });
this.$notify.error({title: '错误',message: '服务请求失败!'});
} }
})
}, },
onInfbutDsp(){ async onInfbutDsp() {
this.root.$refs.modelForm.validate(async valid => { let rtnmsg = await this.executeRule("infbut_dsp")
if(!valid) if (rtnmsg.retcod == SUCCESS) {
return;
let rtnmsg = await Api.post("infpta/infbut_dsp",{data:this.model})
if(rtnmsg.retcod == SUCCESS)
{
//TODO 处理数据逻辑 //TODO 处理数据逻辑
} }
else else {
{ this.$notify.error({ title: '错误', message: '服务请求失败!' });
this.$notify.error({title: '错误',message: '服务请求失败!'});
} }
})
}, },
onInfbutUserow(){ async onInfbutUserow() {
this.root.$refs.modelForm.validate(async valid => { let rtnmsg = await this.executeRule("infbut_userow")
if(!valid) if (rtnmsg.retcod == SUCCESS) {
return;
let rtnmsg = await Api.post("infpta/infbut_userow",{data:this.model})
if(rtnmsg.retcod == SUCCESS)
{
//TODO 处理数据逻辑 //TODO 处理数据逻辑
} }
else else {
{ this.$notify.error({ title: '错误', message: '服务请求失败!' });
this.$notify.error({title: '错误',message: '服务请求失败!'});
} }
})
}, },
onInfbutClr(){ async onInfbutClr() {
this.root.$refs.modelForm.validate(async valid => { let rtnmsg = await this.executeRule("infbut_clr")
if(!valid) if (rtnmsg.retcod == SUCCESS) {
return;
let rtnmsg = await Api.post("infpta/infbut_clr",{data:this.model})
if(rtnmsg.retcod == SUCCESS)
{
//TODO 处理数据逻辑 //TODO 处理数据逻辑
} }
else else {
{ this.$notify.error({ title: '错误', message: '服务请求失败!' });
this.$notify.error({title: '错误',message: '服务请求失败!'});
} }
})
}, },
onInfbutButprt(){ async onInfbutButprt() {
this.root.$refs.modelForm.validate(async valid => { let rtnmsg = await this.executeRule("infbut_butprt")
if(!valid) if (rtnmsg.retcod == SUCCESS) {
return;
let rtnmsg = await Api.post("infpta/infbut_butprt",{data:this.model})
if(rtnmsg.retcod == SUCCESS)
{
//TODO 处理数据逻辑 //TODO 处理数据逻辑
} }
else else {
{ this.$notify.error({ title: '错误', message: '服务请求失败!' });
this.$notify.error({title: '错误',message: '服务请求失败!'});
} }
})
}, },
onInfbutExi(){ async onInfbutExi() {
this.root.$refs.modelForm.validate(async valid => { let rtnmsg = await this.executeRule("infbut_exi")
if(!valid) if (rtnmsg.retcod == SUCCESS) {
return;
let rtnmsg = await Api.post("infpta/infbut_exi",{data:this.model})
if(rtnmsg.retcod == SUCCESS)
{
//TODO 处理数据逻辑 //TODO 处理数据逻辑
} }
else else {
{ this.$notify.error({ title: '错误', message: '服务请求失败!' });
this.$notify.error({title: '错误',message: '服务请求失败!'});
} }
})
}, },
onRecpanLnkinfptm(){ async onRecpanLnkinfptm() {
this.root.$refs.modelForm.validate(async valid => { let rtnmsg = await this.executeRule("recpan_lnkinfptm")
if(!valid) if (rtnmsg.retcod == SUCCESS) {
return;
let rtnmsg = await Api.post("infpta/recpan_lnkinfptm",{data:this.model})
if(rtnmsg.retcod == SUCCESS)
{
//TODO 处理数据逻辑 //TODO 处理数据逻辑
} }
else else {
{ this.$notify.error({ title: '错误', message: '服务请求失败!' });
this.$notify.error({title: '错误',message: '服务请求失败!'});
} }
})
}, },
} }
\ No newline at end of file
import Api from "~/service/Api" import Api from "~/service/Api"
import Utils from "~/utils/index" import Utils from "~/utils/index"
export default { export default {
onUsfmodShwflt() { async onUsfmodShwflt() {
this.root.$refs.modelForm.validate(async valid => { let rtnmsg = await this.executeRule("usfmod_shwflt")
if (!valid) if (rtnmsg.respCode == SUCCESS) {
return;
let rtnmsg = await Api.post("sptsel/usfmod_shwflt", Utils.getRequestDataFn.call(this))
if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
} }
else { else {
this.$notify.error({ title: '错误', message: '服务请求失败!' }); this.$notify.error({ title: '错误', message: '服务请求失败!' });
} }
})
}, },
onButypt() { async onButypt() {
this.root.$refs.modelForm.validate(async valid => { let rtnmsg = await this.executeRule("butypt")
if (!valid) if (rtnmsg.respCode == SUCCESS) {
return;
let rtnmsg = await Api.post("sptsel/butypt", Utils.getRequestDataFn.call(this))
if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
} }
else { else {
this.$notify.error({ title: '错误', message: '服务请求失败!' }); this.$notify.error({ title: '错误', message: '服务请求失败!' });
} }
})
}, },
onDlmft() { async onDlmft() {
this.root.$refs.modelForm.validate(async valid => { let rtnmsg = await this.executeRule("dlmft")
if (!valid) if (rtnmsg.respCode == SUCCESS) {
return;
let rtnmsg = await Api.post("sptsel/dlmft", Utils.getRequestDataFn.call(this))
if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
} }
else { else {
this.$notify.error({ title: '错误', message: '服务请求失败!' }); this.$notify.error({ title: '错误', message: '服务请求失败!' });
} }
})
}, },
onDlaxq() { async onDlaxq() {
this.root.$refs.modelForm.validate(async valid => { let rtnmsg = await this.executeRule("dlaxq")
if (!valid) if (rtnmsg.respCode == SUCCESS) {
return;
let rtnmsg = await Api.post("sptsel/dlaxq", Utils.getRequestDataFn.call(this))
if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
} }
else { else {
this.$notify.error({ title: '错误', message: '服务请求失败!' }); this.$notify.error({ title: '错误', message: '服务请求失败!' });
} }
})
}, },
onButimg() { async onButimg() {
this.root.$refs.modelForm.validate(async valid => { let rtnmsg = await this.executeRule("butimg")
if (!valid) if (rtnmsg.respCode == SUCCESS) {
return;
let rtnmsg = await Api.post("sptsel/butimg", Utils.getRequestDataFn.call(this))
if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
} }
else { else {
this.$notify.error({ title: '错误', message: '服务请求失败!' }); this.$notify.error({ title: '错误', message: '服务请求失败!' });
} }
})
}, },
tabClick() { tabClick() {
}, },
async continueEdit(row){ async continueEdit(row) {
//let rtnmsg = await Api.post("sptsel/getPendingData",{params:{'selsptinr':row[0]}}) //let rtnmsg = await Api.post("getPendingData",{params:{'selsptinr':row[0]}})
//if (rtnmsg.respCode == "AAAAAA") { //if (rtnmsg.respCode == SUCCESS) {
//var cacheFileName = rtnmsg.data.cacheFileName; //var cacheFileName = rtnmsg.data.cacheFileName;
let viewurl ="/business/ditopn?selsptinr="+row[0]; let viewurl = "/business/ditopn?selsptinr=" + row[0];
this.$router.push(viewurl); this.$router.push(viewurl);
//} //}
} }
......
...@@ -142,22 +142,6 @@ export default class Utils { ...@@ -142,22 +142,6 @@ export default class Utils {
return output.join(''); return output.join('');
} }
static getRequestDataFn(params) {
params = params||{}
const fn = async () => {
const that = this;
const data = await new Promise(resolve => {
// 保证前一次请求结果赋值VO完成
setTimeout(() => {
const d = Utils.flatObject(that.model)
resolve(d)
}, 0)
})
return {...data, params}
}
return fn;
}
static positioningErrorMsg(fieldErrors, formFields) { static positioningErrorMsg(fieldErrors, formFields) {
let firstErrorItem = null let firstErrorItem = null
for (let i = 0; i < formFields.length; i++) { for (let i = 0; i < formFields.length; i++) {
......
...@@ -364,9 +364,7 @@ export default { ...@@ -364,9 +364,7 @@ export default {
components: { SetpanDialog }, components: { SetpanDialog },
data() { data() {
return { return {
dialogVisible2: false, dialogVisible2: false,
dialog2: { dialog2: {
feetxtinf:"", feetxtinf:"",
feetxt:"", feetxt:"",
...@@ -378,14 +376,13 @@ export default { ...@@ -378,14 +376,13 @@ export default {
methods: { methods: {
...Event, ...Event,
dispDefault(){ dispDefault(){
Api.post("cptopn/executeDefault/mac",Utils.getRequestDataFn.call(this)).then(res=>{ this.executeDefault("mac").then(res=>{
Utils.copyValueFromVO(this.model, res.data) Utils.copyValueFromVO(this.model, res.data)
}) })
}, },
detail2(index, row) { detail2(index, row) {
Api.post("cptopn/executeRule/det",Utils.getRequestDataFn.call(this)).then(res=>{ this.executeRule("det").then(res=>{
this.dialogVisible2 = true; this.dialogVisible2 = true;
this.index = index; this.index = index;
this.dialog2 = row this.dialog2 = row
......
...@@ -135,7 +135,7 @@ export default { ...@@ -135,7 +135,7 @@ export default {
if (label === "Settlement") { if (label === "Settlement") {
this.executeRule("setmod.setpan").then(res => { this.executeRule("setmod.setpan").then(res => {
if (res.respCode == "AAAAAA"){ if (res.respCode == SUCCESS){
const data = res.data; const data = res.data;
Utils.copyValueFromVO(this.model, data) Utils.copyValueFromVO(this.model, data)
} }
...@@ -149,7 +149,7 @@ export default { ...@@ -149,7 +149,7 @@ export default {
} }
if (label === "Messages") { if (label === "Messages") {
this.executeRule("trnmod.trndoc.docpan").then(res => { this.executeRule("trnmod.trndoc.docpan").then(res => {
if (res.respCode == "AAAAAA"){ if (res.respCode == SUCCESS){
const data = res.data; const data = res.data;
Utils.copyValueFromVO(this.model, data) Utils.copyValueFromVO(this.model, data)
var stm = []; var stm = [];
...@@ -165,7 +165,7 @@ export default { ...@@ -165,7 +165,7 @@ export default {
} }
if (label === "Attachments") { if (label === "Attachments") {
this.executeRule("trnmod.trndoc.doctre").then(res => { this.executeRule("trnmod.trndoc.doctre").then(res => {
if (res.respCode == "AAAAAA"){ if (res.respCode == SUCCESS){
const data = res.data; const data = res.data;
Utils.copyValueFromVO(this.model, data) Utils.copyValueFromVO(this.model, data)
} }
......
...@@ -147,20 +147,18 @@ export default { ...@@ -147,20 +147,18 @@ export default {
this.model.didgrp.rec.tenmaxday = 0; this.model.didgrp.rec.tenmaxday = 0;
this.model.didgrp.blk.defdet = ""; this.model.didgrp.blk.defdet = "";
} }
const arg = Utils.getRequestDataFn.call(this); this.executeCheck("didgrp.rec.avbby").then(
Api.post("ditopn/executeCheck/didgrp.rec.avbby", arg).then(
(res) => { (res) => {
if (res.respCode == "AAAAAA"){ if (res.respCode == SUCCESS){
Utils.copyValueFromVO(this.model, res.data); Utils.copyValueFromVO(this.model, res.data);
} }
} }
); );
}, },
recTenmaxdayEvent(){ recTenmaxdayEvent(){
const arg = Utils.getRequestDataFn.call(this); this.executeDefault("didgrp.rec.tenmaxday").then(
Api.post("ditopn/executeDefault/didgrp.rec.tenmaxday", arg).then(
(res) => { (res) => {
if (res.respCode = "AAAAAA"){ if (res.respCode = SUCCESS){
Utils.copyValueFromVO(this.model, res.data); Utils.copyValueFromVO(this.model, res.data);
} }
} }
......
...@@ -528,16 +528,14 @@ export default { ...@@ -528,16 +528,14 @@ export default {
this.centerDialogVisible = false; this.centerDialogVisible = false;
console.log(this.model); console.log(this.model);
this.model.trnmod.trndoc.doceot.splice(this.index, 1, this.dialog); this.model.trnmod.trndoc.doceot.splice(this.index, 1, this.dialog);
let res = Api.post( this.executeRule("trnmod.trndoc.doccur.butaddok").then(res => {
"ditopn/executeRule/trnmod.trndoc.doccur.butaddok", if(res.data.respCode==SUCCESS){
Utils.getRequestDataFn.call(this)
);
if(res.data.respCode=="AAAAAA"){
//TODO //TODO
}else{ }else{
this.$notify.error({ title: '错误', message: '服务请求失败!' }); this.$notify.error({ title: '错误', message: '服务请求失败!' });
} }
})
}, },
}, },
created: function () {}, created: function () {},
......
...@@ -734,10 +734,9 @@ export default { ...@@ -734,10 +734,9 @@ export default {
} }
}, },
nom1CurEvent(){ nom1CurEvent(){
const data = Utils.flatObject(this.model); this.executeDefault("didgrp.cbs.nom1.cur").then(
Api.post("ditopn/executeDefault/didgrp.cbs.nom1.cur", Utils.getRequestDataFn.call(this)).then(
(res) => { (res) => {
if (res.respCode = "AAAAAA"){ if (res.respCode = SUCCESS){
Utils.copyValueFromVO(this.model, res.data); Utils.copyValueFromVO(this.model, res.data);
} }
} }
......
...@@ -433,7 +433,7 @@ export default { ...@@ -433,7 +433,7 @@ export default {
}, },
// 第二个表格 // 第二个表格
detail1(index, row) { detail1(index, row) {
Api.post("ditopn/executeDefault/det",Utils.getRequestDataFn.call(this)).then(res=>{ this.executeDefault("det").then(res=>{
this.dialogVisible = true; this.dialogVisible = true;
this.dialog = row; this.dialog = row;
this.index = index; this.index = index;
...@@ -441,14 +441,14 @@ export default { ...@@ -441,14 +441,14 @@ export default {
}, },
dispDefault(){ dispDefault(){
Api.post("ditopn/executeDefault/mac",Utils.getRequestDataFn.call(this)).then(res=>{ this.executeDefault("mac").then(res=>{
Utils.copyValueFromVO(this.model, res.data) Utils.copyValueFromVO(this.model, res.data)
}) })
}, },
// 第三个表格 // 第三个表格
detail2(index, row) { detail2(index, row) {
Api.post("ditopn/executeRule/det",Utils.getRequestDataFn.call(this)).then(res=>{ this.executeRule("det").then(res=>{
this.dialogVisible2 = true; this.dialogVisible2 = true;
this.index = index; this.index = index;
this.dialog2 = row this.dialog2 = row
......
...@@ -2012,7 +2012,7 @@ export default { ...@@ -2012,7 +2012,7 @@ export default {
created: async function () { created: async function () {
console.log("进入ditame交易"); console.log("进入ditame交易");
let rtnmsg = await Api.post("ditame/init", { params: {} }); let rtnmsg = await Api.post("ditame/init", { params: {} });
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
Utils.copyValueFromVO(this.model, rtnmsg.data); Utils.copyValueFromVO(this.model, rtnmsg.data);
} else { } else {
......
...@@ -147,20 +147,18 @@ export default { ...@@ -147,20 +147,18 @@ export default {
this.model.didgrp.rec.tenmaxday = 0; this.model.didgrp.rec.tenmaxday = 0;
this.model.didgrp.blk.defdet = ""; this.model.didgrp.blk.defdet = "";
} }
const arg = Utils.getRequestDataFn.call(this); this.executeCheck("didgrp.rec.avbby").then(
Api.post("ditopn/executeCheck/didgrp.rec.avbby", arg).then(
(res) => { (res) => {
if (res.respCode == "AAAAAA"){ if (res.respCode == SUCCESS){
Utils.copyValueFromVO(this.model, res.data); Utils.copyValueFromVO(this.model, res.data);
} }
} }
); );
}, },
recTenmaxdayEvent(){ recTenmaxdayEvent(){
const arg = Utils.getRequestDataFn.call(this); this.executeDefault("didgrp.rec.tenmaxday").then(
Api.post("ditopn/executeDefault/didgrp.rec.tenmaxday", arg).then(
(res) => { (res) => {
if (res.respCode = "AAAAAA"){ if (res.respCode = SUCCESS){
Utils.copyValueFromVO(this.model, res.data); Utils.copyValueFromVO(this.model, res.data);
} }
} }
......
...@@ -528,16 +528,14 @@ export default { ...@@ -528,16 +528,14 @@ export default {
this.centerDialogVisible = false; this.centerDialogVisible = false;
console.log(this.model); console.log(this.model);
this.model.trnmod.trndoc.doceot.splice(this.index, 1, this.dialog); this.model.trnmod.trndoc.doceot.splice(this.index, 1, this.dialog);
let res = Api.post( this.executeRule("trnmod.trndoc.doccur.butaddok").then(res => {
"ditopn/executeRule/trnmod.trndoc.doccur.butaddok", if(res.data.respCode==SUCCESS){
Utils.getRequestDataFn.call(this)
);
if(res.data.respCode=="AAAAAA"){
//TODO //TODO
}else{ }else{
this.$notify.error({ title: '错误', message: '服务请求失败!' }); this.$notify.error({ title: '错误', message: '服务请求失败!' });
} }
})
}, },
}, },
created: function () {}, created: function () {},
......
...@@ -713,10 +713,9 @@ export default { ...@@ -713,10 +713,9 @@ export default {
} }
}, },
nom1CurEvent(){ nom1CurEvent(){
const data = Utils.flatObject(this.model); this.executeDefault("didgrp.cbs.nom1.cur").then(
Api.post("ditopn/executeDefault/didgrp.cbs.nom1.cur", Utils.getRequestDataFn.call(this)).then(
(res) => { (res) => {
if (res.respCode = "AAAAAA"){ if (res.respCode = SUCCESS){
Utils.copyValueFromVO(this.model, res.data); Utils.copyValueFromVO(this.model, res.data);
} }
} }
......
...@@ -432,7 +432,7 @@ export default { ...@@ -432,7 +432,7 @@ export default {
}, },
// 第二个表格 // 第二个表格
detail1(index, row) { detail1(index, row) {
Api.post("ditopn/executeDefault/det",Utils.getRequestDataFn.call(this)).then(res=>{ this.executeDefault("det").then(res=>{
this.dialogVisible = true; this.dialogVisible = true;
this.dialog = row; this.dialog = row;
this.index = index; this.index = index;
...@@ -440,14 +440,14 @@ export default { ...@@ -440,14 +440,14 @@ export default {
}, },
dispDefault(){ dispDefault(){
Api.post("ditopn/executeDefault/mac",Utils.getRequestDataFn.call(this)).then(res=>{ this.executeDefault("mac").then(res=>{
Utils.copyValueFromVO(this.model, res.data) Utils.copyValueFromVO(this.model, res.data)
}) })
}, },
// 第三个表格 // 第三个表格
detail2(index, row) { detail2(index, row) {
Api.post("ditopn/executeRule/det",Utils.getRequestDataFn.call(this)).then(res=>{ this.executeRule("det").then(res=>{
this.dialogVisible2 = true; this.dialogVisible2 = true;
this.index = index; this.index = index;
this.dialog2 = row this.dialog2 = row
......
...@@ -190,7 +190,7 @@ export default { ...@@ -190,7 +190,7 @@ export default {
} }
if (name === "setpan") { if (name === "setpan") {
this.executeRule("setmod.setpan").then(res => { this.executeRule("setmod.setpan").then(res => {
if (res.respCode == "AAAAAA"){ if (res.respCode == SUCCESS){
const data = res.data; const data = res.data;
Utils.copyValueFromVO(this.model, data) Utils.copyValueFromVO(this.model, data)
} }
...@@ -198,7 +198,7 @@ export default { ...@@ -198,7 +198,7 @@ export default {
} }
if (name === "docpan") { if (name === "docpan") {
this.executeRule("trnmod.trndoc.docpan").then(res => { this.executeRule("trnmod.trndoc.docpan").then(res => {
if (res.respCode == "AAAAAA"){ if (res.respCode == SUCCESS){
const data = res.data; const data = res.data;
Utils.copyValueFromVO(this.model, data) Utils.copyValueFromVO(this.model, data)
var stm = []; var stm = [];
...@@ -214,7 +214,7 @@ export default { ...@@ -214,7 +214,7 @@ export default {
} }
if (name === "limitbody") { if (name === "limitbody") {
this.executeRule("liaall.limmod.limitbody").then(res => { this.executeRule("liaall.limmod.limitbody").then(res => {
if (res.respCode == "AAAAAA"){ if (res.respCode == SUCCESS){
const data = res.data; const data = res.data;
Utils.copyValueFromVO(this.model, data) Utils.copyValueFromVO(this.model, data)
} }
......
...@@ -541,7 +541,7 @@ export default { ...@@ -541,7 +541,7 @@ export default {
created: async function () { created: async function () {
console.log("进入ditsel交易"); console.log("进入ditsel交易");
let rtnmsg = await Api.post("ditsel/init", { params: {} }); let rtnmsg = await Api.post("ditsel/init", { params: {} });
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
Utils.copyValueFromVO(this.model,rtnmsg.data) Utils.copyValueFromVO(this.model,rtnmsg.data)
} else { } else {
......
...@@ -194,7 +194,7 @@ export default { ...@@ -194,7 +194,7 @@ export default {
console.log("进入office交易"); console.log("进入office交易");
if(1) return if(1) return
let rtnmsg = await Api.post("office/init",Utils.getRequestDataFn.call(this, {})) let rtnmsg = await this.init()
console.log(rtnmsg) console.log(rtnmsg)
if(rtnmsg.code == SUCCESS) if(rtnmsg.code == SUCCESS)
{ {
......
...@@ -48,7 +48,7 @@ export default { ...@@ -48,7 +48,7 @@ export default {
}); });
if (this.model.docXML != "") if (this.model.docXML != "")
Api.post("pdf", { xml: this.model.docXML }).then((res) => { Api.post("pdf", { xml: this.model.docXML }).then((res) => {
if (res.respCode == "AAAAAA") { if (res.respCode == SUCCESS) {
this.pdf += res.data; this.pdf += res.data;
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment