陈薪名 1 year ago
parent
commit
46ec303d77
  1. 1
      src/utils/dict.ts
  2. 11
      src/views/wms/basicDataManage/customerManage/customer/customer.data.ts
  3. 5
      src/views/wms/basicDataManage/customerManage/customerdock/customerdock.data.ts
  4. 32
      src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts
  5. 20
      src/views/wms/basicDataManage/customerManage/customeritem/index.vue
  6. 1
      src/views/wms/basicDataManage/documentSetting/documentsetting/documentsetting.data.ts
  7. 5
      src/views/wms/basicDataManage/factoryModeling/dock/dock.data.ts
  8. 11
      src/views/wms/basicDataManage/orderManage/carrier/carrier.data.ts
  9. 11
      src/views/wms/basicDataManage/orderManage/owner/owner.data.ts
  10. 8
      src/views/wms/basicDataManage/orderManage/shift/shift.data.ts
  11. 8
      src/views/wms/basicDataManage/strategySetting/configurationsetting/index.vue
  12. 8
      src/views/wms/basicDataManage/strategySetting/paramsetting/index.vue
  13. 3
      src/views/wms/basicDataManage/strategySetting/strategy/arrivalInspectionStrategy/index.vue
  14. 3
      src/views/wms/basicDataManage/strategySetting/strategy/batchStrategy/index.vue
  15. 3
      src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/index.vue
  16. 3
      src/views/wms/basicDataManage/strategySetting/strategy/inspectStrategy/index.vue
  17. 3
      src/views/wms/basicDataManage/strategySetting/strategy/manageAccuracyStrategy/index.vue
  18. 3
      src/views/wms/basicDataManage/strategySetting/strategy/purchaseReceiptStrategy/index.vue
  19. 3
      src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/index.vue
  20. 3
      src/views/wms/basicDataManage/strategySetting/strategy/storageCapacityStrategy/index.vue
  21. 3
      src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/index.vue
  22. 3
      src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/index.vue
  23. 3
      src/views/wms/basicDataManage/strategySetting/strategy/utensilCapacityStrategy/index.vue
  24. 3
      src/views/wms/basicDataManage/strategySetting/strategy/warehouseStorageStrategy/index.vue
  25. 11
      src/views/wms/basicDataManage/supplierManage/supplier/supplier.data.ts
  26. 5
      src/views/wms/basicDataManage/systemSetting/currencyexchange/currencyexchange.data.ts
  27. 33
      src/views/wms/basicDataManage/systemSetting/currencyexchange/index.vue
  28. 26
      src/views/wms/basicDataManage/systemSetting/systemcalendar/index.vue

1
src/utils/dict.ts

@ -194,6 +194,7 @@ export enum DICT_TYPE {
ITEM_CONFIGURATION = 'item_configuration', // 物品配置
EQ_LEVEL = 'eq_level', // 质量等级
CURRENCY = 'currency', // 货币
BASIC_CURRENCY = 'basic_currency', // 货币
SUPPLIER_TYPE = 'supplier_type', // 供应商类型
CUSTOMER_TYPE = 'customer_type', // 客户类型
OWNER_TYPE = 'owner_type', // 货主类型

11
src/views/wms/basicDataManage/customerManage/customer/customer.data.ts

@ -2,6 +2,8 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
const { t } = useI18n() // 国际化
import {validateHanset,validateFax,validatePostCode} from '@/utils/validator'
/**
* @returns {Array}
*/
@ -274,13 +276,16 @@ export const CustomerRules = reactive({
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
phone: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateHanset, message: '请输入正确的手机号', trigger: 'blur'}
],
fax: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateFax, message: '请输入正确的传真', trigger: 'blur'}
],
postId: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validatePostCode, message: '请输入正确的邮编', trigger: 'blur'}
],
contacts: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }

5
src/views/wms/basicDataManage/customerManage/customerdock/customerdock.data.ts

@ -2,6 +2,8 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
const { t } = useI18n() // 国际化
import {validateHanset} from '@/utils/validator'
/**
* @returns {Array}
*/
@ -230,7 +232,8 @@ export const CustomerdockRules = reactive({
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
contactPhone: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateHanset, message: '请输入正确的手机号', trigger: 'blur'}
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }

32
src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts

