法律法规、集团端

This commit is contained in:
caoqianming 2019-09-18 21:22:49 +08:00
parent 4df053163e
commit 3e7002c37f
2 changed files with 11 additions and 0 deletions

View File

@ -44,6 +44,15 @@ def makeqr4(data):
img.save(filepath)
return filepath
def makeqr_area(data):
upload_folder = 'media/qr_area'
if not os.path.exists(upload_folder):
os.mkdir(upload_folder)
img = qrcode.make(data=data)
filepath = os.path.join(upload_folder, data.split('=')[1]+'.png').replace('\\','/')
img.save(filepath)
return filepath
def drequipments(companyid,path):
wb = load_workbook(path)
sheet = wb.worksheets[0]

View File

@ -16,6 +16,8 @@
</input>
</div>
</form>
<div class="labeldiv">区域二维码</div>
<img id="qrcode" height=240px width=240px>
</div>
<script>
var id = {{id}}