Browse Source

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

master_hella_20240701
zhousq 6 months ago
parent
commit
e956e2a98e
  1. 2
      README.md
  2. 71
      src/api/eam/maintenance/index.ts
  3. 11
      src/api/wms/customeritem/index.ts
  4. 13
      src/api/wms/deliverPlanMain/index.ts
  5. 13
      src/api/wms/deliverRequestMain/index.ts
  6. 2
      src/components/TableForm/src/TableForm.vue
  7. 18
      src/locales/en-US.ts
  8. 15
      src/locales/zh-CN.ts
  9. 291
      src/views/eam/maintenance/index.vue
  10. 214
      src/views/eam/maintenance/maintenance.data.ts
  11. 12
      src/views/login/forgetPassword.vue
  12. 19
      src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts
  13. 29
      src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue
  14. 28
      src/views/wms/deliversettlementManage/deliver/deliverRecordMain/index.vue
  15. 22
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts
  16. 105
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue
  17. 22
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts
  18. 56
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue

2
README.md

@ -1,4 +1,4 @@
## dev发布2024-05-21-002
## dev发布2024-05-23-001
**xxxx.data.ts 文件配置说明**
**form表单查询弹窗配置**
form: {

71
src/api/eam/maintenance/index.ts

@ -0,0 +1,71 @@
import request from '@/config/axios'
import {InspectionItemSelectSetVO} from "@/api/eam/inspectionItemSelectSet";
export interface MaintenanceVO {
id: number
number: string
describing: string
equipmentCode: string
type: string
optionCode: string
cycle: string
classes: string
peoples: number
estimatedMinutes: number
factoryAreaCode: string
workshopCode: string
workshopSectionCode: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询保养计划列表
export const getMaintenancePage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/basic/maintenance/senior', data })
} else {
return await request.get({ url: `/eam/basic/maintenance/page`, params })
}
}
// 查询保养计划详情
export const getMaintenance = async (id: number) => {
return await request.get({ url: `/eam/basic/maintenance/get?id=` + id })
}
// 新增保养计划
export const createMaintenance = async (data: MaintenanceVO) => {
return await request.post({ url: `/eam/basic/maintenance/create`, data })
}
// 修改保养计划
export const updateMaintenance = async (data: MaintenanceVO) => {
return await request.put({ url: `/eam/basic/maintenance/update`, data })
}
// 删除保养计划
export const deleteMaintenance = async (id: number) => {
return await request.delete({ url: `/eam/basic/maintenance/delete?id=` + id })
}
// 导出保养计划 Excel
export const exportMaintenance = async (params) => {
return await request.download({ url: `/eam/basic/maintenance/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/basic/maintenance/get-import-template' })
}
// 启用 / 禁用
export const updateEnableCode = async (data: InspectionItemSelectSetVO) => {
return await request.post({ url: `/eam/basic/maintenance/ables` , data })
}

11
src/api/wms/customeritem/index.ts

@ -62,3 +62,14 @@ export const exportCustomeritem = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/customeritem/get-import-template' })
}
// 获得业务类型筛选出的物料分页
export const getPageBusinessTypeToItemCode = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/customeritem/pageBusinessTypeToLocationSenior', data })
} else {
return await request.get({ url: `/wms/customeritem/pageBusinessTypeToItemCode`, params })
}
}

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

@ -49,6 +49,19 @@ export const deleteDeliverPlanMain = async (id: number) => {
// 导出发货计划主 Excel
export const exportDeliverPlanMain = async (params) => {
params.businessType = 'Deliver'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/deliver-plan-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/deliver-plan-main/export-excel`, params })
}
}
// 导出发货计划主 Excela
export const exportZZBJDeliverPlanMain = async (params) => {
params.businessType = 'ZZBJDeliver'
if (params.isSearch) {
delete params.isSearch
const data = {...params}

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

@ -65,6 +65,19 @@ export const deleteDeliverRequestMain = async (id: number) => {
// 导出发货申请主 Excel
export const exportDeliverRequestMain = async (params) => {
params.businessType = 'Deliver'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/deliver-request-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/deliver-request-main/export-excel`, params })
}
}
// 导出发货申请主 Excel
export const exportZZBJDeliverRequestMain = async (params) => {
params.businessType = 'ZZBJDeliver'
if (params.isSearch) {
delete params.isSearch
const data = {...params}

2
src/components/TableForm/src/TableForm.vue

@ -64,7 +64,7 @@
v-model="row[headerItem.field]"
clearable
:type="headerItem?.tableForm?.inputType"
:placeholder="t(`ts.${headerItem?.tableForm?.placeholder || '请输入' + headerItem.label}`)"
:placeholder="t(`ts.${headerItem?.tableForm?.placeholder || '请输入' + headerItem.label}`).replace('ts.','')"
:disabled="headerItem?.tableForm?.disabled ? true: headerItem?.tableForm?.isInpuFocusShow ? true : false"
style="flex:1"
@blur="inputStringBlur(headerItem.field, row[headerItem.field], row)"

18
src/locales/en-US.ts

@ -1097,17 +1097,21 @@ export default {
:'Please input the supplier batch',
:'Option Date',
:'Please input comment',
// 格式为…的文件:The format is... File of
1:'Please input package specification1',
1:'Please input package quantity1',
2:'Please input package specification2',
2:'Please input package quantity2',
:'submit for approval'
:'submit for approval',
// 系统管理:'system management',
// 基础设施:'infrastructure',
// 报表管理:'report manager',
// 报表:'statement',
// 富维海拉供应商管理系统:'vendor management system',
:'Please enter your username',
:'Please enter email',
:'Forget Password',
:'User Name',
:'Mail',
},

15
src/locales/zh-CN.ts

@ -1097,14 +1097,21 @@ export default {
:'请输入供应商批次',
:'选择日期',
:'请输入备注',
// 格式为…的文件:The format is... File of
1:'请输入包装规格1',
1:'请输入包装数量1',
2:'请输入包装规格2',
2:'请输入包装数量2',
:'提交审批'
:'提交审批',
:'系统管理',
:'基础设施',
:'报表管理',
:'报表',
:'富维海拉供应商管理系统',
:'请输入用户名',
:'请输入邮箱',
:'忘记密码',
:'用户名',
:'邮箱',

291
src/views/eam/maintenance/index.vue

@ -0,0 +1,291 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="Maintenance.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="Maintenance.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="MaintenanceRules"
:formAllSchemas="Maintenance.allSchemas"
:apiUpdate="MaintenanceApi.updateMaintenance"
:apiCreate="MaintenanceApi.createMaintenance"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="Maintenance.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/maintenance/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { Maintenance,MaintenanceRules } from './maintenance.data'
import * as MaintenanceApi from '@/api/eam/maintenance'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import * as BasicInspectionOptionApi from "@/api/eam/basicInspectionOption";
defineOptions({ name: 'Maintenance' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(Maintenance.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: MaintenanceApi.getMaintenancePage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:maintenance:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'eam:maintenance:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'eam:maintenance:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
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 isShowMainButton = (row,val) => {
if (val.indexOf(row.available) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi:'eam:maintenance:update'}), //
//defaultButtons.mainListDeleteBtn({hasPermi:'eam:basicInspectionOption:delete'}), //
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:maintenance:update'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:maintenance:update'}),
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'enable') {
handleEnable(row.id)
} else if (val == 'disable') {
handleDisable(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =Maintenance.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await MaintenanceApi.createMaintenance(data)
message.success(t('common.createSuccess'))
} else {
await MaintenanceApi.updateMaintenance(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicMaintenance')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await MaintenanceApi.deleteMaintenance(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 启用 */
const handleEnable = async (id: number) => {
try {
const params = ref({
id: '',
available:'',
})
params.value.id = id
params.value.available = 'TRUE'
await MaintenanceApi.updateEnableCode(params.value)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
}
/** 禁用 */
const handleDisable = async (id: number) => {
try {
const params = ref({
id: '',
available:'',
})
params.value.id = id
params.value.available = 'FALSE'
await MaintenanceApi.updateEnableCode(params.value)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await MaintenanceApi.exportMaintenance(tableObject.params)
download.excel(data, '保养计划.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '保养计划导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
})
</script>

214
src/views/eam/maintenance/maintenance.data.ts

@ -0,0 +1,214 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const MaintenanceRules = reactive({
number: [required],
equipmentCode: [required],
optionCode: [required],
factoryAreaCode: [required],
concurrencyStamp: [required],
})
export const Maintenance = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '计划编号',
field: 'number',
sort: 'custom',
isSearch: true,
},
{
label: '描述',
field: 'describing',
sort: 'custom',
isSearch: true,
},
{
label: '设备编号',
field: 'equipmentCode',
sort: 'custom',
isSearch: true,
},
{
label: '设备类别枚举',
field: 'type',
sort: 'custom',
isSearch: true,
},
{
label: '方案编号',
field: 'optionCode',
sort: 'custom',
isSearch: true,
},
{
label: '周期',
field: 'cycle',
sort: 'custom',
isSearch: true,
},
{
label: '班次',
field: 'classes',
sort: 'custom',
isSearch: true,
},
{
label: '人数',
field: 'peoples',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '预计所需时间',
field: 'estimatedMinutes',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '所属厂区编号',
field: 'factoryAreaCode',
sort: 'custom',
isSearch: true,
},
{
label: '车间编号',
field: 'workshopCode',
sort: 'custom',
isSearch: true,
},
{
label: '工段编号',
field: 'workshopSectionCode',
sort: 'custom',
isSearch: true,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '部门id',
field: 'departmentCode',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: true,
isTableForm: false,
isForm: false,
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '删除人id',
field: 'deleterId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

12
src/views/login/forgetPassword.vue

@ -1,22 +1,22 @@
<template>
<div v-loading="loading" class="box">
<el-form ref="formSmsLogin" :model="loginData" :rules="rules" label-width="130px" label-position="top" size="large">
<div class="title">忘记密码</div>
<div class="title">{{ t('ts.忘记密码') }}</div>
<el-row type="flex" justify="center" align="middle">
<el-col>
<el-form-item label="用户名" prop="username" align="center">
<el-input v-model="loginData.username" placeholder="请输入用户名" />
<el-form-item :label="t('ts.用户名')" prop="username" align="center">
<el-input v-model="loginData.username" :placeholder="t('ts.请输入用户名')" />
</el-form-item>
</el-col>
<el-col>
<el-form-item label="邮箱" prop="email">
<el-input v-model="loginData.email" placeholder="请输入邮箱" />
<el-form-item :label="t('ts.邮箱')" prop="email">
<el-input v-model="loginData.email" :placeholder="t('ts.请输入邮箱')" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm" style="width: 100%;height: 40px;line-height: 40px;"> </el-button>
<el-button type="primary" @click="submitForm" style="width: 100%;height: 40px;line-height: 40px;">{{t('ts.确 定')}}</el-button>
</div>
</div>
</template>

19
src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts

@ -207,6 +207,25 @@ export const Itembasic = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '是否脱离ERP管理',
field: 'isOutErp',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
table: {
width: 100
},
form: {
component: 'Switch',
value: 'FALSE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
},
{
label: 'ABC类',
field: 'abcClass',

29
src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue

@ -82,8 +82,33 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const businessType = ref()
const importFileName = ref()
console.log(99 , routeName.value)
const tableColumns = ref([...DeliverJobMain.allSchemas.tableColumns,...DeliverJobDetail.allSchemas.tableMainColumns])
const { tableObject, tableMethods } = useTable({
getListApi: DeliverJobDetailApi.getDeliverJobDetailPage //
})
//
/**
* OktoholdRequestMain 合格转隔离
*/
if ( routeName.value == 'DeliverJobMain') {
tableObject.params = {
businessType: 'Deliver'
}
businessType.value = 'Deliver'
importFileName.value = '成品发货任务'
} else if ( routeName.value == 'ZZBJDeliverJobMain') {
tableObject.params = {
businessType: 'ZZBJDeliver'
}
businessType.value = 'ZZBJDeliver'
importFileName.value = '自制备件发货任务'
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
@ -128,10 +153,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: DeliverJobDetailApi.getDeliverJobDetailPage //
})
//
const { getList, setSearchParams } = tableMethods

28
src/views/wms/deliversettlementManage/deliver/deliverRecordMain/index.vue

@ -78,16 +78,38 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const businessType = ref()
const importFileName = ref()
console.log(99 , routeName.value)
const tableColumns = ref([...DeliverRecordMain.allSchemas.tableColumns,...DeliverRecordDetail.allSchemas.tableMainColumns])
const { tableObject, tableMethods } = useTable({
getListApi: DeliverRecordDetailApi.getDeliverRecordDetailPage //
})
//
/**
* OktoholdRequestMain 合格转隔离
*/
if ( routeName.value == 'DeliverRecordMain') {
tableObject.params = {
businessType: 'Deliver'
}
businessType.value = 'Deliver'
importFileName.value = '成品发货记录'
} else if ( routeName.value == 'ZZBJDeliverRecordMain') {
tableObject.params = {
businessType: 'ZZBJDeliver'
}
businessType.value = 'ZZBJDeliver'
importFileName.value = '自制备件发货记录'
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: DeliverRecordDetailApi.getDeliverRecordDetailPage //
})
//
const { getList, setSearchParams } = tableMethods

22
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts

@ -698,16 +698,7 @@ export const DeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'itemCode',
searchTitle: '客户物料基础信息',
searchAllSchemas: Customeritem.allSchemas,
searchPage: CustomerItemApi.getCustomeritemPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}]
searchPage: CustomerItemApi.getPageBusinessTypeToItemCode,
},
form: {
componentProps: {
@ -716,16 +707,7 @@ export const DeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'itemCode',
searchTitle: '客户物料基础信息',
searchAllSchemas: Customeritem.allSchemas,
searchPage: CustomerItemApi.getCustomeritemPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}]
searchPage: CustomerItemApi.getPageBusinessTypeToItemCode,
}
}
},

105
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue

@ -84,7 +84,7 @@
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/deliver-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" :extend= "businessType"/>
</template>
<script setup lang="ts">
@ -107,10 +107,34 @@ routeName.value = route.name
const tableColumns = ref([...DeliverRequestMain.allSchemas.tableColumns,...DeliverRequestDetail.allSchemas.tableMainColumns])
const isShowButton = ref(true)
const businessType = ref()
const importFileName = ref()
console.log(99 , routeName.value)
// //
const trueFalse = ref(false)
const { tableObject, tableMethods } = useTable({
getListApi: DeliverRequestDetailApi.getDeliverRequestDetailPage //
})
//
/**
* DeliverRequestMain 成品发货申请
*/
if ( routeName.value == 'DeliverRequestMain') {
tableObject.params = {
businessType: 'Deliver'
}
businessType.value = 'Deliver'
importFileName.value = '成品发货申请'
} else if ( routeName.value == 'ZZBJDeliverRequestMain') {
tableObject.params = {
businessType: 'ZZBJDeliver'
}
businessType.value = 'ZZBJDeliver'
importFileName.value = '自制备件发货申请'
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
@ -139,54 +163,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
setV[formField] = val[0][searchField]
if(formField == 'deliverPlanNumber') {
setV['deliverPlanNumber'] = val[0]['number']
// if(setV['deliverPlanNumber'] != null){
// isShowButton.value = false
// }
setV['customerCode'] = val[0]['customerCode']
// getBomDisassemble
// DeliverPlanDetailApi.selectDetailByMasterID(val[0]['id'])
// .then(res => {
// res.forEach(item => {
// item.qty = item.planQty
// })
// if (res) tableData.value = res
// // tableform
// DeliverRequestDetail.allSchemas.tableFormColumns.map(item => {
// if(item.field == 'itemCode') {
// item.isInpuFocusShow = false
// item.tableForm.isInpuFocusShow = false
// item.tableForm.disabled = true
// }
// if(item.field == 'uom') {
// item.tableForm.disabled = true
// }
// })
// // tableform
// if(formField == 'customerCode'){
// console.log(1111,val);
// customerCode.value = val[0]['code']
// console.log(11112,customerCode.value);
// }
// DeliverRequestMain.allSchemas.tableFormColumns.map(item => {
// if(item.field == 'customerDockCode') {
// item.tableForm.searchCondition = [
// {
// key: 'customerCode',
// value: customerCode.value ,
// isMainValue: true
// }]
// item.form.componentProps.searchCondition = [
// {
// key: 'customerCode',
// value: customerCode.value ,
// isMainValue: true
// }]}
// else {
// delete item.tableForm.searchCondition
// delete item.form.componentProps.searchCondition
// }
// })
// })
if(formField == 'itemCode'){
console.log( val[0]);
row['uom'] = val[0]['customerUom']
@ -212,10 +189,23 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
})
}
const { tableObject, tableMethods } = useTable({
getListApi: DeliverRequestDetailApi.getDeliverRequestDetailPage //
})
// tableform
DeliverRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'itemCode') {
item.tableForm.searchCondition = [
{
key: 'businessType',
value: businessType.value ,
isMainValue: false
},]
item.form.componentProps.searchCondition = [
{
key: 'businessType',
value: businessType.value,
isMainValue: false
}]
}
})
//
const { getList, setSearchParams } = tableMethods
@ -457,8 +447,13 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
if(routeName.value == 'DeliverRequestMain'){
const data = await DeliverRequestMainApi.exportDeliverRequestMain(tableObject.params)
download.excel(data, '发货申请主.xlsx')
}else{
const data = await DeliverRequestMainApi.exportZZBJDeliverRequestMain(tableObject.params)
download.excel(data, '自制备件发货申请主.xlsx')
}
} catch {
} finally {
exportLoading.value = false
@ -496,6 +491,8 @@ const submitForm = async (formType, data) => {
let rs = tableData.value.filter(filterItem => (filterItem.itemCode == item.itemCode))
if(rs.length > 1) isExist = true
})
data.businessType = businessType.value
console.log(data);
if (isExist) {
formRef.value.formLoading = false
return message.warning('物料代码重复')
@ -542,7 +539,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '发货申请主导入模版.xlsx'
templateTitle: importFileName.value + '.xlsx'
})
//

22
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts

@ -555,16 +555,7 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'itemCode',
searchTitle: '客户物料基础信息',
searchAllSchemas: Customeritem.allSchemas,
searchPage: CustomerItemApi.getCustomeritemPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}]
searchPage: CustomerItemApi.getPageBusinessTypeToItemCode,
},
form: {
componentProps: {
@ -573,16 +564,7 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'itemCode',
searchTitle: '客户物料基础信息',
searchAllSchemas: Customeritem.allSchemas,
searchPage: CustomerItemApi.getCustomeritemPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}]
searchPage: CustomerItemApi.getPageBusinessTypeToItemCode,
}
}
},

56
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue

@ -77,7 +77,7 @@
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/deliver-plan-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" :extend= "businessType"/>
</template>
<script setup lang="ts">
@ -96,9 +96,35 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const businessType = ref()
const importFileName = ref()
console.log(99 , routeName.value)
const customerCode = ref()
const tableColumns = ref([...DeliverPlanMain.allSchemas.tableColumns,...DeliverPlanDetail.allSchemas.tableMainColumns])
const { tableObject, tableMethods } = useTable({
getListApi: DeliverPlanDetailApi.getDeliverPlanDetailPage //
})
//
/**
* OktoholdRequestMain 合格转隔离
*/
if ( routeName.value == 'DeliverPlanMain') {
tableObject.params = {
businessType: 'Deliver'
}
businessType.value = 'Deliver'
importFileName.value = '成品发货计划'
} else if ( routeName.value == 'ZZBJDeliverPlanMain') {
tableObject.params = {
businessType: 'ZZBJDeliver'
}
businessType.value = 'ZZBJDeliver'
importFileName.value = '自制备件发货计划'
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
@ -161,14 +187,28 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
})
}
// tableform
DeliverPlanDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'itemCode') {
item.tableForm.searchCondition = [
{
key: 'businessType',
value: businessType.value ,
isMainValue: false
},]
item.form.componentProps.searchCondition = [
{
key: 'businessType',
value: businessType.value,
isMainValue: false
}]
}
})
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: DeliverPlanDetailApi.getDeliverPlanDetailPage //
})
//
const { getList, setSearchParams } = tableMethods
@ -360,8 +400,13 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
if(routeName.value == 'DeliverRequestMain'){
const data = await DeliverPlanMainApi.exportDeliverPlanMain(tableObject.params)
download.excel(data, '发货计划主.xlsx')
}else{
const data = await DeliverRequestMainApi.exportZZBJDeliverPlanMain(tableObject.params)
download.excel(data, '自制备件发货计划主.xlsx')
}
} catch {
} finally {
exportLoading.value = false
@ -394,6 +439,7 @@ const flag = ref(false)
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
data.businessType = businessType.value
//
let isExist = false
tableData.value.forEach(item => {

Loading…
Cancel
Save