单据出库修改

This commit is contained in:
2025-01-10 17:28:32 +08:00
parent a00a73ce42
commit 6528e716fe
4 changed files with 46 additions and 40 deletions

View File

@@ -1,9 +1,17 @@
<template>
<view class="zd_container">
<!-- 单据列表 -->
<nav-bar :title="title" :inner="true"></nav-bar>
<nav-bar title="单据列表"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-9">
<span class="filter_label">出库单类型</span>
</view>
<view class="zd-col-24 filter_select">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
</view>
</view>
<view class="zd-row">
<view class="zd-col-7">
<span class="filter_label">单据编码</span>
@@ -64,7 +72,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {outStorageOrderList} from '@/utils/getData2.js'
import {outStorageOrder, outStorageOrderList} from '@/utils/getData2.js'
export default {
components: {
NavBar,
@@ -73,6 +81,8 @@
data() {
return {
title: '',
options: [],
index: '',
id: '',
code: '',
dataList: [],
@@ -94,25 +104,41 @@
onLoad (options) {
this.title = options.title
this.id = options.id
this._outStorageOrderList()
},
created () {
this._outStorageOrder()
},
methods: {
/** 下拉框*/
async _outStorageOrder () {
let res = await outStorageOrder()
this.options = [...res]
},
selectChange (e) {
this.index = e
if (e) {
this.dataList = []
this.pageNum = 1
this.pkId = ''
this._outStorageOrderList(e, this.code)
}
},
handleChange (e) {
if (e) {
this.dataList = []
this.pageNum = 1
this.pkId = ''
this._outStorageOrderList(e)
this._outStorageOrderList(this.index, e)
}
},
seachList () {
this.dataList = []
this.pageNum = 1
this.pkId = ''
this._outStorageOrderList(this.code)
this._outStorageOrderList(this.index, this.code)
},
async _outStorageOrderList (e) {
let res = await outStorageOrderList(this.pageNum + '', this.pageSize + '', this.id, e)
async _outStorageOrderList (index, e) {
let res = await outStorageOrderList(this.pageNum + '', this.pageSize + '', index, e)
if (res.code === '200') {
this.totalCount = res.totalElements
if (res.totalElements > 0) {
@@ -133,7 +159,7 @@
this.status = 'loading'
setTimeout(() => {
this.pageNum++
this._outStorageOrderList(this.code)
this._outStorageOrderList(this.index, this.code)
}, 1000)
} else { //停止加载
this.status = 'noMore'
@@ -146,7 +172,9 @@
toSure () {
if (this.pkId) {
this.$store.dispatch('setPublicObj', this.pkObj)
uni.navigateBack()
uni.navigateTo({
url: '/pages/outbound/bill-out-store?title=单据出库'
})
}
}
}

View File

@@ -1,18 +1,8 @@
<template>
<view class="zd_container">
<!-- 单据出库 -->
<nav-bar :title="title"></nav-bar>
<nav-bar :title="title" :inner="true"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row">
<view class="zd-col-9">
<span class="filter_label">出库单类型</span>
</view>
<view class="zd-col-24 filter_select">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
</view>
</view>
</view>
<view v-if="JSON.stringify(currentData) !== '{}'" class="zd_wrapper">
<view class="zd-row border-bottom filter_input_disabled">
<view class="zd-col-6"><span class="filter_label">单据编码</span></view>
@@ -54,6 +44,7 @@
物料名称
</view>
</th>
<th>物料编码</th>
<th>计划数量</th>
<th>申请数量</th>
<th>库存数量</th>
@@ -67,6 +58,7 @@
<tr v-for="(e, i) in dataList" :key="i">
<td @tap="toCheck(e)"><uni-icons :type="e.checked ? 'checkbox' : 'circle'" size="24" color="#4e6ef2"></uni-icons></td>
<td class="td_3">{{e.material_name}}</td>
<td>{{e.material_code}}</td>
<td>{{e.plan_qty}}</td>
<td>{{e.qty}}</td>
<td>{{e.sto_qty}}</td>
@@ -81,7 +73,7 @@
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-primary" @tap="toEmpty">清空</button>
<button class="zd-col-6 button-primary" @tap="toEmpty">返回</button>
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}'}" :disabled="disabled" @tap="_outStorageConfirm">出库确认</button>
</view>
</view>
@@ -90,7 +82,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {outStorageOrder, outStorageOrderList, outStorageConfirm, outStorageOrderConfirm} from '@/utils/getData2.js'
import {outStorageOrderList, outStorageConfirm, outStorageOrderConfirm} from '@/utils/getData2.js'
export default {
components: {
NavBar,
@@ -99,8 +91,6 @@
data() {
return {
title: '',
options: [],
index: '',
currentData: {},
dataList: [],
disabled: false,
@@ -113,9 +103,6 @@
onLoad (options) {
this.title = options.title
},
created () {
this._outStorageOrder()
},
onShow () {
if (this.$store.getters.publicObj !== '') {
this.currentData = this.$store.getters.publicObj
@@ -129,11 +116,6 @@
}
},
methods: {
/** 下拉框*/
async _outStorageOrder () {
let res = await outStorageOrder()
this.options = [...res]
},
selectChange (e) {
this.index = e
if (e) {
@@ -175,11 +157,7 @@
}
},
toEmpty () {
this.index = ''
this.index1 = ''
this.currentData = {}
this.dataList = []
this.allCheck = false
uni.navigateBack()
},
toAllCheck () {
this.allCheck = !this.allCheck