|
|
@ -68,12 +68,9 @@
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="班次" prop="shiftId">
|
|
|
|
<el-form-item label="班次" prop="shiftId">
|
|
|
|
<el-select v-model="queryParams.shiftId" placeholder="请选择班次" clearable>
|
|
|
|
<el-select v-model="queryParams.shiftId" placeholder="请选择班次" clearable>
|
|
|
|
<el-option
|
|
|
|
<el-option v-for="item in workShift" :key="item.shiftId" :label="item.shiftDesc"
|
|
|
|
v-for="dict in dict.type.shift_type"
|
|
|
|
:value="item.shiftId"
|
|
|
|
:key="dict.value"
|
|
|
|
></el-option>
|
|
|
|
:label="dict.label"
|
|
|
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-form-item>
|
|
|
@ -188,10 +185,7 @@
|
|
|
|
<span>{{ parseTime(scope.row.productDate, '{y}-{m}-{d}') }}</span>
|
|
|
|
<span>{{ parseTime(scope.row.productDate, '{y}-{m}-{d}') }}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="班次" align="center" prop="shiftId">
|
|
|
|
<el-table-column label="班次" align="center" prop="shiftId" :formatter="shiftFormat">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<dict-tag :options="dict.type.shift_type" :value="scope.row.shiftId"/>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="工单状态" align="center" prop="status">
|
|
|
|
<el-table-column label="工单状态" align="center" prop="status">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
@ -275,10 +269,7 @@
|
|
|
|
prop="prodLineCode"
|
|
|
|
prop="prodLineCode"
|
|
|
|
label="产线设备">
|
|
|
|
label="产线设备">
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="班次" align="center" prop="shiftId">
|
|
|
|
<el-table-column label="班次" align="center" prop="shiftId" :formatter="shiftFormat">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<dict-tag :options="dict.type.shift_type" :value="scope.row.shiftId"/>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="工单状态" align="center" prop="status">
|
|
|
|
<el-table-column label="工单状态" align="center" prop="status">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
@ -354,15 +345,6 @@
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :offset="1" :span="7">
|
|
|
|
|
|
|
|
<el-form-item label="选择设备:">
|
|
|
|
|
|
|
|
<el-cascader
|
|
|
|
|
|
|
|
:options="eRouteOptions"
|
|
|
|
|
|
|
|
:props="eRouteProps"
|
|
|
|
|
|
|
|
v-model="splitForm.prodLineCodeArray"
|
|
|
|
|
|
|
|
clearable></el-cascader>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :offset="1" :span="7">
|
|
|
|
<el-col :offset="1" :span="7">
|
|
|
|
<!-- 工单日期 -->
|
|
|
|
<!-- 工单日期 -->
|
|
|
|
<el-form-item size="small" label="工单日期: ">
|
|
|
|
<el-form-item size="small" label="工单日期: ">
|
|
|
@ -370,28 +352,44 @@
|
|
|
|
></el-date-picker>
|
|
|
|
></el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-col :offset="1" :span="7">
|
|
|
|
<!-- 第二行 -->
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
|
|
|
<!-- 选择班次 -->
|
|
|
|
<!-- 选择班次 -->
|
|
|
|
<el-form-item size="small" label="选择班次:" class="my-select my-first">
|
|
|
|
<el-form-item size="small" label="选择班次:" class="my-select my-first">
|
|
|
|
<el-select @change="shiftChange" v-model="splitForm.shiftId" placeholder="请选择班次" clearable>
|
|
|
|
<el-select @change="shiftChange" v-model="splitForm.shiftId" placeholder="请选择班次" clearable>
|
|
|
|
<el-option
|
|
|
|
<el-option v-for="item in workShift" :key="item.shiftId" :label="item.shiftDesc"
|
|
|
|
v-for="dict in dict.type.shift_type"
|
|
|
|
:value="item.shiftId"
|
|
|
|
:key="dict.value"
|
|
|
|
></el-option>
|
|
|
|
:label="dict.label"
|
|
|
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
<!-- 第二行 -->
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
|
|
<div v-if="splitForm.prodType == 'white'">
|
|
|
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
|
|
|
<!-- 选择物料 -->
|
|
|
|
|
|
|
|
<el-form-item size="small" label="投料名称:">
|
|
|
|
|
|
|
|
<el-input @focus="selectBPMateriel" readonly v-model="splitForm.materialName" placeholder="点击选择物料"/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item size="small" label="投料编码:">
|
|
|
|
|
|
|
|
<el-input readonly v-model="splitForm.materialCode" placeholder="点击选择物料" disabled/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
<el-col :offset="1" :span="7">
|
|
|
|
<el-col :offset="1" :span="7">
|
|
|
|
<!-- 拆分数量 -->
|
|
|
|
<!-- 拆分数量 -->
|
|
|
|
<el-form-item size="small" label="拆分数量:">
|
|
|
|
<el-form-item size="small" label="拆分数量:">
|
|
|
|
<el-input required type="number" @input="splitNumChange" v-model="splitForm.splitNum"></el-input>
|
|
|
|
<el-input required type="number" @input="splitNumChange" v-model="splitForm.splitNum"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div v-else>
|
|
|
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
|
|
|
<!-- 拆分数量 -->
|
|
|
|
|
|
|
|
<el-form-item size="small" label="拆分数量:">
|
|
|
|
|
|
|
|
<el-input required type="number" @input="splitNumChange" v-model="splitForm.splitNum"></el-input>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<el-col :offset="1" :span="7">
|
|
|
|
<el-col :offset="1" :span="7">
|
|
|
|
<!-- 车数 -->
|
|
|
|
<!-- 车数 -->
|
|
|
|
<el-form-item v-if="checkType" size="small" label="分配车数:">
|
|
|
|
<el-form-item v-if="checkType" size="small" label="分配车数:">
|
|
|
@ -399,6 +397,19 @@
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
|
|
|
<el-form-item label="选择设备:">
|
|
|
|
|
|
|
|
<div style="height: 130px;overflow-y: auto;">
|
|
|
|
|
|
|
|
<el-cascader
|
|
|
|
|
|
|
|
:options="eRouteOptions"
|
|
|
|
|
|
|
|
:props="eRouteProps"
|
|
|
|
|
|
|
|
v-model="splitForm.prodLineCodeArray"
|
|
|
|
|
|
|
|
clearable></el-cascader>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
<!-- 第三行 -->
|
|
|
|
<!-- 第三行 -->
|
|
|
|
<el-row v-for="(item, index) in formFields" :key="index">
|
|
|
|
<el-row v-for="(item, index) in formFields" :key="index">
|
|
|
|
<!-- 批次编号 -->
|
|
|
|
<!-- 批次编号 -->
|
|
|
@ -446,7 +457,7 @@
|
|
|
|
<el-table-column width="80" align="center" prop="quantitySplit" label="数量"></el-table-column>
|
|
|
|
<el-table-column width="80" align="center" prop="quantitySplit" label="数量"></el-table-column>
|
|
|
|
<el-table-column width="60" label="单位" align="center" prop="unit"/>
|
|
|
|
<el-table-column width="60" label="单位" align="center" prop="unit"/>
|
|
|
|
<el-table-column width="90" label="工艺编码" align="center" prop="routeCode"/>
|
|
|
|
<el-table-column width="90" label="工艺编码" align="center" prop="routeCode"/>
|
|
|
|
<el-table-column width="90" label="班次" align="center" prop="shiftDesc"/>
|
|
|
|
<el-table-column width="90" label="班次" align="center" prop="shiftDesc" :formatter="shiftFormat"/>
|
|
|
|
<el-table-column align="center" prop="batchCodeList" label="批次号"></el-table-column>
|
|
|
|
<el-table-column align="center" prop="batchCodeList" label="批次号"></el-table-column>
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
<!-- 测试 -->
|
|
|
|
<!-- 测试 -->
|
|
|
@ -456,7 +467,56 @@
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
<!--组成白坯物料选择弹窗-->
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
|
|
|
width="800px"
|
|
|
|
|
|
|
|
title="物料选择"
|
|
|
|
|
|
|
|
:visible.sync="innerBPVisible"
|
|
|
|
|
|
|
|
append-to-body>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form :model="materielParams" ref="queryBPForm" size="small" :inline="true" v-show="showSearch"
|
|
|
|
|
|
|
|
label-width="68px">
|
|
|
|
|
|
|
|
<el-form-item label="物料编码" prop="productCode">
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="materielParams.productCode"
|
|
|
|
|
|
|
|
placeholder="请输入物料编码"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
@keyup.enter.native="handleMaterielQuery"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="物料名称" prop="productCode">
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="materielParams.productDescZh"
|
|
|
|
|
|
|
|
placeholder="请输入物料名称"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
@keyup.enter.native="handleMaterielQuery"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleMaterielQuery">搜索</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="materielList" @selection-change="selectionChange">
|
|
|
|
|
|
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
|
|
|
|
|
|
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
|
|
|
|
|
|
|
|
<el-table-column label="物料编码" align="center" prop="productCode"/>
|
|
|
|
|
|
|
|
<el-table-column label="物料名称" align="center" prop="productDescZh"/>
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
|
|
|
|
v-show="total>0"
|
|
|
|
|
|
|
|
:total="total"
|
|
|
|
|
|
|
|
:page.sync="materielParams.pageNum"
|
|
|
|
|
|
|
|
:limit.sync="materielParams.pageSize"
|
|
|
|
|
|
|
|
@pagination="getBPMaterielList"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-button @click="subMaterielBP" class="my-materiel-btn" type="primary">确定</el-button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
@ -472,12 +532,12 @@ import {
|
|
|
|
checkWorkOrder
|
|
|
|
checkWorkOrder
|
|
|
|
} from '@/api/plan/workorder'
|
|
|
|
} from '@/api/plan/workorder'
|
|
|
|
import moment from 'moment';
|
|
|
|
import moment from 'moment';
|
|
|
|
import { getProEquipment, getProRoutes, getProShifts} from '@/api/plan/order'
|
|
|
|
import { getProEquipment, getProRoutes, getProShifts,selectMaterielList} from '@/api/plan/order'
|
|
|
|
import {prototype} from "clipboard";
|
|
|
|
import {prototype} from "clipboard";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "Workorder",
|
|
|
|
name: "Workorder",
|
|
|
|
dicts: ['product_type', 'workorder_type', 'shift_type'],
|
|
|
|
dicts: ['product_type', 'workorder_type'],
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
// 拆分车数换算值
|
|
|
|
// 拆分车数换算值
|
|
|
@ -539,6 +599,9 @@ export default {
|
|
|
|
shiftId: null,
|
|
|
|
shiftId: null,
|
|
|
|
routeCode: null,
|
|
|
|
routeCode: null,
|
|
|
|
carNum: 0,
|
|
|
|
carNum: 0,
|
|
|
|
|
|
|
|
prodType:null,
|
|
|
|
|
|
|
|
materialCode:null,
|
|
|
|
|
|
|
|
materialName:null
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 遮罩层
|
|
|
|
// 遮罩层
|
|
|
|
loading: true,
|
|
|
|
loading: true,
|
|
|
@ -617,12 +680,28 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/**********************************/
|
|
|
|
/**********************************/
|
|
|
|
eRouteProps: {multiple: true},
|
|
|
|
eRouteProps: {multiple: true},
|
|
|
|
eRouteOptions: []
|
|
|
|
eRouteOptions: [],
|
|
|
|
|
|
|
|
// 班次
|
|
|
|
|
|
|
|
workShift: [],
|
|
|
|
|
|
|
|
//组成白坯物料弹窗
|
|
|
|
|
|
|
|
innerBPVisible: false,
|
|
|
|
|
|
|
|
materielParams: {
|
|
|
|
|
|
|
|
mtart: 'material_type1',
|
|
|
|
|
|
|
|
productCode: null,
|
|
|
|
|
|
|
|
productDescZh: null,
|
|
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
materielBP: [],
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
// 获取班次信息
|
|
|
|
|
|
|
|
getProShifts().then(response => {
|
|
|
|
|
|
|
|
this.workShift = response.data
|
|
|
|
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
// 变更-车数数量校验
|
|
|
|
// 变更-车数数量校验
|
|
|
@ -701,13 +780,14 @@ export default {
|
|
|
|
productDate: null,
|
|
|
|
productDate: null,
|
|
|
|
shiftId: null,
|
|
|
|
shiftId: null,
|
|
|
|
routeCode: null,
|
|
|
|
routeCode: null,
|
|
|
|
carNum: null
|
|
|
|
carNum: null,
|
|
|
|
|
|
|
|
prodType:null,
|
|
|
|
|
|
|
|
materialCode:null,
|
|
|
|
|
|
|
|
materialName:null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.formFields = []
|
|
|
|
this.formFields = []
|
|
|
|
this.converCarNum = null;
|
|
|
|
this.converCarNum = null;
|
|
|
|
|
|
|
|
|
|
|
|
//初始化日期为默认今天
|
|
|
|
|
|
|
|
this.splitForm.productDate = new Date()
|
|
|
|
|
|
|
|
// 获取班次信息
|
|
|
|
// 获取班次信息
|
|
|
|
getProShifts().then(response => {
|
|
|
|
getProShifts().then(response => {
|
|
|
|
this.workShift = response.data
|
|
|
|
this.workShift = response.data
|
|
|
@ -741,8 +821,14 @@ export default {
|
|
|
|
getOrderAndWork(this.selectWork).then(response => {
|
|
|
|
getOrderAndWork(this.selectWork).then(response => {
|
|
|
|
this.splitData.push(response.data.workOrder)
|
|
|
|
this.splitData.push(response.data.workOrder)
|
|
|
|
this.productData.push(response.data.order)
|
|
|
|
this.productData.push(response.data.order)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//订单产品类型
|
|
|
|
|
|
|
|
this.splitForm.prodType = this.splitData[0].prodType
|
|
|
|
|
|
|
|
|
|
|
|
if(this.productData[0].prodType == 'white') {
|
|
|
|
if(this.productData[0].prodType == 'white') {
|
|
|
|
this.checkType = true
|
|
|
|
this.checkType = true
|
|
|
|
|
|
|
|
this.splitForm.materialName = this.splitData[0].materialName
|
|
|
|
|
|
|
|
this.splitForm.materialCode = this.splitData[0].materialCode
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
this.checkType = false
|
|
|
|
this.checkType = false
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -771,6 +857,13 @@ export default {
|
|
|
|
// 设置工艺
|
|
|
|
// 设置工艺
|
|
|
|
this.splitForm.routeCode = this.splitData[0].routeCode
|
|
|
|
this.splitForm.routeCode = this.splitData[0].routeCode
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//初始化日期为默认今天
|
|
|
|
|
|
|
|
if(this.splitData[0].productDate != null){
|
|
|
|
|
|
|
|
this.splitForm.productDate = this.splitData[0].productDate;
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.splitForm.productDate = new Date();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 订单为白坯
|
|
|
|
// 订单为白坯
|
|
|
|
if (this.productData[0].prodType == 'white'){
|
|
|
|
if (this.productData[0].prodType == 'white'){
|
|
|
@ -1050,6 +1143,8 @@ export default {
|
|
|
|
routeCode: this.workForm.routeCode,
|
|
|
|
routeCode: this.workForm.routeCode,
|
|
|
|
proOrderWorkorder: this.selectWork,
|
|
|
|
proOrderWorkorder: this.selectWork,
|
|
|
|
carNum: this.workForm.carNum,
|
|
|
|
carNum: this.workForm.carNum,
|
|
|
|
|
|
|
|
materialCode: this.splitForm.materialCode,
|
|
|
|
|
|
|
|
materialName: this.splitForm.materialName
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
subChangeWorkOrder(data).then(response => {
|
|
|
|
subChangeWorkOrder(data).then(response => {
|
|
|
@ -1070,7 +1165,9 @@ export default {
|
|
|
|
productDate: null,
|
|
|
|
productDate: null,
|
|
|
|
shiftId: null,
|
|
|
|
shiftId: null,
|
|
|
|
formFields: [],
|
|
|
|
formFields: [],
|
|
|
|
carNum: null
|
|
|
|
carNum: null,
|
|
|
|
|
|
|
|
materialCode: null,
|
|
|
|
|
|
|
|
materialName: null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.formFields = [{
|
|
|
|
this.formFields = [{
|
|
|
|
batchCode: '',
|
|
|
|
batchCode: '',
|
|
|
@ -1228,6 +1325,60 @@ export default {
|
|
|
|
//this.reset();
|
|
|
|
//this.reset();
|
|
|
|
//this.open = true;
|
|
|
|
//this.open = true;
|
|
|
|
//this.title = "添加生产工单";
|
|
|
|
//this.title = "添加生产工单";
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
shiftFormat(row,column){
|
|
|
|
|
|
|
|
let array = this.workShift;
|
|
|
|
|
|
|
|
let value = '其他';
|
|
|
|
|
|
|
|
array.forEach((item) => {
|
|
|
|
|
|
|
|
if (item.shiftId == row.shiftId) {
|
|
|
|
|
|
|
|
value = item.shiftDesc
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return value;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
//新增-打开组成白坯选择物料窗口
|
|
|
|
|
|
|
|
selectBPMateriel() {
|
|
|
|
|
|
|
|
// 清除搜索缓存
|
|
|
|
|
|
|
|
this.materielParams.productCode = null;
|
|
|
|
|
|
|
|
this.materielParams.productDescZh = null;
|
|
|
|
|
|
|
|
this.innerBPVisible = true;
|
|
|
|
|
|
|
|
this.getBPMaterielList();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
//新增-打开组成白坯选择物料窗口
|
|
|
|
|
|
|
|
getBPMaterielList() {
|
|
|
|
|
|
|
|
this.loading = true;
|
|
|
|
|
|
|
|
selectMaterielList(this.materielParams).then(response => {
|
|
|
|
|
|
|
|
this.materielList = response.rows;
|
|
|
|
|
|
|
|
this.total = response.total;
|
|
|
|
|
|
|
|
this.loading = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 新增-打开组成白坯选择物料窗口-选中物料信息
|
|
|
|
|
|
|
|
selectionChange(e) {
|
|
|
|
|
|
|
|
this.materielBP = e;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 新增-打开组成白坯选择物料窗口-确认选择物料
|
|
|
|
|
|
|
|
subMaterielBP() {
|
|
|
|
|
|
|
|
if (this.materielBP.length == 0) {
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
message: '请选择物料!',
|
|
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.materielBP.length > 1) {
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
message: '物料只能选择一个!',
|
|
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.splitForm.materialCode = this.materielBP[0].productCode;
|
|
|
|
|
|
|
|
this.splitForm.materialName = this.materielBP[0].productDescZh;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.innerBPVisible = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|