|
|
|
@ -66,7 +66,7 @@
|
|
|
|
|
<view class="testing-list-title">抽样标准:</view> |
|
|
|
|
<text class="check-btn" @tap="checkBtn(index)">点击查看</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="cybz-card" v-if="item.check==true"> |
|
|
|
|
<view class="cybz-card"> |
|
|
|
|
{{item.standard}} |
|
|
|
|
</view> |
|
|
|
|
<view class="testing-list"> |
|
|
|
@ -94,24 +94,24 @@
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
<picker @change="bindResult" :value="froms.result" :range="result"> |
|
|
|
|
<view class="testing-list" style="align-items: center;"> |
|
|
|
|
<picker @change="bindResult" :value="resltIds" :range="result"> |
|
|
|
|
<view class="testing-list" style="align-items: center;font-size: 26upx;margin-left: 50upx;"> |
|
|
|
|
<view>检验结果:</view> |
|
|
|
|
<view |
|
|
|
|
style="height: 50upx;border: 1upx solid #F1F1F1;width:200upx;font-size: 26upx;padding-top: 10upx;padding-left: 10upx;margin-left: 100upx;"> |
|
|
|
|
{{result[froms.result-1]}} |
|
|
|
|
{{result[resltIds]}} |
|
|
|
|
<image style="width: 33upx;height: 33upx;" src="../../static/xiala.png"></image> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</picker> |
|
|
|
|
<view class="testing-list" style="align-items: flex-start;"> |
|
|
|
|
<view class="testing-list" v-if="resltIds==1" 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 class="submit-btn"> |
|
|
|
|
<button type="primary" @tap="submit" :disabled="buttonState==false?true:false" v-if="type==2">提交</button> |
|
|
|
|
<button type="primary" @tap="submit" :disabled="buttonState==false?true:false" v-if="!check_status">提交</button> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -127,8 +127,10 @@
|
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
info:{}, |
|
|
|
|
itemList: [], |
|
|
|
|
result: ["合格", "不合格"], |
|
|
|
|
resltIds:0, |
|
|
|
|
detectionMode: ["全检", "抽检"], |
|
|
|
|
detectionModeIndex: 0, |
|
|
|
|
determine: ["合格", "不合格"], |
|
|
|
@ -168,9 +170,9 @@
|
|
|
|
|
onLoad(e) { |
|
|
|
|
this.CyInfo = JSON.parse(decodeURIComponent(e.planInfo)); |
|
|
|
|
this.type = this.CyInfo.examine_status |
|
|
|
|
this.check_status = this.CyInfo.check_status |
|
|
|
|
this.check_status = this.CyInfo.m_id |
|
|
|
|
this.getitem() |
|
|
|
|
if (this.check_status == 2) { |
|
|
|
|
if (this.check_status) { |
|
|
|
|
this.getInfo() |
|
|
|
|
} |
|
|
|
|
console.log('检验项', this.jyxItem) |
|
|
|
@ -183,7 +185,7 @@
|
|
|
|
|
this.item.push({ |
|
|
|
|
check_item: res.item[b], |
|
|
|
|
standard: res.standard[b], |
|
|
|
|
check_number: 0, |
|
|
|
|
check_number: '', |
|
|
|
|
status: 0, |
|
|
|
|
check_result: '', |
|
|
|
|
check_tool: '', |
|
|
|
@ -197,7 +199,14 @@
|
|
|
|
|
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) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
bindDetectionMode: function(e) { |
|
|
|
@ -210,7 +219,7 @@
|
|
|
|
|
this.item[index].status = e.target.value |
|
|
|
|
}, |
|
|
|
|
bindResult(e) { |
|
|
|
|
this.froms.result = e.target.value + 1 |
|
|
|
|
this.resltIds = e.target.value |
|
|
|
|
}, |
|
|
|
|
checkBtn(index) { |
|
|
|
|
this.item[index].check == false ? this.item[index].check = true : this |
|
|
|
@ -225,6 +234,7 @@
|
|
|
|
|
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.item.map(item => { |
|
|
|
|
delete item.check; |
|
|
|
|
delete item.standard |
|
|
|
|