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