空载具
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !val2 || !index}" :disabled="disabled" @tap="_createTask">呼叫入库</button>
|
||||
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !val2 || !index}" :disabled="disabled" @tap="_inEmptyVehicle">呼叫入库</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -40,8 +40,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
// import {queryVehicleType} from '@/utils/mork2.js'
|
||||
import {queryVehicleType, createTask} from '@/utils/getData2.js'
|
||||
import {getSectList, inEmptyVehicle} from '@/utils/getData3.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -59,13 +58,13 @@
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._queryVehicleType()
|
||||
this._getSectList()
|
||||
},
|
||||
methods: {
|
||||
/** 下拉框*/
|
||||
async _queryVehicleType () {
|
||||
async _getSectList () {
|
||||
try {
|
||||
let res = await queryVehicleType()
|
||||
let res = await getSectList()
|
||||
if (res && res.data.length > 0) {
|
||||
this.options = [...res.data]
|
||||
} else {
|
||||
@@ -81,14 +80,14 @@
|
||||
this.index = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _createTask () {
|
||||
async _inEmptyVehicle () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2 || !this.index) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await createTask(this.val1, this.val2, this.index)
|
||||
let res = await inEmptyVehicle(this.index, this.val2, this.val1)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !index}" :disabled="disabled" @tap="_createTask">呼叫出库</button>
|
||||
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !index || !index2 || !num}" :disabled="disabled" @tap="_callEmptyVehicle">呼叫出库</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -48,8 +48,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
// import {queryVehicleType} from '@/utils/mork2.js'
|
||||
import {queryVehicleType, createTask} from '@/utils/getData2.js'
|
||||
import {getSectList, callEmptyVehicle} from '@/utils/getData3.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -69,24 +68,12 @@
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._queryVehicleType()
|
||||
this._getSectList()
|
||||
},
|
||||
methods: {
|
||||
async _queryVehicleType () {
|
||||
async _getSectList () {
|
||||
try {
|
||||
let res = await queryVehicleType()
|
||||
if (res && res.data.length > 0) {
|
||||
this.options = [...res.data]
|
||||
} else {
|
||||
this.options = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.options = []
|
||||
}
|
||||
},
|
||||
async _queryVehicleType2 () {
|
||||
try {
|
||||
let res = await queryVehicleType()
|
||||
let res = await getSectList()
|
||||
if (res && res.data.length > 0) {
|
||||
this.options2 = [...res.data]
|
||||
} else {
|
||||
@@ -100,16 +87,17 @@
|
||||
this.val1 = ''
|
||||
this.index = ''
|
||||
this.index2 = ''
|
||||
this.num = null
|
||||
this.disabled = false
|
||||
},
|
||||
async _createTask () {
|
||||
async _callEmptyVehicle () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.index) {
|
||||
if (!this.val1 || !this.index || !this.index2 || !this.num) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await createTask(this.val1, this.index)
|
||||
let res = await callEmptyVehicle(this.index2, this.val1, this.index, this.num)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
options: [],
|
||||
// options: [],
|
||||
options: [{text:'原粉区', value: '1'}, {text:'批料室', value: '1'}, {text:'粉碎室1', value: 'f1'}, {text:'粉碎室2', value: 'f2'}],
|
||||
index: '',
|
||||
val1: '',
|
||||
|
||||
124
pages/hdyy/tygn/agv-manage.vue
Normal file
124
pages/hdyy/tygn/agv-manage.vue
Normal file
@@ -0,0 +1,124 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<!-- AGV管理 -->
|
||||
<nav-bar :title="title" :inner="true"></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">
|
||||
<input type="text" class="filter_input" v-model="val1">
|
||||
</view>
|
||||
<button class="mini-btn" type="primary" @tap="_queryHistoryTask">查询</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>
|
||||
<th>终点</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{i+1}}</td>
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
<td>{{e.point_code1}}</td>
|
||||
<td>{{e.point_code2}}</td>
|
||||
<td>{{e.task_code}}</td>
|
||||
<td>{{e.config_name}}</td>
|
||||
<td>{{e.car_no}}</td>
|
||||
<td>{{e.remark}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-18 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_createTask">强制充电</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryHistoryTask, createTask} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
dataList: []
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._queryHistoryTask()
|
||||
},
|
||||
methods: {
|
||||
toEmpty () {
|
||||
this.val1 = ''
|
||||
this.dataList = []
|
||||
this.disabled = false
|
||||
},
|
||||
async _queryHistoryTask () {
|
||||
try {
|
||||
let res = await queryHistoryTask(this.val1)
|
||||
if (res && res.data) {
|
||||
this.dataList = [...res.data]
|
||||
} else {
|
||||
this.dataList = []
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
async _createTask () {
|
||||
this.disabled = true
|
||||
if (!this.val1) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await createTask(this.val1)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.toEmpty()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.filter_picker {
|
||||
text-align: center
|
||||
}
|
||||
</style>
|
||||
107
pages/hdyy/tygn/dtd-transfer.vue
Normal file
107
pages/hdyy/tygn/dtd-transfer.vue
Normal file
@@ -0,0 +1,107 @@
|
||||
<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">
|
||||
<search-box v-model="code1"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">终点</span>
|
||||
</view>
|
||||
<view class="zd-col-18">
|
||||
<search-box v-model="code2"/>
|
||||
</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="index" :localdata="options"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-18 button-primary" :class="{'button-info': !code1 || !code2 || !index}" :disabled="disabled" @tap="_createTask">生成任务</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
// import {queryVehicleType} from '@/utils/mork2.js'
|
||||
import {queryVehicleType, createTask} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
vehicleCode: null,
|
||||
code1: '',
|
||||
code2: '',
|
||||
options: [],
|
||||
index: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._queryVehicleType()
|
||||
},
|
||||
methods: {
|
||||
/** 下拉框*/
|
||||
async _queryVehicleType () {
|
||||
try {
|
||||
let res = await queryVehicleType()
|
||||
if (res && res.data.length > 0) {
|
||||
this.options = [...res.data]
|
||||
} else {
|
||||
this.options = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.options = []
|
||||
}
|
||||
},
|
||||
toEmpty () {
|
||||
this.vehicleCode = null
|
||||
this.code1 = ''
|
||||
this.code2 = ''
|
||||
this.index = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _createTask () {
|
||||
this.disabled = true
|
||||
if (!this.code1 || !this.code2 || !this.index) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await createTask(this.vehicleCode, this.code1, this.code2, this.index)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.toEmpty()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
145
pages/hdyy/tygn/kc-query.vue
Normal file
145
pages/hdyy/tygn/kc-query.vue
Normal file
@@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<!-- 库存查询 -->
|
||||
<nav-bar :title="title" :inner="true"></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">
|
||||
<uni-data-select v-model="index1" :localdata="options1"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">点位</span>
|
||||
</view>
|
||||
<view class="zd-col-18">
|
||||
<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">
|
||||
<search-box v-model="materialData.material_code"/>
|
||||
</view>
|
||||
<button class="mini-btn" type="primary" @tap="toJump('material?title=物料维护')">查询</button>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">批号</span>
|
||||
</view>
|
||||
<view class="zd-col-14">
|
||||
<input type="text" class="filter_input" v-model="val2">
|
||||
</view>
|
||||
<button class="mini-btn" type="primary" @tap="_queryHistoryTask">查询</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>
|
||||
<th>供应商</th>
|
||||
<th>类别</th>
|
||||
<th>规格</th>
|
||||
<th>型号</th>
|
||||
<th>入库时间</th>
|
||||
<th>载具</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{i+1}}</td>
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
<td>{{e.point_code1}}</td>
|
||||
<td>{{e.point_code2}}</td>
|
||||
<td>{{e.task_code}}</td>
|
||||
<td>{{e.config_name}}</td>
|
||||
<td>{{e.car_no}}</td>
|
||||
<td>{{e.remark}}</td>
|
||||
<td>{{e.remark}}</td>
|
||||
<td>{{e.remark}}</td>
|
||||
<td>{{e.remark}}</td>
|
||||
<td>{{e.remark}}</td>
|
||||
<td>{{e.remark}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryHistoryTask} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
options1: [],
|
||||
options: [{text:'原粉', value: '1'}, {text:'辅料', value: '2'}, {text:'批料室', value: '3'}, {text:'中间站', value: '4'}, {text:'内包材', value: '5'}, {text:'外包材', value: '6'}],
|
||||
index1: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
dataList: []
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._queryHistoryTask()
|
||||
},
|
||||
methods: {
|
||||
toEmpty () {
|
||||
this.val1 = ''
|
||||
this.dataList = []
|
||||
this.disabled = false
|
||||
},
|
||||
toJump (name) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/hdyy/wbc/${name}`
|
||||
})
|
||||
},
|
||||
async _queryHistoryTask () {
|
||||
try {
|
||||
let res = await queryHistoryTask(this.val1)
|
||||
if (res && res.data) {
|
||||
this.dataList = [...res.data]
|
||||
} else {
|
||||
this.dataList = []
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
this.dataList = []
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.filter_picker {
|
||||
text-align: center
|
||||
}
|
||||
</style>
|
||||
143
pages/hdyy/tygn/ls-search.vue
Normal file
143
pages/hdyy/tygn/ls-search.vue
Normal file
@@ -0,0 +1,143 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<!-- 历史查询 -->
|
||||
<nav-bar :title="title" :inner="true"></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-9 filter_picker">
|
||||
<picker mode="date" :value="date1" :start="startDate" :end="endDate" @change="bindDateChange1">
|
||||
<view class="uni-input">{{date1}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="zd-col-1"><span>-</span></view>
|
||||
<view class="zd-col-9 filter_picker">
|
||||
<picker mode="date" :value="date2" :start="startDate" :end="endDate" @change="bindDateChange2">
|
||||
<view class="uni-input">{{date2}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">关键字</span>
|
||||
</view>
|
||||
<view class="zd-col-14">
|
||||
<input type="text" placeholder="载具号/起点/终点/任务号" class="filter_input" v-model="keyword" @focus="handleFocus">
|
||||
</view>
|
||||
<button class="mini-btn" type="primary" @tap="_queryHistoryTask">查询</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>
|
||||
<th>设备号</th>
|
||||
<th>备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.material_id === pkId}" @tap="toCheck(e)">
|
||||
<td>{{e.task_time}}</td>
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
<td>{{e.point_code1}}</td>
|
||||
<td>{{e.point_code2}}</td>
|
||||
<td>{{['生成', '', '', '下发', '执行中', '完成'][Number(e.task_status)]}}</td>
|
||||
<td>{{e.task_code}}</td>
|
||||
<td>{{e.config_name}}</td>
|
||||
<td>{{e.car_no}}</td>
|
||||
<td>{{e.remark}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-24 button-primary" @tap="toSure">返回</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getDate} from '@/utils/utils.js'
|
||||
import {queryHistoryTask} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
const currentDate = getDate({
|
||||
format: true
|
||||
})
|
||||
return {
|
||||
title: '',
|
||||
keyword: null,
|
||||
date1: currentDate,
|
||||
date2: currentDate,
|
||||
dataList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
startDate() {
|
||||
return getDate('start');
|
||||
},
|
||||
endDate() {
|
||||
return getDate('end');
|
||||
}
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._queryHistoryTask()
|
||||
},
|
||||
methods: {
|
||||
handleFocus () {
|
||||
this.keyword = null
|
||||
},
|
||||
bindDateChange1: function(e) {
|
||||
this.date1 = e.detail.value
|
||||
},
|
||||
bindDateChange2: function(e) {
|
||||
this.date2 = e.detail.value
|
||||
},
|
||||
async _queryHistoryTask () {
|
||||
try {
|
||||
let res = await queryHistoryTask(this.keyword, this.date1, this.date2)
|
||||
if (res && res.data) {
|
||||
this.dataList = [...res.data]
|
||||
} else {
|
||||
this.dataList = []
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
toSure () {
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.filter_picker {
|
||||
text-align: center
|
||||
}
|
||||
</style>
|
||||
146
pages/hdyy/tygn/pt-update.vue
Normal file
146
pages/hdyy/tygn/pt-update.vue
Normal file
@@ -0,0 +1,146 @@
|
||||
<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">
|
||||
<search-box 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-13">
|
||||
<search-box v-model="vehicleCode"/>
|
||||
</view>
|
||||
<button class="mini-btn" type="primary" @tap="_updatePointqueryPointInfo">查询</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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.material_code === pkId}">
|
||||
<td>{{i+1}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</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-5 button-default" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-6 button-primary" :class="{'button-info': !pointCode || !vehicleCode}" :disabled="disabled" @tap="_bindVehicle">绑定</button>
|
||||
<button class="zd-col-6 button-primary" :class="{'button-info': !pointCode || !vehicleCode}" :disabled="disabled" @tap="_clearVehicle">清载具</button>
|
||||
<button class="zd-col-6 button-primary" :class="{'button-info': !pointCode || !vehicleCode}" :disabled="disabled" @tap="_clearMaterial">清物料</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
// import {updatePointqueryPointInfo} from '@/utils/mork2.js'
|
||||
import {updatePointqueryPointInfo, bindVehicle, clearVehicle, clearMaterial} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
pointCode: '',
|
||||
vehicleCode: '',
|
||||
dataList: [],
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
async _updatePointqueryPointInfo () {
|
||||
try {
|
||||
let res = await updatePointqueryPointInfo(this.pointCode, this.vehicleCode)
|
||||
if (res && res.data.length > 0) {
|
||||
this.dataList = [...res.data]
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
toEmpty () {
|
||||
this.pointCode = ''
|
||||
this.vehicleCode = ''
|
||||
this.dataList = []
|
||||
this.disabled = false
|
||||
},
|
||||
async _bindVehicle () {
|
||||
try {
|
||||
let res = await bindVehicle(this.pointCode, this.vehicleCode)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.toEmpty()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _clearVehicle () {
|
||||
try {
|
||||
let res = await clearVehicle(this.pointCode, this.vehicleCode)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.toEmpty()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _clearMaterial () {
|
||||
try {
|
||||
let res = await clearMaterial(this.pointCode, this.vehicleCode)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.toEmpty()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
163
pages/hdyy/tygn/work-manage.vue
Normal file
163
pages/hdyy/tygn/work-manage.vue
Normal file
@@ -0,0 +1,163 @@
|
||||
<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-13">
|
||||
<search-box v-model="keyword"/>
|
||||
</view>
|
||||
<button class="mini-btn" type="primary" @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>
|
||||
<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_id === pkId}">
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
<td>{{e.point_code1}}</td>
|
||||
<td>{{e.point_code2}}</td>
|
||||
<td>{{['生成', '', '', '下发', '执行中', '完成'][Number(e.task_status)]}}</td>
|
||||
<td>{{e.task_code}}</td>
|
||||
<td>{{e.config_name}}</td>
|
||||
<td>{{e.car_no}}</td>
|
||||
<td>{{e.remark}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !pkId}" :disabled="disabled1" @tap="_taskOperation">重新生成</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !pkId}" :disabled="disabled2" @tap="_forceConfirmTask">强制完成</button>
|
||||
<button class="zd-col-6 button-primary" @tap="toJump('ls-search?title=历史查询')">历史查询</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryTask, taskOperation, forceConfirmTask} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
keyword: '',
|
||||
dataList: [],
|
||||
disabled1: false,
|
||||
disabled2: false,
|
||||
pkId: '',
|
||||
pkObj: {}
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._queryTask()
|
||||
},
|
||||
methods: {
|
||||
toJump (name) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/hdyy/tygn/${name}`
|
||||
})
|
||||
},
|
||||
async _queryTask () {
|
||||
try {
|
||||
let res = await queryTask(this.keyword)
|
||||
if (res && res.data) {
|
||||
this.dataList = [...res.data]
|
||||
} else {
|
||||
this.dataList = []
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
async _taskOperation () {
|
||||
this.disabled1 = true
|
||||
if (!this.pkId) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await taskOperation(this.pkObj)
|
||||
if (res) {
|
||||
this._queryTask()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.disabled1 = false
|
||||
this.disabled2 = false
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
} catch (err) {
|
||||
this.disabled1 = false
|
||||
this.disabled2 = false
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
}
|
||||
},
|
||||
async _forceConfirmTask () {
|
||||
this.disabled2 = true
|
||||
if (!this.pkId) {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await forceConfirmTask(this.pkObj)
|
||||
if (res) {
|
||||
this._queryTask()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.disabled1 = false
|
||||
this.disabled2 = false
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
} catch (err) {
|
||||
this.disabled1 = false
|
||||
this.disabled2 = false
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.task_id ? '' : e.task_id
|
||||
this.pkObj = this.pkId === e.task_id ? e : {}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
191
pages/hdyy/wrcdj/wrc-load.vue
Normal file
191
pages/hdyy/wrcdj/wrc-load.vue
Normal file
@@ -0,0 +1,191 @@
|
||||
<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">
|
||||
<uni-data-select v-model="index1" :localdata="options1"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th @tap="toAllCheck"><uni-icons :type="allCheck ? 'checkbox' : 'circle'" size="24" color="#4e6ef2"></uni-icons></th>
|
||||
<th>序号</th>
|
||||
<th>点位编码</th>
|
||||
<th>点位名称</th>
|
||||
<th>物料编码</th>
|
||||
<th>物料名称</th>
|
||||
<th>批号</th>
|
||||
<th>数量</th>
|
||||
<th>计量单位</th>
|
||||
<th>AGV任务</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td @tap="toCheck(e)"><uni-icons :type="e.checked ? 'checkbox' : 'circle'" size="24" color="#4e6ef2"></uni-icons></td>
|
||||
<td>{{i+1}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.unit_name}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<!-- <button class="zd-col-5 button-default" @tap="toEmpty">清空</button> -->
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !checkedArr.length}" :disabled="disabled" @tap="_queryDrawConfirm">呼叫无人车</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !checkedArr.length}" :disabled="disabled" @tap="_queryDrawConfirm">装货</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !checkedArr.length}" :disabled="disabled" @tap="_queryDrawConfirm">装货完成</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryPointRegion, queryPointDrawDtl, queryDrawConfirm} from '@/utils/getData3.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
options1: [],
|
||||
index1: '',
|
||||
allCheck: false,
|
||||
checkedArr: [],
|
||||
dataList: [],
|
||||
dataList: [{material_code: 'm001', qty: 100, checked: false, initialQty: 100}, {material_code: 'm002', qty: 200, checked: false, initialQty: 200}],
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
/** 下拉框*/
|
||||
async _queryPointRegion () {
|
||||
try {
|
||||
let res = await queryPointRegion()
|
||||
if (res && res.data) {
|
||||
this.options1 = [...res.data]
|
||||
} else {
|
||||
this.options1 = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.options1 = []
|
||||
}
|
||||
},
|
||||
/** 下拉框*/
|
||||
async _queryPointRegion2 () {
|
||||
try {
|
||||
let res = await queryPointRegion()
|
||||
if (res && res.data) {
|
||||
this.options2 = [...res.data]
|
||||
} else {
|
||||
this.options2 = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.options2 = []
|
||||
}
|
||||
},
|
||||
toEmpty () {
|
||||
this.dataList = []
|
||||
this.checkedArr = []
|
||||
this.allCheck = false
|
||||
this.disabled = false
|
||||
},
|
||||
toAllCheck () {
|
||||
this.allCheck = !this.allCheck
|
||||
this.dataList.map(el => {
|
||||
el.checked = this.allCheck
|
||||
})
|
||||
},
|
||||
toCheck (e) {
|
||||
e.checked = !e.checked
|
||||
this.checkedArr = this.dataList.filter(el => el.checked === true)
|
||||
this.allCheck = this.checkedArr.length === this.dataList.length
|
||||
},
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._queryPointDrawDtl()
|
||||
}
|
||||
},
|
||||
handleBlur (e) {
|
||||
if (e.qty) {
|
||||
if (e.qty < 0) {
|
||||
e.qty = 0
|
||||
} else {
|
||||
e.qty = e.qty.replace(/[^0-9]/g, '')
|
||||
e.qty = e.qty.replace(/^0+/, '') || '0'
|
||||
if (e.qty > e.initialQty) {
|
||||
e.qty = e.initialQty
|
||||
}
|
||||
this.num = this.dataList.reduce((sum, item) => sum + Number(item.qty), 0)
|
||||
}
|
||||
} else {
|
||||
// uni.showToast({
|
||||
// title: '数量必填',
|
||||
// icon: 'none'
|
||||
// })
|
||||
}
|
||||
},
|
||||
async _queryPointDrawDtl () {
|
||||
try {
|
||||
let res = await queryPointDrawDtl(this.val1)
|
||||
if (res && res.data.length > 0) {
|
||||
this.dataList = [...res.data]
|
||||
this.dataList.forEach(e => {
|
||||
e.initialQty = e.qty
|
||||
})
|
||||
this.num = this.dataList.reduce((sum, item) => sum + Number(item.qty), 0)
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
async _queryDrawConfirm () {
|
||||
this.checkedArr = this.dataList.filter(el => el.checked === true)
|
||||
this.disabled = true
|
||||
if (!this.checkedArr.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await queryDrawConfirm(this.checkedArr)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.toEmpty()
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
205
pages/hdyy/wrcdj/wrc-unload.vue
Normal file
205
pages/hdyy/wrcdj/wrc-unload.vue
Normal file
@@ -0,0 +1,205 @@
|
||||
<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-7">
|
||||
<span class="filter_label">点位</span>
|
||||
</view>
|
||||
<view class="zd-col-24 filter_select">
|
||||
<search-box v-model="val1" @handleChange="handleChange"/>
|
||||
</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="index1" :localdata="options1"></uni-data-select>
|
||||
</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="index2" :localdata="options2"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th @tap="toAllCheck"><uni-icons :type="allCheck ? 'checkbox' : 'circle'" size="24" color="#4e6ef2"></uni-icons></th>
|
||||
<th>序号</th>
|
||||
<th>点位编码</th>
|
||||
<th>点位名称</th>
|
||||
<th>物料类型</th>
|
||||
<th>AGV任务</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td @tap="toCheck(e)"><uni-icons :type="e.checked ? 'checkbox' : 'circle'" size="24" color="#4e6ef2"></uni-icons></td>
|
||||
<td>{{i+1}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.unit_name}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<!-- <button class="zd-col-5 button-default" @tap="toEmpty">清空</button> -->
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !checkedArr.length}" :disabled="disabled" @tap="_queryDrawConfirm">卸货</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !checkedArr.length}" :disabled="disabled" @tap="_queryDrawConfirm">等待</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !checkedArr.length}" :disabled="disabled" @tap="_queryDrawConfirm">回库</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryPointRegion, queryPointDrawDtl, queryDrawConfirm} from '@/utils/getData3.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
num: null,
|
||||
val1: '',
|
||||
options1: [],
|
||||
index1: '',
|
||||
options2: [],
|
||||
index2: '',
|
||||
allCheck: false,
|
||||
checkedArr: [],
|
||||
dataList: [],
|
||||
dataList: [{material_code: 'm001', qty: 100, checked: false, initialQty: 100}, {material_code: 'm002', qty: 200, checked: false, initialQty: 200}],
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
/** 下拉框*/
|
||||
async _queryPointRegion () {
|
||||
try {
|
||||
let res = await queryPointRegion(this.val1)
|
||||
if (res && res.data) {
|
||||
this.options1 = [...res.data]
|
||||
} else {
|
||||
this.options1 = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.options1 = []
|
||||
}
|
||||
},
|
||||
/** 下拉框*/
|
||||
async _queryPointRegion2 () {
|
||||
try {
|
||||
let res = await queryPointRegion(this.val1)
|
||||
if (res && res.data) {
|
||||
this.options2 = [...res.data]
|
||||
} else {
|
||||
this.options2 = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.options2 = []
|
||||
}
|
||||
},
|
||||
toEmpty () {
|
||||
this.val1 = ''
|
||||
this.num = null
|
||||
this.dataList = []
|
||||
this.checkedArr = []
|
||||
this.allCheck = false
|
||||
this.disabled = false
|
||||
},
|
||||
toAllCheck () {
|
||||
this.allCheck = !this.allCheck
|
||||
this.dataList.map(el => {
|
||||
el.checked = this.allCheck
|
||||
})
|
||||
},
|
||||
toCheck (e) {
|
||||
e.checked = !e.checked
|
||||
this.checkedArr = this.dataList.filter(el => el.checked === true)
|
||||
this.allCheck = this.checkedArr.length === this.dataList.length
|
||||
},
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._queryPointDrawDtl()
|
||||
}
|
||||
},
|
||||
handleBlur (e) {
|
||||
if (e.qty) {
|
||||
if (e.qty < 0) {
|
||||
e.qty = 0
|
||||
} else {
|
||||
e.qty = e.qty.replace(/[^0-9]/g, '')
|
||||
e.qty = e.qty.replace(/^0+/, '') || '0'
|
||||
if (e.qty > e.initialQty) {
|
||||
e.qty = e.initialQty
|
||||
}
|
||||
this.num = this.dataList.reduce((sum, item) => sum + Number(item.qty), 0)
|
||||
}
|
||||
} else {
|
||||
// uni.showToast({
|
||||
// title: '数量必填',
|
||||
// icon: 'none'
|
||||
// })
|
||||
}
|
||||
},
|
||||
async _queryPointDrawDtl () {
|
||||
try {
|
||||
let res = await queryPointDrawDtl(this.val1)
|
||||
if (res && res.data.length > 0) {
|
||||
this.dataList = [...res.data]
|
||||
this.dataList.forEach(e => {
|
||||
e.initialQty = e.qty
|
||||
})
|
||||
this.num = this.dataList.reduce((sum, item) => sum + Number(item.qty), 0)
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
async _queryDrawConfirm () {
|
||||
this.checkedArr = this.dataList.filter(el => el.checked === true)
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.checkedArr.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await queryDrawConfirm(this.val1, this.num, this.checkedArr)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.toEmpty()
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -42,7 +42,7 @@
|
||||
return {
|
||||
userName: '',
|
||||
menuList: [
|
||||
{title: '通用功能', path: 'RF07', sonTree: [
|
||||
{title: '通用功能0', path: 'RF07', sonTree: [
|
||||
{title: '入库组箱', path: '/pages/General/warehouse-box'},
|
||||
{title: '配送组箱', path: '/pages/General/distribution-box'},
|
||||
{title: '点对点转运', path: '/pages/General/line-transfer'},
|
||||
@@ -50,12 +50,12 @@
|
||||
{title: '作业管理', path: '/pages/General/ops-mgmt'},
|
||||
{title: '点位更新', path: '/pages/General/pt-update'}
|
||||
]},
|
||||
{title: '小料箱功能', path: 'RF08', sonTree: [
|
||||
{title: '小料箱功能0', path: 'RF08', sonTree: [
|
||||
{title: '空载具出库', path: '/pages/Material/kzj-out-store'},
|
||||
{title: '空载具入库', path: '/pages/Material/kzj-in-store'},
|
||||
{title: '小料箱入库', path: '/pages/Material/xlx-in-store'}
|
||||
]},
|
||||
{title: '大料箱功能', path: 'RF09', sonTree: [
|
||||
{title: '大料箱功能0', path: 'RF09', sonTree: [
|
||||
{title: '空载具出入库', path: '/pages/Material/kzj-inout-store'},
|
||||
{title: '料箱入库', path: '/pages/Material/lx-in-store'},
|
||||
{title: '物料入库', path: '/pages/Material/mater-in-store'},
|
||||
@@ -64,30 +64,27 @@
|
||||
{title: '大料箱移库', path: '/pages/Material/dlx-move-store'},
|
||||
{title: '大料箱盘库', path: '/pages/Material/dlx-pan-store'}
|
||||
]},
|
||||
{title: '外包材管理', path: 'RF01', sonTree: [
|
||||
{title: '外包材收货', path: '/pages/hdyy/wbc/wbc-shouhuo'},
|
||||
{title: '外包材转运', path: '/pages/hdyy/wbc/wbc-transfer'},
|
||||
{title: '外包材送入', path: '/pages/hdyy/wbc/wbc-enter'},
|
||||
{title: '外包材领用', path: '/pages/hdyy/wbc/wbc-getuse'},
|
||||
{title: '外包材还回', path: '/pages/hdyy/wbc/wbc-return'}
|
||||
{title: '无人车对接', path: 'RF10', sonTree: [
|
||||
{title: '无人车卸货', path: '/pages/hdyy/wrcdj/wrc-unload'},
|
||||
{title: '无人车装货', path: '/pages/hdyy/wrcdj/wrc-load'}
|
||||
]},
|
||||
{title: '空载具管理', path: 'RF02', sonTree: [
|
||||
{title: '空载具管理', path: 'RF01', sonTree: [
|
||||
{title: '空载具入库', path: '/pages/hdyy/kzj/kzj-instore'},
|
||||
{title: '空载具出库', path: '/pages/hdyy/kzj/kzj-outstore'},
|
||||
{title: '空载具堆叠', path: '/pages/hdyy/kzj/kzj-duidie'}
|
||||
]},
|
||||
{title: '组盘管理', path: 'RF02', sonTree: [
|
||||
{title: '物料组袋', path: '/pages/hdyy/zpgl/mater-zudai'},
|
||||
{title: '物料组盘', path: '/pages/hdyy/zpgl/mater-zupan'},
|
||||
{title: '物料组桶', path: '/pages/hdyy/zpgl/mater-zutong'}
|
||||
]},
|
||||
{title: '仓储管理', path: 'RF03', sonTree: [
|
||||
{title: '收货入库', path: '/pages/hdyy/ccgl/sh-instore'},
|
||||
{title: '直接入库', path: '/pages/hdyy/ccgl/zj-instore'},
|
||||
{title: '直接出库', path: '/pages/hdyy/ccgl/zj-outstore'},
|
||||
{title: '库内合盘', path: '/pages/hdyy/ccgl/kn-hepan'}
|
||||
]},
|
||||
{title: '组盘管理', path: 'RF04', sonTree: [
|
||||
{title: '物料组袋', path: '/pages/hdyy/zpgl/mater-zudai'},
|
||||
{title: '物料组盘', path: '/pages/hdyy/zpgl/mater-zupan'},
|
||||
{title: '物料组桶', path: '/pages/hdyy/zpgl/mater-zutong'}
|
||||
]},
|
||||
{title: '生产管理', path: 'RF05', sonTree: [
|
||||
{title: '生产管理', path: 'RF04', sonTree: [
|
||||
{title: '成品出料', path: '/pages/hdyy/scgl/cp-chuliao'},
|
||||
{title: '料桶叫料', path: '/pages/hdyy/scgl/lt-callmater'},
|
||||
{title: '料桶称重', path: '/pages/hdyy/scgl/lt-weight'},
|
||||
@@ -97,6 +94,20 @@
|
||||
{title: '托盘叫料', path: '/pages/hdyy/scgl/tp-callmater'},
|
||||
{title: '预加工出料', path: '/pages/hdyy/scgl/yjg-chuliao'}
|
||||
]},
|
||||
{title: '外包材管理', path: 'RF05', sonTree: [
|
||||
{title: '外包材收货', path: '/pages/hdyy/wbc/wbc-shouhuo'},
|
||||
{title: '外包材转运', path: '/pages/hdyy/wbc/wbc-transfer'},
|
||||
{title: '外包材送入', path: '/pages/hdyy/wbc/wbc-enter'},
|
||||
{title: '外包材领用', path: '/pages/hdyy/wbc/wbc-getuse'},
|
||||
{title: '外包材还回', path: '/pages/hdyy/wbc/wbc-return'}
|
||||
]},
|
||||
{title: '通用功能', path: 'RF06', sonTree: [
|
||||
{title: '点对点转运', path: '/pages/hdyy/tygn/dtd-transfer'},
|
||||
{title: '作业管理', path: '/pages/hdyy/tygn/work-manage'},
|
||||
{title: '点位更新', path: '/pages/hdyy/tygn/pt-update'},
|
||||
{title: 'AGV管理', path: '/pages/hdyy/tygn/agv-manage'},
|
||||
{title: '库存查询', path: '/pages/hdyy/tygn/kc-query'}
|
||||
]},
|
||||
],
|
||||
show: false,
|
||||
secM: [],
|
||||
|
||||
Reference in New Issue
Block a user