diff --git a/src/api/mes/workScheduling/index.ts b/src/api/mes/workScheduling/index.ts
index 7df13e502..d8cbe4a9e 100644
--- a/src/api/mes/workScheduling/index.ts
+++ b/src/api/mes/workScheduling/index.ts
@@ -52,10 +52,14 @@ export const importTemplate = () => {
export const completeHandle = async (data) => {
return await request.post({ url: `/mes/workScheduling/completeHandle`, data })
}
-//报工
+//工序报工
export const reportWorkByProcess = async (data) => {
return await request.post({ url: `/mes/work-scheduling-detail/reportWorkByProcess`, data })
}
+//批量报工
+export const reportWorkByTask = async (data) => {
+ return await request.post({ url: `/mes/workScheduling/reportForAll`, data })
+}
//检查当前节点是否可以完工
export const getNodePosition = async (params) => {
return await request.get({ url: `/mes/workScheduling/getNodePosition`, params })
diff --git a/src/api/mes/workSchedulingDetail/index.ts b/src/api/mes/workSchedulingDetail/index.ts
index f39e63513..122291bcc 100644
--- a/src/api/mes/workSchedulingDetail/index.ts
+++ b/src/api/mes/workSchedulingDetail/index.ts
@@ -63,3 +63,7 @@ export const exportWorkSchedulingDetail = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/mes/work-scheduling-detail/get-import-template' })
}
+//工序报工
+export const reportWorkByProcess = async (data) => {
+ return await request.post({ url: `/mes/work-scheduling-detail/reportWorkByProcess`, data })
+}
\ No newline at end of file
diff --git a/src/components/SearchTable/src/SearchTable.vue b/src/components/SearchTable/src/SearchTable.vue
index 92fc2ef02..39e93b2ce 100644
--- a/src/components/SearchTable/src/SearchTable.vue
+++ b/src/components/SearchTable/src/SearchTable.vue
@@ -1,7 +1,9 @@
-->
-
- {{ item }}
-
+
-
+ 完工
+ 报工
+ 质检
-
-
-
+
+ dddddddddd
-
+ -->
+
0) {
tabsList.value.unshift({
@@ -554,7 +548,9 @@ const masterParmas = ref({
// 列表头部按钮
const HeadButttondata = ref()
// 列表-操作按钮
-const buttondata = ref()
+const buttondata = ref(
+
+)
/** 表格弹窗 */
const initModel = (schema: FormSchema[], formModel: Recordable) => {
const model: Recordable = { ...formModel }
@@ -585,10 +581,13 @@ const searchTableFormType = ref('') // 表单的类型:create - 新增;updat
const formRef = ref()
const titleNameRef = ref()
const titleValueRef = ref()
+const planDayCode=ref()
const count = ref(0)
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
titleNameRef.value = titleName
titleValueRef.value = titleValue
+
+ planDayCode.value=row.planMasterCode
remarksData.data = {
tableId: row.id,
tableName: tableName
@@ -658,12 +657,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
})
]
}
-
- if(row.status == '1'){
- props.buttondataTable[0].hide = false
- }else{
- props.buttondataTable[0].hide = true
- }
+ //console.log("props.buttondataTable-663",props.buttondataTable);
buttondata.value = [...detailButtonEdit, ...detailButtonDelete, ...props.buttondataTable]
} finally {
detailLoading.value = false
@@ -671,7 +665,6 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
}
}
defineExpose({ openDetail, formRef }) // 提供 open 方法,用于打开弹窗
-
// 获取备注列表
const getRemarkList = async () => {
detailLoading.value = true
@@ -833,14 +826,23 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'delete') {
// 删除
handleDelete(row.id)
- } else if (val == 'pfinished') {
-
- WorkSchedulingDetailApi.processFinished(row.id)
- getList()
- }else {
+ } else {
emit('tableFormButton', val, row)
}
}
+const buttonClick=(type,row)=>{
+ if (type == 'pfinished') {
+ WorkSchedulingDetailApi.processFinished(row.id)
+ getList()
+ }else if (type == 'reprotProcess') {
+ refreport.value.openDetail(row,"工序报工", planDayCode.value)
+
+ //
+}else if (type == 'checkProcess') {
+ //WorkSchedulingDetailApi.processFinished(row.id)
+}
+getList()
+}
/** 添加/修改操作 */
const openForm = async (type: string, row?: number) => {
formRef.value.open(type, row, masterParmas.value)
diff --git a/src/views/mes/workScheduling/components/report.vue b/src/views/mes/workScheduling/components/report.vue
index 2adaf1dbe..c0729c427 100644
--- a/src/views/mes/workScheduling/components/report.vue
+++ b/src/views/mes/workScheduling/components/report.vue
@@ -4,71 +4,20 @@
v-model="dialogVisible"
:close-on-click-modal="true"
:vLoading="formLoading"
- width="fit-content"
+ width="600px"
>
{{ dialogTitle }}
- 添加
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{scope.row.unqualified= scope.row.reportCount -scope.row.qualified}}
-
-
-
-
- 删除
-
-
-
-
+
关闭
@@ -101,19 +50,11 @@ 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 processCode = ref()
const personSelected = ref()
const checkFlag = ref(false)
const unqualified = ref()
@@ -121,37 +62,24 @@ const reportCount = ref()
const qualified = ref()
const workTerm = ref()
const saveFlag=ref(false)
-const tableData=ref([{}])
-const addRow=()=>{
- tableData.value.push({
- processCode:processCodeSelected.value,
- processName:processOption.value?.find(item=>item.processCode==processCodeSelected.value)?.processName,
- reportName:personOption.value?.find(item=>item.workerCode==personSelected.value)?.workerName,
- reportCount:reportCount.value,
- workTerm:workTerm.value,
- checkFlag:checkFlag.value})
-
-}
-const deleteRow = (index: number) => {
- tableData.value.splice(index, 1)
-}
-//获取工序列表
-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 planDayCode=ref()
+const formRef=ref()
+const openDetail = async (row: any, titleName: any,code:string) => {
+ rowData.value = row
+ //console.log('row-68',row)
+ dialogVisible.value = true
+ dialogTitle.value = titleName
+ processCode.value=row.nodeCode
+ planDayCode.value=code
+ getCurrentWorkerList(processCode.value)
+
}
+
//获取工序人员
const getCurrentWorkerList = async (val) => {
-//console.log("personOption-91",val)
+
let params = {
- planDayCode: rowData.value.planMasterCode,
+ planDayCode: planDayCode.value,
processCode: val
}
personOption.value = await workschedulingApi.getCurrentWorkerList(params)
@@ -160,45 +88,50 @@ const getCurrentWorkerList = async (val) => {
const count = ref(0)
const qcount = ref(1)
//报工数量处理
-const handleCount = (row) => {
- if (row.reportCount > rowData.value.planCount) {
+const handleCount = (val) => {
+
+ if (reportCount.value> rowData.value.planCount) {
message.alert('报工数量不能超出计划数量!计划数【'+rowData.value.planCount+'】')
- row.reportCount =rowData.value.planCount
+ reportCount.value =rowData.value.planCount
//tableData.value[index].reportCount =rowData.value.planCount
count.value++
return
}
//message.alert(row.checkFlag==true?'1':'2')
- if (row.checkFlag) {
- if (row.reportCount < row.qualified) {
+ if (checkFlag.value) {
+ if (reportCount.value < qualified.value) {
message.alert('合格数不能超出报工数!')
- row.qualified=row.reportCount
+ qualified.value=reportCount.value
qcount.value++
return
}
- if (row.qualified == undefined || row.qualified == 0) {
- row.qualified = row.reportCount
+ if (qualified.value == undefined || qualified.value == 0) {
+ qualified.val = reportCount.value
qcount.value++
}
- row.unqualified= row.reportCount- row.qualified
+ unqualified.value= reportCount.value- qualified.value
}
}
//提交报工
const saveReport = async() => {
+
+ let listSub=[{}]
+ personSelected.value.forEach((item) => {
+ let data={
+ reportCount: formRef.value.reportCount,
+ workTerm: formRef.value.workTerm,
+ reportPerson: formRef.value.item,
+ qualified: formRef.value.qualified,
+ unqualified: formRef.value.unqualified
+ }
+ listSub.push(data)
+ })
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
- }
- ]
+ processCode: processCode.value,
+ list: listSub
}
saveFlag.value = true
try {
@@ -214,6 +147,6 @@ const saveReport = async() => {
}
// 传递给父类
const emit = defineEmits(['success', 'close'])
-
+defineOptions({ name: 'reportProcess' })
defineExpose({ openDetail }) // 提供 open 方法,用于打开弹窗
diff --git a/src/views/mes/workScheduling/components/reportAll.vue b/src/views/mes/workScheduling/components/reportAll.vue
new file mode 100644
index 000000000..085008f86
--- /dev/null
+++ b/src/views/mes/workScheduling/components/reportAll.vue
@@ -0,0 +1,185 @@
+
+
+
+
diff --git a/src/views/mes/workScheduling/index.vue b/src/views/mes/workScheduling/index.vue
index 748959db6..2427223e9 100644
--- a/src/views/mes/workScheduling/index.vue
+++ b/src/views/mes/workScheduling/index.vue
@@ -68,7 +68,7 @@
@searchTableSuccessDetail="searchTableSuccessDetail"
:key="count"
/>
-
+
@@ -83,7 +83,7 @@ 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.vue'
-import Report from './components/report.vue'
+import ReportAll from './components/reportAll.vue'
import Finish from './components/finish.vue'
@@ -96,17 +96,7 @@ const route = useRoute() // 路由信息
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(WorkScheduling.allSchemas.tableColumns)
-// 详情 table 操作扩展 按钮
-const buttondataTable = ref([{
- label: '完工',
- name: 'pfinished',
- hide: false,
- type: 'primary',
- icon: '',
- color: '',
- hasPermi: '',
- link: true, // 文本展现按钮
- }])
+
// 查看 Bom 按钮回调事件
const tableFormButton = async (val , row) => {
getList()
@@ -191,8 +181,8 @@ const butttondata=(row) =>{ return [
defaultButtons.mainListHandleBtn({label:"暂停",name:'pause',hide: isShowMainButton(row,['1']),hasPermi:'mes:workScheduling:update'}),
defaultButtons.mainListHandleBtn({label:"恢复",name:'resume',hide: isShowMainButton(row,['3']),hasPermi:'mes:workScheduling:update'}),
defaultButtons.mainListHandleBtn({label:"开工",name:'start',hide: isShowMainButton(row,['-1','0']),hasPermi:'mes:workScheduling:update'}),
- defaultButtons.mainListHandleBtn({label:"报工",name:'report',hide: isShowMainButton(row,['4'] ),hasPermi:'mes:workScheduling:update'}),
- defaultButtons.mainListHandleBtn({label:"质检",name:'check',hide: isShowMainButton(row,['5'] ),hasPermi:'mes:workScheduling:update'}),
+ // defaultButtons.mainListHandleBtn({label:"报工",name:'report',hide: isShowMainButton(row,['3','1'] ),hasPermi:'mes:workScheduling:update'}),
+ // defaultButtons.mainListHandleBtn({label:"质检",name:'check',hide: isShowMainButton(row,['5'] ),hasPermi:'mes:workScheduling:update'}),
defaultButtons.mainListHandleBtn({label:"完工",name:'finish',hide: isShowMainButton(row,['1']),hasPermi:'mes:workScheduling:update'}),
//defaultButtons.mainListHandleBtn({label:"叫料",name:'callMaterial',hide: isShowMainButton(row,['1']),hasPermi:'mes:workScheduling:update'}),
@@ -228,7 +218,7 @@ const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
-//完工报工
+//完工
const finishReport=async(row)=>{
let params={
id:row.id,
@@ -238,7 +228,8 @@ const finishReport=async(row)=>{
//console.log("workscheduling-finishReport-213",row)
let res=await WorkSchedulingApi.getNodePosition(params)
if(res==='end'){
- reportFinishRef.value.openDetail(row,"完工")
+ //reportFinishRef.value.openDetail(row,"完工")
+ WorkSchedulingApi.completeHandle(params)
}else{
message.alert("当前工序不是完工工序,不能进行完工操作!")
}
diff --git a/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue
index 00d2bdfb1..98a33615b 100644
--- a/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue
+++ b/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue
@@ -90,7 +90,7 @@ 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: 'ContainerManage' })
+defineOptions({ name: 'ContainerManageRequest' })
const message = useMessage() // 消息弹窗
const { t } = useI18n() // 国际化
@@ -110,7 +110,7 @@ const { tableObject, tableMethods } = useTable({
/**
*
*/
- if ( routeName.value == 'ReturnContainerManage') {
+ if ( routeName.value == 'ReturnContainerManageRequest') {
tableObject.params = {
type:'RETURN'
}
@@ -120,7 +120,7 @@ const { tableObject, tableMethods } = useTable({
}});
businessType.value = 'ReturnContainerManage'
importFileName.value = '器具返回申请'
-} else if ( routeName.value == 'MoveContainerManage') {
+} else if ( routeName.value == 'MoveContainerManageRequest') {
tableObject.params = {
type:'MOVE'
}
@@ -130,7 +130,7 @@ const { tableObject, tableMethods } = useTable({
}});
businessType.value = 'MoveContainerManage'
importFileName.value = '器具转移申请'
-} else if ( routeName.value == 'DeliverContainerManage') {
+} else if ( routeName.value == 'DeliverContainerManageRequest') {
tableObject.params = {
type: 'DELIVER',
}
@@ -141,7 +141,7 @@ const { tableObject, tableMethods } = useTable({
}});
businessType.value = 'DeliverContainerManage'
importFileName.value = '器具发运申请'
-} else if( routeName.value == 'ContainerManage'){
+} else if( routeName.value == 'ContainerManageRequest'){
businessType.value = 'ContainerManage'
importFileName.value = '器具管理申请'
}
diff --git a/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/containerRecordMain.data.ts b/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/containerRecordMain.data.ts
index f82f2ca4a..862df9340 100644
--- a/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/containerRecordMain.data.ts
+++ b/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/containerRecordMain.data.ts
@@ -63,7 +63,6 @@ export const ContainerRecordMain = useCrudSchemas(reactive([
label: '备注',
field: 'remark',
sort: 'custom',
- isSearch: true,
},
{
label: '部门',
@@ -166,7 +165,6 @@ export const ContainerRecordDetail = useCrudSchemas(reactive([
label: '主表ID',
field: 'masterId',
sort: 'custom',
- isSearch: true,
form: {
component: 'InputNumber',
value: 0
diff --git a/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue b/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue
index c527d1974..1c422db7b 100644
--- a/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue
+++ b/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue
@@ -90,38 +90,38 @@ const { tableObject, tableMethods } = useTable({
/**
*
*/
- if ( routeName.value == 'ReturnContainerManage') {
+ if ( routeName.value == 'ReturnContainerManageRecord') {
tableObject.params = {
type:'RETURN'
}
businessType.value = 'ReturnContainerManage'
importFileName.value = '器具返回记录'
-} else if ( routeName.value == 'MoveContainerManage') {
+} else if ( routeName.value == 'MoveContainerManageRecord') {
tableObject.params = {
type:'MOVE'
}
businessType.value = 'MoveContainerManage'
importFileName.value = '器具转移记录'
-} else if ( routeName.value == 'InitialContainerManage') {
+} else if ( routeName.value == 'InitialContainerManageRecord') {
tableObject.params = {
type:'INITIAL',
}
businessType.value = 'InitialContainerManage'
importFileName.value = '器具初始化记录'
}
-else if ( routeName.value == 'ScrapContainerManage') {
+else if ( routeName.value == 'ScrapContainerManageRecord') {
tableObject.params = {
type:'SCRAP'
}
businessType.value = 'ScrapContainerManage'
importFileName.value = '器具报废记录'
-} else if ( routeName.value == 'DeliverContainerManage') {
+} else if ( routeName.value == 'DeliverContainerManageRecord') {
tableObject.params = {
type: 'DELIVER',
}
businessType.value = 'DeliverContainerManage'
importFileName.value = '器具发运记录'
-} else if( routeName.value == 'ContainerManage'){
+} else if( routeName.value == 'ContainerManageRecord'){
businessType.value = 'ContainerManage'
importFileName.value = '器具管理记录'
}
diff --git a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue
index 42a6941c5..bed6ff8ad 100644
--- a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue
+++ b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue
@@ -67,7 +67,7 @@
:detailAllSchemas="ContainerDetailRequest.allSchemas"
:detailAllSchemasRules="ContainerDetailRequestRules"
:apiCreate="ContainerDetailRequestApi.createContainerDetailRequest"
- :apiUpdate="ContainerDetailRequestApi.updateContainerDetailRequest"
+ :apiUpdate="ContainerDetailRequestApi.createContainerDetailRequest"
:apiPage="ContainerDetailRequestApi.getContainerDetailRequestPage"
:apiDelete="ContainerDetailRequestApi.deleteContainerDetailRequest"
fromeWhere="ContainerDetailRequest"
@@ -90,7 +90,7 @@ 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: 'InitialContainerManage' })
+defineOptions({ name: 'InitialContainerManageRequest' })
const message = useMessage() // 消息弹窗
const { t } = useI18n() // 国际化
@@ -109,7 +109,7 @@ const { tableObject, tableMethods } = useTable({
/**
*
*/
- if ( routeName.value == 'InitialContainerManage') {
+ if ( routeName.value == 'InitialContainerManageRequest') {
tableObject.params = {
type:'INITIAL',
}
diff --git a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue
index 167c9a215..6f3211c54 100644
--- a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue
+++ b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue
@@ -90,7 +90,7 @@ 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: 'ScrapContainerManage' })
+defineOptions({ name: 'ScrapContainerManageRequest' })
const message = useMessage() // 消息弹窗
const { t } = useI18n() // 国际化
@@ -110,7 +110,7 @@ const { tableObject, tableMethods } = useTable({
/**
*
*/
- if ( routeName.value == 'ScrapContainerManage') {
+ if ( routeName.value == 'ScrapContainerManageRequest') {
tableObject.params = {
type:'SCRAP'
}