刻字暂存选择添加接口

This commit is contained in:
2023-12-26 11:20:32 +08:00
parent a9e51d2c54
commit e6165f2448
2 changed files with 26 additions and 2 deletions

View File

@@ -214,3 +214,8 @@ export const sendMaterial = (dcode, pcode) => post('api/pda/package/sendMaterial
device_code: dcode,
point_code: pcode
})
// 1.3空框送回
export const sendVechile2 = (dcode, pcode) => post('api/pda/package/sendVechile2', {
device_code: dcode,
point_code: pcode
})

View File

@@ -10,6 +10,7 @@
</div>
<div class="search-item_2 flexend">
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': !this.pkId}" @click="_sendMaterial">确认上料</button>
<button class="button button--primary" :disabled="disabled2" :class="{'button--defalut': !this.pkId}" @click="_sendVechile2">空框送回</button>
</div>
</div>
</div>
@@ -39,7 +40,7 @@
</template>
<script>
import { cachepoint, sendMaterial } from '../../../config/getData1.js'
import { cachepoint, sendMaterial, sendVechile2 } from '../../../config/getData1.js'
export default {
name: 'letterbufferselect',
data () {
@@ -49,7 +50,8 @@ export default {
// dataList: [{point_code: '1111', material_code: '24007845L', material_spec: '23xcds', qty: '1000'}],
pkId: '',
pkObj: {},
disabled1: false
disabled1: false,
disabled2: false
}
},
created () {
@@ -83,6 +85,23 @@ export default {
this.disabled1 = false
}
},
async _sendVechile2 () {
this.disabled2 = true
if (!this.pkId) {
this.disabled2 = false
return
}
try {
let res = await sendVechile2(this.val1, this.pkId)
this.toast(res.message)
this.disabled2 = false
this.pkId = ''
this.pkObj = {}
this._cachepoint()
} catch (e) {
this.disabled2 = false
}
},
toRadio (e) {
this.pkId = this.pkId === e.point_code ? '' : e.point_code
this.pkObj = this.pkId === e.point_code ? e : {}