This commit is contained in:
2022-11-17 15:01:06 +08:00
4 changed files with 16 additions and 32 deletions

View File

@@ -60,7 +60,7 @@
</view>
</view>
<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" @tap="_boxQuery(val1)">查询</button>
</view>
@@ -102,7 +102,7 @@
/** 确认 */
async _stConfirm () {
this.disabled = true
if (this.dataList.length === 0) {
if (!this.val1 || this.dataList.length === 0) {
this.disabled = false
return
}

View File

@@ -36,8 +36,8 @@
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.package_box_SN === pkId, 'bgyellow': e.colro_flag === '1'}">
<td>{{e.package_box_SN}}</td>
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.package_box_sn === pkId, 'bgyellow': e.colro_flag === '1'}">
<td>{{e.package_box_sn}}</td>
<td>{{e.container_name}}</td>
<td>{{e.product_name}}</td>
<td>{{e.product_description}}</td>
@@ -124,8 +124,8 @@
}
},
toCheck (e) {
this.pkId = this.pkId === e.package_box_SN ? '' : e.package_box_SN
this.pkObj = this.pkId === e.package_box_SN ? e : {}
this.pkId = this.pkId === e.package_box_sn ? '' : e.package_box_sn
this.pkObj = this.pkId === e.package_box_sn ? e : {}
}
}
}

View File

@@ -53,8 +53,8 @@
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.package_box_SN === pkId}">
<td>{{e.package_box_SN}}</td>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{e.package_box_sn}}</td>
<td>{{e.container_name}}</td>
<td>{{e.product_name}}</td>
<td>{{e.product_description}}</td>
@@ -66,7 +66,7 @@
</view>
</view>
<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>
</view>
</view>
@@ -88,8 +88,6 @@
val3: '',
isV: '0',
dataList: [],
pkId: '',
pkObj: {},
disabled: false
};
},
@@ -109,14 +107,12 @@
/** 确认 */
async _stConfirm () {
this.disabled = true
if (!this.pkId) {
if (!this.val1 || this.dataList.length === 0) {
this.disabled = false
return
}
try {
let res = await stConfirm(this.pkObj, this.val2, '3', this.isV, this.val3)
this.pkId = ''
this.pkObj = {}
let res = await stConfirm(this.dataList, this.val2, '3', this.isV, this.val3)
this.disabled = false
this._boxQuery(this.val1)
uni.showToast({
@@ -126,10 +122,6 @@
} catch (e) {
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 : {}
}
}
}

View File

@@ -47,8 +47,8 @@
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.package_box_SN === pkId}">
<td>{{e.package_box_SN}}</td>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{e.package_box_sn}}</td>
<td>{{e.container_name}}</td>
<td>{{e.product_name}}</td>
<td>{{e.product_description}}</td>
@@ -60,7 +60,7 @@
</view>
</view>
<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>
</view>
</view>
@@ -81,8 +81,6 @@
val2: '',
isV: '0',
dataList: [],
pkId: '',
pkObj: {},
disabled: false
};
},
@@ -102,14 +100,12 @@
/** 确认 */
async _stConfirm () {
this.disabled = true
if (!this.pkId) {
if (!this.val1 || this.dataList.length === 0) {
this.disabled = false
return
}
try {
let res = await stConfirm(this.pkObj, this.val2, '1', this.isV)
this.pkId = ''
this.pkObj = {}
let res = await stConfirm(this.dataList, this.val2, '1', this.isV)
this.disabled = false
this._boxQuery(this.val1)
uni.showToast({
@@ -119,10 +115,6 @@
} catch (e) {
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 : {}
}
}
}