12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- define(function (require) {
- return function (context) {
- var $dlg, $form, $coma;
- return {
- xtype: 'dialog',
- dialogId: 'dialogEnvLog',
- title: '工号变更',
- width: 450,
- height: 300,
- onOpen: function () {
- $dlg = $(this);
- $form.formSet({houseId:context.houseId,linkman:context.linkman,doorplate:context.doorplate});
- },
- center: {
- items: {
- width: 450,
- height: 400,
- autoSizeColumns: true,
- xtype: 'formgroup',
- onRender: function () {
- $form = $(this);
- },
- items: [
- [
- {name: 'houseId', xtype: 'hidden'},
- {
- name: 'linkman',
- label: '姓名',
- disabled: true,
- maxlength: 60,
- width: 350,
- },
- {
- name: 'doorplate',
- label: '工号',
- required: true,
- maxlength: 60,
- width: 350,
- },
- ]
- ],
- }
- },
- buttons: [
- {
- text: "保存", iconCls: "fa fa-save", onClick: function () {
- $.yvan.postForm($form, {
- url: api('/user/editUser'),
- success: function (data) {
- if (data.data > 0) {
- $.yvan.msg('保存成功');
- $dlg.window('close');
- if ($.type(context.confirm) === 'function') {
- context.confirm();
- }
- }
- }
- });
- }
- }, {
- text: "关闭", iconCls: "fa fa-times", onClick: function () {
- $dlg.dialog('close');
- }
- }
- ]
- };
- };
- });
|