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

View File

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