Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

master_hella_20240701
zhaoxuebing 8 months ago
parent
commit
469350111e
  1. 36
      src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue
  2. 31
      src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts

36
src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue

@ -149,7 +149,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
})
if (res) tableData.value = res
// tableform
DeliverRequestDetail.allSchemas.tableFormColumns.map(item => {
StockupDetailRequest.allSchemas.tableFormColumns.map(item => {
if(item.field == 'itemCode') {
item.isInpuFocusShow = false
item.tableForm.isInpuFocusShow = false
@ -423,24 +423,24 @@ const submitForm = async (formType, data) => {
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 => {
// if(obj.qty == 0){
// message.warning(`0!`)
// flag.value = true
// return;
// }
let rs = tableData.value.filter(filterItem => (filterItem.itemCode == item.itemCode))
if(rs.length > 1) isExist = true
})
// if(flag.value){
// formRef.value.formLoading = false
// return
// }
if (isExist) {
formRef.value.formLoading = false
return message.warning('物料代码重复')
}
data.subList.forEach(obj => {
if(obj.qty == 0){
message.warning(`数量不能为0!`)
flag.value = true
return;
}
})
if(flag.value){
formRef.value.formLoading = false
return
}
try {
if (formType === 'create') {
if(tableData.value.length <= 0){

31
src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts

@ -4,15 +4,15 @@ import { TableColumn } from '@/types/table'
import { dateFormatter } from '@/utils/formatTime'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import * as DeliverPlanMainApi from '@/api/wms/deliverPlanMain'
import { DeliverPlanMain } from '../../deliverplan/deliverPlanMain/deliverPlanMain.data'
import * as locationApi from '@/api/wms/location'
import { Location } from '../../../basicDataManage/factoryModeling/location/location.data'
import * as ItemBasicApi from '@/api/wms/itembasic'
import { Itembasic } from '../../../basicDataManage/itemManage/itembasic/itembasic.data'
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -26,6 +26,7 @@ const queryParams = {
// 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user'
import { ItemBasic } from '@/utils/disposition/formFields'
const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept
// id 转str 否则form回显匹配不到
@ -570,11 +571,31 @@ export const StockupDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
tableForm:{
disabled: true
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItemBasicApi.getItembasicPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
componentProps: {
disabled: true
isSearchList: true,
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItemBasicApi.getItembasicPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},

Loading…
Cancel
Save