ljlong_2630
6 months ago
115 changed files with 4212 additions and 891 deletions
@ -0,0 +1,56 @@ |
|||||
|
import request from '@/config/axios' |
||||
|
|
||||
|
export interface ItemRequestDetailVO { |
||||
|
deleteTime: Date |
||||
|
id: number |
||||
|
status: string |
||||
|
concurrencyStamp: number |
||||
|
remark: string |
||||
|
deleter: string |
||||
|
requestBillNo: string |
||||
|
itemBasicCode: string |
||||
|
itemCounts: number |
||||
|
itemUom: string |
||||
|
siteId: number |
||||
|
} |
||||
|
|
||||
|
// 查询叫料申请明细列表
|
||||
|
export const getItemRequestDetailPage = async (params) => { |
||||
|
if (params.isSearch) { |
||||
|
delete params.isSearch |
||||
|
const data = {...params} |
||||
|
return await request.post({ url: '/mes/item-request-detail/senior', data }) |
||||
|
} else { |
||||
|
return await request.get({ url: `/mes/item-request-detail/page`, params }) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 查询叫料申请明细详情
|
||||
|
export const getItemRequestDetail = async (id: number) => { |
||||
|
return await request.get({ url: `/mes/item-request-detail/get?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 新增叫料申请明细
|
||||
|
export const createItemRequestDetail = async (data: ItemRequestDetailVO) => { |
||||
|
return await request.post({ url: `/mes/item-request-detail/create`, data }) |
||||
|
} |
||||
|
|
||||
|
// 修改叫料申请明细
|
||||
|
export const updateItemRequestDetail = async (data: ItemRequestDetailVO) => { |
||||
|
return await request.put({ url: `/mes/item-request-detail/update`, data }) |
||||
|
} |
||||
|
|
||||
|
// 删除叫料申请明细
|
||||
|
export const deleteItemRequestDetail = async (id: number) => { |
||||
|
return await request.delete({ url: `/mes/item-request-detail/delete?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 导出叫料申请明细 Excel
|
||||
|
export const exportItemRequestDetail = async (params) => { |
||||
|
return await request.download({ url: `/mes/item-request-detail/export-excel`, params }) |
||||
|
} |
||||
|
|
||||
|
// 下载用户导入模板
|
||||
|
export const importTemplate = () => { |
||||
|
return request.download({ url: '/mes/item-request-detail/get-import-template' }) |
||||
|
} |
@ -0,0 +1,54 @@ |
|||||
|
import request from '@/config/axios' |
||||
|
|
||||
|
export interface InvoicingcalendarVO { |
||||
|
id: number |
||||
|
beginDay: string |
||||
|
endDay: string |
||||
|
descriiption: string |
||||
|
available: string |
||||
|
remark: string |
||||
|
extraProperties: string |
||||
|
concurrencyStamp: number |
||||
|
siteId: string |
||||
|
} |
||||
|
|
||||
|
// 查询开票日历列表
|
||||
|
export const getInvoicingcalendarPage = async (params) => { |
||||
|
if (params.isSearch) { |
||||
|
delete params.isSearch |
||||
|
const data = {...params} |
||||
|
return await request.post({ url: '/wms/invoicingcalendar/senior', data }) |
||||
|
} else { |
||||
|
return await request.get({ url: `/wms/invoicingcalendar/page`, params }) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 查询开票日历详情
|
||||
|
export const getInvoicingcalendar = async (id: number) => { |
||||
|
return await request.get({ url: `/wms/invoicingcalendar/get?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 新增开票日历
|
||||
|
export const createInvoicingcalendar = async (data: InvoicingcalendarVO) => { |
||||
|
return await request.post({ url: `/wms/invoicingcalendar/create`, data }) |
||||
|
} |
||||
|
|
||||
|
// 修改开票日历
|
||||
|
export const updateInvoicingcalendar = async (data: InvoicingcalendarVO) => { |
||||
|
return await request.put({ url: `/wms/invoicingcalendar/update`, data }) |
||||
|
} |
||||
|
|
||||
|
// 删除开票日历
|
||||
|
export const deleteInvoicingcalendar = async (id: number) => { |
||||
|
return await request.delete({ url: `/wms/invoicingcalendar/delete?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 导出开票日历 Excel
|
||||
|
export const exportInvoicingcalendar = async (params) => { |
||||
|
return await request.download({ url: `/wms/invoicingcalendar/export-excel`, params }) |
||||
|
} |
||||
|
|
||||
|
// 下载用户导入模板
|
||||
|
export const importTemplate = () => { |
||||
|
return request.download({ url: '/wms/invoicingcalendar/get-import-template' }) |
||||
|
} |
@ -0,0 +1,73 @@ |
|||||
|
import request from '@/config/axios' |
||||
|
|
||||
|
export interface RelegateRequestVO { |
||||
|
id: number |
||||
|
itemCode: string |
||||
|
downItemCode: string |
||||
|
businessType: string |
||||
|
uom: string |
||||
|
qty: number |
||||
|
fromBatch: string |
||||
|
fromPackingNumber: string |
||||
|
fromLocationCode: string |
||||
|
fromAreaTypes: string |
||||
|
fromAreaCodes: string |
||||
|
fromWarehouseCode: string |
||||
|
toPackingNumber: string |
||||
|
toBatch: string |
||||
|
toLocationCode: string |
||||
|
toWarehouseCode: string |
||||
|
toAreaTypes: string |
||||
|
toAreaCodes: string |
||||
|
number: string |
||||
|
available: string |
||||
|
remark: string |
||||
|
departmentCode: string |
||||
|
siteId: number |
||||
|
extraProperties: string |
||||
|
status: string |
||||
|
concurrencyStamp: number |
||||
|
serialNumber: string |
||||
|
ruleUserId: number |
||||
|
} |
||||
|
|
||||
|
// 查询物料降级信息列表
|
||||
|
export const getRelegateRequestPage = async (params) => { |
||||
|
if (params.isSearch) { |
||||
|
delete params.isSearch |
||||
|
const data = {...params} |
||||
|
return await request.post({ url: '/wms/relegate-request/senior', data }) |
||||
|
} else { |
||||
|
return await request.get({ url: `/wms/relegate-request/page`, params }) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 查询物料降级信息详情
|
||||
|
export const getRelegateRequest = async (id: number) => { |
||||
|
return await request.get({ url: `/wms/relegate-request/get?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 新增物料降级信息
|
||||
|
export const createRelegateRequest = async (data: RelegateRequestVO) => { |
||||
|
return await request.post({ url: `/wms/relegate-request/create`, data }) |
||||
|
} |
||||
|
|
||||
|
// 修改物料降级信息
|
||||
|
export const updateRelegateRequest = async (data: RelegateRequestVO) => { |
||||
|
return await request.put({ url: `/wms/relegate-request/update`, data }) |
||||
|
} |
||||
|
|
||||
|
// 删除物料降级信息
|
||||
|
export const deleteRelegateRequest = async (id: number) => { |
||||
|
return await request.delete({ url: `/wms/relegate-request/delete?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 导出物料降级信息 Excel
|
||||
|
export const exportRelegateRequest = async (params) => { |
||||
|
return await request.download({ url: `/wms/relegate-request/export-excel`, params }) |
||||
|
} |
||||
|
|
||||
|
// 下载用户导入模板
|
||||
|
export const importTemplate = () => { |
||||
|
return request.download({ url: '/wms/relegate-request/get-import-template' }) |
||||
|
} |
@ -0,0 +1,65 @@ |
|||||
|
import request from '@/config/axios' |
||||
|
|
||||
|
export interface SaleShipmentDetailRecordVO { |
||||
|
id: number |
||||
|
soNumber: string |
||||
|
soLine: string |
||||
|
fromOwnerCode: string |
||||
|
packingNumber: string |
||||
|
batch: string |
||||
|
inventoryStatus: string |
||||
|
fromLocationCode: string |
||||
|
masterId: number |
||||
|
number: string |
||||
|
itemCode: string |
||||
|
itemName: string |
||||
|
itemDesc1: string |
||||
|
itemDesc2: string |
||||
|
projectCode: string |
||||
|
qty: number |
||||
|
uom: string |
||||
|
remark: string |
||||
|
concurrencyStamp: string |
||||
|
siteId: number |
||||
|
} |
||||
|
|
||||
|
// 查询销售发运记录子列表
|
||||
|
export const getSaleShipmentDetailRecordPage = async (params) => { |
||||
|
if (params.isSearch) { |
||||
|
delete params.isSearch |
||||
|
const data = {...params} |
||||
|
return await request.post({ url: '/wms/sale-shipment-detail-record/senior', data }) |
||||
|
} else { |
||||
|
return await request.get({ url: `/wms/sale-shipment-detail-record/page`, params }) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 查询销售发运记录子详情
|
||||
|
export const getSaleShipmentDetailRecord = async (id: number) => { |
||||
|
return await request.get({ url: `/wms/sale-shipment-detail-record/get?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 新增销售发运记录子
|
||||
|
export const createSaleShipmentDetailRecord = async (data: SaleShipmentDetailRecordVO) => { |
||||
|
return await request.post({ url: `/wms/sale-shipment-detail-record/create`, data }) |
||||
|
} |
||||
|
|
||||
|
// 修改销售发运记录子
|
||||
|
export const updateSaleShipmentDetailRecord = async (data: SaleShipmentDetailRecordVO) => { |
||||
|
return await request.put({ url: `/wms/sale-shipment-detail-record/update`, data }) |
||||
|
} |
||||
|
|
||||
|
// 删除销售发运记录子
|
||||
|
export const deleteSaleShipmentDetailRecord = async (id: number) => { |
||||
|
return await request.delete({ url: `/wms/sale-shipment-detail-record/delete?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 导出销售发运记录子 Excel
|
||||
|
export const exportSaleShipmentDetailRecord = async (params) => { |
||||
|
return await request.download({ url: `/wms/sale-shipment-detail-record/export-excel`, params }) |
||||
|
} |
||||
|
|
||||
|
// 下载用户导入模板
|
||||
|
export const importTemplate = () => { |
||||
|
return request.download({ url: '/wms/sale-shipment-detail-record/get-import-template' }) |
||||
|
} |
@ -0,0 +1,56 @@ |
|||||
|
import request from '@/config/axios' |
||||
|
|
||||
|
export interface SaleShipmentMainRecordVO { |
||||
|
id: number |
||||
|
requestNumber: string |
||||
|
customerCode: string |
||||
|
invoiceTime: Date |
||||
|
executeTime: Date |
||||
|
available: string |
||||
|
departmentCode: string |
||||
|
number: string |
||||
|
businessType: string |
||||
|
extraProperties: string |
||||
|
siteId: string |
||||
|
} |
||||
|
|
||||
|
// 查询销售发运记录主列表
|
||||
|
export const getSaleShipmentMainRecordPage = async (params) => { |
||||
|
if (params.isSearch) { |
||||
|
delete params.isSearch |
||||
|
const data = {...params} |
||||
|
return await request.post({ url: '/wms/sale-shipment-main-record/senior', data }) |
||||
|
} else { |
||||
|
return await request.get({ url: `/wms/sale-shipment-main-record/page`, params }) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 查询销售发运记录主详情
|
||||
|
export const getSaleShipmentMainRecord = async (id: number) => { |
||||
|
return await request.get({ url: `/wms/sale-shipment-main-record/get?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 新增销售发运记录主
|
||||
|
export const createSaleShipmentMainRecord = async (data: SaleShipmentMainRecordVO) => { |
||||
|
return await request.post({ url: `/wms/sale-shipment-main-record/create`, data }) |
||||
|
} |
||||
|
|
||||
|
// 修改销售发运记录主
|
||||
|
export const updateSaleShipmentMainRecord = async (data: SaleShipmentMainRecordVO) => { |
||||
|
return await request.put({ url: `/wms/sale-shipment-main-record/update`, data }) |
||||
|
} |
||||
|
|
||||
|
// 删除销售发运记录主
|
||||
|
export const deleteSaleShipmentMainRecord = async (id: number) => { |
||||
|
return await request.delete({ url: `/wms/sale-shipment-main-record/delete?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 导出销售发运记录主 Excel
|
||||
|
export const exportSaleShipmentMainRecord = async (params) => { |
||||
|
return await request.download({ url: `/wms/sale-shipment-main-record/export-excel`, params }) |
||||
|
} |
||||
|
|
||||
|
// 下载用户导入模板
|
||||
|
export const importTemplate = () => { |
||||
|
return request.download({ url: '/wms/sale-shipment-main-record/get-import-template' }) |
||||
|
} |
@ -0,0 +1,60 @@ |
|||||
|
<template> |
||||
|
<el-dialog class="preview" v-model="showDialog" style="" @close="closeView"> |
||||
|
<iframe v-if="isPDF" ref="pdfRef" width="100%" :height="frameHeight" :src="pdfUrl" frameborder="0"></iframe> |
||||
|
<el-carousel justify="center" v-else indicator-position="outside"> |
||||
|
<el-carousel-item class="carousel-item" v-for="url in imageArray" :key="url"> |
||||
|
<el-image style="height:100%" fit="contain" :src="url" loading="lazy" /> |
||||
|
</el-carousel-item> |
||||
|
</el-carousel> |
||||
|
</el-dialog> |
||||
|
</template> |
||||
|
<script setup lang="ts"> |
||||
|
import { ref } from 'vue' |
||||
|
const showDialog = ref(false) // 弹窗控制 |
||||
|
const message = useMessage() // 消息弹窗 |
||||
|
const isPDF = ref(false) // 是否是pdf |
||||
|
const pdfUrl = ref<string>('') // pdf地址 |
||||
|
const pdfRef = ref() // pdf组件 |
||||
|
const frameHeight = ref(0) |
||||
|
const imageArray = ref<string[]>([]) // 图片数组 |
||||
|
const closeView = () => { |
||||
|
showDialog.value = false |
||||
|
} |
||||
|
// 打开预览 |
||||
|
const openPreview = async (data:string[]|string)=>{ |
||||
|
showDialog.value = true |
||||
|
if(Array.isArray(data)){ |
||||
|
//图片数组 |
||||
|
isPDF.value = false |
||||
|
pdfUrl.value = '' |
||||
|
imageArray.value = data.filter(item=>(item.replace('/get/','/show/'))) |
||||
|
}else{ |
||||
|
isPDF.value = true |
||||
|
pdfUrl.value = data.replace('/get/','/show/') |
||||
|
nextTick(()=>{ |
||||
|
frameHeight.value = window.innerHeight - 2*pdfRef.value.getBoundingClientRect().top |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
defineExpose({openPreview}) |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
/* .preview .el-dialog__headerbtn .el-dialog__close{ |
||||
|
color: white !important; |
||||
|
font-size: 20px !important; |
||||
|
} |
||||
|
.preview.el-dialog { |
||||
|
--el-dialog-box-shadow:null; |
||||
|
} */ |
||||
|
</style> |
||||
|
<style lang="scss" scoped> |
||||
|
.carousel-item{ |
||||
|
display: flex; |
||||
|
justify-content: center; |
||||
|
align-items: center; |
||||
|
} |
||||
|
|
||||
|
</style> |
@ -0,0 +1,318 @@ |
|||||
|
<template> |
||||
|
<Dialog |
||||
|
:title="dialogTitle" |
||||
|
v-model="dialogVisible" |
||||
|
:width="dialogWidth" |
||||
|
:close-on-click-modal="false" |
||||
|
:vLoading="formLoading" |
||||
|
> |
||||
|
<ContentWrap> |
||||
|
<Descriptions |
||||
|
:data="detailData" |
||||
|
labelClassName="label-class-name" |
||||
|
label-align="left" |
||||
|
direction="vertical" |
||||
|
:column="8" |
||||
|
:schema="allSchemas.detailSchema" |
||||
|
:columns="2" |
||||
|
width="200px" |
||||
|
/> |
||||
|
</ContentWrap> |
||||
|
<ContentWrap> |
||||
|
<el-container> |
||||
|
<el-aside width="320px"> |
||||
|
<el-card> |
||||
|
<template #header> |
||||
|
<div class="card-header"> |
||||
|
<span>工艺路线</span> |
||||
|
</div> |
||||
|
</template> |
||||
|
<el-table :data="processData" ref="tableProcess" style="width: 100%; height: 80%" > |
||||
|
<el-table-column prop="code" label="工序编码" /> |
||||
|
<el-table-column prop="name" label="工序名称" /> |
||||
|
</el-table> |
||||
|
</el-card> |
||||
|
</el-aside> |
||||
|
<el-main style="height: 480px; width: calc(100% - 980px);padding: 0px; margin:0px 20px"> |
||||
|
<div ref="graphContainer"></div |
||||
|
></el-main> |
||||
|
<el-aside width="640px"> |
||||
|
<el-tag>工序编码:{{currentNode.id}} -工序名称:{{currentNode.name }}</el-tag> |
||||
|
<el-tabs v-model="activeName" > |
||||
|
<el-tab-pane label="工序工位" name="workstation"> |
||||
|
<el-table :data="workstationData" ref="tableWorkstations" style="width: 100%; height: 80%"> |
||||
|
<el-table-column prop="stationName" label="工位名称" /> |
||||
|
<el-table-column prop="processCode" label="工序编码" /> |
||||
|
</el-table> |
||||
|
|
||||
|
</el-tab-pane> |
||||
|
<el-tab-pane label="工序物料" name="materials"> |
||||
|
<el-table :data="showMaterialsData" ref="tableMaterials" style="width: 100%; height: 80%"> |
||||
|
<el-table-column prop="repMaterialCode" label="物料编码" /> |
||||
|
<el-table-column prop="repMaterialCounts" label="物料数量" /> |
||||
|
<el-table-column prop="repMaterialModel" label="物料单位" /> |
||||
|
<el-table-column prop="sourceMaterialCounts" label="需求物料数"> |
||||
|
<template #default="scope">{{ getTotalcounts(scope.row.repMaterialCounts) }}</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="replaceFlag" label="是否替换" > |
||||
|
<template #default="scope"> |
||||
|
<el-switch disabled |
||||
|
v-model="scope.row.replaceFlag" |
||||
|
active-color="#13ce66" |
||||
|
inactive-color="#ff4949" |
||||
|
active-text="是" |
||||
|
inactive-text="否" |
||||
|
/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<el-pagination |
||||
|
small |
||||
|
hide-on-single-page="true" |
||||
|
layout="prev, pager, next" |
||||
|
:total="page.total" |
||||
|
:page-size="page.size" |
||||
|
:current-page="page.current" |
||||
|
@current-change="handleCurrentChangeM" |
||||
|
@prev-click="handlePrevClickM" |
||||
|
@next-click="handleNextClickM" |
||||
|
/> |
||||
|
</el-tab-pane> |
||||
|
<el-tab-pane label="工序人员" name="workers"> |
||||
|
|
||||
|
<el-table :data="workerData" ref="tableWorker" style="width: 100%; height: 233px;overflow: auto;"> |
||||
|
<el-table-column prop="groupName" label="所属班组" /> |
||||
|
<el-table-column prop="workerMonitor" label="班长" /> |
||||
|
<el-table-column prop="workerCode" label="人员编码" /> |
||||
|
<el-table-column prop="workerName" label="人员昵称" /> |
||||
|
</el-table> |
||||
|
</el-tab-pane> |
||||
|
<el-tab-pane label="工序设备" name="equipments"> |
||||
|
<el-table :data="equipmentData" ref="tableEquipment" style="width: 100%; height: 80%"> |
||||
|
<el-table-column prop="equipmentCode" label="设备编码" /> |
||||
|
<el-table-column prop="equipmentName" label="设备名称" /> |
||||
|
<el-table-column prop="equipmentType" label="设备类型" /> |
||||
|
<el-table-column prop="equipmentWorkstation" label="关联工位" /> |
||||
|
</el-table> |
||||
|
</el-tab-pane> |
||||
|
</el-tabs> |
||||
|
</el-aside> |
||||
|
</el-container> |
||||
|
</ContentWrap> |
||||
|
<template #footer> |
||||
|
<el-button @click="handleClose" >关闭</el-button> |
||||
|
</template> |
||||
|
|
||||
|
</Dialog> |
||||
|
|
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
|
||||
|
import { |
||||
|
start_node, |
||||
|
end_node, |
||||
|
createGraph, |
||||
|
getNewNode |
||||
|
} from '@/views/mes/processroute/components/graphbase.data' |
||||
|
import * as orderDayconfigApi from '@/api/mes/orderDayConfig' |
||||
|
import * as OrderDayApi from '@/api/mes/orderDay' |
||||
|
import {ProcessSearch} from '../../publicUtil/processSearch.data' |
||||
|
import * as ProcessApi from '@/api/wms/process' |
||||
|
import { Graph } from '@antv/x6' |
||||
|
import * as TeamApi from '@/api/wms/team' |
||||
|
import {searchUser} from "@/views/wms/basicDataManage/orderManage/team/team.data"; |
||||
|
import {DeviceInfo, OrderDay} from "@/views/mes/orderDay/orderDay.data"; |
||||
|
const graphContainer = ref<HTMLElement | null>(null) |
||||
|
const graph = ref<Graph>() |
||||
|
const message = useMessage() // 消息弹窗 |
||||
|
const { t } = useI18n() // 国际化 |
||||
|
const activeName = ref('workstation') |
||||
|
const formLoading = ref(false) |
||||
|
const dialogFormVisibleUser = ref(false) |
||||
|
const processData = ref([]) |
||||
|
const processCode = ref('') |
||||
|
//const isPublish=ref(false) |
||||
|
const queryParams:orderDayconfigApi.OrderDayQueryParamVo=ref() |
||||
|
const props = defineProps({ |
||||
|
// 查询弹窗是否显示筛选按钮 |
||||
|
isSearchFilterButtonHide: { |
||||
|
type: Boolean, |
||||
|
default: false |
||||
|
}, |
||||
|
// 显示窗口宽度设置 |
||||
|
basicFormWidth: { |
||||
|
type: String, |
||||
|
default: '' |
||||
|
}, |
||||
|
|
||||
|
allSchemas: { |
||||
|
type: Object, |
||||
|
required: true, |
||||
|
default: null |
||||
|
} |
||||
|
}) |
||||
|
const workerData=ref([]) |
||||
|
const detailData = ref(props.allSchemas) |
||||
|
const route = useRoute() // 路由信息 |
||||
|
const routeName = ref() |
||||
|
routeName.value = route.name |
||||
|
routeName.value = routeName.value.substring(0, routeName.value.length - 4) + 'Detail' |
||||
|
//const updateKey = ref(0) |
||||
|
const dialogWidth = ref() |
||||
|
const materialsData = ref() |
||||
|
const equipmentData=ref([]) |
||||
|
const workstationData=ref([]) |
||||
|
const dialogVisible = ref(false) // 弹窗的是否展示 |
||||
|
const dialogTitle = ref('') // 弹窗的标题 |
||||
|
const graphJson =ref() |
||||
|
const currentNode = ref({ |
||||
|
name:'', |
||||
|
id:'' |
||||
|
}) |
||||
|
const showMaterialsData=ref() //物料信息分页展示 |
||||
|
const page=ref({ |
||||
|
total:0, |
||||
|
current:1, |
||||
|
size:7 |
||||
|
}) |
||||
|
|
||||
|
/** 打开弹窗 */ |
||||
|
const open = ( row?: any, titleName?: any) => { |
||||
|
//console.log("scheduleDetail-182",row) |
||||
|
currentNode.value.name='' |
||||
|
currentNode.value.id='' |
||||
|
workerData.value=[] |
||||
|
equipmentData.value = [] |
||||
|
materialsData.value = [] |
||||
|
showMaterialsData.value=[] |
||||
|
page.value.total = 0 |
||||
|
page.value.current = 1 |
||||
|
workstationData.value = [] |
||||
|
dialogVisible.value = true |
||||
|
detailData.value = row |
||||
|
dialogWidth.value = props.basicFormWidth + '%' |
||||
|
queryParams.planNoDay=row.planNoDay |
||||
|
queryParams.productCode=row.productCode |
||||
|
queryParams.workroomCode=row.workroomCode |
||||
|
queryParams.lineCode=row.lineCode |
||||
|
queryParams.processrouteCode=row.processrouteCode |
||||
|
queryParams.batchCode=row.batchCode |
||||
|
//获取配置的 |
||||
|
if (titleName) { |
||||
|
dialogTitle.value = titleName |
||||
|
} else { |
||||
|
dialogTitle.value = type |
||||
|
} |
||||
|
nextTick?.(() => { |
||||
|
graph.value = createGraph(graphContainer.value as HTMLElement, true, 240, 320) |
||||
|
graph.value.on('node:click', ({ e, x, y, node, view }) => { |
||||
|
nodeClick(e, x, y, node, view) |
||||
|
}) |
||||
|
getProcessroute() |
||||
|
getConfigProcessRouteNode() |
||||
|
}) |
||||
|
} |
||||
|
const getTotalcounts=(a:any)=>{ |
||||
|
return detailData.value.planCount*a |
||||
|
} |
||||
|
|
||||
|
//获取工序的BOM |
||||
|
const getProcessBom=async (code:any) => { |
||||
|
queryParams.processCode=code |
||||
|
let res = await orderDayconfigApi.getOrderDayBomByOrder(queryParams) |
||||
|
materialsData.value=res |
||||
|
if(materialsData.value.length>0){ |
||||
|
page.value.total = materialsData.value.length |
||||
|
page.value.current = 1 |
||||
|
showMaterialsData.value=materialsData.value.slice(0,page.value.size) |
||||
|
} |
||||
|
} |
||||
|
// const currentStartNode = ref({ |
||||
|
// id:'' |
||||
|
// }) |
||||
|
//获取配置的工艺路线信息 |
||||
|
const getProcessroute = async () => { |
||||
|
let res = await orderDayconfigApi.getConfigProcessRoute(queryParams) |
||||
|
graphJson.value=JSON.parse(res.newGraphData) |
||||
|
graph.value?.fromJSON(graphJson.value.cells) |
||||
|
//首次打开弹窗,默认打开一个工序的数据 |
||||
|
//currentStartNode.value = graphJson.value.cells[0] |
||||
|
currentNode.value = graphJson.value.cells[0] |
||||
|
// 手动触发点击事件 |
||||
|
nodeClick('','','',currentNode.value,'') |
||||
|
|
||||
|
} |
||||
|
//获取配置的工序信息 |
||||
|
const getConfigProcessRouteNode= async () => { |
||||
|
let res = await orderDayconfigApi.getConfigProcessRouteNode(queryParams) |
||||
|
processData.value=res |
||||
|
} |
||||
|
//获取配置的工序工位 |
||||
|
const getConfigProcessWorkstation= async (code:any) => { |
||||
|
queryParams.processCode=code |
||||
|
workstationData.value = await orderDayconfigApi.getConfigProcessWorkstation(queryParams) |
||||
|
} |
||||
|
//获取配置的工序人员 |
||||
|
const getConfigProcessWorker= async (code:any) => { |
||||
|
queryParams.processCode=code |
||||
|
workerData.value = await orderDayconfigApi.getConfigProcessWorker(queryParams) |
||||
|
} |
||||
|
//获取配置的工序设备 |
||||
|
const getConfigProcessEquipment= async (code:any) => { |
||||
|
queryParams.processCode=code |
||||
|
equipmentData.value = await orderDayconfigApi.getConfigProcessEquipment(queryParams) |
||||
|
} |
||||
|
const nodeClick = (e, x, y, node, view) => { |
||||
|
//console.log(node.id) |
||||
|
getProcessBom(node.id) |
||||
|
getConfigProcessWorkstation(node.id) |
||||
|
getConfigProcessWorker(node.id) |
||||
|
getConfigProcessEquipment(node.id) |
||||
|
processCode.value = node.id |
||||
|
currentNode.value.id=node.id |
||||
|
//console.log(node) |
||||
|
currentNode.value.name=node.attrs.title.text |
||||
|
} |
||||
|
|
||||
|
|
||||
|
const handleClose=()=>{ |
||||
|
dialogVisible.value = false, |
||||
|
emit('close') |
||||
|
} |
||||
|
|
||||
|
|
||||
|
const handleCurrentChangeM=(value: number)=>{ |
||||
|
let index=(value-1)*page.value.size |
||||
|
page.value.current=value |
||||
|
showMaterialsData.value=materialsData.value.slice(index,index+page.value.size) |
||||
|
|
||||
|
} |
||||
|
const handlePrevClickM=(value: number)=>{ |
||||
|
page.value.current=value-1 |
||||
|
if(page.value.current==0) { |
||||
|
page.value.current=1 |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
const handleNextClickM=(value: number)=>{ |
||||
|
page.value.current=value+1 |
||||
|
if(page.value.current>page.value.total/page.value.size) { |
||||
|
page.value.current=page.value.total/page.value.size -1 |
||||
|
} |
||||
|
} |
||||
|
defineOptions({ name: 'SechledDetail' }) |
||||
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗 |
||||
|
// 传递给父类 |
||||
|
const emit = defineEmits([ |
||||
|
'close' |
||||
|
]) |
||||
|
</script> |
||||
|
<style lang="scss"> |
||||
|
.el-drawer__body { |
||||
|
background: #f5f5f5 !important; |
||||
|
} |
||||
|
::v-deep(.label-class-name) { |
||||
|
color: #dedede; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,121 @@ |
|||||
|
<template> |
||||
|
<Dialog |
||||
|
:title="dialogTitle" |
||||
|
v-model="dialogVisible" |
||||
|
:close-on-click-modal="true" |
||||
|
:vLoading="formLoading" |
||||
|
> |
||||
|
<template #title>{{ dialogTitle }}</template> |
||||
|
<el-form> |
||||
|
<el-form-item label="当前工序"> |
||||
|
<el-input v-model="currentProcess" disabled></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="选择人员"> |
||||
|
<el-select v-model="personSelected"> |
||||
|
<el-option v-for="item in personData" :key="item.workerCode" :label="item.workerName" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="报工数量"> |
||||
|
<el-input-number v-model="reportCount" @change="handleCount"></el-input-number> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="工时"> |
||||
|
<el-input-number v-model="workTerm"></el-input-number> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否已质检"> |
||||
|
<el-switch v-model="checkFlag" active-value="true"> </el-switch> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="合格数量"> |
||||
|
<el-input-number |
||||
|
v-model="qualified" |
||||
|
:disabled="!checkFlag" |
||||
|
@change="handleCount" |
||||
|
></el-input-number> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="不合格数量"> |
||||
|
<el-input-number disabled v-model="unqualified"></el-input-number> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<template #footer |
||||
|
><el-button @click="dialogVisible = false">关闭</el-button> |
||||
|
<el-button type="primary" @click="saveReport">保存</el-button></template |
||||
|
> |
||||
|
</Dialog> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
import { Dialog } from '@/components/Dialog' |
||||
|
import * as workschedulingApi from '@/api/mes/workScheduling' |
||||
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
||||
|
import dayjs from 'dayjs' |
||||
|
const message = useMessage() // 消息弹窗 |
||||
|
const { t } = useI18n() // 国际化 |
||||
|
const { wsCache } = useCache() |
||||
|
const rowData = ref() |
||||
|
const dialogVisible = ref(false) |
||||
|
const dialogTitle = ref() |
||||
|
const formLoading = ref(false) |
||||
|
const personSelected = ref() |
||||
|
const currentProcess = ref() |
||||
|
const personData = ref([{ value: '', label: '' }]) |
||||
|
const reportCount = ref() |
||||
|
const qualified = ref() |
||||
|
const checkFlag = ref(false) |
||||
|
const unqualified = ref(0) |
||||
|
const workTerm = ref() |
||||
|
const user = wsCache.get(CACHE_KEY.USER) |
||||
|
const handleCount = () => { |
||||
|
if (reportCount.value > rowData.value.planCount) { |
||||
|
message.alert('报工数量不能超出计划数量!计划数【'+rowData.value.planCount+'】') |
||||
|
reportCount.value =rowData.value.planCount |
||||
|
return |
||||
|
} |
||||
|
|
||||
|
if (checkFlag) { |
||||
|
if (reportCount.value < qualified.value) { |
||||
|
message.alert('合格数不能超出报工数!') |
||||
|
return |
||||
|
} |
||||
|
if (qualified.value == undefined || qualified.value == 0) { |
||||
|
qualified.value = reportCount.value |
||||
|
} |
||||
|
unqualified.value = reportCount.value - qualified.value |
||||
|
} |
||||
|
} |
||||
|
const openDetail = (row: any, titleName: any) => { |
||||
|
//console.log('workscheduling-finishReport-60', user) |
||||
|
currentProcess.value = row.workingNode |
||||
|
rowData.value = row |
||||
|
dialogVisible.value = true |
||||
|
dialogTitle.value = titleName |
||||
|
getCurrentWorkerList(row) |
||||
|
} |
||||
|
const getCurrentWorkerList = async (row) => { |
||||
|
let params = { |
||||
|
planDayCode: row.planMasterCode, |
||||
|
processCode: row.workingNode |
||||
|
} |
||||
|
personData.value = await workschedulingApi.getCurrentWorkerList(params) |
||||
|
} |
||||
|
//提交报工 |
||||
|
const saveReport = () => { |
||||
|
let data = { |
||||
|
reportDate: dayjs(new Date()).format('YYYY-MM-DD HH:mm:sss'), |
||||
|
schedulingCode: rowData.value.schedulingCode, |
||||
|
processCode: currentProcess.value, |
||||
|
list: [ |
||||
|
{ |
||||
|
reportCount: reportCount.value, |
||||
|
workTerm: workTerm.value, |
||||
|
reportPerson: personSelected.value, |
||||
|
qualified: qualified.value, |
||||
|
unqualified: unqualified.value |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
workschedulingApi.completeHandle(data) |
||||
|
} |
||||
|
// 传递给父类 |
||||
|
const emit = defineEmits(['success', 'close']) |
||||
|
|
||||
|
defineExpose({ openDetail }) // 提供 open 方法,用于打开弹窗 |
||||
|
</script> |
@ -0,0 +1,143 @@ |
|||||
|
<template> |
||||
|
<Dialog |
||||
|
:title="dialogTitle" |
||||
|
v-model="dialogVisible" |
||||
|
:close-on-click-modal="true" |
||||
|
:vLoading="formLoading" |
||||
|
> |
||||
|
<template #title>{{ dialogTitle }}</template> |
||||
|
<el-form> |
||||
|
<el-form-item label="选择工序"> |
||||
|
<el-select v-model="processCodeSelected" @change="processChange" value-key="processCode"> |
||||
|
<el-option v-for="item in processOption" :key="item.processCode" :label="item.processName" :value="item.processCode" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="选择人员"> |
||||
|
<el-select v-model="personSelected"> |
||||
|
<el-option v-for="item in personOption" :key="item.workerCode" :label="item.workerName" :value="item.workerCode" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="报工数量"> |
||||
|
<el-input-number v-model="reportCount" @change="handleCount"></el-input-number> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="工时"> |
||||
|
<el-input-number v-model="workTerm"></el-input-number> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否已质检"> |
||||
|
<el-switch v-model="checkFlag" active-value="true"> </el-switch> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="合格数量"> |
||||
|
<el-input-number |
||||
|
v-model="qualified" |
||||
|
:disabled="!checkFlag" |
||||
|
@change="handleCount" |
||||
|
></el-input-number> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="不合格数量"> |
||||
|
<el-input-number disabled v-model="unqualified"></el-input-number> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<template #footer> |
||||
|
<el-button @click="dialogVisible = false">关闭</el-button> |
||||
|
<el-button type="primary" :disabled="saveFlag" @click="saveReport">保存</el-button> |
||||
|
</template> </Dialog |
||||
|
>+ |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
import { Dialog } from '@/components/Dialog' |
||||
|
import * as workschedulingApi from '@/api/mes/workScheduling' |
||||
|
import dayjs from 'dayjs' |
||||
|
const message = useMessage() // 消息弹窗 |
||||
|
const { t } = useI18n() // 国际化 |
||||
|
const rowData = ref() |
||||
|
const openDetail = async (row: any, titleName: any) => { |
||||
|
rowData.value = row |
||||
|
dialogVisible.value = true |
||||
|
dialogTitle.value = titleName |
||||
|
getProcessList(row) |
||||
|
} |
||||
|
const dialogVisible = ref(false) |
||||
|
const dialogTitle = ref() |
||||
|
const formLoading = ref(false) |
||||
|
const processOption = ref([]) |
||||
|
const personOption=ref([]) |
||||
|
const processCodeSelected = ref() |
||||
|
const personSelected = ref() |
||||
|
const checkFlag = ref(false) |
||||
|
const unqualified = ref() |
||||
|
const reportCount = ref() |
||||
|
const qualified = ref() |
||||
|
const workTerm = ref() |
||||
|
const saveFlag=ref(false) |
||||
|
//获取工序列表 |
||||
|
const getProcessList=async(row)=>{ |
||||
|
let params={ |
||||
|
planDayCode:row.planMasterCode, |
||||
|
schedulingCode:row.schedulingCode |
||||
|
} |
||||
|
processOption.value=await workschedulingApi.getProcessList(params) |
||||
|
} |
||||
|
const processChange=(val:any)=>{ |
||||
|
console.log("processChange-81",val) |
||||
|
getCurrentWorkerList(val) |
||||
|
} |
||||
|
//获取工序人员 |
||||
|
const getCurrentWorkerList = async (val) => { |
||||
|
console.log("personOption-91",val) |
||||
|
let params = { |
||||
|
planDayCode: rowData.value.planMasterCode, |
||||
|
processCode: val |
||||
|
} |
||||
|
personOption.value = await workschedulingApi.getCurrentWorkerList(params) |
||||
|
|
||||
|
} |
||||
|
//报工数量处理 |
||||
|
const handleCount = () => { |
||||
|
if (reportCount.value > rowData.value.planCount) { |
||||
|
message.alert('报工数量不能超出计划数量!计划数【'+rowData.value.planCount+'】') |
||||
|
reportCount.value =rowData.value.planCount |
||||
|
return |
||||
|
} |
||||
|
|
||||
|
if (checkFlag.value) { |
||||
|
if (reportCount.value < qualified.value) { |
||||
|
message.alert('合格数不能超出报工数!') |
||||
|
qualified.value=0 |
||||
|
return |
||||
|
} |
||||
|
if (qualified.value == undefined || qualified.value == 0) { |
||||
|
qualified.value = reportCount.value |
||||
|
} |
||||
|
|
||||
|
unqualified.value = reportCount.value - qualified.value |
||||
|
} |
||||
|
} |
||||
|
//提交报工 |
||||
|
const saveReport = async() => { |
||||
|
let data = { |
||||
|
reportDate: dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'), |
||||
|
schedulingCode: rowData.value.schedulingCode, |
||||
|
processCode: processCodeSelected.value, |
||||
|
list: [ |
||||
|
{ |
||||
|
reportCount: reportCount.value, |
||||
|
workTerm: workTerm.value, |
||||
|
reportPerson: personSelected.value, |
||||
|
qualified: qualified.value, |
||||
|
unqualified: unqualified.value |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
saveFlag.value = true |
||||
|
//console.log("report-saveReport-82",data) |
||||
|
await workschedulingApi.reportWorkByProcess(data) |
||||
|
saveFlag.value = false |
||||
|
dialogVisible.value = false |
||||
|
emit('close') |
||||
|
} |
||||
|
// 传递给父类 |
||||
|
const emit = defineEmits(['success', 'close']) |
||||
|
|
||||
|
defineExpose({ openDetail }) // 提供 open 方法,用于打开弹窗 |
||||
|
</script> |
@ -0,0 +1,233 @@ |
|||||
|
<template> |
||||
|
<ContentWrap> |
||||
|
<!-- 搜索工作栏 --> |
||||
|
<Search :schema="RelegateRequest.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
||||
|
</ContentWrap> |
||||
|
|
||||
|
<!-- 列表头部 --> |
||||
|
<TableHead |
||||
|
:HeadButttondata="HeadButttondata" |
||||
|
@button-base-click="buttonBaseClick" |
||||
|
:routeName="routeName" |
||||
|
@updataTableColumns="updataTableColumns" |
||||
|
@searchFormClick="searchFormClick" |
||||
|
:allSchemas="RelegateRequest.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="RelegateRequestRules" |
||||
|
:formAllSchemas="RelegateRequest.allSchemas" |
||||
|
:apiUpdate="RelegateRequestApi.updateRelegateRequest" |
||||
|
:apiCreate="RelegateRequestApi.createRelegateRequest" |
||||
|
@searchTableSuccess="searchTableSuccess" |
||||
|
:isBusiness="false" |
||||
|
/> |
||||
|
|
||||
|
<!-- 详情 --> |
||||
|
<Detail ref="detailRef" :isBasic="true" :allSchemas="RelegateRequest.allSchemas" /> |
||||
|
|
||||
|
<!-- 导入 --> |
||||
|
<ImportForm ref="importFormRef" url="/wms/relegate-request/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import download from '@/utils/download' |
||||
|
import { RelegateRequest,RelegateRequestRules } from './relegateRequest.data' |
||||
|
import * as RelegateRequestApi from '@/api/wms/relegateRequest' |
||||
|
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: 'RelegateRequest' }) |
||||
|
|
||||
|
const message = useMessage() // 消息弹窗 |
||||
|
const { t } = useI18n() // 国际化 |
||||
|
|
||||
|
const route = useRoute() // 路由信息 |
||||
|
const routeName = ref() |
||||
|
routeName.value = route.name |
||||
|
const tableColumns = ref(RelegateRequest.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: RelegateRequestApi.getRelegateRequestPage // 分页接口 |
||||
|
}) |
||||
|
|
||||
|
// 获得表格的各种操作 |
||||
|
const { getList, setSearchParams } = tableMethods |
||||
|
|
||||
|
// 列表头部按钮 |
||||
|
const HeadButttondata = [ |
||||
|
defaultButtons.defaultAddBtn({hasPermi:'wms:relegate-request:create'}), // 新增 |
||||
|
defaultButtons.defaultImportBtn({hasPermi:'wms:relegate-request:import'}), // 导入 |
||||
|
defaultButtons.defaultExportBtn({hasPermi:'wms:relegate-request: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:relegate-request:update'}), // 编辑 |
||||
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:relegate-request: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) => { |
||||
|
if (formType === 'create') { |
||||
|
await RelegateRequestApi.createRelegateRequest(data) |
||||
|
message.success(t('common.createSuccess')) |
||||
|
} else { |
||||
|
await RelegateRequestApi.updateRelegateRequest(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, 'basicRelegateRequest') |
||||
|
} |
||||
|
|
||||
|
/** 删除按钮操作 */ |
||||
|
const handleDelete = async (id: number) => { |
||||
|
try { |
||||
|
// 删除的二次确认 |
||||
|
await message.delConfirm() |
||||
|
// 发起删除 |
||||
|
await RelegateRequestApi.deleteRelegateRequest(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 RelegateRequestApi.exportRelegateRequest(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 RelegateRequestApi.importTemplate() |
||||
|
}) |
||||
|
|
||||
|
</script> |
@ -0,0 +1,243 @@ |
|||||
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
||||
|
import { dateFormatter } from '@/utils/formatTime' |
||||
|
|
||||
|
import * as ItembasicApi from '@/api/wms/itembasic' |
||||
|
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' |
||||
|
|
||||
|
// 表单校验
|
||||
|
export const RelegateRequestRules = reactive({ |
||||
|
itemCode: [required], |
||||
|
downItemCode: [required], |
||||
|
businessType: [required], |
||||
|
available: [required], |
||||
|
departmentCode: [required], |
||||
|
concurrencyStamp: [required], |
||||
|
}) |
||||
|
|
||||
|
export const RelegateRequest = useCrudSchemas(reactive<CrudSchema[]>([ |
||||
|
{ |
||||
|
label: '单据号', |
||||
|
field: 'number', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '物料代码', |
||||
|
field: 'itemCode', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
form: { |
||||
|
componentProps: { |
||||
|
isSearchList: true, |
||||
|
searchListPlaceholder: '请选择物料代码', |
||||
|
searchField: 'itemCode', |
||||
|
searchTitle: '客户物料基础信息', |
||||
|
searchAllSchemas: Itembasic.allSchemas, |
||||
|
searchPage: ItembasicApi.getItembasicPage, |
||||
|
searchCondition: [{ |
||||
|
key: 'available', |
||||
|
value: 'TRUE', |
||||
|
isMainValue: false |
||||
|
}] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '降级后物料代码', |
||||
|
field: 'downItemCode', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '计量单位', |
||||
|
field: 'uom', |
||||
|
sort: 'custom', |
||||
|
form: { |
||||
|
componentProps: { |
||||
|
disabled: true, |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '数量', |
||||
|
field: 'qty', |
||||
|
sort: 'custom', |
||||
|
}, |
||||
|
{ |
||||
|
label: '从批次', |
||||
|
field: 'fromBatch', |
||||
|
sort: 'custom', |
||||
|
form: { |
||||
|
componentProps: { |
||||
|
disabled: true, |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '从包装号', |
||||
|
field: 'fromPackingNumber', |
||||
|
sort: 'custom', |
||||
|
form: { |
||||
|
componentProps: { |
||||
|
disabled: true, |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '从库位代码', |
||||
|
field: 'fromLocationCode', |
||||
|
sort: 'custom', |
||||
|
form: { |
||||
|
componentProps: { |
||||
|
disabled: true, |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '从库区类型', |
||||
|
field: 'fromAreaTypes', |
||||
|
sort: 'custom', |
||||
|
isForm:false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '从库区代码', |
||||
|
field: 'fromAreaCodes', |
||||
|
sort: 'custom', |
||||
|
isForm:false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '从仓库代码', |
||||
|
field: 'fromWarehouseCode', |
||||
|
sort: 'custom', |
||||
|
isForm:false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '到包装号', |
||||
|
field: 'toPackingNumber', |
||||
|
sort: 'custom', |
||||
|
}, |
||||
|
{ |
||||
|
label: '到批次', |
||||
|
field: 'toBatch', |
||||
|
sort: 'custom', |
||||
|
}, |
||||
|
{ |
||||
|
label: '到库位代码', |
||||
|
field: 'toLocationCode', |
||||
|
sort: 'custom', |
||||
|
}, |
||||
|
{ |
||||
|
label: '到仓库代码', |
||||
|
field: 'toWarehouseCode', |
||||
|
sort: 'custom', |
||||
|
isForm:false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '到库区类型', |
||||
|
field: 'toAreaTypes', |
||||
|
sort: 'custom', |
||||
|
isForm:false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '到库区代码', |
||||
|
field: 'toAreaCodes', |
||||
|
sort: 'custom', |
||||
|
isForm:false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '是否可用', |
||||
|
field: 'available', |
||||
|
sort: 'custom', |
||||
|
isForm:false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '备注', |
||||
|
field: 'remark', |
||||
|
sort: 'custom', |
||||
|
}, |
||||
|
{ |
||||
|
label: '部门', |
||||
|
field: 'departmentCode', |
||||
|
sort: 'custom', |
||||
|
isForm:false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '地点ID', |
||||
|
field: 'siteId', |
||||
|
sort: 'custom', |
||||
|
form: { |
||||
|
component: 'InputNumber', |
||||
|
value: 0 |
||||
|
}, |
||||
|
isForm:false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '扩展属性', |
||||
|
field: 'extraProperties', |
||||
|
sort: 'custom', |
||||
|
isForm:false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '创建时间', |
||||
|
field: 'createTime', |
||||
|
sort: 'custom', |
||||
|
formatter: dateFormatter, |
||||
|
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: 'status', |
||||
|
dictType: DICT_TYPE.REQUEST_STATUS, |
||||
|
dictClass: 'string', |
||||
|
isSearch: true, |
||||
|
isForm: false, |
||||
|
isTable: true, |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '并发乐观锁', |
||||
|
field: 'concurrencyStamp', |
||||
|
sort: 'custom', |
||||
|
isForm:false, |
||||
|
form: { |
||||
|
component: 'InputNumber', |
||||
|
value: 0 |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '工作流流水号', |
||||
|
field: 'serialNumber', |
||||
|
isForm:false, |
||||
|
sort: 'custom', |
||||
|
}, |
||||
|
{ |
||||
|
label: '权限所属人员id', |
||||
|
field: 'ruleUserId', |
||||
|
sort: 'custom', |
||||
|
isForm:false, |
||||
|
form: { |
||||
|
component: 'InputNumber', |
||||
|
value: 0 |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '操作', |
||||
|
field: 'action', |
||||
|
isForm: false, |
||||
|
table: { |
||||
|
width: 150, |
||||
|
fixed: 'right' |
||||
|
} |
||||
|
} |
||||
|
])) |
@ -0,0 +1,224 @@ |
|||||
|
<template> |
||||
|
<ContentWrap> |
||||
|
<!-- 搜索工作栏 --> |
||||
|
<Search :schema="SaleShipmentMainRecord.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
||||
|
</ContentWrap> |
||||
|
|
||||
|
<!-- 列表头部 --> |
||||
|
<TableHead |
||||
|
:HeadButttondata="HeadButttondata" |
||||
|
@button-base-click="buttonBaseClick" |
||||
|
:routeName="routeName" |
||||
|
@updataTableColumns="updataTableColumns" |
||||
|
@searchFormClick="searchFormClick" |
||||
|
:allSchemas="SaleShipmentMainRecord.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="SaleShipmentMainRecordRules" |
||||
|
:formAllSchemas="SaleShipmentMainRecord.allSchemas" |
||||
|
:apiUpdate="SaleShipmentMainRecordApi.updateSaleShipmentMainRecord" |
||||
|
:apiCreate="SaleShipmentMainRecordApi.createSaleShipmentMainRecord" |
||||
|
@searchTableSuccess="searchTableSuccess" |
||||
|
:isBusiness="false" |
||||
|
/> |
||||
|
|
||||
|
<!-- 详情 --> |
||||
|
<Detail ref="detailRef" :isBasic="true" :allSchemas="SaleShipmentMainRecord.allSchemas" /> |
||||
|
|
||||
|
<!-- 导入 --> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import download from '@/utils/download' |
||||
|
import { SaleShipmentMainRecord,SaleShipmentMainRecordRules } from './saleShipmentMainRecord.data' |
||||
|
import * as SaleShipmentMainRecordApi from '@/api/wms/saleShipmentMainRecord' |
||||
|
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: 'SaleShipmentMainRecord' }) |
||||
|
|
||||
|
const message = useMessage() // 消息弹窗 |
||||
|
const { t } = useI18n() // 国际化 |
||||
|
|
||||
|
const route = useRoute() // 路由信息 |
||||
|
const routeName = ref() |
||||
|
routeName.value = route.name |
||||
|
const tableColumns = ref(SaleShipmentMainRecord.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: SaleShipmentMainRecordApi.getSaleShipmentMainRecordPage // 分页接口 |
||||
|
}) |
||||
|
|
||||
|
// 获得表格的各种操作 |
||||
|
const { getList, setSearchParams } = tableMethods |
||||
|
|
||||
|
// 列表头部按钮 |
||||
|
const HeadButttondata = [ |
||||
|
defaultButtons.defaultAddBtn({hasPermi:'wms:saleShipmentMainRecord:create'}), // 新增 |
||||
|
defaultButtons.defaultExportBtn({hasPermi:'wms:saleShipmentMainRecord: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 == 'export') { // 导出 |
||||
|
handleExport() |
||||
|
} else if (val == 'refresh') { // 刷新 |
||||
|
getList() |
||||
|
} else if (val == 'filtrate') { // 筛选 |
||||
|
} else { // 其他按钮 |
||||
|
console.log('其他按钮', item) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 列表-操作按钮 |
||||
|
const butttondata = [ |
||||
|
defaultButtons.mainListEditBtn({hasPermi:'wms:saleShipmentMainRecord:update'}), // 编辑 |
||||
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:saleShipmentMainRecord: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 =SaleShipmentMainRecord.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 SaleShipmentMainRecordApi.createSaleShipmentMainRecord(data) |
||||
|
message.success(t('common.createSuccess')) |
||||
|
} else { |
||||
|
await SaleShipmentMainRecordApi.updateSaleShipmentMainRecord(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, 'basicSaleShipmentMainRecord') |
||||
|
} |
||||
|
|
||||
|
/** 删除按钮操作 */ |
||||
|
const handleDelete = async (id: number) => { |
||||
|
try { |
||||
|
// 删除的二次确认 |
||||
|
await message.delConfirm() |
||||
|
// 发起删除 |
||||
|
await SaleShipmentMainRecordApi.deleteSaleShipmentMainRecord(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 SaleShipmentMainRecordApi.exportSaleShipmentMainRecord(tableObject.params) |
||||
|
download.excel(data, '销售发运记录主.xlsx') |
||||
|
} catch { |
||||
|
} finally { |
||||
|
exportLoading.value = false |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 筛选提交 |
||||
|
const searchFormClick = (searchData) => { |
||||
|
tableObject.params = { |
||||
|
isSearch: true, |
||||
|
filters: searchData.filters |
||||
|
} |
||||
|
getList() // 刷新当前列表 |
||||
|
} |
||||
|
|
||||
|
/** 初始化 **/ |
||||
|
onMounted(async () => { |
||||
|
getList() |
||||
|
}) |
||||
|
|
||||
|
</script> |
@ -0,0 +1,278 @@ |
|||||
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
||||
|
import { dateFormatter } from '@/utils/formatTime' |
||||
|
|
||||
|
// 表单校验
|
||||
|
export const SaleShipmentMainRecordRules = reactive({ |
||||
|
}) |
||||
|
|
||||
|
export const SaleShipmentMainRecord = useCrudSchemas(reactive<CrudSchema[]>([ |
||||
|
{ |
||||
|
label: '单据号', |
||||
|
field: 'number', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '申请单号', |
||||
|
field: 'requestNumber', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '客户代码', |
||||
|
field: 'customerCode', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '发票时间', |
||||
|
field: 'invoiceTime', |
||||
|
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')] |
||||
|
} |
||||
|
}, |
||||
|
form: { |
||||
|
component: 'DatePicker', |
||||
|
componentProps: { |
||||
|
type: 'datetime', |
||||
|
valueFormat: 'x' |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '执行时间', |
||||
|
field: 'executeTime', |
||||
|
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')] |
||||
|
} |
||||
|
}, |
||||
|
form: { |
||||
|
component: 'DatePicker', |
||||
|
componentProps: { |
||||
|
type: 'datetime', |
||||
|
valueFormat: 'x' |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '是否可用', |
||||
|
field: 'available', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '部门', |
||||
|
field: 'departmentCode', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
label: '业务类型', |
||||
|
field: 'businessType', |
||||
|
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: '地点ID', |
||||
|
field: 'siteId', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '操作', |
||||
|
field: 'action', |
||||
|
isForm: false, |
||||
|
table: { |
||||
|
width: 150, |
||||
|
fixed: 'right' |
||||
|
} |
||||
|
} |
||||
|
])) |
||||
|
|
||||
|
// 表单校验
|
||||
|
export const SaleShipmentDetailRecordRules = reactive({ |
||||
|
}) |
||||
|
|
||||
|
export const SaleShipmentDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([ |
||||
|
{ |
||||
|
label: '单据号', |
||||
|
field: 'number', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '销售订单号', |
||||
|
field: 'soNumber', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '销售订单行', |
||||
|
field: 'soLine', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '从货主代码', |
||||
|
field: 'fromOwnerCode', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '包装号', |
||||
|
field: 'packingNumber', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '批次', |
||||
|
field: 'batch', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '库存状态', |
||||
|
field: 'inventoryStatus', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
form: { |
||||
|
component: 'Radio' |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '从库位代码', |
||||
|
field: 'fromLocationCode', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '主表ID', |
||||
|
field: 'masterId', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
form: { |
||||
|
component: 'InputNumber', |
||||
|
value: 0 |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '物品代码', |
||||
|
field: 'itemCode', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '物品名称', |
||||
|
field: 'itemName', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '物品描述1', |
||||
|
field: 'itemDesc1', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '物品描述2', |
||||
|
field: 'itemDesc2', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '项目代码', |
||||
|
field: 'projectCode', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '数量', |
||||
|
field: 'qty', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '计量单位', |
||||
|
field: 'uom', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '备注', |
||||
|
field: 'remark', |
||||
|
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: 'concurrencyStamp', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '地点ID', |
||||
|
field: 'siteId', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
form: { |
||||
|
component: 'InputNumber', |
||||
|
value: 0 |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '操作', |
||||
|
field: 'action', |
||||
|
isForm: false, |
||||
|
table: { |
||||
|
width: 150, |
||||
|
fixed: 'right' |
||||
|
} |
||||
|
} |
||||
|
])) |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue