页面开发
This commit is contained in:
131
pages/task/ckqr.vue
Normal file
131
pages/task/ckqr.vue
Normal file
@@ -0,0 +1,131 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<!-- 出库确认 -->
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">载具码</span>
|
||||
</view>
|
||||
<view class="zd-col-19 filter_select">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>单据号</th>
|
||||
<th>点位编码</th>
|
||||
<th>物料编码</th>
|
||||
<th>物料名称</th>
|
||||
<th>托盘编码</th>
|
||||
<th>批次</th>
|
||||
<th>数量</th>
|
||||
<th>单位</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="e in dataList" :key="e.point_code" :class="{'checked': e.point_code === pkId}" @tap="toCheck(e)">
|
||||
<td>{{e.bill_code}}</td>
|
||||
<td>{{e.point_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.storagevehicle_code}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.qty}}</td>
|
||||
<td>{{e.qty_unit_name}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-15 button-primary" :class="{'button-info': !val1 || !pkId}" :disabled="disabled" @tap="_OutConfirm">出库确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {OutGetDtl, OutConfirm} from '@/utils/getData.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._OutGetDtl(e)
|
||||
}
|
||||
},
|
||||
async _OutGetDtl (e) {
|
||||
try {
|
||||
let res = await OutGetDtl(e)
|
||||
if (res) {
|
||||
this.dataList = [...res.data]
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.point_code ? '' : e.point_code
|
||||
this.pkObj = this.pkId === e.point_code ? e : {}
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.dataList = []
|
||||
this.pkId = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _OutConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.pkId) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await OutConfirm(this.val1, this.pkId)
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this._OutGetDtl(this.val1)
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
|
||||
</style>
|
||||
105
pages/task/ddzy.vue
Normal file
105
pages/task/ddzy.vue
Normal file
@@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<!-- 定点作业 -->
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-8">
|
||||
<span class="filter_label">起点编码</span>
|
||||
</view>
|
||||
<view class="zd-col-16 filter_select">
|
||||
<input type="text" class="filter_input" v-model="val1">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-8">
|
||||
<span class="filter_label">终点编码</span>
|
||||
</view>
|
||||
<view class="zd-col-16 filter_select">
|
||||
<input type="text" class="filter_input" v-model="val2">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-8">
|
||||
<span class="filter_label">载具编码</span>
|
||||
</view>
|
||||
<view class="zd-col-16 filter_select">
|
||||
<search-box
|
||||
v-model="val3"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-8">
|
||||
<span class="filter_label">acs任务类型</span>
|
||||
</view>
|
||||
<view class="zd-col-16 filter_select">
|
||||
<uni-data-select v-model="index" :localdata="options"></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-15 button-primary" :class="{'button-info': !val1 || !val2 || !val3 || !index}" :disabled="disabled" @tap="_pointTask">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {pointTask} from '@/utils/getData.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
val3: '',
|
||||
index: '',
|
||||
options: [{value: '1', text: '普通任务'}],
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.val3 = ''
|
||||
this.index = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _pointTask () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2 || !this.val3 || !this.index) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await pointTask(this.val1, this.val2, this.val3, this.index)
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.clearUp()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
|
||||
</style>
|
||||
141
pages/task/dwcz.vue
Normal file
141
pages/task/dwcz.vue
Normal file
@@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<!-- 点位操作 -->
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">点位编码</span>
|
||||
</view>
|
||||
<view class="zd-col-18 filter_select">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom filter_input_disabled">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">点位名称</span>
|
||||
</view>
|
||||
<view class="zd-col-18 filter_select">
|
||||
<input type="text" class="filter_input" v-model="val2" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom" :class="{'filter_input_disabled': edit}">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">载具编码</span>
|
||||
</view>
|
||||
<view class="zd-col-18 filter_select">
|
||||
<input v-if="edit" type="text" class="filter_input" v-model="val3" disabled>
|
||||
<search-box
|
||||
v-else
|
||||
v-model="val3"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2 || !val3}" :disabled="disabled" @tap="_pointBinding">解绑</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2 || !val3}" :disabled="disabled" @tap="_pointDissect">绑定</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {pointGetPoint, pointBinding, pointDissect} from '@/utils/getData.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
val3: '',
|
||||
edit: false,
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._pointGetPoint(e)
|
||||
}
|
||||
},
|
||||
async _pointGetPoint (e) {
|
||||
try {
|
||||
let res = await pointGetPoint(this.val1)
|
||||
if (res) {
|
||||
this.val2 = res.data.point_name
|
||||
if (res.data.storagevehicle_code) {
|
||||
this.val3 = res.data.storagevehicle_code
|
||||
this.edit = true
|
||||
}
|
||||
} else {
|
||||
this.initData = {}
|
||||
}
|
||||
} catch (e) {
|
||||
this.initData = {}
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.val3 = ''
|
||||
this.edit = false
|
||||
this.disabled = false
|
||||
},
|
||||
async _pointBinding () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2 || !this.val3) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await pointBinding(this.val1, this.val2, this.val3)
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.clearUp()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _pointDissect () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2 || !this.val3) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await pointDissect(this.val1, this.val2, this.val3)
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.clearUp()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
|
||||
</style>
|
||||
137
pages/task/pdqr.vue
Normal file
137
pages/task/pdqr.vue
Normal file
@@ -0,0 +1,137 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<!-- 盘点确认 -->
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">盘点载具</span>
|
||||
</view>
|
||||
<view class="zd-col-18 filter_select">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">盘点点位</span>
|
||||
</view>
|
||||
<view class="zd-col-13 filter_select">
|
||||
<search-box
|
||||
v-model="val2"
|
||||
/>
|
||||
</view>
|
||||
<button type="primary" size="mini" style="margin-right: 0" @tap="_CheckGetDtl">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>单据号</th>
|
||||
<th>物料编码</th>
|
||||
<th>物料名称</th>
|
||||
<th>批次</th>
|
||||
<th>库存数量</th>
|
||||
<th>盘点数量</th>
|
||||
<th>单位</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, index) in dataList" :key="e.checkdtl_id">
|
||||
<td>{{e.bill_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.base_qty}}</td>
|
||||
<td>
|
||||
<input class="sin_input" type="number" :value="e.fac_qty" @input="onInput($event, index)">
|
||||
</td>
|
||||
<td>{{e.qty_unit_name}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-15 button-primary" :class="{'button-info': !val1 || !val2 || !dataList.length}" :disabled="disabled" @tap="_CheckConfirm">出库确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {CheckGetDtl, CheckConfirm} from '@/utils/getData.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
dataList: [],
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
onInput($event, index) {
|
||||
const value = $event.detail ? $event.detail.value : $event.target.value
|
||||
const newValue = value.replace(/[^0-9]/g, '')
|
||||
this.dataList[index].fac_qty = newValue
|
||||
$event.target.value = newValue
|
||||
},
|
||||
async _CheckGetDtl () {
|
||||
try {
|
||||
let res = await CheckGetDtl(this.val1, this.val2)
|
||||
if (res) {
|
||||
this.dataList = [...res.data]
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.dataList = []
|
||||
this.disabled = false
|
||||
},
|
||||
async _CheckConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2 || !this.dataList.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await CheckConfirm(this.val1, this.val2, this.dataList)
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this._CheckGetDtl()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
|
||||
</style>
|
||||
275
pages/task/rkqr.vue
Normal file
275
pages/task/rkqr.vue
Normal file
@@ -0,0 +1,275 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<!-- 入库确认 -->
|
||||
<view class="zd_content" style="padding-bottom: 20rpx">
|
||||
<view class="zd_wrapper">
|
||||
<search-box
|
||||
placeholder="请扫码"
|
||||
v-model="code"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</view>
|
||||
<view class="zd_wrapper">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">载具码</span>
|
||||
</view>
|
||||
<view class="zd-col-18 filter_select">
|
||||
<search-box
|
||||
v-model="vcode"
|
||||
@handleChange="handleChange1"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom filter_input_disabled">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">物料编码</span>
|
||||
</view>
|
||||
<view class="zd-col-18 filter_select">
|
||||
<input type="text" class="filter_input" v-model="initData.material_code" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom filter_input_disabled">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">批次</span>
|
||||
</view>
|
||||
<view class="zd-col-18 filter_select">
|
||||
<input type="text" class="filter_input" v-model="initData.pcsn" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom filter_input_disabled">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">数量</span>
|
||||
</view>
|
||||
<view class="zd-col-18 filter_select">
|
||||
<input type="text" class="filter_input" v-model="initData.qty" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom filter_input_disabled">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">单位</span>
|
||||
</view>
|
||||
<view class="zd-col-18 filter_select">
|
||||
<input type="text" class="filter_input" v-model="initData.qty_unit_name" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row jccenter mgt10">
|
||||
<view class="mgt10">
|
||||
<button type="default" size="mini" style="margin-right: 10px" @tap="clearUp1">清空</button>
|
||||
<button type="primary" size="mini" :disabled="disabled1" @tap="_groupPlate">组盘确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">点位编码</span>
|
||||
</view>
|
||||
<view class="zd-col-18 filter_select">
|
||||
<input type="text" class="filter_input" v-model="pointCode">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">库区编码</span>
|
||||
</view>
|
||||
<view class="zd-col-18 filter_select">
|
||||
<uni-data-select v-model="sectId" :localdata="options"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row jccenter mgt10">
|
||||
<view class="mgt10">
|
||||
<button type="default" size="mini" style="margin-right: 10px" @tap="clearUp2">清空</button>
|
||||
<button type="primary" size="mini" :disabled="disabled2" @tap="_confirmIn">入库确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>物料编码</th>
|
||||
<th>物料名称</th>
|
||||
<th>批次</th>
|
||||
<th>数量</th>
|
||||
<th>单位</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, index) in dataList" :key="e.group_id">
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.qty}}</td>
|
||||
<td>{{e.qty_unit_name}}</td>
|
||||
<td><button type="warn" size="mini" :disabled="id === e.group_id && disabled3" @tap="_deleteDtl(e)">删除</button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {sweepCode, getPlateDtl, getSect, groupPlate, confirmIn, deleteDtl} from '@/utils/getData.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
code: '',
|
||||
vcode: '',
|
||||
initData: {},
|
||||
dataList: [],
|
||||
pointCode: '',
|
||||
sectId: '',
|
||||
options: [],
|
||||
disabled1: false,
|
||||
disabled2: false,
|
||||
id: '',
|
||||
disabled3: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._getSect()
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._sweepCode(e)
|
||||
}
|
||||
},
|
||||
handleChange1 (e) {
|
||||
if (e) {
|
||||
this._getPlateDtl(e)
|
||||
}
|
||||
},
|
||||
async _sweepCode (e) {
|
||||
try {
|
||||
let res = await sweepCode(e)
|
||||
if (res && res.data) {
|
||||
this.initData = res.data
|
||||
this.vcode = res.data.storagevehicle_code
|
||||
if (this.vcode) {
|
||||
this._getPlateDtl(this.vcode)
|
||||
}
|
||||
} else {
|
||||
this.initData = {}
|
||||
}
|
||||
} catch (e) {
|
||||
this.initData = {}
|
||||
}
|
||||
},
|
||||
async _getPlateDtl (e) {
|
||||
try {
|
||||
let res = await getPlateDtl(e)
|
||||
if (res && res.data) {
|
||||
this.dataList = [...res.data]
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
clearUp1 () {
|
||||
this.code = ''
|
||||
this.vcode = ''
|
||||
this.initData = {}
|
||||
this.dataList = []
|
||||
this.id = ''
|
||||
this.disabled = false
|
||||
},
|
||||
clearUp2 () {
|
||||
this.pointCode = ''
|
||||
this.sectId = ''
|
||||
this.disabled = false
|
||||
},
|
||||
// 组盘确认
|
||||
async _groupPlate () {
|
||||
this.disabled1 = true
|
||||
if (!this.vcode || JSON.stringify(this.initData) === '{}') {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
const obj = Object.assign({}, this.initData, {storagevehicle_code: this.vcode})
|
||||
let res = await groupPlate(obj)
|
||||
this.disabled1 = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.code = ''
|
||||
this.initData = {}
|
||||
this._getPlateDtl(this.vcode)
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
async _getSect () {
|
||||
try {
|
||||
let res = await getSect()
|
||||
if (res && res.data) {
|
||||
this.options = [...res.data]
|
||||
this.options.map(el => {
|
||||
this.$set(el, 'value', el.sect_id)
|
||||
this.$set(el, 'text', el.sect_name)
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
this.options = []
|
||||
}
|
||||
},
|
||||
// 入库确认
|
||||
async _confirmIn () {
|
||||
this.disabled2 = true
|
||||
if (!this.vcode || !this.pointCode || !this.sectId) {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await confirmIn(this.vcode, this.pointCode, this.sectId)
|
||||
this.disabled2 = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.pointCode = ''
|
||||
this.sectId = ''
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
}
|
||||
},
|
||||
// 删除
|
||||
async _deleteDtl (e) {
|
||||
this.id = e.group_id
|
||||
this.disabled3 = true
|
||||
try {
|
||||
let res = await deleteDtl(e)
|
||||
this.disabled3 = false
|
||||
this.id = ''
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this._getPlateDtl(this.vcode)
|
||||
} catch (e) {
|
||||
this.disabled3 = false
|
||||
this.id = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
141
pages/task/rwgl.vue
Normal file
141
pages/task/rwgl.vue
Normal file
@@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<!-- 任务管理 -->
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">关键字</span>
|
||||
</view>
|
||||
<view class="zd-col-14 filter_select">
|
||||
<input type="text" placeholder="输入任务号、载具号、点位号" class="filter_input" v-model="keyWord">
|
||||
</view>
|
||||
<button type="primary" size="mini" style="margin-right: 0" @tap="_queryTask">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>任务号</th>
|
||||
<th>载具号</th>
|
||||
<th>起点</th>
|
||||
<th>终点</th>
|
||||
<th>状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="e in dataList" :key="e.task_code" :class="{'checked': e.task_code === pkId}" @tap="toCheck(e)">
|
||||
<td>{{e.task_code}}</td>
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
<td>{{e.point_code1}}</td>
|
||||
<td>{{e.point_code2}}</td>
|
||||
<td>{{e.task_status}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_againTask">重新下发</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_forceConfirm">强制确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryTask, againTask, forceConfirm} from '@/utils/getData.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
keyWord: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
async _queryTask () {
|
||||
try {
|
||||
let res = await queryTask(this.keyWord)
|
||||
if (res) {
|
||||
this.dataList = [...res.data]
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.task_code ? '' : e.task_code
|
||||
this.pkObj = this.pkId === e.task_code ? e : {}
|
||||
},
|
||||
clearUp () {
|
||||
this.keyWord = ''
|
||||
this.dataList = []
|
||||
this.pkId = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _againTask () {
|
||||
this.disabled = true
|
||||
if (!this.pkId) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
const { task_code, vehicle_code, point_code1, point_code2, task_status } = this.pkObj
|
||||
const obj = { task_code, vehicle_code, point_code1, point_code2, task_status }
|
||||
let res = await againTask(obj)
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this._queryTask()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _forceConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.pkId) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
const { task_code, vehicle_code, point_code1, point_code2, task_status } = this.pkObj
|
||||
const obj = { task_code, vehicle_code, point_code1, point_code2, task_status }
|
||||
let res = await forceConfirm(obj)
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this._queryTask()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user