huangli865118801 3 years ago
parent
commit
ea886119f6
  1. 40
      api/user.js
  2. 4
      pages.json
  3. 4
      pages/firstInspection/firstInspection.vue
  4. 5
      pages/firstInspection/index.scss
  5. 158
      pages/firstInspectionInfo/firstInspectionInfo.vue
  6. 6
      pages/firstInspectionInfo/index.scss
  7. 2
      pages/login/login.vue
  8. 37
      pages/stampingInspection/stampingInspection.vue
  9. 39
      pages/stampingInspectionInfo/stampingInspectionInfo.vue
  10. 2
      pages/user/index.scss
  11. 8
      pages/user/user.vue
  12. BIN
      static/dsh.png
  13. BIN
      static/shouye-g.png
  14. BIN
      static/shouye.png
  15. BIN
      static/wode-g.png
  16. BIN
      static/wode.png
  17. BIN
      static/ysh.png

40
api/user.js

@ -79,3 +79,43 @@ export function firstCheckAdd(data) {
data
});
}
/**
* 首检审核
* @param {Object} data
*/
export function firstCheckSure(data) {
console.log(data)
return request({
url: `${functions.getDomain()}/api/first-check-sure`,
method: "post",
data
});
}
/**
* 冲压巡检提交
* @param {Object} data
*/
export function cyCheckAdd(data) {
console.log(data)
return request({
url: `${functions.getDomain()}/api/cy-check-add`,
method: "post",
data
});
}
/**
* 冲压巡检提交
* @param {Object} data
*/
export function cyCheckDetail(data) {
console.log(data)
return request({
url: `${functions.getDomain()}/api/cy-check-detail`,
method: "post",
data
});
}

4
pages.json

