更新 #403
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,135 +1,221 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-form ref="addWorkOrder" :rules="rules" label-width="130px" :model="form" label-position='top'>
|
<el-form
|
||||||
|
ref="addWorkOrder"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="130px"
|
||||||
|
:model="form"
|
||||||
|
label-position="top">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span='6'>
|
<el-col :span="6">
|
||||||
<el-form-item label="工单名称" prop="name" v-if='!isBind'>
|
<el-form-item label="工单模式">
|
||||||
|
<el-radio-group v-model="isBind">
|
||||||
|
<el-radio :label="true">绑定工单</el-radio>
|
||||||
|
<el-radio :label="false">新增工单</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="工单名称" prop="name" v-if="!isBind">
|
||||||
<el-input v-model="form.name"></el-input>
|
<el-input v-model="form.name"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="工单名称" prop="workOrderId" v-if='isBind'>
|
<el-form-item label="工单名称" prop="workOrderId" v-if="isBind">
|
||||||
<el-select v-model="form.workOrderId" placeholder="请选择" style="width: 100%;" filterable
|
<el-select
|
||||||
|
v-model="form.workOrderId"
|
||||||
|
placeholder="请选择"
|
||||||
|
style="width: 100%"
|
||||||
|
filterable
|
||||||
@change="getWorkOrderMsg">
|
@change="getWorkOrderMsg">
|
||||||
<el-option v-for="item in workOrderList" :key="item.id" :label="item.name" :value="item.id">
|
<el-option
|
||||||
</el-option>
|
v-for="item in workOrderList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
: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="code">
|
<el-form-item label="工单编码" prop="code">
|
||||||
<el-input v-model="form.code" disabled></el-input>
|
<el-input v-model="form.code" disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span="6">
|
||||||
<el-form-item label="产品名称" prop="planProductId">
|
<el-form-item label="产品名称" prop="planProductId">
|
||||||
<el-select v-model="form.planProductId" placeholder="请选择" disabled style="width: 100%;">
|
<el-select
|
||||||
<el-option v-for="item in productList" :key="item.id" :label="item.name+' | '+item.specifications"
|
v-model="form.planProductId"
|
||||||
|
placeholder="请选择"
|
||||||
|
disabled
|
||||||
|
style="width: 100%">
|
||||||
|
<el-option
|
||||||
|
v-for="item in productList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name + ' | ' + item.specifications"
|
||||||
:value="item.id">
|
:value="item.id">
|
||||||
<span style="float: left">{{ item.name }}</span>
|
<span style="float: left">{{ item.name }}</span>
|
||||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.specifications }}</span>
|
<span style="float: right; color: #8492a6; font-size: 13px">
|
||||||
|
{{ item.specifications }}
|
||||||
|
</span>
|
||||||
</el-option>
|
</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="计划开始时间">
|
<el-form-item label="计划开始时间">
|
||||||
<el-date-picker v-model="planStartTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
<el-date-picker
|
||||||
style="width: 100%;" placeholder="选择日期" :disabled="isBind">
|
v-model="planStartTime"
|
||||||
</el-date-picker>
|
type="datetime"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="选择日期"
|
||||||
|
:disabled="isBind"></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span="6">
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="计划完成时间">
|
<el-form-item label="计划完成时间">
|
||||||
<el-date-picker v-model="planFinishTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
<el-date-picker
|
||||||
style="width: 100%;" placeholder="选择日期" :disabled="isBind">
|
v-model="planFinishTime"
|
||||||
</el-date-picker>
|
type="datetime"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="选择日期"
|
||||||
|
:disabled="isBind"></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span="6">
|
||||||
<el-form-item label="计划投入数量" prop="planAssignQuantity">
|
<el-form-item label="计划投入数量" prop="planAssignQuantity">
|
||||||
<el-input-number v-model="form.planAssignQuantity" :min="0" :max="9999999999999" :disabled="isBind"
|
<el-input-number
|
||||||
style="width: 100%;"></el-input-number>
|
v-model="form.planAssignQuantity"
|
||||||
|
:min="0"
|
||||||
|
:max="9999999999999"
|
||||||
|
:disabled="isBind"
|
||||||
|
style="width: 100%"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span="6">
|
||||||
<el-form-item label="计划生产数量" prop="planQuantity">
|
<el-form-item label="计划生产数量" prop="planQuantity">
|
||||||
<el-input-number v-model="form.planQuantity" :min="0" :max="9999999999999" :disabled="isBind"
|
<el-input-number
|
||||||
style="width: 100%;"></el-input-number>
|
v-model="form.planQuantity"
|
||||||
|
:min="0"
|
||||||
|
:max="9999999999999"
|
||||||
|
:disabled="isBind"
|
||||||
|
style="width: 100%"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span="6">
|
||||||
<el-form-item label="关联工艺" prop="processFlowId">
|
<el-form-item label="关联工艺" prop="processFlowId">
|
||||||
<el-select v-model="form.processFlowId" placeholder="请选择" disabled style="width: 100%;">
|
<el-select
|
||||||
<el-option v-for="item in processFlowList" :key="item.id" :label="item.name" :value="item.id">
|
v-model="form.processFlowId"
|
||||||
</el-option>
|
placeholder="请选择"
|
||||||
|
disabled
|
||||||
|
style="width: 100%">
|
||||||
|
<el-option
|
||||||
|
v-for="item in processFlowList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span="6">
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="物料计算方式" prop="materialMethod">
|
<el-form-item label="物料计算方式" prop="materialMethod">
|
||||||
<el-select v-model="form.materialMethod" placeholder="请选择" style="width: 100%;" disabled>
|
<el-select
|
||||||
|
v-model="form.materialMethod"
|
||||||
|
placeholder="请选择"
|
||||||
|
style="width: 100%"
|
||||||
|
disabled>
|
||||||
<el-option label="产品基础BOM" :value="1"></el-option>
|
<el-option label="产品基础BOM" :value="1"></el-option>
|
||||||
<el-option label="工艺扩展BOM" :value="2"></el-option>
|
<el-option label="工艺扩展BOM" :value="2"></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="priority">
|
<el-form-item label="优先级" prop="priority">
|
||||||
<el-select v-model="form.priority" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
<el-select
|
||||||
<el-option v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)" :key="item.value" :label="item.label"
|
v-model="form.priority"
|
||||||
:value="item.value">
|
placeholder="请选择"
|
||||||
</el-option>
|
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-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span="6">
|
||||||
<el-form-item label="工单类型" prop="type">
|
<el-form-item label="工单类型" prop="type">
|
||||||
<el-select v-model="form.type" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
<el-select
|
||||||
<el-option v-for="item in workOrderTypeList" :key="item.id" :label="item.name" :value="item.id">
|
v-model="form.type"
|
||||||
</el-option>
|
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-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span="6">
|
||||||
<el-form-item label="关联产线" prop="productLineId">
|
<el-form-item label="关联产线" prop="productLineId">
|
||||||
<el-select v-model="form.productLineId" placeholder="请选择" multiple style="width: 100%;" :disabled="isBind">
|
<el-select
|
||||||
<el-option v-for="item in productLineList" :key="item.id" :label="item.name" :value="item.id">
|
v-model="form.productLineId"
|
||||||
</el-option>
|
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-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span="6">
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="负责人" prop="workers">
|
<el-form-item label="负责人" prop="workers">
|
||||||
<el-input v-model="form.workers" :disabled="isBind"></el-input>
|
<el-input v-model="form.workers" :disabled="isBind"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span="6">
|
||||||
<el-form-item label="负责部门" prop="deptId">
|
<el-form-item label="负责部门" prop="deptId">
|
||||||
<el-select v-model="form.deptId" placeholder="请选择关联产线" style="width: 100%;">
|
<el-select
|
||||||
<el-option v-for="item in deptList" :key="item.id" :label="item.name" :value="item.id">
|
v-model="form.deptId"
|
||||||
</el-option>
|
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-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="planAssignmentQuantity">
|
||||||
<el-input-number v-model="form.planAssignmentQuantity" :min="0" :max="9999999999999" style="width: 100%;">
|
<el-input-number
|
||||||
</el-input-number>
|
v-model="form.planAssignmentQuantity"
|
||||||
|
:min="0"
|
||||||
|
:max="9999999999999"
|
||||||
|
style="width: 100%"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</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() {
|
||||||
@ -143,7 +229,7 @@ export default {
|
|||||||
planStartTime: '',
|
planStartTime: '',
|
||||||
planFinishTime: '',
|
planFinishTime: '',
|
||||||
planAssignQuantity: 0,
|
planAssignQuantity: 0,
|
||||||
deptId:undefined,
|
deptId: undefined,
|
||||||
planQuantity: 0,
|
planQuantity: 0,
|
||||||
processFlowId: '',
|
processFlowId: '',
|
||||||
materialMethod: 1,
|
materialMethod: 1,
|
||||||
@ -151,68 +237,95 @@ export default {
|
|||||||
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: [
|
||||||
|
{ required: true, message: '计划投入数量不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
planQuantity: [
|
||||||
|
{ required: true, message: '计划生产数量不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
productLineId: [
|
||||||
|
{ required: true, message: '产线不能为空', trigger: 'change' },
|
||||||
|
],
|
||||||
|
planAssignmentQuantity: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '计划分配订单量不能为空',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
productList: [],
|
productList: [],
|
||||||
processFlowList: [],
|
processFlowList: [],
|
||||||
productLineList: [],
|
productLineList: [],
|
||||||
workOrderTypeList: [
|
workOrderTypeList: [
|
||||||
{id: 1,name:'标准工单'},
|
{ id: 1, name: '标准工单' },
|
||||||
{id: 2, name:'特殊工单'}
|
{ id: 2, name: '特殊工单' },
|
||||||
],
|
],
|
||||||
planStartTime: '',
|
planStartTime: '',
|
||||||
planFinishTime: '',
|
planFinishTime: '',
|
||||||
isBind: false,
|
isBind: false,
|
||||||
workOrderList: []
|
workOrderList: [],
|
||||||
}
|
orderData: {},
|
||||||
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init(data, param) {
|
init(data, param) {
|
||||||
this.form.orderId = data.id
|
this.isBind = true;
|
||||||
this.getList()
|
this.orderData = data;
|
||||||
if (param === 'add') {
|
this.form.orderId = data.id;
|
||||||
this.isBind = false
|
this.getList();
|
||||||
getWorkOrderCode().then(res => {
|
},
|
||||||
this.form.code = res.data || ''
|
changeAdd() {
|
||||||
})
|
if (this.isBind) {
|
||||||
this.form.planProductId = data.planProductId
|
this.isBind = false;
|
||||||
this.form.processFlowId = data.processFlowId
|
getWorkOrderCode().then((res) => {
|
||||||
this.form.materialMethod = data.materialMethod
|
this.form.code = res.data || '';
|
||||||
}else{//绑定
|
});
|
||||||
this.isBind = true
|
this.form.orderId = null;
|
||||||
|
this.form.planProductId = this.orderData.planProductId;
|
||||||
|
this.form.processFlowId = this.orderData.processFlowId;
|
||||||
|
this.form.materialMethod = this.orderData.materialMethod;
|
||||||
|
} else {
|
||||||
|
this.isBind = true;
|
||||||
|
this.form.orderId = this.orderData.id;
|
||||||
|
this.form.planProductId = null;
|
||||||
|
this.form.processFlowId = null;
|
||||||
|
this.form.materialMethod = null;
|
||||||
|
this.form.code = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
listDept().then(res => {
|
listDept().then((res) => {
|
||||||
this.deptList = res.data || []
|
this.deptList = res.data || [];
|
||||||
})
|
});
|
||||||
// 产品
|
// 产品
|
||||||
getProductAll().then(res => {
|
getProductAll().then((res) => {
|
||||||
this.productList = res.data || []
|
this.productList = res.data || [];
|
||||||
})
|
});
|
||||||
// 产线
|
// 产线
|
||||||
getLineAll().then(res => {
|
getLineAll().then((res) => {
|
||||||
this.productLineList = res.data || []
|
this.productLineList = res.data || [];
|
||||||
})
|
});
|
||||||
// 工艺
|
// 工艺
|
||||||
getProcessFlowList().then(res => {
|
getProcessFlowList().then((res) => {
|
||||||
this.processFlowList = res.data || []
|
this.processFlowList = res.data || [];
|
||||||
})
|
});
|
||||||
// 工单list
|
// 工单list
|
||||||
workOrderList({
|
workOrderList({
|
||||||
status: 1
|
status: 1,
|
||||||
}).then(res => {
|
}).then((res) => {
|
||||||
this.workOrderList = res.data || []
|
this.workOrderList = res.data || [];
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
addWorkOrderSubmit() {
|
addWorkOrderSubmit() {
|
||||||
this.$refs['addWorkOrder'].validate((valid) => {
|
this.$refs['addWorkOrder'].validate((valid) => {
|
||||||
@ -222,23 +335,27 @@ export default {
|
|||||||
orderIssue({
|
orderIssue({
|
||||||
workOrderId: this.form.workOrderId,
|
workOrderId: this.form.workOrderId,
|
||||||
orderId: this.form.orderId,
|
orderId: this.form.orderId,
|
||||||
planAssignmentQuantity: this.form.planAssignmentQuantity
|
planAssignmentQuantity: this.form.planAssignmentQuantity,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$modal.msgSuccess("操作成功")
|
this.$modal.msgSuccess('操作成功');
|
||||||
this.$emit('addWorkOrderSubmit')
|
this.$emit('addWorkOrderSubmit');
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
// 新增工单
|
// 新增工单
|
||||||
let _this = this
|
let _this = this;
|
||||||
_this.form.planStartTime = _this.planStartTime ? new Date(_this.planStartTime).valueOf() : ''
|
_this.form.planStartTime = _this.planStartTime
|
||||||
_this.form.planFinishTime = _this.planFinishTime ? new Date(_this.planFinishTime).valueOf() : ''
|
? new Date(_this.planStartTime).valueOf()
|
||||||
orderIssue({ ..._this.form }).then(res => {
|
: '';
|
||||||
|
_this.form.planFinishTime = _this.planFinishTime
|
||||||
|
? new Date(_this.planFinishTime).valueOf()
|
||||||
|
: '';
|
||||||
|
orderIssue({ ..._this.form }).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
_this.$modal.msgSuccess("操作成功")
|
_this.$modal.msgSuccess('操作成功');
|
||||||
let name = this.form.name
|
let name = this.form.name;
|
||||||
_this.$emit('addWorkOrderSubmit')
|
_this.$emit('addWorkOrderSubmit');
|
||||||
// 询问是否添加预使用主原料
|
// 询问是否添加预使用主原料
|
||||||
// _this.$modal.confirm('是否添加预使用主原料信息?').then(function() {
|
// _this.$modal.confirm('是否添加预使用主原料信息?').then(function() {
|
||||||
// _this.$router.push({
|
// _this.$router.push({
|
||||||
@ -246,45 +363,55 @@ export default {
|
|||||||
// })
|
// })
|
||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
formClear() {
|
formClear() {
|
||||||
this.$refs.addWorkOrder.resetFields()
|
this.$refs.addWorkOrder.resetFields();
|
||||||
this.form.materialMethod = 1
|
this.form.materialMethod = 1;
|
||||||
this.form.planAssignQuantity = 0
|
this.form.planAssignQuantity = 0;
|
||||||
this.form.planQuantity = 0
|
this.form.planQuantity = 0;
|
||||||
this.planFinishTime = ''
|
this.planFinishTime = '';
|
||||||
this.planStartTime = ''
|
this.planStartTime = '';
|
||||||
this.form.planFinishTime = ''
|
this.form.planFinishTime = '';
|
||||||
this.form.planStartTime = ''
|
this.form.planStartTime = '';
|
||||||
this.isBind = false
|
this.isBind = false;
|
||||||
},
|
},
|
||||||
// 绑定工单,选择工单时获取工单信息
|
// 绑定工单,选择工单时获取工单信息
|
||||||
getWorkOrderMsg() {
|
getWorkOrderMsg() {
|
||||||
if (this.form.workOrderId) {
|
if (this.form.workOrderId) {
|
||||||
getWorkOrderById({id:this.form.workOrderId}).then(res => {
|
getWorkOrderById({ id: this.form.workOrderId }).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form.code = res.data.code
|
this.form.code = res.data.code;
|
||||||
this.form.planProductId = res.data.planProductId
|
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.planStartTime = res.data.planStartTime
|
||||||
this.planFinishTime = res.data.planFinishTime ? moment.unix(res.data.planFinishTime).format('YYYY-MM-DD HH:mm:ss') : null
|
? moment
|
||||||
this.form.planAssignQuantity = res.data.planAssignQuantity
|
.unix(res.data.planStartTime)
|
||||||
this.form.planQuantity = res.data.planQuantity
|
.format('YYYY-MM-DD HH:mm:ss')
|
||||||
this.form.processFlowId = res.data.processFlowId
|
: null;
|
||||||
this.form.materialMethod = res.data.materialMethod
|
this.planFinishTime = res.data.planFinishTime
|
||||||
this.form.priority = res.data.priority ? res.data.priority + '' : ''
|
? moment
|
||||||
this.form.productLineId = res.data.productLineIds
|
.unix(res.data.planFinishTime)
|
||||||
this.form.type = res.data.type
|
.format('YYYY-MM-DD HH:mm:ss')
|
||||||
this.form.workers = res.data.workers
|
: 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>
|
||||||
@ -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 {
|
||||||
@ -249,7 +249,6 @@ 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];
|
||||||
|
@ -1,108 +1,209 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
<search-bar
|
||||||
<!-- 列表 -->
|
:formConfigs="formConfig"
|
||||||
<base-table ref="table" @row-click="handleRowClick" row-key="id"
|
ref="searchBarForm"
|
||||||
:tree-props="{ children: 'children'}"
|
@headBtnClick="buttonClick" />
|
||||||
:page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list"
|
|
||||||
:max-height="tableH">
|
<el-table
|
||||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="240" label="操作" :method-list="tableBtn"
|
:data="list"
|
||||||
@clickBtn="handleClick" />
|
:header-cell-style="{
|
||||||
</base-table>
|
background: '#F2F4F9',
|
||||||
<pagination :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
|
color: '#606266',
|
||||||
|
}"
|
||||||
|
class="orderTable"
|
||||||
|
v-loading="loading"
|
||||||
|
border
|
||||||
|
style="width: 100%"
|
||||||
|
:max-height="tableH"
|
||||||
|
:row-class-name="tableRowClassName"
|
||||||
|
ref="table"
|
||||||
|
row-key="id"
|
||||||
|
lazy
|
||||||
|
:load="load"
|
||||||
|
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
|
||||||
|
<el-table-column prop="grade" label="订单类型" width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{
|
||||||
|
scope.row.grade != null
|
||||||
|
? ['一级订单', '二级订单', '三级订单'][scope.row.grade - 1]
|
||||||
|
: '-'
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="createTime" label="添加时间" width="160">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="name"
|
||||||
|
label="订单名称"
|
||||||
|
show-overflow-tooltip
|
||||||
|
min-width="120" />
|
||||||
|
<el-table-column prop="code" label="订单编码" width="160" />
|
||||||
|
<el-table-column
|
||||||
|
prop="customerName"
|
||||||
|
label="客户"
|
||||||
|
show-overflow-tooltip
|
||||||
|
min-width="120" />
|
||||||
|
<el-table-column prop="status" label="订单状态">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<span>
|
||||||
|
{{ getDictDataLabel(DICT_TYPE.ORDER_STATUS, scope.row.status) }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="planQuantity" label="计划加工量" width="100" />
|
||||||
|
<el-table-column prop="actualQuantity" label="实际加工量" width="100" />
|
||||||
|
<el-table-column
|
||||||
|
prop="productName"
|
||||||
|
label="产品"
|
||||||
|
show-overflow-tooltip
|
||||||
|
min-width="120" />
|
||||||
|
<el-table-column prop="deliveTime" label="交货时间" width="160">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<span>{{ parseTime(scope.row.deliveTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="workOrderNum" label="工单数量" width="140">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-button @click="handleRoute" type="text">
|
||||||
|
{{ scope.row.workOrderNum }}
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="340">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
:disabled="!(scope.row.status != 5 && scope.row.workOrderNum === 0)"
|
||||||
|
@click="handleClick({ data: scope.row, type: 'split' })"
|
||||||
|
v-hasPermi="['base:order-manage:split']">
|
||||||
|
拆分订单
|
||||||
|
</el-button>
|
||||||
|
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
:disabled="
|
||||||
|
!(
|
||||||
|
scope.row.status === 1 ||
|
||||||
|
scope.row.status === 2 ||
|
||||||
|
scope.row.status === 3
|
||||||
|
)
|
||||||
|
"
|
||||||
|
@click="handleClick({ data: scope.row, type: 'bind' })"
|
||||||
|
v-hasPermi="['base:order-manage:bindWorkOrder']">
|
||||||
|
绑定工单
|
||||||
|
</el-button>
|
||||||
|
<!-- addWorkOrder -->
|
||||||
|
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
:disabled="!(scope.row.status === 2 || scope.row.status === 3)"
|
||||||
|
@click="handleClick({ data: scope.row, type: 'complete' })"
|
||||||
|
v-hasPermi="['base:order-manage:bindWorkOrder']">
|
||||||
|
完成
|
||||||
|
</el-button>
|
||||||
|
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
@click="handleClick({ data: scope.row, type: 'detail' })"
|
||||||
|
v-hasPermi="['base:order-manage:detail']">
|
||||||
|
<span class="iconfont icon-detail primary-color" />
|
||||||
|
</el-button>
|
||||||
|
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
:disabled="
|
||||||
|
!(scope.row.status === 1 && scope.row.triggerOrigin === 1)
|
||||||
|
"
|
||||||
|
@click="handleClick({ data: scope.row, type: 'edit' })"
|
||||||
|
v-hasPermi="['base:order-manage:edit']">
|
||||||
|
<span
|
||||||
|
class="iconfont icon-edit"
|
||||||
|
:class="
|
||||||
|
!(scope.row.status === 1 && scope.row.triggerOrigin === 1)
|
||||||
|
? ''
|
||||||
|
: 'primary-color'
|
||||||
|
" />
|
||||||
|
</el-button>
|
||||||
|
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
:disabled="scope.row.status != 1"
|
||||||
|
@click="handleClick({ data: scope.row, type: 'void' })"
|
||||||
|
v-hasPermi="['base:order-manage:delete']">
|
||||||
|
作废
|
||||||
|
</el-button>
|
||||||
|
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
@click="handleClick({ data: scope.row, type: 'stop' })"
|
||||||
|
v-hasPermi="['base:order-manage:stop']">
|
||||||
|
终止
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
:page.sync="queryParams.pageNo"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
:total="total"
|
||||||
@pagination="getList" />
|
@pagination="getList" />
|
||||||
<!-- 新增&编辑 -->
|
<!-- 新增&编辑 -->
|
||||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="centervisible" @cancel="handleCancel"
|
<base-dialog
|
||||||
@confirm="handleConfirm" :before-close="handleCancel" width='60%'>
|
:dialogTitle="addOrEditTitle"
|
||||||
|
:dialogVisible="centervisible"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
@confirm="handleConfirm"
|
||||||
|
:before-close="handleCancel"
|
||||||
|
width="60%">
|
||||||
<order-add ref="orderAdd" @successSubmit="successSubmit" />
|
<order-add ref="orderAdd" @successSubmit="successSubmit" />
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
<!-- 查看详情 -->
|
<!-- 查看详情 -->
|
||||||
<!-- 新增工单 -->
|
<!-- 新增工单 -->
|
||||||
<base-dialog :dialogTitle="workIssueTitle" :dialogVisible="addWorkOrdervisible" @cancel="addWorkOrderCancel"
|
<base-dialog
|
||||||
@confirm="addWorkOrderConfirm" :before-close="addWorkOrderCancel" width='70%'>
|
:dialogTitle="workIssueTitle"
|
||||||
<add-work-order ref="addWorkOrder" @addWorkOrderSubmit="addWorkOrderSubmit" />
|
:dialogVisible="addWorkOrdervisible"
|
||||||
|
@cancel="addWorkOrderCancel"
|
||||||
|
@confirm="addWorkOrderConfirm"
|
||||||
|
:before-close="addWorkOrderCancel"
|
||||||
|
width="70%">
|
||||||
|
<add-work-order
|
||||||
|
ref="addWorkOrder"
|
||||||
|
@addWorkOrderSubmit="addWorkOrderSubmit" />
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
<base-dialog :dialogTitle="splitTitle" :dialogVisible="splitWorkOrdervisible" @cancel="splitWorkOrderCancel"
|
<base-dialog
|
||||||
@confirm="splitWorkOrderConfirm" :before-close="splitWorkOrderCancel" width='70%'>
|
:dialogTitle="splitTitle"
|
||||||
<order-split ref="splitWorkOrder" @splitWorkOrderSubmit="splitWorkOrderSubmit" />
|
:dialogVisible="splitWorkOrdervisible"
|
||||||
|
@cancel="splitWorkOrderCancel"
|
||||||
|
@confirm="splitWorkOrderConfirm"
|
||||||
|
:before-close="splitWorkOrderCancel"
|
||||||
|
width="70%">
|
||||||
|
<order-split
|
||||||
|
ref="splitWorkOrder"
|
||||||
|
@splitWorkOrderSubmit="splitWorkOrderSubmit" />
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { parseTime } from '@/utils/ruoyi'
|
import { parseTime } from '@/utils/ruoyi';
|
||||||
import { getOrderPage, orderDelete, customerList, orderFinish, orderVoid, orderStop } from '@/api/base/orderManage'
|
import {
|
||||||
import OrderAdd from './components/orderAdd'
|
getOrderPage,
|
||||||
import orderSplit from './components/orderSplit'
|
orderDelete,
|
||||||
import orderNum from './components/orderNum.vue'
|
orderAssignmentList,
|
||||||
|
orderFinish,
|
||||||
|
orderVoid,
|
||||||
|
orderStop,
|
||||||
|
} from '@/api/base/orderManage';
|
||||||
|
import OrderAdd from './components/orderAdd';
|
||||||
|
import orderSplit from './components/orderSplit';
|
||||||
|
|
||||||
|
import AddWorkOrder from './components/addWorkOrder';
|
||||||
|
|
||||||
import AddWorkOrder from './components/addWorkOrder'
|
|
||||||
import { publicFormatter } from '@/utils/dict'
|
|
||||||
const tableProps = [
|
|
||||||
// {
|
|
||||||
// prop: 'type',
|
|
||||||
// label: '订单类型',
|
|
||||||
// showOverflowtooltip: true
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
prop: 'createTime',
|
|
||||||
label: '添加时间',
|
|
||||||
filter: parseTime,
|
|
||||||
minWidth: 160
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'name',
|
|
||||||
label: '订单名称',
|
|
||||||
minWidth: 120,
|
|
||||||
showOverflowtooltip: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'code',
|
|
||||||
label: '订单编码',
|
|
||||||
minWidth: 160
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'customerName',
|
|
||||||
label: '客户',
|
|
||||||
showOverflowtooltip: true
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// prop: 'priority',
|
|
||||||
// label: '优先级',
|
|
||||||
// filter: publicFormatter('order_priority')
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
prop: 'status',
|
|
||||||
label: '订单状态',
|
|
||||||
filter: publicFormatter('order_status')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'planQuantity',
|
|
||||||
label: '计划加工量',
|
|
||||||
width: 100
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'actualQuantity',
|
|
||||||
label: '实际加工量',
|
|
||||||
width: 100
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'productName',
|
|
||||||
label: '产品',
|
|
||||||
showOverflowtooltip: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'deliveTime',
|
|
||||||
label: '交货时间',
|
|
||||||
filter: parseTime,
|
|
||||||
minWidth: 160
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'workOrderNum',
|
|
||||||
label: '工单数量',
|
|
||||||
subcomponent: orderNum,
|
|
||||||
}
|
|
||||||
]
|
|
||||||
export default {
|
export default {
|
||||||
name: 'OrderManage',
|
name: 'OrderManage',
|
||||||
data() {
|
data() {
|
||||||
@ -112,7 +213,7 @@ export default {
|
|||||||
type: 'input',
|
type: 'input',
|
||||||
label: '订单名称',
|
label: '订单名称',
|
||||||
placeholder: '订单名称',
|
placeholder: '订单名称',
|
||||||
param: 'name'
|
param: 'name',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -120,260 +221,124 @@ export default {
|
|||||||
selectOptions: this.getDictDatas(this.DICT_TYPE.ORDER_STATUS),
|
selectOptions: this.getDictDatas(this.DICT_TYPE.ORDER_STATUS),
|
||||||
labelField: 'label',
|
labelField: 'label',
|
||||||
valueField: 'value',
|
valueField: 'value',
|
||||||
param: 'status'
|
param: 'status',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间段',
|
label: '时间段',
|
||||||
dateType: 'daterange',
|
dateType: 'daterange',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd',
|
||||||
valueFormat: "yyyy-MM-dd",
|
valueFormat: 'yyyy-MM-dd',
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
startPlaceholder: '开始时间',
|
startPlaceholder: '开始时间',
|
||||||
endPlaceholder: '结束时间',
|
endPlaceholder: '结束时间',
|
||||||
param: 'timeVal',
|
param: 'timeVal',
|
||||||
defaultSelect: [],
|
defaultSelect: [],
|
||||||
width: 250
|
width: 250,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
btnName: '查询',
|
btnName: '查询',
|
||||||
name: 'search',
|
name: 'search',
|
||||||
color: 'primary'
|
color: 'primary',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermi('base:order-manage:create') ? 'separate' : '',
|
type: this.$auth.hasPermi('base:order-manage:create')
|
||||||
|
? 'separate'
|
||||||
|
: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermi('base:order-manage:create') ? 'button' : '',
|
type: this.$auth.hasPermi('base:order-manage:create') ? 'button' : '',
|
||||||
btnName: '新增',
|
btnName: '新增',
|
||||||
name: 'add',
|
name: 'add',
|
||||||
color: 'success',
|
color: 'success',
|
||||||
plain: true
|
plain: true,
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
|
loading: false,
|
||||||
splitTitle: '拆分订单',
|
splitTitle: '拆分订单',
|
||||||
splitWorkOrdervisible:false,
|
splitWorkOrdervisible: false,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
name: null,
|
name: null,
|
||||||
status: null,
|
status: null,
|
||||||
lastIssuedTime: []
|
lastIssuedTime: [],
|
||||||
},
|
},
|
||||||
total: 0,
|
total: 0,
|
||||||
tableProps,
|
|
||||||
list: [],
|
list: [],
|
||||||
tableH: this.tableHeight(260),
|
tableH: this.tableHeight(260),
|
||||||
tableBtn: [
|
|
||||||
this.$auth.hasPermi('base:order-manage:split')
|
|
||||||
? {
|
|
||||||
type: 'split',
|
|
||||||
btnName: '拆分订单',
|
|
||||||
showTip: '拆分订单',
|
|
||||||
showParam: {
|
|
||||||
type: '&',
|
|
||||||
data: [
|
|
||||||
{
|
|
||||||
type: 'unequal',
|
|
||||||
name: 'status',
|
|
||||||
value: 5
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'workOrderNum',
|
|
||||||
value: 0
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:order-manage:addWorkOrder')
|
|
||||||
? {
|
|
||||||
type: 'add',
|
|
||||||
btnName: '新增',
|
|
||||||
showTip: '新增工单',
|
|
||||||
showParam: {
|
|
||||||
type: '|',
|
|
||||||
data: [
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'status',
|
|
||||||
value: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'status',
|
|
||||||
value: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'status',
|
|
||||||
value: 3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:order-manage:bindWorkOrder')
|
|
||||||
? {
|
|
||||||
type: 'bind',
|
|
||||||
btnName: '绑定',
|
|
||||||
showTip: '绑定工单',
|
|
||||||
showParam: {
|
|
||||||
type: '|',
|
|
||||||
data: [
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'status',
|
|
||||||
value: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'status',
|
|
||||||
value: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'status',
|
|
||||||
value: 3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:order-manage:bindWorkOrder')
|
|
||||||
? {
|
|
||||||
type: 'complete',
|
|
||||||
btnName: '完成',
|
|
||||||
showTip: '完成订单',
|
|
||||||
showParam: {
|
|
||||||
type: '|',
|
|
||||||
data: [
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'status',
|
|
||||||
value: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'status',
|
|
||||||
value: 3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:order-manage:detail')
|
|
||||||
? {
|
|
||||||
type: 'detail',
|
|
||||||
btnName: '详情'
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:order-manage:edit')
|
|
||||||
? {
|
|
||||||
type: 'edit',
|
|
||||||
btnName: '编辑',
|
|
||||||
showParam: {
|
|
||||||
type: '&',
|
|
||||||
data: [
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'triggerOrigin',
|
|
||||||
value: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'status',
|
|
||||||
value: 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:order-manage:delete')
|
|
||||||
? {
|
|
||||||
type: 'void',
|
|
||||||
btnName: '作废',
|
|
||||||
showParam: {
|
|
||||||
type: '&',
|
|
||||||
data: [
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'status',
|
|
||||||
value: 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:order-manage:stop')
|
|
||||||
? {
|
|
||||||
type: 'stop',
|
|
||||||
btnName: '终止',
|
|
||||||
// showParam: {
|
|
||||||
// type: '&',
|
|
||||||
// data: [
|
|
||||||
// {
|
|
||||||
// type: 'equal',
|
|
||||||
// name: 'status',
|
|
||||||
// value: 1
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
: undefined
|
|
||||||
].filter((v) => v),
|
|
||||||
addOrEditTitle: '',
|
addOrEditTitle: '',
|
||||||
centervisible: false,
|
centervisible: false,
|
||||||
expandedRowKeys:[],
|
expandedRowKeys: [],
|
||||||
priorityList: this.getDictDatas(this.DICT_TYPE.ORDER_PRIORITY),
|
priorityList: this.getDictDatas(this.DICT_TYPE.ORDER_PRIORITY),
|
||||||
workIssueTitle: '',
|
workIssueTitle: '',
|
||||||
addWorkOrdervisible: false,
|
addWorkOrdervisible: false,
|
||||||
orderDetailVisible: false
|
orderDetailVisible: false,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
components: { OrderAdd, AddWorkOrder,orderSplit },
|
components: { OrderAdd, AddWorkOrder, orderSplit },
|
||||||
created() {
|
created() {
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
this.tableH = this.tableHeight(260)
|
this.tableH = this.tableHeight(260);
|
||||||
})
|
});
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async handleRowClick(row) {
|
load(tree, treeNode, resolve) {
|
||||||
console.log(row)
|
setTimeout(() => {
|
||||||
if (!row.children) {
|
getOrderPage({ ...this.queryParams, parentId: tree.id }).then((res) => {
|
||||||
const queryParams = {
|
let arr = res.data.records || [];
|
||||||
pageNo: this.queryParams.pageNo,
|
// if (arr.length > 0) {
|
||||||
pageSize: this.queryParams.pageSize,
|
// arr.forEach((item) => {
|
||||||
name: this.queryParams.name,
|
// item.hasChildren = true;
|
||||||
status: this.queryParams.status,
|
// });
|
||||||
lastIssuedTime: this.queryParams.lastIssuedTime,
|
// } else {
|
||||||
parentId: row.id
|
// this.$message('该条数据无子订单或工单!');
|
||||||
}
|
// }
|
||||||
const response = await getOrderPage(queryParams)
|
resolve(arr);
|
||||||
// row.children = response.data.records
|
});
|
||||||
this.list.forEach((ele) => {
|
}, 1000);
|
||||||
if (ele.id === row.id) {
|
|
||||||
this.$set(this.list[row._pageIndex-1], 'children', response.data.records); // 展开该行
|
|
||||||
}
|
|
||||||
})
|
|
||||||
row.hasChildren = true;
|
|
||||||
this.$set(row, 'expanded', true); // 展开该行
|
|
||||||
} else {
|
|
||||||
row.expanded = !row.expanded; // 切换展开/折叠状态
|
|
||||||
}
|
|
||||||
// this.$nextTick(() => {
|
|
||||||
// const tableInstance = this.$refs.table.getTableRef();
|
|
||||||
// tableInstance.toggleRowExpansion(row);
|
|
||||||
// })
|
|
||||||
},
|
},
|
||||||
|
// async handleRowClick(row) {
|
||||||
|
// console.log(row);
|
||||||
|
// if (!row.children) {
|
||||||
|
// const queryParams = {
|
||||||
|
// pageNo: this.queryParams.pageNo,
|
||||||
|
// pageSize: this.queryParams.pageSize,
|
||||||
|
// name: this.queryParams.name,
|
||||||
|
// status: this.queryParams.status,
|
||||||
|
// lastIssuedTime: this.queryParams.lastIssuedTime,
|
||||||
|
// parentId: row.id,
|
||||||
|
// };
|
||||||
|
// const response = await getOrderPage(queryParams);
|
||||||
|
// // row.children = response.data.records
|
||||||
|
// this.list.forEach((ele) => {
|
||||||
|
// if (ele.id === row.id) {
|
||||||
|
// this.$set(
|
||||||
|
// this.list[row._pageIndex - 1],
|
||||||
|
// 'children',
|
||||||
|
// response.data.records
|
||||||
|
// ); // 展开该行
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// row.hasChildren = true;
|
||||||
|
// this.$set(row, 'expanded', true); // 展开该行
|
||||||
|
// } else {
|
||||||
|
// row.expanded = !row.expanded; // 切换展开/折叠状态
|
||||||
|
// }
|
||||||
|
// // this.$nextTick(() => {
|
||||||
|
// // const tableInstance = this.$refs.table.getTableRef();
|
||||||
|
// // tableInstance.toggleRowExpansion(row);
|
||||||
|
// // })
|
||||||
|
// },
|
||||||
getList() {
|
getList() {
|
||||||
getOrderPage({...this.queryParams}).then(res => {
|
this.loading = true;
|
||||||
let arr = res.data.records || []
|
this.list = [];
|
||||||
this.total = res.data.total || 0
|
getOrderPage({ ...this.queryParams }).then((res) => {
|
||||||
|
let arr = res.data.records || [];
|
||||||
|
this.total = res.data.total || 0;
|
||||||
// if (arr.length > 0) {
|
// if (arr.length > 0) {
|
||||||
// customerList().then(result => {
|
// customerList().then(result => {
|
||||||
// let tempData = result.data || []
|
// let tempData = result.data || []
|
||||||
@ -386,144 +351,178 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// item.price = item.price.toFixed(2)
|
// item.price = item.price.toFixed(2)
|
||||||
// })
|
// })
|
||||||
this.list = arr
|
this.list = arr;
|
||||||
|
this.loading = false;
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
// }else {
|
// }else {
|
||||||
// this.list = arr
|
// this.list = arr
|
||||||
// }
|
// }
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
console.log(val)
|
|
||||||
if (val.btnName === 'search') {
|
if (val.btnName === 'search') {
|
||||||
this.queryParams.name = val.name
|
this.queryParams.name = val.name;
|
||||||
this.queryParams.status = val.status
|
this.queryParams.status = val.status;
|
||||||
if (val.timeVal && val.timeVal.length > 0) {
|
if (val.timeVal && val.timeVal.length > 0) {
|
||||||
this.queryParams.lastIssuedTime[0] = val.timeVal[0] + ' 00:00:00'
|
this.queryParams.lastIssuedTime[0] = val.timeVal[0] + ' 00:00:00';
|
||||||
this.queryParams.lastIssuedTime[1] = val.timeVal[1] + ' 23:59:59'
|
this.queryParams.lastIssuedTime[1] = val.timeVal[1] + ' 23:59:59';
|
||||||
} else {
|
} else {
|
||||||
this.queryParams.lastIssuedTime = []
|
this.queryParams.lastIssuedTime = [];
|
||||||
}
|
}
|
||||||
this.getList()
|
this.getList();
|
||||||
} else {
|
} else {
|
||||||
this.addOrEditTitle = '新增'
|
this.addOrEditTitle = '新增';
|
||||||
this.centervisible = true
|
this.centervisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.orderAdd.init()
|
this.$refs.orderAdd.init();
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleClick(val) {
|
handleClick(val) {
|
||||||
console.log(val)
|
console.log(val);
|
||||||
switch (val.type) {
|
switch (val.type) {
|
||||||
case 'edit':
|
case 'edit':
|
||||||
this.addOrEditTitle = '编辑'
|
this.addOrEditTitle = '编辑';
|
||||||
this.centervisible = true
|
this.centervisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.orderAdd.init(val.data.id)
|
this.$refs.orderAdd.init(val.data.id);
|
||||||
})
|
});
|
||||||
break
|
break;
|
||||||
case 'delete':
|
case 'delete':
|
||||||
this.handleDelete(val.data)
|
this.handleDelete(val.data);
|
||||||
break
|
break;
|
||||||
case 'detail':
|
case 'detail':
|
||||||
this.$router.push({path: 'order-detail-data?orderId='+ val.data.id})
|
this.$router.push({
|
||||||
break
|
path: 'order-detail-data?orderId=' + val.data.id,
|
||||||
|
});
|
||||||
|
break;
|
||||||
case 'add':
|
case 'add':
|
||||||
this.workIssueTitle = '新增工单'
|
this.workIssueTitle = '新增工单';
|
||||||
this.addWorkOrdervisible = true
|
this.addWorkOrdervisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.addWorkOrder.init(val.data, 'add')
|
this.$refs.addWorkOrder.init(val.data, 'add');
|
||||||
})
|
});
|
||||||
break
|
break;
|
||||||
case 'void':
|
case 'void':
|
||||||
orderVoid({ id: val.data.id }).then((res) => {
|
orderVoid({ id: val.data.id }).then((res) => {
|
||||||
console.log(res)
|
console.log(res);
|
||||||
})
|
});
|
||||||
break
|
break;
|
||||||
case 'split':
|
case 'split':
|
||||||
this.splitTitle = '拆分订单'
|
this.splitTitle = '拆分订单';
|
||||||
this.splitWorkOrdervisible = true
|
this.splitWorkOrdervisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.splitWorkOrder.init(val.data)
|
this.$refs.splitWorkOrder.init(val.data);
|
||||||
})
|
});
|
||||||
// orderVoid({ id: val.data.id }).then((res) => {
|
// orderVoid({ id: val.data.id }).then((res) => {
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
// })
|
// })
|
||||||
break
|
break;
|
||||||
case 'bind':
|
case 'bind':
|
||||||
this.workIssueTitle = '绑定工单'
|
this.workIssueTitle = '绑定工单';
|
||||||
this.addWorkOrdervisible = true
|
this.addWorkOrdervisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.addWorkOrder.init(val.data, 'bind')
|
this.$refs.addWorkOrder.init(val.data, 'bind');
|
||||||
})
|
});
|
||||||
break
|
break;
|
||||||
case 'complete':
|
case 'complete':
|
||||||
this.handleComplete(val.data)
|
this.handleComplete(val.data);
|
||||||
break
|
break;
|
||||||
case 'stop':
|
case 'stop':
|
||||||
orderStop({ id: val.data.id }).then((res) => {
|
orderStop({ id: val.data.id }).then((res) => {
|
||||||
this.getList()
|
this.getList();
|
||||||
})
|
});
|
||||||
break
|
break;
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
handleDelete(val) {
|
handleDelete(val) {
|
||||||
this.$modal.confirm('是否确认删除"' + val.name + '"的数据项?').then(function() {
|
this.$modal
|
||||||
return orderDelete({ id: val.id })
|
.confirm('是否确认删除"' + val.name + '"的数据项?')
|
||||||
}).then(() => {
|
.then(function () {
|
||||||
|
return orderDelete({ id: val.id });
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess('操作成功');
|
||||||
}).catch(() => {});
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
// 完成
|
// 完成
|
||||||
handleComplete(val) {
|
handleComplete(val) {
|
||||||
this.$modal.confirm('是否确认完成订单"' + val.name + '"?').then(function() {
|
this.$modal
|
||||||
return orderFinish({ id: val.id })
|
.confirm('是否确认完成订单"' + val.name + '"?')
|
||||||
}).then(() => {
|
.then(function () {
|
||||||
|
return orderFinish({ id: val.id });
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess('操作成功');
|
||||||
}).catch(() => {});
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
// 新增
|
// 新增
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.$refs.orderAdd.formClear()
|
this.$refs.orderAdd.formClear();
|
||||||
this.centervisible = false
|
this.centervisible = false;
|
||||||
this.addOrEditTitle = ''
|
this.addOrEditTitle = '';
|
||||||
},
|
},
|
||||||
handleConfirm() {
|
handleConfirm() {
|
||||||
this.$refs.orderAdd.submitForm()
|
this.$refs.orderAdd.submitForm();
|
||||||
},
|
},
|
||||||
successSubmit() {
|
successSubmit() {
|
||||||
this.handleCancel()
|
this.handleCancel();
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
// 下发新增
|
// 下发新增
|
||||||
addWorkOrderCancel() {
|
addWorkOrderCancel() {
|
||||||
this.$refs.addWorkOrder.formClear()
|
this.$refs.addWorkOrder.formClear();
|
||||||
this.addWorkOrdervisible = false
|
this.addWorkOrdervisible = false;
|
||||||
},
|
},
|
||||||
addWorkOrderConfirm() {
|
addWorkOrderConfirm() {
|
||||||
this.$refs.addWorkOrder.addWorkOrderSubmit()
|
this.$refs.addWorkOrder.addWorkOrderSubmit();
|
||||||
},
|
},
|
||||||
addWorkOrderSubmit() {
|
addWorkOrderSubmit() {
|
||||||
this.addWorkOrderCancel()
|
this.addWorkOrderCancel();
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
splitWorkOrderCancel() {
|
splitWorkOrderCancel() {
|
||||||
this.$refs.splitWorkOrder.formClear()
|
this.$refs.splitWorkOrder.formClear();
|
||||||
this.splitWorkOrdervisible = false
|
this.splitWorkOrdervisible = false;
|
||||||
},
|
},
|
||||||
splitWorkOrderConfirm() {
|
splitWorkOrderConfirm() {
|
||||||
this.$refs.splitWorkOrder.submitForm()
|
this.$refs.splitWorkOrder.submitForm();
|
||||||
},
|
},
|
||||||
splitWorkOrderSubmit() {
|
splitWorkOrderSubmit() {
|
||||||
this.splitWorkOrderCancel()
|
this.splitWorkOrderCancel();
|
||||||
this.getList()
|
this.getList();
|
||||||
|
},
|
||||||
|
async handleRoute() {
|
||||||
|
const res = await orderAssignmentList({
|
||||||
|
orderIdList: [this.injectData.id],
|
||||||
|
});
|
||||||
|
console.log(res.data);
|
||||||
|
let arr = [];
|
||||||
|
res.data[this.injectData.id].forEach((ele) => {
|
||||||
|
arr.push(ele.workOrderId);
|
||||||
|
});
|
||||||
|
let woIdString = arr.join(',');
|
||||||
|
console.log(woIdString);
|
||||||
|
|
||||||
|
this.$router.push({
|
||||||
|
path: '/produce/core-work-order-detail?woIdString=' + woIdString,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
tableRowClassName({ row, rowIndex }) {
|
||||||
|
if (row.grade === 2) {
|
||||||
|
return 'warning-row';
|
||||||
|
} else if (row.grade === 3) {
|
||||||
|
return 'success-row';
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
|
},
|
||||||
// bindWorkOrderCancel() {
|
// bindWorkOrderCancel() {
|
||||||
// this.$refs.bindWorkOrder.formClear()
|
// this.$refs.bindWorkOrder.formClear()
|
||||||
// this.bindWorkOrdervisible = false
|
// this.bindWorkOrdervisible = false
|
||||||
@ -535,6 +534,40 @@ export default {
|
|||||||
// this.bindWorkOrderCancel()
|
// this.bindWorkOrderCancel()
|
||||||
// this.getList()
|
// this.getList()
|
||||||
// }
|
// }
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.iconfont {
|
||||||
|
font-family: 'iconfont' !important;
|
||||||
|
font-size: 16px;
|
||||||
|
font-style: normal;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
.delete-color {
|
||||||
|
color: #ff5454;
|
||||||
|
}
|
||||||
|
.primary-color {
|
||||||
|
color: #0b58ff;
|
||||||
|
}
|
||||||
|
.icon-detail:before {
|
||||||
|
content: '\e601';
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-edit:before {
|
||||||
|
content: '\e602';
|
||||||
|
}
|
||||||
|
|
||||||
|
.orderTable >>> .warning-row {
|
||||||
|
background: oldlace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.orderTable >>> .success-row {
|
||||||
|
background: #f0f9eb;
|
||||||
|
}
|
||||||
|
.orderTable >>> tbody tr:hover > td {
|
||||||
|
background-color: unset !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -38,9 +38,16 @@
|
|||||||
{{ 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">
|
||||||
|
{{
|
||||||
|
orderMsg.materialMethod
|
||||||
|
? orderMsg.materialMethod === 1
|
||||||
|
? '产品基础'
|
||||||
|
: '工艺扩展'
|
||||||
|
: ''
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="3">
|
<!-- <el-col :span="3">
|
||||||
@ -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,12 +313,10 @@ 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) {
|
||||||
@ -313,12 +326,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
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