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

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) { if(res && res.code === 200) {
let list = res.data.accountList let list = res.data.accountList
let lastId = list.length>0?list[0].id:'' let lastId = list.length>0?list[0].id:''
list.splice(0,0,{id: 0, name: '多账户'}) getCurrentSystemConfig().then((res) => {
that.accountList = list if (res.code === 200 && res.data) {
if(isChecked) { let multiAccountFlag = res.data.multiAccountFlag
that.form.setFieldsValue({'accountId': lastId}) 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> <br/>(启用后,多级审核需配置流程,开启后需刷新浏览器才能看到效果)<a-button type="link" @click="handleReload">点此刷新</a-button>
</a-form-item> </a-form-item>
</a-col> </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-row>
</a-form> </a-form>
</a-spin> </a-spin>
@@ -155,8 +160,8 @@
originalMultiLevelApprovalFlag: '0', //原始多级审核状态 originalMultiLevelApprovalFlag: '0', //原始多级审核状态
multiBillTypeSelect: [], //单据类型 multiBillTypeSelect: [], //单据类型
originalMultiBillTypeSelect: [], //原始单据类型 originalMultiBillTypeSelect: [], //原始单据类型
isReadOnly: false, isShowApproval: false, //是否展示多级审核
isShowApproval: false, multiAccountFlagSwitch: false, //多账户审核
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 5 }, sm: { span: 5 },
@@ -249,6 +254,9 @@
this.multiBillTypeSelect = record.multiBillType.split(',') this.multiBillTypeSelect = record.multiBillType.split(',')
this.originalMultiBillTypeSelect = record.multiBillType this.originalMultiBillTypeSelect = record.multiBillType
} }
if (record.multiAccountFlag != null) {
this.multiAccountFlagSwitch = record.multiAccountFlag == '1' ? true : false;
}
} }
} else { } else {
this.$message.info(res.data); this.$message.info(res.data);
@@ -361,6 +369,10 @@
this.model.multiBillType = this.multiBillTypeSelect.join(",") this.model.multiBillType = this.multiBillTypeSelect.join(",")
this.handleChange() this.handleChange()
}, },
onMultiAccountChange(checked) {
this.model.multiAccountFlag = checked?'1':'0'
this.handleChange()
},
//改变内容 //改变内容
handleChange() { handleChange() {
this.confirmLoading = true this.confirmLoading = true