|
|
|
@ -597,8 +597,10 @@ export const formSchema3: FormSchema[] = [
|
|
|
|
|
let pkgs = 0
|
|
|
|
|
for (let i = 0; i < arr.length; i++) {
|
|
|
|
|
if (isNaN(arr[i])) {
|
|
|
|
|
arr[i] = ''
|
|
|
|
|
return createMessage.warning('请输入正确的数字')
|
|
|
|
|
const letters = arr[i].split(/\d+/).filter(Boolean)
|
|
|
|
|
const numbers = arr[i].split(/[a-zA-Z]+/).filter(Boolean)
|
|
|
|
|
pkgs = pkgs + Number(numbers[0])
|
|
|
|
|
if (letters && letters.length) formModel.kindPkgsName = letters[0]
|
|
|
|
|
} else {
|
|
|
|
|
if (arr[i]) {
|
|
|
|
|
pkgs = pkgs + Number(arr[i])
|
|
|
|
@ -621,32 +623,9 @@ export const formSchema3: FormSchema[] = [
|
|
|
|
|
{
|
|
|
|
|
label: '包装',
|
|
|
|
|
field: 'kindPkgsName',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
// defaultValue: '',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
colProps: { span: 12 },
|
|
|
|
|
componentProps: ({ formActionType, formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
api: GetPackageSelectList,
|
|
|
|
|
labelField: 'packageName',
|
|
|
|
|
valueField: 'packageName',
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
immediate: false,
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
if (e && obj) {
|
|
|
|
|
formModel.kindPkgs = obj.id
|
|
|
|
|
formActionType ? formActionType.submit() : null
|
|
|
|
|
}
|
|
|
|
|
if (!e && !obj) {
|
|
|
|
|
formModel.kindPkgs = null
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
dynamicDisabled: true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '',
|
|
|
|
@ -668,8 +647,8 @@ export const formSchema3: FormSchema[] = [
|
|
|
|
|
let pkgs = 0
|
|
|
|
|
for (let i = 0; i < arr.length; i++) {
|
|
|
|
|
if (isNaN(arr[i])) {
|
|
|
|
|
arr[i] = ''
|
|
|
|
|
return createMessage.warning('请输入正确的数字')
|
|
|
|
|
const numbers = arr[i].split(/[a-zA-Z]+/).filter(Boolean)
|
|
|
|
|
pkgs = pkgs + Number(numbers[0])
|
|
|
|
|
} else {
|
|
|
|
|
if (arr[i]) {
|
|
|
|
|
pkgs = pkgs + Number(arr[i])
|
|
|
|
@ -701,8 +680,8 @@ export const formSchema3: FormSchema[] = [
|
|
|
|
|
let pkgs = 0
|
|
|
|
|
for (let i = 0; i < arr.length; i++) {
|
|
|
|
|
if (isNaN(arr[i])) {
|
|
|
|
|
arr[i] = ''
|
|
|
|
|
return createMessage.warning('请输入正确的数字')
|
|
|
|
|
const numbers = arr[i].split(/[a-zA-Z]+/).filter(Boolean)
|
|
|
|
|
pkgs = pkgs + Number(numbers[0])
|
|
|
|
|
} else {
|
|
|
|
|
if (arr[i]) {
|
|
|
|
|
pkgs = pkgs + Number(arr[i])
|
|
|
|
|