From abb175b29054b9708af27136c035b1b7351dcd20 Mon Sep 17 00:00:00 2001
From: 懒羊羊 <15939171744@163.com>
Date: 星期二, 14 十一月 2023 13:18:48 +0800
Subject: [PATCH] 优化

---
 guns-vip-main/src/main/webapp/assets/modular/pm/salesOrder/salesOrder_add.js |   54 +++++++++++++++++++-----------------------------------
 1 files changed, 19 insertions(+), 35 deletions(-)

diff --git a/guns-vip-main/src/main/webapp/assets/modular/pm/salesOrder/salesOrder_add.js b/guns-vip-main/src/main/webapp/assets/modular/pm/salesOrder/salesOrder_add.js
index 9f3a104..38b97c8 100644
--- a/guns-vip-main/src/main/webapp/assets/modular/pm/salesOrder/salesOrder_add.js
+++ b/guns-vip-main/src/main/webapp/assets/modular/pm/salesOrder/salesOrder_add.js
@@ -38,30 +38,19 @@
     //鍒濆鍖栨椂闂撮�夋嫨鍣�
     laydate.render({
         elem: '#planStartTime',
-        type: 'datetime'
+        // type: 'datetime'
     });
     //鍒濆鍖栨椂闂撮�夋嫨鍣�
     laydate.render({
         elem: '#planEndTime',
-        type: 'datetime'
+        // type: 'datetime'
     });
     //鍒濆鍖栨椂闂撮�夋嫨鍣�
     laydate.render({
         elem: '#deliveryTime',
-        type: 'datetime'
+        // type: 'datetime'
     });
     $(document).ready(function () {
-        // $.ajax({
-        //     type: "POST",
-        //     contentType: "application/json;charset=UTF-8",
-        //     url: Feng.ctxPath + '/workshopInfo/list',
-        //     success: function (result) {
-        //         $.each(result.data, function (index, value) {
-        //             $('#workshopCode').append(new Option(value.workshopCode));// 涓嬫媺鑿滃崟閲屾坊鍔犲厓绱�
-        //         });
-        //         layui.form.render("select");//閲嶆柊娓叉煋 鍥哄畾鍐欐硶
-        //     },
-        // });
         $.ajax({
             type: "POST",
             contentType: "application/json;charset=UTF-8",
@@ -75,27 +64,22 @@
         });
     });
 
-    // form.on("select", function (data) {
-    //     switch(data.elem.id){
-    //         case 'workshopCode':
-    //             $.ajax({
-    //                 type: "POST",
-    //                 contentType: "application/json;charset=UTF-8",
-    //                 url: Feng.ctxPath + '/lineInfo/list?workshopCode='+data.value,
-    //                 success: function (result) {
-    //                     $('#productionLineCode').empty();
-    //                     $.each(result.data, function (index, value) {
-    //                         $('#lineCode').append(new Option(value.lineCode));// 涓嬫媺鑿滃崟閲屾坊鍔犲厓绱�
-    //                     });
-    //                     if($('#workshopCode').val() === ""||$('#workshopCode').val() === null){
-    //                         layui.$('#lineCode').empty(); // 鑾峰彇select鍏冪礌
-    //                     }
-    //                     layui.form.render("select");//閲嶆柊娓叉煋 鍥哄畾鍐欐硶
-    //                 },
-    //             });
-    //             break;
-    //     }
-    // });
+    $('#productCode').click(function () {
+        layer.open({
+            type: 2,
+            area: ['1000px', '600px'],
+            title: '鐗╂枡淇℃伅',
+            content: Feng.ctxPath + '/workOrder/productListing',
+            success: function (layero, index) {
+                window.materialType = 'PRODUCE';
+            },
+            end: function () {
+                let msg = JSON.parse(window.localStorage.getItem('message'));
+                $('#productCode').val(msg.materialCode);
+                $('#productName').val(msg.materialName);
+            }
+        });
+    });
 
     //琛ㄥ崟鎻愪氦浜嬩欢
     form.on('submit(btnSubmit)', function (data) {

--
Gitblit v1.9.3