型材出库

This commit is contained in:
2023-02-23 09:35:30 +08:00
parent eed70b091a
commit 5b1ee7173e
3 changed files with 53 additions and 10 deletions

View File

@@ -532,6 +532,14 @@ export const xcoutqueryStoragevehicle = (wcode, scode) => post('api/pda/st/out/x
workorder_code: wcode,
storagevehicle_code: scode
})
// export const xcoutqueryStoragevehicle = () => {
// let res = {
// code: '1',
// result: true,
// content: [{bucketunique: '1', qty: '1.00000'}]
// }
// return res
// }
// 1.3确认发货
export const xcoutconfirmoutstore = (wcode, vcode, dtl) => post('api/pda/st/out/xcout/confirmoutstore', {
mst: {

View File

@@ -6,7 +6,7 @@
<div class="bottom-filter-tip">
<div class="filter-label txtjustify">服务器地址</div>
<div class="fxcol mgl20">
<input type="text" class="filter-input filter-scan-input" v-model="addrip">
<input type="text" class="filter-input filter-scan-input" v-model.trim="addrip">
</div>
</div>
</div>
@@ -14,7 +14,7 @@
<div class="bottom-filter-tip">
<div class="filter-label txtjustify">图片存储地址</div>
<div class="fxcol mgl20">
<input type="text" class="filter-input filter-scan-input" v-model="imgip">
<input type="text" class="filter-input filter-scan-input" v-model.trim="imgip">
</div>
</div>
</div>
@@ -22,7 +22,7 @@
<div class="bottom-filter-tip">
<div class="filter-label txtjustify">打印服务地址</div>
<div class="fxcol mgl20">
<input type="text" class="filter-input filter-scan-input" v-model="printip">
<input type="text" class="filter-input filter-scan-input" v-model.trim="printip">
</div>
</div>
</div>
@@ -72,7 +72,7 @@
<div class="bottom-filter-tip">
<div class="filter-label txtjustify">APP下载</div>
<div class="fxcol mgl20">
<input ref="inputCopy" type="text" class="filter-input filter-scan-input" v-model="appUrl">
<input ref="inputCopy" type="text" class="filter-input filter-scan-input" v-model.trim="appUrl">
</div>
<div class="mgl20">
<button

View File

@@ -58,22 +58,30 @@
</div>
</section>
<section class="submit-bar">
<button class="btn submit-button" :disabled="disabled1" :class="{'btn-disabled': !val2 || !val3 || dataList.length === 0}" @click="toSure">确认出库</button>
<button v-if="isL === true" class="btn submit-button" :disabled="disabled1" :class="{'btn-disabled': !val2 || !val3 || isV === false}" @click="toSure">确认出库</button>
<button v-if="isL === false" class="btn submit-button" :disabled="disabled1" :class="{'btn-disabled': !val2 || !val3 || dataList.length === 0}" @click="toSure">确认出库</button>
</section>
<modal
:mdShow="mdShow"
@closeModalCallback="closeModalCallback"
@comfirmCallback="comfirmCallback">
工令不一致是否继续
</modal>
</section>
</template>
<script>
import NavBar from '@components/NavBar.vue'
import SearchBox from '@components/SearchBox.vue'
// import {checkVehicle, checkBucket, confirmVehicle} from '@config/getData2.js'
import Modal from '@components/Modal.vue'
import {xcoutqueryStoragevehicle, xcoutconfirmoutstore} from '@config/getData2.js'
import {accAdd} from '@config/mUtils.js'
export default {
name: 'XingcaiDeliver',
components: {
NavBar,
SearchBox
SearchBox,
Modal
},
data () {
return {
@@ -83,7 +91,10 @@ export default {
dataList: [],
pkId: '',
disabled1: false,
disabled2: false
disabled2: false,
mdShow: false,
isL: false, // 为true时载具扫码请求工令不一直情况
isV: false
}
},
computed: {
@@ -127,7 +138,9 @@ export default {
/** 确认发货--------- */
toSure () {
this.disabled1 = true
if (this.val2 && this.val3 && this.dataList.length) {
if (this.val2 && this.val3 && this.isL === true && this.isV === true) {
this._xcoutconfirmoutstore()
} else if (this.val2 && this.val3 && this.isL === false && this.dataList.length > 0) {
this._xcoutconfirmoutstore()
} else {
this.disabled1 = false
@@ -137,22 +150,44 @@ export default {
async _xcoutqueryStoragevehicle (e) {
let res = await xcoutqueryStoragevehicle(this.val2, e)
if (res.code === '1') {
this.isV = false
if (res.result === false) {
this.mdShow = true
this.isL = true
} else {
this.isL = false
}
this.dataList = [...res.content]
} else {
this.isV = false
this.isL = false
this.Dialog(res.desc)
}
},
closeModalCallback () {
this.mdShow = false
this.isV = false
},
comfirmCallback () {
this.mdShow = false
this.isV = true
},
async _xcoutconfirmoutstore () {
try {
let res = await xcoutconfirmoutstore(this.val2, this.val3, this.dataList)
let val3 = this.isV === true ? '' : this.val3
let res = await xcoutconfirmoutstore(this.val2, val3, this.dataList)
if (res.code === '1') {
this.toast(res.desc)
Object.assign(this.$data, this.$options.data())
} else {
this.Dialog(res.desc)
}
this.isV = false
this.isL = false
this.disabled1 = false
} catch (e) {
this.isV = false
this.isL = false
this.disabled1 = false
}
}