commit
417df95800
44
src/api/mes/pro/processType.js
Normal file
44
src/api/mes/pro/processType.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询工序类型列表
|
||||
export function listMachinerytype(query) {
|
||||
return request({
|
||||
url: '/process/type/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询工序类型详细
|
||||
export function getMachinerytype(processTypeld) {
|
||||
return request({
|
||||
url: '/process/type/' + processTypeld,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增工序类型
|
||||
export function addMachinerytype(data) {
|
||||
return request({
|
||||
url: '/process/type/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改工序类型
|
||||
export function updateMachinerytype(data) {
|
||||
return request({
|
||||
url: '/process/type/edit',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除工序类型
|
||||
export function delMachinerytype(processTypeld) {
|
||||
return request({
|
||||
url: '/process/type/' + processTypeld,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
@ -34,7 +34,7 @@
|
||||
|
||||
<div class="right-menu">
|
||||
<template v-if="device !== 'mobile'">
|
||||
<search id="header-search" class="right-menu-item" />
|
||||
<!-- <search id="header-search" class="right-menu-item" /> -->
|
||||
|
||||
<!-- <el-tooltip content="源码地址" effect="dark" placement="bottom">
|
||||
<ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
|
||||
@ -46,9 +46,9 @@
|
||||
|
||||
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
||||
|
||||
<el-tooltip content="布局大小" effect="dark" placement="bottom">
|
||||
<!-- <el-tooltip content="布局大小" effect="dark" placement="bottom">
|
||||
<size-select id="size-select" class="right-menu-item hover-effect" />
|
||||
</el-tooltip>
|
||||
</el-tooltip> -->
|
||||
</template>
|
||||
|
||||
<el-dropdown
|
||||
|
@ -232,7 +232,6 @@
|
||||
:options="machineryTypeOptions"
|
||||
:normalizer="normalizer"
|
||||
placeholder="请选择所属分类"
|
||||
:disable-branch-nodes="true"
|
||||
@select="handleNodeClick"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
@ -324,7 +324,6 @@
|
||||
:normalizer="normalizer"
|
||||
placeholder="请选择所属分类"
|
||||
v-else
|
||||
:disable-branch-nodes="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -242,7 +242,7 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料/产品分类" prop="itemTypeId">
|
||||
<treeselect v-model="form.itemTypeId" :options="itemTypeOptions" :show-count="true" disabled v-if="optType=='view'" />
|
||||
<treeselect v-model="form.itemTypeId" :options="itemTypeOptions" :show-count="true" placeholder="请选择所属分类" v-else :disable-branch-nodes="true"/>
|
||||
<treeselect v-model="form.itemTypeId" :options="itemTypeOptions" :show-count="true" placeholder="请选择所属分类" v-else/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -249,7 +249,7 @@
|
||||
<WorkStationMachine ref="machineryList" :optType="optType" :workstationId="form.workstationId" style="align:center"></WorkStationMachine>
|
||||
</el-card>
|
||||
</el-carousel-item>
|
||||
<el-carousel-item>
|
||||
<!-- <el-carousel-item>
|
||||
<el-card shadow="always" style="width:400px">
|
||||
<div slot="header">
|
||||
<span>人力资源</span>
|
||||
@ -257,8 +257,8 @@
|
||||
</div>
|
||||
<Workstationworker ref="postList" :optType="optType" :workstationId="form.workstationId"></Workstationworker>
|
||||
</el-card>
|
||||
</el-carousel-item>
|
||||
<el-carousel-item>
|
||||
</el-carousel-item> -->
|
||||
<!-- <el-carousel-item>
|
||||
<el-card shadow="always" style="width:400px">
|
||||
<div slot="header">
|
||||
<span>工装夹具</span>
|
||||
@ -266,7 +266,7 @@
|
||||
</div>
|
||||
<WorkStationTool ref="toolList" :optType="optType" :workstationId="form.workstationId"></WorkStationTool>
|
||||
</el-card>
|
||||
</el-carousel-item>
|
||||
</el-carousel-item> -->
|
||||
</el-carousel>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -1,122 +1,196 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item label="工序编码" prop="processCode">
|
||||
<el-input
|
||||
v-model="queryParams.processCode"
|
||||
placeholder="请输入工序编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工序名称" prop="processName">
|
||||
<el-input
|
||||
v-model="queryParams.processName"
|
||||
placeholder="请输入工序名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用" prop="enableFlag">
|
||||
<el-input
|
||||
v-model="queryParams.enableFlag"
|
||||
placeholder="请输入是否启用"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="20">
|
||||
<!--分类数据-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<div class="head-container">
|
||||
<el-input
|
||||
v-model="processTypeName"
|
||||
placeholder="请输入类型名称"
|
||||
clearable
|
||||
size="small"
|
||||
prefix-icon="el-icon-search"
|
||||
style="margin-bottom: 20px"
|
||||
/>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-tree
|
||||
:data="machineryTypeOptions"
|
||||
:props="defaultPropss"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
ref="tree"
|
||||
default-expand-all
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="20" :xs="24">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="工序编码" prop="processCode">
|
||||
<el-input
|
||||
v-model="queryParams.processCode"
|
||||
placeholder="请输入工序编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工序名称" prop="processName">
|
||||
<el-input
|
||||
v-model="queryParams.processName"
|
||||
placeholder="请输入工序名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用" prop="enableFlag">
|
||||
<el-input
|
||||
v-model="queryParams.enableFlag"
|
||||
placeholder="请输入是否启用"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['mes:pro:process:add']"
|
||||
>新增</el-button>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['mes:pro:process:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['mes:pro:process:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['mes:pro:process:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['mes:pro:process:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="processList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="工序编码" align="center" prop="processCode">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['mes:pro:process:query']"
|
||||
>{{ scope.row.processCode }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="工序名称"
|
||||
align="center"
|
||||
prop="processName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="是否启用" align="center" prop="enableFlag">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag
|
||||
:options="dict.type.sys_yes_no"
|
||||
:value="scope.row.enableFlag"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
align="center"
|
||||
prop="remark"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:pro:process:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mes:pro:process:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['mes:pro:process:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['mes:pro:process:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['mes:pro:process:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="processList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="工序编码" align="center" prop="processCode" >
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['mes:pro:process:query']"
|
||||
>{{scope.row.processCode}}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名称" align="center" prop="processName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="是否启用" align="center" prop="enableFlag">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.enableFlag"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:pro:process:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mes:pro:process:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@ -129,38 +203,70 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="工序编码" prop="processCode">
|
||||
<el-input v-model="form.processCode" placeholder="请输入工序编码" />
|
||||
<el-input
|
||||
v-model="form.processCode"
|
||||
placeholder="请输入工序编码"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label-width="80">
|
||||
<el-switch v-model="autoGenFlag"
|
||||
active-color="#13ce66"
|
||||
active-text="自动生成"
|
||||
@change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view'">
|
||||
<el-form-item label-width="80">
|
||||
<el-switch
|
||||
v-model="autoGenFlag"
|
||||
active-color="#13ce66"
|
||||
active-text="自动生成"
|
||||
@change="handleAutoGenChange(autoGenFlag)"
|
||||
v-if="optType != 'view'"
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="工序名称" prop="processName">
|
||||
<el-input v-model="form.processName" placeholder="请输入工序名称" />
|
||||
<el-input
|
||||
v-model="form.processName"
|
||||
placeholder="请输入工序名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="工序类型" prop="processTypeId">
|
||||
<treeselect
|
||||
v-model="form.processTypeId"
|
||||
:options="machineryTypeOptions"
|
||||
:normalizer="normalizer"
|
||||
v-if="optType == 'view'"
|
||||
/>
|
||||
<treeselect
|
||||
v-model="form.processTypeId"
|
||||
:options="machineryTypeOptions"
|
||||
:normalizer="normalizer"
|
||||
placeholder="请选择所属分类"
|
||||
v-else
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="是否启用" prop="enableFlag">
|
||||
<el-radio-group v-model="form.enableFlag" disabled v-if="optType=='view'">
|
||||
<el-radio-group
|
||||
v-model="form.enableFlag"
|
||||
disabled
|
||||
v-if="optType == 'view'"
|
||||
>
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
>{{ dict.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
<el-radio-group v-model="form.enableFlag" v-else>
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
>{{ dict.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -168,22 +274,38 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="工序说明" prop="attention">
|
||||
<el-input v-model="form.attention" type="textarea" placeholder="请输入内容" />
|
||||
<el-input
|
||||
v-model="form.attention"
|
||||
type="textarea"
|
||||
placeholder="请输入内容"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
<el-input
|
||||
v-model="form.remark"
|
||||
type="textarea"
|
||||
placeholder="请输入内容"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-divider content-position="center" v-if="form.processId !=null">操作步骤</el-divider>
|
||||
<Processcontent v-if="form.processId !=null" :optType="optType" :processId="form.processId"></Processcontent>
|
||||
<el-divider content-position="center" v-if="form.processId != null"
|
||||
>操作步骤</el-divider
|
||||
>
|
||||
<Processcontent
|
||||
v-if="form.processId != null"
|
||||
:optType="optType"
|
||||
:processId="form.processId"
|
||||
></Processcontent>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
|
||||
<el-button type="primary" @click="cancel" v-if="optType == 'view'"
|
||||
>返回</el-button
|
||||
>
|
||||
<el-button type="primary" @click="submitForm" v-else>确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
@ -192,17 +314,27 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listProcess, getProcess, delProcess, addProcess, updateProcess } from "@/api/mes/pro/process";
|
||||
import {
|
||||
listProcess,
|
||||
getProcess,
|
||||
delProcess,
|
||||
addProcess,
|
||||
updateProcess,
|
||||
} from "@/api/mes/pro/process";
|
||||
import Processcontent from "./content.vue";
|
||||
import {genCode} from "@/api/system/autocode/rule"
|
||||
import { genCode } from "@/api/system/autocode/rule";
|
||||
import { listMachinerytype } from "@/api/mes/pro/processType";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
export default {
|
||||
name: "Process",
|
||||
dicts: ['sys_yes_no'],
|
||||
components: {Processcontent},
|
||||
dicts: ["sys_yes_no"],
|
||||
components: { Treeselect,Processcontent },
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:true,
|
||||
autoGenFlag: true,
|
||||
optType: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -229,36 +361,87 @@ export default {
|
||||
processCode: null,
|
||||
processName: null,
|
||||
enableFlag: null,
|
||||
processTypeName: null,
|
||||
processTypeId: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
// 设备类型名称
|
||||
// 设备类型树选项
|
||||
machineryTypeOptions: [],
|
||||
processTypeName: undefined,
|
||||
defaultPropss: {
|
||||
children: "children",
|
||||
label: "processTypeName",
|
||||
},
|
||||
rules: {
|
||||
processCode: [
|
||||
{ required: true, message: "工序编码不能为空", trigger: "blur" }
|
||||
{ required: true, message: "工序编码不能为空", trigger: "blur" },
|
||||
],
|
||||
processName: [
|
||||
{ required: true, message: "工序名称不能为空", trigger: "blur" }
|
||||
{ required: true, message: "工序名称不能为空", trigger: "blur" },
|
||||
],
|
||||
enableFlag: [
|
||||
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
||||
{ required: true, message: "是否启用不能为空", trigger: "blur" },
|
||||
],
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 根据设备分类名称筛选分类树
|
||||
processTypeName(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getTreeselect();
|
||||
},
|
||||
methods: {
|
||||
/** 查询生产工序列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listProcess(this.queryParams).then(response => {
|
||||
listProcess(this.queryParams).then((response) => {
|
||||
this.processList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 转换设备类型数据结构 */
|
||||
normalizer(node) {
|
||||
if (node.children && !node.children.length) {
|
||||
delete node.children;
|
||||
}
|
||||
return {
|
||||
id: node.processTypeId,
|
||||
label: node.processTypeName,
|
||||
children: node.children,
|
||||
};
|
||||
},
|
||||
/** 查询设备类型下拉树结构 */
|
||||
getTreeselect() {
|
||||
listMachinerytype().then((response) => {
|
||||
this.machineryTypeOptions = [];
|
||||
const data = this.handleTree(
|
||||
response.data,
|
||||
"processTypeId",
|
||||
"parentTypeId"
|
||||
)[0];
|
||||
this.machineryTypeOptions.push(data);
|
||||
});
|
||||
},
|
||||
// 筛选节点
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.processTypeName.indexOf(value) !== -1;
|
||||
},
|
||||
// 节点单击事件
|
||||
handleNodeClick(data) {
|
||||
this.queryParams.processTypeId = data.processTypeId;
|
||||
// this.queryParamsdata = data;
|
||||
this.handleQuery();
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
@ -271,12 +454,14 @@ export default {
|
||||
processCode: null,
|
||||
processName: null,
|
||||
attention: null,
|
||||
enableFlag: 'Y',
|
||||
enableFlag: "Y",
|
||||
remark: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
updateTime: null,
|
||||
processTypeName: null,
|
||||
processTypeId: null,
|
||||
};
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
@ -293,9 +478,9 @@ export default {
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.processId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
this.ids = selection.map((item) => item.processId);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
@ -303,15 +488,15 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加生产工序";
|
||||
this.optType = "add";
|
||||
genCode('PROCESS_CODE').then(response =>{
|
||||
this.form.processCode = response;
|
||||
});
|
||||
genCode("PROCESS_CODE").then((response) => {
|
||||
this.form.processCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
handleView(row) {
|
||||
this.reset();
|
||||
const processId = row.processId || this.ids;
|
||||
getProcess(processId).then(response => {
|
||||
getProcess(processId).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "查看工序信息";
|
||||
@ -321,8 +506,8 @@ export default {
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const processId = row.processId || this.ids
|
||||
getProcess(processId).then(response => {
|
||||
const processId = row.processId || this.ids;
|
||||
getProcess(processId).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改生产工序";
|
||||
@ -331,16 +516,16 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.processId != null) {
|
||||
updateProcess(this.form).then(response => {
|
||||
updateProcess(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addProcess(this.form).then(response => {
|
||||
addProcess(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
@ -352,29 +537,37 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const processIds = row.processId || this.ids;
|
||||
this.$modal.confirm('是否确认删除生产工序?').then(function() {
|
||||
return delProcess(processIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
this.$modal
|
||||
.confirm("是否确认删除生产工序?")
|
||||
.then(function () {
|
||||
return delProcess(processIds);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('mes/pro/process/export', {
|
||||
...this.queryParams
|
||||
}, `process_${new Date().getTime()}.xlsx`)
|
||||
this.download(
|
||||
"mes/pro/process/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`process_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
//自动生成编码
|
||||
handleAutoGenChange(autoGenFlag){
|
||||
if(autoGenFlag){
|
||||
genCode('PROCESS_CODE').then(response =>{
|
||||
handleAutoGenChange(autoGenFlag) {
|
||||
if (autoGenFlag) {
|
||||
genCode("PROCESS_CODE").then((response) => {
|
||||
this.form.processCode = response;
|
||||
});
|
||||
}else{
|
||||
} else {
|
||||
this.form.processCode = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
288
src/views/mes/pro/processType/index.vue
Normal file
288
src/views/mes/pro/processType/index.vue
Normal file
@ -0,0 +1,288 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="类型名称" prop="processTypeName">
|
||||
<el-input
|
||||
v-model="queryParams.processTypeName"
|
||||
placeholder="请输入工序类型名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用" prop="enableFlag">
|
||||
<el-select v-model="queryParams.enableFlag" placeholder="选择是或否" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="machinerytypeList"
|
||||
row-key="processTypeId"
|
||||
default-expand-all
|
||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||
>
|
||||
<el-table-column label="工序类型编码" prop="processTypeCode" />
|
||||
<el-table-column label="工序类型名称" align="center" prop="processTypeName" />
|
||||
<el-table-column label="是否启用" align="center" prop="enableFlag" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.enableFlag"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd(scope.row)"
|
||||
>新增</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.parentTypeId != 0"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 添加或修改工序类型对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="24" v-if="form.parentTypeId !== 0">
|
||||
<el-form-item label="父类型" prop="parentTypeId">
|
||||
<treeselect v-model="form.parentTypeId" :options="machinerytypeOptions" :normalizer="normalizer" placeholder="请选择父类型" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工序类型名称" prop="processTypeName">
|
||||
<el-input v-model="form.processTypeName" placeholder="请输入工序类型名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否启用" prop="enableFlag">
|
||||
<el-radio-group v-model="form.enableFlag" disabled v-if="optType=='view'">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
<el-radio-group v-model="form.enableFlag" v-else>
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listMachinerytype, getMachinerytype, delMachinerytype, addMachinerytype, updateMachinerytype } from "@/api/mes/pro/processType";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
export default {
|
||||
name: "Machinerytype",
|
||||
dicts: ['sys_yes_no'],
|
||||
components: {
|
||||
Treeselect
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
optType:undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 工序类型表格数据
|
||||
machinerytypeList: [],
|
||||
// 工序类型树选项
|
||||
machinerytypeOptions: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
machineryTypeCode: null,
|
||||
processTypeName: null,
|
||||
parentTypeId: null,
|
||||
ancestors: null,
|
||||
enableFlag: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
parentTypeId: [
|
||||
{ required: true, message: "父类型不能为空", trigger: "blur" }
|
||||
],
|
||||
processTypeName: [
|
||||
{ required: true, message: "工序类型名称不能为空", trigger: "blur" }
|
||||
],
|
||||
enableFlag: [
|
||||
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询工序类型列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listMachinerytype(this.queryParams).then(response => {
|
||||
this.machinerytypeList = this.handleTree(response.data, "processTypeId", "parentTypeId");
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 转换工序类型数据结构 */
|
||||
normalizer(node) {
|
||||
if (node.children && !node.children.length) {
|
||||
delete node.children;
|
||||
}
|
||||
return {
|
||||
id: node.processTypeId,
|
||||
label: node.processTypeName,
|
||||
children: node.children
|
||||
};
|
||||
},
|
||||
/** 查询工序类型下拉树结构 */
|
||||
getTreeselect() {
|
||||
listMachinerytype().then(response => {
|
||||
this.machinerytypeOptions = [];
|
||||
const data = this.handleTree(response.data, "processTypeId", "parentTypeId")[0];
|
||||
this.machinerytypeOptions.push(data);
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
processTypeId: null,
|
||||
processTypeName: null,
|
||||
parentTypeId: 1,
|
||||
ancestors: null,
|
||||
enableFlag: 'Y',
|
||||
remark: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd(row) {
|
||||
this.reset();
|
||||
this.getTreeselect();
|
||||
if (row != null && row.processTypeId) {
|
||||
this.form.parentTypeId = row.processTypeId;
|
||||
} else {
|
||||
this.form.parentTypeId = 0;
|
||||
}
|
||||
this.open = true;
|
||||
this.title = "添加工序类型";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
console.log(row);
|
||||
this.reset();
|
||||
this.getTreeselect();
|
||||
if (row != null) {
|
||||
this.form.parentTypeId = row.processTypeId;
|
||||
}
|
||||
getMachinerytype(row.processTypeId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改工序类型";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.processTypeId != null) {
|
||||
updateMachinerytype(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addMachinerytype(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
console.log(row);
|
||||
this.$modal.confirm('是否确认删除工序类型编号为"' + row.processTypeId + '"的数据项?').then(function() {
|
||||
return delMachinerytype(row.processTypeId);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -291,6 +291,16 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否工艺节点" prop="idid">
|
||||
<el-radio-group v-model="form.idid">
|
||||
<el-radio :label="0">是</el-radio>
|
||||
<el-radio :label="1">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="选择设备类型" prop="machineryTypeId">
|
||||
@ -299,14 +309,14 @@
|
||||
:options="machineryTypeOptions"
|
||||
:normalizer="normalizer"
|
||||
placeholder="请选择设备类型"
|
||||
:disable-branch-nodes="true"
|
||||
@select="handleNodeClick"
|
||||
/>
|
||||
<!-- :disable-branch-nodes="true" -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- <el-col :span="12" v-if="Typefile">-->
|
||||
<el-form-item label="代码上传" prop="">
|
||||
<!-- <el-col :span="12"> -->
|
||||
<el-col :span="12" v-if="Typefile">
|
||||
<!-- <el-form-item label="代码上传" prop="">
|
||||
<el-upload
|
||||
ref="codeName"
|
||||
class="upload-demo"
|
||||
@ -329,11 +339,26 @@
|
||||
> 预览文件</el-button
|
||||
>
|
||||
</el-upload>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="代码上传" prop="url">
|
||||
<el-select
|
||||
v-model="form.originalName"
|
||||
value-key="codeId"
|
||||
placeholder="请选择工序"
|
||||
@change="selectSource($event)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in machineryList"
|
||||
:key="item.codeId"
|
||||
:label="item.codeName"
|
||||
:value="{ url: item.codeId, originalName: item.codeName }"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="warehousing">
|
||||
<el-form-item label="选择出入库类型" prop="exitType">
|
||||
<el-radio-group v-model="form.exitType">
|
||||
<el-radio label="0">出库</el-radio>
|
||||
@ -402,6 +427,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { list } from "@/api/management/codeprogram";
|
||||
import { findProAgvline } from "@/api/mes/dv/route";
|
||||
import { findProAgvsite } from "@/api/mes/dv/siteConfiguration";
|
||||
import {
|
||||
@ -471,7 +497,8 @@ export default {
|
||||
lineName: "",
|
||||
pointName: "",
|
||||
TypeId: false,
|
||||
// Typefile: false,
|
||||
Typefile: false,
|
||||
warehousing: false,
|
||||
// 表单参数
|
||||
form: {
|
||||
originalName: "",
|
||||
@ -479,6 +506,7 @@ export default {
|
||||
lineId: "",
|
||||
pointId: "",
|
||||
},
|
||||
machineryList: [],
|
||||
// 表单校验
|
||||
rules: {
|
||||
routeId: [
|
||||
@ -504,6 +532,9 @@ export default {
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
idid: [
|
||||
{ required: true, message: "请选择是否工艺节点", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
@ -568,16 +599,40 @@ export default {
|
||||
handleNodeClick(data) {
|
||||
if (data.machineryTypeId == 229) {
|
||||
this.TypeId = true;
|
||||
// this.Typefile = false;
|
||||
this.Typefile = false;
|
||||
this.warehousing = false;
|
||||
this.form.originalName = "";
|
||||
this.form.url = "";
|
||||
this.form.exitType = "";
|
||||
} else if (data.machineryTypeId == 230) {
|
||||
this.TypeId = false;
|
||||
this.Typefile = false;
|
||||
this.warehousing = true;
|
||||
this.form.lineId = "";
|
||||
this.form.pointId = "";
|
||||
this.form.exitType = "0";
|
||||
this.form.originalName = "";
|
||||
this.form.url = "";
|
||||
} else {
|
||||
this.TypeId = false;
|
||||
// this.Typefile = true;
|
||||
this.Typefile = true;
|
||||
this.warehousing = false;
|
||||
this.form.lineId = "";
|
||||
this.form.pointId = "";
|
||||
this.form.exitType = "";
|
||||
this.form.originalName = "";
|
||||
this.form.url = "";
|
||||
}
|
||||
this.form.machineryTypeName = data.machineryTypeName;
|
||||
var queryParams = { machineryTypeId: data.machineryTypeId };
|
||||
list(queryParams).then((response) => {
|
||||
this.machineryList = response.data;
|
||||
});
|
||||
},
|
||||
selectSource(e) {
|
||||
console.log(e);
|
||||
this.form.url = e.url;
|
||||
this.form.originalName = e.originalName;
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
@ -646,11 +701,12 @@ export default {
|
||||
processCode: null,
|
||||
processName: null,
|
||||
isCheck: "N",
|
||||
keyFlag: "N",
|
||||
orderNum: 1,
|
||||
nextProcessId: null,
|
||||
nextProcessCode: null,
|
||||
nextProcessName: null,
|
||||
linkType: null,
|
||||
linkType: "FS",
|
||||
defaultPreTime: 0,
|
||||
defaultSufTime: 0,
|
||||
colorCode: "#00AEF3",
|
||||
@ -693,7 +749,13 @@ export default {
|
||||
this.reset();
|
||||
if (this.form.machineryTypeId == null) {
|
||||
this.TypeId = false;
|
||||
// this.Typefile = false;
|
||||
this.Typefile = false;
|
||||
this.warehousing = false;
|
||||
this.form.originalName = "";
|
||||
this.form.url = "";
|
||||
this.form.exitType = "";
|
||||
this.form.lineId = "";
|
||||
this.form.pointId = "";
|
||||
}
|
||||
this.open = true;
|
||||
this.title = "添加工艺组成";
|
||||
@ -713,16 +775,35 @@ export default {
|
||||
});
|
||||
if (row.machineryTypeId == null) {
|
||||
this.TypeId = false;
|
||||
// this.Typefile = false;
|
||||
this.Typefile = false;
|
||||
this.warehousing = false;
|
||||
} else {
|
||||
if (row.machineryTypeId == 229) {
|
||||
this.TypeId = true;
|
||||
// this.Typefile = false;
|
||||
this.Typefile = false;
|
||||
this.warehousing = false;
|
||||
// this.form.originalName = "";
|
||||
// this.form.url = "";
|
||||
// this.form.exitType = "";
|
||||
} else if (row.machineryTypeId == 230) {
|
||||
this.TypeId = false;
|
||||
this.Typefile = false;
|
||||
this.warehousing = true;
|
||||
// this.form.lineId = "";
|
||||
// this.form.pointId = "";
|
||||
} else {
|
||||
this.TypeId = false;
|
||||
// this.Typefile = true;
|
||||
this.Typefile = true;
|
||||
this.warehousing = false;
|
||||
// this.form.lineId = "";
|
||||
// this.form.pointId = "";
|
||||
// this.form.exitType = "";
|
||||
}
|
||||
}
|
||||
var queryParams = { machineryTypeId: row.machineryTypeId };
|
||||
list(queryParams).then((response) => {
|
||||
this.machineryList = response.data;
|
||||
});
|
||||
var name = {};
|
||||
if (row.originalName != undefined && row.originalName != "") {
|
||||
this.$set(name, "name", row.originalName);
|
||||
@ -734,13 +815,13 @@ export default {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.recordId != null) {
|
||||
if (this.form.machineryTypeId == 229) {
|
||||
this.form.originalName = "";
|
||||
this.form.url = "";
|
||||
} else {
|
||||
this.form.lineId = "";
|
||||
this.form.pointId = "";
|
||||
}
|
||||
// if (this.form.machineryTypeId == 229) {
|
||||
// this.form.originalName = "";
|
||||
// this.form.url = "";
|
||||
// } else {
|
||||
// this.form.lineId = "";
|
||||
// this.form.pointId = "";
|
||||
// }
|
||||
updateRouteprocess(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
|
@ -1,6 +1,13 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="工单编码" prop="workorderCode">
|
||||
<el-input
|
||||
v-model="queryParams.workorderCode"
|
||||
@ -60,86 +67,191 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="需求日期" prop="requestDate">
|
||||
<el-date-picker clearable
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="queryParams.requestDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择需求日期">
|
||||
placeholder="请选择需求日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-refresh" v-hasPermi="['mes:pro:protask:list']" circle="" @click="getList"></el-button>
|
||||
<el-button type="primary" icon="el-icon-edit" v-hasPermi="['mes:pro:protask:edit']" circle="" @click="handleOpenGantt"></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh"
|
||||
v-hasPermi="['mes:pro:protask:list']"
|
||||
circle=""
|
||||
@click="getList"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
v-hasPermi="['mes:pro:protask:edit']"
|
||||
circle=""
|
||||
@click="handleOpenGantt"
|
||||
></el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="wrapper">
|
||||
<div class="container">
|
||||
<GanttChar class="left-container" ref="ganttChar" :tasks="tasks"></GanttChar>
|
||||
<GanttChar
|
||||
class="left-container"
|
||||
ref="ganttChar"
|
||||
:tasks="tasks"
|
||||
></GanttChar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-row :gutter="10" class="mb8" style="margin-top: 10px">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain size="mini" @click="production"
|
||||
>批量执行生产</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="workorderList"
|
||||
row-key="workorderId"
|
||||
default-expand-all
|
||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column label="工单编码" width="180" prop="workorderCode" >
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"
|
||||
:selectable="selectable"
|
||||
/>
|
||||
|
||||
<el-table-column label="工单编码" width="180" prop="workorderCode">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['mes:pro:protask:query']"
|
||||
>{{scope.row.workorderCode}}</el-button>
|
||||
>{{ scope.row.workorderCode }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工单名称" width="200" align="center" prop="workorderName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="工单来源" align="center" prop="orderSource" >
|
||||
<el-table-column
|
||||
label="工单名称"
|
||||
width="200"
|
||||
align="center"
|
||||
prop="workorderName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="工单来源" align="center" prop="orderSource">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.mes_workorder_sourcetype" :value="scope.row.orderSource"/>
|
||||
<dict-tag
|
||||
:options="dict.type.mes_workorder_sourcetype"
|
||||
:value="scope.row.orderSource"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单编号" width="140" align="center" prop="sourceCode" />
|
||||
<el-table-column label="产品编号" width="120" align="center" prop="productCode" />
|
||||
<el-table-column label="产品名称" width="200" align="center" prop="productName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="规格型号" align="center" prop="productSpc" :show-overflow-tooltip="true"/>
|
||||
<el-table-column
|
||||
label="订单编号"
|
||||
width="140"
|
||||
align="center"
|
||||
prop="sourceCode"
|
||||
/>
|
||||
<el-table-column
|
||||
label="产品编号"
|
||||
width="120"
|
||||
align="center"
|
||||
prop="productCode"
|
||||
/>
|
||||
<el-table-column
|
||||
label="产品名称"
|
||||
width="200"
|
||||
align="center"
|
||||
prop="productName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格型号"
|
||||
align="center"
|
||||
prop="productSpc"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
|
||||
<el-table-column label="计划数量" align="center" prop="quantity" />
|
||||
<el-table-column label="调整数量" align="center" prop="quantityChanged" />
|
||||
<el-table-column label="已生产数量" align="center" width="100px" prop="quantityProduced" />
|
||||
<el-table-column
|
||||
label="已生产数量"
|
||||
align="center"
|
||||
width="100px"
|
||||
prop="quantityProduced"
|
||||
/>
|
||||
<el-table-column label="客户编码" align="center" prop="clientCode" />
|
||||
<el-table-column label="客户名称" align="center" prop="clientName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="需求日期" align="center" prop="requestDate" width="180">
|
||||
<el-table-column
|
||||
label="客户名称"
|
||||
align="center"
|
||||
prop="clientName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="需求日期"
|
||||
align="center"
|
||||
prop="requestDate"
|
||||
width="180"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.requestDate, '{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.requestDate, "{y}-{m}-{d}") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="排产状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status"/>
|
||||
<dict-tag
|
||||
:options="dict.type.mes_order_status"
|
||||
:value="scope.row.status"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150px" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column
|
||||
label="操作"
|
||||
width="150px"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="scope.row.status =='CONFIRMED'"
|
||||
v-if="scope.row.status == 'CONFIRMED'"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:pro:protask:edit']"
|
||||
>排产</el-button>
|
||||
>排产</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-if="scope.row.status == 'CONFIRMED'"
|
||||
@click="handleproductione(scope.row)"
|
||||
>执行生产</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@ -169,7 +281,8 @@
|
||||
v-for="dict in dict.type.mes_workorder_sourcetype"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
>{{ dict.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -194,7 +307,7 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品编号" prop="productCode">
|
||||
<el-input v-model="form.productCode" readonly="readonly" >
|
||||
<el-input v-model="form.productCode" readonly="readonly">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -224,11 +337,13 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="需求日期" prop="requestDate">
|
||||
<el-date-picker disabled
|
||||
<el-date-picker
|
||||
disabled
|
||||
v-model="form.requestDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择需求日期">
|
||||
placeholder="请选择需求日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -236,7 +351,7 @@
|
||||
<el-row v-if="form.orderSource == 'ORDER'">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户编号" prop="clientCode">
|
||||
<el-input v-model="form.clientCode" readonly="readonly" >
|
||||
<el-input v-model="form.clientCode" readonly="readonly">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -250,23 +365,65 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" readonly="readonly" />
|
||||
<el-input
|
||||
v-model="form.remark"
|
||||
type="textarea"
|
||||
readonly="readonly"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-steps :active="activeProcess" v-if="form.workorderId !=null" align-center simple>
|
||||
<el-step v-for="(item,index) in processOptions"
|
||||
:title="item.processName" @click.native="handleStepClick(index)">
|
||||
<el-steps
|
||||
:active="activeProcess"
|
||||
v-if="form.workorderId != null"
|
||||
align-center
|
||||
simple
|
||||
>
|
||||
<el-step
|
||||
v-for="(item, index) in processOptions"
|
||||
:title="item.processName"
|
||||
@click.native="handleStepClick(index)"
|
||||
>
|
||||
</el-step>
|
||||
</el-steps>
|
||||
<el-card v-for=" (item,index) in processOptions " :key="index" v-if="activeProcess == index && form.workorderId !=null">
|
||||
<ProTask :workorderId="form.workorderId" :routeId="item.routeId" :processId="item.processId" :colorCode="item.colorCode" :optType="optType" :recordId="item.recordId"></ProTask>
|
||||
<el-card
|
||||
v-for="(item, index) in processOptions"
|
||||
:key="index"
|
||||
v-if="activeProcess == index && form.workorderId != null"
|
||||
>
|
||||
<ProTask
|
||||
:workorderId="form.workorderId"
|
||||
:routeId="item.routeId"
|
||||
:processId="item.processId"
|
||||
:colorCode="item.colorCode"
|
||||
:optType="optType"
|
||||
:recordId="item.recordId"
|
||||
></ProTask>
|
||||
</el-card>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel" v-if="optType =='view' || form.status !='PREPARE' ">返回</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-if="form.status =='PREPARE' && optType !='view' ">确 定</el-button>
|
||||
<el-button type="success" @click="handleFinish" v-if="form.status =='PREPARE' && optType !='view' && form.workorderId !=null">完成</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="cancel"
|
||||
v-if="optType == 'view' || form.status != 'PREPARE'"
|
||||
>返回</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="submitForm"
|
||||
v-if="form.status == 'PREPARE' && optType != 'view'"
|
||||
>确 定</el-button
|
||||
>
|
||||
<el-button
|
||||
type="success"
|
||||
@click="handleFinish"
|
||||
v-if="
|
||||
form.status == 'PREPARE' &&
|
||||
optType != 'view' &&
|
||||
form.workorderId != null
|
||||
"
|
||||
>完成</el-button
|
||||
>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -274,8 +431,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listWorkorder, getWorkorder, delWorkorder, addWorkorder, updateWorkorder } from "@/api/mes/pro/workorder";
|
||||
import {listGanttTaskList} from "@/api/mes/pro/protask";
|
||||
import {
|
||||
listWorkorder,
|
||||
getWorkorder,
|
||||
delWorkorder,
|
||||
addWorkorder,
|
||||
updateWorkorder,
|
||||
} from "@/api/mes/pro/workorder";
|
||||
import { listGanttTaskList } from "@/api/mes/pro/protask";
|
||||
import { listProductprocess } from "@/api/mes/pro/routeprocess";
|
||||
import ProTask from "./proTask.vue";
|
||||
import GanttChar from "./ganttx.vue";
|
||||
@ -284,16 +447,16 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
export default {
|
||||
name: "Workorder",
|
||||
dicts: ['mes_order_status','mes_workorder_sourcetype'],
|
||||
dicts: ["mes_order_status", "mes_workorder_sourcetype"],
|
||||
components: {
|
||||
Treeselect,
|
||||
ProTask,
|
||||
GanttChar
|
||||
GanttChar,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:true,
|
||||
autoGenFlag: true,
|
||||
optType: undefined,
|
||||
activeProcess: 0,
|
||||
// 遮罩层
|
||||
@ -322,7 +485,7 @@ export default {
|
||||
pageSize: 10,
|
||||
workorderCode: null,
|
||||
workorderName: null,
|
||||
workorderType: 'SELF', //这里的排产要排除自产之外的外协和外购
|
||||
workorderType: "SELF", //这里的排产要排除自产之外的外协和外购
|
||||
orderSource: null,
|
||||
sourceCode: null,
|
||||
productId: null,
|
||||
@ -342,9 +505,9 @@ export default {
|
||||
ancestors: null,
|
||||
status: null,
|
||||
},
|
||||
tasks:{
|
||||
tasks: {
|
||||
data: [],
|
||||
links: []
|
||||
links: [],
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@ -358,17 +521,21 @@ export default {
|
||||
/** 查询生产工单列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listWorkorder(this.queryParams).then(response => {
|
||||
this.workorderList = this.handleTree(response.rows, "workorderId", "parentId");
|
||||
listWorkorder(this.queryParams).then((response) => {
|
||||
this.workorderList = this.handleTree(
|
||||
response.rows,
|
||||
"workorderId",
|
||||
"parentId"
|
||||
);
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleOpenGantt(){
|
||||
this.$router.push({ path: '/mes/pro/schedule/ganttedit'})
|
||||
handleOpenGantt() {
|
||||
this.$router.push({ path: "/mes/pro/schedule/ganttedit" });
|
||||
},
|
||||
getGanttTasks(){
|
||||
listGanttTaskList(this.queryParams).then(response =>{
|
||||
getGanttTasks() {
|
||||
listGanttTaskList(this.queryParams).then((response) => {
|
||||
this.tasks.data = response.data.data;
|
||||
this.tasks.links = response.data.links;
|
||||
this.$refs.ganttChar.reload();
|
||||
@ -376,10 +543,10 @@ export default {
|
||||
},
|
||||
|
||||
//获取当前产品对应的生产工序
|
||||
getProcess(){
|
||||
listProductprocess(this.form.productId).then(response =>{
|
||||
this.processOptions = response.data;
|
||||
});
|
||||
getProcess() {
|
||||
listProductprocess(this.form.productId).then((response) => {
|
||||
this.processOptions = response.data;
|
||||
});
|
||||
},
|
||||
|
||||
/** 转换生产工单数据结构 */
|
||||
@ -390,15 +557,23 @@ export default {
|
||||
return {
|
||||
id: node.workorderId,
|
||||
label: node.workorderName,
|
||||
children: node.children
|
||||
children: node.children,
|
||||
};
|
||||
},
|
||||
/** 查询生产工单下拉树结构 */
|
||||
/** 查询生产工单下拉树结构 */
|
||||
getTreeselect() {
|
||||
listWorkorder().then(response => {
|
||||
listWorkorder().then((response) => {
|
||||
this.workorderOptions = [];
|
||||
const data = { workorderId: 0, workorderName: '顶级节点', children: [] };
|
||||
data.children = this.handleTree(response.data, "workorderId", "parentId");
|
||||
const data = {
|
||||
workorderId: 0,
|
||||
workorderName: "顶级节点",
|
||||
children: [],
|
||||
};
|
||||
data.children = this.handleTree(
|
||||
response.data,
|
||||
"workorderId",
|
||||
"parentId"
|
||||
);
|
||||
this.workorderOptions.push(data);
|
||||
});
|
||||
},
|
||||
@ -434,19 +609,19 @@ export default {
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
updateTime: null,
|
||||
};
|
||||
this.activeProcess =0;
|
||||
this.activeProcess = 0;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
//甘特图按钮点击
|
||||
openGanttChart(){
|
||||
this.$refs.ganttChar.showFlag =true;
|
||||
openGanttChart() {
|
||||
this.$refs.ganttChar.showFlag = true;
|
||||
},
|
||||
//Step点击
|
||||
handleStepClick(index){
|
||||
this.activeProcess =index;
|
||||
handleStepClick(index) {
|
||||
this.activeProcess = index;
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
@ -457,8 +632,24 @@ export default {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
var ids = [];
|
||||
ids = selection.map((item) => item.routeId);
|
||||
},
|
||||
production() {},
|
||||
handleproductione() {},
|
||||
|
||||
selectable(row, index) {
|
||||
if (row.status == "WORKING") {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
//从BOM行中直接新增
|
||||
handleSubAdd(row){
|
||||
handleSubAdd(row) {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
this.getTreeselect();
|
||||
@ -472,7 +663,7 @@ export default {
|
||||
}
|
||||
this.open = true;
|
||||
this.title = "添加生产工单";
|
||||
this.optType="add";
|
||||
this.optType = "add";
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd(row) {
|
||||
@ -490,17 +681,17 @@ export default {
|
||||
}
|
||||
this.open = true;
|
||||
this.title = "添加生产工单";
|
||||
this.optType="add";
|
||||
genCode('WORKORDER_CODE').then(response =>{
|
||||
this.form.workorderCode = response;
|
||||
});
|
||||
this.optType = "add";
|
||||
genCode("WORKORDER_CODE").then((response) => {
|
||||
this.form.workorderCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
handleView(row) {
|
||||
this.reset();
|
||||
this.getTreeselect();
|
||||
const workorderId = row.workorderId || this.ids;
|
||||
getWorkorder(workorderId).then(response => {
|
||||
getWorkorder(workorderId).then((response) => {
|
||||
this.form = response.data;
|
||||
this.getProcess();
|
||||
this.open = true;
|
||||
@ -515,27 +706,27 @@ export default {
|
||||
if (row != null) {
|
||||
this.form.parentId = row.workorderId;
|
||||
}
|
||||
getWorkorder(row.workorderId).then(response => {
|
||||
getWorkorder(row.workorderId).then((response) => {
|
||||
this.form = response.data;
|
||||
this.getProcess();
|
||||
this.open = true;
|
||||
this.title = "生产排产";
|
||||
this.optType="edit";
|
||||
this.optType = "edit";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.workorderId != null) {
|
||||
updateWorkorder(this.form).then(response => {
|
||||
updateWorkorder(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
//this.open = false;
|
||||
this.$refs["bomlist"].getList();
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addWorkorder(this.form).then(response => {
|
||||
addWorkorder(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
//this.open = false;
|
||||
this.form.workorderId = response.data;
|
||||
@ -547,66 +738,78 @@ export default {
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal.confirm('是否确认删除生产工单编号为"' + row.workorderId + '"的数据项?').then(function() {
|
||||
return delWorkorder(row.workorderId);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
this.$modal
|
||||
.confirm(
|
||||
'是否确认删除生产工单编号为"' + row.workorderId + '"的数据项?'
|
||||
)
|
||||
.then(function () {
|
||||
return delWorkorder(row.workorderId);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
handleSelectProduct(){
|
||||
handleSelectProduct() {
|
||||
this.$refs.itemSelect.showFlag = true;
|
||||
},
|
||||
handleSelectClient(){
|
||||
handleSelectClient() {
|
||||
this.$refs.clientSelect.showFlag = true;
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('mes/pro/workorder/export', {
|
||||
...this.queryParams
|
||||
}, `workorder_${new Date().getTime()}.xlsx`)
|
||||
this.download(
|
||||
"mes/pro/workorder/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`workorder_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
handleFinish(){
|
||||
handleFinish() {
|
||||
let that = this;
|
||||
this.$modal.confirm('是否完成工单编制?【完成后将不能更改】').then(function(){
|
||||
that.form.status = 'CONFIRMED';
|
||||
that.submitForm();
|
||||
});
|
||||
this.$modal
|
||||
.confirm("是否完成工单编制?【完成后将不能更改】")
|
||||
.then(function () {
|
||||
that.form.status = "CONFIRMED";
|
||||
that.submitForm();
|
||||
});
|
||||
},
|
||||
//物料选择弹出框
|
||||
onItemSelected(obj){
|
||||
if(obj != undefined && obj != null){
|
||||
this.form.productId = obj.itemId;
|
||||
this.form.productCode = obj.itemCode;
|
||||
this.form.productName = obj.itemName;
|
||||
this.form.productSpc = obj.specification;
|
||||
this.form.unitOfMeasure = obj.unitOfMeasure;
|
||||
}
|
||||
onItemSelected(obj) {
|
||||
if (obj != undefined && obj != null) {
|
||||
this.form.productId = obj.itemId;
|
||||
this.form.productCode = obj.itemCode;
|
||||
this.form.productName = obj.itemName;
|
||||
this.form.productSpc = obj.specification;
|
||||
this.form.unitOfMeasure = obj.unitOfMeasure;
|
||||
}
|
||||
},
|
||||
//客户选择弹出框
|
||||
onClientSelected(obj){
|
||||
if(obj != undefined && obj != null){
|
||||
this.form.clientId = obj.clientId;
|
||||
this.form.clientCode = obj.clientCode;
|
||||
this.form.clientName = obj.clientName;
|
||||
}
|
||||
onClientSelected(obj) {
|
||||
if (obj != undefined && obj != null) {
|
||||
this.form.clientId = obj.clientId;
|
||||
this.form.clientCode = obj.clientCode;
|
||||
this.form.clientName = obj.clientName;
|
||||
}
|
||||
},
|
||||
//自动生成编码
|
||||
handleAutoGenChange(autoGenFlag){
|
||||
if(autoGenFlag){
|
||||
genCode('WORKORDER_CODE').then(response =>{
|
||||
handleAutoGenChange(autoGenFlag) {
|
||||
if (autoGenFlag) {
|
||||
genCode("WORKORDER_CODE").then((response) => {
|
||||
this.form.workorderCode = response;
|
||||
});
|
||||
}else{
|
||||
} else {
|
||||
this.form.workorderCode = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.wrapper{
|
||||
height: 400px;
|
||||
.wrapper {
|
||||
height: 400px;
|
||||
}
|
||||
.container {
|
||||
height: 100%;
|
||||
|
@ -126,7 +126,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.startTime"
|
||||
@ -136,7 +136,7 @@
|
||||
placeholder="请选择开始生产时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产时长" prop="duration">
|
||||
<el-input-number :min="1" :precision="0" :step="1" v-model="form.duration" @change="calculateEndTime" placeholder="请输入生产时长" />
|
||||
|
@ -310,7 +310,7 @@
|
||||
<VendorSelect ref="vendorSelect" @onSelected="onVendorSelected" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="入库仓库">
|
||||
<el-cascader
|
||||
v-model="warehouseInfo"
|
||||
@ -320,7 +320,7 @@
|
||||
>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="8"> </el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
|
@ -121,7 +121,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="入库仓库" prop="warehouseId">
|
||||
<el-cascader v-model="warehouseInfo"
|
||||
:options="warehouseOptions"
|
||||
@ -130,7 +130,7 @@
|
||||
>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否检验">
|
||||
<el-radio-group v-model="form.iqcCheck" disabled v-if="optType=='view'">
|
||||
|
@ -9,7 +9,8 @@
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['mes:wm:productsalse:add']"
|
||||
>新增</el-button>
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -20,7 +21,8 @@
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['mes:wm:productsalse:edit']"
|
||||
>修改</el-button>
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -31,30 +33,71 @@
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['mes:wm:productsalse:remove']"
|
||||
>删除</el-button>
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="productsalselineList" @selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="productsalselineList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="产品编码" width="120px" align="center" prop="itemCode" />
|
||||
<el-table-column label="产品名称" width="150px" align="center" prop="itemName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/>
|
||||
<el-table-column
|
||||
label="产品编码"
|
||||
width="120px"
|
||||
align="center"
|
||||
prop="itemCode"
|
||||
/>
|
||||
<el-table-column
|
||||
label="产品名称"
|
||||
width="150px"
|
||||
align="center"
|
||||
prop="itemName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格型号"
|
||||
align="center"
|
||||
prop="specification"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
|
||||
<el-table-column label="出库数量" align="center" prop="quantitySalse" />
|
||||
<el-table-column label="批次号" width="120px" align="center" prop="batchCode" />
|
||||
<el-table-column
|
||||
label="批次号"
|
||||
width="120px"
|
||||
align="center"
|
||||
prop="batchCode"
|
||||
/>
|
||||
<el-table-column label="仓库名称" align="center" prop="warehouseName" />
|
||||
<el-table-column label="库区名称" align="center" prop="locationName" />
|
||||
<el-table-column label="库位名称" align="center" prop="areaName" />
|
||||
<el-table-column label="是否检验" align="center" prop="iqcCheck">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.oqcCheck"/>
|
||||
<dict-tag
|
||||
:options="dict.type.sys_yes_no"
|
||||
:value="scope.row.oqcCheck"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检验单编号" width="120" align="center" prop="oqcCode" />
|
||||
<el-table-column
|
||||
label="检验单编号"
|
||||
width="120"
|
||||
align="center"
|
||||
prop="oqcCode"
|
||||
/>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@ -63,13 +106,14 @@
|
||||
@click="handleDelete(scope.row)"
|
||||
v-if="optType != 'view'"
|
||||
v-hasPermi="['mes:wm:productsalse:remove']"
|
||||
>删除</el-button>
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@ -82,15 +126,25 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="产品编码" prop="itemCode">
|
||||
<el-input v-model="form.itemCode" placeholder="请选择库存物资" >
|
||||
<el-button slot="append" @click="handleSelectStock" icon="el-icon-search"></el-button>
|
||||
<el-input v-model="form.itemCode" placeholder="请选择库存物资">
|
||||
<el-button
|
||||
slot="append"
|
||||
@click="handleSelectStock"
|
||||
icon="el-icon-search"
|
||||
></el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<StockSelect ref="stockSelect" @onSelected="onStockSelected"></StockSelect>
|
||||
<StockSelect
|
||||
ref="stockSelect"
|
||||
@onSelected="onStockSelected"
|
||||
></StockSelect>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="产品名称" prop="itemName">
|
||||
<el-input v-model="form.itemName" placeholder="请输入产品物料名称" />
|
||||
<el-input
|
||||
v-model="form.itemName"
|
||||
placeholder="请输入产品物料名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -102,7 +156,11 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="规格型号" prop="specification">
|
||||
<el-input v-model="form.specification" type="textarea" placeholder="请输入内容" />
|
||||
<el-input
|
||||
v-model="form.specification"
|
||||
type="textarea"
|
||||
placeholder="请输入内容"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -126,29 +184,39 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="批次号" prop="batchCode">
|
||||
<el-input v-model="form.batchCode"/>
|
||||
<el-input v-model="form.batchCode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产工单" prop="workorderCode">
|
||||
<el-input v-model="form.workorderCode"/>
|
||||
<el-input v-model="form.workorderCode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="出库数量" prop="quantitySalse">
|
||||
<el-input :max="form.quantityMax" :min="0" v-model="form.quantitySalse" placeholder="请输入出库数量" />
|
||||
<el-input
|
||||
:max="form.quantityMax"
|
||||
:min="0"
|
||||
v-model="form.quantitySalse"
|
||||
placeholder="请输入出库数量"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否检验">
|
||||
<el-radio-group v-model="form.oqcCheck" disabled v-if="optType=='view'">
|
||||
<el-radio-group
|
||||
v-model="form.oqcCheck"
|
||||
disabled
|
||||
v-if="optType == 'view'"
|
||||
>
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
>{{ dict.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
|
||||
<el-radio-group v-model="form.oqcCheck" v-else>
|
||||
@ -156,23 +224,39 @@
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
>{{ dict.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item v-if="form.oqcCheck == 'Y'" label="出货检验单" prop="oqcCode">
|
||||
<el-input v-model="form.oqcCode" placeholder="请输入出货检验单" >
|
||||
<el-button slot="append" @click="handleSelectOqc" icon="el-icon-search"></el-button>
|
||||
<el-form-item
|
||||
v-if="form.oqcCheck == 'Y'"
|
||||
label="出货检验单"
|
||||
prop="oqcCode"
|
||||
>
|
||||
<el-input v-model="form.oqcCode" placeholder="请输入出货检验单">
|
||||
<el-button
|
||||
slot="append"
|
||||
@click="handleSelectOqc"
|
||||
icon="el-icon-search"
|
||||
></el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<OqcSelectSingle ref="oqcSelect" @onSelected="onOqcSelected"></OqcSelectSingle>
|
||||
<OqcSelectSingle
|
||||
ref="oqcSelect"
|
||||
@onSelected="onOqcSelected"
|
||||
></OqcSelectSingle>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
<el-input
|
||||
v-model="form.remark"
|
||||
type="textarea"
|
||||
placeholder="请输入内容"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -186,30 +270,36 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listProductsalseline, getProductsalseline, delProductsalseline, addProductsalseline, updateProductsalseline } from "@/api/mes/wm/productsalseline";
|
||||
import StockSelect from "@/components/stockSelect/single.vue"
|
||||
import OqcSelectSingle from "@/components/oqcSelect/single.vue"
|
||||
import {
|
||||
listProductsalseline,
|
||||
getProductsalseline,
|
||||
delProductsalseline,
|
||||
addProductsalseline,
|
||||
updateProductsalseline,
|
||||
} from "@/api/mes/wm/productsalseline";
|
||||
import StockSelect from "@/components/stockSelect/single.vue";
|
||||
import OqcSelectSingle from "@/components/oqcSelect/single.vue";
|
||||
export default {
|
||||
name: "Productsalseline",
|
||||
dicts: ['sys_yes_no'],
|
||||
components: {StockSelect,OqcSelectSingle},
|
||||
dicts: ["sys_yes_no"],
|
||||
components: { StockSelect, OqcSelectSingle },
|
||||
props: {
|
||||
salseId: null,
|
||||
optType: null,
|
||||
warehouseId: null,
|
||||
locationId: null,
|
||||
areaId: null
|
||||
areaId: null,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
warehouseInfo:[],
|
||||
warehouseOptions:[],
|
||||
warehouseProps:{
|
||||
warehouseInfo: [],
|
||||
warehouseOptions: [],
|
||||
warehouseProps: {
|
||||
multiple: false,
|
||||
value: 'pId',
|
||||
label: 'pName',
|
||||
value: "pId",
|
||||
label: "pName",
|
||||
},
|
||||
// 选中数组
|
||||
ids: [],
|
||||
@ -250,20 +340,21 @@ export default {
|
||||
areaCode: null,
|
||||
areaName: null,
|
||||
},
|
||||
quantitySalse: "",
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
itemCode: [
|
||||
{ required: true, message: "出库物资不能为空", trigger: "blur" }
|
||||
{ required: true, message: "出库物资不能为空", trigger: "blur" },
|
||||
],
|
||||
warehouseInfo: [
|
||||
{ required: true, message: "仓库不能为空", trigger: "blur" }
|
||||
{ required: true, message: "仓库不能为空", trigger: "blur" },
|
||||
],
|
||||
quantitySalse: [
|
||||
{ required: true, message: "出库数量不能为空", trigger: "blur" }
|
||||
{ required: true, message: "出库数量不能为空", trigger: "blur" },
|
||||
],
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -273,7 +364,7 @@ export default {
|
||||
/** 查询产品销售出库行列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listProductsalseline(this.queryParams).then(response => {
|
||||
listProductsalseline(this.queryParams).then((response) => {
|
||||
this.productsalselineList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
@ -308,7 +399,7 @@ export default {
|
||||
areaId: this.areaId,
|
||||
areaCode: null,
|
||||
areaName: null,
|
||||
oqcCheck: 'N',
|
||||
oqcCheck: "N",
|
||||
oqcId: null,
|
||||
oqcCode: null,
|
||||
remark: null,
|
||||
@ -319,7 +410,7 @@ export default {
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
updateTime: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -335,9 +426,9 @@ export default {
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.lineId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
this.ids = selection.map((item) => item.lineId);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
@ -348,8 +439,8 @@ export default {
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const lineId = row.lineId || this.ids
|
||||
getProductsalseline(lineId).then(response => {
|
||||
const lineId = row.lineId || this.ids;
|
||||
getProductsalseline(lineId).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改产品销售出库行";
|
||||
@ -357,16 +448,22 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.lineId != null) {
|
||||
updateProductsalseline(this.form).then(response => {
|
||||
updateProductsalseline(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addProductsalseline(this.form).then(response => {
|
||||
if (this.form.quantitySalse > this.quantitySalse) {
|
||||
this.$message({
|
||||
message: "数量不足",
|
||||
type: "warning",
|
||||
});
|
||||
}
|
||||
addProductsalseline(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
@ -378,60 +475,68 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const lineIds = row.lineId || this.ids;
|
||||
this.$modal.confirm('是否确认删除产品销售出库行编号为"' + lineIds + '"的数据项?').then(function() {
|
||||
return delProductsalseline(lineIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
this.$modal
|
||||
.confirm('是否确认删除产品销售出库行编号为"' + lineIds + '"的数据项?')
|
||||
.then(function () {
|
||||
return delProductsalseline(lineIds);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('wm/productsalseline/export', {
|
||||
...this.queryParams
|
||||
}, `productsalseline_${new Date().getTime()}.xlsx`)
|
||||
this.download(
|
||||
"wm/productsalseline/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`productsalseline_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
handleSelectStock(){
|
||||
handleSelectStock() {
|
||||
this.$refs.stockSelect.showFlag = true;
|
||||
this.$refs.stockSelect.getList();
|
||||
},
|
||||
//物料选择弹出框
|
||||
onStockSelected(obj){
|
||||
if(obj != undefined && obj != null){
|
||||
debugger;
|
||||
this.form.materialStockId = obj.materialStockId;
|
||||
this.form.itemId = obj.itemId;
|
||||
this.form.itemCode = obj.itemCode;
|
||||
this.form.itemName = obj.itemName;
|
||||
this.form.specification = obj.specification;
|
||||
this.form.unitOfMeasure = obj.unitOfMeasure;
|
||||
this.form.batchCode = obj.batchCode;
|
||||
this.form.workorderId = obj.workorderId;
|
||||
this.form.workorderCode = obj.workorderCode;
|
||||
this.form.warehouseId = obj.warehouseId;
|
||||
this.form.warehouseCode = obj.warehouseCode;
|
||||
this.form.warehouseName = obj.warehouseName;
|
||||
this.form.locationId = obj.locationId;
|
||||
this.form.locationCode = obj.locationCode;
|
||||
this.form.locationName = obj.locationName;
|
||||
this.form.areaId = obj.areaId;
|
||||
this.form.areaCode = obj.areaCode;
|
||||
this.form.areaName = obj.areaName;
|
||||
this.form.quantitySalse = obj.quantityOnhand;
|
||||
this.form.quantityMax = obj.quantityOnhand;
|
||||
}
|
||||
onStockSelected(obj) {
|
||||
if (obj != undefined && obj != null) {
|
||||
this.form.materialStockId = obj.materialStockId;
|
||||
this.form.itemId = obj.itemId;
|
||||
this.form.itemCode = obj.itemCode;
|
||||
this.form.itemName = obj.itemName;
|
||||
this.form.specification = obj.specification;
|
||||
this.form.unitOfMeasure = obj.unitOfMeasure;
|
||||
this.form.batchCode = obj.batchCode;
|
||||
this.form.workorderId = obj.workorderId;
|
||||
this.form.workorderCode = obj.workorderCode;
|
||||
this.form.warehouseId = obj.warehouseId;
|
||||
this.form.warehouseCode = obj.warehouseCode;
|
||||
this.form.warehouseName = obj.warehouseName;
|
||||
this.form.locationId = obj.locationId;
|
||||
this.form.locationCode = obj.locationCode;
|
||||
this.form.locationName = obj.locationName;
|
||||
this.form.areaId = obj.areaId;
|
||||
this.form.areaCode = obj.areaCode;
|
||||
this.form.areaName = obj.areaName;
|
||||
this.form.quantitySalse = obj.quantityOnhand;
|
||||
this.form.quantityMax = obj.quantityOnhand;
|
||||
this.quantitySalse = obj.quantityOnhand;
|
||||
}
|
||||
},
|
||||
//OQC检验单选择
|
||||
handleSelectOqc(){
|
||||
handleSelectOqc() {
|
||||
this.$refs.oqcSelect.showFlag = true;
|
||||
},
|
||||
//OQC检验单选择弹出框
|
||||
onOqcSelected(obj){
|
||||
if(obj != undefined && obj != null){
|
||||
this.form.oqcId = obj.oqcId;
|
||||
this.form.oqcCode = obj.oqcCode;
|
||||
}
|
||||
onOqcSelected(obj) {
|
||||
if (obj != undefined && obj != null) {
|
||||
this.form.oqcId = obj.oqcId;
|
||||
this.form.oqcCode = obj.oqcCode;
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user