This commit is contained in:
2026-01-08 10:56:44 +08:00
parent e733b759fe
commit afc569e771
17 changed files with 569 additions and 459 deletions

View File

@@ -4,20 +4,12 @@
<nav-bar :title="title"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">点位</span>
</view>
<view class="zd-col-24 filter_select">
<search-box v-model="val1" @handleChange="handleChange"/>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label">卸货区</span>
</view>
<view class="zd-col-18 filter_select">
<uni-data-select v-model="index1" :localdata="options1"></uni-data-select>
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange"></uni-data-select>
</view>
</view>
<view class="zd-row border-bottom">
@@ -68,7 +60,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryPointRegion, queryPointDrawDtl, queryDrawConfirm} from '@/utils/getData3.js'
import {queryXhRegion, queryPointRegion, queryRegionPoint, queryDrawConfirm} from '@/utils/getData3.js'
export default {
components: {
NavBar,
@@ -77,8 +69,6 @@
data() {
return {
title: '',
num: null,
val1: '',
options1: [],
index1: '',
options2: [],
@@ -94,10 +84,14 @@
this.title = options.title
},
methods: {
selectChange (e) {
this.index1 = e
this._queryRegionPoint()
},
/** 下拉框*/
async _queryPointRegion () {
async _queryXhRegion () {
try {
let res = await queryPointRegion(this.val1)
let res = await queryXhRegion()
if (res && res.data) {
this.options1 = [...res.data]
} else {
@@ -110,7 +104,7 @@
/** 下拉框*/
async _queryPointRegion2 () {
try {
let res = await queryPointRegion(this.val1)
let res = await queryPointRegion()
if (res && res.data) {
this.options2 = [...res.data]
} else {
@@ -121,11 +115,9 @@
}
},
toEmpty () {
this.val1 = ''
this.num = null
this.index1 = ''
this.index2 = ''
this.dataList = []
this.checkedArr = []
this.allCheck = false
this.disabled = false
},
toAllCheck () {
@@ -139,39 +131,11 @@
this.checkedArr = this.dataList.filter(el => el.checked === true)
this.allCheck = this.checkedArr.length === this.dataList.length
},
handleChange (e) {
if (e) {
this._queryPointDrawDtl()
}
},
handleBlur (e) {
if (e.qty) {
if (e.qty < 0) {
e.qty = 0
} else {
e.qty = e.qty.replace(/[^0-9]/g, '')
e.qty = e.qty.replace(/^0+/, '') || '0'
if (e.qty > e.initialQty) {
e.qty = e.initialQty
}
this.num = this.dataList.reduce((sum, item) => sum + Number(item.qty), 0)
}
} else {
// uni.showToast({
// title: '数量必填',
// icon: 'none'
// })
}
},
async _queryPointDrawDtl () {
async _queryRegionPoint () {
try {
let res = await queryPointDrawDtl(this.val1)
let res = await queryRegionPoint(this.index1)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
this.dataList.forEach(e => {
e.initialQty = e.qty
})
this.num = this.dataList.reduce((sum, item) => sum + Number(item.qty), 0)
} else {
this.dataList = []
}