diff --git a/App.vue b/App.vue index b98cbc4..f942407 100644 --- a/App.vue +++ b/App.vue @@ -40,4 +40,7 @@ page { white-space: pre-wrap; word-wrap: break-word; } +::v-deep .uni-system-preview-image { + z-index: 10080 !important; +} diff --git a/api/aqSafety.js b/api/aqSafety.js index 91c942a..58d4b9e 100644 --- a/api/aqSafety.js +++ b/api/aqSafety.js @@ -43,4 +43,58 @@ export function getRecordList(params) { method: 'get', params }); +} + +// 退料清点记录详情 +export function getDetail(params) { + return request({ + url: '/app/returnCheck/getDetail', + method: 'get', + params + }); +} + +// 退料清点记录详情-列表 +export function getDetailList(params) { + return request({ + url: '/app/returnCheck/getDetailList', + method: 'get', + params + }); +} + +// 检验入库-列表 +export function getCheckList(params) { + return request({ + url: '/app/checkStore/getCheckList', + method: 'get', + params + }); +} + +// 检验鉴定-提交 +export function checkAppraise(data) { + return request({ + url: '/app/checkStore/checkAppraise', + method: 'post', + data + }); +} + +// 检验记录-列表 +export function getCheckRecordList(params) { + return request({ + url: '/app/checkStore/getCheckRecordList', + method: 'get', + params + }); +} + +// 检验记录-详情 +export function getCheckRecordDetail(params) { + return request({ + url: '/app/checkStore/getCheckRecordDetail', + method: 'get', + params + }); } \ No newline at end of file diff --git a/config.js b/config.js index a88554e..b12af44 100644 --- a/config.js +++ b/config.js @@ -4,6 +4,8 @@ module.exports = { baseUrl: 'http://192.168.0.39:21995', baseUrl2: 'http://localhost:8080', uploadFileUrl: '/app/common/appUploadFile', + fileUrl: 'http://192.168.0.39:21995/statics', // 图片预览 + // fileUrl: 'http://127.0.0.1:21995/statics', // 图片预览 // 应用信息 appInfo: { // 应用名称 diff --git a/pages.json b/pages.json index 42ec87f..7fc0157 100644 --- a/pages.json +++ b/pages.json @@ -105,6 +105,33 @@ "style": { "navigationBarTitleText": "退料清点记录" } + }, + { + "path": "pages/returnInventory/details", + "style": { + "navigationBarTitleText": "退料清点详情" + } + }, + { + "path" : "pages/inspectionEntry/index", + "style" : + { + "navigationStyle": "custom" + } + }, + { + "path" : "pages/inspectionEntry/inspectionRecord", + "style" : + { + "navigationBarTitleText": "检验记录" + } + }, + { + "path" : "pages/stockTaking/index", + "style" : + { + "navigationStyle": "custom" + } } ], "tabBar": { diff --git a/pages/index.vue b/pages/index.vue index 7b43e1f..437344c 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -25,11 +25,11 @@ export default { }, { name: 'star', - title: '星星' + title: '检验入库' }, { name: 'hourglass', - title: '沙漏' + title: '库存盘点' }, { name: 'home', @@ -50,6 +50,10 @@ export default { url = '/pages/inventory/index' } else if (index === 1) { url = '/pages/returnInventory/index' + } else if (index === 2) { + url = '/pages/inspectionEntry/index' + } else if (index === 3) { + url = '/pages/stockTaking/index' } uni.navigateTo({ url }) } diff --git a/pages/inspectionEntry/index.vue b/pages/inspectionEntry/index.vue new file mode 100644 index 0000000..ccee602 --- /dev/null +++ b/pages/inspectionEntry/index.vue @@ -0,0 +1,407 @@ + + + + + diff --git a/pages/inspectionEntry/inspectionRecord.vue b/pages/inspectionEntry/inspectionRecord.vue new file mode 100644 index 0000000..539b77b --- /dev/null +++ b/pages/inspectionEntry/inspectionRecord.vue @@ -0,0 +1,310 @@ + + + + + diff --git a/pages/inventory/index.vue b/pages/inventory/index.vue index d7a3642..59e0c8b 100644 --- a/pages/inventory/index.vue +++ b/pages/inventory/index.vue @@ -36,7 +36,7 @@ - + diff --git a/pages/returnInventory/details.vue b/pages/returnInventory/details.vue new file mode 100644 index 0000000..7027472 --- /dev/null +++ b/pages/returnInventory/details.vue @@ -0,0 +1,223 @@ + + + + + diff --git a/pages/returnInventory/index.vue b/pages/returnInventory/index.vue index 7bfd589..f6cd17f 100644 --- a/pages/returnInventory/index.vue +++ b/pages/returnInventory/index.vue @@ -19,7 +19,7 @@ @@ -213,7 +213,7 @@ placeholder="返回数量" border="surround" v-model="item.num" - @blur="handleNum" + @blur="handleNum(item)" > @@ -221,6 +221,7 @@ +
@@ -324,7 +325,7 @@ export default { }, // 日期选择器 confirmTime(e) { - console.log('🚀 ~ confirmTime ~ e', e) + console.log('🚀 ~ confirmTime ~ e', e) this.formData.backTime = this.formatTimestamp(e.value) console.log('🚀 ~ confirmTime ~ this.formData.backTime:', this.formData.backTime) this.showPickerTime = false @@ -356,15 +357,14 @@ export default { this.formData.fileList.splice(e.index, 1) console.log('🚀 ~ deleteImg ~ this.formData.fileList:', this.formData.fileList) }, - handleNum() { + handleNum(item) { // 校验退回数量-只能是正整数 - this.detailList.forEach(item => { - if (!/^[1-9]\d*$/.test(item.num)) { - this.$modal.msg('退回数量只能是正整数') - // 去除.后面的数字 - item.num = item.num.replace(/\.\d+/, '') - } - }) + const reg = /^[1-9]\d*$/ + if (!reg.test(item.num)) { + this.$modal.msg('退回数量只能是正整数') + // 去除.后面的数字 + item.num = item.num.replace(/\.\d+/, '') + } }, upload(path) { uni.uploadFile({ @@ -458,23 +458,28 @@ export default { .then(() => { console.log('所有文件上传完成') setTimeout(async () => { - const params = { - ...this.formData, - detailList: this.detailList + try { + const params = { + ...this.formData, + detailList: this.detailList + } + delete params.fileList + console.log('🚀 ~ submit ~ params:', params) + const encryptedData = JSON.stringify(params) + const res = await addData({ encryptedData }) + console.log('🚀 ~ submit ~ res:', res) + this.isLoading = false + this.$modal.msg('提交成功') + setTimeout(() => { + // 刷新页面 + uni.reLaunch({ + url: '/pages/returnInventory/index' + }) + }, 200) + } catch (error) { + console.log('🚀 ~ submit ~ error', error) + this.isLoading = false } - delete params.fileList - console.log('🚀 ~ submit ~ params:', params) - const encryptedData = JSON.stringify(params) - const res = await addData({ encryptedData }) - console.log('🚀 ~ submit ~ res:', res) - this.isLoading = false - this.$modal.msg('提交成功') - setTimeout(() => { - // 刷新页面 - uni.reLaunch({ - url: '/pages/returnInventory/index' - }) - }, 200) }, 600) }) .catch(error => { @@ -521,7 +526,7 @@ export default { } .uPopup { width: 90vw; - height: 80vh; + min-height: 80vh; background-color: #fff; border-radius: 8px; padding: 15px; diff --git a/pages/returnInventory/returnInventoryRecord.vue b/pages/returnInventory/returnInventoryRecord.vue index 720b145..4725640 100644 --- a/pages/returnInventory/returnInventoryRecord.vue +++ b/pages/returnInventory/returnInventoryRecord.vue @@ -12,7 +12,7 @@ >
-
+
{{ item.proName }}
@@ -36,7 +36,7 @@
- + @@ -95,7 +95,15 @@ export default { else this.status = 'nomore' }, 500) console.log('加载..', this.pageSize) - } + }, + goDetail(item) { + const params = { + ...item + } + uni.navigateTo({ + url: `/pages/returnInventory/details?params=${JSON.stringify(params)}` + }) + } } } diff --git a/pages/stockTaking/index.vue b/pages/stockTaking/index.vue new file mode 100644 index 0000000..53c63bd --- /dev/null +++ b/pages/stockTaking/index.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/utils/request.js b/utils/request.js index 75b6530..e84db67 100644 --- a/utils/request.js +++ b/utils/request.js @@ -99,7 +99,9 @@ const request = config => { // res = JSON.parse(decryptCBC(res.data)) console.log('🚀 ~ request.js ~ line 100 ~ res', res) const code = res.data.code || 200 + console.log('🚀 ~ ~ code', code) const msg = errorCode[code] || res.data.msg || errorCode['default'] + console.log('🚀 ~ ~ msg', msg) if (code === 401) { showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => { if (res.confirm) {