修改质量检验测量值问题

master
lijing 8 months ago
parent 825d4e5ef3
commit 602d3b12c5

@ -142,7 +142,7 @@ export default class LoginPage extends BasePage {
// console.log('Version////', this.Version); // console.log('Version////', this.Version);
} }
///****************** ///******************
version = '0.0.135'; // version = '0.0.136'; //
//version = '0.0.14'; // //version = '0.0.14'; //
//*************** false true **************** //*************** false true ****************
//isTest = true; //isTest = true;

@ -168,10 +168,9 @@
</div> </div>
<div class="item1" style="color: #000; position: relative" v-show="!(selectList.value == 'checkTypeSC' || selectList.value == 'checkTypeSCXJ')"> <div class="item1" style="color: #000; position: relative" v-show="!(selectList.value == 'checkTypeSC' || selectList.value == 'checkTypeSCXJ')">
<div class="item1">抽样数量: {{ item.itemMethod }}</div> <div class="item1">抽样数量: {{ item.itemMethod }}</div>
<input :value="item.sampleQuality" style="border: 1px solid #ddd" @blur="changeInput($event, index)" /> <input :value="item.sampleQuality" type="number" v-if="selectList.value == 'checkTypeCP'" style="border: 1px solid #ddd" @input="changeInput1($event, index)" @blur="changeInput1($event, index)" />
<input :value="item.sampleQuality" type="number" v-if="selectList.value != 'checkTypeCP'" style="border: 1px solid #ddd" @blur="changeInput($event, index)" />
<!-- <uni-easyinput type="number" :value="item.sampleQuality" :inputBorder="true" @blur="changeInput($event,index)"/> --> <!-- <uni-easyinput type="number" :value="item.sampleQuality" :inputBorder="true" @blur="changeInput($event,index)"/> -->
<!-- <jPicker style="border: 1px solid #ffffff; color: #000" :moren="moren3" @bindpicker="selectProductlocCode2(index, $event)" showKey="label" valKey="value" :val="item.defectCode" :options="model.locList1" /> --> <!-- <jPicker style="border: 1px solid #ffffff; color: #000" :moren="moren3" @bindpicker="selectProductlocCode2(index, $event)" showKey="label" valKey="value" :val="item.defectCode" :options="model.locList1" /> -->
<!-- <u-input placeholder="请输入抽样数量" :value="item.sampleQuality" :border="true" @input="changeInput($event,index)" /> --> <!-- <u-input placeholder="请输入抽样数量" :value="item.sampleQuality" :border="true" @input="changeInput($event,index)" /> -->
</div> </div>
@ -390,7 +389,7 @@
</div> </div>
<div class="upload-name"> <div class="upload-name">
<div style="display: flex"> <div style="display: flex">
<div><u-input :border="true" disabled :value="tagslist.length + 1" :focus="isfocus" style="background-color: #eee; width: 80rpx; margin-right: 10rpx" @blur="changeInputtags($event)" /></div> <div><u-input :border="true" :value="serialnumber" :focus="isfocus" style="background-color: #eee; width: 80rpx; margin-right: 10rpx" @click="clickInputtags" /></div>
<div><u-input :border="true" :value="tagsvalue" :focus="isfocus" style="overflow: hidden" @blur="changeInputtags($event)" /></div> <div><u-input :border="true" :value="tagsvalue" :focus="isfocus" style="overflow: hidden" @blur="changeInputtags($event)" /></div>
</div> </div>
</div> </div>
@ -427,6 +426,7 @@
<view class="rect" @tap.stop>系统自动保存中请勿操作</view> <view class="rect" @tap.stop>系统自动保存中请勿操作</view>
</view> </view>
</u-mask> </u-mask>
<u-picker mode="selector" @confirm="confirmindex" @cancel="cancelindex" v-model="showindex" :default-selector="[0]" :range="indexdata"></u-picker>
</view> </view>
</template> </template>
<script lang="ts"> <script lang="ts">
@ -460,6 +460,7 @@ export default class PurchaseWHSRM extends BasePage {
autoHeight = true; autoHeight = true;
showsing = false; showsing = false;
showmask = false; showmask = false;
showindex = false;
singmark = ''; singmark = '';
moren = '请选择检验节点'; moren = '请选择检验节点';
moren2 = '请选择批次号'; moren2 = '请选择批次号';
@ -489,6 +490,7 @@ export default class PurchaseWHSRM extends BasePage {
barCodewl: '', barCodewl: '',
}; };
ischecklist: any = []; ischecklist: any = [];
indexdata: any = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
listselect: any = [ listselect: any = [
{ {
type: 'Y', type: 'Y',
@ -556,6 +558,7 @@ export default class PurchaseWHSRM extends BasePage {
detailList: any = []; detailList: any = [];
equipmentindex: any = []; equipmentindex: any = [];
tagsvalue: any = ''; tagsvalue: any = '';
serialnumber: any = '1';
tagslist: any = []; tagslist: any = [];
detailsinfo: any = []; detailsinfo: any = [];
nodelist: any = ''; nodelist: any = '';
@ -670,15 +673,19 @@ export default class PurchaseWHSRM extends BasePage {
// //
tagClick(index) { tagClick(index) {
if (index + 1 != this.tagslist.length) { // if (index + 1 != this.tagslist.length) {
(this.$refs.uToast as any).show({ // (this.$refs.uToast as any).show({
title: '请按顺序删除', // title: '',
type: 'default', // type: 'default',
}); // });
return; // return;
} // }
this.tagslist.splice(index, 1); this.tagslist.splice(index, 1);
} }
hasDuplicateValueIndex(arr) {
const valueIndexes = arr.map((item) => item.valueindex);
return valueIndexes.some((item, index) => valueIndexes.indexOf(item) !== index);
}
// //
ontagsadd() { ontagsadd() {
if (this.tagsvalue == '' || this.tagsvalue == undefined) { if (this.tagsvalue == '' || this.tagsvalue == undefined) {
@ -689,11 +696,22 @@ export default class PurchaseWHSRM extends BasePage {
}); });
return; return;
} }
let a: any = {}; let a: any = {};
a.value = this.tagsvalue; a.value = this.tagsvalue;
a.valueindex = this.tagslist.length + 1; a.valueindex = this.serialnumber;
a.label = a.valueindex + ':' + a.value; a.label = a.valueindex + ':' + a.value;
this.tagslist.push(a); const exists = this.tagslist.some((item) => item.valueindex === a.valueindex);
// valueindex
if (!exists) {
this.tagslist.push(a);
} else {
(this.$refs.uToast as any).show({
title: '已存在,不能添加',
type: 'default',
});
}
// this.isfocus = false; // this.isfocus = false;
// this.$nextTick(() => { // this.$nextTick(() => {
// this.isfocus = true; // this.isfocus = true;
@ -1195,6 +1213,7 @@ export default class PurchaseWHSRM extends BasePage {
(this.$refs.badtable as any).open(item, index); (this.$refs.badtable as any).open(item, index);
} }
focus(item, value, index) { focus(item, value, index) {
this.serialnumber = 1;
if (this.detaillistceshi[index].upperDiff == null && this.detaillistceshi[index].downDiff == null) { if (this.detaillistceshi[index].upperDiff == null && this.detaillistceshi[index].downDiff == null) {
this.isgetAutoJudge = false; this.isgetAutoJudge = false;
} else { } else {
@ -2112,6 +2131,14 @@ export default class PurchaseWHSRM extends BasePage {
this.detaillistceshi[index].sampleQuality = event.target.value; this.detaillistceshi[index].sampleQuality = event.target.value;
console.log('后面改变了吗', this.detaillistceshi[index].sampleQuality); console.log('后面改变了吗', this.detaillistceshi[index].sampleQuality);
} }
changeInput1(event, index) {
this.detaillistceshi.forEach((item) => {
item.sampleQuality = event.target.value;
});
this.detaillistceshi[index].sampleQuality = event.target.value;
console.log('后面改变了吗', this.detaillistceshi[index].sampleQuality);
}
changeInputsamp(event) { changeInputsamp(event) {
this.formdata.sampleQuality = event; this.formdata.sampleQuality = event;
} }
@ -2147,6 +2174,17 @@ export default class PurchaseWHSRM extends BasePage {
this.keyboardHideInterval.forEach((id) => clearInterval(id)); // this.keyboardHideInterval.forEach((id) => clearInterval(id)); //
this.keyboardHideInterval = []; // this.keyboardHideInterval = []; //
} }
//
confirmindex(e) {
this.serialnumber = this.indexdata[e[0]];
console.log(e);
}
cancelindex(e) {
console.log(e);
}
clickInputtags() {
this.showindex = true;
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

Loading…
Cancel
Save