Commit 535a0621 authored by 张海景's avatar 张海景

update:修改生产排产

parent ee4aa605
...@@ -3,10 +3,10 @@ import request from '@/utils/request' ...@@ -3,10 +3,10 @@ import request from '@/utils/request'
// 查询工作单元列表 // 查询工作单元列表
export function listTeam(query) { export function listTeam(query) {
return request({ return request({
url: '/md/workunit/list', url: "/md/cal/workunit/unSelectList",
method: 'get', method: "get",
params: query params: query,
}) });
} }
// 查询工作单元列表 // 查询工作单元列表
......
<template> <template>
<div class="app-container" style="display: flex;"> <div class="app-container" style="display: flex;">
<div style="width: 600px; margin-right:10px;"> <div style="width: 400px; margin-right:10px;">
<el-form :model="queryWorkunitParams" ref="queryWorkunitForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryWorkunitParams" ref="queryWorkunitForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="车间" prop="workshopId"> <el-form-item label="车间" prop="workshopId">
<el-select v-model="queryWorkunitParams.workshopId" placeholder="请选择车间" clearable @change="handleChangeWorkshopId"> <el-select filterable v-model="queryWorkunitParams.workshopId" placeholder="请选择车间" clearable @change="handleChangeWorkshopId">
<el-option <el-option
v-for="dict in workshopList" v-for="dict in workshopList"
:key="dict.workshopId" :key="dict.workshopId"
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="工作中心" prop="workstationId"> <el-form-item label="工作中心" prop="workstationId">
<el-select v-model="queryWorkunitParams.workstationId" placeholder="请选择工作中心" clearable @change="handleChangeWorkStationId"> <el-select filterable v-model="queryWorkunitParams.workstationId" placeholder="请选择工作中心" clearable @change="handleChangeWorkStationId">
<el-option <el-option
v-for="dict in workstationList" v-for="dict in workstationList"
:key="dict.workstationId" :key="dict.workstationId"
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<div v-else style="text-align: center;margin-top:30px;color:#ccc;">暂无数据</div> <div v-else style="text-align: center;margin-top:30px;color:#ccc;">暂无数据</div>
</div> </div>
</div> </div>
<div style="width: calc(100% - 600px);"> <div style="width: calc(100% - 400px);">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="任务号" prop="taskCode"> <el-form-item label="任务号" prop="taskCode">
<el-input <el-input
...@@ -55,14 +55,14 @@ ...@@ -55,14 +55,14 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="工作单元名称" prop="workunitName"> <!-- <el-form-item label="工作单元名称" prop="workunitName">
<el-input <el-input
v-model="queryParams.workunitName" v-model="queryParams.workunitName"
placeholder="请输入工作单元名称" placeholder="请输入工作单元名称"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item> -->
<el-form-item label="状态" prop="statusArr"> <el-form-item label="状态" prop="statusArr">
<el-select v-model="queryParams.statusArr" multiple placeholder="请选择单据状态" clearable> <el-select v-model="queryParams.statusArr" multiple placeholder="请选择单据状态" clearable>
<el-option <el-option
...@@ -162,18 +162,41 @@ ...@@ -162,18 +162,41 @@
label="作业单元名称" label="作业单元名称"
align="center" align="center"
prop="workunitName" prop="workunitName"
width="140" width="200"
/> >
<template slot-scope="scope">
<el-input v-if="scope.row.status === 'UN_ASSIGN'|| scope.row.status === 'PREPARE'" v-model="scope.row.workunitName">
<el-button
slot="append"
icon="el-icon-search"
@click="currentData = scope.row, $refs['WorkunitSelect'].showFlag = true"
></el-button>
</el-input>
<span v-else>{{
scope.row.workunitName
}}</span>
</template>
</el-table-column>
<el-table-column <el-table-column
label="计划开始时间" label="计划开始时间"
align="center" align="center"
prop="scheduleStartDate" prop="scheduleStartDate"
width="180" width="230"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <el-date-picker
parseTime(scope.row.scheduleStartDate, "{y}-{m}-{d} {h}:{i}") v-if="scope.row.status === 'UN_ASSIGN'|| scope.row.status === 'PREPARE'"
v-model="scope.row.scheduleStartDate"
type="datetime"
style="width: 100%;"
value-format="yyyy-MM-dd hh:mm:ss"
format="yyyy-MM-dd hh:mm:ss"
placeholder="请选择计划开始时间"
>
</el-date-picker>
<span v-else>{{
parseTime(scope.row.scheduleStartDate)
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -181,15 +204,25 @@ ...@@ -181,15 +204,25 @@
label="计划结束时间" label="计划结束时间"
align="center" align="center"
prop="scheduleEndDate" prop="scheduleEndDate"
width="180" width="230"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <el-date-picker
parseTime(scope.row.scheduleEndDate, "{y}-{m}-{d} {h}:{i}") v-if="scope.row.status === 'UN_ASSIGN'|| scope.row.status === 'PREPARE'"
v-model="scope.row.scheduleEndDate"
type="datetime"
style="width: 100%;"
value-format="yyyy-MM-dd hh:mm:ss"
format="yyyy-MM-dd hh:mm:ss"
placeholder="请选择计划结束时间"
>
</el-date-picker>
<span v-else>{{
parseTime(scope.row.scheduleEndDate)
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <!-- <el-table-column
label="操作" label="操作"
width="150px" width="150px"
align="center" align="center"
...@@ -206,7 +239,7 @@ ...@@ -206,7 +239,7 @@
>编辑</el-button >编辑</el-button
> >
</template> </template>
</el-table-column> </el-table-column> -->
</el-table> </el-table>
<pagination <pagination
...@@ -374,6 +407,12 @@ ...@@ -374,6 +407,12 @@
</div> </div>
</el-dialog> </el-dialog>
<WorkuintSelect
ref="WorkunitSelect"
:workstationName="currentData.workstationName"
@onSelected="onWorkunitSelect"
/>
</div> </div>
</template> </template>
...@@ -390,12 +429,14 @@ import { ...@@ -390,12 +429,14 @@ import {
import BrandSelect from "@/components/TmTool/index.vue"; import BrandSelect from "@/components/TmTool/index.vue";
import OrderList from './orderList.vue' import OrderList from './orderList.vue'
import arrangCodeList from './arrangCodeList.vue' import arrangCodeList from './arrangCodeList.vue'
import WorkuintSelect from "@/components/workunitSelect/single.vue";
export default { export default {
components: {BrandSelect, OrderList, arrangCodeList}, components: {BrandSelect, OrderList, arrangCodeList, WorkuintSelect},
dicts: ['TASK_STATUS'], dicts: ['TASK_STATUS'],
name: "scheduleList", name: "scheduleList",
data() { data() {
return { return {
currentData: {},
currentTask: null, currentTask: null,
workshopList: [], workshopList: [],
workstationList: [], workstationList: [],
...@@ -433,7 +474,6 @@ export default { ...@@ -433,7 +474,6 @@ export default {
pageSize: 10, pageSize: 10,
taskCode: null, taskCode: null,
processName: null, processName: null,
workunitName: null,
statusArr: ['UN_ASSIGN'], statusArr: ['UN_ASSIGN'],
scheduleStartDate: null, scheduleStartDate: null,
scheduleEndDate: null, scheduleEndDate: null,
...@@ -490,6 +530,10 @@ export default { ...@@ -490,6 +530,10 @@ export default {
this.queryParams.workunitId = '' this.queryParams.workunitId = ''
this.getList() this.getList()
}, },
// 获取工作单元
onWorkunitSelect(row) {
console.log(45456, row);
},
async hanldeGettaskWorkunitList() { async hanldeGettaskWorkunitList() {
this.taskWorkunitList = [] this.taskWorkunitList = []
this.currentTask = null this.currentTask = null
...@@ -673,7 +717,7 @@ export default { ...@@ -673,7 +717,7 @@ export default {
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
.list-item{ .list-item{
width: 48%; width: 100%;
padding: 10px; padding: 10px;
border: 1px solid #eee; border: 1px solid #eee;
border-radius: 6px; border-radius: 6px;
......
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