@ -1,5 +1,12 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as CustomerApi from '@/api/wms/customer'
import { Customer } from '../customer/customer.data'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '../../itemManage/itembasic/itembasic.data'
const { t } = useI18n() // 国际化
/**
@ -14,6 +21,17 @@ export const Customeritem = useCrudSchemas(reactive<CrudSchema[]>([
width: 150,
fixed: 'left'
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择客户代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '客户信息', // 查询弹窗标题
searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类
searchPage: CustomerApi.getCustomerPage // 查询弹窗所需分页方法
}
},
isSearch: true
},
{
@ -23,6 +41,17 @@ export const Customeritem = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物品代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物品基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage // 查询弹窗所需分页方法
}
},
isSearch: true
},
{
@ -55,7 +84,8 @@ export const Customeritem = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'InputNumber',
componentProps: {
min: 0
min: 0,
precision: 6
}
},
},

20
src/views/wms/basicDataManage/customerManage/customeritem/index.vue

@ -43,8 +43,7 @@
ref="basicFormRef"
@success="formsSuccess"
:rules="CustomeritemRules"
:formAllSchemas="Customeritem.allSchemas"
:searchTableParams="searchTableParams"
:formAllSchemas="Customeritem.allSchemas"
:apiUpdate="CustomeritemApi.updateCustomeritem"
:apiCreate="CustomeritemApi.createCustomeritem"
@searchTableSuccess="searchTableSuccess"
@ -61,12 +60,8 @@
<script setup lang="ts">
import download from '@/utils/download'
import * as CustomeritemApi from '@/api/wms/customeritem'
import * as ItembasicApi from '@/api/wms/itembasic'
import * as CustomerApi from '@/api/wms/customer'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import { Customeritem, CustomeritemRules } from './customeritem.data'
import { Customer } from '../customer/customer.data'
import { Itembasic } from '../../itemManage/itembasic/itembasic.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
@ -87,19 +82,6 @@ const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableParams = ref([{
formField: 'customerCode',
searchTableTitle: '客户信息',
searchTableAllSchemas: Customer.allSchemas,
searchTablePage: CustomerApi.getCustomerPage
},{
formField: 'itemCode',
searchTableTitle: '物料信息',
searchTableAllSchemas: Itembasic.allSchemas,
searchTablePage: ItembasicApi.getItembasicPage
}])
const { tableObject, tableMethods } = useTable({
getListApi: CustomeritemApi.getCustomeritemPage //
})

1
src/views/wms/basicDataManage/documentSetting/documentsetting/documentsetting.data.ts

@ -223,6 +223,7 @@ export const DocumentsettingRules = reactive({
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
description: [
{ required: true, message: '请输入描述', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
type: [

5
src/views/wms/basicDataManage/factoryModeling/dock/dock.data.ts

@ -7,6 +7,8 @@ import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import {validateHanset} from '@/utils/validator'
const { t } = useI18n() // 国际化
/**
@ -250,7 +252,8 @@ export const DockRules = reactive({
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
contactPhone: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateHanset, message: '请输入正确的手机号', trigger: 'blur'}
],
type: [
{ required: true, message: '请输入类型', trigger: 'change' }

11
src/views/wms/basicDataManage/orderManage/carrier/carrier.data.ts

@ -2,6 +2,8 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
const { t } = useI18n() // 国际化
import {validateHanset,validateFax,validatePostCode} from '@/utils/validator'
/**
* @returns {Array}
*/
@ -277,13 +279,16 @@ export const CarrierRules = reactive({
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
phone: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateHanset, message: '请输入正确的手机号', trigger: 'blur'}
],
fax: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateFax, message: '请输入正确的传真', trigger: 'blur'}
],
postId: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validatePostCode, message: '请输入正确的邮编', trigger: 'blur'}
],
contacts: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }

11
src/views/wms/basicDataManage/orderManage/owner/owner.data.ts

@ -2,6 +2,8 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
const { t } = useI18n() // 国际化
import {validateHanset,validateFax,validatePostCode} from '@/utils/validator'
/**
* @returns {Array}
*/
@ -273,13 +275,16 @@ export const OwnerRules = reactive({
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
phone: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateHanset, message: '请输入正确的手机号', trigger: 'blur'}
],
fax: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateFax, message: '请输入正确的传真', trigger: 'blur'}
],
postId: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validatePostCode, message: '请输入正确的邮编', trigger: 'blur'}
],
contacts: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }

