Browse Source

直接发料,直接补料添加库存余额查询

ljc_0803
lijuncheng 3 months ago
parent
commit
8b45890360
  1. 48
      src/mycomponents/query/balanceQuery.vue
  2. 20
      src/pages.json
  3. 14
      src/pages/issue/record/directIssue.vue
  4. 8
      src/pages/repleinsh/record/directRepleinshRecord.vue

48
src/mycomponents/query/balanceQuery.vue

@ -39,24 +39,24 @@
</view> </view>
<view class="split_line"></view> <view class="split_line"></view>
</view> </view>
<scroll-view scroll-x="true" v-if="tableData.length>0" style="width: 330px; display: flex; align-items: center; justify-content: center; "> <scroll-view scroll-x="true" v-if="tableData.length>0"
<view style="width: 330px; display: flex;justify-content: center; background-color: #fff; padding-bottom: 150rpx;"> style="width: 330px; display: flex; align-items: center; justify-content: center; ">
<view
style="width: 330px; display: flex;justify-content: center; background-color: #fff; padding-bottom: 150rpx;">
<uni-table border stripe emptyText="暂无更多数据"> <uni-table border stripe emptyText="暂无更多数据">
<!-- 表头行 --> <!-- 表头行 -->
<uni-tr> <uni-tr>
<uni-th width="60" style="font-weight: 800;" align="left">序号</uni-th>
<uni-th width="60" align="left">批次</uni-th> <uni-th width="60" align="left">批次</uni-th>
<uni-th width="50" align="left">库位</uni-th> <uni-th width="100" align="left">库位</uni-th>
<uni-th width="60" align="left">状态</uni-th> <uni-th width="60" align="left">状态</uni-th>
<uni-th width="120" align="left">数量</uni-th> <uni-th width="120" align="left">数量</uni-th>
</uni-tr> </uni-tr>
<!-- 表格数据行 --> <!-- 表格数据行 -->
<uni-tr v-for="(item, index) in tableData" :key="index"> <uni-tr v-for="(item, index) in tableData" :key="index">
<uni-td>{{index+1}}</uni-td>
<uni-td>{{item.batch}}</uni-td> <uni-td>{{item.batch}}</uni-td>
<uni-td>{{item.locationCode}}</uni-td> <uni-td>{{item.locationCode}}</uni-td>
<uni-td>{{statusDesc(item.inventoryStatus)}}</uni-td> <uni-td>{{statusDesc(item.inventoryStatus)}}</uni-td>
<uni-td>{{item.qty}}</uni-td> <uni-td>{{item.totalQty}}</uni-td>
</uni-tr> </uni-tr>
</uni-table> </uni-table>
@ -80,6 +80,7 @@
</view> </view>
</uni-drawer> </uni-drawer>
<comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
@ -103,7 +104,7 @@
itemCodeResult: [], itemCodeResult: [],
current: 1, current: 1,
total: 18, total: 18,
tableData:[] tableData: []
// tableData: [{ // tableData: [{
// batch: "20240814", // batch: "20240814",
// locationCode: "901", // locationCode: "901",
@ -213,11 +214,12 @@
selectItemCode(item) { selectItemCode(item) {
this.itemCode = item.code this.itemCode = item.code
this.itemCodeResult = [] this.itemCodeResult = []
this.getBalanceByBusiness(this.itemCode,this.businessTypeCode) this.getBalanceByBusiness(this.itemCode, this.businessTypeCode)
}, },
clearItemCode() { clearItemCode() {
this.itemCode = "" this.itemCode = ""
this.itemCodeResult = [] this.itemCodeResult = []
this.tableData =[]
}, },
onConfirmItemCode() { onConfirmItemCode() {
if (!this.itemCode) { if (!this.itemCode) {
@ -233,12 +235,13 @@
if (res.data && res.data.list.length > 0) { if (res.data && res.data.list.length > 0) {
if (res.data.list.length == 1) { if (res.data.list.length == 1) {
this.itemCode = res.data.list[0].code this.itemCode = res.data.list[0].code
this.getBalanceByBusiness(this.itemCode,this.businessTypeCode) this.getBalanceByBusiness(this.itemCode, this.businessTypeCode)
} else { } else {
uni.hideLoading() uni.hideLoading()
this.itemCodeResult = res.data.list this.itemCodeResult = res.data.list
} }
} else { } else {
uni.hideLoading()
this.showErrorMessage("未查找到物料[" + this.itemCode + "]") this.showErrorMessage("未查找到物料[" + this.itemCode + "]")
} }
@ -247,21 +250,26 @@
this.showErrorMessage(error) this.showErrorMessage(error)
}) })
}, },
getBalanceByBusiness(itemCode,businessType){ getBalanceByBusiness(itemCode, businessType) {
var params ={ var params = {
itemCode:itemCode, itemCode: itemCode,
businessType:businessType businessType: businessType
} }
getBalanceByBusinessType(params).then(res=>{ getBalanceByBusinessType(params).then(res => {
uni.hideLoading() uni.hideLoading()
if(res.data&&res.data.length>0){ if (res.data && res.data.length > 0) {
console.log(this.tableData) this.tableData = res.data
this.tableData= res.data } else {
}else { var hint =""
this.showErrorMessage("发料中未查询到物料号["+itemCode+"]的库存") if(businessType=="Issue"){
hint="发料中"
}else if(businessType=="Repleinment"){
hint="补料中"
}
this.showErrorMessage(hint+"未查询到物料号[" + itemCode + "]的库存")
} }
}).catch(error=>{ }).catch(error => {
uni.hideLoading() uni.hideLoading()
this.showErrorMessage(error) this.showErrorMessage(error)
}) })

20
src/pages.json

@ -819,7 +819,25 @@
"navigationBarTitleText": "直接补料", "navigationBarTitleText": "直接补料",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"titleNView": { "titleNView": {
"autoBackButton": "true" "autoBackButton": "true",
"buttons": [
//
{
"float": "right",
"fontSize": "58rpx", //
"text": "\ue696",
"fontSrc": "/static/ali_icon/iconfont.ttf"
},
{
"float": "right",
"fontSize": "52rpx", //
"text": "\ue6e2",
"fontSrc": "/static/ali_icon/iconfont.ttf"
}
]
} }
} }
}, },

