123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- define(function (require) {
- return function (context) {
- var $dlg, $grid;
- function queryGrid1() {
- $grid.reload({
- mtype: 'GET',
- url: api('/sweepCode/selectVaccineImageByUserId'),
- queryParams: {userId: context.userId}
- }, true);
- }
- return {
- xtype: 'dialog',
- dialogId: 'dialogDetail',
- title: '疫苗凭证记录 >> ' + context.linkman,
- width: '65%',
- height: '70%',
- onOpen: function () {
- $dlg = $(this);
- },
- center: {
- items: {
- onRender: function () {
- $grid = $(this);
- queryGrid1();
- },
- toolbar: {
- xtype: 'toolbar',
- title: '疫苗接种',
- items: [
- {
- text: '删除', iconCls: 'fa fa fa-pencil-square-o fa-lg', onClick: function () {
- var row = $grid.rowData();
- if (row.length == 0) {
- $.yvan.msg('请选择数据');
- return;
- }
- $.yvan.confirm('确定删除勾选的这条凭证信息吗?', {
- yes: function (index) {
- $.yvan.ajax({
- method: 'post',
- url: api('/sweepCode/deleteFile'),
- data: {fileId: row.fileId},
- success: function (data) {
- $.yvan.msg("删除成功");
- $grid.reload();
- queryGrid1();
- }
- });
- }
- });
- }
- },
- ]
- },
- xtype: 'grid',
- idField: "reportDate",
- pagination: true,
- columns: [[
- {field: 'fileId', title: 'fileId', hidden: true},
- {field: 'fileName', title: '文件名', maxWidth: 200, align: 'right',},
- {field: 'timeCreate', title: '新增时间', align: 'left', formatter: 'tsymd'},
- {
- field: 'fileUrl', title: '凭证', minWidth: 500, maxWidth: 500,
- formatter: function (value) {
- return "<img src='/upload" + value + "'/>";
- },
- },
- ]],
- }
- },
- buttons: [
- {
- text: "关闭", iconCls: "fa fa-times", onClick: function () {
- // $dlg.dialog('close');
- $dlg.window('close');
- }
- }
- ]
- };
- };
- });
|