联调
This commit is contained in:
@@ -14,6 +14,32 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="JSON.stringify(obj) !== '{}'" class="zd_wrapper">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">重量</span>
|
||||
</view>
|
||||
<view class="zd-col-17 filter_select">
|
||||
<input type="number" class="filter_input" v-model="obj.material_weight" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">数量</span>
|
||||
</view>
|
||||
<view class="zd-col-17 filter_select">
|
||||
<input type="number" class="filter_input" v-model="obj.material_qty" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">牌号</span>
|
||||
</view>
|
||||
<view class="zd-col-17 filter_select">
|
||||
<input type="text" class="filter_input" v-model="obj.material_code" disabled>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
|
||||
@@ -35,6 +61,7 @@
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
obj: {},
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
@@ -46,6 +73,7 @@
|
||||
methods: {
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.obj = {}
|
||||
},
|
||||
async _zpxxTask () {
|
||||
this.disabled = true
|
||||
@@ -60,6 +88,7 @@
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.obj = res
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar :title="title" :searchActive="true" @toSearch="toSearch"></nav-bar>
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content pdt0">
|
||||
<view class="filter_wrapper">
|
||||
<view class="zd-row">
|
||||
@@ -13,14 +13,14 @@
|
||||
<view class="item-wrapper">
|
||||
<view class="item-wrap" v-for="(e, i) in dataList" :key="i" @tap="toCheck(e)" :class="{isChecked: pkId === e.inst_uuid}">
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-10 item-font-1">{{e.task_no}} | {{['就绪', '执行中', '完成','取消'][Number(e.inst_status)]}}</view>
|
||||
<view class="zd-col-10 item-font-2" style="text-align:right">{{e.create_time}}</view>
|
||||
<view class="zd-col-15 item-font-1">{{e.task_no}} | {{e.inst_status_name}}</view>
|
||||
<view class="zd-col-9 item-font-2" style="text-align:right">{{e.create_time}}</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-16">
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-6 item-font-3">指令号:</view>
|
||||
<view class="zd-col-18 item-font-4">{{e.instruction_code}}</view>
|
||||
<view class="zd-col-18 item-font-4">{{e.inst_no}}</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-10 item-font-3">指令执行步骤:</view>
|
||||
@@ -53,44 +53,6 @@
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_handInst('2')">重新下发</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_handInst('3')">强制完成</button>
|
||||
</view>
|
||||
<view class="zd_content msg_wrapper" :class="show ? 'popshow' : 'pophide'">
|
||||
<view class="msg_content">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">关键字</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<input type="text" class="filter_input" v-model="val1">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">起始设备</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<search-box
|
||||
v-model="val2"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">目标设备</span>
|
||||
</view>
|
||||
<view class="zd-col-19 filter_select">
|
||||
<search-box
|
||||
v-model="val3"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-7 button-default" @tap.stop="show = false">取消</button>
|
||||
<button class="zd-col-7 button-default" @tap.stop="clearUp">清空</button>
|
||||
<button class="zd-col-7 button-primary" @tap="_handInsts">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="show" class="msg_mask"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -105,13 +67,9 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
state: [{id:'-1', text: '全部'}, {id:'0', text: '就绪'}, {id:'1', text: '执行中'}, {id:'2', text: '完成'}, {id:'3', text: '取消'}],
|
||||
state: [{id:'-1', text: '全部'}, {id:'0', text: '就绪'}, {id:'1', text: '执行中'}],
|
||||
tab: '-1',
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
val3: '',
|
||||
data: [],
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
@@ -130,15 +88,21 @@
|
||||
this.tab = '-1'
|
||||
},
|
||||
async _handInsts () {
|
||||
this.show = false
|
||||
try {
|
||||
let res = await handInsts(this.val1, this.val2, this.val3)
|
||||
this.data = [...res.data]
|
||||
this.dataList = [...this.data]
|
||||
if (res.code === '1') {
|
||||
this.data = [...res.result]
|
||||
this.dataList = [...this.data]
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
@@ -160,24 +124,21 @@
|
||||
}
|
||||
try {
|
||||
let res = await handInst(type, this.pkId)
|
||||
this.disabled = false
|
||||
this.tab = '-1'
|
||||
this._handInsts()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
if (res.code === '1') {
|
||||
this.disabled = false
|
||||
this.tab = '-1'
|
||||
this._handInsts()
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
} else {
|
||||
this.disabled = false
|
||||
}
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.val3 = ''
|
||||
this.pkId = ''
|
||||
this.disabled = false
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.inst_uuid ? '' : e.inst_uuid
|
||||
}
|
||||
@@ -185,5 +146,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
<style lang="stylus" scoped>
|
||||
.item-font-1
|
||||
font-size 28rpx
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar :title="title" :searchActive="true" @toSearch="toSearch"></nav-bar>
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content pdt0">
|
||||
<view class="filter_wrapper">
|
||||
<view class="zd-row">
|
||||
@@ -20,7 +20,7 @@
|
||||
<view class="zd-col-16">
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-7 item-font-3">任务状态:</view>
|
||||
<view class="zd-col-17 item-font-4">{{['就绪', '执行中', '完成'][Number(e.task_status)]}}</view>
|
||||
<view class="zd-col-17 item-font-4">{{e.task_status_name}}</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-7 item-font-3">载具号:</view>
|
||||
@@ -44,44 +44,6 @@
|
||||
<button class="zd-col-11 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_handTaskoperation('1')">重新生成</button>
|
||||
<button class="zd-col-11 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_handTaskoperation('2')">强制完成</button>
|
||||
</view>
|
||||
<view class="zd_content msg_wrapper" :class="show ? 'popshow' : 'pophide'">
|
||||
<view class="msg_content">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">关键字</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<input type="text" class="filter_input" v-model="val1">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">起始设备</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<search-box
|
||||
v-model="val2"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">目标设备</span>
|
||||
</view>
|
||||
<view class="zd-col-19 filter_select">
|
||||
<search-box
|
||||
v-model="val3"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-7 button-default" @tap.stop="show = false">取消</button>
|
||||
<button class="zd-col-7 button-default" @tap.stop="clearUp">清空</button>
|
||||
<button class="zd-col-7 button-primary" @tap="_handTasks">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="show" class="msg_mask"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -96,13 +58,9 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
state: [{id:'-1', text: '全部'}, {id:'0', text: '就绪'}, {id:'1', text: '执行中'}, {id:'2', text: '完成'}],
|
||||
state: [{id:'-1', text: '全部'}, {id:'0', text: '就绪'}, {id:'1', text: '执行中'}],
|
||||
tab: '-1',
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
val3: '',
|
||||
data: [],
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
@@ -116,20 +74,21 @@
|
||||
this._handTasks()
|
||||
},
|
||||
methods: {
|
||||
toSearch () {
|
||||
this.show = true
|
||||
this.tab = '-1'
|
||||
},
|
||||
async _handTasks () {
|
||||
this.show = false
|
||||
try {
|
||||
let res = await handTasks(this.val1, this.val2, this.val3)
|
||||
this.data = [...res.data]
|
||||
this.dataList = [...this.data]
|
||||
|
||||
let res = await handTasks()
|
||||
if (res.code === '1') {
|
||||
this.data = [...res.result]
|
||||
this.dataList = [...this.data]
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
@@ -151,24 +110,21 @@
|
||||
}
|
||||
try {
|
||||
let res = await handTaskoperation(type, this.pkId)
|
||||
this.disabled = false
|
||||
this.tab = '-1'
|
||||
this._handTasks()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
if (res.code === '1') {
|
||||
this.disabled = false
|
||||
this.tab = '-1'
|
||||
this._handTasks()
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
} else {
|
||||
this.disabled = false
|
||||
}
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.val3 = ''
|
||||
this.pkId = ''
|
||||
this.disabled = false
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.task_uuid ? '' : e.task_uuid
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user