车间工作台页面开发和接口联调

dev-scheduling
zhangdi 4 weeks ago
parent 7dbc5d41f1
commit 4d32578db0
  1. 9
      src/api/taskCope/index.js
  2. 20
      src/api/workCheck/index.js
  3. 32
      src/api/workReport/index.js
  4. 23
      src/router/views/index.js
  5. 175
      src/views/processManagement/components/processMainte/dsPartBasicInfo.vue
  6. 10
      src/views/processManagement/taskProcessing.vue
  7. 327
      src/views/productionManagement/workReportingManagement/workRecord.vue
  8. 19
      src/views/productionSchedulingPlan/basic/equipmentCapacity.vue
  9. 10
      src/views/wel/components/quickAccess.vue
  10. 87
      src/views/zhgd-work/taskCope/index.vue
  11. 265
      src/views/zhgd-work/workCheck/index.vue
  12. 294
      src/views/zhgd-work/workReport/index.vue

@ -4,16 +4,17 @@ import request from '@/axios';
// 工序任务接收
export const workPlanReceive = (data) => {
return request({
url: '/produceMonitor/workPlanReceive',
url: '/blade-desk/produceMonitor/workPlanReceive',
method: 'post',
data: data,
params: data,
});
};
// 根据流程卡号查询订单信息
export const loadNotReceived = (cardNo) => {
export const loadNotReceived = (params) => {
return request({
url: '/produceMonitor/loadNotReceived/' + cardNo,
url: '/blade-desk/prMakeRec/loadNotReceived',
method: 'get',
params:params
});
};

@ -0,0 +1,20 @@
import request from '@/axios';
// 工序检验 流程卡号查询 /pdaLoad/loadProTest/{cardNo}
export const loadProTest = (params) => {
return request({
url: `/blade-desk/pdaLoad/loadProTest/${params.cardNo}`,
method: 'get',
// params:params
});
};
// 工序检验提交
export const saveProCheck = (data) => {
return request({
url: '/blade-desk/pdaLoad/saveProCheck',
method: 'post',
data: data,
});
};

@ -0,0 +1,32 @@
import request from '@/axios';
// 报工查询
export const loadCurrentWp = (params) => {
return request({
url: '/blade-desk/prMakeRec/loadCurrentWp',
method: 'get',
params:params
});
};
// 报工提交
export const saveMakeRec = (data) => {
return request({
url: '/blade-desk/prMakeRec/saveMakeRec',
method: 'post',
data:data
});
};
// 报工记录
export const queryMakeRec = (current, size, params) => {
return request({
url: '/blade-desk/prMakeRec/queryMakeRec',
method: 'get',
params: {
...params,
current,
size,
},
});
};

@ -37,7 +37,7 @@ export default [
},
{
path: '/taskCope',
component: () => import(/* webpackChunkName: "page" */ '@/views/wel/taskCope/index.vue'),
component: () => import(/* webpackChunkName: "page" */ '@/views/zhgd-work/taskCope/index.vue'),
name: '工序接收',
meta: {
keepAlive: true,
@ -45,6 +45,27 @@ export default [
isAuth: false,
},
},
// workReport
{
path: '/workReport',
component: () => import(/* webpackChunkName: "page" */ '@/views/zhgd-work/workReport/index.vue'),
name: '工序报工',
meta: {
keepAlive: true,
isTab: false,
isAuth: false,
},
},
{
path: '/workCheck',
component: () => import(/* webpackChunkName: "page" */ '@/views/zhgd-work/workCheck/index.vue'),
name: '工序检验',
meta: {
keepAlive: true,
isTab: false,
isAuth: false,
},
},
// {
// path: 'search',
// name: '菜单搜索',

@ -24,7 +24,7 @@
<el-input v-model="formData.partName" disabled placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="8" v-if="(notSinTer && notGlassCake) || partType == '热表'">
<el-form-item label="产品型号:" prop="productType">
<el-input v-model="formData.productType" placeholder="请输入" disabled />
</el-form-item>
@ -34,7 +34,7 @@
</el-form-item>
</el-col> :disabled="disabled"-->
<el-col :span="8" v-if="partType == '烧结'">
<el-col :span="8">
<el-form-item label="是否为玻璃饼:" prop="isClassCake">
<el-switch
v-model="formData.isClassCake"
@ -46,54 +46,54 @@
/>
</el-form-item>
</el-col>
<el-col :span="8" v-if="partType == '烧结'">
<el-col :span="8">
<el-form-item label="是否印字:" prop="isPrint">
<el-radio-group v-if="formData.isGlassCake" v-model="formData.isPrint">
<el-radio-group v-model="formData.isPrint" v-if="notGlassCake && partType != '热表'">
<el-radio value="2"></el-radio>
<el-radio value="3"></el-radio>
<el-radio value="1"></el-radio>
</el-radio-group>
<el-radio-group v-model="formData.isPrint" v-else>
<el-radio-group v-model="formData.isPrint" v-if="partType == '热表'">
<el-radio value="2"></el-radio>
<el-radio value="1"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8" v-if="partType == '热表' && formData.isGlassCake">
<el-col
:span="8"
v-if="((notSinTer || !notGlassCake) && partType == '烧结') || partType == '热表'"
>
<el-form-item label="材料:" prop="material">
<el-input v-model="formData.material" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="8" v-if="formData.isGlassCake">
<el-col :span="8" v-if="(child || formData.glassCake) && formData.sinTerType != 5">
<el-form-item label="粉重:" prop="powderWeight">
<el-input v-model="formData.powderWeight" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="8" v-if="formData.isGlassCake">
<el-col :span="8" v-if="!notGlassCake">
<el-form-item label="成型厚度:" prop="formingThickness">
<el-input v-model="formData.formingThickness" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="8" v-if="partType == '烧结' && formData.isGlassCake">
<!-- prop="area" 热表必填 非热表不必填 -->
<el-col :span="8" v-if="(notSinTer || !notGlassCake) && partType == '烧结'">
<el-form-item label="面积(dm²):">
<el-input v-model="formData.area" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="8" v-if="partType == '热表'">
<el-col :span="8">
<el-form-item label="硬度:" prop="hardness">
<el-input v-model="formData.hardness" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="8" v-if="partType == '热表'">
<el-col :span="8">
<el-form-item label="材料:" prop="material">
<el-input v-model="formData.material" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col
:span="8"
v-if="partType == '热表'"
>
<el-col :span="8">
<el-form-item label="物料编码:" prop="plateGoodsCode">
<el-select
v-model="formData.plateGoodsCode"
@ -107,74 +107,50 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" v-if="partType == '热表'">
<template v-if="partType == '热表'">
<el-col :span="8">
<el-form-item label="镀种1:" prop="plate">
<el-input v-model="formData.plate" placeholder="请输入" />
<!-- <el-select
v-model="formData.plate"
placeholder="请选择"
style="width: 250px"
clearable
filterable
>
<el-option
v-for="item in plateList"
:label="item.plating"
:value="item.id"
></el-option>
</el-select> -->
</el-form-item>
</el-col>
<el-col :span="8" v-if="partType == '热表'">
<el-col :span="8">
<el-form-item label="镀层代号1:" prop="plateCode">
<el-input v-model="formData.plateCode" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="8" v-if="partType == '热表'">
<el-col :span="8">
<el-form-item label="面积1(dm²):" prop="area">
<el-input v-model="formData.area" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="8" v-if="partType == '热表'">
<el-col :span="8">
<el-form-item label="镀种2:" prop="plateTwo">
<el-input v-model="formData.plateTwo" placeholder="请输入" />
<!-- <el-select
v-model="formData.plateTwo"
placeholder="请选择"
style="width: 250px"
clearable
filterable
>
<el-option
v-for="item in plateList"
:label="item.plating"
:value="item.id"
></el-option>
</el-select> -->
</el-form-item>
</el-col>
<el-col :span="8" v-if="partType == '热表'">
<el-col :span="8">
<el-form-item label="镀层代号2:" prop="plateCodeTwo">
<el-input v-model="formData.plateCodeTwo" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="8" v-if="partType == '热表'">
<el-col :span="8">
<el-form-item label="面积2(dm²):" prop="areaTwo">
<el-input v-model="formData.areaTwo" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="8" v-if="partType == '烧结' && !formData.isGlassCake">
<el-form-item label="镀层厚度:" prop="plateThickness">
<el-col :span="8">
<el-form-item label="镀层厚度1:" prop="plateThickness">
<el-input v-model="formData.plateThickness" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="8" v-if="partType == '热表'">
<el-form-item label="镀层厚度1:" prop="plateThickness">
<el-col :span="8">
<el-form-item label="镀层厚度2:" prop="plateThickness">
<el-input v-model="formData.plateThickness" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="8" v-if="partType == '热表'">
<el-form-item label="镀层厚度2:" prop="plateThickness">
</template>
<el-col :span="8" v-if="partType == '烧结' && !formData.isGlassCake">
<el-form-item label="镀层厚度:" prop="plateThickness">
<el-input v-model="formData.plateThickness" placeholder="请输入" />
</el-form-item>
</el-col>
@ -184,7 +160,8 @@
<el-input v-model="formData.productApplicationArea" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="8" v-if="partType == '烧结'">
<template v-if="partType == '烧结'">
<el-col :span="8">
<el-form-item label="玻璃饼直径">
<el-input-number
:max="100000"
@ -194,7 +171,7 @@
/>
</el-form-item>
</el-col>
<el-col :span="8" v-if="partType == '烧结'">
<el-col :span="8">
<el-form-item label="壳体最大外径">
<el-input-number
:max="100000"
@ -204,6 +181,7 @@
/>
</el-form-item>
</el-col>
</template>
</el-row>
<el-row :gutter="24">
@ -319,9 +297,7 @@
>
<el-form-item label="工艺校验:" prop="sinTer">
<div style="width: 100%">
<el-checkbox v-model="formData.goldMark" disabled v-if="partType == '热表'"
>镀金标识</el-checkbox
>
<el-checkbox v-model="formData.goldMark" disabled>镀金标识</el-checkbox>
<el-checkbox
v-model="formData.markingsTest"
@change="setDataLocal"
@ -332,7 +308,6 @@
<el-checkbox
v-model="formData.fluorescenceCheck"
@change="setDataLocal"
v-if="partType == '热表'"
:true-label="'1'"
:false-label="'0'"
>荧光检</el-checkbox
@ -340,7 +315,6 @@
<el-checkbox
v-model="formData.hotDispose"
@change="setDataLocal"
v-if="partType == '热表'"
:true-label="'1'"
:false-label="'0'"
>热处理检验</el-checkbox
@ -348,7 +322,6 @@
<el-checkbox
v-model="formData.inkjetPrinting"
@change="setDataLocal"
v-if="partType == '热表'"
:true-label="'1'"
:false-label="'0'"
>喷码</el-checkbox
@ -681,11 +654,22 @@ export default {
this.partType = res.data.data.dsPartEntity.isSintering == '1' ? '烧结' : '热表';
// if (res.data.data.dsPartEntity.isGlassCake === '0') {
this.formData.isGlassCake = false;
// } else {
// this.formData.isGlassCake = true;
// }
if (this.formData.sinTerType == 3) {
this.formData.glassCake = true;
} else if (this.formData.sinTerType == 5) {
this.formData.sinTer = true;
} else {
this.formData.glassCake = false;
this.formData.sinTer = false;
}
this.sinTerChange(this.formData.sinTer);
this.glassCakeChange(this.formData.glassCake);
const craftWay = this.formData.craftWay;
if (craftWay.indexOf('涂色标') !== -1 || craftWay.indexOf('涂色带') !== -1) {
this.formData.markingsTest = true;
}
// this.getLocallyPlatedPartList();
let selPart = this.locallyPlatedData.filter(item => {
return item.partCode == this.formData.partCode;
@ -695,10 +679,65 @@ export default {
this.formData.goldMark = true;
}
}
this.formData.isClassCake = true
this.formData.isClassCake = true;
});
},
sinTerChange(v) {
if (v) {
this.notSinTer = false;
// this.rules = this.rules2;
// this.$set(this.rules, 'craftWay', [this.$validation.required]);
// if (!this.formData.expirationPeriod && this.formData.expirationPeriod == '') {
// this.$set(this.formData, 'expirationPeriod', 9999);
// }
// if (!this.formData.advanceRemind && this.formData.advanceRemind == '') {
// this.$set(this.formData, 'advanceRemind', 10);
// }
// if (!this.formData.area && this.formData.area == '') {
// this.$set(this.formData, 'area', 1);
// }
} else {
this.notSinTer = true;
if (this.notGlassCake) {
// this.rules = this.rules1;
// if (!this.childPage) {
// this.$set(this.rules, 'lettering', [this.$validation.required]);
// }
} else {
// this.$set(this.rules, 'craftWay', []);
}
}
},
glassCakeChange(value) {
if (value) {
this.notGlassCake = false;
// this.$set(this.rules, 'lettering', []);
// this.areaText = '';
// this.rules = this.rules2;
// if (!this.formData.expirationPeriod && this.formData.expirationPeriod == '') {
// this.$set(this.formData, 'expirationPeriod', 9999);
// }
// if (!this.formData.advanceRemind && this.formData.advanceRemind == '') {
// this.$set(this.formData, 'advanceRemind', 10);
// }
// if (!this.formData.area && this.formData.area == '') {
// this.$set(this.formData, 'area', 1);
// }
// this.$set(this.rules, 'craftWay', []);
} else {
this.notGlassCake = true;
// this.areaText = this.$t('global.area');
// if (this.notSinTer) {
// this.rules = this.rules1;
// }
// if (!this.childPage) {
// this.$set(this.rules, 'lettering', [this.$validation.required]);
// }
// this.$set(this.rules, 'craftWay', [this.$validation.required]);
}
},
//
periodOfValidityFn(value) {
if (value == 2) {

@ -21,11 +21,12 @@
<template #menu-right="{ size }"> </template>
<template #menu="scope">
{{ scope.$index }}
<!-- {{ scope.$index }} -->
<el-button type="primary" link @click="viewDetails(scope.row.partId, scope.row)"
>详情</el-button
>
<!-- 0 待分派 1 待接收 2 进行中 3 已完成 " -->
<el-button
type="primary"
link
@ -54,11 +55,7 @@
>
</template>
<template #bsWorkType.wtName="scope">
<span>
{{ scope.row.bsWorkType ? scope.row.bsWorkType.wtName : '-' }}
</span>
</template>
<template #name="{ row }">
<i :class="row.source" style="margin-right: 5px" />
<span>{{ row.name }}</span>
@ -193,6 +190,7 @@ export default {
searchSpan: 6,
searchMenuPosition: 'right',
align: 'center',
load: this.loadNode, //
column: [
{
label: '零件号',

@ -0,0 +1,327 @@
<template>
<basic-container>
<avue-crud
:option="option"
:table-loading="loading"
:data="data"
v-model="form"
v-model:page="page"
ref="crud"
@search-change="searchChange"
@search-reset="searchReset"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template #menu-left> </template>
<template #menu-right> </template>
<template #menu="{ row }"> </template>
<template #heatTreat="scope"> </template>
</avue-crud>
</basic-container>
</template>
<script>
import { queryMakeRec } from '@/api/workReport/index.js';
export default {
components: {},
data() {
return {
form: {},
selectionList: [],
query: {},
loading: false,
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
option: {
columnSort: true,
tip: false,
height: 'auto',
calcHeight: 32,
simplePage: false,
searchShow: true,
searchMenuSpan: 6,
searchIcon: true,
searchIndex: 3,
tree: false,
border: true,
index: true,
selection: false,
addBtn: false,
editBtn: false,
viewBtn: false,
delBtn: false,
editBtnText: '修改',
labelWidth: 120,
menuWidth: 80,
dialogWidth: 900,
dialogClickModal: false,
searchEnter: true,
excelBtn: false,
filterBtn: true,
searchShowBtn: false,
excelBtn: true,
showOverflowTooltip: true,
addBtnIcon: ' ',
viewBtnIcon: ' ',
delBtnIcon: ' ',
editBtnIcon: ' ',
gridBtn: false,
searchLabelPosition: 'left',
searchGutter: 24,
searchSpan: 6,
menuAlign: 'left',
gridBtn: false,
searchMenuPosition: 'right',
align: 'center',
menu:false,
column: [
{
label: '车间订单号',
prop: 'woCode',
search: false,
sortable: true,
span: 12,
width:150,
},
{
label: '产品号',
prop: 'partCode',
search: false,
sortable: true,
span: 12,
width:150,
},
{
label: '流程卡号',
prop: 'cardNo',
search: true,
sortable: true,
span: 12,
width:150,
},
{
label: '产品型号',
prop: 'productType',
search: false,
sortable: true,
span: 12,
width:150,
},
{
label: '批次',
prop: 'batchNo',
search: true,
sortable: true,
span: 12,
width:150,
},
{
label: '产品名称',
prop: 'partName',
search: true,
sortable: true,
span: 12,
width:150,
},
{
label: '镀种信息',
prop: 'plate',
search: false,
sortable: true,
span: 12,
width:150,
},
{
label: '生产标识',
prop: 'productIdent',
search: false,
sortable: true,
span: 12,
width:150,
},
{
label: '上序',
prop: 'frontPpsName',
search: false,
sortable: true,
span: 12,
width:150,
},
{
label: '上一班组',
prop: 'frontMakeTeamName',
search: false,
sortable: true,
span: 12,
width:150,
},
{
label: '加工工序',
prop: 'ppsName',
search: false,
sortable: true,
span: 12,
width:150,
},
{
label: '加工班组',
prop: 'makeTeamName',
search: false,
sortable: true,
span: 12,
width:150,
},
{
label: '下序',
prop: 'nextPpsName',
search: false,
sortable: true,
span: 12,
width:150,
},
{
label: '下一班组',
prop: 'nextMakeTeamName',
search: false,
sortable: true,
span: 12,
width:150,
},
{
label: '合格数量',
prop: 'workQty',
search: false,
sortable: true,
span: 12,
width:150,
},
{
label: '面积(d㎡)',
prop: 'ypArea',
search: false,
sortable: true,
span: 12,
width:150,
},
{
label: '报废数量',
prop: 'scrapQty',
search: false,
sortable: true,
span: 12,
width:150,
},
{
label: '报工时间',
prop: 'makeTime',
search: false,
sortable: true,
span: 12,
width:150,
},
],
},
data: [],
};
},
methods: {
rowSave(row, done, loading) {
// addPersonAbility(row).then(
// () => {
// this.onLoad(this.page);
// this.$message({
// type: 'success',
// message: '!',
// });
// done();
// },
// error => {
// window.console.log(error);
// loading();
// }
// );
},
rowUpdate(row, index, done, loading) {
// updatePersonAbility(row).then(
// () => {
// this.onLoad(this.page);
// this.$message({
// type: 'success',
// message: '!',
// });
// done();
// },
// error => {
// window.console.log(error);
// loading();
// }
// );
},
rowDel(row) {
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
// return removePersonAbility(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
});
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
queryMakeRec(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
this.data = res.data.data.records;
this.loading = false;
this.selectionClear();
});
},
},
mounted() {},
};
</script>
d

@ -23,7 +23,15 @@
<template #menu-right> </template>
<template #menu="{ row }"> </template>
<template #heatTreat="scope"> </template>
<template #standardProcessAbility="scope">
<span v-if="scope.row.partType==1||scope.row.partType==2||scope.row.partType==3">
<!-- <i v-for="(item,index) in JSON.parse(scope.row.standardProcessAbility)" :key="index">
{{ }}
</i> -->
{{ JSON.parse(scope.row.standardProcessAbility) }}
</span>
<span v-else>{{ scope.row.standardProcessAbility }}</span>
</template>
</avue-crud>
</basic-container>
</template>
@ -160,6 +168,15 @@ export default {
disabled: true,
// display:false,
},
{
label: '设备型号',
prop: 'equipNameType',
search: false,
sortable: true,
span: 12,
width: 120,
disabled: true,
},
// {
// label: '',
// prop: 'equipCode',

@ -26,17 +26,17 @@
</template>
<script>
import taskCope from '../taskCope/index.vue';
import taskCope from '@/views/zhgd-work/taskCope/index.vue';
export default {
components: { taskCope },
data() {
return {
accessData: [
{ name: '工序接收', url: 'plan', page: '/taskCope' },
{ name: '工序报工', url: 'rule', page: '/productionSchedulingPlan/productRlue ' },
{ name: '工序检验', url: 'product' },
{ name: '工艺模板', url: 'craft' },
{ name: '质量检验', url: 'quality' },
{ name: '工序报工', url: 'rule', page: '/workReport' },
{ name: '工序检验', url: 'product',page:'/workCheck' },
// { name: '', url: 'craft' },
// { name: '', url: 'quality' },
],
};
},

@ -10,17 +10,17 @@
/>
</template>
<template #menu-right>
<el-button type="primary" @click="receiveBatch('add')">批量接收 </el-button>
<el-button type="primary" @click="receiveBatch()">批量接收 </el-button>
</template>
<template #menu>
<el-button type="text" @click="delFn(scope.row)">删除</el-button>
<template #menu="scope">
<el-button type="text" @click="delFn(scope.row,scope.$index)">删除</el-button>
</template>
</avue-crud>
</basic-container>
</template>
<script>
import { loadNotReceived } from '@/api/taskCope/index';
import { loadNotReceived,workPlanReceive } from '@/api/taskCope/index';
export default {
components: {},
data() {
@ -80,35 +80,35 @@ export default {
column: [
{
label: '车间订单号',
prop: 'partCode',
prop: 'woCode',
search: false,
sortable: false,
width: '120',
},
{
label: '产品号',
prop: 'partName',
prop: 'partCode',
search: false,
sortable: false,
width: '120',
},
{
label: '流程卡号',
prop: 'partName',
prop: 'nextRoam',
search: false,
sortable: false,
width: '120',
},
{
label: '产品型号',
prop: 'partName',
prop: 'productType',
search: false,
sortable: false,
width: '120',
},
{
label: '批次',
prop: 'partName',
prop: 'batchNo',
search: false,
sortable: false,
width: '120',
@ -122,7 +122,7 @@ export default {
},
{
label: '当前工序',
prop: 'partName',
prop: 'currentWpTitle',
search: false,
sortable: false,
width: '120',
@ -143,91 +143,91 @@ export default {
},
{
label: '镀种信息',
prop: 'partName',
prop: 'plate',
search: false,
sortable: false,
width: '120',
},
{
label: '生产标识',
prop: 'partName',
prop: 'prodIdent',
search: false,
sortable: false,
width: '120',
},
{
label: '订单优先级',
prop: 'partName',
prop: 'priorityTitle',
search: false,
sortable: false,
width: '120',
},
{
label: '需求部门',
prop: 'partName',
prop: 'useDept',
search: false,
sortable: false,
width: '120',
},
{
label: '生产数量',
prop: 'partName',
prop: 'makeQty',
search: false,
sortable: false,
width: '120',
},
{
label: '面积(d㎡)',
prop: 'partName',
prop: 'poArea',
search: false,
sortable: false,
width: '120',
},
{
label: '交期',
prop: 'partName',
prop: 'demandDate',
search: false,
sortable: false,
width: '120',
},
{
label: '计划员',
prop: 'partName',
prop: 'planUser',
search: false,
sortable: false,
width: '120',
},
{
label: '计划下达时间',
prop: 'partName',
prop: 'releaseDate',
search: false,
sortable: false,
width: '120',
},
{
label: '计划完工时间',
prop: 'partName',
prop: 'planEndTime',
search: false,
sortable: false,
width: '120',
},
{
label: '已入库数量',
prop: 'partName',
prop: 'inventoryQty',
search: false,
sortable: false,
width: '120',
},
{
label: '未入库数量',
prop: 'partName',
prop: 'notInQty',
search: false,
sortable: false,
width: '120',
},
{
label: '加工班组',
prop: 'partName',
prop: 'currentMakeTeam',
search: false,
sortable: false,
width: '120',
@ -248,14 +248,14 @@ export default {
},
{
label: '领料状态',
prop: 'partName',
prop: 'pickingStatusTitle',
search: false,
sortable: false,
width: '120',
},
{
label: '运行状态',
prop: 'partName',
prop: 'runStatusTitle',
search: false,
sortable: false,
width: '120',
@ -268,30 +268,49 @@ export default {
},
methods: {
delFn(row, index) {
this.$confirm('确定要删除该条数据吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
// data
this.data.splice(index, 1);
this.$message.success('删除成功');
})
.catch(() => {});
},
//
changeCode() {
this.loading = true;
loadNotReceived(this.cardNo)
loadNotReceived({ cardNo: this.cardNo })
.then(res => {
this.cardNo = '';
console.log(res, 'resres');
this.data.push(res.data.data);
this.loading = false;
console.log(res.data.data, 'resres');
})
.catch(err => {});
.catch(err => {
this.cardNo = '';
this.loading = false;
});
},
//
receiveBatch(type) {
if (this.selectionList.length === 0) {
this.$message.warning('请选择要处理的数据');
return;
}
receiveBatch() {
this.$confirm('确定要批量处理吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
this.loading = true;
let ids = this.data.map(item => item.wpId);
workPlanReceive({ wpIds:ids.join(',') }).then(res => {
this.loading = false;
this.data=[]
this.$message.success('处理成功');
}).catach(err => {
this.loading = false;
});
});
},
},

@ -0,0 +1,265 @@
<template>
<basic-container>
<el-form ref="form" :model="formData" :rules="rules" inline label-width="80px">
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="流程卡号" prop="cardNo">
<el-input
ref="codeFocus"
v-model="formData.cardNo"
placeholder="请扫描流程卡号"
@keyup.enter.native="codeKeyUp"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-descriptions
:column="3"
label-width="100px"
:content-style="{ 'min-width': '120px' }"
class="margin-top"
border
>
<el-descriptions-item>
<template #label> 流程卡号 </template>
{{ tableObj.cardNo }}
</el-descriptions-item>
<el-descriptions-item>
<template #label> 车间订单号 </template>
{{ tableObj.woCode }}
</el-descriptions-item>
<el-descriptions-item>
<template #label> 批次 </template>
{{ tableObj.batchNo }}
</el-descriptions-item>
<el-descriptions-item>
<template #label> 零件号 </template>
{{ tableObj.partCode }}
</el-descriptions-item>
<el-descriptions-item>
<template #label> 零件名称 </template>
{{ tableObj.partName }}
</el-descriptions-item>
<el-descriptions-item>
<template #label> 上序号 </template>
{{ tableObj.frontOrders }}
</el-descriptions-item>
<el-descriptions-item>
<template #label> 上序名称 </template>
{{ tableObj.frontPpsName }}
</el-descriptions-item>
<el-descriptions-item>
<template #label> 工序号 </template>
{{ tableObj.orders }}
</el-descriptions-item>
<el-descriptions-item>
<template #label> 工序名称 </template>
{{ tableObj.ppsName }}
</el-descriptions-item>
<el-descriptions-item>
<template #label> 加工班组 </template>
{{ tableObj.makeTeam }}
</el-descriptions-item>
<el-descriptions-item>
<template #label> 检验数量 </template>
<el-input v-model="tableObj.makeQty" placeholder="请输入" type="number" min="0" />
</el-descriptions-item>
<el-descriptions-item>
<template #label> 是否合格 </template>
<div>
<el-radio
v-model="fillInObj.checkResult"
:label="1"
@input="checkResulInput($event, fillInObj)"
>合格</el-radio
>
<el-radio
v-model="fillInObj.checkResult"
:label="2"
@input="checkResulInput($event, fillInObj)"
>不合格</el-radio
>
<el-radio
v-model="fillInObj.checkResult"
:label="-1"
@input="checkResulInput($event, fillInObj)"
>NA</el-radio
>
</div>
</el-descriptions-item>
<el-descriptions-item>
<template #label> 合格数量 </template>
<el-input
v-model="fillInObj.qualifiedQty"
placeholder="请输入"
type="number"
min="0"
/>
</el-descriptions-item>
<el-descriptions-item>
<template #label> 不合格数量 </template>
<el-input
v-model="fillInObj.unqualifiedQty"
placeholder="请输入"
type="number"
min="0"
@change="unqualifiedQtyChange"
/>
</el-descriptions-item>
<!-- 比例 -->
<el-descriptions-item>
<template #label> 比例(%) </template>
<el-input v-model="fillInObj.scale" placeholder="请输入" type="number" />
</el-descriptions-item>
<el-descriptions-item>
<template #label> 不良原因 </template>
<!-- <poor-reason v-model="fillInObj.poorReason" placeholder="请选择" @change="prChange" /> -->
<el-select v-model="fillInObj.poorReason" placeholder="请选择" @change="prChange">
<el-option
v-for="item in poorReasonList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-descriptions-item>
<el-descriptions-item>
<template #label> 不良描述 </template>
<el-input
v-model="fillInObj.poorMemo"
:autosize="{ minRows: 2, maxRows: 5 }"
type="textarea"
/>
</el-descriptions-item>
</el-descriptions>
</el-col>
</el-row>
</el-form>
<span style="text-align: center; display: block; margin: 20px 0px 10px 0px">
<el-button slot="right" type="primary" :disabled="isDisabled" @click="onSubmit"
>保存</el-button
>
</span>
</basic-container>
</template>
<script>
import { loadProTest, saveProCheck } from '@/api/workCheck/index.js';
export default {
data() {
return {
formData: {
cardNo: null,
},
rules: {
cardNo: [{ required: true, message: '请输入', trigger: 'blur' }],
},
tableObj: {
makeQty: null,
},
fillInObj: {
checkResult: 1,
qualifiedQty: null,
unqualifiedQty: null,
scale: 0,
poorReason: '',
poorMemo: '',
},
isDisabled: false,
poorReasonList: [], //
};
},
methods: {
unqualifiedQtyChange(v) {
this.fillInObj.unqualifiedQty = v;
// this.$set(this.qcReviewSheet, 'unqualifiedQty', v);
const makeQty = this.tableObj.makeQty;
if (v > makeQty) {
this.$message.error('不合格数不能大于' + makeQty);
this.$set(this.fillInObj, 'unqualifiedQty', null);
this.$set(this.fillInObj, 'scale', null);
} else {
this.$set(this.fillInObj, 'scale', Math.round((v / makeQty) * 100));
}
},
checkResulInput(v, item) {
if (v === 2) {
this.fillInObj.unqualifiedQty = this.tableObj.makeQty;
this.fillInObj.qualifiedQty = 0;
} else {
this.fillInObj.qualifiedQty = this.tableObj.makeQty;
this.fillInObj.unqualifiedQty = 0;
}
},
prChange(id, item) {
this.fillInObj.poorReason = '';
if (item) {
this.fillInObj.poorReason = item.name;
} else {
this.fillInObj.poorReason = '';
}
},
codeKeyUp() {
if (this.formData.cardNo) {
loadProTest({ cardNo: this.formData.cardNo }).then(res => {
this.tableObj = res.data.data;
this.fillInObj = {
checkResult: 1,
qualifiedQty: this.tableObj.makeQty,
unqualifiedQty: 0,
scale: 0,
poorReason: '',
poorMemo: '',
};
});
}
},
onSubmit() {
this.isDisabled = true;
this.$refs.form.validate(valid => {
if (valid) {
const num = Number(this.fillInObj.unqualifiedQty) + Number(this.fillInObj.qualifiedQty);
if (num > this.tableObj.makeQty) {
this.$message.warning('合格与不合格数量之和不能大于检验数量!!!');
return;
}
if (this.fillInObj.checkResult === 2) {
if (this.fillInObj.poorReason === '' || this.fillInObj.poorMemo === '') {
this.$message.warning('请填写原因或描述!!!');
return;
}
}
if (Number(this.fillInObj.scale) > 100 || Number(this.fillInObj.scale) < 0) {
this.$message.warning('比例所填值的范围在0~100!!!');
return;
}
this.fillInObj.makeQty = this.tableObj.makeQty;
this.fillInObj.wpId = this.tableObj.wpId;
saveProCheck(this.fillInObj)
.then(res => {
this.$message.success('检验成功!!!');
this.tableObj = {
makeQty: null,
};
this.fillInObj = {
checkResult: 1,
qualifiedQty: null,
unqualifiedQty: null,
scale: 0,
poorReason: '',
poorMemo: '',
};
this.formData.cardNo = '';
this.isDisabled = false;
})
.catch(err => {});
}
});
},
},
};
</script>
<style lang="scss" scoped>
</style>

@ -0,0 +1,294 @@
<template>
<basic-container>
<el-form ref="form" :model="formData" :rules="rulesMold" label-width="90px">
<el-row :gutter="24">
<el-col :span="6" :offset="3">
<el-form-item label="流程卡号:" prop="cardNo">
<el-input
ref="codeFocus"
v-model="formData.cardNo"
placeholder="请输入"
@keyup.enter.native="codeKeyUp"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="合格数量:" prop="workQty">
<el-input-number
:disabled="workPlanDto.notWorkQty - formData.scrapQty == 0"
v-model="formData.workQty"
@change="handleChange"
:min="0"
:max="workPlanDto.notWorkQty - formData.scrapQty"
label="请输入"
@blur="scrapQtyBlur($event, 'workQty')"
></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="报废数量:" prop="scrapQty">
<el-input-number
:disabled="workPlanDto.notWorkQty - formData.workQty == 0"
v-model="formData.scrapQty"
:min="0"
:max="workPlanDto.notWorkQty - formData.workQty"
@blur="scrapQtyBlur($event, 'scrapQty')"
></el-input-number>
</el-form-item>
</el-col>
<el-col :span="20" :offset="2">
<el-descriptions
:column="3"
label-width="100px"
:content-style="{ 'min-width': '120px' }"
class="margin-top"
border
>
<el-descriptions-item>
<template #label> 车间订单号 </template>
{{ workPlanDto.woCode }}
</el-descriptions-item>
<el-descriptions-item>
<template #label> 流程卡号 </template>
{{ workPlanDto.cardNo }}
</el-descriptions-item>
<el-descriptions-item>
<template #label> 批次 </template>
{{ workPlanDto.batchNo }}
</el-descriptions-item>
<el-descriptions-item>
<template #label> 产品号 </template>
{{ workPlanDto.partCode }}
</el-descriptions-item>
<el-descriptions-item>
<template #label> 产品型号 </template>
{{ workPlanDto.productType }}
</el-descriptions-item>
<el-descriptions-item>
<template #label> 产品名称 </template>
{{ workPlanDto.partName }}
</el-descriptions-item>
<el-descriptions-item>
<template #label> 镀种信息 </template>
{{ workPlanDto.plate }}
</el-descriptions-item>
<el-descriptions-item>
<template #label> 当前工序 </template>
{{ workPlanDto.currentWpTitle }}
</el-descriptions-item>
<el-descriptions-item>
<template #label> 接收数量 </template>
{{ workPlanDto.makeQty }}
</el-descriptions-item>
<el-descriptions-item>
<template #label> 已合格数量 </template>
{{ workPlanDto.workQty }}
</el-descriptions-item>
<el-descriptions-item>
<template #label> 报废数量 </template>
{{ workPlanDto.scrapQty }}
</el-descriptions-item>
</el-descriptions>
</el-col>
<el-col :span="5" :offset="2">
<el-form-item label="色标数量:" prop="flagQty">
<el-input-number v-model="formData.flagQty" :min="0" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="颜色1:" prop="flagColourOne">
<el-input v-model="formData.flagColourOne" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="颜色2:" prop="flagColourTwo">
<el-input v-model="formData.flagColourTwo" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="油墨:" prop="flagInk">
<el-input v-model="formData.flagInk" />
</el-form-item>
</el-col>
<el-col :span="5" :offset="2">
<el-form-item label="色带数量:" prop="beltQty">
<el-input-number v-model="formData.beltQty" :min="0" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="颜色1:" prop="beltColourOne">
<el-input v-model="formData.beltColourOne" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="颜色2:" prop="beltColourTwo">
<el-input v-model="formData.beltColourTwo" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="油墨:" prop="beltInk">
<el-input v-model="formData.beltInk" />
</el-form-item>
</el-col>
<el-col :span="18" :offset="2">
<el-form-item label="备注" prop="memo">
<el-input v-model="formData.memo" type="textarea" />
</el-form-item>
</el-col>
<el-col
v-if="workPlanDto.currentWpId != null && workPlanDto.frontMakeTeam == null"
:span="24"
>
<el-form-item label="自检是否合格:" label-width="120px" style="line-height: 40px">
<el-radio-group v-model="formData.resource">
<el-radio :label="true">合格</el-radio>
<el-radio :label="false">不合格</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<!-- 热处理 -->
<template v-if="heatTreatmentShow">
<el-col :span="6" :offset="2">
<el-form-item label="试片数量/个:" label-width="120px">
<el-radio-group v-model="heatTreatment.resource">
<el-radio label="合格">合格</el-radio>
<el-radio label="不合格">不合格</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="" label-width="0px">
<el-input v-model="heatTreatment.num" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="材料厚度/mm:" label-width="120px">
<el-input v-model="heatTreatment.thickness"
/></el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="热处理工装编号:" label-width="120px">
<el-input v-model="heatTreatment.code" />
</el-form-item>
</el-col>
<el-col :span="6" :offset="2">
<el-form-item label="材料检验编号:" label-width="120px">
<el-input v-model="heatTreatment.inspectCode" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="材料检验编号:" label-width="120px">
<el-input v-model="heatTreatment.status" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="原材料制品形式:" label-width="120px">
<el-input v-model="heatTreatment.shape" />
</el-form-item>
</el-col>
</template>
</el-row>
</el-form>
<span style="text-align: center; display: block; margin-top: 8px">
<el-button slot="right" type="primary" :disabled="isDisabled" @click="onSubmit"
>报工</el-button
>
</span>
</basic-container>
</template>
<script>
import { loadCurrentWp, saveMakeRec } from '@/api/workReport/index';
export default {
components: {},
data() {
return {
workPlanDto: {},
workPlanDto: {},
isDisabled: false,
formData: {
flagQty: 0,
beltQty: 0,
prWorkPlan: {},
workQty: 0,
scrapQty: 0,
resource: true,
},
rulesMold: {
cardNo: [{ required: true, message: '请输入', trigger: 'blur' }],
workQty: [{ required: true, message: '请输入', trigger: 'blur' }],
scrapQty: [{ required: true, message: '请输入', trigger: 'blur' }],
},
heatTreatment: { resource: '合格' },
heatTreatmentShow: false,
};
},
methods: {
codeKeyUp() {
if (this.formData.cardNo) {
loadCurrentWp({ cardNo: this.formData.cardNo })
.then(res => {
this.workPlanDto = res.data.data;
this.formData.prWorkPlan.wpId = this.workPlanDto.currentWpId;
if (
this.workPlanDto != null &&
this.workPlanDto.currentWpTitle != null &&
this.workPlanDto.currentWpTitle.split('|')[1] === '热处理'
) {
this.heatTreatmentShow = true;
}
this.formData.workQty = this.workPlanDto.notWorkQty;
this.formData.scrapQty = 0;
})
.catch(err => {});
}
},
scrapQtyBlur(e, str) {
if (!e.target.value) {
if (str === 'workQty') {
this.formData.workQty = 0;
} else {
this.formData.scrapQty = 0;
}
}
},
onSubmit() {
this.isDisabled = true;
this.$refs.form.validate(valid => {
if (valid) {
if (this.formData.workQty || this.formData.scrapQty) {
saveMakeRec({ ...this.formData, ...this.heatTreatment,...this.formData.prWorkPlan }).then(res => {
this.$message.success('保存成功');
this.$refs.form.resetFields();
this.workPlanDto = {};
this.formData = {
prWorkPlan: {},
workQty: 0,
scrapQty: 0,
resource: true,
};
this.heatTreatment = { resource: '合格' };
this.heatTreatmentShow = false;
this.isDisabled = false;
});
} else {
this.$message.error('请填写报工数量');
this.isDisabled = false;
}
}
});
},
},
mounted() {},
created() {},
beforeDestroy() {},
};
</script>
<style lang="scss" scoped>
.margin-top {
margin-bottom: 15px;
}
</style>
Loading…
Cancel
Save