Browse Source

HL-5462隔离报工申请明细中部分字段调整

hella_online_20240821
wangyufei 3 months ago
parent
commit
10297e9f63
  1. 31
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue
  2. 3
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts

31
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue

@ -59,7 +59,21 @@
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
>
<template v-slot="{ row }">
<el-date-picker
v-bind:modelValue="
row['expireTime']
? addDay(row['produceDate'], row['expireTime'])
: dayjs('2099-12-31').valueOf()
"
:clearable="true"
style="width: 100%"
:disabled="true"
:placeholder="t('ts.选择日期')"
/>
</template>
</BasicForm>
<!-- 详情 -->
<Detail
@ -142,9 +156,12 @@ import {
} from '../../../purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import { formatDate } from '@/utils/formatTime'
import dayjs from 'dayjs'
import { addDay } from '@/utils/formatTime'
//
//
//
defineOptions({ name: 'ProductreceiptRequestMain' })
const message = useMessage() //
@ -221,6 +238,12 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
row['bomVersion'] = res.list[0].version
}
})
//
row['produceDate'] = dayjs().valueOf()
if(res.length>0){
row['expireTime'] = res[0]['expireTime']
}
}else if(formField == 'workStationCode'){
//
val.forEach(item=>{
@ -595,7 +618,13 @@ const submitForm = async (formType, submitData) => {
if(data.masterId){
data.id = data.masterId
}
data.subList = tableData.value //
tableData.value.forEach((row, index) => {
row['expireDate'] = row['expireTime']
? addDay(row['produceDate'], row['expireTime']).valueOf()
: dayjs('2099-12-31').valueOf()
})
if(data.subList.find(item => (item.qty <= 0))) {
message.warning('数量必须大于0')
return

3
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts

@ -1238,7 +1238,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 180
},
tableForm: {
type: 'FormDate',
type: 'slot',
disabled: true,
valueFormat: 'x',
},
form: {

Loading…
Cancel
Save