From 4664957895ec4c6ac5ef8a881b87c4ecf3543590 Mon Sep 17 00:00:00 2001
From: "865118801@qq.com" <865118801@qq.com>
Date: Tue, 17 Aug 2021 21:58:50 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/rawMaterialInfo/rawMaterialInfo.vue | 69 +++++++++++++++--------
pages/tcqInfo/index.scss | 10 ++--
pages/tcqInfo/tcqInfo.vue | 63 +++++++++++----------
3 files changed, 85 insertions(+), 57 deletions(-)
diff --git a/pages/rawMaterialInfo/rawMaterialInfo.vue b/pages/rawMaterialInfo/rawMaterialInfo.vue
index 0009e2a..105d64e 100644
--- a/pages/rawMaterialInfo/rawMaterialInfo.vue
+++ b/pages/rawMaterialInfo/rawMaterialInfo.vue
@@ -64,7 +64,7 @@
抽样标准:
- 点击查看
+
{{item.standard}}
@@ -111,7 +111,8 @@
placeholder="请输入抽检结果">
-
+
@@ -127,10 +128,10 @@
export default {
data() {
return {
- info:{},
+ info: {},
itemList: [],
result: ["合格", "不合格"],
- resltIds:0,
+ resltIds: 0,
detectionMode: ["全检", "抽检"],
detectionModeIndex: 0,
determine: ["合格", "不合格"],
@@ -144,6 +145,7 @@
check_status: 0,
jyxItem: {},
buttonState: true,
+ standard: {},
froms: {
result: 1,
purchase_id: '', //采购数据ID
@@ -172,15 +174,14 @@
this.type = this.CyInfo.examine_status
this.check_status = this.CyInfo.m_id
this.getitem()
- if (this.check_status) {
- this.getInfo()
- }
+
console.log('检验项', this.jyxItem)
},
methods: {
getitem() {
materialItem().then(res => {
this.itemList = res.item;
+ this.standard = res.standard;
for (let b in res.item) {
this.item.push({
check_item: res.item[b],
@@ -193,20 +194,42 @@
})
}
+ if (this.check_status) {
+ this.getInfo()
+ }
+
})
},
getInfo() {
rawFormDetail({
purchase_id: this.CyInfo.id
}).then(res => {
- this.info=res
- this.item=this.info.item;
- this.froms.dimensional_inspection=this.info.dimensional_inspection
- this.froms.order_no=this.info.data.order_no
- this.froms.arrival_quantity=this.info.data.arrival_quantity
- this.froms.number_of_inspections=this.info.data.number_of_inspections
- this.resltIds=this.info.data.result-1
- console.log("原材料检验详情",res)
+ this.info = res
+ this.item = this.info.item.map(item => {
+ for (let b in this.standard) {
+ if (b == item.check_item) {
+ item.standard = this.standard[b];
+
+ break;
+ }
+ }
+ for (let b in this.itemList) {
+ if (b == item.check_item) {
+ item.check_item = this.itemList[b];
+ break;
+ }
+ }
+
+
+
+ return item;
+ })
+ this.froms.dimensional_inspection = this.info.dimensional_inspection
+ this.froms.order_no = this.info.data.order_no
+ this.froms.arrival_quantity = this.info.data.arrival_quantity
+ this.froms.number_of_inspections = this.info.data.number_of_inspections
+ this.resltIds = this.info.data.result - 1
+ console.log("原材料检验详情", res)
})
},
bindDetectionMode: function(e) {
@@ -234,14 +257,14 @@
this.froms.purchase_id = this.CyInfo.id;
this.froms.check_type = this.detectionModeIndex + 1
this.froms.item = this.item;
- this.froms.result=this.resltIds+1;
+ this.froms.result = this.resltIds + 1;
this.item.map(item => {
delete item.check;
delete item.standard
})
-
- let params=JSON.parse(JSON.stringify(this.froms));
+
+ let params = JSON.parse(JSON.stringify(this.froms));
params.item = params.item.map(item => {
@@ -255,17 +278,17 @@
return item;
})
- this.buttonState=false
- this.$functions.confirm("是否进行此操作?").then(()=>{
+ this.buttonState = false
+ this.$functions.confirm("是否进行此操作?").then(() => {
materialCheckForm(params).then(res => {
this.$functions.success("提交成功").then(() => {
- uni.navigateBack().catch(res=>{
- this.buttonState=true
+ uni.navigateBack().catch(res => {
+ this.buttonState = true
})
})
})
})
-
+
}
}
}
diff --git a/pages/tcqInfo/index.scss b/pages/tcqInfo/index.scss
index 97bf626..1212917 100644
--- a/pages/tcqInfo/index.scss
+++ b/pages/tcqInfo/index.scss
@@ -434,16 +434,16 @@
.tx-ul{
width: 710upx;
- @include flex(center,space-bteween);
+ @include flex(center,space-between);
.tx-title{
- width: 500upx;
+ width: 200upx;
@include fonts(24upx,#666,400);
}
.tx-in-nav{
- width: 200upx;
- @include flex(center,space-bteween);
+ width:500upx;
+ @include flex(center,space-between);
input{
- width: 100upx;
+ //width: 200upx;
padding: 20upx;
border: 1upx solid #F1F1F1;
font-size: 24upx;
diff --git a/pages/tcqInfo/tcqInfo.vue b/pages/tcqInfo/tcqInfo.vue
index 1365d21..f3d504e 100644
--- a/pages/tcqInfo/tcqInfo.vue
+++ b/pages/tcqInfo/tcqInfo.vue
@@ -41,7 +41,7 @@
检测员:
{{ info ? info.name : '' }}
-
-
+