操作成功

This commit is contained in:
2022-11-11 18:22:26 +08:00
parent f95a05141f
commit bb64664360
10 changed files with 54 additions and 70 deletions

View File

@@ -114,14 +114,14 @@
} }
try { try {
let res = await emptyConfirm(this.pkObj, this.qty, this.val1, '2') let res = await emptyConfirm(this.pkObj, this.qty, this.val1, '2')
uni.showToast({
title: res.message,
icon: 'none'
})
this.disabled = false this.disabled = false
this.pkId = '' this.pkId = ''
this.pkObj = {} this.pkObj = {}
this._queryMaterialInfo() this._queryMaterialInfo()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) { } catch (e) {
this.disabled = false this.disabled = false
} }

View File

@@ -114,14 +114,14 @@
} }
try { try {
let res = await emptyConfirm(this.pkObj, this.qty, this.val1, '1') let res = await emptyConfirm(this.pkObj, this.qty, this.val1, '1')
uni.showToast({
title: res.message,
icon: 'none'
})
this.disabled = false this.disabled = false
this.pkId = '' this.pkId = ''
this.pkObj = {} this.pkObj = {}
this._queryMaterialInfo() this._queryMaterialInfo()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) { } catch (e) {
this.disabled = false this.disabled = false
} }

View File

@@ -112,14 +112,14 @@
} }
try { try {
let res = await needEmptyAxis(this.pkObj) let res = await needEmptyAxis(this.pkObj)
uni.showToast({
title: res.message,
icon: 'none'
})
this.disabled1 = false this.disabled1 = false
this.pkId = '' this.pkId = ''
this.pkObj = {} this.pkObj = {}
this._queryRawFoilList() this._queryRawFoilList()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) { } catch (e) {
this.disabled1 = false this.disabled1 = false
} }
@@ -132,14 +132,14 @@
} }
try { try {
let res = await confirmBlanking(this.pkObj) let res = await confirmBlanking(this.pkObj)
uni.showToast({
title: res.message,
icon: 'none'
})
this.disabled2 = false this.disabled2 = false
this.pkId = '' this.pkId = ''
this.pkObj = {} this.pkObj = {}
this._queryRawFoilList() this._queryRawFoilList()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) { } catch (e) {
this.disabled2 = false this.disabled2 = false
} }

View File

@@ -47,8 +47,8 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.package_box_SN === pkId}"> <tr v-for="(e, i) in dataList" :key="i">
<td>{{e.package_box_SN}}</td> <td>{{package_box_sn}}</td>
<td>{{e.container_name}}</td> <td>{{e.container_name}}</td>
<td>{{e.product_name}}</td> <td>{{e.product_name}}</td>
<td>{{e.product_description}}</td> <td>{{e.product_description}}</td>
@@ -60,8 +60,8 @@
</view> </view>
</view> </view>
<view class="submit-bar"> <view class="submit-bar">
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled" @tap="_stConfirm">入库确认</button> <button class="submit-button" :class="{'btn-disabled': dataList.length === 0}" :disabled="disabled" @tap="_stConfirm">入库确认</button>
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled1" @tap="_stPrint">补码</button> <button class="submit-button" :class="{'btn-disabled': dataList.length === 0}" :disabled="disabled1" @tap="_stPrint">补码</button>
<button class="submit-button" @tap="_boxQuery(val1)">查询</button> <button class="submit-button" @tap="_boxQuery(val1)">查询</button>
</view> </view>
</view> </view>
@@ -82,8 +82,6 @@
val2: '', val2: '',
isV: '0', isV: '0',
dataList: [], dataList: [],
pkId: '',
pkObj: {},
disabled: false, disabled: false,
disabled1: false disabled1: false
}; };
@@ -104,21 +102,18 @@
/** 确认 */ /** 确认 */
async _stConfirm () { async _stConfirm () {
this.disabled = true this.disabled = true
if (!this.pkId) { if (this.dataList.length === 0) {
this.disabled = false this.disabled = false
return return
} }
try { try {
let res = await stConfirm(this.pkObj, this.val2, '2', this.isV) let res = await stConfirm(this.dataList, this.val2, '2', this.isV)
this.disabled = false
this._boxQuery(this.val1)
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
icon: 'none' icon: 'none'
}) })
this.pkId = ''
this.pkObj = {}
this.disabled = false
this._boxQuery(this.val1)
} catch (e) { } catch (e) {
this.disabled = false this.disabled = false
} }
@@ -126,28 +121,21 @@
/** 补码 */ /** 补码 */
async _stPrint () { async _stPrint () {
this.disabled1 = true this.disabled1 = true
if (!this.pkId) { if (this.dataList.length === 0) {
this.disabled1 = false this.disabled1 = false
return return
} }
try { try {
let res = await stPrint(this.pkObj) let res = await stPrint(this.dataList)
this.disabled1 = false
this._boxQuery()
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
icon: 'none' icon: 'none'
}) })
this.pkId = ''
this.pkObj = {}
this.disabled1 = false
this._boxQuery()
} catch (e) { } catch (e) {
this.disabled1 = false this.disabled1 = false
} }
},
toCheck (e) {
this.pkId = this.pkId === e.package_box_SN ? '' : e.package_box_SN
this.pkObj = this.pkId === e.package_box_SN ? e : {}
} }
} }
} }

View File

@@ -91,14 +91,14 @@
this.disabled1 = true this.disabled1 = true
try { try {
let res = await stoutConfirm(this.dataList, this.val1) let res = await stoutConfirm(this.dataList, this.val1)
uni.showToast({
title: res.message,
icon: 'none'
})
this.disabled1 = false this.disabled1 = false
this.pkId = '' this.pkId = ''
this.pkObj = {} this.pkObj = {}
this._stivtQuery() this._stivtQuery()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) { } catch (e) {
this.disabled1 = false this.disabled1 = false
} }
@@ -111,14 +111,14 @@
} }
try { try {
let res = await stoutPrint(this.pkObj) let res = await stoutPrint(this.pkObj)
uni.showToast({
title: res.message,
icon: 'none'
})
this.disabled1 = false this.disabled1 = false
this.pkId = '' this.pkId = ''
this.pkObj = {} this.pkObj = {}
this._stivtQuery() this._stivtQuery()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) { } catch (e) {
this.disabled1 = false this.disabled1 = false
} }

View File

@@ -115,15 +115,14 @@
} }
try { try {
let res = await stConfirm(this.pkObj, this.val2, '3', this.isV, this.val3) let res = await stConfirm(this.pkObj, this.val2, '3', this.isV, this.val3)
uni.showToast({
title: res.message,
icon: 'none'
})
this.pkId = '' this.pkId = ''
this.pkObj = {} this.pkObj = {}
this.disabled = false this.disabled = false
this._boxQuery(this.val1) this._boxQuery(this.val1)
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) { } catch (e) {
this.disabled = false this.disabled = false
} }

View File

@@ -108,15 +108,14 @@
} }
try { try {
let res = await stConfirm(this.pkObj, this.val2, '1', this.isV) let res = await stConfirm(this.pkObj, this.val2, '1', this.isV)
uni.showToast({
title: res.message,
icon: 'none'
})
this.pkId = '' this.pkId = ''
this.pkObj = {} this.pkObj = {}
this.disabled = false this.disabled = false
this._boxQuery(this.val1) this._boxQuery(this.val1)
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) { } catch (e) {
this.disabled = false this.disabled = false
} }

View File

@@ -119,15 +119,14 @@
} }
try { try {
let res = await confirmInstor(this.pkObj, this.val1, this.index) let res = await confirmInstor(this.pkObj, this.val1, this.index)
uni.showToast({
title: res.message,
icon: 'none'
})
this.disabled = false this.disabled = false
this.pkId = '' this.pkId = ''
this.pkObj = {} this.pkObj = {}
this._coolIOQuery() this._coolIOQuery()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) { } catch (e) {
this.disabled = false this.disabled = false
} }

View File

@@ -116,15 +116,14 @@
} }
try { try {
let res = await outconfirmInstor(this.pkObj, this.val1) let res = await outconfirmInstor(this.pkObj, this.val1)
uni.showToast({
title: res.message,
icon: 'none'
})
this.disabled = false this.disabled = false
this.pkId = '' this.pkId = ''
this.pkObj = {} this.pkObj = {}
this._outcoolIOQuery() this._outcoolIOQuery()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) { } catch (e) {
this.disabled = false this.disabled = false
} }

View File

@@ -93,12 +93,12 @@
this.disabled1 = true this.disabled1 = true
try { try {
let res = await virtualoutConfirm(this.dataList, this.val1) let res = await virtualoutConfirm(this.dataList, this.val1)
this.disabled1 = false
this._virtualivtQuery()
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
icon: 'none' icon: 'none'
}) })
this.disabled1 = false
this._virtualivtQuery()
} catch (e) { } catch (e) {
this.disabled1 = false this.disabled1 = false
} }