mirror of
https://github.com/GreaterWMS/GreaterWMS.git
synced 2026-06-19 07:36:00 +00:00
V2.1.48
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "GreaterWMS",
|
||||
"version": "2.1.47",
|
||||
"version": "2.1.48",
|
||||
"description": "GreaterWMS--Open Source Warehouse Management System",
|
||||
"productName": "GreaterWMS--Open Source Warehouse Management System",
|
||||
"author": "Elvis.Shi <Singosgu@gmail.com>",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<widget id="org.greaterwms.scanner.app" version="2.1.47" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<widget id="org.greaterwms.scanner.app" version="2.1.48" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<name>GWMS</name>
|
||||
<description>GreaterWMS--Open Source Warehouse Management System</description>
|
||||
<author email="singosgu@gmail.com" href="https://cordova.apache.org">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "org.greaterwms.scanner.app",
|
||||
"displayName": "GreaterWMS--Open Source Warehouse Management System",
|
||||
"version": "2.1.47",
|
||||
"version": "2.1.48",
|
||||
"description": "GreaterWMS--Open Source Warehouse Management System",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -73,8 +73,6 @@ export default defineComponent({
|
||||
const requestauth = ref(0)
|
||||
const submitdata = ref({})
|
||||
const dialogForm = ref(false)
|
||||
const options = ref([])
|
||||
const optionsChange = ref('')
|
||||
const { t } = useI18n()
|
||||
const fab1 = computed({
|
||||
get: () => $store.state.fabchange.fab1,
|
||||
@@ -173,7 +171,7 @@ export default defineComponent({
|
||||
}
|
||||
})
|
||||
|
||||
function sslCheck (e) {
|
||||
function sslCheck (e) {
|
||||
if (e !== null) {
|
||||
var baseurlCheck = baseurl.value.split(':')
|
||||
var urlCheck = e.split(':')
|
||||
@@ -311,39 +309,6 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function setOptions (e) {
|
||||
apiurl.value = baseurl.value + '/binset/?bin_name__icontains='
|
||||
axios.get(apiurl.value + e,
|
||||
{
|
||||
headers: {
|
||||
"Content-Type": 'application/json, charset="utf-8"',
|
||||
"token": openid.value,
|
||||
"language": lang.value,
|
||||
"operator": operator.value
|
||||
}
|
||||
}).then(res => {
|
||||
if (!res.data.detail) {
|
||||
var binlist = []
|
||||
options.value = []
|
||||
res.data.results.forEach(item => {
|
||||
binlist.push(item.bin_name)
|
||||
})
|
||||
options.value = binlist
|
||||
}
|
||||
}).catch(err => {
|
||||
$q.notify({
|
||||
type: 'negative',
|
||||
message: t('notice.mobile_scan.notice3')
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
watch (optionsChange,(newValue,oldValue)=>{
|
||||
if (newValue.length >= 2) {
|
||||
setOptions(newValue)
|
||||
}
|
||||
})
|
||||
|
||||
watch (bar_scanned,(newValue,oldValue)=>{
|
||||
if (scanmode.value === 'GOODS') {
|
||||
InitData('&goods_code=' + scandata.value)
|
||||
@@ -417,20 +382,7 @@ export default defineComponent({
|
||||
dataSubmit,
|
||||
cancelSubmitData,
|
||||
submitData,
|
||||
options,
|
||||
optionsChange,
|
||||
error1: t('notice.mobile_dn.notice16'),
|
||||
setOptions,
|
||||
filterFn (val, update, abort) {
|
||||
if (val.length < 2) {
|
||||
abort()
|
||||
return
|
||||
}
|
||||
update(() => {
|
||||
const needle = val.toLowerCase()
|
||||
optionsChange.value = needle
|
||||
})
|
||||
}
|
||||
error1: t('notice.mobile_dn.notice16')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class CustomerConfig(AppConfig):
|
||||
name = 'customer'
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from rest_framework_csv.renderers import CSVStreamingRenderer
|
||||
|
||||
|
||||
def file_headers():
|
||||
return [
|
||||
'customer_name',
|
||||
|
||||
@@ -113,6 +113,7 @@ class APIViewSet(viewsets.ModelViewSet):
|
||||
headers = self.get_success_headers(serializer.data)
|
||||
return Response(serializer.data, status=200, headers=headers)
|
||||
|
||||
|
||||
class FileDownloadView(viewsets.ModelViewSet):
|
||||
renderer_classes = (FileRenderCN, ) + tuple(api_settings.DEFAULT_RENDERER_CLASSES)
|
||||
filter_backends = [DjangoFilterBackend, OrderingFilter, ]
|
||||
|
||||
+6
-5
@@ -1792,13 +1792,14 @@ class DnPickedViewSet(viewsets.ModelViewSet):
|
||||
pick_qty_change.save()
|
||||
bin_qty_change.save()
|
||||
dn_detail.picked_qty = dn_detail.picked_qty + int(data['goodsData'][j].get('picked_qty'))
|
||||
if dn_detail.dn_status == 3:
|
||||
dn_detail.dn_status = 4
|
||||
if dn_detail.pick_qty > 0:
|
||||
dn_detail.pick_qty = 0
|
||||
dn_detail.save()
|
||||
if DnDetailModel.objects.filter(openid=self.request.auth.openid, dn_code=str(data['dn_code']), dn_status=3).exists() is False:
|
||||
qs.save()
|
||||
if PickingListModel.objects.filter(openid=self.request.auth.openid, dn_code=str(data['dn_code']), picking_status=0).exists():
|
||||
dn_detail.save()
|
||||
else:
|
||||
qs.save()
|
||||
dn_detail.dn_status = 4
|
||||
dn_detail.save()
|
||||
return Response({"Detail": "success"}, status=200)
|
||||
|
||||
class DnDispatchViewSet(viewsets.ModelViewSet):
|
||||
|
||||
@@ -161,7 +161,7 @@ MEDIA_ROOT = os.path.join(BASE_DIR, 'media').replace('\\', '/')
|
||||
SPECTACULAR_SETTINGS = {
|
||||
'TITLE': 'GreaterWMS',
|
||||
'DESCRIPTION': 'GreaterWMS API Documents',
|
||||
'VERSION': '2.1.37',
|
||||
'VERSION': '2.1.48',
|
||||
'SERVE_INCLUDE_SCHEMA': False,
|
||||
# OTHER SETTINGS
|
||||
'SWAGGER_UI_DIST': 'SIDECAR', # shorthand to use the sidecar instead
|
||||
|
||||
@@ -32,6 +32,7 @@ priority==1.3.0
|
||||
pyasn1==0.5.0
|
||||
pyasn1-modules==0.3.0
|
||||
pycparser==2.21
|
||||
PyJWT==2.8.0
|
||||
pyOpenSSL==23.1.1
|
||||
pyrsistent==0.19.3
|
||||
python-dateutil==2.8.2
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
<!DOCTYPE html><html><head><title>GreaterWMS--Open Source Warehouse Management System</title><meta charset=utf-8><meta name=description content="GreaterWMS--Open Source Warehouse Management System"><meta name=keywords content="greaterwms, 聚商汇wms,wms-system,open source wms system,开源wms,开源仓库管理软件,warehouse management system, free wms"><meta name=format-detection content="telephone=no"><meta name=msapplication-tap-highlight content=no><meta name=viewport content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width"><link rel=icon type=image/png href=statics/icons/logo.png><link href=css/vendor.2ac1ba6a.css rel=stylesheet><link href=css/app.45730797.css rel=stylesheet></head><body style="overflow-x: hidden; overflow-y: hidden"><div id=q-app></div><script src=js/vendor.5889acd2.js></script><script src=js/app.6797a795.js></script></body></html>
|
||||
<!DOCTYPE html><html><head><title>GreaterWMS--Open Source Warehouse Management System</title><meta charset=utf-8><meta name=description content="GreaterWMS--Open Source Warehouse Management System"><meta name=keywords content="greaterwms, 聚商汇wms,wms-system,open source wms system,开源wms,开源仓库管理软件,warehouse management system, free wms"><meta name=format-detection content="telephone=no"><meta name=msapplication-tap-highlight content=no><meta name=viewport content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width"><link rel=icon type=image/png href=statics/icons/logo.png><link href=css/vendor.2ac1ba6a.css rel=stylesheet><link href=css/app.45730797.css rel=stylesheet></head><body style="overflow-x: hidden; overflow-y: hidden"><div id=q-app></div><script src=js/vendor.5889acd2.js></script><script src=js/app.e38ad99e.js></script></body></html>
|
||||
-1
File diff suppressed because one or more lines are too long
BIN
Binary file not shown.
+1
File diff suppressed because one or more lines are too long
BIN
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "templates",
|
||||
"version": "2.1.47",
|
||||
"version": "2.1.48",
|
||||
"description": "GreaterWMS--Open Source Warehouse Management System",
|
||||
"productName": "GreaterWMS--Open Source Warehouse Management System",
|
||||
"author": "Elvis.Shi(elvis.shi@56yhz.com)",
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
import jwt
|
||||
import datetime
|
||||
from jwt import exceptions
|
||||
from django.conf import settings
|
||||
|
||||
JWT_SALT = "ds()udsjo@jlsdosjf)wjd_#(#)$"
|
||||
|
||||
|
||||
def create_token(payload):
|
||||
headers = {
|
||||
"type": "jwt",
|
||||
"alg": "HS256"
|
||||
}
|
||||
payload['exp'] = datetime.datetime.utcnow()
|
||||
result = jwt.encode(payload=payload, key=JWT_SALT, algorithm="HS256", headers=headers)
|
||||
return result
|
||||
|
||||
|
||||
def parse_payload(token):
|
||||
result = {"status": False, "data": None, "error": None}
|
||||
try:
|
||||
verified_payload = jwt.decode(token, JWT_SALT, algorithms="HS256", verify=True)
|
||||
result["status"] = True
|
||||
result['data'] = verified_payload
|
||||
except exceptions.ExpiredSignatureError:
|
||||
result['error'] = 'Token Expired'
|
||||
except jwt.DecodeError:
|
||||
result['error'] = 'Token Authentication Failed'
|
||||
except jwt.InvalidTokenError:
|
||||
result['error'] = 'Illegal Token'
|
||||
return result
|
||||
Reference in New Issue
Block a user