|
|
|
@ -51,21 +51,81 @@
|
|
|
|
|
<input v-model="froms.dimensional_inspection[0][key]" type="number" /> |
|
|
|
|
</view> |
|
|
|
|
</view> --> |
|
|
|
|
<view class="cc-card"> |
|
|
|
|
<view class="cc-card" v-for="(item,index) in froms.dimensional_inspection" :key="index"> |
|
|
|
|
<view class="pd-ul2"> |
|
|
|
|
<view class="pd-title">规格</view> |
|
|
|
|
<view class="pd-list"> |
|
|
|
|
<text>{{item.size}}</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="pd-title">最大值</view> |
|
|
|
|
<view class="pd-list"> |
|
|
|
|
<text>{{item.up}}</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="pd-title">最小值</view> |
|
|
|
|
<view class="pd-list"> |
|
|
|
|
<text>{{item.down}}</text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="cc-input-ul"> |
|
|
|
|
<view class="cc-input-list"> |
|
|
|
|
<view class="title">rule</view> |
|
|
|
|
<view class="cc-input"> |
|
|
|
|
<input type="number" /> |
|
|
|
|
<input type="number" @input="updateResult($event,index)" |
|
|
|
|
:class="item.rule!=''&&(item.rule>item.up||item.rule<item.down)?'borders':''" |
|
|
|
|
v-model="item.rule" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="cc-input-list"> |
|
|
|
|
<view class="title">no1</view> |
|
|
|
|
<view class="cc-input"> |
|
|
|
|
<input type="number" @input="updateResult($event,index)" |
|
|
|
|
:class="item.no1!=''&&(item.no1>item.up||item.no1<item.down)?'borders':''" |
|
|
|
|
v-model="item.no1" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="cc-input-list"> |
|
|
|
|
<view class="title">no2</view> |
|
|
|
|
<view class="cc-input"> |
|
|
|
|
<input type="number" @input="updateResult($event,index)" |
|
|
|
|
:class="item.no2!=''&&(item.no2>item.up||item.no2<item.down)?'borders':''" |
|
|
|
|
v-model="item.no2" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="cc-input-list"> |
|
|
|
|
<view class="title">no3</view> |
|
|
|
|
<view class="cc-input"> |
|
|
|
|
<input type="number" @input="updateResult($event,index)" |
|
|
|
|
:class="item.no3!=''&&(item.no3>item.up||item.no3<item.down)?'borders':''" |
|
|
|
|
v-model="item.no3" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="cc-input-list"> |
|
|
|
|
<view class="title">no4</view> |
|
|
|
|
<view class="cc-input"> |
|
|
|
|
<input type="number" @input="updateResult($event,index)" |
|
|
|
|
:class="item.no4!=''&&(item.no4>item.up||item.no4<item.down)?'borders':''" |
|
|
|
|
v-model="item.no4" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="cc-input-list"> |
|
|
|
|
<view class="title">no5</view> |
|
|
|
|
<view class="cc-input"> |
|
|
|
|
<input type="number" @input="updateResult($event,index)" |
|
|
|
|
:class="item.no5!=''&&(item.no5>item.up||item.no5<item.down)?'borders':''" |
|
|
|
|
v-model="item.no5" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="pd-ul"> |
|
|
|
|
<view class="pd-title">判定</view> |
|
|
|
|
<view class="pd-list"> |
|
|
|
|
<image src="../../static/xz.png"></image> |
|
|
|
|
<image :src="item.result=='OK'?'../../static/xz.png':'../../static/wxz.png'"></image> |
|
|
|
|
<text>OK</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="pd-list"> |
|
|
|
|
<image :src="item.result=='NG'?'../../static/xz.png':'../../static/wxz.png'"></image> |
|
|
|
|
<text>NG</text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -167,10 +227,10 @@
|
|
|
|
|
check_status: 0, |
|
|
|
|
jyxItem: {}, |
|
|
|
|
buttonState: true, |
|
|
|
|
jurisdiction:[], |
|
|
|
|
jurisdiction: [], |
|
|
|
|
standard: {}, |
|
|
|
|
tooList:[], |
|
|
|
|
power:[], |
|
|
|
|
tooList: [], |
|
|
|
|
power: [], |
|
|
|
|
froms: { |
|
|
|
|
result: 1, |
|
|
|
|
purchase_id: '', //采购数据ID |
|
|
|
@ -183,14 +243,7 @@
|
|
|
|
|
arrival_quantity: "", //到货数量 |
|
|
|
|
number_of_inspections: "", //检测数量 |
|
|
|
|
result_describe: '', //检验不合格描述 |
|
|
|
|
dimensional_inspection: [{ |
|
|
|
|
rule: "", |
|
|
|
|
no1: "", |
|
|
|
|
no2: "", |
|
|
|
|
no3: "", |
|
|
|
|
no4: "", |
|
|
|
|
no5: "" |
|
|
|
|
}], //尺寸 |
|
|
|
|
dimensional_inspection: [], //尺寸 |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
@ -211,7 +264,7 @@
|
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
getArr() { |
|
|
|
|
if(this.power.length>0){ |
|
|
|
|
if (this.power.length > 0) { |
|
|
|
|
let newArr = this.power.map(item => { |
|
|
|
|
if (item.children) { |
|
|
|
|
|
|
|
|
@ -230,10 +283,12 @@
|
|
|
|
|
return this.jurisdiction.includes(title); |
|
|
|
|
}, |
|
|
|
|
getitem() { |
|
|
|
|
materialItem({name:this.CyInfo.purchase_number}).then(res => { |
|
|
|
|
materialItem({ |
|
|
|
|
name: this.CyInfo.purchase_number |
|
|
|
|
}).then(res => { |
|
|
|
|
this.itemList = res.item; |
|
|
|
|
this.standard = res.standard; |
|
|
|
|
this.tooList=res.tool; |
|
|
|
|
this.tooList = res.tool; |
|
|
|
|
for (let b in res.item) { |
|
|
|
|
this.item.push({ |
|
|
|
|
check_item: res.item[b], |
|
|
|
@ -250,7 +305,35 @@
|
|
|
|
|
this.getInfo() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
res.size.map(item => { |
|
|
|
|
this.froms.dimensional_inspection.push({ |
|
|
|
|
rule: "", |
|
|
|
|
no1: "", |
|
|
|
|
no2: "", |
|
|
|
|
no3: "", |
|
|
|
|
no4: "", |
|
|
|
|
no5: "", |
|
|
|
|
size: item.size, |
|
|
|
|
up: item.up, |
|
|
|
|
down: item.down, |
|
|
|
|
result: 'NG' |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
updateResult(e, index) { |
|
|
|
|
let item = this.froms.dimensional_inspection[index]; |
|
|
|
|
if ((item.rule > item.up || item.rule < item.down) || (item.no1 > |
|
|
|
|
item.up || item.no1 < item.down) || (item.no2 > item.up || item.no2 < item |
|
|
|
|
.down) || (item.no3 > item.up || item.no3 < item |
|
|
|
|
.down) || (item.no4 > item.up || item.no4 < item |
|
|
|
|
.down) || (item.no5 > item.up || item.no5 < item |
|
|
|
|
.down)) { |
|
|
|
|
this.froms.dimensional_inspection[index].result = "NG"; |
|
|
|
|
} else { |
|
|
|
|
this.froms.dimensional_inspection[index].result = "OK"; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
getInfo() { |
|
|
|
|
rawFormDetail({ |
|
|
|
|