741 lines
16 KiB
Vue
Executable File
741 lines
16 KiB
Vue
Executable File
<template>
|
|
<view class="z-application-content">
|
|
<view class="top">
|
|
<view class="header-row-class">
|
|
<p class="header-row-title-class">当前组织</p>
|
|
<xfl-select
|
|
ref="orgArry" class="header-row-select-class" :key='key'
|
|
:list="orgArry"
|
|
:listOrigin="orgArry"
|
|
:defaultSelectText="inOrgArryName"
|
|
:clearable="false"
|
|
:showItemNum="4"
|
|
:isCanInput="false"
|
|
@change="inOrgArryChange"
|
|
/>
|
|
</view>
|
|
<view class="header-row-class">
|
|
<p class="header-row-title-class">拣货类型</p>
|
|
<xfl-select
|
|
ref="billTypeList" class="header-row-select-class"
|
|
:list="billTypeDefaultList"
|
|
:listOrigin="billTypeDefaultList"
|
|
:defaultSelectText="billTypeSelectText"
|
|
:clearable="false"
|
|
:showItemNum="4"
|
|
:isCanInput="false"
|
|
@change="billTypeChange"
|
|
/>
|
|
</view>
|
|
<view class="header-row-class">
|
|
<p class="header-row-title-class">单据日期</p>
|
|
<view style="flex: 1 1;">
|
|
<view class="header-row-input-white-class" @click="creatDatePicker()">
|
|
{{creatlist[0].detail}}
|
|
</view>
|
|
<date-time-picker ref='creatTime':type='type' :datestring='dateString'
|
|
@change='creatTimeChange'>
|
|
</date-time-picker>
|
|
</view>
|
|
</view>
|
|
<view class="header-row-class">
|
|
<p class="header-row-title-class">拣货任务</p>
|
|
<view style="flex: 1 1;">
|
|
<input
|
|
class="header-row-input-white-class"
|
|
type="text" :focus="inputFocus"
|
|
v-model="inputValue"
|
|
@confirm="inputConfirm"
|
|
/>
|
|
</view>
|
|
<image
|
|
src="../../../static/img/scan-blue.png"
|
|
@click="scan()"
|
|
/>
|
|
</view>
|
|
</view>
|
|
<view class="header-row-class" style="justify-content: space-between;padding-top: 20rpx;">
|
|
<view style="font-size: 32rpx;color: #5778FF;">待拣货任务单</view>
|
|
<view
|
|
style="padding: 5rpx 20rpx;color: #fff;
|
|
background: #5778FF;border-radius: 10rpx;"
|
|
@click="searchClick"
|
|
>查询</view>
|
|
</view>
|
|
<view class="table" style="padding-bottom: 100rpx;">
|
|
<z-table
|
|
:tableData='taskTableData'
|
|
:columns='taskColumns'
|
|
emptyText='设置了showLoading=false才会看到我'
|
|
showSelect @onSelect='taskSelect'
|
|
/>
|
|
</view>
|
|
<view
|
|
class="header-row-btn-class-del"
|
|
style="background: #5778FF;"
|
|
@click="startPick"
|
|
>
|
|
开始拣货
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import DateTimePicker from '@/components/bory-dateTimePickerWithOutTime/bory-dateTimePickerWithOutTime.vue';
|
|
export default{
|
|
data() {
|
|
return {
|
|
key: 0,
|
|
orgArry:[{name:"请选择组织", key:"", FName:""}],
|
|
index: 0,
|
|
InOrgID:'' ,
|
|
inOrgArryName:'',
|
|
|
|
billTypeSelectText: '销售拣货调拨',
|
|
billTypeSelectId: '',
|
|
billTypeDefaultList: [
|
|
{value: '销售拣货调拨', identifier: '1'},
|
|
{value: '销售拣货出货', identifier: '2'},
|
|
{value: '销售拣货领用', identifier: '3'},
|
|
{value: '生产拣货调拨', identifier: '4'},
|
|
],
|
|
|
|
dateString: '',
|
|
type: 'date',
|
|
creatlist: [{
|
|
type: 'date',
|
|
detail: '选择开始时间'
|
|
}],
|
|
curDate: '',
|
|
|
|
inputValue: '',
|
|
inputFocus: true,
|
|
|
|
taskTableData: [],
|
|
taskColumns: [
|
|
{ title: "拣货类型", key: "FBILLTYPENAME", width: 300, formatNum: false },
|
|
{ title: "拣货任务单号", key: "FBILLNO", width: 300, formatNum: false },
|
|
{ title: "单据日期", key: "C_YMD", width: 300, formatNum: false },
|
|
],
|
|
taskTableDataSelected: [],
|
|
}
|
|
},
|
|
components: { DateTimePicker },
|
|
mounted() {
|
|
this.getOrgList();
|
|
},
|
|
methods: {
|
|
// 单据切换
|
|
billTypeChange({ newVal, oldVal, index, orignItem }) {
|
|
console.log('billTypeChange>>>', orignItem);
|
|
this.billTypeSelectText = orignItem.value;
|
|
this.billTypeSelectId = orignItem.identifier;
|
|
},
|
|
// 日期切换
|
|
creatDatePicker() {
|
|
this.type = 'date';
|
|
this.$refs['creatTime'].show();
|
|
},
|
|
creatTimeChange(value) {
|
|
let item = this.creatlist[0];
|
|
item['detail'] = value;
|
|
this.curDate = value;
|
|
},
|
|
// 扫码
|
|
scan:function(e) {
|
|
let _self = this;
|
|
uni.scanCode({
|
|
success:function(res){
|
|
_self.inputValue = res.result;
|
|
}
|
|
})
|
|
},
|
|
// 查询
|
|
searchClick() {
|
|
|
|
let requestParams = {
|
|
companyId: this.InOrgID, // 组织ID
|
|
billType: this.billTypeSelectId,
|
|
date: this.curDate,
|
|
billNo: this.inputValue
|
|
}
|
|
console.log('requestParams', requestParams);
|
|
uni.showLoading({
|
|
icon:'loading',
|
|
title:'加载中……',
|
|
mask:true
|
|
});
|
|
|
|
this.$request.get('/PickTask/GetPickTaskList', {params: requestParams}).then(res => {
|
|
uni.hideLoading();
|
|
this.inputValue = '';
|
|
this.inputFocus = true;
|
|
this.taskTableData = res;
|
|
}).catch(e => {
|
|
uni.hideLoading();
|
|
uni.showToast({
|
|
title: JSON.stringify(e),
|
|
icon: 'none'
|
|
})
|
|
});
|
|
|
|
},
|
|
// 选择拣货单
|
|
taskSelect: function(selected) {
|
|
this.taskTableDataSelected = this.taskTableData.filter((v,index) => {
|
|
return selected.includes(index);
|
|
});
|
|
console.log('this.taskTableDataSelected',this.taskTableDataSelected)
|
|
},
|
|
// 开始拣货
|
|
startPick() {
|
|
if (this.taskTableDataSelected.length != 1) {
|
|
uni.showToast({
|
|
title: '请选择一条拣货单',
|
|
icon: 'none'
|
|
});
|
|
return
|
|
}
|
|
if (this.taskTableDataSelected.length == 1) {
|
|
uni.setStorageSync('orderInfo', this.taskTableDataSelected);
|
|
uni.setStorageSync('pickOrgId',this.InOrgID);
|
|
uni.navigateTo({
|
|
url: './STK_PICKEXECUTE_DETAIL'
|
|
});
|
|
}
|
|
},
|
|
|
|
//组织
|
|
getOrgList:function(){
|
|
let _self = this;
|
|
let orgInfo = uni.getStorageSync('orgInfo');
|
|
|
|
if(orgInfo && orgInfo.length > 0) {
|
|
let defaultOrgInfo = uni.getStorageSync('defaultOrgInfo');
|
|
let isOpenDefaultOrg = uni.getStorageSync('isOpenDefaultOrg');
|
|
if(!isOpenDefaultOrg){
|
|
this.InOrgID = orgInfo[0].FINTERID;
|
|
this.inOrgArryName = orgInfo[0].FNAME;
|
|
}else{
|
|
if(defaultOrgInfo){
|
|
this.InOrgID = defaultOrgInfo.FINTERID;
|
|
this.inOrgArryName = defaultOrgInfo.FNAME;
|
|
}else{
|
|
this.InOrgID = orgInfo[0].FINTERID;
|
|
this.inOrgArryName = orgInfo[0].FNAME;
|
|
}
|
|
}
|
|
|
|
this.orgArry = orgInfo;
|
|
this.orgArry.forEach(
|
|
function(el,index){
|
|
el.value = el.FNAME;
|
|
let currentOrgid = el.FINTERID;
|
|
let result = (currentOrgid == _self.orgFItemID);
|
|
if(result){
|
|
_self.index = index;
|
|
el.FNAME = el.FNAME?el.FNAME:'无';
|
|
}
|
|
}
|
|
);
|
|
|
|
}else{
|
|
this.orgArry = [{name:"请选择组织", key:"", FNAME:"当前无组织"}];
|
|
this.index = 0;
|
|
}
|
|
this.key++;
|
|
this.searchClick();
|
|
},
|
|
|
|
inOrgArryChange:function(e){
|
|
this.index = e.index;
|
|
let isOpenDefaultOrg = uni.getStorageSync('isOpenDefaultOrg');
|
|
if(!this.orgArry[this.index].FINTERID){
|
|
this.InOrgID = "";
|
|
}else{
|
|
this.InOrgID = this.orgArry[this.index].FINTERID;
|
|
if(isOpenDefaultOrg){
|
|
uni.setStorageSync('defaultOrgInfo',this.orgArry[this.index]);
|
|
}
|
|
}
|
|
},
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
.z-application-content {
|
|
font-size: 44rpx;
|
|
}
|
|
.header-row-class-organzie{
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
align-items: center;
|
|
padding-right: 50rpx;
|
|
}
|
|
.header-row-title-class-organzie{
|
|
font-size: 32rpx;
|
|
font-family: MicrosoftYaHei;
|
|
color: #666666;
|
|
}
|
|
.head-row-content-class-organzie{
|
|
font-size: 32rpx;
|
|
font-family: MicrosoftYaHei;
|
|
color: #666666;
|
|
}
|
|
.img-organzie{
|
|
height: 32rpx;
|
|
width: 32rpx;
|
|
margin-left: 24rpx;
|
|
}
|
|
.header-row-class {
|
|
display: flex;
|
|
flex-wrap: nowrap;
|
|
height: 60rpx;
|
|
line-height: 60rpx;
|
|
margin-top: 8rpx;
|
|
// background-color: #f7f9ff;
|
|
justify-content: flex-start;
|
|
align-items: center;
|
|
margin-left: 32rpx;
|
|
margin-right: 32rpx;
|
|
}
|
|
.header-row-class image{
|
|
height: 40rpx;
|
|
width: 40rpx;
|
|
position: absolute;
|
|
right: 40rpx;
|
|
|
|
}
|
|
.header-row-title-class {
|
|
width: 130rpx;
|
|
height: 60rpx;
|
|
line-height: 60rpx;
|
|
font-size: 32rpx;
|
|
font-family: MicrosoftYaHei;
|
|
color: #666666;
|
|
}
|
|
|
|
.header-row-select-class{
|
|
width: 100%;
|
|
height: 66rpx;
|
|
line-height: 66rpx;
|
|
border-radius: 10rpx;
|
|
border: 2rpx solid #D8D8D8;
|
|
flex: 1 1;
|
|
font-size: 32rpx;
|
|
font-family: MicrosoftYaHei;
|
|
color: #5F7EF8;
|
|
margin-left: 24rpx;
|
|
}
|
|
|
|
.header-row-input-gray-class{
|
|
height: 60rpx;
|
|
border-radius: 10rpx;
|
|
border: 2rpx solid #D8D8D8;
|
|
flex: 0 0;
|
|
font-size: 32rpx;
|
|
font-family: MicrosoftYaHei;
|
|
color: #5F7EF8;
|
|
background-color: #F4F4F4;
|
|
margin-left: 24rpx;
|
|
padding-left: 24rpx;
|
|
}
|
|
|
|
.header-row-input-white-class{
|
|
height: 60rpx;
|
|
line-height: 60rpx;
|
|
border-radius: 10rpx;
|
|
border: 2rpx solid #D8D8D8;
|
|
flex: 0 0;
|
|
font-size: 32rpx;
|
|
font-family: MicrosoftYaHei;
|
|
background-color: #FFFFFF;
|
|
color: #5F7EF8;
|
|
margin-left: 24rpx;
|
|
padding-left: 24rpx;
|
|
}
|
|
|
|
.separate{
|
|
width: 100%;
|
|
height: 16rpx;
|
|
background-color:#F5F5F5;
|
|
}
|
|
|
|
.detail-tabs-class {
|
|
display: flex;
|
|
flex-wrap: nowrap;
|
|
justify-content: flex-start;
|
|
align-items: center;
|
|
height: 80rpx;
|
|
}
|
|
.detail-tabs-btn-gray-class {
|
|
position: relative;
|
|
width: 100%;
|
|
height: 80rpx;
|
|
line-height: 80rpx;
|
|
text-align: center;
|
|
font-size:28rpx;
|
|
font-family:MicrosoftYaHei;
|
|
color:#4662FF;
|
|
flex-grow: 1;
|
|
flex-shrink: 1;
|
|
}
|
|
.detail-tabs-btn-gray-class::after{
|
|
position: absolute;
|
|
content: " ";
|
|
width: 2rem;
|
|
height: 0.12rem;
|
|
background: #4662FF;
|
|
bottom: -0.1rem;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
}
|
|
|
|
.detail-tabs-btn-handle-class {
|
|
// position: relative;
|
|
width: 100%;
|
|
height: 80rpx;
|
|
line-height: 80rpx;
|
|
text-align: center;
|
|
font-size:28rpx;
|
|
font-family:MicrosoftYaHei;
|
|
color:#666666;
|
|
}
|
|
.detail-tabs-btn-yes-class {
|
|
position: relative;
|
|
width: 100%;
|
|
height: 80rpx;
|
|
line-height: 80rpx;
|
|
text-align: center;
|
|
font-size:28rpx;
|
|
font-family:MicrosoftYaHei;
|
|
color:#666666;
|
|
}
|
|
|
|
.detail-tabs-btn-total-class {
|
|
width: 100%;
|
|
height: 80rpx;
|
|
line-height: 80rpx;
|
|
text-align: center;
|
|
font-size:28rpx;
|
|
font-family:MicrosoftYaHei;
|
|
color:#666666;
|
|
}
|
|
.detail-tabs-btn-base-class {
|
|
width: 100%;
|
|
height: 80rpx;
|
|
line-height: 80rpx;
|
|
text-align: center;
|
|
font-size:28rpx;
|
|
font-family:MicrosoftYaHei;
|
|
color:#666666;
|
|
}
|
|
.detail-row-class {
|
|
display: flex;
|
|
flex-wrap: nowrap;
|
|
height: 60rpx;
|
|
margin-top: 8rpx;
|
|
// background-color: #f7f9ff;
|
|
justify-content: flex-start;
|
|
align-items: center;
|
|
margin-left: 32rpx;
|
|
margin-right: 32rpx;
|
|
// margin-top: 16rpx;
|
|
}
|
|
.detail-row-class image{
|
|
height: 40rpx;
|
|
width: 40rpx;
|
|
position: absolute;
|
|
right: 40rpx;
|
|
}
|
|
|
|
.detail-row-title-class{
|
|
width: 135rpx;
|
|
height: 60rpx;
|
|
line-height: 72rpx;
|
|
font-size: 32rpx;
|
|
font-family: MicrosoftYaHei;
|
|
color: #666666;
|
|
}
|
|
|
|
.detail-row-white-class{
|
|
height: 60rpx;
|
|
line-height: 60rpx;
|
|
border-radius: 10rpx;
|
|
border: 2rpx solid #D8D8D8;
|
|
// flex: 0 0;
|
|
font-size: 32rpx;
|
|
font-family: MicrosoftYaHei;
|
|
color: #666666;
|
|
margin-left: 24rpx;
|
|
padding-left: 24rpx;
|
|
}
|
|
.detail-row-white-class-stock{
|
|
height: 60rpx;
|
|
line-height: 60rpx;
|
|
border-radius: 10rpx;
|
|
border: 2rpx solid #D8D8D8;
|
|
// flex: 0 0;
|
|
font-size: 32rpx;
|
|
font-family: MicrosoftYaHei;
|
|
color: #FFFFFF;
|
|
text-align: center;
|
|
margin-left: 24rpx;
|
|
background-color: #007AFF;
|
|
// padding-left: 24rpx;
|
|
}
|
|
|
|
.detail-row-gray-class{
|
|
height: 60rpx;
|
|
border-radius: 10rpx;
|
|
border: 2rpx solid #D8D8D8;
|
|
// flex: 0 0;
|
|
font-size: 32rpx;
|
|
font-family: MicrosoftYaHei;
|
|
color: #666666;
|
|
background-color: #F4F4F4;
|
|
margin-left: 24rpx;
|
|
padding-left: 24rpx;
|
|
}
|
|
|
|
.table {
|
|
margin-top: 16rpx;
|
|
margin-right: 32rpx;
|
|
margin-left: 32rpx;
|
|
}
|
|
.header-row-btn-class{
|
|
display: flex;
|
|
width: 100%;
|
|
height: 80rpx;
|
|
margin-top: 16rpx;
|
|
}
|
|
|
|
.commitBtnOther{
|
|
width: 100%;
|
|
height: 80rpx;
|
|
line-height: 80rpx;
|
|
color: #FFFFFF;
|
|
background: #5778FF;
|
|
font-size: 32rpx;
|
|
font-family: MicrosoftYaHei;
|
|
text-align: center;
|
|
border-radius: unset;
|
|
position: fixed;
|
|
left: 0;
|
|
bottom: 0;
|
|
}
|
|
|
|
.header-row-btn-class-commit{
|
|
width: 50%;
|
|
position: fixed;
|
|
height: 80rpx;
|
|
line-height: 80rpx;
|
|
font-size: 32rpx;
|
|
font-family: MicrosoftYaHei;
|
|
background: #5778FF;
|
|
color: #FFFFFF;
|
|
text-align: center;
|
|
border-radius: unset;
|
|
right: 0;
|
|
bottom: 0;
|
|
}
|
|
|
|
.header-row-btn-class-clear{
|
|
width: 50%;
|
|
position: fixed;
|
|
height: 80rpx;
|
|
line-height: 80rpx;
|
|
font-size: 32rpx;
|
|
text-align: center;
|
|
font-family: MicrosoftYaHei;
|
|
background: #F5F5F4;
|
|
color: #666666;
|
|
border-radius: unset;
|
|
left: 0;
|
|
bottom: 0;
|
|
}
|
|
|
|
.header-row-btn-class-del{
|
|
width: 100%;
|
|
height: 80rpx;
|
|
line-height: 80rpx;
|
|
font-size: 32rpx;
|
|
font-family: MicrosoftYaHei;
|
|
color: #FFFFFF;
|
|
text-align: center;
|
|
background-color: #F76260;
|
|
border-radius: unset;
|
|
position: fixed;
|
|
left: 0;
|
|
bottom: 0;
|
|
}
|
|
.chooseRowNo{
|
|
position: fixed;
|
|
width: 100%;
|
|
height: 50%;
|
|
top: 200rpx;
|
|
left: 0;
|
|
z-index: 15;
|
|
}
|
|
.image-barcode{
|
|
position: absolute;
|
|
width: 40rpx;
|
|
height: 40rpx;
|
|
// position: fixed;
|
|
right: 16rpx;
|
|
bottom: 12rpx;
|
|
}
|
|
.alter{
|
|
position: fixed;
|
|
left: 0;
|
|
right: 0;
|
|
top:0;
|
|
bottom: 0;
|
|
background-color: #333333;
|
|
opacity: 0.5;
|
|
}
|
|
.err{
|
|
position: fixed;
|
|
left: 100rpx;
|
|
right: 100rpx;
|
|
top: 400rpx;
|
|
background-color: #FFFFFF;
|
|
border-radius: 20rpx;
|
|
opacity: 1;
|
|
z-index: 5;
|
|
}
|
|
.errTitle{
|
|
height: 80rpx;
|
|
line-height: 80rpx;
|
|
width: 100%;
|
|
font-size: 32rpx;
|
|
text-align: center;
|
|
// border-bottom: 2rpx solid #3D3D3D;
|
|
}
|
|
.errList{
|
|
width: 100%;
|
|
margin-left: 16rpx;
|
|
margin-right: 16rpx;
|
|
}
|
|
.errDetails{
|
|
width: 90%;
|
|
font-size: 26rpx;
|
|
color: #3D3D3D;
|
|
text-align: center;
|
|
}
|
|
.errConfirm{
|
|
height: 80rpx;
|
|
line-height: 80rpx;
|
|
width: 100%;
|
|
font-size: 32rpx;
|
|
text-align: center;
|
|
color: #007AFF;
|
|
border-top: 2rpx solid #3D3D3D;
|
|
}
|
|
.cash-btn{
|
|
display: flex;
|
|
}
|
|
.cashConfirm{
|
|
height: 80rpx;
|
|
line-height: 80rpx;
|
|
width: 50%;
|
|
font-size: 32rpx;
|
|
text-align: center;
|
|
color: #007AFF;
|
|
border-top: 2rpx solid #3D3D3D;
|
|
border-right: 2rpx solid #3B4144;
|
|
}
|
|
.cashCancel{
|
|
height: 80rpx;
|
|
line-height: 80rpx;
|
|
width: 50%;
|
|
font-size: 32rpx;
|
|
text-align: center;
|
|
color: #007AFF;
|
|
border-top: 2rpx solid #3D3D3D;
|
|
}
|
|
.detail-row-class-b{
|
|
display: flex;
|
|
flex-wrap: nowrap;
|
|
height: 60rpx;
|
|
margin-top: 8rpx;
|
|
justify-content: flex-start;
|
|
align-items: center;
|
|
margin-left: 32rpx;
|
|
margin-right: 32rpx;
|
|
}
|
|
.detail-row-title-class-b{
|
|
width: 135rpx;
|
|
height: 60rpx;
|
|
line-height: 72rpx;
|
|
font-size: 32rpx;
|
|
font-family: MicrosoftYaHei;
|
|
color: #666666;
|
|
}
|
|
.detail-row-white-class-b{
|
|
flex: 1 1;
|
|
height: 64rpx;
|
|
line-height: 64rpx;
|
|
border-radius: 10rpx;
|
|
border: 2rpx solid #D8D8D8;
|
|
font-size: 32rpx;
|
|
font-family: MicrosoftYaHei;
|
|
color: #666666;
|
|
}
|
|
.pic-upload{
|
|
position: fixed;
|
|
height: 80rpx;
|
|
width: 80rpx;
|
|
border: 2rpx solid #5F7EF8;
|
|
border-radius: 50%;
|
|
color: #FFFFFF;
|
|
background: #5F7EF8;
|
|
bottom: 100rpx;
|
|
right: 32rpx;
|
|
}
|
|
.pic-upload-text{
|
|
height: 40rpx;
|
|
line-height: 40rpx;
|
|
font-size: 26rpx;
|
|
text-align: center;
|
|
}
|
|
.button-class{
|
|
height:80rpx;
|
|
line-height:80rpx;
|
|
border-radius:4rpx;
|
|
font-size:32rpx;
|
|
margin-top: 32rpx;
|
|
background-color: #4662FF;
|
|
color: #FFFFFF!important;
|
|
}
|
|
.bill-next-button{
|
|
width: 120rpx;
|
|
height: 60rpx;
|
|
line-height: 60rpx;
|
|
border-radius: 10rpx;
|
|
border: 2rpx;
|
|
// flex: 0 0;
|
|
font-size: 32rpx;
|
|
font-family: MicrosoftYaHei;
|
|
color: #FFFFFF;
|
|
text-align: center;
|
|
margin-left: 24rpx;
|
|
background-color: #007AFF;
|
|
}
|
|
.bill-next-button-disable{
|
|
width: 120rpx;
|
|
height: 60rpx;
|
|
line-height: 60rpx;
|
|
border-radius: 10rpx;
|
|
border: 2rpx solid;
|
|
// flex: 0 0;
|
|
font-size: 32rpx;
|
|
font-family: MicrosoftYaHei;
|
|
color: #FFFFFF;
|
|
text-align: center;
|
|
margin-left: 24rpx;
|
|
background-color: #808080 ;
|
|
}
|
|
</style> |