This commit is contained in:
2025-07-24 11:24:52 +08:00
parent 31e96b35b3
commit 9b0cbd350e
17 changed files with 10 additions and 2291 deletions

View File

@@ -1,110 +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-7">
<span class="filter_label">载具编码</span>
</view>
<view class="zd-col-24 filter_select">
<search-box
v-model="val2"
/>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">起点</span>
</view>
<view class="zd-col-24">
<search-box
v-model="val1"
@handleChange="handleChange"
/>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">终点</span>
</view>
<view class="zd-col-24 filter_select">
<uni-data-select v-model="index" :localdata="options"></uni-data-select>
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="toEmpty">清空</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !index || !val2}" :disabled="disabled" @tap="_transfConfirm">转运确认</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {deviceManageTransf, transfConfirm} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
val1: '',
options: [],
index: '',
val2: '',
disabled: false
};
},
onLoad (options) {
this.title = options.title
},
methods: {
handleChange (e) {
if (e) {
this._deviceManageTransf(e)
}
},
async _deviceManageTransf (e) {
let res = await deviceManageTransf(e)
this.options = [...res]
},
async _transfConfirm () {
this.disabled = true
if (!this.val1 || !this.index || !this.val2) {
this.disabled = false
return
}
try {
let res = await transfConfirm(this.val1, this.index, this.val2)
this.disabled = false
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled = false
}
},
toEmpty () {
this.val1 = ''
this.index = ''
this.disabled = false
}
}
}
</script>
<style lang="stylus" scoped>
@import '../../common/style/mixin.styl';
.button-primary, .button-default
_fj(center)
font-size 26rpx
height 88rpx
line-height 30rpx
</style>

View File

@@ -1,172 +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-10">
<span class="filter_label">托盘码</span>
</view>
<view class="zd-col-24">
<search-box
v-model="val1"
@handleChange="handleChange"
/>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-10">
<span class="filter_label">盘点单</span>
</view>
<view class="zd-col-24">
<input type="text" class="filter_input" v-model="data.code">
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-10">
<span class="filter_label">盘点仓库</span>
</view>
<view class="zd-col-24">
<input type="text" class="filter_input" v-model="data.form_data.stor_code">
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-10">
<span class="filter_label">创建时间</span>
</view>
<view class="zd-col-24">
<input type="text" class="filter_input" v-model="data.create_time">
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-10">
<span class="filter_label">作业数量</span>
</view>
<view class="zd-col-24">
<input type="text" class="filter_input" v-model="data.dtl">
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-10">
<span class="filter_label">已盘作业数量</span>
</view>
<view class="zd-col-24">
<input type="text" class="filter_input" v-model="data.finish_dtl">
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-10">
<span class="filter_label">物料名称</span>
</view>
<view class="zd-col-24">
<input type="text" class="filter_input" v-model="data.material_name">
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-10">
<span class="filter_label">物料编码</span>
</view>
<view class="zd-col-24">
<input type="text" class="filter_input" v-model="data.material_code">
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-10">
<span class="filter_label">物料批次</span>
</view>
<view class="zd-col-24">
<input type="text" class="filter_input" v-model="data.material_spec">
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-10">
<span class="filter_label">盘点货位</span>
</view>
<view class="zd-col-24">
<input type="text" class="filter_input" v-model="data.children_form_Data.end_struct_code">
</view>
</view>
<view class="zd-row">
<view class="zd-col-10">
<span class="filter_label">盘点数量</span>
</view>
<view class="zd-col-24">
<input type="text" class="filter_input" v-model="data.check_qty">
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(data) === JSON.stringify({form_data: {}, children_form_Data: {}})}" :disabled="disabled" @tap="_checkSaveCheckTask">盘点确认</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {checkByVehicle, checkSaveCheckTask} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
val1: '',
data: {form_data: {}, children_form_Data: {}},
disabled: false
};
},
onLoad (options) {
this.title = options.title
},
created () {
console.log(JSON.stringify(this.data))
},
methods: {
handleChange (e) {
this._checkByVehicle(e)
},
async _checkByVehicle (e) {
let res = await checkByVehicle(e)
this.data = res.data
},
clearUp () {
this.val1 = ''
this.data = {form_data: {}, children_form_Data: {}}
},
async _checkSaveCheckTask () {
this.disabled = true
if (JSON.stringify(this.data) === JSON.stringify({form_data: {}, children_form_Data: {}})) {
this.disabled = false
return
}
try {
let res = await checkSaveCheckTask(this.data.children_id, this.data.children_vehicle_code, this.data.check_qty, this.data.children_qty)
if (res.code === '200') {
uni.showToast({
title: res.message,
icon: 'none'
})
this.clearUp()
} else {
uni.showToast({
title: res.message,
icon: 'none'
})
this.disabled = false
}
} catch (e) {
this.disabled = false
}
}
}
}
</script>
<style lang="stylus">
</style>

View File

