1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- import http from '@/request/index.js';
- // 盘点数据
- export const state = {
- inventData: []
- };
- export const mutations = {
- setInventData(state, data) {
- state.inventData = data
- },
- }
- export const actions = {
- getInventoryData({
- commit,
- rootState
- }, data) {
- return new Promise((resolve, reject) => {
- http('inventory.getListData', {
- ...data.pam,
- }, '加载中').then(res => {
- if (res.success == true) {
- data.that.$refs.paging.complete(res.data.records);
- } else {
- }
- }).catch(e => {
- reject(e)
- })
- })
- },
- getInvenDetailData({
- commit,
- rootState
- }, data) {
- return new Promise((resolve, reject) => {
- http('inventory.getInvenListData', {
- ...data.pam,
- }, '加载中').then(res => {
- if (res.success == true) {
- data.that.$refs.paging.complete(res.data.records);
- } else {
- // commit('DetailsData', []);
- }
- }).catch(e => {
- reject(e)
- })
- })
- },
- //查看盘点结果
- getInvenResultData({
- commit,
- rootState
- }, data) {
- return new Promise((resolve, reject) => {
- http('inventory.getResultData', {
- ...data.pam,
- }, '加载中').then(res => {
- if (res.success == true) {
- data.that.$refs.paging.complete(res.data.records);
- } else {
- // commit('DetailsData', []);
- }
- }).catch(e => {
- reject(e)
- })
- })
- },
- }
|