|
@@ -126,7 +126,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="planStatus" label="计划状态" header-align="center" align="center" width="100px">
|
|
|
<template v-slot:default="scope">
|
|
|
- <el-select v-model="scope.row.planStatus" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.planStatus)">
|
|
|
+ <el-select v-model="scope.row.planStatus" placeholder="计划状态">
|
|
|
<el-option v-for="stateItem in stateList0" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
|
|
|
</el-select>
|
|
|
</template>
|
|
@@ -148,7 +148,7 @@
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
<!--修改计划弹窗-->
|
|
|
- <el-dialog title="修改计划" :visible.sync="nanUpdateDialogTableVisible" width="1200px">
|
|
|
+ <el-dialog title="修改计划" :visible.sync="nanUpdateDialogTableVisible" width="1400px">
|
|
|
<!--查询条件-->
|
|
|
<el-form ref="form" :model="formData" label-width="80px" :inline="true">
|
|
|
<el-form-item label="产品类别:">
|
|
@@ -163,7 +163,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="onSubmit">查询</el-button>
|
|
|
- <el-button>重置</el-button>
|
|
|
+ <el-button @click="reset">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<!--表格-->
|
|
@@ -243,25 +243,29 @@
|
|
|
<el-table-column prop="planStatus" label="计划状态" header-align="center" align="center" width="100px">
|
|
|
<template v-slot:default="scope">
|
|
|
<!--上机变停机待机-->
|
|
|
- <el-select v-if="scope.row.planStatus==1" v-model="scope.row.planStatus" placeholder="计划状态" @change="selectedSalesmanItem(scope.row,scope.row.planStatus)">
|
|
|
+ <el-select v-if="scope.row.planStatus==1" v-model="scope.row.planStatus" placeholder="计划状态">
|
|
|
<el-option v-for="stateItem in stateList1" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
|
|
|
</el-select>
|
|
|
<!--待机可以上机-->
|
|
|
- <el-select v-if="scope.row.planStatus==0" v-model="scope.row.planStatus" placeholder="计划状态" @change="selectedSalesmanItem(scope.row,scope.row.planStatus)">
|
|
|
+ <el-select v-if="scope.row.planStatus==0" v-model="scope.row.planStatus" placeholder="计划状态" >
|
|
|
<el-option v-for="stateItem in stateList0" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
|
|
|
</el-select>
|
|
|
<!--停机变上机-->
|
|
|
- <el-select v-if="scope.row.planStatus==2" v-model="scope.row.planStatus" placeholder="计划状态" @change="selectedSalesmanItem(scope.row,scope.row.planStatus)">
|
|
|
+ <el-select v-if="scope.row.planStatus==2" v-model="scope.row.planStatus" placeholder="计划状态" >
|
|
|
<el-option v-for="stateItem in stateList2" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
|
|
|
</el-select>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作">
|
|
|
+ <el-table-column label="操作" align="center" width="200px">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="danger"
|
|
|
@click.stop.prevent="updateStatus(scope.$index, scope.row)">更新状态</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="danger"
|
|
|
+ @click.stop.prevent="deletePlan(scope.$index, scope.row)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -316,6 +320,7 @@
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item @click.native.prevent="handleAddPlan(scope.row)">新增计划</el-dropdown-item>
|
|
|
<el-dropdown-item @click.native.prevent="handleEditPlan(scope.row)">修改计划</el-dropdown-item>
|
|
|
+ <el-dropdown-item @click.native.prevent="handleStopProductionLine(scope.row)">机台状态</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</template>
|
|
@@ -399,12 +404,12 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="planStatus" label="计划状态" header-align="center" align="center" width="100px">
|
|
|
<template v-slot:default="scope">
|
|
|
- <el-select v-model="scope.row.planStatus" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.planStatus)">
|
|
|
+ <el-select v-model="scope.row.planStatus" placeholder="计划状态" >
|
|
|
<el-option v-for="stateItem in stateList0" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
|
|
|
</el-select>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作">
|
|
|
+ <el-table-column label="操作" >
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
@@ -416,7 +421,7 @@
|
|
|
</el-table>
|
|
|
<el-button type="primary" style="width: 100%;margin-top: 30px" @click="addEditableRow">新增计划产品</el-button>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="nanInsertDialogTableVisible = false">取 消</el-button>
|
|
|
+ <el-button @click="beiInsertDialogTableVisible = false">取 消</el-button>
|
|
|
<el-button type="primary" @click="addPlanInfo">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
@@ -436,7 +441,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="onSubmit">查询</el-button>
|
|
|
- <el-button>重置</el-button>
|
|
|
+ <el-button @click="reset">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<!--表格-->
|
|
@@ -516,31 +521,35 @@
|
|
|
<el-table-column prop="planStatus" label="计划状态" header-align="center" align="center" width="100px">
|
|
|
<template v-slot:default="scope">
|
|
|
<!--上机变停机待机-->
|
|
|
- <el-select v-if="scope.row.planStatus==1" v-model="scope.row.planStatus" placeholder="计划状态" @change="selectedSalesmanItem(scope.row,scope.row.planStatus)">
|
|
|
+ <el-select v-if="scope.row.planStatus==1" v-model="scope.row.planStatus" placeholder="计划状态" >
|
|
|
<el-option v-for="stateItem in stateList1" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
|
|
|
</el-select>
|
|
|
<!--待机可以上机-->
|
|
|
- <el-select v-if="scope.row.planStatus==0" v-model="scope.row.planStatus" placeholder="计划状态" @change="selectedSalesmanItem(scope.row,scope.row.planStatus)">
|
|
|
+ <el-select v-if="scope.row.planStatus==0" v-model="scope.row.planStatus" placeholder="计划状态" >
|
|
|
<el-option v-for="stateItem in stateList0" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
|
|
|
</el-select>
|
|
|
<!--停机变上机-->
|
|
|
- <el-select v-if="scope.row.planStatus==2" v-model="scope.row.planStatus" placeholder="计划状态" @change="selectedSalesmanItem(scope.row,scope.row.planStatus)">
|
|
|
+ <el-select v-if="scope.row.planStatus==2" v-model="scope.row.planStatus" placeholder="计划状态" >
|
|
|
<el-option v-for="stateItem in stateList2" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
|
|
|
</el-select>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作">
|
|
|
+ <el-table-column label="操作" align="center" width="200px">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="danger"
|
|
|
@click.stop.prevent="updateStatus(scope.$index, scope.row)">更新状态</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="danger"
|
|
|
+ @click.stop.prevent="deletePlan(scope.$index, scope.row)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="nanUpdateDialogTableVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="nanUpdateDialogTableVisible = false">确 定</el-button>
|
|
|
+ <el-button @click="beiUpdateDialogTableVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="beiUpdateDialogTableVisible = false">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</el-tab-pane>
|
|
@@ -567,11 +576,12 @@
|
|
|
import {
|
|
|
ammunitionPlanInfo,
|
|
|
getProductsInfo,
|
|
|
+ removeBombLoadingPlan,
|
|
|
getMaterielInfo,
|
|
|
addMaterielInfo,
|
|
|
getSalesman,
|
|
|
getAllPlanListByMachineId,
|
|
|
- getAllPlanListByProductTypeAndStatus, updatePlanOne
|
|
|
+ getAllPlanListByProductTypeAndStatus, updatePlanOne, whetherTheFeederIsShutDown, updateLineStates
|
|
|
} from "@/api/plan/paln.js";
|
|
|
export default {
|
|
|
data() {
|
|
@@ -638,63 +648,171 @@ export default {
|
|
|
this.getProductsInfo();
|
|
|
},
|
|
|
methods: {
|
|
|
+ //删除计划
|
|
|
+ deletePlan($index,row){
|
|
|
+ console.log(row)
|
|
|
+ removeBombLoadingPlan(row.id).then(res=>{
|
|
|
+ if(res.code==200){
|
|
|
+ this.$message({
|
|
|
+ message: '删除成功',
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ this.$message({message:"删除失败",type: 'error'})
|
|
|
+ }
|
|
|
+ this.onSubmit();
|
|
|
+ this.getAmmunitionPlanInfo();
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //打开修改机台信息
|
|
|
handleStopProductionLine(row){
|
|
|
this.modifyMachineStatus=true;
|
|
|
console.log("停机");
|
|
|
this.machineId=row.machineId;
|
|
|
+ // this.modifyMachineStatusFrom.type=[];
|
|
|
+ // this.modifyMachineStatusFrom.type.push("1")
|
|
|
+ // this.modifyMachineStatusFrom.type.push("2")
|
|
|
+ //当前操作机台号
|
|
|
+ this.machineId=row.machineId;
|
|
|
+ //查询当前机台A、面B面的状态
|
|
|
+ whetherTheFeederIsShutDown(this.machineId).then(res=>{
|
|
|
+ this.modifyMachineStatusFrom.type=res.data;
|
|
|
+ })
|
|
|
},
|
|
|
- confirmStopProductionLine(rwo){
|
|
|
- if (this.modifyMachineStatusFrom.includes(1)) {
|
|
|
- console.log('数组中包含数字 1');
|
|
|
- //新增一条数据,
|
|
|
- let aStopInfo= {
|
|
|
- currentColorCode: '',
|
|
|
- currentSpecification: '',
|
|
|
- currentLotNumber: '',
|
|
|
- currentSpindleCount: '',
|
|
|
- number: '',
|
|
|
- productType:'A面',
|
|
|
- startTime: '',
|
|
|
- plannedEndTime:'',
|
|
|
- planStatus:2,
|
|
|
- productId:'',
|
|
|
- machineId:this.machineId,
|
|
|
- salesmanId:'',
|
|
|
- timestampRandomCode:Date.now()+this.machineId,
|
|
|
- }
|
|
|
- let aStoptableList=[];
|
|
|
- aStoptableList.push(aStopInfo)
|
|
|
- //时间戳
|
|
|
- let data={
|
|
|
- //机台号
|
|
|
- machineId: this.machineId,
|
|
|
- timestampRandomCode:Date.now()+this.machineId,
|
|
|
- //计划信息
|
|
|
- detailsOfTheRefuelingPlans: aStoptableList
|
|
|
- }
|
|
|
- //添加计划信息
|
|
|
- addMaterielInfo(data).then(response => {
|
|
|
- if (response.code == 200) {
|
|
|
- this.$message({
|
|
|
- message: '添加成功',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- this.getAmmunitionPlanInfo();
|
|
|
- //最后把弹窗关掉
|
|
|
- this.nanInsertDialogTableVisible=false
|
|
|
- //更改订单投产信息的批号,
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- message: '添加失败',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- //最后把弹窗关掉
|
|
|
- this.nanInsertDialogTableVisible=false
|
|
|
- }
|
|
|
- });
|
|
|
- } else if(this.modifyMachineStatusFrom.includes(2)) {
|
|
|
- console.log('数组中不包含数字 2');
|
|
|
+ //确认修改产线信息
|
|
|
+ confirmStopProductionLine(){
|
|
|
+ console.log(this.modifyMachineStatusFrom.type);
|
|
|
+ if(this.modifyMachineStatusFrom.type.length==0){
|
|
|
+ this.modifyMachineStatusFrom.type.push("3")
|
|
|
}
|
|
|
+ //更改状态
|
|
|
+ updateLineStates(this.machineId,this.modifyMachineStatusFrom.type.join(",")).then(res=>{
|
|
|
+ if(res.code==200){
|
|
|
+ this.$message({
|
|
|
+ message: '修改状态成功',
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ this.$message({message:"修改状态成功",type: 'error'})
|
|
|
+ }
|
|
|
+ this.modifyMachineStatus=false;
|
|
|
+ this.getAmmunitionPlanInfo();
|
|
|
+ })
|
|
|
+ // //如果为空代表都不停机
|
|
|
+ // if(this.modifyMachineStatusFrom.type.length<=0){
|
|
|
+ // this.modifyMachineStatus=false;
|
|
|
+ // //发送请求删除,A面-timestampRandomCode="停机" B-timestampRandomCode="停机"的数据、并把所有上机产品的状态改为上机
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // // 包含1A停机---插入一条 timestampRandomCode=停机,状态为停机的数据
|
|
|
+ // if (this.modifyMachineStatusFrom.type.includes("1")) {
|
|
|
+ // //查询当前机台A、面B面的状态
|
|
|
+ // whetherTheFeederIsShutDown(this.machineId).then(res=>{
|
|
|
+ // //后台没有虚拟的假数据,就插入
|
|
|
+ // if(!res.data.includes("1")){
|
|
|
+ // console.log('数组中不包含数字 1');
|
|
|
+ // //新增一条数据,
|
|
|
+ // let aStopInfo= {
|
|
|
+ // currentColorCode: '1',
|
|
|
+ // //产品规格
|
|
|
+ // currentSpecification: '1',
|
|
|
+ // currentLotNumber: '1',
|
|
|
+ // currentSpindleCount: '1',
|
|
|
+ // number: '1',
|
|
|
+ // productType:'A面',
|
|
|
+ // startTime: '1',
|
|
|
+ // plannedEndTime:'1',
|
|
|
+ // planStatus:2,
|
|
|
+ // productId:'1',
|
|
|
+ // machineId:this.machineId,
|
|
|
+ // salesmanId:'1',
|
|
|
+ // timestampRandomCode:"停机",
|
|
|
+ // }
|
|
|
+ // let aStoptableList=[];
|
|
|
+ // aStoptableList.push(aStopInfo)
|
|
|
+ // //时间戳
|
|
|
+ // let data={
|
|
|
+ // //机台号
|
|
|
+ // machineId: this.machineId,
|
|
|
+ // //计划信息
|
|
|
+ // detailsOfTheRefuelingPlans: aStoptableList
|
|
|
+ // }
|
|
|
+ // //添加计划信息
|
|
|
+ // addMaterielInfo(data).then(response => {
|
|
|
+ // if (response.code == 200) {
|
|
|
+ // this.$message({
|
|
|
+ // message: '停机成功',
|
|
|
+ // type: 'success'
|
|
|
+ // });
|
|
|
+ // this.getAmmunitionPlanInfo();
|
|
|
+ // //最后把弹窗关掉
|
|
|
+ // this.nanInsertDialogTableVisible=false
|
|
|
+ // //更改订单投产信息的批号,
|
|
|
+ // } else {
|
|
|
+ // this.$message({
|
|
|
+ // message: '停机失败,请联系管理员',
|
|
|
+ // type: 'error'
|
|
|
+ // });
|
|
|
+ // //最后把弹窗关掉
|
|
|
+ // this.nanInsertDialogTableVisible=false
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // if(this.modifyMachineStatusFrom.type.includes("2")) {
|
|
|
+ // whetherTheFeederIsShutDown(this.machineId).then(res=>{
|
|
|
+ // if(!res.data.includes("2")) {
|
|
|
+ // console.log('数组中不包含数字2');
|
|
|
+ // //新增一条数据,
|
|
|
+ // let aStopInfo= {
|
|
|
+ // currentColorCode: '1',
|
|
|
+ // //产品规格
|
|
|
+ // currentSpecification: '1',
|
|
|
+ // currentLotNumber: '1',
|
|
|
+ // currentSpindleCount: '1',
|
|
|
+ // number: '1',
|
|
|
+ // productType:'B面',
|
|
|
+ // startTime: '1',
|
|
|
+ // plannedEndTime:'1',
|
|
|
+ // planStatus:2,
|
|
|
+ // productId:'1',
|
|
|
+ // machineId:this.machineId,
|
|
|
+ // salesmanId:'1',
|
|
|
+ // timestampRandomCode:"停机",
|
|
|
+ // }
|
|
|
+ // let aStoptableList=[];
|
|
|
+ // aStoptableList.push(aStopInfo)
|
|
|
+ // //时间戳
|
|
|
+ // let data={
|
|
|
+ // //机台号
|
|
|
+ // machineId: this.machineId,
|
|
|
+ // //计划信息
|
|
|
+ // detailsOfTheRefuelingPlans: aStoptableList
|
|
|
+ // }
|
|
|
+ // //添加计划信息
|
|
|
+ // addMaterielInfo(data).then(response => {
|
|
|
+ // if (response.code == 200) {
|
|
|
+ // this.$message({
|
|
|
+ // message: '停机成功',
|
|
|
+ // type: 'success'
|
|
|
+ // });
|
|
|
+ // this.getAmmunitionPlanInfo();
|
|
|
+ // //最后把弹窗关掉
|
|
|
+ // this.nanInsertDialogTableVisible=false
|
|
|
+ // //更改订单投产信息的批号,
|
|
|
+ // } else {
|
|
|
+ // this.$message({
|
|
|
+ // message: '停机失败,请联系管理员',
|
|
|
+ // type: 'error'
|
|
|
+ // });
|
|
|
+ // //最后把弹窗关掉
|
|
|
+ // this.nanInsertDialogTableVisible=false
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }
|
|
|
},
|
|
|
// 查询排产信息
|
|
|
getAmmunitionPlanInfo() {
|
|
@@ -874,18 +992,45 @@ export default {
|
|
|
},
|
|
|
// 新增计划产品信息
|
|
|
handleAddPlan(row) {
|
|
|
- if(this.selectedWorkshop=="南车间"){
|
|
|
- this.nanInsertDialogTableVisible = true
|
|
|
- }else{
|
|
|
- this.beiInsertDialogTableVisible = true
|
|
|
- }
|
|
|
- this.tableData2=[]
|
|
|
- //先清空
|
|
|
- this.machineId=""
|
|
|
- //当前操作机台号
|
|
|
- this.machineId=row.machineId;
|
|
|
- },
|
|
|
+ //查询当前机台A、面B面的状态
|
|
|
+ whetherTheFeederIsShutDown(row.machineId).then(res=>{
|
|
|
+ this.modifyMachineStatusFrom.type=res.data;
|
|
|
+ if(this.modifyMachineStatusFrom.type.includes("2")&&this.modifyMachineStatusFrom.type.includes("1")){
|
|
|
+ this.$message({
|
|
|
+ message: 'AB都已停机请更改机台状态',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }else {
|
|
|
+ if(this.modifyMachineStatusFrom.type.includes("1")){
|
|
|
+ this.productTypeList=[]
|
|
|
+ this.productTypeList.push({value:"B面",lable:"B面"})
|
|
|
+ }
|
|
|
+ if(this.modifyMachineStatusFrom.type.includes("2")){
|
|
|
+ this.productTypeList=[]
|
|
|
+ this.productTypeList.push({value:"A面",lable:"A面"})
|
|
|
+ }
|
|
|
+ if(this.modifyMachineStatusFrom.type.length<=0){
|
|
|
+ this.productTypeList=[]
|
|
|
+ this.productTypeList.push({value:"A面",lable:"A面"})
|
|
|
+ this.productTypeList.push({value:"B面",lable:"B面"})
|
|
|
+ }
|
|
|
+ //否则就打开弹窗添加计划
|
|
|
+ if(this.selectedWorkshop=="南车间"){
|
|
|
+ this.nanInsertDialogTableVisible = true
|
|
|
+ }else{
|
|
|
+ this.beiInsertDialogTableVisible = true
|
|
|
+ }
|
|
|
+ this.tableData2=[]
|
|
|
+ //先清空
|
|
|
+ this.machineId=""
|
|
|
+ //当前操作机台号
|
|
|
+ this.machineId=row.machineId;
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
+
|
|
|
+ },
|
|
|
// tab栏点击切换
|
|
|
tabClick(tab, event) {
|
|
|
// console.log('当前点击的标签名称:', tab.name);
|
|
@@ -984,6 +1129,13 @@ export default {
|
|
|
},
|
|
|
// 添加计划
|
|
|
addPlanInfo(){
|
|
|
+ if(this.tableData2.length<=0){
|
|
|
+ this.$message({
|
|
|
+ message: '请先添加表格数据',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
const datatime=Date.now()+this.machineId;
|
|
|
//处理表格数据
|
|
|
this.tableData2.forEach(item=>{
|
|
@@ -1029,7 +1181,10 @@ export default {
|
|
|
}else{
|
|
|
this.beiUpdateDialogTableVisible = true
|
|
|
}
|
|
|
- this.tableData2=[];
|
|
|
+ //先清空
|
|
|
+ this.machineId=""
|
|
|
+ //当前操作机台号
|
|
|
+ this.machineId=row.machineId;
|
|
|
getAllPlanListByMachineId(row.machineId).then((response) => {
|
|
|
//得到生产中,停产的,待产的
|
|
|
response.data.forEach(item => {
|
|
@@ -1054,8 +1209,41 @@ export default {
|
|
|
|
|
|
});
|
|
|
})
|
|
|
+ },
|
|
|
+ //重置按钮
|
|
|
+ reset(){
|
|
|
+ this.tableData2=[];
|
|
|
+ //弹窗
|
|
|
+ if(this.selectedWorkshop=="南车间"){
|
|
|
+ this.nanUpdateDialogTableVisible = true
|
|
|
+ }else{
|
|
|
+ this.beiUpdateDialogTableVisible = true
|
|
|
+ }
|
|
|
+ console.log(this.machineId,"dddd")
|
|
|
+ getAllPlanListByMachineId(this.machineId).then((response) => {
|
|
|
+ //得到生产中,停产的,待产的
|
|
|
+ response.data.forEach(item => {
|
|
|
+ item.isEditing=false;
|
|
|
+ item.planStatus=parseInt(item.planStatus);
|
|
|
+ item.productId=parseInt(item.productId)
|
|
|
+ })
|
|
|
+ this.tableData2=response.data;
|
|
|
+ // console.log( this.tableData2)
|
|
|
+ // 在数据加载完成后,手动触发每个行的第一个下拉框的 change 事件
|
|
|
+ this.$nextTick(() => {
|
|
|
+ // 获取第一个业务员选择框(假设表格只有一行)
|
|
|
+ for (let i = 0; i < this.tableData2.length; i++) {
|
|
|
+ const firstSalesmanSelect = this.$refs['salesmanSelect'+i];
|
|
|
+ // 触发 change 事件
|
|
|
+ if (firstSalesmanSelect) {
|
|
|
+ firstSalesmanSelect.$emit('change', {
|
|
|
+ target: {value: "ddd"},
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
-
|
|
|
+ });
|
|
|
+ })
|
|
|
},
|
|
|
//弹窗里边的点击查询
|
|
|
onSubmit(){
|