Browse Source

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

master_hella_20240701
陈薪名 11 months ago
parent
commit
fbc59e2a9a
  1. 59
      src/api/wms/agvLocationrelation/index.ts
  2. 65
      src/api/wms/mesBarCode/index.ts
  3. 151
      src/views/wms/agvManage/agvLocationrelation/agvLocationrelation.data.ts
  4. 267
      src/views/wms/agvManage/agvLocationrelation/index.vue
  5. 1
      src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts
  6. 7
      src/views/wms/basicDataManage/itemManage/itemarea/index.vue
  7. 10
      src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts
  8. 39
      src/views/wms/inventoryManage/balance/balance.data.ts
  9. 244
      src/views/wms/mes/mesBarCode/index.vue
  10. 174
      src/views/wms/mes/mesBarCode/mesBarCode.data.ts
  11. 4
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue
  12. 4
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  13. 15
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

59
src/api/wms/agvLocationrelation/index.ts

@ -0,0 +1,59 @@
import request from '@/config/axios'
export interface AgvLocationrelationVO {
id: number
reqCode: string
positionCode: string
positionArea: string
wmsArea: string
wmsPosition: string
available: string
remark: string
}
// 查询AGV库位转换列表
export const getAgvLocationrelationPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/agv-locationrelation/senior', data })
} else {
return await request.get({ url: `/wms/agv-locationrelation/page`, params })
}
}
// 查询AGV库位转换详情
export const getAgvLocationrelation = async (id: number) => {
return await request.get({ url: `/wms/agv-locationrelation/get?id=` + id })
}
// 新增AGV库位转换
export const createAgvLocationrelation = async (data: AgvLocationrelationVO) => {
return await request.post({ url: `/wms/agv-locationrelation/create`, data })
}
// 修改AGV库位转换
export const updateAgvLocationrelation = async (data: AgvLocationrelationVO) => {
return await request.put({ url: `/wms/agv-locationrelation/update`, data })
}
// 删除AGV库位转换
export const deleteAgvLocationrelation = async (id: number) => {
return await request.delete({ url: `/wms/agv-locationrelation/delete?id=` + id })
}
// 导出AGV库位转换 Excel
export const exportAgvLocationrelation = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/agv-locationrelation/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/agv-locationrelation/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/agv-locationrelation/get-import-template' })
}

65
src/api/wms/mesBarCode/index.ts

