This commit is contained in:
2025-09-10 11:28:21 +08:00
parent 71d3b615dc
commit 3a4e75f818
2 changed files with 35 additions and 30 deletions

View File

@@ -16,8 +16,8 @@
<view class="zd-col-7"> <view class="zd-col-7">
<span class="filter_label">起点</span> <span class="filter_label">起点</span>
</view> </view>
<view class="zd-col-17"> <view class="zd-col-24 filter_select">
<input type="text" class="filter_input" v-model="val1"> <uni-data-select v-model="index3" :localdata="options3" @change="selectChange3"></uni-data-select>
</view> </view>
</view> </view>
<view class="zd-row border-bottom"> <view class="zd-row border-bottom">
@@ -32,15 +32,15 @@
<view class="zd-col-7"> <view class="zd-col-7">
<span class="filter_label">终点</span> <span class="filter_label">终点</span>
</view> </view>
<view class="zd-col-17"> <view class="zd-col-24 filter_select">
<input type="text" class="filter_input" v-model="val2"> <uni-data-select v-model="index4" :localdata="options4" @change="selectChange4"></uni-data-select>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="zd-row submit-bar"> <view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="clearUp">清空</button> <button class="zd-col-6 button-default" @tap="clearUp">清空</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_sendPointTask">确认</button> <button class="zd-col-16 button-primary" :class="{'button-info': !index3 || !index4}" :disabled="disabled" @tap="_sendPointTask">确认</button>
</view> </view>
</view> </view>
</template> </template>
@@ -57,13 +57,14 @@
data() { data() {
return { return {
title: '', title: '',
val1: '',
val2: '',
// options: [{text:'堆叠托盘', value:'11111111'},{text:'料箱',value: '22222222'},{text:'白色EPH',value: '33333333'}],
options: [], options: [],
index: '', index: '',
options2: [], options2: [],
index2: '', index2: '',
options3: [],
index3: '',
options4: [],
index4: '',
disabled: false disabled: false
}; };
}, },
@@ -108,30 +109,42 @@
this._getPointnByRegion2() this._getPointnByRegion2()
}, },
async _getPointnByRegion1 () { async _getPointnByRegion1 () {
try {
let res = await getPointnByRegion(this.index) let res = await getPointnByRegion(this.index)
if (res.code === '200') { if (res) {
this.val1 = res.data[0].point_code this.options3 = res.data
} else {
this.options3 =[]
}
} catch (e) {
this.options3 = []
} }
}, },
async _getPointnByRegion2 () { async _getPointnByRegion2 () {
try {
let res = await getPointnByRegion(this.index2) let res = await getPointnByRegion(this.index2)
if (res.code === '200') { if (res) {
this.val2 = res.data[0].point_code this.options4 = res.data
} else {
this.options4 =[]
}
} catch (e) {
this.options4 = []
} }
}, },
clearUp () { clearUp () {
this.val1 = '' this.index3 = ''
this.val2 = '' this.index4 = ''
this.disabled = false this.disabled = false
}, },
async _sendPointTask () { async _sendPointTask () {
this.disabled = true this.disabled = true
if (!this.val1 || !this.val2) { if (!this.index3 || !this.index4) {
this.disabled = false this.disabled = false
return return
} }
try { try {
let res = await sendPointTask(this.val1, this.val2) let res = await sendPointTask(this.index3, this.index4)
if (res.code === '200') { if (res.code === '200') {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,

View File

@@ -20,28 +20,20 @@
<table> <table>
<thead> <thead>
<tr> <tr>
<th>载具</th> <th>任务</th>
<th>起点</th> <th>起点</th>
<th>终点</th> <th>终点</th>
<th>状态</th> <th>状态</th>
<th>作业</th> <th>载具</th>
<th>作业类型</th>
<th>设备号</th>
<th>当前步骤</th>
<th>异常信息</th>
</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" @click="toCheck(e)" :class="{'checked': e.task_code === pkId}">
<td>{{e.task_type}}</td>
<td>{{e.task_code}}</td> <td>{{e.task_code}}</td>
<td>{{e.vehicle_code}}</td>
<td>{{e.status}}</td>
<td>{{e.point_code1}}</td> <td>{{e.point_code1}}</td>
<td>{{e.point_code2}}</td> <td>{{e.point_code2}}</td>
<td>{{e.create_time}}</td> <td>{{e.task_status}}</td>
<td>{{e.create_time}}</td> <td>{{e.vehicle_code}}</td>
<td>{{e.create_time}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>