Browse Source

[feat]采购报价:固定操作列样式

dev
zhangsiqi 6 months ago
parent
commit
c428e1ba6d
  1. 64
      ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/purchaseOrder.html
  2. 100
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/purchaseQuote.html
  3. 190
      ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/purchaseStorage.html

64
ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/purchaseOrder.html

@ -169,7 +169,10 @@
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
clickToSelect: true, clickToSelect: true,
modalName: "采购订单", modalName: "采购订单",
columns: [{checkbox: true}, fixedColumns: true, // 启用冻结列
fixedRightNumber: 1, // 冻结右列个数
columns: [
{checkbox: true},
{title: '采购订单id',field: 'purchaseOrderId', visible: false}, {title: '采购订单id',field: 'purchaseOrderId', visible: false},
{title:'审核状态',field: 'auditStatus',formatter: function (value, row, index) { {title:'审核状态',field: 'auditStatus',formatter: function (value, row, index) {
$.table.selectDictLabel(auditStatusDatas, value); $.table.selectDictLabel(auditStatusDatas, value);
@ -184,48 +187,35 @@
$.table.selectDictLabel(paymentStatusDatas, value); $.table.selectDictLabel(paymentStatusDatas, value);
}}, }},
{title:'采购单号',field: 'purchaseOrderCode'}, {title:'采购单号',field: 'purchaseOrderCode'},
{ title: '供应商ID',field: 'supplierCode'}, { title: '供应商ID',field: 'supplierCode'},
{title: '供应商名称',field: 'supplierName'}, {title: '供应商名称',field: 'supplierName'},
{title: '联系人',field: 'customerContact',visible: false}, {title: '联系人',field: 'customerContact',visible: false},
{title: '联系电话',field: 'contactNumber',visible: false}, {title: '联系电话',field: 'contactNumber',visible: false},
{title:'供应商数量',field: 'supplierNum'}, {title:'供应商数量',field: 'supplierNum'},
{title:'物料合计',field: 'materialAmount'}, {title:'物料合计',field: 'materialAmount'},
{title:'数量合计',field: 'materialSum'}, {title:'数量合计',field: 'materialSum'},
{title:'不含税总价(RMB)',field: 'noRmbSum'}, {title:'不含税总价(RMB)',field: 'noRmbSum'},
{title:'含税总价',field: 'rmbSum'}, {title:'含税总价',field: 'rmbSum'},
{ {field: 'firstAddTime', title: '录入时间',
field: 'firstAddTime', formatter: function (value, row, index) {
title: '录入时间', if (value == null) { return " ";}
formatter: function (value, row, index) { else { var vArr = value.split(',');return vArr[0];}
if (value == null) {
return " ";
} else {
return value;
} }
} },
}, {field: 'updateInfoTime',title: '上次更新时间',
{ formatter: function (value, row, index) {
field: 'updateInfoTime', if (value == null) {return ""; }
title: '上次更新时间', else { var vArr = value.split(',');return vArr[0];}
formatter: function (value, row, index) { }
if (value == null) { },
return " "; {title: '操作',align: 'center',
} else { formatter: function(value, row, index) {
var vArr = value.split(',') var actions = [];
return vArr[0]; actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.purchaseOrderId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
return actions.join('');
} }
} }
}, ]
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.purchaseOrderId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.purchaseOrderId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
}; };
$.table.init(options); $.table.init(options);
}); });
@ -243,7 +233,6 @@
// console.log(finishProductData[i].finishProductCode) // console.log(finishProductData[i].finishProductCode)
$("#formId select[name='supplierCode']").append("<option value='" + suppliertData[i].supplierCode + "'>" + suppliertData[i].supplierCode + "</option>"); $("#formId select[name='supplierCode']").append("<option value='" + suppliertData[i].supplierCode + "'>" + suppliertData[i].supplierCode + "</option>");
} }
} else { } else {
$.modal.msgError(res.msg); $.modal.msgError(res.msg);
} }
@ -261,9 +250,6 @@
return; return;
} else { } else {
// rows为选中行的id // rows为选中行的id
// console.log(rows);
// console.log(data);
// console.log(data[0].orderNumber)
$.modal.confirm("是否确认要导出本条采购订单?", function (){ $.modal.confirm("是否确认要导出本条采购订单?", function (){
axios({ axios({
url: prefix + '/exportSelected/'+data[0].purchaseOrderId, url: prefix + '/exportSelected/'+data[0].purchaseOrderId,

100
ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/purchaseQuote.html

@ -66,12 +66,6 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="purchase:purchaseQuote:add"> <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="purchase:purchaseQuote:add">
<i class="fa fa-plus"></i> 添加 <i class="fa fa-plus"></i> 添加
</a> </a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="purchase:purchaseQuote:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="purchase:purchaseQuote:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="purchase:purchaseQuote:export"> <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="purchase:purchaseQuote:export">
<i class="fa fa-download"></i> 导出 <i class="fa fa-download"></i> 导出
</a> </a>
@ -90,7 +84,6 @@
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var useStatusDatas = [[${@dict.getType('useStatus')}]]; var useStatusDatas = [[${@dict.getType('useStatus')}]];
var prefix = ctx + "purchase/purchaseQuote"; var prefix = ctx + "purchase/purchaseQuote";
$(function() { $(function() {
var options = { var options = {
url: prefix + "/list", url: prefix + "/list",
@ -101,74 +94,37 @@
restoreUrl: prefix + "/restore/{id}", restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
modalName: "采购报价单", modalName: "采购报价单",
columns: [{ fixedColumns: true, // 启用冻结列
checkbox: true fixedRightNumber: 1, // 冻结右列个数
}, columns: [
{ {checkbox: true},
title: '采购报价索引id', {title: '采购报价索引id',field: 'purchaseQuoteId',visible: false},
field: 'purchaseQuoteId', {title: '审核状态',field: 'auditStatus',
visible: false formatter: function (value, row, index) {return $.table.selectDictLabel(auditStatusDatas, value);}
},
{
title: '审核状态',
field: 'auditStatus',
formatter: function (value, row, index) {
return $.table.selectDictLabel(auditStatusDatas, value);
}
},
{
title: '采购员',
field: 'purchaseBuyer',
},
{
title: '采购报价单号',
field: 'purchaseQuoteCode',
}, },
{ {title: '采购员',field: 'purchaseBuyer',},
title: '供应商ID', {title: '采购报价单号',field: 'purchaseQuoteCode',},
field: 'supplierQuoteCode', {title: '供应商ID',field: 'supplierQuoteCode',},
}, {title: '供应商名称',field: 'supplierName',},
{ {title: '物料合计',field: 'materialAmount',},
title: '供应商名称', {title: '定价时间',field: 'pricingDate',},
field: 'supplierName', {title: '录入时间',field: 'createTime',},
}, {title: '更新人',field: 'updateBy',},
{ {title: '上次更新时间',field: 'updateTime',},
title: '物料合计', {title: '操作',align: 'center',
field: 'materialAmount', formatter: function(value, row, index) {
}, var actions = [];
{ actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.purchaseQuoteId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
title: '定价时间', actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.purchaseQuoteId + '\')"><i class="fa fa-remove"></i>删除</a> ');
field: 'pricingDate', if(row.delFlag == '0'){
}, actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> ');
{ }else{
title: '录入时间', actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> ');
field: 'createTime', }
}, return actions.join('');
{
title: '更新人',
field: 'updateBy',
},
{
title: '上次更新时间',
field: 'updateTime',
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.purchaseQuoteId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.purchaseQuoteId + '\')"><i class="fa fa-remove"></i>删除</a> ');
if(row.delFlag == '0'){
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> ');
}else{
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> ');
} }
return actions.join('');
} }
}] ]
}; };
$.table.init(options); $.table.init(options);
}); });

190
ruoyi-admin/src/main/resources/templates/purchase/purchaseStorage/purchaseStorage.html

@ -59,15 +59,6 @@
</div> </div>
<div class="btn-group-sm" id="toolbar" role="group"> <div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="purchase:purchaseStorage:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="purchase:purchaseStorage:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="purchase:purchaseStorage:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="purchase:purchaseStorage:export"> <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="purchase:purchaseStorage:export">
<i class="fa fa-download"></i> 导出 <i class="fa fa-download"></i> 导出
</a> </a>
@ -89,7 +80,6 @@
var purchaseOrderTypeDatas = [[${@dict.getType('sys_order_type')}]]; var purchaseOrderTypeDatas = [[${@dict.getType('sys_order_type')}]];
var purchaseDeptTypeDatas = [[${@dict.getType('warehouseDept')}]]; var purchaseDeptTypeDatas = [[${@dict.getType('warehouseDept')}]];
var prefix = ctx + "purchase/purchaseStorage"; var prefix = ctx + "purchase/purchaseStorage";
$(function() { $(function() {
var options = { var options = {
url: prefix + "/list", url: prefix + "/list",
@ -100,144 +90,52 @@
restoreUrl: prefix + "/restore/{id}", restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
modalName: "采购入库通知单", modalName: "采购入库通知单",
columns: [{ columns: [
checkbox: true {checkbox: true},
}, {title: '采购入库单id',field: 'purchaseStorageId',visible: false},
{ {title: '入库单号',field: 'purchaseStorageCode',},
title: '采购入库单id', {title: '关联订单号',field: 'purchaseOrderCode',},
field: 'purchaseStorageId', {title: '入库状态',field: 'storageStatus',
visible: false formatter: function(value, row, index) {return $.table.selectDictLabel(storageStatusDatas, value);}
}, },
{ {title: '品质状态',field: 'qualityStatus',
title: '入库单号', formatter: function(value, row, index) {return $.table.selectDictLabel(qualityStatusDatas, value);}
field: 'purchaseStorageCode', },
}, {title: '入库类型',field: 'purchaseStorageType',
{ formatter: function(value, row, index) {return $.table.selectDictLabel(purchaseStorageTypeDatas, value);}
title: '关联订单号', },
field: 'purchaseOrderCode', {title: '订单类型',field: 'purchaseOrderType',
}, formatter: function(value, row, index) {return $.table.selectDictLabel(purchaseOrderTypeDatas, value);}
{ },
title: '入库状态', {title: '入库部门',field: 'purchaseDeptType',
field: 'storageStatus', formatter: function(value, row, index) {return $.table.selectDictLabel(purchaseDeptTypeDatas, value);}
formatter: function(value, row, index) { },
return $.table.selectDictLabel(storageStatusDatas, value); {title: '通知已到货数量',field: 'notifyArrivedNum',},
} {title: '实际已到货数量',field: 'actualArrivedNum',},
}, {title: '暂收合格数量',field: 'temporaryQualifiedNum',},
{ {title: '暂收不合格数量',field: 'temporaryUnqualifiedNum',},
title: '品质状态', {title: '品质合格数量',field: 'qualityQualifiedNum',},
field: 'qualityStatus', {title: '入库数量',field: 'storageNum',},
formatter: function(value, row, index) { {title: '到货时间',field: 'arrivedTime',},
return $.table.selectDictLabel(qualityStatusDatas, value); {title: '暂收时间',field: 'temporaryTime',},
} {title: '交付质检时间',field: 'deliveryInspectionTime',},
}, {title: '品质时间',field: 'qualityTime',},
{ {title: '入库时间',field: 'storageTime',},
title: '入库类型', {title: '仓库员', field: 'storageEmployee',},
field: 'purchaseStorageType', {title: '仓库ID',field: 'stockId',},
formatter: function(value, row, index) { {title: '仓库名称',field: 'stockName',},
return $.table.selectDictLabel(purchaseStorageTypeDatas, value); {title: '录入时间',field: 'createTime',},
} {title: '录入人',field: 'createBy',},
}, {title: '更新人',field: 'updateBy', },
{ {title: '上次更新时间',field: 'updateTime', },
title: '订单类型', {title: '操作',align: 'center',
field: 'purchaseOrderType', formatter: function(value, row, index) {
formatter: function(value, row, index) { var actions = [];
return $.table.selectDictLabel(purchaseOrderTypeDatas, value); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.purchaseStorageId + '\')"><i class="fa fa-edit"></i>详情</a> ');
} return actions.join('');
},
{
title: '入库部门',
field: 'purchaseDeptType',
formatter: function(value, row, index) {
return $.table.selectDictLabel(purchaseDeptTypeDatas, value);
}
},
{
title: '通知已到货数量',
field: 'notifyArrivedNum',
},
{
title: '实际已到货数量',
field: 'actualArrivedNum',
},
{
title: '暂收合格数量',
field: 'temporaryQualifiedNum',
},
{
title: '暂收不合格数量',
field: 'temporaryUnqualifiedNum',
},
{
title: '品质合格数量',
field: 'qualityQualifiedNum',
},
{
title: '入库数量',
field: 'storageNum',
},
{
title: '到货时间',
field: 'arrivedTime',
},
{
title: '暂收时间',
field: 'temporaryTime',
},
{
title: '交付质检时间',
field: 'deliveryInspectionTime',
},
{
title: '品质时间',
field: 'qualityTime',
},
{
title: '入库时间',
field: 'storageTime',
},
{
title: '仓库员',
field: 'storageEmployee',
},
{
title: '仓库ID',
field: 'stockId',
},
{
title: '仓库名称',
field: 'stockName',
},
{
title: '录入时间',
field: 'createTime',
},
{
title: '录入人',
field: 'createBy',
},
{
title: '更新人',
field: 'updateBy',
},
{
title: '上次更新时间',
field: 'updateTime',
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.purchaseStorageId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.purchaseStorageId + '\')"><i class="fa fa-remove"></i>删除</a> ');
if(row.delFlag == '0'){
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> ');
}else{
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> ');
} }
return actions.join('');
} }
}] ]
}; };
$.table.init(options); $.table.init(options);
}); });

Loading…
Cancel
Save