This commit is contained in:
2023-08-09 18:29:25 +08:00
parent c9c0e07eb5
commit 00bba7259e
3 changed files with 8 additions and 10 deletions

View File

@@ -200,7 +200,7 @@ export const sendVechile = (dcode) => post('api/pda/package/sendVechile', {
export const cachepoint = () => post('api/pda/package/cachepoint', { export const cachepoint = () => post('api/pda/package/cachepoint', {
}) })
// 1.3确认上料 // 1.3确认上料
export const confirmUp = (dcode, pcode) => post('api/pda/package/confirmUp', { export const sendMaterial = (dcode, pcode) => post('api/pda/package/sendMaterial', {
device_code: dcode, device_code: dcode,
point_code: pcode point_code: pcode
}) })

View File

@@ -2,7 +2,7 @@
<div class="order-wraper"> <div class="order-wraper">
<div class="search-confirm-wrap"> <div class="search-confirm-wrap">
<div class="search-wrap"> <div class="search-wrap">
<div class="search-item_2 flexend"> <div class="search-item_3">
<button class="button button--primary" :class="{'button--defalut': !this.pkId}" @click="toSelect">刻字暂存位选择</button> <button class="button button--primary" :class="{'button--defalut': !this.pkId}" @click="toSelect">刻字暂存位选择</button>
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': !this.pkId}" @click="_sendVechile">空框送回</button> <button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': !this.pkId}" @click="_sendVechile">空框送回</button>
</div> </div>
@@ -42,7 +42,7 @@ export default {
data () { data () {
return { return {
dataList: [], dataList: [],
// dataList: [{device_code: '24007845L', workorder_code: '23xcds', material_spec: '垫片活接直通\DPHJS22\EHJA0703009B', plan_qty: '1000', material_code: '0022060927'}], // dataList: [{device_code: '24007845L', workorder_code: '23xcds', material_spec: '垫片活接9B', plan_qty: '1000', material_code: '0022060927'}],
pkId: '', pkId: '',
pkObj: {}, pkObj: {},
disabled1: false disabled1: false

View File

@@ -9,7 +9,7 @@
</div> </div>
</div> </div>
<div class="search-item_2 flexend"> <div class="search-item_2 flexend">
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': !this.pkId}" @click="_confirmUp">确认上料</button> <button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': !this.pkId}" @click="_sendMaterial">确认上料</button>
</div> </div>
</div> </div>
</div> </div>
@@ -39,7 +39,7 @@
</template> </template>
<script> <script>
import { cachepoint, confirmUp } from '../../../config/getData1.js' import { cachepoint, sendMaterial } from '../../../config/getData1.js'
export default { export default {
name: 'letterbufferselect', name: 'letterbufferselect',
data () { data () {
@@ -53,12 +53,10 @@ export default {
} }
}, },
created () { created () {
this._cachepoint()
},
activated () {
if (this.$store.getters.materObj !== '') { if (this.$store.getters.materObj !== '') {
this.val1 = JSON.parse(this.$store.getters.materObj).device_code this.val1 = JSON.parse(this.$store.getters.materObj).device_code
} }
this._cachepoint()
}, },
methods: { methods: {
// grid // grid
@@ -68,14 +66,14 @@ export default {
this.dataList = [...res.content] this.dataList = [...res.content]
} }
}, },
async _confirmUp () { async _sendMaterial () {
this.disabled1 = true this.disabled1 = true
if (!this.pkId) { if (!this.pkId) {
this.disabled1 = false this.disabled1 = false
return return
} }
try { try {
let res = await confirmUp(this.val1, this.pkId) let res = await sendMaterial(this.val1, this.pkId)
this.toast(res.message) this.toast(res.message)
this.disabled1 = false this.disabled1 = false
this.pkId = '' this.pkId = ''