Commit 2aea26f5 by yangchen

创建单据增加默认值

parent daf1dbd8
......@@ -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
......@@ -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