From f990d41ed26b2640ca87d13d53e0dd85675aafb5 Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期四, 10 八月 2023 08:20:00 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/priQuote/priQuote.js | 81 +++++++++++++++++++++++++++++++++++++++-
1 files changed, 79 insertions(+), 2 deletions(-)
diff --git a/src/main/webapp/static/js/priQuote/priQuote.js b/src/main/webapp/static/js/priQuote/priQuote.js
index 61c4c26..fbd3755 100644
--- a/src/main/webapp/static/js/priQuote/priQuote.js
+++ b/src/main/webapp/static/js/priQuote/priQuote.js
@@ -4,13 +4,75 @@
base: baseUrl + "/static/layui/lay/modules/"
}).extend({
cascader: 'cascader/cascader',
-}).use(['table','laydate', 'form', 'admin', 'xmSelect', 'element', 'cascader', 'tree', 'dropdown'], function(){
+}).use(['table','laydate', 'form', 'admin', 'xmSelect', 'element', 'cascader', 'tree', 'dropdown','layer','upload', 'cascader'], function(){
var table = layui.table;
var $ = layui.jquery;
var layer = layui.layer;
var layDate = layui.laydate;
var form = layui.form;
admin = layui.admin;
+ var tree = layui.tree;
+ var element = layui.element;
+ var upload = layui.upload;
+ var xmSelect = layui.xmSelect;
+ var cascader = layui.cascader;
+ var dropdown = layui.dropdown;
+
+ $('#organization').html(localStorage.getItem('nickname') + ' <i class="layui-icon"></i>');
+
+ // 閮ㄩ棬浜哄憳 绛涢��
+ dropdown.render({
+ elem: '#organization'
+ ,content: ['<div id="organizationTree" style="height: calc(100vh - 525px);border: none"></div>'].join('')
+ ,style: 'width: 370px; height: 350px; padding: 0 15px; box-shadow: 1px 1px 30px rgb(0 0 0 / 12%);'
+ ,ready: function(){
+ loadTree();
+ }
+ });
+
+ // 鏍戝舰鍥�
+ var organizationTree;
+ window.loadTree = function(condition){
+ var loadIndex = layer.load(2);
+ $.ajax({
+ url: baseUrl+"/dept/user/tree/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: {
+ 'condition': condition
+ },
+ method: 'POST',
+ success: function (res) {
+ layer.close(loadIndex);
+ if (res.code === 200){
+ organizationTree = tree.render({
+ elem: '#organizationTree',
+ id: 'organizationTree',
+ onlyIconControl: true,
+ data: res.data,
+ click: function (obj) {
+ treeCond = {
+ key: obj.data.key,
+ val: obj.data.id
+ }
+ $('#organization').html(obj.data.title + ' <i class="layui-icon"></i>');
+ $('#organizationTree').find('.ew-tree-click').removeClass('ew-tree-click');
+ $(obj.elem).children('.layui-tree-entry').addClass('ew-tree-click');
+ clearFormVal($('#search-box'));
+ tableIns.reload({
+ where: {[obj.data.key]: obj.data.id},
+ page: {curr: 1}
+ });
+ }
+ });
+ treeData = res.data;
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ } else {
+ layer.msg(res.msg)
+ }
+ }
+ })
+ }
// 鏁版嵁娓叉煋
tableIns = table.render({
@@ -25,7 +87,7 @@
cols: [[
{type: 'checkbox', fixed: 'left'}
,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80}
- ,{field: 'templateName', align: 'center',title: '妯℃澘鍚�'}
+ ,{field: 'templateName', align: 'center',title: '妯℃澘鍚�', width: 220, style: 'color: #1890ff;cursor:pointer', event: 'more',hide: false}
,{field: 'orderNum', align: 'center',title: '鎶ヤ环棰勭畻鍗曞彿'}
,{field: 'inOrderNum', align: 'center',title: '鎶ヤ环缂栧彿'}
,{field: 'itemId$', align: 'center',title: '椤圭洰鍚�'}
@@ -86,7 +148,22 @@
// 鐩戝惉澶村伐鍏锋爮浜嬩欢
table.on('toolbar(priQuote)', function (obj) {
var checkStatus = table.checkStatus(obj.config.id);
+ console.log(checkStatus)
switch(obj.event) {
+ case 'more':
+ top.priQuoteByMore = obj.data.id;
+ console.log(top.priQuoteByMore)
+
+ admin.popupRight({
+ type: 1,
+ window: "top",
+ area: "1250px",
+ url: "priQuote_more.html",
+ end: function () {
+ // $(".layui-laypage-btn")[0].click();
+ }
+ })
+ break;
case 'addBlank':
showEditModel();
break;
--
Gitblit v1.9.1