陈薪名 11 months ago
parent
commit
6d5c09b9eb
  1. 17
      src/api/wms/transferissueJobMain/index.ts
  2. 3
      src/api/wms/transferissueRequestDetail/index.ts
  3. 40
      src/api/wms/transferissueRequestMain/index.ts
  4. 99
      src/components/BasicForm/src/BasicForm.vue
  5. 11
      src/components/Detail/src/Detail.vue
  6. 3
      src/components/DetailCountPlan/index.ts
  7. 499
      src/components/DetailCountPlan/src/DetailCountPlan.vue
  8. 9
      src/components/TableForm/src/TableForm.vue
  9. 3
      src/components/TableFormCountPlan/index.ts
  10. 193
      src/components/TableFormCountPlan/src/TableFormCountPlan.vue
  11. 18
      src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
  12. 147
      src/views/wms/countManage/count/countPlanMain/index.vue
  13. 41
      src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/index.vue
  14. 118
      src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue
  15. 115
      src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts

17
src/api/wms/transferissueJobMain/index.ts

@ -83,4 +83,19 @@ export const exportTransferissueJobMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/transferissue-job-main/get-import-template' })
}
}
// 关闭-调拨出库任务主
export const closeTransferissueJobMain = (id: number) => {
return request.download({ url: '/wms/transferissue-job-main/close?id=' + id })
}
// 承接-调拨出库任务主
export const acceptTransferissueJobMain = (id: number) => {
return request.download({ url: '/wms/transferissue-job-main/accept?id=' + id })
}
// 放弃-调拨出库任务主
export const abandonTransferissueJobMain = (id: number) => {
return request.download({ url: '/wms/transferissue-job-main/abandon?id=' + id })
}

3
src/api/wms/transferissueRequestDetail/index.ts

@ -21,6 +21,7 @@ export interface TransferissueRequestDetailVO {
updateTime: Date
updater: string
fromOwnerCode: string
fromLocationCode: string
}
// 查询调拨出库申请子列表
@ -62,4 +63,4 @@ export const exportTransferissueRequestDetail = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/transferissue-request-detail/get-import-template' })
}
}

40
src/api/wms/transferissueRequestMain/index.ts

@ -44,22 +44,22 @@ export const getTransferissueRequestMain = async (id: number) => {
return await request.get({ url: `/wms/transferissue-request-main/get?id=` + id })
}
// 新增调拨出库申请主
// 新增-调拨出库申请主
export const createTransferissueRequestMain = async (data: TransferissueRequestMainVO) => {
return await request.post({ url: `/wms/transferissue-request-main/create`, data })
}
// 修改调拨出库申请主
// 修改-调拨出库申请主
export const updateTransferissueRequestMain = async (data: TransferissueRequestMainVO) => {
return await request.put({ url: `/wms/transferissue-request-main/update`, data })
}
// 删除调拨出库申请主
// 删除-调拨出库申请主
export const deleteTransferissueRequestMain = async (id: number) => {
return await request.delete({ url: `/wms/transferissue-request-main/delete?id=` + id })
}
// 导出调拨出库申请主 Excel
// 导出-调拨出库申请主 Excel
export const exportTransferissueRequestMain = async (params) => {
return await request.download({ url: `/wms/transferissue-request-main/export-excel`, params })
}
@ -67,4 +67,34 @@ export const exportTransferissueRequestMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/transferissue-request-main/get-import-template' })
}
}
// 关闭-调拨出库申请
export const closeTransferissueRequestMain = async (id) => {
return await request.put({ url: `/wms/transferissue-request-main/close?id=` + id })
}
// 重新添加-调拨出库申请
export const reAddTransferissueRequestMain = async (id) => {
return await request.put({ url: `/wms/transferissue-request-main/reAdd?id=` + id })
}
// 提交审批-调拨出库申请
export const submitTransferissueRequestMain = async (id) => {
return await request.put({ url: `/wms/transferissue-request-main/submit?id=` + id })
}
// 审批驳回-调拨出库申请
export const refusedTransferissueRequestMain = async (id) => {
return await request.put({ url: `/wms/transferissue-request-main/refused?id=` + id })
}
// 审批通过-调拨出库申请
export const agreeTransferissueRequestMain = async (id) => {
return await request.put({ url: `/wms/transferissue-request-main/agree?id=` + id })
}
// 处理-调拨出库申请
export const handleTransferissueRequestMain = async (id) => {
return await request.put({ url: `/wms/transferissue-request-main/handle?id=` + id })
}

99
src/components/BasicForm/src/BasicForm.vue

