流转
This commit is contained in:
27
api/reportFlow/index.js
Normal file
27
api/reportFlow/index.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request'
|
||||
// 获取工单信息
|
||||
export function GetWorkOrderDetail(params) {
|
||||
return request({
|
||||
url: '/mobile/reportflow/get_workorder_detail',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 查询工序报工详情
|
||||
export function GetProcessReportWorkDetail(params) {
|
||||
return request({
|
||||
url: '/mobile/reportflow/get_process_reportwork_detail',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 工序报工
|
||||
export function ProcessReportWork(params) {
|
||||
return request({
|
||||
url: '/mobile/reportflow/process_reportwork',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
@@ -1,167 +1,166 @@
|
||||
<template>
|
||||
<view class="uni-section">
|
||||
<view class="uni-section-header" @click="onClick">
|
||||
<view class="uni-section-header__decoration" v-if="type" :class="type" />
|
||||
<slot v-else name="decoration"></slot>
|
||||
<view class="uni-section-header__decoration" v-if="type" :class="type" />
|
||||
<slot v-else name="decoration"></slot>
|
||||
|
||||
<view class="uni-section-header__content">
|
||||
<text :style="{'font-size':titleFontSize,'color':titleColor}" class="uni-section__content-title" :class="{'distraction':!subTitle}">{{ title }}</text>
|
||||
<text v-if="subTitle" :style="{'font-size':subTitleFontSize,'color':subTitleColor}" class="uni-section-header__content-sub">{{ subTitle }}</text>
|
||||
</view>
|
||||
<view class="uni-section-header__content">
|
||||
<text :style="{ 'font-size': titleFontSize, color: titleColor }" class="uni-section__content-title" :class="{ distraction: !subTitle }">{{ title }}</text>
|
||||
<text v-if="subTitle" :style="{ 'font-size': subTitleFontSize, color: subTitleColor }" class="uni-section-header__content-sub">{{ subTitle }}</text>
|
||||
</view>
|
||||
|
||||
<view class="uni-section-header__slot-right">
|
||||
<slot name="right"></slot>
|
||||
</view>
|
||||
<view class="uni-section-header__slot-right">
|
||||
<slot name="right"></slot>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="uni-section-content" :style="{padding: _padding}">
|
||||
<view class="uni-section-content" :style="{ padding: _padding }">
|
||||
<slot />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* Section 标题栏
|
||||
* @description 标题栏
|
||||
* @property {String} type = [line|circle|square] 标题装饰类型
|
||||
* @value line 竖线
|
||||
* @value circle 圆形
|
||||
* @value square 正方形
|
||||
* @property {String} title 主标题
|
||||
* @property {String} titleFontSize 主标题字体大小
|
||||
* @property {String} titleColor 主标题字体颜色
|
||||
* @property {String} subTitle 副标题
|
||||
* @property {String} subTitleFontSize 副标题字体大小
|
||||
* @property {String} subTitleColor 副标题字体颜色
|
||||
* @property {String} padding 默认插槽 padding
|
||||
*/
|
||||
|
||||
/**
|
||||
* Section 标题栏
|
||||
* @description 标题栏
|
||||
* @property {String} type = [line|circle|square] 标题装饰类型
|
||||
* @value line 竖线
|
||||
* @value circle 圆形
|
||||
* @value square 正方形
|
||||
* @property {String} title 主标题
|
||||
* @property {String} titleFontSize 主标题字体大小
|
||||
* @property {String} titleColor 主标题字体颜色
|
||||
* @property {String} subTitle 副标题
|
||||
* @property {String} subTitleFontSize 副标题字体大小
|
||||
* @property {String} subTitleColor 副标题字体颜色
|
||||
* @property {String} padding 默认插槽 padding
|
||||
*/
|
||||
|
||||
export default {
|
||||
name: 'UniSection',
|
||||
emits:['click'],
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: ''
|
||||
},
|
||||
titleFontSize: {
|
||||
type: String,
|
||||
default: '14px'
|
||||
},
|
||||
titleColor:{
|
||||
type: String,
|
||||
default: '#333'
|
||||
},
|
||||
subTitle: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
subTitleFontSize: {
|
||||
type: String,
|
||||
default: '12px'
|
||||
},
|
||||
subTitleColor: {
|
||||
type: String,
|
||||
default: '#999'
|
||||
},
|
||||
padding: {
|
||||
type: [Boolean, String],
|
||||
default: false
|
||||
}
|
||||
export default {
|
||||
name: 'UniSection',
|
||||
emits: ['click'],
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
computed:{
|
||||
_padding(){
|
||||
if(typeof this.padding === 'string'){
|
||||
return this.padding
|
||||
}
|
||||
|
||||
return this.padding?'10px':''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
title(newVal) {
|
||||
if (uni.report && newVal !== '') {
|
||||
uni.report('title', newVal)
|
||||
}
|
||||
}
|
||||
title: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: ''
|
||||
},
|
||||
methods: {
|
||||
onClick() {
|
||||
this.$emit('click')
|
||||
titleFontSize: {
|
||||
type: String,
|
||||
default: '14px'
|
||||
},
|
||||
titleColor: {
|
||||
type: String,
|
||||
default: '#333'
|
||||
},
|
||||
subTitle: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
subTitleFontSize: {
|
||||
type: String,
|
||||
default: '12px'
|
||||
},
|
||||
subTitleColor: {
|
||||
type: String,
|
||||
default: '#999'
|
||||
},
|
||||
padding: {
|
||||
type: [Boolean, String],
|
||||
default: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
_padding() {
|
||||
if (typeof this.padding === 'string') {
|
||||
return this.padding;
|
||||
}
|
||||
|
||||
return this.padding ? '10px' : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
title(newVal) {
|
||||
if (uni.report && newVal !== '') {
|
||||
uni.report('title', newVal);
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClick() {
|
||||
this.$emit('click');
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" >
|
||||
$uni-primary: #2979ff !default;
|
||||
<style lang="scss">
|
||||
$uni-primary: #2979ff !default;
|
||||
|
||||
.uni-section {
|
||||
background-color: #fff;
|
||||
.uni-section-header {
|
||||
position: relative;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
padding: 12px 10px;
|
||||
font-weight: normal;
|
||||
.uni-section {
|
||||
background-color: #fff;
|
||||
.uni-section-header {
|
||||
position: relative;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
padding: 12px 10px;
|
||||
font-weight: normal;
|
||||
|
||||
&__decoration{
|
||||
margin-right: 6px;
|
||||
background-color: $uni-primary;
|
||||
&.line {
|
||||
width: 4px;
|
||||
height: 12px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
&__decoration {
|
||||
margin-right: 6px;
|
||||
background-color: $uni-primary;
|
||||
&.line {
|
||||
width: 4px;
|
||||
height: 12px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
&.circle {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-top-right-radius: 50px;
|
||||
border-top-left-radius: 50px;
|
||||
border-bottom-left-radius: 50px;
|
||||
border-bottom-right-radius: 50px;
|
||||
}
|
||||
&.circle {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-top-right-radius: 50px;
|
||||
border-top-left-radius: 50px;
|
||||
border-bottom-left-radius: 50px;
|
||||
border-bottom-right-radius: 50px;
|
||||
}
|
||||
|
||||
&.square {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
}
|
||||
&.square {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
&__content {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
color: #333;
|
||||
&__content {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
color: #333;
|
||||
|
||||
.distraction {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
&-sub {
|
||||
margin-top: 2px;
|
||||
}
|
||||
}
|
||||
.distraction {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
&-sub {
|
||||
margin-top: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
&__slot-right{
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.uni-section-content{
|
||||
font-size: 14px;
|
||||
}
|
||||
&__slot-right {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.uni-section-content {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
4
main.js
4
main.js
@@ -4,6 +4,9 @@ import store from './store' // store
|
||||
import plugins from './plugins' // plugins
|
||||
import './permission' // permission
|
||||
|
||||
|
||||
import uView from '@/uni_modules/uview-ui'
|
||||
Vue.use(uView)
|
||||
// dayjs
|
||||
|
||||
// import dayjs from 'dayjs'
|
||||
@@ -11,7 +14,6 @@ import './permission' // permission
|
||||
// 插件安装
|
||||
import scanInputVue from './components/scan-input/scan-input.vue'
|
||||
Vue.component('ScanInput', scanInputVue)
|
||||
|
||||
Vue.use(plugins)
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"dayjs": "^1.11.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"sass": "^1.81.1",
|
||||
"sass-loader": "^16.0.3"
|
||||
}
|
||||
}
|
||||
|
||||
21
pages.json
21
pages.json
@@ -71,6 +71,27 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "浏览文本"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/produceManagement/requisition/requisition",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "物料领用"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/produceManagement/process/process",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "工序报工"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/qualityManagement/IPQC/IPQC",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "IPQC制程检验"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tabBar": {
|
||||
|
||||
@@ -39,10 +39,9 @@
|
||||
|
||||
<script>
|
||||
import { fail } from 'assert';
|
||||
import { tansParams } from '@/utils/common';
|
||||
export default {
|
||||
onShow() {
|
||||
uni.hideLoading();
|
||||
},
|
||||
onShow() {},
|
||||
data() {
|
||||
return {
|
||||
current: 0,
|
||||
@@ -63,42 +62,70 @@ export default {
|
||||
{
|
||||
name: '物料领用',
|
||||
icon: 'download-filled',
|
||||
url: ''
|
||||
url: '/pages/produceManagement/requisition/requisition',
|
||||
params: {
|
||||
processId: 15,
|
||||
processName: '首工序'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '机械加工',
|
||||
icon: 'star-filled',
|
||||
url: ''
|
||||
url: '/pages/produceManagement/process/process',
|
||||
params: {
|
||||
processId: 16,
|
||||
processName: '机械加工'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '加工检查',
|
||||
icon: 'star-filled',
|
||||
url: ''
|
||||
url: '/pages/produceManagement/process/process',
|
||||
params: {
|
||||
processId: 17,
|
||||
processName: '加工检查'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '手工研磨',
|
||||
icon: 'star-filled',
|
||||
url: ''
|
||||
url: '/pages/produceManagement/process/process',
|
||||
params: {
|
||||
processId: 18,
|
||||
processName: '手工研磨'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '机械研磨',
|
||||
icon: 'star-filled',
|
||||
url: ''
|
||||
url: '/pages/produceManagement/process/process',
|
||||
params: {
|
||||
processId: 19,
|
||||
processName: '机械研磨'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '精研磨',
|
||||
icon: 'star-filled',
|
||||
url: ''
|
||||
url: '/pages/produceManagement/process/process',
|
||||
params: {
|
||||
processId: 20,
|
||||
processName: '精研磨'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '出货',
|
||||
icon: 'upload-filled',
|
||||
url: ''
|
||||
url: '/pages/produceManagement/process/process',
|
||||
params: {
|
||||
processId: 21,
|
||||
processName: '出货'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '制程检验\n(不良跟踪)',
|
||||
icon: 'folder-add-filled',
|
||||
url: ''
|
||||
url: '/pages/qualityManagement/IPQC/IPQC'
|
||||
}
|
||||
],
|
||||
// 涂装模块
|
||||
@@ -107,7 +134,7 @@ export default {
|
||||
name: '扫码报工',
|
||||
icon: 'scan',
|
||||
url: ''
|
||||
},
|
||||
}
|
||||
],
|
||||
// 物料模块
|
||||
materialOptions: [
|
||||
@@ -120,7 +147,7 @@ export default {
|
||||
name: '产线备料',
|
||||
icon: 'upload-filled',
|
||||
url: ''
|
||||
},
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
@@ -133,7 +160,11 @@ export default {
|
||||
},
|
||||
// 产线功能
|
||||
changeProduceGrid(e) {
|
||||
const _url = this.produceOptions[e.detail.index].url;
|
||||
let _url = this.produceOptions[e.detail.index].url;
|
||||
const _params = this.produceOptions[e.detail.index].params;
|
||||
if (_params) {
|
||||
_url += `?${tansParams(_params)}`;
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: _url,
|
||||
fail: () => {
|
||||
@@ -183,6 +214,9 @@ view {
|
||||
|
||||
/* #endif */
|
||||
|
||||
.input-border {
|
||||
border: 1px solid #eeeeee;
|
||||
}
|
||||
.text {
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
|
||||
196
pages/produceManagement/process/process.vue
Normal file
196
pages/produceManagement/process/process.vue
Normal file
@@ -0,0 +1,196 @@
|
||||
<template>
|
||||
<!-- 各工序操作 -->
|
||||
<view class="common-box">
|
||||
<uni-card>
|
||||
<u-text size="18" :text="`工序名称:` + processName"></u-text>
|
||||
<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-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-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>
|
||||
<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.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.number="formData.badNum" type="number"></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>
|
||||
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
|
||||
// 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: {
|
||||
// 扫工单码结果
|
||||
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;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 清空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
|
||||
};
|
||||
reportWorkOrderApi.ProcessReportWork(params).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.uModal2.show = false;
|
||||
this.uModal.content = '报工成功!';
|
||||
this.openModal();
|
||||
this.clear();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.input-border {
|
||||
border: 1px solid #eeeeee;
|
||||
}
|
||||
</style>
|
||||
207
pages/produceManagement/requisition/requisition.vue
Normal file
207
pages/produceManagement/requisition/requisition.vue
Normal file
@@ -0,0 +1,207 @@
|
||||
<template>
|
||||
<!-- 物料领用 -->
|
||||
<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-input v-model="formData.name" border="none"></u-input>
|
||||
</u-form-item> -->
|
||||
|
||||
<!-- <u-form-item label="指示日期" borderBottom>
|
||||
<u-input v-model="formData.name" border="none"></u-input>
|
||||
</u-form-item> -->
|
||||
<!-- <u-form-item label="批号" borderBottom >
|
||||
<u-input v-model="formData.name" 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.workorder" 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.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>
|
||||
<u-input readonly v-model="formData.version" border="none"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="材料型号" borderBottom>
|
||||
<u-input readonly v-model="formData.materialName" border="none"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="材料编号" borderBottom>
|
||||
<u-input readonly v-model="formData.materialCode" border="none"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="材质" borderBottom>
|
||||
<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-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>
|
||||
</uni-card>
|
||||
<!-- 底部按钮 -->
|
||||
<view v-if="formData.workorder" class="bottom-box">
|
||||
<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>
|
||||
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: '',
|
||||
planNum: 0,
|
||||
finishNum: 0
|
||||
// productionName: '产品名称',
|
||||
// productionCode: '产品编码',
|
||||
// unit: '单位',
|
||||
// planNum: '计划数量',
|
||||
// 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: {
|
||||
// 扫工单码结果
|
||||
scanConfirm(val) {
|
||||
const params = {
|
||||
workorder: val
|
||||
};
|
||||
reportWorkOrderApi.GetWorkOrderDetail(params).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.formData = res.data;
|
||||
this.formData.finishNum = res.data.planNum;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 清空form
|
||||
clear() {
|
||||
this.formData = {
|
||||
id: -1,
|
||||
workorder: '',
|
||||
planNum: 0,
|
||||
finishNum: 0
|
||||
};
|
||||
},
|
||||
// Modal操作
|
||||
openModal() {
|
||||
this.uModal.show = true;
|
||||
},
|
||||
closeModal() {
|
||||
this.uModal.show = false;
|
||||
},
|
||||
submit() {
|
||||
this.uModal2.content = '是否确认领料';
|
||||
this.uModal2.show = true;
|
||||
},
|
||||
modalConfirm() {
|
||||
const params = {
|
||||
workorder: this.formData.workorder,
|
||||
process: this.processId,
|
||||
finish_num: this.formData.finishNum,
|
||||
bad_num: 0
|
||||
};
|
||||
reportWorkOrderApi.ProcessReportWork(params).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.uModal2.show = false;
|
||||
this.uModal.content = '领料成功!';
|
||||
this.openModal();
|
||||
this.clear();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* .common-box {
|
||||
padding-bottom: 60px;
|
||||
} */
|
||||
.input-border {
|
||||
border: 1px solid #eeeeee;
|
||||
}
|
||||
.row-box {
|
||||
display: flex;
|
||||
}
|
||||
span {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.input-item {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
</style>
|
||||
22
pages/qualityManagement/IPQC/IPQC.vue
Normal file
22
pages/qualityManagement/IPQC/IPQC.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
4
uni.scss
4
uni.scss
@@ -61,4 +61,6 @@ $uni-font-size-title:20px;
|
||||
$uni-color-subtitle: #555555; // 二级标题颜色
|
||||
$uni-font-size-subtitle:26px;
|
||||
$uni-color-paragraph: #3F536E; // 文章段落颜色
|
||||
$uni-font-size-paragraph:15px;
|
||||
$uni-font-size-paragraph:15px;
|
||||
|
||||
@import '@/uni_modules/uview-ui/theme.scss';
|
||||
@@ -17,7 +17,6 @@ import {
|
||||
|
||||
let timeout = 60000
|
||||
const request = config => {
|
||||
// console.log('config',config);
|
||||
// 是否需要设置 token
|
||||
const storageBaseUrl = 'http://' + getBaseUrl();
|
||||
const isToken = (config.headers || {}).isToken === false
|
||||
@@ -41,17 +40,14 @@ const request = config => {
|
||||
header: config.header,
|
||||
dataType: 'json'
|
||||
}).then(response => {
|
||||
// console.log('response',response);
|
||||
let [error, res] = response
|
||||
if (error) {
|
||||
console.log('config', config);
|
||||
console.log('response', response);
|
||||
console.log('error', error);
|
||||
toast('后端接口连接异常')
|
||||
reject('后端接口连接异常')
|
||||
return
|
||||
}
|
||||
// console.log('response',response,error,res);
|
||||
const code = res.data.code || 200
|
||||
const msg = errorCode[code] || res.data.msg || errorCode['default']
|
||||
if (code === 401) {
|
||||
|
||||
Reference in New Issue
Block a user