@things-factory/sales-ui 4.3.82 → 4.3.89
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.
|
@@ -2,7 +2,6 @@ import '@things-factory/grist-ui'
|
|
|
2
2
|
import '@things-factory/biz-ui'
|
|
3
3
|
import '@things-factory/warehouse-ui'
|
|
4
4
|
import '@things-factory/import-ui/client/components/import-pop-up'
|
|
5
|
-
import '@things-factory/operato-wms/client/pages/components/select-product-popup'
|
|
6
5
|
|
|
7
6
|
import gql from 'graphql-tag'
|
|
8
7
|
import { css, html } from 'lit-element'
|
|
@@ -523,13 +522,29 @@ class PurchaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
523
522
|
width: 150
|
|
524
523
|
},
|
|
525
524
|
{
|
|
526
|
-
type: '
|
|
527
|
-
name: '
|
|
525
|
+
type: 'object',
|
|
526
|
+
name: 'product',
|
|
528
527
|
header: i18next.t('field.product'),
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
528
|
+
record: {
|
|
529
|
+
editable: this._editable,
|
|
530
|
+
options: {
|
|
531
|
+
queryName: 'products',
|
|
532
|
+
basicArgs: {
|
|
533
|
+
filters: [{ name: 'bizplace_id', operator: 'eq', value: this._purchaseOrderData?.bizplace?.id }]
|
|
534
|
+
},
|
|
535
|
+
nameField: 'name',
|
|
536
|
+
descriptionField: 'description',
|
|
537
|
+
select: [
|
|
538
|
+
{ name: 'id', hidden: true },
|
|
539
|
+
{ name: 'sku', header: i18next.t('field.sku') },
|
|
540
|
+
{ name: 'name', header: i18next.t('field.name') },
|
|
541
|
+
{ name: 'brand', header: i18next.t('field.brand') },
|
|
542
|
+
{ name: 'description', header: i18next.t('field.description') },
|
|
543
|
+
{ name: 'packingType', header: i18next.t('field.packing_type') },
|
|
544
|
+
{ name: 'primaryUnit', header: i18next.t('field.uom') },
|
|
545
|
+
{ name: 'primaryValue', header: i18next.t('field.uom_value') }
|
|
546
|
+
],
|
|
547
|
+
list: { fields: ['sku', 'name', 'brand', 'description', 'packingType'] }
|
|
533
548
|
}
|
|
534
549
|
},
|
|
535
550
|
width: 350
|
|
@@ -1023,10 +1038,6 @@ class PurchaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1023
1038
|
brand
|
|
1024
1039
|
description
|
|
1025
1040
|
}
|
|
1026
|
-
productDetail {
|
|
1027
|
-
id
|
|
1028
|
-
name
|
|
1029
|
-
}
|
|
1030
1041
|
adjustedBatchId
|
|
1031
1042
|
remark
|
|
1032
1043
|
status
|
|
@@ -1199,7 +1210,6 @@ class PurchaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1199
1210
|
id: record.id || null,
|
|
1200
1211
|
batchId: record.batchId,
|
|
1201
1212
|
product: { id: record.product.id },
|
|
1202
|
-
productDetail: record.productDetailId ? { id: record.productDetailId } : { id: record.productDetail.id },
|
|
1203
1213
|
packingType: record.packingType,
|
|
1204
1214
|
uomValue: record?.uomValue ? record.uomValue : 0,
|
|
1205
1215
|
uom: record.uom,
|
|
@@ -1466,59 +1476,6 @@ class PurchaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1466
1476
|
return productGrist
|
|
1467
1477
|
}
|
|
1468
1478
|
|
|
1469
|
-
_openProductSelection(rowIndex) {
|
|
1470
|
-
if (this._purchaseOrderData?.bizplace?.id) {
|
|
1471
|
-
openPopup(
|
|
1472
|
-
html`
|
|
1473
|
-
<select-product-popup
|
|
1474
|
-
.bizplaceId="${this._purchaseOrderData?.bizplace?.id}"
|
|
1475
|
-
@selected="${e => {
|
|
1476
|
-
// let newRecord = []
|
|
1477
|
-
// newRecord.push(e.detail)
|
|
1478
|
-
|
|
1479
|
-
if (this.productGrist.dirtyData.records.length !== rowIndex) {
|
|
1480
|
-
// update existing product data records
|
|
1481
|
-
this.productGrist.dirtyData.records.splice(rowIndex, 1, {
|
|
1482
|
-
...this.productGrist.dirtyData.records[rowIndex],
|
|
1483
|
-
...e.detail
|
|
1484
|
-
})
|
|
1485
|
-
|
|
1486
|
-
this.productGrist.dirtyData.records = this.productGrist.dirtyData.records.map(item => {
|
|
1487
|
-
return {
|
|
1488
|
-
...item,
|
|
1489
|
-
totalUomValue:
|
|
1490
|
-
item?.packQty > 0
|
|
1491
|
-
? item?.totalUomValue
|
|
1492
|
-
? item.totalUomValue
|
|
1493
|
-
: `${parseFloat(item.packQty * e.detail.uomValue).toFixed(2)} ${e.detail.uom}`
|
|
1494
|
-
: null
|
|
1495
|
-
}
|
|
1496
|
-
})
|
|
1497
|
-
|
|
1498
|
-
this.productData = {
|
|
1499
|
-
...this.productData,
|
|
1500
|
-
records: [...this.productGrist.dirtyData.records]
|
|
1501
|
-
}
|
|
1502
|
-
} else {
|
|
1503
|
-
this.productData = {
|
|
1504
|
-
...this.productData,
|
|
1505
|
-
records: [...this.productGrist.dirtyData.records, e.detail]
|
|
1506
|
-
}
|
|
1507
|
-
}
|
|
1508
|
-
}}"
|
|
1509
|
-
></select-product-popup>
|
|
1510
|
-
`,
|
|
1511
|
-
{
|
|
1512
|
-
backdrop: true,
|
|
1513
|
-
size: 'large',
|
|
1514
|
-
title: i18next.t('title.select_item')
|
|
1515
|
-
}
|
|
1516
|
-
)
|
|
1517
|
-
} else {
|
|
1518
|
-
this._showToast({ message: i18next.t('text.company_selection_is_empty') })
|
|
1519
|
-
}
|
|
1520
|
-
}
|
|
1521
|
-
|
|
1522
1479
|
async _exportableData() {
|
|
1523
1480
|
try {
|
|
1524
1481
|
var headerSetting = [
|
|
@@ -1569,10 +1526,6 @@ class PurchaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1569
1526
|
primaryUnit
|
|
1570
1527
|
primaryValue
|
|
1571
1528
|
}
|
|
1572
|
-
productDetail {
|
|
1573
|
-
id
|
|
1574
|
-
name
|
|
1575
|
-
}
|
|
1576
1529
|
}
|
|
1577
1530
|
}
|
|
1578
1531
|
`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/sales-ui",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.89",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -24,15 +24,15 @@
|
|
|
24
24
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@things-factory/code-base": "^4.3.
|
|
28
|
-
"@things-factory/form-ui": "^4.3.
|
|
29
|
-
"@things-factory/grist-ui": "^4.3.
|
|
30
|
-
"@things-factory/i18n-base": "^4.3.
|
|
31
|
-
"@things-factory/import-ui": "^4.3.
|
|
32
|
-
"@things-factory/sales-base": "^4.3.
|
|
33
|
-
"@things-factory/setting-ui": "^4.3.
|
|
34
|
-
"@things-factory/shell": "^4.3.
|
|
35
|
-
"@things-factory/warehouse-ui": "^4.3.
|
|
27
|
+
"@things-factory/code-base": "^4.3.86",
|
|
28
|
+
"@things-factory/form-ui": "^4.3.86",
|
|
29
|
+
"@things-factory/grist-ui": "^4.3.86",
|
|
30
|
+
"@things-factory/i18n-base": "^4.3.86",
|
|
31
|
+
"@things-factory/import-ui": "^4.3.86",
|
|
32
|
+
"@things-factory/sales-base": "^4.3.89",
|
|
33
|
+
"@things-factory/setting-ui": "^4.3.86",
|
|
34
|
+
"@things-factory/shell": "^4.3.86",
|
|
35
|
+
"@things-factory/warehouse-ui": "^4.3.89"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "7bcc26bb32589c622ab05813a6b5012729aa3b9e"
|
|
38
38
|
}
|