From 5a759c72b81d1541ad4c88770a0acd5c3ffcb003 Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期一, 16 十月 2023 16:39:33 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/contract/contract.js | 34 +++++++++++++++++++++++++++++++++-
1 files changed, 33 insertions(+), 1 deletions(-)
diff --git a/src/main/webapp/static/js/contract/contract.js b/src/main/webapp/static/js/contract/contract.js
index 6b25d76..4d01e07 100644
--- a/src/main/webapp/static/js/contract/contract.js
+++ b/src/main/webapp/static/js/contract/contract.js
@@ -1,7 +1,7 @@
var pageCurr;
layui.config({
base: baseUrl + "/static/layui/lay/modules/"
-}).use(['table', 'laydate', 'form', 'admin', 'tree', 'dropdown'], function () {
+}).use(['table', 'laydate', 'form', 'admin','xmSelect', 'tree', 'dropdown'], function () {
var table = layui.table;
var $ = layui.jquery;
var layer = layui.layer;
@@ -250,9 +250,12 @@
title: (mData ? '淇敼' : '娣诲姞') + '鍚堝悓',
content: $('#editDialog').html(),
success: function (layero, dIndex) {
+ let loadNameXml = loadNameXmlSel()
+ console.log(loadNameXml)
layDateRender(mData);
form.val('detail', mData);
form.on('submit(editSubmit)', function (data) {
+ data.field.customer = loadNameXml.getValue()[0] ? loadNameXml.getValue()[0].name : null;
var loadIndex = layer.load(2);
$.ajax({
url: baseUrl + "/contract/" + (mData ? 'update' : 'add') + "/auth",
@@ -523,6 +526,35 @@
})
}
+ window.loadNameXmlSel = function () {
+ return xmSelect.render({
+ el: '#nameXmlSel',
+ autoRow: true,
+ filterable: true,
+ remoteSearch: true,
+ clickClose: true,
+ radio: true,
+ remoteMethod: function (val, cb, show) {
+ $.ajax({
+ url: baseUrl + "/cstmr/all/get/kv",
+ headers: {'token': localStorage.getItem('token')},
+ data: {
+ condition: val
+ },
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200) {
+ cb(res.data)
+ } else {
+ cb([]);
+ layer.msg(res.msg, {icon: 2});
+ }
+ }
+ });
+ },
+ });
+ }
+
});
// 鍏抽棴鍔ㄤ綔
--
Gitblit v1.9.1