Browse Source

[fix] 销售管理

修改客户报价新增页面的url,采用统一base
修改客户报价修改页面的url,采用统一base
修改客户报价驳回调整页面的url,采用统一base
修改销售订单新增页面的url,采用统一base
销售订单详情页面新增:最新报价(RMB)、最新报价(美元)、和最新报价历史按钮;新增添加物料为批量添加;查找最新的报价数据的js方法;新增循环新增的时候加上异步处理的方式,获取最新报价RMB和USD的值,并进行赋值
销售订单业务经理审批页面新增:最新报价(RMB)、最新报价(美元)、和最新报价历史按钮;新增添加物料为批量添加;查找最新的报价数据的js方法;新增循环新增的时候加上异步处理的方式,获取最新报价RMB和USD的值,并进行赋值
销售订单业务主管审批页面新增:最新报价(RMB)、最新报价(美元)、和最新报价历史按钮;新增添加物料为批量添加;查找最新的报价数据的js方法;新增循环新增的时候加上异步处理的方式,获取最新报价RMB和USD的值,并进行赋值
销售订单总经理总助审批页面新增:最新报价(RMB)、最新报价(美元)、和最新报价历史按钮;新增添加物料为批量添加;查找最新的报价数据的js方法;新增循环新增的时候加上异步处理的方式,获取最新报价RMB和USD的值,并进行赋值
销售订单修改页面:去掉table列表中可编辑选项。去掉详情页面的添加物料按钮;增最新报价(RMB)、最新报价(美元)、和最新报价历史按钮;重写批量插入物料的前端js方法:实现插入物料的同时动态查询最新报价的含税单价美元和含税单价rmb;使用异步处理既能满足批量插入物料,又能满足不能插入重复物料的需求;新增查找最新的报价数据前端js方法
dev
liuxiaoxu 2 months ago
parent
commit
3cd95f7857
  1. 2
      ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html
  2. 2
      ruoyi-admin/src/main/resources/templates/system/customerQuote/edit.html
  3. 2
      ruoyi-admin/src/main/resources/templates/system/customerQuote/taskModifyApply.html
  4. 4
      ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html
  5. 26
      ruoyi-admin/src/main/resources/templates/system/salesOrder/detail.html
  6. 6
      ruoyi-admin/src/main/resources/templates/system/salesOrder/edit.html
  7. 146
      ruoyi-admin/src/main/resources/templates/system/salesOrder/taskModifyApply.html
  8. 22
      ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwjlVerify.html
  9. 23
      ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwzgVerify.html
  10. 22
      ruoyi-admin/src/main/resources/templates/system/salesOrder/taskZozjVerify.html

2
ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html