@@ -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, i) in menuList" :key="i" @tap="toPage1(e)">
<view class="fir_menu-item" v-for="(e, i) in menuList" :key="i" @click="toPage2(e)">
<image class="menu-img" :src="require('../../static/image/menu/' + e.path + '.png')" alt="">
<view class="menu-name">{{e.title}}</view>
</view>
@@ -23,7 +23,7 @@
</view>
</view>
</view>
<view class="sec_menu_wraper" :class="show ? 'popshow' : 'pophide'">
<!-- <view class="sec_menu_wraper" :class="show ? 'popshow' : 'pophide'">
<view class="pop-title">{{title}}</view>
<view class="sec_menu_w">
<view class="sec_menu-item" :style="{'background-image': 'url(' + require('../../static/image/menu/' + icon + '.png') + ')'}" v-for="(e, i) in secM" :key="'sontree' + i" @click="toPage2(e)">
@@ -31,7 +31,7 @@
</view>
</view>
</view>
<view v-if="show" class="modal" @click.stop="show = false"></view>
<view v-if="show" class="modal" @click.stop="show = false"></view> -->
</view>
</template>
@@ -74,10 +74,13 @@
}
},
toPage2 (e) {
let url = e.path + '?title=' + e.title
if (e.active === false) {
return
}
console.log(2)
let url = e.sonTree[0].path + '?title=' + e.sonTree[0].title
// let url = e.path + '?title=' + e.title
// if (e.active === false) {
// return
// }
console.log(url, 666)
uni.redirectTo({
url: url
})

View File

@@ -1,19 +0,0 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
};
}
}
</script>
<style lang="stylus">
</style>

View File

@@ -1,267 +0,0 @@
<template>
<view class="zd_container">
<nav-bar :title="title"></nav-bar>
<view class="zd-row jccenter tab-item-wraper">
<view class="zd-col-16 zd-row">
<view class="tab-item" :class="{'tab-item_active': tab === 1}" @tap="tab=1">叫料</view>
<view class="tab-item" :class="{'tab-item_active': tab === 2}" @tap="tab=2">满料</view>
<view class="tab-item" :class="{'tab-item_active': tab === 3}" @tap="tab=3">送空盅</view>
</view>
</view>
<view class="zd_content zd_content_1">
<view class="zd_wrapper">
<view v-show="tab === 2" class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">载具编码</span>
</view>
<view class="zd-col-17 filter_select">
<search-box
v-model="val1"
/>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">点位</span>
</view>
<view class="zd-col-17 filter_select">
<zxz-uni-data-select v-model="index1" filterable :localdata="options1"></zxz-uni-data-select>
</view>
</view>
<view v-show="tab === 3" class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">下个点位类型</span>
</view>
<view class="zd-col-17 filter_select">
<zxz-uni-data-select v-model="index2" filterable :localdata="options2"></zxz-uni-data-select>
</view>
</view>
</view>
<view v-show="tab === 1" class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>点位编码</th>
<th>产品牌号</th>
<th>入库时间</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList1" :key="e.pointCode" @click="toChose1(e)" :class="{'checked': e.pointCode === pkId1}">
<td>{{e.pointCode}}</td>
<td>{{e.materialCode}}</td>
<td>{{e.instorageTime}}</td>
</tr>
</tbody>
</table>
</view>
</view>
<view v-show="tab === 2" class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>工单编号</th>
<th>计划数量</th>
<th>实际数量</th>
<th>计划重量</th>
<th>实际重量</th>
<th>物料标识</th>
<th>泥料编码</th>
<th>批次号</th>
<th>生产日期</th>
<th>载具类型</th>
<th>点位编码</th>
<th>点位名称</th>
<th>区域编码</th>
<th>区域名称</th>
<th>工单状态</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList2" :key="i" @click="toChose2(e)" :class="{'checked': e.workorder_code === pkId2}">
<td>{{e.workorder_code}}</td>
<td>{{e.plan_qty}}</td>
<td>{{e.real_qty}}</td>
<td>{{e.plan_weight}}</td>
<td>{{e.real_weight}}</td>
<td>{{e.material_ratio}}</td>
<td>{{e.raw_material_code}}</td>
<td>{{e.produce_order}}</td>
<td>{{e.produce_date}}</td>
<td>{{e.vehicle_type}}</td>
<td>{{e.point_code}}</td>
<td>{{e.point_name}}</td>
<td>{{e.region_code}}</td>
<td>{{e.region_name}}</td>
<td>{{['未生产', '已下发', '生产中', '暂停', '完成', '暂存中'][Number(e.workorder_status) - 1]}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</view>
<view v-show="tab === 1" class="zd-row submit-bar">
<button class="zd-col-5 button-default" @tap="index1 = ''">清空</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !pkId1 || !index1}" :disabled="disabled1" @tap="_cbjqlTask">拆包机叫料</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !index1}" @tap="show = true">呼叫空盅</button>
</view>
<view v-show="tab === 2" class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="index1 = '', val1 = ''">清空</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !pkId2 || !val1 || !index1}" :disabled="disabled2" @tap="_cbjmlTask">满料入库</button>
</view>
<view v-show="tab === 3" class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="index2 = '', index1 = ''">清空</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !index1 || !index2}" :disabled="disabled4" @tap="_cbjskTask">空料位送空蛊</button>
</view>
<view class="zd_content msg_wrapper" :class="show ? 'popshow' : 'pophide'">
<view class="pop-line"></view>
<view class="msg_content">
<view class="zd-row">
<view class="zd-col-24">
<span class="filter_label">确定是否呼叫空蛊</span>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-11 button-default" @tap.stop="show = false">关闭</button>
<button class="zd-col-11 button-primary" :disabled="disabled3" @tap="_cbjqkTask">确定</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 {unpackShelfInfo, getCbjPoint, cbjqlTask, hnWorkOrder,cbjmlTask,cbjqkTask, cbjskTask} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
tab: 1,
title: '',
options1: [],
index1: '',
dataList1: [],
pkId1: '',
val1: '',
dataList2: [],
pkId2: '',
disabled1: false,
disabled2: false,
disabled3: false,
show: false,
options2: [{value: 'CBJXLW', text: '拆包机下料位'},{value: 'KLHW', text: '困料货架'}],
index2: '',
val2: '',
disabled4: false
};
},
onLoad (options) {
this.title = options.title
},
created () {
this._unpackShelfInfo()
this._getCbjPoint()
this._hnWorkOrder()
},
methods: {
/**货架上未拆包料盅信息 */
async _unpackShelfInfo () {
let res = await unpackShelfInfo()
this.dataList1 = [...res]
},
/** 拆包机点位下拉框*/
async _getCbjPoint () {
let res = await getCbjPoint()
this.options1 = [...res]
},
toChose1 (e) {
this.pkId1 = this.pkId1 === e.pointCode ? '' : e.pointCode
},
/** 拆包机叫料 */
async _cbjqlTask () {
this.disabled1 = true
if (!this.pkId1 || !this.index1) {
this.disabled1 = false
return
}
try {
let res = await cbjqlTask(this.pkId1, this.index1)
this.pkId1 = ''
this.disabled1 = false
this._unpackShelfInfo()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled1 = false
}
},
/** 查询混碾工单 */
async _hnWorkOrder () {
let res = await hnWorkOrder()
this.dataList2 = [...res]
},
toChose2 (e) {
this.pkId2 = this.pkId2 === e.workorder_code ? '' : e.workorder_code
},
/** 满料入库 */
async _cbjmlTask () {
this.disabled2 = true
if (!this.pkId2 || !this.val1 || !this.index1) {
this.disabled2 = false
return
}
try {
let res = await cbjmlTask(this.pkId2, this.val1, this.index1)
this.pkId2 = ''
this.disabled2 = false
this._hnWorkOrder()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled2 = false
}
},
/** 呼叫空盅 */
async _cbjqkTask () {
this.disabled3 = true
try {
let res = await cbjqkTask(this.index1)
this.show = false
this.disabled3 = false
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled3 = false
}
},
/** 拆包机空料位送空蛊 */
async _cbjskTask () {
this.disabled4 = true
try {
let res = await cbjskTask(this.index2, this.index1)
this.disabled4 = false
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled4 = false
}
}
}
}
</script>

