|
@@ -9,9 +9,9 @@
|
|
|
<div class="text-center" style="font-size:16px;font-weight:600;">标签需求订单</div>
|
|
|
<div class="flex valign-center">
|
|
|
<div>订单编号:</div>
|
|
|
- <VueBarcode v-if="data" :value="data.orderNo" format="CODE128" :height="40" :font-size="14"></VueBarcode>
|
|
|
+ <VueBarcode v-if="data && data.orderNo" :value="data.orderNo" format="CODE128" :height="40" :font-size="14"></VueBarcode>
|
|
|
</div>
|
|
|
- <div style="width:100%;">
|
|
|
+ <div style="width:100%;max-height:206px; overflow-y:auto;">
|
|
|
<table cellspacing="0" cellpadding="0" border="0" class="origin-table">
|
|
|
<colgroup>
|
|
|
<col />
|
|
@@ -59,7 +59,7 @@
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</div>
|
|
|
- <div class="flex layout-gap" style="padding-top:20px;">
|
|
|
+ <div class="flex layout-gap" style="padding-top:30px;">
|
|
|
<div class="flex flex-1" style="gap:5px">
|
|
|
<label>制单人:</label>
|
|
|
<div class="flex-1 fit-size"></div>
|
|
@@ -113,7 +113,7 @@ export default {
|
|
|
number: 0
|
|
|
}),
|
|
|
methods: {
|
|
|
- open (data) {
|
|
|
+ open (data, flag = true) {
|
|
|
this.data = data
|
|
|
this.visible = true
|
|
|
this.details = this.data && this.data.details ? this.data.details : []
|
|
@@ -122,6 +122,12 @@ export default {
|
|
|
this.formatDataTime = (!this.data || !this.data.dataTime) ? '' : new Date(data.dataTime).format('YYYY-MM-DD')
|
|
|
this.amount = data.amount
|
|
|
this.number = (!this.data || !this.data.details) ? 0 : this.data.details.reduce((sum, item) => sum + item.number, 0)
|
|
|
+
|
|
|
+ if (flag) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.onExportPdfBtnClick()
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
async onExportPdfBtnClick () {
|
|
|
const { data } = this
|
|
@@ -133,6 +139,20 @@ export default {
|
|
|
},
|
|
|
onCloseBtnClick () {
|
|
|
this.close()
|
|
|
+ },
|
|
|
+ async processSelectedList (selectedList) {
|
|
|
+ for (const item of selectedList) {
|
|
|
+ try {
|
|
|
+ this.open(item)
|
|
|
+ await this.$nextTick()
|
|
|
+ await this.delay(500)
|
|
|
+ } catch (error) {
|
|
|
+ console.error(error)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ delay (ms) {
|
|
|
+ return new Promise(resolve => setTimeout(resolve, ms))
|
|
|
}
|
|
|
}
|
|
|
}
|