| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233 |
- Ext.define('saas.view.document.vendor.FormPanel', {
- extend: 'saas.view.core.form.FormPanel',
- xtype: 'document-vendor-formpanel',
- controller: 'document-vendor-formpanel',
- viewModel: 'document-vendor-formpanel',
-
- caller:'Vendor',
- //字段属性
- _title:'供应商资料',
- _idField: 'id',
- _codeField: 've_code',
- _statusField: 've_status',
- _statusCodeField: 've_statuscode',
- _readUrl:'/api/document/vendor/read/',
- _saveUrl:'/api/document/vendor/save',
- _openUrl:'/api/document/vendor/open',
- _closeUrl:'/api/document/vendor/close',
- _deleteUrl:'/api/document/vendor/delete/',
- initId:0,
- codeInHeader: false,
- defaultItems: [{
- xtype: 'hidden',
- name: 'id',
- fieldLabel: 'id',
- allowBlank: true,
- columnWidth: 0.25
- },{
- xtype: 'textfield',
- name: 've_name',
- fieldLabel: '供应商名称',
- allowBlank: false,
- columnWidth: 0.25
- },{
- xtype: 'textfield',
- name: 've_code',
- fieldLabel: '供应商编号',
- allowBlank: true,
- columnWidth: 0.25
- },{
- xtype: 'textfield',
- name: 've_status',
- fieldLabel: '状态',
- allowBlank: true,
- columnWidth: 0.25
- },{
- xtype: 'hidden',
- name: 've_statuscode',
- fieldLabel: '状态码',
- allowBlank: true,
- columnWidth: 0.25
- },{
- editable:false,
- xtype : "remotecombo",
- storeUrl:'/api/document/vendorkind/getCombo',
- name : "ve_type",
- fieldLabel : "供应商类型",
- allowBlank : false,
- columnWidth : 0.25,
- addHandler:function(b){
- var document = Ext.create('saas.view.document.kind.Kind',{});
- var form = this.ownerCmp.ownerCt;
- this.dialog = form.getController().getView().add({
- xtype: 'document-kind-childwin',
- bind: {
- title: '新增供应商类型'
- },
- dataKind:'vendorkind',
- belong:document.etc['vendorkind'],
- _parent:form,
- _combo:this.ownerCmp,
- record:null,
- session: true
- });
- this.dialog.show();
- }
- },{
- xtype : "datefield",
- name : "createTime",
- fieldLabel : "创建时间",
- allowBlank : true,
- columnWidth : 0.25
- },{
- xtype : "datefield",
- name : "ve_begindate",
- fieldLabel : "期初日期",
- allowBlank : true,
- columnWidth : 0.25
- },{
- xtype : "numberfield",
- hideTrigger:true,
- name : "ve_beginapamount",
- fieldLabel : "期初应收",
- allowBlank : true,
- columnWidth : 0.25
- },{
- xtype : "numberfield",
- hideTrigger:true,
- name : "ve_beginprepayamount",
- fieldLabel : "期初预收",
- allowBlank : true,
- columnWidth : 0.25
- },{
- xtype : "numberfield",
- hideTrigger:true,
- name : "ve_promisedays",
- fieldLabel : "承付天数",
- allowBlank : true,
- columnWidth : 0.25
- },{
- xtype : "numberfield",
- name : "ve_taxrate",
- fieldLabel : "税率",
- allowBlank : false,
- columnWidth : 0.25
- },{
- // xtype : "numberfield",
- // name : "ve_ta",
- // fieldLabel : "应收款余额",
- // allowBlank : true,
- // readOnly:true,
- // editable:false,
- // columnWidth : 0.25
- },{
- xtype:'textfield',
- name : "ve_uu",
- fieldLabel : "供应商UU",
- allowBlank : true,
- columnWidth : 0.25
- },{
- xtype : "datefield",
- name : "updateTime",
- fieldLabel : "更新时间",
- allowBlank : true,
- columnWidth : 0.25
- }, {
- xtype : "detailGridField",
- storeModel:'saas.model.document.vendorcontact',
- detnoColumn: 'vc_detno',
- showCount: false,
- deleteDetailUrl:'/api/document/vendor/deleteContact/',
- columns : [
- {
- text : "ID",
- dataIndex : "id",
- hidden : true,
- xtype : "numbercolumn"
- },
- {
- text : "关联ID",
- dataIndex : "vc_veid",
- hidden : true,
- xtype : "numbercolumn"
- },
- {
- text : "联系人",
- editor : {
- xtype : "textfield"
- },
- dataIndex : "vc_name",
- xtype : "",
- },
- {
- text : "电话",
- editor : {
- xtype : "textfield"
- },
- dataIndex : "vc_tel",
- xtype : "",
- },
- {
- text : "微信/QQ",
- editor : {
- xtype : "textfield"
- },
- dataIndex : "vc_qq",
- xtype : "",
- },
- {
- text : "邮箱",
- editor : {
- xtype : "textfield"
- },
- dataIndex : "vc_email",
- xtype : "",
- },
- {
- editor : {
- displayField : "display",
- editable:false,
- format : "",
- hideTrigger : false,
- maxLength : 100.0,
- minValue : null,
- positiveNum : false,
- queryMode : "local",
- valueField : "value",
- xtype : "combo",
- store:{
- fields: ['display', 'value'],
- data : [
- {"display":"是", "value":'1'},
- {"display":"否", "value":'0'}
- ]
- }
- },
- text : "是否默认联系人",
- dataIndex : "vc_default",
- xtype : "",
- renderer: function (v, m, r) {
- if(v=='0'){
- return '';
- }else if(v=='1'){
- return '是';
- }
- return v;
- }
- }]
- }
- ],
- auditTexts: {
- auditCode: 'OPEN',
- auditText: '已开启',
- unAuditCode: 'CLOSE',
- unAuditText: '已关闭',
- auditBtnText: '启用',
- unAuditBtnText: '关闭',
- },
- });
|