|
@@ -65,12 +65,17 @@
|
|
|
<div style="float:right;">
|
|
|
<form class="layui-form" lay-filter="query-form-element">
|
|
|
<div class="seach_items">
|
|
|
- <input type="text" name="title" autocomplete="off" class="layui-input"
|
|
|
- placeholder="标题"/>
|
|
|
+ <input type="text" name="invoice_name" autocomplete="off" class="layui-input"
|
|
|
+ placeholder="名称"/>
|
|
|
</div>
|
|
|
<div class="seach_items">
|
|
|
- <input type="text" name="create_user" autocomplete="off" class="layui-input"
|
|
|
- placeholder="添加人"/>
|
|
|
+ <input type="text" name="consignee" autocomplete="off" class="layui-input"
|
|
|
+ placeholder="收件人"/>
|
|
|
+ </div>
|
|
|
+ <div class="seach_items">
|
|
|
+ <button class="layui-btn" lay-submit lay-filter="query-form-element"><i
|
|
|
+ class="layui-icon layui-icon-search"></i>查询
|
|
|
+ </button>
|
|
|
</div>
|
|
|
</form>
|
|
|
</div>
|
|
@@ -86,6 +91,10 @@
|
|
|
<div class="layui-btn-group">
|
|
|
<a class="layui-btn layui-btn-xs" lay-event="edit">修改</a>
|
|
|
</div>
|
|
|
+ <div class="layui-btn-group">
|
|
|
+ <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="device_del"
|
|
|
+ >删除</a>
|
|
|
+ </div>
|
|
|
</script>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -109,21 +118,21 @@
|
|
|
, url: '/tenant/invoice/'
|
|
|
, cols: [[
|
|
|
{field: 'invoice_name', title: '名称', width: 150}
|
|
|
- ,{field: 'tax_no', title: '税号', width: 150}
|
|
|
- ,{field: 'company_address', title: '单位地址', width: 150}
|
|
|
- ,{field: 'phone_no', title: '电话号码', width: 100}
|
|
|
- ,{field: 'deposit_bank', title: '开户银行', width: 200}
|
|
|
- ,{field: 'bank_account', title: '银行账户', width: 200}
|
|
|
- ,{field: 'invoice_sum', title: '发票金额', width: 100}
|
|
|
- ,{field: 'status_text', title: '状态', width: 100}
|
|
|
- ,{field: 'use_time', title: '操作时间', width: 200}
|
|
|
- ,{field: 'reject_reason', title: '说明', width: 100}
|
|
|
- ,{field: 'consignee', title: '收件人', width: 100}
|
|
|
- ,{field: 'consignee_tel', title: '收件人电话', width: 100}
|
|
|
- ,{field: 'consignee_address', title: '收件地址', width: 100}
|
|
|
- ,{field: 'express_company', title: '快递公司', width: 100}
|
|
|
- ,{field: 'express_number', title: '快递单号', width: 100}
|
|
|
- , {title: "操作", width: 150, align: 'left', fixed: 'right', toolbar: '#datagrid-operate-bar'}
|
|
|
+ , {field: 'tax_no', title: '税号', width: 150}
|
|
|
+ , {field: 'company_address', title: '单位地址', width: 150}
|
|
|
+ , {field: 'phone_no', title: '电话号码', width: 120}
|
|
|
+ , {field: 'deposit_bank', title: '开户银行', width: 200}
|
|
|
+ , {field: 'bank_account', title: '银行账户', width: 200}
|
|
|
+ , {field: 'invoice_sum', title: '发票金额', width: 100}
|
|
|
+ , {field: 'status_text', title: '状态', width: 100}
|
|
|
+ , {field: 'use_time', title: '操作时间', width: 200}
|
|
|
+ , {field: 'reject_reason', title: '说明', width: 100}
|
|
|
+ , {field: 'consignee', title: '收件人', width: 100}
|
|
|
+ , {field: 'consignee_tel', title: '收件人电话', width: 100}
|
|
|
+ , {field: 'consignee_address', title: '收件地址', width: 200}
|
|
|
+ , {field: 'express_company', title: '快递公司', width: 100}
|
|
|
+ , {field: 'express_number', title: '快递单号', width: 120}
|
|
|
+ , {title: "操作", width: 180, align: 'left', fixed: 'right', toolbar: '#datagrid-operate-bar'}
|
|
|
]]
|
|
|
, page: true
|
|
|
, height: 'full-108'
|
|
@@ -151,10 +160,25 @@
|
|
|
area: ['700px', '500px'],
|
|
|
content: 'detail.html'
|
|
|
})
|
|
|
- }else if (obj.event === 'edit') {
|
|
|
+ } else if (obj.event === 'device_del') {
|
|
|
+ if (data.status == 2 || data.status == 1) {
|
|
|
+ layer.msg('当前发票状态暂不允许删除');
|
|
|
+ return
|
|
|
+ }
|
|
|
+ layer.confirm('确定要删除吗?', function (index) {
|
|
|
+ layer.close(index);
|
|
|
+ admin.req({
|
|
|
+ url: '/tenant/invoice/' + data.id + '/'
|
|
|
+ , type: 'delete'
|
|
|
+ , done: function (res) {
|
|
|
+ table.reload('datagrid', {});
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ } else if (obj.event === 'edit') {
|
|
|
let status = data.status;
|
|
|
- if(status !== 0){
|
|
|
- layer.msg('当前发票暂不允许修改');
|
|
|
+ if (data.status == 2 || data.status == 1) {
|
|
|
+ layer.msg('当前发票状态暂不允许修改');
|
|
|
return
|
|
|
}
|
|
|
table.editdata = data;
|
|
@@ -176,19 +200,26 @@
|
|
|
});
|
|
|
|
|
|
$('#btn_add').on('click', function () {
|
|
|
- layer.open({
|
|
|
- type: 2,
|
|
|
- title: '申请发票',
|
|
|
- shadeClose: false,
|
|
|
- btn: ['保存', '取消'],
|
|
|
- area: ['50%', '80%'],
|
|
|
- yes: function (index, dom) {
|
|
|
- layui.submitChild();
|
|
|
- },
|
|
|
- btn2: function (index, layero) {
|
|
|
- layer.close(index);//关闭当前按钮
|
|
|
- },
|
|
|
- content: 'edit.html'
|
|
|
+ admin.req({
|
|
|
+ url: '/tenant/get_invoice_dict/'
|
|
|
+ , type: 'get'
|
|
|
+ , done: function (res) {
|
|
|
+ table.editdata = res.data;
|
|
|
+ layer.open({
|
|
|
+ type: 2,
|
|
|
+ title: '申请发票',
|
|
|
+ shadeClose: false,
|
|
|
+ btn: ['保存', '取消'],
|
|
|
+ area: ['50%', '80%'],
|
|
|
+ yes: function (index, dom) {
|
|
|
+ layui.submitChild();
|
|
|
+ },
|
|
|
+ btn2: function (index, layero) {
|
|
|
+ layer.close(index);//关闭当前按钮
|
|
|
+ },
|
|
|
+ content: 'edit.html'
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
});
|
|
|
|