示例#1
0
def barcode_input(request):
    db, cur = db_set(request)
    # the above call makes the below call unnecessary now.  
    #request.session["local_toggle"]="/trakberry"
  
    part = request.session["barcode_part"]
    # db, cur = db_set(request)
    sql = "SELECT * FROM barcode"
    cur.execute(sql)
    tmp2 = cur.fetchall()


    if request.POST:
        bc1 = request.POST.get("barcode")
        request.session["barcode"] = bc1
        request.session["barcode_part_number"] = bc1[-4:]
        request.session["barcode_part_short"] = bc1[-2:]
        request.session["route_1"] = 'barcode_check'
        return direction(request)
    else:
		form = kiosk_dispForm1()
    args = {}
    args.update(csrf(request))
    args['form'] = form
    return render(request,"kiosk/barcode_input.html",{'args':args})
示例#2
0
def barcode_verify(request):
    if request.POST:
        bc = request.POST.get("barcode")
        request.session["barcode"] = bc
        request.session["route_1"] = 'barcode_verify_check'
        return direction(request)
    else:
		form = kiosk_dispForm1()
    args = {}
    args.update(csrf(request))
    args['form'] = form
    return render(request,"kiosk/barcode_verify.html",{'args':args})
def barcode_count(request):
	if request.POST:
		count1 = request.POST.get("skid_count")
		request.session["barcode_part"] = count1
		request.session["route_1"] = 'barcode_input'
		return direction(request)
	else:
		form = kiosk_dispForm1()
	args = {}
	args.update(csrf(request))
	args['form'] = form
	return render(request,"kiosk/barcode_count.html",{'args':args})
示例#4
0
def barcode_input_10R(request):

    part = request.session["barcode_part"]
    pn = request.session["barcode_part_number"]

    if request.POST:
        bc1 = request.POST.get("barcode")
        request.session["barcode"] = bc1
        request.session["barcode_part_number"] = bc1[-4:]

        request.session["route_1"] = 'barcode_check_10R'
        return direction(request)
    else:
		form = kiosk_dispForm1()
    args = {}
    args.update(csrf(request))
    args['form'] = form
    if pn == 'GM 9341':
      return render(request,"kiosk/barcode_input_10R_GM.html",{'args':args})
    elif pn == 'FORD 9341':
      return render(request,"kiosk/barcode_input_10R_FORD.html",{'args':args})
    return render(request,"kiosk/barcode_input_10R.html",{'args':args})