From a25b8525f3ef2857232890fe9120068a575dfec1 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期二, 22 十一月 2022 13:49:59 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/plan/plan.js | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/src/main/webapp/static/js/plan/plan.js b/src/main/webapp/static/js/plan/plan.js
index 2dabb60..4265c5a 100644
--- a/src/main/webapp/static/js/plan/plan.js
+++ b/src/main/webapp/static/js/plan/plan.js
@@ -229,6 +229,7 @@
method: 'GET',
success: function (res0) {
let planType = res0.data;
+ console.log(planType);
if (res0.code === 200) {
admin.open({
type: 1,
@@ -236,21 +237,36 @@
title: '娣诲姞鍞墠瑙勫垝鐢宠鍗�' + ' - ' + planType.name,
content: $('#editDialog').html(),
success: function (layero0, dIndex0) {
+ $('#customizeBox').html(planType.html)
+
layer.close(loadIndex0);
let orderSel = loadOrderSel();
let cstmrSel = loadCstmrSel();
+ let userSel = loadUserSel();
let planNeedSel = loadPlanNeedSel();
form.val('detail', {
planTypeName: planType.name
});
layDateRender();
form.on('submit(editSubmit)', function (data) {
+ data.field.planType = planType.id;
data.field.orderId = orderSel.getValue()[0] ? orderSel.getValue()[0].value : null;
data.field.cstmrId = cstmrSel.getValue()[0] ? cstmrSel.getValue()[0].value : null;
+ data.field.userId = userSel.getValue()[0] ? userSel.getValue()[0].value : null;
data.field.planNeed = planNeedSel.getValue()[0] ? planNeedSel.getValue()[0].value : null;
+ if (!data.field.orderId) {
+ layer.msg("璺熻釜椤圭洰涓嶈兘涓虹┖", {icon: 2});
+ top.requireTip($('#orderXmlSel'));
+ return false;
+ }
+ if (!data.field.cstmrId) {
+ layer.msg("瀹㈡埛鍚嶇О涓嶈兘涓虹┖", {icon: 2});
+ top.requireTip($('#cstmrXmlSel'));
+ return false;
+ }
var loadIndex = layer.load(2);
$.ajax({
- url: baseUrl+"/plan/"+(mData?'update':'add')+"/auth",
+ url: baseUrl+"/plan/add/auth",
headers: {'token': localStorage.getItem('token')},
data: data.field,
method: 'POST',
@@ -462,7 +478,7 @@
});
layDate.render({
elem: '#finishTime\\$',
- type: 'datet',
+ type: 'date',
value: data!==undefined?data['finishTime\\$']:null
});
layDate.render({
--
Gitblit v1.9.1