huangli865118801 4 years ago
parent
commit
c789d1dffa
  1. 13
      api/user.js
  2. 9
      pages.json
  3. 2
      pages/firstInspection/firstInspection.vue
  4. 52
      pages/firstInspectionInfo/firstInspectionInfo.vue
  5. 120
      pages/firstInspectionList/firstInspectionList.vue
  6. 243
      pages/firstInspectionList/index.scss
  7. 11
      pages/stampingInspectionInfo/stampingInspectionInfo.vue
  8. 16
      pages/stampingInspectionList/stampingInspectionList.vue

13
api/user.js

@ -356,6 +356,19 @@ export function materialCheckForm(data) {
});
}
/**
* 新增冲压检测列表
* @param {Object} data
*/
export function newCheckCyList(data) {
console.log(data)
return request({
url: `${functions.getDomain()}/api/new-check-cy-lists`,
method: "post",
data
});
}
/**
* 新增首检检测列表
* @param {Object} data

9
pages.json

@ -166,6 +166,15 @@
}
}
,{
"path" : "pages/firstInspectionList/firstInspectionList",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"navigationBarTextStyle": "white",

2
pages/firstInspection/firstInspection.vue

@ -52,7 +52,7 @@
firstInspectionInfo(plan_id,item) {
console.log("id",plan_id)
uni.navigateTo({
url: `../firstInspectionInfo/firstInspectionInfo?plan_id=${plan_id}&product_id=${item.product_id}&planInfo=${encodeURIComponent(JSON.stringify(item))}`,
url: `../firstInspectionList/firstInspectionList?plan_id=${plan_id}&product_id=${item.product_id}&planInfo=${encodeURIComponent(JSON.stringify(item))}`,
success: res => {},
fail: () => {},
complete: () => {}

52
pages/firstInspectionInfo/firstInspectionInfo.vue

@ -48,10 +48,10 @@
<view class="content-box-card-list" style="align-items: center;">
<view class="content-box-card-title">首检信息:</view>
<view class="right-check">
<view class="other-input" v-if="palnInfo.check==0">
<view class="other-input" v-if="type==1">
<input type="text" v-model="samplingModel" @input="samplingInput" placeholder="首检信息" />
</view>
<view class="other-input" v-if="palnInfo.check!==0">
<view class="other-input" v-if="type==2">
{{info.msg}}
</view>
</view>
@ -61,13 +61,13 @@
<view class="content-box-card-list">
<view class="content-box-card-title">抽样方式:</view>
<view class="right-check">
<view class="check-list" v-if="palnInfo.check==0" v-for="(item,index) in msg" :key="index"
<view class="check-list" v-if="type==1" v-for="(item,index) in msg" :key="index"
@tap="radioChange(item.name)">
<image :src="item.name==forms.msg?'../../static/xz.png':'../../static/wxz.png'">
</image>
<text>{{item.name}}</text>
</view>
<view v-if="palnInfo.check==0" class="other-input">
<view v-if="type==2" class="other-input">
<input type="text" v-model="msgModel" @input="msgInput" placeholder="其他" />
</view>
<view>
@ -80,12 +80,12 @@
<view class="content-box-card-list">
<view class="content-box-card-title">检验依据:</view>
<view class="right-check">
<view class="check-list" v-if="palnInfo.check==0" v-for="(item,index) in jyBasis" :key="index"
<view class="check-list" v-if="type==1" v-for="(item,index) in jyBasis" :key="index"
@tap="jyBasisChange(item)">
<image :src="item==forms.basis?'../../static/xz.png':'../../static/wxz.png'"></image>
<text>{{item}}</text>
</view>
<view class="other-input" v-if="palnInfo.check==0">
<view class="other-input" v-if="type==2">
<input type="text" v-model="basisModel" @input="basisInput" placeholder="其他" />
</view>
<view>
@ -127,7 +127,7 @@
<view class="num-div">2</view>
<view class="num-div">3</view>
</view>
<view class="right-list" v-if="palnInfo.check==0" v-for="(items,index) in forms.item" :key="index">
<view class="right-list" v-if="type==1" v-for="(items,index) in forms.item" :key="index">
<view class="gg-div">
<input type="number" v-model="items.one" />
</view>
@ -138,7 +138,7 @@
<input type="number" v-model="items.their" />
</view>
</view>
<view class="right-list" v-if="palnInfo.check!=0" v-for="(items,index) in info.FirstCheckValue" :key="index">
<view class="right-list" v-if="type==2" v-for="(items,index) in info.FirstCheckValue" :key="index">
<view class="gg-div">
<input disabled="true" type="number" v-model="items.one" />
</view>
@ -153,8 +153,8 @@
</view>
</view>
<view class="beizhu">
<textarea v-if="palnInfo.check==0" v-model="forms.remake" placeholder="请输入备注" />
<textarea v-if="palnInfo.check!=0" v-model="info.remake" placeholder="请输入备注" />
<textarea v-if="type==1" v-model="forms.remake" placeholder="请输入备注" />
<textarea v-if="type==2" v-model="info.remake" disabled="true" />
</view>
</view>
</view>
@ -164,17 +164,17 @@
<view class="content-box-card-list">
<view class="content-box-card-title">外观:</view>
<view class="right-check">
<view class="check-list" v-if="palnInfo.check==0" v-for="(item,index) in appearance" :key="index"
<view class="check-list" v-if="type==1" v-for="(item,index) in appearance" :key="index"
@tap="appearanceChange(item)">
<image :src="item==forms.appearance?'../../static/xz.png':'../../static/wxz.png'">
</image>
<text>{{item}}</text>
</view>
<view class="other-input" v-if="palnInfo.check==0" >
<view class="other-input" v-if="type==1" >
<input type="text" v-model="appearanceModel" @input="appearanceInput"
placeholder="其他" />
</view>
<view v-if="palnInfo.check!=0" >{{info.appearance}}</view>
<view v-if="type==2" >{{info.appearance}}</view>
</view>
</view>
</view>
@ -182,16 +182,16 @@
<view class="content-box-card-list">
<view class="content-box-card-title">结构性能:</view>
<view class="right-check">
<view class="check-list" v-if="palnInfo.check==0" v-for="(item,index) in structure" :key="index"
<view class="check-list" v-if="type==1" v-for="(item,index) in structure" :key="index"
@tap="structureChange(item)">
<image :src="item==forms.structure?'../../static/xz.png':'../../static/wxz.png'">
</image>
<text>{{item}}</text>
</view>
<view class="other-input" v-if="palnInfo.check==0">
<view class="other-input" v-if="type==1">
<input type="text" v-model="structureModel" @input="structureInput" placeholder="其他" />
</view>
<view v-if="palnInfo.check!=0">{{info.structure}}</view>
<view v-if="type==2">{{info.structure}}</view>
</view>
</view>
</view>
@ -203,7 +203,7 @@
<view class="content-box-card-list">
<view class="content-box-card-title">最终判定:</view>
<view class="right-check" >
<view class="check-list" v-if="palnInfo.check==0" v-for="(item,index) in ifQualified" :key="index"
<view class="check-list" v-if="type==1" v-for="(item,index) in ifQualified" :key="index"
@tap="ifQualifiedChange(index+1)">
<image :src="forms.result==index+1?'../../static/xz.png':'../../static/wxz.png'">
</image>
@ -220,7 +220,7 @@
<view class="content-box-card-list">
<view class="content-box-card-title">是否量产:</view>
<view class="right-check" >
<view v-if="palnInfo.check==0" class="check-list" v-for="(item,index) in ifProduction" :key="index"
<view v-if="type==1" class="check-list" v-for="(item,index) in ifProduction" :key="index"
@tap="ifProductionChange(index+1)">
<image :src="forms.agree==index+1?'../../static/xz.png':'../../static/wxz.png'"></image>
<text>{{item}}</text>
@ -237,8 +237,8 @@
</view>
</view>
<view class="submit-btn">
<button type="primary" v-if="palnInfo.check==0" @tap="submits">提交并发起审核</button>
<button type="primary" @tap="firstCheckSureBtn()" v-if="palnInfo.check==1" >审核</button>
<button type="primary" v-if="type==1" @tap="submits">提交并发起审核</button>
<button type="primary" @tap="firstCheckSureBtn()" v-if="palnInfo.check==1&&type==2" >审核</button>
</view>
</view>
@ -255,7 +255,9 @@
data() {
return {
type:0,
pId: 0, //id
id:0,
palnInfo: {}, //
crrentTime: '', //
line: ["A线", "B线", "C线", "D线"],
@ -365,12 +367,17 @@
},
onLoad(e) {
this.type=e.type;
this.id=e.id;
this.pId = e.plan_id;
this.productId = e.product_id;
this.palnInfo = JSON.parse(decodeURIComponent(e.planInfo));
console.log('详情', this.palnInfo);
this.getTime();
this.getInfo();
if(this.type==2){
this.getInfo();
}
},
onShow() {
@ -413,7 +420,8 @@
getInfo() {
firstCheckDetail({
plan_id: this.pId,
product_id: this.productId
id: this.id,
product_id:this.productId
}).then(res => {
this.info = res;
})

120
pages/firstInspectionList/firstInspectionList.vue

@ -0,0 +1,120 @@
<template>
<view>
<view class="sm-box">
<view class="content-box-card">
<view class="content-box-card-ul-two">
<view class="content-box-card-list">
<view class="content-box-card-title">物料编号:</view>
<text>{{ info.product_number }}</text>
</view>
<view class="content-box-card-list">
<view class="content-box-card-title">规格:</view>
<text>{{ info.product_size }}</text>
</view>
</view>
<view class="content-box-card-ul-two">
<view class="content-box-card-list">
<view class="content-box-card-title">生产线:</view>
<text>{{ info.line_title }}</text>
</view>
<view class="content-box-card-list">
<view class="content-box-card-title">物料名称:</view>
<text>{{ info.product_name }}</text>
</view>
</view>
</view>
</view>
<view class="big-title">
巡检记录
</view>
<view class="white-card" >
<view class="lists" v-for="(item,index) in list" :key="index">
<view class="list-left">
<view class="list-left-up">
<view class="list-left-up-left">巡检人:{{item.one}}</view>
<view class="list-left-up-mid">巡检时间:{{item.create_time}}</view>
<view class="list-left-up-right-ok" v-if="item.result==1">OK</view>
<view class="list-left-up-right-no" v-if="item.result==2">NG</view>
</view>
<view class="list-left-dow">
<view class="list-left-dow-left">审核人:{{item.two}}</view>
<view class="list-left-dow-btn">
<view @tap="firstInspectionInfo(item.id,item)">
查看详情
</view>
<view class="red" @tap="firstInspectionInfo(item.id,item)">
审核
</view>
</view>
</view>
</view>
<view class="list-right" v-if="list.length==1||index==0">
</view>
<view class="list-right" v-if="list.length>=2&&list.length-1==index">
</view>
</view>
<view class="submit-btn">
<button type="primary" @tap="addRecord()">新增巡检记录</button>
</view>
</view>
</view>
</template>
<script>
import {newFirstCheckList,firstCheckSure} from "../../api/user.js"
export default {
data() {
return {
plan_id:'',
CyInfo:{},
info:{},
product_id:0,
list:[],
limit:10,
page:1
};
},
onLoad(e) {
this.plan_id=e.plan_id;
this.CyInfo = JSON.parse(decodeURIComponent(e.planInfo));
this.product_id=this.CyInfo.product_id;
this.getData()
},methods:{
getData(){
let param={
plan_id:this.plan_id,
limit:this.limit,
page:this.page
};
newFirstCheckList(param).then(res=>{
this.info=res,
this.list=this.info.lists.data;
console.log("详情",res)
})
}
,addRecord(){
uni.navigateTo({
url: `../firstInspectionInfo/firstInspectionInfo?plan_id=${this.plan_id}&product_id=${this.product_id}&planInfo=${encodeURIComponent(JSON.stringify(this.CyInfo))}&type=1`,
success: res => {},
fail: () => {},
complete: () => {}
});
},
firstInspectionInfo(id){
uni.navigateTo({
url: `../firstInspectionInfo/firstInspectionInfo?plan_id=${this.plan_id}&product_id=${this.product_id}&id=${id}&planInfo=${encodeURIComponent(JSON.stringify(this.CyInfo))}&type=2`,
success: res => {},
fail: () => {},
complete: () => {}
});
}
}
}
</script>
<style lang="scss">
@import "./index.scss"
</style>

243
pages/firstInspectionList/index.scss

@ -0,0 +1,243 @@
.sm-box{
@include wh(750upx,auto);
padding-top: 30upx;
padding-bottom: 30upx;
background: white;
.card{
@include wh(710upx,auto);
margin: auto;
border: 1upx solid #F1F1F1;
padding-top: 30upx;
padding-bottom: 30upx;
.title{
width: 690upx;
margin: auto;
@include fonts(26upx,#666,bold);
}
.content{
width: 690upx;
margin: auto;
@include fonts(24upx,#999);
}
}
.content-box-card{
width: 690upx;
margin: auto;
.content-box-card-ul{
@include flex(flex-start,flex-start);
.content-box-card-list{
@include flex(flex-start,flex-start);
margin-top: 24upx;
.content-box-card-title{
width: 140upx;
@include fonts(26upx,#333,bold);
}
text{
@include fonts(24upx,#999);
}
.right-check{
width: 500upx;
@include flex(flex-start,flex-start);
flex-wrap: wrap;
.check-list{
//width: 240upx;
@include flex(center,flex-start);
margin-left: 24upx;
image{
@include wh(33upx,33upx);
}
text{
@include fonts(24upx,#999);
margin-left: 10upx;
}
}
.other-input{
@include wh(240upx,50upx);
@include flex(center,center);
border: 1upx solid #F1F1F1;
border-radius: 4upx;
margin-left: 24upx;
input{
font-size: 26upx;
margin-left: 20upx;
}
}
}
}
}
.content-box-card-ul-two{
@include flex(flex-start,flex-start);
.content-box-card-list{
width: 345upx;
@include flex(flex-start,flex-start);
margin-top: 24upx;
.content-box-card-title{
width: 140upx;
@include fonts(24upx,#333,bold);
}
text{
@include fonts(24upx,#999);
}
.lin-div{
@include wh(140upx,50upx);
line-height: 50upx;
border: 1upx solid #F1F1F1;
border-radius: 5upx;
@include flex(center,space-around);
text{
@include fonts(24upx,#999);
}
image{
@include wh(22upx,14upx);
}
}
}
}
.sj-card{
width: 630upx;
margin: auto;
border: 1upx solid #F1F1F1;
padding: 30upx;
margin-top: 30upx;
.sj-title{
@include fonts(26upx,#333,bold);
}
.sj-nav{
@include flex(flex-start,space-between);
.left{
view{
@include fonts(24upx,#999);
margin-top: 60upx;
}
}
.right{
width: 500upx;
@include flex(center,space-between);
.right-list{
text-align: center;
.num-div{
@include fonts(24upx,#999);
}
.gg-div{
width: 100upx;
height: 50upx;
@include flex(center,center);
border: 1upx solid #F1F1F1;
margin-top: 24upx;
input{
font-size: 24upx;
}
}
}
}
}
}
.beizhu{
width: 630upx;
margin: auto;
border: 1upx solid #F1F1F1;
padding: 30upx;
margin-top: 30upx;
textarea{
font-size: 24upx;
height: 200upx;
}
}
}
}
.white-card{
@include wh(750upx,auto);
padding-top: 30upx;
padding-bottom: 30upx;
background: white;
//margin-top: 24upx;
.lists{
@include wh(710upx,auto);
margin: auto;
border-bottom: 1upx solid #C8C7CC;
padding-bottom: 30upx;
@include flex(flex-start,space-between);
.list-left{
@include wh(660upx,auto);
.list-left-up{
@include flex(center,flex-start);
.list-left-up-left{
width: 240upx;
@include fonts(24upx,#333,bold);
}
.list-left-up-mid{
width:370upx;
@include fonts(24upx,#333,bold);
}
.list-left-up-right-ok{
@include wh(60upx,60upx);
border: 1upx solid #4CD964;
border-radius: 50%;
line-height: 60upx;
text-align: center;
@include fonts(24upx, #4CD964,bold);
}
.list-left-up-right-no{
@include wh(60upx,60upx);
border: 1upx solid red;
border-radius: 50%;
line-height: 60upx;
text-align: center;
@include fonts(24upx,red,bold);
}
}
.list-left-dow{
@include flex(center,flex-start);
margin-top: 30upx;
.list-left-dow-left{
width: 240upx;
@include fonts(24upx,#333,bold);
}
.list-left-dow-btn{
width: 400upx;
@include flex(center,space-between);
view{
@include wh(160upx,44upx);
background: #4CD964;
@include fonts(24upx,#fff,500);
text-align: center;
line-height: 44upx;
border-radius: 10upx;
}
.red{
background: #DD524D!important;
}
}
}
}
.list-right{
@include wh(40upx,40upx);
border: 1upx solid #007AFF;
border-radius: 50%;
line-height: 40upx;
text-align: center;
@include fonts(24upx, #007AFF,bold);
}
.mj-color{
@include wh(40upx,40upx);
border: 1upx solid #F0AD4E;
border-radius: 50%;
line-height: 40upx;
text-align: center;
@include fonts(24upx, #F0AD4E,bold);
}
}
}
.submit-btn{
@include wh(690upx,auto);
margin: auto;
margin-top: 60upx;
}

11
pages/stampingInspectionInfo/stampingInspectionInfo.vue

@ -97,6 +97,7 @@ export default {
data() {
return {
type:0,
id:0,
ifSubmit:false,
line: ['夜班', '白班'],
ifcomplete: ['OK', 'NG'],
@ -122,6 +123,7 @@ export default {
onLoad(e) {
this.type=e.type;
this.pId = e.plan_id;
this.id=e.id;
this.froms.plan_id = this.pId;
this.CyInfo = JSON.parse(decodeURIComponent(e.planInfo));
this.froms.model = this.CyInfo.product_size;
@ -172,7 +174,8 @@ export default {
getInfo() {
cyCheckDetail({
plan_id: this.pId
plan_id: this.pId,
id:this.id
}).then(res => {
this.info = res;
this.froms.plan_id = this.pId;
@ -203,9 +206,9 @@ export default {
return false;
}
}
this.froms.item.push({
check_conf_id: item.id,
check_conf_id: items.id,
json: {
choice: items.choice,
content: items.content,
@ -215,7 +218,7 @@ export default {
});
}
}
cyCheckAdd(this.froms).then(res => {
this.$functions.success('提交成功').then(() => {
uni.navigateBack({

16
pages/stampingInspectionList/stampingInspectionList.vue

@ -39,7 +39,7 @@
<view class="list-left-dow">
<view class="list-left-dow-left">审核人:{{item.two}}</view>
<view class="list-left-dow-btn">
<view>
<view @tap="firstInspectionInfo(item.id,item)">
查看详情
</view>
<view class="red">
@ -52,7 +52,7 @@
</view>
<view class="list-right" v-if="list.length>=2&&list.length-1==index">
</view>
</view>
<view class="submit-btn">
@ -63,7 +63,7 @@
</template>
<script>
import {newFirstCheckList} from "../../api/user.js"
import {newCheckCyList} from "../../api/user.js"
export default {
data() {
return {
@ -87,7 +87,7 @@
limit:this.limit,
page:this.page
};
newFirstCheckList(param).then(res=>{
newCheckCyList(param).then(res=>{
this.info=res,
this.list=this.info.lists.data;
console.log("详情",res)
@ -100,6 +100,14 @@
fail: () => {},
complete: () => {}
});
},
firstInspectionInfo(id){
uni.navigateTo({
url: `../stampingInspectionInfo/stampingInspectionInfo?plan_id=${this.plan_id}&id=${id}&planInfo=${encodeURIComponent(JSON.stringify(this.CyInfo))}&type=2`,
success: res => {},
fail: () => {},
complete: () => {}
});
}
}
}

Loading…
Cancel
Save