Commit 7d89e9e9 by 李少勇

暂存功能联调

parent bf0072d4
...@@ -6,6 +6,7 @@ import glentry from '~/components/business/glentry/event'; ...@@ -6,6 +6,7 @@ import glentry from '~/components/business/glentry/event';
import engp from '~/components/business/engp/event'; import engp from '~/components/business/engp/event';
import docpan from '~/components/business/docpan/event'; import docpan from '~/components/business/docpan/event';
import ccvpan from '~/components/business/ccvpan/event'; import ccvpan from '~/components/business/ccvpan/event';
import Utils from "~/utils"
export default { export default {
mixins: [commonFunctions], mixins: [commonFunctions],
...@@ -17,7 +18,7 @@ export default { ...@@ -17,7 +18,7 @@ export default {
...ccvpan, ...ccvpan,
async init () { async init () {
const params = { const params = {
spt: this.toHandleRowData spt: this.toHandleRowData['row_' + this.trnName]
} }
const res = await Api.post('/service/gitopn/init', { const res = await Api.post('/service/gitopn/init', {
...params, ...params,
...@@ -27,28 +28,23 @@ export default { ...@@ -27,28 +28,23 @@ export default {
if (!res.data) { if (!res.data) {
return return
} }
if (res.data.addbcb) { this.copyValueFromVoData(this.model, res.data)
this.$set(this.model, 'addbcb', res.data.addbcb) this.copyValueFromVoData(this.model.setmod.setfeg, res.data.setfeg)
} this.copyValueFromVoData(this.model.setmod.setfog, res.data.setfog)
if (res.data.gitp) { this.copyValueFromVoData(this.model.setmod.setglg, res.data.setglg)
this.$set(this.model, 'gitp', res.data.gitp) },
} // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
if (res.data.gidgrp) { copyValueFromVoData (model, data) {
this.$set(this.model, 'gidgrp', res.data.gidgrp) let keysList = Object.keys(model)
} keysList.map((key) => {
if (res.data.cfagit) { if (data[key]) {
this.$set(this.model, 'cfagit', res.data.cfagit) if (Utils.typeOf(model[key]) === 'Object') {
} this.copyValueFromVoData(model[key], data[key])
if (res.data.cnybop) { } else {
this.$set(this.model, 'cnybop', res.data.cnybop) this.$set(model, key, data[key])
} }
this.$set(this.model, 'setmod', { }
...this.model.setmod,
setfeg: res.data.setfeg,
setfog: res.data.setfog,
setglg: res.data.setglg,
}) })
console.log(res)
}, },
async tabClick(tab) { async tabClick(tab) {
if (this.isInDisplay) { if (this.isInDisplay) {
......
...@@ -560,6 +560,7 @@ ...@@ -560,6 +560,7 @@
</template> </template>
<script> <script>
import event from '../event' import event from '../event'
import { mapMutations } from 'vuex';
export default { export default {
inject: ["root"], inject: ["root"],
props: ["model", "codes"], props: ["model", "codes"],
...@@ -631,11 +632,16 @@ export default { ...@@ -631,11 +632,16 @@ export default {
}; };
}, },
methods: { methods: {
...mapMutations(['updateToHandleRowData']),
toGitpop() { toGitpop() {
this.$router.history.push("/business/gitpop"); this.$router.history.push("/business/gitpop");
}, },
toGitopn() { toGitopn() {
this.$router.history.push("/business-new/gitopn"); this.$router.history.push("/business-new/gitopn");
// 点击开立,清空从待经办进来的时候带的行参数
this.updateToHandleRowData({
[`row_${row.frm.toLowerCase()}`]: {}
})
}, },
toGetopn() { toGetopn() {
this.$router.history.push("/business/getopn"); this.$router.history.push("/business/getopn");
......
import Api from '~/service/Api'; import Api from '~/service/Api';
import moment from 'moment'; import moment from 'moment';
import { mapMutations } from 'vuex';
export default { export default {
methods: { methods: {
...mapMutations(['updateToHandleRowData']),
async handleReset() { async handleReset() {
this.model.chkinc = ''; this.model.chkinc = '';
this.model.chkdzt = ''; this.model.chkdzt = '';
...@@ -53,8 +52,10 @@ export default { ...@@ -53,8 +52,10 @@ export default {
this.$router.push({ path: 'business-new/sptpopup', query: { inr: inr } }); this.$router.push({ path: 'business-new/sptpopup', query: { inr: inr } });
}, },
async continueEdit(row, scope) { async continueEdit(row, scope) {
console.log('row=====', row) this.updateToHandleRowData({
this.updateToHandleRowData(row) ...this.toHandleRowData,
[`row_${row.frm.toLowerCase()}`]: row
})
let trnName = row.frm.toLowerCase(); let trnName = row.frm.toLowerCase();
this.$router.push({ this.$router.push({
path: 'business-new/' + trnName, path: 'business-new/' + trnName,
......
...@@ -148,9 +148,15 @@ ...@@ -148,9 +148,15 @@
<script> <script>
import Api from '~/service/Api'; import Api from '~/service/Api';
import event from '../event' import event from '../event'
import { mapMutations, mapState } from 'vuex';
export default { export default {
inject: ['root'], inject: ['root'],
props: ['model', 'codes'], props: ['model', 'codes'],
computed: {
...mapState({
toHandleRowData: (state) => state.gitopn.toHandleRowData
})
},
mixins: [event], mixins: [event],
data() { data() {
return { return {
...@@ -232,22 +238,9 @@ export default { ...@@ -232,22 +238,9 @@ export default {
{ label: '拒绝', value: 'chkdel' }, { label: '拒绝', value: 'chkdel' },
{ label: '网银', value: 'chktco' }, { label: '网银', value: 'chktco' },
]; ];
// await this.handleSearch()
// this.$store.commit('setTaskList', {key: 'sptsel', val: this.stmData.data.length})
}, },
methods: { methods: {
// async choose(idx,row){ ...mapMutations(['updateToHandleRowData']),
// var params = {selDst:"sptstm",selrow:[idx+1]}
// let rtnmsg = await this.executeRule("sptstm" , params) //SPTSTM
// if(rtnmsg.respCode == SUCCESS)
// {
// this.stmData.data = rtnmsg.data.sptstm.rows;
// }
// else
// {
// this.$notify.error({title: '错误',message: '服务请求失败!'});
// }
// },
getInidatfro() { getInidatfro() {
let datetime = new Date(); let datetime = new Date();
datetime = datetime.setDate(datetime.getDate() - 10); datetime = datetime.setDate(datetime.getDate() - 10);
......
...@@ -53,6 +53,7 @@ export default { ...@@ -53,6 +53,7 @@ export default {
setfeg: this.model.setmod.setfeg, setfeg: this.model.setmod.setfeg,
setglg: this.model.setmod.setglg, setglg: this.model.setmod.setglg,
doceot: this.model.docpan.doceot, doceot: this.model.docpan.doceot,
spt: this.toHandleRowData['row_' + this.trnName] || {},
gidgrp: this.model.gidgrp, gidgrp: this.model.gidgrp,
gitp: this.model.gitp, gitp: this.model.gitp,
} }
...@@ -63,9 +64,9 @@ export default { ...@@ -63,9 +64,9 @@ export default {
message: '暂存成功', message: '暂存成功',
type: 'success', type: 'success',
}); });
loading.close();
this.$router.push('/taskList') this.$router.push('/taskList')
} }
loading.close();
}, },
} }
} }
\ No newline at end of file
...@@ -317,5 +317,8 @@ export default class Utils { ...@@ -317,5 +317,8 @@ export default class Utils {
} }
} }
} }
// 值分别为:Number、String、Boolean、Null、Undefined、Symbol、Object、Array、Function、Date
static typeOf (data) {
return Object.prototype.toString.call(data).slice(8, -1);
}
} }
\ No newline at end of file
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