diff --git a/erp-produce/src/main/resources/template/js/erpDepartStock/erpDepartStockList.js b/erp-produce/src/main/resources/template/js/erpDepartStock/erpDepartStockList.js
index 2716aaa8e27658e82c6928be85a1099517b8e85b..2962a58e2f4f96c5961e4c8615b6508c196adc44 100644
--- a/erp-produce/src/main/resources/template/js/erpDepartStock/erpDepartStockList.js
+++ b/erp-produce/src/main/resources/template/js/erpDepartStock/erpDepartStockList.js
@@ -1,87 +1,40 @@
-var rowId = "";
-
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
-}).define(['window', 'table', 'jquery', 'winui', 'form', 'soulTable'], function (exports) {
+}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
- table = layui.table,
- soulTable = layui.soulTable;
+ table = layui.table;
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
- url: flowableBasePath + 'erpdepartstock001',
+ url: sysMainMation.erpBasePath + 'erpdepartstock001',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
- overflow: {
- type: 'tips',
- hoverTime: 300, // 悬停时间,单位ms, 悬停 hoverTime 后才会显示,默认为 0
- minWidth: 150, // 最小宽度
- maxWidth: 500 // 最大宽度
- },
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
- { field: 'materialName', title: '商品名称', align: 'left', width: 150, templet: function (d) {
- return '' + d.materialName + '';
- }},
- { field: 'materialModel', title: '型号', align: 'left', width: 150 },
- { field: 'categoryName', title: '所属类型', align: 'center', width: 100 },
- { field: 'typeName', title: '商品来源', align: 'left', width: 100 },
- { field: 'norms', title: '库存', align: 'center', width: 100, templet: function (d) {
- var str = "";
- $.each(d.norms, function(i, item) {
- str += '' + item.departmentTock + '' + item.name + '
';
- });
- return str;
- }},
- { field: 'enabled', title: '状态', align: 'center', width: 60, templet: function (d) {
- if (d.enabled == '0') {
- return "禁用";
- } else if (d.enabled == '1') {
- return "启用";
- }
- }},
- { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 }
+ { field: 'materialMation', title: '产品', align: 'left', width: 120, templet: function (d) {return isNull(d.materialMation) ? '' : d.materialMation.name}},
+ { field: 'normsMation', title: '规格', align: 'left', width: 200, templet: function (d) {return isNull(d.normsMation) ? '' : d.normsMation.name}},
+ { field: 'departmentMation', title: '处理部门', align: 'left', width: 200, templet: function (d) {return isNull(d.departmentMation) ? '' : d.departmentMation.name}},
+ { field: 'stock', title: '部门库存', align: 'center', width: 80 }
]],
done: function(json) {
matchingLanguage();
- soulTable.render(this);
- initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入商品名称,型号", function () {
+ initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "暂不支持搜索", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
});
- table.on('tool(messageTable)', function (obj) {
- var data = obj.data;
- var layEvent = obj.event;
- if (layEvent === 'details') { // 详情
- details(data);
- }
- });
-
- // 详情
- function details(data) {
- rowId = data.id;
- _openNewWindows({
- url: "../../tpl/material/materialDetails.html",
- title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
- pageId: "materialDetails",
- area: ['90vw', '90vh'],
- callBack: function (refreshCode) {
- }});
- }
-
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
diff --git a/erp-produce/src/main/resources/template/js/erpMachin/erpDepartMachinList.js b/erp-produce/src/main/resources/template/js/erpMachin/erpDepartMachinList.js
index 6a8c514c53cd4771209dffa190cbfe9b3782158c..5b903ed1b14a66997f8197ef3bbb56c54bd44ae9 100644
--- a/erp-produce/src/main/resources/template/js/erpMachin/erpDepartMachinList.js
+++ b/erp-produce/src/main/resources/template/js/erpMachin/erpDepartMachinList.js
@@ -41,7 +41,7 @@ layui.config({
{ title: systemLanguage["com.skyeye.operation"][languageType], rowspan: '2', fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'}
], [
{ field: 'materialMation', title: '名称', align: 'left', width: 120, templet: function (d) {return isNull(d.materialMation) ? '' : d.materialMation.name}},
- { field: 'normsMation', title: '规格', align: 'left', width: 80, templet: function (d) {return isNull(d.normsMation) ? '' : d.normsMation.name}},
+ { field: 'normsMation', title: '规格', align: 'left', width: 200, templet: function (d) {return isNull(d.normsMation) ? '' : d.normsMation.name}},
{ field: 'needNum', title: '加工数量', align: 'center', width: 80 },
{ field: 'departmentMation', title: '加工部门', align: 'left', width: 100, templet: function (d) {return isNull(d.departmentMation) ? '' : d.departmentMation.name}},
{ field: 'startTime', title: '开始时间', align: 'center', width: 150 },
diff --git a/erp-produce/src/main/resources/template/js/erpMachin/erpMachinList.js b/erp-produce/src/main/resources/template/js/erpMachin/erpMachinList.js
index 84e423a35134f9899dedc71e4eb1c30fc12b6c6c..85c7b9ad527a71785db7b7c753467ca96673bbf2 100644
--- a/erp-produce/src/main/resources/template/js/erpMachin/erpMachinList.js
+++ b/erp-produce/src/main/resources/template/js/erpMachin/erpMachinList.js
@@ -43,7 +43,7 @@ layui.config({
{ title: systemLanguage["com.skyeye.operation"][languageType], rowspan: '2', fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'}
], [
{ field: 'materialMation', title: '名称', align: 'left', width: 120, templet: function (d) {return isNull(d.materialMation) ? '' : d.materialMation.name}},
- { field: 'normsMation', title: '规格', align: 'left', width: 80, templet: function (d) {return isNull(d.normsMation) ? '' : d.normsMation.name}},
+ { field: 'normsMation', title: '规格', align: 'left', width: 200, templet: function (d) {return isNull(d.normsMation) ? '' : d.normsMation.name}},
{ field: 'needNum', title: '加工数量', align: 'center', width: 80 },
{ field: 'departmentMation', title: '加工部门', align: 'left', width: 100, templet: function (d) {return isNull(d.departmentMation) ? '' : d.departmentMation.name}},
{ field: 'startTime', title: '开始时间', align: 'center', width: 150 },
diff --git a/erp-produce/src/main/resources/template/js/erpMachin/erpMachinStateIsPassNoComplateChoose.js b/erp-produce/src/main/resources/template/js/erpMachin/erpMachinStateIsPassNoComplateChoose.js
index 840b4cf7e8269d8cc2aa67e421f3c43f76b3c966..1cb7ec3a08766b5ce36d811f3d5f5fb2219beb96 100644
--- a/erp-produce/src/main/resources/template/js/erpMachin/erpMachinStateIsPassNoComplateChoose.js
+++ b/erp-produce/src/main/resources/template/js/erpMachin/erpMachinStateIsPassNoComplateChoose.js
@@ -43,7 +43,7 @@ layui.config({
], [
{ field: 'materialMation', title: '名称', align: 'left', width: 120, templet: function (d) {return isNull(d.materialMation) ? '' : d.materialMation.name}},
- { field: 'normsMation', title: '规格', align: 'left', width: 80, templet: function (d) {return isNull(d.normsMation) ? '' : d.normsMation.name}},
+ { field: 'normsMation', title: '规格', align: 'left', width: 200, templet: function (d) {return isNull(d.normsMation) ? '' : d.normsMation.name}},
{ field: 'needNum', title: '加工数量', align: 'center', width: 80 },
{ field: 'departmentMation', title: '加工部门', align: 'left', width: 100, templet: function (d) {return isNull(d.departmentMation) ? '' : d.departmentMation.name}},
{ field: 'startTime', title: '开始时间', align: 'center', width: 150 },
diff --git a/erp-produce/src/main/resources/template/js/erpPick/erpPickApprovalExamine.js b/erp-produce/src/main/resources/template/js/erpPick/erpPickApprovalExamine.js
deleted file mode 100644
index 257909e7e92746d1dcd7b81e717323daf335442d..0000000000000000000000000000000000000000
--- a/erp-produce/src/main/resources/template/js/erpPick/erpPickApprovalExamine.js
+++ /dev/null
@@ -1,64 +0,0 @@
-
-var rowId = "";
-
-layui.config({
- base: basePath,
- version: skyeyeVersion
-}).extend({
- window: 'js/winui.window'
-}).define(['window', 'table', 'jquery', 'winui', 'textool'], function (exports) {
- winui.renderColor();
- layui.use(['form'], function (form) {
- var index = parent.layer.getFrameIndex(window.name);
- var $ = layui.$,
- textool = layui.textool;
-
- textool.init({eleId: 'opinion', maxlength: 200});
-
- rowId = parent.rowId;
- var type = parent.type;
- var url = erpOrderUtil.getErpDetailUrl({subType: type});
- $("#showBean").attr("src", url);
-
- //为了iframe高度自适应
- var loadNum = 0;
- var interval = setInterval(iFrameHeight, 300);
- function iFrameHeight() {
- var ifm = document.getElementById("showBean");
- var subWeb = document.frames ? document.frames["showBean"].document : ifm.contentDocument;
- if(ifm != null && subWeb != null) {
- ifm.height = subWeb.body.scrollHeight;
- loadNum++;
- if(loadNum > 10){
- clearInterval(interval);//停止
- }
- }
- }
-
- matchingLanguage();
- form.render();
- form.on('submit(formAddBean)', function (data) {
- if (winui.verifyForm(data.elem)) {
- var msg = '确认提交吗?';
- layer.confirm(msg, { icon: 3, title: '提交审批' }, function (i) {
- layer.close(i);
- var jStr = {
- content: $("#opinion").val(),
- status: $("input[name='flag']:checked").val(),
- rowId: parent.rowId
- };
- AjaxPostUtil.request({url: flowableBasePath + "erppick016", params: jStr, type: 'json', callback: function (json) {
- parent.layer.close(index);
- parent.refreshCode = '0';
- }});
- });
- }
- return false;
- });
-
- // 取消
- $("body").on("click", "#cancle", function() {
- parent.layer.close(index);
- });
- });
-});
\ No newline at end of file
diff --git a/erp-produce/src/main/resources/template/js/erpPick/erpRequisitionAdd.js b/erp-produce/src/main/resources/template/js/erpPick/erpRequisitionAdd.js
deleted file mode 100644
index 9a2110d05c4fa65f54c49fc529ab555c059517d5..0000000000000000000000000000000000000000
--- a/erp-produce/src/main/resources/template/js/erpPick/erpRequisitionAdd.js
+++ /dev/null
@@ -1,245 +0,0 @@
-
-//加工单信息
-var machinMation = {};
-
-//根据那一列的值进行变化,默认根据数量
-var showTdByEdit = 'rkNum';
-//表格的序号
-var rowNum = 1;
-
-// 领料单
-layui.config({
- base: basePath,
- version: skyeyeVersion
-}).extend({
- window: 'js/winui.window'
-}).define(['window', 'jquery', 'winui', 'laydate', 'textool'], function (exports) {
- winui.renderColor();
- layui.use(['form'], function (form) {
- var index = parent.layer.getFrameIndex(window.name);
- var $ = layui.$,
- form = layui.form,
- laydate = layui.laydate,
- textool = layui.textool;
-
- var usetableTemplate = $("#usetableTemplate").html();
- var selOption = getFileContent('tpl/template/select-option.tpl');
- //已经选择的商品集合key:表格的行trId,value:商品信息
- var allChooseProduct = {};
-
- erpOrderUtil.getDepotList(function (json){
- // 加载仓库数据
- $("#depotId").html(getDataUseHandlebars(selOption, json));
- form.render();
- });
-
- textool.init({eleId: 'remark', maxlength: 200});
-
- // 单据时间
- laydate.render({elem: '#operTime', type: 'datetime', value: getFormatDate(), trigger: 'click'});
-
- //商品规格加载变化事件
- form.on('select(selectUnitProperty)', function(data) {
- var thisRowValue = data.value;
- var thisRowNum = data.elem.id.replace("unitId", "");//获取当前行
- //当前当前行选中的商品信息
- if (!isNull(thisRowValue) && thisRowValue != '请选择') {
- var product = allChooseProduct["tr" + thisRowNum.toString()];
- $.each(product.unitList, function(j, bean) {
- 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));//金额
- return false;
- }
- });
- } else {
- $("#unitPrice" + thisRowNum).val("0.00");//重置单价为空
- $("#amountOfMoney" + thisRowNum).val("0.00");//重置金额为空
- }
-
- //加载库存
- loadTockByDepotAndMUnit(thisRowNum, $("#depotId").val());
- //计算价格
- calculatedTotalPrice();
- });
-
- matchingLanguage();
- form.render();
- form.on('submit(formAddBean)', function (data) {
- if (winui.verifyForm(data.elem)) {
- //物料清单
- var rowTr = $("#useTable tr");
- if(rowTr.length == 0) {
- winui.window.msg('请选择物料清单.', {icon: 2, time: 2000});
- return false;
- }
- var tableData = new Array();
- var noError = false; //循环遍历表格数据时,是否有其他错误信息
- $.each(rowTr, function(i, item) {
- //获取行编号
- var rowNum = $(item).attr("trcusid").replace("tr", "");
- //表格数量对象
- var rkNum = $("#rkNum" + rowNum);
- if(parseInt(rkNum.val()) == 0) {
- rkNum.addClass("layui-form-danger");
- rkNum.focus();
- winui.window.msg('数量不能为0', {icon: 2, time: 2000});
- noError = true;
- return false;
- }
- //商品对象
- var material = allChooseProduct["tr" + rowNum.toString()];
- if(inTableDataArrayByAssetarId(material.materialId, $("#unitId" + rowNum).val(), tableData)) {
- winui.window.msg('一张单中不允许出现相同单位的商品信息.', {icon: 2, time: 2000});
- noError = true;
- return false;
- }
- var row = {
- materialId: material.materialId,
- mUnitId: $("#unitId" + rowNum).val(),
- rkNum: rkNum.val(),
- unitPrice: $("#unitPrice" + rowNum).val()
- };
- tableData.push(row);
- });
- if(noError) {
- return false;
- }
-
- var params = {
- machinId: isNull(machinMation.id) ? '' : machinMation.id,
- productionId: isNull(machinMation.productionId) ? '' : machinMation.productionId,
- operTime: $("#operTime").val(),
- remark: $("#remark").val(),
- materialStr: JSON.stringify(tableData),
- depotId: $("#depotId").val()
- };
- AjaxPostUtil.request({url: flowableBasePath + "erppick004", params: params, type: 'json', callback: function (json) {
- parent.layer.close(index);
- parent.refreshCode = '0';
- }});
- }
- return false;
- });
-
- //新增行
- $("body").on("click", "#addRow", function() {
- addRow();
- });
-
- //删除行
- $("body").on("click", "#deleteRow", function() {
- deleteRow();
- //计算价格
- calculatedTotalPrice();
- });
-
- //新增行
- function addRow() {
- var par = {
- id: "row" + rowNum.toString(), //checkbox的id
- trId: "tr" + rowNum.toString(), //行的id
- materialId: "materialId" + rowNum.toString(), //商品id
- unitId: "unitId" + rowNum.toString(), //规格id
- currentTock: "currentTock" + rowNum.toString(), //库存id
- productionNum: "productionNum" + rowNum.toString(), //所需总数量id
- machinNum: "machinNum" + rowNum.toString(), //待分配数量id
- rkNum: "rkNum" + rowNum.toString(), //数量id
- unitPrice: "unitPrice" + rowNum.toString(), //单价id
- amountOfMoney: "amountOfMoney" + rowNum.toString() //金额id
- };
- $("#useTable").append(getDataUseHandlebars(usetableTemplate, par));
- form.render();
- rowNum++;
- //设置根据某列变化的颜色
- $("." + showTdByEdit).parent().css({'background-color': '#e6e6e6'});
- }
-
- //删除行
- function deleteRow() {
- var checkRow = $("#useTable input[type='checkbox'][name='tableCheckRow']:checked");
- if(checkRow.length > 0) {
- $.each(checkRow, function(i, item) {
- //删除allChooseProduct已选择的商品信息
- var trId = $(item).parent().parent().attr("trcusid");
- allChooseProduct[trId] = undefined;
- //移除界面上的信息
- $(item).parent().parent().remove();
- });
- } else {
- winui.window.msg('请选择要删除的行', {icon: 2, time: 2000});
- }
- }
-
- //商品选择
- $("body").on("click", ".chooseProductBtn", function (e) {
- var trId = $(this).parent().parent().attr("trcusid");
- erpOrderUtil.openMaterialChooseChoosePage(function (chooseProductMation) {
- //获取表格行号
- var thisRowNum = trId.replace("tr", "");
- //商品赋值
- allChooseProduct[trId] = chooseProductMation;
- //表格商品名称赋值
- $("#materialId" + thisRowNum.toString()).val(allChooseProduct[trId].materialName + "(" + allChooseProduct[trId].materialModel + ")");
- //表格单位赋值
- $("#unitId" + thisRowNum.toString()).html(getDataUseHandlebars(selOption, {rows: allChooseProduct[trId].unitList}));
- form.render('select');
- //计算价格
- calculatedTotalPrice();
- });
- });
-
- // 加工单选择
- $("body").on("click", "#machinOrderSel", function (e) {
- _openNewWindows({
- url: "../../tpl/erpMachin/erpMachinStateIsPassNoComplateChoose.html",
- title: "选择加工单",
- pageId: "erpMachinStateIsPassNoComplateChoose",
- area: ['90vw', '90vh'],
- callBack: function (refreshCode) {
- $("#machinOrder").val(machinMation.orderNum);
-
- //移除之前填写的所有行
- var checkRow = $("#useTable input[type='checkbox'][name='tableCheckRow']");
- $.each(checkRow, function(i, item) {
- //删除allChooseProduct已选择的商品信息
- var trId = $(item).parent().parent().attr("trcusid");
- allChooseProduct[trId] = undefined;
- //移除界面上的信息
- $(item).parent().parent().remove();
- });
- $.each(machinMation.norms, function(i, item) {
- addRow();
- //将规格所属的商品信息加入到对象中存储
- allChooseProduct["tr" + (rowNum - 1)] = item;
- //单位回显
- $("#unitId" + (rowNum - 1)).html(getDataUseHandlebars(selOption, {rows: item.unitList}));
- $("#unitId" + (rowNum - 1)).val(item.normsId);
- //商品回显
- $("#materialId" + (rowNum - 1)).val(item.materialName + "(" + item.materialModel + ")");
- $("#currentTock" + (rowNum - 1)).html(item.currentTock);//库存回显
- //所需领料总数量
- $("#productionNum" + (rowNum - 1)).html(item.needNumber);
- //待领料数量
- $("#machinNum" + (rowNum - 1)).html(item.machinNum);
- //建议数量
- $("#rkNum" + (rowNum - 1)).val(item.machinNum);
- $("#unitPrice" + (rowNum - 1)).val(item.unitPrice.toFixed(2));
- });
- //渲染
- form.render();
-
- //计算价格
- calculatedTotalPrice();
- }});
- });
-
- // 取消
- $("body").on("click", "#cancle", function() {
- parent.layer.close(index);
- });
- });
-
-});
\ No newline at end of file
diff --git a/erp-produce/src/main/resources/template/js/erpPick/erpRequisitionDetails.js b/erp-produce/src/main/resources/template/js/erpPick/erpRequisitionDetails.js
deleted file mode 100644
index f1164bf1bd9ff193feb817aef8dc57f6dbc82e68..0000000000000000000000000000000000000000
--- a/erp-produce/src/main/resources/template/js/erpPick/erpRequisitionDetails.js
+++ /dev/null
@@ -1,49 +0,0 @@
-
-layui.config({
- base: basePath,
- version: skyeyeVersion
-}).extend({
- window: 'js/winui.window'
-}).define(['window', 'jquery', 'winui', 'jqprint'], function (exports) {
- winui.renderColor();
- layui.use(['form'], function (form) {
- var index = parent.layer.getFrameIndex(window.name);
- var $ = layui.$,
- form = layui.form;
-
- showGrid({
- id: "showForm",
- url: flowableBasePath + "erppick007",
- params: {id: parent.rowId},
- pagination: false,
- method: 'GET',
- template: $("#useTemplate").html(),
- ajaxSendLoadBefore: function(hdb) {
- hdb.registerHelper('compare1', function(v1, v2, options) {
- return (parseFloat(v1) * parseFloat(v2)).toFixed(2);
- });
- },
- ajaxSendAfter: function (json) {
- matchingLanguage();
- form.render();
- }
- });
-
- //打印
- $("body").on("click", "#jprint", function (e) {
- $("#showForm").jqprint({
- title: sysMainMation.mationTitle,
- debug: false, //如果是true则可以显示iframe查看效果(iframe默认高和宽都很小,可以再源码中调大),默认是false
- importCSS: true, //true表示引进原来的页面的css,默认是true。(如果是true,先会找$("link[media=print]"),若没有会去找$("link")中的css文件)
- printContainer: true, //表示如果原来选择的对象必须被纳入打印(注意:设置为false可能会打破你的CSS规则)。
- operaSupport: true//表示如果插件也必须支持歌opera浏览器,在这种情况下,它提供了建立一个临时的打印选项卡。默认是true
- });
- });
-
- // 图片预览
- $("body").on("click", ".barCode", function (e) {
- systemCommonUtil.showPicImg(fileBasePath + $(this).attr("src"));
- });
-
- });
-});
\ No newline at end of file
diff --git a/erp-produce/src/main/resources/template/js/erpPick/erpRequisitionEdit.js b/erp-produce/src/main/resources/template/js/erpPick/erpRequisitionEdit.js
deleted file mode 100644
index 53dabec8f9e8f543c0150cf03ac5e2b0196990a7..0000000000000000000000000000000000000000
--- a/erp-produce/src/main/resources/template/js/erpPick/erpRequisitionEdit.js
+++ /dev/null
@@ -1,290 +0,0 @@
-
-//加工单信息
-var machinMation = {};
-
-//根据那一列的值进行变化,默认根据数量
-var showTdByEdit = 'rkNum';
-//表格的序号
-var rowNum = 1;
-
-// 领料单
-layui.config({
- base: basePath,
- version: skyeyeVersion
-}).extend({
- window: 'js/winui.window'
-}).define(['window', 'jquery', 'winui', 'laydate', 'textool'], function (exports) {
- winui.renderColor();
- layui.use(['form'], function (form) {
- var index = parent.layer.getFrameIndex(window.name);
- var $ = layui.$,
- form = layui.form,
- laydate = layui.laydate,
- textool = layui.textool;
-
- var usetableTemplate = $("#usetableTemplate").html();
- var selOption = getFileContent('tpl/template/select-option.tpl');
- //已经选择的商品集合key:表格的行trId,value:商品信息
- var allChooseProduct = {};
-
- textool.init({eleId: 'remark', maxlength: 200});
-
- // 单据时间
- laydate.render({elem: '#operTime', type: 'datetime', value: getFormatDate(), trigger: 'click'});
-
- erpOrderUtil.getDepotList(function (json){
- // 加载仓库数据
- $("#depotId").html(getDataUseHandlebars(selOption, json));
- loadData();
- });
-
- function loadData(){
- AjaxPostUtil.request({url: flowableBasePath + "erppick007", params: {id: parent.rowId}, type: 'json', method: 'GET', callback: function (json) {
- var data = json.bean;
- if (!isNull(data.machinId)){
- $("#machinOrder").val(data.machinNum);
- machinMation = {
- id: data.machinId,
- productionId: data.productionId
- };
- }
- $("#depotId").val(data.depotId);
- $("#operTime").val(data.operTime);
- $("#remark").val(data.remark);
-
- $.each(data.items, function(i, item) {
- addRow();
- //将规格所属的商品信息加入到对象中存储
- allChooseProduct["tr" + (rowNum - 1)] = item;
- //单位回显
- $("#unitId" + (rowNum - 1)).html(getDataUseHandlebars(selOption, {rows: item.unitList}));
- $("#unitId" + (rowNum - 1)).val(item.normsId);
- //商品回显
- $("#materialId" + (rowNum - 1)).val(item.materialName + "(" + item.materialModel + ")");
- $("#currentTock" + (rowNum - 1)).html(item.currentTock);//库存回显
- $.each(data.machinToMation, function(j, bean){
- if(bean.normsId == item.normsId){
- //所需领料总数量
- $("#productionNum" + (rowNum - 1)).html(bean.needNumber);
- //待领料数量
- $("#machinNum" + (rowNum - 1)).html(bean.machinNum);
- return false;
- }
- });
- //建议数量
- $("#rkNum" + (rowNum - 1)).val(item.needNumber);
- $("#unitPrice" + (rowNum - 1)).val(item.unitPrice.toFixed(2));
- });
- matchingLanguage();
- form.render();
-
- //计算价格
- calculatedTotalPrice();
- }});
- }
-
- //商品规格加载变化事件
- form.on('select(selectUnitProperty)', function(data) {
- var thisRowValue = data.value;
- var thisRowNum = data.elem.id.replace("unitId", "");//获取当前行
- //当前当前行选中的商品信息
- if (!isNull(thisRowValue) && thisRowValue != '请选择') {
- var product = allChooseProduct["tr" + thisRowNum.toString()];
- $.each(product.unitList, function(j, bean) {
- 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));//金额
- return false;
- }
- });
- } else {
- $("#unitPrice" + thisRowNum).val("0.00");//重置单价为空
- $("#amountOfMoney" + thisRowNum).val("0.00");//重置金额为空
- }
-
- //加载库存
- loadTockByDepotAndMUnit(thisRowNum, $("#depotId").val());
- //计算价格
- calculatedTotalPrice();
- });
-
- form.render();
- form.on('submit(formAddBean)', function (data) {
- if (winui.verifyForm(data.elem)) {
- //物料清单
- var rowTr = $("#useTable tr");
- if(rowTr.length == 0) {
- winui.window.msg('请选择物料清单.', {icon: 2, time: 2000});
- return false;
- }
- var tableData = new Array();
- var noError = false; //循环遍历表格数据时,是否有其他错误信息
- $.each(rowTr, function(i, item) {
- //获取行编号
- var rowNum = $(item).attr("trcusid").replace("tr", "");
- //表格数量对象
- var rkNum = $("#rkNum" + rowNum);
- if(parseInt(rkNum.val()) == 0) {
- rkNum.addClass("layui-form-danger");
- rkNum.focus();
- winui.window.msg('数量不能为0', {icon: 2, time: 2000});
- noError = true;
- return false;
- }
- //商品对象
- var material = allChooseProduct["tr" + rowNum.toString()];
- if(inTableDataArrayByAssetarId(material.materialId, $("#unitId" + rowNum).val(), tableData)) {
- winui.window.msg('一张单中不允许出现相同单位的商品信息.', {icon: 2, time: 2000});
- noError = true;
- return false;
- }
- var row = {
- materialId: material.materialId,
- mUnitId: $("#unitId" + rowNum).val(),
- rkNum: rkNum.val(),
- unitPrice: $("#unitPrice" + rowNum).val()
- };
- tableData.push(row);
- });
- if(noError) {
- return false;
- }
-
- var params = {
- machinId: isNull(machinMation.id) ? '' : machinMation.id,
- productionId: isNull(machinMation.productionId) ? '' : machinMation.productionId,
- operTime: $("#operTime").val(),
- remark: $("#remark").val(),
- materialStr: JSON.stringify(tableData),
- depotId: $("#depotId").val(),
- rowId: parent.rowId
- };
- AjaxPostUtil.request({url: flowableBasePath + "erppick006", params: params, type: 'json', callback: function (json) {
- parent.layer.close(index);
- parent.refreshCode = '0';
- }});
- }
- return false;
- });
-
- //新增行
- $("body").on("click", "#addRow", function() {
- addRow();
- });
-
- //删除行
- $("body").on("click", "#deleteRow", function() {
- deleteRow();
- //计算价格
- calculatedTotalPrice();
- });
-
- //新增行
- function addRow() {
- var par = {
- id: "row" + rowNum.toString(), //checkbox的id
- trId: "tr" + rowNum.toString(), //行的id
- materialId: "materialId" + rowNum.toString(), //商品id
- unitId: "unitId" + rowNum.toString(), //规格id
- currentTock: "currentTock" + rowNum.toString(), //库存id
- productionNum: "productionNum" + rowNum.toString(), //所需总数量id
- machinNum: "machinNum" + rowNum.toString(), //待分配数量id
- rkNum: "rkNum" + rowNum.toString(), //数量id
- unitPrice: "unitPrice" + rowNum.toString(), //单价id
- amountOfMoney: "amountOfMoney" + rowNum.toString() //金额id
- };
- $("#useTable").append(getDataUseHandlebars(usetableTemplate, par));
- form.render();
- rowNum++;
- //设置根据某列变化的颜色
- $("." + showTdByEdit).parent().css({'background-color': '#e6e6e6'});
- }
-
- //删除行
- function deleteRow() {
- var checkRow = $("#useTable input[type='checkbox'][name='tableCheckRow']:checked");
- if(checkRow.length > 0) {
- $.each(checkRow, function(i, item) {
- //删除allChooseProduct已选择的商品信息
- var trId = $(item).parent().parent().attr("trcusid");
- allChooseProduct[trId] = undefined;
- //移除界面上的信息
- $(item).parent().parent().remove();
- });
- } else {
- winui.window.msg('请选择要删除的行', {icon: 2, time: 2000});
- }
- }
-
- //商品选择
- $("body").on("click", ".chooseProductBtn", function (e) {
- var trId = $(this).parent().parent().attr("trcusid");
- erpOrderUtil.openMaterialChooseChoosePage(function (chooseProductMation) {
- // 获取表格行号
- var thisRowNum = trId.replace("tr", "");
- //商品赋值
- allChooseProduct[trId] = chooseProductMation;
- //表格商品名称赋值
- $("#materialId" + thisRowNum.toString()).val(allChooseProduct[trId].materialName + "(" + allChooseProduct[trId].materialModel + ")");
- //表格单位赋值
- $("#unitId" + thisRowNum.toString()).html(getDataUseHandlebars(selOption, {rows: allChooseProduct[trId].unitList}));
- form.render('select');
- //计算价格
- calculatedTotalPrice();
- });
- });
-
- // 加工单选择
- $("body").on("click", "#machinOrderSel", function (e) {
- _openNewWindows({
- url: "../../tpl/erpMachin/erpMachinStateIsPassNoComplateChoose.html",
- title: "选择加工单",
- pageId: "erpMachinStateIsPassNoComplateChoose",
- area: ['90vw', '90vh'],
- callBack: function (refreshCode) {
- $("#machinOrder").val(machinMation.orderNum);
-
- //移除之前填写的所有行
- var checkRow = $("#useTable input[type='checkbox'][name='tableCheckRow']");
- $.each(checkRow, function(i, item) {
- //删除allChooseProduct已选择的商品信息
- var trId = $(item).parent().parent().attr("trcusid");
- allChooseProduct[trId] = undefined;
- //移除界面上的信息
- $(item).parent().parent().remove();
- });
- $.each(machinMation.norms, function(i, item) {
- addRow();
- //将规格所属的商品信息加入到对象中存储
- allChooseProduct["tr" + (rowNum - 1)] = item;
- //单位回显
- $("#unitId" + (rowNum - 1)).html(getDataUseHandlebars(selOption, {rows: item.unitList}));
- $("#unitId" + (rowNum - 1)).val(item.normsId);
- //商品回显
- $("#materialId" + (rowNum - 1)).val(item.materialName + "(" + item.materialModel + ")");
- $("#currentTock" + (rowNum - 1)).html(item.currentTock);//库存回显
- //所需领料总数量
- $("#productionNum" + (rowNum - 1)).html(item.needNumber);
- //待领料数量
- $("#machinNum" + (rowNum - 1)).html(item.machinNum);
- //建议数量
- $("#rkNum" + (rowNum - 1)).val(item.machinNum);
- $("#unitPrice" + (rowNum - 1)).val(item.unitPrice.toFixed(2));
- });
- //渲染
- form.render();
-
- //计算价格
- calculatedTotalPrice();
- }});
- });
-
- // 取消
- $("body").on("click", "#cancle", function() {
- parent.layer.close(index);
- });
- });
-
-});
\ No newline at end of file
diff --git a/erp-produce/src/main/resources/template/js/erpPick/erpRequisitionPickList.js b/erp-produce/src/main/resources/template/js/erpPick/erpRequisitionPickList.js
index aaae35f7908e2d05f9e30f656e65a16341996389..468fae89778e3bbd354e1c29cbeb64657dd98d1d 100644
--- a/erp-produce/src/main/resources/template/js/erpPick/erpRequisitionPickList.js
+++ b/erp-produce/src/main/resources/template/js/erpPick/erpRequisitionPickList.js
@@ -7,11 +7,10 @@ layui.config({
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
-}).define(['window', 'table', 'jquery', 'winui', 'form', 'soulTable'], function (exports) {
+}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
- soulTable = layui.soulTable,
table = layui.table;
authBtn('1593864516103');//新增
@@ -20,46 +19,34 @@ layui.config({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
- url: flowableBasePath + 'erppick001',
+ url: sysMainMation.erpBasePath + 'erppick001',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
- overflow: {
- type: 'tips',
- hoverTime: 300, // 悬停时间,单位ms, 悬停 hoverTime 后才会显示,默认为 0
- minWidth: 150, // 最小宽度
- maxWidth: 500 // 最大宽度
- },
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
- { field: 'defaultNumber', title: '单据编号', align: 'center', width: 200, templet: function (d) {
- return '' + d.defaultNumber + '';
- }},
- { field: 'machinNum', title: '加工单', align: 'center', width: 200 },
- { field: 'status', title: '状态', align: 'left', width: 80, templet: function (d) {
- if (d.status == '0') {
- return "未审核";
- } else if (d.status == '1') {
- return "审核中";
- } else if (d.status == '2') {
- return "审核通过";
- } else if (d.status == '3') {
- return "拒绝通过";
- } else {
- return "参数错误";
- }
- }},
+ { field: 'oddNumber', title: '单据编号', align: 'center', width: 180, templet: function (d) {
+ return '' + d.oddNumber + '';
+ }},
+ { field: 'machinMation', rowspan: '2', title: '加工单', align: 'center', width: 200, templet: function (d) {return isNull(d.machinMation) ? '' : d.machinMation.oddNumber}},
+ { field: 'processInstanceId', title: '流程ID', width: 100, templet: function (d) {
+ return '' + d.processInstanceId + '';
+ }},
+ { field: 'state', title: '状态', width: 90, templet: function (d) {
+ return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("flowableStateEnum", 'id', d.state, 'name');
+ }},
{ field: 'totalPrice', title: '物料合计', align: 'left', width: 100 },
{ field: 'operTime', title: '单据日期', align: 'center', width: 150 },
- { field: 'createName', title: '录入人', align: 'left', width: 120 },
- { field: 'createTime', title: '录入日期', align: 'center', width: 140 },
+ { field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 },
+ { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
+ { field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
+ { field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar' }
]],
done: function(json) {
matchingLanguage();
- soulTable.render(this);
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单据编号", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
@@ -70,23 +57,37 @@ layui.config({
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'delete') { //删除
- deletemember(data);
+ del(data);
} else if (layEvent === 'details') { //详情
details(data);
} else if (layEvent === 'edit') { //编辑
edit(data);
- } else if (layEvent === 'subExamine') { //提交审核
- subExamine(data);
- } else if (layEvent === 'examine') { //审核
- examine(data);
+ } else if (layEvent === 'subApproval') { //提交审核
+ subApproval(data);
+ } else if (layEvent === 'processDetails') { // 工作流流程详情查看
+ activitiUtil.activitiDetails(data);
+ } else if (layEvent === 'revoke') { //撤销
+ revoke(data);
}
});
+ // 添加
+ $("body").on("click", "#addBean", function() {
+ _openNewWindows({
+ url: systemCommonUtil.getUrl('FP2023100500001', null),
+ title: systemLanguage["com.skyeye.addPageTitle"][languageType],
+ pageId: "erpRequisitionAdd",
+ area: ['90vw', '90vh'],
+ callBack: function (refreshCode) {
+ winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
+ loadTable();
+ }});
+ });
+
// 编辑
function edit(data) {
- rowId = data.id;
_openNewWindows({
- url: "../../tpl/erpPick/erpRequisitionEdit.html",
+ url: systemCommonUtil.getUrl('FP2023100500002&id=' + data.id, null),
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "erpRequisitionEdit",
area: ['90vw', '90vh'],
@@ -96,66 +97,54 @@ layui.config({
}});
}
+ // 详情
+ function details(data) {
+ _openNewWindows({
+ url: systemCommonUtil.getUrl('FP2023100500003&id=' + data.id, null),
+ title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
+ pageId: "erpRequisitionDetails",
+ area: ['90vw', '90vh'],
+ callBack: function (refreshCode) {
+ }});
+ }
+
// 删除
- function deletemember(data) {
+ function del(data) {
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) {
- AjaxPostUtil.request({url: flowableBasePath + "erppick008", params: {rowId: data.id}, type: 'json', callback: function (json) {
+ AjaxPostUtil.request({url: sysMainMation.erpBasePath + "erppick008", params: {id: data.id}, type: 'json', method: 'DELETE', callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
- // 详情
- function details(data) {
- rowId = data.id;
- _openNewWindows({
- url: "../../tpl/erpPick/erpRequisitionDetails.html",
- title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
- pageId: "erpRequisitionDetails",
- area: ['90vw', '90vh'],
- callBack: function (refreshCode) {
- }});
- }
-
// 提交审批
- function subExamine(data) {
+ function subApproval(data) {
layer.confirm('确认要提交审核吗?', { icon: 3, title: '提交审核操作' }, function (index) {
- AjaxPostUtil.request({url: flowableBasePath + "erppick015", params: {rowId: data.id}, type: 'json', callback: function (json) {
- winui.window.msg("提交成功。", {icon: 1, time: 2000});
+ activitiUtil.startProcess(data.serviceClassName, null, function (approvalId) {
+ var params = {
+ id: data.id,
+ approvalId: approvalId
+ };
+ AjaxPostUtil.request({url: sysMainMation.erpBasePath + "submitRequisitionMaterial", params: params, type: 'json', method: 'POST', callback: function (json) {
+ winui.window.msg("提交成功", {icon: 1, time: 2000});
+ loadTable();
+ }});
+ });
+ });
+ }
+
+ // 撤销
+ function revoke(data) {
+ layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) {
+ layer.close(index);
+ AjaxPostUtil.request({url: sysMainMation.erpBasePath + "revokeRequisitionMaterial", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
+ winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
}
- // 审核
- function examine(data) {
- rowId = data.id;
- type = data.type,
- _openNewWindows({
- url: "../../tpl/erpPick/erpPickApprovalExamine.html",
- title: "审核",
- pageId: "erpPickApprovalExamine",
- area: ['90vw', '90vh'],
- callBack: function (refreshCode) {
- winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
- loadTable();
- }});
- }
-
- // 添加
- $("body").on("click", "#addBean", function() {
- _openNewWindows({
- url: "../../tpl/erpPick/erpRequisitionAdd.html",
- title: systemLanguage["com.skyeye.addPageTitle"][languageType],
- pageId: "erpRequisitionAdd",
- area: ['90vw', '90vh'],
- callBack: function (refreshCode) {
- winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
- loadTable();
- }});
- });
-
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
diff --git a/erp-produce/src/main/resources/template/tpl/erpDepartStock/erpDepartStockList.html b/erp-produce/src/main/resources/template/tpl/erpDepartStock/erpDepartStockList.html
index 532f322cc007b6a78f24597948af283bccc818ea..51d4c6af5e1df1be183462c6a941589d77545882 100644
--- a/erp-produce/src/main/resources/template/tpl/erpDepartStock/erpDepartStockList.html
+++ b/erp-produce/src/main/resources/template/tpl/erpDepartStock/erpDepartStockList.html
@@ -5,15 +5,6 @@