标准箱接收驳回
This commit is contained in:
parent
29935a6fa1
commit
0325cc3cef
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name" : "material-app",
|
"name" : "material-app",
|
||||||
"appid" : "__UNI__FDE8917",
|
"appid" : "__UNI__AD10BE7",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.1",
|
"versionName" : "1.0.1",
|
||||||
"versionCode" : 101,
|
"versionCode" : 101,
|
||||||
|
|
@ -49,7 +49,9 @@
|
||||||
"dSYMs" : false
|
"dSYMs" : false
|
||||||
},
|
},
|
||||||
/* SDK配置 */
|
/* SDK配置 */
|
||||||
"sdkConfigs" : {}
|
"sdkConfigs" : {
|
||||||
|
"ad" : {}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"nativePlugins" : {
|
"nativePlugins" : {
|
||||||
"Mpaas-Scan" : {
|
"Mpaas-Scan" : {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<view class="page-container">
|
<view class="page-container">
|
||||||
<view class="complete-btn">
|
<view class="complete-btn">
|
||||||
<view class="btn" @click="changeTab(1)">
|
<view class="btn" @click="changeTab(1)">
|
||||||
<span>未完成</span>
|
<span>未接收</span>
|
||||||
<div v-if="active == 1" class="bt-line"></div>
|
<div v-if="active == 1" class="bt-line"></div>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn" style="margin-left: 120rpx" @click="changeTab(2)">
|
<view class="btn" style="margin-left: 120rpx" @click="changeTab(2)">
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span class="code">{{ item.boxCode }}</span>
|
<span class="code">{{ item.boxCode }}</span>
|
||||||
<span :class="['status', item.status == 4 ? 'completed' : 'pending']">
|
<span :class="['status', item.status == 4 ? 'completed' : 'pending']">
|
||||||
{{ item.status == 4 ? '已完成' : '未完成' }}
|
{{ item.status == 4 ? '已完成' : '未接收' }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
|
|
@ -89,8 +89,7 @@ import { ref,computed } from 'vue'
|
||||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'lodash-es'
|
||||||
import { getPurchaseList } from '@/services/purchase.js'
|
import { getPurchaseList } from '@/services/purchase.js'
|
||||||
import { getQrCodeBoxListApi } from '@/services/standard.js'
|
import { getQrCodeBoxListApi,appReceiveApi,appTransferRejectApi } from '@/services/standard.js'
|
||||||
|
|
||||||
const total = ref(0) // 数据总量
|
const total = ref(0) // 数据总量
|
||||||
const active = ref(1) // tap索引
|
const active = ref(1) // tap索引
|
||||||
const tableList = ref([]) // 列表数据源
|
const tableList = ref([]) // 列表数据源
|
||||||
|
|
@ -117,13 +116,67 @@ const onChangeDate = (val) => {
|
||||||
const onClick=(e,item)=> {
|
const onClick=(e,item)=> {
|
||||||
if(item.status==4){
|
if(item.status==4){
|
||||||
if(e.index==0){
|
if(e.index==0){
|
||||||
uni.navigateTo({ url: `/pages/new-purchase/entry/details?id=${item.id}&taskId=${item.taskId}` })
|
uni.navigateTo({ url: `/pages/standardBox/codeView?boxInfo=${JSON.stringify(item)}` })
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if(e.index==0){
|
if(e.index==0){
|
||||||
uni.navigateTo({ url: `/pages/new-purchase/entry/details?id=${item.id}&taskId=${item.taskId}` })
|
uni.navigateTo({ url: `/pages/standardBox/codeView?boxInfo=${JSON.stringify(item)}` })
|
||||||
}else{
|
}else if(e.index==1){//接收
|
||||||
uni.navigateTo({ url: `/pages/new-purchase/entry/inEntry?id=${item.id}&taskId=${item.taskId}` })
|
console.log(item)
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '是否确认接收?',
|
||||||
|
confirmText: '确定',
|
||||||
|
cancelText: '取消',
|
||||||
|
success: async (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
let param = {
|
||||||
|
boxId:item.boxId
|
||||||
|
}
|
||||||
|
// console.log(param)
|
||||||
|
const res = await appReceiveApi(param)
|
||||||
|
if (res.code === 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '接收成功',
|
||||||
|
icon: 'none',
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
getTableList(true)
|
||||||
|
}, 500)
|
||||||
|
}else{
|
||||||
|
uni.showToast({ title: '接收失败', icon: 'none' })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{//驳回
|
||||||
|
console.log(item)
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '是否确认驳回移交?',
|
||||||
|
confirmText: '确定',
|
||||||
|
cancelText: '取消',
|
||||||
|
success: async (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
let param = {
|
||||||
|
boxId:item.boxId
|
||||||
|
}
|
||||||
|
// console.log(param)
|
||||||
|
const res = await appTransferRejectApi(param)
|
||||||
|
if (res.code === 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '驳回成功',
|
||||||
|
icon: 'none',
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
getTableList(true)
|
||||||
|
}, 500)
|
||||||
|
}else{
|
||||||
|
uni.showToast({ title: '驳回失败', icon: 'none' })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -149,13 +202,13 @@ const swipeOptionsFail = ref([
|
||||||
style: { backgroundColor: '#34C759' },
|
style: { backgroundColor: '#34C759' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '入库',
|
text: '接收',
|
||||||
style: { backgroundColor: '#007AFF' },
|
style: { backgroundColor: '#007AFF' },
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// text: '驳回',
|
text: '驳回',
|
||||||
// style: { backgroundColor: '#dd524d' },
|
style: { backgroundColor: '#dd524d' },
|
||||||
// }
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
//左滑改变
|
//左滑改变
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,37 @@
|
||||||
{{ finish ? '没有更多数据了~' : '正在加载...' }}
|
{{ finish ? '没有更多数据了~' : '正在加载...' }}
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
|
<uni-popup ref="keeperPopup" type="bottom" border-radius="10px 10px 0 0">
|
||||||
|
<view class="keeper-popup">
|
||||||
|
<view class="handle-box">
|
||||||
|
<view class="handle-box-btn" style="background: #CCC;color: #FFF;" @click="closePopup">取消</view>
|
||||||
|
<view class="handle-box-btn" style="background: #3784fb;color: #FFF;" @click="confirmTransfer">确定</view>
|
||||||
|
</view>
|
||||||
|
<scroll-view scroll-y style="padding-bottom: 85rpx" class="keeper-box" v-if="keeperList.length>0">
|
||||||
|
<view class="table-list-item" v-for="item in keeperList" :key="item.id">
|
||||||
|
<uni-row :gutter="24">
|
||||||
|
<uni-col :span="4">
|
||||||
|
<checkbox-group @change="onChangeChecked(item)">
|
||||||
|
<label>
|
||||||
|
<checkbox color="#409eff"
|
||||||
|
borderColor="#409eff"
|
||||||
|
activeBorderColor="#409eff"
|
||||||
|
:checked="item.checked"
|
||||||
|
style="transform: scale(0.7)"
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
</checkbox-group>
|
||||||
|
</uni-col>
|
||||||
|
<uni-col :span="12">
|
||||||
|
<view class="cont">{{ item.userName }}</view>
|
||||||
|
</uni-col>
|
||||||
|
</uni-row>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
<view v-else style="width: 100%;margin-top: 20px;text-align: center;">暂无库管员...</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -89,13 +120,16 @@ import { ref,computed } from 'vue'
|
||||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'lodash-es'
|
||||||
import { getPurchaseList } from '@/services/purchase.js'
|
import { getPurchaseList } from '@/services/purchase.js'
|
||||||
import { getQrCodeBoxListApi } from '@/services/standard.js'
|
import { getQrCodeBoxListApi,getTransferKeepsListApi,appTransferApi } from '@/services/standard.js'
|
||||||
|
|
||||||
const total = ref(0) // 数据总量
|
const total = ref(0) // 数据总量
|
||||||
const active = ref(1) // tap索引
|
const active = ref(1) // tap索引
|
||||||
const tableList = ref([]) // 列表数据源
|
const tableList = ref([]) // 列表数据源
|
||||||
const dateArray = ref([]) // 日期范围
|
const dateArray = ref([]) // 日期范围
|
||||||
|
const keeperPopup = ref(null);
|
||||||
|
const transferItem = ref({});
|
||||||
|
const keeperList = ref([])
|
||||||
|
const transferUser = ref("")
|
||||||
// 查询参数
|
// 查询参数
|
||||||
const queryParams = ref({
|
const queryParams = ref({
|
||||||
startTime: '', // 开始时间
|
startTime: '', // 开始时间
|
||||||
|
|
@ -123,7 +157,7 @@ const onClick=(e,item)=> {
|
||||||
if(e.index==0){
|
if(e.index==0){
|
||||||
uni.navigateTo({ url: `/pages/standardBox/codeView?boxInfo=${JSON.stringify(item)}` })
|
uni.navigateTo({ url: `/pages/standardBox/codeView?boxInfo=${JSON.stringify(item)}` })
|
||||||
}else{
|
}else{
|
||||||
|
getKeeperList(item)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -226,6 +260,75 @@ const changeTab = (index) => {
|
||||||
// 重新获取数据
|
// 重新获取数据
|
||||||
getTableList(true)
|
getTableList(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const closePopup = () => {
|
||||||
|
keeperPopup.value.close();
|
||||||
|
}
|
||||||
|
const getKeeperList = (item) => {
|
||||||
|
transferItem.value = item;
|
||||||
|
if(item.maTypeId){
|
||||||
|
//{"maTypeId":codeList.value[0].maTypeId}
|
||||||
|
getTransferKeepsListApi({"maTypeId":item.maTypeId}).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if(res.code=200){
|
||||||
|
keeperList.value = res.data;
|
||||||
|
if (keeperList.value.length > 0) {
|
||||||
|
keeperList.value = keeperList.value.map((e) => {
|
||||||
|
return { ...e, checked: false }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
console.log(keeperList)
|
||||||
|
}
|
||||||
|
keeperPopup.value.open('bottom');
|
||||||
|
}).catch(error => {
|
||||||
|
console.log(error)
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.showToast({ title: '未绑定机具无法移交!', icon: 'none' })
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// 复选框事件
|
||||||
|
const onChangeChecked = (item) => {
|
||||||
|
item.checked = !item.checked
|
||||||
|
if(item.checked){
|
||||||
|
keeperList.value.forEach((e) => {
|
||||||
|
if(e.userId==item.userId){
|
||||||
|
transferUser.value=item.userId;
|
||||||
|
e.checked=true
|
||||||
|
}else{
|
||||||
|
e.checked=false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
transferUser.value="";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
const confirmTransfer = () => {
|
||||||
|
if(transferUser.value!=""){
|
||||||
|
|
||||||
|
let param = {
|
||||||
|
"boxId":transferItem.value.boxId,
|
||||||
|
"transferUser":transferUser.value,
|
||||||
|
}
|
||||||
|
console.log(param)
|
||||||
|
appTransferApi(param).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if(res.code=200){
|
||||||
|
keeperPopup.value.close();
|
||||||
|
uni.showToast({ title: '移交成功!', icon: 'none' })
|
||||||
|
getTableList(true)
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
console.log(error)
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.showToast({ title: '请先勾选移交人!', icon: 'none' })
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
const maskClick = () => {}
|
const maskClick = () => {}
|
||||||
|
|
||||||
// // 页面加载完毕
|
// // 页面加载完毕
|
||||||
|
|
@ -537,6 +640,36 @@ const finish = computed(() => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.keeper-popup{
|
||||||
|
width: 100%;
|
||||||
|
height: 40vh;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 10px;
|
||||||
|
|
||||||
|
.handle-box{
|
||||||
|
width: 94%;margin: 10px auto;
|
||||||
|
padding-top: 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;justify-content: space-between;
|
||||||
|
.handle-box-btn{
|
||||||
|
width: 60px;
|
||||||
|
height: 32px;line-height: 32px;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.keeper-box{
|
||||||
|
width: 94%;margin: 10px auto;
|
||||||
|
height: 36vh;
|
||||||
|
}
|
||||||
|
.table-list-item{
|
||||||
|
width: 90%;
|
||||||
|
margin: 5px auto;
|
||||||
|
height: 30px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// 加载提示文字
|
// 加载提示文字
|
||||||
.loading-text {
|
.loading-text {
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,22 @@ export const appTransferApi = (data)=> {
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 标准箱接收
|
||||||
|
export const appReceiveApi = (data)=> {
|
||||||
|
return http({
|
||||||
|
url: '/material/bm_qrcode_box/app_receive',
|
||||||
|
method: 'POST',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 标准箱驳回接收
|
||||||
|
export const appTransferRejectApi = (data)=> {
|
||||||
|
return http({
|
||||||
|
url: '/material/bm_qrcode_box/app_transfer_reject',
|
||||||
|
method: 'POST',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ import { useMemberStore } from '@/stores'
|
||||||
*/
|
*/
|
||||||
const ENV = process.env.NODE_ENV
|
const ENV = process.env.NODE_ENV
|
||||||
// export const baseURL = ENV === 'development' ? 'http://192.168.0.234:18580' : '***'
|
// export const baseURL = ENV === 'development' ? 'http://192.168.0.234:18580' : '***'
|
||||||
// export const baseURL = ENV === 'development' ? 'http://192.168.0.234:18080' : '***'
|
export const baseURL = ENV === 'development' ? 'http://192.168.0.234:18080' : '***'
|
||||||
export const baseURL = ENV === 'development' ? '/api' : '***'
|
// export const baseURL = ENV === 'development' ? '/api' : '***'
|
||||||
/**
|
/**
|
||||||
* httpInterceptor 分别拦截 request 和 uploadFile 请求
|
* httpInterceptor 分别拦截 request 和 uploadFile 请求
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue