入库
This commit is contained in:
@@ -60,7 +60,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="submit-bar">
|
<view class="submit-bar">
|
||||||
<button class="submit-button" :class="{'btn-disabled': dataList.length === 0}" :disabled="disabled" @tap="_stConfirm">入库确认</button>
|
<button class="submit-button" :class="{'btn-disabled': !val1 || dataList.length === 0}" :disabled="disabled" @tap="_stConfirm">入库确认</button>
|
||||||
<button class="submit-button" :class="{'btn-disabled': dataList.length === 0}" :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>
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
/** 确认 */
|
/** 确认 */
|
||||||
async _stConfirm () {
|
async _stConfirm () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (this.dataList.length === 0) {
|
if (!this.val1 || this.dataList.length === 0) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
</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>{{e.package_box_sn}}</td>
|
||||||
<td>{{e.container_name}}</td>
|
<td>{{e.container_name}}</td>
|
||||||
<td>{{e.product_name}}</td>
|
<td>{{e.product_name}}</td>
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
</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': !val1 || dataList.length === 0}" :disabled="disabled" @tap="_stConfirm">入库确认</button>
|
||||||
<button class="submit-button" @tap="_boxQuery(val1)">查询</button>
|
<button class="submit-button" @tap="_boxQuery(val1)">查询</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -88,8 +88,6 @@
|
|||||||
val3: '',
|
val3: '',
|
||||||
isV: '0',
|
isV: '0',
|
||||||
dataList: [],
|
dataList: [],
|
||||||
pkId: '',
|
|
||||||
pkObj: {},
|
|
||||||
disabled: false
|
disabled: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -109,14 +107,12 @@
|
|||||||
/** 确认 */
|
/** 确认 */
|
||||||
async _stConfirm () {
|
async _stConfirm () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.pkId) {
|
if (!this.val1 || this.dataList.length === 0) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await stConfirm(this.pkObj, this.val2, '3', this.isV, this.val3)
|
let res = await stConfirm(this.dataList, this.val2, '3', this.isV, this.val3)
|
||||||
this.pkId = ''
|
|
||||||
this.pkObj = {}
|
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
this._boxQuery(this.val1)
|
this._boxQuery(this.val1)
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -126,10 +122,6 @@
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
}
|
}
|
||||||
},
|
|
||||||
toCheck (e) {
|
|
||||||
this.pkId = this.pkId === e.package_box_sn ? '' : e.package_box_sn
|
|
||||||
this.pkObj = this.pkId === e.package_box_sn ? e : {}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
</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>{{e.package_box_sn}}</td>
|
||||||
<td>{{e.container_name}}</td>
|
<td>{{e.container_name}}</td>
|
||||||
<td>{{e.product_name}}</td>
|
<td>{{e.product_name}}</td>
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
</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': !val1 || dataList.length === 0}" :disabled="disabled" @tap="_stConfirm">入库确认</button>
|
||||||
<button class="submit-button" @tap="_boxQuery(val1)">查询</button>
|
<button class="submit-button" @tap="_boxQuery(val1)">查询</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -81,8 +81,6 @@
|
|||||||
val2: '',
|
val2: '',
|
||||||
isV: '0',
|
isV: '0',
|
||||||
dataList: [],
|
dataList: [],
|
||||||
pkId: '',
|
|
||||||
pkObj: {},
|
|
||||||
disabled: false
|
disabled: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -102,14 +100,12 @@
|
|||||||
/** 确认 */
|
/** 确认 */
|
||||||
async _stConfirm () {
|
async _stConfirm () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.pkId) {
|
if (!this.val1 || this.dataList.length === 0) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await stConfirm(this.pkObj, this.val2, '1', this.isV)
|
let res = await stConfirm(this.dataList, this.val2, '1', this.isV)
|
||||||
this.pkId = ''
|
|
||||||
this.pkObj = {}
|
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
this._boxQuery(this.val1)
|
this._boxQuery(this.val1)
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -119,10 +115,6 @@
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
}
|
}
|
||||||
},
|
|
||||||
toCheck (e) {
|
|
||||||
this.pkId = this.pkId === e.package_box_sn ? '' : e.package_box_sn
|
|
||||||
this.pkObj = this.pkId === e.package_box_sn ? e : {}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user