ts-glitter 20.6.9 → 20.7.0
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/lowcode/Entry.js +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/cms-plugin/stock-history.js +75 -63
- package/lowcode/cms-plugin/stock-history.ts +390 -376
- package/lowcode/glitter-base/route/stock.ts +1 -0
- package/package.json +1 -1
- package/src/api-public/services/shopping.js +44 -40
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +67 -56
- package/src/api-public/services/stock.js +0 -3
- package/src/api-public/services/stock.js.map +1 -1
- package/src/api-public/services/stock.ts +3 -3
- package/src/app-project/ios/proshake/AppDelegate.swift +51 -7
- package/src/app-project/ios/proshake/Info.plist +11 -9
- package/src/app-project/ios/proshake/SceneDelegate.swift +18 -0
- package/src/app-project/ios/proshake/glitter-interface/BasicUtil.swift +43 -2
- package/src/app-project/ios/proshake/glitter-interface/Ecommerce.swift +56 -0
- package/src/app-project/ios/proshake.xcodeproj/project.xcworkspace/xcuserdata/jianzhi.wang.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/src/services/ios-project.js +12 -6
- package/src/services/ios-project.js.map +1 -1
- package/src/services/ios-project.ts +12 -6
|
@@ -269,13 +269,15 @@ export class StockHistory {
|
|
|
269
269
|
},
|
|
270
270
|
{
|
|
271
271
|
key: '總金額',
|
|
272
|
-
value: `<span class="fs-7">$ ${
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
272
|
+
value: `<span class="fs-7">$ ${dd.content.product_list
|
|
273
|
+
.reduce((sum, item) => {
|
|
274
|
+
if (dd.type === 'restocking') {
|
|
275
|
+
return sum + item.cost * (item.transfer_count ?? 0);
|
|
276
|
+
} else {
|
|
277
|
+
return sum + item.cost * (item.recent_count ?? 0);
|
|
278
|
+
}
|
|
279
|
+
}, 0)
|
|
280
|
+
.toLocaleString()}</span>`,
|
|
279
281
|
},
|
|
280
282
|
{
|
|
281
283
|
key: '供應商',
|
|
@@ -1125,20 +1127,20 @@ export class StockHistory {
|
|
|
1125
1127
|
filter: [],
|
|
1126
1128
|
hiddenPageSplit: true,
|
|
1127
1129
|
}),
|
|
1128
|
-
html
|
|
1130
|
+
html` <div
|
|
1129
1131
|
class="w-100 d-flex align-items-center justify-content-center cursor_pointer"
|
|
1130
1132
|
style="color: #36B; font-size: 16px; font-weight: 400;"
|
|
1131
1133
|
onclick="${gvc.event(() => {
|
|
1132
1134
|
BgProduct.productsDialog({
|
|
1133
1135
|
gvc: gvc,
|
|
1134
|
-
default:
|
|
1135
|
-
with_variants:true,
|
|
1136
|
+
default: dvm.variantIds,
|
|
1137
|
+
with_variants: true,
|
|
1136
1138
|
callback: async value => {
|
|
1137
|
-
dvm.variantIds=value
|
|
1139
|
+
dvm.variantIds = value;
|
|
1138
1140
|
gvc.notifyDataChange(dvm.tableId);
|
|
1139
|
-
|
|
1141
|
+
// alert(JSON.stringify(value))
|
|
1140
1142
|
},
|
|
1141
|
-
})
|
|
1143
|
+
});
|
|
1142
1144
|
// BgWidget.variantDialog({
|
|
1143
1145
|
// gvc,
|
|
1144
1146
|
// title: '搜尋商品',
|
|
@@ -1218,7 +1220,7 @@ export class StockHistory {
|
|
|
1218
1220
|
filter: [],
|
|
1219
1221
|
hiddenPageSplit: true,
|
|
1220
1222
|
}),
|
|
1221
|
-
html
|
|
1223
|
+
html` <div
|
|
1222
1224
|
class="w-100 d-flex align-items-center justify-content-center cursor_pointer"
|
|
1223
1225
|
style="color: #36B; font-size: 16px; font-weight: 400;"
|
|
1224
1226
|
onclick="${gvc.event(() => {
|
|
@@ -1787,13 +1789,13 @@ export class StockHistory {
|
|
|
1787
1789
|
className?: string;
|
|
1788
1790
|
incompletion?: boolean;
|
|
1789
1791
|
}) => {
|
|
1790
|
-
return html
|
|
1792
|
+
return html` <div class="d-flex w-100 mb-2">
|
|
1791
1793
|
<div class="flex-fill"></div>
|
|
1792
1794
|
<div class="d-flex justify-content-between" style="width: 250px;">
|
|
1793
1795
|
<div class="${obj.className ?? ''}">${obj.name}</div>
|
|
1794
1796
|
${obj.incompletion
|
|
1795
|
-
? html
|
|
1796
|
-
: html
|
|
1797
|
+
? html` <div style="color: #8D8D8D">商品尚未核對完成</div>`
|
|
1798
|
+
: html` <div class="${obj.className ?? ''}">$ ${obj.price.toLocaleString()}</div>`}
|
|
1797
1799
|
</div>
|
|
1798
1800
|
</div>`;
|
|
1799
1801
|
};
|
|
@@ -1830,7 +1832,7 @@ export class StockHistory {
|
|
|
1830
1832
|
return a.time > b.time ? -1 : 1;
|
|
1831
1833
|
})
|
|
1832
1834
|
.map(log => {
|
|
1833
|
-
return html
|
|
1835
|
+
return html` <div class="d-flex justify-content-between align-items-center mt-2">
|
|
1834
1836
|
<div class="d-flex align-items-center">
|
|
1835
1837
|
<div class="me-3">${log.time}</div>
|
|
1836
1838
|
<div class="me-1">${log.text}</div>
|
|
@@ -1912,69 +1914,70 @@ export class StockHistory {
|
|
|
1912
1914
|
switch (vm.type) {
|
|
1913
1915
|
case 'restocking':
|
|
1914
1916
|
return [
|
|
1915
|
-
html
|
|
1916
|
-
<div class="
|
|
1917
|
-
<div class="
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
(
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
(
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
<div>
|
|
1959
|
-
<
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
gvc2.
|
|
1976
|
-
|
|
1977
|
-
|
|
1917
|
+
html`
|
|
1918
|
+
<div class="row">
|
|
1919
|
+
<div class="col-12 col-md-6">
|
|
1920
|
+
<div class="tx_normal">供應商</div>
|
|
1921
|
+
${BgWidget.mbContainer(8)}
|
|
1922
|
+
${gvc.bindView(
|
|
1923
|
+
(() => {
|
|
1924
|
+
const id = glitter.getUUID();
|
|
1925
|
+
let dataList: any[] = [];
|
|
1926
|
+
let loading = true;
|
|
1927
|
+
return {
|
|
1928
|
+
bind: id,
|
|
1929
|
+
view: () => {
|
|
1930
|
+
if (loading) {
|
|
1931
|
+
return BgWidget.spinner({
|
|
1932
|
+
container: { style: 'margin-top: 0;' },
|
|
1933
|
+
circle: { visible: false },
|
|
1934
|
+
});
|
|
1935
|
+
} else {
|
|
1936
|
+
return BgWidget.selectOptionAndClickEvent({
|
|
1937
|
+
gvc: gvc,
|
|
1938
|
+
default: vm.data.content.vendor ?? '',
|
|
1939
|
+
options: dataList.map(item => {
|
|
1940
|
+
return {
|
|
1941
|
+
key: item.id,
|
|
1942
|
+
value: item.name,
|
|
1943
|
+
note: item.address,
|
|
1944
|
+
};
|
|
1945
|
+
}),
|
|
1946
|
+
showNote: BgWidget.grayNote(
|
|
1947
|
+
(() => {
|
|
1948
|
+
const d = dataList.find(item => {
|
|
1949
|
+
return item.id === vm.data.content.vendor;
|
|
1950
|
+
});
|
|
1951
|
+
return d ? d.address : '';
|
|
1952
|
+
})(),
|
|
1953
|
+
'margin: 0 4px;'
|
|
1954
|
+
),
|
|
1955
|
+
callback: data => {
|
|
1956
|
+
vm.data.content.vendor = data ? data.key : '';
|
|
1957
|
+
gvc.notifyDataChange(id);
|
|
1958
|
+
},
|
|
1959
|
+
clickElement: {
|
|
1960
|
+
html: html` <div>新增供應商</div>
|
|
1961
|
+
<div>
|
|
1962
|
+
<i
|
|
1963
|
+
class="fa-solid fa-plus ps-2"
|
|
1964
|
+
style="font-size: 16px; height: 14px; width: 14px;"
|
|
1965
|
+
></i>
|
|
1966
|
+
</div>`,
|
|
1967
|
+
event: gvc2 => {
|
|
1968
|
+
const newVendorData = StockVendors.emptyData();
|
|
1969
|
+
BgWidget.settingDialog({
|
|
1970
|
+
gvc: gvc2,
|
|
1971
|
+
title: '新增供應點',
|
|
1972
|
+
innerHTML: gvc2 => {
|
|
1973
|
+
return StockHistory.vendorForm(gvc2, newVendorData);
|
|
1974
|
+
},
|
|
1975
|
+
footer_html: gvc2 => {
|
|
1976
|
+
return `${BgWidget.cancel(
|
|
1977
|
+
gvc2.event(() => {
|
|
1978
|
+
gvc2.closeDialog();
|
|
1979
|
+
})
|
|
1980
|
+
)}
|
|
1978
1981
|
${BgWidget.save(
|
|
1979
1982
|
gvc2.event(() => {
|
|
1980
1983
|
StockVendors.verifyStoreForm(
|
|
@@ -1991,91 +1994,91 @@ export class StockHistory {
|
|
|
1991
1994
|
}),
|
|
1992
1995
|
'完成'
|
|
1993
1996
|
)}`;
|
|
1994
|
-
|
|
1995
|
-
|
|
1997
|
+
},
|
|
1998
|
+
});
|
|
1999
|
+
},
|
|
1996
2000
|
},
|
|
1997
|
-
}
|
|
1998
|
-
}
|
|
1999
|
-
}
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
loading = false;
|
|
2009
|
-
gvc.notifyDataChange(id);
|
|
2010
|
-
});
|
|
2011
|
-
}
|
|
2012
|
-
},
|
|
2013
|
-
};
|
|
2014
|
-
})()
|
|
2015
|
-
)}
|
|
2016
|
-
</div>
|
|
2017
|
-
<div class="col-12 col-md-6">
|
|
2018
|
-
<div class="tx_normal">庫存點</div>
|
|
2019
|
-
${BgWidget.mbContainer(8)}
|
|
2020
|
-
${gvc.bindView(
|
|
2021
|
-
(() => {
|
|
2022
|
-
const id = glitter.getUUID();
|
|
2023
|
-
let dataList: any[] = [];
|
|
2024
|
-
let loading = true;
|
|
2025
|
-
return {
|
|
2026
|
-
bind: id,
|
|
2027
|
-
view: () => {
|
|
2028
|
-
if (loading) {
|
|
2029
|
-
return BgWidget.spinner({
|
|
2030
|
-
container: { style: 'margin-top: 0;' },
|
|
2031
|
-
circle: { visible: false },
|
|
2032
|
-
});
|
|
2033
|
-
} else {
|
|
2034
|
-
return BgWidget.selectOptionAndClickEvent({
|
|
2035
|
-
gvc: gvc,
|
|
2036
|
-
default: vm.data.content.store_in ?? '',
|
|
2037
|
-
options: dataList.map(item => {
|
|
2038
|
-
return {
|
|
2039
|
-
key: item.id,
|
|
2040
|
-
value: item.name,
|
|
2041
|
-
note: item.address,
|
|
2042
|
-
};
|
|
2043
|
-
}),
|
|
2044
|
-
showNote: BgWidget.grayNote(
|
|
2045
|
-
(() => {
|
|
2046
|
-
const d = dataList.find(item => {
|
|
2047
|
-
return item.id === vm.data.content.store_in;
|
|
2048
|
-
});
|
|
2049
|
-
return d ? d.address : '';
|
|
2050
|
-
})(),
|
|
2051
|
-
'margin: 0 4px;'
|
|
2052
|
-
),
|
|
2053
|
-
callback: data => {
|
|
2054
|
-
vm.data.content.store_in = data ? data.key : '';
|
|
2001
|
+
});
|
|
2002
|
+
}
|
|
2003
|
+
},
|
|
2004
|
+
divCreate: {},
|
|
2005
|
+
onCreate: () => {
|
|
2006
|
+
if (loading) {
|
|
2007
|
+
ApiUser.getPublicConfig('vendor_manager', 'manager').then((dd: any) => {
|
|
2008
|
+
if (dd.result && dd.response.value) {
|
|
2009
|
+
dataList = dd.response.value.list;
|
|
2010
|
+
}
|
|
2011
|
+
loading = false;
|
|
2055
2012
|
gvc.notifyDataChange(id);
|
|
2056
|
-
}
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2013
|
+
});
|
|
2014
|
+
}
|
|
2015
|
+
},
|
|
2016
|
+
};
|
|
2017
|
+
})()
|
|
2018
|
+
)}
|
|
2019
|
+
</div>
|
|
2020
|
+
<div class="col-12 col-md-6">
|
|
2021
|
+
<div class="tx_normal">庫存點</div>
|
|
2022
|
+
${BgWidget.mbContainer(8)}
|
|
2023
|
+
${gvc.bindView(
|
|
2024
|
+
(() => {
|
|
2025
|
+
const id = glitter.getUUID();
|
|
2026
|
+
let dataList: any[] = [];
|
|
2027
|
+
let loading = true;
|
|
2028
|
+
return {
|
|
2029
|
+
bind: id,
|
|
2030
|
+
view: () => {
|
|
2031
|
+
if (loading) {
|
|
2032
|
+
return BgWidget.spinner({
|
|
2033
|
+
container: { style: 'margin-top: 0;' },
|
|
2034
|
+
circle: { visible: false },
|
|
2035
|
+
});
|
|
2036
|
+
} else {
|
|
2037
|
+
return BgWidget.selectOptionAndClickEvent({
|
|
2038
|
+
gvc: gvc,
|
|
2039
|
+
default: vm.data.content.store_in ?? '',
|
|
2040
|
+
options: dataList.map(item => {
|
|
2041
|
+
return {
|
|
2042
|
+
key: item.id,
|
|
2043
|
+
value: item.name,
|
|
2044
|
+
note: item.address,
|
|
2045
|
+
};
|
|
2046
|
+
}),
|
|
2047
|
+
showNote: BgWidget.grayNote(
|
|
2048
|
+
(() => {
|
|
2049
|
+
const d = dataList.find(item => {
|
|
2050
|
+
return item.id === vm.data.content.store_in;
|
|
2051
|
+
});
|
|
2052
|
+
return d ? d.address : '';
|
|
2053
|
+
})(),
|
|
2054
|
+
'margin: 0 4px;'
|
|
2055
|
+
),
|
|
2056
|
+
callback: data => {
|
|
2057
|
+
vm.data.content.store_in = data ? data.key : '';
|
|
2058
|
+
gvc.notifyDataChange(id);
|
|
2059
|
+
},
|
|
2060
|
+
clickElement: {
|
|
2061
|
+
html: html` <div>新增庫存點</div>
|
|
2062
|
+
<div>
|
|
2063
|
+
<i
|
|
2064
|
+
class="fa-solid fa-plus ps-2"
|
|
2065
|
+
style="font-size: 16px; height: 14px; width: 14px;"
|
|
2066
|
+
></i>
|
|
2067
|
+
</div>`,
|
|
2068
|
+
event: gvc2 => {
|
|
2069
|
+
const newStoreData = StockStores.emptyData();
|
|
2070
|
+
BgWidget.settingDialog({
|
|
2071
|
+
gvc: gvc2,
|
|
2072
|
+
title: '新增庫存點',
|
|
2073
|
+
innerHTML: gvc2 => {
|
|
2074
|
+
return StockHistory.storeForm(gvc2, newStoreData);
|
|
2075
|
+
},
|
|
2076
|
+
footer_html: gvc2 => {
|
|
2077
|
+
return `${BgWidget.cancel(
|
|
2078
|
+
gvc2.event(() => {
|
|
2079
|
+
gvc2.closeDialog();
|
|
2080
|
+
})
|
|
2081
|
+
)}
|
|
2079
2082
|
${BgWidget.save(
|
|
2080
2083
|
gvc2.event(() => {
|
|
2081
2084
|
StockStores.verifyStoreForm(
|
|
@@ -2092,219 +2095,224 @@ export class StockHistory {
|
|
|
2092
2095
|
}),
|
|
2093
2096
|
'完成'
|
|
2094
2097
|
)}`;
|
|
2095
|
-
|
|
2096
|
-
|
|
2098
|
+
},
|
|
2099
|
+
});
|
|
2100
|
+
},
|
|
2097
2101
|
},
|
|
2098
|
-
}
|
|
2099
|
-
}
|
|
2100
|
-
}
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
}
|
|
2112
|
-
}
|
|
2113
|
-
}
|
|
2114
|
-
}
|
|
2115
|
-
}
|
|
2116
|
-
|
|
2102
|
+
});
|
|
2103
|
+
}
|
|
2104
|
+
},
|
|
2105
|
+
divCreate: {},
|
|
2106
|
+
onCreate: () => {
|
|
2107
|
+
if (loading) {
|
|
2108
|
+
ApiUser.getPublicConfig('store_manager', 'manager').then((dd: any) => {
|
|
2109
|
+
if (dd.result && dd.response.value) {
|
|
2110
|
+
dataList = dd.response.value.list;
|
|
2111
|
+
}
|
|
2112
|
+
loading = false;
|
|
2113
|
+
gvc.notifyDataChange(id);
|
|
2114
|
+
});
|
|
2115
|
+
}
|
|
2116
|
+
},
|
|
2117
|
+
};
|
|
2118
|
+
})()
|
|
2119
|
+
)}
|
|
2120
|
+
</div>
|
|
2117
2121
|
</div>
|
|
2118
|
-
|
|
2122
|
+
`,
|
|
2119
2123
|
];
|
|
2120
2124
|
case 'transfer':
|
|
2121
2125
|
return [
|
|
2122
|
-
html
|
|
2123
|
-
<div class="
|
|
2124
|
-
<div class="
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
(
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
(
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2126
|
+
html`
|
|
2127
|
+
<div class="row">
|
|
2128
|
+
<div class="col-12 col-md-6">
|
|
2129
|
+
<div class="tx_normal">調出庫存點</div>
|
|
2130
|
+
${BgWidget.mbContainer(8)}
|
|
2131
|
+
${gvc.bindView(
|
|
2132
|
+
(() => {
|
|
2133
|
+
const id = glitter.getUUID();
|
|
2134
|
+
let dataList: any[] = [];
|
|
2135
|
+
let loading = true;
|
|
2136
|
+
return {
|
|
2137
|
+
bind: id,
|
|
2138
|
+
view: () => {
|
|
2139
|
+
if (loading) {
|
|
2140
|
+
return BgWidget.spinner({
|
|
2141
|
+
container: { style: 'margin-top: 0;' },
|
|
2142
|
+
circle: { visible: false },
|
|
2143
|
+
});
|
|
2144
|
+
} else {
|
|
2145
|
+
return BgWidget.selectOptionAndClickEvent({
|
|
2146
|
+
gvc: gvc,
|
|
2147
|
+
default: vm.data.content.store_out ?? '',
|
|
2148
|
+
options: dataList.map(item => {
|
|
2149
|
+
return {
|
|
2150
|
+
key: item.id,
|
|
2151
|
+
value: item.name,
|
|
2152
|
+
note: item.address,
|
|
2153
|
+
};
|
|
2154
|
+
}),
|
|
2155
|
+
showNote: BgWidget.grayNote(
|
|
2156
|
+
(() => {
|
|
2157
|
+
const d = dataList.find(item => {
|
|
2158
|
+
return item.id === vm.data.content.store_out;
|
|
2159
|
+
});
|
|
2160
|
+
return d ? d.address : '';
|
|
2161
|
+
})(),
|
|
2162
|
+
'margin: 0 4px;'
|
|
2163
|
+
),
|
|
2164
|
+
callback: data => {
|
|
2165
|
+
vm.data.content.store_out = data ? data.key : '';
|
|
2166
|
+
gvc.notifyDataChange(id);
|
|
2167
|
+
},
|
|
2168
|
+
});
|
|
2169
|
+
}
|
|
2170
|
+
},
|
|
2171
|
+
divCreate: {},
|
|
2172
|
+
onCreate: () => {
|
|
2173
|
+
if (loading) {
|
|
2174
|
+
ApiUser.getPublicConfig('store_manager', 'manager').then((dd: any) => {
|
|
2175
|
+
if (dd.result && dd.response.value) {
|
|
2176
|
+
dataList = dd.response.value.list;
|
|
2177
|
+
}
|
|
2178
|
+
loading = false;
|
|
2161
2179
|
gvc.notifyDataChange(id);
|
|
2162
|
-
}
|
|
2163
|
-
}
|
|
2164
|
-
}
|
|
2165
|
-
}
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2180
|
+
});
|
|
2181
|
+
}
|
|
2182
|
+
},
|
|
2183
|
+
};
|
|
2184
|
+
})()
|
|
2185
|
+
)}
|
|
2186
|
+
</div>
|
|
2187
|
+
<div class="col-12 col-md-6">
|
|
2188
|
+
<div class="tx_normal">調入庫存點</div>
|
|
2189
|
+
${BgWidget.mbContainer(8)}
|
|
2190
|
+
${gvc.bindView(
|
|
2191
|
+
(() => {
|
|
2192
|
+
const id = glitter.getUUID();
|
|
2193
|
+
let dataList: any[] = [];
|
|
2194
|
+
let loading = true;
|
|
2195
|
+
return {
|
|
2196
|
+
bind: id,
|
|
2197
|
+
view: () => {
|
|
2198
|
+
if (loading) {
|
|
2199
|
+
return BgWidget.spinner({
|
|
2200
|
+
container: { style: 'margin-top: 0;' },
|
|
2201
|
+
circle: { visible: false },
|
|
2202
|
+
});
|
|
2203
|
+
} else {
|
|
2204
|
+
return BgWidget.selectOptionAndClickEvent({
|
|
2205
|
+
gvc: gvc,
|
|
2206
|
+
default: vm.data.content.store_in ?? '',
|
|
2207
|
+
options: dataList.map(item => {
|
|
2208
|
+
return {
|
|
2209
|
+
key: item.id,
|
|
2210
|
+
value: item.name,
|
|
2211
|
+
note: item.address,
|
|
2212
|
+
};
|
|
2213
|
+
}),
|
|
2214
|
+
showNote: BgWidget.grayNote(
|
|
2215
|
+
(() => {
|
|
2216
|
+
const d = dataList.find(item => {
|
|
2217
|
+
return item.id === vm.data.content.store_in;
|
|
2218
|
+
});
|
|
2219
|
+
return d ? d.address : '';
|
|
2220
|
+
})(),
|
|
2221
|
+
'margin: 0 4px;'
|
|
2222
|
+
),
|
|
2223
|
+
callback: data => {
|
|
2224
|
+
vm.data.content.store_in = data ? data.key : '';
|
|
2225
|
+
gvc.notifyDataChange(id);
|
|
2226
|
+
},
|
|
2227
|
+
});
|
|
2228
|
+
}
|
|
2229
|
+
},
|
|
2230
|
+
divCreate: {},
|
|
2231
|
+
onCreate: () => {
|
|
2232
|
+
if (loading) {
|
|
2233
|
+
ApiUser.getPublicConfig('store_manager', 'manager').then((dd: any) => {
|
|
2234
|
+
if (dd.result && dd.response.value) {
|
|
2235
|
+
dataList = dd.response.value.list;
|
|
2236
|
+
}
|
|
2237
|
+
loading = false;
|
|
2220
2238
|
gvc.notifyDataChange(id);
|
|
2221
|
-
}
|
|
2222
|
-
}
|
|
2223
|
-
}
|
|
2224
|
-
}
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
ApiUser.getPublicConfig('store_manager', 'manager').then((dd: any) => {
|
|
2229
|
-
if (dd.result && dd.response.value) {
|
|
2230
|
-
dataList = dd.response.value.list;
|
|
2231
|
-
}
|
|
2232
|
-
loading = false;
|
|
2233
|
-
gvc.notifyDataChange(id);
|
|
2234
|
-
});
|
|
2235
|
-
}
|
|
2236
|
-
},
|
|
2237
|
-
};
|
|
2238
|
-
})()
|
|
2239
|
-
)}
|
|
2239
|
+
});
|
|
2240
|
+
}
|
|
2241
|
+
},
|
|
2242
|
+
};
|
|
2243
|
+
})()
|
|
2244
|
+
)}
|
|
2245
|
+
</div>
|
|
2240
2246
|
</div>
|
|
2241
|
-
|
|
2247
|
+
`,
|
|
2242
2248
|
];
|
|
2243
2249
|
case 'checking':
|
|
2244
2250
|
return [
|
|
2245
|
-
html
|
|
2246
|
-
<div class="
|
|
2247
|
-
<div class="
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
(
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
(
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2251
|
+
html`
|
|
2252
|
+
<div class="row">
|
|
2253
|
+
<div class="col-12 col-md-6">
|
|
2254
|
+
<div class="tx_normal">盤點庫存點</div>
|
|
2255
|
+
${BgWidget.mbContainer(8)}
|
|
2256
|
+
${gvc.bindView(
|
|
2257
|
+
(() => {
|
|
2258
|
+
const id = glitter.getUUID();
|
|
2259
|
+
let dataList: any[] = [];
|
|
2260
|
+
let loading = true;
|
|
2261
|
+
return {
|
|
2262
|
+
bind: id,
|
|
2263
|
+
view: () => {
|
|
2264
|
+
if (loading) {
|
|
2265
|
+
return BgWidget.spinner({
|
|
2266
|
+
container: { style: 'margin-top: 0;' },
|
|
2267
|
+
circle: { visible: false },
|
|
2268
|
+
});
|
|
2269
|
+
} else {
|
|
2270
|
+
return BgWidget.selectOptionAndClickEvent({
|
|
2271
|
+
gvc: gvc,
|
|
2272
|
+
default: vm.data.content.store_out ?? '',
|
|
2273
|
+
options: dataList.map(item => {
|
|
2274
|
+
return {
|
|
2275
|
+
key: item.id,
|
|
2276
|
+
value: item.name,
|
|
2277
|
+
note: item.address,
|
|
2278
|
+
};
|
|
2279
|
+
}),
|
|
2280
|
+
showNote: BgWidget.grayNote(
|
|
2281
|
+
(() => {
|
|
2282
|
+
const d = dataList.find(item => {
|
|
2283
|
+
return item.id === vm.data.content.store_out;
|
|
2284
|
+
});
|
|
2285
|
+
return d ? d.address : '';
|
|
2286
|
+
})(),
|
|
2287
|
+
'margin: 0 4px;'
|
|
2288
|
+
),
|
|
2289
|
+
callback: data => {
|
|
2290
|
+
vm.data.content.store_out = data ? data.key : '';
|
|
2291
|
+
gvc.notifyDataChange(id);
|
|
2292
|
+
vm.data.content.check_according = '';
|
|
2293
|
+
gvc.notifyDataChange(dvm.tableId);
|
|
2294
|
+
},
|
|
2295
|
+
});
|
|
2296
|
+
}
|
|
2297
|
+
},
|
|
2298
|
+
divCreate: {},
|
|
2299
|
+
onCreate: () => {
|
|
2300
|
+
if (loading) {
|
|
2301
|
+
ApiUser.getPublicConfig('store_manager', 'manager').then((dd: any) => {
|
|
2302
|
+
if (dd.result && dd.response.value) {
|
|
2303
|
+
dataList = dd.response.value.list;
|
|
2304
|
+
}
|
|
2305
|
+
loading = false;
|
|
2284
2306
|
gvc.notifyDataChange(id);
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
onCreate: () => {
|
|
2293
|
-
if (loading) {
|
|
2294
|
-
ApiUser.getPublicConfig('store_manager', 'manager').then((dd: any) => {
|
|
2295
|
-
if (dd.result && dd.response.value) {
|
|
2296
|
-
dataList = dd.response.value.list;
|
|
2297
|
-
}
|
|
2298
|
-
loading = false;
|
|
2299
|
-
gvc.notifyDataChange(id);
|
|
2300
|
-
});
|
|
2301
|
-
}
|
|
2302
|
-
},
|
|
2303
|
-
};
|
|
2304
|
-
})()
|
|
2305
|
-
)}
|
|
2307
|
+
});
|
|
2308
|
+
}
|
|
2309
|
+
},
|
|
2310
|
+
};
|
|
2311
|
+
})()
|
|
2312
|
+
)}
|
|
2313
|
+
</div>
|
|
2306
2314
|
</div>
|
|
2307
|
-
|
|
2315
|
+
`,
|
|
2308
2316
|
];
|
|
2309
2317
|
}
|
|
2310
2318
|
}
|
|
@@ -2633,9 +2641,9 @@ export class StockHistory {
|
|
|
2633
2641
|
}
|
|
2634
2642
|
|
|
2635
2643
|
static vendorForm(gvc: GVC, data: VendorData) {
|
|
2636
|
-
return html
|
|
2644
|
+
return html` <div class="row">
|
|
2637
2645
|
${[
|
|
2638
|
-
html
|
|
2646
|
+
html` <div class="tx_normal">供應商名稱</div>
|
|
2639
2647
|
${BgWidget.mbContainer(4)}
|
|
2640
2648
|
${BgWidget.editeInput({
|
|
2641
2649
|
gvc: gvc,
|
|
@@ -2646,7 +2654,7 @@ export class StockHistory {
|
|
|
2646
2654
|
data.name = text;
|
|
2647
2655
|
},
|
|
2648
2656
|
})}`,
|
|
2649
|
-
html
|
|
2657
|
+
html` <div class="tx_normal">供應商地址</div>
|
|
2650
2658
|
${BgWidget.mbContainer(4)}
|
|
2651
2659
|
${BgWidget.editeInput({
|
|
2652
2660
|
gvc: gvc,
|
|
@@ -2657,7 +2665,7 @@ export class StockHistory {
|
|
|
2657
2665
|
data.address = text;
|
|
2658
2666
|
},
|
|
2659
2667
|
})}`,
|
|
2660
|
-
html
|
|
2668
|
+
html` <div class="tx_normal">聯絡人姓名</div>
|
|
2661
2669
|
${BgWidget.mbContainer(4)}
|
|
2662
2670
|
${BgWidget.editeInput({
|
|
2663
2671
|
gvc: gvc,
|
|
@@ -2668,7 +2676,7 @@ export class StockHistory {
|
|
|
2668
2676
|
data.manager_name = text;
|
|
2669
2677
|
},
|
|
2670
2678
|
})}`,
|
|
2671
|
-
html
|
|
2679
|
+
html` <div class="tx_normal">電話</div>
|
|
2672
2680
|
${BgWidget.mbContainer(4)}
|
|
2673
2681
|
${BgWidget.editeInput({
|
|
2674
2682
|
gvc: gvc,
|
|
@@ -2698,9 +2706,9 @@ export class StockHistory {
|
|
|
2698
2706
|
}
|
|
2699
2707
|
|
|
2700
2708
|
static storeForm(gvc: GVC, data: StoreData) {
|
|
2701
|
-
return html
|
|
2709
|
+
return html` <div class="row">
|
|
2702
2710
|
${[
|
|
2703
|
-
html
|
|
2711
|
+
html` <div class="tx_normal">庫存點名稱</div>
|
|
2704
2712
|
${BgWidget.mbContainer(4)}
|
|
2705
2713
|
${BgWidget.editeInput({
|
|
2706
2714
|
gvc: gvc,
|
|
@@ -2711,7 +2719,7 @@ export class StockHistory {
|
|
|
2711
2719
|
data.name = text;
|
|
2712
2720
|
},
|
|
2713
2721
|
})}`,
|
|
2714
|
-
html
|
|
2722
|
+
html` <div class="tx_normal">庫存點地址</div>
|
|
2715
2723
|
${BgWidget.mbContainer(4)}
|
|
2716
2724
|
${BgWidget.editeInput({
|
|
2717
2725
|
gvc: gvc,
|
|
@@ -2722,7 +2730,7 @@ export class StockHistory {
|
|
|
2722
2730
|
data.address = text;
|
|
2723
2731
|
},
|
|
2724
2732
|
})}`,
|
|
2725
|
-
html
|
|
2733
|
+
html` <div class="tx_normal">聯絡人姓名</div>
|
|
2726
2734
|
${BgWidget.mbContainer(4)}
|
|
2727
2735
|
${BgWidget.editeInput({
|
|
2728
2736
|
gvc: gvc,
|
|
@@ -2733,7 +2741,7 @@ export class StockHistory {
|
|
|
2733
2741
|
data.manager_name = text;
|
|
2734
2742
|
},
|
|
2735
2743
|
})}`,
|
|
2736
|
-
html
|
|
2744
|
+
html` <div class="tx_normal">電話</div>
|
|
2737
2745
|
${BgWidget.mbContainer(4)}
|
|
2738
2746
|
${BgWidget.editeInput({
|
|
2739
2747
|
gvc: gvc,
|
|
@@ -2877,7 +2885,7 @@ export class StockHistory {
|
|
|
2877
2885
|
|
|
2878
2886
|
return arr
|
|
2879
2887
|
.map(item => {
|
|
2880
|
-
return html
|
|
2888
|
+
return html` <div style="${document.body.clientWidth > 768 ? `width: ${item.width ?? 20}%;` : ''}">
|
|
2881
2889
|
<div class="tx_700" style="margin-bottom: 8px;">${item.title}</div>
|
|
2882
2890
|
<div class="tx_normal">${item.value}</div>
|
|
2883
2891
|
</div>`;
|
|
@@ -3451,6 +3459,7 @@ export class StockHistory {
|
|
|
3451
3459
|
cost: 0,
|
|
3452
3460
|
note: '',
|
|
3453
3461
|
transfer_count: 0,
|
|
3462
|
+
product_id:item.product_content.id,
|
|
3454
3463
|
check_count: 0,
|
|
3455
3464
|
...(origin ?? {}),
|
|
3456
3465
|
title: title,
|
|
@@ -3460,7 +3469,12 @@ export class StockHistory {
|
|
|
3460
3469
|
});
|
|
3461
3470
|
});
|
|
3462
3471
|
}
|
|
3463
|
-
|
|
3472
|
+
|
|
3473
|
+
callback( origins.filter((d1)=>{
|
|
3474
|
+
return !product_list.find((dd)=>{
|
|
3475
|
+
return d1.variant_id === dd.variant_id;
|
|
3476
|
+
})
|
|
3477
|
+
}).concat(product_list));
|
|
3464
3478
|
});
|
|
3465
3479
|
}
|
|
3466
3480
|
|