feat(miniprogram): replace inventory list weigh-slip create with pound QR.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
f2dd16d851
commit
0ce896d9cd
1 file changed
+16
-15
@@ -71,7 +71,7 @@
|
||||
</view>
|
||||
<view class="db-card__foot" @click.stop>
|
||||
<db-btn size="small" type="primary" plain @click="viewRelated(item)">关联</db-btn>
|
||||
<db-btn size="small" type="primary" @click="genWeighing(item)">生成地磅单</db-btn>
|
||||
<db-btn size="small" type="primary" @click="openPoundQr(item)">磅单二维码</db-btn>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="list.length" class="db-list-footer">
|
||||
@@ -111,6 +111,13 @@
|
||||
</template>
|
||||
</view>
|
||||
</db-popup>
|
||||
<db-pound-qrcode-popup
|
||||
:show="poundQrOpen"
|
||||
:inventory-id="poundQrId"
|
||||
:snapshot="poundQrSnapshot"
|
||||
@close="poundQrOpen = false"
|
||||
@update:show="(v) => (poundQrOpen = v)"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -125,6 +132,7 @@ import DbSearch from '@/components/db-ui/db-search.vue'
|
||||
import DbTag from '@/components/db-ui/db-tag.vue'
|
||||
import DbBtn from '@/components/db-ui/db-btn.vue'
|
||||
import DbPopup from '@/components/db-ui/db-popup.vue'
|
||||
import DbPoundQrcodePopup from '@/components/db-ui/db-pound-qrcode-popup.vue'
|
||||
|
||||
const safeAreaStyle = getSafeAreaStyle()
|
||||
const keyword = ref('')
|
||||
@@ -139,6 +147,9 @@ const listHeight = ref('60vh')
|
||||
const relatedOpen = ref(false)
|
||||
const relatedLoading = ref(false)
|
||||
const related = ref({ plan: null, weighing: null })
|
||||
const poundQrOpen = ref(false)
|
||||
const poundQrId = ref('')
|
||||
const poundQrSnapshot = ref(null)
|
||||
let debounce = null
|
||||
|
||||
const dateFilters = [
|
||||
@@ -260,20 +271,10 @@ async function viewRelated(item) {
|
||||
relatedLoading.value = false
|
||||
}
|
||||
}
|
||||
function genWeighing(item) {
|
||||
const q = [
|
||||
`vehicleNo=${encodeURIComponent(item.vehicleNo || '')}`,
|
||||
`productId=${encodeURIComponent(item.productId || '')}`,
|
||||
`cargoName=${encodeURIComponent(item.product || '')}`,
|
||||
`businessType=${encodeURIComponent(item.businessType || '')}`,
|
||||
`supplier=${encodeURIComponent(item.partnerCompany || '')}`,
|
||||
`consignee=${encodeURIComponent(item.partnerCompany || '')}`,
|
||||
`planNo=${encodeURIComponent(item.planNo || '')}`,
|
||||
`inboundOutboundId=${encodeURIComponent(item.id)}`,
|
||||
`purchasePlanId=${encodeURIComponent(item.purchasePlanId || '')}`,
|
||||
'mode=create'
|
||||
].join('&')
|
||||
uni.navigateTo({ url: `${PAGE_PATHS.dbWeighingDetail}?${q}` })
|
||||
function openPoundQr(item) {
|
||||
poundQrId.value = item?.id || ''
|
||||
poundQrSnapshot.value = item || null
|
||||
poundQrOpen.value = true
|
||||
}
|
||||
|
||||
onShow(() => {
|
||||
|
||||
Reference in new issue
Block a user