14
src/pages/issue/record/directIssue.vue

@ -48,7 +48,7 @@
<winComScanBalance ref="scanPopup" @getBalance='getScanResult' :bussinessCode="businessTypeCode"> <winComScanBalance ref="scanPopup" @getBalance='getScanResult' :bussinessCode="businessTypeCode">
</winComScanBalance> </winComScanBalance>
<!-- <balanceQuery ref="refBalanceQuery"></balanceQuery> --> <balanceQuery ref="refBalanceQuery" :businessTypeCode="businessTypeCode"></balanceQuery>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
@ -99,7 +99,7 @@
import recordDetailCard from '@/mycomponents/record/recordDetailCard.vue' import recordDetailCard from '@/mycomponents/record/recordDetailCard.vue'
import balanceSelect from '@/mycomponents/balance/balanceSelect.vue' import balanceSelect from '@/mycomponents/balance/balanceSelect.vue'
import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue' import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue'
// import balanceQuery from '@/mycomponents/query/balanceQuery.vue' import balanceQuery from '@/mycomponents/query/balanceQuery.vue'
export default { export default {
@ -114,7 +114,7 @@
recordDetailCard, recordDetailCard,
balanceSelect, balanceSelect,
winComScanBalance, winComScanBalance,
// balanceQuery balanceQuery
}, },
data() { data() {
return { return {
@ -166,8 +166,8 @@
if (e.index === 0) { if (e.index === 0) {
goHome(); goHome();
} else if (e.index == 1) { } else if (e.index == 1) {
// this.$refs.refBalanceQuery.showDrawer(); this.$refs.refBalanceQuery.showDrawer();
// this.closeScanPopup(); this.closeScanPopup();
} }
}, },
// //
@ -178,10 +178,6 @@
mounted() {}, mounted() {},
methods: { methods: {
// showDrawer() {
// this.$refs.showRight.open();
// },
getBusinessType() { getBusinessType() {
getBusinessType(this.businessTypeCode, res => { getBusinessType(this.businessTypeCode, res => {
if (res.success) { if (res.success) {

8
src/pages/repleinsh/record/directRepleinshRecord.vue

@ -44,6 +44,7 @@
</view> </view>
<winComScanBalance ref="scanPopup" @getBalance='getScanResult' :bussinessCode="businessTypeCode"> <winComScanBalance ref="scanPopup" @getBalance='getScanResult' :bussinessCode="businessTypeCode">
</winComScanBalance> </winComScanBalance>
<balanceQuery ref="refBalanceQuery" :businessTypeCode="businessTypeCode"></balanceQuery>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
@ -94,6 +95,7 @@
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue' import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue'
import balanceQuery from '@/mycomponents/query/balanceQuery.vue'
export default { export default {
components: { components: {
@ -104,7 +106,8 @@
winScanLocation, winScanLocation,
winScanPackAndLocation, winScanPackAndLocation,
recordComDetailCard, recordComDetailCard,
winComScanBalance winComScanBalance,
balanceQuery
}, },
data() { data() {
return { return {
@ -137,6 +140,9 @@
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
if (e.index === 0) { if (e.index === 0) {
goHome(); goHome();
} else if (e.index == 1) {
this.$refs.refBalanceQuery.showDrawer();
this.closeScanPopup();
} }
}, },
// //

Loading…
Cancel
Save