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

检验单提交

parent ed1cc44c
<template> <template>
<div class="inputp"> <div class="inputp">
<div class="inputs"> <div class="inputs" :class="{'disabled': disabled}">
<u-icon name="search" size="35" class='searchimg' @click='search'/> <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'> inputmode="search" ref='searchinput' :focus='isfocus' class='scaninput' @input='search'>
<u-icon name="scan" size="35" class="scanimg" @click='clickscan'/> <u-icon name="scan" size="35" class="scanimg" @click='clickscan'/>
</div> </div>
...@@ -15,6 +15,7 @@ export default { ...@@ -15,6 +15,7 @@ export default {
props: { props: {
hasscanbtn: Boolean, hasscanbtn: Boolean,
isfocus: Boolean, isfocus: Boolean,
disabled: Boolean,
hasgosearch: Boolean, hasgosearch: Boolean,
types: Number, types: Number,
placeholder: { placeholder: {
...@@ -41,6 +42,7 @@ export default { ...@@ -41,6 +42,7 @@ export default {
// } // }
}, },
search() { search() {
if(this.search) return
var me = this; var me = this;
if (me.value === '') { if (me.value === '') {
uni.showToast({ uni.showToast({
...@@ -52,6 +54,7 @@ export default { ...@@ -52,6 +54,7 @@ export default {
me.$emit('serach', me.value) me.$emit('serach', me.value)
}, },
clickscan() { clickscan() {
if(this.search) return
var me = this; var me = this;
if (me.hasscanbtn) { if (me.hasscanbtn) {
uni.navigateTo({ uni.navigateTo({
...@@ -91,6 +94,8 @@ export default { ...@@ -91,6 +94,8 @@ export default {
background: #F2F2F2; background: #F2F2F2;
border-radius: 20upx; border-radius: 20upx;
position: relative; position: relative;
&.disabled {
background-color: #f5f7fa; cursor: not-allowed; }
.scaninput { .scaninput {
padding: 20upx 80upx 20upx 80upx; padding: 20upx 80upx 20upx 80upx;
......
...@@ -4,17 +4,17 @@ ...@@ -4,17 +4,17 @@
<u-row> <u-row>
<u-col span="4"> <u-col span="4">
<u-form-item label="工单编码"> <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-form-item>
</u-col> </u-col>
<u-col span="4"> <u-col span="4">
<u-form-item label="编排编码"> <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-form-item>
</u-col> </u-col>
<u-col span="4"> <u-col span="4">
<u-form-item label="工序名称"> <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-form-item>
</u-col> </u-col>
<u-col span="4"> <u-col span="4">
...@@ -149,10 +149,13 @@ ...@@ -149,10 +149,13 @@
visable(){ visable(){
this.$emit('update:visible', this.visable) this.$emit('update:visible', this.visable)
}, },
currentItem: { currentItem: {
handler(){ handler(){
if(this.btnType && this.currentItem) { if(this.btnType && this.currentItem) {
this.qcForm = Object.assign({}, this.currentItem); this.qcForm = Object.assign({}, this.currentItem);
this.qcLines = []
this.getTemplateLineList()
if(this.currentItem.workorderCode) this.searchTask(this.currentItem.workorderCode) if(this.currentItem.workorderCode) this.searchTask(this.currentItem.workorderCode)
if(this.currentItem.arrangeCode) this.searWorkorder(this.currentItem.arrangeCode) if(this.currentItem.arrangeCode) this.searWorkorder(this.currentItem.arrangeCode)
} }
...@@ -169,6 +172,40 @@ ...@@ -169,6 +172,40 @@
} }
}, },
methods: { 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){ handleSubmitZj(params){
Object.keys(params).forEach(item => { Object.keys(params).forEach(item => {
this.$set(this.qcAddList[this.qcAddIndex], item, params[item]) this.$set(this.qcAddList[this.qcAddIndex], item, params[item])
...@@ -288,6 +325,7 @@ ...@@ -288,6 +325,7 @@
<style> <style>
.line-content-item { .line-content-item {
width: 100%; width: 100%;
padding: 0 10px;
height: 300px; height: 300px;
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
...@@ -296,12 +334,12 @@ ...@@ -296,12 +334,12 @@
display: inline-block; display: inline-block;
} }
.addForm { .addForm {
padding: 0 10px; padding: 0 40rpx;
} }
.btnbox { .btnbox {
// display:flex; // display:flex;
margin-bottom: 20rpx; margin-bottom: 40rpx;
padding-left: 20rpx; padding-left: 40rpx;
.u-btn { .u-btn {
width: 150rpx; width: 150rpx;
} }
......
...@@ -750,6 +750,7 @@ export default { ...@@ -750,6 +750,7 @@ export default {
} else { } else {
this.qcModalFlag = true; this.qcModalFlag = true;
} }
this.showIpqcConfirmButton = true
if (this.curQcType === 'FIRST') { if (this.curQcType === 'FIRST') {
this.setDefaultQcForm(); this.setDefaultQcForm();
} }
...@@ -808,7 +809,9 @@ export default { ...@@ -808,7 +809,9 @@ export default {
this.qcForm.inspectorNickName = this.qcForm.inspectorNickName? this.qcForm.inspectorNickName: this.vuex_user.nickName; this.qcForm.inspectorNickName = this.qcForm.inspectorNickName? this.qcForm.inspectorNickName: this.vuex_user.nickName;
} }
this.showIpqcConfirmButton = flag === false ? false : true; this.showIpqcConfirmButton = flag === false ? false : true;
if(this.curQcType === 'FINAL') {
this.getTemplateLineList(); this.getTemplateLineList();
}
}, },
qcLineItemClick(item) { qcLineItemClick(item) {
this.qcLineItem = item; this.qcLineItem = item;
...@@ -905,8 +908,8 @@ export default { ...@@ -905,8 +908,8 @@ export default {
.btnbox { .btnbox {
// display:flex; // display:flex;
margin-bottom: 20rpx; margin-bottom: 40rpx;
padding-left: 20rpx; padding-left: 40rpx;
.u-btn { .u-btn {
width: 150rpx; width: 150rpx;
} }
...@@ -949,6 +952,7 @@ export default { ...@@ -949,6 +952,7 @@ export default {
.line-content-item { .line-content-item {
width: 100%; width: 100%;
padding: 0 10px;
height: 300px; height: 300px;
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
...@@ -983,6 +987,6 @@ export default { ...@@ -983,6 +987,6 @@ export default {
display: block; display: block;
} }
.addForm { .addForm {
padding: 0 10px; padding: 0 20px;
} }
</style> </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