@ -0,0 +1,65 @@
import request from '@/config/axios'
export interface MesBarCodeVO {
id: number
plat: number
counter: string
sign: string
option: string
lowerLim: string
upperLimit: string
itac: string
type: string
lengthBc: number
posMat: string
lengthMat: number
posRevlv: string
partNumber: string
packLabel: string
oesLabel: string
checkRvl: string
days: number
available: string
remark: string
}
// 查询生产条码清单列表
export const getMesBarCodePage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/mes-bar-code/senior', data })
} else {
return await request.get({ url: `/wms/mes-bar-code/page`, params })
}
}
// 查询生产条码清单详情
export const getMesBarCode = async (id: number) => {
return await request.get({ url: `/wms/mes-bar-code/get?id=` + id })
}
// 新增生产条码清单
export const createMesBarCode = async (data: MesBarCodeVO) => {
return await request.post({ url: `/wms/mes-bar-code/create`, data })
}
// 修改生产条码清单
export const updateMesBarCode = async (data: MesBarCodeVO) => {
return await request.put({ url: `/wms/mes-bar-code/update`, data })
}
// 删除生产条码清单
export const deleteMesBarCode = async (id: number) => {
return await request.delete({ url: `/wms/mes-bar-code/delete?id=` + id })
}
// 导出生产条码清单 Excel
export const exportMesBarCode = async (params) => {
return await request.download({ url: `/wms/mes-bar-code/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/mes-bar-code/get-import-template' })
}

151
src/views/wms/agvManage/agvLocationrelation/agvLocationrelation.data.ts

@ -0,0 +1,151 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as AreaApi from '@/api/wms/areabasic'
import { Area } from '@/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data'
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
// 表单校验
export const AgvLocationrelationRules = reactive({
positionCode: [
{ required: true, message: '请填写AGV点位', trigger: 'change' }
],
positionArea: [
{ required: true, message: '请填写AGV库区', trigger: 'change' }
],
wmsArea: [
{ required: true, message: '请填写WMS库区', trigger: 'change' }
],
wmsPosition: [
{ required: true, message: '请填写WMS库位', trigger: 'change' }
]
})
export const AgvLocationrelation = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'reqCode',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: 'AGV点位',
field: 'positionCode',
sort: 'custom',
isSearch: false,
},
{
label: 'AGV库区',
field: 'positionArea',
sort: 'custom',
isSearch: false,
},
{
label: 'WMS库区',
field: 'wmsArea',
sort: 'custom',
isSearch: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库区代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库区信息', // 查询弹窗标题
searchAllSchemas: Area.allSchemas, // 查询弹窗所需类
searchPage: AreaApi.getAreaPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: 'WMS库位',
field: 'wmsPosition',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'areaCode',
value: "wmsArea",
message: '请选择库区代码!',
isMainValue: true
}]
}
}
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isSearch: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
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')]
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isForm: false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false,
},
{
label: '操作',
field: 'action',
isForm: false,
isDetail: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

267
src/views/wms/agvManage/agvLocationrelation/index.vue

@ -0,0 +1,267 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="AgvLocationrelation.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="AgvLocationrelation.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 #reqCode="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.reqCode)">
<span>{{ row.reqCode }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="AgvLocationrelationRules"
:formAllSchemas="AgvLocationrelation.allSchemas"
:apiUpdate="AgvLocationrelationApi.updateAgvLocationrelation"
:apiCreate="AgvLocationrelationApi.createAgvLocationrelation"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="true"
:allSchemas="AgvLocationrelation.allSchemas"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/agv-locationrelation/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { AgvLocationrelation,AgvLocationrelationRules } from './agvLocationrelation.data'
import * as AgvLocationrelationApi from '@/api/wms/agvLocationrelation'
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'
defineOptions({ name: 'AgvLocationrelation' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(AgvLocationrelation.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: AgvLocationrelationApi.getAgvLocationrelationPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:agv-locationrelation:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:agv-locationrelation:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:agv-locationrelation: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 butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:agv-locationrelation:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:agv-locationrelation:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
if(type == "update"){
AgvLocationrelation.allSchemas.formSchema.forEach((item) => {
if (item.field == 'positionCode') {
item.componentProps.disabled = true
}
if (item.field == 'positionArea') {
item.componentProps.disabled = true
}
})
}else {
AgvLocationrelation.allSchemas.formSchema.forEach((item) => {
if (item.field == 'positionCode') {
item.componentProps.disabled = false
}
if (item.field == 'positionArea') {
item.componentProps.disabled = false
}
})
}
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =AgvLocationrelation.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 AgvLocationrelationApi.createAgvLocationrelation(data)
message.success(t('common.createSuccess'))
} else {
await AgvLocationrelationApi.updateAgvLocationrelation(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, 'basicAgvLocationrelation')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await AgvLocationrelationApi.deleteAgvLocationrelation(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await AgvLocationrelationApi.exportAgvLocationrelation(tableObject.params)
download.excel(data, 'AGV库位转换.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: 'AGV库位转换导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await AgvLocationrelationApi.importTemplate()
})
</script>

1
src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts

@ -109,7 +109,6 @@ export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '原料库位',
field: 'rawLocationCode',

7
src/views/wms/basicDataManage/itemManage/itemarea/index.vue

@ -250,12 +250,19 @@ const openForm =async (type: string, row?: number) => {
if (item.field == 'areaCode') {
item.componentProps.isSearchList = false,
item.componentProps.disabled = true
}
if (item.field == 'itemCode') {
item.componentProps.isSearchList = false,
item.componentProps.disabled = true
}})
}else {
Itemarea.allSchemas.formSchema.forEach((item) => {
if (item.field == 'areaCode') {
item.componentProps.isSearchList = true
}
if (item.field == 'itemCode') {
item.componentProps.isSearchList = true
}
})
}
tableData.value = [] //

10
src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts

@ -383,11 +383,10 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string',
form: {
component: 'Switch',
value: 'FALSE',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: 'TRUE',
}
},
},
@ -402,7 +401,8 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
value: 'FALSE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
activeValue: 'TRUE',
disabled: true
}
},
},
@ -414,7 +414,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string',
form: {
component: 'Switch',
value: 'FALSE',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
@ -429,7 +429,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string',
form: {
component: 'Switch',
value: 'TRUE',
value: 'FALSE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'

39
src/views/wms/inventoryManage/balance/balance.data.ts

@ -39,6 +39,7 @@ export const Balance = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false
},
{
label: '数量',
@ -63,55 +64,55 @@ export const Balance = useCrudSchemas(reactive<CrudSchema[]>([
},
},
{
label: '库区类型',
field: 'areaType',
label: '库位代码',
field: 'locationCode',
sort: 'custom',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: true,
table: {
width: 150
},
isSearch: true,
},
{
label: '包装规格',
field: 'packUnit',
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '包装数量',
field: 'packQty',
label: '库区类型',
field: 'areaType',
sort: 'custom',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: true,
table: {
width: 150
},
},
{
label: '库位代码',
field: 'locationCode',
label: '包装规格',
field: 'packUnit',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '仓库代码',
field: 'warehouseCode',
label: '包装数量',
field: 'packQty',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
label: '仓库代码',
field: 'warehouseCode',
sort: 'custom',
table: {
width: 150

244
src/views/wms/mes/mesBarCode/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="MesBarCode.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="MesBarCode.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 #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="MesBarCodeRules"
:formAllSchemas="MesBarCode.allSchemas"
:apiUpdate="MesBarCodeApi.updateMesBarCode"
:apiCreate="MesBarCodeApi.createMesBarCode"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="MesBarCode.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/mes-bar-code/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { MesBarCode,MesBarCodeRules } from './mesBarCode.data'
import * as MesBarCodeApi from '@/api/wms/mesBarCode'
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'
defineOptions({ name: 'MesBarCode' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(MesBarCode.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: MesBarCodeApi.getMesBarCodePage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:mes-bar-code:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:mes-bar-code:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:mes-bar-code: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 butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:mesBarCode:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:mesBarCode:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =MesBarCode.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 MesBarCodeApi.createMesBarCode(data)
message.success(t('common.createSuccess'))
} else {
await MesBarCodeApi.updateMesBarCode(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, 'basicMesBarCode')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await MesBarCodeApi.deleteMesBarCode(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await MesBarCodeApi.exportMesBarCode(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()
importTemplateData.templateUrl = await MesBarCodeApi.importTemplate()
})
</script>

174
src/views/wms/mes/mesBarCode/mesBarCode.data.ts

@ -0,0 +1,174 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const MesBarCodeRules = reactive({
available: [required],
})
export const MesBarCode = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false,
},
{
label: 'Plnt',
field: 'plat',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: 'Counter',
field: 'counter',
sort: 'custom',
isSearch: true,
},
{
label: 'SIGN',
field: 'sign',
sort: 'custom',
isSearch: true,
},
{
label: 'Option',
field: 'option',
sort: 'custom',
isSearch: true,
},
{
label: 'Lower Lim.',
field: 'lowerLim',
sort: 'custom',
isSearch: true,
},
{
label: 'UpperLimit',
field: 'upperLimit',
sort: 'custom',
isSearch: true,
},
{
label: 'ITAC',
field: 'itac',
sort: 'custom',
isSearch: true,
},
{
label: 'Type',
field: 'type',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
},
},
{
label: 'Length BC',
field: 'lengthBc',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: 'Pos. mat',
field: 'posMat',
sort: 'custom',
isSearch: true,
},
{
label: 'Length mat',
field: 'lengthMat',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: 'Pos. revlv',
field: 'posRevlv',
sort: 'custom',
isSearch: true,
},
{
label: 'Part number',
field: 'partNumber',
sort: 'custom',
isSearch: true,
},
{
label: 'Pack Label',
field: 'packLabel',
sort: 'custom',
isSearch: true,
},
{
label: 'OES-Label',
field: 'oesLabel',
sort: 'custom',
isSearch: true,
},
{
label: 'Check Rvl',
field: 'checkRvl',
sort: 'custom',
isSearch: true,
},
{
label: 'Days',
field: 'days',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isSearch: true,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
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: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

4
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue

@ -158,8 +158,8 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:!row.inspectRequestFlag}),//
defaultButtons.mainPutawayRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:!row.putawayRequestFlag}),//
defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag === false }),//
defaultButtons.mainPutawayRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag === false }),//
]
}

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

@ -283,7 +283,6 @@ const isShowMainButtonLabel = (row, val) => {
const butttondata = (row) => {
return [
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), //
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '4']) }), //
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), //
@ -314,7 +313,8 @@ const butttondata = (row) => {
color: '',
hasPermi: '',
link: true //
}
},
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '4','3']) }), //
]
}

15
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -106,7 +106,7 @@
])
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
const searchTableSuccess = (formField, searchField, val, searchFormRef, type, row) => {
nextTick(() => {
if (type == 'tableForm') {
//
@ -121,13 +121,24 @@
row['amount'] = val[0]['amount']
}
} else {
console.log(searchFormRef.formModel);
const setV = {}
if(formField == 'recordNumber'){
setV['recordNumber'] = val[0]['number']
setV['asnBillNum'] = val[0]['asnNumber']
let params = {
'billType':searchFormRef.formModel.billType,
'recordNumber':val[0]['number']
}
SupplierinvoiceRequestDetailApi.getPoNumber(params).then(res =>{
console.log("返回结果:",res)
})
}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
searchFormRef.setValues(setV)
}
})
}

Loading…
Cancel
Save