Browse Source

Merge branch 'hella_online_20240924' into master_hella

hella_online_20240927
陈薪名 2 months ago
parent
commit
1f22dbf830
  1. 14
      src/components/BasicForm/src/BasicFormWmsCount.vue
  2. 21
      src/views/qms/inspectionQ2/index.vue
  3. 2
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts
  4. 2
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts
  5. 22
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
  6. 9
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/index.vue
  7. 7
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMOrderTypeMain.data.ts

14
src/components/BasicForm/src/BasicFormWmsCount.vue

@ -789,16 +789,16 @@ const submitForm = async () => {
if (!valid) return if (!valid) return
// //
if (props.isBusiness) { if (props.isBusiness) {
formLoading.value = true // formLoading.value = true
if (formType.value == 'create') { if (formType.value == 'create') {
const validateForm = await tableFormRef.value.validateForm() const validateForm = await tableFormRef.value.validateForm()
if (!validateForm && props.tableFormDataLength) { if (!validateForm && props.tableFormDataLength) {
if (props.tableData.length == 0) { if (props.tableData.length == 0) {
message.warning('请填写明细信息!') message.warning('请填写明细信息!')
formLoading.value = false // formLoading.value = false
return return
} }
formLoading.value = false // formLoading.value = false
return return
} }
// //
@ -807,7 +807,7 @@ const submitForm = async () => {
const data1 = unref(formRef1)?.formModel const data1 = unref(formRef1)?.formModel
emit('submitForm', formType.value, { ...data, ...data1 }) emit('submitForm', formType.value, { ...data, ...data1 })
} finally { } finally {
formLoading.value = false // formLoading.value = false
} }
} else { } else {
// //
@ -816,17 +816,17 @@ const submitForm = async () => {
const data1 = unref(formRef1)?.formModel const data1 = unref(formRef1)?.formModel
emit('submitForm', formType.value, { ...data }) emit('submitForm', formType.value, { ...data })
} finally { } finally {
formLoading.value = false // formLoading.value = false
} }
} }
} else { } else {
// //
formLoading.value = true // formLoading.value = true
try { try {
const data = unref(formRef)?.formModel const data = unref(formRef)?.formModel
emit('success', formType.value, data) emit('success', formType.value, data)
} finally { } finally {
formLoading.value = false // formLoading.value = false
} }
} }
} }

21
src/views/qms/inspectionQ2/index.vue

