Browse Source

Merge remote-tracking branch 'origin/master_hella' into master_hella

hella_online_20240829
gaojs 5 months ago
parent
commit
fdf774aebc
  1. 424
      src/components/BasicForm/src/BasicForm.vue
  2. 2
      src/views/qms/inspectionJob/inspectionJobMain.data.ts
  3. 17
      src/views/wms/basicDataManage/itemManage/bom/bom.data.ts
  4. 3
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts
  5. 424
      src/views/wms/issueManage/issue/issueJobMain/issueJobMain.data.ts
  6. 566
      src/views/wms/issueManage/issue/issueRecordMain/issueRecordMain.data.ts
  7. 454
      src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts
  8. 6
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
  9. 12
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts
  10. 58
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  11. 16
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts

424
src/components/BasicForm/src/BasicForm.vue

@ -7,9 +7,7 @@
:vLoading="formLoading" :vLoading="formLoading"
@updateFullscreen="updateFullscreen" @updateFullscreen="updateFullscreen"
> >
<div style="overflow-y: auto" :style="{ 'max-height': formHeight }">
<div
style="overflow-y: auto;" :style="{'max-height':formHeight}">
<Form <Form
ref="formRef" ref="formRef"
:rules="rules" :rules="rules"
@ -24,8 +22,12 @@
@onEnter="onEnter" @onEnter="onEnter"
> >
<template #crontab="formSchema1" v-if="fromeWhere == 'countPlan'"> <template #crontab="formSchema1" v-if="fromeWhere == 'countPlan'">
<crontab
<crontab v-model="formSchema1.crontab" :disabled="formSchema?.find(item=>item.field == 'crontab')?.componentProps?.disabled "/> v-model="formSchema1.crontab"
:disabled="
formSchema?.find((item) => item.field == 'crontab')?.componentProps?.disabled
"
/>
</template> </template>
<template #type="formSchema" v-if="fromeWhere == 'countPlan'"> <template #type="formSchema" v-if="fromeWhere == 'countPlan'">
<el-select <el-select
@ -44,7 +46,7 @@
<el-select <el-select
v-model="formSchema.type" v-model="formSchema.type"
placeholder="选择盘点范围类型" placeholder="选择盘点范围类型"
@change="selectChangeDetail('type', $event,formSchema)" @change="selectChangeDetail('type', $event, formSchema)"
v-if="isDetail" v-if="isDetail"
> >
<el-option <el-option
@ -60,7 +62,7 @@
v-model="formSchema.value" v-model="formSchema.value"
placeholder="选择盘点范围值" placeholder="选择盘点范围值"
multiple multiple
v-if="isDetail&& formTypeDetail =='Select'" v-if="isDetail && formTypeDetail == 'Select'"
> >
<el-option <el-option
v-for="dict in countPlanAllList" v-for="dict in countPlanAllList"
@ -69,14 +71,14 @@
:value="dict.value" :value="dict.value"
/> />
</el-select> </el-select>
<el-input v-model="formSchema.value" v-if="isDetail && formTypeDetail =='InputString'"/> <el-input v-model="formSchema.value" v-if="isDetail && formTypeDetail == 'InputString'" />
</template> </template>
</Form> </Form>
<div class="table" v-if="isBusiness && formType == 'create' && fromeWhere != 'countPlan'"> <div class="table" v-if="isBusiness && formType == 'create' && fromeWhere != 'countPlan'">
<TableForm <TableForm
ref="tableFormRef" ref="tableFormRef"
class="w-[100%]" class="w-[100%]"
:maxHeight = "490" :maxHeight="490"
:tableFields="tableAllSchemas.tableFormColumns" :tableFields="tableAllSchemas.tableFormColumns"
:tableData="tableData" :tableData="tableData"
:tableFormRules="tableFormRules" :tableFormRules="tableFormRules"
@ -99,12 +101,12 @@
@inputNumberChange="inputNumberChange" @inputNumberChange="inputNumberChange"
@tableFormSelectOnBlur="tableFormSelectOnBlur" @tableFormSelectOnBlur="tableFormSelectOnBlur"
@formFormDateChange="formFormDateChange" @formFormDateChange="formFormDateChange"
@clearInput='clearInput' @clearInput="clearInput"
@batchAdd="batchAdd" @batchAdd="batchAdd"
:routeName="routeName" :routeName="routeName"
@visibleChange='visibleChange' @visibleChange="visibleChange"
> >
<template v-slot="{row}"> <template v-slot="{ row }">
<slot :row="row"></slot> <slot :row="row"></slot>
</template> </template>
</TableForm> </TableForm>
@ -122,13 +124,16 @@
/> />
</div> </div>
</div> </div>
<template #footer > <template #footer>
<slot name="foorter"></slot> <slot name="foorter"></slot>
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" /> <ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" />
</template> </template>
</Dialog> </Dialog>
<SearchTable ref="searchTableRef" :showSearchTableQueryFields="showSearchTableQueryFields" @searchTableSuccess="searchTableSuccess" > <SearchTable
ref="searchTableRef"
:showSearchTableQueryFields="showSearchTableQueryFields"
@searchTableSuccess="searchTableSuccess"
>
<template v-for="name in Object.keys($slots)" :key="name" #[name]> <template v-for="name in Object.keys($slots)" :key="name" #[name]>
<slot :name="name"></slot> <slot :name="name"></slot>
</template> </template>
@ -140,9 +145,10 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import ButtonBase from '@/components/XButton/src/ButtonBase.vue' import ButtonBase from '@/components/XButton/src/ButtonBase.vue'
import TableForm from '@/components/TableForm/src/TableForm.vue' import TableForm from '@/components/TableForm/src/TableForm.vue'
import TableFormCountPlan from '@/components/TableFormCountPlan/src/TableFormCountPlan.vue' import TableFormCountPlan from '@/components/TableFormCountPlan/src/TableFormCountPlan.vue'
import {DICT_TYPE, getStrDictOptions} from '@/utils/dict' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import { tableFormBlurVer,FormBlur,getListByBottonInput } from '@/api/wms/business/business' import { tableFormBlurVer, FormBlur, getListByBottonInput } from '@/api/wms/business/business'
import { isString } from 'min-dash' import { isString } from 'min-dash'
const props = defineProps({ const props = defineProps({
// //
basicFormWidth: { basicFormWidth: {
@ -155,9 +161,9 @@ const props = defineProps({
default: true default: true
}, },
// -- // --
isShowReduceButtonSelection:{ isShowReduceButtonSelection: {
type: Boolean, type: Boolean,
default: false, default: false
}, },
// tableForm // tableForm
isShowReduceButton: { isShowReduceButton: {
@ -290,13 +296,13 @@ const props = defineProps({
default: null default: null
}, },
// //
isOpenSearchTable:{ isOpenSearchTable: {
type: Boolean, type: Boolean,
required: false, required: false,
default: false default: false
}, },
fieldTableColumn:{ fieldTableColumn: {
type: String, type: String,
required: false, required: false,
default: '' default: ''
@ -306,36 +312,32 @@ const props = defineProps({
formField:form中对应的field, formField:form中对应的field,
tableField:searchtable中对应的field, tableField:searchtable中对应的field,
}]*/ }]*/
sumFormDataField:{ sumFormDataField: {
type: Array, type: Array,
required: false, required: false,
default: null default: null
}, },
sumFormDataByForm:{ sumFormDataByForm: {
type:Function, type: Function,
required: false, required: false,
default: null default: null
}, },
sumFormDataByTableCustom:{ sumFormDataByTableCustom: {
type:Function, type: Function,
required: false, required: false,
default: null default: null
}, },
showSearchTableQueryFields:{ showSearchTableQueryFields: {
type: Array, type: Array,
required: false, required: false,
default: [] default: []
}, },
byCodespageApi: { //
type: Function, isJiaoyan: {
required: true, type: Boolean,
default: null required: false,
}, // default: false
byCodesParams: { }
type: Object,
required: true,
default: null
} //
}) })
const { t } = useI18n() // const { t } = useI18n() //
@ -347,8 +349,8 @@ if (props.basicFormWidth) {
dialogWidth.value = props.isBusiness ? '60%' : '40%' dialogWidth.value = props.isBusiness ? '60%' : '40%'
} }
const formHeight = ref('60vh') const formHeight = ref('60vh')
const updateFullscreen = (isFullscreen)=>{ const updateFullscreen = (isFullscreen) => {
formHeight.value = isFullscreen?'auto':'60vh' formHeight.value = isFullscreen ? 'auto' : '60vh'
} }
const dialogVisible = ref(false) // const dialogVisible = ref(false) //
@ -363,7 +365,7 @@ const tableFormRules = ref(props.tableFormRules)
const route = useRoute() // const route = useRoute() //
const routeName = ref('') const routeName = ref('')
routeName.value = route.name routeName.value = route.name
const isExecute = ref(true)//true const isExecute = ref(true) //true
// - // -
// const buttondata = [ // const buttondata = [
@ -396,7 +398,7 @@ const opensearchTable = (
multiple, multiple,
type, type,
row, row,
isConcatDetailSchemas=false, isConcatDetailSchemas = false,
searchDetailSchemas: any searchDetailSchemas: any
) => { ) => {
const _searchCondition = {} const _searchCondition = {}
@ -404,7 +406,7 @@ const opensearchTable = (
if (searchCondition && searchCondition.length > 0) { if (searchCondition && searchCondition.length > 0) {
// //
let filters: any[] = [] let filters: any[] = []
for (var i=0; i< searchCondition.length; i++ ) { for (var i = 0; i < searchCondition.length; i++) {
// searchCondition.forEach((item) => { // searchCondition.forEach((item) => {
// row // row
if (searchCondition[i].isMainValue) { if (searchCondition[i].isMainValue) {
@ -417,17 +419,24 @@ const opensearchTable = (
: '' : ''
// //
let isNull = false let isNull = false
if (_searchCondition[searchCondition[i].key] == '' || _searchCondition[searchCondition[i].key] == undefined) { if (
_searchCondition[searchCondition[i].key] == '' ||
_searchCondition[searchCondition[i].key] == undefined
) {
isNull = true isNull = true
} }
if (isNull) { if (isNull) {
message.warning(searchCondition[i].message?searchCondition[i].message:'前置条件未选择!') message.warning(
searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!'
)
return return
} }
}else if(searchCondition[i].isTableRowValue){ } else if (searchCondition[i].isTableRowValue) {
if(searchCondition[i].required){ if (searchCondition[i].required) {
if (row[searchCondition[i].value] == '' ||row[searchCondition[i].value] == undefined) { if (row[searchCondition[i].value] == '' || row[searchCondition[i].value] == undefined) {
message.warning(searchCondition[i].message?searchCondition[i].message:'前置条件未选择!') message.warning(
searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!'
)
return return
} }
} }
@ -439,9 +448,14 @@ const opensearchTable = (
if (searchCondition[i].isSearch) { if (searchCondition[i].isSearch) {
if (searchCondition[i].isFormModel) { if (searchCondition[i].isFormModel) {
//formModel //formModel
if(searchCondition[i].required){ if (searchCondition[i].required) {
if (formRef.value.formModel[searchCondition[i].value] == '' ||formRef.value.formModel[searchCondition[i].value] == undefined) { if (
message.warning(searchCondition[i].message?searchCondition[i].message:'前置条件未选择!') formRef.value.formModel[searchCondition[i].value] == '' ||
formRef.value.formModel[searchCondition[i].value] == undefined
) {
message.warning(
searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!'
)
return return
} }
} }
@ -450,14 +464,13 @@ const opensearchTable = (
column: searchCondition[i].key, column: searchCondition[i].key,
value: formRef.value.formModel[searchCondition[i].value] value: formRef.value.formModel[searchCondition[i].value]
}) })
}else{ } else {
filters.push({ filters.push({
action: searchCondition[i].action, action: searchCondition[i].action,
column: searchCondition[i].key, column: searchCondition[i].key,
value: searchCondition[i].value value: searchCondition[i].value
}) })
} }
} else { } else {
_searchCondition[searchCondition[i].key] = searchCondition[i].value _searchCondition[searchCondition[i].key] = searchCondition[i].value
} }
@ -488,50 +501,76 @@ const opensearchTable = (
} }
// searchTable // searchTable
const changeDialogWidth = (width)=>{ const changeDialogWidth = (width) => {
searchTableRef.value.changeDialogWidth(width) searchTableRef.value.changeDialogWidth(width)
} }
const hiddenSearchTableFilterButton = ()=>{ const hiddenSearchTableFilterButton = () => {
searchTableRef.value.hiddenFilterButton() searchTableRef.value.hiddenFilterButton()
} }
const clearSearchInput = (field)=>{ const clearSearchInput = (field) => {
emit('clearSearchInput',field) emit('clearSearchInput', field)
} }
const sumFormDataByTable = () => { const sumFormDataByTable = () => {
if(props.sumFormDataField){ if (props.sumFormDataField) {
const sumObject = {} const sumObject = {}
props.sumFormDataField.forEach(sumItem=>{ props.sumFormDataField.forEach((sumItem) => {
sumObject[sumItem?.formField]= props.tableData.reduce((prev, item) => prev + item[sumItem?.tableField],0) sumObject[sumItem?.formField] = props.tableData.reduce(
(prev, item) => prev + item[sumItem?.tableField],
0
)
}) })
nextTick(()=>{ nextTick(() => {
formRef.value.setValues(sumObject) formRef.value.setValues(sumObject)
}) })
} }
} }
watch(()=>props.tableData,() => { watch(
() => props.tableData,
() => {
sumFormDataByTable() sumFormDataByTable()
if(props?.sumFormDataByTableCustom&&unref(formRef)?.formModel&&props.tableData){ if (props?.sumFormDataByTableCustom && unref(formRef)?.formModel && props.tableData) {
props?.sumFormDataByTableCustom(formRef,unref(formRef)?.formModel,props.tableData) props?.sumFormDataByTableCustom(formRef, unref(formRef)?.formModel, props.tableData)
} }
},
},{ {
deep:true deep: true
}) }
)
let originFormModel = {} let originFormModel = {}
const updateOriginFormModel = (data)=>{ const updateOriginFormModel = (data) => {
originFormModel = JSON.parse(JSON.stringify(data)) originFormModel = JSON.parse(JSON.stringify(data))
} }
const sumFormDataHandle1 = ()=>{ const sumFormDataHandle1 = () => {
emit('sumFormDataHandle',formRef,unref(formRef)?.formModel,props.tableData,formType.value,originFormModel,updateOriginFormModel) emit(
'sumFormDataHandle',
formRef,
unref(formRef)?.formModel,
props.tableData,
formType.value,
originFormModel,
updateOriginFormModel
)
} }
watch(()=>unref(formRef)?.formModel,async () => { watch(
if(props?.sumFormDataByForm&&unref(formRef)?.formModel){ () => unref(formRef)?.formModel,
props?.sumFormDataByForm(formRef,unref(formRef)?.formModel,props.tableData,formType.value,originFormModel,updateOriginFormModel,sumFormDataHandle1) async () => {
if (props?.sumFormDataByForm && unref(formRef)?.formModel) {
props?.sumFormDataByForm(
formRef,
unref(formRef)?.formModel,
props.tableData,
formType.value,
originFormModel,
updateOriginFormModel,
sumFormDataHandle1
)
} }
},{ },
deep:true {
}) deep: true
}
)
// //
// val row // val row
@ -540,11 +579,17 @@ const searchTableSuccess = (formField, searchField, val, type, row) => {
} }
/** 打开弹窗 */ /** 打开弹窗 */
const open = async (type: string, row?: any, masterParmas?: any, titleName?: any, alltitleName?: any) => { const open = async (
type: string,
row?: any,
masterParmas?: any,
titleName?: any,
alltitleName?: any
) => {
dialogVisible.value = true dialogVisible.value = true
if(alltitleName){ if (alltitleName) {
dialogTitle.value = alltitleName dialogTitle.value = alltitleName
}else if (titleName) { } else if (titleName) {
dialogTitle.value = t('action.' + titleName) dialogTitle.value = t('action.' + titleName)
} else { } else {
dialogTitle.value = t('action.' + type) dialogTitle.value = t('action.' + type)
@ -574,22 +619,25 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
} }
// //
const handleAddTable = () => { const handleAddTable = () => {
if(props.isOpenSearchTable){ if (props.isOpenSearchTable) {
const tableFormKeys = {} const tableFormKeys = {}
tableAllSchemas.value.tableFormColumns.forEach(item => { tableAllSchemas.value.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : '' tableFormKeys[item.field] = item.default ? item.default : ''
}) })
if(props.fieldTableColumn!=''){ if (props.fieldTableColumn != '') {
inpuFocus(tableAllSchemas.value.tableFormColumns.find(item=>item.field==props.fieldTableColumn),tableFormKeys,0) inpuFocus(
tableAllSchemas.value.tableFormColumns.find((item) => item.field == props.fieldTableColumn),
tableFormKeys,
0
)
} }
}else{ } else {
emit('handleAddTable') emit('handleAddTable')
} }
} }
/** 弹窗按钮 */ /** 弹窗按钮 */
let Butttondata:any = [] let Butttondata: any = []
if (props.isShowFooterButtton) { if (props.isShowFooterButtton) {
Butttondata = [ Butttondata = [
defaultButtons.formSaveBtn(null), // defaultButtons.formSaveBtn(null), //
@ -604,7 +652,7 @@ if (props.footButttondata) {
const buttonBaseClick = (val) => { const buttonBaseClick = (val) => {
// //
if (props.footButttondata) { if (props.footButttondata) {
emit('footButtonClick',val) emit('footButtonClick', val)
} }
// //
else if (val == 'save') { else if (val == 'save') {
@ -708,15 +756,15 @@ const emit = defineEmits([
'visibleChange' 'visibleChange'
]) ])
const visibleChange = (field, val, row, index) => { const visibleChange = (field, val, row, index) => {
emit('visibleChange',field, val, row, index) emit('visibleChange', field, val, row, index)
} }
// //
const formSelectChange = (field, val, row) => { const formSelectChange = (field, val, row) => {
emit('formSelectChange', field, val, row) emit('formSelectChange', field, val, row)
} }
// //
const formFormDateChange = (field, val,row, index) => { const formFormDateChange = (field, val, row, index) => {
emit('formFormDateChange', field, val,row, index) emit('formFormDateChange', field, val, row, index)
} }
const formSelectvVisibleChange = (field, val, row) => { const formSelectvVisibleChange = (field, val, row) => {
emit('formSelectvVisibleChange', field, val, row) emit('formSelectvVisibleChange', field, val, row)
@ -753,14 +801,11 @@ const handleTableSelect = (row, column, event) => {
// //
const handleDeleteTable = (row, index) => { const handleDeleteTable = (row, index) => {
emit('handleDeleteTable', row, index,formRef.value) emit('handleDeleteTable', row, index, formRef.value)
} }
// //
const inpuFocus = (headerItem, row, index) => { const inpuFocus = (headerItem, row, index) => {
emit('inpuFocus', headerItem, row, index) emit('inpuFocus', headerItem, row, index)
opensearchTable( opensearchTable(
@ -778,7 +823,7 @@ const inpuFocus = (headerItem, row, index) => {
) )
} }
const clearInput = (field, row, index) => { const clearInput = (field, row, index) => {
emit('clearInput',field, row, index) emit('clearInput', field, row, index)
} }
/** /**
* 监听改变事件 * 监听改变事件
@ -796,48 +841,31 @@ const onChange = (field, cur) => {
*/ */
const onBlur = async (field, e) => { const onBlur = async (field, e) => {
isExecute.value = false isExecute.value = false
if (
field == 'supplierCode' || let formSchemaObj = formSchema.value.find((item) => item.field == field)?.componentProps
field == 'itemCode' || if (formSchemaObj?.enterSearch) {
field == 'productItemCode' || if (formSchemaObj.verificationPage) {
field == 'componentItemCode' ||
field == 'packUnit' ||
field == 'inPackUnit' ||
field == 'fromPackingNumber'
) {
await FormBlur(
field,
e,
routeName.value,
formRef.value,
props.detailData,
formSchema.value,
(searchField, list) => {
emit('searchTableSuccess', field, searchField, list, formRef.value, 'form')
}
)
} else {
let formSchemaObj = formSchema.value.find((item) => item.field == field)
let searchCondition1 = formSchema.value.find((item) => item.field == field).componentProps let searchCondition1 = formSchema.value.find((item) => item.field == field).componentProps
.searchCondition //data.ts .searchCondition //data.ts
if (formSchemaObj?.componentProps?.enterSearch) { let verificationParams = formSchema.value.find((item) => item.field == field).componentProps
.verificationParams //
console.log('走新方法啦')
if (e && isString(e)) { if (e && isString(e)) {
let setV = {} let setV = {}
setV[field] = '' setV[field] = ''
let obj = {} let params = {}
console.log(233,searchCondition1)
// keyvalue // keyvalue
if (searchCondition1 && searchCondition1.length > 0) { if (searchCondition1 && searchCondition1.length > 0) {
for (let i = 0; i < searchCondition1.length; i++) { for (let i = 0; i < searchCondition1.length; i++) {
if (searchCondition1[i].isMainValue) { if (searchCondition1[i].isMainValue) {
obj[searchCondition1[i].key] = formRef.value.formModel[searchCondition1[i].value] params[searchCondition1[i].key] = formRef.value.formModel[searchCondition1[i].value]
? formRef.value.formModel[searchCondition1[i].value] ? formRef.value.formModel[searchCondition1[i].value]
: props.detailData : props.detailData
? props.detailData[searchCondition1[i].value] ? props.detailData[searchCondition1[i].value]
: '' : ''
// //
let isNull = false let isNull = false
if (obj[searchCondition1[i].key] == '' || obj[searchCondition1[i].key] == undefined) { if (params[searchCondition1[i].key] == '' || params[searchCondition1[i].key] == undefined) {
isNull = true isNull = true
} }
if (isNull) { if (isNull) {
@ -865,29 +893,30 @@ console.log(233,searchCondition1)
} }
} }
} }
obj[searchCondition1[i].key] = searchCondition1[i].value params[searchCondition1[i].key] = searchCondition1[i].value
} else { } else {
obj[searchCondition1[i].key] = searchCondition1[i].value params[searchCondition1[i].key] = searchCondition1[i].value
}
} }
} }
} }
// keyvalue
if (verificationParams && verificationParams.length > 0) {
for (let i = 0; i < verificationParams.length; i++) {
params[verificationParams[i].key] = e?.trim()
} }
if (!formSchemaObj?.componentProps.multiple && e.indexOf(',') > -1) { }
console.log(333,params)
if (!formSchemaObj?.multiple && e.indexOf(',') > -1) {
message.alert('该输入框只能输入一条数据') message.alert('该输入框只能输入一条数据')
formRef.value.setValues(setV) formRef.value.setValues(setV)
return return
} }
if (props.byCodespageApi) { await formSchemaObj.verificationPage(params).then((res) => {
let params = {}
if (props.byCodesParams) {
params = { ...props.byCodesParams, ...obj, codes: e }
} else {
params = { ...obj, codes: e }
}
await props.byCodespageApi(params).then((res) => {
let arr1 = e.split(',') let arr1 = e.split(',')
let list = ref([]) let list = ref([])
list.value = res list.value = res
console.log(222, list.value)
if (list.value?.length == 0) { if (list.value?.length == 0) {
message.alert('暂无数据') message.alert('暂无数据')
formRef.value.setValues(setV) formRef.value.setValues(setV)
@ -903,58 +932,118 @@ console.log(233,searchCondition1)
formRef.value.setValues(setV) formRef.value.setValues(setV)
return return
} }
emit( // emit('searchTableSuccess', formField, searchField, list.value, formRef.value, 'form')
'searchTableSuccess', // callback(list.value)
})
// emit(
// 'onBlur',
// field,
// e,
// formSchemaObj.componentProps.searchField,
// formSchemaObj,
// formRef.value,
// 'form',
// obj
// )
}
} else {
if (
field == 'supplierCode' ||
field == 'itemCode' ||
field == 'productItemCode' ||
field == 'componentItemCode' ||
field == 'packUnit' ||
field == 'inPackUnit' ||
field == 'fromPackingNumber'
) {
await FormBlur(
field, field,
searchCondition1.searchField, e,
list, routeName.value,
formRef.value, formRef.value,
'form' props.detailData,
formSchema.value,
(searchField, list) => {
emit('searchTableSuccess', field, searchField, list, formRef.value, 'form')
}
) )
}) return
} }
} }
} else { } else {
emit('onBlur', field, e) emit('onBlur', field, e)
} }
}
isExecute.value = true isExecute.value = true
emit('onBlur', field, e)
} }
// //
const batchAdd = async (val) => { const batchAdd = async (val) => {
const row = {} const row = {}
tableAllSchemas.value.tableFormColumns.forEach((item) => { tableAllSchemas.value.tableFormColumns.forEach((item) => {
row[item.field] = item.default ? item.default : '' row[item.field] = item.default ? item.default : ''
}) })
const headerItem = tableAllSchemas.value.tableColumns.find((item) => item.field == props.fieldTableColumn) const headerItem = tableAllSchemas.value.tableColumns.find(
(item) => item.field == props.fieldTableColumn
)
await getListByBottonInput(headerItem, val,row,routeName.value,formRef.value,props.detailData,props.tableData,(list)=>{ await getListByBottonInput(
emit('searchTableSuccess',headerItem.field,'itemCode',list, formRef.value,'tableForm',row) headerItem,
}) val,
row,
routeName.value,
formRef.value,
props.detailData,
props.tableData,
(list) => {
emit(
'searchTableSuccess',
headerItem.field,
'itemCode',
list,
formRef.value,
'tableForm',
row
)
}
)
} }
const inputStringBlur = async (headerItem, val, row, index) => { const inputStringBlur = async (headerItem, val, row, index) => {
// isExecute.value = false // isExecute.value = false
await tableFormBlurVer(headerItem,val,row,index,routeName.value,formRef.value,props.detailData,props.tableData,(searchField, list)=>{ await tableFormBlurVer(
emit('searchTableSuccess',headerItem.field,searchField,list, formRef.value,'tableForm',row,'blur',index) headerItem,
}) val,
row,
index,
routeName.value,
formRef.value,
props.detailData,
props.tableData,
(searchField, list) => {
emit(
'searchTableSuccess',
headerItem.field,
searchField,
list,
formRef.value,
'tableForm',
row,
'blur',
index
)
}
)
// isExecute.value = true // isExecute.value = true
} }
/** /**
* 回车事件 * 回车事件
* @param field 当前操作字段 * @param field 当前操作字段
* @param e * @param e
*/ */
const onEnter = (field,value, e) => { const onEnter = (field, value, e) => {
emit('onEnter', field,value, e) emit('onEnter', field, value, e)
} }
// //
@ -962,23 +1051,30 @@ const selectChange = (field, val) => {
emit('selectChange', field, val) emit('selectChange', field, val)
} }
// //
const selectChangeDetail = (field, val,formSchema) => { const selectChangeDetail = (field, val, formSchema) => {
formSchema.value = '' formSchema.value = ''
emit('selectChangeDetail', field, val) emit('selectChangeDetail', field, val)
} }
const tableFormChange = (field, val, row) => { const tableFormChange = (field, val, row) => {
emit('tableFormChange', field, val, row) emit('tableFormChange', field, val, row)
} }
const buttonOperationClick = (row, label, index)=> { const buttonOperationClick = (row, label, index) => {
emit("buttonOperationClick", row, label, index); emit('buttonOperationClick', row, label, index)
} }
defineExpose({
defineExpose({ open, formRef, opensearchTable, dialogVisible, formLoading ,handleAddTable,changeDialogWidth,searchTableRef,tableFormRef}) // open open,
formRef,
opensearchTable,
dialogVisible,
formLoading,
handleAddTable,
changeDialogWidth,
searchTableRef,
tableFormRef
}) // open
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.table { .table {
@ -1007,8 +1103,8 @@ defineExpose({ open, formRef, opensearchTable, dialogVisible, formLoading ,handl
::v-deep(.el-icon) { ::v-deep(.el-icon) {
display: block; display: block;
}button }
.button { button .button {
> div { > div {
display: flex; display: flex;
align-items: center; align-items: center;

2
src/views/qms/inspectionJob/inspectionJobMain.data.ts

@ -444,7 +444,7 @@ export const InspectionJobMain = useCrudSchemas(
isDetail: false, isDetail: false,
isForm: false, isForm: false,
table: { table: {
width: 250, width: 300,
fixed: 'right' fixed: 'right'
} }
} }

17
src/views/wms/basicDataManage/itemManage/bom/bom.data.ts

@ -32,6 +32,11 @@ export const Bom = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '物料基础信息', // 查询弹窗标题 searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.selectItembasicPageToFgAndSemibasicPage, // 查询弹窗所需分页方法 searchPage: ItembasicApi.selectItembasicPageToFgAndSemibasicPage, // 查询弹窗所需分页方法
verificationPage: ItembasicApi.getItemListByCodes, // 失去焦点校验输入框的数据内容存在
verificationParams: [{
key: 'codes',
value: '',
}], // 失去焦点校验参数
} }
} }
}, },
@ -53,6 +58,11 @@ export const Bom = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '物料基础信息', // 查询弹窗标题 searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.selectTypeToItembasic, // 查询弹窗所需分页方法 searchPage: ItembasicApi.selectTypeToItembasic, // 查询弹窗所需分页方法
verificationPage: ItembasicApi.getItemListByCodes, // 失去焦点校验输入框的数据内容存在
verificationParams: [{
key: 'codes',
value: '',
}], // 失去焦点校验参数
} }
} }
}, },
@ -105,7 +115,12 @@ export const Bom = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}] }],
verificationPage: ProcessApi.getProcessByCodes, // 失去焦点校验输入框的数据内容存在
verificationParams: [{
key: 'codes',
value: '',
}], // 失去焦点校验参数
} }
} }
}, },

