1.0.0
This commit is contained in:
parent
8ea28a0af6
commit
e533e19435
@ -24,4 +24,13 @@ export function ProcessReportWork(params) {
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 获取工单下的报工列表
|
||||
export function GetWorkOrderReportWorkList(params) {
|
||||
return request({
|
||||
url: '/mobile/reportflow/get_workorder_reportwork_list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
27
pages.json
27
pages.json
@ -73,24 +73,27 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/produceManagement/requisition/requisition",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "物料领用"
|
||||
"path": "pages/produceManagement/requisition/requisition",
|
||||
"style": {
|
||||
"navigationBarTitleText": "物料领用"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/produceManagement/process/process",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "工序报工"
|
||||
"path": "pages/produceManagement/process/process",
|
||||
"style": {
|
||||
"navigationBarTitleText": "工序报工"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/qualityManagement/IPQC/IPQC",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "IPQC制程检验"
|
||||
"path": "pages/qualityManagement/IPQC/IPQC",
|
||||
"style": {
|
||||
"navigationBarTitleText": "IPQC制程检验"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/produceManagement/reportWorkOrderList/reportWorkOrderList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "工单报工清单"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
</uni-grid-item>
|
||||
</uni-grid>
|
||||
</view>
|
||||
<uni-section title="涂装线" type="line"></uni-section>
|
||||
<uni-section title="喷涂线" type="line"></uni-section>
|
||||
<view class="grid-body">
|
||||
<uni-grid :column="4" :showBorder="false" @change="changePaintingGrid">
|
||||
<uni-grid-item v-for="(item, index) in paintingOptions" :key="index" :index="index">
|
||||
@ -34,6 +34,17 @@
|
||||
</uni-grid-item>
|
||||
</uni-grid>
|
||||
</view>
|
||||
<uni-section title="物料管理" type="line"></uni-section>
|
||||
<view class="grid-body">
|
||||
<uni-grid :column="4" :showBorder="false" @change="changeMaterialGrid">
|
||||
<uni-grid-item v-for="(item, index) in materialOptions" :key="index" :index="index">
|
||||
<view class="grid-item-box">
|
||||
<uni-icons :type="item.icon" size="30"></uni-icons>
|
||||
<text class="text">{{ item.name }}</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
</uni-grid>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -64,61 +75,79 @@ export default {
|
||||
icon: 'download-filled',
|
||||
url: '/pages/produceManagement/requisition/requisition',
|
||||
params: {
|
||||
processId: 15,
|
||||
processName: '首工序'
|
||||
processId: 10,
|
||||
processName: '物料领用'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '机械加工',
|
||||
icon: 'star-filled',
|
||||
icon: 'redo-filled',
|
||||
url: '/pages/produceManagement/process/process',
|
||||
params: {
|
||||
processId: 16,
|
||||
processId: 20,
|
||||
processName: '机械加工'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '加工检查',
|
||||
icon: 'star-filled',
|
||||
name: '中间检查',
|
||||
icon: 'redo-filled',
|
||||
url: '/pages/produceManagement/process/process',
|
||||
params: {
|
||||
processId: 17,
|
||||
processName: '加工检查'
|
||||
processId: 30,
|
||||
processName: '中间检查'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '手工研磨',
|
||||
icon: 'star-filled',
|
||||
icon: 'redo-filled',
|
||||
url: '/pages/produceManagement/process/process',
|
||||
params: {
|
||||
processId: 18,
|
||||
processId: 40,
|
||||
processName: '手工研磨'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '机械研磨',
|
||||
icon: 'star-filled',
|
||||
name: '机研磨',
|
||||
icon: 'redo-filled',
|
||||
url: '/pages/produceManagement/process/process',
|
||||
params: {
|
||||
processId: 19,
|
||||
processName: '机械研磨'
|
||||
processId: 50,
|
||||
processName: '机研磨'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '精研磨',
|
||||
icon: 'star-filled',
|
||||
icon: 'redo-filled',
|
||||
url: '/pages/produceManagement/process/process',
|
||||
params: {
|
||||
processId: 20,
|
||||
processId: 60,
|
||||
processName: '精研磨'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '入库检查',
|
||||
icon: 'redo-filled',
|
||||
url: '/pages/produceManagement/process/process',
|
||||
params: {
|
||||
processId: 70,
|
||||
processName: '入库检查'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '出厂',
|
||||
icon: 'redo-filled',
|
||||
url: '/pages/produceManagement/process/process',
|
||||
params: {
|
||||
processId: 80,
|
||||
processName: '出厂'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '出货',
|
||||
icon: 'upload-filled',
|
||||
url: '/pages/produceManagement/process/process',
|
||||
params: {
|
||||
processId: 21,
|
||||
processId: 90,
|
||||
processName: '出货'
|
||||
}
|
||||
},
|
||||
@ -126,9 +155,16 @@ export default {
|
||||
name: '制程检验\n(不良跟踪)',
|
||||
icon: 'folder-add-filled',
|
||||
url: '/pages/qualityManagement/IPQC/IPQC'
|
||||
},
|
||||
{
|
||||
name: '工单列表',
|
||||
icon: 'wallet-filled',
|
||||
url: '/pages/produceManagement/reportWorkOrderList/reportWorkOrderList'
|
||||
}
|
||||
],
|
||||
// 涂装模块
|
||||
// 工序顺序(0为默认首顺序)
|
||||
processSort: [0, 10, 20, 30, 40, 50, 60, 70,80,90],
|
||||
// 喷涂线模块
|
||||
paintingOptions: [
|
||||
{
|
||||
name: '扫码报工',
|
||||
@ -139,15 +175,25 @@ export default {
|
||||
// 物料模块
|
||||
materialOptions: [
|
||||
{
|
||||
name: '产线备料',
|
||||
icon: 'upload-filled',
|
||||
name: '入料',
|
||||
icon: 'download',
|
||||
url: ''
|
||||
},
|
||||
{
|
||||
name: '产线备料',
|
||||
icon: 'upload-filled',
|
||||
name: '出料',
|
||||
icon: 'upload',
|
||||
url: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '盘点',
|
||||
icon: 'calendar',
|
||||
url: ''
|
||||
},
|
||||
{
|
||||
name: '清单',
|
||||
icon: 'list',
|
||||
url: ''
|
||||
},
|
||||
]
|
||||
};
|
||||
},
|
||||
@ -161,8 +207,9 @@ export default {
|
||||
// 产线功能
|
||||
changeProduceGrid(e) {
|
||||
let _url = this.produceOptions[e.detail.index].url;
|
||||
const _params = this.produceOptions[e.detail.index].params;
|
||||
let _params = this.produceOptions[e.detail.index].params;
|
||||
if (_params) {
|
||||
_params.processSort = JSON.stringify(this.processSort);
|
||||
_url += `?${tansParams(_params)}`;
|
||||
}
|
||||
uni.navigateTo({
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<view class="normal-login-container">
|
||||
<view class="logo-content align-center justify-center flex">
|
||||
<image style="width: 100rpx; height: 100rpx" :src="globalConfig.appInfo.logo" mode="widthFix"></image>
|
||||
<text class="title">总装车间PDA</text>
|
||||
<text class="title">北泽阀门-产线PDA</text>
|
||||
</view>
|
||||
<view class="login-form-content">
|
||||
<view class="input-item flex align-center">
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<view class="about-container">
|
||||
<view class="header-section text-center">
|
||||
<image style="width: 150rpx; height: 150rpx" src="/static/logo.png" mode="widthFix"></image>
|
||||
<uni-title type="h2" title="车镜实业"></uni-title>
|
||||
<uni-title type="h2" title="北泽阀门(昆山)"></uni-title>
|
||||
</view>
|
||||
|
||||
<view class="content-section">
|
||||
|
||||
@ -10,10 +10,7 @@
|
||||
<uni-card v-if="formData.workorder">
|
||||
<u-form labelPosition="left" ref="uForm" labelWidth="100">
|
||||
<u-form-item label="工单号" borderBottom>
|
||||
<u-input readonly v-model="formData.workorder" border="none"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="领料时间" borderBottom>
|
||||
<u-input readonly v-model="formData.name" border="none"></u-input>
|
||||
<u-text :text="formData.workorder" type="primary" bold size="18"></u-text>
|
||||
</u-form-item>
|
||||
<u-form-item label="主体型号" borderBottom>
|
||||
<u-input readonly v-model="formData.productionCode" border="none"></u-input>
|
||||
@ -31,15 +28,18 @@
|
||||
<u-form-item label="炉号" borderBottom>
|
||||
<u-input readonly v-model="formData.stoveCode" border="none"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="前工序数量" borderBottom>
|
||||
<!-- <u-form-item label="前工序数量" borderBottom>
|
||||
<u-input readonly v-model="formData.planNum" border="none"></u-input>
|
||||
</u-form-item>
|
||||
</u-form-item> -->
|
||||
<u-form-item label="完成数量" :borderBottom="false">
|
||||
<u--input class="input-border" v-model.number="formData.finishNum" type="number"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="不良数量" :borderBottom="false">
|
||||
<u--input class="input-border" v-model.number="formData.badNum" type="number"></u--input>
|
||||
</u-form-item>
|
||||
<!-- <u-form-item label="完成人" :borderBottom="false">
|
||||
<u--input class="input-border" v-model="formData.worker"></u--input>
|
||||
</u-form-item> -->
|
||||
</u-form>
|
||||
</uni-card>
|
||||
<!-- 底部按钮 -->
|
||||
@ -71,6 +71,7 @@ export default {
|
||||
return {
|
||||
processId: -1,
|
||||
processName: '',
|
||||
|
||||
lineCode: '',
|
||||
groupCode: '',
|
||||
loading: false,
|
||||
@ -82,7 +83,9 @@ export default {
|
||||
// unit: '单位',
|
||||
planNum: 0,
|
||||
finishNum: 0,
|
||||
badNum: 0
|
||||
badNum: 0,
|
||||
worker: '',
|
||||
jobDate: ''
|
||||
// sort: '排序',
|
||||
// workorderDate: '工单日期',
|
||||
// priority: '优先级',
|
||||
@ -97,7 +100,7 @@ export default {
|
||||
// stoveCode: '炉子编码',
|
||||
// workshopCode: '车间编码',
|
||||
// routeCode: '路线编码',
|
||||
// groupCode: '组编码'
|
||||
// groupCode: '组编码',
|
||||
},
|
||||
uModal: {
|
||||
show: false,
|
||||
@ -117,18 +120,39 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
// 扫工单码结果
|
||||
scanConfirm(val) {
|
||||
async scanConfirm(val) {
|
||||
const params = {
|
||||
workorder: val,
|
||||
processId: this.processId
|
||||
};
|
||||
console.log(params);
|
||||
reportWorkOrderApi.GetProcessReportWorkDetail(params).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.formData = res.data;
|
||||
this.formData.finishNum = res.data.planNum;
|
||||
|
||||
const res1 = await reportWorkOrderApi.GetWorkOrderDetail(params);
|
||||
if (res1.code === 200) {
|
||||
if(!res1.data){
|
||||
this.uModal.content = '工单号不存在!';
|
||||
this.openModal();
|
||||
this.clear();
|
||||
return;
|
||||
}
|
||||
});
|
||||
this.formData = res1.data;
|
||||
}
|
||||
const res2 = await reportWorkOrderApi.GetProcessReportWorkDetail(params);
|
||||
if (res2.code === 200) {
|
||||
if (!res2.data) {
|
||||
this.formData.finishNum = 0;
|
||||
this.formData.badNum = 0;
|
||||
this.formData.worker = '';
|
||||
} else {
|
||||
this.formData.finishNum = res2.data.finishNum;
|
||||
this.formData.badNum = res2.data.badNum;
|
||||
this.formData.worker = res2.data.worker;
|
||||
if (this.formData.finishNum > 0) {
|
||||
this.uModal.title = '报工提醒';
|
||||
this.uModal.content = '此工序该工单已报工过!';
|
||||
this.openModal();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 清空form
|
||||
clear() {
|
||||
@ -147,9 +171,9 @@ export default {
|
||||
this.uModal.show = false;
|
||||
},
|
||||
submit() {
|
||||
if (!this.check()) {
|
||||
return;
|
||||
}
|
||||
// if (!this.check()) {
|
||||
// return;
|
||||
// }
|
||||
this.uModal2.content = '是否确认报工';
|
||||
this.uModal2.show = true;
|
||||
},
|
||||
@ -174,7 +198,8 @@ export default {
|
||||
workorder: this.formData.workorder,
|
||||
processId: this.processId,
|
||||
finish_num: this.formData.finishNum,
|
||||
bad_num: this.formData.badNum
|
||||
bad_num: this.formData.badNum,
|
||||
worker: this.formData.worker
|
||||
};
|
||||
reportWorkOrderApi.ProcessReportWork(params).then((res) => {
|
||||
if (res.code === 200) {
|
||||
|
||||
@ -0,0 +1,117 @@
|
||||
<template>
|
||||
<view class="common-box">
|
||||
<uni-card>
|
||||
<ScanInput @scanConfirm="scanConfirm" placeholder="请扫标签,查看报工信息"></ScanInput>
|
||||
</uni-card>
|
||||
<!-- 工单信息 -->
|
||||
|
||||
<uni-card v-if="formData.workorder">
|
||||
<u-text text="工单信息" bold size="20"></u-text>
|
||||
<u-form labelPosition="left" ref="uForm" labelWidth="100">
|
||||
<u-form-item label="领料日期" borderBottom>
|
||||
<u-input v-model="formData.workorderDate" border="none"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="工单号" borderBottom>
|
||||
<u-input readonly v-model="formData.workorder" border="none"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="炉号" borderBottom>
|
||||
<u-input readonly v-model="formData.stoveCode" border="none"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="主体型号" borderBottom>
|
||||
<u-input readonly v-model="formData.productionCode" border="none"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="主体品名" borderBottom>
|
||||
<u-input readonly v-model="formData.productionName" border="none"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="计划数量" borderBottom>
|
||||
<u-input readonly v-model="formData.planNum" border="none"></u-input>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
</uni-card>
|
||||
<!-- 报工清单 -->
|
||||
|
||||
<uni-card v-if="formReportList.length > 0">
|
||||
<u-text text="报工清单" bold size="20"></u-text>
|
||||
<u-list>
|
||||
<u-list-item v-for="(item, index) in formReportList" :key="index">
|
||||
<u-cell :title="item.processName" :label="`作业员:${item.worker}\n提交时间:${item.jobDate}`" :value="`完成数:${item.finishNum}\n不良数:${item.badNum}`"></u-cell>
|
||||
</u-list-item>
|
||||
</u-list>
|
||||
</uni-card>
|
||||
|
||||
|
||||
|
||||
<!-- 消息提示 -->
|
||||
<u-modal :show="uModal.show" :title="uModal.title" :content="uModal.content" @confirm="closeModal"></u-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as reportWorkOrderApi from '@/api/reportFlow/index.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
formData: {
|
||||
id: null,
|
||||
workorder: '',
|
||||
planNum: 0
|
||||
},
|
||||
formReportList: [],
|
||||
uModal: {
|
||||
show: false,
|
||||
title: '提示',
|
||||
content: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 扫工单码结果
|
||||
async scanConfirm(val) {
|
||||
const params = {
|
||||
workorder: val,
|
||||
processId: this.processId
|
||||
};
|
||||
|
||||
const res1 = await reportWorkOrderApi.GetWorkOrderDetail(params);
|
||||
if (res1.code === 200) {
|
||||
if (!res1.data) {
|
||||
this.uModal.content = '工单号不存在!';
|
||||
this.openModal();
|
||||
this.clear();
|
||||
return;
|
||||
}
|
||||
this.formData = res1.data;
|
||||
}
|
||||
this.formReportList = [];
|
||||
const res2 = await reportWorkOrderApi.GetWorkOrderReportWorkList(params);
|
||||
if (res2.code === 200) {
|
||||
this.formReportList = res2.data;
|
||||
}
|
||||
},
|
||||
// 清空form
|
||||
clear() {
|
||||
this.formData = {
|
||||
id: -1,
|
||||
workorder: '',
|
||||
planNum: 0
|
||||
};
|
||||
},
|
||||
openModal() {
|
||||
this.uModal.show = true;
|
||||
},
|
||||
closeModal() {
|
||||
this.uModal.show = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.common-box {
|
||||
padding-bottom: 60px;
|
||||
}
|
||||
.input-border {
|
||||
border: 1px solid #eeeeee;
|
||||
}
|
||||
</style>
|
||||
@ -22,7 +22,7 @@
|
||||
<u-input readonly v-model="formData.stoveCode" border="none"></u-input>
|
||||
</u-form-item> -->
|
||||
<u-form-item label="工单号" borderBottom>
|
||||
<u-input readonly v-model="formData.workorder" border="none"></u-input>
|
||||
<u-text :text="formData.workorder" type="primary" bold size="18"></u-text>
|
||||
</u-form-item>
|
||||
<u-form-item label="主体型号" borderBottom>
|
||||
<u-input readonly v-model="formData.productionCode" border="none"></u-input>
|
||||
@ -50,11 +50,15 @@
|
||||
<u-input readonly v-model="formData.materialtextureCode" border="none"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="计划数量" borderBottom>
|
||||
<u-input readonly v-model="formData.planNum" border="none"></u-input>
|
||||
<u-text :text="formData.planNum" type="primary" bold size="18"></u-text>
|
||||
<!-- <u-input readonly v-model="formData.planNum" border="none"></u-input> -->
|
||||
</u-form-item>
|
||||
<u-form-item label="实际领料数" :borderBottom="false">
|
||||
<u--input class="input-border" v-model.number="formData.finishNum" type="number"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="炉号" :borderBottom="false">
|
||||
<u--input class="input-border" v-model="formData.stoveCode"></u--input>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
</uni-card>
|
||||
<!-- 底部按钮 -->
|
||||
@ -80,11 +84,13 @@ export default {
|
||||
onLoad: function (option) {
|
||||
this.processId = option.processId;
|
||||
this.processName = option.processName;
|
||||
this.processSort = JSON.parse(option.processSort);
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
processId: -1,
|
||||
processName: '',
|
||||
processSort: [],
|
||||
lineCode: '',
|
||||
groupCode: '',
|
||||
loading: false,
|
||||
@ -137,11 +143,32 @@ export default {
|
||||
};
|
||||
reportWorkOrderApi.GetWorkOrderDetail(params).then((res) => {
|
||||
if (res.code === 200) {
|
||||
if(!res.data){
|
||||
this.uModal.content = '工单号不存在!';
|
||||
this.openModal();
|
||||
this.clear();
|
||||
return;
|
||||
}
|
||||
this.formData = res.data;
|
||||
this.formData.finishNum = res.data.planNum;
|
||||
// if (this.formData.finishNum > 0) {
|
||||
// this.uModal.title = '报工提醒';
|
||||
// this.uModal.content = '该工单已领料过!';
|
||||
// this.openModal();
|
||||
// }
|
||||
}
|
||||
});
|
||||
},
|
||||
// 检查工序顺序
|
||||
checkProcessSort(){
|
||||
if(this.processId){
|
||||
for(let index in this.processSort){
|
||||
|
||||
}
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
},
|
||||
// 清空form
|
||||
clear() {
|
||||
this.formData = {
|
||||
@ -165,9 +192,10 @@ export default {
|
||||
modalConfirm() {
|
||||
const params = {
|
||||
workorder: this.formData.workorder,
|
||||
process: this.processId,
|
||||
processId: this.processId,
|
||||
finish_num: this.formData.finishNum,
|
||||
bad_num: 0
|
||||
bad_num: 0,
|
||||
worker: this.formData.worker
|
||||
};
|
||||
reportWorkOrderApi.ProcessReportWork(params).then((res) => {
|
||||
if (res.code === 200) {
|
||||
@ -183,9 +211,9 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* .common-box {
|
||||
.common-box {
|
||||
padding-bottom: 60px;
|
||||
} */
|
||||
}
|
||||
.input-border {
|
||||
border: 1px solid #eeeeee;
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
<view class="bottom-box">
|
||||
<button type="primary" @click="scanToReport">
|
||||
<uni-icons color="#fff" type="scan" size="18"></uni-icons>
|
||||
扫码报工
|
||||
扫码领料
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -1,22 +1,217 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
<!-- 各工序操作 -->
|
||||
<view class="common-box">
|
||||
<uni-card>
|
||||
<ScanInput @scanConfirm="scanConfirm" placeholder="请扫标签"></ScanInput>
|
||||
</uni-card>
|
||||
|
||||
<!-- 工单信息 -->
|
||||
<uni-card v-if="formData.workorder">
|
||||
<u-form labelPosition="left" ref="uForm" labelWidth="100">
|
||||
<u-form-item label="工单号" borderBottom>
|
||||
<u-text :text="formData.workorder" type="primary" bold size="18"></u-text>
|
||||
</u-form-item>
|
||||
<u-form-item label="主体型号" borderBottom>
|
||||
<u-input readonly v-model="formData.productionCode" border="none"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="主体品名" borderBottom>
|
||||
<u-input readonly v-model="formData.productionName" border="none"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="主体图号" borderBottom>
|
||||
<u-input readonly v-model="formData.drawingCode" border="none">
|
||||
<template slot="suffix">
|
||||
<u-button type="primary" @click="uOverlay.show = true" size="mini">展示</u-button>
|
||||
</template>
|
||||
</u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="不良数量" :borderBottom="false">
|
||||
<u--input class="input-border" v-model.number="formData.badNum" type="number"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="修理OK数" :borderBottom="false">
|
||||
<u--input class="input-border" v-model.number="formData.finishNum" type="number"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="修理NG数" :borderBottom="false">
|
||||
<u--input class="input-border" v-model.number="formData.finishNum" type="number"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="修理人" :borderBottom="false">
|
||||
<u--input class="input-border" v-model="formData.worker"></u--input>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
</uni-card>
|
||||
<!-- 底部按钮 -->
|
||||
<view class="bottom-box" v-if="formData.workorder">
|
||||
<u-button type="success" @click="submit">确认报工</u-button>
|
||||
</view>
|
||||
<!-- 图片展示 -->
|
||||
<u-overlay :show="uOverlay.show" @click="uOverlay.show = false">
|
||||
<view class="warp">
|
||||
<img :src="uOverlay.imageUrl + formData.drawingCode" alt="图片" />
|
||||
</view>
|
||||
</u-overlay>
|
||||
|
||||
<!-- 消息提示 -->
|
||||
<u-modal :show="uModal.show" :title="uModal.title" :content="uModal.content" @confirm="closeModal"></u-modal>
|
||||
<!-- 消息确认 -->
|
||||
<u-modal :show="uModal2.show" :title="uModal2.title" showCancelButton :content="uModal2.content" @cancel="uModal2.show = false" @confirm="modalConfirm"></u-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
import * as reportWorkOrderApi from '@/api/reportFlow/index.js';
|
||||
export default {
|
||||
onLoad: function (option) {
|
||||
this.processId = option.processId;
|
||||
this.processName = option.processName;
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
processId: -1,
|
||||
processName: '',
|
||||
|
||||
lineCode: '',
|
||||
groupCode: '',
|
||||
loading: false,
|
||||
formData: {
|
||||
id: null,
|
||||
workorder: '',
|
||||
// productionName: '产品名称',
|
||||
// productionCode: '产品编码',
|
||||
// unit: '单位',
|
||||
planNum: 0,
|
||||
finishNum: 0,
|
||||
badNum: 0,
|
||||
worker: '',
|
||||
jobDate: ''
|
||||
// sort: '排序',
|
||||
// workorderDate: '工单日期',
|
||||
// priority: '优先级',
|
||||
// beat: '节拍',
|
||||
// status: '状态',
|
||||
// instructionDate: '指导日期',
|
||||
// materialName: '材料名称',
|
||||
// materialtextureCode: '材质编码',
|
||||
// materialCode: '材料编码',
|
||||
// drawingCode: '图纸编码',
|
||||
// version: '版本',
|
||||
// stoveCode: '炉子编码',
|
||||
// workshopCode: '车间编码',
|
||||
// routeCode: '路线编码',
|
||||
// groupCode: '组编码',
|
||||
},
|
||||
uModal: {
|
||||
show: false,
|
||||
title: '提示',
|
||||
content: ''
|
||||
},
|
||||
uModal2: {
|
||||
show: false,
|
||||
title: '提示',
|
||||
content: ''
|
||||
},
|
||||
uOverlay: {
|
||||
show: false,
|
||||
imageUrl: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 扫工单码结果
|
||||
async scanConfirm(val) {
|
||||
const params = {
|
||||
workorder: val,
|
||||
processId: this.processId
|
||||
};
|
||||
|
||||
const res1 = await reportWorkOrderApi.GetWorkOrderDetail(params);
|
||||
if (res1.code === 200) {
|
||||
if(!res1.data){
|
||||
this.uModal.content = '工单号不存在!';
|
||||
this.openModal();
|
||||
this.clear();
|
||||
return;
|
||||
}
|
||||
this.formData = res1.data;
|
||||
}
|
||||
const res2 = await reportWorkOrderApi.GetProcessReportWorkDetail(params);
|
||||
if (res2.code === 200) {
|
||||
if (!res2.data) {
|
||||
this.formData.finishNum = 0;
|
||||
this.formData.badNum = 0;
|
||||
this.formData.worker = '';
|
||||
} else {
|
||||
this.formData.finishNum = res2.data.finishNum;
|
||||
this.formData.badNum = res2.data.badNum;
|
||||
this.formData.worker = res2.data.worker;
|
||||
if (this.formData.finishNum > 0) {
|
||||
this.uModal.title = '报工提醒';
|
||||
this.uModal.content = '此工序该工单已报工过!';
|
||||
this.openModal();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 清空form
|
||||
clear() {
|
||||
this.formData = {
|
||||
id: -1,
|
||||
workorder: '',
|
||||
planNum: 0,
|
||||
finishNum: 0,
|
||||
badNum: 0
|
||||
};
|
||||
},
|
||||
openModal() {
|
||||
this.uModal.show = true;
|
||||
},
|
||||
closeModal() {
|
||||
this.uModal.show = false;
|
||||
},
|
||||
submit() {
|
||||
// if (!this.check()) {
|
||||
// return;
|
||||
// }
|
||||
this.uModal2.content = '是否确认报工';
|
||||
this.uModal2.show = true;
|
||||
},
|
||||
check() {
|
||||
try {
|
||||
const _planNum = this.formData.planNum * 1;
|
||||
const _finishNum = this.formData.finishNum * 1;
|
||||
const _badNum = this.formData.badNum * 1;
|
||||
if (_planNum !== _finishNum + _badNum) {
|
||||
this.uModal.title = '报工填写异常';
|
||||
this.uModal.content = '前工序数量不等于完成数量加不良数量,请检查!';
|
||||
this.openModal();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
modalConfirm() {
|
||||
const params = {
|
||||
workorder: this.formData.workorder,
|
||||
processId: this.processId,
|
||||
finish_num: this.formData.finishNum,
|
||||
bad_num: this.formData.badNum,
|
||||
worker: this.formData.worker
|
||||
};
|
||||
reportWorkOrderApi.ProcessReportWork(params).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.uModal2.show = false;
|
||||
this.uModal.content = '报工成功!';
|
||||
this.openModal();
|
||||
this.clear();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
<style scoped>
|
||||
.input-border {
|
||||
border: 1px solid #eeeeee;
|
||||
}
|
||||
</style>
|
||||
|
||||
BIN
static/logo.png
BIN
static/logo.png
Binary file not shown.
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 12 KiB |
@ -85,7 +85,7 @@ const user = {
|
||||
} else {
|
||||
commit('SET_ROLES', ['ROLE_DEFAULT'])
|
||||
}
|
||||
console.log(username,avatar,res.data.roles);
|
||||
// console.log(username,avatar,res.data.roles);
|
||||
commit('SET_NAME', username)
|
||||
commit('SET_AVATAR', avatar)
|
||||
resolve(res)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user