生产管理接口联调

dev-scheduling
zhangdi 2 months ago
parent 87c7400fb6
commit 06441eec19
  1. 13
      src/api/productionManagement/sameFurnaceQuery.js
  2. 2
      src/api/productionManagement/shortageApplication.js
  3. 21
      src/views/procurementManagement/shortageApplication.vue
  4. 52
      src/views/productionManagement/deductionPreserve/editDialog.vue
  5. 9
      src/views/productionManagement/deductionPreserve/index.vue
  6. 330
      src/views/productionManagement/sameFurnaceQuery.vue
  7. 35
      src/views/productionManagement/workReportingManagement.vue

@ -0,0 +1,13 @@
import request from '@/axios';
//列表接口
export const getList = (current, size, params) => {
return request({
url: '/blade-desk/deductionPreserve/orderDeclarePage',
method: 'get',
params: {
...params,
current,
size,
},
});
};

@ -16,7 +16,7 @@ export const del = data => {
return request({ return request({
url: '/blade-desk/deductionPreserve/signDelete', url: '/blade-desk/deductionPreserve/signDelete',
method: 'post', method: 'post',
data: data, params: data,
}); });
}; };

@ -24,13 +24,12 @@
<el-button type="primary" plain @click="handleImport">已完成 </el-button> <el-button type="primary" plain @click="handleImport">已完成 </el-button>
</template> </template>
<template #menu="scope"> <template #menu="scope">
<el-button type="primary" @click="handleImport">打印 </el-button> <el-button type="text" @click="handleImport">打印 </el-button>
</template> </template>
</avue-crud> </avue-crud>
<!-- 申报 --> <!-- 申报 -->
<declareAdd v-if="declareAddShow" :showDialog="declareAddShow" ></declareAdd> <declareAdd v-if="declareAddShow" :showDialog="declareAddShow"></declareAdd>
</basic-container> </basic-container>
</template> </template>
<script> <script>
@ -69,7 +68,7 @@ export default {
editBtnIcon: ' ', editBtnIcon: ' ',
viewBtnText: '详情', viewBtnText: '详情',
labelWidth: 120, labelWidth: 120,
menuWidth: 180, menuWidth: 120,
dialogWidth: 1040, dialogWidth: 1040,
dialogClickModal: false, dialogClickModal: false,
searchEnter: true, searchEnter: true,
@ -229,25 +228,23 @@ export default {
// //
closeDialog(isRefresh) { closeDialog(isRefresh) {
this.isShowImport = false; this.isShowImport = false;
// if (isRefresh) {
this.onLoad(this.page, this.query); this.onLoad(this.page, this.query);
// }
}, },
handleAdd() { handleAdd() {
this.declareAddShow = true; this.declareAddShow = true;
}, },
handleDelete(row) { handleDelete(row) {
if (this.selectionList.length === 0) { // if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据'); // this.$message.warning('');
return; // return;
} // }
this.$confirm('确定将选择数据删除?', { this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
}).then(() => { }).then(() => {
del({id:row.id}).then(res => { del({ id: row.id }).then(res => {
this.$message.success(res.data.message); this.$message.success('操作成功');
this.onLoad(this.page, this.query); this.onLoad(this.page, this.query);
}); });
}); });

@ -5,13 +5,13 @@
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="closeDialog"> </el-button> <el-button @click="closeDialog"> </el-button>
<el-button type="primary" @click="submit"> </el-button> <el-button type="primary" @click="submit" :loading="saveLoading"> </el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { getWorkOrderByCardNo,saveOrUpdate } from '@/api/productionManagement/deductionPreserve'; import { getWorkOrderByCardNo, saveOrUpdate } from '@/api/productionManagement/deductionPreserve';
export default { export default {
props: { props: {
showDialog: { showDialog: {
@ -26,6 +26,7 @@ export default {
data() { data() {
return { return {
openShow: false, openShow: false,
saveLoading: false,
option: { option: {
submitBtn: false, submitBtn: false,
emptyBtn: false, emptyBtn: false,
@ -36,18 +37,18 @@ export default {
span: 12, span: 12,
disabled: true, disabled: true,
}, },
// { // {
// label: '', // label: '',
// prop: 'input', // prop: 'input',
// span: 12, // span: 12,
// disabled: true, // disabled: true,
// }, // },
// { // {
// label: '', // label: '',
// prop: 'input', // prop: 'input',
// span: 12, // span: 12,
// disabled: true, // disabled: true,
// }, // },
{ {
label: '试验数量', label: '试验数量',
prop: 'testQty', prop: 'testQty',
@ -72,12 +73,12 @@ export default {
}, },
], ],
}, },
form:{} form: {},
}; };
}, },
mounted() { mounted() {
this.openShow = this.showDialog; this.openShow = this.showDialog;
this.getWorkOrderByCardNo() // this.getWorkOrderByCardNo()
}, },
methods: { methods: {
getWorkOrderByCardNo() { getWorkOrderByCardNo() {
@ -85,20 +86,27 @@ export default {
cardNo: this.cardNo, cardNo: this.cardNo,
}).then(res => { }).then(res => {
console.log(res, 'res'); console.log(res, 'res');
this.form = res.data.data;
}); });
}, },
closeDialog(type) { closeDialog(type) {
this.openShow = false; this.openShow = false;
this.$emit('closeDialog',type); this.$emit('closeDialog', type);
}, },
submit() { submit() {
this.$refs.form.validate((valid, done, msg) => { this.$refs.form.validate((valid, done, msg) => {
if (valid) { if (valid) {
done(); this.saveLoading = false;
saveOrUpdate(this.form).then(res => { saveOrUpdate(this.form)
this.$message.success('操作成功'); .then(res => {
this.closeDialog(true) this.$message.success('操作成功');
}); this.closeDialog(true);
this.saveLoading = false;
done();
})
.catvh(err => {
this.saveLoading = false;
});
} else { } else {
console.log('error submit!!'); console.log('error submit!!');
return false; return false;

@ -9,7 +9,6 @@
ref="crud" ref="crud"
@search-change="searchChange" @search-change="searchChange"
@search-reset="searchReset" @search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange" @current-change="currentChange"
@size-change="sizeChange" @size-change="sizeChange"
@refresh-change="refreshChange" @refresh-change="refreshChange"
@ -110,7 +109,7 @@ export default {
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
width: 150, width: 190,
}, },
{ {
label: '零件号', label: '零件号',
@ -118,7 +117,7 @@ export default {
search: true, search: true,
sortable: true, sortable: true,
span: 12, span: 12,
width: 150, width: 170,
}, },
{ {
@ -128,7 +127,7 @@ export default {
sortable: true, sortable: true,
span: 12, span: 12,
display: false, display: false,
width: 150, width: 160,
}, },
{ {
label: '当前工序', label: '当前工序',
@ -191,7 +190,7 @@ export default {
sortable: true, sortable: true,
span: 12, span: 12,
display: false, display: false,
width: 150, width: 180,
}, },
{ {
label: '备注', label: '备注',

@ -7,7 +7,6 @@
v-model="form" v-model="form"
v-model:page="page" v-model:page="page"
ref="crud" ref="crud"
@row-del="rowDel"
@search-change="searchChange" @search-change="searchChange"
@search-reset="searchReset" @search-reset="searchReset"
@selection-change="selectionChange" @selection-change="selectionChange"
@ -24,32 +23,16 @@
</basic-container> </basic-container>
</template> </template>
<script> <script>
import { getLazyList, remove, update, add, getMenu } from "@/api/system/menu"; import { getList } from '@/api/productionManagement/sameFurnaceQuery';
import { mapGetters } from "vuex";
import {
getQueryAllCaList,
getQueryAllCaDeatils,
getQueryAllCaSave,
getQueryAllCaDel,
} from "@/api/processManagement/processCapability";
import { getDictionary } from "@/api/system/dict";
export default { export default {
components: {}, components: {},
data() { data() {
return { return {
ocId: null,
setCraftAbilityOpen: false,
showIp: false,
ecId: null,
bcId: null,
setCrewOpen: false,
form: {}, form: {},
query: {}, query: {},
loading: true, loading: true,
selectionList: [], selectionList: [],
parentId: "",
page: { page: {
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
@ -58,12 +41,12 @@ export default {
option: { option: {
columnSort: true, columnSort: true,
tip: false, tip: false,
height: "auto", height: 'auto',
calcHeight: 32, calcHeight: 32,
simplePage: false, simplePage: false,
searchShow: true, searchShow: true,
searchMenuSpan: 6, searchMenuSpan: 6,
dialogWidth: "60%", dialogWidth: '60%',
border: true, border: true,
selection: false, selection: false,
index: true, index: true,
@ -74,101 +57,92 @@ export default {
addBtn: false, addBtn: false,
delBtn: false, delBtn: false,
editBtn: false, editBtn: false,
editBtnText: "编辑", editBtnText: '编辑',
refreshBtn: false, refreshBtn: false,
searchShowBtn: false, searchShowBtn: false,
gridBtn: false, gridBtn: false,
searchIndex: 3, searchIndex: 3,
searchIcon: true, searchIcon: true,
menu: false, menu: false,
searchLabelPosition: "left", searchLabelPosition: 'left',
searchLabelPosition: "left",
searchGutter: 24, searchGutter: 24,
searchSpan: 6, searchSpan: 6,
menuAlign: "left", menuAlign: 'left',
gridBtn: false, gridBtn: false,
searchMenuPosition: "right", searchMenuPosition: 'right',
addBtnIcon: " ", addBtnIcon: ' ',
viewBtnIcon: " ", viewBtnIcon: ' ',
delBtnIcon: " ", delBtnIcon: ' ',
editBtnIcon: " ", editBtnIcon: ' ',
align: "center", align: 'center',
column: [ column: [
{ {
label: "绑定编号", label: '绑定编号',
prop: "mtnCode", prop: 'mtnCode',
search: true, search: true,
sortable: true, sortable: true,
overHidden: true, overHidden: true,
}, },
{ {
label: "车间订单号", label: '车间订单号',
prop: "prWorkPlan.prWorkOrder.woCode", prop: 'prWorkPlan.prWorkOrder.woCode',
bind: "prWorkPlan.prWorkOrder.woCode",
search: true, search: true,
sortable: true, sortable: true,
overHidden: true, overHidden: true,
searchLabelWidth: 120, searchLabelWidth: 120,
}, },
{ {
label: "物料号", label: '物料号',
prop: "prWorkPlan.prWorkOrder.pjYieldOrder.partCode", prop: 'prWorkPlan.prWorkOrder.pjYieldOrder.partCode',
bind: "prWorkPlan.prWorkOrder.pjYieldOrder.partCode",
search: true, search: true,
sortable: true, sortable: true,
overHidden: true, overHidden: true,
}, },
{ {
label: "批次号", label: '批次号',
prop: "prWorkPlan.prWorkOrder.batchNo", prop: 'prWorkPlan.prWorkOrder.batchNo',
bind: "prWorkPlan.prWorkOrder.batchNo",
search: true, search: true,
sortable: true, sortable: true,
overHidden: true, overHidden: true,
}, },
{ {
label: "数量", label: '数量',
prop: "prWorkPlan.workQty", prop: 'prWorkPlan.workQty',
bind: "prWorkPlan.workQty",
search: false, search: false,
sortable: true, sortable: true,
overHidden: true, overHidden: true,
}, },
{ {
label: "设备编码", label: '设备编码',
prop: "equipmentCard.deviceCode", prop: 'equipmentCard.deviceCode',
bind: "equipmentCard.deviceCode",
search: false, search: false,
sortable: true, sortable: true,
overHidden: true, overHidden: true,
}, },
{ {
label: "挂具编号", label: '挂具编号',
prop: "bsRackSet.rsCode", prop: 'bsRackSet.rsCode',
bind: "bsRackSet.rsCode",
search: false, search: false,
sortable: true, sortable: true,
overHidden: true, overHidden: true,
}, },
{ {
label: "飞靶编号", label: '飞靶编号',
prop: "bsFeiBaSet.fsCode", prop: 'bsFeiBaSet.fsCode',
bind: "bsFeiBaSet.fsCode",
search: false, search: false,
sortable: true, sortable: true,
overHidden: true, overHidden: true,
}, },
{ {
label: "绑定时间", label: '绑定时间',
prop: "createTime", prop: 'createTime',
search: true, search: true,
sortable: true, sortable: true,
overHidden: true, overHidden: true,
}, },
{ {
label: "绑定人员", label: '绑定人员',
prop: "createMan.userName", prop: 'createMan.userName',
bind: "createMan.userName",
search: false, search: false,
sortable: true, sortable: true,
overHidden: true, overHidden: true,
@ -178,133 +152,16 @@ export default {
data: [], data: [],
}; };
}, },
computed: {
...mapGetters(["userInfo", "permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.menu_add, false),
viewBtn: this.validData(this.permission.menu_view, false),
delBtn: this.validData(this.permission.menu_delete, false),
editBtn: this.validData(this.permission.menu_edit, false),
};
},
ids() {
let ids = [];
this.selectionList.forEach((ele) => {
ids.push(ele.id);
});
return ids.join(",");
},
},
methods: { methods: {
//
setCraftAbility(ocId) {
this.ocId = ocId;
this.setCraftAbilityOpen = true;
},
changePWD(ecId) {
this.ecId = ecId;
this.showIp = true;
},
cancel(isRefresh) {
this.showIp = false;
this.isOpen = false;
this.setCraftAbilityOpen = false;
if (isRefresh) {
this.refresh();
}
},
//
setCrew(bcId) {
console.log(9999, bcId);
this.bcId = bcId;
this.setCrewOpen = true;
},
//
setCrewOpeSancel(isRefresh) {
if (isRefresh) {
this.$refs.myTable.load();
}
this.setCrewOpen = false;
},
initData() {
// getMenuTree().then(res => {
// const column = this.findObject(this.option.column, 'parentId');
// column.dicData = res.data.data;
// });
},
handleAdd(row) {
this.parentId = row.id;
const column = this.findObject(this.option.column, "parentId");
column.value = row.id;
column.addDisabled = true;
this.$refs.crud.rowAdd();
},
//
rowSave(row, done, loading) {
// add(row).then(
// res => {
// //
// const data = res.data.data;
// row.id = data.id;
// this.$message({
// type: 'success',
// message: '!',
// });
// //
// done(row);
// },
// error => {
// window.console.log(error);
// loading();
// }
// );
},
//
rowUpdate(row, index, done, loading) {
// update(row).then(
// () => {
// this.$message({
// type: 'success',
// message: '!',
// });
// //
// done(row);
// },
// error => {
// window.console.log(error);
// loading();
// }
// );
},
rowDel(row, index, done) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.$message({
type: "success",
message: "操作成功!",
});
//
done(row);
});
},
// //
searchReset() { searchReset() {
this.query = {}; this.query = {};
this.parentId = 0;
this.onLoad(this.page); this.onLoad(this.page);
}, },
// //
searchChange(params, done) { searchChange(params, done) {
this.query = params; this.query = params;
this.parentId = "";
this.page.currentPage = 1; this.page.currentPage = 1;
this.onLoad(this.page, params); this.onLoad(this.page, params);
done(); done();
@ -318,38 +175,15 @@ export default {
this.selectionList = []; this.selectionList = [];
this.$refs.crud.toggleSelection(); this.$refs.crud.toggleSelection();
}, },
// beforeOpen
beforeOpen(done, type) {
if (["add", "edit"].includes(type)) {
this.initData();
}
if (["edit", "view"].includes(type)) {
getMenu(this.form.id).then((res) => {
this.form = Object.assign(res.data.data, {
hasChildren: this.form.hasChildren,
});
if (this.form.parentId === "0") {
this.form.parentId = "";
}
});
}
done();
},
// beforeClose
beforeClose(done) {
this.parentId = "";
const column = this.findObject(this.option.column, "parentId");
column.value = "";
column.addDisabled = false;
done();
},
// //
currentChange(currentPage) { currentChange(currentPage) {
this.page.currentPage = currentPage; this.page.currentPage = currentPage;
this.onLoad(this.page, this.query);
}, },
// //
sizeChange(pageSize) { sizeChange(pageSize) {
this.page.pageSize = pageSize; this.page.pageSize = pageSize;
this.onLoad(this.page, this.query);
}, },
refreshChange() { refreshChange() {
@ -359,102 +193,10 @@ export default {
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;
getLazyList(this.parentId, Object.assign(params, this.query)).then((res) => { getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
// this.data = res.data.data; // this.data = res.data.data;
this.data = [
{
abbreviation: "L120",
address: "aaa",
codeAndName: "L120/L120",
contactMan: "aaa",
contactPhone: "aaa",
craftAbility: "不锈钢涂福斯润滑剂、DL零件包装、",
curStatus: 0,
curStatusText: "正常供货",
email: "aaa",
keyValue: 2,
limitType: 0,
ocCode: "L120",
ocId: 2,
ocName: "L120",
oemPassword: null,
partCodeYesOrNo: false,
qualification: 0,
qualificationTitle: "民品&普军",
region: "江苏省",
updateTime: "2023-04-14 18:33:49",
},
{
abbreviation: "L050",
address: "aaa",
codeAndName: "L050/测试厂家1",
contactMan: "aaa",
contactPhone: "aaa",
craftAbility:
"挂镀金锑、金锑合金、镀纯金、复合镍、化学镀镍、涂色标、局部镀厚金、闪镀金、DL零件包装、镀金小批量、喷砂、微孔镀金、铜合金化学镀镍、手工局部电镀、局部退火、复合材料镀镍、挂镀金、镀金丝、滚镀金或振镀金",
curStatus: 0,
curStatusText: "正常供货",
email: "aaa",
keyValue: 3,
limitType: 0,
ocCode: "L050",
ocId: 3,
ocName: "测试厂家1",
oemPassword: null,
partCodeYesOrNo: false,
qualification: 10,
qualificationTitle: null,
region: "浙江省",
updateTime: "2023-04-14 18:33:49",
},
{
abbreviation: "L065",
address: "aaa",
codeAndName: "L065/L065",
contactMan: "aaa",
contactPhone: "aaa",
craftAbility: null,
curStatus: 0,
curStatusText: "正常供货",
email: "aaa",
keyValue: 4,
limitType: 0,
ocCode: "L065",
ocId: 4,
ocName: "L065",
oemPassword: null,
partCodeYesOrNo: false,
qualification: 2,
qualificationTitle: "民品&普军&航军",
region: null,
updateTime: "2023-04-14 18:33:49",
},
{
abbreviation: "L070",
address: "aaa",
codeAndName: "L070/L070",
contactMan: "aaa",
contactPhone: "aaa",
craftAbility: "滚镀金或振镀金、局部镀厚金、闪镀金、镀铂金、局部退火",
curStatus: 0,
curStatusText: "正常供货",
email: "aaa",
keyValue: 5,
limitType: 0,
ocCode: "L070",
ocId: 5,
ocName: "L070",
oemPassword: null,
partCodeYesOrNo: false,
qualification: 10,
qualificationTitle: null,
region: "江苏省",
updateTime: "2023-04-14 18:33:49",
},
];
this.loading = false; this.loading = false;
this.page.total = this.data.length; this.page.total = this.data.length;
this.selectionClear();
}); });
}, },
}, },

@ -143,20 +143,10 @@ export default {
}, },
methods: { methods: {
// //
handleSearchInput(key, value){ handleSearchInput(key, value) {},
},
tabPositionChange() { tabPositionChange() {
this.option.column = wordReporting[this.tabPosition]; this.option.column = wordReporting[this.tabPosition];
if (this.tabPosition == 'workReporting') { this.onLoad();
this.data = workReportingData['data'];
} else {
this.data = workReportingData['data'];
// getRecordList().then(res => {
// this.data = res.data.records;
// this.page.total = this.data.length;
// });
}
this.page.total = this.data.length; this.page.total = this.data.length;
}, },
handleDetail() { handleDetail() {
@ -172,9 +162,24 @@ export default {
} }
}); });
}, },
onLoad() { onLoad(page, params = {}) {
this.data = workReportingData['data']; this.loading = true;
this.page.total = this.data.length; if (this.tabPosition == 'workReporting') {
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
this.data = res.data.data.records;
this.loading = false;
this.page.total = res.data.data.total;
this.selectionClear();
});
} else {
getRecordList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(
res => {
this.data = res.data.data.records;
this.loading = false;
this.page.total = res.data.data.total;
}
);
}
}, },
}, },
}; };

Loading…
Cancel
Save