|
|
|
@ -389,7 +389,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="upload-name">
|
|
|
|
|
<div style="display: flex">
|
|
|
|
|
<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" 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="tagsvalue" :focus="isfocus" style="overflow: hidden" @blur="changeInputtags($event)" /></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -673,13 +673,13 @@ export default class PurchaseWHSRM extends BasePage {
|
|
|
|
|
|
|
|
|
|
//收货按钮
|
|
|
|
|
tagClick(index) {
|
|
|
|
|
// if (index + 1 != this.tagslist.length) {
|
|
|
|
|
// (this.$refs.uToast as any).show({
|
|
|
|
|
// title: '请按顺序删除',
|
|
|
|
|
// type: 'default',
|
|
|
|
|
// });
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
if (index + 1 != this.tagslist.length) {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '请按顺序删除',
|
|
|
|
|
type: 'default',
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.tagslist.splice(index, 1);
|
|
|
|
|
}
|
|
|
|
|
hasDuplicateValueIndex(arr) {
|
|
|
|
@ -696,22 +696,16 @@ export default class PurchaseWHSRM extends BasePage {
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
console.log(this.tagslist, 'sadasdww');
|
|
|
|
|
let a: any = {};
|
|
|
|
|
a.value = this.tagsvalue;
|
|
|
|
|
a.valueindex = this.serialnumber;
|
|
|
|
|
a.valueindex = this.tagslist.length + 1;
|
|
|
|
|
a.label = a.valueindex + ':' + a.value;
|
|
|
|
|
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.tagslist.push(a);
|
|
|
|
|
// this.isfocus = false;
|
|
|
|
|
// this.$nextTick(() => {
|
|
|
|
|
// this.isfocus = true;
|
|
|
|
|
// });
|
|
|
|
|
// this.isfocus = false;
|
|
|
|
|
// this.$nextTick(() => {
|
|
|
|
|
// this.isfocus = true;
|
|
|
|
|