View File

@@ -1,102 +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-7">
<span class="filter_label">条码</span>
</view>
<view class="zd-col-17 filter_select">
<search-box
v-model="val1"
/>
</view>
</view>
</view>
<view v-if="JSON.stringify(obj) !== '{}'" class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">重量</span>
</view>
<view class="zd-col-17 filter_select">
<input type="number" class="filter_input" v-model="obj.material_weight" disabled>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">数量</span>
</view>
<view class="zd-col-17 filter_select">
<input type="number" class="filter_input" v-model="obj.material_qty" disabled>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">牌号</span>
</view>
<view class="zd-col-17 filter_select">
<input type="text" class="filter_input" v-model="obj.material_code" disabled>
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_zpxxTask">确认</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {zpxxTask} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
val1: '',
obj: {},
disabled: false
};
},
onLoad (options) {
this.title = options.title
},
created () {
},
methods: {
clearUp () {
this.val1 = ''
this.obj = {}
},
async _zpxxTask () {
this.disabled = true
if (!this.val1) {
this.disabled = false
return
}
try {
let res = await zpxxTask(this.val1)
this.disabled = false
uni.showToast({
title: res.message,
icon: 'none'
})
this.obj = res
} catch (e) {
this.disabled = false
}
}
}
}
</script>
<style lang="stylus">
</style>

View File

@@ -1,152 +0,0 @@
<template>
<view class="zd_container">
<nav-bar :title="title"></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">
<view class="zd-col-15 item-font-1">{{e.task_no}}&nbsp;&#124;&nbsp;{{e.inst_status_name}}</view>
<view class="zd-col-9 item-font-2" style="text-align:right">{{e.create_time}}</view>
</view>
<view class="zd-row">
<view class="zd-col-16">
<view class="zd-row">
<view class="zd-col-6 item-font-3">指令号</view>
<view class="zd-col-18 item-font-4">{{e.inst_no}}</view>
</view>
<view class="zd-row">
<view class="zd-col-10 item-font-3">指令执行步骤</view>
<view class="zd-col-14 item-font-4">{{e.inst_step}}</view>
</view>
<view class="zd-row">
<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">
<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-7">优先级</view>
</view>
</view>
<view class="zd-row">
<view class="zd-col-10 item-font-6">起始设备{{e.start_devicecode}}</view>
<view class="zd-col-2 item-font-7">&ndash;&ndash;</view>
<view class="zd-col-10 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>
</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 {
state: [{id:'-1', text: '全部'}, {id:'0', text: '就绪'}, {id:'1', text: '执行中'}],
tab: '-1',
title: '',
data: [],
dataList: [],
pkId: '',
disabled: false
};
},
onLoad (options) {
this.title = options.title
},
created () {
this._handInsts()
},
methods: {
toSearch () {
this.show = true
this.tab = '-1'
},
async _handInsts () {
try {
let res = await handInsts(this.val1, this.val2, this.val3)
if (res.code === '1') {
this.data = [...res.result]
this.dataList = [...this.data]
} else {
uni.showToast({
title: res.desc,
icon: 'none'
})
}
} catch (e) {
uni.showToast({
title: res.desc,
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)
if (res.code === '1') {
this.disabled = false
this.tab = '-1'
this._handInsts()
uni.showToast({
title: res.desc,
icon: 'none'
})
} else {
this.disabled = false
}
} catch (e) {
this.disabled = false
}
},
toCheck (e) {
this.pkId = this.pkId === e.inst_uuid ? '' : e.inst_uuid
}
}
}
</script>
<style lang="stylus" scoped>
.item-font-1
font-size 28rpx
</style>

