mutants-appfx
Version:
appfx module
106 lines (104 loc) • 2.12 kB
JavaScript
module.exports = ({
pid
}) => {
if (pid === 'list') {
return {
operations: {
items: [{
name: 'btn1',
text: 'Create',
onClick: 'create'
}]
},
columns: [{
label: '存货名称',
value: 'code',
type: 'input',
}, {
label: '价格',
value: 'price',
type: 'numberinput',
}, {
label: '数量',
value: 'count',
type: 'numberinput',
}]
};
}
return {
operations: {
items: [{
name: 'btn1',
text: 'Create',
onClick: 'create'
}, {
text: 'Save',
onClick: 'save',
// 受单据状态 && 功能权限 影响
disabled: '($vm.state != "AddNew" || $vm.state != "Edit") || !$uifunction.has("Modify")'
}, {
text: 'Cancel',
onClick: {
},
disabled: '$vm.state != "AddNew" '
}, {
text: 'Test ViewController',
onClick: {
name: 'viewAction1'
}
}, {
text: 'Snapshot',
onClick: {
name: 'testSnapshot'
}
}, {
text: 'Read Only',
onClick: {
name: 'changePage',
pid: 'readonly'
}
}, {
text: 'Open Draft',
onClick: {
name: 'openDraft'
}
},{
text: 'Open List',
onClick: {
name: 'openList'
}
}]
},
voucher: {
tabs: [{
items: [{
label: '单据编码',
value: 'code',
}, {
label: '名称',
value: 'name',
}, {
label: '合计',
value: 'total',
disabled: true
}]
}],
table: {
dataSouceField: 'detail',
columns: [{
label: '存货名称',
value: 'code',
type: 'input',
}, {
label: '价格',
value: 'price',
type: 'numberinput',
}, {
label: '数量',
value: 'count',
type: 'numberinput',
}]
}
}
};
}