first push
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
{% extends 'layouts/main-layout.html' %} {% block content %}
|
||||
<div class="page-heading">
|
||||
<div class="page-title">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6 order-md-1 order-last">
|
||||
<h3>部门</h3>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 order-md-2 order-first">
|
||||
<nav
|
||||
aria-label="breadcrumb"
|
||||
class="breadcrumb-header float-start float-lg-end"
|
||||
>
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="/">Dashboard</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">Upload</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
Departments
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="section">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<!-- upload Modal -->
|
||||
<div class="modal fade text-left" id="upload-departments-modal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myModalLabel160" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div id="upload-departments-modal-content" class="modal-content" hx-target="this"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-end my-2 gap-2">
|
||||
<a
|
||||
type="button"
|
||||
class="btn btn-secondary rounded"
|
||||
class="btn-space"
|
||||
href="{% url 'upload:export_departments_csv' %}"
|
||||
><i class="bi bi-download"></i> Sample File
|
||||
</a>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-secondary rounded"
|
||||
hx-get="{% url 'upload:import_departments_csv' %}"
|
||||
hx-target="#upload-departments-modal-content"
|
||||
data-bs-target="#upload-departments-modal"
|
||||
data-bs-toggle="modal"
|
||||
>
|
||||
<i class="bi bi-upload"></i> Upload
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-secondary rounded"
|
||||
hx-get="{% url 'upload:import_vendors_csv' %}"
|
||||
hx-target="#upload-vendors-modal-content"
|
||||
data-bs-target="#upload-vendors-modal"
|
||||
data-bs-toggle="modal"
|
||||
>
|
||||
<i class="bi bi-upload"></i> NFC导入
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<table class="table table-hover" id="table1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>部门名称</th>
|
||||
<th>联系人姓名</th>
|
||||
<th>联系人邮箱</th>
|
||||
<th>联系人电话</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% if page_object %}
|
||||
<tbody>
|
||||
{% for department in page_object %}
|
||||
<tr>
|
||||
<td>{{page_object.start_index|add:forloop.counter0}}</td>
|
||||
<td>{{department.name}}</td>
|
||||
<td>{{department.contact_person_name}}</td>
|
||||
<td>{{department.contact_person_email}}</td>
|
||||
<td>{{department.contact_person_phone}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% else %}
|
||||
<div class="alert alert-info" role="alert">
|
||||
暂无记录
|
||||
</div>
|
||||
{% endif %}
|
||||
</table>
|
||||
{% include 'commons/pagination.html' %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
{% endblock content%}
|
||||
@@ -0,0 +1,95 @@
|
||||
{% extends 'layouts/main-layout.html' %}
|
||||
{% block content %}
|
||||
<div class="page-heading">
|
||||
<div class="page-title">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6 order-md-1 order-last">
|
||||
<h3>位置</h3>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 order-md-2 order-first">
|
||||
<nav aria-label="breadcrumb" class="breadcrumb-header float-start float-lg-end">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="/">Dashboard</a></li>
|
||||
<li class="breadcrumb-item">Upload</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Locations</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="section">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<!-- upload Modal -->
|
||||
<div class="modal fade text-left" id="upload-locations-modal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myModalLabel160" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div id="upload-locations-modal-content" class="modal-content" hx-target="this"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-end my-2 gap-2">
|
||||
<a
|
||||
type="button"
|
||||
class="btn btn-secondary rounded"
|
||||
class="btn-space"
|
||||
href="{% url 'upload:export_locations_csv' %}"
|
||||
><i class="bi bi-download"></i> Sample File
|
||||
</a>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-secondary rounded"
|
||||
hx-get="{% url 'upload:import_locations_csv' %}"
|
||||
hx-target="#upload-locations-modal-content"
|
||||
data-bs-target="#upload-locations-modal"
|
||||
data-bs-toggle="modal"
|
||||
>
|
||||
<i class="bi bi-upload"></i> Upload
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-secondary rounded"
|
||||
hx-get="{% url 'upload:import_vendors_csv' %}"
|
||||
hx-target="#upload-vendors-modal-content"
|
||||
data-bs-target="#upload-vendors-modal"
|
||||
data-bs-toggle="modal"
|
||||
>
|
||||
<i class="bi bi-upload"></i> NFC导入
|
||||
</button>
|
||||
</div>
|
||||
<table class="table table-hover" id="table1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>办公室名称</th>
|
||||
<th>联系人姓名</th>
|
||||
<th>省份</th>
|
||||
<th>城市</th>
|
||||
<th>邮政编码</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% if page_object %}
|
||||
<tbody>
|
||||
{% for location in page_object %}
|
||||
<tr>
|
||||
<td>{{page_object.start_index|add:forloop.counter0}}</td>
|
||||
<td>{{location.office_name}}</td>
|
||||
<td>{{location.contact_person_name}}</td>
|
||||
<td>{{location.address.state}}</td>
|
||||
<td>{{location.address.city}}</td>
|
||||
<td>{{location.address.pin_code}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% else %}
|
||||
<div class="alert alert-info" role="alert">
|
||||
暂无记录
|
||||
</div>
|
||||
{% endif %}
|
||||
</table>
|
||||
{% include 'commons/pagination.html' %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
{% endblock content%}
|
||||
@@ -0,0 +1,87 @@
|
||||
{% extends 'layouts/main-layout.html' %}
|
||||
{% block content %}
|
||||
<div class="page-heading">
|
||||
<div class="page-title">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6 order-md-1 order-last">
|
||||
<h3>产品类别</h3>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 order-md-2 order-first">
|
||||
<nav aria-label="breadcrumb" class="breadcrumb-header float-start float-lg-end">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="/">Dashboard</a></li>
|
||||
<li class="breadcrumb-item">Upload</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Product Categories</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="section">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<!-- upload Modal -->
|
||||
<div class="modal fade text-left" id="upload-product-catagories-modal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myModalLabel160" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div id="upload-product-catagories-modal-content" class="modal-content" hx-target="this"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-end my-2 gap-2">
|
||||
<a
|
||||
type="button"
|
||||
class="btn btn-secondary rounded"
|
||||
class="btn-space"
|
||||
href="{% url 'upload:export_product_categories_csv' %}"
|
||||
><i class="bi bi-download"></i> Sample File
|
||||
</a>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-secondary rounded"
|
||||
hx-get="{% url 'upload:import_product_catagories_csv' %}"
|
||||
hx-target="#upload-product-catagories-modal-content"
|
||||
data-bs-target="#upload-product-catagories-modal"
|
||||
data-bs-toggle="modal"
|
||||
>
|
||||
<i class="bi bi-upload"></i> Upload
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-secondary rounded"
|
||||
hx-get="{% url 'upload:import_vendors_csv' %}"
|
||||
hx-target="#upload-vendors-modal-content"
|
||||
data-bs-target="#upload-vendors-modal"
|
||||
data-bs-toggle="modal"
|
||||
>
|
||||
<i class="bi bi-upload"></i> NFC导入
|
||||
</button>
|
||||
</div>
|
||||
<table class="table table-hover" id="table1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>类别名称</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% if page_object %}
|
||||
<tbody>
|
||||
{% for product_category in page_object %}
|
||||
<tr>
|
||||
<td width="50%">{{page_object.start_index|add:forloop.counter0}}</td>
|
||||
<td width="50%">{{product_category.name}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% else %}
|
||||
<div class="alert alert-info" role="alert">
|
||||
暂无记录
|
||||
</div>
|
||||
{% endif %}
|
||||
</table>
|
||||
{% include 'commons/pagination.html' %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
{% endblock content%}
|
||||
@@ -0,0 +1,88 @@
|
||||
{% extends 'layouts/main-layout.html' %}
|
||||
{% block content %}
|
||||
<div class="page-heading">
|
||||
<div class="page-title">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6 order-md-1 order-last">
|
||||
<h3>产品类型</h3>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 order-md-2 order-first">
|
||||
<nav aria-label="breadcrumb" class="breadcrumb-header float-start float-lg-end">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="/">Dashboard</a></li>
|
||||
<li class="breadcrumb-item">Upload</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Product Types</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="section">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<!-- upload Modal -->
|
||||
<div class="modal fade text-left" id="upload-product-types-modal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myModalLabel160" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div id="upload-product-types-modal-content" class="modal-content" hx-target="this"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-end my-2 gap-2">
|
||||
<a
|
||||
type="button"
|
||||
class="btn btn-secondary rounded"
|
||||
class="btn-space"
|
||||
href="{% url 'upload:export_product_types_csv' %}"
|
||||
><i class="bi bi-download"></i> Sample File
|
||||
</a>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-secondary rounded"
|
||||
hx-get="{% url 'upload:import_product_types_csv' %}"
|
||||
hx-target="#upload-product-types-modal-content"
|
||||
data-bs-target="#upload-product-types-modal"
|
||||
data-bs-toggle="modal"
|
||||
>
|
||||
<i class="bi bi-upload"></i> Upload
|
||||
</button>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-secondary rounded"
|
||||
hx-get="{% url 'upload:import_vendors_csv' %}"
|
||||
hx-target="#upload-vendors-modal-content"
|
||||
data-bs-target="#upload-vendors-modal"
|
||||
data-bs-toggle="modal"
|
||||
>
|
||||
<i class="bi bi-upload"></i> NFC导入
|
||||
</button>
|
||||
</div>
|
||||
<table class="table table-hover" id="table1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>类型名称</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% if page_object %}
|
||||
<tbody>
|
||||
{% for product_type in page_object %}
|
||||
<tr>
|
||||
<td width="50%">{{page_object.start_index|add:forloop.counter0}}</td>
|
||||
<td width="50%">{{product_type.name}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% else %}
|
||||
<div class="alert alert-info" role="alert">
|
||||
暂无记录
|
||||
</div>
|
||||
{% endif %}
|
||||
</table>
|
||||
{% include 'commons/pagination.html' %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
{% endblock content%}
|
||||
@@ -0,0 +1,34 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-dark white">
|
||||
<span class="modal-title w-100 text-center" id="myModalLabel150">Upload {{page}}</span>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"
|
||||
aria-label="Close">
|
||||
</button>
|
||||
</div>
|
||||
<form action="{{request.path}}" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
<div class="modal-body">
|
||||
<div class="card">
|
||||
<div class="card-content py-0">
|
||||
<br class="card-body py-0 pt-2">
|
||||
<input class="form-control" type="file" id="formFile" name="file" accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel">
|
||||
<small>* 请选择一个 CSV 文件。</small> </br>
|
||||
<small>* 数据应为正确格式。</small> </br>
|
||||
<small>* 数据行数不应超过 100 行。</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-sm btn-light-secondary"
|
||||
data-bs-dismiss="modal">
|
||||
<i class="bx bx-x d-block d-sm-none"></i>
|
||||
<span class="d-none d-sm-block">关闭</span>
|
||||
</button>
|
||||
<button type="submit" class="btn btn-sm btn-info ml-1"
|
||||
onclick="this.innerHTML = `<span class='spinner-grow spinner-grow-sm' role='status' aria-hidden='true'></span> Uploading...`;">
|
||||
<i class="bx bx-check d-block d-sm-none"></i>
|
||||
<span class="d-none d-sm-block">上传</span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -0,0 +1,104 @@
|
||||
{% extends 'layouts/main-layout.html' %} {% block content %}
|
||||
<div class="page-heading">
|
||||
<div class="page-title">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6 order-md-1 order-last">
|
||||
<h3>供应商</h3>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 order-md-2 order-first">
|
||||
<nav
|
||||
aria-label="breadcrumb"
|
||||
class="breadcrumb-header float-start float-lg-end"
|
||||
>
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="/">Dashboard</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">Upload</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
Vendors
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="section">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<!-- upload Modal -->
|
||||
<div class="modal fade text-left" id="upload-vendors-modal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myModalLabel160" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div id="upload-vendors-modal-content" class="modal-content" hx-target="this"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-end my-2 gap-2">
|
||||
<a
|
||||
type="button"
|
||||
class="btn btn-secondary rounded"
|
||||
class="btn-space"
|
||||
href="{% url 'upload:export_vendors_csv' %}"
|
||||
><i class="bi bi-download"></i> Sample File
|
||||
</a>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-secondary rounded"
|
||||
hx-get="{% url 'upload:import_vendors_csv' %}"
|
||||
hx-target="#upload-vendors-modal-content"
|
||||
data-bs-target="#upload-vendors-modal"
|
||||
data-bs-toggle="modal"
|
||||
>
|
||||
<i class="bi bi-upload"></i> Upload
|
||||
</button>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-secondary rounded"
|
||||
hx-get="{% url 'upload:import_vendors_csv' %}"
|
||||
hx-target="#upload-vendors-modal-content"
|
||||
data-bs-target="#upload-vendors-modal"
|
||||
data-bs-toggle="modal"
|
||||
>
|
||||
<i class="bi bi-upload"></i> NFC导入
|
||||
</button>
|
||||
</div>
|
||||
<table class="table table-hover" id="table1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>供应商名称</th>
|
||||
<th>联系人</th>
|
||||
<th>邮箱</th>
|
||||
<th>税号</th>
|
||||
<th>电话号码</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% if page_object %}
|
||||
<tbody>
|
||||
{% for vendors in page_object %}
|
||||
<tr>
|
||||
<td>
|
||||
{{page_object.start_index|add:forloop.counter0}}
|
||||
</td>
|
||||
<td>{{vendors.name}}</td>
|
||||
<td>{{vendors.contact_person}}</td>
|
||||
<td>{{vendors.email}}</td>
|
||||
<td>{{vendors.gstin_number}}</td>
|
||||
<td>{{vendors.phone}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% else %}
|
||||
<div class="alert alert-info" role="alert">
|
||||
暂无记录
|
||||
</div>
|
||||
{% endif %}
|
||||
</table>
|
||||
{% include 'commons/pagination.html' %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
{% endblock content%}
|
||||
Reference in New Issue
Block a user