From 873e64746e0f64889392a34dbe62dc8913d9ecf3 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期四, 30 五月 2024 10:44:29 +0800
Subject: [PATCH] #
---
pages/home/wrkMastManage.vue | 7 +
pages/phyz/orderOut/orderOutSelect.vue | 4
pages/phyz/stationManage/stationDetl.vue | 86 ++++++++++++++
pages/phyz/wrkMast/DBList.vue | 214 ++++++++++++++++++++++++++---------
pages/phyz/orderOut/bcpOrderOutSelect.vue | 4
5 files changed, 260 insertions(+), 55 deletions(-)
diff --git a/pages/home/wrkMastManage.vue b/pages/home/wrkMastManage.vue
index a3c9e32..6ddf5b1 100644
--- a/pages/home/wrkMastManage.vue
+++ b/pages/home/wrkMastManage.vue
@@ -32,6 +32,13 @@
// cuIcon: 'pullup',
url: `/phyz/wrkMast/wrkMast`
},
+ {
+ title: '璋冩嫧浠诲姟绠$悊',
+ name: 'wrkMast-DB',
+ color: 'blue',
+ // cuIcon: 'pullup',
+ url: `/phyz/wrkMast/DBList`
+ },
// {
// title: '宸ヤ綔鍘嗗彶妗g淮鎶�',
// name: 'wrkMastLog',
diff --git a/pages/phyz/orderOut/bcpOrderOutSelect.vue b/pages/phyz/orderOut/bcpOrderOutSelect.vue
index b8d107e..0a5854d 100644
--- a/pages/phyz/orderOut/bcpOrderOutSelect.vue
+++ b/pages/phyz/orderOut/bcpOrderOutSelect.vue
@@ -197,6 +197,10 @@
},300)
},
goToLocDetl(item) {
+ if (item.qty >= item.anfme) {
+ uni.showToast({ title: '宸插畬鎴愯鍗曚綔涓氭暟閲�', icon: "error", position: 'top' })
+ return
+ }
let _this = this
uni.navigateTo({
url: './orderList',
diff --git a/pages/phyz/orderOut/orderOutSelect.vue b/pages/phyz/orderOut/orderOutSelect.vue
index afbe298..049e5de 100644
--- a/pages/phyz/orderOut/orderOutSelect.vue
+++ b/pages/phyz/orderOut/orderOutSelect.vue
@@ -197,6 +197,10 @@
},300)
},
goToLocDetl(item) {
+ if (item.qty >= item.anfme) {
+ uni.showToast({ title: '宸插畬鎴愯鍗曚綔涓氭暟閲�', icon: "error", position: 'top' })
+ return
+ }
let _this = this
uni.navigateTo({
url: './orderList',
diff --git a/pages/phyz/stationManage/stationDetl.vue b/pages/phyz/stationManage/stationDetl.vue
index 6f39747..9cb294c 100644
--- a/pages/phyz/stationManage/stationDetl.vue
+++ b/pages/phyz/stationManage/stationDetl.vue
@@ -190,6 +190,23 @@
</uni-popup>
</view>
+ <!-- 寮圭獥 -->
+ <view>
+ <uni-popup ref="empIn" type="dialog">
+ <view class="popup">
+ <!-- 鏍囬 -->
+ <view class="title">璇疯緭鍏ヨ揣鏋剁爜</view>
+ <view class="popup-item">
+ <view class="popup-item-left">璐ф灦鐮�:</view>
+ <view class="popup-item-right"><input type="text" v-model="barcode"></view>
+ </view>
+ <view class="btn">
+ <view class="btn-left" @click="empInClose">鍙栨秷</view>
+ <view class="btn-right" @click="empInConfirm()">纭杩涘満</view>
+ </view>
+ </view>
+ </uni-popup>
+ </view>
<!-- 搴曢儴鎿嶄綔鎸夐挳 -->
@@ -206,6 +223,8 @@
<button size="mini" type="primary" @click="startPakin()" v-if="btnType == 'start'">鍚姩鍏ュ簱</button>
<button size="mini" type="primary" @click="allocationOut()" v-if="btnType == 'allocationOut'">璋冩嫧绂诲満</button>
<button size="mini" type="primary" @click="allocationIn()" v-if="btnType == 'allocationIn'">璋冩嫧杩涘満</button>
+ <button size="mini" type="primary" @click="empOut()" v-if="btnType == 'empOut'">绌烘灦绂诲満</button>
+ <button size="mini" type="primary" @click="empIn()" v-if="btnType == 'allocationIn'">绌烘灦杩涘満</button>
</view>
</view>
</template>
@@ -476,7 +495,10 @@
} else if (wrkMast.ioType == 112) {
wrkMast['ioTitle'] = '璋冩嫧鍏ュ簱'
_this.btnType = 'null'
- }
+ } else if (wrkMast.ioType == 113) {
+ wrkMast['ioTitle'] = '璐ф灦鍥炴祦'
+ _this.btnType = 'empOut'
+ }
if (wrkMast.barcode == barcode) {
mast = wrkMast
}
@@ -721,6 +743,34 @@
}
});
},
+ // 绌烘灦绂诲満
+ empOut() {
+ let that = this
+ let params = []
+ let param = { devNo: this.station.devNo, containerCode: this.station.barcode, }
+ params.push(param)
+ uni.request({
+ url: that.baseUrl + '/agvMobile/hand/control/empOut',
+ header: {'token': uni.getStorageSync('token')},
+ data: {devNo: that.station.devNo},
+ method: 'POST',
+ success(result) {
+ var res = result.data
+ if (res.code === 200) {
+ setTimeout(()=> {
+ that.barcode = ''
+ that.reloadStation()
+ },1000)
+ uni.showToast({ title: '绂诲満鎴愬姛', icon: "success", position: 'top' })
+ } else if (res.code == 403) {
+ uni.showToast({ title: res.msg, icon: "error", position: 'top' })
+ setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
+ } else {
+ uni.showToast({ title: res.msg, icon: "error", position: 'top' })
+ }
+ }
+ });
+ },
allocationIn() {
this.$refs.allocationIn.open()
},
@@ -755,6 +805,40 @@
}
});
},
+ empIn() {
+ this.$refs.empIn.open()
+ },
+ empInClose() {
+ this.$refs.empIn.close()
+ },
+ empInConfirm() {
+ let that = this
+ let params = []
+ let param = { devNo: this.station.devNo, containerCode: this.station.barcode, }
+ params.push(param)
+ uni.request({
+ url: that.baseUrl + '/agvMobile/hand/control/empIn',
+ header: {'token': uni.getStorageSync('token')},
+ data: {devNo: that.station.devNo, barcode: that.barcode},
+ method: 'POST',
+ success(result) {
+ var res = result.data
+ if (res.code === 200) {
+ that.$refs.empIn.close()
+ setTimeout(()=> {
+ that.barcode = ''
+ that.reloadStation()
+ },1000)
+ uni.showToast({ title: '杩涘満鎴愬姛', icon: "success", position: 'top' })
+ } else if (res.code == 403) {
+ uni.showToast({ title: res.msg, icon: "error", position: 'top' })
+ setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
+ } else {
+ uni.showToast({ title: res.msg, icon: "error", position: 'top' })
+ }
+ }
+ });
+ },
doBack() {
this.$refs.doBack.open()
},
diff --git a/pages/phyz/wrkMast/DBList.vue b/pages/phyz/wrkMast/DBList.vue
index 3faf48d..1d69a8e 100644
--- a/pages/phyz/wrkMast/DBList.vue
+++ b/pages/phyz/wrkMast/DBList.vue
@@ -1,9 +1,9 @@
<template>
<view class="container">
<view class="code">
- <uni-search-bar :focus="searchValueFocus" v-model="searchValue"
+ <!-- <uni-search-bar :focus="searchValueFocus" v-model="searchValue"
maxlength="500" ancel="cancel" @confirm="searchValueInput2()" @clear="clear" placeholder="杈撳叆 / 鎵弿 璁㈠崟鍙�">
- </uni-search-bar>
+ </uni-search-bar> -->
<view class="code-title">
<view></view>
<view style="width: 100%;text-align: center;margin: 16rpx 0;">{{searchValue}} 鎬绘暟閲忥細- {{total}} -</view>
@@ -14,14 +14,16 @@
<view class="list list-font-color" :class="orderDetl.color" v-for="(orderDetl,index) in dataList" :key="index">
<view class="list-left">
<view class="detl-threeCode">{{orderDetl.wrkNo}}</view>
- <view>宸ヤ綔绫诲瀷锛歿{orderDetl.ioType$}}</view>
+ <view>宸ヤ綔鏃堕棿锛歿{orderDetl.ioTime$}}</view>
+ <view>璋冩嫧绫诲瀷锛歿{orderDetl.ioType$}}</view>
<view>宸ヤ綔鐘跺喌锛歿{orderDetl.wrkSts$}}</view>
<view>婧愬簱浣嶏細{{orderDetl.sourceLocNo}}</view>
<view>鐩爣搴撲綅锛歿{orderDetl.locNo}}</view>
+ <view>鐩爣妤煎眰锛歿{orderDetl.crnNo}}</view>
<view>璐ф灦鐮侊細{{orderDetl.barcode}}</view>
</view>
- <view class="list-right" @click="addItem(index)">
- <uni-icons type="folder-add" size="25" color="#fff"></uni-icons>
+ <view class="list-right" @click="opt(orderDetl)">
+ <uni-icons type="bars" size="25" color="#fff"></uni-icons>
</view>
</view>
@@ -54,37 +56,66 @@
<view class="title">绛涢��</view>
<view class="popup-item" style="background-color: #dfdfdf;">
<view class="item-cl">
- <view>閿�鍞鍗曪細</view>
- <input type="text" v-model="searchValue">
+ <view>宸ヤ綔鍙凤細</view>
+ <input type="text" v-model="wrk_no">
</view>
</view>
<view class="popup-item" style="background-color: #dfdfdf;">
<view class="item-cl">
- <view>涓昏鍗曞彿锛�</view>
- <input type="text" v-model="orderNo">
+ <view>宸ヤ綔绫诲瀷锛�</view>
+ <input type="text" v-model="io_type">
</view>
</view>
<view class="popup-item" style="background-color: #dfdfdf;">
<view class="item-cl">
- <view>鍟嗗搧缂栧彿锛�</view>
- <input type="text" v-model="matnr">
+ <view>宸ヤ綔鐘舵�侊細</view>
+ <input type="text" v-model="wrk_sts">
</view>
</view>
<view class="popup-item" style="background-color: #dfdfdf;">
<view class="item-cl">
- <view>鍟嗗搧鍚嶇О锛�</view>
- <input type="text" v-model="maktx">
+ <view>婧愬簱浣嶏細</view>
+ <input type="text" v-model="source_loc_no">
</view>
</view>
<view class="popup-item" style="background-color: #dfdfdf;">
<view class="item-cl">
- <view>鍟嗗搧绉嶇被锛�</view>
- <input type="text" v-model="brand">
+ <view>鐩爣搴撲綅锛�</view>
+ <input type="text" v-model="loc_no">
+ </view>
+ </view>
+ <view class="popup-item" style="background-color: #dfdfdf;">
+ <view class="item-cl">
+ <view>璐ф灦鐮侊細</view>
+ <input type="text" v-model="barcode">
+ </view>
+ </view>
+ <view class="popup-item" style="background-color: #dfdfdf;">
+ <view class="item-cl">
+ <view>鐩爣妤煎眰锛�</view>
+ <input type="text" v-model="crn_no">
</view>
</view>
<view class="btn filter-btn">
<view class="btn-left" @click="filterClose">閲嶇疆</view>
<view class="btn-right" @click="filterConfirm()">纭</view>
+ </view>
+ </view>
+ </uni-popup>
+ </view>
+ <!-- 鎿嶄綔寮圭獥 -->
+ <view>
+ <uni-popup ref="option" type="dialog">
+ <view class="filter-popup" style="height: 50vh;">
+ <!-- 鏍囬 -->
+ <view class="title">鎿嶄綔</view>
+ <view style="display: flex;flex-wrap: wrap;">
+ <button size="mini" type="primary" @click="handControlWrkMast('1')" v-show="complete" >瀹屾垚</button>
+ <button size="mini" type="warn" @click="handControlWrkMast('2')">鍙栨秷(AGV)</button>
+ <button size="mini" @click="handControlWrkMast('5')">鍙栨秷</button>
+ </view>
+ <view style="display: flex;" v-show="tranType != 'N'">
+ <button size="mini" @click="changeType()">{{tranType}}</button>
</view>
</view>
</uni-popup>
@@ -100,25 +131,34 @@
token: '',
searchValueFocus: true,
searchValue: '',
- orderNo: '',
- matnr: '',
- maktx: '',
- brand: '',
+ wrk_no: '',
+ barcode: '',
+ wrk_sts: '',
+ crn_no: '',
+ source_loc_no: '',
+ loc_no: '',
+ io_type: '',
total: '',
dataList: [],
orderCarList: [],
data: {
curr: 1,
limit: 100,
- three_code: '',
- matnr: '',
- maktx: '',
- order_no: '',
- brand: ''
+ wrk_no: '',
+ barcode: '',
+ wrk_sts: '',
+ crn_no: '',
+ source_loc_no: '',
+ loc_no: '',
+ io_type: ''
},
index: 0,
count: 0,
- mask: false
+ mask: false,
+ wrkNo: '',
+ tranType: '杞墜鍔�',
+ complete: true,
+
}
},
@@ -143,10 +183,12 @@
methods: {
getOrderDetlList(threeCode,limit) {
uni.showLoading({})
+ if (limit == 1) {
+ this.dataList = []
+ this.data.curr = 1
+ }
let _this = this
- _this.mask = true
- _this.data.three_code = threeCode
- _this.data.limit = limit
+ _this.data.limit = 10
uni.request({
url: `${_this.baseUrl}/agv/wrkMast/list/auth/dbList`,
header: {'token': uni.getStorageSync('token')},
@@ -157,12 +199,12 @@
res = res.data
if (res.code === 200) {
for (let k of res.data.records) {
- if (k.anfme > k.qty && k.qty == 0) {
+ if ([21, 22, 201].includes(k.wrkSts)) {
k['color'] = 'order-sts-start'
- } else if (k.anfme > k.qty && k.qty != 0) {
- k['color'] = 'order-sts-working'
- } else {
+ } else if ([205,206].includes(k.wrkSts)) {
k['color'] = 'order-sts-end'
+ } else {
+ k['color'] = 'order-sts-working'
}
}
let list = res.data.records
@@ -198,20 +240,21 @@
this.getOrderDetlList(this.searchValue,10)
},300)
},
- // 娣诲姞鍏ュ簱鍟嗗搧鑷� 寰呯粍鎵樺垪琛�
- addItem(index) {
- // 鍒ゆ柇娣诲姞鐨勫晢鍝佹槸鍚﹀拰宸茬粡娣诲姞鐨勯噸澶�
- let dataList = this.dataList
- for (let k of this.orderCarList) {
- if (k.orderNo == dataList[index].orderNo
- && k.threeCode == dataList[index].threeCode
- && k.matnr == dataList[index].matnr) {
- uni.showToast({ title: '璇峰嬁閲嶅娣诲姞鍟嗗搧锛�', icon: "none", position: 'top' })
- return
+ // 鎿嶄綔
+ opt(orderDetl) {
+ this.wrkNo = orderDetl.wrkNo
+ if (orderDetl.wrkSts != 22) {
+ this.tranType = 'N'
+ } else {
+ if (orderDetl.ioType == 108) {
+ this.tranType = '杞墜鍔�'
+ } else {
+ this.tranType = '杞嚜鍔�'
}
}
- this.index = index
- this.$refs.addItem.open()
+
+
+ this.$refs.option.open('bottom')
},
addClose() {
this.$refs.addItem.close()
@@ -264,22 +307,81 @@
filterConfirm() {
this.dataList = []
this.data.curr = 1
- this.data.maktx = this.maktx
- this.data.matnr = this.matnr
- this.data.order_no = this.order_no
- this.data.brand = this.brand
- this.getOrderDetlList(this.searchValue,10)
+ this.data.wrk_no = this.wrk_no
+ this.data.barcode = this.barcode
+ this.data.wrk_sts = this.wrk_sts
+ this.data.crn_no = this.crn_no
+ this.data.source_loc_no = this.source_loc_no
+ this.data.loc_no = this.loc_no
+ this.data.io_type = this.io_type
+ this.getOrderDetlList(this.data.wrk_no,10)
this.$refs.filter.close()
},
filterClose() {
this.dataList = []
- this.data.curr = 1
- this.data.maktx = ''
- this.data.matnr = ''
- this.data.order_no = ''
- this.data.brand = ''
+ this.data.wrk_no = ''
+ this.data.barcode = ''
+ this.data.wrk_sts = ''
+ this.data.crn_no = ''
+ this.data.source_loc_no = ''
+ this.data.loc_no = ''
+ this.data.io_type = ''
this.getOrderDetlList(this.searchValue,10)
this.$refs.filter.close()
+ },
+ handControlWrkMast(type) {
+ let _this = this
+ let param = {workNo: _this.wrkNo,type: type}
+ uni.request({
+ url: `${_this.baseUrl}/agv/hand/control/wrkMast`,
+ header: {
+ 'token': uni.getStorageSync('token'),
+ 'content-type': 'application/x-www-form-urlencoded'
+ },
+ data: param,
+ method: 'POST',
+ success(res) {
+ res = res.data
+ if (res.code === 200) {
+ _this.$refs.option.close()
+ setTimeout(()=>{
+ _this.getOrderDetlList('',1)
+ },100)
+ } else if (res.code == 403) {
+ uni.showToast({ title: res.msg, icon: "error", position: 'top' })
+ setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
+ } else {
+ uni.showToast({ title: res.msg, icon: "error", position: 'top' })
+ }
+ }
+ })
+ },
+ changeType() {
+ let _this = this
+ let param = {workNo: _this.wrkNo}
+ uni.request({
+ url: `${_this.baseUrl}/agv/hand/control/wrkMast/changeType`,
+ header: {
+ 'token': uni.getStorageSync('token'),
+ 'content-type': 'application/x-www-form-urlencoded'
+ },
+ data: param,
+ method: 'POST',
+ success(res) {
+ res = res.data
+ if (res.code === 200) {
+ _this.$refs.option.close()
+ setTimeout(()=>{
+ _this.getOrderDetlList('',1)
+ },100)
+ } else if (res.code == 403) {
+ uni.showToast({ title: res.msg, icon: "error", position: 'top' })
+ setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
+ } else {
+ uni.showToast({ title: res.msg, icon: "error", position: 'top' })
+ }
+ }
+ })
}
}
@@ -415,6 +517,10 @@
position: relative;
border-radius: 30rpx 30rpx 0rpx 0rpx;
}
+ .filter-popup button {
+ flex: 1;
+ margin: 16rpx;
+ }
.filter-popup-item {
height: 100%;
width: 100%;
--
Gitblit v1.9.1