123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274 |
- Ext.define('trade.saas.view.stock.report.Prodiodetail', {
- extend: 'saas.view.core.report.ReportPanel',
- xtype: 'stock-report-prodiodetail',
- controller: 'stock-report-prodiodetail',
- viewModel: 'stock-report-prodiodetail',
- viewName: 'stock-report-prodiodetail',
- //groupField: 'pd_prodcode',
- //groupHeaderTpl: '物料:{[values.rows[0].data.pr_detail]}({[values.rows[0].data.pd_prodcode]})',
- listUrl: '/api/storage/report/prodioDetail',
- defaultCondition: null,
- reportTitle: '库存收发明细表',
- QueryWidth:0.2,
- showMySummary: false,
- allowCust: true,
- caller:'ProdioDetailReport',
- hasOtherInfo: false,
- otherInfoDetail:{},
-
- searchItems: [ {
- xtype: 'condatefield',
- name: 'pi_date',
- fieldLabel: '日期',
- labelWidth:50,
- columnWidth: 0.4
- },{
- xtype: 'multicombo',
- name: 'pi_class',
- fieldLabel: '业务类型',
- allowBlank: true,
- columnWidth: 0.15,
- datas: [
- ["PURCIN", "采购入库"],
- ["PURCOUT", "采购退货"],
- ["SALEOUT", "销售出货"],
- ["SALERETURN", "销售退货"],
- ["OTHERIN", "其它入库"],
- ["OTHEROUT", "其它出库"],
- ["RESERVEINITIALIZE","库存初始化"],
- ["STOCKPROFIT","盘盈入库"],
- ["STOCKLOSS","盘亏出库"]
- ]
- },{
- xtype: 'multiqueryField',
- columnWidth: 0.35,
- name: 'multi_query',
- querys: {
- "Prod": {"field": "pd_prodcode", "dbfinds": [{
- from: 'pr_code',
- to: 'pd_prodcode'
- },{
- from: 'pr_detail',
- to: 'pr_detail'
- }]},
- "Wh":{"field": "pd_whname", "dbfinds": [{//仓库
- from: 'wh_description',
- to: 'pd_whname'
- }]
- },
- "Cust":{"field": "pi_custcode", "dbfinds": [{//客户名称
- from: 'cu_code',
- to: 'pi_custcode'
- }]
- },
- "Vend":{"field": "pi_vendcode", "dbfinds": [{//供应商
- from: 've_code',
- to: 'pi_vendcode'
- }]},
- "BillCode": {"field": "pi_inoutno" ,"desc": "订单号"},//单号
- "Emp":{"field": "pi_seller", "dbfinds": [{ //人员 。。
- from: 'em_name',
- to: 'pi_seller'
- }]}
- }
- }],
- reportColumns: [{
- text: 'id',
- dataIndex: 'id',
- hidden: true
- },{
- text: '物料编号',
- dataIndex: 'pd_prodcode',
- width: 120 ,
- locked: true
- }, {
- text: '物料名称',
- dataIndex: 'pr_detail',
- width: 150,
- locked: true
- },{
- text: '单据日期',
- dataIndex: 'pi_date',
- xtype: 'datecolumn',
- width: 100,
- locked: true
- }, {
- text: '序号',
- dataIndex: 'pd_pdno',
- exportFormat: 'Integer',
- align: 'center',
- xtype: 'numbercolumn',
- width: 60,
- locked: true,
- renderer: function(v) {
- return saas.util.BaseUtil.numberFormat(v, 0, false);
- }
- }, {
- text: '单号',
- dataIndex: 'pi_inoutno',
- width: 130,
- locked: true
- }, {
- text: '业务类型',
- dataIndex: 'pi_class',
- width: 90,
- locked: true,
- renderer: function(v) {
- if(v=="PURCIN"){
- return "采购验收";
- }else if(v=="PURCOUT"){
- return "采购验退";
- }else if(v=="SALEOUT"){
- return "销售出货";
- }else if(v=="SALERETURN"){
- return "销售退货";
- }else if(v=="OTHERIN"){
- return "其它入库";
- }else if(v=="OTHEROUT"){
- return "其它出库";
- }else if(v=="RESERVEINITIALIZE"){
- return "库存初始化";
- }else if(v=="STOCKPROFIT"){
- return "盘盈入库";
- }else if(v=="STOCKLOSS"){
- return "盘亏出库";
- }else if(v=="MOVEOUT" || v=="MOVEIN"){
- return "移仓单";
- }else if(v=="MAKEPICK"){
- return "生产领料";
- }else if(v=="MAKERETURN"){
- return "生产退料";
- }else if(v=="MAKEIN"){
- return "完工入库";
- }else if(v=="OSMAKEPICK"){
- return "外协领料";
- }else if(v=="OSMAKERETURN"){
- return "外协退料";
- }else if(v=="OSMAKEIN"){
- return "外协验收";
- }else if(v=="OSMAKEINBACK"){
- return "外协验退";
- }else{
- return v;
- }
- }
- }, {
- text: '往来单位',
- dataIndex: 'bizname',
- width: 180
- }, {
- text: '入库数量',
- xtype: 'numbercolumn',
- exportFormat: 'Quantity',
- dataIndex: 'inqty',
- width: 110,
- renderer: function(v) {
- return saas.util.BaseUtil.numberFormat(v, 6, true);
- },
- summaryType: 'sum',
- summaryRenderer: function(v) {
- return saas.util.BaseUtil.numberFormat(v, 6, true);
- }
- }, {
- text: '出库数量',
- xtype: 'numbercolumn',
- exportFormat: 'Quantity',
- dataIndex: 'outqty',
- width: 110,
- renderer: function(v) {
- return saas.util.BaseUtil.numberFormat(v, 6, true);
- },
- summaryType: 'sum',
- summaryRenderer: function(v) {
- return saas.util.BaseUtil.numberFormat(v, 6, true);
- }
- }, {
- text: '单位',
- dataIndex: 'pr_unit',
- width: 65
- }, {
- text: '仓库',
- dataIndex: 'pd_whname',
- width: 120
- }, {
- text: '成本单价(元)',
- xtype: 'numbercolumn',
- exportFormat: 'Price',
- dataIndex: 'pd_price',
- width: 120,
- renderer: function(v) {
- return saas.util.BaseUtil.numberFormat(v, 8, true);
- }
- }, {
- text: '成本金额(元)',
- xtype: 'numbercolumn',
- exportFormat: 'Amount',
- dataIndex: 'pd_total',
- width: 120,
- renderer: function(v) {
- return saas.util.BaseUtil.numberFixFormat(v, 2, true);
- },
- /*summaryType: 'sum',
- summaryRenderer: function(v) {
- return saas.util.BaseUtil.numberFormat(v, 6, true);
- }*/
- }, {
- text: '结存数量',
- xtype: 'numbercolumn',
- exportFormat: 'Quantity',
- dataIndex: 'qty_sum',
- width: 110,
- renderer: function(v) {
- return saas.util.BaseUtil.numberFormat(v, 6, true);
- },
- /*summaryType: 'sum',
- summaryRenderer: function(v) {
- return saas.util.BaseUtil.numberFormat(v, 6, true);
- }*/
- }, {
- text: '结存金额(元)',
- xtype: 'numbercolumn',
- exportFormat: 'Amount',
- dataIndex: 'amount_sum',
- width: 120,
- renderer: function(v) {
- return saas.util.BaseUtil.numberFixFormat(v, 2, true);
- }
- }, {
- text: '关联单号',
- dataIndex: 'pd_ordercode',
- width: 150
- }, {
- text: '录入人',
- dataIndex: 'creatorName',
- width: 100
- }, {
- text: '审核人',
- dataIndex: 'pi_auditman',
- width: 100
- }, {
- text: '备注',
- dataIndex: 'pd_remark',
- width: 250
- }, {
- text: '型号',
- dataIndex: 'pr_orispeccode',
- width: 150
- }, {
- text: '规格',
- dataIndex: 'pr_spec',
- width: 200
- }],
- setOtherInfo:function(){ //库存查询双击跳转库存收发明细表并赋值
- var me = this,
- form = me.down('form'),
- trigger = form.down('[name="multi_query"]');
- trigger.down('[xtype="productDbfindTrigger"]').setValue(me.otherInfoDetail.code);
- trigger.down('[xtype="textfield"]').setValue(me.otherInfoDetail.detail);
- trigger.setBindValue(me.otherInfoDetail.code);
- }
- });
|