8
src/views/wms/basicDataManage/orderManage/shift/shift.data.ts

@ -68,6 +68,14 @@ export const Shift = useCrudSchemas(reactive<CrudSchema[]>([
}
},
isSearch: true,
search: {
show: true,
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
}
}
},
{
label: '是否跨天',

8
src/views/wms/basicDataManage/strategySetting/configurationsetting/index.vue

@ -29,7 +29,7 @@
>
<template #strategyType="{row}">
<el-button type="primary" link @click="openDetail(row, '策略类型', row.strategyType)">
<span>{{ row.strategyType }}</span>
<span>{{ formatter(row.strategyType) }}</span>
</el-button>
</template>
<template #action="{ row }">
@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
defineOptions({ name: 'Configurationsetting' })
@ -202,7 +203,10 @@ const searchFormClick = (searchData) => {
}
getList() //
}
const formatter = (type)=>{
let str = getStrDictOptions(DICT_TYPE.STRATEGY_TYPE).filter(item=>type==item.value)[0].label;
return str
}
/** 初始化 **/
onMounted(async() => {
getList()

8
src/views/wms/basicDataManage/strategySetting/paramsetting/index.vue

@ -29,7 +29,7 @@
>
<template #strategyType="{row}">
<el-button type="primary" link @click="openDetail(row, '策略类型', row.strategyType)">
<span>{{ row.strategyType }}</span>
<span>{{ formatter(row.strategyType) }}</span>
</el-button>
</template>
<template #action="{ row }">
@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
defineOptions({ name: 'Paramsetting' })
@ -202,7 +203,10 @@ const searchFormClick = (searchData) => {
}
getList() //
}
const formatter = (type)=>{
let str = getStrDictOptions(DICT_TYPE.STRATEGY_TYPE).filter(item=>type==item.value)[0].label;
return str
}
/** 初始化 **/
onMounted(async() => {
getList()

3
src/views/wms/basicDataManage/strategySetting/strategy/arrivalInspectionStrategy/index.vue

@ -8,8 +8,7 @@
class="!w-240px" />
</el-form-item>
<el-form-item label="优先级" prop="priority">
<el-input v-model="queryParams.priority" placeholder="请输入优先级" clearable @keyup.enter="handleQuery"
class="!w-240px" />
<el-input v-model.number="queryParams.priority" type="number" oninput ="value=value.replace(/[^\d]/g,'')" placeholder="请输入优先级" clearable @keyup.enter="handleQuery" class="!w-240px" />
</el-form-item>
<el-form-item>
<el-button type="info" plain @click="handleQuery">

3
src/views/wms/basicDataManage/strategySetting/strategy/batchStrategy/index.vue

@ -8,8 +8,7 @@
class="!w-240px" />
</el-form-item>
<el-form-item label="优先级" prop="priority">
<el-input v-model="queryParams.priority" placeholder="请输入优先级" clearable @keyup.enter="handleQuery"
class="!w-240px" />
<el-input v-model.number="queryParams.priority" type="number" oninput ="value=value.replace(/[^\d]/g,'')" placeholder="请输入优先级" clearable @keyup.enter="handleQuery" class="!w-240px" />
</el-form-item>
<el-form-item>
<el-button type="info" plain @click="handleQuery">

3
src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/index.vue

@ -8,8 +8,7 @@
class="!w-240px" />
</el-form-item>
<el-form-item label="优先级" prop="priority">
<el-input v-model="queryParams.priority" placeholder="请输入优先级" clearable @keyup.enter="handleQuery"
class="!w-240px" />
<el-input v-model.number="queryParams.priority" type="number" oninput ="value=value.replace(/[^\d]/g,'')" placeholder="请输入优先级" clearable @keyup.enter="handleQuery" class="!w-240px" />
</el-form-item>
<el-form-item>
<el-button type="info" plain @click="handleQuery">

3
src/views/wms/basicDataManage/strategySetting/strategy/inspectStrategy/index.vue

@ -8,8 +8,7 @@
class="!w-240px" />
</el-form-item>
<el-form-item label="优先级" prop="priority">
<el-input v-model="queryParams.priority" placeholder="请输入优先级" clearable @keyup.enter="handleQuery"
class="!w-240px" />
<el-input v-model.number="queryParams.priority" type="number" oninput ="value=value.replace(/[^\d]/g,'')" placeholder="请输入优先级" clearable @keyup.enter="handleQuery" class="!w-240px" />
</el-form-item>
<el-form-item>
<el-button type="info" plain @click="handleQuery">

3
src/views/wms/basicDataManage/strategySetting/strategy/manageAccuracyStrategy/index.vue

@ -8,8 +8,7 @@
class="!w-240px" />
</el-form-item>
<el-form-item label="优先级" prop="priority">
<el-input v-model="queryParams.priority" placeholder="请输入优先级" clearable @keyup.enter="handleQuery"
class="!w-240px" />
<el-input v-model.number="queryParams.priority" type="number" oninput ="value=value.replace(/[^\d]/g,'')" placeholder="请输入优先级" clearable @keyup.enter="handleQuery" class="!w-240px" />
</el-form-item>
<el-form-item>
<el-button type="info" plain @click="handleQuery">

3
src/views/wms/basicDataManage/strategySetting/strategy/purchaseReceiptStrategy/index.vue

@ -9,8 +9,7 @@
class="!w-240px" />
</el-form-item>
<el-form-item label="优先级" prop="priority">
<el-input v-model="queryParams.priority" placeholder="请输入优先级" clearable @keyup.enter="handleQuery"
class="!w-240px" />
<el-input v-model.number="queryParams.priority" type="number" oninput ="value=value.replace(/[^\d]/g,'')" placeholder="请输入优先级" clearable @keyup.enter="handleQuery" class="!w-240px" />
</el-form-item>
<el-form-item>
<el-button type="info" plain @click="handleQuery">

3
src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/index.vue

@ -8,8 +8,7 @@
class="!w-240px" />
</el-form-item>
<el-form-item label="优先级" prop="priority">
<el-input v-model="queryParams.priority" placeholder="请输入优先级" clearable @keyup.enter="handleQuery"
class="!w-240px" />
<el-input v-model.number="queryParams.priority" type="number" oninput ="value=value.replace(/[^\d]/g,'')" placeholder="请输入优先级" clearable @keyup.enter="handleQuery" class="!w-240px" />
</el-form-item>
<el-form-item>
<el-button type="info" plain @click="handleQuery">

3
src/views/wms/basicDataManage/strategySetting/strategy/storageCapacityStrategy/index.vue

@ -8,8 +8,7 @@
class="!w-240px" />
</el-form-item>
<el-form-item label="优先级" prop="priority">
<el-input v-model="queryParams.priority" placeholder="请输入优先级" clearable @keyup.enter="handleQuery"
class="!w-240px" />
<el-input v-model.number="queryParams.priority" type="number" oninput ="value=value.replace(/[^\d]/g,'')" placeholder="请输入优先级" clearable @keyup.enter="handleQuery" class="!w-240px" />
</el-form-item>
<el-form-item>
<el-button type="info" plain @click="handleQuery">

3
src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/index.vue

@ -9,8 +9,7 @@
class="!w-240px" />
</el-form-item>
<el-form-item label="优先级" prop="priority">
<el-input v-model="queryParams.priority" placeholder="请输入优先级" clearable @keyup.enter="handleQuery"
class="!w-240px" />
<el-input v-model.number="queryParams.priority" type="number" oninput ="value=value.replace(/[^\d]/g,'')" placeholder="请输入优先级" clearable @keyup.enter="handleQuery" class="!w-240px" />
</el-form-item>
<el-form-item>
<el-button type="info" plain @click="handleQuery">

3
src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/index.vue

@ -9,8 +9,7 @@
class="!w-240px" />
</el-form-item>
<el-form-item label="优先级" prop="priority">
<el-input v-model="queryParams.priority" placeholder="请输入优先级" clearable @keyup.enter="handleQuery"
class="!w-240px" />
<el-input v-model.number="queryParams.priority" type="number" oninput ="value=value.replace(/[^\d]/g,'')" placeholder="请输入优先级" clearable @keyup.enter="handleQuery" class="!w-240px" />
</el-form-item>
<el-form-item>
<el-button type="info" plain @click="handleQuery">

3
src/views/wms/basicDataManage/strategySetting/strategy/utensilCapacityStrategy/index.vue

@ -8,8 +8,7 @@
class="!w-240px" />
</el-form-item>
<el-form-item label="优先级" prop="priority">
<el-input v-model="queryParams.priority" placeholder="请输入优先级" clearable @keyup.enter="handleQuery"
class="!w-240px" />
<el-input v-model.number="queryParams.priority" type="number" oninput ="value=value.replace(/[^\d]/g,'')" placeholder="请输入优先级" clearable @keyup.enter="handleQuery" class="!w-240px" />
</el-form-item>
<el-form-item>
<el-button type="info" plain @click="handleQuery">

3
src/views/wms/basicDataManage/strategySetting/strategy/warehouseStorageStrategy/index.vue

@ -9,8 +9,7 @@
class="!w-240px" />
</el-form-item>
<el-form-item label="优先级" prop="priority">
<el-input v-model="queryParams.priority" placeholder="请输入优先级" clearable @keyup.enter="handleQuery"
class="!w-240px" />
<el-input v-model.number="queryParams.priority" type="number" oninput ="value=value.replace(/[^\d]/g,'')" placeholder="请输入优先级" clearable @keyup.enter="handleQuery" class="!w-240px" />
</el-form-item>
<el-form-item>
<el-button type="info" plain @click="handleQuery">

11
src/views/wms/basicDataManage/supplierManage/supplier/supplier.data.ts

@ -2,6 +2,8 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
const { t } = useI18n() // 国际化
import {validateHanset,validateFax,validatePostCode} from '@/utils/validator'
/**
* @returns {Array}
*/
@ -270,13 +272,16 @@ export const SupplierRules = reactive({
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
phone: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateHanset, message: '请输入正确的手机号', trigger: 'blur'}
],
fax: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateFax, message: '请输入正确的传真', trigger: 'blur'}
],
postId: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validatePostCode, message: '请输入正确的邮编', trigger: 'blur'}
],
contacts: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }

