gm-printer 10.25.0 → 10.25.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -459,7 +459,10 @@ class EditorField extends React.Component {
|
|
|
459
459
|
let subtotalFields = subtotal?.fields?.[0].valueField
|
|
460
460
|
if (subtotalFields === 'total_item_price')
|
|
461
461
|
subtotalFields = '下单金额'
|
|
462
|
-
if (
|
|
462
|
+
if (
|
|
463
|
+
subtotalFields === 'real_item_price' ||
|
|
464
|
+
!subtotal?.fields?.[0].valueField
|
|
465
|
+
)
|
|
463
466
|
subtotalFields = '出库金额'
|
|
464
467
|
return (
|
|
465
468
|
<Radio
|
|
@@ -548,7 +551,10 @@ class EditorField extends React.Component {
|
|
|
548
551
|
value={fields.value}
|
|
549
552
|
key={fields.id}
|
|
550
553
|
inputName='overallOrderRadio'
|
|
551
|
-
checked={
|
|
554
|
+
checked={
|
|
555
|
+
(overallOrder?.fields?.[0]?.valueField ?? '出库金额') ===
|
|
556
|
+
fields.id
|
|
557
|
+
}
|
|
552
558
|
radioChecked={() => editStore.setOverallOrderValueField(fields)}
|
|
553
559
|
/>
|
|
554
560
|
)
|
|
@@ -607,6 +607,26 @@ class EditorStore {
|
|
|
607
607
|
if (this.selectedRegion) {
|
|
608
608
|
this.overallOrderShow = !this.overallOrderShow
|
|
609
609
|
const arr = this.selectedRegion.split('.')
|
|
610
|
+
const table = this.config.contents[arr[2]]
|
|
611
|
+
const colSpanLength = getColSpanLength(table)
|
|
612
|
+
if (!this.config.contents[arr[2]].subtotal.fields?.[0]) {
|
|
613
|
+
// 兼容已经存在的配送单据,他们的配置存在后端的,没有subtotal这个配置,给加上
|
|
614
|
+
set(table, {
|
|
615
|
+
subtotal: {
|
|
616
|
+
show: true,
|
|
617
|
+
fields: [
|
|
618
|
+
{
|
|
619
|
+
name: '每页合计:',
|
|
620
|
+
valueField: '下单金额',
|
|
621
|
+
style: {
|
|
622
|
+
fontWeight: 'bold'
|
|
623
|
+
},
|
|
624
|
+
colSpan: colSpanLength
|
|
625
|
+
}
|
|
626
|
+
]
|
|
627
|
+
}
|
|
628
|
+
})
|
|
629
|
+
}
|
|
610
630
|
this.config.contents[arr[2]].subtotal.fields[0].valueField = fields.id
|
|
611
631
|
|
|
612
632
|
const fieldList = this.config.contents[arr[2]].subtotal.fields
|
|
@@ -1348,6 +1368,26 @@ class EditorStore {
|
|
|
1348
1368
|
if (this.selectedRegion) {
|
|
1349
1369
|
this.overallOrderShow = !this.overallOrderShow
|
|
1350
1370
|
const arr = this.selectedRegion.split('.')
|
|
1371
|
+
const table = this.config.contents[arr[2]]
|
|
1372
|
+
const colSpanLength = getColSpanLength(table)
|
|
1373
|
+
if (!this.config.contents[arr[2]].overallOrder.fields?.[0]) {
|
|
1374
|
+
// 兼容已经存在的配送单据,他们的配置存在后端的,没有overallOrder这个配置,给加上
|
|
1375
|
+
set(table, {
|
|
1376
|
+
overallOrder: {
|
|
1377
|
+
show: true,
|
|
1378
|
+
fields: [
|
|
1379
|
+
{
|
|
1380
|
+
name: '整单合计:',
|
|
1381
|
+
valueField: '下单金额',
|
|
1382
|
+
style: {
|
|
1383
|
+
fontWeight: 'bold'
|
|
1384
|
+
},
|
|
1385
|
+
colSpan: colSpanLength
|
|
1386
|
+
}
|
|
1387
|
+
]
|
|
1388
|
+
}
|
|
1389
|
+
})
|
|
1390
|
+
}
|
|
1351
1391
|
const overallOrderConfig = this.config.contents[arr[2]]?.overallOrder
|
|
1352
1392
|
const oldValueField = overallOrderConfig.fields?.[0]
|
|
1353
1393
|
this.config.contents[arr[2]]?.overallOrder &&
|