View File

@@ -1,115 +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-8">
<span class="filter_label">人工分拣点位</span>
</view>
<view class="zd-col-15 filter_select">
<zxz-uni-data-select v-model="index1" filterable :localdata="options1"></zxz-uni-data-select>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-8">
<span class="filter_label">缓存货架点位</span>
</view>
<view class="zd-col-15 filter_select">
<zxz-uni-data-select v-model="index2" filterable :localdata="options2"></zxz-uni-data-select>
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-7 button-default" @tap.stop="clearUp">清空</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !index1 || !index2}" :disabled="disabled1" @tap="_rgfjqlTask">叫料</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !index1}" :disabled="disabled2" @tap="_rgfjskTask">送空盘</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {rgfjPoint,hchjPoint,rgfjqlTask,rgfjskTask} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
options1: [],
index1: '',
options2: [],
index2: '',
disabled1: false,
disabled2: false
};
},
onLoad (options) {
this.title = options.title
},
created () {
this._rgfjPoint()
this._hchjPoint()
},
methods: {
/** 下拉框*/
async _rgfjPoint () {
let res = await rgfjPoint()
this.options1 = [...res]
},
async _hchjPoint () {
let res = await hchjPoint()
this.options2 = [...res]
},
clearUp () {
this.index1 = ''
this.index2 = ''
this.disabled1 = false
this.disabled2 = false
},
async _rgfjqlTask () {
this.disabled1 = true
if (!this.index1 || !this.index2) {
this.disabled1 = false
return
}
try {
let res = await rgfjqlTask(this.index2, this.index1)
this.disabled1 = false
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled1 = false
}
},
async _rgfjskTask () {
this.disabled2 = true
if (!this.index1) {
this.disabled2 = false
return
}
try {
let res = await rgfjskTask(this.index1)
this.disabled2 = false
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled2 = false
}
}
}
}
</script>
<style lang="stylus">
@import '../../common/style/mixin.styl';
</style>

View File

@@ -1,82 +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">
<search-box
v-model="val1"
/>
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-22 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="toPop">物料报废</button>
</view>
<view class="zd_content msg_wrapper" :class="show ? 'popshow' : 'pophide'">
<view class="pop-line"></view>
<view class="msg_content">
<view class="zd-row">
<view class="zd-col-24">
<span class="filter_label">确定是否执行物料报废</span>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-11 button-default" @tap.stop="show = false">关闭</button>
<button class="zd-col-11 button-primary" :disabled="disabled" @tap="_materialScrap">确定</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 {materialScrap} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
val1: '',
show: false,
disabled: false
};
},
onLoad (options) {
this.title = options.title
},
methods: {
toPop () {
if (this.val1) {
this.show = true
}
},
async _materialScrap () {
this.disabled = true
try {
let res = await materialScrap(this.val1)
this.show = false
this.disabled = false
this.val1 = ''
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled = false
}
}
}
}
</script>

View File

@@ -1,149 +0,0 @@
<template>
<view class="zd_container">
<nav-bar :title="title"></nav-bar>
<view class="zd-row jccenter tab-item-wraper">
<view class="zd-col-16 zd-row">
<view class="tab-item" :class="{'tab-item_active': tab === 1}" @tap="tab=1">回库</view>
<view class="tab-item" :class="{'tab-item_active': tab === 2}" @tap="tab=2">点对点</view>
</view>
</view>
<view class="zd_content zd_content_1">
<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"></zxz-uni-data-select>
</view>
</view>
</view>
<view v-show="tab === 2" class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>点位编码</th>
<th>产品牌号</th>
<th>入库时间</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="e.pointCode" @click="toChose(e)" :class="{'checked': e.pointCode === pkId}">
<td>{{e.pointCode}}</td>
<td>{{e.materialCode}}</td>
<td>{{e.instorageTime}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</view>
<view v-show="tab === 1" class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="index1 = ''">清空</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !index1}" :disabled="disabled" @tap="toPop">强制回货架</button>
</view>
<view v-show="tab === 2" class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="index1 = ''">清空</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !index1 || !pkId}" :disabled="disabled" @tap="_yzqlTask">请求上料位</button>
</view>
<view class="zd_content msg_wrapper" :class="show ? 'popshow' : 'pophide'">
<view class="pop-line"></view>
<view class="msg_content">
<view class="zd-row">
<view class="zd-col-24">
<span class="filter_label">确定是否强制回货架</span>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-11 button-default" @tap.stop="show = false">关闭</button>
<button class="zd-col-11 button-primary" :disabled="disabled" @tap="_qzhhjTask">确定</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 {yjslwPointList, qzhhjTask,packShelfInfo,yzqlTask} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
tab: 1,
title: '',
options1: [],
index1: '',
show: false,
disabled: false,
dataList: [],
pkId: ''
};
},
onLoad (options) {
this.title = options.title
},
created () {
this._yjslwPointList()
this._packShelfInfo()
},
methods: {
/** 下拉框*/
async _yjslwPointList () {
let res = await yjslwPointList()
this.options1 = [...res]
},
toPop () {
if (this.index1) {
this.show = true
}
},
/** 强制回货架 */
async _qzhhjTask () {
this.disabled = true
try {
let res = await qzhhjTask(this.index1)
this.show = false
this.disabled = false
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled = false
}
},
/** 查询货架上已拆包料盅信息 */
async _packShelfInfo () {
let res = await packShelfInfo()
this.dataList = [...res]
},
toChose (e) {
this.pkId = this.pkId === e.pointCode ? '' : e.pointCode
},
/** 困料货架点对点到布料机上料位 */
async _yzqlTask () {
this.disabled = true
try {
let res = await yzqlTask(this.pkId, this.index1)
this.disabled = false
this.pkId = ''
this._packShelfInfo()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled = false
}
},
}
}
</script>