3
src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts

@ -319,8 +319,9 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
tableForm:{ tableForm:{
disabled:true,
multiple:true, multiple:true,
isInpuFocusShow: true, // isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题 searchTitle: '库存余额信息', // 查询弹窗标题

424
src/views/wms/issueManage/issue/issueJobMain/issueJobMain.data.ts

@ -4,7 +4,8 @@ import { dateFormatter } from '@/utils/formatTime'
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([ export const IssueJobMain = useCrudSchemas(
reactive<CrudSchema[]>([
{ {
label: '单据号', label: '单据号',
field: 'number', field: 'number',
@ -13,8 +14,8 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 180, width: 180,
fixed: 'left' fixed: 'left'
}, },
sortSearchDefault:1, sortSearchDefault: 1,
isSearch: true, isSearch: true
}, },
{ {
label: '申请单号', label: '申请单号',
@ -23,7 +24,7 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180 width: 180
}, },
isTable: false, isTable: false
}, },
{ {
label: '供应商代码', label: '供应商代码',
@ -32,7 +33,7 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '车间代码', label: '车间代码',
@ -41,7 +42,7 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '从仓库代码', label: '从仓库代码',
@ -50,7 +51,7 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '申请时间', label: '申请时间',
@ -69,9 +70,9 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '要求截止时间', label: '要求截止时间',
@ -89,10 +90,10 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
} }
}, },
isTable: false, isTable: false
}, },
{ {
label: '过期时间', label: '过期时间',
@ -111,9 +112,9 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '状态', label: '状态',
@ -125,7 +126,7 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:1, sortTableDefault: 1
}, },
{ {
label: '到仓库代码', label: '到仓库代码',
@ -134,7 +135,7 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '生产线代码', label: '生产线代码',
@ -143,7 +144,7 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '工位代码', label: '工位代码',
@ -152,7 +153,7 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
@ -172,9 +173,9 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '最后更新者', label: '最后更新者',
@ -183,8 +184,7 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
@ -196,7 +196,7 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isTable: false, isTable: false,
form: { form: {
component: 'InputNumber', component: 'InputNumber'
} }
}, },
{ {
@ -208,7 +208,7 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isTable: false, isTable: false,
form: { form: {
component: 'InputNumber', component: 'InputNumber'
} }
}, },
{ {
@ -218,7 +218,7 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '承接人用户名', label: '承接人用户名',
@ -227,7 +227,7 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '承接时间', label: '承接时间',
@ -246,9 +246,9 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '完成人用户名', label: '完成人用户名',
@ -257,7 +257,7 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '完成时间', label: '完成时间',
@ -276,9 +276,9 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '从库区类型范围', label: '从库区类型范围',
@ -289,7 +289,7 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, }
}, },
{ {
label: '到库区类型范围', label: '到库区类型范围',
@ -300,7 +300,7 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, }
}, },
{ {
label: '业务类型', label: '业务类型',
@ -309,7 +309,7 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '备注', label: '备注',
@ -318,7 +318,7 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '创建时间', label: '创建时间',
@ -337,9 +337,9 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '创建者', label: '创建者',
@ -348,7 +348,7 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '最后更新时间', label: '最后更新时间',
@ -367,10 +367,10 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width:'100%'}, style: { width: '100%' },
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
} }
} }
}, },
@ -391,7 +391,7 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '到库区代码范围', label: '到库区代码范围',
@ -400,7 +400,7 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
// { // {
// label: '使用在途库', // label: '使用在途库',
@ -619,151 +619,116 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 120, width: 120,
fixed: 'right' fixed: 'right'
},
} }
])) }
])
)
//表单校验 //表单校验
export const IssueJobMainRules = reactive({ export const IssueJobMainRules = reactive({
requestNumber: [ requestNumber: [{ required: true, message: '请选择申请单号', trigger: 'change' }],
{ required: true, message: '请选择申请单号', trigger: 'change' } fromWarehouseCode: [{ required: true, message: '请选择从仓库代码', trigger: 'change' }],
], fromAreaTypes: [{ required: true, message: '请选择从库区类型范围', trigger: 'change' }],
fromWarehouseCode: [ toWarehouseCode: [{ required: true, message: '请选择到仓库代码', trigger: 'change' }],
{ required: true, message: '请选择从仓库代码', trigger: 'change' } toAreaTypes: [{ required: true, message: '请选择到库区类型范围', trigger: 'change' }],
], requestTime: [{ required: true, message: '请输入申请时间', trigger: 'change' }],
fromAreaTypes: [ requestDueTime: [{ required: true, message: '请输入要求截止时间', trigger: 'change' }],
{ required: true, message: '请选择从库区类型范围', trigger: 'change' } status: [{ required: true, message: '请选择状态', trigger: 'change' }],
],
toWarehouseCode: [
{ required: true, message: '请选择到仓库代码', trigger: 'change' }
],
toAreaTypes: [
{ required: true, message: '请选择到库区类型范围', trigger: 'change' }
],
requestTime: [
{ required: true, message: '请输入申请时间', trigger: 'change' }
],
requestDueTime: [
{ required: true, message: '请输入要求截止时间', trigger: 'change' }
],
status: [
{ required: true, message: '请选择状态', trigger: 'change' }
],
// jobStageStatus: [ // jobStageStatus: [
// { required: true, message: '请选择阶段状态', trigger: 'change' } // { required: true, message: '请选择阶段状态', trigger: 'change' }
// ], // ],
priority: [ priority: [{ required: true, message: '请输入优先级', trigger: 'blur' }],
{ required: true, message: '请输入优先级', trigger: 'blur' } priorityIncrement: [{ required: true, message: '请输入优先级增量', trigger: 'blur' }],
], departmentCode: [{ required: true, message: '请输入部门', trigger: 'blur' }],
priorityIncrement: [ userPositionCode: [{ required: true, message: '请输入岗位', trigger: 'blur' }],
{ required: true, message: '请输入优先级增量', trigger: 'blur' } number: [{ required: true, message: '请输入单据号', trigger: 'blur' }],
], businessType: [{ required: true, message: '请输入业务类型', trigger: 'blur' }],
departmentCode: [ createTime: [{ required: true, message: '请输入创建时间', trigger: 'blur' }],
{ required: true, message: '请输入部门', trigger: 'blur' } creator: [{ required: true, message: '请输入创建者', trigger: 'blur' }]
],
userPositionCode: [
{ required: true, message: '请输入岗位', trigger: 'blur' }
],
number: [
{ required: true, message: '请输入单据号', trigger: 'blur' }
],
businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' }
],
createTime: [
{ required: true, message: '请输入创建时间', trigger: 'blur' }
],
creator: [
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
}) })
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const IssueJobDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const IssueJobDetail = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150
},
isTable:false,
hiddenInMain:true,
},
{ {
label: '工位代码', label: '物料代码',
field: 'workStationCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isTable:false, sortSearchDefault: 2,
hiddenInMain:true, isSearch: true,
sortTableDefault: 3
}, },
{ {
label: '在途库库位', label: '物料名称',
field: 'onTheWayLocationCode', field: 'itemName',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isTable:false, sortTableDefault: 3
hiddenInMain:true,
}, },
{ {
label: '包装号', label: '批次',
field: 'packingNumber', field: 'batch',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isSearch: true, isSearch: true,
sortTableDefault:5, sortSearchDefault: 3,
sortTableDefault: 4
}, },
{ {
label: '包装规格', label: '数量',
field: 'packUnit', field: 'qty',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:5, form: {
component: 'InputNumber'
},
hiddenInMain: true
}, },
{ {
label: '包装数量', label: '计量单位',
field: 'packQty', field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
form: { sortTableDefault: 6
component: 'InputNumber',
},
sortTableDefault:5,
}, },
{ {
label: '器具号', label: '包装规格',
field: 'containerNumber', field: 'packUnit',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
hiddenInMain: true, sortTableDefault: 5
isTable:false,
}, },
{ {
label: '批次', label: '包装数量',
field: 'batch', field: 'packQty',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isSearch: true, form: {
sortSearchDefault:3, component: 'InputNumber'
sortTableDefault:4, },
sortTableDefault: 5
}, },
{ {
label: '库存状态', label: '库存状态',
field: 'inventoryStatus', field: 'inventoryStatus',
@ -773,27 +738,7 @@ export const IssueJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, }
},
{
label: '采购订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
sortTableDefault:2,
},
{
label: '订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
sortTableDefault:2,
}, },
{ {
label: '从库位代码', label: '从库位代码',
@ -802,7 +747,7 @@ export const IssueJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isSearch: true, isSearch: true
}, },
{ {
label: '到库位代码', label: '到库位代码',
@ -811,27 +756,16 @@ export const IssueJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isSearch: true, isSearch: true
}, },
{ {
label: '物料代码', label: '单据号',
field: 'itemCode', field: 'number',
sort: 'custom',
table: {
width: 150
},
sortSearchDefault:2,
isSearch: true,
sortTableDefault:3,
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 180
}, },
sortTableDefault:3, hiddenInMain: true
}, },
{ {
label: '物料描述1', label: '物料描述1',
@ -840,7 +774,7 @@ export const IssueJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
hiddenInMain: true, hiddenInMain: true
}, },
{ {
label: '物料描述2', label: '物料描述2',
@ -849,7 +783,7 @@ export const IssueJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
hiddenInMain: true, hiddenInMain: true
}, },
{ {
label: '项目代码', label: '项目代码',
@ -858,109 +792,161 @@ export const IssueJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
hiddenInMain: true, hiddenInMain: true
}, },
{ {
label: '数量', label: '从货主',
field: 'qty', field: 'fromOwnerCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
form: { hiddenInMain: true
component: 'InputNumber',
}, },
hiddenInMain: true, {
label: '到货主',
field: 'toOwnerCode',
sort: 'custom',
table: {
width: 150
},
hiddenInMain: true
}, },
{ {
label: '计量单位', label: '创建者',
field: 'uom', field: 'creator',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:6, hiddenInMain: true
}, },
{ {
label: '单据号', label: '创建时间',
field: 'number', field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom', sort: 'custom',
table: { table: {
width: 180 width: 180
}, },
hiddenInMain: true, hiddenInMain: true,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
}, },
{ {
label: '备注', label: '生产线代码',
field: 'remark', field: 'productionLineCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
hiddenInMain: true, isTable: false,
isDetail: false,
hiddenInMain: true
}, },
{ {
label: '从货主代码', label: '工位代码',
field: 'fromOwnerCode', field: 'workStationCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
hiddenInMain: true, isTable: false,
isDetail: false,
hiddenInMain: true
}, },
{ {
label: '到货主代码', label: '在途库库位',
field: 'toOwnerCode', field: 'onTheWayLocationCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
hiddenInMain: true, isTable: false,
isDetail: false,
hiddenInMain: true
}, },
{ {
label: '创建时间', label: '包装号',
field: 'createTime', field: 'packingNumber',
formatter: dateFormatter, sort: 'custom',
detail: { isTable: false,
dateFormat: 'YYYY-MM-DD HH:mm:ss' table: {
width: 150
},
isSearch: false,
isDetail: false,
sortTableDefault: 5
}, },
{
label: '器具号',
field: 'containerNumber',
sort: 'custom', sort: 'custom',
table: { table: {
width: 180 width: 150
}, },
hiddenInMain: true, hiddenInMain: true,
form: { isDetail: false,
component: 'DatePicker', isTable: false
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
}, },
// {
// label: '采购订单号',
// field: 'poNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain: true,
// isDetail: false,
// sortTableDefault: 2
// },
// {
// label: '订单行',
// field: 'poLine',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain: true,
// isDetail: false,
// sortTableDefault: 2
// },
{ {
label: '创建者', label: '备注',
field: 'creator', field: 'remark',
sort: 'custom', sort: 'custom',
isDetail: false,
table: { table: {
width: 150 width: 150
}, },
hiddenInMain: true, hiddenInMain: true
}, },
{ {
label: '供应商计量数量', label: '供应商计量数量',
field: 'supplierQty', field: 'supplierQty',
sort: 'custom', sort: 'custom',
isDetail: false,
table: { table: {
width: 150 width: 150
}, },
isTable:false, isTable: false,
hiddenInMain: true, hiddenInMain: true,
form: { form: {
component: 'InputNumber', component: 'InputNumber'
} }
}, },
{ {
@ -972,12 +958,12 @@ export const IssueJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable:false, isTable: false,
hiddenInMain:true, isDetail: false,
}, hiddenInMain: true
}
])
])) )
//表单校验 //表单校验
export const IssueJobDetailRules = reactive({ export const IssueJobDetailRules = reactive({

566
src/views/wms/issueManage/issue/issueRecordMain/issueRecordMain.data.ts

@ -1,10 +1,11 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ export const IssueRecordMain = useCrudSchemas(
reactive<CrudSchema[]>([
{ {
label: '单据号', label: '单据号',
field: 'number', field: 'number',
@ -13,7 +14,7 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 180, width: 180,
fixed: 'left' fixed: 'left'
}, },
sortSearchDefault:1, sortSearchDefault: 1,
isSearch: true isSearch: true
}, },
{ {
@ -26,7 +27,7 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:1, sortTableDefault: 1
}, },
{ {
label: '申请单号', label: '申请单号',
@ -35,7 +36,7 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180 width: 180
}, },
isTable: false, isTable: false
}, },
{ {
label: '任务单号', label: '任务单号',
@ -44,7 +45,7 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180 width: 180
}, },
isTable: false, isTable: false
}, },
{ {
label: '供应商代码', label: '供应商代码',
@ -53,7 +54,7 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '车间代码', label: '车间代码',
@ -62,7 +63,7 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '出库事务类型', label: '出库事务类型',
@ -71,7 +72,7 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '入库事务类型', label: '入库事务类型',
@ -80,7 +81,7 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '执行时间', label: '执行时间',
@ -99,9 +100,9 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '生效日期', label: '生效日期',
@ -118,12 +119,12 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'}, style: { width: '100%' },
type: 'date', type: 'date',
dateFormat: 'YYYY-MM-DD', dateFormat: 'YYYY-MM-DD',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '申请时间', label: '申请时间',
@ -142,9 +143,9 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '截止时间', label: '截止时间',
@ -163,9 +164,9 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '部门', label: '部门',
@ -174,7 +175,7 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '接口类型', label: '接口类型',
@ -185,7 +186,7 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, }
}, },
{ {
label: '业务类型', label: '业务类型',
@ -194,7 +195,7 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '备注', label: '备注',
@ -203,38 +204,9 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isTable: true,
}, },
{ {
label: '最后更新时间', label: '最后更新时间',
field: 'updateTime', field: 'updateTime',
@ -252,10 +224,10 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width:'100%'}, style: { width: '100%' },
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
} }
} }
}, },
@ -284,7 +256,7 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '从库区类型范围', label: '从库区类型范围',
@ -295,7 +267,7 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, }
}, },
{ {
label: '从库区代码范围', label: '从库区代码范围',
@ -306,7 +278,7 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, }
}, },
{ {
label: '到仓库代码', label: '到仓库代码',
@ -315,7 +287,7 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '到库区类型范围', label: '到库区类型范围',
@ -326,7 +298,7 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, }
}, },
{ {
label: '到库区代码范围', label: '到库区代码范围',
@ -335,7 +307,7 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
// { // {
// label: '使用在途库', // label: '使用在途库',
@ -382,7 +354,7 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:6, sortTableDefault: 6
}, },
{ {
label: '批次', // 子表数据 只是为了展示 label: '批次', // 子表数据 只是为了展示
@ -391,103 +363,64 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:5, sortTableDefault: 5
}, }
])) ])
)
//表单校验 //表单校验
export const IssueRecordMainRules = reactive({ export const IssueRecordMainRules = reactive({
requestNumber: [ requestNumber: [{ required: true, message: '请选择申请单号', trigger: 'change' }],
{ required: true, message: '请选择申请单号', trigger: 'change' } fromWarehouseCode: [{ required: true, message: '请选择从仓库代码', trigger: 'change' }],
], fromAreaTypes: [{ required: true, message: '请选择从库区类型范围', trigger: 'change' }],
fromWarehouseCode: [ toWarehouseCode: [{ required: true, message: '请选择到仓库代码', trigger: 'change' }],
{ required: true, message: '请选择从仓库代码', trigger: 'change' } toAreaTypes: [{ required: true, message: '请选择库位类型范围', trigger: 'change' }],
], outTransaction: [{ required: true, message: '请输入出库事务类型', trigger: 'blur' }],
fromAreaTypes: [ inTransaction: [{ required: true, message: '请输入入库事务类型', trigger: 'blur' }],
{ required: true, message: '请选择从库区类型范围', trigger: 'change' } executeTime: [{ required: true, message: '请输入执行时间', trigger: 'change' }],
], activeDate: [{ required: true, message: '请输入生效日期', trigger: 'change' }],
toWarehouseCode: [ available: [{ required: true, message: '请输入是否可用', trigger: 'blur' }],
{ required: true, message: '请选择到仓库代码', trigger: 'change' } departmentCode: [{ required: true, message: '请输入部门', trigger: 'blur' }],
], interfaceType: [{ required: true, message: '请选择接口类型', trigger: 'change' }],
toAreaTypes: [ number: [{ required: true, message: '请输入单据号', trigger: 'blur' }],
{ required: true, message: '请选择库位类型范围', trigger: 'change' } businessType: [{ required: true, message: '请输入业务类型', trigger: 'blur' }],
], createTime: [{ required: true, message: '请输入创建时间', trigger: 'blur' }],
outTransaction: [ creator: [{ required: true, message: '请输入创建者', trigger: 'blur' }]
{ required: true, message: '请输入出库事务类型', trigger: 'blur' }
],
inTransaction: [
{ required: true, message: '请输入入库事务类型', trigger: 'blur' }
],
executeTime: [
{ required: true, message: '请输入执行时间', trigger: 'change' }
],
activeDate: [
{ required: true, message: '请输入生效日期', trigger: 'change' }
],
available: [
{ required: true, message: '请输入是否可用', trigger: 'blur' }
],
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],
interfaceType: [
{ required: true, message: '请选择接口类型', trigger: 'change' }
],
number: [
{ required: true, message: '请输入单据号', trigger: 'blur' }
],
businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' }
],
createTime: [
{ required: true, message: '请输入创建时间', trigger: 'blur' }
],
creator: [
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
}) })
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const IssueRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const IssueRecordDetail = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '从包装号',
field: 'fromPackingNumber',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
hiddenInMain: true
},
{ {
label: '到包装号', label: '物料代码',
field: 'toPackingNumber', field: 'itemCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isSearch: true, isSearch: true,
hiddenInMain: true sortSearchDefault: 2,
sortTableDefault: 4
}, },
{ {
label: '包装规格', label: '物料名称',
field: 'packUnit', field: 'itemName',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:8, sortTableDefault: 4
}, },
{ {
label: '包装数量', label: '数量',
field: 'packQty', field: 'qty',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:8, hiddenInMain: true
}, },
{ {
label: '计量单位', label: '计量单位',
@ -499,98 +432,155 @@ export const IssueRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:9, sortTableDefault: 9
}, },
{ {
label: '从批次', label: '物料描述1',
field: 'fromBatch', field: 'itemDesc1',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
sortSearchDefault:3,
isSearch: true,
hiddenInMain: true hiddenInMain: true
}, },
{ {
label: '到批次', label: '物料描述2',
field: 'toBatch', field: 'itemDesc2',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
sortSearchDefault:4,
isSearch: true,
hiddenInMain: true hiddenInMain: true
}, },
{ {
label: '库存状态', label: '从包装号',
field: 'inventoryStatus', field: 'fromPackingNumber',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isSearch: true,
hiddenInMain: true
}, },
{ {
label: '采购订单号', label: '到包装号',
field: 'poNumber', field: 'toPackingNumber',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true, isSearch: true,
sortTableDefault:2, hiddenInMain: true
}, },
{ {
label: '订单行', label: '包装规格',
field: 'poLine', field: 'packUnit',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true, sortTableDefault: 8
sortTableDefault:3,
}, },
{ {
label: '生产线代码', label: '包装数量',
field: 'productionLineCode', field: 'packQty',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isTable:false sortTableDefault: 8
}, },
{ {
label: '工位代码', label: '从批次',
field: 'workStationCode', field: 'fromBatch',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isTable:false sortSearchDefault: 3,
isSearch: true,
hiddenInMain: true
}, },
{ {
label: '在途库库位', label: '到批次',
field: 'onTheWayLocationCode', field: 'toBatch',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isTable:false sortSearchDefault: 4,
isSearch: true,
hiddenInMain: true
}, },
{ {
label: '供应商代码', label: '库存状态',
field: 'supplierCode', field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}
}, },
isTable:false, // {
}, // label: '采购订单号',
// field: 'poNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain: true,
// sortTableDefault: 2
// },
// {
// label: '订单行',
// field: 'poLine',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain: true,
// sortTableDefault: 3
// },
// {
// label: '生产线代码',
// field: 'productionLineCode',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable: false
// },
// {
// label: '工位代码',
// field: 'workStationCode',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable: false
// },
// {
// label: '在途库库位',
// field: 'onTheWayLocationCode',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable: false
// },
// {
// label: '供应商代码',
// field: 'supplierCode',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable: false
// },
{ {
label: '从货主代码', label: '从货主代码',
field: 'fromOwnerCode', field: 'fromOwnerCode',
@ -598,7 +588,7 @@ export const IssueRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true, hiddenInMain: true
}, },
{ {
label: '从库位代码', label: '从库位代码',
@ -607,7 +597,7 @@ export const IssueRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isSearch: true, isSearch: true
}, },
{ {
label: '从库位组代码', label: '从库位组代码',
@ -616,7 +606,7 @@ export const IssueRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true, hiddenInMain: true
}, },
{ {
label: '从库区代码', label: '从库区代码',
@ -625,7 +615,7 @@ export const IssueRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true, hiddenInMain: true
}, },
{ {
label: '到货主代码', label: '到货主代码',
@ -634,7 +624,7 @@ export const IssueRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true, hiddenInMain: true
}, },
{ {
label: '到库位代码', label: '到库位代码',
@ -643,71 +633,23 @@ export const IssueRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isSearch: true, isSearch: true
},
{
label: '到库位组代码',
field: 'toLocationGroupCode',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
},
{
label: '到库区代码',
field: 'toAreaCode',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
},
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180
},
hiddenInMain:true,
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
sortSearchDefault:2,
sortTableDefault:4,
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:4,
}, },
{ {
label: '备注', label: '创建者',
field: 'remark', field: 'creator',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true, isTable: true,
isDetail: false
}, },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
formatter: dateFormatter, formatter: dateFormatter,
isDetail: false,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
}, },
@ -715,92 +657,125 @@ export const IssueRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180 width: 180
}, },
hiddenInMain:true, isTable: true,
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
},
{
label: '物料描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
},
{
label: '物料描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
}, },
{ {
label: '项目代码', label: '到库位组代码',
field: 'projectCode', field: 'toLocationGroupCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true, hiddenInMain: true
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
}, },
hiddenInMain:true,
},
{ {
label: '接口类型', label: '到库区代码',
field: 'interfaceType', field: 'toAreaCode',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
},
{
label: '从器具号',
field: 'fromContainerNumber',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
},
{
label: '到器具号',
field: 'toContainerNumber',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true, hiddenInMain: true
}, },
// {
// label: '单据号',
// field: 'number',
// sort: 'custom',
// table: {
// width: 180
// },
// hiddenInMain: true
// },
// {
// label: '备注',
// field: 'remark',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain: true
// },
// {
// label: '创建时间',
// field: 'createTime',
// formatter: dateFormatter,
// detail: {
// dateFormat: 'YYYY-MM-DD HH:mm:ss'
// },
// sort: 'custom',
// table: {
// width: 180
// },
// hiddenInMain: true,
// form: {
// component: 'DatePicker',
// componentProps: {
// type: 'datetime',
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'x'
// }
// }
// },
// {
// label: '创建者',
// field: 'creator',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain: true
// },
// {
// label: '项目代码',
// field: 'projectCode',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain: true
// },
// {
// label: '接口类型',
// field: 'interfaceType',
// dictType: DICT_TYPE.INTERFACE_TYPE,
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain: true
// },
// {
// label: '从器具号',
// field: 'fromContainerNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain: true
// },
// {
// label: '到器具号',
// field: 'toContainerNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain: true
// }
// { // {
// label: '代码', // label: '代码',
@ -819,7 +794,8 @@ export const IssueRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
// width: 150 // width: 150
// }, // },
// }, // },
])) ])
)
//表单校验 //表单校验
export const IssueRecordDetailRules = reactive({ export const IssueRecordDetailRules = reactive({

454
src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts

@ -24,26 +24,27 @@ const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = { const queryParams = {
pageSize:10, pageSize: 10,
pageNo:1, pageNo: 1,
code:'IssueRequest' code: 'IssueRequest'
} }
const data = await getRequestsettingApi.getRequestsettingPage(queryParams) const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{} const requestsettingData = data?.list[0] || {}
// 获取当前操作人的部门 // 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import { TableColumn } from '@/types/table' import { TableColumn } from '@/types/table'
const userStore = useUserStore() const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept const userDept = userStore.userSelfInfo.dept
// id 转str 否则form回显匹配不到 // id 转str 否则form回显匹配不到
userDept.id = userDept.id.toString() userDept.id = userDept.id.toString()
const userDeptArray:any = [userDept] const userDeptArray: any = [userDept]
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ export const IssueRequestMain = useCrudSchemas(
reactive<CrudSchema[]>([
{ {
label: '单据号', label: '单据号',
field: 'number', field: 'number',
@ -54,7 +55,7 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isForm: false, isForm: false,
isSearch: true, isSearch: true,
sortSearchDefault:1, sortSearchDefault: 1
}, },
{ {
label: '车间代码', label: '车间代码',
@ -63,22 +64,24 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable:false, isTable: false,
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch:true, enterSearch: true,
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择车间代码', // 输入框占位文本 searchListPlaceholder: '请选择车间代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '车间信息', // 查询弹窗标题 searchTitle: '车间信息', // 查询弹窗标题
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [
{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}] }
]
} }
} }
}, },
@ -89,25 +92,28 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable:false, isTable: false,
hiddenInMain:true, hiddenInMain: true,
tableForm:{ tableForm: {
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题 searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [
key:'workshopCode', {
value:'workshopCode', key: 'workshopCode',
value: 'workshopCode',
message: '请填写车间代码!', message: '请填写车间代码!',
isMainValue: true isMainValue: true
},{ },
{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}] }
]
}, },
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
@ -118,16 +124,19 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '生产线信息', // 查询弹窗标题 searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [
key:'workshopCode', {
value:'workshopCode', key: 'workshopCode',
value: 'workshopCode',
message: '请填写车间代码!', message: '请填写车间代码!',
isMainValue: true isMainValue: true
},{ },
{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}] }
]
} }
} }
}, },
@ -138,46 +147,52 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable:false, isTable: false,
hiddenInMain:true, hiddenInMain: true,
tableForm:{ tableForm: {
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本 searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '工位信息', // 查询弹窗标题 searchTitle: '工位信息', // 查询弹窗标题
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法 searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [
key:'productionLineCode', {
value:'productionLineCode', key: 'productionLineCode',
value: 'productionLineCode',
message: '请填写生产线代码!', message: '请填写生产线代码!',
isMainValue: true isMainValue: true
},{ },
{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}] }
]
}, },
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch:true, enterSearch: true,
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择工位代码', // 输入框占位文本 searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '工位信息', // 查询弹窗标题 searchTitle: '工位信息', // 查询弹窗标题
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法 searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [
key:'productionLineCode', {
value:'productionLineCode', key: 'productionLineCode',
value: 'productionLineCode',
message: '请填写生产线代码!', message: '请填写生产线代码!',
isMainValue: true isMainValue: true
},{ },
{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}] }
]
} }
} }
}, },
@ -186,13 +201,13 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'status', field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS, dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string', dictClass: 'string',
isForm:false, isForm: false,
isTable: true, isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:1, sortTableDefault: 1,
form: { form: {
value: '1', value: '1',
componentProps: { componentProps: {
@ -211,16 +226,16 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180 width: 180
}, },
isTable:false, isTable: false,
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
} }
}, },
isForm: false, isForm: false
}, },
{ {
label: '截止时间', label: '截止时间',
@ -233,23 +248,23 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180 width: 180
}, },
isTable:false, isTable: false,
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style:{width:'100%'}, style: { width: '100%' },
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '从库区类型范围', label: '从库区类型范围',
field: 'fromAreaTypes', field: 'fromAreaTypes',
dictType: DICT_TYPE.AREA_TYPE, dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string', dictClass: 'string',
isTable:false, isTable: false,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -261,7 +276,7 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'toAreaTypes', field: 'toAreaTypes',
dictType: DICT_TYPE.AREA_TYPE, dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string', dictClass: 'string',
isTable:false, isTable: false,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -275,7 +290,7 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable:false, isTable: false,
isForm: false isForm: false
}, },
{ {
@ -285,7 +300,7 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable:false, isTable: false,
isForm: false isForm: false
}, },
// { // {
@ -334,7 +349,7 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable:false, isTable: false,
form: { form: {
value: 'Issue', value: 'Issue',
componentProps: { componentProps: {
@ -347,11 +362,11 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '部门', label: '部门',
field: 'departmentCode', field: 'departmentCode',
sort: 'custom', sort: 'custom',
isForm:false, isForm: false,
table: { table: {
width: 150 width: 150
}, },
isTable:false, isTable: false,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userDeptArray.find((account) => account.id == cellValue)?.name return userDeptArray.find((account) => account.id == cellValue)?.name
}, },
@ -375,7 +390,7 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
// { // {
// label: '使用在途库', // label: '使用在途库',
@ -402,8 +417,8 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'autoCommit', field: 'autoCommit',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', dictClass: 'string',
isTable:false, isTable: false,
isForm:false, isForm: false,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -423,8 +438,8 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'autoAgree', field: 'autoAgree',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', dictClass: 'string',
isForm:false, isForm: false,
isTable:false, isTable: false,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -444,8 +459,8 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'autoExecute', field: 'autoExecute',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', dictClass: 'string',
isForm:false, isForm: false,
isTable:false, isTable: false,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -492,16 +507,16 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180 width: 180
}, },
isTable:true, isTable: true,
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
} }
}, },
isForm: false, isForm: false
}, },
{ {
label: '创建者', label: '创建者',
@ -510,8 +525,8 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable:true, isTable: true,
isForm: false, isForm: false
}, },
{ {
label: '最后更新时间', label: '最后更新时间',
@ -524,16 +539,16 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180 width: 180
}, },
isTable:false, isTable: false,
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
} }
}, },
isForm: false, isForm: false
}, },
{ {
label: '最后更新者', label: '最后更新者',
@ -542,8 +557,8 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable:false, isTable: false,
isForm: false, isForm: false
}, },
{ {
label: '操作', label: '操作',
@ -553,32 +568,28 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 230, width: 230,
fixed: 'right' fixed: 'right'
}, }
}, }
])) ])
)
export const IssueRequestMainRules = reactive({ export const IssueRequestMainRules = reactive({
workshopCode: [ workshopCode: [{ required: true, message: '请选择车间代码', trigger: 'change' }],
{ required: true, message: '请选择车间代码', trigger: 'change' } productionLineCode: [{ required: true, message: '请选择生产线代码', trigger: 'change' }],
],
productionLineCode: [
{ required: true, message: '请选择生产线代码', trigger: 'change' }
],
// fromWarehouseCode: [ // fromWarehouseCode: [
// { required: true, message: '请选择从仓库代码', trigger: 'change' } // { required: true, message: '请选择从仓库代码', trigger: 'change' }
// ], // ],
// dueTime: [ // dueTime: [
// { required: true, message: '请选择截止时间', trigger: 'change' } // { required: true, message: '请选择截止时间', trigger: 'change' }
// ], // ],
remark: [ remark: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }]
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
}) })
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const IssueRequestDetail = useCrudSchemas(
reactive<CrudSchema[]>([
// { // {
// label: '生产线代码', // label: '生产线代码',
// field: 'productionLineCode', // field: 'productionLineCode',
@ -684,12 +695,12 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180 width: 180
}, },
isTable:false, isTable: false,
isSearch: false, isSearch: false,
sortSearchDefault:4, sortSearchDefault: 4,
sortTableDefault:6, sortTableDefault: 6,
isTableForm: false, isTableForm: false,
isForm: false, isForm: false
}, },
{ {
label: '器具号', label: '器具号',
@ -698,11 +709,10 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true, hiddenInMain: true,
isTableForm: false, isTableForm: false,
isForm: false, isForm: false,
isTable: false, isTable: false
}, },
{ {
label: '批次', label: '批次',
@ -711,26 +721,14 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable:false, isTable: false,
isSearch: false, isSearch: false,
sortTableDefault:5, sortTableDefault: 5,
sortSearchDefault:3, sortSearchDefault: 3,
isTableForm: false,
isForm: false
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
isTableForm: false, isTableForm: false,
isForm: false isForm: false
}, },
// { // {
// label: '从库位代码', // label: '从库位代码',
// field: 'fromLocationCode', // field: 'fromLocationCode',
@ -750,9 +748,9 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isSearch: false, isSearch: false,
isTable:false, isTable: false,
sortSearchDefault:6, sortSearchDefault: 6,
sortTableDefault:1100, sortTableDefault: 1100,
isTableForm: false, isTableForm: false,
isForm: false isForm: false
}, },
@ -763,12 +761,12 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 250 width: 250
}, },
isSearch:true, isSearch: true,
sortSearchDefault:2, sortSearchDefault: 2,
sortTableDefault:3, sortTableDefault: 3,
tableForm:{ tableForm: {
multiple: true, multiple: true,
enterSearch:true, enterSearch: true,
isInpuFocusShow: true, isInpuFocusShow: true,
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本
@ -776,7 +774,8 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '物料信息', // 查询弹窗标题 searchTitle: '物料信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法 searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [
{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
@ -803,14 +802,27 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '物料信息', // 查询弹窗标题 searchTitle: '物料信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法 searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [
{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}] }
]
} }
} }
}, },
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 300
},
sortTableDefault: 4,
isTableForm: false,
isForm: false
},
{ {
label: '数量', label: '数量',
field: 'qty', field: 'qty',
@ -818,7 +830,7 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true, hiddenInMain: true,
tableForm: { tableForm: {
type: 'InputNumber', type: 'InputNumber',
min: 0, min: 0,
@ -843,8 +855,8 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:9, sortTableDefault: 6,
tableForm:{ tableForm: {
type: 'Select', type: 'Select',
disabled: true disabled: true
}, },
@ -854,6 +866,43 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
sortTableDefault: 7,
isTable: true,
isDetail: true,
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '物料描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
hiddenInMain: true,
isTableForm: false,
isForm: false
},
{
label: '物料描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
hiddenInMain: true,
isTableForm: false,
isForm: false
},
// { // {
// label: '采购订单号', // label: '采购订单号',
// field: 'poNumber', // field: 'poNumber',
@ -882,46 +931,46 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 180 width: 180
}, },
isTableForm: false, isTableForm: false,
hiddenInMain:true, hiddenInMain: true,
form: { form: {
componentProps: { componentProps: {
disabled: true disabled: true
} }
} }
}, },
{ {
label: '备注', label: '数量',
field: 'remark', field: 'qty',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 300
}, },
hiddenInMain:true, sortTableDefault: 5,
isTableForm: false,
isForm: false
}, },
{ {
label: '创建时间', label: '未执行任务数量',
field: 'createTime', field: 'unexecutedQty',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom', sort: 'custom',
table: { table: {
width: 180 width: 150
}, },
form: { form: {
component: 'DatePicker', component: 'InputNumber'
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
}, },
hiddenInMain:true,
isTableForm: false, isTableForm: false,
isForm: false hiddenInMain: true
}, },
// {
// label: '备注',
// field: 'remark',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain: true
// },
{ {
label: '创建者', label: '创建者',
field: 'creator', field: 'creator',
@ -929,13 +978,13 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true, hiddenInMain: true,
isTableForm: false, isTableForm: false,
isForm: false isForm: false
}, },
{ {
label: '最后更新时间', label: '创建时间',
field: 'updateTime', field: 'createTime',
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -949,119 +998,98 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
} }
}, },
isTable:false, hiddenInMain: true,
hiddenInMain:true,
isTableForm: false,
isForm: false,
},
{
label: '最后更新者',
field: 'updater',
sort: 'custom',
table: {
width: 150
},
isTable:false,
hiddenInMain:true,
isTableForm: false, isTableForm: false,
isForm: false isForm: false
}, },
{ {
label: '物料名称', label: '项目代码',
field: 'itemName', field: 'projectCode',
sort: 'custom',
table: {
width: 300
},
sortTableDefault:4,
isTableForm: false,
isForm: false
},
{
label: '物料描述1',
field: 'itemDesc1',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true, hiddenInMain: true,
isTableForm: false, isTableForm: false,
isForm: false isForm: false
}, },
{ {
label: '物料描述2', label: '从货主',
field: 'itemDesc2', field: 'fromOwnerCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true, hiddenInMain: true,
isTableForm: false, isTableForm: false,
isForm: false isForm: false
}, },
{ {
label: '项目代码', label: '到货主',
field: 'projectCode', field: 'toOwnerCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true, hiddenInMain: true,
isTableForm: false, isTableForm: false,
isForm: false isForm: false
}, },
{ {
label: '从货主代码', label: '最后更新时间',
field: 'fromOwnerCode', field: 'updateTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 180
}, },
hiddenInMain:true, form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isTable: false,
hiddenInMain: true,
isTableForm: false, isTableForm: false,
isForm: false isForm: false
}, },
{ {
label: '到货主代码', label: '最后更新者',
field: 'toOwnerCode', field: 'updater',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true, isTable: false,
hiddenInMain: true,
isTableForm: false, isTableForm: false,
isForm: false isForm: false
}, },
{
label: '未执行任务数量',
field: 'unexecutedQty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
},
isTableForm:false,
hiddenInMain:true,
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',
hiddenInMain:true, hiddenInMain: true,
isDetail: false, isDetail: false,
isForm: false , isForm: false,
table: { table: {
width: 200, width: 200,
fixed: 'right' fixed: 'right'
}, },
isTableForm:false, isTableForm: false
} }
])) ])
)
//表单校验 //表单校验
export const IssueRequestDetailRules = reactive({ export const IssueRequestDetailRules = reactive({

6
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue

@ -78,7 +78,7 @@
fieldTableColumn="poLine" fieldTableColumn="poLine"
/> />
采购订单信息
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/purchase-plan-main/import" :importTemplateData="importTemplateData" <ImportForm ref="importFormRef" url="/wms/purchase-plan-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" /> @success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
@ -689,6 +689,10 @@ const handleSelectionPublish = async ()=>{
if('supplierCode'==field){ if('supplierCode'==field){
// //
formRef.value.opensearchTable('poNumber', 'number', '采购订单信息', PurchaseMain.allSchemas, PurchaseMainApi.getPurchaseMainPage,[{ formRef.value.opensearchTable('poNumber', 'number', '采购订单信息', PurchaseMain.allSchemas, PurchaseMainApi.getPurchaseMainPage,[{
key: 'type',
value: 'SCHEDULE',
isMainValue: false
},{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false

12
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts

@ -109,7 +109,7 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearchList: true, isSearchList: true,
searchListPlaceholder: '请选择采购订单', searchListPlaceholder: '请选择采购订单',
searchField: 'number', searchField: 'number',
searchTitle: '采购订单信息3', searchTitle: '采购订单信息',
searchAllSchemas: PurchaseMain.allSchemas, searchAllSchemas: PurchaseMain.allSchemas,
searchPage: PurchaseMainApi.getPurchaseMainPage, searchPage: PurchaseMainApi.getPurchaseMainPage,
searchCondition: [{ searchCondition: [{
@ -520,7 +520,7 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
isSearchList: true, isSearchList: true,
searchListPlaceholder: '请选择采购订单', searchListPlaceholder: '请选择采购订单',
searchField: 'number', searchField: 'number',
searchTitle: '采购订单信息5', searchTitle: '采购订单信息',
searchAllSchemas: PurchaseMain.allSchemas, searchAllSchemas: PurchaseMain.allSchemas,
searchPage: PurchaseMainApi.getPurchaseMainPage, searchPage: PurchaseMainApi.getPurchaseMainPage,
searchCondition: [{ searchCondition: [{
@ -554,7 +554,7 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
isInpuFocusShow: false, isInpuFocusShow: false,
searchListPlaceholder: '请选择订单号', searchListPlaceholder: '请选择订单号',
searchField: 'number', searchField: 'number',
searchTitle: '采购订单信息4', searchTitle: '采购订单信息',
searchAllSchemas: PurchaseMain.allSchemas, searchAllSchemas: PurchaseMain.allSchemas,
searchPage: PurchaseMainApi.getPurchaseMainPage, searchPage: PurchaseMainApi.getPurchaseMainPage,
searchCondition: [{ searchCondition: [{
@ -580,7 +580,7 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
isSearchList: false, isSearchList: false,
searchListPlaceholder: '请选择订单号', searchListPlaceholder: '请选择订单号',
searchField: 'number', searchField: 'number',
searchTitle: '采购订单信息6', searchTitle: '采购订单信息',
searchAllSchemas: PurchaseMain.allSchemas, searchAllSchemas: PurchaseMain.allSchemas,
searchPage: PurchaseMainApi.getPurchaseMainPage, searchPage: PurchaseMainApi.getPurchaseMainPage,
searchCondition: [{ searchCondition: [{
@ -635,7 +635,7 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
isSearchList: false, isSearchList: false,
searchListPlaceholder: '请选择订单行', searchListPlaceholder: '请选择订单行',
searchField: 'lineNumber', searchField: 'lineNumber',
searchTitle: '采购订单信息2', searchTitle: '采购订单信息',
searchAllSchemas: PurchaseDetail.allSchemas, searchAllSchemas: PurchaseDetail.allSchemas,
searchPage: PurchaseDetailApi.getPurchaseDetailPagePoNumber, searchPage: PurchaseDetailApi.getPurchaseDetailPagePoNumber,
searchCondition: [{ searchCondition: [{
@ -656,7 +656,7 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
isInpuFocusShow: false, isInpuFocusShow: false,
searchListPlaceholder: '请选择订单行', searchListPlaceholder: '请选择订单行',
searchField: 'lineNumber', searchField: 'lineNumber',
searchTitle: '采购订单信息1', searchTitle: '采购订单信息',
searchAllSchemas: PurchaseDetail.allSchemas, searchAllSchemas: PurchaseDetail.allSchemas,
searchPage: PurchaseDetailApi.getPurchaseDetailPagePoNumber, searchPage: PurchaseDetailApi.getPurchaseDetailPagePoNumber,
searchCondition: [{ searchCondition: [{

58
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -154,7 +154,6 @@
:footButttondata="footButttondata" :footButttondata="footButttondata"
@footButtonClick="footButtonClick" @footButtonClick="footButtonClick"
@formSelectChange="formSelectChangeLabel" @formSelectChange="formSelectChangeLabel"
@visibleChange='visibleChange'
/> />
<!-- 上传质量报告 --> <!-- 上传质量报告 -->
<BasicForm <BasicForm
@ -628,7 +627,7 @@ const footButttondata = ref([
defaultButtons.formCloseBtn(null) // BOM defaultButtons.formCloseBtn(null) // BOM
]) ])
// //
const getGenerateLabelList=async(row)=>{ const getGenerateLabelList = async (row) => {
const params1 = { const params1 = {
masterId: row.masterId, masterId: row.masterId,
pageSize: '500', pageSize: '500',
@ -640,13 +639,19 @@ const getGenerateLabelList=async(row)=>{
detatableData1.value = res detatableData1.value = res
detatableData1.value.forEach((item) => { detatableData1.value.forEach((item) => {
item.packUnitInitOptions = item.boxPackaging item.packUnitInitOptions = item.boxPackaging
item.secondPackUnitInitOptions = item.palletPackaging || []
let obj = item?.boxPackaging[0] let obj = item?.boxPackaging[0]
if (obj) { if (obj) {
item.packUnit= obj.packUnit item.packUnit = obj.packUnit
item.packQty = obj.packQty item.packQty = obj.packQty
} }
item.secondPackUnit= '' //
item.secondPackQty = '' item.secondPackUnit = obj.parentPackUnit
? obj.parentPackUnit
: item?.secondPackUnitInitOptions[0]?.packUnit
item.secondPackQty = obj.parentPackUnit
? obj.parentPackQty
: item?.secondPackUnitInitOptions[0]?.packQty
}) })
}) })
} }
@ -658,12 +663,12 @@ const footButtonClick = async (val) => {
if (!validateForm) { if (!validateForm) {
return return
} }
let isNext = detatableData1.value.some((item)=>{ let isNext = detatableData1.value.some((item) => {
return !item.packUnit || !item.packQty return !item.packUnit || !item.packQty
}) })
if(isNext){ if (isNext) {
message.warning('有数据没有选择箱规格') message.warning('有数据没有选择箱规格')
return; return
} }
const data = JSON.parse(JSON.stringify(detatableData1.value)) const data = JSON.parse(JSON.stringify(detatableData1.value))
labelFormRef.value.openLabel(data) labelFormRef.value.openLabel(data)
@ -677,12 +682,25 @@ const formSelectChangeLabel = (field, val, row) => {
let obj = row.boxPackaging.find((item) => item.packUnit == val) let obj = row.boxPackaging.find((item) => item.packUnit == val)
if (obj) { if (obj) {
row.packQty = obj.packQty row.packQty = obj.packQty
//
const params1 = {
itemCode: row.itemCode,
packUnit: row.packUnit
}
SupplierdeliverRequestDetailApi.getGenerateLabelParentList(params1).then((res) => {
if (res?.length > 0) {
row.secondPackUnit = res[0].packUnit
row.secondPackQty = res[0].packQty
} else { } else {
row.packQty = '' row.secondPackUnit = row?.secondPackUnitInitOptions[0]?.packUnit
row.secondPackQty = row?.secondPackUnitInitOptions[0]?.packQty
} }
})
} else {
row.packQty = ''
row.secondPackUnit = '' row.secondPackUnit = ''
row.secondPackQty = '' row.secondPackQty = ''
}
} }
// //
if (field == 'secondPackUnit') { if (field == 'secondPackUnit') {
@ -694,23 +712,7 @@ const formSelectChangeLabel = (field, val, row) => {
} }
} }
} }
// tableForm
const visibleChange=(field, val, row, index)=>{
row.secondPackUnitInitOptions=[]
if(field=='secondPackUnit'){
if(val){
//
const params1 = {
itemCode: row.itemCode,
packUnit: row.packUnit
}
SupplierdeliverRequestDetailApi.getGenerateLabelParentList(params1).then((res) => {
row.secondPackUnitInitOptions = res
})
}
}
}
// //
const { wsCache } = useCache() const { wsCache } = useCache()
@ -1000,9 +1002,8 @@ const { getList: getDetailList } = detatableMethods
// //
const submitFormLabel = async (list) => { const submitFormLabel = async (list) => {
try { try {
let data = { let data = {
subList:list subList: list
} }
await message.confirm(t('ts.是否为此数据生成标签?')) await message.confirm(t('ts.是否为此数据生成标签?'))
labelFormRef.value.isLoading = true labelFormRef.value.isLoading = true
@ -1016,7 +1017,6 @@ const submitFormLabel = async (list) => {
labelFormRef.value.formLoading = false labelFormRef.value.formLoading = false
labelFormRef.value.dialogTableVisible = false labelFormRef.value.dialogTableVisible = false
labelFormRef.value.isLoading = false labelFormRef.value.isLoading = false
} }
} }
const clearInput = async (field, row, index) => { const clearInput = async (field, row, index) => {

16
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts

@ -82,6 +82,7 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
// { // {
// label: '申请单号', // label: '申请单号',
// field: 'requestNumber', // field: 'requestNumber',
@ -434,6 +435,21 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
}, },
//子表数据,仅是查询条件
{
label: '货运单号',
field: 'asnBillNum',
sort: 'custom',
table: {
width: 180,
fixed: 'left'
},
isTableForm:false,
isTable:false,
isDetail:false,
isSearch: true,
isForm: false,
},
{ {
label: '财务凭证号', label: '财务凭证号',
field: 'voucherNumber', field: 'voucherNumber',

Loading…
Cancel
Save