Commit 436765a5 authored by 赵汉亭's avatar 赵汉亭

Merge branch 'dev' of http://git.local.topsunit.com/mes/mes-ui into dev

parents 326aec3f e14f772d
import request from '@/utils/request' import request from '@/utils/request'
// 查询节假日设置列表 // 查询工作日设置列表
export function listCalholiday(query) { export function listCalholiday(query) {
return request({ return request({
url: '/mes/cal/calholiday/list', url: "/mes/cal/calendar/list",
method: 'get', method: "get",
params: query params: query,
}) });
} }
// 查询上班数据工作单元列表 // 查询上班数据工作单元列表
......
...@@ -9,12 +9,12 @@ export function listTeam(query) { ...@@ -9,12 +9,12 @@ export function listTeam(query) {
}) })
} }
// 查询班组列表 // 查询工作单元列表
export function listAllTeam() { export function listAllTeam() {
return request({ return request({
url: '/mes/cal/team/listAll', url: "/md/cal/workunit/calWorkunitList",
method: 'get' method: "get",
}) });
} }
// 查询班组详细 // 查询班组详细
......
...@@ -9,6 +9,14 @@ export function listWorkorder(query) { ...@@ -9,6 +9,14 @@ export function listWorkorder(query) {
}) })
} }
// 查询补单工单工单编码接口
export function getMakeWorkorderCode(code) {
return request({
url: `/mes/pro/workorder/getChildWorkorderCode/${code}`,
method: 'get'
})
}
// 查询生产工单详细 // 查询生产工单详细
export function getWorkorder(workorderId) { export function getWorkorder(workorderId) {
return request({ return request({
...@@ -26,6 +34,15 @@ export function addWorkorder(data) { ...@@ -26,6 +34,15 @@ export function addWorkorder(data) {
}) })
} }
// 提交补单工单
export function makeSubmitWorkorder(data) {
return request({
url: "/mes/pro/workorder/addComplements",
method: "post",
data: data,
});
}
// 修改生产工单 // 修改生产工单
export function updateWorkorder(data) { export function updateWorkorder(data) {
return request({ return request({
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
:visible.sync="showFlag" :visible.sync="showFlag"
:modal="false" :modal="false"
width="80%" width="80%"
center
> >
<el-form <el-form
:model="queryParams" :model="queryParams"
...@@ -13,7 +12,7 @@ ...@@ -13,7 +12,7 @@
size="small" size="small"
:inline="true" :inline="true"
v-show="showSearch" v-show="showSearch"
label-width="68px" label-width="100px"
> >
<el-form-item label="工作单元编码" prop="workunitCode"> <el-form-item label="工作单元编码" prop="workunitCode">
<el-input <el-input
...@@ -57,6 +56,7 @@ ...@@ -57,6 +56,7 @@
:data="workunitList" :data="workunitList"
@current-change="handleCurrent" @current-change="handleCurrent"
@row-dblclick="handleRowDbClick" @row-dblclick="handleRowDbClick"
height="500px"
> >
<el-table-column width="55" align="center"> <el-table-column width="55" align="center">
<template v-slot="scope"> <template v-slot="scope">
...@@ -86,8 +86,8 @@ ...@@ -86,8 +86,8 @@
@pagination="getList" @pagination="getList"
/> />
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmSelect">确 定</el-button>
<el-button @click="showFlag = false">取 消</el-button> <el-button @click="showFlag = false">取 消</el-button>
<el-button type="primary" @click="confirmSelect">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
...@@ -140,6 +140,15 @@ export default { ...@@ -140,6 +140,15 @@ export default {
}, },
}; };
}, },
watch: {
showFlag: {
handler(newName) {
this.selectedWorkunitId = null
this.selectedRows = []
},
immediate: true
}
},
created() { created() {
this.getList(); this.getList();
this.queryParams.workstationName = this.workstationName; this.queryParams.workstationName = this.workstationName;
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-container> <el-container>
<!-- <el-aside width="200px"> <el-main>
<el-radio-group v-model="selectedType" class="x-fillitem el-group-list" @change="onSelected"> <el-calendar v-loading="loading" v-model="date">
<el-radio-button <template slot="dateCell" slot-scope="{date, data }">
v-for="dict in dict.type.mes_calendar_type" <div>
:key="dict.value" <el-row>
:label="dict.value" <el-col :span="6">
>{{dict.label}}</el-radio-button> <div class="solar">
</el-radio-group> {{ data.day.split('-')[2] }}
</el-aside> --> </div>
<el-main> </el-col>
<el-calendar v-loading="loading" v-model="date"> <el-col :span="12">
<template slot="dateCell" slot-scope="{date, data }"> <div class="lunar" :class="{ festival : isFestival(date, data) }">{{ solarDate2lunar(data.day) }}</div>
<div> </el-col>
<el-row> <el-col :span="6">
<el-col :span="6"> <el-tag v-if="workdayList.indexOf(data.day)> -1" effect="dark"></el-tag>
<div class="solar"> <el-tag v-else-if="holidayList.indexOf(data.day) > -1" effect="dark" type="success"></el-tag>
{{ data.day.split('-')[2] }} </el-col>
</div> </el-row>
</el-col> <el-row v-for="calendarDay in calendarDayList " :key="calendarDay.theDay">
<el-col :span="12"> <el-col :span="24" v-if="calendarDay.theDay == data.day && holidayList.indexOf(data.day) ==-1">
<div class="lunar" :class="{ festival : isFestival(date, data) }">{{ solarDate2lunar(data.day) }}</div> <div v-for="(teamShift,index) in calendarDay.calPlanWorkunitList" :key="index" class="grid-content">
</el-col> <el-button type="primary" v-if="teamShift.shiftName === '白班'" icon="el-icon-sunny">{{ teamShift.workunitName }}</el-button>
<el-col :span="6"> <el-button type="success" v-else-if="teamShift.shiftName === '中班'" icon="el-icon-sunrise">{{ teamShift.workunitName }}</el-button>
<el-tag v-if="holidayList.indexOf(data.day) ==-1" effect="dark"></el-tag> <el-button type="warning" v-else-if="teamShift.shiftName === '夜班'" icon="el-icon-moon">{{ teamShift.workunitName }}</el-button>
<el-tag v-else effect="dark" type="success"></el-tag> </div>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-for="calendarDay in calendarDayList " :key="calendarDay.theDay"> </div>
<el-col :span="24" v-if="calendarDay.theDay == data.day && holidayList.indexOf(data.day) ==-1"> </template>
<div v-for="teamShift in calendarDay.teamShifts" :key="teamShift.orderNum" class="grid-content"> </el-calendar>
<el-button v-if="teamShift.orderNum == 1" type="success" icon="el-icon-sunrise">{{ teamShift.teamName }}</el-button> </el-main>
<el-button v-if="teamShift.orderNum ==2 && calendarDay.shiftType=='SHIFT_THREE'" type="warning" icon="el-icon-sunny">{{ teamShift.teamName }}</el-button>
<el-button v-if="teamShift.orderNum ==2 && calendarDay.shiftType=='SHIFT_TWO'" type="info" icon="el-icon-moon">{{ teamShift.teamName }}</el-button>
<el-button v-if="teamShift.orderNum ==3 && calendarDay.shiftType=='SHIFT_THREE'" type="info" icon="el-icon-moon">{{ teamShift.teamName }}</el-button>
</div>
</el-col>
</el-row>
</div>
</template>
</el-calendar>
</el-main>
</el-container> </el-container>
</div> </div>
</template> </template>
...@@ -52,7 +42,6 @@ import { listCalendars } from "@/api/mes/cal/calendar"; ...@@ -52,7 +42,6 @@ import { listCalendars } from "@/api/mes/cal/calendar";
import calendar from '@/utils/calendar'; import calendar from '@/utils/calendar';
export default { export default {
name: 'CalendarTypeView', name: 'CalendarTypeView',
dicts:['mes_calendar_type'],
data(){ data(){
return { return {
// 遮罩层 // 遮罩层
...@@ -64,29 +53,26 @@ export default { ...@@ -64,29 +53,26 @@ export default {
calendarDayList:[ calendarDayList:[
], ],
teamShiftQueryParams:{ teamShiftQueryParams:{
queryType:'TYPE', isWork: 1
calendarType: null
}, },
queryParams: { queryParams: {
theDay: null, theDay: null,
holidayType: null, isWork: 1
startTime: null,
endTime: null,
}, },
} }
}, },
watch:{ watch:{
date:{ date:{
handler(newVal,oldVal){ handler(newVal,oldVal){
console.log(newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate()); console.log(newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate());
this.teamShiftQueryParams.date = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate(); this.teamShiftQueryParams.theDay = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate();
this.loading = true; this.queryParams.theDay = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate();
listCalendars(this.teamShiftQueryParams).then(response =>{ listCalendars(this.teamShiftQueryParams).then(response =>{
this.calendarDayList = response.data; this.calendarDayList = response.data;
this.loading = false; });
}); this.getList();
} }
} }
}, },
created() { created() {
this.getList(); this.getList();
...@@ -103,24 +89,14 @@ export default { ...@@ -103,24 +89,14 @@ export default {
response.data.forEach(theDay => { response.data.forEach(theDay => {
if(theDay.holidayType =='HOLIDAY'){ if(theDay.holidayType =='HOLIDAY'){
that.holidayList.push(theDay.theDay); that.holidayList.push(theDay.theDay);
}else{ } else if(theDay.holidayType == 'WORKDAY'){
that.workdayList.push(theDay.theDay); that.workdayList.push(theDay.theDay);
} }
}); });
this.loading = false; this.loading = false;
} }
}); });
}, },
//点击班组类型
onSelected(calType){
this.loading = true;
this.teamShiftQueryParams.calendarType = calType;
this.teamShiftQueryParams.date = this.date;
listCalendars(this.teamShiftQueryParams).then(response =>{
this.calendarDayList = response.data;
this.loading = false;
});
},
isFestival(slotDate, slotData) { isFestival(slotDate, slotData) {
let solarDayArr = slotData.day.split('-'); let solarDayArr = slotData.day.split('-');
let lunarDay = calendar.solar2lunar(solarDayArr[0], solarDayArr[1], solarDayArr[2]) let lunarDay = calendar.solar2lunar(solarDayArr[0], solarDayArr[1], solarDayArr[2])
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
<el-aside width="200px"> <el-aside width="200px">
<el-radio-group v-model="selectedType" class="x-fillitem el-group-list" @change="onSelected"> <el-radio-group v-model="selectedType" class="x-fillitem el-group-list" @change="onSelected">
<el-radio-button <el-radio-button
v-for="item in teamList" v-for="(item, index) in teamList"
:key="item.teamId" :key="index"
:label="item.teamId" :label="item"
>{{item.teamName}}</el-radio-button> >{{item}}</el-radio-button>
</el-radio-group> </el-radio-group>
</el-aside> </el-aside>
<el-main> <el-main>
...@@ -24,17 +24,16 @@ ...@@ -24,17 +24,16 @@
<div class="lunar" :class="{ festival : isFestival(date, data) }">{{ solarDate2lunar(data.day) }}</div> <div class="lunar" :class="{ festival : isFestival(date, data) }">{{ solarDate2lunar(data.day) }}</div>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-tag v-if="holidayList.indexOf(data.day) ==-1" effect="dark"></el-tag> <el-tag v-if="workdayList.indexOf(data.day)> -1" effect="dark"></el-tag>
<el-tag v-else effect="dark" type="success"></el-tag> <el-tag v-else-if="holidayList.indexOf(data.day) > -1" effect="dark" type="success"></el-tag>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-for="calendarDay in calendarDayList " :key="calendarDay.theDay"> <el-row v-for="calendarDay in calendarDayList " :key="calendarDay.theDay">
<el-col :span="24" v-if="calendarDay.theDay == data.day && holidayList.indexOf(data.day) ==-1"> <el-col :span="24" v-if="calendarDay.theDay == data.day && holidayList.indexOf(data.day) ==-1">
<div v-for="teamShift in calendarDay.teamShifts" :key="teamShift.orderNum" class="grid-content"> <div v-for="(teamShift,index) in calendarDay.calPlanWorkunitList" :key="index" class="grid-content">
<el-button v-if="teamShift.orderNum == 1" type="success" icon="el-icon-sunrise">{{ teamShift.teamName }}</el-button> <el-button type="primary" v-if="teamShift.shiftName === '白班'" icon="el-icon-sunny">{{ teamShift.workunitName }}</el-button>
<el-button v-if="teamShift.orderNum ==2 && calendarDay.shiftType=='SHIFT_THREE'" type="warning" icon="el-icon-sunny">{{ teamShift.teamName }}</el-button> <el-button type="success" v-else-if="teamShift.shiftName === '中班'" icon="el-icon-sunrise">{{ teamShift.workunitName }}</el-button>
<el-button v-if="teamShift.orderNum ==2 && calendarDay.shiftType=='SHIFT_TWO'" type="info" icon="el-icon-moon">{{ teamShift.teamName }}</el-button> <el-button type="warning" v-else-if="teamShift.shiftName === '夜班'" icon="el-icon-moon">{{ teamShift.workunitName }}</el-button>
<el-button v-if="teamShift.orderNum ==3 && calendarDay.shiftType=='SHIFT_THREE'" type="info" icon="el-icon-moon">{{ teamShift.teamName }}</el-button>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -53,7 +52,6 @@ import { listCalendars } from "@/api/mes/cal/calendar"; ...@@ -53,7 +52,6 @@ import { listCalendars } from "@/api/mes/cal/calendar";
import calendar from '@/utils/calendar'; import calendar from '@/utils/calendar';
export default { export default {
name: 'TeamView', name: 'TeamView',
dicts:['mes_calendar_type'],
data(){ data(){
return { return {
// 遮罩层 // 遮罩层
...@@ -66,26 +64,24 @@ export default { ...@@ -66,26 +64,24 @@ export default {
calendarDayList:[ calendarDayList:[
], ],
teamShiftQueryParams: { teamShiftQueryParams: {
queryType:'TEAM' isWork: 1
}, },
queryParams: { queryParams: {
theDay: null, theDay: null,
holidayType: null, isWork: 1
startTime: null, }
endTime: null,
},
} }
}, },
watch:{ watch:{
date:{ date:{
handler(newVal,oldVal){ handler(newVal,oldVal){
console.log(newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate()); console.log(newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate());
this.teamShiftQueryParams.date = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate(); this.teamShiftQueryParams.theDay = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate();
this.loading = true; this.queryParams.theDay = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate();
listCalendars(this.teamShiftQueryParams).then(response =>{ listCalendars(this.teamShiftQueryParams).then(response =>{
this.calendarDayList = response.data; this.calendarDayList = response.data;
this.loading = false; });
}); this.getList();
} }
} }
}, },
...@@ -110,8 +106,8 @@ export default { ...@@ -110,8 +106,8 @@ export default {
response.data.forEach(theDay => { response.data.forEach(theDay => {
if(theDay.holidayType =='HOLIDAY'){ if(theDay.holidayType =='HOLIDAY'){
that.holidayList.push(theDay.theDay); that.holidayList.push(theDay.theDay);
}else{ }else if(theDay.holidayType == 'WORKDAY'){
that.workdayList.push(theDay.theDay); that.workdayList.push(theDay.theDay);
} }
}); });
this.loading = false; this.loading = false;
...@@ -121,8 +117,8 @@ export default { ...@@ -121,8 +117,8 @@ export default {
//点击班组类型 //点击班组类型
onSelected(teamId){ onSelected(teamId){
this.loading = true; this.loading = true;
this.teamShiftQueryParams.teamId = teamId; this.teamShiftQueryParams.workunitName = teamId;
this.teamShiftQueryParams.date = this.date; this.teamShiftQueryParams.theDay = this.date.getFullYear()+'-'+(this.date.getMonth()+1)+'-'+this.date.getDate();
listCalendars(this.teamShiftQueryParams).then(response =>{ listCalendars(this.teamShiftQueryParams).then(response =>{
this.calendarDayList = response.data; this.calendarDayList = response.data;
this.loading = false; this.loading = false;
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-tag v-if="holidayList.indexOf(data.day) ==-1" effect="dark"></el-tag> <el-tag v-if="workdayList.indexOf(data.day)> -1" effect="dark"></el-tag>
<el-tag v-else effect="dark" type="success"></el-tag> <el-tag v-else-if="holidayList.indexOf(data.day) > -1" effect="dark" type="success"></el-tag>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
...@@ -46,11 +46,11 @@ ...@@ -46,11 +46,11 @@
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
</el-dialog> --> </el-dialog> -->
<el-dialog :title="title" :visible.sync="open" width="1300px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="1400px" append-to-body>
<item-index ref="itemIndex" v-if="open" optType="add" :theDay="theDay"></item-index> <item-index ref="itemIndex" v-if="open" optType="add" :theDay="theDay"></item-index>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" v-hasPermi="['mes:cal:calholiday:edit']" @click="submitForm(2)">放 假</el-button> <el-button type="primary" v-hasPermi="['mes:cal:calholiday:edit']" @click="submitForm(2)">放 假</el-button>
<el-button type="primary" v-hasPermi="['mes:cal:calholiday:edit']" @click="submitForm(1)">加 班</el-button> <!-- <el-button type="primary" v-hasPermi="['mes:cal:calholiday:edit']" @click="submitForm(1)">加 班</el-button> -->
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -79,9 +79,7 @@ export default { ...@@ -79,9 +79,7 @@ export default {
theDay: null, theDay: null,
queryParams: { queryParams: {
theDay: null, theDay: null,
holidayType: null, isWork: 1
startTime: null,
endTime: null,
}, },
// 表单校验 // 表单校验
rules: { rules: {
...@@ -91,6 +89,15 @@ export default { ...@@ -91,6 +89,15 @@ export default {
} }
} }
}, },
watch:{
date:{
handler(newVal,oldVal){
console.log(newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate());
this.queryParams.theDay = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate();
this.getList()
}
}
},
created() { created() {
this.getList(); this.getList();
}, },
...@@ -102,12 +109,11 @@ export default { ...@@ -102,12 +109,11 @@ export default {
this.workdayList =[]; this.workdayList =[];
let that = this; let that = this;
listCalholiday(this.queryParams).then(response => { listCalholiday(this.queryParams).then(response => {
debugger;
if(response.data !=null){ if(response.data !=null){
response.data.forEach(theDay => { response.data.forEach(theDay => {
if(theDay.holidayType =='HOLIDAY'){ if(theDay.holidayType =='HOLIDAY'){
that.holidayList.push(theDay.theDay); that.holidayList.push(theDay.theDay);
}else{ } else if(theDay.holidayType == 'WORKDAY'){
that.workdayList.push(theDay.theDay); that.workdayList.push(theDay.theDay);
} }
}); });
......
...@@ -10,20 +10,19 @@ ...@@ -10,20 +10,19 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="工作状态" prop="isWork"> <el-form-item label="班次" prop="shiftName">
<el-select <el-select
v-model="queryParams.isWork" v-model="queryParams.shiftName"
placeholder="请选择工作状态"
clearable clearable
placeholder="请选择班次"
> >
<el-option <el-option
label="工作" v-for="dict in dict.type.SHIFT_TYPE"
value="1" :key="dict.value"
/> :label="dict.label"
<el-option :value="dict.label"
label="休息" >
value="2" </el-option>
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -36,6 +35,7 @@ ...@@ -36,6 +35,7 @@
<el-table-column label="工作单元ID" align="center" prop="workunitId" /> <el-table-column label="工作单元ID" align="center" prop="workunitId" />
<el-table-column label="工作单元编码" align="center" prop="workunitCode" /> <el-table-column label="工作单元编码" align="center" prop="workunitCode" />
<el-table-column label="工作单元名称" align="center" prop="workunitName" /> <el-table-column label="工作单元名称" align="center" prop="workunitName" />
<el-table-column label="班次" align="center" prop="shiftName" />
<el-table-column label="工作状态" align="center" prop="isWork" > <el-table-column label="工作状态" align="center" prop="isWork" >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.isWork == '1'? '工作': '休息' }} {{ scope.row.isWork == '1'? '工作': '休息' }}
...@@ -59,10 +59,10 @@ ...@@ -59,10 +59,10 @@
</template> </template>
<script> <script>
import { listItem, getTmToolRequestItem, delTmToolRequestItem, addTmToolRequestItem, updateTmToolRequestItem } from "@/api/mes/cal/calholiday"; import { listItem } from "@/api/mes/cal/calholiday";
import { getTaskIdMaxProcessTool } from "@/api/mes/pro/protask";
export default { export default {
dicts: ['SHIFT_TYPE'],
name: "TmToolRequestItem", name: "TmToolRequestItem",
components: {}, components: {},
props:{ props:{
...@@ -92,8 +92,8 @@ export default { ...@@ -92,8 +92,8 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
workunitId: null, shiftName: null,
isWork: null, isWork: 1,
theDay: this.theDay theDay: this.theDay
}, },
// 表单参数 // 表单参数
...@@ -119,19 +119,6 @@ export default { ...@@ -119,19 +119,6 @@ export default {
created() { created() {
}, },
methods: { methods: {
onItemSelect(list){
// console.log(list, 'list')
this.addList = list.map(item => {
return {
itemId:item.itemId,
itemName:item.itemName,
allQuantity: 1,
nextMaintenPeriod: Number(this.$attrs.quantity)
}
})
this.tmToolRequestItemList = this.detailList.concat(this.addList)
this.$emit('sum')
},
/** 查询刀模板物料申请单列表 */ /** 查询刀模板物料申请单列表 */
getList() { getList() {
this.loading = true; this.loading = true;
...@@ -144,14 +131,14 @@ export default { ...@@ -144,14 +131,14 @@ export default {
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.open = false; this.open = false;
this.reset(); // this.reset();
},
// 表单重置
reset() {
this.form = {
toolRequestItemId: null, toolRequestId: null, itemId: null, allQuantity: null, nextMaintenPeriod: null, createBy: null, createTime: null, updateBy: null, updateTime: null };
this.resetForm("form");
}, },
// // 表单重置
// reset() {
// this.form = {
// toolRequestItemId: null, toolRequestId: null, itemId: null, allQuantity: null, nextMaintenPeriod: null, createBy: null, createTime: null, updateBy: null, updateTime: null };
// this.resetForm("form");
// },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
...@@ -166,58 +153,6 @@ export default { ...@@ -166,58 +153,6 @@ export default {
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.toolRequestItemId) this.ids = selection.map(item => item.toolRequestItemId)
this.selectRow = selection this.selectRow = selection
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加刀模板物料申请单";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const toolRequestItemId = row.toolRequestItemId || this.ids
getTmToolRequestItem(toolRequestItemId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改刀模板物料申请单";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.toolRequestItemId != null) {
updateTmToolRequestItem(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addTmToolRequestItem(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const toolRequestItemIds = row.toolRequestItemId || this.ids;
this.$modal.confirm('是否确认删除刀模板物料申请单编号为"' + toolRequestItemIds + '"的数据项?').then(function() {
return delTmToolRequestItem(toolRequestItemIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('tm/tmToolRequestItem/export', {
...this.queryParams
}, `tmToolRequestItem_${new Date().getTime()}.xlsx`)
} }
} }
}; };
......
...@@ -195,7 +195,8 @@ ...@@ -195,7 +195,8 @@
<el-row> <el-row>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="轮班方式"> <el-form-item label="轮班方式">
<el-radio-group v-model="form.shiftType"> <el-radio-group v-model="form.shiftType"
:disabled="optType === 'view'">
<el-radio <el-radio
v-for="dict in dict.type.mes_shift_type" v-for="dict in dict.type.mes_shift_type"
:key="dict.value" :key="dict.value"
...@@ -340,10 +341,8 @@ export default { ...@@ -340,10 +341,8 @@ export default {
calendarType:null, calendarType:null,
startDate: null, startDate: null,
endDate: null, endDate: null,
shiftType: 'SHIFT_TWO', shiftType: '',
shiftMethod: 'MONTH', status: "",
shiftCount: 1,
status: "PREPARE",
remark: null, remark: null,
saturday: null, saturday: null,
sunday: null, sunday: null,
...@@ -369,6 +368,10 @@ export default { ...@@ -369,6 +368,10 @@ export default {
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.form.shiftType = 'SHIFT_TWO'
this.form.status = "PREPARE"
this.form.saturday = 2
this.form.sunday = 2
this.open = true; this.open = true;
this.title = "添加排班计划"; this.title = "添加排班计划";
this.handleAutoGenChange() this.handleAutoGenChange()
......
...@@ -41,7 +41,19 @@ ...@@ -41,7 +41,19 @@
</el-col> --> </el-col> -->
<el-col :span="12"> <el-col :span="12">
<el-form-item label="班次名称" prop="shiftName"> <el-form-item label="班次名称" prop="shiftName">
<el-input v-model="form.shiftName" placeholder="请输入班次名称" /> <el-select
v-model="form.shiftName"
clearable
placeholder="请选择班次"
>
<el-option
v-for="dict in dict.type.SHIFT_TYPE"
:key="dict.value"
:label="dict.label"
:value="dict.label"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -110,6 +122,7 @@ import { listShift, listEditShift } from "@/api/mes/cal/shift"; ...@@ -110,6 +122,7 @@ import { listShift, listEditShift } from "@/api/mes/cal/shift";
export default { export default {
name: "Shift", name: "Shift",
dicts: ['SHIFT_TYPE'],
props: { props: {
shiftType: null, shiftType: null,
planId: null, planId: null,
...@@ -119,17 +132,23 @@ export default { ...@@ -119,17 +132,23 @@ export default {
// 根据名称筛选分类树 // 根据名称筛选分类树
shiftType: { shiftType: {
handler (newName, oldName) { handler (newName, oldName) {
if (newName&&this.optType === 'add'&& !this.plan) { console.log(newName, 'shiftType')
this.getList(); if (newName) {
console.log(889999) if (this.planId&&!this.editShiftType) {
this.getEditList();
} else if ((this.optType === 'view' || this.optType === 'edit')&&(this.editShiftType && this.editShiftType === newName)) {
this.getEditList();
} else {
this.getList();
}
} }
}, },
immediate: true immediate: true
}, },
planId: { planId: {
handler (newName, oldName) { handler (newName, oldName) {
if (newName&&this.optType === 'edit') { if (newName) {
this.getEditList(); this.editShiftType = this.shiftType
} }
}, },
immediate: true immediate: true
...@@ -137,6 +156,7 @@ export default { ...@@ -137,6 +156,7 @@ export default {
}, },
data() { data() {
return { return {
editShiftType: null,
currentIndex: null, currentIndex: null,
currentRow: {}, currentRow: {},
// 遮罩层 // 遮罩层
...@@ -182,6 +202,7 @@ export default { ...@@ -182,6 +202,7 @@ export default {
/** 查询计划班次列表 */ /** 查询计划班次列表 */
getList() { getList() {
this.loading = true; this.loading = true;
this.queryParams.shiftType = this.shiftType
listShift(this.queryParams).then(response => { listShift(this.queryParams).then(response => {
this.shiftList = response.data; this.shiftList = response.data;
this.loading = false; this.loading = false;
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
<el-table-column type="selection" width="55" align="center"/> <el-table-column type="selection" width="55" align="center"/>
<el-table-column label="生产工单编号" align="center" prop="arrangeId"/> <el-table-column label="生产工单编号" align="center" prop="arrangeId"/>
<el-table-column label="编排单号" align="center" prop="arrangeCode"/> <el-table-column label="编排单号" align="center" prop="arrangeCode"/>
<el-table-column label="序号" align="center" prop="arrangeSort"> <el-table-column label="序号" width="150" align="center" prop="arrangeSort">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number v-model="scope.row.arrangeSort" @change="handleChangeSort(scope.row)" :min="0" <el-input-number v-model="scope.row.arrangeSort" @change="handleChangeSort(scope.row)" :min="0"
style="width: 140px" style="width: 140px"
...@@ -145,8 +145,8 @@ ...@@ -145,8 +145,8 @@
/> />
<!-- 添加或修改生产编排单对话框 --> <!-- 添加或修改生产编排单对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="编排单号" prop="arrangeCode"> <el-form-item label="编排单号" prop="arrangeCode">
<el-input v-model="form.arrangeCode" placeholder="请输入编排单号"/> <el-input v-model="form.arrangeCode" placeholder="请输入编排单号"/>
</el-form-item> </el-form-item>
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<el-table-column type="selection" width="55" align="center"/> <el-table-column type="selection" width="55" align="center"/>
<el-table-column label="组合单号" align="center" prop="combinationCode"/> <el-table-column label="组合单号" align="center" prop="combinationCode"/>
<el-table-column label="序号" align="center" width prop="combinationSort"> <el-table-column label="序号" width="150" align="center" prop="combinationSort">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number v-model="scope.row.combinationSort" @change="handleChangeSort(scope.row)" :min="0" <el-input-number v-model="scope.row.combinationSort" @change="handleChangeSort(scope.row)" :min="0"
style="width: 140px" style="width: 140px"
...@@ -137,8 +137,8 @@ ...@@ -137,8 +137,8 @@
/> />
<!-- 添加或修改生产组合单对话框 --> <!-- 添加或修改生产组合单对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="组合单号" prop="combinationCode"> <el-form-item label="组合单号" prop="combinationCode">
<el-input v-model="form.combinationCode" placeholder="请输入组合单号"/> <el-input v-model="form.combinationCode" placeholder="请输入组合单号"/>
</el-form-item> </el-form-item>
...@@ -231,8 +231,10 @@ export default { ...@@ -231,8 +231,10 @@ export default {
combinationCode: { combinationCode: {
handler(newVal, oldVal) { handler(newVal, oldVal) {
this.$nextTick(() => { this.$nextTick(() => {
this.queryParams.combinationCode = newVal; if (this.combinationCode != '' && this.combinationCode != null) {
this.getList(); this.queryParams.combinationCode = this.combinationCode;
this.getList();
}
}) })
}, },
immediate: true, immediate: true,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<el-tab-pane v-for="item in combinationCodes"> <el-tab-pane v-for="item in combinationCodes">
<div slot="label" @click="changeCombination(item)">{{ item }} <div slot="label" @click="changeCombination(item)">{{ item }}
</div> </div>
<CombinationInfo ref="caonima" :combinationCode="combinationCode"></CombinationInfo> <CombinationInfo ref="combRef" :combinationCode="combinationCode"></CombinationInfo>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
...@@ -30,6 +30,7 @@ export default { ...@@ -30,6 +30,7 @@ export default {
combinationCodes: { combinationCodes: {
handler(newVal, oldVal) { handler(newVal, oldVal) {
this.$nextTick(() => { this.$nextTick(() => {
console.log(newVal)
this.combinationCode = this.combinationCodes[0] this.combinationCode = this.combinationCodes[0]
}) })
}, },
...@@ -42,7 +43,7 @@ export default { ...@@ -42,7 +43,7 @@ export default {
changeCombination(combinationCode) { changeCombination(combinationCode) {
this.$nextTick(() => { this.$nextTick(() => {
this.combinationCode = combinationCode this.combinationCode = combinationCode
this.$refs.caonima[0].changeCombination(combinationCode) this.$refs.combRef[0].changeCombination(combinationCode)
}) })
} }
} }
......
...@@ -117,12 +117,15 @@ ...@@ -117,12 +117,15 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="工作站" width="120" align="center" prop="workstationName" /> <el-table-column label="工作站" width="120" align="center" prop="workstationName" />
<el-table-column label="工作单元" width="120" align="center" prop="workunitName" />
<el-table-column label="生产工单编号" width="150" align="center" prop="workorderCode" /> <el-table-column label="生产工单编号" width="150" align="center" prop="workorderCode" />
<el-table-column label="产品物料编码" width="120" align="center" prop="itemCode" /> <el-table-column label="产品物料编码" width="120" align="center" prop="itemCode" />
<el-table-column label="产品物料名称" min-width="250" show-overflow-tooltip align="center" prop="itemName" /> <el-table-column label="产品物料名称" min-width="250" show-overflow-tooltip align="center" prop="itemName" />
<el-table-column label="规格型号" width="100" align="center" prop="specification" /> <el-table-column label="规格型号" width="100" align="center" prop="specification" />
<el-table-column label="报工数量" width="100" align="center" prop="quantityFeedback" /> <el-table-column label="指令号" width="120" align="center" prop="clientCmd" />
<el-table-column label="报工人" width="100" align="center" prop="nickName" /> <el-table-column label="标准SIZE" width="120" align="center" prop="standardSize" />
<el-table-column label="报工数量" width="100" align="center" prop="quantityFeedback" />
<el-table-column label="报工人" width="100" align="center" prop="createTime" />
<el-table-column label="报工时间" align="center" prop="feedbackTime" width="180"> <el-table-column label="报工时间" align="center" prop="feedbackTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.feedbackTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.feedbackTime, '{y}-{m}-{d}') }}</span>
...@@ -162,7 +165,7 @@ ...@@ -162,7 +165,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
...@@ -509,13 +512,13 @@ export default { ...@@ -509,13 +512,13 @@ export default {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open=false; this.open=false;
this.getList(); this.getList();
}); });
} else { } else {
addFeedback(this.form).then(response => { addFeedback(this.form).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open=false; this.open=false;
this.getList(); this.getList();
}); });
} }
} }
...@@ -621,7 +624,7 @@ export default { ...@@ -621,7 +624,7 @@ export default {
this.$refs.userSelect.showFlag = true; this.$refs.userSelect.showFlag = true;
}, },
//人员选择返回 //人员选择返回
onUserSelected(row){ onUserSelected(row){
this.form.nickName = row.nickName; this.form.nickName = row.nickName;
this.form.userName = row.userName; this.form.userName = row.userName;
}, },
...@@ -630,7 +633,7 @@ export default { ...@@ -630,7 +633,7 @@ export default {
this.$refs.user2Select.showFlag = true; this.$refs.user2Select.showFlag = true;
}, },
//人员选择返回 //人员选择返回
onUser2Selected(row){ onUser2Selected(row){
this.form.recordUser = row.userName; this.form.recordUser = row.userName;
this.form.recordNick = row.nickName; this.form.recordNick = row.nickName;
}, },
......
...@@ -116,6 +116,8 @@ ...@@ -116,6 +116,8 @@
<el-table-column label="产品编号" align="center" prop="itemCode" /> <el-table-column label="产品编号" align="center" prop="itemCode" />
<el-table-column label="产品名称" align="center" prop="itemName" /> <el-table-column label="产品名称" align="center" prop="itemName" />
<el-table-column label="生产工单" align="center" prop="workorderCode" /> <el-table-column label="生产工单" align="center" prop="workorderCode" />
<el-table-column label="工作单元" align="center" prop="workinitName" />
<el-table-column label="申请单号" align="center" prop="applyNo" />
<el-table-column label="领料类型" align="center" prop="applyType"> <el-table-column label="领料类型" align="center" prop="applyType">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.pro_requisition_type" :value="scope.row.applyType"/> <dict-tag :options="dict.type.pro_requisition_type" :value="scope.row.applyType"/>
...@@ -129,7 +131,9 @@ ...@@ -129,7 +131,9 @@
<span>{{ parseTime(scope.row.CreateTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.CreateTime, '{y}-{m}-{d}') }}</span>
</template> --> </template> -->
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="预开始时间" align="center" prop="startTime" width="180"/>
<el-table-column label="预结束时间" align="center" prop="endTime" width="180"/>
<el-table-column label="操作" width="100" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
......
...@@ -240,6 +240,7 @@ ...@@ -240,6 +240,7 @@
<script> <script>
export default { export default {
inject: ["mode"],
props: { props: {
bomList: { bomList: {
type: Array, type: Array,
...@@ -286,10 +287,22 @@ export default { ...@@ -286,10 +287,22 @@ export default {
watch: { watch: {
process: { process: {
handler(val) { handler(val) {
this.tableData = val.processItemList; if(this.mode !== 'make') {
this.tableData = val.processItemList;
}
}, },
deep: true, deep: true,
}, },
bomList: {
handler(newName) {
// console.log(newName, this.mode, 'modename')
if (this.mode === 'make') {
this.tableData = newName
}
},
immediate: true,
deep: true
}
}, },
methods: { methods: {
handleRowChange(row) { handleRowChange(row) {
......
<template> <template>
<div> <div>
<el-row :gutter="10" class="mb8" v-if="mode != 'info'"> <el-row :gutter="10" class="mb8" v-if="!(mode === 'info'|| mode === 'make' || mode === 'makeInfo')">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-if="mode != 'info'" v-if="!(mode === 'info'|| mode === 'make' || mode === 'makeInfo')"
label="操作" label="操作"
align="center" align="center"
width="120" width="120"
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-if="mode == 'info'" v-if="mode == 'info'|| mode == 'make'"
label="操作" label="操作"
align="center" align="center"
width="120" width="120"
......
<template> <template>
<div> <div>
<el-table :data="tableData"> <el-table :data="tableData">
<el-table-column label="序号" prop="processRef" align="center" /> <el-table-column label="序号" prop="orderNum" width="50" align="center" />
<el-table-column label="工序名称" prop="processName" align="center" /> <el-table-column label="工序名称" prop="processName" align="center" />
<el-table-column label="工序编码" prop="processCode" align="center" /> <el-table-column label="工序编码" prop="processCode" align="center" />
<el-table-column label="工作站" prop="workstationName" align="center" /> <el-table-column label="工作站" prop="workstationName" align="center" />
<el-table-column v-if="mode === 'make'" label="工作单元名称" width="200" prop="workunitName" align="center" >
<template slot-scope="scope">
<el-input readonly v-model="scope.row.workunitName">
<el-button
slot="append"
icon="el-icon-search"
@click="handleWorkUnitClick(scope.row)"
></el-button>
</el-input>
</template>
</el-table-column>
<el-table-column label="工作单元名称" v-if="mode === 'makeInfo'" prop="workunitName" align="center" />
<el-table-column label="标准工时" prop="stdWorkingTime" align="center" /> <el-table-column label="标准工时" prop="stdWorkingTime" align="center" />
<el-table-column label="换型时间" prop="lineBreakTime" align="center" /> <el-table-column label="换型时间" prop="lineBreakTime" align="center" />
<el-table-column label="工序总数量" prop="quantity" align="center" /> <el-table-column label="工序总数量" prop="quantity" align="center" />
...@@ -17,11 +29,37 @@ ...@@ -17,11 +29,37 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="标准文本代码" prop="x" align="center" /> <el-table-column label="标准文本代码" prop="x" align="center" />
<el-table-column width="220" v-if="mode === 'make'" label="开始时间" align="center" prop="startTime" >
<template slot-scope="scope">
<el-date-picker
v-model="scope.row.startTime"
type="datetime"
style="width:200px;"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择开始时间"
>
</el-date-picker>
</template>
</el-table-column>
<el-table-column width="180" label="开始时间" v-if="mode === 'makeInfo'" prop="startTime" align="center" />
<el-table-column width="220" v-if="mode === 'make'" label="结束时间" align="center" prop="endTime" >
<template slot-scope="scope">
<el-date-picker
v-model="scope.row.endTime"
type="datetime"
style="width:200px;"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择结束时间"
>
</el-date-picker>
</template>
</el-table-column>
<el-table-column width="180" label="结束时间" v-if="mode === 'makeInfo'" prop="endTime" align="center" />
<el-table-column <el-table-column
v-if="mode != 'info'" v-if="!(mode === 'info'|| mode === 'make' || mode === 'makeInfo')"
label="操作" label="操作"
align="center" align="center"
width="300" width="120"
fixed="right" fixed="right"
> >
<template slot-scope="{ row, $index }"> <template slot-scope="{ row, $index }">
...@@ -38,16 +76,16 @@ ...@@ -38,16 +76,16 @@
<el-button type="text" size="small" @click="openSetTool(row, $index)"> <el-button type="text" size="small" @click="openSetTool(row, $index)">
设置工装量具 设置工装量具
</el-button> </el-button>
<el-button type="text" size="small" @click="updateRow(row, $index)" <!-- <el-button type="text" size="small" @click="updateRow(row, $index)"
>修改</el-button >修改</el-button
> > -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-if="mode == 'info'" v-if="mode == 'info'|| mode == 'make'|| mode === 'makeInfo'"
label="操作" label="操作"
align="center" align="center"
width="300" width="120"
fixed="right" fixed="right"
> >
<template slot-scope="{ row, $index }"> <template slot-scope="{ row, $index }">
...@@ -81,6 +119,12 @@ ...@@ -81,6 +119,12 @@
<ProcessQcindex :process="currentRow" ref="ProcessQcindexRef" /> <ProcessQcindex :process="currentRow" ref="ProcessQcindexRef" />
<ProcessTool :process="currentRow" ref="ProcessToolRef" /> <ProcessTool :process="currentRow" ref="ProcessToolRef" />
<WorkuintSelect
ref="WorkunitSelect"
:workstationName="form.workstationName"
@onSelected="onWorkunitSelect"
/>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
:visible.sync="showFlag" :visible.sync="showFlag"
...@@ -136,6 +180,7 @@ ...@@ -136,6 +180,7 @@
</template> </template>
<script> <script>
import WorkuintSelect from "@/components/workunitSelect/single.vue";
import ProcessQcindex from "./ProcessQcindex.vue"; import ProcessQcindex from "./ProcessQcindex.vue";
import ProcessTool from "./ProcessTool.vue"; import ProcessTool from "./ProcessTool.vue";
import ItemBomSelect from "@/components/itemBomSelect/single.vue"; import ItemBomSelect from "@/components/itemBomSelect/single.vue";
...@@ -148,6 +193,7 @@ export default { ...@@ -148,6 +193,7 @@ export default {
WorkstationSelect, WorkstationSelect,
ProcessQcindex, ProcessQcindex,
ProcessTool, ProcessTool,
WorkuintSelect
}, },
inject: ["mode"], inject: ["mode"],
dicts: ["sap_control_code", "sys_yes_no"], dicts: ["sap_control_code", "sys_yes_no"],
...@@ -191,6 +237,10 @@ export default { ...@@ -191,6 +237,10 @@ export default {
return item; return item;
}); });
}, },
handleWorkUnitClick(row) {
this.currentRow = row
this.$refs['WorkunitSelect'].showFlag = true
},
/** 更新工序的物料信息 */ /** 更新工序的物料信息 */
updateItem(items) { updateItem(items) {
this.tableData[this.currentRowIndex].processItemList = items; this.tableData[this.currentRowIndex].processItemList = items;
...@@ -206,6 +256,15 @@ export default { ...@@ -206,6 +256,15 @@ export default {
this.currentRowIndex = idx; this.currentRowIndex = idx;
this.$refs["ProcessProdRef"].showProcessProd = true; this.$refs["ProcessProdRef"].showProcessProd = true;
}, },
// 获取工作单元
onWorkunitSelect(row) {
// console.log(45456, row);
if (row) {
this.currentRow.workunitName = row.workunitName
this.currentRow.workunitId = row.workunitId
this.currentRow.workunitCode = row.workunitCode
}
},
/**查看物料 */ /**查看物料 */
SearchProd(row, idx) { SearchProd(row, idx) {
this.currentRow = row; this.currentRow = row;
......
...@@ -490,7 +490,7 @@ ...@@ -490,7 +490,7 @@
<!-- </el-table-column> --> <!-- </el-table-column> -->
<el-table-column <el-table-column
v-if="mode != 'info'" v-if="!(mode === 'info'|| mode === 'make' || mode === 'makeInfo')"
label="操作" label="操作"
align="center" align="center"
width="120" width="120"
......
...@@ -129,6 +129,19 @@ ...@@ -129,6 +129,19 @@
</el-button </el-button
> >
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleMake"
v-hasPermi="['mes:pro:workorder:make']"
>补单工单
</el-button
>
</el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
...@@ -302,6 +315,14 @@ ...@@ -302,6 +315,14 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="工单类型" align="center" prop="workorderType">
<template slot-scope="scope">
<dict-tag
:options="dict.type.mes_workorder_type"
:value="scope.row.workorderType"
/>
</template>
</el-table-column>
<el-table-column <el-table-column
label="组合单号" label="组合单号"
width="180" width="180"
...@@ -321,17 +342,28 @@ ...@@ -321,17 +342,28 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="编排单号" label="编排单号"
align="center"
width="100px" width="100px"
align="center"
prop="arrangeCode" prop="arrangeCode"
/> :show-overflow-tooltip="true"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="showArrangDetail(scope.row.arrangeCode)"
>{{ scope.row.arrangeCode }}
</el-button
>
</template>
</el-table-column>
<el-table-column <el-table-column
label="订单编号" label="订单编号"
width="140" width="140"
align="center" align="center"
prop="sourceCode" prop="sourceCode"
/> />
<el-table-column <el-table-column
label="产品编号" label="产品编号"
width="120" width="120"
align="center" align="center"
...@@ -759,13 +791,13 @@ ...@@ -759,13 +791,13 @@
</el-dialog> </el-dialog>
<el-dialog title="组合单明细" v-if="combOpen" :visible.sync="combOpen" width="800px" append-to-body <el-dialog title="组合单明细" v-if="combOpen" :visible.sync="combOpen" width="1000px" append-to-body
@close="getList"> @close="getList">
<CombinationInfos :combinationCodes="combinationCodes"></CombinationInfos> <CombinationInfos :combinationCodes="combinationCodes"></CombinationInfos>
</el-dialog> </el-dialog>
<el-dialog title="编排单明细" v-if="arrangeOpen" :visible.sync="arrangeOpen" width="800px" append-to-body <el-dialog title="编排单明细" v-if="arrangeOpen" :visible.sync="arrangeOpen" width="1000px" append-to-body
@close="getList"> @close="getList">
<ArrangeInfo :arrange-code="arrangeCode"></ArrangeInfo> <ArrangeInfo :arrange-code="arrangeCode"></ArrangeInfo>
</el-dialog> </el-dialog>
...@@ -924,7 +956,10 @@ export default { ...@@ -924,7 +956,10 @@ export default {
this.combOpen = true; this.combOpen = true;
this.combinationCodes = [combinationCode]; this.combinationCodes = [combinationCode];
}, },
showArrangDetail(arrangeCode) {
this.arrangeOpen = true;
this.arrangeCode = arrangeCode;
},
async handleArrange() { async handleArrange() {
let params = [] let params = []
this.selectedRows.forEach((item, index) => { this.selectedRows.forEach((item, index) => {
...@@ -972,9 +1007,13 @@ export default { ...@@ -972,9 +1007,13 @@ export default {
}); });
batchAddCombination(params).then(response => { batchAddCombination(params).then(response => {
this.combOpen = true if (response && response.length > 0) {
this.combinationCodes = response this.combOpen = true
this.$modal.msgSuccess("新增组合单成功"); this.combinationCodes = response
this.$modal.msgSuccess("新增组合单成功");
} else {
this.$modal.msgError("新增组合单失败,组合规则不同,不允许组合!");
}
this.getList(); this.getList();
}); });
} }
...@@ -1131,10 +1170,17 @@ export default { ...@@ -1131,10 +1170,17 @@ export default {
}, },
// 查询明细按钮操作 // 查询明细按钮操作
handleView(row) { handleView(row) {
this.reset(); if(row.workorderType === 'complements') {
this.getTreeselect(); this.reset();
const workorderId = row.workorderId || this.ids; this.getTreeselect();
this.$router.push("/mes/pro/workorder/info?workorderId=" + workorderId); const workorderId = row.workorderId || this.ids;
this.$router.push("/mes/pro/workorder/makeInfo?workorderId=" + workorderId);
} else {
this.reset();
this.getTreeselect();
const workorderId = row.workorderId || this.ids;
this.$router.push("/mes/pro/workorder/info?workorderId=" + workorderId);
}
// this.reset(); // this.reset();
// this.getTreeselect(); // this.getTreeselect();
...@@ -1178,6 +1224,15 @@ export default { ...@@ -1178,6 +1224,15 @@ export default {
// this.optType="edit"; // this.optType="edit";
// }); // });
}, },
handleMake() {
if (this.selectedRows[0].workorderType == 'product' && this.selectedRows[0].status == "SCHEDULED"
) {
const workorderId = this.selectedRows[0].workorderId
this.$router.push("/mes/pro/workorder/make?workorderId=" + workorderId);
} else {
this.$message.warning('请选择工单类型为生产订单、工单状态为已排产的数据')
}
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="报表名称" prop="name"> <el-form-item label="模版名称" prop="name">
<el-input <el-input
v-model="queryParams.name" v-model="queryParams.name"
placeholder="请输入报表名称" placeholder="请输入模版名称"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
...@@ -63,8 +63,15 @@ ...@@ -63,8 +63,15 @@
<el-table v-loading="loading" :data="listData" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="listData" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="报表名称" align="center" prop="name" /> <el-table-column label="模版名称" align="center" prop="name" />
<el-table-column label="模板类型" align="center" prop="reportType" /> <el-table-column label="模版类型" align="center" prop="reportType" >
<template slot-scope="scope">
<dict-tag
:options="dict.type.sys_report_type"
:value="scope.row.reportType"
/>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180"> <el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
...@@ -114,11 +121,11 @@ ...@@ -114,11 +121,11 @@
<!-- 添加或修改报表管理对话框 --> <!-- 添加或修改报表管理对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="报表名称" prop="name"> <el-form-item label="模版名称" prop="name">
<el-input v-model="form.name" placeholder="请输入报表名称" /> <el-input v-model="form.name" placeholder="请输入模版名称" />
</el-form-item> </el-form-item>
<el-form-item label="报表类型" prop="reportType"> <el-form-item label="模版类型" prop="reportType">
<el-select style="width:100%;" v-model="form.reportType" placeholder="请选择模类型"> <el-select style="width:100%;" v-model="form.reportType" placeholder="请选择模类型">
<el-option <el-option
v-for="dict in dict.type.sys_report_type" v-for="dict in dict.type.sys_report_type"
:key="dict.value" :key="dict.value"
...@@ -159,7 +166,7 @@ export default { ...@@ -159,7 +166,7 @@ export default {
showSearch: true, showSearch: true,
// 总条数 // 总条数
total: 0, total: 0,
// 报表管理表格数据 // 模版管理表格数据
listData: [], listData: [],
// 弹出层标题 // 弹出层标题
title: "", title: "",
...@@ -179,7 +186,7 @@ export default { ...@@ -179,7 +186,7 @@ export default {
// 表单校验 // 表单校验
rules: { rules: {
name: [ name: [
{ required: true, message: "报表名称不能为空", trigger: "blur" } { required: true, message: "模版名称不能为空", trigger: "blur" }
], ],
} }
}; };
...@@ -188,7 +195,7 @@ export default { ...@@ -188,7 +195,7 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
/** 查询报表管理列表 */ /** 查询模版管理列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listReport({...this.queryParams, isPrintTemplate:1}).then(response => { listReport({...this.queryParams, isPrintTemplate:1}).then(response => {
...@@ -233,9 +240,9 @@ export default { ...@@ -233,9 +240,9 @@ export default {
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加报表管理"; this.title = "添加模版管理";
}, },
/** 报表预览 */ /** 模版预览 */
handleDesigner(name) { handleDesigner(name) {
window.open(`${this.website.reportUrl}/designer?_u=mysql:`+name) window.open(`${this.website.reportUrl}/designer?_u=mysql:`+name)
}, },
...@@ -246,7 +253,7 @@ export default { ...@@ -246,7 +253,7 @@ export default {
getReport(id).then(response => { getReport(id).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改报表管理"; this.title = "修改模版管理";
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
...@@ -272,7 +279,7 @@ export default { ...@@ -272,7 +279,7 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除报表管理编号为"' + ids + '"的数据项?').then(function() { this.$modal.confirm('是否确认删除模版管理编号为"' + ids + '"的数据项?').then(function() {
return delReport(ids); return delReport(ids);
}).then(() => { }).then(() => {
this.getList(); this.getList();
...@@ -283,7 +290,7 @@ export default { ...@@ -283,7 +290,7 @@ export default {
handleExport() { handleExport() {
this.download('ureport/export', { this.download('ureport/export', {
...this.queryParams ...this.queryParams
}, `报表模块_${new Date().getTime()}.xlsx`) }, `模版模块_${new Date().getTime()}.xlsx`)
} }
} }
}; };
......
...@@ -431,9 +431,6 @@ export default { ...@@ -431,9 +431,6 @@ export default {
created() { created() {
this.getList(); this.getList();
this.getTypeList(); this.getTypeList();
if (this.mode == "add") {
this.gCode();
}
}, },
methods: { methods: {
/** 查询工装夹具清单列表 */ /** 查询工装夹具清单列表 */
...@@ -483,7 +480,6 @@ export default { ...@@ -483,7 +480,6 @@ export default {
}; };
this.autoGenFlag = false; this.autoGenFlag = false;
this.resetForm("form"); this.resetForm("form");
this.gCode();
}, },
onToolTypeChanged(){ onToolTypeChanged(){
var types = this.toolTypeOptions.filter((item) =>{ var types = this.toolTypeOptions.filter((item) =>{
...@@ -527,6 +523,7 @@ export default { ...@@ -527,6 +523,7 @@ export default {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加工装夹具清单"; this.title = "添加工装夹具清单";
this.gCode();
this.optType = "add"; this.optType = "add";
}, },
// 查询明细按钮操作 // 查询明细按钮操作
......
...@@ -132,12 +132,12 @@ ...@@ -132,12 +132,12 @@
</el-table-column> </el-table-column>
<el-table-column label="预计开始时间" align="center" prop="startTime" width="180"> <el-table-column label="预计开始时间" align="center" prop="startTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.startTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="预计结束时间" align="center" prop="endTime" width="180"> <el-table-column label="预计结束时间" align="center" prop="endTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.endTime,) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="总数量" align="center" prop="requestNum" /> <el-table-column label="总数量" align="center" prop="requestNum" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment