From 536108d6df6977e63591cbfe837c993f7c7885aa Mon Sep 17 00:00:00 2001
From: FrancisHu <2756004617@qq.com>
Date: Mon, 8 Jan 2024 17:41:15 +0800
Subject: [PATCH] =?UTF-8?q?1/8=E9=80=80=E6=96=99=E6=A0=B8=E5=AF=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
apis/apis.js | 68 +++
apis/http.js | 28 +-
.../backMaterialReceive.vue | 4 +-
pages/exitExam/exitExam.vue | 4 +-
pages/exitMaterial/exitMaterial.vue | 74 ++-
.../exitMaterialDetail/exitMaterialDetail.vue | 2 +-
.../exitMaterialSelect/exitMaterialSelect.vue | 75 ++-
pages/fetchExam/fetchExam.vue | 7 +
.../fetchMaterialDetail.vue | 32 +-
.../fetchMaterialOutStore.vue | 1 +
.../fetchMaterialOutStoreDetail.vue | 10 +-
pages/innerFix/innerFix.vue | 99 ++--
pages/login/login.vue | 125 ++--
pages/newBuyDetail/newBuyDetail.vue | 134 ++++-
pages/newInStore/newInStore.vue | 117 ++--
pages/returnFix/returnFix.vue | 76 +--
public.js | 1 +
unpackage/dist/dev/app-plus/app-service.js | 545 ++++++++----------
unpackage/dist/dev/app-plus/app-view.js | 460 +++++----------
19 files changed, 885 insertions(+), 977 deletions(-)
diff --git a/apis/apis.js b/apis/apis.js
index e80a9c0..e5746fe 100644
--- a/apis/apis.js
+++ b/apis/apis.js
@@ -9,6 +9,22 @@ const login = {
data,
header
)
+ },
+ async checkCode (data = {} , header = {}){
+ return await Http.post(
+ HttpConfig.authPath,
+ HttpConfig.serviceUrl.login.checkCode,
+ data,
+ header
+ )
+ },
+ async log (data = {} , header = {}){
+ return await Http.post(
+ HttpConfig.authPath,
+ HttpConfig.serviceUrl.login.log,
+ data,
+ header
+ )
}
}
@@ -144,6 +160,33 @@ const fetchExam = {
},
}
+const newInStore = {
+ async fetchNewInStoreList (data = {} , header = {}){
+ return await Http.get(
+ HttpConfig.basePath,
+ HttpConfig.serviceUrl.newInStore.fetchNewInStoreList,
+ data,
+ header
+ )
+ },
+ async fetchNewBuyDetail (data = {} , header = {}){
+ return await Http.get(
+ HttpConfig.basePath,
+ HttpConfig.serviceUrl.newInStore.fetchNewBuyDetail,
+ data,
+ header
+ )
+ },
+ async subNewBuy (data = {} , header = {}){
+ return await Http.post(
+ HttpConfig.basePath,
+ HttpConfig.serviceUrl.newInStore.subNewBuy,
+ data,
+ header
+ )
+ },
+}
+
const fetchMaterialOutStore = {
async fetchInfoByCode (data = {} , header = {}){
return await Http.get(
@@ -305,6 +348,30 @@ const fix = {
header
)
},
+ async fixCrew (data = {} , header = {}){
+ return await Http.get(
+ HttpConfig.basePath,
+ HttpConfig.serviceUrl.fix.fixCrew,
+ data,
+ header
+ )
+ },
+ async maList (data = {} , header = {}){
+ return await Http.get(
+ HttpConfig.basePath,
+ HttpConfig.serviceUrl.fix.maList,
+ data,
+ header
+ )
+ },
+ async fixFactory (data = {} , header = {}){
+ return await Http.get(
+ HttpConfig.basePath,
+ HttpConfig.serviceUrl.fix.fixFactory,
+ data,
+ header
+ )
+ },
}
const repairTestInStore = {
@@ -460,6 +527,7 @@ export default{
user,
fetchMaterial,
fetchExam,
+ newInStore,
fetchMaterialOutStore,
exitMaterial,
fix,
diff --git a/apis/http.js b/apis/http.js
index a4aa232..c6885ae 100644
--- a/apis/http.js
+++ b/apis/http.js
@@ -4,24 +4,23 @@ class HttpConfig {
// #endif
// #ifdef APP-PLUS
// baseUrl = "http://112.29.103.165:21624"
- baseUrl = "http://10.40.92.219:8080"
+ // baseUrl = "http://10.40.92.219:8080"
+ baseUrl = "http://10.40.92.16"
// #endif
// 演示基地址
- authPath = `${this.baseUrl}/auth`
+ /* authPath = `${this.baseUrl}/auth`
systemPath = `${this.baseUrl}/system`
basePath = `${this.baseUrl}/base`
- materialPath = `${this.baseUrl}/material`
+ materialPath = `${this.baseUrl}/material` */
+ authPath = `${this.baseUrl}:9200`
+ systemPath = `${this.baseUrl}:9201`
+ basePath = `${this.baseUrl}:9301`
+ materialPath = `${this.baseUrl}:9302`
// 14服务器
/* authPath = 'http://192.168.0.14:21624/auth'
systemPath = 'http://192.168.0.14:21624/system'
basePath = 'http://192.168.0.14:21624/base'
materialPath = 'http://192.168.0.14:21624/material' */
-
- /*
- 调试ip
- 刘川:10.40.92.209
- 丁杰:
- */
//基地址
/* authPath = 'http://169.254.91.222:9200'
systemPath = 'http://169.254.91.222:9201'
@@ -31,6 +30,8 @@ class HttpConfig {
serviceUrl = {
login: {
code: '/sendCode', // 获取验证码
+ checkCode: '/checkCode', // 验证码登录
+ log: '/login', // 账户登录
},
user: {
logOut: '/logout', // 退出登录
@@ -76,7 +77,9 @@ class HttpConfig {
subExitExam: '/back_apply/audit', // 提交单个审核
},
newInStore: {
-
+ fetchNewInStoreList: '/purchaseInput/list', // 获取新购入库列表
+ fetchNewBuyDetail: '/purchaseInput/putinDetails', // 获取新购入库详情
+ subNewBuy: '/purchaseInput/manageStatus', // 新购明细提交审核
},
fix: {
fixList: '/repair/getAppRepairTaskList', // 获取维修列表
@@ -84,6 +87,9 @@ class HttpConfig {
fixExam: '/repair/endRepairTask', // 提交维修审核
completeFix: '/repair/completeRepair', // 维修完成
submitFix: '/repair/submitRepairApply', // 提交维修申请
+ fixCrew: '/repair/getUserSelect', // 获取维修人员
+ maList: '/maPartType/list', // 获取配件树
+ fixFactory: '/supplierInfo/getSupplierSelect', // 获取维修厂家
},
repairTestInStore: {
repairTestInStoreList: '/RepairTestInput/getAppRepairedList', // 获取修试后入库列表
@@ -98,8 +104,6 @@ class HttpConfig {
backMaterialSetCodeBack:'backReceive/setCodeBack',
backReceiveCodeQuery:"backReceive/codeQuery",
backReceiveEndBack:"backReceive/endBack",
-
-
},
// 报废审核接口
crashExam: {
diff --git a/pages/backMaterialReceive/backMaterialReceive.vue b/pages/backMaterialReceive/backMaterialReceive.vue
index 760f86b..5403eef 100644
--- a/pages/backMaterialReceive/backMaterialReceive.vue
+++ b/pages/backMaterialReceive/backMaterialReceive.vue
@@ -202,8 +202,8 @@ import { basePath } from '../../public'
// 获取领料出库数据
that.$api.backMaterialReceive.backMaterialReceiveList({
- // companyId: uni.getStorageSync('userInfo').sysUser.companyId
- companyId:'101'
+ companyId: uni.getStorageSync('userInfo').sysUser.companyId
+ // companyId:'101'
}).then(res => {
console.log("fetchMaterialList",res);
if (res.data.code == 200) {
diff --git a/pages/exitExam/exitExam.vue b/pages/exitExam/exitExam.vue
index 0eeee94..1cf0905 100644
--- a/pages/exitExam/exitExam.vue
+++ b/pages/exitExam/exitExam.vue
@@ -14,10 +14,10 @@
-->
- {{ fetch.userName.slice(0, 1) }}
+ {{ fetch.backPerson.slice(0, 1) }}
- {{ fetch.userName }}
+ {{ fetch.backPerson }}
{{ fetch.phone }}
diff --git a/pages/exitMaterial/exitMaterial.vue b/pages/exitMaterial/exitMaterial.vue
index 789eb23..3aaf0a5 100644
--- a/pages/exitMaterial/exitMaterial.vue
+++ b/pages/exitMaterial/exitMaterial.vue
@@ -7,18 +7,14 @@
>
-
+ {{ exit.backPerson.slice(0, 1) }}
- {{ exit.userName }}
- {{ exit.phone }}
+ {{ exit.backPerson }}
+ {{ exit.unitName }}
-
- 退料单位
- {{ exit.unitName }}
-
退料工程
{{ exit.lotName }}
@@ -27,6 +23,10 @@
退料类型
{{ exit.typeName }}
+
+ 联系方式
+ {{ exit.phone }}
+
预约时间
{{ exit.backTime }}
@@ -44,7 +44,7 @@
修改
@@ -80,6 +80,12 @@
+
+
+
+
+
+
-
+
+
+
@@ -113,9 +121,12 @@ import { basePath } from '../../public'
data() {
return {
exitFormData: {
+ backPerson: '',
+ phone: '',
unitId: '',
lotId: '',
- exitTime: ''
+ exitTime: '',
+ remark: ''
},
deptRange: [
@@ -124,6 +135,22 @@ import { basePath } from '../../public'
],
rules: {
+ backPerson: {
+ rules: [
+ {
+ required: true,
+ errorMessage: '请输入退料人!'
+ }
+ ]
+ },
+ phone: {
+ rules: [
+ {
+ required: true,
+ errorMessage: '请输入退料人电话!'
+ }
+ ]
+ },
unitId: {
rules: [
{
@@ -160,10 +187,12 @@ import { basePath } from '../../public'
agreementId: '',
unitId: '',
unitName: '',
- agreementName: '',
+ // agreementName: '',
lotId: '',
- phone: uni.getStorageSync('userInfo').sysUser.phonenumber,
- backTime: ''
+ phone: '',
+ backTime: '',
+ backPerson: '',
+ remark: ''
},
fetchedList: []
}
@@ -199,22 +228,24 @@ import { basePath } from '../../public'
formSubmit () {
let that = this
that.$refs.exitForm.validate().then(formData => {
-
that.$refs.popup.close()
// 判断单位id和工程id是否匹配
that.$api.exitMaterial.ifAgreement({
unitId: formData.unitId,
projectId: formData.lotId
- }, null).then(res => {
+ }).then(res => {
console.log(res);
if (res.data.code == 200) {
if (res.data.data.agreementId != null) {
that.newAdd.agreementId = res.data.data.agreementId
+ that.newAdd.backPerson = formData.backPerson
+ that.newAdd.phone = formData.phone
that.newAdd.unitId = formData.unitId
that.newAdd.lotId = formData.lotId
that.newAdd.backTime = formData.exitTime
+ that.newAdd.remark = formData.remark
console.log(that.newAdd);
- that.$api.exitMaterial.newExitList(that.newAdd, null).then(res => {
+ that.$api.exitMaterial.newExitList(that.newAdd).then(res => {
console.log(res);
if (res.data.code == 200) {
uni.showToast({
@@ -228,7 +259,7 @@ import { basePath } from '../../public'
})
}
}).catch(err => {
- throw err
+ console.log(err);
})
}
}
@@ -242,9 +273,9 @@ import { basePath } from '../../public'
url: `/pages/exitMaterialDetail/exitMaterialDetail?id=${id}&typeId=${typeId}`
})
},
- chooseMaterial (agreeId) {
+ chooseMaterial (agreeId, id) {
uni.navigateTo({
- url: `/pages/exitMaterialSelect/exitMaterialSelect?agreeId=${agreeId}`
+ url: `/pages/exitMaterialSelect/exitMaterialSelect?agreeId=${agreeId}&id=${id}`
})
},
delOffer (id) {
@@ -276,7 +307,7 @@ import { basePath } from '../../public'
})
}
}).catch(err => {
- throw err
+ console.log(err);
})
}
}
@@ -305,6 +336,7 @@ import { basePath } from '../../public'
// 初始化获取退料单位,退料工程列表
that.$api.fetchMaterial.getDeptList().then(res => {
if (res.data.code == 200) {
+ console.log(res);
that.fetchedList = res.data.data
that.deptRange = res.data.data.map((item) => {
return {
@@ -421,7 +453,7 @@ import { basePath } from '../../public'
}
.popup{
width: 80vw;
- height: 60vh;
+ height: 90vh;
background-color: #fff;
border-radius: 15rpx;
overflow: hidden;
diff --git a/pages/exitMaterialDetail/exitMaterialDetail.vue b/pages/exitMaterialDetail/exitMaterialDetail.vue
index d59838c..d62f100 100644
--- a/pages/exitMaterialDetail/exitMaterialDetail.vue
+++ b/pages/exitMaterialDetail/exitMaterialDetail.vue
@@ -1,7 +1,7 @@
-
+
diff --git a/pages/exitMaterialSelect/exitMaterialSelect.vue b/pages/exitMaterialSelect/exitMaterialSelect.vue
index 9239eb1..cd12219 100644
--- a/pages/exitMaterialSelect/exitMaterialSelect.vue
+++ b/pages/exitMaterialSelect/exitMaterialSelect.vue
@@ -1,7 +1,7 @@
-
+
@@ -54,7 +54,11 @@ import { basePath } from '../../public';
],
totalFine: '',
cartList: [],
- agreementId: ''
+ agreementId: '',
+ submitList: {
+ parentId: '',
+ backApplyDetails: ''
+ }
}
},
computed: {
@@ -140,32 +144,50 @@ import { basePath } from '../../public';
that.cartList = that.list.filter((item) => {
return item.checked == true
})
- console.log(this.cartList);
if (that.cartList.length == 0) {
uni.showToast({
icon: 'none',
title: '请选择退料项!'
})
} else {
- let subList = []
- let typeList = []
- for (let i = 0; i < that.cartList.length; i++) {
- subList.push(that.cartList[i].offNum)
- }
- for (let i = 0; i < that.cartList.length; i++) {
- typeList.push(that.cartList[i].typeId)
- }
- subList = subList.join(',')
- typeList = typeList.join(',')
- console.log(subList, typeList);
- // 提交退料清单
- that.$api.exitMaterial.subExitMaterial({
- typeId: typeList,
- num: subList
- }, null).then(res => {
- console.log(res);
- }).catch(err => {
- console.log(err);
+ uni.showModal({
+ title: '退料选择',
+ content: '确认提交吗?',
+ confirmText: '提交',
+ success: (modalRes) => {
+ if (modalRes.confirm) {
+ console.log(this.cartList);
+ that.submitList.backApplyDetails = that.cartList.map((item) => {
+ return {
+ typeId: item['typeId'],
+ preNum: item['offNum'],
+ createBy: uni.getStorageSync('userInfo').userid,
+ companyId: item['companyId']
+ }
+ })
+ console.log(that.submitList);
+ // 提交退料清单
+ that.$api.exitMaterial.subExitMaterial(that.submitList).then(res => {
+ console.log(res);
+ if (res.data.code == 200) {
+ uni.showToast({
+ icon: 'none',
+ title: res.data.msg,
+ success: () => {
+ uni.navigateBack()
+ }
+ })
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: res.data.msg
+ })
+ }
+ }).catch(err => {
+ console.log(err);
+ })
+ }
+ }
})
}
}
@@ -174,10 +196,11 @@ import { basePath } from '../../public';
let that = this
console.log(params);
that.agreementId = params.agreeId
+ that.submitList.parentId = params.id
// 退料物料选择
that.$api.exitMaterial.selectMaterial({
agreementId: params.agreeId
- }, null).then(res => {
+ }).then(res => {
console.log(res);
if (res.data.code == 200) {
for (let i = 0; i < res.data.data.length; i++) {
@@ -188,7 +211,6 @@ import { basePath } from '../../public';
that.list = res.data.data
}
}).catch(err => {
- // throw err
console.log(err);
})
}
@@ -197,6 +219,11 @@ import { basePath } from '../../public';