| | |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/order/orderList", |
| | | "path" : "pages/warehouse/orderList", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "平库下架", |
| | |
| | | } |
| | | |
| | | } |
| | | ,{ |
| | | "path" : "pages/warehouse/outLocs", |
| | | "style" : |
| | | { |
| | | // "navigationBarTitleText": "关联库位", |
| | | // "enablePullDownRefresh": false |
| | | "navigationStyle": "custom" |
| | | } |
| | | |
| | | } |
| | | ,{ |
| | | "path" : "pages/warehouse/outMats", |
| | | "style" : |
| | | { |
| | | // "navigationBarTitleText": "下架物料", |
| | | // "enablePullDownRefresh": false |
| | | "navigationStyle": "custom" |
| | | } |
| | | |
| | | } |
| | | ], |
| | | "globalStyle": { |
| | | "navigationBarTextStyle": "black", |
| | |
| | | name: 'orderPutOn', |
| | | color: 'yellow', |
| | | cuIcon: 'pullup', |
| | | url: '/order/orderList' |
| | | url: '/warehouse/orderList' |
| | | }, |
| | | { |
| | | title: '订单组托', |
File was renamed from pages/order/orderList.vue |
| | |
| | | </uni-nav-bar> |
| | | <!-- 搜索框 --> |
| | | <view class="search-bar"> |
| | | <uni-search-bar v-model="orderNo" placeholder=" 输入订单号" bgColor="#EEEEEE" @input="search" /> |
| | | <uni-search-bar v-model="orderNo" placeholder=" 输入订单号" bgColor="#EEEEEE" @confirm="search" /> |
| | | </view> |
| | | <view class="card" v-for="item in menuList" @click="chose(item)"> |
| | | {{item}} |
| | | {{item.orderNo}} |
| | | </view> |
| | | </view> |
| | | </template> |
| | |
| | | let that = this |
| | | uni.request({ |
| | | url: this.baseUrl + '/outOrder/list/all', |
| | | data: that.orderNo, |
| | | data: {orderNo:that.orderNo}, |
| | | header: { |
| | | 'token': uni.getStorageSync('token') |
| | | 'token': uni.getStorageSync('token'), |
| | | 'content-type': 'application/x-www-form-urlencoded; charset=UTF-8' |
| | | }, |
| | | method: 'POST', |
| | | success(res) { |
| | |
| | | chose(item) { |
| | | let that = this |
| | | uni.navigateTo({ |
| | | url: "./orderDetlList", |
| | | url: "./outLocs", |
| | | success: function(res) { |
| | | // 通过eventChannel向被打开页面传送数据 向另外一个页面传递值的 |
| | | res.eventChannel.emit('order', { |
New file |
| | |
| | | <template> |
| | | <view> |
| | | <view class="status_bar"> |
| | | <!-- 这里是状态栏 --> |
| | | </view> |
| | | <uni-nav-bar left-icon="left" background-color="#f8f8f8" title="关联库位" @clickLeft="back" :fixed="true" |
| | | :border="false" rightWidth="160rpx" leftWidth="160rpx" |
| | | > |
| | | <block slot="right"> |
| | | <view class="city"> |
| | | <view> |
| | | <text class="uni-nav-bar-text">{{store}}</text> |
| | | </view> |
| | | </view> |
| | | </block> |
| | | </uni-nav-bar> |
| | | <!-- 搜索框 --> |
| | | <!-- <view class="search-bar"> |
| | | <uni-search-bar v-model="searchVal" placeholder=" 输入库位号" bgColor="#EEEEEE" @input="search" /> |
| | | </view> --> |
| | | <view style="margin: 0;background-color: aliceblue;text-align: center;height: 30px;"> |
| | | 当前订单号: {{order.orderNo}} |
| | | </view> |
| | | <view class="card" v-for="item in menuList" @click="chose(item)"> |
| | | {{item}} |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | baseUrl: '', |
| | | token: '', |
| | | storeId: 0, |
| | | store: '', |
| | | orderNo: '', |
| | | searchVal: '', |
| | | orderId: 0, |
| | | menuList: [], |
| | | order: {orderNo: '--'}, |
| | | orNo: '' |
| | | } |
| | | }, |
| | | onShow() { |
| | | this.baseUrl = uni.getStorageSync('baseUrl'); |
| | | this.token = uni.getStorageSync('token'); |
| | | this.storeId = uni.getStorageSync('store') |
| | | if (this.storeId == 1) { |
| | | this.store = '宁波仓' |
| | | } |
| | | if (this.storeId == 2) { |
| | | this.store = '新昌仓' |
| | | } |
| | | let that = this |
| | | const eventChannel = that.getOpenerEventChannel(); |
| | | eventChannel.on('order', function(data) { |
| | | // console.log(data) |
| | | that.orderId = data.orderNo.id |
| | | that.order = data.orderNo |
| | | that.getOrderNoList(that.orderId) |
| | | }) |
| | | }, |
| | | methods: { |
| | | back() { |
| | | uni.navigateBack({}) |
| | | }, |
| | | getOrderNoList(orderId) { |
| | | let that = this |
| | | uni.request({ |
| | | url: that.baseUrl + '/mobile/pda/OutLocNo', |
| | | data: {orderId:orderId}, |
| | | header: { |
| | | 'token': uni.getStorageSync('token'), |
| | | 'content-type': 'application/x-www-form-urlencoded; charset=UTF-8' |
| | | }, |
| | | method: 'POST', |
| | | success(res) { |
| | | res = res.data |
| | | that.menuList = res.data |
| | | } |
| | | }) |
| | | }, |
| | | search() { |
| | | let baseList = [...this.menuList] |
| | | this.menuList = this.fuzzySearch(baseList,this.searchVal) |
| | | }, |
| | | |
| | | fuzzySearch(array, query) { |
| | | const regex = new RegExp(query, 'i'); // 'i' 表示不区分大小写 |
| | | return array.filter(num => regex.test(num.toString())); |
| | | }, |
| | | chose(item) { |
| | | let that = this |
| | | uni.navigateTo({ |
| | | url: "./outMats", |
| | | success: function(res) { |
| | | // 通过eventChannel向被打开页面传送数据 向另外一个页面传递值的 |
| | | res.eventChannel.emit('order', { |
| | | locNo: item, |
| | | orderId: that.orderId, |
| | | orderNo: that.order |
| | | }) |
| | | }, |
| | | events: { |
| | | // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 另外一个页面传过来的 |
| | | matList: function(data) { |
| | | // that.matnr = data.data |
| | | that.getOrderNoList(that.orderId) |
| | | }, |
| | | }, |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | @import url('../../static/css/wms.css/wms.css'); |
| | | .card { |
| | | margin: 20rpx; |
| | | padding: 30rpx; |
| | | background-color: #157ec1; |
| | | border-radius: 20rpx; |
| | | color: #FFF; |
| | | } |
| | | </style> |
| | | |
New file |
| | |
| | | <template> |
| | | <view> |
| | | <view class="status_bar"> |
| | | <!-- 这里是状态栏 --> |
| | | </view> |
| | | <uni-nav-bar left-icon="left" background-color="#f8f8f8" title="下架物料" @clickLeft="back" :fixed="true" |
| | | :border="false" rightWidth="160rpx" leftWidth="160rpx" |
| | | > |
| | | <block slot="right"> |
| | | <view class="city"> |
| | | <view> |
| | | <text class="uni-nav-bar-text">{{store}}</text> |
| | | </view> |
| | | </view> |
| | | </block> |
| | | </uni-nav-bar> |
| | | <!-- 搜索框 --> |
| | | <!-- <view class="search-bar"> |
| | | <uni-search-bar v-model="orderNo" placeholder=" 输入" bgColor="#EEEEEE" @input="search" /> |
| | | </view> --> |
| | | <view class="mat-list-title"> |
| | | <view style="width: 200rpx;"></view> |
| | | <view style="-webkit-flex: 1;flex: 1;">库位号:{{locNo}}</view> |
| | | <view style="width: 200rpx;"><button size="mini" type="primary" @click="allSelect()">{{seltitle}}</button></view> |
| | | </view> |
| | | |
| | | <view style="height: 60px;"></view> |
| | | |
| | | <view> |
| | | <!-- 物料名称 物料号 批号 关联单号 库存数量 出库数量--> |
| | | <view class="list_item" v-for="(item,index) in dataList"> |
| | | <view class="list_check_box"> |
| | | <label @click="checkboxChange(item)"> |
| | | <checkbox :value="item.matnr" :checked="item.checked" style="transform:scale(0.7)" /><text></text> |
| | | </label> |
| | | </view> |
| | | <view class="list_main"> |
| | | <view> |
| | | <text class="desc_name">物料号:</text> |
| | | <text class="desc_connect">{{item.matnr}}</text> |
| | | </view> |
| | | <view> |
| | | <text class="desc_name">物料名称:</text> |
| | | <text class="desc_connect">{{item.maktx}}</text> |
| | | </view> |
| | | <view> |
| | | <text class="desc_name">订单号:</text> |
| | | <text class="desc_connect">{{item.orderNo}}</text> |
| | | </view> |
| | | <view> |
| | | <text class="desc_name">数量:</text> |
| | | <text class="desc_connect">{{item.anfme}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="list_fix"> |
| | | <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view style="margin: 8px;text-align: center;color: #777;" v-if="dataList.length == 0"> |
| | | 没有数据 |
| | | </view> |
| | | |
| | | <view style="height: 60px;"></view> |
| | | |
| | | <!-- 底部操作按钮 --> |
| | | <view class="buttom"> |
| | | <button size="mini" type="primary" @click="combConfirm('warn')">下架</button> |
| | | </view> |
| | | |
| | | |
| | | <!-- 确认组托 --> |
| | | <view> |
| | | <uni-popup ref="combConfirm" type="dialog"> |
| | | <uni-popup-dialog :type="msgType" cancelText="取消" confirmText="确认" :title="title" :content="content" |
| | | @confirm="comb" @close="combClose"></uni-popup-dialog> |
| | | </uni-popup> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | baseUrl: '', |
| | | token: '', |
| | | storeId: 0, |
| | | store: '', |
| | | orderNo: '', |
| | | locNo: '--', |
| | | seltitle: '取消全选', |
| | | dataList: [], |
| | | msgType: 'success', |
| | | messageText: '', |
| | | content: '', |
| | | title: '' |
| | | } |
| | | }, |
| | | onShow() { |
| | | this.baseUrl = uni.getStorageSync('baseUrl'); |
| | | this.token = uni.getStorageSync('token'); |
| | | this.storeId = uni.getStorageSync('store') |
| | | if (this.storeId == 1) { |
| | | this.store = '宁波仓' |
| | | } |
| | | if (this.storeId == 2) { |
| | | this.store = '新昌仓' |
| | | } |
| | | let that = this |
| | | const eventChannel = that.getOpenerEventChannel(); |
| | | eventChannel.on('order', function(data) { |
| | | that.locNo = data.locNo |
| | | that.orderNo = data.orderNo.orderNo |
| | | console.log(that.orderNo); |
| | | that.getLocInfo(data.locNo,data.orderId) |
| | | }) |
| | | }, |
| | | methods: { |
| | | back() { |
| | | uni.navigateBack({}) |
| | | }, |
| | | checkboxChange(e) { |
| | | let items = this.dataList, |
| | | values = e.matnr; |
| | | if (e.checked) { |
| | | this.$set(e,'checked',false) |
| | | } else { |
| | | this.$set(e,'checked',true) |
| | | } |
| | | console.log(this.dataList); |
| | | }, |
| | | getLocInfo(locNo,orderId) { |
| | | let _this = this |
| | | uni.request({ |
| | | url: _this.baseUrl + '/mobile/pda/OrderDetlContrastLocDetl', |
| | | data: {locNo: locNo,orderId: orderId}, |
| | | header: { |
| | | 'token': uni.getStorageSync('token'), |
| | | 'content-type': 'application/x-www-form-urlencoded; charset=UTF-8' |
| | | }, |
| | | method: 'POST', |
| | | success(res) { |
| | | res = res.data |
| | | if (res.code === 200) { |
| | | for (let k of res.data) { |
| | | k['checked'] = true |
| | | } |
| | | _this.dataList = res.data |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | allSelect() { |
| | | if (this.seltitle == '全选') { |
| | | for (let k of this.dataList) { |
| | | k.checked = true |
| | | } |
| | | this.seltitle = '取消全选' |
| | | } else { |
| | | for (let k of this.dataList) { |
| | | k.checked = false |
| | | } |
| | | this.seltitle = '全选' |
| | | } |
| | | |
| | | }, |
| | | combConfirm(type) { |
| | | this.msgType = type |
| | | this.title = '警告' |
| | | this.content = '是否现在下架!' |
| | | this.$refs.combConfirm.open() |
| | | }, |
| | | combClose() { |
| | | this.$refs.combConfirm.close() |
| | | }, |
| | | // 下架 |
| | | comb() { |
| | | let that = this; |
| | | if (that.locNo === '') { |
| | | this.messageText = "请扫描库位号" |
| | | this.messageToggle('error') |
| | | return; |
| | | } |
| | | if (that.dataList.length === 0) { |
| | | this.messageText = "请添加商品列表" |
| | | this.messageToggle('error') |
| | | return; |
| | | } |
| | | let optDataList = [] |
| | | for (let k of that.dataList) { |
| | | console.log(k); |
| | | if (k.checked) { |
| | | optDataList.push(k) |
| | | } |
| | | } |
| | | uni.request({ |
| | | url: that.baseUrl + '/mobile/pda/WarehouseOut', |
| | | data: JSON.stringify({ |
| | | orderNo: that.orderNo, |
| | | locno: that.locNo, |
| | | combMats: optDataList |
| | | }), |
| | | method: 'POST', |
| | | header: { |
| | | 'token': uni.getStorageSync('token') |
| | | }, |
| | | success(result) { |
| | | var res = result.data |
| | | if (res.code === 200) { |
| | | uni.showToast({ title: res.msg, icon: "success", position: 'top' }) |
| | | setTimeout(()=>{ |
| | | that.getOpenerEventChannel().emit('matList', {}); |
| | | uni.navigateBack({ |
| | | delta: 1, // 返回上一页面 |
| | | }) |
| | | },1500) |
| | | } 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' }) |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | @import url('../../static/css/wms.css/wms.css'); |
| | | .mat-list-title { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 80rpx; |
| | | width: 100%; |
| | | background-color: white; |
| | | position: fixed; |
| | | margin-top: 0; |
| | | z-index: 9; |
| | | /* border-top: 1px solid #DCDFE6; */ |
| | | text-align: center; |
| | | box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.1); |
| | | } |
| | | .list_item { |
| | | margin: 8px; |
| | | min-height: 40px; |
| | | border-radius: 8px; |
| | | display: flex; |
| | | background-color: #ffffff; |
| | | } |
| | | .list_check_box { |
| | | border-right: 1px solid #e5e5e5; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | padding: 8px; |
| | | } |
| | | .list_main { |
| | | padding: 8px; |
| | | flex: 1; |
| | | } |
| | | .list_fix { |
| | | border-left: 1px solid #e5e5e5; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | padding: 8px; |
| | | } |
| | | .desc_name { |
| | | font-weight: bold; |
| | | color: #222; |
| | | } |
| | | .desc_connect { |
| | | color: #333; |
| | | } |
| | | </style> |