Commit 60dacb91 authored by 沈翠玲's avatar 沈翠玲

检验单提交

parent ed1cc44c
<template>
<div class="inputp">
<div class="inputs">
<div class="inputs" :class="{'disabled': disabled}">
<u-icon name="search" size="35" class='searchimg' @click='search'/>
<input type="text" v-model="value" :placeholder="placeholder" confirm-type="search"
<input type="text" v-model="value" :placeholder="placeholder" confirm-type="search" :disabled="disabled"
inputmode="search" ref='searchinput' :focus='isfocus' class='scaninput' @input='search'>
<u-icon name="scan" size="35" class="scanimg" @click='clickscan'/>
</div>
......@@ -15,6 +15,7 @@ export default {
props: {
hasscanbtn: Boolean,
isfocus: Boolean,
disabled: Boolean,
hasgosearch: Boolean,
types: Number,
placeholder: {
......@@ -41,6 +42,7 @@ export default {
// }
},
search() {
if(this.search) return
var me = this;
if (me.value === '') {
uni.showToast({
......@@ -52,6 +54,7 @@ export default {
me.$emit('serach', me.value)
},
clickscan() {
if(this.search) return
var me = this;
if (me.hasscanbtn) {
uni.navigateTo({
......@@ -91,6 +94,8 @@ export default {
background: #F2F2F2;
border-radius: 20upx;
position: relative;
&.disabled {
background-color: #f5f7fa; cursor: not-allowed; }
.scaninput {
padding: 20upx 80upx 20upx 80upx;
......
......@@ -4,17 +4,17 @@
<u-row>
<u-col span="4">
<u-form-item label="工单编码">
<SearchInput v-model="qcForm.workorderCode" placeholder="请输入工单编码" hassearchbtn="true" @serach="searchTask" />
<SearchInput v-model="qcForm.workorderCode" :disabled="btnType !== ''" placeholder="请输入工单编码" hassearchbtn="true" @serach="searchTask" />
</u-form-item>
</u-col>
<u-col span="4">
<u-form-item label="编排编码">
<SearchInput v-model="qcForm.arrangeCode" placeholder="请输入编排编码" hassearchbtn="true" @serach="searWorkorder" />
<SearchInput v-model="qcForm.arrangeCode" :disabled="btnType !== ''" placeholder="请输入编排编码" hassearchbtn="true" @serach="searWorkorder" />
</u-form-item>
</u-col>
<u-col span="4">
<u-form-item label="工序名称">
<uni-data-select v-model="qcForm.processId" :localdata="processList" @change="changeprocess"></uni-data-select>
<uni-data-select v-model="qcForm.processId" :disabled="btnType !== ''" :localdata="processList" @change="changeprocess"></uni-data-select>
</u-form-item>
</u-col>
<u-col span="4">
......@@ -149,10 +149,13 @@
visable(){
this.$emit('update:visible', this.visable)
},
currentItem: {
handler(){
if(this.btnType && this.currentItem) {
this.qcForm = Object.assign({}, this.currentItem);
this.qcLines = []
this.getTemplateLineList()
if(this.currentItem.workorderCode) this.searchTask(this.currentItem.workorderCode)
if(this.currentItem.arrangeCode) this.searWorkorder(this.currentItem.arrangeCode)
}
......@@ -169,6 +172,40 @@
}
},
methods: {
getTemplateLineList() {
this.$u.api
.getIpqcLineList({
ipqcId: this.qcForm.ipqcId
})
.then((res) => {
if (res.code === 200) {
this.qcLines = res.rows.map((item) => {
let selectValues = item.selectValues;
let qualityCheckResults = item.qualityCheckResults;
if (item.inputType == 2) {
// selectValues = selectValues? JSON.parse(item.selectValues) : []
if (selectValues) {
const data = JSON.parse(item.selectValues);
selectValues = data.map((item) => {
return {
text: item.name,
value: item.name
};
});
} else {
selectValues = [];
}
qualityCheckResults = qualityCheckResults ? JSON.parse(item.qualityCheckResults) : [];
}
return {
...item,
selectValues,
qualityCheckResults
};
});
}
});
},
handleSubmitZj(params){
Object.keys(params).forEach(item => {
this.$set(this.qcAddList[this.qcAddIndex], item, params[item])
......@@ -288,6 +325,7 @@
<style>
.line-content-item {
width: 100%;
padding: 0 10px;
height: 300px;
display: flex;
flex-wrap: nowrap;
......@@ -296,12 +334,12 @@
display: inline-block;
}
.addForm {
padding: 0 10px;
padding: 0 40rpx;
}
.btnbox {
// display:flex;
margin-bottom: 20rpx;
padding-left: 20rpx;
margin-bottom: 40rpx;
padding-left: 40rpx;
.u-btn {
width: 150rpx;
}
......
......@@ -750,6 +750,7 @@ export default {
} else {
this.qcModalFlag = true;
}
this.showIpqcConfirmButton = true
if (this.curQcType === 'FIRST') {
this.setDefaultQcForm();
}
......@@ -808,7 +809,9 @@ export default {
this.qcForm.inspectorNickName = this.qcForm.inspectorNickName? this.qcForm.inspectorNickName: this.vuex_user.nickName;
}
this.showIpqcConfirmButton = flag === false ? false : true;
if(this.curQcType === 'FINAL') {
this.getTemplateLineList();
}
},
qcLineItemClick(item) {
this.qcLineItem = item;
......@@ -905,8 +908,8 @@ export default {
.btnbox {
// display:flex;
margin-bottom: 20rpx;
padding-left: 20rpx;
margin-bottom: 40rpx;
padding-left: 40rpx;
.u-btn {
width: 150rpx;
}
......@@ -949,6 +952,7 @@ export default {
.line-content-item {
width: 100%;
padding: 0 10px;
height: 300px;
display: flex;
flex-wrap: nowrap;
......@@ -983,6 +987,6 @@ export default {
display: block;
}
.addForm {
padding: 0 10px;
padding: 0 20px;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment