diff --git a/.env.development b/.env.development index 71eebf5..9fd0b2e 100644 --- a/.env.development +++ b/.env.development @@ -7,5 +7,5 @@ VUE_APP_BASE_API = '/api' ## 配置测试和本地开发时的 接口地址 ##VUE_APP_URL = "http://127.0.0.1:4523/m1/4061550-0-default" -VUE_APP_URL = "http://192.168.0.127:8113" +VUE_APP_URL = "http://192.168.0.121:8113" ##VUE_APP_URL = "https://oms.yxtsoft.com" diff --git a/src/api/goods/goods.js b/src/api/goods/goods.js index 231b853..763da27 100644 --- a/src/api/goods/goods.js +++ b/src/api/goods/goods.js @@ -78,6 +78,21 @@ export default { }) }, + + // 确定导入商品 + batchSave: function(params) { + return request({ + url: '/oms/apiadmin/base/basegoodsspu/batchSave?orgPath=' + params.orgPath, + method: 'post', + data: params.data, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + + + // 查询商品分页列表 getGoodsListAllByOrg: function(params) { return request({ diff --git a/src/api/statistics/cusmoterSale.js b/src/api/statistics/cusmoterSale.js new file mode 100644 index 0000000..6107cc9 --- /dev/null +++ b/src/api/statistics/cusmoterSale.js @@ -0,0 +1,62 @@ +import request from '@/utils/request' +// 报表查询 客户销售 +export default { + // 查询分页列表 + listPage: function(params) { + return request({ + url: '/oms/v1/smssalesbill/listPage', + method: 'post', + data: params, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + // 选择商品 + chooseProducts: function(params) { + return request({ + url: '/oms/apiadmin/base/basegoodsspu/getGoodsForSales', + method: 'post', + data: params, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + fetchBySid: function(data) { + return request({ + url: '/oms/v1/smssalesbill/fetchDetailsBySid/' + data, + method: 'get' + }) + }, + deleteBySids: function(data) { + return request({ + url: '/oms/v1/smssalesbill/delBySids', + method: 'DELETE', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + saveOrUpdate: function(data) { + return request({ + url: '/oms/v1/smssalesbill/save', + method: 'post', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + submit: function(data) { + return request({ + url: '/oms/v1/smssalesbill/submit', + method: 'post', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }) + } +} diff --git a/src/api/statistics/goodsPurchase.js b/src/api/statistics/goodsPurchase.js new file mode 100644 index 0000000..fda3c05 --- /dev/null +++ b/src/api/statistics/goodsPurchase.js @@ -0,0 +1,62 @@ +import request from '@/utils/request' +// 报表查询 商品采购 +export default { + // 查询分页列表 + listPage: function(params) { + return request({ + url: '/oms/v1/smssalesbill/listPage', + method: 'post', + data: params, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + // 选择商品 + chooseProducts: function(params) { + return request({ + url: '/oms/apiadmin/base/basegoodsspu/getGoodsForSales', + method: 'post', + data: params, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + fetchBySid: function(data) { + return request({ + url: '/oms/v1/smssalesbill/fetchDetailsBySid/' + data, + method: 'get' + }) + }, + deleteBySids: function(data) { + return request({ + url: '/oms/v1/smssalesbill/delBySids', + method: 'DELETE', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + saveOrUpdate: function(data) { + return request({ + url: '/oms/v1/smssalesbill/save', + method: 'post', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + submit: function(data) { + return request({ + url: '/oms/v1/smssalesbill/submit', + method: 'post', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }) + } +} diff --git a/src/api/statistics/goodsSale.js b/src/api/statistics/goodsSale.js new file mode 100644 index 0000000..1d23509 --- /dev/null +++ b/src/api/statistics/goodsSale.js @@ -0,0 +1,62 @@ +import request from '@/utils/request' +// 报表查询 商品销售 +export default { + // 查询分页列表 + listPage: function(params) { + return request({ + url: '/oms/v1/smssalesbill/listPage', + method: 'post', + data: params, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + // 选择商品 + chooseProducts: function(params) { + return request({ + url: '/oms/apiadmin/base/basegoodsspu/getGoodsForSales', + method: 'post', + data: params, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + fetchBySid: function(data) { + return request({ + url: '/oms/v1/smssalesbill/fetchDetailsBySid/' + data, + method: 'get' + }) + }, + deleteBySids: function(data) { + return request({ + url: '/oms/v1/smssalesbill/delBySids', + method: 'DELETE', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + saveOrUpdate: function(data) { + return request({ + url: '/oms/v1/smssalesbill/save', + method: 'post', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + submit: function(data) { + return request({ + url: '/oms/v1/smssalesbill/submit', + method: 'post', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }) + } +} diff --git a/src/router/index.js b/src/router/index.js index 97434b5..46e3318 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -202,6 +202,44 @@ export const constantRoutes = [ } }] }, + + { + path: '/statistics', + component: Layout, + redirect: '/statistics', + meta: { + title: '统计报表' + }, + children: [{ + path: '/cusmoterSale/cusmoterSale', + component: () => import('@/views/statistics/cusmoterSale/cusmoterSale'), + name: 'CusmoterSale', + meta: { + title: '客户销售统计', + noCache: true + } + }, + { + path: '/goodsPurchase/goodsPurchase', + component: () => import('@/views/statistics/goodsPurchase/goodsPurchase'), + name: 'GoodsPurchase', + meta: { + title: '商品采购统计', + noCache: true + } + }, + { + path: '/goodsSale/goodsSale', + component: () => import('@/views/statistics/goodsSale/goodsSale'), + name: 'GoodsSale', + meta: { + title: '商品销售统计', + noCache: true + } + }, + ] + }, + { path: '/sales', component: Layout, diff --git a/src/views/goods/goods/index.vue b/src/views/goods/goods/index.vue index 2ac97e6..39b3aa1 100644 --- a/src/views/goods/goods/index.vue +++ b/src/views/goods/goods/index.vue @@ -118,7 +118,7 @@
@@ -154,11 +154,13 @@ uploadSuccess: false, uploadResultMesssage: '', uploadData: { - sid: '' + sid: '', + orgPath: window.sessionStorage.getItem('orgSidPath') }, headers: { token: window.sessionStorage.getItem('token') }, + uploadInfo: [], viewState: 1, // 1、列表 2、添加 3、修改 4、查看 isSearchShow: false, searchxianshitit: '显示查询条件', @@ -273,6 +275,7 @@ const _this = this _this.uploadResultMesssage = resp.msg _this.uploadSuccess = resp.success + _this.uploadInfo = resp.data }, handleConfirm() { @@ -284,8 +287,32 @@ }) return } + + var params = { + orgPath: window.sessionStorage.getItem('orgSidPath'), + data: this.uploadInfo + } + + req.batchSave(params).then((resp) => { + if (resp.success) { + this.dialogVisible = false + this.loadList() + this.$message({ + showClose: true, + type: 'success', + message: '上传成功!' + }) + return + } + + }).catch(() => {}) + + }, + dialogVisibleClose() { + this.uploadResultMesssage = '' + this.uploadSuccess = '' + this.fileList = [] this.dialogVisible = false - this.loadList() }, // 搜索条件效果 clicksearchShow() { diff --git a/src/views/purchase/purchaseOrder/purchaseOrderAdd.vue b/src/views/purchase/purchaseOrder/purchaseOrderAdd.vue index 91689bb..1c4108f 100644 --- a/src/views/purchase/purchaseOrder/purchaseOrderAdd.vue +++ b/src/views/purchase/purchaseOrder/purchaseOrderAdd.vue @@ -20,7 +20,10 @@