型材逻辑改

This commit is contained in:
2026-06-11 15:48:48 +08:00
parent 1f28289c22
commit d224e7cc54

View File

@@ -16,7 +16,7 @@
<button class="btn btn1" @click="getPallet">查找托盘</button> <button class="btn btn1" @click="getPallet">查找托盘</button>
</div> </div>
</div> </div>
<div class="bottom-filter-tip"> <!-- <div class="bottom-filter-tip">
<div class="filter-label txtjustify">采购订单</div> <div class="filter-label txtjustify">采购订单</div>
<div class="fxcol mgl20"> <div class="fxcol mgl20">
<input type="text" class="filter-input filter-scan-input" v-model="val2" disabled> <input type="text" class="filter-input filter-scan-input" v-model="val2" disabled>
@@ -24,7 +24,7 @@
<div class="mgl20"> <div class="mgl20">
<button class="btn" :disabled="disabled2" :class="{'btn-disabled': disabled2 === true}" @click="getBill">查找单据</button> <button class="btn" :disabled="disabled2" :class="{'btn-disabled': disabled2 === true}" @click="getBill">查找单据</button>
</div> </div>
</div> </div> -->
<search-box <search-box
label="桶码" label="桶码"
:focused="true" :focused="true"
@@ -109,7 +109,6 @@ export default {
val1: '', val1: '',
vehicle: {}, vehicle: {},
bucket_rows: [], bucket_rows: [],
val2: '',
val3: '', val3: '',
dataList: [], dataList: [],
pkId: '', pkId: '',
@@ -136,16 +135,16 @@ export default {
} }
next() next()
}, },
activated () { // activated () {
if (this.$store.getters.materObj !== '') this.val2 = this.$store.getters.materObj.source_bill_code // if (this.$store.getters.materObj !== '') this.val2 = this.$store.getters.materObj.source_bill_code
}, // },
created () { created () {
this._inIetIvtLevel() this._inIetIvtLevel()
}, },
methods: { methods: {
handleChange1 (e, type) { handleChange1 (e, type) {
if (type) { if (type) {
this._checkVehicle(e, '5') this._checkVehicle(e, '8')
} }
}, },
handleChange3 (e, type) { handleChange3 (e, type) {
@@ -154,7 +153,7 @@ export default {
return return
} }
if (type) { if (type) {
this._checkBucket(e, '5') this._checkBucket(e, '8')
} }
}, },
toCheck (e) { toCheck (e) {
@@ -230,18 +229,20 @@ export default {
this.val3 = '' this.val3 = ''
return return
} }
if (this.val2 !== '' && JSON.stringify(this.$store.getters.materObj) !== '{}' && res.bucket_jo.material_id !== this.$store.getters.materObj.material_id) { // if (this.val2 !== '' && JSON.stringify(this.$store.getters.materObj) !== '{}' && res.bucket_jo.material_id !== this.$store.getters.materObj.material_id) {
this.toast('桶物料编码须与采购订单物料一致') // this.toast('桶物料编码须与采购订单物料一致')
this.val3 = '' // this.val3 = ''
return // return
} // }
if (this.val2 !== '') { // if (this.val2 !== '') {
let obj = Object.assign({}, res.bucket_jo, this.$store.getters.materObj) // let obj = Object.assign({}, res.bucket_jo, this.$store.getters.materObj)
this.dataList.push(obj) // this.dataList.push(obj)
} else { // } else {
this.dataList.push(res.bucket_jo) // this.dataList.push(res.bucket_jo)
this.disabled2 = true // this.disabled2 = true
} // }
this.dataList.push(res.bucket_jo)
this.disabled2 = true
this.val3 = res.bucket_jo.bucketunique this.val3 = res.bucket_jo.bucketunique
} else { } else {
this.val3 = '' this.val3 = ''
@@ -250,7 +251,7 @@ export default {
}, },
async _confirmVehicle () { async _confirmVehicle () {
try { try {
let res = await confirmVehicle('5', this.vehicle, this.dataList, null, null, this.option1[this.active1].value) let res = await confirmVehicle('8', this.vehicle, this.dataList, null, null, this.option1[this.active1].value)
if (res.code === '1') { if (res.code === '1') {
this.toast(res.desc) this.toast(res.desc)
Object.assign(this.$data, this.$options.data()) Object.assign(this.$data, this.$options.data())