ttk-app-core
Version:
enterprise develop framework
68 lines (64 loc) • 2.16 kB
JavaScript
import moment from 'moment'
import {consts} from 'edf-consts'
export function getMeta() {
return {
name: 'root',
component: 'Layout',
className: 'ttk-scm-app-inventory-setting',
children: {
name: 'load',
component: 'Spin',
tip: '数据处理中...',
spinning: '{{data.other.loading}}',
children:{
name: 'form',
component: 'Form',
className: 'ttk-scm-app-inventory-setting-form',
children:[{
name:'method',
component: 'Form.Item',
label: '计价核算方式',
children:[{
name: 'method',
component: 'Select',
value: '{{data.form.methodId}}',
onChange: `{{function(v){$selectMethod(v)}}}`,
children: {
name: 'option',
component: 'Select.Option',
value: "{{data.other.method && data.other.method[_rowIndex].id}}",
children: '{{data.other.method && data.other.method[_rowIndex].name}}',
_power: 'for in data.other.method'
}
}]
},{
name:'notes',
component:'::div',
className:'note',
children:'注:企业使用存货的成本计价方式一经使用,不能随意变更。'
}]
}
}
}
}
export function getInitState() {
return {
data: {
other: {
loading: false,
beginDate: moment().format('YYYY-MM'),
method:[{
id: 1,
name: '移动加权平均法'
}]
// ,{
// id:2,
// name:'全月一次平均法'
// }
},
form:{
methodId:1
}
}
}
}