Browse Source

update

master
wanggang 1 year ago
parent
commit
acfd05815f
  1. 10
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/utils/validation.js
  2. 18
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js

10
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/utils/validation.js

@ -159,4 +159,12 @@ const getRules = (parentSchema, property, data) => {
//Object.assign(Schema.messages, messages);
//Object.assign(Schema.validators, validators);
export { getRules };
function required() {
return { required: true };
}
function trim(message) {
return { pattern: "^(?!\\s).*(?<!\\s)$", message: message ?? "无效的空格字符", trigger: "blur" };
}
export { getRules, required, trim };

18
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js

@ -6,8 +6,8 @@ import AppForm from "../../components/form/index.js";
import AppTable from "../../components/table/index.js";
import extraProperties from "../../models/_extraProperties.js";
import { getUrl } from "../../request/index.js";
import { ElMessage } from "element-plus";
import businessTypes from "../../models/_options.js";
import { required, trim } from "../../utils/validation.js";
export default {
components: { AppForm, AppTable },
@ -54,7 +54,7 @@ export default {
</span>
</template>
</el-drawer>
<el-dialog class="re-open" v-model="setupDialogVisable" :close-on-click-modal="false" align-center destroy-on-close style="width:100%;height:100%" @closed="drawerClosed">
<el-dialog class="re-open" v-model="setupDialogVisable" :close-on-click-modal="false" align-center destroy-on-close style="width:100%;height:100%">
<template #header>发票重开</template>
<el-steps :active="setupRef" align-center style="height:60px;">
<el-step title="调整明细列表" />
@ -193,7 +193,7 @@ export default {
}
</style>`,
props: ["modelValue", "row", "data", "isBusiness", "businessType"],
emit: ["update:modelValue", "complete"],
emits: ["update:modelValue", "complete"],
setup(props, context) {
const show = ref(props.modelValue);
watch(show, (value) => context.emit("update:modelValue", value));
@ -452,35 +452,35 @@ export default {
invBillNum: {
type: "string",
title: "发票号",
rules: [{ required: true }],
rules: [required(), trim()],
default: props.data.invbillNum,
},
settleDate: {
type: "string",
title: "下线日期",
input: "datetime",
rules: [{ required: true }],
rules: [required()],
},
lu: {
type: "string",
title: "零件号",
rules: [{ required: true }],
rules: [required(), trim()],
},
pn: {
type: "string",
title: "标识号",
rules: [{ required: true }],
rules: [required(), trim()],
},
qty: {
type: "string",
title: "数量",
input: "number",
rules: [{ required: true }],
rules: [required()],
},
groupNum: {
type: "string",
title: "结算分组",
rules: [{ required: true }],
rules: [required(), trim()],
},
},
};

Loading…
Cancel
Save