Browse Source

提交

master
865118801@qq.com 4 years ago
parent
commit
7b61c4e27f
  1. 39
      api/user.js
  2. 27
      pages/rawMaterial/rawMaterial.vue
  3. 25
      pages/rawMaterialInfo/index.scss
  4. 341
      pages/rawMaterialInfo/rawMaterialInfo.vue
  5. 1
      pages/stopLine/stopLine.vue

39
api/user.js

@ -301,4 +301,43 @@ export function mode(data) {
method: "get",
data
});
}
/**
* 原材料列表
* @param {Object} data
*/
export function purchaseLists(data) {
console.log(data)
return request({
url: `${functions.getDomain()}/api/purchase-lists`,
method: "get",
data
});
}
/**
* 原材料检验项目
* @param {Object} data
*/
export function materialItem(data) {
console.log(data)
return request({
url: `${functions.getDomain()}/api/material-item`,
method: "get",
data
});
}
/**
* 获取字典的配置详情查看字典
* @param {Object} data
*/
export function dictionary(data) {
console.log(data)
return request({
url: `${functions.getDomain()}/api/dictionary`,
method: "get",
data
});
}

27
pages/rawMaterial/rawMaterial.vue

@ -1,10 +1,10 @@
<template>
<view>
<view class="card" v-for="(item,index) in 10" :key="index" @tap="rawMaterialInfo()">
<view class="card" v-for="(item,index) in list" :key="index" @tap="rawMaterialInfo(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.title}}</text>
</view>
<view class="card-right">
<image src="../../static/search.png"></image>
@ -12,10 +12,10 @@
</view>
<view class="card-dow-list">
<view class="card-up-list-list">
<view>规格:</view><text>16*16*12</text>
<view>规格:</view><text>{{item.spec}}</text>
</view>
<view class="card-up-list-list">
<view>数量:</view><text>16*16*12</text>
<view>数量:</view><text>{{item.math}}</text>
</view>
</view>
</view>
@ -24,15 +24,26 @@
</template>
<script>
import {purchaseLists} from "../../api/user.js"
export default {
data() {
return {
list:[]
};
},methods:{
rawMaterialInfo(){
},
onLoad() {
this.bidData()
},
methods:{
bidData(){
purchaseLists().then(res=>{
this.list=res
console.log("列表数据",this.list)
})
},
rawMaterialInfo(item){
uni.navigateTo({
url: '../rawMaterialInfo/rawMaterialInfo',
url: `../rawMaterialInfo/rawMaterialInfo?planInfo=${encodeURIComponent(JSON.stringify(item))}`,
success: res => {},
fail: () => {},
complete: () => {}

25
pages/rawMaterialInfo/index.scss

@ -6,17 +6,23 @@
.contet-up-card{
@include wh(750upx,auto);
background: white;
padding-top: 30upx;
padding-top: 20upx;
padding-bottom: 30upx;
.contet-up-card-cont{
@include wh(710upx,auto);
margin: auto;
@include flex(flex-start,flex-start);
//@include flex(flex-start,flex-start);
flex-wrap: wrap;
margin-top: 24upx;
.contet-up-card-cont-list{
@include flex(flex-start,flex-start);
@include wh(355upx,auto);
margin-top: 24upx;
@include flex(center,flex-start);
// /@include wh(355upx,auto);
input{
font-size: 24upx;
border: 1upx solid #F1F1F1;
padding: 10upx;
}
view{
@include fonts(26upx,#333,500);
@ -52,10 +58,15 @@
@include flex(center,flex-start);
margin-top: 24upx;
.testing-list-title{
width: 140upx;
width: 240upx;
@include fonts(28upx,#333,400);
margin-left: 30upx;
}
input{
font-size: 24upx;
border: 1upx solid #F1F1F1;
padding: 10upx;
}
text{
@include fonts(28upx,#999,400);
}
@ -84,7 +95,7 @@
margin-top: 30upx;
border-radius: 5upx;
.contet-up-card-cont-list{
@include flex(flex-start,flex-start);
@include flex(center,flex-start);
@include wh(355upx,auto);
margin-left: 30upx;
margin-top: 30upx;

341
pages/rawMaterialInfo/rawMaterialInfo.vue

@ -4,15 +4,15 @@
<view class="contet-up-card-cont">
<view class="contet-up-card-cont-list">
<view>产品名称:</view>
<text>产品名称产品名称</text>
<text>{{CyInfo.title}}</text>
</view>
<view class="contet-up-card-cont-list">
<view>检测日期:</view>
<text>2020-07-13</text>
<text>{{CyInfo.create_time}}</text>
</view>
<view class="contet-up-card-cont-list">
<view>规格型号:</view>
<text>NH-HJ-001</text>
<text>{{CyInfo.spec}}</text>
</view>
<picker @change="bindDetectionMode" :value="detectionModeIndex" :range="detectionMode">
<view class="contet-up-card-cont-list">
@ -25,287 +25,96 @@
</picker>
<view class="contet-up-card-cont-list">
<view>供应商:</view>
<text>NH-HJ-001</text>
<text>{{CyInfo.supplier}}</text>
</view>
<view class="contet-up-card-cont-list">
<view>送货单号:</view>
<text>NH-HJ-0014524</text>
<input type="number" v-model="froms.order_no" />
</view>
<view class="contet-up-card-cont-list">
<view>到货数量:</view>
<text>2500</text>
<input type="number" v-model="froms.arrival_quantity" />
</view>
<view class="contet-up-card-cont-list">
<view>检测数量:</view>
<text>111</text>
<input v-model="froms.number_of_inspections" type="number" />
</view>
</view>
</view>
<view class="testing">
<view>
<view class="card">
<view class="testing-list">
<view class="testing-list-title">检测项:</view>
<text>外观</text>
</view>
<view class="testing-list">
<view class="testing-list-title">检测工具:</view>
<text>目视</text>
</view>
<view class="testing-list">
<view class="testing-list-title">抽样标准:</view>
<text class="check-btn" @tap="checkBtn(0)">点击查看</text>
</view>
<view class="cybz-card" v-if="sendId==0">
抽检/抽样依据特殊检验水平S-4AQL=0.4尺寸n=3,Ac=0,Re=1
</view>
<view class="testing-list">
<view class="testing-list-title">检测数量:</view>
<view>
<uni-number-box></uni-number-box>
</view>
</view>
<picker @change="bindDetermine" :value="determineIndex" :range="determine">
<view class="contet-up-card-cont-list">
<view style="width: 140upx;">判定:</view>
<view class="jcfs-div">
{{determine[determineIndex]}}
<image src="../../static/xiala.png"></image>
</view>
</view>
</picker>
<view class="testing-list" style="align-items: flex-start;">
<view class="testing-list-title">{{detectionMode[detectionModeIndex]}}结果:</view>
<textarea style="height: 100upx;border: 1upx solid #F1F1F1;width: 400upx;font-size: 26upx;padding-top: 10upx;padding-left: 10upx;" placeholder="请输入抽检结果"></textarea>
</view>
<view class="contet-up-card" style="margin-top: 20upx;">
<view class="contet-up-card-cont">
<view class="contet-up-card-cont-list">
<view>尺寸检测数据:</view>
<input v-model="froms.number_of_inspections" type="number" />
</view>
</view>
<view>
<view class="card">
<view class="testing-list">
<view class="testing-list-title">检测项:</view>
<text>外包装数量</text>
</view>
<view class="testing-list">
<view class="testing-list-title">检测工具:</view>
<text>目视秤重</text>
</view>
<view class="testing-list">
<view class="testing-list-title">抽样标准:</view>
<text class="check-btn" @tap="checkBtn(1)">点击查看</text>
</view>
<view class="cybz-card" v-if="sendId==1">
抽检/抽样依据特殊检验水平S-4AQL=0.4尺寸n=3,Ac=0,Re=2
</view>
<view class="testing-list">
<view class="testing-list-title">检测数量:</view>
<view>
<uni-number-box></uni-number-box>
</view>
</view>
<picker @change="bindDetermine" :value="determineIndex" :range="determine">
<view class="contet-up-card-cont-list">
<view style="width: 140upx;">判定:</view>
<view class="jcfs-div">
{{determine[determineIndex]}}
<image src="../../static/xiala.png"></image>
</view>
</view>
</picker>
<view class="testing-list" style="align-items: flex-start;">
<view class="testing-list-title">{{detectionMode[detectionModeIndex]}}结果:</view>
<textarea style="height: 100upx;border: 1upx solid #F1F1F1;width: 400upx;font-size: 26upx;padding-top: 10upx;padding-left: 10upx;" placeholder="请输入抽检结果"></textarea>
</view>
<view class="contet-up-card-cont-list">
<view>尺寸检测数据:</view>
<input v-model="froms.number_of_inspections" type="number" />
</view>
</view>
<view>
<view class="card">
<view class="testing-list">
<view class="testing-list-title">检测项:</view>
<text>标识</text>
</view>
<view class="testing-list">
<view class="testing-list-title">检测工具:</view>
<text>目视</text>
</view>
<view class="testing-list">
<view class="testing-list-title">抽样标准:</view>
<text class="check-btn" @tap="checkBtn(1)">点击查看</text>
</view>
<view class="cybz-card" v-if="sendId==1">
抽检/抽样依据特殊检验水平S-4AQL=0.4尺寸n=3,Ac=0,Re=3
</view>
<view class="testing-list">
<view class="testing-list-title">检测数量:</view>
<view>
<uni-number-box></uni-number-box>
</view>
</view>
<picker @change="bindDetermine" :value="determineIndex" :range="determine">
<view class="contet-up-card-cont-list">
<view style="width: 140upx;">判定:</view>
<view class="jcfs-div">
{{determine[determineIndex]}}
<image src="../../static/xiala.png"></image>
</view>
</view>
</picker>
<view class="testing-list" style="align-items: flex-start;">
<view class="testing-list-title">{{detectionMode[detectionModeIndex]}}结果:</view>
<textarea style="height: 100upx;border: 1upx solid #F1F1F1;width: 400upx;font-size: 26upx;padding-top: 10upx;padding-left: 10upx;" placeholder="请输入抽检结果"></textarea>
</view>
<view class="contet-up-card-cont-list">
<view>尺寸检测数据:</view>
<input v-model="froms.number_of_inspections" type="number" />
</view>
</view>
<view>
<view class="card">
<view class="testing-list">
<view class="testing-list-title">检测项:</view>
<text>油污测试</text>
</view>
<view class="testing-list">
<view class="testing-list-title">检测工具:</view>
<text>目视/吸油纸</text>
</view>
<view class="testing-list">
<view class="testing-list-title">抽样标准:</view>
<text class="check-btn" @tap="checkBtn(1)">点击查看</text>
</view>
<view class="cybz-card" v-if="sendId==1">
n=1/Ac=0/Re=1
</view>
<view class="testing-list">
<view class="testing-list-title">检测数量:</view>
<view>
<uni-number-box></uni-number-box>
</view>
</view>
<picker @change="bindDetermine" :value="determineIndex" :range="determine">
<view class="contet-up-card-cont-list">
<view style="width: 140upx;">判定:</view>
<view class="jcfs-div">
{{determine[determineIndex]}}
<image src="../../static/xiala.png"></image>
</view>
</view>
</picker>
<view class="testing-list" style="align-items: flex-start;">
<view class="testing-list-title">{{detectionMode[detectionModeIndex]}}结果:</view>
<textarea style="height: 100upx;border: 1upx solid #F1F1F1;width: 400upx;font-size: 26upx;padding-top: 10upx;padding-left: 10upx;" placeholder="请输入抽检结果"></textarea>
</view>
<view class="contet-up-card-cont-list">
<view>尺寸检测数据:</view>
<input v-model="froms.number_of_inspections" type="number" />
</view>
</view>
<view>
<view class="card">
<view class="testing-list">
<view class="testing-list-title">检测项:</view>
<text>毛刺</text>
</view>
<view class="testing-list">
<view class="testing-list-title">检测工具:</view>
<text>塞尺/卡尺</text>
</view>
<view class="testing-list">
<view class="testing-list-title">抽样标准:</view>
<text class="check-btn" @tap="checkBtn(1)">点击查看</text>
</view>
<view class="cybz-card" v-if="sendId==1">
依检验规范
</view>
<view class="testing-list">
<view class="testing-list-title">检测数量:</view>
<view>
<uni-number-box></uni-number-box>
</view>
</view>
<picker @change="bindDetermine" :value="determineIndex" :range="determine">
<view class="contet-up-card-cont-list">
<view style="width: 140upx;">判定:</view>
<view class="jcfs-div">
{{determine[determineIndex]}}
<image src="../../static/xiala.png"></image>
</view>
</view>
</picker>
<view class="testing-list" style="align-items: flex-start;">
<view class="testing-list-title">{{detectionMode[detectionModeIndex]}}结果:</view>
<textarea style="height: 100upx;border: 1upx solid #F1F1F1;width: 400upx;font-size: 26upx;padding-top: 10upx;padding-left: 10upx;" placeholder="请输入抽检结果"></textarea>
</view>
<view class="contet-up-card-cont-list">
<view>尺寸检测数据:</view>
<input v-model="froms.number_of_inspections" type="number" />
</view>
</view>
<view>
<view class="card">
<view class="testing-list">
<view class="testing-list-title">检测项:</view>
<text>ROHS测试</text>
</view>
<view class="testing-list">
<view class="testing-list-title">检测工具:</view>
<text>EXD1800</text>
</view>
<view class="testing-list">
<view class="testing-list-title">抽样标准:</view>
<text class="check-btn" @tap="checkBtn(1)">点击查看</text>
</view>
<view class="cybz-card" v-if="sendId==1">
n=2 Ac=0 Re=1
</view>
<view class="testing-list">
<view class="testing-list-title">检测数量:</view>
<view>
<uni-number-box></uni-number-box>
</view>
</view>
<picker @change="bindDetermine" :value="determineIndex" :range="determine">
<view class="contet-up-card-cont-list">
<view style="width: 140upx;">判定:</view>
<view class="jcfs-div">
{{determine[determineIndex]}}
<image src="../../static/xiala.png"></image>
</view>
</view>
</picker>
<view class="testing-list" style="align-items: flex-start;">
<view class="testing-list-title">{{detectionMode[detectionModeIndex]}}结果:</view>
<textarea style="height: 100upx;border: 1upx solid #F1F1F1;width: 400upx;font-size: 26upx;padding-top: 10upx;padding-left: 10upx;" placeholder="请输入抽检结果"></textarea>
</view>
<view class="contet-up-card-cont-list">
<view>尺寸检测数据:</view>
<input v-model="froms.number_of_inspections" type="number" />
</view>
<view class="contet-up-card-cont-list">
</view>
</view>
<view>
</view>
<view class="testing">
<view v-for="(item,index) in materialItemList" :key="index">
<view class="card">
<view class="testing-list">
<view class="testing-list-title">检测项:</view>
<text>盐雾测试</text>
<text>{{item.title}}</text>
</view>
<view class="testing-list">
<view class="testing-list-title">检测工具:</view>
<text>LX-60A</text>
<input v-model="item.tool" />
</view>
<view class="testing-list">
<view class="testing-list-title">抽样标准:</view>
<text class="check-btn" @tap="checkBtn(1)">点击查看</text>
<text class="check-btn" @tap="checkBtn(index)">点击查看</text>
</view>
<view class="cybz-card" v-if="sendId==1">
n=2 Ac=0 Re=1
<view class="cybz-card" v-if="item.check==true">
{{item.standard}}
</view>
<view class="testing-list">
<view class="testing-list-title">检测数量:</view>
<view>
<uni-number-box></uni-number-box>
<input type="number" v-model="item.num" />
</view>
</view>
<picker @change="bindDetermine" :value="determineIndex" :range="determine">
<picker @change="bindDetermine($event,index)" :value="item.status" :range="determine">
<view class="contet-up-card-cont-list">
<view style="width: 140upx;">判定:</view>
<view style="width: 240upx;">判定:</view>
<view class="jcfs-div">
{{determine[determineIndex]}}
{{determine[item.status]}}
<image src="../../static/xiala.png"></image>
</view>
</view>
</picker>
<view class="testing-list" style="align-items: flex-start;">
<view class="testing-list-title">{{detectionMode[detectionModeIndex]}}结果:</view>
<textarea style="height: 100upx;border: 1upx solid #F1F1F1;width: 400upx;font-size: 26upx;padding-top: 10upx;padding-left: 10upx;" placeholder="请输入抽检结果"></textarea>
<textarea v-model="item.check_result" style="height: 100upx;border: 1upx solid #F1F1F1;width: 400upx;font-size: 26upx;padding-top: 10upx;padding-left: 10upx;" placeholder="请输入抽检结果"></textarea>
</view>
</view>
<view class="testing-list" style="align-items: flex-start;">
<view class="testing-list-title">检验不合格描述:</view>
<textarea v-model="froms.result_describe" style="height: 100upx;border: 1upx solid #F1F1F1;width: 400upx;font-size: 26upx;padding-top: 10upx;padding-left: 10upx;" placeholder="请输入抽检结果"></textarea>
</view>
</view>
<view class="submit-btn">
@ -316,6 +125,7 @@
</template>
<script>
import {materialItem,dictionary} from "../../api/user.js"
export default {
data() {
return {
@ -325,20 +135,59 @@
determineIndex:0,
ifCheck:false,
sendId:-1,
CyInfo:{},
materialItemList:[],//
crrentIds:0,
froms:{
purchase_id:'',//ID
name:'',//
rule:'',//
check_type:0,//1=2=
supplier:'',//
order_no:'',//
materialItemList:[],
arrival_quantity:0,//
number_of_inspections:0,//
result_describe:'',//
dimensional_inspection:[],//
}
};
},methods:{
},
onLoad(e) {
this.CyInfo = JSON.parse(decodeURIComponent(e.planInfo));
this.getMaterialItemList()
},
methods:{
getMaterialItemList(){
materialItem().then(res=>{
for(let b in res.item){
this.materialItemList.push({
title:res.item[b],
standard:res.standard[b],
num:0,
status:0,
check_result:'',
tool:'',
check:false
})
}
})
},
bindDetectionMode: function(e) {
console.log('picker发送选择改变,携带值为', e.target.value)
this.detectionModeIndex = e.target.value
this.detectionModeIndex = e.target.value;
this.froms.check_type=this.detectionModeIndex+1
},
bindDetermine: function(e) {
bindDetermine: function(e,index) {
console.log('picker发送选择改变,携带值为', e.target.value)
this.determineIndex = e.target.value
this.determineIndex = e.target.value;
this.materialItemList[index].status=e.target.value
},
checkBtn(index){
this.ifCheck==false?this.ifCheck=true:this.ifCheck=false
this.sendId=index
this.materialItemList[index].check==false?this.materialItemList[index].check=true:this.materialItemList[index].check=false;
//this.sendId=index
}
}

1
pages/stopLine/stopLine.vue

@ -229,6 +229,7 @@
},
stopLine(){
stopRecord(this.froms).then(res=>{
uni.navigateBack({
delta: -1
});

Loading…
Cancel
Save