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