demo20230512/Views/Partial/Management/Management.cshtml

153 lines
6.8 KiB
Plaintext
Raw Normal View History

2023-05-12 10:20:28 +08:00
@using Weee.Models.ExtensionMethods
@using Weee.DAL
@using Resources
@using Weee.Models
@{
Random rnd = new Random();
}
<div class="survey_form" ng-style="{ height: Survey_Height * 28 + 24 + 'px' }" style="padding: 28px 16px;">
<div class="survey_form_body" ng-style="{ height: sidebar.length * 28 + 'px' }" style="margin: 0; padding: 0;">
<div class="tab_header_main">
<div class="tab_header">
<div class="tab-toggle">
<div ng-class="{ active: selectedTab == 'management' }"
ng-click="selectedTab = 'management'">
<div class="tab">@Resource.ManagementList</div>
</div>
@if (@User.Identity.GetUserAccountType(new WeeeDataContext()) == ACCOUNT_TYPE.FULL_FUNCTION)
{
<div ng-class="{ active: selectedTab == 'supplier' }"
ng-click="selectedTab = 'supplier'">
<div class="tab">@Resource.SupplierList</div>
</div>
}
</div>
</div>
<div class="tab_header">
<div class="survey_order_btn_wrap tab-toggle" ng-show="selectedTab=='management'">
<div class="survey_order_btn" ng-click="goToUserCreate()" ng-show="isCompanyAdmin">
@Resource.NewUser
</div>
<div class="survey_order_btn" ng-click="uploadCompanyLogo()" ng-show="isCompanyAdmin">
@Resource.UploadCompanyLogo
</div>
<div class="survey_order_btn" ng-show="isCompanyAdmin">
<span>
<a href="@ViewBag.baseUrl/Browser_Local/WebFilesRoot/@CScommon.ProgramConstants.OrganizationWordReport?y=@rnd.NextDouble()" style="color: #a1a2a2;">
@Resource.OrganizationLCADocTemplate@Resource.DownloadLink
</a>
</span>
</div>
<div class="survey_order_btn" ng-show="isCompanyAdmin">
<span>
<a href="@ViewBag.baseUrl/Browser_Local/WebFilesRoot/@CScommon.ProgramConstants.ProductWordReport?y=@rnd.NextDouble()" style="color: #a1a2a2;">
@Resource.ProductLCADocTemplate@Resource.DownloadLink
</a>
</span>
</div>
<div class="survey_order_btn" ng-click="uploadCompanyTemplates()" ng-show="isCompanyAdmin">
@Resource.UploadTemplates
</div>
</div>
</div>
<div class="survey_order_btn_wrap" ng-show="selectedTab=='supplier'">
@*<div class="survey_order_btn" ng-click="exportSupplier(supplierList)">
@Resource.StaticLabelExportBOM
</div>
<div class="survey_order_btn" ng-click="importSupplierProcess()">
@Resource.StaticLabelImport
</div>*@
<div class="survey_order_btn" ng-click="goToSupplierCreate()">
@Resource.NewSupplier
</div>
</div>
</div>
<div class="tab_content card content_bg">
<div style="margin: 20px">
<div ng-include="'@ViewBag.baseUrl/Partials/management-Index'" ng-show="selectedTab == 'management'"></div>
<div ng-include="'@ViewBag.baseUrl/Partials/management-Supplier'" ng-show="selectedTab == 'supplier'"></div>
</div>
</div>
</div>
</div>
<table-edit-modal display-option="fileImportOption">
<div file-import-process import-option="fileImportOption"></div>
</table-edit-modal>
<table-edit-modal display-option="logoImportOption">
<form name="editForm">
<div class="row">
<label class="col-sm-2 col-form-label">@Resource.UploadCompanyLogo</label>
<div class="col col-sm-8">
<input type="file" id="upload-logo-file" style="margin-top: 7px;" file read-file="logoImportOption.selectFile(file)" />
</div>
</div>
<div class="row">
<div class="col" id="upload-logo-result-msg"></div>
</div>
<div class="survey_btn_wrap">
<div class="survey_content" style="float: right">
<div class="row">
<button class="header_button" ng-click="uploadLogo()">@Resource.StaticLabelGlobal_Upload</button>
</div>
</div>
</div>
</form>
</table-edit-modal>
<table-edit-modal display-option="templateImportOption">
<form name="editForm">
<div class="row">
<label class="col-sm-4 col-form-label">
@Resource.TemplateUpload
</label>
<div class="col col-sm-8">
<input type="file" id="upload-file-file" file read-file="templateImportOption.selectFile(file)" />
</div>
</div>
<div class="row">
<label class="col col-sm-4 prompt-msg" style="color: red">
@Resource.TemplateUploadPromptMessage
</label>
<div class="col" id="upload-file-result-msg"></div>
</div>
<div class="survey_btn_wrap">
<div class="survey_content" style="float: right">
<div class="row">
<button class="header_button" ng-click="uploadTemplates()">@Resource.StaticLabelGlobal_Upload</button>
</div>
</div>
</div>
@*<div class="row">
<div class="col col-sm-6">
<label class="col-sm-6 col-form-label">@Resource.TemplateUpload</label>
</div>
</div>*@
@*<div class="row">
<div class="col col-sm-6">
<input type="file" file read-file="templateImportOption.selectFile(file)" />
</div>
</div>*@
@*<div class="row">
<div class="col col-sm-6">
<div class="prompt-msg" style="color: red">@Resource.TemplateUploadPromptMessage</div>
</div>
</div>
<div class="row">
<div class="col-sm-2">
<div id="upload-file-result-msg" class="row"></div>
</div>
<div class="col col-sm-2">
<button class="header_button" ng-click="uploadTemplates()">@Resource.StaticLabelGlobal_Upload</button>
</div>
</div>
<div class="survey_btn_wrap">
<div class="survey_content" style="float: right">
</div>
</div>*@
</form>
</table-edit-modal>