Compare commits
2 Commits
4bf610eeb1
...
319e0ac90d
Author | SHA1 | Date | |
---|---|---|---|
319e0ac90d | |||
e11c71edf1 |
13
.env.dev
13
.env.dev
@ -1,7 +1,7 @@
|
|||||||
###
|
###
|
||||||
# @Author: Do not edit
|
# @Author: Do not edit
|
||||||
# @Date: 2023-08-29 09:40:39
|
# @Date: 2023-08-29 09:40:39
|
||||||
# @LastEditTime: 2024-10-21 16:41:54
|
# @LastEditTime: 2024-11-07 09:29:23
|
||||||
# @LastEditors: zwq
|
# @LastEditors: zwq
|
||||||
# @Description:
|
# @Description:
|
||||||
###
|
###
|
||||||
@ -12,16 +12,7 @@ ENV = 'development'
|
|||||||
VUE_APP_TITLE = MES系统
|
VUE_APP_TITLE = MES系统
|
||||||
|
|
||||||
# 芋道管理系统/开发环境
|
# 芋道管理系统/开发环境
|
||||||
# VUE_APP_BASE_API = 'http://100.64.0.26:48082'
|
# VUE_APP_BASE_API = 'http://172.16.21.222:48082'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
|
||||||
# VUE_APP_BASE_API = 'http://192.168.4.173:48080'
|
|
||||||
# VUE_APP_BASE_API = 'http://192.168.2.173:48080'
|
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.81:48082'
|
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.8:48082'
|
|
||||||
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.56:48082'
|
|
||||||
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.64:48082'
|
|
||||||
VUE_APP_BASE_API = 'http://mes2.kszny.picaiba.com'
|
VUE_APP_BASE_API = 'http://mes2.kszny.picaiba.com'
|
||||||
|
|
||||||
|
|
||||||
|
@ -207,11 +207,11 @@ export function getDetailTree(data) {
|
|||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function getDetailTreeInfo(data) {
|
export function getDetailTreeInfo(query) {
|
||||||
return request({
|
return request({
|
||||||
url: 'base/order/getDetailTreeInfoById',
|
url: 'base/order/getDetailTreeInfoByIdNew',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: data
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,290 +1,417 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-form ref="addWorkOrder" :rules="rules" label-width="130px" :model="form" label-position='top'>
|
<el-form
|
||||||
<el-row :gutter="20">
|
ref="addWorkOrder"
|
||||||
<el-col :span='6'>
|
:rules="rules"
|
||||||
<el-form-item label="工单名称" prop="name" v-if='!isBind'>
|
label-width="130px"
|
||||||
<el-input v-model="form.name"></el-input>
|
:model="form"
|
||||||
</el-form-item>
|
label-position="top">
|
||||||
<el-form-item label="工单名称" prop="workOrderId" v-if='isBind'>
|
<el-row :gutter="20">
|
||||||
<el-select v-model="form.workOrderId" placeholder="请选择" style="width: 100%;" filterable
|
<el-col :span="6">
|
||||||
@change="getWorkOrderMsg">
|
<el-form-item label="工单模式">
|
||||||
<el-option v-for="item in workOrderList" :key="item.id" :label="item.name" :value="item.id">
|
<el-radio-group v-model="isBind">
|
||||||
</el-option>
|
<el-radio :label="true">绑定工单</el-radio>
|
||||||
</el-select>
|
<el-radio :label="false">新增工单</el-radio>
|
||||||
</el-form-item>
|
</el-radio-group>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span='6'>
|
</el-col>
|
||||||
<el-form-item label="工单编码" prop="code">
|
<el-col :span="6">
|
||||||
<el-input v-model="form.code" disabled></el-input>
|
<el-form-item label="工单名称" prop="name" v-if="!isBind">
|
||||||
</el-form-item>
|
<el-input v-model="form.name"></el-input>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span='6'>
|
<el-form-item label="工单名称" prop="workOrderId" v-if="isBind">
|
||||||
<el-form-item label="产品名称" prop="planProductId">
|
<el-select
|
||||||
<el-select v-model="form.planProductId" placeholder="请选择" disabled style="width: 100%;">
|
v-model="form.workOrderId"
|
||||||
<el-option v-for="item in productList" :key="item.id" :label="item.name+' | '+item.specifications"
|
placeholder="请选择"
|
||||||
:value="item.id">
|
style="width: 100%"
|
||||||
<span style="float: left">{{ item.name }}</span>
|
filterable
|
||||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.specifications }}</span>
|
@change="getWorkOrderMsg">
|
||||||
</el-option>
|
<el-option
|
||||||
</el-select>
|
v-for="item in workOrderList"
|
||||||
</el-form-item>
|
:key="item.id"
|
||||||
</el-col>
|
:label="item.name"
|
||||||
<el-col :span='6'>
|
:value="item.id"></el-option>
|
||||||
<el-form-item label="计划开始时间">
|
</el-select>
|
||||||
<el-date-picker v-model="planStartTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
</el-form-item>
|
||||||
style="width: 100%;" placeholder="选择日期" :disabled="isBind">
|
</el-col>
|
||||||
</el-date-picker>
|
<el-col :span="6">
|
||||||
</el-form-item>
|
<el-form-item label="工单编码" prop="code">
|
||||||
</el-col>
|
<el-input v-model="form.code" disabled></el-input>
|
||||||
</el-row>
|
</el-form-item>
|
||||||
<el-row :gutter="20">
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span="6">
|
||||||
<el-form-item label="计划完成时间">
|
<el-form-item label="产品名称" prop="planProductId">
|
||||||
<el-date-picker v-model="planFinishTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
<el-select
|
||||||
style="width: 100%;" placeholder="选择日期" :disabled="isBind">
|
v-model="form.planProductId"
|
||||||
</el-date-picker>
|
placeholder="请选择"
|
||||||
</el-form-item>
|
disabled
|
||||||
</el-col>
|
style="width: 100%">
|
||||||
<el-col :span='6'>
|
<el-option
|
||||||
<el-form-item label="计划投入数量" prop="planAssignQuantity">
|
v-for="item in productList"
|
||||||
<el-input-number v-model="form.planAssignQuantity" :min="0" :max="9999999999999" :disabled="isBind"
|
:key="item.id"
|
||||||
style="width: 100%;"></el-input-number>
|
:label="item.name + ' | ' + item.specifications"
|
||||||
</el-form-item>
|
:value="item.id">
|
||||||
</el-col>
|
<span style="float: left">{{ item.name }}</span>
|
||||||
<el-col :span='6'>
|
<span style="float: right; color: #8492a6; font-size: 13px">
|
||||||
<el-form-item label="计划生产数量" prop="planQuantity">
|
{{ item.specifications }}
|
||||||
<el-input-number v-model="form.planQuantity" :min="0" :max="9999999999999" :disabled="isBind"
|
</span>
|
||||||
style="width: 100%;"></el-input-number>
|
</el-option>
|
||||||
</el-form-item>
|
</el-select>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span='6'>
|
</el-col>
|
||||||
<el-form-item label="关联工艺" prop="processFlowId">
|
<el-col :span="6">
|
||||||
<el-select v-model="form.processFlowId" placeholder="请选择" disabled style="width: 100%;">
|
<el-form-item label="计划开始时间">
|
||||||
<el-option v-for="item in processFlowList" :key="item.id" :label="item.name" :value="item.id">
|
<el-date-picker
|
||||||
</el-option>
|
v-model="planStartTime"
|
||||||
</el-select>
|
type="datetime"
|
||||||
</el-form-item>
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
</el-col>
|
style="width: 100%"
|
||||||
</el-row>
|
placeholder="选择日期"
|
||||||
<el-row :gutter="20">
|
:disabled="isBind"></el-date-picker>
|
||||||
<el-col :span='6'>
|
</el-form-item>
|
||||||
<el-form-item label="物料计算方式" prop="materialMethod">
|
</el-col>
|
||||||
<el-select v-model="form.materialMethod" placeholder="请选择" style="width: 100%;" disabled>
|
<el-col :span="6">
|
||||||
<el-option label="产品基础BOM" :value="1"></el-option>
|
<el-form-item label="计划完成时间">
|
||||||
<el-option label="工艺扩展BOM" :value="2"></el-option>
|
<el-date-picker
|
||||||
</el-select>
|
v-model="planFinishTime"
|
||||||
</el-form-item>
|
type="datetime"
|
||||||
</el-col>
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
<el-col :span='6'>
|
style="width: 100%"
|
||||||
<el-form-item label="优先级" prop="priority">
|
placeholder="选择日期"
|
||||||
<el-select v-model="form.priority" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
:disabled="isBind"></el-date-picker>
|
||||||
<el-option v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)" :key="item.value" :label="item.label"
|
</el-form-item>
|
||||||
:value="item.value">
|
</el-col>
|
||||||
</el-option>
|
<el-col :span="6">
|
||||||
</el-select>
|
<el-form-item label="计划投入数量" prop="planAssignQuantity">
|
||||||
</el-form-item>
|
<el-input-number
|
||||||
</el-col>
|
v-model="form.planAssignQuantity"
|
||||||
<el-col :span='6'>
|
:min="0"
|
||||||
<el-form-item label="工单类型" prop="type">
|
:max="9999999999999"
|
||||||
<el-select v-model="form.type" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
:disabled="isBind"
|
||||||
<el-option v-for="item in workOrderTypeList" :key="item.id" :label="item.name" :value="item.id">
|
style="width: 100%"></el-input-number>
|
||||||
</el-option>
|
</el-form-item>
|
||||||
</el-select>
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="6">
|
||||||
</el-col>
|
<el-form-item label="计划生产数量" prop="planQuantity">
|
||||||
<el-col :span='6'>
|
<el-input-number
|
||||||
<el-form-item label="关联产线" prop="productLineId">
|
v-model="form.planQuantity"
|
||||||
<el-select v-model="form.productLineId" placeholder="请选择" multiple style="width: 100%;" :disabled="isBind">
|
:min="0"
|
||||||
<el-option v-for="item in productLineList" :key="item.id" :label="item.name" :value="item.id">
|
:max="9999999999999"
|
||||||
</el-option>
|
:disabled="isBind"
|
||||||
</el-select>
|
style="width: 100%"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span="6">
|
||||||
<el-row :gutter="20">
|
<el-form-item label="关联工艺" prop="processFlowId">
|
||||||
<el-col :span='6'>
|
<el-select
|
||||||
<el-form-item label="负责人" prop="workers">
|
v-model="form.processFlowId"
|
||||||
<el-input v-model="form.workers" :disabled="isBind"></el-input>
|
placeholder="请选择"
|
||||||
</el-form-item>
|
disabled
|
||||||
</el-col>
|
style="width: 100%">
|
||||||
<el-col :span='6'>
|
<el-option
|
||||||
<el-form-item label="负责部门" prop="deptId">
|
v-for="item in processFlowList"
|
||||||
<el-select v-model="form.deptId" placeholder="请选择关联产线" style="width: 100%;">
|
:key="item.id"
|
||||||
<el-option v-for="item in deptList" :key="item.id" :label="item.name" :value="item.id">
|
:label="item.name"
|
||||||
</el-option>
|
:value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span="6">
|
||||||
<el-form-item label="计划分配订单量" prop="planAssignmentQuantity">
|
<el-form-item label="物料计算方式" prop="materialMethod">
|
||||||
<el-input-number v-model="form.planAssignmentQuantity" :min="0" :max="9999999999999" style="width: 100%;">
|
<el-select
|
||||||
</el-input-number>
|
v-model="form.materialMethod"
|
||||||
</el-form-item>
|
placeholder="请选择"
|
||||||
</el-col>
|
style="width: 100%"
|
||||||
</el-row>
|
disabled>
|
||||||
</el-form>
|
<el-option label="产品基础BOM" :value="1"></el-option>
|
||||||
|
<el-option label="工艺扩展BOM" :value="2"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="优先级" prop="priority">
|
||||||
|
<el-select
|
||||||
|
v-model="form.priority"
|
||||||
|
placeholder="请选择"
|
||||||
|
style="width: 100%"
|
||||||
|
:disabled="isBind">
|
||||||
|
<el-option
|
||||||
|
v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="工单类型" prop="type">
|
||||||
|
<el-select
|
||||||
|
v-model="form.type"
|
||||||
|
placeholder="请选择"
|
||||||
|
style="width: 100%"
|
||||||
|
:disabled="isBind">
|
||||||
|
<el-option
|
||||||
|
v-for="item in workOrderTypeList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="关联产线" prop="productLineId">
|
||||||
|
<el-select
|
||||||
|
v-model="form.productLineId"
|
||||||
|
placeholder="请选择"
|
||||||
|
multiple
|
||||||
|
style="width: 100%"
|
||||||
|
:disabled="isBind">
|
||||||
|
<el-option
|
||||||
|
v-for="item in productLineList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="负责人" prop="workers">
|
||||||
|
<el-input v-model="form.workers" :disabled="isBind"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="负责部门" prop="deptId">
|
||||||
|
<el-select
|
||||||
|
v-model="form.deptId"
|
||||||
|
placeholder="请选择关联产线"
|
||||||
|
style="width: 100%">
|
||||||
|
<el-option
|
||||||
|
v-for="item in deptList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="计划分配订单量" prop="planAssignmentQuantity">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.planAssignmentQuantity"
|
||||||
|
:min="0"
|
||||||
|
:max="9999999999999"
|
||||||
|
style="width: 100%"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getProductAll } from '@/api/base/product'
|
import { getProductAll } from '@/api/base/product';
|
||||||
import { getProcessFlowList, getWorkOrderCode, orderIssue, workOrderList, getWorkOrderById } from '@/api/base/orderManage'
|
import {
|
||||||
import { getLineAll } from '@/api/base/productionLine'
|
getProcessFlowList,
|
||||||
|
getWorkOrderCode,
|
||||||
|
orderIssue,
|
||||||
|
workOrderList,
|
||||||
|
getWorkOrderById,
|
||||||
|
} from '@/api/base/orderManage';
|
||||||
|
import { getLineAll } from '@/api/base/productionLine';
|
||||||
import { listDept } from '@/api/system/dept';
|
import { listDept } from '@/api/system/dept';
|
||||||
import moment from 'moment'
|
import moment from 'moment';
|
||||||
export default {
|
export default {
|
||||||
name: 'AddWorkOrder',
|
name: 'AddWorkOrder',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {
|
form: {
|
||||||
workOrderId: '',
|
workOrderId: '',
|
||||||
orderId: '',
|
orderId: '',
|
||||||
name: '',
|
name: '',
|
||||||
code: '',
|
code: '',
|
||||||
planProductId: '',
|
planProductId: '',
|
||||||
planStartTime: '',
|
planStartTime: '',
|
||||||
planFinishTime: '',
|
planFinishTime: '',
|
||||||
planAssignQuantity: 0,
|
planAssignQuantity: 0,
|
||||||
deptId:undefined,
|
deptId: undefined,
|
||||||
planQuantity: 0,
|
planQuantity: 0,
|
||||||
processFlowId: '',
|
processFlowId: '',
|
||||||
materialMethod: 1,
|
materialMethod: 1,
|
||||||
priority: '',
|
priority: '',
|
||||||
productLineId: [],
|
productLineId: [],
|
||||||
type: '',
|
type: '',
|
||||||
workers: '',
|
workers: '',
|
||||||
planAssignmentQuantity: ''
|
planAssignmentQuantity: '',
|
||||||
},
|
},
|
||||||
deptList:[],
|
deptList: [],
|
||||||
rules: {
|
rules: {
|
||||||
name: [{ required: true, message: "工单名称不能为空", trigger: "blur" }],
|
name: [
|
||||||
planProductId: [{ required: true, message: "产品名称不能为空", trigger: "change" }],
|
{ required: true, message: '工单名称不能为空', trigger: 'blur' },
|
||||||
planAssignQuantity: [{ required: true, message: "计划投入数量不能为空", trigger: "blur" }],
|
],
|
||||||
planQuantity: [{ required: true, message: "计划生产数量不能为空", trigger: "blur" }],
|
planProductId: [
|
||||||
productLineId: [{ required: true, message: "产线不能为空", trigger: "change" }],
|
{ required: true, message: '产品名称不能为空', trigger: 'change' },
|
||||||
planAssignmentQuantity: [{ required: true, message: "计划分配订单量不能为空", trigger: "blur" }]
|
],
|
||||||
},
|
planAssignQuantity: [
|
||||||
productList: [],
|
{ required: true, message: '计划投入数量不能为空', trigger: 'blur' },
|
||||||
processFlowList: [],
|
],
|
||||||
productLineList: [],
|
planQuantity: [
|
||||||
workOrderTypeList: [
|
{ required: true, message: '计划生产数量不能为空', trigger: 'blur' },
|
||||||
{id: 1,name:'标准工单'},
|
],
|
||||||
{id: 2, name:'特殊工单'}
|
productLineId: [
|
||||||
],
|
{ required: true, message: '产线不能为空', trigger: 'change' },
|
||||||
planStartTime: '',
|
],
|
||||||
planFinishTime: '',
|
planAssignmentQuantity: [
|
||||||
isBind: false,
|
{
|
||||||
workOrderList: []
|
required: true,
|
||||||
}
|
message: '计划分配订单量不能为空',
|
||||||
},
|
trigger: 'blur',
|
||||||
methods: {
|
},
|
||||||
init(data, param) {
|
],
|
||||||
this.form.orderId = data.id
|
},
|
||||||
this.getList()
|
productList: [],
|
||||||
if (param === 'add') {
|
processFlowList: [],
|
||||||
this.isBind = false
|
productLineList: [],
|
||||||
getWorkOrderCode().then(res => {
|
workOrderTypeList: [
|
||||||
this.form.code = res.data || ''
|
{ id: 1, name: '标准工单' },
|
||||||
})
|
{ id: 2, name: '特殊工单' },
|
||||||
this.form.planProductId = data.planProductId
|
],
|
||||||
this.form.processFlowId = data.processFlowId
|
planStartTime: '',
|
||||||
this.form.materialMethod = data.materialMethod
|
planFinishTime: '',
|
||||||
}else{//绑定
|
isBind: false,
|
||||||
this.isBind = true
|
workOrderList: [],
|
||||||
}
|
orderData: {},
|
||||||
},
|
};
|
||||||
getList() {
|
},
|
||||||
listDept().then(res => {
|
methods: {
|
||||||
this.deptList = res.data || []
|
init(data, param) {
|
||||||
})
|
this.isBind = true;
|
||||||
// 产品
|
this.orderData = data;
|
||||||
getProductAll().then(res => {
|
this.form.orderId = data.id;
|
||||||
this.productList = res.data || []
|
this.getList();
|
||||||
})
|
},
|
||||||
// 产线
|
changeAdd() {
|
||||||
getLineAll().then(res => {
|
if (this.isBind) {
|
||||||
this.productLineList = res.data || []
|
this.isBind = false;
|
||||||
})
|
getWorkOrderCode().then((res) => {
|
||||||
// 工艺
|
this.form.code = res.data || '';
|
||||||
getProcessFlowList().then(res => {
|
});
|
||||||
this.processFlowList = res.data || []
|
this.form.orderId = null;
|
||||||
})
|
this.form.planProductId = this.orderData.planProductId;
|
||||||
// 工单list
|
this.form.processFlowId = this.orderData.processFlowId;
|
||||||
workOrderList({
|
this.form.materialMethod = this.orderData.materialMethod;
|
||||||
status: 1
|
} else {
|
||||||
}).then(res => {
|
this.isBind = true;
|
||||||
this.workOrderList = res.data || []
|
this.form.orderId = this.orderData.id;
|
||||||
})
|
this.form.planProductId = null;
|
||||||
},
|
this.form.processFlowId = null;
|
||||||
addWorkOrderSubmit() {
|
this.form.materialMethod = null;
|
||||||
this.$refs['addWorkOrder'].validate((valid) => {
|
this.form.code = null;
|
||||||
if (valid) {
|
}
|
||||||
if (this.isBind) {
|
},
|
||||||
//绑定工单
|
getList() {
|
||||||
orderIssue({
|
listDept().then((res) => {
|
||||||
workOrderId: this.form.workOrderId,
|
this.deptList = res.data || [];
|
||||||
orderId: this.form.orderId,
|
});
|
||||||
planAssignmentQuantity: this.form.planAssignmentQuantity
|
// 产品
|
||||||
}).then((res) => {
|
getProductAll().then((res) => {
|
||||||
if (res.code === 0) {
|
this.productList = res.data || [];
|
||||||
this.$modal.msgSuccess("操作成功")
|
});
|
||||||
this.$emit('addWorkOrderSubmit')
|
// 产线
|
||||||
}
|
getLineAll().then((res) => {
|
||||||
})
|
this.productLineList = res.data || [];
|
||||||
} else {
|
});
|
||||||
// 新增工单
|
// 工艺
|
||||||
let _this = this
|
getProcessFlowList().then((res) => {
|
||||||
_this.form.planStartTime = _this.planStartTime ? new Date(_this.planStartTime).valueOf() : ''
|
this.processFlowList = res.data || [];
|
||||||
_this.form.planFinishTime = _this.planFinishTime ? new Date(_this.planFinishTime).valueOf() : ''
|
});
|
||||||
orderIssue({ ..._this.form }).then(res => {
|
// 工单list
|
||||||
if (res.code === 0) {
|
workOrderList({
|
||||||
_this.$modal.msgSuccess("操作成功")
|
status: 1,
|
||||||
let name = this.form.name
|
}).then((res) => {
|
||||||
_this.$emit('addWorkOrderSubmit')
|
this.workOrderList = res.data || [];
|
||||||
// 询问是否添加预使用主原料
|
});
|
||||||
// _this.$modal.confirm('是否添加预使用主原料信息?').then(function() {
|
},
|
||||||
// _this.$router.push({
|
addWorkOrderSubmit() {
|
||||||
// path: '/core/core-work-order?workOrderName='+encodeURI(name)
|
this.$refs['addWorkOrder'].validate((valid) => {
|
||||||
// })
|
if (valid) {
|
||||||
// })
|
if (this.isBind) {
|
||||||
}
|
//绑定工单
|
||||||
})
|
orderIssue({
|
||||||
}
|
workOrderId: this.form.workOrderId,
|
||||||
} else {
|
orderId: this.form.orderId,
|
||||||
return false
|
planAssignmentQuantity: this.form.planAssignmentQuantity,
|
||||||
}
|
}).then((res) => {
|
||||||
})
|
if (res.code === 0) {
|
||||||
},
|
this.$modal.msgSuccess('操作成功');
|
||||||
formClear() {
|
this.$emit('addWorkOrderSubmit');
|
||||||
this.$refs.addWorkOrder.resetFields()
|
}
|
||||||
this.form.materialMethod = 1
|
});
|
||||||
this.form.planAssignQuantity = 0
|
} else {
|
||||||
this.form.planQuantity = 0
|
// 新增工单
|
||||||
this.planFinishTime = ''
|
let _this = this;
|
||||||
this.planStartTime = ''
|
_this.form.planStartTime = _this.planStartTime
|
||||||
this.form.planFinishTime = ''
|
? new Date(_this.planStartTime).valueOf()
|
||||||
this.form.planStartTime = ''
|
: '';
|
||||||
this.isBind = false
|
_this.form.planFinishTime = _this.planFinishTime
|
||||||
},
|
? new Date(_this.planFinishTime).valueOf()
|
||||||
// 绑定工单,选择工单时获取工单信息
|
: '';
|
||||||
getWorkOrderMsg() {
|
orderIssue({ ..._this.form }).then((res) => {
|
||||||
if (this.form.workOrderId) {
|
if (res.code === 0) {
|
||||||
getWorkOrderById({id:this.form.workOrderId}).then(res => {
|
_this.$modal.msgSuccess('操作成功');
|
||||||
if (res.code === 0) {
|
let name = this.form.name;
|
||||||
this.form.code = res.data.code
|
_this.$emit('addWorkOrderSubmit');
|
||||||
this.form.planProductId = res.data.planProductId
|
// 询问是否添加预使用主原料
|
||||||
this.planStartTime = res.data.planStartTime ? moment.unix(res.data.planStartTime).format('YYYY-MM-DD HH:mm:ss') : null
|
// _this.$modal.confirm('是否添加预使用主原料信息?').then(function() {
|
||||||
this.planFinishTime = res.data.planFinishTime ? moment.unix(res.data.planFinishTime).format('YYYY-MM-DD HH:mm:ss') : null
|
// _this.$router.push({
|
||||||
this.form.planAssignQuantity = res.data.planAssignQuantity
|
// path: '/core/core-work-order?workOrderName='+encodeURI(name)
|
||||||
this.form.planQuantity = res.data.planQuantity
|
// })
|
||||||
this.form.processFlowId = res.data.processFlowId
|
// })
|
||||||
this.form.materialMethod = res.data.materialMethod
|
}
|
||||||
this.form.priority = res.data.priority ? res.data.priority + '' : ''
|
});
|
||||||
this.form.productLineId = res.data.productLineIds
|
}
|
||||||
this.form.type = res.data.type
|
} else {
|
||||||
this.form.workers = res.data.workers
|
return false;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
},
|
||||||
}
|
formClear() {
|
||||||
}
|
this.$refs.addWorkOrder.resetFields();
|
||||||
}
|
this.form.materialMethod = 1;
|
||||||
|
this.form.planAssignQuantity = 0;
|
||||||
|
this.form.planQuantity = 0;
|
||||||
|
this.planFinishTime = '';
|
||||||
|
this.planStartTime = '';
|
||||||
|
this.form.planFinishTime = '';
|
||||||
|
this.form.planStartTime = '';
|
||||||
|
this.isBind = false;
|
||||||
|
},
|
||||||
|
// 绑定工单,选择工单时获取工单信息
|
||||||
|
getWorkOrderMsg() {
|
||||||
|
if (this.form.workOrderId) {
|
||||||
|
getWorkOrderById({ id: this.form.workOrderId }).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.form.code = res.data.code;
|
||||||
|
this.form.planProductId = res.data.planProductId;
|
||||||
|
this.planStartTime = res.data.planStartTime
|
||||||
|
? moment
|
||||||
|
.unix(res.data.planStartTime)
|
||||||
|
.format('YYYY-MM-DD HH:mm:ss')
|
||||||
|
: null;
|
||||||
|
this.planFinishTime = res.data.planFinishTime
|
||||||
|
? moment
|
||||||
|
.unix(res.data.planFinishTime)
|
||||||
|
.format('YYYY-MM-DD HH:mm:ss')
|
||||||
|
: null;
|
||||||
|
this.form.planAssignQuantity = res.data.planAssignQuantity;
|
||||||
|
this.form.planQuantity = res.data.planQuantity;
|
||||||
|
this.form.processFlowId = res.data.processFlowId;
|
||||||
|
this.form.materialMethod = res.data.materialMethod;
|
||||||
|
this.form.priority = res.data.priority
|
||||||
|
? res.data.priority + ''
|
||||||
|
: '';
|
||||||
|
this.form.productLineId = res.data.productLineIds;
|
||||||
|
this.form.type = res.data.type;
|
||||||
|
this.form.workers = res.data.workers;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2024-09-26 14:08:58
|
* @Date: 2024-09-26 14:08:58
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2024-11-05 14:19:46
|
* @LastEditTime: 2024-11-06 09:52:59
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -27,7 +27,7 @@
|
|||||||
<base-table
|
<base-table
|
||||||
:table-props="tableProps"
|
:table-props="tableProps"
|
||||||
:table-data="list"
|
:table-data="list"
|
||||||
@emitFun="inputChange"
|
@emitFun="inputChange"
|
||||||
:max-height="tableH">
|
:max-height="tableH">
|
||||||
<!-- <method-btn v-if="tableBtn.length" slot="handleBtn" :width="240" label="操作" :method-list="tableBtn"
|
<!-- <method-btn v-if="tableBtn.length" slot="handleBtn" :width="240" label="操作" :method-list="tableBtn"
|
||||||
@clickBtn="handleClick" /> -->
|
@clickBtn="handleClick" /> -->
|
||||||
@ -49,6 +49,7 @@ import { parseTime } from '@/utils/ruoyi';
|
|||||||
import inputArea from './inputArea.vue';
|
import inputArea from './inputArea.vue';
|
||||||
import selectMember from './selectMember';
|
import selectMember from './selectMember';
|
||||||
import selectTime from './selectTime';
|
import selectTime from './selectTime';
|
||||||
|
import { publicFormatter } from '@/utils/dict'
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
@ -61,19 +62,16 @@ const tableProps = [
|
|||||||
prop: 'code',
|
prop: 'code',
|
||||||
label: '订单编码',
|
label: '订单编码',
|
||||||
minWidth: 180,
|
minWidth: 180,
|
||||||
subcomponent: inputArea,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'productName',
|
prop: 'productName',
|
||||||
label: '产品',
|
label: '产品',
|
||||||
showOverflowtooltip: true,
|
showOverflowtooltip: true,
|
||||||
subcomponent: inputArea,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'specifications',
|
prop: 'specifications',
|
||||||
label: '产品规格',
|
label: '产品规格',
|
||||||
showOverflowtooltip: true,
|
showOverflowtooltip: true,
|
||||||
subcomponent: inputArea,
|
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// prop: 'priority',
|
// prop: 'priority',
|
||||||
@ -97,19 +95,20 @@ const tableProps = [
|
|||||||
prop: 'customerId',
|
prop: 'customerId',
|
||||||
label: '客户',
|
label: '客户',
|
||||||
showOverflowtooltip: true,
|
showOverflowtooltip: true,
|
||||||
subcomponent: selectMember,
|
// subcomponent: selectMember,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'price',
|
prop: 'price',
|
||||||
label: '单价',
|
label: '单价',
|
||||||
width: 100,
|
width: 100,
|
||||||
subcomponent: inputArea,
|
// subcomponent: inputArea,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'packSpec',
|
prop: 'packSpec',
|
||||||
label: '包装规格',
|
label: '包装规格',
|
||||||
width: 100,
|
width: 100,
|
||||||
subcomponent: selectMember,
|
filter: publicFormatter('pack_spec')
|
||||||
|
// subcomponent: selectMember,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'remark',
|
prop: 'remark',
|
||||||
@ -171,6 +170,7 @@ export default {
|
|||||||
this.list = res.data;
|
this.list = res.data;
|
||||||
this.list.forEach((item, index) => {
|
this.list.forEach((item, index) => {
|
||||||
item.name = item.name + '-' + (index + 1);
|
item.name = item.name + '-' + (index + 1);
|
||||||
|
item.code = item.code + '-' + (index + 1);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -220,7 +220,7 @@ export default {
|
|||||||
// 客户
|
// 客户
|
||||||
getCustomerList().then((res) => {
|
getCustomerList().then((res) => {
|
||||||
this.customerList = res.data || [];
|
this.customerList = res.data || [];
|
||||||
this.$set(this.tableProps[6], 'customerList', this.customerList);
|
this.$set(this.tableProps[6], 'customerList', this.customerList);
|
||||||
});
|
});
|
||||||
// 工艺
|
// 工艺
|
||||||
// getProcessFlowList().then(res => {
|
// getProcessFlowList().then(res => {
|
||||||
@ -249,13 +249,12 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
inputChange(data) {
|
inputChange(data) {
|
||||||
console.log(data)
|
|
||||||
switch (data.sType) {
|
switch (data.sType) {
|
||||||
case 1:
|
case 1:
|
||||||
this.list[data._pageIndex - 1][data.prop] = data[data.prop];
|
this.list[data._pageIndex - 1][data.prop] = data[data.prop];
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
this.list[data._pageIndex - 1][data.prop] = data[data.prop];
|
this.list[data._pageIndex - 1][data.prop] = data[data.prop];
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
this.list[data._pageIndex - 1][data.prop] = data.deliveTime;
|
this.list[data._pageIndex - 1][data.prop] = data.deliveTime;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -38,11 +38,18 @@
|
|||||||
{{ getDictDataLabel(DICT_TYPE.PACK_SPEC, orderMsg.packSpec) }}
|
{{ getDictDataLabel(DICT_TYPE.PACK_SPEC, orderMsg.packSpec) }}
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='3'>
|
<el-col :span="3">
|
||||||
<div class="blodTip">物料计算方式</div>
|
<div class="blodTip">物料计算方式</div>
|
||||||
<div class="lightTip">{{orderMsg.materialMethod ? (orderMsg.materialMethod === 1 ? '产品基础' : '工艺扩展') : ''}}
|
<div class="lightTip">
|
||||||
</div>
|
{{
|
||||||
</el-col>
|
orderMsg.materialMethod
|
||||||
|
? orderMsg.materialMethod === 1
|
||||||
|
? '产品基础'
|
||||||
|
: '工艺扩展'
|
||||||
|
: ''
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
<!-- <el-col :span="3">
|
<!-- <el-col :span="3">
|
||||||
<div class="blodTip">计划开始时间</div>
|
<div class="blodTip">计划开始时间</div>
|
||||||
<div class="lightTip">{{ parseTime(orderMsg.planStartTime) }}</div>
|
<div class="lightTip">{{ parseTime(orderMsg.planStartTime) }}</div>
|
||||||
@ -143,6 +150,7 @@
|
|||||||
<el-tree
|
<el-tree
|
||||||
:data="treeData"
|
:data="treeData"
|
||||||
:props="defaultProps"
|
:props="defaultProps"
|
||||||
|
default-expand-all
|
||||||
@node-click="handleNodeClick"></el-tree>
|
@node-click="handleNodeClick"></el-tree>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
@ -185,16 +193,23 @@ const tableProps1 = [
|
|||||||
filter: parseTime,
|
filter: parseTime,
|
||||||
minWidth: 160,
|
minWidth: 160,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'type',
|
||||||
|
label: '订单/工单类型',
|
||||||
|
minWidth: 140,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
sortable:true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '工单名',
|
label: '订单/工单名',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
showOverflowtooltip: true,
|
showOverflowtooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
label: '工单编码',
|
label: '订单/工单编码',
|
||||||
minWidth: 150,
|
minWidth: 165,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'planAssignmentQuantity',
|
prop: 'planAssignmentQuantity',
|
||||||
@ -206,11 +221,11 @@ const tableProps1 = [
|
|||||||
label: '实际加工量',
|
label: '实际加工量',
|
||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
prop: 'actualArea',
|
// prop: 'actualArea',
|
||||||
label: '加工平方数',
|
// label: '加工平方数',
|
||||||
width: 100,
|
// width: 100,
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
label: '状态',
|
label: '状态',
|
||||||
@ -298,27 +313,23 @@ export default {
|
|||||||
this.activeModule = val;
|
this.activeModule = val;
|
||||||
},
|
},
|
||||||
handleNodeClick(val) {
|
handleNodeClick(val) {
|
||||||
console.log(val);
|
|
||||||
getDetailTreeInfo({
|
getDetailTreeInfo({
|
||||||
id: val.id,
|
id: val.id,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
this.list1 = res.data.order;
|
this.list1 = res.data;
|
||||||
console.log(res);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
initData(to) {
|
initData(to) {
|
||||||
if (to.name === 'OrderDetailData') {
|
if (to.name === 'OrderDetailData') {
|
||||||
this.orderId = location.href.split('=')[1];
|
this.orderId = location.href.split('=')[1];
|
||||||
this.getMsg();
|
this.getMsg();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getMsg() {
|
getMsg() {
|
||||||
console.log(this.orderId)
|
|
||||||
orderDetail({
|
orderDetail({
|
||||||
id: this.orderId,
|
id: this.orderId,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
this.orderMsg = res.data;
|
this.orderMsg = res.data;
|
||||||
this.list1 = res.data.coreWorkOrderRespVOS;
|
|
||||||
|
|
||||||
getOrderRemainNum(this.orderId).then((resNum) => {
|
getOrderRemainNum(this.orderId).then((resNum) => {
|
||||||
bomUseNum({
|
bomUseNum({
|
||||||
@ -339,11 +350,20 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
getDetailTreeInfo({
|
||||||
|
id: this.orderId,
|
||||||
|
}).then((res) => {
|
||||||
|
this.list1 = res.data;
|
||||||
|
});
|
||||||
getDetailTree({
|
getDetailTree({
|
||||||
id: this.orderId,
|
id: this.orderId,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res);
|
|
||||||
this.treeData = res.data;
|
this.treeData = res.data;
|
||||||
|
this.treeData.unshift({
|
||||||
|
id:this.orderId,
|
||||||
|
name:'全部'
|
||||||
|
})
|
||||||
});
|
});
|
||||||
// 工艺
|
// 工艺
|
||||||
getProcessFlowList().then((res) => {
|
getProcessFlowList().then((res) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user