@ -700,19 +700,36 @@ const handleSend = async (id: number) => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
if (row && row.claimAddress?.trim()) { if (row && row.claimAddress?.trim()) {
row.filePathList = row.claimAddress.split(',') row.filePathList = row.claimAddress.split(',')
} }
if (row && row.claimAddressName?.trim()) {
row.claimAddressNameList = row.claimAddressName.split(',');
}
if (row && row.filePathList && row.filePathList.length > 0) { if (row && row.filePathList && row.filePathList.length > 0) {
row.filePathListView = row.filePathList.map((item) => { row.filePathListView = row.filePathList.map((item, index) => {
return { return {
name: item, name: row.claimAddressNameList ? row.claimAddressNameList[index] || item : item,
url: item url: item
} }
}) })
} }
// if (row && row.claimAddress?.trim()) {
// row.filePathList = row.claimAddress.split(',')
// }
//
// if (row && row.filePathList && row.filePathList.length > 0) {
// row.filePathListView = row.filePathList.map((item) => {
// return {
// name: item,
// url: item
// }
// })
// }
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
if (!row || !row.claimAmount) { if (!row || !row.claimAmount) {
nextTick(() => { nextTick(() => {

2
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts

@ -1312,6 +1312,6 @@ export const ScrapRequestDetailRules = reactive({
], ],
reason: [ reason: [
{ required: true, message: '请输入报废原因', trigger: 'change' }, { required: true, message: '请输入报废原因', trigger: 'change' },
{ max: 200, message: '不得超过200个字符', trigger: 'blur' } { max: 24, message: '不得超过24个字符', trigger: 'blur' }
], ],
}) })

2
src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts

@ -660,7 +660,7 @@ export const UnplannedissueRequestMainRules = reactive({
], ],
remarkMain: [ remarkMain: [
{ required: true, message: '请输入单据备注', trigger: 'blur' }, { required: true, message: '请输入单据备注', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 24, message: '不得超过24个字符', trigger: 'blur' }
], ],
usageDescription:[ usageDescription:[
{ required: true, message: '请选择领用描述', trigger: 'blur' } { required: true, message: '请选择领用描述', trigger: 'blur' }

22
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue

@ -205,15 +205,15 @@ const clearSearchInput = (formField) => {
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
console.log('searchTableSuccess',formRef.formModel) console.log('searchTableSuccess',formField, searchField, val, formRef, type, row)
nextTick(async () => { nextTick(async () => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
if(formField == 'itemCode') { if(formField == 'itemCode') {
if(tableData.value.find(item1=>item1['itemCode'] == val[0]['itemCode'])){ // if(tableData.value.find(item1=>item1['itemCode'] == val[0]['itemCode'])){
message.warning(`物料${val[0]['itemCode']}已经存在`) // message.warning(`${val[0]['itemCode']}`)
return // return
} // }
let enableBuy = val[0]['enableBuy'] let enableBuy = val[0]['enableBuy']
if(tableData.value.length>0){ if(tableData.value.length>0){
enableBuy = tableData.value[0]['enableBuy'] enableBuy = tableData.value[0]['enableBuy']
@ -227,6 +227,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} }
val = val.filter(item=>item['enableBuy']==enableBuy) val = val.filter(item=>item['enableBuy']==enableBuy)
let messageItemCodes = []
val.forEach(item=>{ val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['itemCode'] = item['itemCode'] newRow['itemCode'] = item['itemCode']
@ -242,8 +243,17 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} }
newRow['packUnit'] = item['packUnit'] newRow['packUnit'] = item['packUnit']
newRow['packQty'] = item['packQty'] newRow['packQty'] = item['packQty']
if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode'])){
messageItemCodes.push(item['itemCode'])
}else{
tableData.value.push(newRow) tableData.value.push(newRow)
}
}) })
if(messageItemCodes.length>0){
message.warning(`物料${messageItemCodes.join(',')}已经存在`)
}
// HL-4885 @ @ // HL-4885 @ @
// tableform // tableform
@ -291,8 +301,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// //
setV['workStationCode'] = val[0]['code'] setV['workStationCode'] = val[0]['code']
setV['fromLocationCode'] = val[0]['rawLocationCode'] setV['fromLocationCode'] = val[0]['rawLocationCode']
}
tableData.value = [] // tableData.value = [] //
}
formRef.setValues(setV) formRef.setValues(setV)
} }
}) })

9
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/index.vue

@ -193,7 +193,7 @@ import { getJmreportBaseUrl } from '@/utils/systemParam'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading' import { usePageLoading } from '@/hooks/web/usePageLoading'
const { loadStart, loadDone } = usePageLoading() const { loadStart, loadDone } = usePageLoading()
// 退 // M退
defineOptions({ name: 'PurchasereturnRequestMainNew' }) defineOptions({ name: 'PurchasereturnRequestMainNew' })
const message = useMessage() // const message = useMessage() //
@ -994,7 +994,12 @@ const submitForm = async (formType, submitData) => {
tableData.value.forEach((row, index) => { tableData.value.forEach((row, index) => {
row['expireDate'] = row['expireTime']?addDay(row['produceDate'],row['expireTime']).valueOf():dayjs('2099-12-31').valueOf() row['expireDate'] = row['expireTime']?addDay(row['produceDate'],row['expireTime']).valueOf():dayjs('2099-12-31').valueOf()
}) })
data.subList = tableData.value // // data.subList = tableData.value //
data.subList = tableData.value.filter(item=>Number(item['qty'])>0) //
if(data.subList.length<1){
message.warning('至少有一条数据')
return
}
formRef.value.formLoading = true formRef.value.formLoading = true
try { try {
if (formType === 'create') { if (formType === 'create') {

7
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMOrderTypeMain.data.ts

@ -279,14 +279,14 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 1, min: 0,
precision: 6 precision: 6
}, },
}, },
tableForm: { tableForm: {
disabled: true, disabled: true,
type: 'InputNumber', type: 'InputNumber',
min: 1, min: 0,
precision: 6 precision: 6
} }
}, },
@ -533,6 +533,9 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
//表单校验 //表单校验
export const PurchasereceiptRequestDetailRules = reactive({ export const PurchasereceiptRequestDetailRules = reactive({
qty: [
{ required: true, message: '请输入退货数量', trigger: 'blur' }
],
batch: [ batch: [
{ required: true, message: '请输入批次', trigger: 'blur' } { required: true, message: '请输入批次', trigger: 'blur' }
], ],

Loading…
Cancel
Save