生产管理接口联调

dev-scheduling
zhangdi 3 months ago
parent 9f0b77eb89
commit 407a3cbdff
  1. 11
      src/api/productionManagement/frontTooling.js
  2. 22
      src/views/processManagement/bathRefine/components/addAccumulateClassDialog.vue
  3. 39
      src/views/productionManagement/frontTooling.vue

@ -2,7 +2,7 @@ import request from '@/axios';
//列表接口 //列表接口
export const getList = (current, size, params) => { export const getList = (current, size, params) => {
return request({ return request({
url: '/blade-desk/workOrder/page', url: '/blade-desk/sjWorkOrder/queryByReadStatus',
method: 'get', method: 'get',
params: { params: {
...params, ...params,
@ -11,4 +11,11 @@ export const getList = (current, size, params) => {
}, },
}); });
}; };
// 准备 // 准备
export const setReadStatus = (params) => {
return request({
url: '/blade-desk/sjWorkOrder/setReadStatus',
method: 'post',
data: params,
});
};

@ -50,7 +50,12 @@
</template> </template>
<template #default="scope"> <template #default="scope">
<el-form-item :prop="`tableData[${scope.$index}].batchNo`" :rules="formRules.batchNo"> <el-form-item :prop="`tableData[${scope.$index}].batchNo`" :rules="formRules.batchNo">
<el-select v-model="scope.row.batchNo" clearable filterable @change="changeBatchNo(scope.$index)"> <el-select
v-model="scope.row.batchNo"
clearable
filterable
@change="changeBatchNo(scope.$index)"
>
<el-option <el-option
v-for="item in scope.row.batchNoOptions" v-for="item in scope.row.batchNoOptions"
:key="item.id" :key="item.id"
@ -114,7 +119,7 @@
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="添加量" prop="addQuantity"> <el-table-column align="center" label="添加量" prop="addQuantity" width="250">
<!-- <template #header> <!-- <template #header>
<span><i style="color: red">*</i>添加量</span> <span><i style="color: red">*</i>添加量</span>
</template> --> </template> -->
@ -123,7 +128,12 @@
:prop="`tableData[${scope.$index}].addQuantity`" :prop="`tableData[${scope.$index}].addQuantity`"
:rules="formRules.addQuantity" :rules="formRules.addQuantity"
> --> > -->
<el-input v-model="scope.row.addQuantity"></el-input> <el-radio-group v-model="scope.row.radio">
<el-radio label="1">当前值</el-radio>
<el-radio label="2">自定义</el-radio>
</el-radio-group>
<el-input v-if="scope.row.radio=='2'" v-model="scope.row.addQuantity"></el-input>
<!-- </el-form-item> --> <!-- </el-form-item> -->
</template> </template>
</el-table-column> </el-table-column>
@ -339,11 +349,11 @@ export default {
); );
this.form.tableData[index].deviceName = select[0].deviceName; this.form.tableData[index].deviceName = select[0].deviceName;
}, },
changeBatchNo(index){ changeBatchNo(index) {
let select = this.form.tableData[index].batchNoOptions.filter( let select = this.form.tableData[index].batchNoOptions.filter(
row => row.id == this.form.tableData[index].batchNo row => row.id == this.form.tableData[index].batchNo
); );
console.log(select,'select'); console.log(select, 'select');
this.form.tableData[index].batchNoName = select[0].name; this.form.tableData[index].batchNoName = select[0].name;
}, },
getWorkCenterList() { getWorkCenterList() {
@ -364,7 +374,7 @@ export default {
batchNo: '', // / batchNo: '', // /
preserveContent: '', // preserveContent: '', //
bbpType: 2, bbpType: 2,
periodOfValidity:2 periodOfValidity: 2,
}); });
}, },

@ -26,7 +26,7 @@
</template> </template>
<script> <script>
import { getList } from "@/api/productionManagement/frontTooling"; import { getList, setReadStatus } from '@/api/productionManagement/frontTooling';
export default { export default {
data() { data() {
return { return {
@ -489,6 +489,21 @@ export default {
this.$message.error('请先选择数据'); this.$message.error('请先选择数据');
return; return;
} }
//
this.$confirm('确定选中数据已准备完成?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
let arr = this.selectionList.map(item => item.id);
let query = {
woIds: arr.join(','),
};
setReadStatus(query).then(res => {
this.$message.success('转烧结成功');
this.onLoad(this.page, this.query);
});
});
}, },
currentChange(currentPage) { currentChange(currentPage) {
this.page.currentPage = currentPage; this.page.currentPage = currentPage;
@ -517,17 +532,17 @@ export default {
this.$refs.crud.toggleSelection(); this.$refs.crud.toggleSelection();
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
// this.loading = true; // this.loading = true;
// getList( // getList(
// page.currentPage, // page.currentPage,
// page.pageSize, // page.pageSize,
// Object.assign(params, this.query, { yieldType: '1' }) // Object.assign(params, this.query, { yieldType: '1' })
// ).then(res => { // ).then(res => {
// this.data = res.data.data.records; // this.data = res.data.data.records;
// this.loading = false; // this.loading = false;
// this.page.total = res.data.data.total; // this.page.total = res.data.data.total;
// this.selectionClear(); // this.selectionClear();
// }); // });
}, },
}, },
}; };

Loading…
Cancel
Save