5
src/views/wms/basicDataManage/systemSetting/currencyexchange/currencyexchange.data.ts

@ -22,7 +22,7 @@ export const Currencyexchange = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '基础货币',
field: 'basiccurrency',
dictType: DICT_TYPE.CURRENCY,
dictType: DICT_TYPE.BASIC_CURRENCY,
dictClass: 'string',
isSearch: true,
isTable: true,
@ -41,7 +41,8 @@ export const Currencyexchange = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'InputNumber',
componentProps: {
min: 0
min: 0,
precision:6
}
},
},

33
src/views/wms/basicDataManage/systemSetting/currencyexchange/index.vue

@ -41,7 +41,7 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="getList"
@success="formsSuccess"
:rules="CurrencyexchangeRules"
:formAllSchemas="Currencyexchange.allSchemas"
:apiUpdate="CurrencyexchangeApi.updateCurrencyexchange"
@ -145,6 +145,30 @@ const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =Currencyexchange.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await CurrencyexchangeApi.createCurrencyexchange(data)
message.success(t('common.createSuccess'))
} else {
await CurrencyexchangeApi.updateCurrencyexchange(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
@ -203,10 +227,9 @@ const searchFormClick = (searchData) => {
}
getList() //
}
const formatter = (currency)=>{
console.log(getStrDictOptions(DICT_TYPE.CURRENCY))
let currencyStr = getStrDictOptions(DICT_TYPE.CURRENCY).filter(item=>currency==item.value)[0].label;
return currencyStr
const formatter = (type)=>{
let str = getStrDictOptions(DICT_TYPE.CURRENCY).filter(item=>type==item.value)[0].label;
return str
}
/** 初始化 **/
onMounted(async() => {

26
src/views/wms/basicDataManage/systemSetting/systemcalendar/index.vue

@ -41,7 +41,7 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="getList"
@success="formsSuccess"
:rules="SystemcalendarRules"
:formAllSchemas="Systemcalendar.allSchemas"
:apiUpdate="SystemcalendarApi.updateSystemcalendar"
@ -144,6 +144,30 @@ const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =Systemcalendar.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await SystemcalendarApi.createSystemcalendar(data)
message.success(t('common.createSuccess'))
} else {
await SystemcalendarApi.updateSystemcalendar(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {

Loading…
Cancel
Save