main
kkk-ops 4 weeks ago
parent 7bbdc791b8
commit 14891f8ddb

@ -84,4 +84,8 @@ export const PlanApi = {
updatePlanZjStatus: async (data: PlanVO) => {
return await request.put({ url: `/mes/plan/updatePlanZjStatus`, data })
},
// 根据状态查询生产计划详情
getPlanByStatus: async (status: number) => {
return await request.get({ url: `/mes/plan/getByStatus?status=` + status })
},
}

@ -114,8 +114,8 @@ export default {
small: '小'
},
login: {
welcome: '欢迎使用系统',
message: '开箱即用的中后台管理系统',
welcome: '欢迎使用必硕生产运营管理系统',
message: '必硕智能“纸”为绿色生活',
tenantname: '租户名称',
username: '用户名',
password: '密码',

@ -10,7 +10,7 @@
<el-form-item label="单号:" prop="feedingRecordCode">
<el-input disabled v-model="formData.feedingRecordCode" placeholder="保存自动生成单号" />
</el-form-item>
<el-form-item label="制浆线:" prop="feedingPipeline">
<!-- <el-form-item label="制浆线:" prop="feedingPipeline">
<el-tree-select
v-model="formData.feedingPipeline"
:data="organizationTree"
@ -19,7 +19,23 @@
default-expand-all
placeholder="请选择制浆线"
/>
</el-form-item>
</el-form-item> -->
<el-form-item label="生产计划" prop="planId">
<el-select
v-model="formData.planId"
@change="handleQuery"
clearable
filterable
placeholder="请选择"
>
<el-option
v-for="item in planList"
:key="item.id"
:label="item.code"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item prop="feedingType">
<template #label>
<span>
@ -91,6 +107,8 @@ import FeedingRecordDetailForm from './components/FeedingRecordDetailForm.vue'
import {ProductApi, ProductVO} from "@/api/erp/product/product";
import { OrganizationApi, OrganizationVO } from '@/api/mes/organization'
import { defaultProps, handleTree } from '@/utils/tree'
import {PlanApi, PlanVO} from "@/api/mes/plan";
const planList = ref<PlanVO[]>([]) //
/** 投料记录 表单 */
defineOptions({ name: 'FeedingRecordForm' })
@ -148,6 +166,7 @@ const open = async (type: string, id?: number) => {
productList.value = await ProductApi.getMesProductSimpleList()
//
await getOrganizationTree()
planList.value = await PlanApi.getPlanByStatus(1)
}
defineExpose({ open }) // open

@ -55,18 +55,18 @@
</el-form-item>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" label="操作" width="60">
<!-- <el-table-column align="center" fixed="right" label="操作" width="60">
<template #default="{ $index }">
<el-button @click="handleDelete($index)" link type="danger">
<Icon icon="ep:delete" />
</el-button>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
</el-form>
<el-row justify="center" class="mt-3">
<!-- <el-row justify="center" class="mt-3">
<el-button @click="handleAdd" round>+ 添加投料明细</el-button>
</el-row>
</el-row> -->
</template>
<script setup lang="ts">
import { FeedingRecordApi } from '@/api/mes/feedingrecord'

@ -71,12 +71,12 @@
<!-- 列表 -->
<ContentWrap>
<el-tabs v-model="activeName" @tab-click="handleTabClick">
<!-- <el-tabs v-model="activeName" @tab-click="handleTabClick">
<el-tab-pane label="所有" name="" />
<el-tab-pane label="下达" name="2" />
<el-tab-pane label="投料" name="3" />
<el-tab-pane label="完成" name="4" />
</el-tabs>
</el-tabs> -->
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<!-- 子表的列表 -->
@ -96,9 +96,9 @@
<dict-tag :type="DICT_TYPE.MES_PRODUCE_ITEM_REQUISITION" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="制浆线" align="center" prop="feedingPipelineName"/>
<el-table-column label="生产线" align="center" prop="feedingPipelineName"/>
<el-table-column label="领料人" align="center" prop="workerName"/>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column
label="计划下料"
align="center"
@ -123,7 +123,15 @@
width="180px"
sortable
/>
<el-table-column label="操作" align="center" fixed="right" width="350">
<el-button
link
type="primary"
v-hasPermi="['mes:item-requisition:update']"
>
领料
</el-button>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination

@ -237,6 +237,7 @@
link
type="primary"
v-hasPermi="['mes:plan:update']"
@click="openBaogongForm(scope.row.code, scope.row.id)"
v-if="scope.row.status === 2"
>
报工
@ -299,6 +300,9 @@
<!-- 工序派工弹出 -->
<TypePaigong ref="typePaiFormRef" @success="getList" />
<!-- 报工弹出 -->
<Baogong ref="baogongFormRef" @success="getList" />
</template>
<script setup lang="ts">
@ -443,14 +447,21 @@ const openTypePaiForm = (planCode: string, planId: number) => {
typePaiFormRef.value.open(planCode, planId)
}
/** 工序派工 */
const baogongFormRef = ref()
const openBaogongForm = (planCode: string, planId: number) => {
baogongFormRef.value.open(planCode, planId)
}
/** 开工 */
const handleStatus = async (planCode:string, id: number,
type:string, status:number, tip:string, isZj: number) => {
try {
if((isZj === 0 || isZj === null) && tip === "量产") {
message.alertError("请先完成检验")
return
}
// if((isZj === 0 || isZj === null) && tip === "") {
// // message.alertError("")
// //
// await message.confirm(""+planCode+""+tip+"?",planCode)
// }
//
await message.confirm("计划:"+planCode+"确定"+tip+"吗?",planCode)
//

Loading…
Cancel
Save