@ -732,7 +732,7 @@
return new Promise((resolve, reject) => {
// 使用AJAX请求从服务器获取最近的报价信息
$.ajax({
url: prefix + '/queryLatestRecentQuotation', // 假设这是你的API路径
url: prefix + '/queryLatestRecentQuotation',
type: 'GET',
data: { materialNo: materialNo, customerCode: $("#customerCode").val() },
success: function (data) {

2
ruoyi-admin/src/main/resources/templates/system/customerQuote/edit.html

@ -502,7 +502,7 @@
return new Promise((resolve, reject) => {
// 使用AJAX请求从服务器获取最近的报价信息
$.ajax({
url: prefix + '/queryLatestRecentQuotation', // 假设这是你的API路径
url: prefix + '/queryLatestRecentQuotation',
type: 'GET',
data: { materialNo: materialNo, customerCode: $("#customerCode").val() },
success: function (data) {

2
ruoyi-admin/src/main/resources/templates/system/customerQuote/taskModifyApply.html

@ -563,7 +563,7 @@
return new Promise((resolve, reject) => {
// 使用AJAX请求从服务器获取最近的报价信息
$.ajax({
url: prefix + '/queryLatestRecentQuotation', // 假设这是你的API路径
url: prefix + '/queryLatestRecentQuotation',
type: 'GET',
data: { materialNo: materialNo, customerCode: $("#customerCode").val() },
success: function (data) {

4
ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html

@ -332,7 +332,7 @@
id:'bootstrap-sub-table-order',
pagination: false,
sidePagination: "client",
model: "物料报价信息",
model: "物料信息",
fixedColumns: true, // 启用冻结列
fixedRightNumber: 1, // 冻结右列个数
columns: [
@ -994,7 +994,7 @@
return new Promise((resolve, reject) => {
// 使用AJAX请求从服务器获取最近的报价信息
$.ajax({
url: ctx + 'system/customerQuote/queryLatestRecentQuotation', // 假设这是你的API路径
url: ctx + 'system/customerQuote/queryLatestRecentQuotation',
type: 'GET',
data: { materialNo: materialNo, customerCode: $("#enterpriseCode").val() },
success: function (data) {

26
ruoyi-admin/src/main/resources/templates/system/salesOrder/detail.html

@ -338,7 +338,7 @@
showToggle: false,
showColumns: false,
pagination: false, // 设置不分页
model: "物料报价信息",
model: "物料信息",
columns: [
{checkbox: true},
{field: 'index',align: 'center', title: "序号",
@ -356,6 +356,17 @@
{ title: '单位',field: 'unit',align: 'center', formatter: function(value, row, index) {return $.table.selectDictLabel(sysUnitClassDatas, value);}},
{title: '半成品类型',field: 'processMethod',align: 'center',formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);}},
{ title: '对外售价',field: 'materialSole'},
{ title: '最新报价(RMB)',field: 'recentQuotationRMB',align: 'center',},
{ title: '最新报价(美元)',field: 'recentQuotationUSD',align: 'center',},
{ title: '最新报价历史',align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="recentQuotationHistory(\'' + row.materialCode + '\')"><i class="fa fa-edit"></i>最新报价历史</a> ');
return actions.join('');
}
},
{title: '国内税率',field: 'countTax',align: 'center'},
{ title: '美元汇率',field: 'usdTax', align: 'center'},
{ title: '物料的不含税单价(RMB)',
@ -629,6 +640,19 @@
autoclose: true
});
// 结算金额
//最新报价历史
function recentQuotationHistory(materialCode){
var customerCode = $("#enterpriseCode").val();
var queryParams = new URLSearchParams();
queryParams.append("materialCode", materialCode);
queryParams.append("customerCode", encodeURIComponent(customerCode));
var url = ctx +'system/customerQuote/recentQuotationHistory?'+queryParams.toString();
$.modal.open("最新报价历史", url);
}
</script>
</body>
</html>

6
ruoyi-admin/src/main/resources/templates/system/salesOrder/edit.html

@ -348,7 +348,7 @@
queryParams: queryParams,
sidePagination: "client",
uniqueId: "index",
model: "物料报价信息",
model: "物料信息",
fixedColumns: true, // 启用冻结列
rightFixedColumns:1,
fixedRightNumber: 1, // 冻结右列个数
@ -748,6 +748,10 @@
}
layer.close(index);
}
function insertRow() {
var url = ctx + "erp/material/select";
var options = {

146
ruoyi-admin/src/main/resources/templates/system/salesOrder/taskModifyApply.html

@ -372,6 +372,16 @@
}
},
{ title: '对外售价',field: 'materialSole',editable: true},
{ title: '最新报价(RMB)',field: 'recentQuotationRMB',align: 'center',},
{ title: '最新报价(美元)',field: 'recentQuotationUSD',align: 'center',},
{ title: '最新报价历史',align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="recentQuotationHistory(\'' + row.materialCode + '\')"><i class="fa fa-edit"></i>最新报价历史</a> ');
return actions.join('');
}
},
{title: '国内税率',field: 'countTax',align: 'center',editable: true},
{ title: '美元汇率',field: 'usdTax', align: 'center',editable: true},
{field: 'materialNum',align: 'center',title: '物料的数量',editable: true},
@ -546,51 +556,88 @@
}
function doSubmit(index, layero,uniqueId){
var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0];
console.log("rowData:"+rowData);
var totalNum = $("#bootstrap-select-table").bootstrapTable('getData').length;
var rmb1 = $("#taxRate_edit").val();
if (rmb1 =='' || rmb1== null){
rmb1 = 0;
}else{
rmb1 = $("#taxRate_edit").val();
}
var rmb = Number(rmb1).toFixed(2) / 100;
var usd = $("#usdTax_edit").val();
if (usd =='' || usd== null){
usd = 0;
}else{
usd = Number(usd).toFixed(2);
var selectedRows = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections');
if (selectedRows.length == 0){
$.modal.alertWarning("请选择至少一条物料信息");
return;
}
$("#bootstrap-sub-table-editOrder4").bootstrapTable('insertRow', {
index: 1,
row: {
id:'',
materialId:rowData.id,
materialCode: rowData.materialNo,
materialName: rowData.materialName,
materialType: rowData.materialType,
describe: rowData.describe,
brand: rowData.brand,
photoUrl: rowData.photoUrl,
unit: rowData.unit,
processMethod: rowData.processMethod,
countTax:rmb,
usdTax: usd,
materialSole: rowData.materialSole,
materialNum: 0,
materialNoRmb: 0.0,
materialNoUsd: 0.0,
materialRmb: 0.0,
materialNoRmbSum: 0.0,
materialRmbSum: 0,
materialUsd: 0.0,
materialUsdSum: 0.0,
materialNoUsdSum: 0.0,
remark: "",
var existingData = $("#bootstrap-sub-table-order").bootstrapTable('getData');
var materialCodesSet = new Set(); //使用Set来存储物料号
//存储所有现有的物料号
existingData.forEach(function(row){
materialCodesSet.add(row.materialCode);
});
//存储所有即将插入的料号
var newMaterialCodesSet = new Set();
var promises = selectedRows.map(rowData =>{
//检查是否已经存在相同的料号
if (materialCodesSet.has(rowData.materialNo) || newMaterialCodesSet.has(rowData.materialNo)){
$.modal.alertError("不能选择已添加过的相同料号" + rowData.materialNo);
return Promise.reject("Duplicate material number: " + rowData.materialNo);
}
})
layer.close(index);
//表记即将插入的物料号
newMaterialCodesSet.add(rowData.materialNo);
return queryRecentQuotation(rowData.materialNo)
.then(function(quotationData){
return {
materialId: rowData.id,
materialCode: rowData.materialNo,
materialName: rowData.materialName,
materialType: rowData.materialType,
describe: rowData.describe,
brand: rowData.brand,
unit: rowData.unit,
processMethod: rowData.processMethod,
photoUrl: rowData.photoUrl,
warehouseDept: rowData.warehouseDept,
countTax: $("#taxRate_add").val(),
usdTax: $("#usdTax_add").val(),
materialSole: 0,
recentQuotationRMB: quotationData.data.materialRmb || '',
recentQuotationUSD: quotationData.data.materialUsd || '',
materialNum: "",
materialNoRmb: 0.00,
materialNoUsd: 0.00,
materialRmb: 0.00,
materialNoRmbSum: 0.00,
materialRmbSum: 0.00,
materialUsd: 0.00,
materialUsdSum: 0.00,
materialNoUsdSum: 0.00,
createBy: "",
createTime: "",
updateBy: "",
updateTime: "",
remark: "",
}
})
});
//使用promise.all来等待所有请求完成, 并将结果直接存入newRows
Promise.all(promises)
.then(function(newRows){
//批量插入新行
newRows.forEach(function(row){
$("#bootstrap-sub-table-order").bootstrapTable('insertRow', {index: 1, row: row});
});
layer.close(index);
})
.catch(function(error){
console.error('Some requests failed:', error);
layer.close(index);
});
}
function insertRow() {
var url = ctx + "erp/material/select";
@ -685,6 +732,19 @@
}
}
}
//最新报价历史
function recentQuotationHistory(materialCode){
var customerCode = $("#enterpriseCode").val();
var queryParams = new URLSearchParams();
queryParams.append("materialCode", materialCode);
queryParams.append("customerCode", encodeURIComponent(customerCode));
var url = ctx +'system/customerQuote/recentQuotationHistory?'+queryParams.toString();
$.modal.open("最新报价历史", url);
}
</script>
</body>
</html>

22
ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwjlVerify.html

@ -356,6 +356,17 @@
{ title: '单位',field: 'unit',align: 'center', formatter: function(value, row, index) {return $.table.selectDictLabel(sysUnitClassDatas, value);}},
{title: '半成品类型',field: 'processMethod',align: 'center',formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);}},
{ title: '对外售价',field: 'materialSole'},
{ title: '最新报价(RMB)',field: 'recentQuotationRMB',align: 'center',},
{ title: '最新报价(美元)',field: 'recentQuotationUSD',align: 'center',},
{ title: '最新报价历史',align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="recentQuotationHistory(\'' + row.materialCode + '\')"><i class="fa fa-edit"></i>最新报价历史</a> ');
return actions.join('');
}
},
{title: '国内税率',field: 'countTax',align: 'center'},
{ title: '美元汇率',field: 'usdTax', align: 'center'},
{ title: '物料的不含税单价(RMB)',
@ -512,6 +523,17 @@
$.operate.save(prefix + "/complete/" + taskId,formData);
}
}
//最新报价历史
function recentQuotationHistory(materialCode){
var customerCode = $("#enterpriseCode").val();
var queryParams = new URLSearchParams();
queryParams.append("materialCode", materialCode);
queryParams.append("customerCode", encodeURIComponent(customerCode));
var url = ctx +'system/customerQuote/recentQuotationHistory?'+queryParams.toString();
$.modal.open("最新报价历史", url);
}
</script>
</body>
</html>

23
ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwzgVerify.html

@ -355,6 +355,18 @@
{ title: '单位',field: 'unit',align: 'center', formatter: function(value, row, index) {return $.table.selectDictLabel(sysUnitClassDatas, value);}},
{title: '半成品类型',field: 'processMethod',align: 'center',formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);}},
{ title: '对外售价',field: 'materialSole'},
{ title: '最新报价(RMB)',field: 'recentQuotationRMB',align: 'center',},
{ title: '最新报价(美元)',field: 'recentQuotationUSD',align: 'center',},
{ title: '最新报价历史',align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="recentQuotationHistory(\'' + row.materialCode + '\')"><i class="fa fa-edit"></i>最新报价历史</a> ');
return actions.join('');
}
},
{title: '国内税率',field: 'countTax',align: 'center'},
{ title: '美元汇率',field: 'usdTax', align: 'center'},
{ title: '物料的不含税单价(RMB)',
@ -530,6 +542,17 @@
}
}
//最新报价历史
function recentQuotationHistory(materialCode){
var customerCode = $("#enterpriseCode").val();
var queryParams = new URLSearchParams();
queryParams.append("materialCode", materialCode);
queryParams.append("customerCode", encodeURIComponent(customerCode));
var url = ctx +'system/customerQuote/recentQuotationHistory?'+queryParams.toString();
$.modal.open("最新报价历史", url);
}
</script>
</body>
</html>

22
ruoyi-admin/src/main/resources/templates/system/salesOrder/taskZozjVerify.html

@ -356,6 +356,17 @@
{ title: '单位',field: 'unit',align: 'center', formatter: function(value, row, index) {return $.table.selectDictLabel(sysUnitClassDatas, value);}},
{title: '半成品类型',field: 'processMethod',align: 'center',formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);}},
{ title: '对外售价',field: 'materialSole'},
{ title: '最新报价(RMB)',field: 'recentQuotationRMB',align: 'center',},
{ title: '最新报价(美元)',field: 'recentQuotationUSD',align: 'center',},
{ title: '最新报价历史',align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="recentQuotationHistory(\'' + row.materialCode + '\')"><i class="fa fa-edit"></i>最新报价历史</a> ');
return actions.join('');
}
},
{title: '国内税率',field: 'countTax',align: 'center'},
{ title: '美元汇率',field: 'usdTax', align: 'center'},
{ title: '物料的不含税单价(RMB)',
@ -532,6 +543,17 @@
}
}
//最新报价历史
function recentQuotationHistory(materialCode){
var customerCode = $("#enterpriseCode").val();
var queryParams = new URLSearchParams();
queryParams.append("materialCode", materialCode);
queryParams.append("customerCode", encodeURIComponent(customerCode));
var url = ctx +'system/customerQuote/recentQuotationHistory?'+queryParams.toString();
$.modal.open("最新报价历史", url);
}
</script>
</body>
</html>
Loading…
Cancel
Save