diff --git a/js/accessory/accessory_out_bound_list.js b/js/accessory/accessory_out_bound_list.js
index e8fca83..d6fca8e 100644
--- a/js/accessory/accessory_out_bound_list.js
+++ b/js/accessory/accessory_out_bound_list.js
@@ -189,5 +189,6 @@ function exportExcel() {
// 详情 审核 出库确认
function accessoryOutBoundDetail(obj, type) {
obj.type = type;
+ obj.devType = '2'; // 1.工器具 2.设备
openIframeByParamObj("accessory_out_bound_detail", "配件出库记录", "../accessory/child/accessory_out_bound_detail.html", "92%", "95%", obj);
}
\ No newline at end of file
diff --git a/js/accessory/child/accessory_out_bound_detail.js b/js/accessory/child/accessory_out_bound_detail.js
index d7c4818..46caeba 100644
--- a/js/accessory/child/accessory_out_bound_detail.js
+++ b/js/accessory/child/accessory_out_bound_detail.js
@@ -1,16 +1,31 @@
let objParam;
-let form, table, element, tableIns, layer;
+let form, table, upload, tableIns, layer;
let pageNum = 1;
function setParams(params) {
objParam = JSON.parse(params);
console.error(objParam);
+ if (objParam.type === 2) { // 审核
+ $('#print').before('');
+ } else if (objParam.type === 3) { // 出库
+ $('#print').before('');
+ }
+ if (objParam.devType === '2') { // 设备
+ let html = '';
+ html += '
' +
+ '| 内部编号 | 使用机型 | 使用单位 | | '
+ '
';
+ html += '' +
+ '| GS511 | 机动绞磨 柴油 5T | xxxxxxxxxxxx工程 | | '
+ '
';
+ $('#lastTr').before(html);
+ }
$('#code').html(objParam.code);
- $('#titleName').html(objParam.inputDay + '配件入库记录');
- layui.use(["form", "table", 'element', 'layer'], function () {
+ $('#titleName').html(objParam.inputDay + '配件出库记录');
+ layui.use(["form", "table", 'upload', 'layer'], function () {
form = layui.form;
table = layui.table;
- element = layui.element;
+ upload = layui.upload;
layer = layui.layer;
getInputDetails();
initTable();
@@ -55,7 +70,7 @@ function setFileTable(fileList) {
$.each(fileList, function (index, item) {
html += '' +
'| ' + handleFileType(item.fileName) + item.fileName + ' | ' +
- ''+(item.suffix.replace('.',''))+' | ' +
+ '' + (item.suffix.replace('.', '')) + ' | ' +
' ' + item.createName + ' | ' +
'' + item.createTime + ' | ' +
'预览' +
diff --git a/js/accessory/child/accessory_store_detail.js b/js/accessory/child/accessory_store_detail.js
index d7c4818..67558f1 100644
--- a/js/accessory/child/accessory_store_detail.js
+++ b/js/accessory/child/accessory_store_detail.js
@@ -1,16 +1,15 @@
let objParam;
-let form, table, element, tableIns, layer;
+let form, table, upload, tableIns, layer;
let pageNum = 1;
function setParams(params) {
objParam = JSON.parse(params);
- console.error(objParam);
$('#code').html(objParam.code);
$('#titleName').html(objParam.inputDay + '配件入库记录');
- layui.use(["form", "table", 'element', 'layer'], function () {
+ layui.use(["form", "table", 'upload', 'layer'], function () {
form = layui.form;
table = layui.table;
- element = layui.element;
+ upload = layui.upload;
layer = layui.layer;
getInputDetails();
initTable();
@@ -55,7 +54,7 @@ function setFileTable(fileList) {
$.each(fileList, function (index, item) {
html += ' |
' +
'| ' + handleFileType(item.fileName) + item.fileName + ' | ' +
- ''+(item.suffix.replace('.',''))+' | ' +
+ '' + (item.suffix.replace('.', '')) + ' | ' +
' ' + item.createName + ' | ' +
'' + item.createTime + ' | ' +
'预览' +
@@ -333,4 +332,14 @@ function print() {
console.log('onEnd', new Date())
}
})
+}
+
+// 审核
+function check() {
+ alert('审核');
+}
+
+// 出库
+function outBand() {
+ alert('出库');
}
\ No newline at end of file
diff --git a/js/accessory/child/audit_form.js b/js/accessory/child/audit_form.js
new file mode 100644
index 0000000..6d3ee48
--- /dev/null
+++ b/js/accessory/child/audit_form.js
@@ -0,0 +1,90 @@
+var form, layer;
+let idParam;
+function setParams(id) {
+ idParam = id;
+ layui.use([ 'form' ], function() {
+ form = layui.form;
+ layer = layui.layer;
+ form.verify();
+ form.on('submit(formData)', function(data) {
+ submitApply(data);
+ });
+ form.on('radio(auditStatus)', function(data) {
+ if (data.value === '2') { // 通过
+ $('#auditRemarksLabel').empty().append('审核意见');
+ $('#auditRemarks').removeAttr('lay-verify');
+ } else if (data.value === '3') { // 不通过
+ $('#auditRemarksLabel').empty().append(
+ '*审核意见');
+ $('#auditRemarks').attr('lay-verify', 'required');
+ }
+ });
+ form.render();
+ });
+}
+
+function saveData2() {
+ $('#formSubmit').trigger('click')
+}
+
+// 提交
+function submitApply(data) {
+ let loadingMsg = layer.msg('正在提交保存,请稍等...', {
+ icon : 16,
+ shade : 0.01,
+ time : '0'
+ });
+ console.log(JSON.stringify(data.field));
+ data.field.applyId = idParam;
+ $.ajax({
+ url : bonuspath + '/backstage/planAudit/planAudit',
+ type : 'POST',
+ data : JSON.stringify(data.field),
+ dataType : 'json',
+ contentType : "application/json",
+ beforeSend : function() {
+ $('.save').addClass("layui-btn-disabled").attr("disabled", true);
+ $('.cancel').addClass("layui-btn-disabled").attr("disabled", true);
+ },
+ success : function(result) {
+ layer.close(loadingMsg); // 关闭提示层
+ if (result.res === 1) {
+ top.layer.msg(result.resMsg, {
+ icon : 1
+ });
+ closePage(1);
+ } else {
+ var indexMsg = layer.confirm(result.resMsg, {
+ btn : [ '关闭' ]
+ }, function() {
+ layer.close(indexMsg);
+ });
+ $('.save').removeClass("layui-btn-disabled").attr("disabled",
+ false);
+ $('.cancel').removeClass("layui-btn-disabled").attr("disabled",
+ false);
+ }
+ },
+ error : function(result) {
+ layer.close(loadingMsg); // 关闭提示层
+ layer.msg('服务异常,请稍后重试', {
+ icon : 16,
+ scrollbar : false,
+ time : 2000
+ });
+ $('.save').removeClass("layui-btn-disabled")
+ .attr("disabled", false);
+ $('.cancel').removeClass("layui-btn-disabled").attr("disabled",
+ false);
+ }
+ });
+}
+
+// 关闭页面
+function closePage(type) {
+ let index = parent.layer.getFrameIndex(window.name); // 先得到当前 iframe层的索引
+ if (type == 1) {
+ window.parent.closePage();
+ }
+ parent.layer.close(index); // 再执行关闭
+}
\ No newline at end of file
diff --git a/page/accessory/child/accessory_out_bound_detail.html b/page/accessory/child/accessory_out_bound_detail.html
index 7df1a09..68264e2 100644
--- a/page/accessory/child/accessory_out_bound_detail.html
+++ b/page/accessory/child/accessory_out_bound_detail.html
@@ -42,7 +42,7 @@
-
+
@@ -53,24 +53,28 @@
- | 入库编号(系统自动生成) |
- 入库数量 |
- 成本价格(元) |
- 入库人 |
- 入库日期 |
+ 单据编号(系统自动生成) |
+ 配件类型 |
+ 出库数量 |
+ 备注 |
|
|
|
|
- |
+
+
+ | 领用 |
+ 制单 |
+ 出库 |
+ 审核 |
- | 备注 |
-
-
-
+ |
+ |
+ |
+ |
diff --git a/page/accessory/child/accessory_store_detail.html b/page/accessory/child/accessory_store_detail.html
index 7df1a09..a58c57f 100644
--- a/page/accessory/child/accessory_store_detail.html
+++ b/page/accessory/child/accessory_store_detail.html
@@ -37,7 +37,7 @@
diff --git a/page/accessory/child/audit_form.html b/page/accessory/child/audit_form.html
new file mode 100644
index 0000000..1a69bd1
--- /dev/null
+++ b/page/accessory/child/audit_form.html
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+ 审核
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
|