领料修改

This commit is contained in:
wlikett 2023-12-24 14:09:42 +08:00
parent c4c497a65b
commit 9a5a7c7230
3 changed files with 64 additions and 30 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

@ -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>