diff --git a/api/aqSafety.js b/api/aqSafety.js
index 57c77f9..91c942a 100644
--- a/api/aqSafety.js
+++ b/api/aqSafety.js
@@ -7,4 +7,40 @@ export function getInventoryList(params) {
method: 'get',
params
});
+}
+
+// 退料工程-下拉
+export function getProList(params) {
+ return request({
+ url: '/app/common/getProList',
+ method: 'get',
+ params
+ });
+}
+
+// 退料物资列表
+export function getMaTypeByReturnCheck(params) {
+ return request({
+ url: '/app/common/getMaTypeByReturnCheck',
+ method: 'get',
+ params
+ });
+}
+
+// 退料清点-提交
+export function addData(data) {
+ return request({
+ url: '/app/returnCheck/addData',
+ method: 'post',
+ data
+ });
+}
+
+// 退料清点记录
+export function getRecordList(params) {
+ return request({
+ url: '/app/returnCheck/getRecordList',
+ method: 'get',
+ params
+ });
}
\ No newline at end of file
diff --git a/config.js b/config.js
index 2f2bea3..a88554e 100644
--- a/config.js
+++ b/config.js
@@ -3,6 +3,7 @@ module.exports = {
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
baseUrl: 'http://192.168.0.39:21995',
baseUrl2: 'http://localhost:8080',
+ uploadFileUrl: '/app/common/appUploadFile',
// 应用信息
appInfo: {
// 应用名称
diff --git a/pages.json b/pages.json
index 2362f54..42ec87f 100644
--- a/pages.json
+++ b/pages.json
@@ -1,109 +1,131 @@
{
"easycom": {
- "^u-(.*)": "uni_modules/uview-ui/components/u-$1/u-$1.vue"
- },
- "pages": [{
- "path": "pages/login",
- "style": {
- "navigationBarTitleText": "登录"
- }
- }, {
- "path": "pages/register",
- "style": {
- "navigationBarTitleText": "注册"
- }
- }, {
- "path": "pages/index",
- "style": {
- "navigationBarTitleText": "首页"
- // "navigationStyle": "custom"
- }
- }, {
- "path": "pages/work/index",
- "style": {
- "navigationBarTitleText": "工作台"
- }
- }, {
- "path": "pages/mine/index",
- "style": {
- "navigationBarTitleText": "我的"
- }
- }, {
- "path": "pages/mine/avatar/index",
- "style": {
- "navigationBarTitleText": "修改头像"
- }
- }, {
- "path": "pages/mine/info/index",
- "style": {
- "navigationBarTitleText": "个人信息"
- }
- }, {
- "path": "pages/mine/info/edit",
- "style": {
- "navigationBarTitleText": "编辑资料"
- }
- }, {
- "path": "pages/mine/pwd/index",
- "style": {
- "navigationBarTitleText": "修改密码"
- }
- }, {
- "path": "pages/mine/setting/index",
- "style": {
- "navigationBarTitleText": "应用设置"
- }
- }, {
- "path": "pages/mine/help/index",
- "style": {
- "navigationBarTitleText": "常见问题"
- }
- }, {
- "path": "pages/mine/about/index",
- "style": {
- "navigationBarTitleText": "关于我们"
- }
- }, {
- "path": "pages/common/webview/index",
- "style": {
- "navigationBarTitleText": "浏览网页"
- }
- }, {
- "path": "pages/common/textview/index",
- "style": {
- "navigationBarTitleText": "浏览文本"
- }
+ "^u-(.*)": "uni_modules/uview-ui/components/u-$1/u-$1.vue"
},
- {
- "path" : "pages/inventory/index",
- "style" :
- {
- "navigationBarTitleText" : "库存查询"
- }
- },
- {
- "path" : "pages/returnInventory/index",
- "style" :
- {
- "navigationStyle": "custom"
- }
- }],
+ "pages": [
+ {
+ "path": "pages/login",
+ "style": {
+ "navigationBarTitleText": "登录"
+ }
+ },
+ {
+ "path": "pages/register",
+ "style": {
+ "navigationBarTitleText": "注册"
+ }
+ },
+ {
+ "path": "pages/index",
+ "style": {
+ "navigationBarTitleText": "首页"
+ // "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/work/index",
+ "style": {
+ "navigationBarTitleText": "工作台"
+ }
+ },
+ {
+ "path": "pages/mine/index",
+ "style": {
+ "navigationBarTitleText": "我的"
+ }
+ },
+ {
+ "path": "pages/mine/avatar/index",
+ "style": {
+ "navigationBarTitleText": "修改头像"
+ }
+ },
+ {
+ "path": "pages/mine/info/index",
+ "style": {
+ "navigationBarTitleText": "个人信息"
+ }
+ },
+ {
+ "path": "pages/mine/info/edit",
+ "style": {
+ "navigationBarTitleText": "编辑资料"
+ }
+ },
+ {
+ "path": "pages/mine/pwd/index",
+ "style": {
+ "navigationBarTitleText": "修改密码"
+ }
+ },
+ {
+ "path": "pages/mine/setting/index",
+ "style": {
+ "navigationBarTitleText": "应用设置"
+ }
+ },
+ {
+ "path": "pages/mine/help/index",
+ "style": {
+ "navigationBarTitleText": "常见问题"
+ }
+ },
+ {
+ "path": "pages/mine/about/index",
+ "style": {
+ "navigationBarTitleText": "关于我们"
+ }
+ },
+ {
+ "path": "pages/common/webview/index",
+ "style": {
+ "navigationBarTitleText": "浏览网页"
+ }
+ },
+ {
+ "path": "pages/common/textview/index",
+ "style": {
+ "navigationBarTitleText": "浏览文本"
+ }
+ },
+ {
+ "path": "pages/inventory/index",
+ "style": {
+ "navigationBarTitleText": "库存查询"
+ }
+ },
+ {
+ "path": "pages/returnInventory/index",
+ "style": {
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/returnInventory/returnInventoryRecord",
+ "style": {
+ "navigationBarTitleText": "退料清点记录"
+ }
+ }
+ ],
"tabBar": {
"color": "#000000",
"selectedColor": "#000000",
"borderStyle": "white",
"backgroundColor": "#ffffff",
- "list": [{
+ "list": [
+ {
"pagePath": "pages/index",
"iconPath": "static/images/tabbar/home.png",
"selectedIconPath": "static/images/tabbar/home_.png",
"text": "首页"
- }, {
+ },
+ {
"pagePath": "pages/work/index",
"iconPath": "static/images/tabbar/work.png",
"selectedIconPath": "static/images/tabbar/work_.png",
"text": "工作台"
- }, {
+ },
+ {
"pagePath": "pages/mine/index",
"iconPath": "static/images/tabbar/mine.png",
"selectedIconPath": "static/images/tabbar/mine_.png",
diff --git a/pages/components/Navbar.vue b/pages/components/Navbar.vue
index 1a4aa1c..f836370 100644
--- a/pages/components/Navbar.vue
+++ b/pages/components/Navbar.vue
@@ -61,7 +61,7 @@ export default {
url: this.goTo
})
} else {
- uni.redirectTo({
+ uni.reLaunch({
url: '/pages/index'
})
}
diff --git a/pages/inventory/index.vue b/pages/inventory/index.vue
index 0c64b42..d7a3642 100644
--- a/pages/inventory/index.vue
+++ b/pages/inventory/index.vue
@@ -18,7 +18,7 @@
{{ item.name }}
- {{ item.code }}
+ {{ item.model }}
@@ -28,15 +28,15 @@
库存数量:
- {{ item.storageNum }}
+ {{ item.kcNum }}
报废数量:
- {{ item.scrapNum }}
+ {{ item.dbfNum }}
-
+
@@ -54,52 +54,12 @@ export default {
pageNum: 1,
pageSize: 10,
total: 0,
- tableList: [
- {
- name: '针式资绝缘子',
- code: 'JKLYJ-10kV-120',
- type: '安全用品',
- storageNum: 1000,
- scrapNum: 100
- },
- {
- name: '针式资绝缘子',
- code: 'JKLYJ-10kV-120',
- type: '安全用品',
- storageNum: 1000,
- scrapNum: 100
- },
- {
- name: '针式资绝缘子',
- code: 'JKLYJ-10kV-120',
- type: '安全用品',
- storageNum: 1000,
- scrapNum: 100
- },
- {
- name: '针式资绝缘子',
- code: 'JKLYJ-10kV-120',
- type: '安全用品',
- storageNum: 1000,
- scrapNum: 100
- },
- {
- name: '针式资绝缘子',
- code: 'JKLYJ-10kV-120',
- type: '安全用品',
- storageNum: 1000,
- scrapNum: 100
- },
- {
- name: '针式资绝缘子',
- code: 'JKLYJ-10kV-120',
- type: '安全用品',
- storageNum: 1000,
- scrapNum: 100
- }
- ]
+ tableList: []
}
},
+ onLoad() {
+ this.getList()
+ },
methods: {
handleSearch() {
this.pageSize = 10
@@ -108,15 +68,15 @@ export default {
async getList() {
try {
const params = {
- keyWord: this.keyWord,
+ encryptedData: JSON.stringify({ keyWord: this.keyWord }),
pageNum: this.pageNum,
pageSize: this.pageSize
}
console.log('🚀 ~ getList ~ params', params)
- const res = await getInventoryList
+ const res = await getInventoryList(params)
console.log('🚀 ~ getList ~ res', res)
- // this.tableList =
- // this.total = res.
+ this.tableList = res.data.list
+ this.total = res.data.total
} catch (error) {
console.log('🚀 ~ getList ~ error', error)
}
diff --git a/pages/returnInventory/index.vue b/pages/returnInventory/index.vue
index 252b0d4..7bfd589 100644
--- a/pages/returnInventory/index.vue
+++ b/pages/returnInventory/index.vue
@@ -1,26 +1,26 @@
-
+
-
+
-
+
@@ -36,6 +36,8 @@
placeholder="请输入经办人电话"
border="none"
inputAlign="right"
+ maxlength="11"
+ @blur="handlePhone"
>
@@ -57,7 +59,7 @@
-
+
您还没有选择退料的类型
需要选择类型后才能进行退料
@@ -84,7 +86,7 @@
{{ item.name }}
- {{ item.code }}
+ {{ item.model }}
-
+
@@ -132,7 +140,7 @@
-
+
@@ -196,11 +204,17 @@
{{ item.name }}
- {{ item.code }}
+ {{ item.model }}
-
+
@@ -220,95 +234,99 @@
+
+
diff --git a/store/modules/user.js b/store/modules/user.js
index 499129f..5e42f3d 100644
--- a/store/modules/user.js
+++ b/store/modules/user.js
@@ -45,11 +45,11 @@ const user = {
password: userInfo.password,
// code: userInfo.code,
// uuid: userInfo.uuid
- }
+ };
return new Promise((resolve, reject) => {
- console.log('🚀 ~ login ~ formData11:', formData)
+ console.log('🚀 ~ login ~ formData11:', formData);
login(formData).then(res => {
- console.log('🚀 ~ login ~ res:', res)
+ console.log('🚀 ~ login ~ res:', res);
setToken(res.token);
commit('SET_TOKEN', res.token);
resolve();
@@ -84,16 +84,22 @@ const user = {
// 退出系统
LogOut({ commit, state }) {
return new Promise((resolve, reject) => {
- logout(state.token).then(() => {
- commit('SET_TOKEN', '');
- commit('SET_ROLES', []);
- commit('SET_PERMISSIONS', []);
- removeToken();
- storage.clean();
- resolve();
- }).catch(error => {
- reject(error);
- });
+ // logout(state.token).then(() => {
+ // commit('SET_TOKEN', '');
+ // commit('SET_ROLES', []);
+ // commit('SET_PERMISSIONS', []);
+ // removeToken();
+ // storage.clean();
+ // resolve();
+ // }).catch(error => {
+ // reject(error);
+ // });
+ commit('SET_TOKEN', '');
+ commit('SET_ROLES', []);
+ commit('SET_PERMISSIONS', []);
+ removeToken();
+ storage.clean();
+ resolve();
});
}
}
diff --git a/utils/request.js b/utils/request.js
index 32c8a32..75b6530 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -19,52 +19,54 @@ const request = config => {
config.header['Authorization'] = 'Bearer ' + getToken()
}
// get请求映射params参数
- if (config.params) {
- let url = config.url + '?' + tansParams(config.params)
- url = url.slice(0, -1)
- config.url = url
- }
- // if (config.method == 'get' && config.params) {
- // let param = tansParams(config.params)
- // if (param) {
- // param = param.slice(0, -1)
- // param = AES.encryptCBC(param)
- // }
- // let url = config.url + '?' + param
+ // if (config.params) {
+ // let url = config.url + '?' + tansParams(config.params)
+ // url = url.slice(0, -1)
// config.url = url
// }
- // // post请求
- // if (config.method === 'post') {
- // config.header = {
- // ...config.header
- // }
- // config.data = AES.encryptCBC(JSON.stringify(config.data))
- // }
- // // put请求
- // if (config.method === 'put' && config.data) {
- // config.header = {
- // ...config.header
- // }
- // config.data = AES.encryptCBC(JSON.stringify(config.data))
- // } else if (config.method === 'put' && config.params) {
- // let params = tansParams(config.params)
- // params = AES.encryptCBC(params)
- // config.url = config.url + '?' + params
- // }
- // // delete请求
- // if (config.method === 'delete') {
- // config.header = {
- // ...config.header
- // }
- // config.data = AES.encryptCBC(JSON.stringify(config.data))
- // }
- // // post请求参数加密
+ if (config.method == 'get' && config.params) {
+ let param = tansParams(config.params)
+ if (param) {
+ param = param.slice(0, -1)
+ // param = AES.encryptCBC(param)
+ }
+ // console.log('🚀 ~ file: request.js ~ line 108 ~ request ~ config.params', config.params)
+ let url = config.url + '?' + param
+ config.url = url
+ }
+ // post请求
+ if (config.method === 'post') {
+ config.header = {
+ ...config.header,
+ 'Content-Type': 'application/x-www-form-urlencoded'
+ }
+ // config.data = AES.encryptCBC(JSON.stringify(config.data))
+ }
+ // put请求
+ if (config.method === 'put' && config.data) {
+ config.header = {
+ ...config.header
+ }
+ // config.data = AES.encryptCBC(JSON.stringify(config.data))
+ } else if (config.method === 'put' && config.params) {
+ let params = tansParams(config.params)
+ // params = AES.encryptCBC(params)
+ config.url = config.url + '?' + params
+ }
+ // delete请求
+ if (config.method === 'delete') {
+ config.header = {
+ ...config.header
+ }
+ // config.data = AES.encryptCBC(JSON.stringify(config.data))
+ }
+ // post请求参数加密
// if (config.headers && config.headers['Content-Type'] == 'application/json') {
// if (typeof config.data == 'object') {
- // config.data = AES.encryptCBC(JSON.stringify(config.data))
+ // // config.data = AES.encryptCBC(JSON.stringify(config.data))
// }
// }
- // //对下载请求进行数据参数拦截加密
+ //对下载请求进行数据参数拦截加密
// if (config.headers && config.headers['Content-Type'] == 'application/x-www-form-urlencoded') {
// if (typeof config.data == 'object') {
// // console.log(config.data)
@@ -95,6 +97,7 @@ const request = config => {
return
}
// res = JSON.parse(decryptCBC(res.data))
+ console.log('🚀 ~ request.js ~ line 100 ~ res', res)
const code = res.data.code || 200
const msg = errorCode[code] || res.data.msg || errorCode['default']
if (code === 401) {