系统配置:增加多账户的启用开关,和在相关单据界面进行判断引用

This commit is contained in:
jishenghua 2024-05-06 00:03:53 +08:00
parent b4bb4657db
commit b60cbd3a26
2 changed files with 27 additions and 8 deletions

View File

@ -236,11 +236,18 @@ export const BillModalMixin = {
if(res && res.code === 200) {
let list = res.data.accountList
let lastId = list.length>0?list[0].id:''
list.splice(0,0,{id: 0, name: '多账户'})
that.accountList = list
if(isChecked) {
that.form.setFieldsValue({'accountId': lastId})
}
getCurrentSystemConfig().then((res) => {
if (res.code === 200 && res.data) {
let multiAccountFlag = res.data.multiAccountFlag
if(multiAccountFlag==='1') {
list.splice(0,0,{id: 0, name: '多账户'})
}
}
that.accountList = list
if(isChecked) {
that.form.setFieldsValue({'accountId': lastId})
}
})
}
})
},

View File

@ -116,7 +116,12 @@
<br/>启用后多级审核需配置流程开启后需刷新浏览器才能看到效果<a-button type="link" @click="handleReload">点此刷新</a-button>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :sm="24"></a-col>
<a-col :lg="12" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="多账户">
<a-switch checked-children="启用" un-checked-children="关闭" v-model="multiAccountFlagSwitch" @change="onMultiAccountChange"></a-switch>
启用后采购订单采购入库采购退货销售订单销售出库销售退货等单据的结算账户可以进行多账户选择
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
@ -155,8 +160,8 @@
originalMultiLevelApprovalFlag: '0', //原始多级审核状态
multiBillTypeSelect: [], //单据类型
originalMultiBillTypeSelect: [], //原始单据类型
isReadOnly: false,
isShowApproval: false,
isShowApproval: false, //是否展示多级审核
multiAccountFlagSwitch: false, //多账户审核
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
@ -249,6 +254,9 @@
this.multiBillTypeSelect = record.multiBillType.split(',')
this.originalMultiBillTypeSelect = record.multiBillType
}
if (record.multiAccountFlag != null) {
this.multiAccountFlagSwitch = record.multiAccountFlag == '1' ? true : false;
}
}
} else {
this.$message.info(res.data);
@ -361,6 +369,10 @@
this.model.multiBillType = this.multiBillTypeSelect.join(",")
this.handleChange()
},
onMultiAccountChange(checked) {
this.model.multiAccountFlag = checked?'1':'0'
this.handleChange()
},
//改变内容
handleChange() {
this.confirmLoading = true