@ -161,13 +161,13 @@
"globalStyle": {
"navigationBarTextStyle": "white",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#008EBC",
"navigationBarBackgroundColor": "#007aff",
"backgroundColor": "#F8F8F8"
},
"tabBar": {
"backgroundColor": "#FFFFFF",
"color": "#C3C3C3",
"selectedColor": "#1296db",
"selectedColor": "#419CFF",
"list": [{
"pagePath": "pages/index/index",
"text": "首页",

4
pages/firstInspection/firstInspection.vue

@ -7,7 +7,9 @@
<view>物料名称:</view><text>{{item.product_name}}</text>
</view>
<view class="card-right">
<image src="../../static/search.png"></image>
<image class="glass-cion" v-if="item.check==0" src="../../static/search.png"></image>
<image class="sh-cion" v-if="item.check==1" src="../../static/dsh.png"></image>
<image class="sh-cion" v-if="item.check==2" src="../../static/ysh.png"></image>
</view>
</view>
<view class="card-up-list">

5
pages/firstInspection/index.scss

@ -14,7 +14,10 @@
margin-top: 24upx;
@include flex(center,space-between);
.card-right{
image{
.sh-cion{
@include wh(34upx,34upx)
}
.glass-cion{
@include wh(34upx,34upx)
}
}

158
pages/firstInspectionInfo/firstInspectionInfo.vue

@ -16,6 +16,12 @@
<text>{{palnInfo.product_name}}</text>
</view>
</view>
<view class="content-box-card-ul">
<view class="content-box-card-list">
<view class="content-box-card-title">物料编号:</view>
<text>{{palnInfo.product_number}}</text>
</view>
</view>
<view class="content-box-card-ul">
<view class="content-box-card-list">
<view class="content-box-card-title">检验日期:</view>
@ -38,18 +44,34 @@
<text>{{palnInfo.line_title}}</text>
</view>
</view>
<view class="content-box-card-ul" >
<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">
<input type="text" v-model="samplingModel" @input="samplingInput" placeholder="首检信息" />
</view>
<view class="other-input" v-if="palnInfo.check!==0">
{{info.msg}}
</view>
</view>
</view>
</view>
<view class="content-box-card-ul">
<view class="content-box-card-list">
<view class="content-box-card-title">抽样方式:</view>
<view class="right-check">
<view class="check-list" v-for="(item,index) in cyMethod" :key="index"
<view class="check-list" v-if="palnInfo.check==0" v-for="(item,index) in msg" :key="index"
@tap="radioChange(item.name)">
<image :src="item.name==forms.sampling?'../../static/xz.png':'../../static/wxz.png'">
<image :src="item.name==forms.msg?'../../static/xz.png':'../../static/wxz.png'">
</image>
<text>{{item.name}}</text>
</view>
<view class="other-input">
<input type="text" v-model="samplingModel" @input="samplingInput" placeholder="其他" />
<view v-if="palnInfo.check==0" class="other-input">
<input type="text" v-model="msgModel" @input="msgInput" placeholder="其他" />
</view>
<view>
<text>{{info.sampling}}</text>
</view>
</view>
</view>
@ -58,14 +80,17 @@
<view class="content-box-card-list">
<view class="content-box-card-title">检验依据:</view>
<view class="right-check">
<view class="check-list" v-for="(item,index) in jyBasis" :key="index"
<view class="check-list" v-if="palnInfo.check==0" 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">
<view class="other-input" v-if="palnInfo.check==0">
<input type="text" v-model="basisModel" @input="basisInput" placeholder="其他" />
</view>
<view>
<text>{{info.basis}}</text>
</view>
</view>
</view>
</view>
@ -76,7 +101,6 @@
<view class="content-box-card-ul">
<view class="content-box-card-list">
<view class="content-box-card-title">检验标准:</view>
<text>检验标准</text>
</view>
</view>
<view class="content-box-card-ul-two" v-for="(value, key, index) in info.reference">
@ -103,23 +127,34 @@
<view class="num-div">2</view>
<view class="num-div">3</view>
</view>
<view class="right-list" v-for="(item,index) in forms.msg" :key="index">
<view class="right-list" v-if="palnInfo.check==0" v-for="(items,index) in forms.item" :key="index">
<view class="gg-div">
<input type="number" v-model="item.one" />
<input type="number" v-model="items.one" />
</view>
<view class="gg-div">
<input type="number" v-model="item.two" />
<input type="number" v-model="items.two" />
</view>
<view class="gg-div">
<input type="number" v-model="item.three" />
<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="gg-div">
<input disabled="true" type="number" v-model="items.one" />
</view>
<view class="gg-div">
<input disabled="true" type="number" v-model="items.two" />
</view>
<view class="gg-div">
<input disabled="true" type="number" v-model="items.their" />
</view>
</view>
</view>
</view>
</view>
<view class="beizhu">
<textarea v-model="forms.remake" placeholder="请输入备注" />
<textarea v-if="palnInfo.check==0" v-model="forms.remake" placeholder="请输入备注" />
<textarea v-if="palnInfo.check!=0" v-model="info.remake" placeholder="请输入备注" />
</view>
</view>
</view>
@ -129,16 +164,17 @@
<view class="content-box-card-list">
<view class="content-box-card-title">外观:</view>
<view class="right-check">
<view class="check-list" v-for="(item,index) in appearance" :key="index"
<view class="check-list" v-if="palnInfo.check==0" 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">
<view class="other-input" v-if="palnInfo.check==0" >
<input type="text" v-model="appearanceModel" @input="appearanceInput"
placeholder="其他" />
</view>
<view v-if="palnInfo.check!=0" >{{info.appearance}}</view>
</view>
</view>
</view>
@ -146,15 +182,16 @@
<view class="content-box-card-list">
<view class="content-box-card-title">结构性能:</view>
<view class="right-check">
<view class="check-list" v-for="(item,index) in structure" :key="index"
<view class="check-list" v-if="palnInfo.check==0" 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">
<view class="other-input" v-if="palnInfo.check==0">
<input type="text" v-model="structureModel" @input="structureInput" placeholder="其他" />
</view>
<view v-if="palnInfo.check!=0">{{info.structure}}</view>
</view>
</view>
</view>
@ -165,31 +202,43 @@
<view class="content-box-card-ul">
<view class="content-box-card-list">
<view class="content-box-card-title">最终判定:</view>
<view class="right-check">
<view class="check-list" v-for="(item,index) in ifQualified" :key="index"
<view class="right-check" >
<view class="check-list" v-if="palnInfo.check==0" 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>
<text>{{item}}</text>
</view>
<view>
<text v-if="info.result==1">合格</text>
<text v-if="info.result==2">不合格</text>
</view>
</view>
</view>
</view>
<view class="content-box-card-ul">
<view class="content-box-card-list">
<view class="content-box-card-title">是否量产:</view>
<view class="right-check">
<view class="check-list" v-for="(item,index) in ifProduction" :key="index"
<view class="right-check" >
<view v-if="palnInfo.check==0" 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>
</view>
<view>
<text v-if="info.agree==1"></text>
<text v-if="info.agree==2"></text>
</view>
</view>
</view>
</view>
<view class="beizhu" v-if="forms.result==2&&forms.agree==1">
<textarea v-model="forms.information" placeholder="情况说明" />
</view>
</view>
<view class="submit-btn">
<button type="primary" @tap="submits">提交并发起审核</button>
<button type="primary" v-if="palnInfo.check==0" @tap="submits">提交并发起审核</button>
<button type="primary" @tap="firstCheckSureBtn()" v-if="palnInfo.check==1" >审核</button>
</view>
</view>
@ -199,7 +248,8 @@
<script>
import {
firstCheckDetail,
firstCheckAdd
firstCheckAdd,
firstCheckSure
} from "../../api/user.js"
export default {
@ -214,6 +264,7 @@
ifQualifiedIds: 0,
samplingModel: '',
basisModel: '',
msgModel:'',
cyMethod: [{
name: "开机首检",
check: false
@ -246,6 +297,32 @@
"制程检验标准",
"产品标准"
],
cyMethod:"",
msg: [{
name: "开机首检",
check: false
},
{
name: "关机末件",
check: false
},
{
name: "修模首件",
check: false
},
{
name: "转产首件",
check: false
},
{
name: "生产参数变更",
check: false
},
{
name: "材料变更",
check: false
}
],
appearance: ["划伤", "压痕", "拉痕", "摁伤", "油污", "水渍", "少孔", "开裂", "变形", "起皱、叠料", "毛刺", "印字"],
appearanceIds: -1,
structure: ["缺料", "螺纹", "铆接", "折弯", "膜厚", "附着力", "直线度", "平整度", "试装配", "表面处理"],
@ -256,16 +333,17 @@
ProductionIds: -1,
forms: {
machine: "",
sampling: "",
msg: [{
msg: "",
sampling:'',
item: [{
one: "",
two: "",
three: ''
their: ''
},
{
one: "",
two: "",
three: ''
their: ''
}
],
basis: "",
@ -298,6 +376,7 @@
},
methods: {
appearanceInput(e) {
this.forms.appearance = e.detail.value;
},
@ -307,6 +386,9 @@
structureInput(e) {
this.forms.structure = e.detail.value;
},
msgInput(e) {
this.forms.msg = e.detail.value;
},
basisInput(e) {
this.forms.basis = e.detail.value;
},
@ -336,13 +418,25 @@
this.info = res;
})
},
firstCheckSureBtn(){
let parm={
plan_id:this.info.plan_id,
oneCheck:this.info.oneCheck,
check_id:this.info.id
};
firstCheckSure(parm).then(res=>{
uni.navigateBack({
delta:1
})
})
},
bindline: function(e) {
console.log('picker发送选择改变,携带值为', e.target.value)
this.lineIndex = e.target.value
},
radioChange(name) {
this.forms.sampling = name;
this.samplingModel = "";
this.forms.msg = name;
this.msgModel = "";
},
jyBasisChange: function(name) {
this.forms.basis = name;
@ -372,8 +466,8 @@
return false;
}
let flag = true;
this.forms.msg.map(item => {
if (!item.one || !item.two || !item.three) {
this.forms.item.map(item => {
if (!item.one || !item.two || !item.their) {
flag = false;
return false;
}
@ -395,7 +489,7 @@
this.forms.plan_id = this.pId;
firstCheckAdd(this.forms).then(res => {
uni.navigateBack({
delta:1
})
})
}

6
pages/firstInspectionInfo/index.scss

@ -33,7 +33,7 @@
.content-box-card-ul{
@include flex(flex-start,flex-start);
.content-box-card-list{
@include flex(flex-start,flex-start);
@include flex(center,flex-start);
margin-top: 24upx;
.content-box-card-title{
width: 140upx;
@ -43,6 +43,7 @@
@include fonts(24upx,#999);
}
.right-check{
@include fonts(26upx,#666)
width: 500upx;
@include flex(flex-start,flex-start);
flex-wrap: wrap;
@ -68,6 +69,7 @@
border-radius: 4upx;
margin-left: 24upx;
margin-top: 10upx;
@include fonts(26upx,#666);
input{
font-size: 26upx;
margin-left: 20upx;
@ -81,7 +83,7 @@
@include flex(flex-start,flex-start);
.content-box-card-list{
width: 345upx;
@include flex(flex-start,flex-start);
@include flex(center,flex-start);
margin-top: 24upx;
.content-box-card-title{
width: 140upx;

2
pages/login/login.vue

@ -9,7 +9,7 @@
<input v-model="form.password" type="password" placeholder="请输入密码" />
</view>
<view class="btn-div">
<button @tap="submit" type="primary">登录</button>
<button @tap="submit" :disabled="form.tel&&form.password?false:true" type="primary">登录</button>
</view>
</view>
</view>

37
pages/stampingInspection/stampingInspection.vue

@ -1,26 +1,28 @@
<template>
<view>
<view class="card" v-for="(item,index) in 10" :key="index" @tap="stampingInspectionInfo()">
<view class="card" v-for="(item,index) in list" :key="index" @tap="firstInspectionInfo(item.plan_id,item)">
<view class="card-left">
<view class="card-up-list">
<view class="card-up-list-list">
<view>物料名称:</view><text>123-SDdshjdfjhfdjh-15</text>
<view>物料名称:</view><text>{{item.product_name}}</text>
</view>
<view class="card-right">
<image src="../../static/search.png"></image>
<image class="glass-cion" v-if="item.check==0" src="../../static/search.png"></image>
<image class="sh-cion" v-if="item.check==1" src="../../static/dsh.png"></image>
<image class="sh-cion" v-if="item.check==2" src="../../static/ysh.png"></image>
</view>
</view>
<view class="card-up-list">
<view class="card-up-list-list">
<view>物料编号:</view><text>16*16*12</text>
<view>物料编号:</view><text>{{item.product_number}}</text>
</view>
</view>
<view class="card-dow-list">
<view class="card-up-list-list">
<view>规格:</view><text>16*16*12</text>
<view>规格:</view><text>{{item.product_size}}</text>
</view>
<view class="card-up-list-list">
<view>产线:</view><text>产线A</text>
<view>产线:</view><text>{{item.line_title}}</text>
</view>
</view>
</view>
@ -29,15 +31,28 @@
</template>
<script>
import {
firstCheckLists
} from "../../api/user.js";
export default {
onLoad() {
this.bindData();
},
data() {
return {
list: []
};
},methods:{
stampingInspectionInfo(){
},
methods: {
bindData() {
firstCheckLists({}).then(res => {
this.list = res;
})
},
firstInspectionInfo(plan_id,item) {
console.log("id",plan_id)
uni.navigateTo({
url: '../stampingInspectionInfo/stampingInspectionInfo',
url: `../stampingInspectionInfo/stampingInspectionInfo?plan_id=${plan_id}&product_id=${item.product_id}&planInfo=${encodeURIComponent(JSON.stringify(item))}`,
success: res => {},
fail: () => {},
complete: () => {}
@ -48,5 +63,5 @@
</script>
<style lang="scss">
@import "./index.scss";
@import "./index.scss";
</style>

39
pages/stampingInspectionInfo/stampingInspectionInfo.vue

@ -10,17 +10,17 @@
<view class="content-box-card-ul-two">
<view class="content-box-card-list">
<view class="content-box-card-title">物料编号:</view>
<text>2021-07-15</text>
<text>{{CyInfo.product_number}}</text>
</view>
<view class="content-box-card-list">
<view class="content-box-card-title">生产日期:</view>
<text>2021-07-15</text>
<text>{{CyInfo.production}}</text>
</view>
</view>
<view class="content-box-card-ul-two">
<view class="content-box-card-list">
<view class="content-box-card-title">机型:</view>
<text>2021-07-15</text>
<text>{{CyInfo.product_size}}</text>
</view>
<view class="content-box-card-list">
<view class="content-box-card-title">班次:</view>
@ -33,13 +33,13 @@
</view>
</view>
<view class="content-box-card-ul-two">
<view class="content-box-card-list">
<!-- <view class="content-box-card-list">
<view class="content-box-card-title">时间段:</view>
<text>2021-07-15</text>
</view>
</view> -->
<view class="content-box-card-list">
<view class="content-box-card-title">检测员:</view>
<text>2021-07-15</text>
<text>{{info.name}}</text>
</view>
</view>
</view>
@ -100,6 +100,7 @@
</template>
<script>
import {cyCheckAdd,cyCheckDetail} from "../../api/user.js"
export default {
data() {
return {
@ -108,9 +109,31 @@
ifcomplete:["OK","NG"],
ifcompleteIds:0,
methList:["更换丝锥","丝锥加油","调整丝锥位置","换冲针"],
methIds:0
methIds:0,
planId:0,
CyInfo:{},
info:{},
froms:{
plan_id:'',
model:'',
frequency:'',//
remake:'',//
}
};
},methods:{
},
onLoad(e) {
this.pId = e.plan_id;
this.CyInfo = JSON.parse(decodeURIComponent(e.planInfo));
this.getInfo()
},
methods:{
getInfo(){
cyCheckDetail({plan_id:this.pId}).then(res=>{
this.info=res
console.log("详情",res)
})
},
bindline: function(e) {
console.log('picker发送选择改变,携带值为', e.target.value)
this.lineIndex = e.target.value

2
pages/user/index.scss

@ -2,7 +2,7 @@
@include wh(750upx,auto);
padding-top: 30upx;
padding-bottom: 30upx;
background: #008EBC;
background: #007aff;
.user-info{
@include flex(center,flex-start);

8
pages/user/user.vue

@ -32,7 +32,6 @@
},
onLoad() {
this.getRz()
},
data() {
return {
@ -41,13 +40,6 @@
};
},methods:{
...mapMutations(['setToken', 'setUserInfo']),
smrz(){
this.ifJump=1
console.log("ss",this.ifJump)
this.getRz()
},
editPsd(){
uni.navigateTo({
url: '../editePsd/editePsd',

BIN
static/dsh.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
static/shouye-g.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
static/shouye.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
static/wode-g.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
static/wode.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
static/ysh.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Loading…
Cancel
Save