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 = { const backMaterialReceive = {
async backMaterialReceiveList (data = {} , header = {}){ async backMaterialReceiveList (data = {} , header = {}){
return await Http.post( return await Http.get(
HttpConfig.basePath, HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backMaterialReceiveList, HttpConfig.serviceUrl.backMaterialReceive.backMaterialReceiveList,
data, data,
@ -272,6 +272,19 @@ const backMaterialReceive = {
header header
) )
}, },
async backMaterialSetNumBack (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backMaterialSetNumBack,
data,
header
)
},
fetchMaterialOutStore
} }
export { export {

View File

@ -1,11 +1,15 @@
class HttpConfig { class HttpConfig {
// #ifdef H5
baseUrl = "/api"
// #endif
// #ifdef APP-PLUS
baseUrl = "http://112.29.103.165:21624"
// #endif
// 演示基地址 // 演示基地址
authPath = 'http://112.29.103.165:21624/auth' authPath = `${this.baseUrl}/auth`
systemPath = 'http://112.29.103.165:21624/system' systemPath = `${this.baseUrl}/system`
basePath = 'http://112.29.103.165:21624/base' basePath = `${this.baseUrl}/base`
materialPath = 'http://112.29.103.165:21624/material' materialPath = `${this.baseUrl}/material`
// 14服务器 // 14服务器
/* authPath = 'http://192.168.0.14:21624/auth' /* authPath = 'http://192.168.0.14:21624/auth'
systemPath = 'http://192.168.0.14:21624/system' systemPath = 'http://192.168.0.14:21624/system'
@ -77,7 +81,8 @@ class HttpConfig{
}, },
backMaterialReceive: { backMaterialReceive: {
backMaterialReceiveList: '/backReceive/getbackReceiveList', // 获取退料接收列表 backMaterialReceiveList: '/backReceive/getbackReceiveList', // 获取退料接收列表
backMaterialReceiveDetail: '/backReceive/receiveView' backMaterialReceiveDetail: '/backReceive/receiveView',
backMaterialSetNumBack: '/backReceive/setNumBack',
} }
} }
} }

View File

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

View File

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

View File

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

View File

@ -62,9 +62,9 @@
</view> </view>
</view> --> </view> -->
<view class="sticky-area"> <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.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> </view>
<!-- <view class="btm-sticky"> <!-- <view class="btm-sticky">
@ -200,12 +200,15 @@ import { basePath } from '../../public'
let that = this let that = this
// console.log(uni.getStorageSync('userInfo').sysUser.companyId); // console.log(uni.getStorageSync('userInfo').sysUser.companyId);
// //
that.$api.backMaterialReceive.backMaterialReceiveList({ that.$api.backMaterialReceive.backMaterialReceiveList({
companyId: uni.getStorageSync('userInfo').sysUser.companyId // companyId: uni.getStorageSync('userInfo').sysUser.companyId
companyId:'101'
}).then(res => { }).then(res => {
console.log(res); console.log("fetchMaterialList",res);
if (res.data.code == 200) { if (res.data.code == 200) {
that.fetchMaterialList = res.data.data that.fetchMaterialList = res.data.data
console.log("fetchMaterialList",that.fetchMaterialList)
} }
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);

View File

@ -103,6 +103,7 @@
</template> </template>
<script> <script>
import QS from "qs"
export default { export default {
data() { data() {
return { return {
@ -132,8 +133,33 @@
if (this.infoList.manageType == '0') { if (this.infoList.manageType == '0') {
this.$refs.popup1.open() this.$refs.popup1.open()
} else if (this.infoList.manageType == '1') { } 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({ 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> <view>
<span>领料申请单位</span> <span>领料申请单位</span>
<h4>{{ fetch.deptName }}</h4> <h4>{{ fetch.unitName }}</h4>
</view> </view>
<view> <view>
<span>领料申请工程</span> <span>领料申请工程</span>
@ -44,7 +44,7 @@
</view> </view>
<view> <view>
<span>申请时间</span> <span>申请时间</span>
<h4>{{ fetch.createTime }}</h4> <h4>{{ fetch.updateTimes }}</h4>
</view> </view>
</view> </view>
<!-- <view class="fetch-btns"> <!-- <view class="fetch-btns">
@ -205,14 +205,12 @@ import { basePath } from '../../public'
onShow() { onShow() {
let that = this let that = this
// //
that.$api.fetchExam.fetchExamList({}, null).then(res => { that.$api.fetchExam.fetchExamList().then(res => {
console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
that.fetchMaterialList = res.data.data.rows.filter((item) => { that.fetchMaterialList = res.data.data.rows.filter((item) => {
return item.taskStatus == 33 || item.taskStatus == 34 || item.taskStatus == 35 return item.taskStatus == 33 || item.taskStatus == 34 || item.taskStatus == 35
}) })
} }
console.log(that.fetchMaterialList);
}).catch(err => { }).catch(err => {
}) })

View File

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

View File

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

View File

@ -26,10 +26,7 @@
<uni-easyinput type="number" v-model="lowerIpt.waitCrashNum" placeholder="请输入数量"></uni-easyinput> <uni-easyinput type="number" v-model="lowerIpt.waitCrashNum" placeholder="请输入数量"></uni-easyinput>
</view> </view>
</view> </view>
<view <view class="sub-btn" @click="subForm">
class="sub-btn"
@click="subForm"
>
确认 确认
</view> </view>
</view> </view>
@ -55,8 +52,27 @@
}, },
methods: { methods: {
subForm() { subForm() {
//10
// "taskId": "294",
// {
// "parentId": 34,
// "typeId": "5",
// "backNum": "1",
// "backStatus": "3",// 1 2 2
// "manageType": "1",
// "createBy": "1"
// }
let that = this 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); console.log(that.totalNum);
if (that.totalNum > that.upperInfo.num) { if (that.totalNum > that.upperInfo.num) {
uni.showToast({ uni.showToast({
@ -64,12 +80,75 @@
title: '接收总量不能大于退库数量!' title: '接收总量不能大于退库数量!'
}) })
} else { } 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) { onLoad(params) {
console.log(params); console.log("ev", params);
this.upperInfo = params this.upperInfo = params
} }
} }
@ -81,24 +160,29 @@
margin: 40rpx auto; margin: 40rpx auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
view { view {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 25rpx; margin-bottom: 25rpx;
h4 { h4 {
width: 35%; width: 35%;
font-weight: normal; font-weight: normal;
font-size: 28rpx; font-size: 28rpx;
} }
span { span {
font-size: 28rpx; font-size: 28rpx;
} }
} }
view:last-child { view:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
} }
.sub-btn { .sub-btn {
width: 80%; width: 80%;
margin: 20vh auto; margin: 20vh auto;

View File

@ -3,15 +3,34 @@
阮世耀10.40.92.195 阮世耀10.40.92.195
韩遨宇10.40.92.253 韩遨宇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层 // 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层 // base层
const basePath = 'http://112.29.103.165:21624/base' let basePath = `${baseUrl}/base`
export { export {
authPath, authPath,