指令修改
This commit is contained in:
@@ -57,10 +57,10 @@
|
||||
</view>
|
||||
<view class="confirm-button-wrap">
|
||||
<button class="confirm-button" @tap="toSearch()">查询</button>
|
||||
<button class="confirm-button" :disabled="disabled" @tap="toSure()">取消</button>
|
||||
<button class="confirm-button" :disabled="disabled" @tap="toSure()">完成</button>
|
||||
<button class="confirm-button" :disabled="disabled" @tap="toSure()">重发</button>
|
||||
<button class="confirm-button" :disabled="disabled" @tap="toSure()">WCS取消</button>
|
||||
<button class="confirm-button" :disabled="disabled" @tap="toSure('1')">取消</button>
|
||||
<button class="confirm-button" :disabled="disabled" @tap="toSure('2')">完成</button>
|
||||
<button class="confirm-button" :disabled="disabled" @tap="toSure('3')">重发</button>
|
||||
<button class="confirm-button" :disabled="disabled" @tap="toSure('4')">WCS取消</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="grid-wrap">
|
||||
@@ -97,10 +97,12 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
|
||||
<view>
|
||||
<uni-calendar
|
||||
ref="calendar1"
|
||||
:insert="false"
|
||||
:date="startDate"
|
||||
@confirm="confirm1"
|
||||
/>
|
||||
</view>
|
||||
@@ -108,6 +110,7 @@
|
||||
<uni-calendar
|
||||
ref="calendar2"
|
||||
:insert="false"
|
||||
:date="endDate"
|
||||
@confirm="confirm2"
|
||||
/>
|
||||
</view>
|
||||
@@ -117,7 +120,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryInstraction, instOperation} from '@/utils/getData2.js'
|
||||
import {instStatusQuery, instPageQuery, instOperation} from '@/utils/getData1.js'
|
||||
import {dateFtt} from '@/utils//utils.js'
|
||||
export default {
|
||||
components: {
|
||||
@@ -126,6 +129,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
page: 1,
|
||||
options1: [],
|
||||
index1: '',
|
||||
startDate: dateFtt(new Date()),
|
||||
@@ -137,35 +141,95 @@
|
||||
val1: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
disabled: false
|
||||
disabled: false,
|
||||
reload: false,
|
||||
status: 'more',
|
||||
contentText: {
|
||||
contentdown: '查看更多',
|
||||
contentrefresh: '加载中',
|
||||
contentnomore: '没有更多'
|
||||
},
|
||||
totalCount: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this._instStatusQuery()
|
||||
},
|
||||
methods: {
|
||||
open1(){
|
||||
this.$refs.calendar1.open()
|
||||
},
|
||||
confirm1(e) {
|
||||
this.startDate = e.fulldate
|
||||
var compare = Date.parse(new Date(e.fulldate)) - Date.parse(new Date(this.endDate))
|
||||
if (compare < 0) {
|
||||
this.startDate = e.fulldate
|
||||
}
|
||||
},
|
||||
open2(){
|
||||
this.$refs.calendar2.open()
|
||||
},
|
||||
confirm2(e) {
|
||||
this.endDate = e.fulldate
|
||||
var compare = Date.parse(new Date(e.fulldate)) - Date.parse(new Date(this.startDate))
|
||||
if (compare > 0) {
|
||||
this.endDate = e.fulldate
|
||||
}
|
||||
},
|
||||
/** 选择器1 */
|
||||
selectChange1(e) {
|
||||
this.index1 = e
|
||||
},
|
||||
async _instStatusQuery (id) {
|
||||
let res = await instStatusQuery(id)
|
||||
this.options1 = [...res.result]
|
||||
},
|
||||
toSearch () {
|
||||
this.dataList = []
|
||||
this._queryInstraction()
|
||||
this.dataList = []
|
||||
this.pageNum = 1
|
||||
this._instPageQuery()
|
||||
},
|
||||
async _queryInstraction () {
|
||||
let res = await queryInstraction()
|
||||
this.dataList = [...res.data]
|
||||
/** 初始化查询 */
|
||||
async _instPageQuery () {
|
||||
let form = {
|
||||
nPageStart: this.pageNum + '',
|
||||
nPageRecordNum: this.pageSize + '',
|
||||
status: this.index1,
|
||||
inst_num: this.instNum,
|
||||
agv_num: this.agvNum,
|
||||
vehicle_code: this.val1,
|
||||
start_point: this.startPoint,
|
||||
end_point: this.endPoint,
|
||||
start_date: this.startDate || '',
|
||||
end_date: this.endDate || ''
|
||||
}
|
||||
let res = await instPageQuery(form)
|
||||
this.totalCount = res.size
|
||||
if (res.size > 0) {
|
||||
const dataMap = res.data
|
||||
this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap)
|
||||
this.reload = false
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
if (this.totalCount == this.dataList.length) {
|
||||
this.reload = false
|
||||
this.status = 'noMore'
|
||||
}
|
||||
|
||||
},
|
||||
toSure () {
|
||||
onReachBottom () {
|
||||
if (this.totalCount > this.dataList.length) {
|
||||
this.status = 'loading'
|
||||
setTimeout(() => {
|
||||
this.pageNum++
|
||||
this._instPageQuery()
|
||||
}, 1000)
|
||||
} else { //停止加载
|
||||
this.status = 'noMore'
|
||||
}
|
||||
},
|
||||
toSure (type) {
|
||||
this.disabled = true
|
||||
if (!this.pkId) {
|
||||
uni.showToast({
|
||||
@@ -175,10 +239,10 @@
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
this._instOperation()
|
||||
this._instOperation(type)
|
||||
},
|
||||
async _instOperation () {
|
||||
let res = await instOperation()
|
||||
async _instOperation (type) {
|
||||
let res = await instOperation(type)
|
||||
this.dataList = [...res.data]
|
||||
},
|
||||
toRadio (e) {
|
||||
|
||||
Reference in New Issue
Block a user