Browse Source

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

intex_online20241205
宋国强 3 months ago
parent
commit
4504f44500
  1. 14
      src/api/system/post/index.ts
  2. 13
      src/api/wms/location/index.ts
  3. 13
      src/api/wms/warehouse/index.ts
  4. 2
      src/components/ImportForm/src/ImportFormStep.vue
  5. 3
      src/components/TableForm/src/TableForm.vue
  6. 167
      src/views/system/post/PostAreaPermissionForm.vue
  7. 13
      src/views/system/post/index.vue
  8. 10
      src/views/wms/deliversettlementManage/directSupplyPinRecordMain/deliverRecordMain/deliverRecordMain.data.ts
  9. 10
      src/views/wms/deliversettlementManage/ftSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts
  10. 67
      src/views/wms/deliversettlementManage/ssSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts
  11. 10
      src/views/wms/deliversettlementManage/tjdtSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts
  12. 3
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue
  13. 24
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts
  14. 14
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
  15. 1
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts
  16. 8
      src/views/wms/productionManage/productredress/productredressRequestMain/index.vue
  17. 1
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

14
src/api/system/post/index.ts

@ -44,3 +44,17 @@ export const deletePost = async (id: number) => {
export const exportPost = async (params) => {
return await request.download({ url: '/system/post/export', params })
}
// 库位树状图
export const getPostAreaTreeList = async () => {
return await request.get({ url: '/wms/warehouse/treeLocation' })
}
// 根据id获取已选择节点
export const getByPostId = async (id) => {
return await request.get({ url: '/system/post-location/getByPostId?postId=' + id })
}
//提交选择的节点
export const updatePostLocation = async (data) => {
return await request.post({ url: '/system/post-location/updatePostLocation',data})
}

13
src/api/wms/location/index.ts

@ -186,3 +186,16 @@ export const getFromWarehouseCode = async (code: string) => {
return await request.get({ url: `/wms/location/getFromWarehouseCode?code=` + code })
}
// 查询库位列表
export const getLocationListByBusinesstype = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: `/wms/location/getLocationListByBusinesstypeSenior`, data })
} else {
return await request.get({ url: `/wms/location/getLocationListByBusinesstype`, params })
}
}

13
src/api/wms/warehouse/index.ts

@ -22,6 +22,19 @@ export const getWarehousePage = async (params) => {
}
}
// 查询仓库列表
export const getWarehouseByBusinessTypeSenior = async (params) => {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/warehouse/getWarehouseByBusinessTypeSenior', data })
}
// 查询仓库列表
export const getWarehouseByBusinessTypePage = async (params) => {
return await request.get({ url: `/wms/warehouse/page`, params })
}
// 校验仓库
export const verifyWarehouse = async (params) => {
return await request.get({ url: `/wms/warehouse/ListByCode`, params })

2
src/components/ImportForm/src/ImportFormStep.vue

@ -83,7 +83,7 @@
<Icon icon="ep:download" />
{{ t('ts.下载模板') }}
</el-button>
<el-button type="primary" plain @click="downloadDifferenceData" v-if="active == 1">
<el-button type="primary" plain @click="downloadDifferenceData" v-if="active == 1 && error">
<Icon icon="ep:download" />
{{ t('ts.下载差异数据') }}
</el-button>

3
src/components/TableForm/src/TableForm.vue

@ -100,7 +100,7 @@
`ts.${headerItem?.tableForm?.placeholder || '请输入' + headerItem.label}`
).replace('ts.', '')
"
:disabled="disabledInput(headerItem, row)"
:disabled="itemIsDisabled(headerItem, row)"
style="flex: 1"
@blur="inputStringBlur(headerItem, row[headerItem.field], row, index)"
@clear="clearInput(headerItem.field, row, index)"
@ -120,6 +120,7 @@
:key="headerItem.field + $index + 'button'"
v-if="headerItem?.tableForm?.isInpuFocusShow || showInputSearch(headerItem, row)"
@click="inpuFocus(headerItem, row, index)"
:disabled="itemIsDisabled(headerItem, row)"
><Icon icon="ep:search" size="14"
/></el-button>
</el-form-item>

