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

部门加工单修改

上级 aa603dbe
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,
soulTable = layui.soulTable,
table = layui.table;
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: flowableBasePath + 'erpmachin009',
url: sysMainMation.erpBasePath + 'erpmachin009',
where: getTableParams(),
even: true,
page: true,
overflow: {
type: 'tips',
hoverTime: 300, // 悬停时间,单位ms, 悬停 hoverTime 后才会显示,默认为 0
minWidth: 150, // 最小宽度
maxWidth: 500 // 最大宽度
},
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], rowspan: '2', type: 'numbers' },
{ field: 'orderNum', rowspan: '2', title: '单据编号', align: 'center', width: 180, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.orderNum + '</a>';
}},
{ field: 'productionNumber', rowspan: '2', title: '生产计划单', align: 'center', width: 200},
{ colspan: '3', title: '加工成品信息', align: 'center'},
{ field: 'state', rowspan: '2', title: '状态', align: 'left', width: 80, templet: function (d) {
if(d.state == '1'){
return "<span class='state-down'>未审核</span>";
} else if (d.state == '2'){
return "<span class='state-up'>审核中</span>";
} else if (d.state == '3'){
return "<span class='state-new'>审核通过</span>";
} else if (d.state == '4'){
return "<span class='state-down'>拒绝通过</span>";
} else if (d.state == '5'){
return "<span class='state-up'>已完成</span>";
} else {
return "参数错误";
}
}},
{ field: 'oddNumber', rowspan: '2', title: '单据编号', align: 'center', width: 180, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
}},
{ field: 'productionMation', rowspan: '2', title: '生产计划单', align: 'center', width: 200, templet: function (d) {return isNull(d.productionMation) ? '' : d.productionMation.oddNumber}},
{ colspan: '3', title: '加工成品信息', align: 'center' },
{ field: 'state', rowspan: '2', title: '状态', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinStateEnum", 'id', d.state, 'name');
}},
{ field: 'pickState', rowspan: '2', title: '领料状态', align: 'left', width: 80, templet: function (d) {
if(d.pickState == '1'){
return "<span class='state-down'>未领料</span>";
} else if (d.pickState == '2'){
return "<span class='state-up'>已领料</span>";
} else {
return "参数错误";
}
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinPickStateEnum", 'id', d.pickState, 'name');
}},
{ colspan: '3', title: '加工信息', align: 'center'},
{ field: 'createName', rowspan: '2', title: '录入人', align: 'left', width: 120},
{ field: 'createTime', rowspan: '2', title: '录入日期', align: 'center', width: 150 },
{ colspan: '3', title: '加工信息', align: 'center' },
{ field: 'createName', rowspan: '2', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 },
{ field: 'createTime', rowspan: '2', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
{ field: 'lastUpdateName', rowspan: '2', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
{ field: 'lastUpdateTime', rowspan: '2', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], rowspan: '2', fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'}
],[
{ field: 'materialName', title: '名称', align: 'left', width: 120},
{ field: 'unitName', title: '规格', align: 'center', width: 80},
{ field: 'needNum', title: '加工数量', align: 'center', width: 80},
{ field: 'departmentName', title: '部门', align: 'left', width: 100},
{ field: 'startTime', title: '开始时间', align: 'center', width: 150 },
{ field: 'endTime', title: '结束时间', 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: 80, 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 },
{ field: 'endTime', title: '结束时间', align: 'center', width: 150 }
]],
done: function(json) {
matchingLanguage();
soulTable.render(this);
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单据编号", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
......@@ -91,9 +65,8 @@ layui.config({
// 详情
function details(data) {
rowId = data.id;
_openNewWindows({
url: "../../tpl/erpMachin/erpMachinDetails.html",
url: systemCommonUtil.getUrl('FP2023100300003&id=' + data.id, null),
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "erpMachinDetails",
area: ['90vw', '90vh'],
......@@ -106,7 +79,6 @@ layui.config({
loadTable();
});
// 刷新
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
......
......@@ -41,7 +41,7 @@ layui.config({
{ field: 'lastUpdateName', rowspan: '2', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
{ field: 'lastUpdateTime', rowspan: '2', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 },
{ 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: 'needNum', title: '加工数量', align: 'center', width: 80 },
......
var rowId = "";
layui.config({
base: basePath,
......@@ -16,7 +15,7 @@ layui.config({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: flowableBasePath + 'erpmachin010',
url: sysMainMation.erpBasePath + 'erpmachin010',
where: getTableParams(),
even: true,
page: true,
......@@ -25,36 +24,30 @@ layui.config({
cols: [[
{ type: 'radio', rowspan: '2'},
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], rowspan: '2', type: 'numbers' },
{ field: 'orderNum', rowspan: '2', title: '单据编号', align: 'center', width: 180, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.orderNum + '</a>';
{ field: 'oddNumber', rowspan: '2', title: '单据编号', align: 'center', width: 180, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
}},
{ field: 'productionNumber', rowspan: '2', title: '生产计划单', align: 'center', width: 200},
{ colspan: '3', title: '加工成品信息', align: 'center'},
{ field: 'state', rowspan: '2', title: '状态', align: 'left', width: 80, templet: function (d) {
if(d.state == '1'){
return "<span class='state-down'>未审核</span>";
} else if (d.state == '2'){
return "<span class='state-up'>审核中</span>";
} else if (d.state == '3'){
return "<span class='state-new'>审核通过</span>";
} else if (d.state == '4'){
return "<span class='state-down'>拒绝通过</span>";
} else if (d.state == '5'){
return "<span class='state-new'>已完成</span>";
} else {
return "参数错误";
}
{ field: 'productionMation', rowspan: '2', title: '生产计划单', align: 'center', width: 200, templet: function (d) {return isNull(d.productionMation) ? '' : d.productionMation.oddNumber}},
{ colspan: '3', title: '加工成品信息', align: 'center' },
{ field: 'state', rowspan: '2', title: '状态', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinStateEnum", 'id', d.state, 'name');
}},
{ colspan: '3', title: '加工信息', align: 'center'},
{ field: 'createName', rowspan: '2', title: '录入人', align: 'left', width: 120},
{ field: 'createTime', rowspan: '2', title: '录入日期', align: 'center', width: 150 }
],[
{ field: 'materialName', title: '名称', align: 'left', width: 120},
{ field: 'unitName', title: '规格', align: 'center', width: 80},
{ field: 'needNum', title: '加工数量', align: 'center', width: 80},
{ field: 'departmentName', title: '部门', align: 'left', width: 100},
{ field: 'pickState', rowspan: '2', title: '领料状态', align: 'left', width: 80, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinPickStateEnum", 'id', d.pickState, 'name');
}},
{ colspan: '3', title: '加工信息', align: 'center' },
{ field: 'createName', rowspan: '2', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 },
{ field: 'createTime', rowspan: '2', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
{ field: 'lastUpdateName', rowspan: '2', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
{ field: 'lastUpdateTime', rowspan: '2', title: systemLanguage["com.skyeye.lastUpdateTime"][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: 80, 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 },
{ field: 'endTime', title: '结束时间', align: 'center', width: 150}
{ field: 'endTime', title: '结束时间', align: 'center', width: 150 }
]],
done: function(json, curr, count){
matchingLanguage();
......@@ -65,11 +58,9 @@ layui.config({
var chooseIndex = JSON.stringify(dubClick.data('index'));
var obj = json.rows[chooseIndex];
// 根据加工单id获取该单据下的所有单据中商品以及剩余领料数量
AjaxPostUtil.request({url: flowableBasePath + "erpmachin011", params: {id: obj.id}, type: 'json', method: 'GET', callback: function(json) {
obj.norms = [].concat(json.rows);
// 根据id获取加工单信息
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinById", params: {id: obj.id}, type: 'json', method: 'GET', callback: function(json) {
parent.machinMation = obj;
parent.refreshCode = '0';
parent.layer.close(index);
}});
......@@ -97,9 +88,8 @@ layui.config({
// 详情
function details(data) {
rowId = data.id;
_openNewWindows({
url: "../../tpl/erpMachin/erpMachinDetails.html",
url: systemCommonUtil.getUrl('FP2023100300003&id=' + data.id, null),
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "erpMachinDetails",
area: ['90vw', '90vh'],
......
......@@ -43,6 +43,7 @@
"supplierContractAuthEnum": {"name": "供应商合同权限", "className": "skyeye-erp#com.skyeye.contract.classenum.SupplierContractAuthEnum", "pageUrl": "../../tpl/supplierContract/supplierContractList.html"},
"productionState": {"name": "生产计划单状态", "className": "skyeye-erp#com.skyeye.production.classenum.ProductionStateEnum"},
"machinStateEnum": {"name": "加工单状态", "className": "skyeye-erp#com.skyeye.machin.classenum.MachinStateEnum"},
"machinPickStateEnum": {"name": "加工单领料状态", "className": "skyeye-erp#com.skyeye.machin.classenum.MachinPickStateEnum"},
"skyeyeView": {"name": "视图类型", "className": "skyeye-pro#com.skyeye.common.SkyeyeViewEnum"},
"widthScale": {"name": "宽度比例", "className": "skyeye-pro#com.skyeye.attr.classenum.WidthScale"},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册