|
@@ -45,7 +45,7 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<!--新增计划弹窗-->
|
|
|
- <el-dialog title="新增计划" :visible.sync="nanInsertDialogTableVisible" width="1200px">
|
|
|
+ <el-dialog title="新增计划" :visible.sync="nanInsertDialogTableVisible" width="1500px">
|
|
|
<el-table :data="tableData2" @row-click.self="handleRowClick">
|
|
|
<el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
|
|
|
<template v-slot:default="scope">
|
|
@@ -91,7 +91,80 @@
|
|
|
<span v-else>{{ scope.row.currentLotNumber }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
+ <!-- 新增筒重、箱重、管色字段 -->
|
|
|
+ <el-table-column
|
|
|
+ prop="tubeweight"
|
|
|
+ label="筒重"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template v-slot:default="scope">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.tubeweight"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ allow-create
|
|
|
+ default-first-option
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dropDownData.drum_weight"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.codeName"
|
|
|
+ :value="item.codeName"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="boxweight"
|
|
|
+ label="箱重"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template v-slot:default="scope">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.boxweight"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ allow-create
|
|
|
+ default-first-option
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dropDownData.box_weight"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.codeName"
|
|
|
+ :value="item.codeName"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="tubecolor"
|
|
|
+ label="管色"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template v-slot:default="scope">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.tubecolor"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ allow-create
|
|
|
+ default-first-option
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dropDownData.tube_color"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.codeName"
|
|
|
+ :value="item.codeName"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- 新增筒重、箱重、管色字段 -->
|
|
|
<el-table-column prop="number" label="数量" header-align="center" align="center">
|
|
|
<template v-slot:default="scope">
|
|
|
<el-input v-if="scope.row.isEditing" v-model="scope.row.number" placeholder="请输入数量" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
|
|
@@ -135,7 +208,7 @@
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
<!--修改计划弹窗-->
|
|
|
- <el-dialog title="修改计划" :visible.sync="nanUpdateDialogTableVisible" width="1200px">
|
|
|
+ <el-dialog title="修改计划" :visible.sync="nanUpdateDialogTableVisible" width="1500px">
|
|
|
<!--查询条件-->
|
|
|
<el-form ref="form" :model="formData" label-width="80px" :inline="true">
|
|
|
<el-form-item label="计划状态:">
|
|
@@ -183,6 +256,80 @@
|
|
|
<span v-else>{{ scope.row.currentLotNumber }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <!-- 新增筒重、箱重、管色字段 -->
|
|
|
+ <el-table-column
|
|
|
+ prop="tubeweight"
|
|
|
+ label="筒重"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template v-slot:default="scope">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.tubeweight"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ allow-create
|
|
|
+ default-first-option
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dropDownData.drum_weight"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.codeName"
|
|
|
+ :value="item.codeName"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="boxweight"
|
|
|
+ label="箱重"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template v-slot:default="scope">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.boxweight"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ allow-create
|
|
|
+ default-first-option
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dropDownData.box_weight"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.codeName"
|
|
|
+ :value="item.codeName"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="tubecolor"
|
|
|
+ label="管色"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template v-slot:default="scope">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.tubecolor"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ allow-create
|
|
|
+ default-first-option
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dropDownData.tube_color"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.codeName"
|
|
|
+ :value="item.codeName"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- 新增筒重、箱重、管色字段 -->
|
|
|
<el-table-column prop="number" label="数量" header-align="center" align="center">
|
|
|
<template v-slot:default="scope">
|
|
|
<el-input v-if="scope.row.isEditing" v-model="scope.row.number" placeholder="请输入数量" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
|
|
@@ -249,7 +396,10 @@ import {
|
|
|
getSpinningPlanList,
|
|
|
addSpinningPlanList,
|
|
|
getPlanSpinningInfo,
|
|
|
- updateSpinningInfoPlanOne,getCurrentProductionLineSuperior, getIsTheOrderProductProduced
|
|
|
+ updateSpinningInfoPlanOne,
|
|
|
+ getCurrentProductionLineSuperior,
|
|
|
+ getIsTheOrderProductProduced,
|
|
|
+ getOptionLsit
|
|
|
} from "@/api/plan/paln.js";
|
|
|
export default {
|
|
|
data() {
|
|
@@ -262,6 +412,24 @@ export default {
|
|
|
form: {
|
|
|
product:"",
|
|
|
},
|
|
|
+ formzdsj:{machineToolNo: "", //机台编号
|
|
|
+ // 表单参数
|
|
|
+ packaging: "", //包装
|
|
|
+ machineTool: "", //机台
|
|
|
+ workShifts: "", //班次
|
|
|
+ productionDate: "", //生产日期
|
|
|
+ levels: "", //等级
|
|
|
+ foreignTradeNumber: "", //外贸号
|
|
|
+ canisterWeight: "", //筒重
|
|
|
+ boxWeight: "", //箱重-车重
|
|
|
+ canisterNum: "", //筒数
|
|
|
+ tubeColor: "", //管色
|
|
|
+ comPort: "", //端口
|
|
|
+ printFormat: "", //格式
|
|
|
+ grossWeight: 0, //毛重
|
|
|
+ remark: "", //备注
|
|
|
+ },
|
|
|
+ dropDownData: {},
|
|
|
previousMachineId: undefined,
|
|
|
currentRowspan: 1,
|
|
|
prevRow: {},
|
|
@@ -305,6 +473,7 @@ export default {
|
|
|
mounted() {
|
|
|
// 得到排产计划信息
|
|
|
this.getSpinningPlanList();
|
|
|
+ this.getSelectOptions();
|
|
|
},
|
|
|
methods: {
|
|
|
selectedML(row){
|
|
@@ -323,10 +492,10 @@ export default {
|
|
|
deletePlan($index,row){
|
|
|
console.log(row)
|
|
|
getIsTheOrderProductProduced({"id":row.id}).then(resp=>{
|
|
|
- if(resp.data.length>0){
|
|
|
- this.$message({message: '当前计划订单产品在生产中已经不能删除', type: 'warning'});
|
|
|
- return;//证明有在上级的产品--zhi能有一个上级产品
|
|
|
- }else {
|
|
|
+ // if(resp.data.length>0){
|
|
|
+ // this.$message({message: '当前计划订单产品在生产中已经不能删除', type: 'warning'});
|
|
|
+ // return;//证明有在上级的产品--zhi能有一个上级产品
|
|
|
+ // }else {
|
|
|
//没有开始生产可以删除
|
|
|
spinningFrameWinding(row.id).then(res=>{
|
|
|
if(res.code==200){
|
|
@@ -338,7 +507,7 @@ export default {
|
|
|
this.onSubmit();
|
|
|
this.getSpinningPlanList();
|
|
|
})
|
|
|
- }
|
|
|
+ // }
|
|
|
});
|
|
|
|
|
|
},
|
|
@@ -366,6 +535,46 @@ export default {
|
|
|
});
|
|
|
})
|
|
|
},
|
|
|
+ // 获取下拉数据
|
|
|
+ async getSelectOptions() {
|
|
|
+ try {
|
|
|
+ let res = await getOptionLsit();
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.dropDownData = res.data || {};
|
|
|
+ // 初始化默认值
|
|
|
+ if (
|
|
|
+ this.dropDownData.work_shifts?.length > 0 &&
|
|
|
+ this.excuteType == 1
|
|
|
+ ) {
|
|
|
+ this.formzdsj.workShifts = this.dropDownData.work_shifts[0].codeName;
|
|
|
+ }
|
|
|
+ if (this.dropDownData.level?.length > 0 && this.excuteType == 1) {
|
|
|
+ this.formzdsj.levels = this.dropDownData.level[0].codeName;
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.dropDownData.drum_weight?.length > 0 &&
|
|
|
+ this.excuteType == 1
|
|
|
+ ) {
|
|
|
+ this.formzdsj.canisterWeight =
|
|
|
+ this.dropDownData.drum_weight[0].codeName;
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.dropDownData.box_weight?.length > 0 &&
|
|
|
+ this.excuteType == 1
|
|
|
+ ) {
|
|
|
+ this.formzdsj.boxWeight = this.dropDownData.box_weight[0].codeName;
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.dropDownData.tube_color?.length > 0 &&
|
|
|
+ this.excuteType == 1
|
|
|
+ ) {
|
|
|
+ this.formzdsj.tubeColor = this.dropDownData.tube_color[0].codeName;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message.error("网络异常!");
|
|
|
+ }
|
|
|
+ } catch (error) {}
|
|
|
+ },
|
|
|
// 下拉框数据改变查询色号批号信息
|
|
|
selectedChangeDate(row,selectedProduct) {
|
|
|
//选择的那个销售产品
|
|
@@ -502,7 +711,10 @@ export default {
|
|
|
row.currentLotNumber&&
|
|
|
row.number&&
|
|
|
row.startTime &&
|
|
|
- row.plannedEndTime;
|
|
|
+ row.plannedEndTime &&
|
|
|
+ row.tubecolor &&
|
|
|
+ row.boxweight &&
|
|
|
+ row.tubeweight;
|
|
|
},
|
|
|
// 新增一行标记为可编辑
|
|
|
addEditableRow() {
|
|
@@ -698,10 +910,10 @@ export default {
|
|
|
}
|
|
|
//判断当前计划是否已经投产
|
|
|
getIsTheOrderProductProduced({"id":row.id}).then(resp=>{
|
|
|
- if(resp.data.length>0){
|
|
|
- this.$message({message: '当前计划订单产品在生产中已经不能修改', type: 'warning'});
|
|
|
- return;//证明有在上级的产品--zhi能有一个上级产品
|
|
|
- }
|
|
|
+ // if(resp.data.length>0){
|
|
|
+ // this.$message({message: '当前计划订单产品在生产中已经不能修改', type: 'warning'});
|
|
|
+ // return;//证明有在上级的产品--zhi能有一个上级产品
|
|
|
+ // }
|
|
|
//不等于0待机才去校验是否重复
|
|
|
if(row.planStatus!=0){
|
|
|
//先查询计划表中有没有正在上机的或者停机的
|