huangli865118801 4 years ago
parent
commit
cc7c008fd6
  1. 12
      App.vue
  2. 13
      api/user.js
  3. 9
      pages.json
  4. 2
      pages/stampingInspection/stampingInspection.vue
  5. 33
      pages/stampingInspectionInfo/index.scss
  6. 62
      pages/stampingInspectionInfo/stampingInspectionInfo.vue
  7. 243
      pages/stampingInspectionList/index.scss
  8. 110
      pages/stampingInspectionList/stampingInspectionList.vue

12
App.vue

@ -12,9 +12,19 @@
}
</script>
<style>
<style lang="scss">
/*每个页面公共css */
page{
background: #F1F1F1;
}
.big-title{
width: 750upx;
margin: auto;
padding: 30upx 0upx 30upx 0upx;
@include fonts(30upx,red,bold);
background:#C8C7CC;
text-indent: 30upx;
}
</style>

13
api/user.js

@ -354,4 +354,17 @@ export function materialCheckForm(data) {
method: "post",
data
});
}
/**
* 新增首检检测列表
* @param {Object} data
*/
export function newFirstCheckList(data) {
console.log(data)
return request({
url: `${functions.getDomain()}/api/new-first-check-lists`,
method: "post",
data
});
}

9
pages.json

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

2
pages/stampingInspection/stampingInspection.vue

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

33
pages/stampingInspectionInfo/index.scss

@ -1,10 +1,4 @@
.big-title{
width: 690upx;
margin: auto;
margin-top: 30upx;
margin-bottom: 30upx;
@include fonts(26upx,#666,bold);
}
.sm-box{
@include wh(750upx,auto);
padding-top: 30upx;
@ -289,14 +283,25 @@
width: 710upx;
@include flex(center,space-bteween);
.tx-title{
width: 590upx;
width: 500upx;
@include fonts(24upx,#666,400);
}
input{
width: 120upx;
padding: 20upx;
border: 1upx solid #F1F1F1;
font-size: 24upx;
text-align: right;
.tx-in-nav{
width: 200upx;
@include flex(center,space-bteween);
input{
width: 100upx;
padding: 20upx;
border: 1upx solid #F1F1F1;
font-size: 24upx;
text-align: right;
margin-left: 5upx;
margin-right: 5upx;
}
view{
font-size: 24upx;
color: #555555;
}
}
}

62
pages/stampingInspectionInfo/stampingInspectionInfo.vue

@ -70,7 +70,11 @@
<view class="cyxj-content-card" v-else>
<view class="tx-ul">
<view class="tx-title">{{ value.title }}</view>
<input v-model="value.input" placeholder="请输入" />
<view class="tx-in-nav">
<view>{{value.bottom}}</view>
<input v-model="value.input" placeholder="请输入" />
<view>{{value.top}}</view>
</view>
</view>
</view>
</view>
@ -79,7 +83,7 @@
<view class="cyxj-content" style="margin-top: 24upx;">
<view class="bzqk-card"><textarea v-model="froms.remake" placeholder="备注情况说明" /></view>
<view class="submit-btn">
<button v-if="CyInfo.check == 0" type="primary" @tap="submits">提交并发起审核</button>
<button v-if="type == 1" type="primary" @tap="submits">提交并发起审核</button>
<button v-if="CyInfo.check == 1" @tap="applys()" type="primary">审核</button>
</view>
</view>
@ -92,6 +96,7 @@ import { cyCheckSure } from '../../api/index.js';
export default {
data() {
return {
type:0,
ifSubmit:false,
line: ['夜班', '白班'],
ifcomplete: ['OK', 'NG'],
@ -115,11 +120,12 @@ export default {
},
onLoad(e) {
this.type=e.type;
this.pId = e.plan_id;
this.froms.plan_id = this.pId;
this.CyInfo = JSON.parse(decodeURIComponent(e.planInfo));
this.froms.model = this.CyInfo.product_size;
if(this.CyInfo.check!=0){
if(this.CyInfo.check!=0&&this.type!=1){
this.getInfo();
}
bad({}).then(res => {
@ -183,32 +189,32 @@ export default {
this.configSet[index].check_conf_msg[idx].situation = this.methList[e.detail.value];
},
submits() {
for (let b in this.configSet) {
for (let i in this.configSet[b].check_conf_msg) {
let items = this.configSet[b].check_conf_msg[i];
if (this.configSet[b].check_conf_msg[i].status == 1) {
if (items.choice == 'NG' && (!items.content || !items.situation)) {
this.$functions.error('请完整填写信息');
return false;
}
} else {
if (!items.input) {
this.$functions.error('请完整填写信息');
return false;
}
}
// for (let b in this.configSet) {
// for (let i in this.configSet[b].check_conf_msg) {
// let items = this.configSet[b].check_conf_msg[i];
// if (this.configSet[b].check_conf_msg[i].status == 1) {
// if (items.choice == 'NG' && (!items.content || !items.situation)) {
// this.$functions.error('');
// return false;
// }
// } else {
// if (!items.input) {
// this.$functions.error('');
// return false;
// }
// }
this.froms.item.push({
check_conf_id: item.id,
json: {
choice: items.choice,
content: items.content,
situation: items.situation,
input: items.input
}
});
}
}
// this.froms.item.push({
// check_conf_id: item.id,
// json: {
// choice: items.choice,
// content: items.content,
// situation: items.situation,
// input: items.input
// }
// });
// }
// }
cyCheckAdd(this.froms).then(res => {
this.$functions.success('提交成功').then(() => {

243
pages/stampingInspectionList/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;
}

110
pages/stampingInspectionList/stampingInspectionList.vue

@ -0,0 +1,110 @@
<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>
查看详情
</view>
<view class="red">
审核
</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} from "../../api/user.js"
export default {
data() {
return {
plan_id:'',
CyInfo:{},
info:{},
list:[],
limit:10,
page:1
};
},
onLoad(e) {
this.plan_id=e.plan_id;
this.CyInfo = JSON.parse(decodeURIComponent(e.planInfo));
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: `../stampingInspectionInfo/stampingInspectionInfo?plan_id=${this.plan_id}&planInfo=${encodeURIComponent(JSON.stringify(this.CyInfo))}&type=1`,
success: res => {},
fail: () => {},
complete: () => {}
});
}
}
}
</script>
<style lang="scss">
@import "./index.scss"
</style>
Loading…
Cancel
Save