projects/mes-test #133

Merged
gtz217 merged 281 commits from projects/mes-test into projects/mes 2023-11-30 09:11:34 +08:00
10 changed files with 750 additions and 43 deletions
Showing only changes of commit e5966c27a3 - Show all commits

View File

@ -1,7 +1,7 @@
###
# @Author: Do not edit
# @Date: 2023-08-29 09:40:39
# @LastEditTime: 2023-11-15 14:37:35
# @LastEditTime: 2023-11-15 17:25:58
# @LastEditors: DY
# @Description:
###
@ -13,13 +13,13 @@ VUE_APP_TITLE = MES系统
# 芋道管理系统/开发环境
# VUE_APP_BASE_API = 'http://100.64.0.26:48082'
# VUE_APP_BASE_API = 'http://192.168.0.33: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.49:48080'
# VUE_APP_BASE_API = 'http://192.168.1.8:48080'
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
VUE_APP_BASE_API = 'http://192.168.1.56:48080'
# VUE_APP_BASE_API = 'http://192.168.1.56:48080'
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@ -0,0 +1,68 @@
/*
* @Author: Do not edit
* @Date: 2023-10-21 11:50:46
* @LastEditTime: 2023-11-15 15:56:14
* @LastEditors: DY
* @Description:
*/
import request from '@/utils/request'
// 创建原料
export function createHotMaterial(data) {
return request({
url: '/base/core-hot-material/create',
method: 'post',
data: data
})
}
// 更新原料
export function updateHotMaterial(data) {
return request({
url: '/base/core-hot-material/update',
method: 'put',
data: data
})
}
// 删除原料
export function deleteHotMaterial(id) {
return request({
url: '/base/core-hot-material/delete?id=' + id,
method: 'delete'
})
}
// 获得原料
export function getHotMaterial(id) {
return request({
url: '/base/core-hot-material/get?id=' + id,
method: 'get'
})
}
// 获得原料code
export function getCode() {
return request({
url: '/base/core-hot-material/getCode',
method: 'get'
})
}
// 获得原料分页
export function getHotMaterialPage(query) {
return request({
url: '/base/core-hot-material/page',
method: 'get',
params: query
})
}
// 获得所有列表
export function getHotMaterialList(query) {
return request({
url: '/base/core-hot-material/listAll',
method: 'get',
params: query
})
}

View File

@ -1,7 +1,7 @@
/*
* @Author: Do not edit
* @Date: 2023-10-21 11:50:46
* @LastEditTime: 2023-11-15 10:44:41
* @LastEditTime: 2023-11-15 17:19:19
* @LastEditors: DY
* @Description:
*/
@ -144,3 +144,12 @@ export function statusChange(data) {
data: data
})
}
// 创建分配产量
export function createConCoreWOr(data) {
return request({
url: '/base/core-order-con-work-order/create',
method: 'post',
data: data
})
}

View File

@ -0,0 +1,86 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-15 16:23:49
* @Description:
-->
<template>
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="100px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="原料名称" prop="name">
<el-input v-model="dataForm.name" clearable placeholder="请输入原料名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="原料编号" prop="code">
<el-input v-model="dataForm.code" clearable placeholder="请输入原料编号" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="每日消耗量" prop="dailyCost">
<el-input-number v-model="dataForm.dailyCost" controls-position="right" clearable placeholder="请输入每日消耗量" style="width: 100%" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="单位" prop="unit">
<el-select
v-model="dataForm.unit"
filterable
style="width: 100%"
placeholder="请选择单位">
<el-option
v-for="dict in getDictDatas('unit_dict')"
:key="dict.value"
:label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
import basicAdd from '../../core/mixins/basic-add';
import { createHotMaterial, updateHotMaterial, getHotMaterial, getCode } from "@/api/base/coreHotMaterial";
import { getDictDatas} from "@/utils/dict";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
isGetCode: true,
codeURL: getCode,
createURL: createHotMaterial,
updateURL: updateHotMaterial,
infoURL: getHotMaterial,
},
dataForm: {
id: undefined,
code: undefined,
name: undefined,
unit: undefined,
dailyCost: undefined
},
departmentlList: [],
menuOptions: [],
dataRule: {
code: [{ required: true, message: "原料编码不能为空", trigger: "blur" }],
name: [{ required: true, message: "原料名称不能为空", trigger: "blur" }]
}
};
},
mounted() {},
methods: {}
};
</script>

