@@ -321,12 +324,24 @@
}
$.operate.post(ctx + 'system/product/list', {...data, type: '1'}, function (res) {
softwareProjectProductInfoList = res.rows
+ softwareProjectProductInfoList.unshift({
+ model:'',
+ productCode:''
+ })
})
$.operate.post(ctx + 'system/product/list', {...data, type: '2'}, function (res) {
hardwareProjectProductInfoList = res.rows
+ hardwareProjectProductInfoList.unshift({
+ model:'',
+ productCode:''
+ })
})
$.operate.post(ctx + 'system/product/list', {...data, type: '11,22'}, function (res) {
maintenanceProjectProductInfoList = res.rows
+ maintenanceProjectProductInfoList.unshift({
+ model:'',
+ productCode:''
+ })
})
}
diff --git a/ruoyi-admin/src/main/resources/templates/project/info/edit.html b/ruoyi-admin/src/main/resources/templates/project/info/edit.html
index 9aef84a0..0c828d67 100644
--- a/ruoyi-admin/src/main/resources/templates/project/info/edit.html
+++ b/ruoyi-admin/src/main/resources/templates/project/info/edit.html
@@ -66,6 +66,9 @@
input, textarea, .productTable td {
position: relative;
}
+ .productTable label[id*="iscount"]{
+ top: -30px !important;
+ }
@@ -216,7 +219,7 @@
产品编号 |
产品型号 |
描述 |
-
数量 |
+
数量 |
目录单价(RMB) |
指导折扣 |
折扣 |
@@ -239,7 +242,7 @@
产品编号 |
产品型号 |
描述 |
-
数量 |
+
数量 |
目录单价(RMB) |
指导折扣 |
折扣 |
@@ -262,7 +265,7 @@
产品编号 |
产品型号 |
描述 |
-
数量 |
+
数量 |
目录单价(RMB) |
指导折扣 |
折扣 |
@@ -344,6 +347,10 @@
$.operate.post(ctx + 'system/product/list', {...data, type: '1'}, function (res) {
softwareProjectProductInfoList = res.rows
+ softwareProjectProductInfoList.unshift({
+ model:'',
+ productCode:''
+ })
let softwareProjectProductInfoListAll = [[${projectInfo.softwareProjectProductInfoList}]] || []
softwareProjectProductInfoListAll.forEach((ele) => {
addProduct(ele)
@@ -351,6 +358,10 @@
})
$.operate.post(ctx + 'system/product/list', {...data, type: '2'}, function (res) {
hardwareProjectProductInfoList = res.rows
+ hardwareProjectProductInfoList.unshift({
+ model:'',
+ productCode:''
+ })
let hardwareProjectProductInfoListAll = [[${projectInfo.hardwareProjectProductInfoList}]] || []
hardwareProjectProductInfoListAll.forEach((ele) => {
addProduct2(ele)
@@ -359,6 +370,10 @@
})
$.operate.post(ctx + 'system/product/list', {...data, type: '11,22'}, function (res) {
maintenanceProjectProductInfoList = res.rows
+ maintenanceProjectProductInfoList.unshift({
+ model:'',
+ productCode:''
+ })
let maintenanceProjectProductInfoListAll = [[${projectInfo.maintenanceProjectProductInfoList}]] || []
maintenanceProjectProductInfoListAll.forEach((ele) => {
addProduct3(ele)
@@ -490,8 +505,7 @@
// 添加软件
function initData() {
- console.log(123, [[${projectInfo.competitorList}]])
- let competitorList=[[${projectInfo.competitorList}]]
+ let competitorList=[[${projectInfo.competitorList}]]||[]
competitorList.forEach((ele,index)=>{
if(ele){
$(`input[type="checkbox"][value="${ele}"]`).attr('checked',true)
@@ -523,13 +537,13 @@
|
|
@@ -558,13 +572,13 @@ ${softwareProjectProductInfoList.map((ele) => {
|
|
@@ -593,13 +607,13 @@ ${hardwareProjectProductInfoList.map((ele) => {
|
|
@@ -706,7 +720,7 @@ ${maintenanceProjectProductInfoList.map((ele) => {
}
function initPrice() {
- $('#productTable .quantity').on('input', function () {
+ $('.productTable .quantity').on('input', function () {
let num = $(this).val()
let priceVal = $(this).parent().parent().find('.price').val()
let cateVal = $(this).parent().parent().find('.cataloguePrice').val()
@@ -717,14 +731,14 @@ ${maintenanceProjectProductInfoList.map((ele) => {
$(this).parent().parent().find('.catalogueAllPrice').val((num * cateVal).toFixed(2))
}
})
- $('#productTable .cataloguePrice').on('input', function () {
+ $('.productTable .cataloguePrice').on('input', function () {
let val = $(this).val()
$(this).parent().parent().find('.price').val(val)
let quantity = $(this).parent().parent().find('.quantity').val()
if (quantity && val)
$(this).parent().parent().find('.catalogueAllPrice').val((val * quantity).toFixed(2))
})
- $('#productTable .guidanceDiscount').on('input', function () {
+ $('.productTable .guidanceDiscount').on('input', function () {
let val = $(this).val()
let cataloguePrice = $(this).parent().parent().find('.cataloguePrice').val()
$(this).parent().parent().find('.discount').val(val)
@@ -735,12 +749,12 @@ ${maintenanceProjectProductInfoList.map((ele) => {
$(this).parent().parent().find('.allPrice').val((price * quantity).toFixed(2))
}
})
- $('#productTable .discount').on('input', function () {
+ $('.productTable .discount').on('input', function () {
let discount = $(this).val()
let val = $(this).parent().parent().find('.cataloguePrice').val()
$(this).parent().parent().find('.price').val((val * discount).toFixed(2))
})
- $('#productTable .price').change('input', function () {
+ $('.productTable .price').change('input', function () {
let val = $(this).val()
let num = $(this).parent().parent().find('.quantity').val()
$(this).parent().parent().find('.allPrice').val((val * num).toFixed(2))
diff --git a/ruoyi-admin/src/main/resources/templates/project/info/project.html b/ruoyi-admin/src/main/resources/templates/project/info/project.html
index f20e2c85..8a4aff0a 100644
--- a/ruoyi-admin/src/main/resources/templates/project/info/project.html
+++ b/ruoyi-admin/src/main/resources/templates/project/info/project.html
@@ -416,13 +416,15 @@
width: 1050,
yes: function (index, layero) {
let body = parent.layer.getChildFrame('body', index)
- if ($(body.find('#form-product-add').get(0)).validate().form()) {
- $.operate.save(prefix + "/add", body.find('#form-product-add').serialize(), function (res) {
+ if ($(body.find('#form-order-add').get(0)).validate().form()) {
+ $.operate.save( ctx + "project/order/add", body.find('#form-order-add').serialize(), function (res) {
if (res.code == web_status.SUCCESS) {
- $.table.search()
parent.layer.close(index)
}
});
+ }else{
+ $.modal.alertWarning("请完善表单");
+
}
},
};
diff --git a/ruoyi-admin/src/main/resources/templates/project/info/selectPeople.html b/ruoyi-admin/src/main/resources/templates/project/info/selectPeople.html
index df1fe2a4..0c55949b 100644
--- a/ruoyi-admin/src/main/resources/templates/project/info/selectPeople.html
+++ b/ruoyi-admin/src/main/resources/templates/project/info/selectPeople.html
@@ -74,7 +74,7 @@
title: '人员名称'
},
{
- field: 'phonenumber ',
+ field: 'phonenumber',
title: '人员电话'
},
{
diff --git a/ruoyi-admin/src/main/resources/templates/project/order/add.html b/ruoyi-admin/src/main/resources/templates/project/order/add.html
index 5ebb4927..606e57ba 100644
--- a/ruoyi-admin/src/main/resources/templates/project/order/add.html
+++ b/ruoyi-admin/src/main/resources/templates/project/order/add.html
@@ -75,10 +75,13 @@
margin-left: 20px;
display: inline-block;
}
+ .productTable label[id*="iscount"]{
+ top: -30px !important;
+ }