|
|
|
|
@ -5,34 +5,33 @@
|
|
|
|
|
<!-- 已提交-->
|
|
|
|
|
<uni-section title="已提交" type="line" title-color="#18bc37"></uni-section>
|
|
|
|
|
<el-collapse accordion>
|
|
|
|
|
<el-collapse-item v-for="(item, index) in finishList" :name="item.id">
|
|
|
|
|
<el-collapse-item v-for="(item, index) in finishList" :name="item.id" @click="handleFinishClick(item.id,index)">
|
|
|
|
|
<template #title>
|
|
|
|
|
<el-icon><Tickets /></el-icon>
|
|
|
|
|
<el-text type="success">{{item.feedingTime}}</el-text>-
|
|
|
|
|
<el-text size="large">{{item.feedingRecordCode}}</el-text>
|
|
|
|
|
<el-text type="success">{{timestampToTime(item.feedingTime)}}</el-text>-
|
|
|
|
|
<el-text size="large">{{item.feedingRecordCode}}</el-text>-
|
|
|
|
|
<el-text type="warning">{{ findTextByValue(pipelineTypes, item.feedingPipeline)}}</el-text>
|
|
|
|
|
</template>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-text type="success">制浆线:{{ timestampToTime(item.planStartTime) }}</el-text>
|
|
|
|
|
<el-col :span="6">投料类型:
|
|
|
|
|
<el-text type="warning">{{findTextByValue(feedingTypes, item.feedingType) }}</el-text>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-text type="success">记录人:{{ item.userName }}</el-text>
|
|
|
|
|
<el-col :span="8">记录人:
|
|
|
|
|
<el-text type="success">{{ item.userName }}</el-text>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-text type="warning">计划结束:{{ timestampToTime(item.planEndTime) }}</el-text>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-text type="warning">投料类型:{{ item.feedingType }}</el-text>
|
|
|
|
|
<el-col :span="8" v-if="item.feedingType !=='org'">重量/kg:
|
|
|
|
|
<el-text>{{ item.weight }} </el-text>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="20">
|
|
|
|
|
<el-text>备注:{{ item.remark }}</el-text>
|
|
|
|
|
<el-row v-for="(item2, index2) in finishList[index].detailList">
|
|
|
|
|
<el-col :span="8">原料:
|
|
|
|
|
<el-text type="warning">{{item2.itemName}}</el-text>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
|
|
|
|
|
<el-col :span="8">数量:
|
|
|
|
|
<el-text type="success">{{ item2.weight }}</el-text>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">单位:
|
|
|
|
|
<el-text>{{item2.unitName }} </el-text>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-collapse-item>
|
|
|
|
|
@ -40,39 +39,39 @@
|
|
|
|
|
<!-- 草稿状态-->
|
|
|
|
|
<uni-section title="草稿" type="line" title-color="#f3a73f"></uni-section>
|
|
|
|
|
<el-collapse accordion>
|
|
|
|
|
<el-collapse-item v-for="(item, index) in draftList" :name="item.id">
|
|
|
|
|
<el-collapse-item v-for="(item, index) in draftList" :name="item.id" @click="handleDraftClick(item.id,index)">
|
|
|
|
|
<template #title>
|
|
|
|
|
<el-icon><Tickets /></el-icon>
|
|
|
|
|
<el-text type="success">{{item.feedingTime}}</el-text>-
|
|
|
|
|
<el-text size="large">{{item.feedingRecordCode}}</el-text>
|
|
|
|
|
<el-text type="success">{{timestampToTime(item.feedingTime)}}</el-text>-
|
|
|
|
|
<el-text size="large">{{item.feedingRecordCode}}</el-text>-
|
|
|
|
|
<el-text type="warning">{{ findTextByValue(pipelineTypes, item.feedingPipeline)}}</el-text>
|
|
|
|
|
</template>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-text type="success">制浆线:{{ timestampToTime(item.planStartTime) }}</el-text>
|
|
|
|
|
<el-col :span="6">投料类型:
|
|
|
|
|
<el-text type="warning">{{findTextByValue(feedingTypes, item.feedingType) }}</el-text>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-text type="success">记录人:{{ item.userName }}</el-text>
|
|
|
|
|
<el-col :span="8">记录人:
|
|
|
|
|
<el-text type="success">{{ item.userName }}</el-text>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col v-if="auth.hasPermi('mes:plan:update')" :span="4">
|
|
|
|
|
<el-button type="success" plain @click="updatePlan(item.id, item.code,'end')">提交</el-button>
|
|
|
|
|
<el-col :span="4" v-if="item.feedingType !=='org'">重量/kg:
|
|
|
|
|
<el-text>{{ item.weight }} </el-text>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-text type="warning">计划结束:{{ timestampToTime(item.planEndTime) }}</el-text>
|
|
|
|
|
<el-col :span="3">
|
|
|
|
|
<el-button type="info" @click="handleUpdate(item.id)">提交</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-text type="warning">投料类型:{{ item.feedingType }}</el-text>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col v-if="auth.hasPermi('mes:plan:update')" :span="4">
|
|
|
|
|
<el-button type="warning" plain @click="updatePlan(item.id,item.code,'pause')">删除</el-button>
|
|
|
|
|
<el-col :span="3">
|
|
|
|
|
<el-button type="danger" @click="handleDelete(item.id)">删除</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="20">
|
|
|
|
|
<el-text>备注:{{ item.remark }}</el-text>
|
|
|
|
|
<el-row v-for="(item2, index2) in draftList[index].detailList">
|
|
|
|
|
<el-col :span="8">原料:
|
|
|
|
|
<el-text type="warning">{{item2.itemName}}</el-text>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-col :span="8">数量:
|
|
|
|
|
<el-text type="success">{{ item2.weight }}</el-text>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">单位:
|
|
|
|
|
<el-text>{{item2.unitName }} </el-text>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-collapse-item>
|
|
|
|
|
@ -83,7 +82,8 @@
|
|
|
|
|
<script setup>
|
|
|
|
|
import {ref, onMounted} from 'vue';
|
|
|
|
|
import {getRecordList, updateStatus, deleteById, getDetailByRecordId} from "@/api/mes/record"
|
|
|
|
|
import {timestampToTime} from "@/utils/dateUtil";
|
|
|
|
|
import {timestampToTime,timestampToDateTime} from "@/utils/dateUtil";
|
|
|
|
|
import { pipelineTypes,feedingTypes, findTextByValue} from "@/api/system/dict/data";
|
|
|
|
|
import {Tickets} from "@element-plus/icons-vue";
|
|
|
|
|
import modal from "@/plugins/modal";
|
|
|
|
|
import tab from "@/plugins/tab";
|
|
|
|
|
@ -95,6 +95,7 @@ const finishList = ref([]);
|
|
|
|
|
//草稿状态的列表
|
|
|
|
|
const draftList = ref([]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
getList()
|
|
|
|
|
});
|
|
|
|
|
@ -107,6 +108,38 @@ function getList() {
|
|
|
|
|
draftList.value = response.data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
function handleFinishClick(id, index){
|
|
|
|
|
getDetailByRecordId(id).then(response => {
|
|
|
|
|
finishList.value[index].detailList = response.data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
function handleDraftClick(id, index){
|
|
|
|
|
getDetailByRecordId(id).then(response => {
|
|
|
|
|
draftList.value[index].detailList = response.data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
/** 提交 */
|
|
|
|
|
function handleUpdate(id){
|
|
|
|
|
showConfirm("确认提交投料记录吗?").then(res => {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
updateStatus(id, 2).then(response => {
|
|
|
|
|
modal.msgSuccess("操作成功")
|
|
|
|
|
getList()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
/** 提交 */
|
|
|
|
|
function handleDelete(id){
|
|
|
|
|
showConfirm("确认删除投料记录吗?").then(res => {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
deleteById(id).then(response => {
|
|
|
|
|
modal.msgSuccess("操作成功")
|
|
|
|
|
getList()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//看进度
|
|
|
|
|
function planProgress(plan){
|
|
|
|
|
|