Commit 5c8d2092 by 乔延琦

Merge branch 'develop-yangchen' into 'develop'

科目,工会,审批,创建单据

See merge request GFP/RBC/rbc-frontend!178
parents 90563ee3 3564c808
...@@ -89,7 +89,12 @@ export default { ...@@ -89,7 +89,12 @@ export default {
}, 0); }, 0);
return return
} }
const workflowState = bill.getMasterData().getValue('billState') // 给bill设置默认值
let defaultValueList = this.defaultValueList
for(let item of defaultValueList){
bill.getMasterData().setValue(item.field,item.defaultValue)
}
const workflowState = bill.getMasterData().getValue('billState') // setV
let readArr = this.templateName.endsWith('_A')?[92]:[90,92];//如果是审批界面话,90能编辑 let readArr = this.templateName.endsWith('_A')?[92]:[90,92];//如果是审批界面话,90能编辑
if (this.state != 'readOnly' && readArr.includes(workflowState)) { if (this.state != 'readOnly' && readArr.includes(workflowState)) {
this.state = 'readOnly'; this.state = 'readOnly';
...@@ -102,7 +107,7 @@ export default { ...@@ -102,7 +107,7 @@ export default {
setTimeout(() => { setTimeout(() => {
that.billClass = bill; that.billClass = bill;
GMS.oldBillData = bill.getBuillData(); GMS.oldBillData = bill.getBuillData();
that.oldBillData = bill.getBuillData(); that.oldBillData = bill.getBuillData(); // 单据整体对象
}, 100); }, 100);
}, },
handleCancel() { handleCancel() {
......
...@@ -29,11 +29,7 @@ ...@@ -29,11 +29,7 @@
</template> </template>
<script> <script>
import introduce from "./util/introduce.js";
import bc_input from "./util/bc_input.js"; import bc_input from "./util/bc_input.js";
import stateFormulaMixins from "./util/control-state-formula.js";
import util from "./util/util";
function validateNull(val) { function validateNull(val) {
if (val instanceof Array) { if (val instanceof Array) {
if (val.length === 0) { if (val.length === 0) {
...@@ -205,4 +201,7 @@ export default { ...@@ -205,4 +201,7 @@ export default {
/deep/ .ivu-input-suffix{ /deep/ .ivu-input-suffix{
cursor: pointer; cursor: pointer;
} }
/deep/ .ivu-input{
background:#f3f3f3!important;
}
</style> </style>
\ No newline at end of file
<template> <template>
<div class="input-control-wrapper"> <div class="input-control-wrapper">
<!-- <SubjectModalTree <SubjectModalTree
v-if="!isContent && controlDisplay" v-if="!isContent && controlDisplay"
:systemFlag="systemFlag"
:nodeKey="nodeKey" :nodeKey="nodeKey"
:multiple="define.config.multiple" :multiple="define.config.multiple"
:placeholder="define.config.placeholder" :placeholder="define.config.placeholder"
:entryTitle="define.config.title" :entryTitle="define.config.title"
:modalName="define.config.title" :modalName="define.config.title"
:onlyChooseLeaf="define.config.isLeaf" :onlyChooseLeaf="true"
:defaultExpandAll="defaultExpandAll" :defaultExpandAll="defaultExpandAll"
:lazy="lazy" :lazy="lazy"
:customListFunc="customListFunc" :customListFunc="customListFunc()"
:customTreeFunc="customTreeFunc" :customTreeFunc="customTreeFunc()"
:value="value" :value="value"
ref="subjectModalTree"
@on-subject-selected="subjectSelectedHandler" @on-subject-selected="subjectSelectedHandler"
/> />
<div v-if="isContent"> <div v-if="isContent">
{{ getValue() }} {{ getValue() }}
</div> --> </div>
</div> </div>
</template> </template>
<script> <script>
import input from "../util/bc_input.js"; import input from "../util/bc_input.js";
/* import { SubjectModalTree } from "@yhs/components"; */ import { SubjectModalTree } from "@yhs/components";
export default { export default {
mixins: [input], mixins: [input],
/* components: { components: {
SubjectModalTree, SubjectModalTree,
}, */ },
props: { props: {
rowIndex: { rowIndex: {
type: Number, type: Number,
default: -1, default: -1,
}, },
context: {},
expandConfig: {},
isVxe: {}, isVxe: {},
}, },
data() { data() {
return { return {
systemFlag: "finance",
nodeKey: "code", nodeKey: "code",
multiple: false, multiple: false,
defaultExpandAll: false, defaultExpandAll: false,
lazy: false, lazy: false,
value: "", value: "",
orgcode: "",
username: "",
bookcode: "",
logindate: "",
}; };
}, },
mounted() {
console.log(this.isVxe);
this.addDomListener();
},
methods: { methods: {
addDomListener() {
if (this.isVxe) {
let doms = document.querySelectorAll(".rootClass");
if (doms.length) {
doms.forEach((item) => {
item.addEventListener("scroll", this.refreshPopover);
});
}
}
},
removeDomListener() {
if (this.isVxe) {
let doms = document.querySelectorAll(".rootClass");
if (doms.length) {
doms.forEach((item) => {
item.removeEventListener("scroll", this.refreshPopover);
});
}
}
},
refreshPopover() {
this.$refs.subjectModalTree.$refs.popoverSubject.updatePopper();
},
stopPropagation(event) { stopPropagation(event) {
event.stopPropagation() event.stopPropagation();
}, },
subjectSelectedHandler(selectedObj) { subjectSelectedHandler(selectedObj) {
console.log(selectedObj)
const code = selectedObj.code; const code = selectedObj.code;
const name = selectedObj.name || selectedObj.title const name = selectedObj.name || selectedObj.title;
let nv = code + " " + name; let nv = code + " " + name;
this.value = code; this.value = code;
this.setDataObjectValue(nv); this.setDataObjectValue(nv);
}, },
customListFunc(callback) { splitKey(str = "") {
GMS.$http return String(str).split(".")[1] || "";
.post("/rbc/acct-sys/subject/list", { pagination: false }) },
.then((res) => { getParams() {
console.log(res); let userContext = GMS.userContext || window.nros.getUser();
console.log("userContext===>", userContext);
let loginDate = userContext.loginDate;
let orgCode = userContext.conetxtUser.orgCode;
let userName = userContext.username;
let bookInfoStr =
(userContext.extInfo && userContext.extInfo.bookInfo) || "{}";
let bookInfo = JSON.parse(bookInfoStr);
let bookCode = bookInfo.rbcBookCode;
console.log(loginDate, orgCode, userName, bookCode);
return { loginDate, orgCode, userName, bookCode };
},
customListFunc() {
let { loginDate, orgCode, userName, bookCode } = this.getParams();
console.log(loginDate, orgCode, userName, bookCode);
userName = encodeURIComponent(userName);
let url = `/rbc/acct-sys/subject/list?orgcode=${orgCode}&bookcode=${bookCode}&logindate=${loginDate}&username=${userName}`;
console.log(url);
return (callback) => {
GMS.$http.post(url, { pagination: false }).then((res) => {
let data = res.data.data.rows; let data = res.data.data.rows;
callback(data); callback(data);
}); });
};
}, },
customTreeFunc(callback) { customTreeFunc() {
GMS.$http const { loginDate, orgCode, userName, bookCode } = this.getParams();
.post("/rbc/acct-sys/subject/tree", { pagination: false }) let url = `/rbc/acct-sys/subject/tree?orgcode=${orgCode}&username=${userName}&bookcode=${bookCode}&logindate=${loginDate}`;
.then((res) => { return (callback) => {
console.log(res); GMS.$http.post(url, { pagination: false }).then((res) => {
let data = res.data.data; let data = res.data.data;
callback(data); callback(data);
}); });
};
}, },
getSubjectDataList() {}, getSubjectDataList() {},
getSubjectDataTree() {}, getSubjectDataTree() {},
}, },
beforeDestroy() {
this.removeDomListener();
},
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
...@@ -94,3 +150,18 @@ export default { ...@@ -94,3 +150,18 @@ export default {
} }
} }
</style> </style>
<style>
.el-dialog__wrapper .el-dialog__header {
border-bottom: 1px solid #ccc;
padding: 14px 16px;
line-height: 1;
}
.tree-select-modal .filter-box {
display: none !important;
}
.el-dialog__wrapper .el-dialog__footer {
border-top: 1px solid #ccc;
padding: 12px 18px 12px 18px;
text-align: right;
}
</style>
\ No newline at end of file
...@@ -8,6 +8,7 @@ export default { ...@@ -8,6 +8,7 @@ export default {
} = params; } = params;
let props = column.editRender.props; let props = column.editRender.props;
let define = props.define; let define = props.define;
let expandConfig = props.colItem && props.colItem.expandConfigValue || {}
let context = props.context; let context = props.context;
return [ return [
h(SubjectControl, { h(SubjectControl, {
...@@ -17,6 +18,7 @@ export default { ...@@ -17,6 +18,7 @@ export default {
}, },
props: { props: {
define:define, define:define,
expandConfig:expandConfig,
context:context, context:context,
rowIndex:rowIndex, rowIndex:rowIndex,
isVxe:{width:props.colItem.width,height:props.colItem.height} isVxe:{width:props.colItem.width,height:props.colItem.height}
......
...@@ -2269,7 +2269,43 @@ export default { ...@@ -2269,7 +2269,43 @@ export default {
"title": "末张[last]", "title": "末张[last]",
"value": "last", "value": "last",
"btnDisable": "false" "btnDisable": "false"
} },
{
"discard": false,
"path": "资产/通用",
"extends": {
"param": [
]
},
"description": "",
"title": "工会_同意[GH_agreeAction]",
"value": "GH_agreeAction",
"btnDisable": "false"
},
{
"discard": false,
"path": "资产/通用",
"extends": {
"param": [
]
},
"description": "",
"title": "工会_拒绝[GH_rejectAction]",
"value": "GH_rejectAction",
"btnDisable": "billEdit"
},
{
"discard": false,
"path": "资产/通用",
"extends": {
"param": [
]
},
"description": "",
"title": "工会_提交[GH_submitAction]",
"value": "GH_submitAction",
"btnDisable": "billEdit"
},
], ],
billFormula: [ billFormula: [
{ {
......
...@@ -8,7 +8,6 @@ import './styles/common/normalize.less' ...@@ -8,7 +8,6 @@ import './styles/common/normalize.less'
import '@yhs/icon/iconfont.css' import '@yhs/icon/iconfont.css'
import '@yhs/icon/iconfont.js' import '@yhs/icon/iconfont.js'
import '@yhs/icon/icon.css' import '@yhs/icon/icon.css'
(function() { (function() {
if (window.__rcb_bjcawebsign__) return if (window.__rcb_bjcawebsign__) return
window.__rcb_bjcawebsign__ = true window.__rcb_bjcawebsign__ = true
......
...@@ -11,6 +11,8 @@ export default { ...@@ -11,6 +11,8 @@ export default {
} else { } else {
templateName = param.viewName; templateName = param.viewName;
} }
let defaultValueList = param.defaultValueList
if ( if (
window.osConfig.appOpenMode && window.osConfig.appOpenMode &&
window.osConfig.appOpenMode == "apploader" window.osConfig.appOpenMode == "apploader"
...@@ -23,6 +25,7 @@ export default { ...@@ -23,6 +25,7 @@ export default {
templateName: templateName, templateName: templateName,
init: true, init: true,
state: '', state: '',
defaultValueList,
}, },
{ {
openWay: "FUNCTAB", openWay: "FUNCTAB",
...@@ -35,6 +38,7 @@ export default { ...@@ -35,6 +38,7 @@ export default {
c.init = true; c.init = true;
c.modal_visible = true; c.modal_visible = true;
c.state = '' c.state = ''
c.defaultValueList = defaultValueList
}) })
} }
}, },
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
:state="state" :state="state"
:params="params" :params="params"
:hideButtonGroup="hideButtonGroup" :hideButtonGroup="hideButtonGroup"
:defaultValueList="defaultValueList"
@loadFinish="loadFinishFun" @loadFinish="loadFinishFun"
></gms-bill-form> ></gms-bill-form>
</div> </div>
...@@ -43,6 +44,7 @@ export default { ...@@ -43,6 +44,7 @@ export default {
}; };
}, },
created() { created() {
this.defaultValueList = this.config.defaultValueList || []
this.type = this.config.id ? "load" : "init"; this.type = this.config.id ? "load" : "init";
this.billId = this.config.id; this.billId = this.config.id;
this.state = this.config.state || ''; this.state = this.config.state || '';
...@@ -124,6 +126,11 @@ export default { ...@@ -124,6 +126,11 @@ export default {
}, 0); }, 0);
return return
} }
// 给bill设置默认值
let defaultValueList = this.defaultValueList
for(let item of defaultValueList){
bill.getMasterData().setValue(item.field,item.defaultValue)
}
this.curBill = bill; this.curBill = bill;
const billState = bill.getMasterData().getValue('billState') const billState = bill.getMasterData().getValue('billState')
let readArr = this.templateName.endsWith('_A')?[92]:[90,92];//如果是审批界面话,90能编辑 let readArr = this.templateName.endsWith('_A')?[92]:[90,92];//如果是审批界面话,90能编辑
......
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