This commit is contained in:
FrancisHu 2023-12-24 14:19:53 +08:00
parent 0fbec51bc1
commit 002fa5b02b
13 changed files with 275 additions and 76 deletions

25
.gitignore vendored Normal file
View File

@ -0,0 +1,25 @@
.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
**/*.log
tests/**/coverage/
tests/e2e/reports
selenium-debug.log
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.local
package-lock.json
yarn.lock
unpackage/

View File

@ -257,7 +257,7 @@ const repairTestInStore = {
const backMaterialReceive = {
async backMaterialReceiveList (data = {} , header = {}){
return await Http.post(
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backMaterialReceiveList,
data,
@ -272,6 +272,19 @@ const backMaterialReceive = {
header
)
},
async backMaterialSetNumBack (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backMaterialSetNumBack,
data,
header
)
},
fetchMaterialOutStore
}
export {

View File

@ -1,17 +1,21 @@
class HttpConfig{
// 演示基地址
authPath = 'http://112.29.103.165:21624/auth'
systemPath = 'http://112.29.103.165:21624/system'
basePath = 'http://112.29.103.165:21624/base'
materialPath = 'http://112.29.103.165:21624/material'
// 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' */
class HttpConfig {
// #ifdef H5
baseUrl = "/api"
// #endif
// #ifdef APP-PLUS
baseUrl = "http://112.29.103.165:21624"
// #endif
// 演示基地址
authPath = `${this.baseUrl}/auth`
systemPath = `${this.baseUrl}/system`
basePath = `${this.baseUrl}/base`
materialPath = `${this.baseUrl}/material`
// 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
@ -24,8 +28,8 @@ class HttpConfig{
materialPath = 'http://169.254.91.222:9302' */
// 短链
serviceUrl = {
login:{
code: '/sendCode',// 获取验证码
login: {
code: '/sendCode', // 获取验证码
},
user: {
logOut: '/logout', // 退出登录
@ -50,7 +54,7 @@ class HttpConfig{
exitMaterial: {
exitDeptList: '/back_apply/getbackUnit', // 获取退料单位,工程列表
exitMaterialList: '/back_apply/getbackList', // 获取机具退料列表
exitMaterialDetail: '/back_apply/view' ,// 获取退料设备详情
exitMaterialDetail: '/back_apply/view', // 获取退料设备详情
subExitMaterial: '/back_apply/upload', // 提交退料清单
delMaterial: '/back_apply/del', // 删除退料申请
newExitList: '/back_apply/addBackTask', // 新建退料任务单
@ -63,7 +67,7 @@ class HttpConfig{
subExitExam: '/back_apply/audit', // 提交单个审核
},
newInStore: {
},
fix: {
fixList: '/repair/getAppRepairTaskList', // 获取维修列表
@ -77,7 +81,8 @@ class HttpConfig{
},
backMaterialReceive: {
backMaterialReceiveList: '/backReceive/getbackReceiveList', // 获取退料接收列表
backMaterialReceiveDetail: '/backReceive/receiveView'
backMaterialReceiveDetail: '/backReceive/receiveView',
backMaterialSetNumBack: '/backReceive/setNumBack',
}
}
}

View File

@ -72,5 +72,18 @@
"uniStatistics" : {
"enable" : false
},
"h5" : {
"devServer":{
"proxy":{
"^/api":{
"target":"http://112.29.103.165:21624",
"ws": true,
"changeOrigin": true,
"pathRewrite":{"^/api":""}
}
}
}
},
"vueVersion" : "2"
}

View File

@ -1,5 +1,6 @@
{
"dependencies": {
"qs": "^6.11.2",
"uni-read-pages": "^1.0.5",
"uni-simple-router": "^2.0.8-beta.4"
}

View File

@ -368,7 +368,8 @@
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
"backgroundColor": "#F8F8F8",
"maxWidth": 750
},
"uniIdRouter": {}
}

View File

@ -62,9 +62,9 @@
</view>
</view> -->
<view class="sticky-area">
<image src="/static/passed.png" v-show="fetch.taskStatus == '40'" mode=""></image>
<image src="/static/passed.png" v-show="fetch.taskStatus == '38'" mode=""></image>
<!-- <image src="/static/noPass.png" v-show="fetch.status == '1'" mode=""></image> -->
<image src="/static/noPass.png" v-show="fetch.taskStatus != '40'" mode=""></image>
<image src="/static/noPass.png" v-show="fetch.taskStatus == '40'" mode=""></image>
</view>
</view>
<!-- <view class="btm-sticky">
@ -200,12 +200,15 @@ import { basePath } from '../../public'
let that = this
// console.log(uni.getStorageSync('userInfo').sysUser.companyId);
//
that.$api.backMaterialReceive.backMaterialReceiveList({
companyId: uni.getStorageSync('userInfo').sysUser.companyId
// companyId: uni.getStorageSync('userInfo').sysUser.companyId
companyId:'101'
}).then(res => {
console.log(res);
console.log("fetchMaterialList",res);
if (res.data.code == 200) {
that.fetchMaterialList = res.data.data
console.log("fetchMaterialList",that.fetchMaterialList)
}
}).catch(err => {
console.log(err);

View File

@ -103,6 +103,7 @@
</template>
<script>
import QS from "qs"
export default {
data() {
return {
@ -132,8 +133,33 @@
if (this.infoList.manageType == '0') {
this.$refs.popup1.open()
} else if (this.infoList.manageType == '1') {
const userInfo = uni.getStorageSync('userInfo');
console.log("userInfo",userInfo)
const userId = userInfo.userid
const {
taskId,
id,
typeId,
manageType,
typeName,
typeCode,
num
}=this.infoList
const params = {
taskId ,
id,
typeId,
manageType,
userId,
typeName,
typeCode,
num
}
const urlStr = QS.stringify(params)
console.log("urlSTR",urlStr)
uni.navigateTo({
url: `/pages/numReceive/numReceive?parentId=${this.infoList.id}&typeName=${this.infoList.typeName}&typeCode=${this.infoList.typeCode}&num=${this.infoList.num}`
url: `/pages/numReceive/numReceive?${urlStr}`
})
}
},

View File

@ -28,7 +28,7 @@
>
<view>
<span>领料申请单位</span>
<h4>{{ fetch.deptName }}</h4>
<h4>{{ fetch.unitName }}</h4>
</view>
<view>
<span>领料申请工程</span>
@ -44,7 +44,7 @@
</view>
<view>
<span>申请时间</span>
<h4>{{ fetch.createTime }}</h4>
<h4>{{ fetch.updateTimes }}</h4>
</view>
</view>
<!-- <view class="fetch-btns">
@ -205,14 +205,12 @@ import { basePath } from '../../public'
onShow() {
let that = this
//
that.$api.fetchExam.fetchExamList({}, null).then(res => {
console.log(res);
that.$api.fetchExam.fetchExamList().then(res => {
if (res.data.code == 200) {
that.fetchMaterialList = res.data.data.rows.filter((item) => {
return item.taskStatus == 33 || item.taskStatus == 34 || item.taskStatus == 35
})
}
console.log(that.fetchMaterialList);
}).catch(err => {
})

View File

@ -16,7 +16,7 @@
</view>
<view>
<span>待出库数量</span>
<h4>{{ fetch.preNum }}</h4>
<h4>{{ fetch.outNum }}</h4>
</view>
</view>
<uni-popup
@ -72,11 +72,11 @@
</view>
<view>
<h4>待出库数量</h4>
<span>{{ infoList.preNum }}</span>
<span>{{ infoList.outNum }}</span>
</view>
<view>
<h4>出库数量</h4>
<uni-number-box v-model="multiNum" :min="1" :max="infoList.preNum"/>
<uni-number-box v-model="multiNum" @change="multiNumChange" :min="1" :max="infoList.outNum"/>
</view>
</view>
<view
@ -101,7 +101,8 @@
manageType: '',
infoList: '',
multiNum: 1,
subList: {}
subList: {},
taskId:null
}
},
methods: {
@ -146,17 +147,15 @@
outNum: that.multiNum,
companyId: uni.getStorageSync('userInfo').sysUser.companyId
}
console.log(that.subList);
that.$api.fetchMaterialOutStore.subOutStore(that.subList, null).then(res => {
console.log(res);
that.$api.fetchMaterialOutStore.subOutStore(that.subList).then(res => {
if (res.data.code == 200) {
uni.showToast({
icon: 'none',
title: res.data.msg,
title: '出库成功',
duration:2000,
success: () => {
uni.redirectTo({
url: '/pages/fetchMaterialOutStoreDetail/fetchMaterialOutStoreDetail'
})
this.$refs.popup2.close()
that.init()
}
})
} else {
@ -168,28 +167,40 @@
}).catch(err => {
console.log(err);
})
}
},
onLoad(params) {
let that = this
console.log(params.taskId);
//
that.$api.fetchExam.fetchExamList({
taskId: params.taskId
}, null).then(res => {
console.log(res);
},
async init(){
const that = this
const params = {
taskId:this.taskId
}
const res = await that.$api.fetchExam.fetchExamList(params)
that.fetchList = []
if (res.data.code == 200) {
for (let i = 0; i < res.data.data.rows[0].leaseApplyInfoList.length; i++) {
for (let k = 0; k < res.data.data.rows[0].leaseApplyInfoList[i].leaseApplyDetails.length; k++) {
that.fetchList.push(res.data.data.rows[0].leaseApplyInfoList[i].leaseApplyDetails[k])
}
}
console.log(that.fetchList);
console.log('获取详情 ===========================',that.fetchList);
// that.fetchList[1].manageType = 1
}
}).catch(err => {
console.log(err);
})
},
multiNumChange(val){
console.log('multiNumChange ===============',val);
}
},
onLoad(params) {
let that = this
if(params && params.taskId){
this.taskId = params.taskId
this.init()
}
}
}
</script>

View File

@ -3,7 +3,7 @@
<view class="search">
<view class="searchIput">
<input type="text" placeholder="输入你要搜索的内容" placeholder-style='color:grey' v-model="inputs">
<image src='@/static/search.png' />
<!-- <image src='@/static/search.png' /> -->
</view>
</view>
<view class="dataInfo">

View File

@ -18,7 +18,7 @@
<uni-easyinput type="number" v-model="lowerIpt.passedNum" placeholder="请输入数量"></uni-easyinput>
</view>
<view>
<h4>待修数量</h4>
<h4>待修数量</h4>
<uni-easyinput type="number" v-model="lowerIpt.waitRepairNum" placeholder="请输入数量"></uni-easyinput>
</view>
<view>
@ -26,10 +26,7 @@
<uni-easyinput type="number" v-model="lowerIpt.waitCrashNum" placeholder="请输入数量"></uni-easyinput>
</view>
</view>
<view
class="sub-btn"
@click="subForm"
>
<view class="sub-btn" @click="subForm">
确认
</view>
</view>
@ -54,9 +51,28 @@
}
},
methods: {
subForm () {
subForm() {
//10
// "taskId": "294",
// {
// "parentId": 34,
// "typeId": "5",
// "backNum": "1",
// "backStatus": "3",// 1 2 2
// "manageType": "1",
// "createBy": "1"
// }
let that = this
that.totalNum = Number(that.lowerIpt.passedNum) + Number(that.lowerIpt.waitRepairNum) + Number(that.lowerIpt.waitCrashNum)
if (!this.lowerIpt.passedNum && !this.lowerIpt.waitRepairNum && !this.lowerIpt.waitCrashNum) {
uni.showToast({
icon: 'none',
title: '!请至少填写一个数据'
})
return
}
that.totalNum = Number(that.lowerIpt.passedNum) + Number(that.lowerIpt.waitRepairNum) + Number(that
.lowerIpt.waitCrashNum)
console.log(that.totalNum);
if (that.totalNum > that.upperInfo.num) {
uni.showToast({
@ -64,42 +80,110 @@
title: '接收总量不能大于退库数量!'
})
} else {
console.log(1);
that.$api.backMaterialReceive.backMaterialSetNumBack({
taskId: this.upperInfo.taskId,
arr: this.handleSubmitData()
}).then(res => {
console.log("res===", res)
uni.showToast({
icon: 'none',
title: '接收成功'
})
setTimeout(() => {
uni.navigateBack()
},
300)
})
}
},
handleSubmitData() {
let list = []
const baseInfo = {
parentId: this.upperInfo.id,
typeId: this.upperInfo.typeId,
manageType: this.upperInfo.manageType,
createBy: this.upperInfo.userId
}
let passInfo = {
backStatus: 1,
backNum: this.lowerIpt.passedNum
}
let repairInfo = {
backStatus: 2,
backNum: this.lowerIpt.waitRepairNum
}
let crashInfo = {
backStatus: 3,
backNum: this.lowerIpt.waitCrashNum
}
if (this.lowerIpt.passedNum) {
let info = {
...baseInfo,
...passInfo
}
list.push(info)
}
if (this.lowerIpt.waitRepairNum) {
let info = {
...baseInfo,
...repairInfo
}
list.push(info)
}
if (this.lowerIpt.waitCrashNum) {
let info = {
...baseInfo,
...crashInfo
}
list.push(info)
}
return list
}
},
onLoad(params) {
console.log(params);
console.log("ev", params);
this.upperInfo = params
}
}
</script>
<style lang="scss">
.form-area{
.form-area {
width: 90%;
margin: 40rpx auto;
display: flex;
flex-direction: column;
view{
view {
width: 100%;
display: flex;
align-items: center;
margin-bottom: 25rpx;
h4{
h4 {
width: 35%;
font-weight: normal;
font-size: 28rpx;
}
span{
span {
font-size: 28rpx;
}
}
view:last-child{
view:last-child {
margin-bottom: 0;
}
}
.sub-btn{
.sub-btn {
width: 80%;
margin: 20vh auto;
box-sizing: border-box;
@ -112,4 +196,4 @@
justify-content: center;
align-items: center;
}
</style>
</style>

View File

@ -3,15 +3,34 @@
阮世耀10.40.92.195
韩遨宇10.40.92.253
*/
// #ifdef H5
const baseUrl = "/api"
// #endif
// #ifdef APP-PLUS
const baseUrl = "http://112.29.103.165:21624"
// #endif
// // #ifdef H5
// authPath = '/api/auth'
// systemPath = '/api/system'
// basePath = '/api/base'
// materialPath = '/api/material'
// // #endif
// // #ifdef APP-PLUS
// authPath = 'http://112.29.103.165:21624/auth'
// systemPath = 'http://112.29.103.165:21624/system'
// basePath = 'http://112.29.103.165:21624/base'
// materialPath = '/material
// // #endif
// auth层
const authPath = 'http://112.29.103.165:21624/auth'
let authPath = `${baseUrl}/auth`
// 公用服务
const systemPath = 'http://112.29.103.165:21624/system'
let systemPath = `${baseUrl}/system`
// base层
const basePath = 'http://112.29.103.165:21624/base'
let basePath = `${baseUrl}/base`
export {
authPath,