no message

This commit is contained in:
蔡玲
2024-10-21 14:19:45 +08:00
parent 1855acc419
commit 041c06dce2
3 changed files with 27 additions and 14 deletions

View File

@@ -5,7 +5,7 @@
<view class="zd_wrapper"> <view class="zd_wrapper">
<view class="filter_item"> <view class="filter_item">
<view class="filter_label_wraper"> <view class="filter_label_wraper">
<span class="filter_label">起始点位</span> <span class="filter_label">当前点位</span>
</view> </view>
<view class="filter_input_wraper"> <view class="filter_input_wraper">
<zxz-uni-data-select v-model="index1" filterable :localdata="options1" @inputChange="inputChange1" @change="selectChange1"></zxz-uni-data-select> <zxz-uni-data-select v-model="index1" filterable :localdata="options1" @inputChange="inputChange1" @change="selectChange1"></zxz-uni-data-select>
@@ -33,15 +33,14 @@
</view> </view>
<view class="zd-row submit-bar_new"> <view class="zd-row submit-bar_new">
<button class="zd-col-7 submit-button_c" @tap="toClear">清空</button> <button class="zd-col-7 submit-button_c" @tap="toClear">清空</button>
<button class="zd-col-15 submit-button_new" :class="{'btn-disabled': index1 === ''}" :disabled="disabled" @tap="_pointclean">确认</button> <button class="zd-col-15 submit-button_new" :class="{'btn-disabled': index1 === ''}" :disabled="disabled" @tap="toSure">确认</button>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import NavBar from '@/components/NavBar.vue' import NavBar from '@/components/NavBar.vue'
import {pointSearch1} from '@/utils/getData1.js' import {queryCleanPoint, pointclean} from '@/utils/getData2.js'
import {pointclean} from '@/utils/getData2.js'
export default { export default {
components: { components: {
NavBar NavBar
@@ -55,7 +54,7 @@
}; };
}, },
created () { created () {
this._pointSearch() this._queryCleanPoint()
}, },
methods: { methods: {
inputChange1 (e) { inputChange1 (e) {
@@ -73,8 +72,8 @@
} }
}, },
/** 点位查询 下拉框显示 */ /** 点位查询 下拉框显示 */
async _pointSearch () { async _queryCleanPoint () {
let res = await pointSearch1('CB') let res = await queryCleanPoint('CB')
this.options1 = [...res] this.options1 = [...res]
this.options1.map(el => { this.options1.map(el => {
this.$set(el, 'value', el.point_code) this.$set(el, 'value', el.point_code)
@@ -85,12 +84,26 @@
this.index1 = '' this.index1 = ''
this.obj = {} this.obj = {}
}, },
async _pointclean () { toSure () {
this.disabled = true this.disabled = true
if (this.index1 === '') { if (this.index1 === '') {
this.disabled = false this.disabled = false
return return
} }
uni.showModal({
title: '提示',
content: '确认清空点位信息',
confirmColor: '#ff6a00',
success: (res) => {
if (res.confirm) {
this._pointclean()
} else if (res.cancel) {
this.disabled = false
}
}
})
},
async _pointclean () {
try { try {
let res = await pointclean(this.index1) let res = await pointclean(this.index1)
if (res.code === '1') { if (res.code === '1') {

View File

@@ -18,12 +18,6 @@ export const pointSearch = (rcode, pcode, ne) => request({
need_emtpy: ne need_emtpy: ne
} }
}) })
export const pointSearch1 = (rcode) => request({
url:'api/pda/point',
data: {
region_code: rcode
}
})
// 查询各点位物料状态 // 查询各点位物料状态
export const dwztSearch = (rcode) => request({ export const dwztSearch = (rcode) => request({

View File

@@ -159,6 +159,12 @@ export const zpchange = (code, ncode) => request({
/** /**
* 点位清空 * 点位清空
*/ */
export const queryCleanPoint = (rcode) => request({
url:'api/pda/queryCleanPoint',
data: {
region_code: rcode
}
})
export const pointclean = (code) => request({ export const pointclean = (code) => request({
url:'api/pda/pointclean', url:'api/pda/pointclean',
data: { data: {