提交 814a6f82 编写于 作者: W weizhiqiang

ERP商品获取规格信息修改

上级 45adbc61
......@@ -81,7 +81,7 @@ layui.config({
}
});
if(unitIndex >= 0){
return unitList[unitIndex].salePrice;
return unitList[unitIndex].normsSalePrice;
}
}
......
......@@ -22,7 +22,7 @@ layui.config({
var selTemplate = getFileContent('tpl/template/select-option-must.tpl');
AjaxPostUtil.request({url: flowableBasePath + "erpbom005", params: {rowId: parent.rowId}, type: 'json', method: "GET", callback: function (json) {
AjaxPostUtil.request({url: flowableBasePath + "erpbom005", params: {id: parent.rowId}, type: 'json', method: "GET", callback: function (json) {
$("#showForm").html(getDataUseHandlebars($("#mainHtml").html(), json));
textool.init({eleId: 'remark', maxlength: 200});
......@@ -103,7 +103,7 @@ layui.config({
}
});
if(unitIndex >= 0){
return unitList[unitIndex].salePrice;
return unitList[unitIndex].normsSalePrice;
}
}
......@@ -319,8 +319,7 @@ layui.config({
var str = "";
var title = "";
$.each(procedureMationList, function(i, item) {
str += '' +
'<span class="layui-badge layui-bg-gray">' + item.number + '</span>' + item.procedureName + '';
str += '<span class="layui-badge layui-bg-gray">' + item.number + '</span>' + item.procedureName + '';
title += item.number + '' + item.procedureName + '\n';
});
$("#procedureBox" + proId).html('<img class="procedureSel" id="procedureSel' + proId + '" src="../../assets/images/forum-menu.png"/>' + str);
......
......@@ -28,9 +28,9 @@ layui.config({
{ field: 'title', title: 'bom方案名称', align: 'left',width: 150, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.title + '</a>';
}},
{ field: 'materialName', title: '商品名称', align: 'left',width: 150 },
{ field: 'materialModel', title: '商品型号', align: 'left',width: 150 },
{ field: 'unitName', title: '计量单位', align: 'center',width: 100 },
{ field: 'materialName', title: '商品名称', align: 'left',width: 150, templet: function (d) {return d.normMation.materialName}},
{ field: 'materialModel', title: '商品型号', align: 'left',width: 150, templet: function (d) {return d.normMation.materialModel}},
{ field: 'unitName', title: '计量单位', align: 'center',width: 100, templet: function (d) {return d.normMation.unitName}},
{ field: 'makeNum', title: '数量', align: 'center',width: 80 },
{ field: 'consumablesPrice', title: '耗材总费用', align: 'right',width: 100 },
{ field: 'procedurePrice', title: '工序总费用', align: 'right',width: 100 },
......
......@@ -58,8 +58,8 @@ layui.config({
if(thisRowValue == bean.id){//获取规格
//获取当前行数量
var rkNum = parseInt($("#rkNum" + thisRowNum).val());
$("#unitPrice" + thisRowNum).val(bean.estimatePurchasePrice.toFixed(2));//单价
$("#amountOfMoney" + thisRowNum).val((rkNum * parseFloat(bean.estimatePurchasePrice)).toFixed(2));//金额
$("#unitPrice" + thisRowNum).val(bean.normsEstimatePurchasePrice.toFixed(2));//单价
$("#amountOfMoney" + thisRowNum).val((rkNum * parseFloat(bean.normsEstimatePurchasePrice)).toFixed(2));//金额
return false;
}
});
......
......@@ -60,9 +60,9 @@ layui.config({
//加工产品信息
machinPro = {
materialId: data.materialId,
materialName: data.materialName,
materialModel: data.materialModel,
unitList: data.unitList
materialName: data.normMation.materialName,
materialModel: data.normMation.materialModel,
unitList: data.normMation.unitList
};
$("#productName").val(machinPro.materialName);
$("#productModel").val(machinPro.materialModel);
......@@ -126,8 +126,8 @@ layui.config({
if(thisRowValue == bean.id){//获取规格
//获取当前行数量
var rkNum = parseInt($("#rkNum" + thisRowNum).val());
$("#unitPrice" + thisRowNum).val(bean.estimatePurchasePrice.toFixed(2));//单价
$("#amountOfMoney" + thisRowNum).val((rkNum * parseFloat(bean.estimatePurchasePrice)).toFixed(2));//金额
$("#unitPrice" + thisRowNum).val(bean.normsEstimatePurchasePrice.toFixed(2));//单价
$("#amountOfMoney" + thisRowNum).val((rkNum * parseFloat(bean.normsEstimatePurchasePrice)).toFixed(2));//金额
return false;
}
});
......
......@@ -49,8 +49,8 @@ layui.config({
if(thisRowValue == bean.id){//获取规格
//获取当前行数量
var rkNum = parseInt($("#rkNum" + thisRowNum).val());
$("#unitPrice" + thisRowNum).val(bean.estimatePurchasePrice.toFixed(2));//单价
$("#amountOfMoney" + thisRowNum).val((rkNum * parseFloat(bean.estimatePurchasePrice)).toFixed(2));//金额
$("#unitPrice" + thisRowNum).val(bean.normsEstimatePurchasePrice.toFixed(2));//单价
$("#amountOfMoney" + thisRowNum).val((rkNum * parseFloat(bean.normsEstimatePurchasePrice)).toFixed(2));//金额
return false;
}
});
......
......@@ -84,8 +84,8 @@ layui.config({
if(thisRowValue == bean.id){//获取规格
//获取当前行数量
var rkNum = parseInt($("#rkNum" + thisRowNum).val());
$("#unitPrice" + thisRowNum).val(bean.estimatePurchasePrice.toFixed(2));//单价
$("#amountOfMoney" + thisRowNum).val((rkNum * parseFloat(bean.estimatePurchasePrice)).toFixed(2));//金额
$("#unitPrice" + thisRowNum).val(bean.normsEstimatePurchasePrice.toFixed(2));//单价
$("#amountOfMoney" + thisRowNum).val((rkNum * parseFloat(bean.normsEstimatePurchasePrice)).toFixed(2));//金额
return false;
}
});
......
......@@ -49,8 +49,8 @@ layui.config({
if(thisRowValue == bean.id){//获取规格
//获取当前行数量
var rkNum = parseInt($("#rkNum" + thisRowNum).val());
$("#unitPrice" + thisRowNum).val(bean.estimatePurchasePrice.toFixed(2));//单价
$("#amountOfMoney" + thisRowNum).val((rkNum * parseFloat(bean.estimatePurchasePrice)).toFixed(2));//金额
$("#unitPrice" + thisRowNum).val(bean.normsEstimatePurchasePrice.toFixed(2));//单价
$("#amountOfMoney" + thisRowNum).val((rkNum * parseFloat(bean.normsEstimatePurchasePrice)).toFixed(2));//金额
return false;
}
});
......
......@@ -94,8 +94,8 @@ layui.config({
if(thisRowValue == bean.id){//获取规格
//获取当前行数量
var rkNum = parseInt($("#rkNum" + thisRowNum).val());
$("#unitPrice" + thisRowNum).val(bean.estimatePurchasePrice.toFixed(2));//单价
$("#amountOfMoney" + thisRowNum).val((rkNum * parseFloat(bean.estimatePurchasePrice)).toFixed(2));//金额
$("#unitPrice" + thisRowNum).val(bean.normsEstimatePurchasePrice.toFixed(2));//单价
$("#amountOfMoney" + thisRowNum).val((rkNum * parseFloat(bean.normsEstimatePurchasePrice)).toFixed(2));//金额
return false;
}
});
......
......@@ -45,8 +45,8 @@ layui.config({
if(thisRowValue == bean.id){//获取规格
//获取当前行数量
var rkNum = parseInt($("#rkNum" + thisRowNum).val());
$("#unitPrice" + thisRowNum).val(bean.estimatePurchasePrice.toFixed(2));//单价
$("#amountOfMoney" + thisRowNum).val((rkNum * parseFloat(bean.estimatePurchasePrice)).toFixed(2));//金额
$("#unitPrice" + thisRowNum).val(bean.normsEstimatePurchasePrice.toFixed(2));//单价
$("#amountOfMoney" + thisRowNum).val((rkNum * parseFloat(bean.normsEstimatePurchasePrice)).toFixed(2));//金额
return false;
}
});
......
......@@ -75,8 +75,8 @@ layui.config({
if(thisRowValue == bean.id){//获取规格
//获取当前行数量
var rkNum = parseInt($("#rkNum" + thisRowNum).val());
$("#unitPrice" + thisRowNum).val(bean.estimatePurchasePrice.toFixed(2));//单价
$("#amountOfMoney" + thisRowNum).val((rkNum * parseFloat(bean.estimatePurchasePrice)).toFixed(2));//金额
$("#unitPrice" + thisRowNum).val(bean.normsEstimatePurchasePrice.toFixed(2));//单价
$("#amountOfMoney" + thisRowNum).val((rkNum * parseFloat(bean.normsEstimatePurchasePrice)).toFixed(2));//金额
return false;
}
});
......
......@@ -186,7 +186,7 @@ layui.config({
normsId: item.normsId,
number: $("#proposal" + item.materialId).val(),
unitNumber: item.needNum,
unitPrice: item.normsPurchasePrice
unitPrice: item.normsEstimatePurchasePrice
});
});
//子件清单信息
......
......@@ -56,19 +56,19 @@
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">商品名称</label>
<div class="layui-input-block ver-center">
{{materialName}}
{{normMation.materialName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">商品型号</label>
<div class="layui-input-block ver-center">
{{materialModel}}
{{normMation.materialModel}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">计量单位</label>
<div class="layui-input-block ver-center">
{{unitName}}
{{normMation.unitName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
......@@ -133,6 +133,7 @@
<!-- 表格行 -->
<script type="text/html" id="tableBody">
<div class="diy" style="width: 13%">{{productName}}</div>
<div class="diy" style="width: 13%">{{productModel}}</div>
<div class="diy" style="width: 6%">{{unitName}}</div>
<div class="diy procedureBox" style="width: 15%" id="procedureBox{{productId}}"
......
......@@ -52,7 +52,7 @@
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">加工商品</label>
<div class="layui-input-block ver-center">
{{materialName}}
{{normMation.materialName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
......@@ -64,13 +64,13 @@
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">商品型号</label>
<div class="layui-input-block ver-center">
{{materialModel}}
{{normMation.materialModel}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">计量单位</label>
<div class="layui-input-block ver-center">
{{unitName}}
{{normMation.unitName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
......
......@@ -57,7 +57,7 @@ layui.config({
matchingLanguage();
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "estimatePurchasePrice", calculatedTotalPrice);
mUnitChangeEvent(form, allChooseProduct, "normsEstimatePurchasePrice", calculatedTotalPrice);
// 调出仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -109,7 +109,7 @@ layui.config({
}
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "estimatePurchasePrice", calculatedTotalPrice);
mUnitChangeEvent(form, allChooseProduct, "normsEstimatePurchasePrice", calculatedTotalPrice);
// 调出仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -56,7 +56,7 @@ layui.config({
matchingLanguage();
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "estimatePurchasePrice", calculatedTotalPrice);
mUnitChangeEvent(form, allChooseProduct, "normsEstimatePurchasePrice", calculatedTotalPrice);
// 仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -109,7 +109,7 @@ layui.config({
}
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "estimatePurchasePrice", calculatedTotalPrice);
mUnitChangeEvent(form, allChooseProduct, "normsEstimatePurchasePrice", calculatedTotalPrice);
// 仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -258,7 +258,7 @@ layui.config({
}
});
if(proIndex >= 0 && normsIndex >= 0){
return productMationList[proIndex].unitList[normsIndex].estimatePurchasePrice;
return productMationList[proIndex].unitList[normsIndex].normsEstimatePurchasePrice;
} else {
return new Array();
}
......
......@@ -79,7 +79,7 @@ layui.config({
matchingLanguage();
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "salePrice");
mUnitChangeEvent(form, allChooseProduct, "normsSalePrice");
// 仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -143,7 +143,7 @@ layui.config({
}
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "estimatePurchasePrice");
mUnitChangeEvent(form, allChooseProduct, "normsEstimatePurchasePrice");
// 仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -79,7 +79,7 @@ layui.config({
matchingLanguage();
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "estimatePurchasePrice");
mUnitChangeEvent(form, allChooseProduct, "normsEstimatePurchasePrice");
// 仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -139,7 +139,7 @@ layui.config({
}
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "estimatePurchasePrice");
mUnitChangeEvent(form, allChooseProduct, "normsEstimatePurchasePrice");
// 仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -79,7 +79,7 @@ layui.config({
matchingLanguage();
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "estimatePurchasePrice");
mUnitChangeEvent(form, allChooseProduct, "normsEstimatePurchasePrice");
// 保存为草稿
form.on('submit(formAddBean)', function(data) {
......
......@@ -143,7 +143,7 @@ layui.config({
}
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "estimatePurchasePrice");
mUnitChangeEvent(form, allChooseProduct, "normsEstimatePurchasePrice");
// 保存为草稿
form.on('submit(formEditBean)', function(data) {
......
......@@ -184,7 +184,7 @@ layui.config({
}
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "estimatePurchasePrice");
mUnitChangeEvent(form, allChooseProduct, "normsEstimatePurchasePrice");
// 仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -101,7 +101,7 @@ layui.config({
matchingLanguage();
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "estimatePurchasePrice");
mUnitChangeEvent(form, allChooseProduct, "normsEstimatePurchasePrice");
// 仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -176,7 +176,7 @@ layui.config({
}
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "estimatePurchasePrice");
mUnitChangeEvent(form, allChooseProduct, "normsEstimatePurchasePrice");
// 仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -104,7 +104,7 @@ layui.config({
matchingLanguage();
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "estimatePurchasePrice");
mUnitChangeEvent(form, allChooseProduct, "normsEstimatePurchasePrice");
// 仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -176,7 +176,7 @@ layui.config({
}
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "estimatePurchasePrice");
mUnitChangeEvent(form, allChooseProduct, "normsEstimatePurchasePrice");
// 仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -71,7 +71,7 @@ layui.config({
matchingLanguage();
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "retailPrice", calculatedTotalPrice);
mUnitChangeEvent(form, allChooseProduct, "normsRetailPrice", calculatedTotalPrice);
// 仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -139,7 +139,7 @@ layui.config({
}
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "retailPrice", calculatedTotalPrice);
mUnitChangeEvent(form, allChooseProduct, "normsRetailPrice", calculatedTotalPrice);
// 仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -71,7 +71,7 @@ layui.config({
matchingLanguage();
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "retailPrice", calculatedTotalPrice);
mUnitChangeEvent(form, allChooseProduct, "normsRetailPrice", calculatedTotalPrice);
// 仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -139,7 +139,7 @@ layui.config({
}
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "retailPrice", calculatedTotalPrice);
mUnitChangeEvent(form, allChooseProduct, "normsRetailPrice", calculatedTotalPrice);
// 仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -100,7 +100,7 @@ layui.config({
matchingLanguage();
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "salePrice");
mUnitChangeEvent(form, allChooseProduct, "normsSalePrice");
// 保存为草稿
form.on('submit(formAddBean)', function(data) {
......
......@@ -192,7 +192,7 @@ layui.config({
}
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "salePrice");
mUnitChangeEvent(form, allChooseProduct, "normsSalePrice");
// 保存为草稿
form.on('submit(formEditBean)', function(data) {
......
......@@ -203,7 +203,7 @@ layui.config({
}
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "salePrice");
mUnitChangeEvent(form, allChooseProduct, "normsSalePrice");
// 仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -108,7 +108,7 @@ layui.config({
matchingLanguage();
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "salePrice");
mUnitChangeEvent(form, allChooseProduct, "normsSalePrice");
// 仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -196,7 +196,7 @@ layui.config({
}
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "salePrice");
mUnitChangeEvent(form, allChooseProduct, "normsSalePrice");
// 仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -110,7 +110,7 @@ layui.config({
matchingLanguage();
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "salePrice");
mUnitChangeEvent(form, allChooseProduct, "normsSalePrice");
// 仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -193,7 +193,7 @@ layui.config({
}
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "salePrice");
mUnitChangeEvent(form, allChooseProduct, "normsSalePrice");
// 仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -56,7 +56,7 @@ layui.config({
matchingLanguage();
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "estimatePurchasePrice", calculatedTotalPrice);
mUnitChangeEvent(form, allChooseProduct, "normsEstimatePurchasePrice", calculatedTotalPrice);
// 仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -110,7 +110,7 @@ layui.config({
}
// 商品规格加载变化事件
mUnitChangeEvent(form, allChooseProduct, "estimatePurchasePrice", calculatedTotalPrice);
mUnitChangeEvent(form, allChooseProduct, "normsEstimatePurchasePrice", calculatedTotalPrice);
// 仓库变化事件
form.on('select(depotId)', function(data) {
......
......@@ -53,8 +53,8 @@ layui.config({
if(thisRowValue == bean.id){// 获取规格
// 获取当前行数量
var rkNum = parseInt($("#rkNum" + thisRowNum).val());
$("#unitPrice" + thisRowNum).html(bean.retailPrice.toFixed(2));// 单价
$("#amountOfMoney" + thisRowNum).html((rkNum * parseFloat(bean.retailPrice)).toFixed(2));// 金额
$("#unitPrice" + thisRowNum).html(bean.normsRetailPrice.toFixed(2));// 单价
$("#amountOfMoney" + thisRowNum).html((rkNum * parseFloat(bean.normsRetailPrice)).toFixed(2));// 金额
return false;
}
});
......
......@@ -111,8 +111,8 @@ layui.config({
if(thisRowValue == bean.id){// 获取规格
// 获取当前行数量
var rkNum = parseInt($("#rkNum" + thisRowNum).val());
$("#unitPrice" + thisRowNum).html(bean.retailPrice.toFixed(2));// 单价
$("#amountOfMoney" + thisRowNum).html((rkNum * parseFloat(bean.retailPrice)).toFixed(2));// 金额
$("#unitPrice" + thisRowNum).html(bean.normsRetailPrice.toFixed(2));// 单价
$("#amountOfMoney" + thisRowNum).html((rkNum * parseFloat(bean.normsRetailPrice)).toFixed(2));// 金额
return false;
}
});
......
......@@ -66,8 +66,8 @@ layui.config({
if(thisRowValue == bean.id){// 获取规格
// 获取当前行数量
var rkNum = parseInt($("#rkNum" + thisRowNum).val());
$("#unitPrice" + thisRowNum).html(bean.retailPrice.toFixed(2));// 单价
$("#amountOfMoney" + thisRowNum).html((rkNum * parseFloat(bean.retailPrice)).toFixed(2));// 金额
$("#unitPrice" + thisRowNum).html(bean.normsRetailPrice.toFixed(2));// 单价
$("#amountOfMoney" + thisRowNum).html((rkNum * parseFloat(bean.normsRetailPrice)).toFixed(2));// 金额
return false;
}
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册