View File

@@ -1,136 +0,0 @@
<template>
<view class="zd_container">
<nav-bar :title="title"></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.task_uuid}">
<view class="zd-row">
<view class="zd-col-10 item-font-1">{{e.task_no}}</view>
<view class="zd-col-10 item-font-2" style="text-align:right">{{e.create_time}}</view>
</view>
<view class="zd-row">
<view class="zd-col-16">
<view class="zd-row">
<view class="zd-col-7 item-font-3">任务状态</view>
<view class="zd-col-17 item-font-4">{{e.task_status_name}}</view>
</view>
<view class="zd-row">
<view class="zd-col-7 item-font-3">载具号</view>
<view class="zd-col-17 item-font-4">{{e.carrier}}</view>
</view>
</view>
<view class="zd-col-8">
<view class="item-font-5">{{e.priority}}</view>
<view class="item-font-7">优先级</view>
</view>
</view>
<view class="zd-row">
<view class="zd-col-10 item-font-6">起始设备{{e.start_devicecode}}</view>
<view class="zd-col-2 item-font-7">&ndash;&ndash;</view>
<view class="zd-col-10 item-font-6">目标设备{{e.next_devicecode}}</view>
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-11 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_handTaskoperation('1')">重新生成</button>
<button class="zd-col-11 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_handTaskoperation('2')">强制完成</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {handTasks, handTaskoperation} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
state: [{id:'-1', text: '全部'}, {id:'0', text: '就绪'}, {id:'1', text: '执行中'}],
tab: '-1',
title: '',
data: [],
dataList: [],
pkId: '',
disabled: false
};
},
onLoad (options) {
this.title = options.title
},
created () {
this._handTasks()
},
methods: {
async _handTasks () {
try {
let res = await handTasks()
if (res.code === '1') {
this.data = [...res.result]
this.dataList = [...this.data]
} else {
uni.showToast({
title: res.desc,
icon: 'none'
})
}
} catch (e) {
uni.showToast({
title: res.desc,
icon: 'none'
})
}
},
changeTab (e) {
this.tab = e.id
if (e.id !== '-1') {
let arr = this.data.filter(el => {return el.task_status === e.id})
this.dataList = [...arr]
} else {
this.dataList = [...this.data]
}
},
async _handTaskoperation (type) {
this.disabled = true
if (!this.pkId) {
this.disabled = false
return
}
try {
let res = await handTaskoperation(type, this.pkId)
if (res.code === '1') {
this.disabled = false
this.tab = '-1'
this._handTasks()
uni.showToast({
title: res.desc,
icon: 'none'
})
} else {
this.disabled = false
}
} catch (e) {
this.disabled = false
}
},
toCheck (e) {
this.pkId = this.pkId === e.task_uuid ? '' : e.task_uuid
}
}
}
</script>
<style lang="stylus">
</style>

View File

@@ -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-7">
<span class="filter_label">区域</span>
</view>
<view class="zd-col-17 filter_select">
<uni-data-select v-model="index1" :localdata="options1" @change="change"></uni-data-select>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">点位</span>
</view>
<view class="zd-col-17 filter_select">
<uni-data-select v-model="index2" :localdata="options2"></uni-data-select>
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !index2}" :disabled="disabled" @tap="_vehicleUnbind">解绑</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {vehicleUnbind} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
options1: [{value: 0, text: '困料区域', point: []}, {value: 1, text: '缓存货架区域', point: []}],
index1: '',
options2: [],
index2: '',
disabled: false
};
},
onLoad (options) {
this.title = options.title
},
created () {
let point1 = []
for (let i = 0; i < 56; i++) {
if (i >= 9) {
point1.push({value: `KLHW${i+1}`, text: `困料货位${i+1}`})
} else {
point1.push({value: `KLHW0${i+1}`, text: `困料货位0${i+1}`})
}
}
let point2 = []
for (let i = 0; i < 44; i++) {
if (i >= 9) {
point2.push({value: `HCHJ${i+1}`, text: `缓存货架${i+1}`})
} else {
point2.push({value: `HCHJ0${i+1}`, text: `缓存货架0${i+1}`})
}
}
this.options1[0].point = point1
this.options1[1].point = point2
},
methods: {
change (e) {
this.options1.map((el, i) => {
if (e === i) {
this.options2 = el.point
}
})
},
clearUp () {
this.index1 = ''
this.index2 = ''
},
async _vehicleUnbind () {
this.disabled = true
if (!this.index2) {
this.disabled = false
return
}
try {
let res = await vehicleUnbind(this.index2)
this.disabled = false
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled = false
}
}
}
}
</script>
<style lang="stylus">
</style>

View File

