Commit 8c90ae38 authored by 李苏's avatar 李苏 💬

XGWCS1.02 新增库位清空

parent fdc6543c
This diff is collapsed.
......@@ -297,3 +297,15 @@ export function queryRqgys(params){
return filter(e)
})
}
/* 清空库位接口 */
export function searchKwByKwCode(params){
return http.post("/xgwcs/kwcx/searchKwByKwCode", params || {}).then(e => {
return filter(e)
})
}
export function emptyKwByCode(params){
return http.post("/xgwcs/kwcx/emptyKwByCode", params || {}).then(e => {
return filter(e)
})
}
......@@ -179,6 +179,13 @@ const routes = [
{
path: '/pages/dl_kw_adjust/index',
name: 'kwAdjust',
meta: {
title: '清空工位',
},
},
{
path: '/pages/dl_kw_clear/index',
name: 'kwClear',
meta: {
title: '清空库位',
},
......
......@@ -2,8 +2,8 @@
"name" : "wcs",
"appid" : "__UNI__79C58F0",
"description" : "徐工道路系统功能",
"versionName" : "1.0.0",
"versionCode" : 100,
"versionName" : "1.0.2",
"versionCode" : 102,
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
......
......@@ -156,7 +156,7 @@
}
},
/* 清空 */
/* 清空 */
{
"path" : "pages/dl_kw_adjust/index",
......@@ -166,6 +166,16 @@
"enablePullDownRefresh": false
}
},
/* 清空库位 */
{
"path" : "pages/dl_kw_clear/index",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
/* 修改密码界面 */
{
......
<template>
<view class="bg-white">
<cu-custom bgColor="bg-gradual-blue" :isBack="true">
<block slot="content">清空库位</block>
<block slot="backText">返回</block>
</cu-custom>
<!-- 添加蒙层 -->
<orange-fullloading :loadicon='loadicon' :loadshow='loadshow' bgcolor="rgba(128, 128, 128, 0.5)" :text="loadtext"></orange-fullloading>
<view class="cu-form-group">
<view class="title ">库位码</view>
<input v-model="dmcode" placeholder="请扫描库位码" focus="true" @confirm="apiGetDminfo()"></input>
<Scan :app="app" :params="'dmcode'" :do="'apiGetDminfo'" ></Scan>
</view>
<view class="cu-form-group disable">
<view class="title ">已扫库位码</view>
<input v-model="ysdmcode" disabled="" focus="true"></input>
</view>
<view v-if="dminfo.id">
<view class="flex flex-wrap padding bg-grey white radio" style="position: relative;">
<view class="basis-sm margin-top-xs margin-bottom-xs radius">库位码编号:<span>{{dminfo.code}}</span></view>
<view class="basis-lg margin-top-xs margin-bottom-xs radius">名称:<span>{{dminfo.name}}</span></view>
</view>
</view>
<view class="padding flex align-center bg-white justify-around">
<button class="cu-btn bg-gradual-green lg wid50" @tap="isbctz(2)">清空</button>
</view>
</view>
</view>
</template>
<script>
import api from '@/api/api.js';
import {
searchKwByKwCode,
adjustTry,
emptyKwByCode
} from '@/api/dlapi.js'
export default {
data() {
return {
loadshow:false,
loadicon:'/static/loading.png',
loadtext:'数据请求中...',
/* 配盘点数据结构 */
app:this,
selected: "",
ysdmcode: "",
modalName: "",
dmcode: "",
dminfo:{},
}
},
methods: {
// api保存调整
apiadjustTry(){
this.loadshow=true
setTimeout(()=>{
this.loadshow=false
},2000)
let data={
"code": this.dminfo.code
}
emptyKwByCode(data).then(e=>{
if(e){
this.loadshow=false
this.$tip.alert("清空成功");
this.dmcode = ""
this.ysdmcode = ""
this.dminfo = {}
}
})
},
isbctz() {
let that=this
if (this.ysdmcode) {
uni.showModal({
title: '提示',
content: '是否清空该工位',
cancelText: "否", // 取消按钮的文字
confirmText: "是", // 确认按钮的文字
success: function (res) {
if (res.confirm) {
that.apiadjustTry()
} else if (res.cancel) {
}
}
});
} else {
this.$tip.alert("请先扫描有效库位码信息");
}
},
hideModal() {
this.modalName = ""
},
// 弹框
confirm(e) {
this.modalName = "DialogModal" + e
},
// 删除确认
deldata(item, index) {
let that=this
uni.showModal({
title: '提示',
content: '是否删除该条信息',
cancelText: "否", // 取消按钮的文字
confirmText: "是", // 确认按钮的文字
success: function (res) {
if (res.confirm) {
that.dminfo.splice(that.selected, 1)
} else if (res.cancel) {
}
}
});
},
// 获取库位码信息
apiGetDminfo() {
let data={
"code": this.dmcode
}
searchKwByKwCode(data).then(data => {
if (data && data.records) {
this.ysdmcode = data.records.code
this.dminfo = data.records
} else {
this.dmcode = ""
this.ysdmcode = ""
}
})
}
},
onLoad(e) {
// if(e.query){
// console.log(e.query)
// let dmcode=JSON.parse(e.query).dmcode
// this.dmcode=dmcode
// this.apiGetDminfo()
// }else{
// console.log("no message")
// }
}
}
</script>
<style scoped>
/deep/.uni-numbox-btns {
width: 27.69px !important;
}
.disable {
background-color: #F5F5F5
}
.wid50 {
width: 50%;
}
</style>
......@@ -65,7 +65,7 @@
<view class="padding-sm" v-if="newyrycList.length!=0">
<view class="cu-bar bg-white solid-bottom">
<view class="action text-bold">
<text class='cuIcon-title text-blue'></text>移库管理
<text class='cuIcon-title text-blue'></text>库位管理
</view>
</view>
<view class="grid col-2 bg-white">
......@@ -177,7 +177,14 @@
useCount: 1000,
page: "outIn",
mkid:993001200
}, ],
},
{
title: "清空库位",
icon: "/static/icon/work5.png",
useCount: 1000,
page: "kwClear",
mkid:993001600
}],
newyrycList: [],
// icon:"/wcs/apps/static/icon/work.png",pc端图标路径
//手机端去除/wcs/xgapps
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment