This commit is contained in:
2025-09-10 11:05:41 +08:00
parent 6f7e10fa3f
commit eae62dfc4c
4 changed files with 261 additions and 171 deletions

View File

@@ -405,6 +405,13 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
} }
,{
"path" : "pages/Material/hw-check",
"style" :
{
"navigationStyle": "custom"
}
}
,{ ,{
"path" : "pages/General/warehouse-box", "path" : "pages/General/warehouse-box",
"style" : "style" :

View File

@@ -11,6 +11,7 @@
<view class="zd-col-24 filter_select"> <view class="zd-col-24 filter_select">
<search-box <search-box
v-model="val1" v-model="val1"
@handleChange="handleChange"
/> />
</view> </view>
</view> </view>
@@ -34,18 +35,18 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.task_code === pkId}"> <tr v-for="(e, i) in dataList" :key="i">
<td>{{i+1}}</td> <td>{{i+1}}</td>
<td>{{e.task_type}}</td> <td>{{e.struct_code}}</td>
<td>{{e.task_code}}</td> <td>{{e.storagevehicle_code}}</td>
<td>{{e.vehicle_code}}</td> <td>{{e.material_code}}</td>
<td>{{e.status}}</td> <td>{{e.material_name}}</td>
<td>{{e.point_code1}}</td> <td>{{e.pcsn}}</td>
<td>{{e.point_code2}}</td> <td>{{e.qty}}</td>
<td>{{e.create_time}}</td> <td>{{e.produce_time}}</td>
<td>{{e.create_time}}</td> <td>{{e.supp_code}}</td>
<td>{{e.create_time}}</td> <td>{{e.supp_name}}</td>
<td>{{e.create_time}}</td> <td>{{e.bake_num}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -61,7 +62,8 @@
</view> </view>
<view class="zd-col-24 filter_select"> <view class="zd-col-24 filter_select">
<search-box <search-box
v-model="val1" v-model="val2"
@handleChange="handleChange2"
/> />
</view> </view>
</view> </view>
@@ -85,27 +87,26 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="(e, i) in dataList2" :key="i" @click="toCheck(e)" :class="{'checked': e.task_code === pkId}"> <tr v-for="(e, i) in dataList2" :key="i">
<td>{{i+1}}</td> <td>{{i+1}}</td>
<td>{{e.task_type}}</td> <td>{{e.struct_code}}</td>
<td>{{e.task_code}}</td> <td>{{e.storagevehicle_code}}</td>
<td>{{e.vehicle_code}}</td> <td>{{e.material_code}}</td>
<td>{{e.status}}</td> <td>{{e.material_name}}</td>
<td>{{e.point_code1}}</td> <td>{{e.pcsn}}</td>
<td>{{e.point_code2}}</td> <td>{{e.qty}}</td>
<td>{{e.create_time}}</td> <td>{{e.produce_time}}</td>
<td>{{e.create_time}}</td> <td>{{e.supp_code}}</td>
<td>{{e.create_time}}</td> <td>{{e.supp_name}}</td>
<td>{{e.create_time}}</td> <td>{{e.bake_num}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</view> </view>
</view> </view>
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
</view> </view>
<view class="zd-row submit-bar"> <view class="zd-row submit-bar">
<button class="zd-col-16 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="toSure('80')">确认移库</button> <button class="zd-col-16 button-primary" :class="{'button-info': !dataList.length || !dataList2.length}" :disabled="disabled" @tap="_materialBoxMoveConfirm">确认移库</button>
<!-- <button class="zd-col-6 button-primary" @tap="searchList">查询</button> --> <!-- <button class="zd-col-6 button-primary" @tap="searchList">查询</button> -->
</view> </view>
</view> </view>
@@ -114,7 +115,7 @@
<script> <script>
import NavBar from '@/components/NavBar.vue' import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue' import SearchBox from '@/components/SearchBox.vue'
import {getStatusEnum, schBaseTask, saveCheckTask} from '@/utils/getData2.js' import {getMoveDocumentInfo, materialBoxMoveConfirm} from '@/utils/getData1.js'
export default { export default {
components: { components: {
NavBar, NavBar,
@@ -127,17 +128,7 @@
val2: '', val2: '',
dataList: [], dataList: [],
dataList2: [], dataList2: [],
pkId: '', mdid: '',
reload: false,
status: 'more',
contentText: {
contentdown: '查看更多',
contentrefresh: '加载中',
contentnomore: '没有更多'
},
totalCount: 0,
pageNum: 1,
pageSize: 10,
disabled: false disabled: false
}; };
}, },
@@ -145,64 +136,60 @@
this.title = options.title this.title = options.title
}, },
methods: { methods: {
searchList () { handleChange (e) {
if (e) {
this.dataList = [] this.dataList = []
this.pageNum = 1 this._getMoveDocumentInfo()
this._schBaseTask() }
}, },
async _schBaseTask () { handleChange2 (e) {
let res = await schBaseTask(this.pageNum + '', this.pageSize + '', this.index, this.val1) if (e && !this.mdid && this.dataList.length) {
if (res.code === '200') { this.dataList2 = []
this.totalCount = res.totalElements this._getMoveDocumentInfo2()
if (res.totalElements > 0) { }
const dataMap = res.content },
this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap) async _getMoveDocumentInfo () {
this.reload = false try {
let res = await getMoveDocumentInfo('1', this.val1, this.mdid)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
this.mdid = ths.dataList[0].moveinvdtl_id
if (this.dataList.length && this.mdid) {
this._getMoveDocumentInfo2()
}
} else { } else {
this.dataList = [] this.dataList = []
} }
if (this.totalCount == this.dataList.length) { } catch (e) {
this.reload = false this.dataList = []
this.status = 'noMore'
}
} }
}, },
onReachBottom () { async _getMoveDocumentInfo2 () {
if (this.totalCount > this.dataList.length) { try {
this.status = 'loading' let res = await getMoveDocumentInfo('2', this.val2, this.mdid)
setTimeout(() => { if (res && res.data.length > 0) {
this.pageNum++ this.dataList2 = [...res.data]
this._schBaseTask() } else {
}, 1000) this.dataList2 = []
} else { //停止加载 }
this.status = 'noMore' } catch (e) {
this.dataList2 = []
} }
}, },
toCheck (e) { async _materialBoxMoveConfirm () {
this.pkId = e.e.task_code === this.pkId ? '' : e.task_code
},
async toSure (status) {
this.disabled = true this.disabled = true
if (!this.pkId) { if (!this.dataList.length || !this.dataList2.length) {
this.disabled = false this.disabled = false
return return
} }
try { try {
let res = await saveCheckTask(this.pkId, status) let res = await materialBoxMoveConfirm(this.dataList, this.dataList2)
if (res.code === '200') { if (res) {
this.index = ''
this.val1 = ''
this.dataList = []
this.pkId = ''
uni.showToast({ uni.showToast({
title: res.desc, title: res.message,
icon: 'none'
})
} else {
uni.showToast({
title: res.desc,
icon: 'none' icon: 'none'
}) })
this.clearUp()
} }
this.disabled = false this.disabled = false
} catch (e) { } catch (e) {

View File

@@ -1,18 +1,17 @@
<template> <template>
<view class="zd_container"> <view class="zd_container">
<!-- 大料箱 - 大料箱 --> <!-- 大料箱 - 大料箱 -->
<nav-bar :title="title"></nav-bar> <nav-bar :title="title"></nav-bar>
<view class="zd_content"> <view class="zd_content">
<view class="zd_wrapper"> <view class="zd_wrapper">
<view class="zd-row border-bottom"> <view class="zd-row border-bottom">
<view class="zd-col-7"> <view class="zd-col-5">
<span class="filter_label">单据</span> <span class="filter_label">单据</span>
</view> </view>
<view class="zd-col-24 filter_select"> <view class="zd-col-14">
<search-box <input type="text" placeholder="输入物料关键字" class="filter_input" v-model="keyword">
v-model="val1"
/>
</view> </view>
<button class="mini-btn" type="primary" size="mini" @tap="_getCheckDocumentInfo">查询</button>
</view> </view>
</view> </view>
<view class="zd_wrapper grid-wraper"> <view class="zd_wrapper grid-wraper">
@@ -36,30 +35,28 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.task_code === pkId}"> <tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.check_id === pkId}" @tap="toCheck(e)">
<td>{{i+1}}</td> <td>{{i+1}}</td>
<td>{{e.task_type}}</td> <td>{{e.check_result}}</td>
<td>{{e.task_type}}</td> <td>{{e.struct_code}}</td>
<td>{{e.task_code}}</td> <td>{{e.storagevehicle_code}}</td>
<td>{{e.vehicle_code}}</td> <td>{{e.material_code}}</td>
<td>{{e.status}}</td> <td>{{e.material_name}}</td>
<td>{{e.point_code1}}</td> <td>{{e.pcsn}}</td>
<td>{{e.point_code2}}</td> <td>{{e.base_qty}}</td>
<td>{{e.create_time}}</td> <td>{{e.fac_qty}}</td>
<td>{{e.create_time}}</td> <td>{{e.produce_time}}</td>
<td>{{e.create_time}}</td> <td>{{e.supp_code}}</td>
<td>{{e.create_time}}</td> <td>{{e.supp_name}}</td>
<td>{{e.create_time}}</td> <td>{{e.bake_num}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</view> </view>
</view> </view>
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
</view> </view>
<view class="zd-row submit-bar"> <view class="zd-row submit-bar">
<button class="zd-col-16 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="toSure('80')">扫码盘点</button> <button class="zd-col-24 button-primary" :class="{'button-info': !pkId}" @tap="toSure">扫码盘点</button>
<button class="zd-col-6 button-primary" @tap="searchList">查询</button>
</view> </view>
</view> </view>
</template> </template>
@@ -67,7 +64,8 @@
<script> <script>
import NavBar from '@/components/NavBar.vue' import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue' import SearchBox from '@/components/SearchBox.vue'
import {getStatusEnum, schBaseTask, saveCheckTask} from '@/utils/getData2.js' import {getDate} from '@/utils/utils.js'
import {getCheckDocumentInfo} from '@/utils/getData1.js'
export default { export default {
components: { components: {
NavBar, NavBar,
@@ -76,89 +74,39 @@
data() { data() {
return { return {
title: '', title: '',
val1: '', keyword: '',
val2: '',
dataList: [], dataList: [],
pkId: '', pkId: '',
reload: false, pkObj: {}
status: 'more',
contentText: {
contentdown: '查看更多',
contentrefresh: '加载中',
contentnomore: '没有更多'
},
totalCount: 0,
pageNum: 1,
pageSize: 10,
disabled: false
}; };
}, },
onLoad (options) { onLoad (options) {
this.title = options.title this.title = options.title
this._getCheckDocumentInfo()
}, },
methods: { methods: {
searchList () { async _getCheckDocumentInfo () {
this.dataList = [] try {
this.pageNum = 1 let res = await getCheckDocumentInfo(this.keyword, '1')
this._schBaseTask() if (res && res.data.length > 0) {
}, this.dataList = [...res.data]
async _schBaseTask () {
let res = await schBaseTask(this.pageNum + '', this.pageSize + '', this.index, this.val1)
if (res.code === '200') {
this.totalCount = res.totalElements
if (res.totalElements > 0) {
const dataMap = res.content
this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap)
this.reload = false
} else { } else {
this.dataList = [] this.dataList = []
} }
if (this.totalCount == this.dataList.length) { } catch (e) {
this.reload = false this.dataList = []
this.status = 'noMore'
}
}
},
onReachBottom () {
if (this.totalCount > this.dataList.length) {
this.status = 'loading'
setTimeout(() => {
this.pageNum++
this._schBaseTask()
}, 1000)
} else { //停止加载
this.status = 'noMore'
} }
}, },
toCheck (e) { toCheck (e) {
this.pkId = e.e.task_code === this.pkId ? '' : e.task_code this.pkId = this.pkId === e.check_id ? '' : e.check_id
this.pkObj = this.pkId === e.check_id ? e : {}
}, },
async toSure (status) { toSure () {
this.disabled = true if (this.pkId) {
if (!this.pkId) { this.$store.dispatch('setPublicObj', this.pkObj)
this.disabled = false uni.navigateTo({
return url: 'pages/Material/hw-check'
}
try {
let res = await saveCheckTask(this.pkId, status)
if (res.code === '200') {
this.index = ''
this.val1 = ''
this.dataList = []
this.pkId = ''
uni.showToast({
title: res.desc,
icon: 'none'
}) })
} else {
uni.showToast({
title: res.desc,
icon: 'none'
})
}
this.disabled = false
} catch (e) {
this.disabled = false
} }
} }
} }

148
pages/Material/hw-check.vue Normal file
View File

@@ -0,0 +1,148 @@
<template>
<view class="zd_container">
<!-- 大料箱盘库 - 货位盘点 -->
<nav-bar :title="title"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label filter_input_disabled">单据号</span>
</view>
<view class="zd-col-18">
<input type="text" class="filter_input filter_input_disabled" v-model="materialData.check_code" disabled>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">点位/载具</span>
</view>
<view class="zd-col-17">
<search-box
v-model="val1"
@handleChange="handleChange"
/>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label filter_input_disabled">点位</span>
</view>
<view class="zd-col-18">
<input type="text" class="filter_input filter_input_disabled" v-model="materialData.struct_code" disabled>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label filter_input_disabled">物料编码</span>
</view>
<view class="zd-col-18">
<input type="text" class="filter_input filter_input_disabled" v-model="materialData.material_code" disabled>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label filter_input_disabled">物料名称</span>
</view>
<view class="zd-col-18">
<input type="text" class="filter_input filter_input_disabled" v-model="materialData.material_name" disabled>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label">库存数量</span>
</view>
<view class="zd-col-16">
<input type="number" v-model="materialData.qty1" class="filter_input" disabled>
</view>
<view class="zd-col-2"><span class="filter_unit">KG</span></view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label">盘点数量</span>
</view>
<view class="zd-col-16">
<input type="number" v-model="materialData.fac_qty" class="filter_input">
</view>
<view class="zd-col-2"><span class="filter_unit">KG</span></view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-24 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_materialBoxInventoryConfirm">确认盘点</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {getInvInfoQty, materialBoxInventoryConfirm} from '@/utils/getData1.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
val1: '',
materialData: {},
disabled: false
};
},
onLoad (options) {
this.title = options.title
},
onShow () {
if (this.$store.getters.publicObj !== '') {
this.materialData = this.$store.getters.publicObj
this.$store.dispatch('setPublicObj', '')
}
},
methods: {
handleChange (e) {
if (e) {
this._getInvInfoQty()
}
},
clearUp () {
this.val1 = ''
this.disabled = false
},
async _getInvInfoQty () {
let res = await getInvInfoQty(this.val1)
this.materialData.qty1 = res.data.base_qty
this.materialData.fac_qty = res.data.base_qty
},
async _materialBoxInventoryConfirm () {
this.disabled = true
if (!this.val1) {
this.disabled = false
return
}
try {
let res = await materialBoxInventoryConfirm(this.materialData)
if (res.code === '200') {
uni.showToast({
title: res.message,
icon: 'none'
})
this.clearUp()
} else {
uni.showToast({
title: res.message,
icon: 'none'
})
this.disabled = false
}
} catch (e) {
this.disabled = false
}
}
}
}
</script>
<style lang="stylus">
</style>