@@ -1,133 +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-8">
<span class="filter_label">区域</span>
</view>
<view class="zd-col-15 filter_select">
<uni-data-select v-model="index1" :localdata="options1" @change="change"></uni-data-select>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-8">
<span class="filter_label">点位</span>
</view>
<view class="zd-col-15 filter_select">
<uni-data-select v-model="index2" :localdata="options2"></uni-data-select>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">条码</span>
</view>
<view class="zd-col-17 filter_select">
<search-box
v-model="val1"
/>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">重量</span>
</view>
<view class="zd-col-17 filter_select">
<input type="number" class="filter_input" v-model="val2">
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">数量</span>
</view>
<view class="zd-col-17 filter_select">
<input type="number" class="filter_input" v-model="val3">
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !index2 || !val1 || !val2 || !val3}" :disabled="disabled" @tap="_mlTask">满料搬运</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {mlTask} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
options1: [{value: 0, text: '混碾区域', point: []}, {value: 1, text: '压制区域', point: []}],
index1: '',
options2: [],
index2: '',
val1: '',
val2: '',
val3: '',
disabled: false
};
},
onLoad (options) {
this.title = options.title
},
created () {
let point1 = []
for (let i = 0; i < 8; i++) {
point1.push({value: `HNJ0${i+1}DJW`, text: `混碾机对接位0${i+1}`})
}
let point2 = []
for (let i = 0; i < 10; i++) {
if (i >= 9) {
point2.push({value: `YJ${i+1}XLW01`, text: `压制机${i+1}下料位01`}, {value: `YJ${i+1}XLW02`, text: `压制机${i+1}下料位02`})
} else {
point2.push({value: `YJ0${i+1}XLW01`, text: `压制机0${i+1}下料位01`}, {value: `YJ0${i+1}XLW02`, text: `压制机0${i+1}下料位02`})
}
}
this.options1[0].point = point1
this.options1[1].point = point2
},
methods: {
change (e) {
this.options1.map((el, i) => {
if (e === i) {
this.options2 = el.point
}
})
},
clearUp () {
this.index1 = ''
this.index2 = ''
this.val1 = ''
this.val2 = ''
this.val3 = ''
},
async _mlTask () {
this.disabled = true
if (!this.index2 || !this.val1 || !this.val2 || !this.val3) {
this.disabled = false
return
}
try {
let res = await mlTask(this.index2, this.val1, this.val2, this.val3)
this.disabled = false
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled = false
}
}
}
}
</script>

View File

@@ -1,142 +0,0 @@
<template>
<view class="zd_container">
<!-- 拣选单列表 -->
<nav-bar :title="title" :inner="true"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">料箱码</span>
</view>
<view class="zd-col-24 filter_select">
<search-box
v-model="val1"
/>
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>序号</th>
<th class="th_2">拣选单编码</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" @tap="toChek(e)" :class="{'checked': pkId === code}">
<td>{{i+1}}</td>
<td class="td_2">{{e.code}}</td>
<td>{{e.vehicle_code}}</td>
<td>{{e.status}}</td>
<td>{{e.stor_code}}</td>
<td>{{e.point_code}}</td>
<td>{{e.product_area}}</td>
<td>{{e.create_time}}</td>
</tr>
</tbody>
</table>
</view>
</view>
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="toEmpty">清空</button>
<button class="zd-col-6 button-primary" @tap="searchList">查询</button>
<button class="zd-col-10 button-primary" @tap="toSure">确认</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {pmFormData2} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
val1: '',
dataList: [],
pkId: '',
pkObj: {},
reload: false,
status: 'more',
contentText: {
contentdown: '查看更多',
contentrefresh: '加载中',
contentnomore: '没有更多'
},
totalCount: 0,
pageNum: 1,
pageSize: 10
};
},
onLoad (options) {
this.title = options.title
},
methods: {
searchList () {
this.dataList = []
this.pageNum = 1
this._pmFormData()
},
async _pmFormData () {
let res = await pmFormData2(this.pageNum + '', this.pageSize + '', 'Picking', '10', this.val1)
if (res.code === '200') {
this.totalCount = res.totalElements
if (res.totalElements > 0) {
const dataMap = res.content
this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap)
this.reload = false
} else {
this.dataList = []
}
if (this.totalCount == this.dataList.length) {
this.reload = false
this.status = 'noMore'
}
}
},
onReachBottom () {
if (this.totalCount > this.dataList.length) {
this.status = 'loading'
setTimeout(() => {
this.pageNum++
this._pmFormData()
}, 1000)
} else { //停止加载
this.status = 'noMore'
}
},
toEmpty () {
this.val1 = ''
this.dataList = []
this.pageNum = 1
this.pkId = ''
this.pkObj = {}
},
toChek (e) {
this.pkId = this.pkId === e.code ? '' : e.code
this.pkObj = this.pkId === e.code ? e : {}
},
toSure () {
if (this.pkId) {
this.$store.dispatch('setPublicObj', this.pkObj)
uni.navigateBack()
}
}
}
}
</script>

View File

