Commit 0886f482 by yangchen

Merge remote-tracking branch 'origin/develop' into develop-yangchen

parents 7b104b56 56247cc7
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "@gms/gms-plugin-billexpand",
"version": "0.0.9",
"version": "0.0.11",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
......
......@@ -14,7 +14,7 @@ var $_$NOT_LOGIN = "请先登录";
//var url = "http://192.168.118.174/anysign-ess-server-service/publish/v1/deprecated/searchSealStatus";
var $_$WEBSIGN_CONFIG = {
$_$sign_type : "0", //0:离线;1:国密在线;2:国办在线验证印章状态
$_$url : "",
$_$url : "http://10.2.9.50:8080/services/EsmsServlet", // wtf??
};
//根证书信任链
......
/**
* 只用于上海报销单的保存
* 与正常财务保存(CW_saveAction)不同的是,此保存(saveAction_SH_BXD)扩展了保存成功后,
* 跳转详情界面或者审核界面的逻辑
* @author qiaoyanqi
* @date 2022-06-02
*/
import errorMessageUtil from "./util/errorMessageUtil";
export default {
execute: function (bill, param) {
if (bill) {
bill.runFormulaCheckData(param, (msg) => {
if (msg.length == 0) {
bill.setControlsSate(param["_control_name_"], "enable", false);
this.saveData(bill, param);
} else {
GMS.vbus.$Modal.warning({
title: "信息错误",
content: msg,
});
}
});
}
},
saveData(bill, param) {
let that = this;
let buidData = bill.getBuillData();
console.log("buidData:", buidData);
let action = bill.curForm.content.actions;
let controlArr = action.filter((v) => v.execute == "searchBillAction");
let detailData = [];
let arrApi1 = [];
if (
controlArr.length > 0 &&
controlArr[0].param.field &&
controlArr[0].param.field.length > 0
) {
let tableList = controlArr[0].param.field.map((v) => v.targetTableName);
tableList = Array.from(new Set(tableList));
tableList.forEach((v) => {
if (buidData.hasOwnProperty(v)) {
for (let i = 0; i < bill.getSubData(v).length; i++) {
let rowDataObject = bill.getSubDataRow(v, i);
let obj = rowDataObject.getValue("currentRowData");
if (obj && obj.BILLDETAILOBJ) {
let billId = obj.BILLID;
let billName = obj.BILLNAME;
let billDefine = billName
.replace(/_E/gi, "")
.replace(/_R/gi, "")
.replace(/_A/gi, "");
arrApi1.push(
that.searchBillObj(billDefine, billId, obj.BILLDETAILOBJ)
);
} else {
let billId = rowDataObject.getData().BILLID.value;
let billName = rowDataObject.getData().BILLNAME.value;
let billDefine = billName
.replace(/_E/gi, "")
.replace(/_R/gi, "")
.replace(/_A/gi, "");
arrApi1.push(that.searchBillObj(billDefine, billId));
}
}
}
});
}
if (arrApi1.length > 0) {
Promise.all(arrApi1).then((list) => {
detailData = list;
that.saveAsync(buidData, detailData, param, bill);
}).catch(error=>{
console.log(error);
});
} else {
that.saveAsync(buidData, detailData, param, bill);
}
},
searchBillObj(billDefine, billId, BILLDETAILOBJ) {
return new Promise((resolve, reject) => {
GMS.$http.get(`/gms/bill/${billDefine}/${billId}?withSubs=true`)
.then((data) => {
let obj = BILLDETAILOBJ;
if (data.status == 200 && data.data.code == 0) {
if (!BILLDETAILOBJ) {
obj = data.data.content;
}
obj.recver = data.data.content && data.data.content.recver;
}
if(billDefine){
obj.billDefine = billDefine;
}
resolve(obj);
})
.catch((error) => {
reject(error);
});
});
},
saveAsync(buidData, detailData, param, bill) {
let postData = {
data: buidData,
detailData: detailData,
};
let url = `/rbc/bill/action/executed/${param.define}/bill.Basic.save?transmission=total`;
GMS.$http
.post(url, JSON.stringify(postData), {
headers: {
post: {
"Content-Type": "application/json",
},
},
})
.then(function (response) {
bill.setControlsSate(param["_control_name_"], "enable", true);
if (response.data.code == 0) {
//存储返回回来的创建时间、修改时间
bill.getMasterData().setValue("createTime", response.data.content.billData.createTime);
bill.getMasterData().setValue("modifyTime", response.data.content.billData.modifyTime);
bill.getMasterData().setValue("recver", response.data.content.billData.recver);
bill.getMasterData().setValue("billCode", response.data.content.billData.billCode);
GMS.vbus.$Message.success("保存成功");
GMS.vbus.$emit("saveEcho", buidData, param);
} else {
response.data.message && GMS.vbus.$Message.error({
content: errorMessageUtil.saveAction.getErrorMessage(response.data.message),
duration: 3
});
}
})
.catch((error) => {
console.log(error)
bill.setControlsSate(param["_control_name_"], "enable", true);
GMS.vbus.$Message.error({
content: errorMessageUtil.saveAction.getCommonMessage(),
duration: 3
});
});
},
}
......@@ -144,6 +144,10 @@ export default {
showtype: {
type: String,
default: ''
},
isFullPath:{
type: Boolean,
default: false
}
},
data () {
......
......@@ -356,6 +356,7 @@ export default {
versionDate: this.versionDate,
expression: this.filterFormular,
'BI-SYNTAX': null,
showFullPath:this.isFullPath
}
let groupname = ''
let treeData = {}
......@@ -393,9 +394,10 @@ export default {
}
getGroupNames([treeData])
postData = {...postData, ...{
groupObjectCode: groupname,
groupTableName: this.groupTableName.tableName,
showSubGroup: true,
groupFieldName: this.groupTableName.groupFieldName,
groupname: groupname,
groupNames: objectCodes,
}}
}
......
......@@ -211,8 +211,10 @@ export default {
getGroupNames([treeData])
postData = {
groupFieldName: this.groupFieldName,
groupname: this.treeNode.attributes.objectcode,
groupNames: objectCodes,
groupObjectCode: this.treeNode.attributes.objectcode,
groupTableName: this.groupTableName.tableName,
// groupNames: objectCodes,
showSubGroup: true,
tableName: this.tableName,
pagination: true,
offset: (this.pageNo - 1) * this.pageSize,
......
......@@ -104,23 +104,13 @@ export default {
}
const postData = {
tableName: this.tableName,
tableName: this.structtype == 1 ? this.groupTableName.tableName : this.tableName,
queryDataStructure: 'ALL',
authType: this.authType,
versionDate: this.versionDate,
expression: this.filterFormular,
'BI-SYNTAX': null
}
if (this.structtype === 1) {
if (this.groupTableName.define.showFields) {
const relevance = this.groupTableName.define.showFields.find(item => item.columnName === this.groupTableName.groupFieldName)
let relevanceField = ''
if (relevance) {
relevanceField = relevance.mapping? relevance.mapping.split('.')[0]: ''
postData.tableName = relevanceField
}
}
}
const { data } = await this.getBaseData(postData, '/baseData/data/tree')
getTreeDataMap(data.rows)
this.$emit('init-tree', this.treeDataMap, this.groupTableName.groupFieldName)
......
......@@ -1641,7 +1641,8 @@ export default {
},
"description": "",
"title": "修改单据状态[updatebillStateAction]",
"value": "updatebillStateAction"
"value": "updatebillStateAction",
"alwaysUse": true
},
{
"discard": false,
......@@ -2097,6 +2098,28 @@ export default {
},
{
"discard": false,
"path": "上海报销/专用",
"extends": {
"param": [
{
"ref": "bill",
"type": "metaData",
"title": "编辑成功跳转页面",
"key": "viewName"
}, {
"ref": "bill",
"type": "metaData",
"title": "审核成功跳转页面",
"key": "approveViewName"
}
]
},
"description": "",
"title": "上海报销_保存[saveAction_SH_BXD]",
"value": "saveAction_SH_BXD"
},
{
"discard": false,
"path": "报销/通用",
"extends": {
"param": [
......
/**
* 后端公式统一导入到mcon.js指定文件
* @author raojiaguan
......@@ -26,7 +25,7 @@ const formulaObject = {
'MdYWHDDXFilter','SubTableIsContainValue','SubTableOneToOneFilter','TakeOutBaseDataOne',
'UpdateAccount','UpdateBillMoneyFunction','UpdateBillReferenceRelationshipFunction','UpdateBorrowMoneyState',
'UpdateImageInfoRefState','UpdatePaymentState','UpdateRalationBillValueFunction','MdStringMultiFilter','GetYqddBaseDataWithGroupField',
'ConvertMicrometer','UpdateBillMoneyByDifferenceFunction','UpdateBillMoneyByJKDFunction','GenerateMdData','UpdateJKDSHJE'].forEach((name) => {
'ConvertMicrometer','UpdateBillMoneyByDifferenceFunction','UpdateBillMoneyByJKDFunction','GenerateMdData','UpdateJKDSHJE','CheckInvoiceNoRepeat'].forEach((name) => {
formulaObject[name] = gen()
})
export default formulaObject
\ No newline at end of file
......@@ -46,6 +46,7 @@ import GH_agreeAction from './actions/labourUnion/gh_agreeAction.js';
import GH_rejectAction from './actions/labourUnion/gh_rejectAction.js';
import GH_submitAction from './actions/labourUnion/gh_submitAction.js';
import GH_retrieveAction from './actions/labourUnion/gh_retrieveAction.js';
import saveAction_SH_BXD from './actions/saveAction_SH_BXD.js';
//queryAction
import leafletGenerationAction from './query-actions/leafletGenerationAction.js'
......@@ -277,7 +278,8 @@ export default {
GH_rejectAction,
GH_submitAction,
GH_retrieveAction,
DEQKD_batchEditorAction
DEQKD_batchEditorAction,
saveAction_SH_BXD
},
billControl: {
applyDetail,
......
......@@ -2,7 +2,7 @@
"name": "nvwa",
"index": {
"name": "@gms/gms-entry",
"version": "0.2.93-rbc"
"version": "0.2.96-rbc"
},
"login": {
"name": "@rbc/rbc-login",
......@@ -101,7 +101,7 @@
},
{
"name": "gms-plugin-billexpand",
"version": "0.0.9"
"version": "0.0.11"
},
{
"name": "gms-plugin-mainpage-reimburseBill",
......
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