提交 cf40eb92 编写于 作者: doc_wei's avatar doc_wei

feat: 条形码明细修改

上级 6235a431
......@@ -11,9 +11,17 @@ layui.config({
textool = layui.textool,
form = layui.form;
var selTemplate = getFileContent('tpl/template/select-option.tpl');
var materialId = getNotUndefinedVal(GetUrlParam("materialId"));
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryAllMaterialList", params: {}, type: 'json', method: 'GET', callback: function (json) {
$("#materialId").html(getDataUseHandlebars(selTemplate, json));
if (!isNull(materialId)) {
$("#materialId").val(materialId);
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryNormsListByMaterialId", params: {materialId: materialId}, type: 'json', method: 'GET', callback: function (result) {
$("#normsId").html(getDataUseHandlebars(selTemplate, result));
form.render("select");
}, async: false});
}
form.render("select");
skyeyeClassEnumUtil.showEnumDataListByClassName("materialNormsCodeInDepot", 'radio', "inDepot", '', form);
......
......@@ -12,6 +12,10 @@ layui.config({
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form;
var selOptionHtml = getFileContent('tpl/template/select-option.tpl');
let materialId = getNotUndefinedVal(GetUrlParam("materialId"));
let materialMap = {};
initTableChooseUtil.initTable({
id: "materialNormsList",
......@@ -24,12 +28,30 @@ layui.config({
delete allChooseProduct[trcusid];
},
addRowCallback: function (trcusid) {
if (!isNull(materialId)) {
$("#materialId").val(materialId);
if (isNull(materialMap[materialId])) {
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMaterialListById", params: {"id": materialId}, type: 'json', method: 'GET', callback: function (json) {
materialMap[materialId] = json.bean
}, async: false});
}
let chooseProductMation = materialMap[materialId]
// 获取表格行号
var thisRowKey = trcusid.replace("tr", "");
// 产品名称赋值
$("#materialId" + thisRowKey).val(chooseProductMation.name);
$("#materialId" + thisRowKey).attr(initTableChooseUtil.chooseInputDataIdKey, chooseProductMation.id);
// 规格赋值
$("#normsId" + thisRowKey).html(getDataUseHandlebars(selOptionHtml, {rows: chooseProductMation.materialNorms}));
form.render('select');
// 商品赋值
allChooseProduct[trcusid] = chooseProductMation;
}
},
form: form,
minData: 1
});
var selOptionHtml = getFileContent('tpl/template/select-option.tpl');
$("body").on("click", ".chooseProductBtn", function (e) {
var trId = $(this).parent().parent().attr("trcusid");
erpOrderUtil.openMaterialChooseChoosePage(function (chooseProductMation) {
......
......@@ -86,7 +86,7 @@ layui.config({
// 新增
$("body").on("click", "#addBean", function() {
_openNewWindows({
url: "../../tpl/materialCode/materialCodeAdd.html",
url: "../../tpl/materialCode/materialCodeAdd.html?materialId=" + materialId,
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "materialCodeAdd",
area: ['90vw', '90vh'],
......@@ -99,7 +99,7 @@ layui.config({
// 批量复制
$("body").on("click", "#batchCopy", function() {
_openNewWindows({
url: "../../tpl/materialCode/batchCopy.html",
url: "../../tpl/materialCode/batchCopy.html?materialId=" + materialId,
title: '批量复制',
pageId: "materialCodeBatchCopy",
area: ['90vw', '90vh'],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册