@@ -1,311 +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-10">
<span class="filter_label">料箱编码</span>
</view>
<view class="zd-col-14">
<search-box
v-model="val1"
@handleChange="handleChange"
/>
</view>
</view>
<view class="zd-row border-bottom filter_input_disabled">
<view class="zd-col-10">
<span class="filter_label">拣选单据</span>
</view>
<view class="zd-col-14">
<input type="text" class="filter_input" v-model="data.code" disabled>
</view>
</view>
<view class="zd-row border-bottom filter_input_disabled">
<view class="zd-col-10">
<span class="filter_label">车间</span>
</view>
<view class="zd-col-14">
<input type="text" class="filter_input" v-model="data.product_area" disabled>
</view>
</view>
<view class="zd-row border-bottom filter_input_disabled">
<view class="zd-col-10">
<span class="filter_label">拣选仓库</span>
</view>
<view class="zd-col-14">
<input type="text" class="filter_input" v-model="data.stor_code" disabled>
</view>
</view>
<view class="zd-row border-bottom filter_input_disabled">
<view class="zd-col-10">
<span class="filter_label">拣选站台</span>
</view>
<view class="zd-col-14">
<input type="text" class="filter_input" v-model="data.point_code" disabled>
</view>
</view>
<view class="zd-row border-bottom filter_input_disabled">
<view class="zd-col-10">
<span class="filter_label">拣选数量</span>
</view>
<view class="zd-col-14">
<input type="number" class="filter_input" v-model="data.assign_qty" disabled>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-10">
<span class="filter_label">出库至二楼料箱</span>
</view>
<view class="zd-col-14">
<search-box
v-model="val2"
@handleChange="handleChange2"
/>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-10">
<span class="filter_label">是否机械搬运</span>
</view>
<view class="relative zd-col-14">
<switch :checked="isChecked" color="#4e6ef2" style="transform:scale(0.8); transform-origin: left;"/>
<text @tap="setWStatus" style="position: absolute;display: inline-block;width: 52px; height: 32px;left: 0;"></text>
</view>
</view>
<!-- <view class="zd-row border-bottom">
<view class="zd-col-10">
<span class="filter_label">是否机打印</span>
</view>
<view class="relative zd-col-14">
<switch :checked="isChecked1" color="#4e6ef2" style="transform:scale(0.8); transform-origin: left;"/>
<text @tap="setWStatus1" style="position: absolute;display: inline-block;width: 52px; height: 32px;left: 0;"></text>
</view>
</view> -->
<view class="zd-row border-bottom">
<view class="zd-col-10">
<span class="filter_label">返回至立库料箱</span>
</view>
<view class="zd-col-14">
<search-box
v-model="val3"
@handleChange="handleChange3"
/>
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !val1|| !val2 || !val3 || (val2 === val3)}" :disabled="disabled" @tap="toSure">拣选确认</button>
</view>
<view class="zd_content msg_wrapper" :class="show ? 'popshow' : 'pophide'">
<view class="pop-line"></view>
<view class="msg_content">
<view class="zd-row border-bottom">
<view class="zd-col-10 filter_label">出库二楼料箱号为</view>
<view class="zd-col-14 font-size-1">{{val2}}</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-10 filter_label">返回立库料箱号为</view>
<view class="zd-col-14 font-size-1">{{val3}}</view>
</view>
<view class="filter_label">是否确认</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-11 button-default" @tap.stop="show = false;disabled = false">关闭</button>
<button class="zd-col-11 button-primary" :disabled="disabled" @tap="toConfirm">确定</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 {queryPick, savePickTask} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
val1: '',
val2: '',
val3: '',
isChecked: true,
isChecked1: false,
data: {},
disabled: false,
show: false
};
},
onLoad (options) {
this.title = options.title
},
onShow() {
if (this.$store.getters.publicObj !== '') {
this.data = this.$store.getters.publicObj
}
},
methods: {
handleChange (e) {
this._queryPick(e)
},
handleChange2 (e) {
if (this.val3 && e === this.val3) {
uni.showToast({
title: '出库和入库料箱不能相同',
icon: 'none'
})
this.val3 = ''
}
},
handleChange3 (e) {
if (this.val2 && e === this.val2) {
uni.showToast({
title: '出库和入库料箱不能相同',
icon: 'none'
})
this.val2 = ''
}
},
async _queryPick (e) {
let res = await queryPick('Picking', e)
this.data = res
},
setWStatus () {
this.isChecked = !this.isChecked
},
setWStatus1 () {
this.isChecked1 = !this.isChecked1
},
clearUp () {
this.data = {}
this.val1 = ''
this.val2 = ''
this.val3 = ''
this.isChecked = true
this.isChecked1 = false
this.disabled = false
this.show = false
},
toSure () {
if (!this.val1|| !this.val2 || !this.val3) {
return
}
if (this.val2 === this.val3) {
uni.showToast({
title: '出库和入库料箱不能相同',
icon: 'none'
})
return
}
this.show = true
},
toConfirm () {
// if (this.isChecked1) {
// this.disabled = true
// let data = Object.assign({}, this.data, {lxCode: this.val2})
// this.toPrint(data)
// } else {
// this._savePickTask()
// }
this._savePickTask()
},
async _savePickTask () {
this.disabled = true
try {
let obj = Object.assign({}, this.data, {is_move: this.isChecked, pick_vehicle_23: this.val2, pick_vehicle_13: this.val3})
let res = await savePickTask(obj)
if (res.code === '200') {
uni.showToast({
title: res.message,
icon: 'none'
})
this.clearUp()
} else {
this.disabled = false
}
} catch (e) {
this.disabled = 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
})
this.disabled = false
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', '50mm', '');
// LODOP.SET_PRINT_MODE("POS_BASEON_PAPER",true);
LODOP.ADD_PRINT_RECT('1mm', '3mm', '74mm', '44mm', 0, 1);
LODOP.SET_PRINT_STYLE('FontSize', 10);
LODOP.SET_PRINT_STYLE('Bold', 1);
LODOP.ADD_PRINT_TEXT('5mm', '30mm', '32mm', '15mm', '物料信息卡');
let tableHtml = `
<div id="div1">
<style>table{border:none} td{border: 1px solid #000;height:18px;font-size: 10px;text-align: center}</style>
<table border=0 cellSpacing=0 cellPadding=0 width="100%" bordercolor="#000000" style="border-collapse:collapse">
<tbody>
<tr>
<td width="40%">用料单号</td>
<td width="60%">${data.prd_ppbom_no}</td>
</tr>
<tr>
<td width="40%">物料编码</td>
<td width="60%">${data.material_code}</td>
</tr>
<tr>
<td width="40%">物料名称</td>
<td width="60%">${data.material_name}</td>
</tr>
<tr>
<td width="40%">物料规格</td>
<td width="60%">${data.material_spec}</td>
</tr>
<tr>
<td width="40%">物料数量</td>
<td width="60%">${data.assign_qty}</td>
</tr>
<tr>
<td width="40%">料箱号</td>
<td width="60%">${data.lxCode}</td>
</tr>
</tbody>
</table>
</div>`
LODOP.ADD_PRINT_TABLE("12mm",'5mm',"70mm","30mm",tableHtml);
LODOP.PRINT();
// LODOP.PREVIEW()
uni.showToast({
title: '打印成功',
icon: 'none'
})
if (this.isChecked1) {
this._savePickTask()
}
}
}
}
</script>