View File

@ -0,0 +1,178 @@
<template>
<div class="app-container">
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick" />
<base-table
v-loading="dataListLoading"
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:table-data="tableData">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="120"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" />
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width="50%">
<add-or-update
ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div>
</template>
<script>
import AddOrUpdate from './add-or-updata';
import basicPage from '../../core/mixins/basic-page';
import { parseTime } from '../../core/mixins/code-filter';
import { getHotMaterialPage, deleteHotMaterial } from '@/api/base/coreHotMaterial';
import { publicFormatter } from "@/utils/dict";
const tableProps = [
{
prop: 'createTime',
label: '添加时间',
filter: parseTime
},
{
prop: 'name',
label: '原料名称'
},
{
prop: 'code',
label: '原料编码'
},
{
prop: 'unit',
label: '单位',
filter: publicFormatter('unit_dict')
},
{
prop: 'dailyCost',
label: '每日消耗量'
},
{
prop: 'remark',
label: '备注'
},
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: getHotMaterialPage,
deleteURL: deleteHotMaterial
},
tableProps,
tableBtn: [
this.$auth.hasPermi(`base:core-hot-material:update`)
? {
type: 'edit',
btnName: '编辑',
}
: undefined,
this.$auth.hasPermi(`base:core-hot-material:delete`)
? {
type: 'delete',
btnName: '删除',
}
: undefined,
].filter((v)=>v),
tableData: [],
formConfig: [
{
type: 'input',
label: '原料名称',
placeholder: '原料名称',
param: 'name',
},
{
type: 'input',
label: '原料编码',
placeholder: '原料编码',
param: 'code',
},
{
type: 'button',
btnName: '查询',
name: 'search',
color: 'primary',
},
{
type: 'separate',
},
{
type: this.$auth.hasPermi('base:core-hot-material:create') ? 'button' : '',
btnName: '新增',
name: 'add',
color: 'success',
plain: true
},
],
};
},
components: {
AddOrUpdate,
},
created() {},
methods: {
//
// getDataList() {
// this.dataListLoading = true;
// this.urlOptions.getDataListURL(this.listQuery).then(response => {
// this.tableData = response.data.list;
// this.listQuery.total = response.data.total;
// this.dataListLoading = false;
// });
// },
buttonClick(val) {
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.name = val.name ? val.name : undefined;
this.listQuery.code = val.code ? val.code : undefined;
this.getDataList();
break;
case 'reset':
this.$refs.searchBarForm.resetForm();
this.listQuery = {
pageSize: 10,
pageNo: 1,
total: 1,
};
this.getDataList();
break;
case 'add':
this.addOrEditTitle = '新增';
this.addOrUpdateVisible = true;
this.addOrUpdateHandle();
break;
case 'export':
this.handleExport();
break;
default:
console.log(val);
}
},
},
};
</script>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-15 10:32:19
* @LastEditTime: 2023-11-15 15:41:44
* @Description:
-->
<template>
@ -11,7 +11,7 @@
:show-close="false"
:wrapper-closable="false"
class="drawer"
size="50%">
size="60%">
<small-title slot="title" :no-padding="true">
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
</small-title>
@ -25,12 +25,12 @@
label-width="100px"
label-position="top">
<el-row :gutter="20">
<el-col :span="12">
<el-col :span="8">
<el-form-item label="产品名称" prop="name">
<el-input v-model="dataForm.name" :disabled="isdetail" clearable placeholder="请输入产品名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="8">
<el-form-item label="产品编码" prop="code">
<el-input
v-model="dataForm.code"
@ -39,9 +39,7 @@
placeholder="请输入产品编码" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-col :span="8">
<el-form-item label="物料类型" prop="materialType">
<el-select
v-model="dataForm.materialType"
@ -57,7 +55,9 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="产品类型" prop="productType">
<el-select
v-model="dataForm.productType"
@ -73,9 +73,7 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-col :span="8">
<el-form-item label="单位" prop="unit">
<el-select
v-model="dataForm.unit"
@ -91,31 +89,34 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="8">
<el-form-item label="单位平方数" prop="area">
<el-input-number v-model="dataForm.area" :precision="2" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入单位平方数" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-col :span="8">
<el-form-item label="规格" prop="specifications">
<el-input v-model="dataForm.specifications" :disabled="isdetail" clearable placeholder="请输入规格" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="8">
<el-form-item label="产线生产单位用时(S)" prop="processTime">
<el-input v-model.number="dataForm.processTime" type="number" :disabled="isdetail" clearable placeholder="请输入产线生产单位用时" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" :disabled="isdetail" clearable placeholder="请输入备注" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" :disabled="isdetail" clearable placeholder="请输入备注" />
</el-form-item>
</el-form>
</div>
<div class="drawer-body__footer">
<el-button style="" @click="goback()">取消</el-button>
<el-button v-if="!idAttrShow" @click="goback()">取消</el-button>
<el-button v-else :disabled="isdetail" @click="init(dataForm.id)">重置</el-button>
<el-button v-if="isdetail" type="primary" @click="goEdit()">
编辑
</el-button>
@ -359,7 +360,31 @@ export default {
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id);
});
}
},
//
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
//
if (this.dataForm.id) {
this.urlOptions.updateURL(this.dataForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.visible = false;
this.$emit("refreshDataList");
});
return;
}
//
this.urlOptions.createURL(this.dataForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.idAttrShow = true
// this.visible = false;
this.$emit("refreshDataList");
});
});
}
}
};
</script>
@ -388,7 +413,7 @@ export default {
.drawer >>> .content {
padding: 30px 24px;
flex: 1;
/* flex: 1; */
display: flex;
flex-direction: column;
/* height: 100%; */
@ -414,7 +439,7 @@ export default {
}
.action_btn {
float: right;
margin: 5px 15px;
margin: -32px 15px 0;
font-size: 14px;
}
.add {

View File

@ -26,7 +26,7 @@
<add-or-update
v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="successSubmit" />
@refreshDataList="getDataList" />
</div>
</template>

View File

@ -70,7 +70,7 @@
<el-row>
<el-col :span='12'>
<el-form-item label="关联工艺" prop="processFlowId">
<el-select v-model="dataForm.processFlowId" placeholder="请选择" style="width: 100%;">
<el-select v-model="dataForm.processFlowId" placeholder="请选择工艺" clearable filterable style="width: 100%;" @change="processFlowIdChange">
<el-option
v-for="item in processFlowList"
:key="item.id"
@ -82,7 +82,7 @@
</el-col>
<el-col :span='12'>
<el-form-item label="物料计算方式" prop="materialMethod">
<el-radio-group v-model="dataForm.materialMethod">
<el-radio-group v-model="dataForm.materialMethod" @change="materialMethodChange">
<el-radio :label="1">产品基础</el-radio>
<el-radio :label="2">工艺扩展</el-radio>
</el-radio-group>
@ -192,8 +192,8 @@ export default {
processFlowList: [],
productLineList: [],
workOrderTypeList: [
{id: 1,name:'标准工单'},
{id: 2, name:'特殊工单'}
{id: 1,name:'普通'},
{id: 2, name:'特殊'}
],
planStartTime: '',
planFinishTime: '',
@ -205,6 +205,20 @@ export default {
this.getDict()
},
methods: {
//
materialMethodChange(val) {
if (val === 2 && !this.dataForm.processFlowId) {
this.dataForm.materialMethod = 1
this.$modal.msgError("请先选择关联工艺");
}
},
//
processFlowIdChange(val) {
console.log(val)
if (!val) {
this.dataForm.materialMethod = 1
}
},
init(id) {
this.dataForm.id = id || "";
this.visible = true;

View File

@ -0,0 +1,298 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-15 17:45:04
* @Description:
-->
<template>
<el-drawer
:visible.sync="visible"
:show-close="false"
:wrapper-closable="false"
class="drawer"
size="55%">
<small-title slot="title" :no-padding="true">
{{ '分配产量' }}
</small-title>
<div class="content">
<div class="formContent">
<el-row :gutter="20">
<el-col :span="12">工单名称:{{ dataForm.name }}</el-col>
<el-col :span="12">工单编码:{{ dataForm.code }}</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">产品名称:{{ dataForm.productName }}</el-col>
<el-col :span="12">产品规格:{{ dataForm.specifications }}</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">实际生产数量:{{ dataForm.expectedTime }}</el-col>
</el-row>
</div>
<div class="attr-list">
<!-- <el-button v-show="!isdetail" type="success" size="small" style="float: right" @click="addRow()">添加一行</el-button> -->
<el-table
:data="tableData"
style="width: 100%">
<el-table-column type="index" label="序号" />
<el-table-column prop="orderName" label="订单名称" />
<el-table-column prop="orderCode" label="订单编码" />
<el-table-column prop="priority" label="优先级" />
<el-table-column prop="planAssignmentQuantity" label="计划分配数量" >
<template slot-scope="scope">
<el-input v-model="scope.row.planAssignmentQuantity"></el-input>
</template>
</el-table-column>
<el-table-column prop="actualAssignmentQuantity" label="实际分配数量">
<template slot-scope="scope">
<el-input v-model="scope.row.actualAssignmentQuantity"></el-input>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="saveData(scope.row)">保存</el-button>
<!-- <el-tooltip v-if="!scope.row.isEdit" placement="top" content="编辑">
<el-button
type="text"
:style="{color:'#0B58FF'}"
size="mini"
@click="edit(scope.row)"
>
<svg-icon style="width: 18px; height: 18px" class="item-icon" icon-class="edit" />
</el-button>
</el-tooltip> -->
<!-- <el-tooltip placement="top" content="删除">
<el-button
type="text"
:style="{color:'#FF5454'}"
size="mini"
@click="deleteDetail(scope.row)"
>
<svg-icon style="width: 18px; height: 18px" class="item-icon" icon-class="table_delete" />
</el-button>
</el-tooltip> -->
</template>
</el-table-column>
</el-table>
<pagination
v-show="listQuery.total > 0"
:total="listQuery.total"
:page.sync="listQuery.pageNo"
:limit.sync="listQuery.pageSize"
:page-sizes="[5, 10, 15]"
@pagination="getList" />
</div>
<div class="drawer-body__footer">
<el-button style="" type="primary" @click="goback()">关闭</el-button>
<!-- <el-button v-if="isdetail" type="primary" @click="goEdit()">
编辑
</el-button>
<el-button v-else type="primary" @click="dataFormSubmit()">确定</el-button> -->
</div>
</div>
<!-- <attr-add
v-if="addOrUpdateVisible"
ref="addOrUpdate"
:material-id="dataForm.id"
@refreshDataList="getList" /> -->
</el-drawer>
</template>
<script>
import basicAdd from '../../core/mixins/basic-add';
import { getConOrderList, createConCoreWOr, getCoreWO } from '@/api/base/coreWorkOrder';
import SmallTitle from '../material/SmallTitle';
// import { parseTime } from '../../core/mixins/code-filter';
// import attrAdd from './attr-add';
export default {
mixins: [basicAdd],
components: { SmallTitle },
data() {
return {
addOrUpdateVisible: false,
urlOptions: {
infoURL: getCoreWO,
},
listQuery: {
pageSize: 10,
pageNo: 1,
total: 0,
},
dataForm: {
id: undefined,
code: undefined,
productId: '',
remark: undefined,
},
productList: [],
materialAttrList: [],
materialList: [],
tableData: [],
visible: false,
isdetail: false,
idAttrShow: false
};
},
mounted() {},
methods: {
initData() {
// this.materialAttrList.splice(0);
this.listQuery.total = 0;
},
edit(row) {
row.isEdit = true
},
saveData(row) {
if (row.actualAssignmentQuantity) {
if (row.id) {
// updateMaterialPBDet({
// ...row
// }).then((response) => {
// this.$modal.msgSuccess('');
// // this.visible = false;
// this.getList();
// });
// return;
}
//
createConCoreWOr({
...row,
workOrderId: this.dataForm.id
}).then((response) => {
this.$modal.msgSuccess('分配成功');
// this.visible = false;
this.getList();
});
} else {
this.$message.warning('请填写实际分配数量');
}
},
getList() {
// Bom
getConOrderList({
...this.listQuery,
workOrderId: this.dataForm.id
}).then((response) => {
this.tableData = response.data.map(item => {
item.isEdit = false
return item
});
this.listQuery.total = response.data.total;
});
},
//
// addRow() {
// const row = {
// bomId: this.dataForm.id,
// materialId: '',
// num: 0,
// materialCode: undefined,
// unit: undefined,
// remark: '',
// isEdit: true
// }
// this.tableData.push(row)
// },
init(id, isdetail) {
this.initData();
this.isdetail = isdetail || false;
this.dataForm.id = id || undefined;
this.visible = true;
// if (id) {
// this.idAttrShow = true
// } else {
// this.idAttrShow = false
// }
this.$nextTick(() => {
// this.$refs['dataForm'].resetFields();
if (this.dataForm.id) {
//
this.urlOptions.infoURL(id).then(response => {
this.dataForm = response.data;
});
//
this.getList();
} else {}
});
},
goback() {
this.$emit('refreshDataList');
this.visible = false;
// this.initData();
},
goEdit() {
this.isdetail = false;
},
// /
addNew(id) {
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id);
});
}
}
};
</script>
<style scoped>
.drawer >>> .el-drawer {
border-radius: 8px 0 0 8px;
display: flex;
flex-direction: column;
}
.drawer >>> .el-form-item__label {
padding: 0;
}
.drawer >>> .el-drawer__header {
margin: 0;
padding: 32px 32px 24px;
border-bottom: 1px solid #dcdfe6;
}
.drawer >>> .el-drawer__body {
flex: 1;
height: 1px;
display: flex;
flex-direction: column;
}
.drawer >>> .content {
padding: 30px 24px;
flex: 1;
display: flex;
flex-direction: column;
/* height: 100%; */
}
.drawer >>> .visual-part {
flex: 1 auto;
max-height: 30vh;
overflow: hidden;
overflow-y: scroll;
padding-right: 10px; /* 调整滚动条样式 */
}
.drawer >>> .el-form,
.drawer >>> .attr-list {
padding: 0 16px;
}
.drawer-body__footer {
display: flex;
justify-content: flex-end;
padding: 18px;
}
.formContent {
font-size: 16px;
line-height: 1.5;
margin-bottom: 10px;
width: 100%;
}
</style>

View File

@ -39,24 +39,25 @@
v-if="materialVisible"
ref="material"
@refreshDataList="closeDetail"></add-or-update>
<!-- 查看详情 -->
<!-- <detail
v-if="detailVisible"
ref="detail"
@refreshDataList="closeDetail"></detail> -->
<!-- 分配产量 -->
<allocation
v-if="allocationVisible"
ref="allocation"
@refreshDataList="getDataList" />
</div>
</template>
<script>
import AddOrUpdate from './add-or-updata';
import AddWorkOrder from './addWorkOrder'
// import Detail from './detail.vue';
import Allocation from './allocation.vue';
import basicPage from '../../core/mixins/basic-page';
import { parseTime } from '../../core/mixins/code-filter';
import {
getCoreWOPage,
deleteCoreWO,
statusChange
statusChange,
getConOrderList
} from '@/api/base/coreWorkOrder';
@ -112,7 +113,8 @@ export default {
mixins: [basicPage],
components: {
AddWorkOrder,
AddOrUpdate
AddOrUpdate,
Allocation
},
data() {
return {
@ -122,6 +124,7 @@ export default {
},
detailVisible: false,
materialVisible: false,
allocationVisible: false,
tableProps,
tableBtn: [
this.$auth.hasPermi(`base:core-work-order:update`)
@ -359,18 +362,22 @@ export default {
}
console.log('22',val)
this.$confirm(`确定对${'[工单名称=' + val.data.name + ']'}进行${val.type}操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
statusChange(param).then(({ data }) => {
this.$message({
message: '暂停成功!',
message: '操作成功!',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList();
//
if (param.status === 4) {
this.allocationOrder(param);
}
},
});
});
@ -378,6 +385,28 @@ export default {
.catch(() => { });
}
},
allocationOrder(val) {
//
getConOrderList({
workOrderId: val.id,
}).then((response) => {
if (response.data.length > 0) {
this.$confirm('工单结束,可分配产量', "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.allocationVisible = true;
this.$nextTick(() => {
this.$refs.allocation.init(val.id, true);
});
})
.catch(() => { });
}
// this.listQuery.total = response.data.total;
});
},
buttonClick(val) {
switch (val.btnName) {
case 'search':