Commit a6311a52 by qiaoyanqi

Merge branch 'develop' of http://nvwa.jiuqi.com.cn/gitlab/GFP/RBC/rbc-frontend into develop

parents dd97e8d1 7b7260fd
......@@ -89,7 +89,12 @@ export default {
}, 0);
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能编辑
if (this.state != 'readOnly' && readArr.includes(workflowState)) {
this.state = 'readOnly';
......@@ -102,7 +107,7 @@ export default {
setTimeout(() => {
that.billClass = bill;
GMS.oldBillData = bill.getBuillData();
that.oldBillData = bill.getBuillData();
that.oldBillData = bill.getBuillData(); // 单据整体对象
}, 100);
},
handleCancel() {
......
......@@ -29,11 +29,7 @@
</template>
<script>
import introduce from "./util/introduce.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) {
if (val instanceof Array) {
if (val.length === 0) {
......@@ -205,4 +201,7 @@ export default {
/deep/ .ivu-input-suffix{
cursor: pointer;
}
/deep/ .ivu-input{
background:#f3f3f3!important;
}
</style>
\ No newline at end of file
......@@ -15,7 +15,7 @@
v-for="(item,index) in baseDataList"
:key="item.code"
:value="item.code"
@click="handleMainSearchSelectClick(item)"
@mousedown="handleMainSearchSelectClick(item)"
>
<span class="acct-search-label">{{ getLable(item) }}</span>
</li>
......@@ -165,7 +165,6 @@ export default {
},
'groupTableName.define.showFields': {
handler(nv) {
console.log({nv})
let choiceColumns = this.groupTableName.define.choiceColumns;
let column = nv.filter(item => item.isQueryColumn && choiceColumns.indexOf(item.columnName)>-1);
let width = 0
......@@ -287,10 +286,33 @@ export default {
this.getBaseDataList()
},
handleBlur() {
if (!this.onResultList) {
this.hasFocus = false
this.dataListShow = false
if (this.onResultList) {
this.$refs.searchInput.focus()
return
}
if (
this.selectIndex >= 0
&& this.selectIndex < this.baseDataList.length
) {
this.selectValue = this.baseDataList[this.selectIndex].name
this.value = this.baseDataList[this.selectIndex]
this.selectedItem = this.baseDataList[this.selectIndex]
this.$emit('data-change', this.value)
this.selectIndex = -1
}
else if (
this.selectValue != this.selectedItem.code
&& this.selectValue != this.selectedItem.name
) {
this.clearList()
}
else {
this.$emit('data-change', this.value)
}
this.hasFocus = false
this.dataListShow = false
},
// 输入查询时
handleChange() {
......@@ -402,9 +424,10 @@ export default {
this.selectValue = item.code
this.hasFocus = false
this.dataListShow = false
this.onResultList = false
this.value = item
this.selectedItem = item
this.$emit('data-change', this.value)
this.handleSelected()
},
// 列表上、下、回车
handleSelectPrev() {
......@@ -424,17 +447,6 @@ export default {
}
},
handleSelected() {
for (var i = 0; i < this.baseDataList.length; i++) {
if (this.selectIndex === i) {
this.selectValue = this.baseDataList[i].code
this.value = this.baseDataList[i]
this.selectedItem = this.baseDataList[i]
}
}
this.hasFocus = false
this.dataListShow = false
this.$emit('data-change', this.value)
this.selectIndex = -1
this.$refs.searchInput.blur()
},
// 查找索引位置
......@@ -456,9 +468,15 @@ export default {
this.$emit('data-change', this.value)
},
onSelectOk(value) {
this.selection = value
let result = this.getReturnInfo()
this.sendEvent(result)
if (this.multiple) {
this.selection = value
let result = this.getReturnInfo()
this.sendEvent(result)
}
else if (value && value.length) {
this.handleMainSearchSelectClick(value[0])
}
},
},
}
......
<template>
<div class="input-control-wrapper">
<!-- <SubjectModalTree
<SubjectModalTree
v-if="!isContent && controlDisplay"
:systemFlag="systemFlag"
:nodeKey="nodeKey"
:multiple="define.config.multiple"
:placeholder="define.config.placeholder"
:entryTitle="define.config.title"
:modalName="define.config.title"
:onlyChooseLeaf="define.config.isLeaf"
:onlyChooseLeaf="true"
:defaultExpandAll="defaultExpandAll"
:lazy="lazy"
:customListFunc="customListFunc"
:customTreeFunc="customTreeFunc"
:customListFunc="customListFunc()"
:customTreeFunc="customTreeFunc()"
:value="value"
ref="subjectModalTree"
@on-subject-selected="subjectSelectedHandler"
/>
<div v-if="isContent">
{{ getValue() }}
</div> -->
</div>
</div>
</template>
<script>
import input from "../util/bc_input.js";
/* import { SubjectModalTree } from "@yhs/components"; */
import { SubjectModalTree } from "@yhs/components";
export default {
mixins: [input],
/* components: {
components: {
SubjectModalTree,
}, */
},
props: {
rowIndex: {
type: Number,
default: -1,
},
context: {},
expandConfig: {},
isVxe: {},
},
data() {
return {
systemFlag: "finance",
nodeKey: "code",
multiple: false,
defaultExpandAll: false,
lazy: false,
value: "",
orgcode: "",
username: "",
bookcode: "",
logindate: "",
};
},
mounted() {
console.log(this.isVxe);
this.addDomListener();
},
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) {
event.stopPropagation()
event.stopPropagation();
},
subjectSelectedHandler(selectedObj) {
console.log(selectedObj)
const code = selectedObj.code;
const name = selectedObj.name || selectedObj.title
const name = selectedObj.name || selectedObj.title;
let nv = code + " " + name;
this.value = code;
this.setDataObjectValue(nv);
},
customListFunc(callback) {
GMS.$http
.post("/rbc/acct-sys/subject/list", { pagination: false })
.then((res) => {
console.log(res);
splitKey(str = "") {
return String(str).split(".")[1] || "";
},
getParams() {
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;
callback(data);
});
};
},
customTreeFunc(callback) {
GMS.$http
.post("/rbc/acct-sys/subject/tree", { pagination: false })
.then((res) => {
console.log(res);
customTreeFunc() {
const { loginDate, orgCode, userName, bookCode } = this.getParams();
let url = `/rbc/acct-sys/subject/tree?orgcode=${orgCode}&username=${userName}&bookcode=${bookCode}&logindate=${loginDate}`;
return (callback) => {
GMS.$http.post(url, { pagination: false }).then((res) => {
let data = res.data.data;
callback(data);
});
};
},
getSubjectDataList() {},
getSubjectDataTree() {},
},
beforeDestroy() {
this.removeDomListener();
},
};
</script>
<style lang="less" scoped>
......@@ -93,4 +149,19 @@ export default {
transform: translate(0, -50%);
}
}
</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 {
} = params;
let props = column.editRender.props;
let define = props.define;
let expandConfig = props.colItem && props.colItem.expandConfigValue || {}
let context = props.context;
return [
h(SubjectControl, {
......@@ -17,6 +18,7 @@ export default {
},
props: {
define:define,
expandConfig:expandConfig,
context:context,
rowIndex:rowIndex,
isVxe:{width:props.colItem.width,height:props.colItem.height}
......
......@@ -2269,7 +2269,43 @@ export default {
"title": "末张[last]",
"value": "last",
"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: [
{
......
......@@ -8,7 +8,6 @@ import './styles/common/normalize.less'
import '@yhs/icon/iconfont.css'
import '@yhs/icon/iconfont.js'
import '@yhs/icon/icon.css'
(function() {
if (window.__rcb_bjcawebsign__) return
window.__rcb_bjcawebsign__ = true
......
......@@ -11,6 +11,8 @@ export default {
} else {
templateName = param.viewName;
}
let defaultValueList = param.defaultValueList
if (
window.osConfig.appOpenMode &&
window.osConfig.appOpenMode == "apploader"
......@@ -23,6 +25,7 @@ export default {
templateName: templateName,
init: true,
state: '',
defaultValueList,
},
{
openWay: "FUNCTAB",
......@@ -35,6 +38,7 @@ export default {
c.init = true;
c.modal_visible = true;
c.state = ''
c.defaultValueList = defaultValueList
})
}
},
......
......@@ -8,6 +8,7 @@
:state="state"
:params="params"
:hideButtonGroup="hideButtonGroup"
:defaultValueList="defaultValueList"
@loadFinish="loadFinishFun"
></gms-bill-form>
</div>
......@@ -43,6 +44,7 @@ export default {
};
},
created() {
this.defaultValueList = this.config.defaultValueList || []
this.type = this.config.id ? "load" : "init";
this.billId = this.config.id;
this.state = this.config.state || '';
......@@ -124,6 +126,11 @@ export default {
}, 0);
return
}
// 给bill设置默认值
let defaultValueList = this.defaultValueList
for(let item of defaultValueList){
bill.getMasterData().setValue(item.field,item.defaultValue)
}
this.curBill = bill;
const billState = bill.getMasterData().getValue('billState')
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