湿料计划

master
wws 1 year ago
parent 4091c0e839
commit 8c6c13943d

@ -140,6 +140,7 @@
<!-- 新增湿料计划模块 --> <!-- 新增湿料计划模块 -->
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
<el-form :model="form" ref="dynamicForm" label-width="80px"> <el-form :model="form" ref="dynamicForm" label-width="80px">
<!-- 选择工单生产日期 --> <!-- 选择工单生产日期 -->
<el-row> <el-row>
@ -191,17 +192,18 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<!--选择物料 --> <!--选择物料 -->
<el-col :span="8"> <el-col :span="7">
<el-form-item size="small" label="选择物料:"> <el-form-item size="small" label="选择物料:">
<el-select v-model="form.productId" placeholder="请选择物料"> <el-input @focus="selectMateriel" readonly v-model="form.productId" placeholder="点击选择物料"/>
<el-option v-for="item in selectProductList" :key="item.productId" :label="item.productDesc" <!-- <el-select v-if="false" v-model="form.productId" placeholder="请选择物料">-->
:value="item.productId" <!-- <el-option v-for="item in selectProductList" :key="item.productId" :label="item.productDesc"-->
></el-option> <!-- :value="item.productId"-->
</el-select> <!-- ></el-option>-->
<!-- </el-select>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 选择日期 --> <!-- 选择日期 -->
<el-col :span="8"> <el-col :offset="1" :span="8">
<el-form-item size="small" label="计划日期: "> <el-form-item size="small" label="计划日期: ">
<el-date-picker @change="checkDate" v-model="form.planTime" type="date" placeholder="选择日期" <el-date-picker @change="checkDate" v-model="form.planTime" type="date" placeholder="选择日期"
></el-date-picker> ></el-date-picker>
@ -296,17 +298,18 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<!--选择物料 --> <!--选择物料 -->
<el-col :span="8"> <el-col :span="7">
<el-form-item size="small" label="选择物料:"> <el-form-item size="small" label="选择物料:">
<el-select v-model="form.productId" placeholder="请选择物料"> <el-input @focus="selectMateriel" readonly v-model="form.productId" placeholder="点击选择物料"/>
<el-option v-for="item in selectProductList" :key="item.productId" :label="item.productDesc" <!-- <el-select v-if="false" v-model="form.productId" placeholder="请选择物料">-->
:value="item.productId" <!-- <el-option v-for="item in selectProductList" :key="item.productId" :label="item.productDesc"-->
></el-option> <!-- :value="item.productId"-->
</el-select> <!-- ></el-option>-->
<!-- </el-select>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 选择日期 --> <!-- 选择日期 -->
<el-col :span="8"> <el-col :offset="1" :span="8">
<el-form-item size="small" label="计划日期: "> <el-form-item size="small" label="计划日期: ">
<el-date-picker readonly @change="checkDate" v-model="form.planTime" type="date" placeholder="选择日期" <el-date-picker readonly @change="checkDate" v-model="form.planTime" type="date" placeholder="选择日期"
></el-date-picker> ></el-date-picker>
@ -349,6 +352,56 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog
width="800px"
title="物料选择"
:visible.sync="innerVisible"
append-to-body>
<el-form :model="materielQueryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="68px">
<el-form-item label="物料编码" prop="productCode">
<el-input
v-model="materielQueryParams.productCode"
placeholder="请输入物料编码"
clearable
@keyup.enter.native="handleMaterielQuery"
/>
</el-form-item>
<el-form-item label="物料名称" prop="productCode">
<el-input
v-model="materielQueryParams.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="materielQueryParams.pageNum"
:limit.sync="materielQueryParams.pageSize"
@pagination="getMaterielList"
/>
<el-button @click="subMateriel" class="my-materiel-btn" type="primary">确定</el-button>
</el-dialog>
</div> </div>
</template> </template>
@ -369,12 +422,25 @@ import {
checkChangePlan checkChangePlan
} from '@/api/plan/plan' } from '@/api/plan/plan'
import moment from 'moment' import moment from 'moment'
import {selectMaterielList} from "@/api/plan/order";
export default { export default {
name: 'Plan', name: 'Plan',
dicts: ['sys_yes_no'], dicts: ['sys_yes_no'],
data() { data() {
return { return {
// -list
materiel: [],
materielList: [],
//
materielQueryParams: {
productCode: undefined,
productDescZh: undefined,
pageNum: 1,
pageSize: 10,
},
// -
innerVisible: false,
// 湿list // 湿list
wetMaterialPlanList: [], wetMaterialPlanList: [],
// //
@ -445,6 +511,53 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
// -
handleMaterielQuery() {
this.materielQueryParams.pageNum = 1;
this.getMaterielList();
},
//
selectionChange(e) {
this.materiel = e;
},
// -
subMateriel() {
if (this.materiel.length == 0) {
this.$message({
message: '请选择物料!',
type: 'warning'
})
return
}
if (this.materiel.length > 1) {
this.$message({
message: '物料只能选择一个!',
type: 'warning'
})
return
}
console.log("这里是物料信息");
console.log(this.materiel[0]);
this.form.productId = this.materiel[0].productId;
this.form.prodCode = this.materiel[0].productCode;
this.form.prodDesc = this.materiel[0].productDescZh;
this.innerVisible = false;
},
// -
getMaterielList() {
this.loading = true;
selectMaterielList(this.materielQueryParams).then(response => {
this.materielList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
// -
selectMateriel() {
this.innerVisible = true;
this.getMaterielList();
},
/** 修改-确定按钮 */ /** 修改-确定按钮 */
changeBatchBtn() { changeBatchBtn() {
// //
@ -565,6 +678,8 @@ export default {
shiftId: this.selectList[0].shiftId shiftId: this.selectList[0].shiftId
} }
if (this.bmsList != null || this.bmsList === undefined) { if (this.bmsList != null || this.bmsList === undefined) {
console.log("这里this.bmsList")
console.log(this.bmsList)
for (let i = 0; i < this.bmsList.length; i++) { for (let i = 0; i < this.bmsList.length; i++) {
if (bms.shiftId == this.bmsList[i].shiftId && bms.bucketId == this.bmsList[i].bucketId && bms.materialId != this.bmsList[i].materialId) { if (bms.shiftId == this.bmsList[i].shiftId && bms.bucketId == this.bmsList[i].bucketId && bms.materialId != this.bmsList[i].materialId) {
this.$message({ this.$message({
@ -579,6 +694,8 @@ export default {
// //
// //
var bucket var bucket
console.log("这里this.selectBucketList")
console.log(this.selectBucketList)
for (let i = 0; i < this.selectBucketList.length; i++) { for (let i = 0; i < this.selectBucketList.length; i++) {
if (this.form.bucketId == this.selectBucketList[i].bucketId) { if (this.form.bucketId == this.selectBucketList[i].bucketId) {
bucket = this.selectBucketList[i] bucket = this.selectBucketList[i]
@ -586,6 +703,8 @@ export default {
} }
// //
var material var material
console.log("这里this.selectProductList")
console.log(this.selectProductList)
for (let i = 0; i < this.selectProductList.length; i++) { for (let i = 0; i < this.selectProductList.length; i++) {
if (this.form.productId == this.selectProductList[i].productId) { if (this.form.productId == this.selectProductList[i].productId) {
material = this.selectProductList[i] material = this.selectProductList[i]
@ -773,6 +892,8 @@ export default {
getBMSList(productDate).then(response => { getBMSList(productDate).then(response => {
if (response.data !== undefined) { if (response.data !== undefined) {
this.bmsList = response.data this.bmsList = response.data
console.log("级联信息")
console.log(this.bmsList)
} }
}) })
// //
@ -941,4 +1062,14 @@ export default {
padding: 10px 0; padding: 10px 0;
background-color: #f9fafc; background-color: #f9fafc;
} }
.my-margin {
margin-top: 40px;
margin-bottom: 10px;
}
.my-materiel-btn {
margin-top: 20px;
margin-left: 650px;
}
</style> </style>

Loading…
Cancel
Save