Commit c1bc8590 authored by zhuli's avatar zhuli

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

# Conflicts:
#	src/views/mes/pro/workorder/indexApply.vue
parents 0cfc574a 2f13f3a5
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
"axios": "0.24.0", "axios": "0.24.0",
"clipboard": "2.0.8", "clipboard": "2.0.8",
"core-js": "^3.21.1", "core-js": "^3.21.1",
"dayjs": "^1.11.11",
"dhtmlx-gantt": "^7.1.11", "dhtmlx-gantt": "^7.1.11",
"echarts": "4.9.0", "echarts": "4.9.0",
"element-ui": "2.15.6", "element-ui": "2.15.6",
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<el-table v-loading="loading" :data="qctemplateList" @current-change="handleCurrent" @row-dblclick="handleRowDbClick"> <el-table v-loading="loading" :data="qctemplateList" @current-change="handleCurrent" @row-dblclick="handleRowDbClick">
<el-table-column width="50" align="center" > <el-table-column width="50" align="center" >
<template v-slot="scope"> <template v-slot="scope">
<el-radio v-model="selectedIndexId" :label="scope.row.templateId" @change="handleRowChange(scope.row)">{{""}}</el-radio> <el-radio v-model="selectedIndexId" :label="scope.row.id" @change="handleRowChange(scope.row)">{{""}}</el-radio>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检测模板编号" align="center" prop="templateCode" > <el-table-column label="检测模板编号" align="center" prop="templateCode" >
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
</el-table-column> </el-table-column>
<el-table-column label="工作中心名称" align="center" prop="workstationName" /> <el-table-column label="工作中心名称" align="center" prop="workstationName" />
<el-table-column label="工作中心地点" align="center" prop="workstationAddress" /> <el-table-column label="工作中心地点" align="center" prop="workstationAddress" />
<el-table-column label="工作单元编码" align="center" prop="workunitCode" />
<el-table-column label="所在车间名称" align="center" prop="workshopName" /> <el-table-column label="所在车间名称" align="center" prop="workshopName" />
<el-table-column label="所属工序" align="center" prop="processName" /> <el-table-column label="所属工序" align="center" prop="processName" />
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
> >
<el-menu-item <el-menu-item
:index="resolvePath(onlyOneChild.path)" :index="resolvePath(onlyOneChild.path)"
@click="clickitem(onlyOneChild)"
:class="{ 'submenu-title-noDropdown': !isNest }" :class="{ 'submenu-title-noDropdown': !isNest }"
> >
<item <item
...@@ -55,7 +56,7 @@ import Item from "./Item"; ...@@ -55,7 +56,7 @@ import Item from "./Item";
import AppLink from "./Link"; import AppLink from "./Link";
import FixiOSBug from "./FixiOSBug"; import FixiOSBug from "./FixiOSBug";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import router from '@/router';
export default { export default {
name: "SidebarItem", name: "SidebarItem",
components: { Item, AppLink }, components: { Item, AppLink },
...@@ -83,6 +84,23 @@ export default { ...@@ -83,6 +84,23 @@ export default {
return {}; return {};
}, },
methods: { methods: {
clickitem (obj) {
// this.$tab.refreshPage(item)
const { path, query, matched } = router.currentRoute;
if (obj === undefined) {
matched.forEach((m) => {
if (m.components && m.components.default && m.components.default.name) {
if (!['Layout', 'ParentView'].includes(m.components.default.name)) {
obj = { name: m.components.default.name, path: path, query: query };
}
}
});
}
this.$store.dispatch('tagsView/delCachedView', obj).then(() => {
const { path, query } = obj
this.$router.replace({ path: '/' + path, query })
})
},
hasOneShowingChild(children = [], parent) { hasOneShowingChild(children = [], parent) {
if (!children) { if (!children) {
children = []; children = [];
......
...@@ -23,7 +23,7 @@ import './permission' // permission control ...@@ -23,7 +23,7 @@ import './permission' // permission control
import { getDicts } from "@/api/system/dict/data"; import { getDicts } from "@/api/system/dict/data";
import { getConfigKey } from "@/api/system/config"; import { getConfigKey } from "@/api/system/config";
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree, formatMoney } from "@/utils/ruoyi"; import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree, formatMoney } from "@/utils/ruoyi";
window.store = store
import TipLabel from '@/components/TipLabel/index.vue' import TipLabel from '@/components/TipLabel/index.vue'
import PageTitle from '@/components/Page/PageTitle.vue' import PageTitle from '@/components/Page/PageTitle.vue'
......
...@@ -41,6 +41,7 @@ const permission = { ...@@ -41,6 +41,7 @@ const permission = {
const asyncRoutes = filterDynamicRoutes(dynamicRoutes); const asyncRoutes = filterDynamicRoutes(dynamicRoutes);
rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true }) rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
router.addRoutes(asyncRoutes); router.addRoutes(asyncRoutes);
console.log('rewriteRoutes', rewriteRoutes)
commit('SET_ROUTES', rewriteRoutes) commit('SET_ROUTES', rewriteRoutes)
commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes)) commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes))
commit('SET_DEFAULT_ROUTES', sidebarRoutes) commit('SET_DEFAULT_ROUTES', sidebarRoutes)
...@@ -67,7 +68,7 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) { ...@@ -67,7 +68,7 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
} else if (route.component === 'InnerLink') { } else if (route.component === 'InnerLink') {
route.component = InnerLink route.component = InnerLink
} else { } else {
route.component = loadView(route.component) route.component = loadView(route.component, route.name)
} }
} }
if (route.children != null && route.children && route.children.length) { if (route.children != null && route.children && route.children.length) {
...@@ -120,13 +121,39 @@ export function filterDynamicRoutes(routes) { ...@@ -120,13 +121,39 @@ export function filterDynamicRoutes(routes) {
}) })
return res return res
} }
export function createCustomComponent (name, component) {
return {
name,
data () {
return { component: null }
},
async created () {
if (component instanceof Promise) {
try {
const module = await component
this.component = module?.default
} catch (error) {
console.error(`can not resolve component ${name}, error:`, error)
}
export const loadView = (view) => { return
}
this.component = component
},
render (h) {
return this.component ? h(this.component) : null
},
}
}
export const loadView = (view, name) => {
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
return (resolve) => require([`@/views/${view}`], resolve) return createCustomComponent(name, (resolve) => require([`@/views/${view}`], resolve))
// return (resolve) => {
// return require([`@/views/${view}`], resolve)
// }
} else { } else {
// 使用 import 实现生产环境的路由懒加载 // 使用 import 实现生产环境的路由懒加载
return (resolve) => require([`@/views/${view}`], resolve) return createCustomComponent(name, (resolve) => require([`@/views/${view}`], resolve))
} }
} }
......
This diff is collapsed.
<template>
<el-dialog title="编排单号"
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="80%"
center
>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="编排单号" prop="arrangeCode">
<el-input
v-model="queryParams.arrangeCode"
placeholder="请输入编排单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="protaskList" @current-change="handleCurrent" @row-dblclick="handleRowDbClick">
<el-table-column width="55" align="center" >
<template v-slot="scope">
<el-radio v-model="selectedTaskId" :label="scope.row.arrangeId" @change="handleRowChange(scope.row)">{{""}}</el-radio>
</template>
</el-table-column>
<el-table-column label="编排单号" align="center" prop="arrangeCode" :show-overflow-tooltip="true"/>
<el-table-column label="生产工单" align="center" prop="workorderCode" :show-overflow-tooltip="true"/>
<el-table-column label="分组号" align="center" prop="groupCode" :show-overflow-tooltip="true"/>
<el-table-column v-if="btnShow" label="操作" align="center" width="100px" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['mes:pro:protask:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['mes:pro:protask:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmSelect">确 定</el-button>
<el-button @click="showFlag=false">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import { listArrange } from "@/api/mes/pro/arrange";
// import {listAllProcess} from "@/api/mes/pro/process";
export default {
name: "ProtaskSelect",
props: {
workorderId: null,
workorderCode: null,
processId: null,
processCode: null,
workstationId: null,
workstationCode: null,
arrangeCode: null,
btnShow: false
},
watch: {
arrangeCode(v){
if(v) {
this.queryParams.arrangeCode = v;
this.getList();
}
}
},
data() {
return {
showFlag: false,
selectedTaskId: undefined,
selectedRow: undefined,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 生产任务表格数据
protaskList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
arrangeCode: null,
taskName: null,
workorderId: this.workorderId,
workorderCode: null,
workorderName: null,
workstationId: null,
workstationCode: null,
workstationName: null,
routeId: null,
processId: this.processId,
processCode: null,
processName: null,
itemId: null,
itemCode: null,
itemName: null,
specification: null,
unitOfMeasure: null,
quantity: null,
quantityProduced: null,
quantityChanged: null,
clientId: null,
clientCode: null,
clientName: null,
clientNick: null,
startTime: null,
duration: null,
endTime: null,
colorCode: null,
requestDate: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
workstationId: [
{ required: true, message: "工作中心不能为空", trigger: "blur" }
],
quantity: [
{ required: true, message: "排产数量不能为空", trigger: "blur" }
],
startTime: [
{ required: true, message: "请选择开始生产日期",trigger: "blur"}
],
duration: [
{ required: true, message: "清输入估算的生产用时",trigger: "blur"}
]
}
};
},
created() {
this.getList();
},
methods: {
/** 查询生产任务列表 */
getList() {
this.loading = true;
listArrange(this.queryParams).then(response => {
this.protaskList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
arrangeCode: null,
taskName: null,
workorderId: null,
workorderCode: null,
workorderName: null,
workstationId: null,
workstationCode: null,
workstationName: null,
routeId: null,
processId: null,
processCode: null,
processName: null,
itemId: null,
itemCode: null,
itemName: null,
specification: null,
unitOfMeasure: null,
quantity: null,
quantityProduced: null,
quantityChanged: null,
clientId: null,
clientCode: null,
clientName: null,
clientNick: null,
startTime: null,
duration: null,
endTime: null,
colorCode: null,
requestDate: null,
}
this.resetForm("queryForm");
this.handleQuery();
},
handleCurrent(row){
if(row){
this.selectedRow = row;
}
},
//行双击选中
handleRowDbClick(row){
if(row){
this.selectedRow = row;
this.$emit('onSelected',this.selectedRow);
this.showFlag = false;
}
},
// 单选选中数据
handleRowChange(row) {
debugger;
if(row){
this.selectedRow = row;
}
},
//确定选中
confirmSelect(){
if(this.selectedTaskId ==null || this.selectedTaskId==0){
this.$notify({
title:'提示',
type:'warning',
message: '请至少选择一条数据!'
});
return;
}
this.$emit('onSelected',this.selectedRow);
this.showFlag = false;
}
}
};
</script>
\ No newline at end of file
<template>
<el-dialog title="工作单元选择" v-if="showFlag" :visible.sync="showFlag" :modal="false" width="80%" center>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
<el-row>
<el-form-item label="工作中心编号" label-width="120" prop="workunitCode">
<el-input v-model="queryParams.workunitCode" placeholder="请输入工作单元编号" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="工作中心名称" label-width="120" prop="workunitName">
<el-input v-model="queryParams.workunitName" placeholder="请输入工作单元名称" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="工作中心编码" label-width="120" prop="workstationCode">
<el-input v-model="queryParams.workstationCode" placeholder="请输入工作中心编号" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-row>
<el-row>
<el-col :span="24"> </el-col>
</el-row>
</el-form>
<el-table v-loading="loading" :data="workstationList" @current-change="handleCurrent"
@row-dblclick="handleRowDbClick">
<el-table-column width="55" align="center">
<template v-slot="scope">
<el-radio v-model="selectedWorkstationId" :label="scope.row.workunitId"
@change="handleRowChange(scope.row)">{{ "" }}</el-radio>
</template>
</el-table-column>
<el-table-column label="工作单元编码" align="center" prop="workunitCode" />
<el-table-column label="工作单元名称" align="center" prop="workunitName" />
<el-table-column label="工作中心编号" align="center" prop="workstationCode">
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmSelect">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import { listWorkunits} from "@/api/mes/md/workunit";
// import { listAllProcess } from "@/api/mes/pro/process";
import { listAllWorkshop } from "@/api/mes/md/workshop";
export default {
name: "WorkstationSelect",
dicts: ["sys_yes_no"],
data() {
return {
// workstationId: this.workstationId,
showFlag: false,
// 遮罩层
loading: true,
// 选中数组
selectedWorkstationId: undefined,
selectedRows: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 工作中心表格数据
workstationList: [],
//车间选项
workshopOptions: [],
//工序选项
processOptions: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
workstationCode: null,
workstationName: null,
workstationAddress: null,
workshopId: null,
workshopCode: null,
workshopName: null,
workstationId: null,
processCode: null,
processName: null,
enableFlag: null,
stdWorkingTime: null,
},
// 表单参数
form: {},
};
},
props: {
workstationId: {
type: Number | undefined,
default: undefined,
}, //外部传入的工序过滤条件
},
created() {
this.getList();
this.getWorkshops();
this.getProcess();
},
watch: {
workstationId: {
handler(val) {
this.queryParams.workstationId = val;
this.getList();
},
immediate: true,
},
},
methods: {
/** 查询工作中心列表 */
getList() {
this.loading = true;
listWorkunits(this.queryParams).then((response) => {
console.log(this.queryParams);
this.workstationList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//查询车间信息
getWorkshops() {
listAllWorkshop().then((response) => {
this.workshopOptions = response.data;
});
},
// //查询工序信息
// getProcess() {
// listAllProcess().then((response) => {
// this.processOptions = response.data;
// });
// },
// 取消按钮
cancel() {
this.showFlag=false;
this.resetQuery();
},
// 表单重置
reset() {
this.form = {
workstationId: null,
workstationCode: null,
workstationName: null,
workstationAddress: null,
workshopId: null,
workshopCode: null,
workshopName: null,
workstationId: null,
processCode: null,
processName: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
stdWorkingTime: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
workstationId: null,
workstationCode: null,
workstationName: null,
workstationAddress: null,
workshopId: null,
workshopCode: null,
workshopName: null,
workstationId: null,
processCode: null,
processName: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
stdWorkingTime: null,
};
this.resetForm("queryForm");
this.handleQuery();
},
handleCurrent(row) {
if (row) {
this.selectedRows = row;
}
},
// 单选选中数据
handleRowChange(row) {
if (row) {
this.selectedRows = row;
}
},
//双击选中
handleRowDbClick(row) {
if (row) {
this.selectedRows = row;
this.$emit("onSelected", this.selectedRows);
this.showFlag = false;
}
},
//确定选中
confirmSelect() {
if (
this.selectedWorkstationId == null ||
this.selectedWorkstationId == 0
) {
this.$notify({
title: "提示",
type: "warning",
message: "请至少选择一条数据!",
});
return;
}
this.$emit("onSelected", this.selectedRows);
this.showFlag = false;
},
},
};
</script>
\ No newline at end of file
This diff is collapsed.
...@@ -363,7 +363,12 @@ export default { ...@@ -363,7 +363,12 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const arrangeIds = row.arrangeId || this.ids; const arrangeIds = row.arrangeId || this.ids;
this.$modal.confirm('是否确认删除生产工单编号为"' + row.workorderCode + '"的数据项?').then(function () { let workorderCode = row.workorderCode
if(!row || !workorderCode) {
const finditem = this.arrangeList.find(v=>v.arrangeId === this.ids[0])
if(finditem) workorderCode = finditem.workorderCode
}
this.$modal.confirm('是否确认删除生产工单编号为"' + workorderCode + '"的数据项?').then(function () {
return delArrange(arrangeIds); return delArrange(arrangeIds);
}).then(() => { }).then(() => {
this.getList(); this.getList();
......
...@@ -129,7 +129,6 @@ ...@@ -129,7 +129,6 @@
<!-- >删除--> <!-- >删除-->
<!-- </el-button>--> <!-- </el-button>-->
<!-- </template>--> <!-- </template>-->
</el-table-column>
</el-table> </el-table>
<pagination <pagination
......
...@@ -286,10 +286,15 @@ ...@@ -286,10 +286,15 @@
<el-input readonly="readonly" v-model="form.quantityFeedback" /> <el-input readonly="readonly" v-model="form.quantityFeedback" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <!-- <el-col :span="8">
<el-form-item label="待检测数量" prop="quantityUncheck"> <el-form-item label="待检测数量" prop="quantityUncheck">
<el-input-number :min="0" @change="handleQuantityChanged" v-model="form.quantityUncheck" placeholder="请输入待检测数量" /> <el-input-number :min="0" @change="handleQuantityChanged" v-model="form.quantityUncheck" placeholder="请输入待检测数量" />
</el-form-item> </el-form-item>
</el-col> -->
<el-col :span="8">
<el-form-item label="加工工时" prop="machineTime">
<el-input-number :min="0" v-model="form.machineTime" placeholder="请输入加工工时" />
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
...@@ -347,6 +352,7 @@ import WorkstationSelect from "@/components/workstationSelect/simpletableSingle. ...@@ -347,6 +352,7 @@ import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.
import UserSingleSelect from "@/components/userSelect/single.vue" import UserSingleSelect from "@/components/userSelect/single.vue"
import ProtaskSelect from "@/components/TaskSelect/taskSelectSingle.vue" import ProtaskSelect from "@/components/TaskSelect/taskSelectSingle.vue"
import assistProcessSelect from "./components/assistProcessSelect.vue" import assistProcessSelect from "./components/assistProcessSelect.vue"
import dayjs from 'dayjs'
export default { export default {
name: "Feedback", name: "Feedback",
components: {WorkorderSelect,WorkstationSelect,UserSingleSelect,ProtaskSelect,assistProcessSelect}, components: {WorkorderSelect,WorkstationSelect,UserSingleSelect,ProtaskSelect,assistProcessSelect},
...@@ -396,10 +402,11 @@ export default { ...@@ -396,10 +402,11 @@ export default {
quantityFeedback: null, quantityFeedback: null,
quantityQualified: null, quantityQualified: null,
quantityUnquanlified: null, quantityUnquanlified: null,
feedbackTime: null,
userName: null, userName: null,
nickName: null, nickName: null,
feedbackChannel: null, feedbackChannel: null,
feedbackTime: null, machineTime: 0,
recordUser: null, recordUser: null,
recordNick: null, recordNick: null,
status: null, status: null,
...@@ -488,14 +495,14 @@ export default { ...@@ -488,14 +495,14 @@ export default {
assistProcessCode: null, assistProcessCode: null,
closeType: 0, closeType: 0,
quantity: 0, quantity: 0,
quantityUncheck: 0, machineTime: 0,
quantityFeedback: 0, quantityFeedback: 0,
quantityQualified: 0, quantityQualified: 0,
quantityUnquanlified: 0, quantityUnquanlified: 0,
userName: null, userName: null,
nickName: null, nickName: null,
feedbackChannel: null, feedbackChannel: null,
feedbackTime: new Date(), feedbackTime: dayjs().format('YYYY-MM-DD'),
recordUser: null, recordUser: null,
recordNick: null, recordNick: null,
status: "PREPARE", status: "PREPARE",
...@@ -512,7 +519,7 @@ export default { ...@@ -512,7 +519,7 @@ export default {
this.resetForm("form"); this.resetForm("form");
}, },
handleQuantityChanged(){ handleQuantityChanged(){
this.form.quantityFeedback = this.form.quantityQualified + this.form.quantityUnquanlified + this.form.quantityUncheck; this.form.quantityFeedback = this.form.quantityQualified + this.form.quantityUnquanlified;
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<el-table-column label="工序名称" prop="processName" align="center" /> <el-table-column label="工序名称" prop="processName" align="center" />
<el-table-column label="工作中心" prop="workstationName" align="center" /> <el-table-column label="工作中心" prop="workstationName" 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 <el-table-column
label="工时单位" label="工时单位"
prop="stdWorkingTimeUom" prop="stdWorkingTimeUom"
......
...@@ -214,6 +214,7 @@ export default { ...@@ -214,6 +214,7 @@ export default {
return { return {
loading: false, loading: false,
bomList: [], bomList: [],
productionSolutionId: null,
// 表单参数 // 表单参数
form: { form: {
productionSolutionId: "", productionSolutionId: "",
...@@ -265,9 +266,16 @@ export default { ...@@ -265,9 +266,16 @@ export default {
}, },
}, },
created() { created() {
if (this.$route.query && this.$route.query.productionSolutionId && this.productionSolutionId !== this.$route.query.productionSolutionId) {
this.productionSolutionId = this.$route.query.productionSolutionId
}
this.getFormInfo(); this.getFormInfo();
if (this.mode == "apply") { },
this.gCode(); activated() {
if (this.$route.query && this.$route.query.productionSolutionId && this.productionSolutionId !== this.$route.query.productionSolutionId) {
this.resetForm()
this.productionSolutionId = this.$route.query.productionSolutionId
this.getFormInfo();
} }
}, },
methods: { methods: {
...@@ -292,12 +300,6 @@ export default { ...@@ -292,12 +300,6 @@ export default {
}); });
} }
}, },
/** 生成编码 */
gCode() {
genCode("PROTOTYPE_REQUEST_CODE").then((response) => {
this.form.prototypeRequestCode = response;
});
},
/** 点击tab 获取bom的数据,将参数传递给后面的组件 */ /** 点击tab 获取bom的数据,将参数传递给后面的组件 */
tabClick(val) { tabClick(val) {
if (val.index != 0) { if (val.index != 0) {
...@@ -397,7 +399,6 @@ export default { ...@@ -397,7 +399,6 @@ export default {
this.$refs["ProogingBomRef"].resetState(); this.$refs["ProogingBomRef"].resetState();
this.$refs["ProogingProcessRef"].resetState(); this.$refs["ProogingProcessRef"].resetState();
this.$refs["ProogingSpecificationSheetRef"].resetState(); this.$refs["ProogingSpecificationSheetRef"].resetState();
this.gCode();
}, },
}, },
}; };
......
...@@ -232,18 +232,18 @@ ...@@ -232,18 +232,18 @@
</el-button> </el-button>
</el-col> </el-col>
<!-- <el-col :span="1.5">--> <!-- <el-col :span="1.5">
<!-- <el-button--> <el-button
<!-- type="warning"--> type="warning"
<!-- plain--> plain
<!-- icon="el-icon-plus"--> icon="el-icon-plus"
<!-- size="mini"--> size="mini"
<!-- :disabled="multiple"--> :disabled="multiple"
<!-- @click="handleDofinish"--> @click="handleDofinish"
<!-- v-hasPermi="['mes:pro:workorder:dofinish']"--> v-hasPermi="['mes:pro:workorder:dofinish']"
<!-- >生成任务单--> >生成任务单
<!-- </el-button>--> </el-button>
<!-- </el-col>--> </el-col> -->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
...@@ -402,6 +402,16 @@ ...@@ -402,6 +402,16 @@
prop="productName" prop="productName"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column
label="生产版本"
width="200"
align="center"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
{{(scope.row.groupKey ? scope.row.groupKey: '') + (scope.row.groupCounter ? scope.row.groupCounter: '')}}
</template>
</el-table-column>
<el-table-column <el-table-column
label="规格型号" label="规格型号"
align="center" align="center"
...@@ -1007,6 +1017,9 @@ export default { ...@@ -1007,6 +1017,9 @@ export default {
}, },
}; };
}, },
activated () {
this.getList();
},
created() { created() {
this.getList(); this.getList();
}, },
...@@ -1100,13 +1113,13 @@ export default { ...@@ -1100,13 +1113,13 @@ export default {
}); });
batchAddCombination(params).then(response => { batchAddCombination(params).then(response => {
if (response && response.length > 0) { // if (response && response.length > 0) {
this.combOpen = true this.combOpen = true
this.combinationCodes = response this.combinationCodes = response
this.$modal.msgSuccess("新增组合单成功"); this.$modal.msgSuccess("新增组合单成功");
} else { // } else {
this.$modal.msgError("新增组合单失败,组合规则不同,不允许组合!"); // this.$modal.msgError("新增组合单失败,组合规则不同,不允许组合!");
} // }
this.getList(); this.getList();
}); });
} }
...@@ -1313,6 +1326,7 @@ export default { ...@@ -1313,6 +1326,7 @@ export default {
this.reset(); this.reset();
const workorderId = row.workorderId || this.ids; const workorderId = row.workorderId || this.ids;
console.log('workorderId', workorderId, this.ids)
this.$router.push("/mes/pro/workorder/edit?workorderId=" + workorderId); this.$router.push("/mes/pro/workorder/edit?workorderId=" + workorderId);
// this.reset(); // this.reset();
...@@ -1326,7 +1340,7 @@ export default { ...@@ -1326,7 +1340,7 @@ export default {
// this.title = "修改生产工单"; // this.title = "修改生产工单";
// this.optType="edit"; // this.optType="edit";
// }); // });
},// },
handleMake() { handleMake() {
let status = this.selectedRows[0].status; let status = this.selectedRows[0].status;
if (this.selectedRows[0].workorderType == 'product' && (status == "SCHEDULED"||status == "PRODUCING"||status == "ISSUED") if (this.selectedRows[0].workorderType == 'product' && (status == "SCHEDULED"||status == "PRODUCING"||status == "ISSUED")
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12"> <el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="申请单编码" prop="workorderCode"> <el-form-item label="单编码" prop="workorderCode">
<el-input <el-input
disabled disabled
v-model="form.workorderCode" v-model="form.workorderCode"
...@@ -64,9 +64,9 @@ ...@@ -64,9 +64,9 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12"> <el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="生产版本" prop="productionSolutionCode"> <el-form-item label="生产版本" prop="group">
<el-input <el-input
v-model="form.productionSolutionCode" v-model="form.group"
readonly readonly
:disabled="mode == 'make'" :disabled="mode == 'make'"
placeholder="请选择工艺路线" placeholder="请选择工艺路线"
...@@ -81,8 +81,8 @@ ...@@ -81,8 +81,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12"> <el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="产品编号" prop="sapItemCode"> <el-form-item label="产品编号" prop="productCode">
<el-input :disabled="mode == 'make'" v-model="form.sapItemCode" placeholder="请选择产品"> <el-input :disabled="mode == 'make'" v-model="form.productCode" placeholder="请选择产品">
<el-button <el-button
slot="append" slot="append"
v-if="!(mode === 'make' || mode === 'makeInfo')" v-if="!(mode === 'make' || mode === 'makeInfo')"
...@@ -131,10 +131,10 @@ ...@@ -131,10 +131,10 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12"> <el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="开始日期" prop="requestDate"> <el-form-item label="开始日期" prop="startDate">
<el-date-picker <el-date-picker
clearable clearable
v-model="form.requestDate" v-model="form.startDate"
type="date" type="date"
:disabled="mode == 'make'" :disabled="mode == 'make'"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
...@@ -144,10 +144,10 @@ ...@@ -144,10 +144,10 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12"> <el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item label="需求日期" prop="startDate"> <el-form-item label="需求日期" prop="requestDate">
<el-date-picker <el-date-picker
clearable clearable
v-model="form.startDate" v-model="form.requestDate"
type="date" type="date"
:disabled="mode == 'make'" :disabled="mode == 'make'"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
...@@ -357,7 +357,7 @@ export default { ...@@ -357,7 +357,7 @@ export default {
return { return {
loading: false, loading: false,
optType: undefined, optType: undefined,
workorderId: null,
bomList: [], bomList: [],
// 表单参数 // 表单参数
form: { form: {
...@@ -365,10 +365,13 @@ export default { ...@@ -365,10 +365,13 @@ export default {
workorderCode: null, workorderCode: null,
workorderName: null, workorderName: null,
routeName: null, routeName: null,
groupKey: null,
groupCounter: null,
workorderType: "product", workorderType: "product",
orderSource: null, orderSource: null,
sourceCode: null, sourceCode: null,
productId: null, productId: null,
startDate: null,
productCode: null, productCode: null,
productName: null, productName: null,
productSpc: null, productSpc: null,
...@@ -401,6 +404,7 @@ export default { ...@@ -401,6 +404,7 @@ export default {
packNum: null, packNum: null,
productionSolutionId: null, productionSolutionId: null,
productionSolutionCode: null, productionSolutionCode: null,
group: null,
productionSolutionName: null, productionSolutionName: null,
}, },
// 表单校验 // 表单校验
...@@ -454,7 +458,24 @@ export default { ...@@ -454,7 +458,24 @@ export default {
return titles[this.mode]; return titles[this.mode];
}, },
}, },
activated() {
// if(!this.$route.query.workorderId) {
// this.resetForm()
// }
if (this.$route.query && this.$route.query.workorderId && this.workorderId !== this.$route.query.workorderId) {
this.resetForm()
this.workorderId = this.$route.query.workorderId
this.getFormInfo();
if (this.mode == "apply") {
this.gCode();
}
}
},
created() { created() {
if (this.$route.query && this.$route.query.workorderId && this.workorderId !== this.$route.query.workorderId) {
this.workorderId = this.$route.query.workorderId
}
this.getFormInfo(); this.getFormInfo();
if (this.mode == "apply") { if (this.mode == "apply") {
this.gCode(); this.gCode();
...@@ -469,7 +490,6 @@ export default { ...@@ -469,7 +490,6 @@ export default {
this.bomList = [] this.bomList = []
const bomList = this.currentData.bomList.map((item,index) => { const bomList = this.currentData.bomList.map((item,index) => {
// console.log(item, 'items') // console.log(item, 'items')
console.log(this.currentData.quantity, 'this.currentData.quantity')
let quantity = parseInt(this.form.quantity*item.quantity*100/this.currentData.quantity) let quantity = parseInt(this.form.quantity*item.quantity*100/this.currentData.quantity)
// console.log(quantity, 'quantity') // console.log(quantity, 'quantity')
return { return {
...@@ -477,7 +497,6 @@ export default { ...@@ -477,7 +497,6 @@ export default {
quantity: quantity/100 quantity: quantity/100
} }
}) })
console.log(bomList, 'bomList')
this.bomList = bomList this.bomList = bomList
this.$refs["ProogingBomRef"].tableData = bomList this.$refs["ProogingBomRef"].tableData = bomList
} }
...@@ -507,7 +526,6 @@ export default { ...@@ -507,7 +526,6 @@ export default {
}); });
} else if(this.mode === 'make') { } else if(this.mode === 'make') {
getMakeWorkorderCode(this.form.parentCode).then(res => { getMakeWorkorderCode(this.form.parentCode).then(res => {
console.log(res, 88899)
if (res.code === 200) { if (res.code === 200) {
this.form.workorderCode = res.data.code this.form.workorderCode = res.data.code
} }
...@@ -577,7 +595,9 @@ export default { ...@@ -577,7 +595,9 @@ export default {
this.loading = true; this.loading = true;
getWorkorder(id) getWorkorder(id)
.then(({ data }) => { .then(({ data }) => {
Object.assign(this.form, data); Object.assign(this.form, data);
this.form.group = `${this.form.groupKey ? this.form.groupKey: ''}${this.form.groupCounter ? this.form.groupCounter: ''}`
this.currentData = {} this.currentData = {}
if (this.mode == 'make') { if (this.mode == 'make') {
this.currentData = data this.currentData = data
...@@ -630,11 +650,14 @@ export default { ...@@ -630,11 +650,14 @@ export default {
//物料选择弹出框 //物料选择弹出框
onRoutesProcessSelect(row) { onRoutesProcessSelect(row) {
console.log(row, 'rows444') console.log('row44', row)
if (row != undefined && row != null) { if (row != undefined && row != null) {
this.form.productionSolutionId = row.productionSolutionId; this.form.productionSolutionId = row.productionSolutionId;
this.form.productionSolutionCode = row.productionSolutionCode; this.form.productionSolutionCode = row.productionSolutionCode;
this.form.group = `${row.groupKey ? row.groupKey: ''}${row.groupCounter ? row.groupCounter: ''}`
this.form.productCode = row.itemCode; this.form.productCode = row.itemCode;
this.form.groupCounter = row.groupCounter;
this.form.groupKey = row.groupKey;
this.form.productName = row.itemName; this.form.productName = row.itemName;
const params = { const params = {
pageNum: 1, pageNum: 1,
...@@ -659,6 +682,7 @@ export default { ...@@ -659,6 +682,7 @@ export default {
saleList, saleList,
sizeList, sizeList,
}; };
delete params.group
this.$refs.form.validate( valid => { this.$refs.form.validate( valid => {
if (valid) { if (valid) {
this.loading = true; this.loading = true;
...@@ -731,6 +755,8 @@ export default { ...@@ -731,6 +755,8 @@ export default {
quantityChanged: null, quantityChanged: null,
quantityScheduled: null, quantityScheduled: null,
clientId: null, clientId: null,
groupKey: null,
groupCounter: null,
clientCode: null, clientCode: null,
clientName: null, clientName: null,
vendorId: null, vendorId: null,
...@@ -743,10 +769,12 @@ export default { ...@@ -743,10 +769,12 @@ export default {
createBy: null, createBy: null,
createTime: null, createTime: null,
updateBy: null, updateBy: null,
startDate: null,
updateTime: null, updateTime: null,
packType: null, packType: null,
packUnitOfMeasure: null, packUnitOfMeasure: null,
lossIndividuallyWrap: null, lossIndividuallyWrap: null,
group: null,
packNum: null, packNum: null,
}; };
this.$refs["ProogingBomRef"].resetState(); this.$refs["ProogingBomRef"].resetState();
......
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
import { listArea, getArea, delArea, addArea, updateArea } from "@/api/mes/wm/area"; import { listArea, getArea, delArea, addArea, updateArea } from "@/api/mes/wm/area";
import {genCode} from "@/api/system/autocode/rule" import {genCode} from "@/api/system/autocode/rule"
export default { export default {
name: "Area", name: "areaList",
dicts: ['sys_yes_no'], dicts: ['sys_yes_no'],
data() { data() {
return { return {
...@@ -307,6 +307,14 @@ export default { ...@@ -307,6 +307,14 @@ export default {
this.queryParams.locationId = locationId; this.queryParams.locationId = locationId;
this.getList(); this.getList();
}, },
activated() {
if (this.$route.query && this.$route.query.locationId && this.locationId !== this.$route.query.locationId) {
this.reset()
this.locationId = this.$route.query.locationId
this.queryParams.locationId = this.locationId;
this.getList();
}
},
methods: { methods: {
/** 查询库位设置列表 */ /** 查询库位设置列表 */
getList() { getList() {
......
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
import { listLocation, getLocation, delLocation, addLocation, updateLocation } from "@/api/mes/wm/location"; import { listLocation, getLocation, delLocation, addLocation, updateLocation } from "@/api/mes/wm/location";
import {genCode} from "@/api/system/autocode/rule" import {genCode} from "@/api/system/autocode/rule"
export default { export default {
name: "Location", name: "locationList",
dicts: ['sys_yes_no'], dicts: ['sys_yes_no'],
data() { data() {
return { return {
...@@ -208,6 +208,14 @@ export default { ...@@ -208,6 +208,14 @@ export default {
this.queryParams.warehouseId = warehouseId; this.queryParams.warehouseId = warehouseId;
this.getList(); this.getList();
}, },
activated() {
if (this.$route.query && this.$route.query.warehouseId && this.warehouseId !== this.$route.query.warehouseId) {
this.reset()
this.warehouseId = this.$route.query.warehouseId
this.queryParams.warehouseId = this.warehouseId;
this.getList();
}
},
methods: { methods: {
/** 查询库区设置列表 */ /** 查询库区设置列表 */
getList() { getList() {
......
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