You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
886 B
TypeScript
39 lines
886 B
TypeScript
4 years ago
|
import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
|
||
|
import store from '@/store';
|
||
|
import http from '@/utils/request';
|
||
|
import { url } from '@/utils/url';
|
||
|
import { session } from '@/store/modules/session';
|
||
|
import { stringify } from 'query-string';
|
||
|
|
||
|
@Module({
|
||
|
namespaced: true,
|
||
|
dynamic: true,
|
||
|
store,
|
||
|
name: 'product.model',
|
||
|
})
|
||
|
export class ReceiptModule extends VuexModule {
|
||
|
/**
|
||
|
* 原材料菜单
|
||
|
*/
|
||
|
menuList = [];
|
||
|
/**
|
||
|
* 查询原材料菜单列表
|
||
|
*/
|
||
|
@MutationAction
|
||
|
async getMenuList() {
|
||
|
const result: any = await http.post(
|
||
|
url.menu,
|
||
|
stringify({
|
||
2 years ago
|
// factoryCode: session.factoryCode,
|
||
4 years ago
|
loginName: session.loginName,
|
||
|
resType: 4,
|
||
|
}),
|
||
|
);
|
||
|
console.log('aaaa', result);
|
||
|
const menuList = result.data;
|
||
|
return { menuList };
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default getModule(ReceiptModule);
|