检验分配升级

master
zhaoxiaolin 3 months ago
parent 1821d792b1
commit 8872f5a12f

@ -96,4 +96,10 @@ export function getBomList(query) {
}); });
} }
// 删除生产报工物料消耗
export function deleteConsume(workorderCode) {
return request({
url: '/mes/reportWorkConsume/deleteConsume/' + workorderCode,
method: 'delete'
});
}

@ -85,3 +85,18 @@ export function delFile(id) {
method: 'delete' method: 'delete'
}); });
} }
// 查询检验节点维护详细
export function listBelongToStandars() {
return request({
url: '/quality/checkType/listBelongToStandars',
method: 'get'
});
}
// 查询检验节点维护详细
export function listBelongToLines() {
return request({
url: '/quality/checkType/listBelongToLines',
method: 'get'
});
}

@ -91,3 +91,12 @@ export function deleteByMaterialCode(data) {
data: data data: data
}); });
} }
// 修改用户物料关联
export function updateBelongTo(data) {
return request({
url: '/quality/material/updateBelongTo',
method: 'put',
data: data
});
}

@ -518,7 +518,7 @@
</el-tabs> </el-tabs>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="warning" @click="clearConsume" >一键清理</el-button>
<el-button type="primary" @click="cancel" v-if="optType == 'view'"></el-button> <el-button type="primary" @click="cancel" v-if="optType == 'view'"></el-button>
<el-button :disabled="loading" type="primary" @click="submitConsume" v-else> </el-button> <el-button :disabled="loading" type="primary" @click="submitConsume" v-else> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
@ -704,7 +704,7 @@ import {
submitConsumePS, submitConsumePS,
submitReportInfo, submitReportInfo,
getBomList, getBomList,
getAllLevelConsumeList, getAllLevelConsumeList,deleteConsume
} from "@/api/mes/reportWorkConsume"; } from "@/api/mes/reportWorkConsume";
import ReportWorkConsume from "./reportWorkConsume.vue"; import ReportWorkConsume from "./reportWorkConsume.vue";
import ItemSelectUser from "./selectUser.vue"; import ItemSelectUser from "./selectUser.vue";
@ -1434,9 +1434,7 @@ export default {
}); });
this.mergedArray = newPConsumeRows; this.mergedArray = newPConsumeRows;
this.pConsumeRows = newPConsumeRows; this.pConsumeRows = newPConsumeRows;
console.log("过滤后:", this.pConsumeRows);
} }
console.log(this.pConsumeRows, selection, "wwwwww");
}, },
// all(zxl) // all(zxl)
allConsumeSelection(selection, row) { allConsumeSelection(selection, row) {
@ -1490,6 +1488,16 @@ export default {
this.loading = false; // loading this.loading = false; // loading
}); });
}, },
/**清理重复报工损耗**/
clearConsume(){
const workorderCode = this.selectRow[0].workorderCode;
this.$modal.confirm('是否确认清理工单号"' + workorderCode + '"的数据项?').then(function() {
return deleteConsume(workorderCode);
}).then(() => {
this.$modal.msgSuccess("清理成功");
this.cancel();
}).catch(() => {});
},
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download( this.download(

@ -166,15 +166,21 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="所属线体/标准" align="center" prop="attr2" >
<template slot-scope="scope">
<el-select v-model="scope.row.attr2" placeholder="请选择" clearable @change="selectBelongTo(scope.row)">
<el-option
v-for="item in belongToOptions"
:key="item.typeCode"
:label="item.typeName"
:value="item.typeCode"
></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column fixed="right" align="center" label="操作" width="100"> <el-table-column fixed="right" align="center" label="操作" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button size="small" type="danger" plain @click="deleteUser(scope.row)"></el-button>
size="small"
type="danger"
plain
@click="deleteUser(scope.row)"
>
移除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -193,8 +199,10 @@
</template> </template>
<script> <script>
import { listCheckType, getCheckType, delCheckType, addCheckType, updateCheckType } from "@/api/quality/checkType"; import { listCheckType, getCheckType, delCheckType, addCheckType, updateCheckType,
import{ getSelectedUsers, addUserBind, deleteByMaterialCode} from "@/api/quality/userbind"; listBelongToStandars,listBelongToLines
} from "@/api/quality/checkType";
import{ getSelectedUsers, addUserBind, deleteByMaterialCode,updateBelongTo} from "@/api/quality/userbind";
import ItemSelectUser from "./selectUser.vue"; import ItemSelectUser from "./selectUser.vue";
import ItemConfFile from "./confFile.vue"; import ItemConfFile from "./confFile.vue";
export default { export default {
@ -224,6 +232,9 @@ export default {
checkTypeList: [], checkTypeList: [],
userList: [], userList: [],
userRows: [], userRows: [],
belongToOptions:[],
belongToStandars:[],
belongToLines:[],
// //
title: "", title: "",
titleUserBind: "", titleUserBind: "",
@ -261,6 +272,8 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.getBelongToLinesList();
this.getBelongToStandars()
}, },
methods: { methods: {
/** 查询检验节点维护列表 */ /** 查询检验节点维护列表 */
@ -272,6 +285,19 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
/** 查询所属线体选择列表 */
getBelongToLinesList() {
listBelongToLines().then(response => {
this.belongToLines = response;
});
},
/** 查询所属标准选择列表 */
getBelongToStandars() {
listBelongToStandars().then(response => {
this.belongToStandars = response;
});
},
// //
cancel() { cancel() {
this.open = false; this.open = false;
@ -373,6 +399,15 @@ export default {
this.attr1 = row.attr1; this.attr1 = row.attr1;
this.getUserParams.materialCode = row.orderCode; this.getUserParams.materialCode = row.orderCode;
if(row.orderCode == 'checkTypeSC'|| row.orderCode == 'checkTypeSCXJ' ||
row.orderCode=='checkTypeCPPC' || row.orderCode=='checkTypeCP'){
this.belongToOptions = this.belongToLines;
}else if(row.orderCode == 'checkTypeLL'){
this.belongToOptions = this.belongToStandars;
}
console.log("======"+this.belongToOptions)
// //
getSelectedUsers(this.getUserParams).then(response => { getSelectedUsers(this.getUserParams).then(response => {
this.userList = response.rows; this.userList = response.rows;
@ -431,7 +466,6 @@ export default {
} }
this.getSelectUserList(); this.getSelectUserList();
}); });
}, },
deleteUser(row) { deleteUser(row) {
@ -460,6 +494,16 @@ export default {
this.$refs.itemConfFile.showFlag = true; this.$refs.itemConfFile.showFlag = true;
this.$refs.itemConfFile.getList(); this.$refs.itemConfFile.getList();
}, },
//
selectBelongTo(row){
const data = {
id: row.id,
attr2: row.attr2,
}
updateBelongTo(data).then(response => {
this.$modal.msgSuccess("分配成功");
});
}
} }
}; };
</script> </script>

@ -38,6 +38,7 @@
<template v-for="(column, index) in showTitles"> <template v-for="(column, index) in showTitles">
<el-table-column align="center" min-width="120" :prop="column.id" :key="column.id" :label="column.titleName"/> <el-table-column align="center" min-width="120" :prop="column.id" :key="column.id" :label="column.titleName"/>
</template> </template>
<el-table-column label="累计" align="center" prop="rowSum" min-width="100"/>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="图表" name="second"> <el-tab-pane label="图表" name="second">

@ -38,6 +38,7 @@
<template v-for="(column, index) in showTitles"> <template v-for="(column, index) in showTitles">
<el-table-column align="center" min-width="120" :prop="column.id" :key="column.id" :label="column.titleName"/> <el-table-column align="center" min-width="120" :prop="column.id" :key="column.id" :label="column.titleName"/>
</template> </template>
<el-table-column label="累计" align="center" prop="rowSum" min-width="100"/>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="图表" name="second"> <el-tab-pane label="图表" name="second">

Loading…
Cancel
Save