167
src/views/system/post/PostAreaPermissionForm.vue

@ -0,0 +1,167 @@
<template>
<Dialog v-model="dialogVisible" title="菜单权限">
<el-form ref="formRef" v-loading="formLoading" :model="formData" label-width="80px">
<el-form-item label="岗位名称">
<el-tag>{{ formData.name }}</el-tag>
</el-form-item>
<el-form-item label="菜单权限">
<el-card class="cardHeight">
<template #header>
全选/全不选:
<el-switch
v-model="treeNodeAll"
active-text="是"
inactive-text="否"
inline-prompt
@change="handleCheckedTreeNodeAll"
/>
全部展开/折叠:
<el-switch
v-model="menuExpand"
active-text="展开"
inactive-text="折叠"
inline-prompt
@change="handleCheckedTreeExpand"
/>
</template>
<el-tree
ref="treeRef"
:data="areaOptions"
:props="defaultProps"
empty-text="加载中,请稍候"
node-key="id"
show-checkbox
/>
</el-card>
</el-form-item>
</el-form>
<template #footer>
<el-button :disabled="formLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script lang="ts" setup>
import { defaultProps, handleTree } from '@/utils/tree'
// import * as RoleApi from '@/api/system/role'
// import * as MenuApi from '@/api/system/menu'
// import * as PermissionApi from '@/api/system/permission'
import * as PostApi from '@/api/system/post'
defineOptions({ name: 'SystemRoleAssignMenuForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const formLoading = ref(false) // 12
const formData = reactive({
id: 0,
name: '',
code: '',
menuIds: []
})
const formRef = ref() // Ref
const areaOptions = ref<any[]>([]) //
const menuExpand = ref(false) // /
const treeRef = ref() // Ref
const treeNodeAll = ref(false) // /
/** 打开弹窗 */
const open = async (row: any) => {
dialogVisible.value = true
resetForm()
// Menu setChecked
areaOptions.value = await PostApi.getPostAreaTreeList()
// menuOptions.value = handleTree(await MenuApi.getSimpleMenusList())
//
formData.id = row.id
formData.name = row.name
formData.code = row.code
formLoading.value = true
try {
formData.value.menuIds = await PostApi.getByPostId(row.id)
//
formData.value.menuIds.forEach((menuId: number) => {
treeRef.value.setChecked(menuId, true, false)
})
} finally {
formLoading.value = false
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
//
formLoading.value = true
try {
// const data = {
// roleId: formData.id,
// menuIds: [
// ...(treeRef.value.getCheckedKeys(false) as unknown as Array<number>), //
// ...(treeRef.value.getHalfCheckedKeys() as unknown as Array<number>) //
// ]
// }
let array = treeRef.value.getCheckedNodes(false).filter(item => item.id).map(item => {
return {
postId:formData.id,
locationId:item.id,
locationCode:item.code,
}
})
console.log(888, array)
await PostApi.updatePostLocation(array)
message.success(t('common.updateSuccess'))
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
//
treeNodeAll.value = false
menuExpand.value = false
//
formData.value = {
id: 0,
name: '',
code: '',
menuIds: []
}
treeRef.value?.setCheckedNodes([])
formRef.value?.resetFields()
}
/** 全选/全不选 */
const handleCheckedTreeNodeAll = () => {
treeRef.value.setCheckedNodes(treeNodeAll.value ? menuOptions.value : [])
}
/** 展开/折叠全部 */
const handleCheckedTreeExpand = () => {
const nodes = treeRef.value?.store.nodesMap
for (let node in nodes) {
if (nodes[node].expanded === menuExpand.value) {
continue
}
nodes[node].expanded = menuExpand.value
}
}
</script>
<style lang="scss" scoped>
.cardHeight {
width: 100%;
max-height: 400px;
overflow-y: scroll;
}
</style>

13
src/views/system/post/index.vue

@ -46,8 +46,12 @@
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180" :formatter="dateFormatter" />
<el-table-column label="操作" align="center" fixed="right" width="180">
<el-table-column label="操作" align="center" fixed="right" width="250">
<template #default="scope">
<el-button link type="primary" @click="openAreaPermission(scope.row)" v-hasPermi="['system:post:area-permission']">
<Icon icon="ep:view" />
库区权限
</el-button>
<el-button link type="primary" @click="openForm('update', scope.row.id)" v-hasPermi="['system:post:update']">
<Icon icon="ep:edit" />
编辑
@ -66,6 +70,7 @@
<!-- 表单弹窗添加/修改 -->
<PostForm ref="formRef" @success="getList" />
<PostAreaPermissionForm ref="postAreaPermissionFormRef" />
</template>
<script lang="ts" setup>
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
@ -73,6 +78,7 @@ import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import * as PostApi from '@/api/system/post'
import PostForm from './PostForm.vue'
import PostAreaPermissionForm from './PostAreaPermissionForm.vue'
import { usePageLoading } from '@/hooks/web/usePageLoading'
const { loadStart, loadDone } = usePageLoading()
defineOptions({ name: 'SystemPost' })
@ -150,7 +156,10 @@ const handleExport = async () => {
loadDone()
}
}
const postAreaPermissionFormRef = ref()
const openAreaPermission = (row) =>{
postAreaPermissionFormRef.value.open(row)
}
/** 初始化 **/
onMounted(() => {
getList()

10
src/views/wms/deliversettlementManage/directSupplyPinRecordMain/deliverRecordMain/deliverRecordMain.data.ts

@ -717,11 +717,15 @@ export const ExtendColumn = useCrudSchemas(
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchPage: LocationApi.getLocationListByBusinesstype, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
key: 'isIn',
value: false,
isMainValue: false
},{
key: 'businessType',
value: 'Deliver',
isMainValue: false
}
]

10
src/views/wms/deliversettlementManage/ftSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts

@ -656,11 +656,15 @@ export const ExtendColumn = useCrudSchemas(
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchPage: LocationApi.getLocationListByBusinesstype, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
key: 'isIn',
value: false,
isMainValue: false
},{
key: 'businessType',
value: 'Deliver',
isMainValue: false
}
]

67
src/views/wms/deliversettlementManage/ssSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts

@ -713,40 +713,41 @@ export const DeliverRecordDetailRules = reactive({
export const ExtendColumn = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '从库位',
field: 'fromLocationCode',
sort: 'custom',
table: {
colProps: {
span: 24
}
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位编号', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
isSearch: true
export const ExtendColumn = useCrudSchemas([
{
label: '从库位',
field: 'fromLocationCode',
sort: 'custom',
table: {
colProps: {
span: 24
}
},
])
)
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位编号', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationListByBusinesstype, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'isIn',
value: false,
isMainValue: false
},{
key: 'businessType',
value: 'Deliver',
isMainValue: false
}
]
}
},
isSearch: true
}
])
//表单校验
export const ExtendColumnRules = reactive({

10
src/views/wms/deliversettlementManage/tjdtSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts

@ -653,11 +653,15 @@ export const ExtendColumn = useCrudSchemas(
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchPage: LocationApi.getLocationListByBusinesstype, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
key: 'isIn',
value: false,
isMainValue: false
},{
key: 'businessType',
value: 'Deliver',
isMainValue: false
}
]

3
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue

@ -568,14 +568,13 @@ const openForm = async (type: string, row?: any) => {
by: 'ASC',
filters: [
{ column: 'available', action: '==', value: 'TRUE' },
{ column: 'type', action: '==', value: 'SCRAP' }
],
pageNo: 1,
pageSize: 500,
sort: ''
}
params.isSearch = true
WarehouseApi.getWarehousePage(params).then((res) => {
WarehouseApi.getWarehouseByBusinessTypeSenior(params).then((res) => {
if (res.list?.length > 0) {
nextTick(() => {
formRef.value.formRef.setValues({

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

@ -635,18 +635,18 @@ export const ScrapRequestMain = useCrudSchemas(
searchField: 'code',
searchTitle: '仓库信息',
searchAllSchemas: Warehouse.allSchemas,
searchPage: WarehouseApi.getWarehousePage,
searchPage: WarehouseApi.getWarehouseByBusinessTypePage,
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'type',
value: Scrap.outAreaTypes,
isMainValue: false
}
// {
// key: 'type',
// value: Scrap.outAreaTypes,
// isMainValue: false
// }
],
verificationParams: [
{
@ -668,18 +668,18 @@ export const ScrapRequestMain = useCrudSchemas(
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '仓库信息', // 查询弹窗标题
searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
searchPage: WarehouseApi.getWarehouseByBusinessTypePage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'type',
value: Scrap.outAreaTypes,
isMainValue: false
}
// {
// key: 'type',
// value: Scrap.outAreaTypes,
// isMainValue: false
// }
],
verificationParams: [
{

14
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue

@ -575,12 +575,12 @@ const buttonTableClick = async (val, row) => {
//
// dialogVisible.value = true
formLabelRef.value.open('create', row)
console.log(detailListTableColumns.tableFormColumns)
detatableData.tableList.map((item) => {
if (item.itemType == '可采购') {
detailListTableColumns.tableFormColumns =
UnplannedreceiptRequestDetailLabel.allSchemas.tableFormColumns.filter(
(item) => item.field != 'productionLineCode'
)
item.disabled_productionLineCode = true
item.disabled_supplierCode = false
// tableform
SupplieritemApi.getSupplieritemPage({
pageSize: 10,
@ -596,10 +596,8 @@ const buttonTableClick = async (val, row) => {
})
})
} else if (item.itemType == '可制造') {
detailListTableColumns.tableFormColumns =
UnplannedreceiptRequestDetailLabel.allSchemas.tableFormColumns.filter(
(item) => item.field != 'supplierCode'
)
item.disabled_supplierCode = true
item.disabled_productionLineCode = false
ProductionlineitemApi.getProductionlineitemPage({
pageNo: 1,
itemCode: item.itemCode,

1
src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts

@ -1,5 +1,4 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as BalanceApi from '@/api/wms/balance'

8
src/views/wms/productionManage/productredress/productredressRequestMain/index.vue

@ -367,6 +367,10 @@ const openForm =async (type: string, row?: number) => {
itemColumns.componentProps.isSearchList = false
itemColumns.componentProps.disabled = true
}
if(itemColumns.field == 'productionLineCode') {
itemColumns.componentProps.isSearchList = false
itemColumns.componentProps.disabled = true
}
})
} else {
@ -380,6 +384,10 @@ const openForm =async (type: string, row?: number) => {
itemColumns.componentProps.isSearchList = true
itemColumns.componentProps.disabled = false
}
if(itemColumns.field == 'productionLineCode') {
itemColumns.componentProps.isSearchList = true
itemColumns.componentProps.disabled = false
}
})
}
formRef.value.open(type, row)

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

@ -1244,7 +1244,6 @@ const documentSrc = ref(BASE_URL + '/jmreport/view/1019060741381099520?token=' +
//
const documentSrc2 = ref(BASE_URL + '/jmreport/view/1019406772438372352?token=' + getAccessToken())
const handleDocumentPrint = async (id, stausId) => {
debugger
await SupplierdeliverRequestMainApi.getItemStatus(stausId).then(async (res) => {
if (res) {
//

Loading…
Cancel
Save