湿料计划管理(修改页面init)

master
wws 1 year ago
parent ec75a7a7a9
commit b1fbaeafaf

@ -1,5 +1,13 @@
import request from '@/utils/request'
// 修改-通过主计划id获取湿料计划详情list
export function getPlanDetailList(id) {
return request({
url: 'mes/plan/getPlanDetail'+'?id='+id,
method: 'get',
})
}
// 新增-提交按钮-提交湿料计划
export function addWetPlan(data) {
return request({

@ -99,13 +99,13 @@
@click="handleUpdate(scope.row)"
v-hasPermi="['mes:plan:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['mes:plan:remove']"
>删除</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['mes:plan:remove']"-->
<!-- >删除</el-button>-->
</template>
</el-table-column>
</el-table>
@ -215,16 +215,119 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 修改计划模块 -->
<el-dialog title="修改计划模块" :visible.sync="dialogVisible" width="1000px" append-to-body>
<el-form :model="form" ref="dynamicForm" label-width="80px">
<!-- 选择工单生产日期 -->
<el-row>
<el-col :span="8">
<el-form-item size="small" label="工单日期: ">
<el-date-picker
@change="workOrderTimeChange"
v-model="workOrderTime"
type="date"
placeholder="工单日期">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<!-- 工单列表 -->
<el-row>
<el-table
ref="multipleTable"
v-if="refreshWorkTable"
v-loading="workLoading"
:data="wetMaterialPlanList"
tooltip-effect="dark"
style="width: 100%"
max-height="240"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column width="60" align="center" label="序号" type="index" :index="indexMethod"></el-table-column>
<el-table-column width="140" align="center" prop="workorderCode" label="工单编码"></el-table-column>
<el-table-column width="230" align="center" prop="productName" label="产品名称"></el-table-column>
<el-table-column width="150" align="center" prop="productDate" label="工单日期" show-overflow-tooltip></el-table-column>
<el-table-column prop="shiftDesc" label="班次"></el-table-column>
<el-table-column prop="bucketName" label="料罐"></el-table-column>
<el-table-column prop="materialName" label="物料"></el-table-column>
</el-table>
</el-row>
<!-- 料罐-物料-计划日期的选择 -->
<el-row>
<!-- 选择料罐 -->
<el-col :span="8">
<el-form-item size="small" label="选择料罐:">
<el-select v-model="form.bucketId" placeholder="请选择料罐">
<el-option v-for="item in selectBucketList" :key="item.bucketId" :label="item.bucketName"
:value="item.bucketId"></el-option>
</el-select>
</el-form-item>
</el-col>
<!--选择物料 -->
<el-col :span="8">
<el-form-item size="small" label="选择物料:">
<el-select v-model="form.productId" placeholder="请选择物料">
<el-option v-for="item in selectProductList" :key="item.productId" :label="item.productDesc"
:value="item.productId"></el-option>
</el-select>
</el-form-item>
</el-col>
<!-- 选择日期 -->
<el-col :span="8">
<el-form-item size="small" label="计划日期: ">
<el-date-picker @change="checkDate" v-model="form.planTime" type="date" placeholder="选择日期"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<!-- 确定按钮 -->
<el-row>
<el-col :offset="11" :span="8">
<el-button @click="batchBtn" type="primary">确定</el-button>
</el-col>
</el-row>
<!-- 变化的工单表 -->
<el-row>
<el-table
ref="multipleTable"
v-if="refreshWorkTable"
v-loading="workLoading"
:data="newWorkOrderList"
tooltip-effect="dark"
style="width: 100%"
max-height="240"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column width="60" align="center" label="序号" type="index" :index="indexMethod"></el-table-column>
<el-table-column width="140" align="center" prop="workorderCode" label="工单编码"></el-table-column>
<el-table-column width="230" align="center" prop="productName" label="产品名称"></el-table-column>
<el-table-column width="150" align="center" prop="productDate" label="工单日期" show-overflow-tooltip></el-table-column>
<el-table-column prop="shiftDesc" label="班次"></el-table-column>
<el-table-column prop="bucketName" label="料罐"></el-table-column>
<el-table-column prop="materialName" label="物料"></el-table-column>
</el-table>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="addSubmitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { addWetPlan,getBMSList,getProductList,getBucketList,getWorkOrderList,listPlan, getPlan, delPlan, addPlan, updatePlan } from "@/api/mes/plan";
import { getPlanDetailList,addWetPlan,getBMSList,getProductList,getBucketList,getWorkOrderList,listPlan, getPlan, delPlan, addPlan, updatePlan } from "@/api/mes/plan";
export default {
name: "Plan",
data() {
return {
// 湿list
wetMaterialPlanList: [],
//
dialogVisible: false,
//
checkSelect: true,
// selectList
@ -574,13 +677,15 @@ export default {
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getPlan(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改湿料计划管理";
});
console.log("这里是修改操作区域")
console.log(row)
getPlanDetailList(row.id).then(response => {
if (response.data !== undefined){
this.wetMaterialPlanList = response.data;
}
console.log(response.data)
})
this.dialogVisible = true;
},
/** 新增-提交按钮 */
addSubmitForm() {

Loading…
Cancel
Save