指令、作业、点位管理
This commit is contained in:
@@ -237,24 +237,21 @@ uni-button:after {
|
||||
.item-font-2
|
||||
_font(24rpx,40rpx,$red,,)
|
||||
.item-font-3
|
||||
width 110rpx
|
||||
_font(24rpx,26rpx,#333,,)
|
||||
text-align:justify;
|
||||
text-align-last: justify;
|
||||
text-justify: inter-ideograph;
|
||||
.item-font-4
|
||||
width calc(100% - 110rpx)
|
||||
_font(26rpx,26rpx,#999,,)
|
||||
.item-font-5
|
||||
_font(44rpx,60rpx,$green,,center)
|
||||
background-color #f6f6f6
|
||||
.item-font-6
|
||||
width calc(50% - 110rpx)
|
||||
height 52rpx
|
||||
_font(24rpx,52rpx,#666,,center)
|
||||
background-color #e5e5e5
|
||||
border-radius 26rpx
|
||||
.item-font-7
|
||||
width 110rpx
|
||||
_font(24rpx,52rpx,#666,,center)
|
||||
.item-font-8
|
||||
_font(24rpx,52rpx,#666,,center)
|
||||
|
||||
52
pages.json
52
pages.json
@@ -19,55 +19,7 @@
|
||||
}
|
||||
}
|
||||
,{
|
||||
"path" : "pages/manage/empty-tray-out",
|
||||
"style" :
|
||||
{
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/manage/empty-tray-in",
|
||||
"style" :
|
||||
{
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/manage/group-in-storage",
|
||||
"style" :
|
||||
{
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/manage/mater-out-storage",
|
||||
"style" :
|
||||
{
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/manage/produce-cut",
|
||||
"style" :
|
||||
{
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/manage/point-update",
|
||||
"style" :
|
||||
{
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/manage/fixed-point-task",
|
||||
"path" : "pages/manage/inst-manage",
|
||||
"style" :
|
||||
{
|
||||
"navigationStyle": "custom"
|
||||
@@ -83,7 +35,7 @@
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/manage/out-storage-confirm",
|
||||
"path" : "pages/manage/point-manage",
|
||||
"style" :
|
||||
{
|
||||
"navigationStyle": "custom"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<view class="zd_home_wrapper">
|
||||
<view class="menus_wrap">
|
||||
<view class="fir_menu_wrap">
|
||||
<view class="fir_menu-item" v-for="e in menuList1" :key="e.id" @tap="toPage(e)">
|
||||
<view class="fir_menu-item" v-for="e in menuList" :key="e.id" @tap="toPage(e)">
|
||||
<image class="menu-img" :src="require('../../static/image/menu/' + e.icon + '.png')" alt="">
|
||||
<view class="menu-name">{{e.title}}</view>
|
||||
</view>
|
||||
@@ -32,27 +32,9 @@
|
||||
return {
|
||||
userName: '',
|
||||
menuList: [
|
||||
{id: '1', name: '人工组盘', sonTree: [
|
||||
{menu_id: '1', icon: 'RF01', name: '人工组盘', path: '/pages/manage/man-group-disk'}
|
||||
]},
|
||||
{id: '2', name: '原材料库', sonTree: [
|
||||
{menu_id: '1', icon: 'RF02', name: '入库', path: '/pages/manage/in-storage'},
|
||||
{menu_id: '2', icon: 'RF03', name: '出库', path: '/pages/manage/out-storage'}
|
||||
]},
|
||||
{id: '3', name: '任务流转', sonTree: [
|
||||
{menu_id: '1', icon: 'RF04', name: '任务流转', path: '/pages/manage/task-flow'}
|
||||
]}
|
||||
],
|
||||
menuList1: [
|
||||
{id: 1, title: '空托盘出库', icon: 'RF01', path: '/pages/manage/empty-tray-out'},
|
||||
{id: 2, title: '空托盘入库', icon: 'RF02', path: '/pages/manage/empty-tray-in'},
|
||||
{id: 3, title: '组盘入库', icon: 'RF03', path: '/pages/manage/group-in-storage'},
|
||||
{id: 4, title: '原料出库', icon: 'RF04', path: '/pages/manage/mater-out-storage'},
|
||||
{id: 5, title: '生产下料', icon: 'RF05', path: '/pages/manage/produce-cut'},
|
||||
{id: 6, title: '点位更新', icon: 'RF06', path: '/pages/manage/point-update'},
|
||||
{id: 7, title: '定点作业', icon: 'RF07', path: '/pages/manage/fixed-point-task'},
|
||||
{id: 8, title: '作业管理', icon: 'RF08', path: '/pages/manage/task-manage'},
|
||||
{id: 9, title: '出库确认', icon: 'RF09', path: '/pages/manage/out-storage-confirm'}
|
||||
{id: 1, title: '站点管理', icon: 'RF01', path: '/pages/manage/point-manage'},
|
||||
{id: 2, title: '指令管理', icon: 'RF02', path: '/pages/manage/inst-manage'},
|
||||
{id: 3, title: '任务管理', icon: 'RF03', path: '/pages/manage/task-manage'}
|
||||
],
|
||||
show: false,
|
||||
secM: []
|
||||
|
||||
@@ -8,17 +8,9 @@
|
||||
<input type="text" class="setup-input" placeholder="请输入服务器地址" v-model="addrip">
|
||||
</view>
|
||||
<view class="setup-item">
|
||||
<view class="setup-label">ACS地址</view>
|
||||
<input type="text" class="setup-input" placeholder="请输入ACS地址" v-model="acsip">
|
||||
</view>
|
||||
<view class="setup-item">
|
||||
<view class="setup-label">打印地址</view>
|
||||
<input type="text" class="setup-input" placeholder="请输入打印地址" v-model="printip">
|
||||
</view>
|
||||
<!-- <view class="setup-item">
|
||||
<view class="setup-label">刷新时间(s)</view>
|
||||
<input type="text" class="setup-input" placeholder="请输入刷新时间" v-model="setTime">
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
@@ -55,20 +47,6 @@
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.acsip === '') {
|
||||
uni.showToast({
|
||||
title: '请填写ACS地址',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.printip === '') {
|
||||
uni.showToast({
|
||||
title: '请填写打印地址',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.setTime === '') {
|
||||
uni.showToast({
|
||||
title: '请填写刷新时间',
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar title="入库"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="flow_wrapper" v-for="e in dataList" :key="e.point_code">
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-24">
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-2">
|
||||
<view class="zd-row flow_icon_item_1">
|
||||
<view class="iconfont icon_start_point"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-col-22">
|
||||
<view class="zd-row flow_start_item" @tap="checkcode(e)" :class="{'flow_start_item_checked': pkId === e.point_code}">
|
||||
<view class="zd-col-12 pdl20 pdr20 font-size-1">{{e.point_code}}</view>
|
||||
<view class="zd-col-12 pdr20 font-size-2">{{e.point_name}}</view>
|
||||
<view v-show="pkId === e.point_code" class="iconfont icon_choosed"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-bar_new">
|
||||
<button class="zd-col-11 submit-button_new" :class="{'btn-disabled': !pkId}" :disabled="disabled1" @tap="_callEmptyVehicle">呼叫空托</button>
|
||||
<button class="zd-col-11 submit-button_new" :class="{'btn-disabled': !pkId}" :disabled="disabled2" @tap="_fullVehicleIn">满托入库</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryPoints, callEmptyVehicle, fullVehicleIn} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dataList: [],
|
||||
disabled1: false,
|
||||
disabled2: false,
|
||||
pkId: ''
|
||||
};
|
||||
},
|
||||
created () {
|
||||
this._queryPoints()
|
||||
},
|
||||
methods: {
|
||||
/** 初始化查询 */
|
||||
async _queryPoints () {
|
||||
let res = await queryPoints('1')
|
||||
this.dataList = [...res]
|
||||
},
|
||||
checkcode (e) {
|
||||
this.pkId = this.pkId === e.point_code ? '' : e.point_code
|
||||
},
|
||||
/** 呼叫空托 */
|
||||
async _callEmptyVehicle () {
|
||||
this.disabled1 = true
|
||||
if (!this.pkId) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await callEmptyVehicle(this.pkId)
|
||||
this.disabled1 = false
|
||||
this.pkId = ''
|
||||
this._queryPoints()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
/** 满托入库 */
|
||||
async _fullVehicleIn () {
|
||||
this.disabled2 = true
|
||||
if (!this.pkId) {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await fullVehicleIn(this.pkId)
|
||||
this.disabled2 = false
|
||||
this.pkId = ''
|
||||
this._queryPoints()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
@@ -1,289 +0,0 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar title="人工组盘"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">载具类型</view>
|
||||
<view class="filter_input_wraper">
|
||||
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">载具编码</span>
|
||||
</view>
|
||||
<view class="filter_input_wraper">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">物料</span>
|
||||
</view>
|
||||
<view class="filter_input_wraper">
|
||||
<input type="text" class="filter_input filter_input_disabled pointer" v-model="val2" @tap="getMater">
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">物料数量</span>
|
||||
</view>
|
||||
<view class="filter_input_wraper">
|
||||
<input type="number" class="filter_input" v-model="val3">
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">当前点位</view>
|
||||
<view class="filter_input_wraper">
|
||||
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
|
||||
</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, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.checked}">
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
<td>{{e.vehicle_type}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.point_code}}</td>
|
||||
<td>{{e.material_qty}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-bar_new">
|
||||
<view class="zd-col-4">
|
||||
<view class="zd-row flexcol">
|
||||
<view class="iconfont icon_unchecked mgb10" :class="{'icon_checked': isV}" @tap="isVirtual"></view>
|
||||
<view class="filter_input_wraper_inn_text">是否配盘</view>
|
||||
</view>
|
||||
</view>
|
||||
<button class="zd-col-4 submit-button_new" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-5 submit-button_new" :class="{'btn-disabled': !index1 || !val1 || !val3 || !index2 || !$store.getters.publicObj}" :disabled="disabled1" @tap="_groupManual">开始组盘</button>
|
||||
<button class="zd-col-5 submit-button_new" :class="{'btn-disabled': checkArr.length === 0}" :disabled="disabled2" @tap="_groupLink">开始配盘</button>
|
||||
<button class="zd-col-4 submit-button_new" :class="{'btn-disabled': !val1 || (isV === true && printActive === false)}" :disabled="disabled3" @tap="_pdaPrintf">打印</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getCLodop} from "@/utils/CLodopfuncs.js"
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryPoints, getVehicleType, queryVehicleGroup, groupManual, groupLink, pdaPrintf} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
options1: [],
|
||||
index1: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
val3: '',
|
||||
val4: '',
|
||||
val5: '',
|
||||
options2: [],
|
||||
index2: '',
|
||||
dataList: [],
|
||||
isV: false,
|
||||
disabled1: false,
|
||||
disabled2: false,
|
||||
disabled3: false,
|
||||
checkArr: [],
|
||||
printActive: false
|
||||
};
|
||||
},
|
||||
created () {
|
||||
this._getVehicleType()
|
||||
this._queryPoints()
|
||||
this._queryVehicleGroup()
|
||||
},
|
||||
destroyed () {
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
},
|
||||
onShow() {
|
||||
if (this.$store.getters.publicObj) {
|
||||
this.val2 = this.$store.getters.publicObj.material_name
|
||||
this.val4 = this.$store.getters.publicObj.material_id
|
||||
this.val5 = this.$store.getters.publicObj.material_code
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 选择器 */
|
||||
selectChange1(e) {
|
||||
this.index1 = e
|
||||
},
|
||||
selectChange2(e) {
|
||||
this.index2 = e
|
||||
},
|
||||
/** 载具类型下拉框 */
|
||||
async _getVehicleType () {
|
||||
let res = await getVehicleType()
|
||||
this.options1 = [...res]
|
||||
},
|
||||
/** 点位下拉框 */
|
||||
async _queryPoints () {
|
||||
let res = await queryPoints('1')
|
||||
res.map(el => {
|
||||
this.$set(el, 'value', el.point_code)
|
||||
this.$set(el, 'text', el.point_name)
|
||||
})
|
||||
this.options2 = [...res]
|
||||
},
|
||||
/** grid */
|
||||
async _queryVehicleGroup () {
|
||||
let res = await queryVehicleGroup()
|
||||
res.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
})
|
||||
this.dataList = [...res]
|
||||
},
|
||||
getMater () {
|
||||
uni.navigateTo({
|
||||
url: '/pages/manage/search-mater-1'
|
||||
})
|
||||
},
|
||||
toCheck (e) {
|
||||
e.checked = !e.checked
|
||||
this.checkArr = this.dataList.filter(i => { return i.checked === true })
|
||||
},
|
||||
isVirtual () {
|
||||
this.isV = !this.isV
|
||||
},
|
||||
/** 开始组盘 */
|
||||
async _groupManual () {
|
||||
this.disabled1 = true
|
||||
if (!this.index1 || !this.val1 || !this.val3 || !this.index2 || !this.$store.getters.publicObj) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await groupManual(this.index1, this.val1, this.index2, this.val4, this.val5, this.val3, this.isV)
|
||||
this.disabled1 = false
|
||||
this.checkArr = []
|
||||
this._queryVehicleGroup()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
/** 开始配盘 */
|
||||
async _groupLink () {
|
||||
this.disabled2 = true
|
||||
if (this.checkArr.length === 0) {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let arr = []
|
||||
this.checkArr.map(el => {
|
||||
if (el.checked) {
|
||||
arr.push({group_id: el.group_id, vehicle_code: this.val1})
|
||||
}
|
||||
})
|
||||
let res = await groupLink(arr)
|
||||
this.disabled2 = false
|
||||
this.checkArr = []
|
||||
this.printActive = true
|
||||
this._queryVehicleGroup()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.index1 = ''
|
||||
this.index2 = ''
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.val3 = ''
|
||||
this.printActive = false
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
},
|
||||
/** 打印 */
|
||||
async _pdaPrintf () {
|
||||
this.disabled3 = true
|
||||
if (!this.val1 || (this.isV === true && this.printActive === false)) {
|
||||
this.disabled3 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await pdaPrintf(this.val1)
|
||||
this.disabled3 = false
|
||||
if (JSON.stringify(res) !== '{}') {
|
||||
setTimeout(this.toPrint(res), 800)
|
||||
}
|
||||
} catch (e) {
|
||||
this.disabled3 = false
|
||||
}
|
||||
},
|
||||
toPrint (data) {
|
||||
let iparr = this.$store.getters.printUrl.split(":")
|
||||
let printUrl = iparr[1].slice(2)
|
||||
let LODOP = getCLodop();
|
||||
if (!(LODOP.webskt && LODOP.webskt.readyState === 1)) {
|
||||
uni.showToast({
|
||||
title: '当前配置ip:' + printUrl + '网络不通,请检查',
|
||||
icon: 'none',
|
||||
duration: 5000
|
||||
})
|
||||
return
|
||||
}
|
||||
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮
|
||||
LODOP.SET_LICENSES('浙江省烟草专卖局(公司)', 'C0C4A46A3A0D1F526D426018D9F11921', '', '')
|
||||
// 更换为打印服务器ip 不需要加前缀
|
||||
LODOP.PRINT_INIT(null, printUrl);
|
||||
// 打印机序号 规则为打印服务器打印机列表倒数从0开始 -1为默认打印机
|
||||
LODOP.SET_PRINTER_INDEX(-1);
|
||||
// 设置打印纸大小
|
||||
LODOP.SET_PRINT_PAGESIZE(1, '80mm', '60mm', '');
|
||||
LODOP.ADD_PRINT_RECT('1mm', '3mm', '74mm', '54mm', 0, 1);
|
||||
LODOP.SET_PRINT_STYLE('FontSize', 12);
|
||||
LODOP.SET_PRINT_STYLE('Bold', 1);
|
||||
LODOP.ADD_PRINT_BARCODE('2mm', '4mm', '32mm', '32mm', 'QRCode', data.vehicle_code + '##' + data.material_code + '##' + data.material_qty + '##' + data.pcsn + '##' + data.print_time);
|
||||
LODOP.ADD_PRINT_TEXT('5mm', '35mm', '50mm', '15mm', '载具编码:' + data.vehicle_code);
|
||||
LODOP.ADD_PRINT_TEXT('15mm', '35mm', '50mm', '15mm', '物料编码:' + data.material_code);
|
||||
LODOP.ADD_PRINT_TEXT('25mm', '35mm', '50mm', '15mm', '物料名称:' + data.material_name);
|
||||
LODOP.ADD_PRINT_TEXT('34mm', '5mm', '80mm', '15mm', '物料数量:' + data.material_qty);
|
||||
LODOP.ADD_PRINT_TEXT('41mm', '5mm', '80mm', '15mm', '配盘批次:' + data.pcsn);
|
||||
LODOP.ADD_PRINT_TEXT('48mm', '5mm', '80mm', '15mm', '打印时间:' + data.print_time);
|
||||
LODOP.PRINT(); // 打印
|
||||
// LODOP.PREVIEW()
|
||||
uni.showToast({
|
||||
title: '打印成功',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
@@ -1,262 +0,0 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar title="出库"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">物料</span>
|
||||
</view>
|
||||
<view class="filter_input_wraper">
|
||||
<input type="text" class="filter_input filter_input_disabled pointer" v-model="val1" @tap="getMater">
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">起点点位</span>
|
||||
</view>
|
||||
<view class="filter_input_wraper">
|
||||
<input type="text" class="filter_input" v-model="val2">
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">终点点位</span>
|
||||
</view>
|
||||
<view class="filter_input_wraper">
|
||||
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
|
||||
</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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.group_id === pkId}">
|
||||
<td>{{e.point_code}}</td>
|
||||
<td>{{e.point_name}}</td>
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.material_qty}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-bar_new">
|
||||
<button class="zd-col-4 submit-button_new" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-6 submit-button_new" :class="{'btn-disabled': !val2 || !index1}" :disabled="disabled1" @tap="_fullVehicleOut">满托出库</button>
|
||||
<button class="zd-col-6 submit-button_new" @tap="popUp(1)">余料回库</button>
|
||||
<button class="zd-col-7 submit-button_new" @tap="popUp(2)">满托出库确认</button>
|
||||
</view>
|
||||
<view class="msg_wrapper" :class="show ? 'popshow' : 'pophide'">
|
||||
<view class="msg_box">
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">当前点位</view>
|
||||
<view class="filter_input_wraper">
|
||||
<uni-data-select v-model="index2" :localdata="options1" @change="selectChange2"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">载具编码</view>
|
||||
<view class="filter_input_wraper">
|
||||
<search-box
|
||||
v-model="val3"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">物料数量</view>
|
||||
<view class="filter_input_wraper">
|
||||
<input type="number" class="filter_input" v-model="val4">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row msg_btns">
|
||||
<button class="zd-col-9 msg_btn_cancle" @tap="toClear">清空</button>
|
||||
<button class="zd-col-13 msg_btn" :class="{'btn-disabled': !index2 || !val3 || !val4}" :disabled="disabled2" @tap="toConfirm">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="show" class="msg_mask" @click.stop="show = false"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryLinkMaterial, queryPoints, fullVehicleOut, vehicleGoBack, fullVehicleOutConfirm} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
val1: '',
|
||||
val2: '',
|
||||
options1: [],
|
||||
index1: '',
|
||||
index2: '',
|
||||
val3: '',
|
||||
val4: '',
|
||||
dataList: [],
|
||||
disabled1: false,
|
||||
disabled2: false,
|
||||
disabled3: false,
|
||||
pkId: '',
|
||||
show: false,
|
||||
type: ''
|
||||
};
|
||||
},
|
||||
created () {
|
||||
this._queryPoints()
|
||||
},
|
||||
destroyed () {
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
},
|
||||
onShow() {
|
||||
if (this.$store.getters.publicObj) {
|
||||
this.val1 = this.$store.getters.publicObj.material_name
|
||||
this._queryLinkMaterial(this.$store.getters.publicObj.material_id)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getMater () {
|
||||
uni.navigateTo({
|
||||
url: '/pages/manage/search-mater-1'
|
||||
})
|
||||
},
|
||||
/** grid查询 */
|
||||
async _queryLinkMaterial (e) {
|
||||
let res = await queryLinkMaterial(e)
|
||||
this.dataList = [...res]
|
||||
},
|
||||
/** 选择器 */
|
||||
selectChange1(e) {
|
||||
this.index1 = e
|
||||
},
|
||||
selectChange2(e) {
|
||||
this.index2 = e
|
||||
},
|
||||
/** 点位下拉框 */
|
||||
async _queryPoints () {
|
||||
let res = await queryPoints('2')
|
||||
res.map(el => {
|
||||
this.$set(el, 'value', el.point_code)
|
||||
this.$set(el, 'text', el.point_name)
|
||||
})
|
||||
this.options1 = [...res]
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.group_id ? '' : e.group_id
|
||||
this.val2 = this.pkId === e.group_id ? e.point_code : ''
|
||||
},
|
||||
/** 满托出库 */
|
||||
async _fullVehicleOut () {
|
||||
this.disabled1 = true
|
||||
if (!this.val2 || !this.index1) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await fullVehicleOut(this.val2, this.index1)
|
||||
this.disabled1 = false
|
||||
this._queryLinkMaterial(this.$store.getters.publicObj.material_id)
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
|
||||
popUp (type) {
|
||||
this.show = true
|
||||
this.type = type
|
||||
},
|
||||
toClear () {
|
||||
this.index2 = ''
|
||||
this.val3 =''
|
||||
this.val4 =''
|
||||
},
|
||||
toConfirm () {
|
||||
if (this.type === 1) {
|
||||
this._vehicleGoBack()
|
||||
}
|
||||
if (this.type === 2) {
|
||||
this._fullVehicleOutConfirm()
|
||||
}
|
||||
},
|
||||
/** 余料回库 */
|
||||
async _vehicleGoBack () {
|
||||
this.disabled2 = true
|
||||
if (!this.index2 || !this.val3 || !this.val4) {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await vehicleGoBack(this.index2, this.val3, this.val4)
|
||||
this.disabled2 = false
|
||||
this.toClear()
|
||||
this.show = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
this.toClear()
|
||||
this.show = false
|
||||
}
|
||||
},
|
||||
/** 满托出库确认 */
|
||||
async _fullVehicleOutConfirm () {
|
||||
this.disabled2 = true
|
||||
if (!this.index2 || !this.val3 || !this.val4) {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await fullVehicleOutConfirm(this.index2, this.val3, this.val4)
|
||||
this.disabled2 = false
|
||||
this.toClear()
|
||||
this.show = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
this.toClear()
|
||||
this.show = false
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.index1 = ''
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.dataList = []
|
||||
this.pkId = ''
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
@@ -1,77 +0,0 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar :inner2="true" @goIn="goIn" title="物料查询"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>物料编码</th>
|
||||
<th>物料名称</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.material_id === pkId}">
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-bar_new">
|
||||
<button class="zd-col-24 submit-button_new" :class="{'btn-disabled': !pkId}" @tap="toSure">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryMaterial} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {}
|
||||
};
|
||||
},
|
||||
created () {
|
||||
this._getMaterial()
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
this._getMaterial(e)
|
||||
},
|
||||
async _getMaterial (e) {
|
||||
let res = await queryMaterial(e)
|
||||
this.dataList = [...res]
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.material_id ? '' : e.material_id
|
||||
this.pkObj = this.pkId === e.material_id ? e : {}
|
||||
},
|
||||
toSure () {
|
||||
if (!this.pkId) {
|
||||
return
|
||||
}
|
||||
this.$store.dispatch('setPublicObj', this.pkObj)
|
||||
this.goIn()
|
||||
|
||||
},
|
||||
goIn () {
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
@@ -1,103 +0,0 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar :inner2="true" @goIn="goIn" title="物料查询"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">物料Id</span>
|
||||
</view>
|
||||
<view class="filter_input_wraper">
|
||||
<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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.material_id === pkId}">
|
||||
<td>{{e.point_code}}</td>
|
||||
<td>{{e.point_name}}</td>
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.material_qty}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-bar_new">
|
||||
<button class="zd-col-11 submit-button_new" :class="{'btn-disabled': !pkId}" @tap="toSure">确认</button>
|
||||
<button class="zd-col-11 submit-button_new" @tap="searchList">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryLinkMaterial} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
val1: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
this._getMaterial(e)
|
||||
},
|
||||
searchList () {
|
||||
this._getMaterial(this.val1)
|
||||
},
|
||||
/** grid查询 */
|
||||
async _getMaterial (e) {
|
||||
let res = await queryLinkMaterial(e)
|
||||
this.dataList = [...res]
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.material_id ? '' : e.material_id
|
||||
this.pkObj = this.pkId === e.material_id ? e : {}
|
||||
},
|
||||
toSure () {
|
||||
if (!this.pkId) {
|
||||
return
|
||||
}
|
||||
this.$store.dispatch('setPublicObj', this.pkObj)
|
||||
this.goIn()
|
||||
|
||||
},
|
||||
goIn () {
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
@@ -1,132 +0,0 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar title="任务流转"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="flow_wrapper" v-for="e in dataList" :key="e.point_code">
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-24">
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-2">
|
||||
<view class="zd-row flow_icon_item_1">
|
||||
<view class="iconfont icon_start_point"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-col-22">
|
||||
<view class="zd-row flow_start_item" @tap="checkcode1(e)" :class="{'flow_start_item_checked': pkId1 === e.point_id}">
|
||||
<view class="zd-col-8 pdl20 pdr20 font-size-1">{{e.point_code}}</view>
|
||||
<view class="zd-col-16 pdr20 font-size-2">{{e.point_name}}</view>
|
||||
<view v-show="pkId1 === e.point_code" class="iconfont icon_choosed"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-24">
|
||||
<view class="zd-row flow_icon_item_2">
|
||||
<view class="iconfont icon_vdash_line"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-24">
|
||||
<view class="zd-row flexstart">
|
||||
<view class="zd-col-2">
|
||||
<view class="zd-row flow_icon_item_1">
|
||||
<view class="iconfont icon_start_point"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-col-22">
|
||||
<view class="zd-row mgb10 flow_start_item" v-for="el in e.end_points" :key="el.point_code" @tap="checkcode2(el, e)" :class="{'flow_start_item_checked': pkId2 === el.point_id}">
|
||||
<view class="zd-col-8 pdl20 pdr20 font-size-1">{{el.point_code}}</view>
|
||||
<view class="zd-col-16 pdr20 font-size-2">{{el.point_name}}</view>
|
||||
<view v-show="pkId2 === el.point_code" class="iconfont icon_choosed"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-bar_new">
|
||||
<button class="zd-col-24 submit-button_new" :class="{'btn-disabled': !pkId1}" :disabled="disabled" @tap="toSure">生成任务</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryAllPoints, createP2pTask} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dataList: [],
|
||||
disabled: false,
|
||||
pkId1: '',
|
||||
pkId2: '',
|
||||
pid1: '',
|
||||
pid2: '',
|
||||
pd2: ''
|
||||
};
|
||||
},
|
||||
created () {
|
||||
this._queryAllPoints()
|
||||
},
|
||||
methods: {
|
||||
/** 初始化查询 */
|
||||
async _queryAllPoints () {
|
||||
let res = await queryAllPoints()
|
||||
this.dataList = [...res]
|
||||
},
|
||||
checkcode1 (e) {
|
||||
if (this.pid2 !== '' && e.point_id !== this.pid2) {
|
||||
this.pkId2 = ''
|
||||
this.pid2 = ''
|
||||
this.pd2 = ''
|
||||
}
|
||||
this.pkId1 = this.pkId1 === e.point_id ? '' : e.point_id
|
||||
this.pid1 = this.pkId1 === e.point_id ? e.point_code : ''
|
||||
},
|
||||
checkcode2 (el, e) {
|
||||
if (this.pkId1 !== '' && this.pkId1 !== e.point_id) {
|
||||
return
|
||||
}
|
||||
this.pkId2 = this.pkId2 === el.point_id ? '' : el.point_id
|
||||
this.pid2 = this.pkId2 === el.point_id ? e.point_id : ''
|
||||
this.pd2 = this.pkId2 === el.point_id ? el.point_code : ''
|
||||
},
|
||||
/** 重新下发 */
|
||||
async toSure () {
|
||||
this.disabled = true
|
||||
if (!this.pkId1) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await createP2pTask(this.pid1, this.pd2)
|
||||
this.disabled = false
|
||||
this.pkId1 = ''
|
||||
this.pkId2 = ''
|
||||
this.pid1 = ''
|
||||
this.pid2 = ''
|
||||
this.pd2 = ''
|
||||
this._queryAllPoints()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
@@ -1,108 +0,0 @@
|
||||
<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-17 filter_picker">
|
||||
<picker @change="pickerChange" :value="index1" :range="options1" range-key="text">
|
||||
<view class="uni-input">{{index1 !== '' ? options1[index1].text : ''}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<uni-icons type="right" size="14" color="#999"></uni-icons>
|
||||
</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="val1"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">点位编码</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<search-box
|
||||
v-model="val2"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-11 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-11 button-primary" :class="{'button-info': index1 === '' || !val1 || !val2}" :disabled="disabled" @tap="_emptyInStore">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getVehicleType, emptyInStore} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
options1: [],
|
||||
index1: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._getVehicleType()
|
||||
},
|
||||
methods: {
|
||||
/** 载具类型下拉框 */
|
||||
async _getVehicleType () {
|
||||
let res = await getVehicleType()
|
||||
this.options1 = [...res]
|
||||
},
|
||||
pickerChange (e) {
|
||||
this.index1 = e.detail.value
|
||||
},
|
||||
async _emptyInStore () {
|
||||
this.disabled = true
|
||||
if (this.index1 === '' || !this.val1 || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await emptyInStore(this.options1[this.index1].value, this.val1, this.val2)
|
||||
this.clearUp()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.index1 = ''
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
@@ -1,106 +0,0 @@
|
||||
<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-17 filter_picker">
|
||||
<picker @change="pickerChange" :value="index1" :range="options1" range-key="text">
|
||||
<view class="uni-input">{{index1 !== '' ? options1[index1].text : ''}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<uni-icons type="right" size="14" color="#999"></uni-icons>
|
||||
</view>
|
||||
<!-- <view class="zd-row">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">点位编码</span>
|
||||
</view>
|
||||
<view class="zd-col-19 filter_select">
|
||||
<zxz-uni-data-select v-model="index2" filterable :localdata="options2"></zxz-uni-data-select>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">点位编码</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-11 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-11 button-primary" :class="{'button-info': index1 === '' || !val1}" :disabled="disabled" @tap="_callEmptyVehicle">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getVehicleType, callEmptyVehicle} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
options1: [],
|
||||
index1: '',
|
||||
// options2: [],
|
||||
// index2: '',
|
||||
val1: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._getVehicleType()
|
||||
},
|
||||
methods: {
|
||||
/** 载具类型下拉框 */
|
||||
async _getVehicleType () {
|
||||
let res = await getVehicleType()
|
||||
this.options1 = [...res]
|
||||
},
|
||||
pickerChange (e) {
|
||||
this.index1 = e.detail.value
|
||||
},
|
||||
async _callEmptyVehicle () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || this.index1 === '') {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await callEmptyVehicle(this.options1[this.index1].value, this.val1)
|
||||
this.clearUp()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.index1 = ''
|
||||
this.val1 = ''
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
@@ -1,146 +0,0 @@
|
||||
<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">
|
||||
<zxz-uni-data-select v-model="index1" filterable :localdata="options1" @change="selectChange1"></zxz-uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">起点点位</span>
|
||||
</view>
|
||||
<view class="zd-col-19 filter_select">
|
||||
<zxz-uni-data-select v-model="index2" filterable :localdata="options2"></zxz-uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">终点区域</span>
|
||||
</view>
|
||||
<view class="zd-col-19 filter_select">
|
||||
<zxz-uni-data-select v-model="index3" filterable :localdata="options3" @change="selectChange3"></zxz-uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">终点点位</span>
|
||||
</view>
|
||||
<view class="zd-col-19 filter_select">
|
||||
<zxz-uni-data-select v-model="index4" filterable :localdata="options4"></zxz-uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-11 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-11 button-primary" :class="{'button-info': !index2 || !index4}" :disabled="disabled" @tap="_taskConfirm">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryDevice, taskConfirm} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
options1: [],
|
||||
index1: '',
|
||||
options2: [],
|
||||
index2: '',
|
||||
options3: [],
|
||||
index3: '',
|
||||
options4: [],
|
||||
index4: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._queryDevice()
|
||||
},
|
||||
methods: {
|
||||
/** 点位下拉框 */
|
||||
async _queryDevice () {
|
||||
let res = await queryDevice()
|
||||
res.map(el => {
|
||||
this.$set(el, 'value', el.region_code)
|
||||
this.$set(el, 'text', el.region_name)
|
||||
})
|
||||
this.options1 = [...res]
|
||||
this.options3 = [...res]
|
||||
},
|
||||
selectChange1 (e) {
|
||||
this.options2 = []
|
||||
this.options1.map(el => {
|
||||
if (el.value === e) {
|
||||
this.options2 = [...el.deviceArr]
|
||||
}
|
||||
})
|
||||
if (this.options2.length > 0) {
|
||||
this.options2.map(ele => {
|
||||
this.$set(ele, 'value', ele.point_code)
|
||||
this.$set(ele, 'text', ele.point_name)
|
||||
})
|
||||
}
|
||||
},
|
||||
selectChange3 (e) {
|
||||
this.options4 = []
|
||||
this.options3.map(el => {
|
||||
if (el.value === e) {
|
||||
this.options4 = [...el.deviceArr]
|
||||
}
|
||||
})
|
||||
if (this.options4.length > 0) {
|
||||
this.options4.map(ele => {
|
||||
this.$set(ele, 'value', ele.point_code)
|
||||
this.$set(ele, 'text', ele.point_name)
|
||||
})
|
||||
}
|
||||
},
|
||||
async _taskConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.index2 || this.index4 === '') {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await taskConfirm(this.index2, this.index4)
|
||||
this.clearUp()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.index1 = ''
|
||||
this.index2 = ''
|
||||
this.index3 = ''
|
||||
this.index4 = ''
|
||||
this.options2 = []
|
||||
this.options4 = []
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
@@ -1,352 +0,0 @@
|
||||
<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-17 filter_picker">
|
||||
<picker @change="pickerChange" :value="index1" :range="options1" range-key="text">
|
||||
<view class="uni-input">{{index1 !== '' ? options1[index1].text : ''}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<uni-icons type="right" size="14" color="#999"></uni-icons>
|
||||
</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="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 filter_select">
|
||||
<zxz-uni-data-select v-model="index2" filterable :localdata="options2"></zxz-uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">物料数量</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<input type="number" class="filter_input" v-model="val2">
|
||||
</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="val3"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">是否配盘</span>
|
||||
</view>
|
||||
<view class="zd-col-19 zd-row jcflexend">
|
||||
<switch :checked="isSwitchOn" color="#4e6ef2" style="transform:scale(0.7)" @change="switch1Change"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="fontcol1">载具编码</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="toChose(e)" :class="{'checked': e.point_code === pkId}">
|
||||
<td class="fontcol1">{{e.vehicle_code}}</td>
|
||||
<td><view class="fontbg">{{e.vehicle_type}}</view></td>
|
||||
<td class="fontcol2">{{e.material_code}}</td>
|
||||
<td class="fontcol2">{{e.material_name}}</td>
|
||||
<td>{{e.point_code}}</td>
|
||||
<td>{{e.material_qty}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-4 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-4 button-primary" :class="{'button-info': index1 === '' || !val1 || !val3 || !index2 || !val2}" :disabled="disabled1" @tap="_groupManual">组盘</button>
|
||||
<button class="zd-col-4 button-primary" @tap="_queryVehicleGroup">配盘</button>
|
||||
<button class="zd-col-4 button-primary" :class="{'button-info': !pkId}" :disabled="disabled3" @tap="_pdaPrintf">打印</button>
|
||||
<button class="zd-col-4 button-primary" :class="{'button-info': !pkId}" :disabled="disabled4" @tap="_fullVehicleIn">入库</button>
|
||||
</view>
|
||||
<view class="zd_content msg_wrapper" :class="show ? 'popshow' : 'pophide'">
|
||||
<view class="msg_content">
|
||||
<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 in dataList1" :key="e.group_id" @click="toCheck(e)" :class="{'checked': e.checked}">
|
||||
<td class="fontcol1">{{e.vehicle_code}}</td>
|
||||
<td><view class="fontbg">{{e.vehicle_type}}</view></td>
|
||||
<td class="fontcol2">{{e.material_code}}</td>
|
||||
<td class="fontcol2">{{e.material_name}}</td>
|
||||
<td>{{e.point_code}}</td>
|
||||
<td>{{e.material_qty}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-9 button-default" @tap.stop="show = false">取消</button>
|
||||
<button class="zd-col-13 button-primary" :class="{'button-info': checkArr.length === 0}" :disabled="disabled2" @tap="_groupLink">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="show" class="msg_mask"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getCLodop} from "@/utils/CLodopfuncs.js"
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getVehicleType, queryMaterial, queryExistGroup, groupManual, queryVehicleGroup, groupLink, pdaPrintf, fullVehicleIn} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
options1: [],
|
||||
index1: '',
|
||||
options2: [],
|
||||
index2: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
val3: '',
|
||||
isSwitchOn: false,
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
disabled1: false,
|
||||
show: false,
|
||||
dataList1: [],
|
||||
checkArr: [],
|
||||
disabled2: false,
|
||||
disabled3: false,
|
||||
disabled4: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._getVehicleType()
|
||||
this._queryMaterial()
|
||||
this._queryExistGroup()
|
||||
},
|
||||
methods: {
|
||||
/** 载具类型下拉框 */
|
||||
async _getVehicleType () {
|
||||
let res = await getVehicleType()
|
||||
this.options1 = [...res]
|
||||
},
|
||||
pickerChange (e) {
|
||||
this.index1 = e.detail.value
|
||||
},
|
||||
/** 物料下拉框*/
|
||||
async _queryMaterial (e) {
|
||||
let res = await queryMaterial(e)
|
||||
res.map(el => {
|
||||
this.$set(el, 'value', el.material_id)
|
||||
this.$set(el, 'text', el.material_name)
|
||||
})
|
||||
this.options2 = [...res]
|
||||
},
|
||||
/** 是否配盘 */
|
||||
switch1Change: function (e) {
|
||||
this.isSwitchOn = e.detail.value
|
||||
},
|
||||
/** 查询已配盘的组盘信息 */
|
||||
async _queryExistGroup () {
|
||||
let res = await queryExistGroup()
|
||||
this.dataList = [...res]
|
||||
},
|
||||
/** 组盘 */
|
||||
async _groupManual () {
|
||||
this.disabled1 = true
|
||||
if (this.index1 === '' || !this.val1 || !this.val3 || !this.index2 || !this.val2) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let code = ''
|
||||
this.options2.map(el => {
|
||||
if (el.value === this.index2) {
|
||||
code = el.material_code
|
||||
}
|
||||
})
|
||||
let res = await groupManual(this.options1[this.index1].value, this.val1, this.val3, this.index2, code, this.val2, this.isSwitchOn)
|
||||
this.clearUp()
|
||||
this._queryExistGroup()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.index1 = ''
|
||||
this.val1 = ''
|
||||
this.val3 = ''
|
||||
this.index2 = ''
|
||||
this.val2 = ''
|
||||
this.isSwitchOn = false
|
||||
this.disabled1 = false
|
||||
},
|
||||
/** 获取待配盘信息 */
|
||||
async _queryVehicleGroup () {
|
||||
this.dataList1 = []
|
||||
this.checkArr = []
|
||||
this.disabled2 = false
|
||||
let res = await queryVehicleGroup()
|
||||
res.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
})
|
||||
this.dataList1 = [...res]
|
||||
this.show = true
|
||||
},
|
||||
toCheck (e) {
|
||||
e.checked = !e.checked
|
||||
this.checkArr = this.dataList1.filter(i => { return i.checked === true })
|
||||
},
|
||||
/** 配盘确定 */
|
||||
async _groupLink () {
|
||||
this.disabled2 = true
|
||||
if (this.checkArr.length === 0) {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await groupLink(this.checkArr)
|
||||
this.disabled2 = false
|
||||
this.show = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this._queryExistGroup()
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
}
|
||||
},
|
||||
toChose (e) {
|
||||
this.pkId = this.pkId === e.point_code ? '' : e.point_code
|
||||
this.pkObj = this.pkId === e.point_code ? e : {}
|
||||
},
|
||||
/** 打印 */
|
||||
async _pdaPrintf () {
|
||||
this.disabled3 = true
|
||||
if (!this.pkId) {
|
||||
this.disabled3 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await pdaPrintf(this.pkObj.vehicle_code)
|
||||
this.disabled3 = false
|
||||
this.pkId = ''
|
||||
if (JSON.stringify(res) !== '{}') {
|
||||
setTimeout(this.toPrint(res), 800)
|
||||
}
|
||||
} catch (e) {
|
||||
this.disabled3 = false
|
||||
}
|
||||
},
|
||||
toPrint (data) {
|
||||
let iparr = this.$store.getters.printUrl.split(":")
|
||||
let printUrl = iparr[1].slice(2)
|
||||
let LODOP = getCLodop();
|
||||
if (!(LODOP.webskt && LODOP.webskt.readyState === 1)) {
|
||||
uni.showToast({
|
||||
title: '当前配置ip:' + printUrl + '网络不通,请检查',
|
||||
icon: 'none',
|
||||
duration: 5000
|
||||
})
|
||||
return
|
||||
}
|
||||
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮
|
||||
LODOP.SET_LICENSES('浙江省烟草专卖局(公司)', 'C0C4A46A3A0D1F526D426018D9F11921', '', '')
|
||||
// 更换为打印服务器ip 不需要加前缀
|
||||
LODOP.PRINT_INIT(null, printUrl);
|
||||
// 打印机序号 规则为打印服务器打印机列表倒数从0开始 -1为默认打印机
|
||||
LODOP.SET_PRINTER_INDEX(-1);
|
||||
// 设置打印纸大小
|
||||
LODOP.SET_PRINT_PAGESIZE(1, '80mm', '60mm', '');
|
||||
LODOP.ADD_PRINT_RECT('1mm', '3mm', '74mm', '54mm', 0, 1);
|
||||
LODOP.SET_PRINT_STYLE('FontSize', 12);
|
||||
LODOP.SET_PRINT_STYLE('Bold', 1);
|
||||
LODOP.ADD_PRINT_BARCODE('2mm', '4mm', '32mm', '32mm', 'QRCode', data.vehicle_code + '##' + data.material_code + '##' + data.material_qty + '##' + data.pcsn + '##' + data.print_time);
|
||||
LODOP.ADD_PRINT_TEXT('5mm', '35mm', '50mm', '15mm', '载具编码:' + data.vehicle_code);
|
||||
LODOP.ADD_PRINT_TEXT('15mm', '35mm', '50mm', '15mm', '物料编码:' + data.material_code);
|
||||
LODOP.ADD_PRINT_TEXT('25mm', '35mm', '50mm', '15mm', '物料名称:' + data.material_name);
|
||||
LODOP.ADD_PRINT_TEXT('34mm', '5mm', '80mm', '15mm', '物料数量:' + data.material_qty);
|
||||
LODOP.ADD_PRINT_TEXT('41mm', '5mm', '80mm', '15mm', '配盘批次:' + data.pcsn);
|
||||
LODOP.ADD_PRINT_TEXT('48mm', '5mm', '80mm', '15mm', '打印时间:' + data.print_time);
|
||||
LODOP.PRINT(); // 打印
|
||||
// LODOP.PREVIEW()
|
||||
uni.showToast({
|
||||
title: '打印成功',
|
||||
icon: 'none'
|
||||
})
|
||||
},
|
||||
/** 入库 */
|
||||
async _fullVehicleIn () {
|
||||
this.disabled4 = true
|
||||
if (!this.pkId) {
|
||||
this.disabled4 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await fullVehicleIn(this.pkId)
|
||||
this.disabled4 = false
|
||||
this.pkId = ''
|
||||
this._queryExistGroup()
|
||||
} catch (e) {
|
||||
this.disabled4 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
186
pages/manage/inst-manage.vue
Normal file
186
pages/manage/inst-manage.vue
Normal file
@@ -0,0 +1,186 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar :title="title" :searchActive="true" @toSearch="toSearch"></nav-bar>
|
||||
<view class="zd_content pdt0">
|
||||
<view class="filter_wrapper">
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-8 font-style-1" v-for="e in state" :key="e.id" @tap="changeTab(e)">
|
||||
<view class="font-style-1" :class="{'font-style-2': e.id === tab}">{{e.text}}</view>
|
||||
<view class="tab-line" :class="{'tab-line_active': e.id === tab}"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<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 mgb10">
|
||||
<view class="zd-col-24 item-font-1">{{e.task_no}} | {{['就绪', '执行中', '完成','取消'][Number(e.inst_status)]}}</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-16">
|
||||
<view class="item-font-2 mgb10">{{e.create_time}} | {{['请求取货', '取货完成', '请求放货', '放货完成'][Number(e.inst_step) - 1]}}</view>
|
||||
<view class="zd-row mgb10">
|
||||
<view class="zd-col-6 item-font-3">指令号:</view>
|
||||
<view class="zd-col-18 item-font-4">{{e.instruction_code}}</view>
|
||||
</view>
|
||||
<view class="zd-row mgb10">
|
||||
<view class="zd-col-6 item-font-3">载具号:</view>
|
||||
<view class="zd-col-18 item-font-4">{{e.carrier}}</view>
|
||||
</view>
|
||||
<view class="zd-row mgb10">
|
||||
<view class="zd-col-6 item-font-3">车号:</view>
|
||||
<view class="zd-col-18 item-font-4">{{e.carno}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-col-8">
|
||||
<view class="item-font-5">{{e.priority}}</view>
|
||||
<view class="item-font-8">优先级</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-4 item-font-3">点位:</view>
|
||||
<view class="zd-col-8 item-font-6">{{e.start_devicecode}}</view>
|
||||
<view class="zd-col-4 item-font-7">–</view>
|
||||
<view class="zd-col-8 item-font-6">{{e.next_devicecode}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_handInst('1')">指令撤销</button>
|
||||
<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>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {handInsts, handInst} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
state: [{id:'-1', text: '全部'}, {id:'0', text: '就绪'}, {id:'1', text: '执行中'}, {id:'2', text: '完成'}, {id:'3', text: '取消'}],
|
||||
tab: '-1',
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
val3: '',
|
||||
data: [],
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._handInsts()
|
||||
},
|
||||
methods: {
|
||||
toSearch () {
|
||||
this.show = true
|
||||
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]
|
||||
|
||||
} catch (e) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
changeTab (e) {
|
||||
this.tab = e.id
|
||||
if (e.id !== '-1') {
|
||||
let arr = this.data.filter(el => {return el.inst_status === e.id})
|
||||
this.dataList = [...arr]
|
||||
} else {
|
||||
this.dataList = [...this.data]
|
||||
}
|
||||
},
|
||||
async _handInst (type) {
|
||||
this.disabled = true
|
||||
if (!this.pkId) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await handInst(type, this.pkId)
|
||||
this.disabled = false
|
||||
this.tab = '-1'
|
||||
this._handInsts()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} 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
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
@@ -1,139 +0,0 @@
|
||||
<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">
|
||||
<zxz-uni-data-select v-model="index1" filterable :localdata="options1" @change="selectChange"></zxz-uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">出库点位</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="fontcol1">点位编码</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="toChose(e)" :class="{'checked': e.point_code === pkId}">
|
||||
<td class="fontcol1">{{e.point_code}}</td>
|
||||
<td class="fontcol2">{{e.point_name}}</td>
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.material_qty}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-11 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-11 button-primary" :class="{'button-info': !pkId || !val1}" :disabled="disabled" @tap="_fullVehicleOut">出库</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryMaterial, queryLinkMaterial, fullVehicleOut} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
options1: [],
|
||||
index1: '',
|
||||
val1: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._queryMaterial()
|
||||
},
|
||||
methods: {
|
||||
/** 物料下拉框*/
|
||||
async _queryMaterial (e) {
|
||||
let res = await queryMaterial(e)
|
||||
res.map(el => {
|
||||
this.$set(el, 'value', el.material_id)
|
||||
this.$set(el, 'text', el.material_name)
|
||||
})
|
||||
this.options1 = [...res]
|
||||
},
|
||||
selectChange (e) {
|
||||
this._queryLinkMaterial(e)
|
||||
},
|
||||
/** grid */
|
||||
async _queryLinkMaterial (e) {
|
||||
let res = await queryLinkMaterial(e)
|
||||
this.dataList = [...res]
|
||||
},
|
||||
toChose (e) {
|
||||
this.pkId = this.pkId === e.point_code ? '' : e.point_code
|
||||
},
|
||||
async _fullVehicleOut () {
|
||||
this.disabled = true
|
||||
if (!this.pkId || !this.val1) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await fullVehicleOut(this.pkId, this.val1)
|
||||
this.pkId = ''
|
||||
this.disabled = false
|
||||
this._queryLinkMaterial(this.index1)
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.index1 = ''
|
||||
this.dataList = []
|
||||
this.val1 = ''
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
@import '../../common/style/mixin.styl';
|
||||
</style>
|
||||
@@ -1,182 +0,0 @@
|
||||
<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">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</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 border-bottom filter_input_disabled">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">物料编码</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<input type="text" class="filter_input" v-model="data.material_code" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom filter_input_disabled">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">物料名称</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<input type="text" class="filter_input" v-model="data.material_name" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom filter_input_disabled">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">配盘批次</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<input type="text" class="filter_input" v-model="data.pcsn" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom filter_input_disabled">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">物料数量</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<input type="text" class="filter_input" v-model="val5" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">出库数量</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<input type="number" class="filter_input" v-model="val3">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">剩余数量</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<input type="number" class="filter_input" v-model="val4">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-7 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !val2 || val4 === ''}" :disabled="disabled1" @tap="_fullVehicleOutConfirm">出库确认</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !val2 || val4 === ''}" :disabled="disabled2" @tap="_vehicleGoBack">回库</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryGroupInfoByVehicle, fullVehicleOutConfirm, vehicleGoBack} from '@/utils/getData2.js'
|
||||
import {accSubtract} from '@/utils/utils.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
val1: '',
|
||||
val2: '',
|
||||
val3: '',
|
||||
val4: '',
|
||||
val5: '',
|
||||
data: {},
|
||||
title: '',
|
||||
disabled1: false,
|
||||
disabled2: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
val3 () {
|
||||
if (this.val5 !== '') {
|
||||
this.val4 = accSubtract(this.val5, this.val3)
|
||||
}
|
||||
},
|
||||
val4 () {
|
||||
if (this.val5 !== '') {
|
||||
this.val3 = accSubtract(this.val5, this.val4)
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
this._queryGroupInfoByVehicle(e)
|
||||
},
|
||||
async _queryGroupInfoByVehicle (e) {
|
||||
let res = await queryGroupInfoByVehicle(e)
|
||||
this.data = res
|
||||
this.val2 = this.data.point_code
|
||||
if (this.data.material_qty) {
|
||||
this.val5 = this.data.material_qty
|
||||
}
|
||||
},
|
||||
async _fullVehicleOutConfirm () {
|
||||
this.disabled1 = true
|
||||
if (!this.val1 || !this.val2 || this.val4 === '') {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await fullVehicleOutConfirm(this.val2, this.val1, this.val4)
|
||||
this.disabled1 = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
async _vehicleGoBack () {
|
||||
this.disabled2 = true
|
||||
if (!this.val1 || !this.val2 || this.val4 === '') {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await vehicleGoBack(this.val2, this.val1, this.val4)
|
||||
this.disabled2 = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.val3 = ''
|
||||
this.data = {}
|
||||
this.disabled1 = false
|
||||
this.disabled2 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
222
pages/manage/point-manage.vue
Normal file
222
pages/manage/point-manage.vue
Normal file
@@ -0,0 +1,222 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar title="呼叫管理"></nav-bar>
|
||||
<view class="zd-row jcflexstart state-wrap">
|
||||
<view class="zd-col-4 zd-row jcflexstart" v-for="e in state">
|
||||
<view class="state-color" :class="e.color"></view>
|
||||
<view class="state-name">{{e.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row mgb10 xzd-wraper">
|
||||
<view class="zd-col-11 item-font-6">起:{{sObj.device_name}}</view>
|
||||
<view class="zd-col-1 item-font-7">–</view>
|
||||
<view class="zd-col-11 item-font-6">终:{{nObj.device_name}}</view>
|
||||
</view>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="locate_block" v-for="e in areaArr" :key="e.region_code">
|
||||
<view class="zd-row locate_name" @click="getPonit (e)">
|
||||
<view class="title_locate">{{e.region_name}}</view>
|
||||
<uni-icons :type="e.checked ? 'up' : 'down'" size="16"></uni-icons>
|
||||
</view>
|
||||
<view v-show="e.checked === true" class="site_block" ref="liCon">
|
||||
<view class="site_item" v-for="(el, i) in e.pointArr" :key="i">
|
||||
<view class="site_item_box" :class="['bggray', 'bggreen'][Number(el.status)]" @click="setcode(el)">
|
||||
<text class="title_1">{{el.device_name}}</text>
|
||||
<text class="title_2">来源:{{el.source_device}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 button-default" @click="cancle">清空</button>
|
||||
<button class="zd-col-5 button-primary" :class="{'button-info': JSON.stringify(sObj) === '{}' && JSON.stringify(nObj) === '{}'}" :disabled="disabled" @tap="_callTask('1')">生箔换轴</button>
|
||||
<button class="zd-col-5 button-primary" :class="{'button-info': JSON.stringify(sObj) === '{}' && JSON.stringify(nObj) === '{}'}" :disabled="disabled" @tap="_callTask('2')">分切换轴</button>
|
||||
<button class="zd-col-5 button-primary" :class="{'button-info': JSON.stringify(sObj) === '{}' && JSON.stringify(nObj) === '{}'}" :disabled="disabled" @tap="_callTask('3')">搬运任务</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import {queryArea, queryPointByArea, callTask} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
interTime: this.$store.getters.setTime,
|
||||
timer: null,
|
||||
state: [{color: 'bggray', name: '空位'}, {color: 'bggreen', name: '有货'}],
|
||||
areaArr: [],
|
||||
pointArr: [],
|
||||
regobj: {},
|
||||
disabled: false,
|
||||
sObj: {},
|
||||
nObj: {},
|
||||
isS: false
|
||||
};
|
||||
},
|
||||
created () {
|
||||
this.initArea()
|
||||
},
|
||||
beforeDestroy () {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null
|
||||
}
|
||||
},
|
||||
onUnload () {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
refresh (e) {
|
||||
this.timer = setInterval(() => {
|
||||
this.initPonit(e)
|
||||
}, this.interTime)
|
||||
},
|
||||
async initArea () {
|
||||
let res = await queryArea()
|
||||
this.areaArr = [...res.result]
|
||||
this.areaArr.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
this.$set(el, 'pointArr', [])
|
||||
})
|
||||
if (this.areaArr.length > 0) {
|
||||
this.getPonit(this.areaArr[0])
|
||||
}
|
||||
},
|
||||
async initPonit (e) {
|
||||
let res = await queryPointByArea(e.region_code)
|
||||
this.regobj = e
|
||||
this.areaArr.map(el => {
|
||||
if (el.region_code === e.region_code) {
|
||||
this.$set(el, 'pointArr', [...res.result])
|
||||
}
|
||||
})
|
||||
},
|
||||
getPonit (e) {
|
||||
clearInterval(this.timer)
|
||||
this.areaArr.map(el => {
|
||||
if (el.region_code !== e.region_code) {
|
||||
el.checked = false
|
||||
}
|
||||
if (el.region_code === e.region_code) {
|
||||
e.checked = !e.checked
|
||||
}
|
||||
})
|
||||
if (e.checked) {
|
||||
this.initPonit(e)
|
||||
this.refresh(e)
|
||||
}
|
||||
},
|
||||
setcode (el) {
|
||||
if (this.isS === false) {
|
||||
this.sObj = el
|
||||
this.isS = true
|
||||
} else if (this.isS) {
|
||||
this.nObj = el
|
||||
this.isS = false
|
||||
}
|
||||
},
|
||||
/** 清空点位选择 */
|
||||
cancle () {
|
||||
this.sObj = {}
|
||||
this.nObj = {}
|
||||
this.disabled = false
|
||||
},
|
||||
async _callTask (type) {
|
||||
this.disabled = true
|
||||
if (JSON.stringify(this.sObj) === '{}' || JSON.stringify(this.nObj) === '{}') {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await callTask(this.sObj.device_code, this.nObj.device_code, type)
|
||||
this.cancle()
|
||||
clearInterval(this.timer)
|
||||
this.timer = null
|
||||
setTimeout(() => {
|
||||
this.refresh()
|
||||
this.cancle()
|
||||
}, 2000)
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (err) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
@import '../../common/style/mixin.styl';
|
||||
.zd_content
|
||||
padding-top calc(var(--status-bar-height) + 72rpx)
|
||||
padding-bottom 200rpx
|
||||
.locate_block
|
||||
width 100%
|
||||
.locate_name
|
||||
position relative
|
||||
_wh(100%,48rpx)
|
||||
.site_block
|
||||
_wh(100%,auto)
|
||||
overflow hidden
|
||||
transition height .3s
|
||||
_fj(flex-start,,,wrap)
|
||||
padding-bottom 10rpx
|
||||
.site_item
|
||||
_wh(calc(100% / 3),110rpx)
|
||||
padding 5rpx 5rpx
|
||||
overflow hidden
|
||||
_fj(center)
|
||||
.site_item_box
|
||||
_wh(100%, 100%)
|
||||
padding 10rpx
|
||||
background-color rgb(220, 223, 230)
|
||||
border-radius 10rpx
|
||||
.title_locate
|
||||
width 50%
|
||||
_font(30rpx,40rpx,#333,bold)
|
||||
font-style italic
|
||||
.title_1
|
||||
_wh(100%, 60%)
|
||||
_fj(center)
|
||||
overflow hidden
|
||||
_font(28rpx,28rpx,#303133,500, center)
|
||||
.title_2
|
||||
_wh(100%, 40%)
|
||||
_fj(center)
|
||||
overflow hidden
|
||||
_font(24rpx,25rpx,#303133,500, center)
|
||||
opacity .69
|
||||
white-space: nowrap
|
||||
.submit-bar
|
||||
padding 10rpx
|
||||
.state-wrap
|
||||
position fixed
|
||||
top calc(var(--status-bar-height) + 72rpx)
|
||||
_wh(100%, 60rpx)
|
||||
padding 0 14rpx
|
||||
.state-color
|
||||
_wh(30rpx, 30rpx)
|
||||
border-radius 50%
|
||||
margin-right 10rpx
|
||||
.state-name
|
||||
_font(28rpx, 30rpx, #333)
|
||||
.xzd-wraper
|
||||
position fixed
|
||||
bottom 118rpx
|
||||
padding 0 14rpx
|
||||
.button-default, .button-primary
|
||||
font-size 30rpx
|
||||
</style>
|
||||
@@ -1,132 +0,0 @@
|
||||
<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">
|
||||
<search-box
|
||||
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-17 filter_picker">
|
||||
<picker @change="pickerChange" :value="index1" :range="options1" range-key="text">
|
||||
<view class="uni-input">{{index1 !== '' ? options1[index1].text : ''}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<uni-icons type="right" size="14" color="#999"></uni-icons>
|
||||
</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="val2"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-7 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': index1 === '' || !val1 || !val2}" :disabled="disabled1" @tap="_bindVehicle">绑定</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1}" :disabled="disabled2" @tap="_unbindVehicle">解绑</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getVehicleType, bindVehicle, unbindVehicle} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
options1: [],
|
||||
index1: '',
|
||||
disabled1: false,
|
||||
disabled2: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._getVehicleType()
|
||||
},
|
||||
methods: {
|
||||
/** 载具类型下拉框 */
|
||||
async _getVehicleType () {
|
||||
let res = await getVehicleType()
|
||||
this.options1 = [...res]
|
||||
},
|
||||
pickerChange (e) {
|
||||
this.index1 = e.detail.value
|
||||
},
|
||||
async _bindVehicle () {
|
||||
this.disabled1 = true
|
||||
if (!this.val1 || this.index1 === '' || !this.val2) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await bindVehicle(this.val1, this.options1[this.index1].value, this.val2)
|
||||
this.clearUp()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
async _unbindVehicle () {
|
||||
this.disabled2 = true
|
||||
if (!this.val1) {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let type = ''
|
||||
if (this.index1 !== '') {
|
||||
type = this.options1[this.index1].value
|
||||
}
|
||||
let res = await unbindVehicle(this.val1, type, this.val2)
|
||||
this.clearUp()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.index1 = ''
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.disabled1 = false
|
||||
this.disabled2 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
@@ -1,99 +0,0 @@
|
||||
<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">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">下一点位</span>
|
||||
</view>
|
||||
<view class="zd-col-19 filter_select">
|
||||
<zxz-uni-data-select v-model="index1" filterable :localdata="options1"></zxz-uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-11 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-11 button-primary" :class="{'button-info': index1 === '' || !val1}" :disabled="disabled" @tap="_createP2pTask">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryEndPointsByStart, createP2pTask} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
options1: [],
|
||||
index1: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
this._queryEndPointsByStart(e)
|
||||
},
|
||||
/** 下一点位下拉框 */
|
||||
async _queryEndPointsByStart (e) {
|
||||
let res = await queryEndPointsByStart(e)
|
||||
if (res.length > 0) {
|
||||
res.map(el => {
|
||||
this.$set(el, 'value', el.point_code2)
|
||||
this.$set(el, 'text', el.point_name)
|
||||
})
|
||||
this.options1 = [...res]
|
||||
this.index1 = this.options1[0].value
|
||||
}
|
||||
},
|
||||
async _createP2pTask () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || this.index1 === '') {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await createP2pTask(this.val1, this.index1)
|
||||
this.clearUp()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.index1 = ''
|
||||
this.options1 = []
|
||||
this.val1 = ''
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
@@ -11,24 +11,20 @@
|
||||
</view>
|
||||
</view>
|
||||
<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="item-wrap" v-for="(e, i) in dataList" :key="i" @tap="toCheck(e)" :class="{isChecked: pkId === e.task_uuid}">
|
||||
<view class="zd-row mgb10">
|
||||
<view class="item-font-1">{{e.task_no}} | {{['就绪', '执行中', '完成'][Number(e.inst_status)]}}</view>
|
||||
<view class="zd-col-24 item-font-1">{{e.task_no}} | {{['就绪', '执行中', '完成'][Number(e.inst_status)]}}</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-16">
|
||||
<view class="item-font-2 mgb10">{{e.create_time}} | {{['请求取货', '取货完成', '请求放货', '放货完成'][Number(e.inst_step) - 1]}}</view>
|
||||
<view class="item-font-2 mgb10">{{e.create_time}}</view>
|
||||
<view class="zd-row mgb10">
|
||||
<view class="item-font-3">载具号:</view>
|
||||
<view class="item-font-4">{{e.carrier}}</view>
|
||||
<view class="zd-col-7 item-font-3">托盘号:</view>
|
||||
<view class="zd-col-17 item-font-4">{{e.vehicle_code}}</view>
|
||||
</view>
|
||||
<view class="zd-row mgb10">
|
||||
<view class="item-font-3">指令号:</view>
|
||||
<view class="item-font-4">{{e.instruction_code}}</view>
|
||||
</view>
|
||||
<view class="zd-row mgb10">
|
||||
<view class="item-font-3">车号:</view>
|
||||
<view class="item-font-4">{{e.carno}}</view>
|
||||
<view class="zd-col-7 item-font-3">物料类型:</view>
|
||||
<view class="zd-col-17 item-font-4">{{e.material_type_name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-col-8">
|
||||
@@ -37,18 +33,17 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="item-font-3">设备:</view>
|
||||
<view class="item-font-6">{{e.start_devicecode}}</view>
|
||||
<view class="item-font-7">–</view>
|
||||
<view class="item-font-6">{{e.next_devicecode}}</view>
|
||||
<view class="zd-col-4 item-font-3">点位:</view>
|
||||
<view class="zd-col-8 item-font-6">{{e.start_devicecode}}</view>
|
||||
<view class="zd-col-4 item-font-7">–</view>
|
||||
<view class="zd-col-8 item-font-6">{{e.next_devicecode}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_pdaInst('1')">指令撤销</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_pdaInst('2')">重新下发</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_pdaInst('3')">强制完成</button>
|
||||
<button class="zd-col-11 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_taskOperation('1')">重新生成</button>
|
||||
<button class="zd-col-11 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_taskOperation('2')">强制完成</button>
|
||||
</view>
|
||||
<view class="zd_content msg_wrapper" :class="show ? 'popshow' : 'pophide'">
|
||||
<view class="msg_content">
|
||||
@@ -84,7 +79,7 @@
|
||||
<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="_pdaInsts">查询</button>
|
||||
<button class="zd-col-7 button-primary" @tap="_queryTask">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="show" class="msg_mask"></view>
|
||||
@@ -94,7 +89,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {pdaInsts, pdaInst} from '@/utils/getData2.js'
|
||||
import {queryTask, taskOperation} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -119,22 +114,23 @@
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._pdaInsts()
|
||||
this._queryTask()
|
||||
},
|
||||
methods: {
|
||||
toSearch () {
|
||||
this.show = true
|
||||
this.tab = '-1'
|
||||
},
|
||||
async _pdaInsts () {
|
||||
async _queryTask () {
|
||||
this.show = false
|
||||
let res = await pdaInsts(this.val1, this.val2, this.val3)
|
||||
if (res.code === '1') {
|
||||
this.data = [...res.result]
|
||||
try {
|
||||
let res = await queryTask(this.val1, this.val2, this.val3)
|
||||
this.data = [...res.data]
|
||||
this.dataList = [...this.data]
|
||||
} else {
|
||||
|
||||
} catch (e) {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
@@ -148,17 +144,17 @@
|
||||
this.dataList = [...this.data]
|
||||
}
|
||||
},
|
||||
async _pdaInst (type) {
|
||||
async _taskOperation (type) {
|
||||
this.disabled = true
|
||||
if (!this.pkId) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await pdaInst(type, this.pkId)
|
||||
let res = await taskOperation(type, this.pkId)
|
||||
this.disabled = false
|
||||
this.tab = '-1'
|
||||
this._pdaInsts()
|
||||
this._queryTask()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
@@ -175,7 +171,7 @@
|
||||
this.disabled = false
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.inst_uuid ? '' : e.inst_uuid
|
||||
this.pkId = this.pkId === e.task_uuid ? '' : e.task_uuid
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,213 +21,66 @@ export const handLogin = (user, password) => request({
|
||||
}
|
||||
})
|
||||
/**
|
||||
* 空托盘出库
|
||||
* 站点管理
|
||||
*/
|
||||
// 1.1获取载具类型
|
||||
export const getVehicleType = () => request({
|
||||
url:'api/pda/group/getVehicleType',
|
||||
// 1.1查询所有区域信息
|
||||
export const queryArea = () => request({
|
||||
url:'api/hand/queryArea',
|
||||
data: {}
|
||||
})
|
||||
|
||||
// 1.2空托盘出库确认
|
||||
export const callEmptyVehicle = (type, code) => request({
|
||||
url:'api/pda/callEmptyVehicle',
|
||||
// 1.2根据区域查询设备编号及状态
|
||||
export const queryPointByArea = (code) => request({
|
||||
url:'api/hand/queryPointByArea',
|
||||
data: {
|
||||
vehicle_type: type,
|
||||
point_code: code
|
||||
areaCode: code
|
||||
}
|
||||
})
|
||||
// 1.3创建任务(生成任务号为-开头)
|
||||
export const callTask = (scode, ncode, type) => request({
|
||||
url:'api/hand/callTask',
|
||||
data: {
|
||||
start_device_code: scode,
|
||||
next_device_code: ncode,
|
||||
task_type: type
|
||||
}
|
||||
})
|
||||
/**
|
||||
* 空托盘入库
|
||||
* 指令管理
|
||||
*/
|
||||
// 1.1空托盘入库确认
|
||||
export const emptyInStore = (type, vcode, code) => request({
|
||||
url:'api/pda/emptyInStore',
|
||||
// 1.1 查询未完成指令(生成任务号为-开头)
|
||||
export const handInsts = (key, scode, ncode) => request({
|
||||
url:'api/hand/insts',
|
||||
data: {
|
||||
vehicle_type: type,
|
||||
vehicle_code: vcode,
|
||||
point_code: code
|
||||
}
|
||||
})
|
||||
/**
|
||||
* 组盘入库
|
||||
*/
|
||||
// 1.1获取物料信息
|
||||
export const queryMaterial = () => request({
|
||||
url:'api/pda/queryMaterial',
|
||||
data: {}
|
||||
})
|
||||
|
||||
// 查询已配盘的组盘信息
|
||||
export const queryExistGroup = () => request({
|
||||
url:'api/pda/queryExistGroup',
|
||||
data: {}
|
||||
})
|
||||
|
||||
// 组盘
|
||||
export const groupManual = (vtype, vcode, pcode, mid, mcode, qty, isl) => request({
|
||||
url:'api/pda/group/manual',
|
||||
data: {
|
||||
vehicle_type: vtype,
|
||||
vehicle_code: vcode,
|
||||
point_code: pcode,
|
||||
material_id: mid,
|
||||
material_code: mcode,
|
||||
material_qty: qty,
|
||||
is_link: isl
|
||||
}
|
||||
})
|
||||
//获取待配盘信息
|
||||
export const queryVehicleGroup = () => request({
|
||||
url:'api/pda/queryVehicleGroup',
|
||||
data: {}
|
||||
})
|
||||
|
||||
// 开始配盘
|
||||
export const groupLink = (arr) => request({
|
||||
url:'api/pda/group/link',
|
||||
data: arr
|
||||
})
|
||||
// 打印
|
||||
export const pdaPrintf = (code) => request({
|
||||
url:'api/pda/printf',
|
||||
data: {
|
||||
vehicle_code: code
|
||||
}
|
||||
})
|
||||
|
||||
//入库
|
||||
export const fullVehicleIn = (code) => request({
|
||||
url:'api/pda/fullVehicleIn',
|
||||
data: {
|
||||
point_code: code
|
||||
}
|
||||
})
|
||||
/**
|
||||
* 原料出库
|
||||
*/
|
||||
// 根据物料信息查询配盘信息
|
||||
export const queryLinkMaterial = (id) => request({
|
||||
url:'api/pda/queryLinkMaterial',
|
||||
data: {
|
||||
material_id: id
|
||||
}
|
||||
})
|
||||
|
||||
// 1.2出库确认
|
||||
export const fullVehicleOut = (code1, code2) => request({
|
||||
url:'api/pda/fullVehicleOut',
|
||||
data: {
|
||||
point_code1: code1,
|
||||
point_code2: code2
|
||||
}
|
||||
})
|
||||
/**
|
||||
* 生产下料
|
||||
*/
|
||||
// 根据起点查询终点列表
|
||||
export const queryEndPointsByStart = (code) => request({
|
||||
url:'api/pda/queryEndPointsByStart',
|
||||
data: {
|
||||
point_code1: code
|
||||
}
|
||||
})
|
||||
|
||||
// 下料
|
||||
export const createP2pTask = (code, mcode) => request({
|
||||
url:'api/pda/createP2pTask',
|
||||
data: {
|
||||
point_code1: code,
|
||||
point_code2: mcode
|
||||
}
|
||||
})
|
||||
/**
|
||||
* 点位更新
|
||||
*/
|
||||
// 解绑
|
||||
export const unbindVehicle = (code, type, vcode) => request({
|
||||
url:'api/pda/unbindVehicle',
|
||||
data: {
|
||||
point_code: code,
|
||||
vehicle_type: type,
|
||||
vehicle_code: vcode
|
||||
}
|
||||
})
|
||||
// 绑定
|
||||
export const bindVehicle = (code, type, vcode) => request({
|
||||
url:'api/pda/bindVehicle',
|
||||
data: {
|
||||
point_code: code,
|
||||
vehicle_type: type,
|
||||
vehicle_code: vcode
|
||||
}
|
||||
})
|
||||
/**
|
||||
* 定点作业
|
||||
*/
|
||||
// 查询设备
|
||||
export const queryDevice = () => request({
|
||||
url:'api/pda/queryDevice',
|
||||
data: {}
|
||||
})
|
||||
|
||||
// 定点作业-确认
|
||||
export const taskConfirm = (code1, code2) => request({
|
||||
url:'api/pda/taskConfirm',
|
||||
data: {
|
||||
point_code1: code1,
|
||||
point_code2: code2
|
||||
}
|
||||
})
|
||||
/**
|
||||
* 作业管理
|
||||
*/
|
||||
// 查询未完成指令
|
||||
export const pdaInsts = (keyword, scode, ncode) => request({
|
||||
url:'api/pda/insts',
|
||||
acsurl: true,
|
||||
data: {
|
||||
keyword: keyword,
|
||||
keyword: key,
|
||||
start_devicecode: scode,
|
||||
next_devicecode: ncode
|
||||
}
|
||||
})
|
||||
|
||||
// 指令操作
|
||||
export const pdaInst = (type, uuid) => request({
|
||||
url:'api/pda/inst',
|
||||
acsurl: true,
|
||||
// 1.2 指令操作
|
||||
export const handInst = (type, id) => request({
|
||||
url:'api/hand/inst',
|
||||
data: {
|
||||
type: type,
|
||||
inst_uuid: uuid
|
||||
inst_uuid: id
|
||||
}
|
||||
})
|
||||
/**
|
||||
* 出库确认
|
||||
* 任务管理
|
||||
*/
|
||||
// 根据载具编码查询配盘信息
|
||||
export const queryGroupInfoByVehicle = (code) => request({
|
||||
url:'api/pda/queryGroupInfoByVehicle',
|
||||
// 1.1 1.1 查询无指令的任务(任务号为-开头)
|
||||
export const handTasks = (key, scode, ncode) => request({
|
||||
url:'api/hand/tasks',
|
||||
data: {
|
||||
vehicle_code: code
|
||||
keyword: key,
|
||||
start_devicecode: scode,
|
||||
next_devicecode: ncode
|
||||
}
|
||||
})
|
||||
|
||||
// 回库
|
||||
export const vehicleGoBack = (code, vcode, num) => request({
|
||||
url:'api/pda/vehicleGoBack',
|
||||
// 1.2 任务操作
|
||||
export const handTaskoperation = (type, id) => request({
|
||||
url:'api/hand/taskoperation',
|
||||
data: {
|
||||
point_code: code,
|
||||
vehicle_code: vcode,
|
||||
residue_num: num
|
||||
}
|
||||
})
|
||||
// 出库确认
|
||||
export const fullVehicleOutConfirm = (code, vcode, num) => request({
|
||||
url:'api/pda/fullVehicleOutConfirm',
|
||||
data: {
|
||||
point_code: code,
|
||||
vehicle_code: vcode,
|
||||
residue_num: num
|
||||
type: type,
|
||||
task_uuid: id
|
||||
}
|
||||
})
|
||||
226
utils/mork2.js
226
utils/mork2.js
@@ -1,159 +1,13 @@
|
||||
export const handLogin = (user, password) => {
|
||||
export const handInsts = () => {
|
||||
let res = {
|
||||
user: {
|
||||
user: {username: 'admin'},
|
||||
},
|
||||
token: 'abcd'
|
||||
}
|
||||
return res
|
||||
}
|
||||
export const getVehicleType = () => {
|
||||
let res = [
|
||||
{
|
||||
"value": "LZ",
|
||||
"text": "料盅"
|
||||
},
|
||||
{
|
||||
"value": "GTP",
|
||||
"text": "钢托盘"
|
||||
},
|
||||
{
|
||||
"value": "1",
|
||||
"text": "木托盘"
|
||||
}
|
||||
]
|
||||
return res
|
||||
}
|
||||
|
||||
export const queryMaterial = () => {
|
||||
let res = [
|
||||
{
|
||||
"material_id": "19",
|
||||
"material_code": "2",
|
||||
"material_name": "a1"
|
||||
},
|
||||
{
|
||||
"material_id": "9",
|
||||
"material_code": "4",
|
||||
"material_name": "b1"
|
||||
}
|
||||
]
|
||||
return res
|
||||
}
|
||||
|
||||
export const queryExistGroup = () => {
|
||||
let res = [
|
||||
{
|
||||
"vehicle_code": "6",
|
||||
"vehicle_type": "in ea",
|
||||
"material_id": "83",
|
||||
"material_code": "75",
|
||||
"material_name": "式历委至统",
|
||||
"point_code": "76",
|
||||
"material_qty": "Ut ea veniam officia in",
|
||||
"pcsn": "consequat enim proident labore"
|
||||
}
|
||||
]
|
||||
return res
|
||||
}
|
||||
|
||||
export const queryVehicleGroup = () => {
|
||||
let res = [
|
||||
{
|
||||
"group_id": "30",
|
||||
"vehicle_type": "in quis magna veniam",
|
||||
"vehicle_code": "91",
|
||||
"material_id": "4",
|
||||
"material_code": "20",
|
||||
"material_name": "张认义关金",
|
||||
"point_code": "16"
|
||||
}
|
||||
]
|
||||
return res
|
||||
}
|
||||
|
||||
export const groupLink = (arr) => {
|
||||
let res = {
|
||||
"message": "tempor elit adipisicing cillum nisi"
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
export const pdaPrintf = (code) => {
|
||||
let res = {
|
||||
"vehicle_code": "91",
|
||||
"material_code": "20",
|
||||
"material_name": "张认义关金",
|
||||
"material_qty": "100",
|
||||
"pcsn": "20201112",
|
||||
"print_time": "20240210"
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
export const queryLinkMaterial = () => {
|
||||
let res = [
|
||||
{
|
||||
"point_code": "78",
|
||||
"point_name": "片百人共",
|
||||
"vehicle_code": "52",
|
||||
"material_id": "89",
|
||||
"material_code": "85",
|
||||
"material_name": "战干者许",
|
||||
"pcsn": "ullamco Ut",
|
||||
"material_qty": "100"
|
||||
}
|
||||
]
|
||||
return res
|
||||
}
|
||||
|
||||
export const queryEndPointsByStart = (code) => {
|
||||
let res = [
|
||||
{
|
||||
"point_code2": "81",
|
||||
"point_name": "回史就问装作过"
|
||||
}
|
||||
]
|
||||
return res
|
||||
}
|
||||
|
||||
export const queryDevice = () => {
|
||||
let res = [
|
||||
{
|
||||
"region_code": "68",
|
||||
"region_name": "构华",
|
||||
"deviceArr": [
|
||||
{
|
||||
"point_code": "9",
|
||||
"point_name": "京产"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"region_code": "8",
|
||||
"region_name": "构华片资",
|
||||
"deviceArr": [
|
||||
{
|
||||
"point_code": "19",
|
||||
"point_name": "京产开向准"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
return res
|
||||
}
|
||||
|
||||
export const pdaInsts = () => {
|
||||
let res = {
|
||||
"code": "1",
|
||||
"desc": "in",
|
||||
"result": [
|
||||
"message": "ok",
|
||||
"data": [
|
||||
{
|
||||
"inst_uuid": "51",
|
||||
"task_no": "ADB001",
|
||||
"start_devicecode": "46",
|
||||
"next_devicecode": "2",
|
||||
"inst_status": "0",
|
||||
"inst_status": "3",
|
||||
"priority": "一级",
|
||||
"create_time": "1976-04-07 02:36:18",
|
||||
"carrier": "890000008",
|
||||
@@ -165,14 +19,72 @@ export const pdaInsts = () => {
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
export const queryGroupInfoByVehicle = (code) => {
|
||||
export const handInst = (code) => {
|
||||
let res = {
|
||||
"point_code": "001",
|
||||
"material_code": "100001",
|
||||
"material_name": "垃圾了付定金",
|
||||
"pcsn": "20202020",
|
||||
"material_qty": "20.0"
|
||||
"message": "001"
|
||||
}
|
||||
return res
|
||||
}
|
||||
export const queryTask = (keyword, scode, ncode) => {
|
||||
let res = {
|
||||
"message": "ok",
|
||||
"data": [
|
||||
{
|
||||
"inst_uuid": "51",
|
||||
"task_no": "ADB001",
|
||||
"start_devicecode": "46",
|
||||
"next_devicecode": "2",
|
||||
"inst_status": "1",
|
||||
"priority": "一级",
|
||||
"create_time": "1976-04-07 02:36:18",
|
||||
"carrier": "890000008",
|
||||
"instruction_code": '0000',
|
||||
"carno": '1号车',
|
||||
"inst_step": '1'
|
||||
}
|
||||
]
|
||||
}
|
||||
return res
|
||||
}
|
||||
// 1.2 指令操作
|
||||
export const taskOperation = (uuid, type) => {
|
||||
let res = {
|
||||
"message": "001"
|
||||
}
|
||||
return res
|
||||
}
|
||||
export const queryArea = () => {
|
||||
let res = {
|
||||
result: [{region_code: '1', region_name: 'A1'}, {region_code: '2', region_name: 'A2'}, {region_code: '3', region_name: 'A2'}, {region_code: '4', region_name: 'A10'}]
|
||||
}
|
||||
return res
|
||||
}
|
||||
export const queryPointByArea = () => {
|
||||
let res = {
|
||||
result: [{
|
||||
device_code: '1',
|
||||
device_name: 'JLDFJLLJ',
|
||||
source_device: 'FAL3LAA01',
|
||||
status: '1'
|
||||
}, {
|
||||
device_code: '12',
|
||||
device_name: 'JLDFJLLJ'
|
||||
}, {
|
||||
device_code: '13',
|
||||
device_name: 'JLDFJLLJ'
|
||||
}, {
|
||||
device_code: '14',
|
||||
device_name: 'JLDFJLLJ'
|
||||
}, {
|
||||
device_code: '15',
|
||||
device_name: 'JLDFJLLJ'
|
||||
}, {
|
||||
device_code: '16',
|
||||
device_name: 'JLDFJLLJ'
|
||||
}, {
|
||||
device_code: '17',
|
||||
device_name: 'JLDFJLLJ'
|
||||
}]
|
||||
}
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user