Commit d6bb46db by 胡鑫

库存盘点修改

parent 62dbef68
......@@ -66,7 +66,8 @@
// Update button disabled state based on form state
function updateButtonVisibility() {
const hasId = !!state.formModel.id;
const isCompletedOrCancelled = state.formModel.zt === '已完成' || state.formModel.zt === '取消';
const isCompleted = state.formModel.zt === '已完成';
const isCancelled = state.formModel.zt === '取消';
// Find the grid component that contains the buttons
const gridComponent = data.formDataProps.schemas.find(schema => schema.component === 'Grid' && schema.children);
if (gridComponent && gridComponent.children) {
......@@ -74,8 +75,8 @@
gridComponent.children.forEach(child => {
if (child.list && child.list.length > 0) {
child.list.forEach(button => {
// Disable all buttons in view mode or if status is completed or cancelled
if (props.isView || isCompletedOrCancelled) {
if (props.isView || isCancelled) {
// Disable all buttons in view mode or if status is cancelled
button.componentProps.disabled = true;
button.componentProps.isShow = true;
} else if (button.label === '开始盘点') {
......@@ -84,13 +85,13 @@
// Always show the button
button.componentProps.isShow = true;
} else if (['确认盘点', '取消盘点'].includes(button.label)) {
// Disable these buttons in add mode
button.componentProps.disabled = !hasId;
// Disable these buttons in add mode or if status is completed
button.componentProps.disabled = !hasId || isCompleted;
// Always show the buttons
button.componentProps.isShow = true;
} else if (button.label === '处理盈亏') {
// Disable in add mode or when status is not completed
button.componentProps.disabled = !hasId || state.formModel.zt !== '已完成';
button.componentProps.disabled = !hasId || !isCompleted;
// Always show the button
button.componentProps.isShow = true;
}
......
......@@ -755,7 +755,7 @@ export const formProps: FormProps = {
required: false,
rules: [],
events: {},
isShow: true,
isShow: false,
tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2018581306872238081',
style: { width: '100%' },
......@@ -854,7 +854,7 @@ export const formProps: FormProps = {
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
disabled: true,
allowClear: false,
showLabel: true,
required: false,
......@@ -966,7 +966,7 @@ export const formProps: FormProps = {
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
disabled: true,
allowClear: false,
showLabel: true,
required: false,
......
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