@ -1,5 +1,10 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" :width="isBusiness ? '60%' : '40%'" :close-on-click-modal="false">
<Dialog
:title="dialogTitle"
v-model="dialogVisible"
:width="isBusiness ? '60%' : '40%'"
:close-on-click-modal="false"
>
<Form
ref="formRef"
v-loading="formLoading"
@ -12,7 +17,11 @@
<crontab v-model="formSchema.crontab" />
</template>
<template #type="formSchema" v-if="fromeWhere == 'countPlan'">
<el-select v-model="formSchema.type" placeholder="选择盘点类型" @change="selectChange('type',$event)">
<el-select
v-model="formSchema.type"
placeholder="选择盘点类型"
@change="selectChange('type', $event)"
>
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.COUNT_TYPE)"
:key="dict.value"
@ -22,7 +31,7 @@
</el-select>
</template>
</Form>
<div class="table" v-if="isBusiness && formType == 'create'">
<div class="table" v-if="isBusiness && formType == 'create' && fromeWhere != 'countPlan'">
<TableForm
ref="tableFormRef"
class="w-[100%]"
@ -35,13 +44,24 @@
@tableSelectionChange="tableSelectionChange"
@extendedButtonsClick="extendedButtonsClick"
@formSelectChange="formSelectChange"
@formSelectvVisibleChange = 'formSelectvVisibleChange'
@formSelectvVisibleChange="formSelectvVisibleChange"
@tableSortChange="tableSortChange"
@selectCallback="selectCallback"
@handleTableSelect="handleTableSelect"
@inpuFocus="inpuFocus"
/>
</div>
<div v-if="isBusiness && formType == 'create' && fromeWhere == 'countPlan'">
<TableFormCountPlan
:tableFields="tableAllSchemas.tableFormColumns"
:tableData="tableData"
:countScopeType="countScopeType"
:tableFormRules="tableFormRules"
ref="tableFormRef"
@tableFormChange="tableFormChange"
@handleAddTable="handleAddTable"
/>
</div>
<template #footer>
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" />
</template>
@ -53,6 +73,7 @@ import { SearchTable } from '@/components/SearchTable'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import ButtonBase from '@/components/XButton/src/ButtonBase.vue'
import TableForm from '@/components/TableForm/src/TableForm.vue'
import TableFormCountPlan from '@/components/TableFormCountPlan/src/TableFormCountPlan.vue'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
const props = defineProps({
@ -143,6 +164,11 @@ const props = defineProps({
type: String,
required: false,
default: ''
},
countScopeType: {
type: Array,
required: false,
default: null
}
})
@ -156,7 +182,9 @@ const formType = ref('') // 表单的类型:create - 新增;update - 修改
const formRef = ref() // Ref
const formSchema = ref(props.formAllSchemas?.formSchema)
console.log('props.formAllSchemas',props.formAllSchemas)
const tableAllSchemas = ref(props.tableAllSchemas)
const tableFormRules = ref(props.tableFormRules)
console.log('tableAllSchemas', tableAllSchemas.value)
/** 弹层操作 */
// formField form
@ -179,7 +207,7 @@ const opensearchTable = (
//
if (searchCondition && searchCondition.length > 0) {
//
let filters:any[] = []
let filters: any[] = []
searchCondition.forEach((item) => {
// row
// 20231127 row[item.value]?row[item.value] row?row[item.value] 'null'
@ -348,14 +376,15 @@ const emit = defineEmits([
'searchTableSuccess',
'opensearchTable',
'submitForm',
'selectChange'
'selectChange',
'tableFormChange'
])
//
const formSelectChange = (field, val,row) => {
emit('formSelectChange', field, val,row)
const formSelectChange = (field, val, row) => {
emit('formSelectChange', field, val, row)
}
const formSelectvVisibleChange = (field, val,row) => {
emit('formSelectvVisibleChange', field, val,row)
const formSelectvVisibleChange = (field, val, row) => {
emit('formSelectvVisibleChange', field, val, row)
}
// selection
const tableSelectionChange = (val) => {
@ -385,8 +414,6 @@ const handleAddTable = () => {
}
//
const inpuFocus = (headerItem, row, index) => {
console.log(headerItem.tableForm.multiple)
opensearchTable(
headerItem.field,
headerItem.tableForm.searchField,
@ -399,16 +426,56 @@ const inpuFocus = (headerItem, row, index) => {
row
)
}
//
const selectChange=((field,val)=>{
emit('selectChange',field,val)
})
const selectChange = (field, val) => {
emit('selectChange', field, val)
}
const tableFormChange = (field, val, row) => {
emit('tableFormChange', field, val, row)
}
</script>
<style lang="scss" scoped>
.table {
border: 1px solid #dedede;
border-radius: 8px;
padding: 10px;
width: calc(100% - 20px);
display: flex;
}
::v-deep(.el-table__body) {
padding: 10px 0px;
}
::v-deep(.el-table--default .el-table__cell) {
padding: 2px 0px;
border: none;
}
::v-deep(.el-table td.el-table__cell .el-form-item__content) {
display: flex !important;
align-items: center !important;
justify-content: center !important;
}
::v-deep(.el-table td.el-table__cell div) {
overflow: visible;
}
::v-deep(.el-icon) {
display: block;
}button
.button {
> div {
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
> div {
margin-left: 6px;
text-decoration: underline;
color: #409eff;
}
}
}
</style>

11
src/components/Detail/src/Detail.vue

@ -46,7 +46,7 @@
:columns="2"
/>
<Table
v-if="!isBasic"
v-if="!isBasic && fromeWhere != 'countPlan'"
:columns="detailAllSchemasRef.tableColumns"
:data="tableObjectRef.tableList"
:loading="tableObjectRef.loading"
@ -61,6 +61,7 @@
/>
</template>
</Table>
</ContentWrap>
<ContentWrap class="w-[27%] ml-16px">
<!-- 附件组件 -->
@ -180,7 +181,13 @@ const props = defineProps({
type: Function,
required: false,
default: null
}
},
// countPlan
fromeWhere: {
type: String,
required: false,
default: ''
},
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)

3
src/components/DetailCountPlan/index.ts

@ -0,0 +1,3 @@
import DetailCountPlan from './src/DetailCountPlan.vue'
export { DetailCountPlan }

499
src/components/DetailCountPlan/src/DetailCountPlan.vue

@ -0,0 +1,499 @@
<template>
<div>
<el-drawer
v-model="isShowDrawer"
title="详情"
direction="rtl"
size="80%"
v-loading="detailLoading"
>
<template #header>
<div class="font-size-18px">
{{ titleValueRef }} <span class="ml-20px font-size-16px">{{ titleNameRef }}</span>
</div>
</template>
<ContentWrap v-if="!isBasic">
<Descriptions
:data="detailData"
labelClassName="label-class-name"
label-align="left"
direction="vertical"
:column="8"
:schema="allSchemas.detailSchema"
:columns="2"
width="200px"
/>
</ContentWrap>
<Tabs :tabsList="tabsList" :current="current" @change="change" />
<div class="flex">
<!-- 详情 -->
<ContentWrap class="w-[73%]">
<!-- 列表头部 -->
<TableHead
v-if="!isBasic"
:HeadButttondata="HeadButttondata"
:masterId="masterParmas.masterId"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@searchFormClick="searchFormClick"
:allSchemas="detailAllSchemas"
/>
<Descriptions
v-if="isBasic"
:data="detailData"
:schema="allSchemas.detailSchema"
:columns="2"
/>
<Table
v-if="!isBasic"
:columns="detailAllSchemasRef.tableColumns"
:data="tableObjectRef.tableList"
:loading="tableObjectRef.loading"
:pagination="{ total: tableObjectRef.total }"
v-model:pageSize="tableObjectRef.pageSize"
v-model:currentPage="tableObjectRef.currentPage"
>
<template #action="{ row }">
<ButtonBase
:Butttondata="buttondata"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
<ContentWrap class="w-[27%] ml-16px">
<!-- 附件组件 -->
<Annex
:annexData="annexData"
@handleAnnexSuccess="handleAnnexSuccess"
@deleteAnnexSuccess="deleteAnnexSuccess"
:upData="remarksData.data"
/>
<!-- 备注组件 -->
<Remarks
:remarksData="remarksData"
class="mt-20px"
@remarksSubmitScuess="remarksSubmitScuess"
/>
<!-- 变更记录组件 -->
<ChangeRecord :changeRecordData="changeRecordData" class="mt-20px" />
</ContentWrap>
</div>
</el-drawer>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
@success="submitForm"
:rules="detailAllSchemasRules"
:formAllSchemas="detailAllSchemas"
:isBusiness="false"
:apiUpdate="apiUpdate"
:apiCreate="apiCreate"
@searchTableSuccess="searchTableSuccess"
:detailData="detailData"
@submitForm="submitForm"
/>
</div>
</template>
<script lang="ts" setup>
import Annex from '@/components/Annex/src/Annex.vue'
import Remarks from '@/components/Remarks/src/Remarks.vue'
import ChangeRecord from '@/components/ChangeRecord/src/ChangeRecord.vue'
import Tabs from '@/components/Tabs/src/Tabs.vue'
import * as RemarkApi from '@/api/wms/remark'
import * as FileApi from '@/api/wms/file'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
defineOptions({ name: 'DetailCountPlan' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
routeName.value = routeName.value.substring(0, routeName.value.length - 4) + 'Detail'
const props = defineProps({
//
tabs: {
type: Object,
required: true,
default: null
},
//
isBasic: {
type: Boolean,
required: false,
default: false
},
//
allSchemas: {
type: Object,
required: true,
default: null
},
//
detailAllSchemas: {
type: Object,
required: true,
default: null
},
//
detailAllSchemasRules: {
type: Object,
required: true,
default: null
},
// API
apiCreate: {
type: Function,
required: false,
default: null
},
// API
apiUpdate: {
type: Function,
required: false,
default: null
},
// API
apiPage: {
type: Function,
required: false,
default: null
},
// API
apiDelete: {
type: Function,
required: false,
default: null
},
//
detailValidate: {
type: Function,
required: false,
default: null
}
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)
const tabsList = ref(JSON.parse(JSON.stringify(props.tabs ? props.tabs : '')))
if (props.isBasic == true) {
if (tabsList.value && tabsList.value.length > 0) {
tabsList.value.unshift({
label: '详情',
prop: 'Detail'
})
}
} else {
if (tabsList.value && tabsList.value.length > 0) {
} else {
tabsList.value = [
{
label: '明细',
prop: 'Detail'
}
]
}
}
if (tabsList.value) {
}
//
const annexData = reactive({
annexList: []
})
//
const remarksData = reactive({
remarksList: [],
data: {}
})
//
const changeRecordData = reactive({
changeRecordList: []
})
const detailData = ref({}) //
//
const getFileList = async () => {
detailLoading.value = true
try {
annexData.annexList = await FileApi.getFileList(remarksData.data)
} finally {
detailLoading.value = false
}
}
/** 添加附件 */
const handleAnnexSuccess = () => {
getFileList()
getChangeRecordList()
}
//
const deleteAnnexSuccess = async () => {
getFileList()
getChangeRecordList()
}
// Tabs
const current = ref(0)
const change = (item, index) => {
current.value = index
emit('changeTabs', item)
}
//
const masterParmas = ref({
masterId: '', //id
number: '', //
status: '' //
})
//
const HeadButttondata = ref()
// -
const buttondata = ref()
/** 打开弹窗 */
const titleNameRef = ref()
const titleValueRef = ref()
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
titleNameRef.value = titleName
titleValueRef.value = titleValue
remarksData.data = {
tableId: row.id,
tableName: tableName
}
//
if (!props.isBasic) {
// id
masterParmas.value.masterId = row.id
masterParmas.value.number = row.number
masterParmas.value.status = row.status
tableObjectRef.value.params = {
masterId: row.id
}
getList()
}
isShowDrawer.value = true
if (row) {
detailLoading.value = true
try {
detailData.value = row
getRemarkList()
getFileList()
getChangeRecordList()
//
if(routeName.value.indexOf('Job') > -1){
HeadButttondata.value = [
defaultButtons.defaultFilterBtn(null) //
]
}else{
HeadButttondata.value = [
defaultButtons.defaultAddBtn({
hide: isShowMainButton(row, ['1'])
}), //
defaultButtons.defaultFilterBtn(null) //
]
}
//
buttondata.value = [
defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['1'])
}), //
defaultButtons.mainListDeleteBtn({
hide: isShowMainButton(row, ['1'])
}) //
]
} finally {
detailLoading.value = false
}
}
}
defineExpose({ openDetail }) // open
//
const getRemarkList = async () => {
detailLoading.value = true
try {
remarksData.remarksList = await RemarkApi.getRemarkPage(remarksData.data)
} finally {
detailLoading.value = false
}
}
//
const remarksSubmitScuess = async (remark) => {
detailLoading.value = false
getRemarkList()
getChangeRecordList()
}
//
const getChangeRecordList = async () => {
changeRecordData.changeRecordList = await RemarkApi.getChangeRecordPage(remarksData.data)
}
const tableObjectRef = ref()
const tableMethodsRef = ref()
const detailAllSchemasRef = ref()
const { tableObject, tableMethods } = useTable({
getListApi: props.apiPage //
})
tableObjectRef.value = tableObject
tableMethodsRef.value = tableMethods
detailAllSchemasRef.value = props.detailAllSchemas
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
//
const { getList } = tableMethodsRef.value
//
const buttonBaseClick = (val, item) => {
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
//
// const updataTableColumns = (val) => {
// detailAllSchemas.tableColumns.value = val
// }
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') {
//
openForm('update', row)
} else if (val == 'delete') {
//
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type: string, row?: number) => {
formRef.value.open(type, row, masterParmas.value)
}
// form
const submitForm = async (formType, data) => {
try {
// detailValidate
const rs = await props.detailValidate?props.detailValidate(data):true
if (!rs) return
if (formType === 'create') {
await props.apiCreate(data)
message.success(t('common.createSuccess'))
} else {
await props.apiUpdate(data)
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
//
getList()
} finally {
formRef.value.formLoading = false
}
}
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
emit('searchTableSuccessDetail', formField, searchField, val, formRef)
}
//
const emit = defineEmits(['searchTableSuccessDetail', 'changeTabs'])
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await props.apiDelete(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
//
const searchFormClick = (searchData) => {
const { tableObject, tableMethods } = useTable({
getListApi: props.apiPage //
})
tableObject.params = {
isSearch: true,
filters: searchData.filters
? searchData.filters
: [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }]
}
detailAllSchemasRef.value = props.detailAllSchemas
tableObjectRef.value = tableObject
tableMethodsRef.value = tableMethods
tableObjectRef.value.tableList = []
const { getList } = tableMethods
getList()
// tableObjectRef.value.params = {
// isSearch: true,
// filters: searchData.filters
// ? searchData.filters
// : [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }]
// }
// getList() //
}
//
watch(
() =>props.apiPage,
() => {
const { tableObject, tableMethods } = useTable({
getListApi: props.apiPage //
})
tableObject.params.masterId = masterParmas.value.masterId
detailAllSchemasRef.value = props.detailAllSchemas
tableObjectRef.value = tableObject
tableMethodsRef.value = tableMethods
const { getList } = tableMethods
getList()
},
)
</script>
<style lang="scss">
.el-drawer__body {
background: #f5f5f5 !important;
}
::v-deep(.label-class-name) {
color: #dedede;
}
</style>
<style scoped lang="scss"></style>

9
src/components/TableForm/src/TableForm.vue

@ -112,8 +112,7 @@
:allow-create="headerItem?.tableForm.allowCreate"
style="width: 100%"
:placeholder="headerItem?.tableForm?.placeholder || '请选择' + headerItem.label"
@change="formSelectChange(headerItem.field, $event,row)"
@visible-change="formSelectvVisibleChange(headerItem.field, $event,row)">
@change="formSelectChange(headerItem.field, $event,row)">
<el-option
v-for="op in initSelectOptions(headerItem)"
:label="op.label"
@ -326,7 +325,6 @@ const emit = defineEmits([
'tableSelectionChange',
'extendedButtonsClick',
'formSelectChange',
'formSelectvVisibleChange',
'tableSortChange',
'selectCallback',
'handleTableSelect',
@ -342,9 +340,7 @@ const initSelectOptions = (item) => {
const formSelectChange = (field, val,row) => {
emit('formSelectChange', field, val,row)
}
const formSelectvVisibleChange = (field, val,row) => {
emit('formSelectvVisibleChange', field, val,row)
}
// selection
const tableSelectionChange = (val) => {
emit('tableSelectionChange', val)
@ -381,6 +377,7 @@ const TableBaseForm_Ref = ref()
*/
const validateForm = () => {
console.log(TableBaseForm_Ref.value)
let _lists = TableBaseForm_Ref.value?.map(v => v.validate())
return Promise.all(_lists).then(() => {
return true

3
src/components/TableFormCountPlan/index.ts

@ -0,0 +1,3 @@
import TableFormCountPlan from './src/TableFormCountPlan.vue'
export { TableFormCountPlan }

193
src/components/TableFormCountPlan/src/TableFormCountPlan.vue

@ -0,0 +1,193 @@
<!-- 附件组件 -->
<template>
<!-- 盘点计划的子表 -->
<div class="table">
<el-table :data="tableData" stripe style="width: 100%"
ref="TableBaseComponents_Ref" >
<el-table-column fixed="left" :width="50" v-slot="{ row, $index }">
<Icon
icon="ep:remove"
color="#757575"
size="26"
style="cursor: pointer;margin-top: -16px;"
@click="handleDeleteTable(row, $index)"
/>
</el-table-column>
<el-table-column :label="tableFields[0].label" align="center">
<template v-slot="{ row }">
<el-form
ref="TableBaseForm_Ref"
:model="row"
style="width: 100%;"
:rules="tableFormRules"
:class="tableFormRules ? '' : 'noRulesForm'">
<el-form-item :prop="tableFields[0].field">
<el-select
v-model="row.type"
:placeholder="tableFields[0].placeholder || '请输入' + tableFields[0].label"
@change="tableFormChange(tableFields[0].field, $event, row)"
>
<el-option
v-for="dict in countScopeType"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-form>
</template>
</el-table-column>
<el-table-column
:prop="tableFields[1].field"
:label="tableFields[1].label"
align="center"
>
<template v-slot="{ row }">
<el-form
ref="TableBaseForm_Ref1"
:model="row"
style="width: 100%;"
:rules="tableFormRules"
:class="tableFormRules ? '' : 'noRulesForm'">
<el-form-item :prop="tableFields[1].field">
<el-select
v-model="row.value"
:placeholder="
tableFields[1].placeholder ||
'请输入' + tableFields[1].label
"
v-if="
row.type == 'OWNER' ||
row.type == 'SUPPLIER' ||
row.type == 'CUSTOMER' ||
row.type == 'ABC' ||
row.type == 'ITEMS_TYPE' ||
row.type == 'ITEMS_GROUP' ||
row.type == 'ITEMS_CODE' ||
row.type == 'WAREHOUSE_CODE' ||
row.type == 'AREABASIC_CODE' ||
row.type == 'LOCATIONGROUP_CODE' ||
row.type == 'LOCATION_CODE'
"
>
<el-option
v-for="item in row.initOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-input
v-model="row.value"
:placeholder="
tableFields[1].placeholder ||
'请输入' + tableFields[1].label
"
v-else
/>
</el-form-item>
</el-form>
</template>
</el-table-column>
</el-table>
<div class="button flex">
<div class="p-12px" @click="handleAddTable">
<Icon icon="ep:circle-plus" color="#409eff" size="26" style="cursor: pointer" />
<div>添加明细</div>
</div>
</div>
</div>
</template>
<script setup>
defineComponent({
name: 'TableFormCountPlan'
})
const props = defineProps({
//
tableFields: {
type: Array,
default: () => {
return []
}
},
//
tableData: {
type: Array,
default: () => {
return []
}
},
tableFormRules: {
type: Array,
required: true,
default: null
},
countScopeType: {
type: Array,
required: false,
default: null
},
})
const tableData = props.tableData
const tableFields = props.tableFields
const TableBaseComponents_Ref = ref()
const TableBaseForm_Ref = ref()
const TableBaseForm_Ref1 = ref()
const tableFormRules = ref(props.tableFormRules)
console.log('tableFormRules',tableFormRules.value)
/**
* 验证表单是否符合rules
* @param {*} success 如果验证成功走的方法
* @param {*} error 如果验证不成功走的方法
*/
const validateForm = () => {
let TableBaseForm_Arr = []
TableBaseForm_Arr.push(TableBaseForm_Ref.value)
TableBaseForm_Arr.push(TableBaseForm_Ref1.value)
let _lists = TableBaseForm_Arr?.map(v => v.validate())
return Promise.all(_lists).then(() => {
return true
}).catch(() => {
return false
})
}
//
const emit = defineEmits(['handleAddTable', 'selectChange', 'tableFormChange'])
//
const selectChange = (field, val) => {
emit('selectChange', field, val)
}
const tableFormChange = (field, val, row) => {
emit('tableFormChange', field, val, row)
}
//
const handleAddTable = () => {
emit('handleAddTable')
}
// setup
defineExpose({
TableBaseComponents_Ref,
validateForm
})
</script>
<style scoped lang="scss">
.button {
> div {
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
> div {
margin-left: 6px;
text-decoration: underline;
color: #409eff;
}
}
}
</style>

18
src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts

@ -648,7 +648,6 @@ export const CountPlanDetail = useCrudSchemas(<CrudSchema[]>([
width: 300
},
tableForm: {
type: 'InputString',
width: '300',
}
},
@ -665,19 +664,10 @@ export const CountPlanDetail = useCrudSchemas(<CrudSchema[]>([
}
]))
export const CountPlanDetailRules = reactive({
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
],
uom: [
{ required: true, message: '请选择计量单位', trigger: 'change' }
],
planQty: [
{ required: true, message: '请输入计划数量', trigger: 'blur' }
],
number: [
{ required: true, message: '请输入单据号', trigger: 'blur' }
type: [
{ required: true, message: '请选择盘点范围类型', trigger: 'change' }
],
itemCode: [
{ required: true, message: '请选择物品代码', trigger: 'change' }
value: [
{ required: true, message: '请选择盘点范围值', trigger: 'change' }
],
})

147
src/views/wms/countManage/count/countPlanMain/index.vue

@ -57,6 +57,7 @@
:apiUpdate="CountPlanMainApi.updateCountPlanMain"
:apiCreate="CountPlanMainApi.createCountPlanMain"
fromeWhere="countPlan"
:countScopeType="getStrDictOptions(DICT_TYPE.COUNT_SCOPE_TYPE)"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@ -64,6 +65,7 @@
@formSelectChange="formSelectChange"
@formSelectvVisibleChange="formSelectvVisibleChange"
@selectChange="selectChange"
@tableFormChange="tableFormChange"
/>
<!-- 详情 -->
@ -79,6 +81,7 @@
:apiPage="CountPlanDetailApi.getCountPlanDetailPage"
:apiDelete="CountPlanDetailApi.deleteCountPlanDetail"
:Echo="Echo"
fromeWhere="countPlan"
/>
<!-- 导入 -->
@ -112,6 +115,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict'
console.log('CountPlanDetail.allSchemas', CountPlanDetail.allSchemas)
//
defineOptions({ name: 'CountPlanMain' })
@ -290,7 +294,10 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type: string, row?: number) => {
tableData.value = [] //
tableData.value = [ {
type: '',
value: ''
}] //
formRef.value.open(type, row)
getOwnerAllList()
@ -341,16 +348,22 @@ const handleExport = async () => {
/**
* tableForm方法
*/
const tableFormKeys = {}
let tableFormKeys = {}
CountPlanDetail.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
const tableData = ref([{
type: '',
value: ''
}])
//
const handleAddTable = () => {
console.log(tableFormKeys)
tableFormKeys.formType = 'Select'
// tableFormKeys.formType=''
tableFormKeys = {
type: '',
value: ''
}
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
@ -360,7 +373,13 @@ const handleDeleteTable = (item, index) => {
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
data.subList = tableData.value.map(item=>{
return{
type:item.type,
value:item.value,
}
}) //
console.log(tableData.value)
try {
if (formType === 'create') {
await CountPlanMainApi.createCountPlanMain(data)
@ -404,7 +423,6 @@ const searchFormClick = (searchData) => {
}
//
const selectChange = (field, val) => {
console.log(val)
if (field == 'type') {
if (val == 'DYNAMIC') {
CountPlanMain.allSchemas.formSchema[3].label = '限值(%)'
@ -421,74 +439,71 @@ const selectChange = (field, val) => {
}
}
}
let valueList = []
//
const formSelectChange = async (field, val, row) => {
console.log(row[field])
const tableFormChange = async (field, val, row) => {
console.log(field)
console.log(val)
if (field == 'type') {
row.value = ''
if (row.type == 'OWNER' || row.type == 'SUPPLIER'|| row.type == 'CUSTOMER'|| row.type == 'ABC'|| row.type == 'ITEMS_TYPE'|| row.type == 'ITEMS_GROUP'||row.type == 'ITEMS_CODE'||row.type == 'WAREHOUSE_CODE'||row.type == 'AREABASIC_CODE'||row.type == 'LOCATIONGROUP_CODE'||row.type == 'LOCATION_CODE') {
if (
row.type == 'OWNER' ||
row.type == 'SUPPLIER' ||
row.type == 'CUSTOMER' ||
row.type == 'ABC' ||
row.type == 'ITEMS_TYPE' ||
row.type == 'ITEMS_GROUP' ||
row.type == 'ITEMS_CODE' ||
row.type == 'WAREHOUSE_CODE' ||
row.type == 'AREABASIC_CODE' ||
row.type == 'LOCATIONGROUP_CODE' ||
row.type == 'LOCATION_CODE'
) {
row.formType = 'Select'
switch (row.type) {
case 'OWNER':
row.initOptions = ownerAllList.value
break
case 'SUPPLIER':
row.initOptions = supplierAllList.value
break
case 'CUSTOMER':
row.initOptions = customerAllList.value
break
case 'ABC':
row.initOptions = getStrDictOptions(DICT_TYPE.ABC_CLASS)
break
case 'ITEMS_TYPE':
row.initOptions = getStrDictOptions(DICT_TYPE.ITEM_TYPE)
break
case 'ITEMS_GROUP':
row.initOptions = getStrDictOptions(DICT_TYPE.ITEM_GROUP)
break
case 'ITEMS_CODE':
row.initOptions = itembasicAllList.value
break
case 'WAREHOUSE_CODE':
row.initOptions = warehouseAllList.value
break
case 'AREABASIC_CODE':
row.initOptions = areaAllList.value
break
case 'LOCATIONGROUP_CODE':
row.initOptions = locationgroupAllList.value
break
case 'LOCATION_CODE':
row.initOptions = locationAllList.value
break
}
} else if (row.type == 'PROJECT') {
row.formType = 'InputString'
// row.initOptions = valueList
}else if(row.type == 'PROJECT'){
// row = {
// type: 'InputString',
// width: '300',
// initOptions: valueList
// }
}
}
}
const formSelectvVisibleChange = async (field, val, row) => {
console.log(getStrDictOptions(DICT_TYPE.ABC_CLASS))
switch (row.type) {
case 'OWNER':
valueList = ownerAllList.value
break;
case 'SUPPLIER':
valueList = supplierAllList.value
break;
case 'CUSTOMER':
valueList = customerAllList.value
break;
case 'ABC':
valueList = getStrDictOptions(DICT_TYPE.ABC_CLASS)
break;
case 'ITEMS_TYPE':
valueList = getStrDictOptions(DICT_TYPE.ITEM_TYPE)
break;
case 'ITEMS_GROUP':
valueList = getStrDictOptions(DICT_TYPE.ITEM_GROUP)
break;
case 'ITEMS_CODE':
valueList = itembasicAllList.value
break;
case 'WAREHOUSE_CODE':
valueList = warehouseAllList.value
break
case 'AREABASIC_CODE':
valueList = areaAllList.value
break
case 'LOCATIONGROUP_CODE':
valueList = locationgroupAllList.value
break
case 'LOCATION_CODE':
valueList = locationAllList.value
break
}
CountPlanDetail.allSchemas.tableFormColumns[1].tableForm = {
type: 'Select',
width: '300',
initOptions: valueList
}
}
const ownerAllList = ref()
const supplierAllList = ref()
const customerAllList = ref()
const itembasicAllList = ref()
const itembasicAllList = ref()
const warehouseAllList = ref()
const areaAllList = ref()
const locationgroupAllList = ref()
@ -535,7 +550,7 @@ const getItembasicAllList = async () => {
}
//
const getWarehouseAllList = async () => {
await WarehouseApi.getWarehouseList({available:'TRUE'}).then((res) => {
await WarehouseApi.getWarehouseList({ available: 'TRUE' }).then((res) => {
res.forEach((element) => {
element.value = element.code
element.label = element.name
@ -545,7 +560,7 @@ const getWarehouseAllList = async () => {
}
//
const getAreaAllList = async () => {
await AreaApi.getAreaList({available:'TRUE'}).then((res) => {
await AreaApi.getAreaList({ available: 'TRUE' }).then((res) => {
res.forEach((element) => {
element.value = element.code
element.label = element.name
@ -555,7 +570,7 @@ const getAreaAllList = async () => {
}
//
const getLocationgroupAllList = async () => {
await LocationgroupApi.getLocationgroupList({available:'TRUE'}).then((res) => {
await LocationgroupApi.getLocationgroupList({ available: 'TRUE' }).then((res) => {
res.forEach((element) => {
element.value = element.code
element.label = element.name
@ -565,7 +580,7 @@ const getLocationgroupAllList = async () => {
}
//
const getLocationAllList = async () => {
await LocationpApi.getLocationList({available:'TRUE'}).then((res) => {
await LocationpApi.getLocationList({ available: 'TRUE' }).then((res) => {
res.forEach((element) => {
element.value = element.code
element.label = element.name

41
src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/index.vue

@ -71,6 +71,8 @@ import { TransferissueJobMain,TransferissueJobMainRules,TransferissueJobDetail,T
import * as TransferissueJobMainApi from '@/api/wms/transferissueJobMain'
import * as TransferissueJobDetailApi from '@/api/wms/transferissueJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as PurchasereceiptJobMainApi from "@/api/wms/purchasereceiptJobMain";
import {acceptTransferissueJobMain} from "@/api/wms/transferissueJobMain";
//
defineOptions({ name: 'TransferissueJobMain' })
@ -174,9 +176,9 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
// defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:transferissue-job-main:close'}), //
//defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
]
}
@ -187,13 +189,46 @@ const buttonTableClick = async (val, row) => {
console.log('列表-操作按钮事件-执行')
} else if (val == 'mainJobAba') { //
console.log('列表-操作按钮事件-放弃')
handleAbandon(row.id)
} else if (val == 'mainJobClo') { //
console.log('列表-操作按钮事件-关闭')
handleClose(row.id)
} else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接')
handleAccept(row.id)
}
}
/** 放弃按钮操作 */
const handleAbandon = async (id: number) => {
try {
await message.confirm(t('common.confirmColse'))
await TransferissueJobMainApi.abandonTransferissueJobMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
try {
await message.confirm(t('common.confirmColse'))
await TransferissueJobMainApi.closeTransferissueJobMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
}
/** 承接按钮操作 */
const handleAccept = async (id: number) => {
try {
await message.confirm(t('common.confirmColse'))
await TransferissueJobMainApi.acceptTransferissueJobMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {

118
src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue

@ -82,6 +82,9 @@ import { TransferissueRequestMain,TransferissueRequestMainRules,TransferissueReq
import * as TransferissueRequestMainApi from '@/api/wms/transferissueRequestMain'
import * as TransferissueRequestDetailApi from '@/api/wms/transferissueRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as PurchasereturnRequestMainApi from "@/api/wms/purchasereturnRequestMain";
import {closeTransferissueRequestMain} from "@/api/wms/transferissueRequestMain";
import * as PurchasereceiptRequestMainApi from "@/api/wms/purchasereceiptRequestMain";
//
defineOptions({ name: 'TransferissueRequestMain' })
@ -104,13 +107,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
row['packingNumber'] = val[0]['packingNumber']
row['containerNumber'] = val[0]['containerNumber']
row['batch'] = val[0]['batch']
row['inventoryStatus'] = val[0]['inventoryStatus']
row['toLocationCode'] = val[0]['locationCode']
row['itemCode'] = val[0]['itemCode']
if (formField == 'packingNumber') {
row['packingNumber'] = val[0]['packingNumber']
row['containerNumber'] = val[0]['containerNumber']
row['batch'] = val[0]['batch']
row['inventoryStatus'] = val[0]['inventoryStatus']
row['fromLocationCode'] = val[0]['locationCode']
row['itemCode'] = val[0]['itemCode']
} else {
row[formField] = val[0][searchField]
}
} else {
const setV = {}
setV[formField] = val[0][searchField]
@ -122,13 +128,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
setV['packingNumber'] = val[0]['packingNumber']
setV['containerNumber'] = val[0]['containerNumber']
setV['batch'] = val[0]['batch']
setV['inventoryStatus'] = val[0]['inventoryStatus']
setV['toLocationCode'] = val[0]['locationCode']
setV['itemCode'] = val[0]['itemCode']
if(formField == 'packingNumber'){
setV['packingNumber'] = val[0]['packingNumber']
setV['containerNumber'] = val[0]['containerNumber']
setV['batch'] = val[0]['batch']
setV['inventoryStatus'] = val[0]['inventoryStatus']
setV['fromLocationCode'] = val[0]['locationCode']
setV['itemCode'] = val[0]['itemCode']
}else {
setV[formField] = val[0][searchField]
}
formRef.setValues(setV)
})
}
@ -190,13 +199,13 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:transferissue-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:transferissue-request-main:delete'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:transferissue-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:transferissue-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:transferissue-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:transferissue-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:transferissue-request-main:agree'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:transferissue-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:transferissue-request-main:update'}), //
]
}
@ -206,14 +215,21 @@ const butttondata = (row) => {
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
handleClose(row.id)
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
handleReAdd(row.id)
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
handleSubmit(row.id)
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
handleRefused(row.id)
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
handleAgree(row.id)
} else if (val == 'mainHandle') { //
handleHandle(row.id)
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
@ -221,6 +237,66 @@ const buttonTableClick = async (val, row) => {
}
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
try {
await message.confirm(t('common.confirmColse'))
await TransferissueRequestMainApi.closeTransferissueRequestMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
}
/** 重新添加按钮操作 */
const handleReAdd = async (id: number) => {
try {
await message.confirm(t('common.confirmReAdd'))
await TransferissueRequestMainApi.reAddTransferissueRequestMain(id)
message.success(t('common.reAddSuccess'))
await getList()
} catch {}
}
/** 提交按钮操作 */
const handleSubmit = async (id: number) => {
try {
await message.confirm(t('common.confirmSubmit'))
await TransferissueRequestMainApi.submitTransferissueRequestMain(id)
message.success(t('common.submitSuccess'))
await getList()
} catch {}
}
/** 审批驳回按钮操作 */
const handleRefused = async (id: number) => {
try {
await message.confirm(t('common.confirmRefused'))
await TransferissueRequestMainApi.refusedTransferissueRequestMain(id)
message.success(t('common.refusedSuccess'))
await getList()
} catch {}
}
/** 审批通过按钮操作 */
const handleAgree = async (id: number) => {
try {
await message.confirm(t('common.confirmAgree'))
await TransferissueRequestMainApi.agreeTransferissueRequestMain(id)
message.success(t('common.agreeSuccess'))
await getList()
} catch {}
}
/** 处理按钮操作 */
const handleHandle = async (id: number) => {
try {
await message.confirm(t('common.confirmHandle'))
await TransferissueRequestMainApi.handleTransferissueRequestMain(id)
message.success(t('common.handleSuccess'))
await getList()
} catch {}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm =async (type: string, row?: number) => {

115
src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts

@ -11,6 +11,9 @@ import { Dock } from '@/views/wms/basicDataManage/factoryModeling/dock/dock.data
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -24,6 +27,9 @@ const queryParams = {
// 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user'
import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data";
import * as WarehouseApi from "@/api/wms/warehouse";
const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept
@ -88,10 +94,11 @@ export const TransferissueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '运输方式',
field: 'transferMode',
sort: 'custom',
dictType: DICT_TYPE.TRANSFER_MODE,
dictClass: 'string',
table: {
width: 150
},
isSearch: true,
},
{
label: '车牌号',
@ -151,7 +158,30 @@ export const TransferissueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isForm: false,
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择仓库代码',
searchField: 'code',
searchTitle: '仓库信息',
searchAllSchemas: Warehouse.allSchemas,
searchPage: WarehouseApi.getWarehousePage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '仓库信息', // 查询弹窗标题
searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '到仓库代码',
@ -160,7 +190,30 @@ export const TransferissueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isForm: false,
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择仓库代码',
searchField: 'code',
searchTitle: '仓库信息',
searchAllSchemas: Warehouse.allSchemas,
searchPage: WarehouseApi.getWarehousePage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '仓库信息', // 查询弹窗标题
searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '从库位类型范围',
@ -189,7 +242,7 @@ export const TransferissueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
},
{
label: '从库区代码范围',
field: 'fromAreaCode',
field: 'fromAreaCodes',
sort: 'custom',
table: {
width: 150
@ -544,7 +597,12 @@ export const TransferissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePage
searchPage: BalanceApi.getBalancePage,
searchCondition: [{
key: 'warehouseCode',
value: 'fromWarehouseCode',
isMainValue: true,
}]
},
form: {
// labelMessage: '信息提示说明!!!',
@ -554,7 +612,12 @@ export const TransferissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePage
searchPage: BalanceApi.getBalancePage,
searchCondition: [{
key: 'warehouseCode',
value: 'fromWarehouseCode',
isMainValue: true,
}]
}
}
},
@ -603,6 +666,17 @@ export const TransferissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
type: 'Select'
}
},
{
label: '来源库位',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
}
},
{
label: '到库位代码',
field: 'toLocationCode',
@ -611,7 +685,32 @@ export const TransferissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
tableForm: {
disabled: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码',
searchField: 'code',
searchTitle: '库位信息',
searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.getLocationPage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'warehouseCode',
value: 'toWarehouseCode',
isMainValue: true,
}]
}
}
},
{
@ -758,4 +857,4 @@ export const TransferissueRequestDetailRules = reactive({
itemCode: [
{ required: true, message: '请选择物品代码', trigger: 'change' }
],
})
})

Loading…
Cancel
Save