Browse Source

发运结算与库存修改/移动tableform的数据唯一判断

master
chenfang 9 months ago
parent
commit
04c789700c
  1. 11
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts
  2. 9
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue
  3. 9
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue
  4. 9
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue

11
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts

@ -1,5 +1,5 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter, formatDate } from '@/utils/formatTime'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index' import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as DeliverRecordMainApi from '@/api/wms/deliverRecordMain' import * as DeliverRecordMainApi from '@/api/wms/deliverRecordMain'
@ -21,6 +21,8 @@ import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import * as CustomerreturnRequestApi from '@/api/wms/customerreturnRequestMain' import * as CustomerreturnRequestApi from '@/api/wms/customerreturnRequestMain'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
const dateTime = new Date().getTime()
console.log(dateTime);
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = { const queryParams = {
@ -84,6 +86,13 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},
{
key: 'createTime', // 查询列表中字段
value: dateTime - 30 * 24 * 60 * 60 * 1000 + "," + dateTime, // 指查询具体值
action: 'betweeen', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
}] }]
} }
} }

9
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue

@ -470,6 +470,15 @@ const flag = ref(false)
// //
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
data.subList = tableData.value // data.subList = tableData.value //
let isExist = false
tableData.value.forEach(item => {
let rs = tableData.value.filter(filterItem => (filterItem.itemCode == item.itemCode))
if(rs.length > 1) isExist = true
})
if (isExist) {
formRef.value.formLoading = false
return message.warning('物料代码重复')
}
data.subList.forEach(obj => { data.subList.forEach(obj => {
if(obj.qty == 0){ if(obj.qty == 0){
message.warning(`数量不能为0!`) message.warning(`数量不能为0!`)

9
src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue

@ -392,6 +392,15 @@ const flag = ref()
// //
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
data.subList = tableData.value // data.subList = tableData.value //
let isExist = false
tableData.value.forEach(item => {
let rs = tableData.value.filter(filterItem => (filterItem.packingNumber == item.packingNumber))
if(rs.length > 1) isExist = true
})
if (isExist) {
formRef.value.formLoading = false
return message.warning('包装号重复')
}
data.subList.forEach(obj => { data.subList.forEach(obj => {
if(obj.toQty == 0){ if(obj.toQty == 0){
message.error(`到数量不能为0!`) message.error(`到数量不能为0!`)

9
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue

@ -561,6 +561,15 @@ const flag = ref()
// //
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
data.subList = tableData.value // data.subList = tableData.value //
let isExist = false
tableData.value.forEach(item => {
let rs = tableData.value.filter(filterItem => (filterItem.packingNumber == item.packingNumber))
if(rs.length > 1) isExist = true
})
if (isExist) {
formRef.value.formLoading = false
return message.warning('包装号重复')
}
data.subList.forEach(item => { data.subList.forEach(item => {
console.log(556565,item); console.log(556565,item);
if(fromInventoryStatus.value){ if(fromInventoryStatus.value){

Loading…
Cancel
Save