View File

@@ -1,176 +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-7">
<span class="filter_label">任务类型</span>
</view>
<view class="zd-col-24 filter_select">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">载具编码</span>
</view>
<view class="zd-col-24 filter_select">
<search-box
v-model="val1"
/>
</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.task_code === pkId}">
<td>{{e.task_type}}</td>
<td>{{e.task_code}}</td>
<td>{{e.vehicle_code}}</td>
<td>{{e.status}}</td>
<td>{{e.point_code1}}</td>
<td>{{e.point_code2}}</td>
<td>{{e.create_time}}</td>
</tr>
</tbody>
</table>
</view>
</view>
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="toSure('80')">完成</button>
<button class="zd-col-6 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="toSure('80')">强制完成</button>
<button class="zd-col-6 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="toSure('90')">取消</button>
<button class="zd-col-5 button-primary" @tap="searchList">查询</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {getStatusEnum, schBaseTask, saveCheckTask} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
options: [],
index: '',
val1: '',
dataList: [],
pkId: '',
reload: false,
status: 'more',
contentText: {
contentdown: '查看更多',
contentrefresh: '加载中',
contentnomore: '没有更多'
},
totalCount: 0,
pageNum: 1,
pageSize: 10,
disabled: false
};
},
onLoad (options) {
this.title = options.title
this._getStatusEnum()
},
methods: {
async _getStatusEnum () {
let res = await getStatusEnum()
this.options = [...res]
this.options.map(el => {
this.$set(el, 'text', el.label)
})
},
selectChange (e) {
this.index = e
},
searchList () {
this.dataList = []
this.pageNum = 1
this._schBaseTask()
},
async _schBaseTask () {
let res = await schBaseTask(this.pageNum + '', this.pageSize + '', this.index, this.val1)
if (res.code === '200') {
this.totalCount = res.totalElements
if (res.totalElements > 0) {
const dataMap = res.content
this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap)
this.reload = false
} else {
this.dataList = []
}
if (this.totalCount == this.dataList.length) {
this.reload = false
this.status = 'noMore'
}
}
},
onReachBottom () {
if (this.totalCount > this.dataList.length) {
this.status = 'loading'
setTimeout(() => {
this.pageNum++
this._schBaseTask()
}, 1000)
} else { //停止加载
this.status = 'noMore'
}
},
toCheck (e) {
this.pkId = e.e.task_code === this.pkId ? '' : e.task_code
},
async toSure (status) {
this.disabled = true
if (!this.pkId) {
this.disabled = false
return
}
try {
let res = await saveCheckTask(this.pkId, status)
if (res.code === '200') {
this.index = ''
this.val1 = ''
this.dataList = []
this.pkId = ''
uni.showToast({
title: res.desc,
icon: 'none'
})
} else {
uni.showToast({
title: res.desc,
icon: 'none'
})
}
this.disabled = false
} catch (e) {
this.disabled = false
}
}
}
}
</script>

View File

@@ -1,110 +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-7">
<span class="filter_label">载具编码</span>
</view>
<view class="zd-col-24 filter_select">
<search-box
v-model="val2"
/>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">起点</span>
</view>
<view class="zd-col-24">
<search-box
v-model="val1"
@handleChange="handleChange"
/>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">终点</span>
</view>
<view class="zd-col-24 filter_select">
<uni-data-select v-model="index" :localdata="options"></uni-data-select>
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="toEmpty">清空</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !index || !val2}" :disabled="disabled" @tap="_transfConfirm">转运确认</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {deviceManageTransf, transfConfirm} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
val1: '',
options: [],
index: '',
val2: '',
disabled: false
};
},
onLoad (options) {
this.title = options.title
},
methods: {
handleChange (e) {
if (e) {
this._deviceManageTransf(e)
}
},
async _deviceManageTransf (e) {
let res = await deviceManageTransf(e)
this.options = [...res]
},
async _transfConfirm () {
this.disabled = true
if (!this.val1 || !this.index || !this.val2) {
this.disabled = false
return
}
try {
let res = await transfConfirm(this.val1, this.index, this.val2)
this.disabled = false
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled = false
}
},
toEmpty () {
this.val1 = ''
this.index = ''
this.disabled = false
}
}
}
</script>
<style lang="stylus" scoped>
@import '../../common/style/mixin.styl';
.button-primary, .button-default
_fj(center)
font-size 26rpx
height 88rpx
line-height 30rpx
</style>