Commit 4b48e871 by 潘际乾

获取请求参数的函数getRequestDataFn提取至commonProcess

parent df69cb12
...@@ -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
...@@ -97,6 +97,26 @@ export default { ...@@ -97,6 +97,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数据
*/ */
......
...@@ -5,7 +5,7 @@ export default { ...@@ -5,7 +5,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("sptsel/usfmod_shwflt", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("sptsel/usfmod_shwflt", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -19,7 +19,7 @@ export default { ...@@ -19,7 +19,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("sptsel/butypt", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("sptsel/butypt", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -33,7 +33,7 @@ export default { ...@@ -33,7 +33,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("sptsel/dlmft", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("sptsel/dlmft", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("sptsel/dlaxq", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("sptsel/dlaxq", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -61,7 +61,7 @@ export default { ...@@ -61,7 +61,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("sptsel/butimg", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("sptsel/butimg", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
......
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
that.$refs.inftrnps.stmData.data = res.data.trncorco_trnstm.rows; that.$refs.inftrnps.stmData.data = res.data.trncorco_trnstm.rows;
this.model.trncorco.trnstm = res.data.trncorco_trnstm; this.model.trncorco.trnstm = res.data.trncorco_trnstm;
}) })
// let rtnmsg = await Api.post("trnrel/executeRule/searow", Utils.getRequestDataFn.call(this)) // let rtnmsg = await Api.post("trnrel/executeRule/searow", this.wrapper())
// if (rtnmsg.respCode == "AAAAAA") { // if (rtnmsg.respCode == "AAAAAA") {
// //TODO 处理数据逻辑 // //TODO 处理数据逻辑
// this.stmData.data = rtnmsg.data.trncorco_trnstm.rows; // this.stmData.data = rtnmsg.data.trncorco_trnstm.rows;
...@@ -36,7 +36,7 @@ export default { ...@@ -36,7 +36,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("trnrel/seactr", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("trnrel/seactr", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -51,7 +51,7 @@ export default { ...@@ -51,7 +51,7 @@ export default {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("trnrel/searow", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("trnrel/searow", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("trnrel/dsp", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("trnrel/dsp", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -79,7 +79,7 @@ export default { ...@@ -79,7 +79,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("trnrel/imgmod_newimg", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("trnrel/imgmod_newimg", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -93,7 +93,7 @@ export default { ...@@ -93,7 +93,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("trnrel/imgmod_newhisimg", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("trnrel/imgmod_newhisimg", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -107,7 +107,7 @@ export default { ...@@ -107,7 +107,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("trnrel/diacon_butdia", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("trnrel/diacon_butdia", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -121,7 +121,7 @@ export default { ...@@ -121,7 +121,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("trnrel/imgmod_hisimg", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("trnrel/imgmod_hisimg", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -139,7 +139,7 @@ export default { ...@@ -139,7 +139,7 @@ export default {
that.model.trncorco.selinr = { that.model.trncorco.selinr = {
"rows": that.multipleSelection.map(idx => that.model.trncorco.trnstm.rows[idx]) "rows": that.multipleSelection.map(idx => that.model.trncorco.trnstm.rows[idx])
} }
const data = Utils.getRequestDataFn.call(this) const data = this.wrapper()
let rtnmsg = await Api.post("/trnrel/executeRule/relrow", data) let rtnmsg = await Api.post("/trnrel/executeRule/relrow", data)
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -169,7 +169,7 @@ export default { ...@@ -169,7 +169,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("trnrel/printe", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("trnrel/printe", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -183,7 +183,7 @@ export default { ...@@ -183,7 +183,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("trnrel/reprow", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("trnrel/reprow", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -200,7 +200,7 @@ export default { ...@@ -200,7 +200,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
// if (!valid) // if (!valid)
// return; // return;
let rtnmsg = await Api.post("trnrel/rejrow", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("trnrel/rejrow", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
// var cacheFileName = rtnmsg.data.cacheFileName; // var cacheFileName = rtnmsg.data.cacheFileName;
...@@ -231,7 +231,7 @@ export default { ...@@ -231,7 +231,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("trnrel/relcor", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("trnrel/relcor", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -245,7 +245,7 @@ export default { ...@@ -245,7 +245,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("trnrel/exi", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("trnrel/exi", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -260,7 +260,7 @@ export default { ...@@ -260,7 +260,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("trnrel/recpan_det", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("trnrel/recpan_det", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -274,7 +274,7 @@ export default { ...@@ -274,7 +274,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("trnrel/syswrn_butshw", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("trnrel/syswrn_butshw", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -288,7 +288,7 @@ export default { ...@@ -288,7 +288,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("trnrel/recpan_notmap", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("trnrel/recpan_notmap", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -302,7 +302,7 @@ export default { ...@@ -302,7 +302,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("trnrel/recpan_butspt", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("trnrel/recpan_butspt", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -316,7 +316,7 @@ export default { ...@@ -316,7 +316,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("trnrel/recpan_inc", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("trnrel/recpan_inc", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -330,7 +330,7 @@ export default { ...@@ -330,7 +330,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("trnrel/recpan_butord", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("trnrel/recpan_butord", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -344,7 +344,7 @@ export default { ...@@ -344,7 +344,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("trnrel/imgmod_image", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("trnrel/imgmod_image", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -358,7 +358,7 @@ export default { ...@@ -358,7 +358,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("trnrel/recpan_incben", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("trnrel/recpan_incben", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
...@@ -372,7 +372,7 @@ export default { ...@@ -372,7 +372,7 @@ export default {
this.root.$refs.modelForm.validate(async valid => { this.root.$refs.modelForm.validate(async valid => {
if (!valid) if (!valid)
return; return;
let rtnmsg = await Api.post("trnrel/inftxt_buttxmsel", Utils.getRequestDataFn.call(this)) let rtnmsg = await Api.post("trnrel/inftxt_buttxmsel", this.wrapper())
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
......
...@@ -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
......
...@@ -147,8 +147,7 @@ export default { ...@@ -147,8 +147,7 @@ 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 == "AAAAAA"){
Utils.copyValueFromVO(this.model, res.data); Utils.copyValueFromVO(this.model, res.data);
...@@ -157,8 +156,7 @@ export default { ...@@ -157,8 +156,7 @@ export default {
); );
}, },
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 = "AAAAAA"){
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",
Utils.getRequestDataFn.call(this)
);
if(res.data.respCode=="AAAAAA"){ if(res.data.respCode=="AAAAAA"){
//TODO //TODO
}else{ }else{
this.$notify.error({ title: '错误', message: '服务请求失败!' }); this.$notify.error({ title: '错误', message: '服务请求失败!' });
} }
})
}, },
}, },
created: function () {}, created: function () {},
......
...@@ -734,8 +734,7 @@ export default { ...@@ -734,8 +734,7 @@ 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 = "AAAAAA"){
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
......
...@@ -147,8 +147,7 @@ export default { ...@@ -147,8 +147,7 @@ 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 == "AAAAAA"){
Utils.copyValueFromVO(this.model, res.data); Utils.copyValueFromVO(this.model, res.data);
...@@ -157,8 +156,7 @@ export default { ...@@ -157,8 +156,7 @@ export default {
); );
}, },
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 = "AAAAAA"){
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",
Utils.getRequestDataFn.call(this)
);
if(res.data.respCode=="AAAAAA"){ if(res.data.respCode=="AAAAAA"){
//TODO //TODO
}else{ }else{
this.$notify.error({ title: '错误', message: '服务请求失败!' }); this.$notify.error({ title: '错误', message: '服务请求失败!' });
} }
})
}, },
}, },
created: function () {}, created: function () {},
......
...@@ -713,8 +713,7 @@ export default { ...@@ -713,8 +713,7 @@ 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 = "AAAAAA"){
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
......
...@@ -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)
{ {
......
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