baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)
This commit is contained in:
commit
c2b0e7be0d
6522 files changed
+3530643
No files matched your search
+15
@@ -0,0 +1,15 @@
|
||||
<template>
|
||||
<MainPick :type="1"></MainPick>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MainPick from './STK_PICKTAST_MAIN.vue'
|
||||
export default {
|
||||
components: {
|
||||
MainPick
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
+523
@@ -0,0 +1,523 @@
|
||||
<template>
|
||||
<!-- 销售拣货 -->
|
||||
<view class="pickPage pickPageFirst">
|
||||
<opsoft-dialog-notice
|
||||
:dialogNoticeShow="showDialog"
|
||||
:dialogNoticeType="dialogNoticeType"
|
||||
:dialogNoticeTitle="dialogNoticeTitle"
|
||||
:dialogNoticeContent="dialogNoticeContent"
|
||||
@dialogNoticeConfirmClick="dialogNoticeConfirmClick"
|
||||
>
|
||||
</opsoft-dialog-notice>
|
||||
<view class="nav">
|
||||
<view class="nav-left">
|
||||
<view v-for="(item, index) in navInfo">
|
||||
{{ item }}
|
||||
<span
|
||||
v-if="index !== navInfo.length - 1"
|
||||
style="display: inline-block; margin: 0 2px"
|
||||
>
|
||||
 >
|
||||
</span>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="text">组织</view> -->
|
||||
<view
|
||||
class="header-top-organzie-select"
|
||||
style="width: 300rpx; flex: 0 1 40%"
|
||||
>
|
||||
组织:
|
||||
<picker
|
||||
@change="orgChange"
|
||||
:value="orgIndex"
|
||||
:range="orgArry"
|
||||
range-key="FNAME"
|
||||
>
|
||||
<view class="header-top-organzie-content">
|
||||
{{ orgArry[orgIndex].FNAME }}
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="nav-back" @click="turnBack">返回</view>
|
||||
</view>
|
||||
|
||||
<view class="content">
|
||||
<view class="scan">
|
||||
<view class="scan-left">扫码录入拣货任务</view>
|
||||
<view class="scan-right">
|
||||
<input
|
||||
type="text"
|
||||
class="scan-input"
|
||||
placeholder="请扫描拣货单号"
|
||||
v-model="billNo"
|
||||
@confirm="scanConfirm"
|
||||
/>
|
||||
<image
|
||||
src="../../../static/img/scan-blue.png"
|
||||
class="img"
|
||||
@click="scanEvent"
|
||||
></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="currentTask">
|
||||
<view class="currentTask-top">当前任务: {{ baseTableData.length }}</view>
|
||||
</view>
|
||||
|
||||
<view class="taskTable">
|
||||
<ZTableWrap
|
||||
class="baseTable"
|
||||
:tableData="baseTableData"
|
||||
:columns="baseColumns"
|
||||
titleTextAlign="center"
|
||||
textAlign="center"
|
||||
emptyText="设置了showLoading=false才会看到我"
|
||||
@onClick="rowClick($event)"
|
||||
@onSort="doSort"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ZTableWrap from "../../../components/z-table - popup/z-table-wrap";
|
||||
import opsoftDialogNotice from '@/components/opsoft-dialog-notice/opsoft-dialog-notice.vue';
|
||||
import errorStrUntil from '@/common/errorStrUntil.js';
|
||||
// http://localhost:8066/#/pages/views/STK_PickPlatform/STK_SellPick
|
||||
export default {
|
||||
props: {
|
||||
type: {
|
||||
// 1: 销售; 2: 生产
|
||||
type: Number,
|
||||
default: 1
|
||||
}
|
||||
},
|
||||
components: {
|
||||
ZTableWrap,
|
||||
opsoftDialogNotice
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogNoticeContent:'',
|
||||
dialogNoticeTitle:'',
|
||||
dialogNoticeType:'',
|
||||
showDialog:false,
|
||||
|
||||
navInfo: ["拣货平台", "销售拣货"],
|
||||
// 表格数据
|
||||
baseTableData: [],
|
||||
// 列信息
|
||||
baseColumns: [
|
||||
{
|
||||
title: "拣货单号",
|
||||
key: "FBILLNO",
|
||||
width: 300,
|
||||
formatNum: false,
|
||||
listenerClick: true,
|
||||
},
|
||||
{
|
||||
title: "订单数",
|
||||
key: "FORDERAMOUNT",
|
||||
width: 130,
|
||||
formatNum: false,
|
||||
listenerClick: true,
|
||||
},
|
||||
{
|
||||
title: "行数",
|
||||
key: "FMATERIALAMOUNT",
|
||||
width: 100,
|
||||
formatNum: false,
|
||||
listenerClick: true,
|
||||
},
|
||||
{
|
||||
title: "拣货数量",
|
||||
key: "FPICKAMOUNT",
|
||||
width: 150,
|
||||
formatNum: false,
|
||||
listenerClick: true,
|
||||
},
|
||||
{
|
||||
title: "仓库",
|
||||
key: "FSTOCKNAEM",
|
||||
width: 200,
|
||||
formatNum: false,
|
||||
listenerClick: true
|
||||
},
|
||||
{
|
||||
title: "最早发货时间",
|
||||
key: "FEARLIESTTIME",
|
||||
width: 240,
|
||||
formatNum: false,
|
||||
listenerClick: true
|
||||
},
|
||||
{
|
||||
title: "是否急单",
|
||||
key: "FISURGENCY",
|
||||
width: 160,
|
||||
formatNum: false,
|
||||
listenerClick: true
|
||||
},
|
||||
],
|
||||
orgFItemID: "",
|
||||
orgArry: [],
|
||||
orgIndex: null, // 当前选中的组织 index of orgArry
|
||||
billNo: "", // 待扫描的单号
|
||||
fullData: [], // GetPickTaskList 返回的全部数据
|
||||
isRequestDuringScan: false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
let _self = this
|
||||
this.navInfo[1] = this.type === 1 ? '销售拣货' : '生产拣货'
|
||||
|
||||
// 获取组织信息
|
||||
this.getOrgList()
|
||||
this.isRequestDuringCreat = false
|
||||
_self.getPickTaskList()
|
||||
},
|
||||
methods: {
|
||||
dialogNoticeConfirmClick(){
|
||||
this.showDialog = false;
|
||||
},
|
||||
dialogNoticeProps(err,type){
|
||||
err = errorStrUntil.handle(err);
|
||||
this.showDialog = true;
|
||||
this.dialogNoticeType = 'error';
|
||||
this.dialogNoticeTitle = '异常提示';
|
||||
if(type=='success'){
|
||||
this.dialogNoticeType = 'success';
|
||||
this.dialogNoticeTitle = '执行成功';
|
||||
}
|
||||
this.dialogNoticeContent = err;
|
||||
},
|
||||
// 行点击 页面跳转
|
||||
rowClick(row) {
|
||||
// console.log(row)
|
||||
let ifSeed = row.FISPOINTON ? "1" : "0" // 是否播种; 1: 播种
|
||||
|
||||
let len = this.fullData.length;
|
||||
let findFlag = false;
|
||||
for (let i = 0; i < len; i++) {
|
||||
if ( this.fullData[i].TaskHead.FBILLNO === row.FBILLNO ) {
|
||||
let noComplete = this.fullData[i].TaskEntries.filter((item) => {
|
||||
return !item.FISCOMPLETED
|
||||
})
|
||||
this.$store.commit('setCurrentPickArr', noComplete)
|
||||
findFlag = true;
|
||||
break
|
||||
}
|
||||
}
|
||||
if (!findFlag) {
|
||||
// 没找到 清空下
|
||||
this.$store.commit('setCurrentPickArr', [])
|
||||
}
|
||||
// 页面跳转
|
||||
if (this.type === 1 ) {
|
||||
uni.navigateTo({
|
||||
// url: '/pages/STK_PickPlatform/STK_SellCurrent'
|
||||
url: `STK_SellCurrent?no=${row.FBILLNO}&ifSeed=${ifSeed}&companyId=${this.orgFItemID}&type=${this.type}`,
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
// url: `STK_SellCurrent?no=${row.FBILLNO}&ifSeed=${ifSeed}&companyId=${this.orgFItemID}&type=${this.type}`,
|
||||
url: `/pages/views/STK_PICKTAST/STK_SellCurrent?no=${row.FBILLNO}&ifSeed=${ifSeed}&companyId=${this.orgFItemID}&type=${this.type}`,
|
||||
// url: `../STK_PICKTAST_MO/STK_SellCurrent?no=${row.FBILLNO}&ifSeed=${ifSeed}&companyId=${this.orgFItemID}&type=${this.type}`,
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
turnBack() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/tabbar/apply/apply`,
|
||||
})
|
||||
},
|
||||
doSort(sortName, sortOrder) {
|
||||
// console.log(sortName, sortOrder)
|
||||
},
|
||||
// 扫描事件
|
||||
scanEvent() {
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
this.billNo = res.result
|
||||
this.scanConfirm()
|
||||
},
|
||||
})
|
||||
},
|
||||
// 获取组织
|
||||
getOrgList() {
|
||||
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.orgFItemID = orgInfo[0].FINTERID
|
||||
} else {
|
||||
if (defaultOrgInfo) {
|
||||
this.orgFItemID = defaultOrgInfo.FINTERID
|
||||
} else {
|
||||
this.orgFItemID = orgInfo[0].FINTERID
|
||||
}
|
||||
}
|
||||
|
||||
this.orgArry = orgInfo
|
||||
this.orgArry.forEach(function (el, index) {
|
||||
if (!_self.orgFItemID) {
|
||||
_self.orgFItemID = el.FINTERID
|
||||
}
|
||||
|
||||
let currentOrgid = el.FINTERID
|
||||
let result = currentOrgid == _self.orgFItemID
|
||||
el.FNAME = el.FNAME ? el.FNAME : "无"
|
||||
if (result) {
|
||||
_self.orgIndex = index
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.orgArry = [
|
||||
{ name: "请选择组织", key: "", FNAME: "当前无组织" },
|
||||
]
|
||||
this.orgIndex = 0
|
||||
}
|
||||
},
|
||||
orgChange(e) {
|
||||
this.orgIndex = e.target.value
|
||||
|
||||
let isOpenDefaultOrg = uni.getStorageSync("isOpenDefaultOrg")
|
||||
if (!this.orgArry[this.orgIndex].FINTERID) {
|
||||
this.orgFItemID = ""
|
||||
} else {
|
||||
this.orgFItemID = this.orgArry[this.orgIndex].FINTERID
|
||||
if (isOpenDefaultOrg) {
|
||||
uni.setStorageSync(
|
||||
"defaultOrgInfo",
|
||||
this.orgArry[this.orgIndex]
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// 清空东西
|
||||
|
||||
this.baseTableData = []
|
||||
this.billNo = ""
|
||||
this.isRequestDuringScan = false;
|
||||
this.getPickTaskList()
|
||||
},
|
||||
// first 获取拣货任务
|
||||
getPickTaskList() {
|
||||
// return
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
mask: true
|
||||
})
|
||||
this.$request
|
||||
.get("/PickInventory/GetPickTaskList", {
|
||||
params: {
|
||||
type: this.type, // type:1=销售拣货 2=生产拣货
|
||||
companyId: this.orgFItemID,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
uni.hideLoading();
|
||||
|
||||
// console.log(res)
|
||||
let data = res
|
||||
this.fullData = data
|
||||
let currentTableData = []
|
||||
data.forEach((item) => {
|
||||
item.TaskHead.FISURGENCY = item.TaskHead.FISURGENCY ? "是" : "否"
|
||||
currentTableData.push(item.TaskHead)
|
||||
})
|
||||
|
||||
this.baseTableData = currentTableData
|
||||
if (this.isRequestDuringScan) {
|
||||
uni.showToast({
|
||||
title: '认领成功',
|
||||
// icon: 'success',
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
.catch(err => {
|
||||
uni.hideLoading();
|
||||
this.dialogNoticeProps(err,'error')
|
||||
})
|
||||
},
|
||||
// 扫描单号后 返回是否认领成功
|
||||
scanConfirm() {
|
||||
if (!this.billNo) {
|
||||
uni.showToast({
|
||||
title: "请扫描拣货单号",
|
||||
})
|
||||
}
|
||||
// return
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
mask: true
|
||||
})
|
||||
this.$request
|
||||
.get("/PickInventory/TakePickTask", {
|
||||
params: {
|
||||
billNo: this.billNo,
|
||||
companyId: this.orgFItemID,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
uni.hideLoading();
|
||||
let msg = res
|
||||
uni.showToast({
|
||||
title: '认领成功',
|
||||
// icon: 'success',
|
||||
})
|
||||
this.isRequestDuringScan = true;
|
||||
this.getPickTaskList();
|
||||
})
|
||||
.catch(err => {
|
||||
uni.hideLoading();
|
||||
this.dialogNoticeProps(err,'error')
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
$pagePadding: 20px;
|
||||
.pickPage {
|
||||
background-color: #f2f2f2;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.nav {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 60rpx;
|
||||
padding: 0 $pagePadding;
|
||||
background-color: #fff;
|
||||
|
||||
.nav-left {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.nav-back {
|
||||
color: #02a7f0;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
margin: 0 $pagePadding;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.scan {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 80rpx;
|
||||
width: 100%;
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.scan-left {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
flex-grow: 0;
|
||||
// margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.scan-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-grow: 1;
|
||||
flex-shrink: 3;
|
||||
|
||||
border: 1px solid #fff;
|
||||
border-radius: 34rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.img {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.scan-input {
|
||||
// width: 100%;
|
||||
padding-left: 34rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.currentTask-top {
|
||||
background-color: #fff;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding-left: 10px;
|
||||
font-weight: 600;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.taskTable {
|
||||
margin-top: 8rpx;
|
||||
margin-bottom: 8rpx;
|
||||
// height:100%;
|
||||
// max-height: 600px;
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
|
||||
.baseTable {
|
||||
// position: absolute;
|
||||
// bottom: 10px;
|
||||
// :deep(.z-table-container-row)
|
||||
.z-table-container-row {
|
||||
// background-color: red !important;
|
||||
}
|
||||
|
||||
.z-table-container-row :deep(.z-table-container-col:first-child) {
|
||||
color: red !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss">
|
||||
.pickPageFirst {
|
||||
.z-table-container-row {
|
||||
white-space: normal!important;
|
||||
}
|
||||
|
||||
.z-table-container-row .z-table-container-col {
|
||||
background-color: #fff !important;
|
||||
//min-height: 35px;
|
||||
//white-space: normal!important;
|
||||
}
|
||||
|
||||
.z-table-container-row .z-table-container-col:first-child {
|
||||
color: #02baf6 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.z-table-container-row {
|
||||
white-space: normal!important;
|
||||
}
|
||||
|
||||
.z-table-container-row .z-table-container-col {
|
||||
background-color: #fff !important;
|
||||
//min-height: 35px;
|
||||
//height: auto;
|
||||
//white-space: normal!important;
|
||||
}
|
||||
|
||||
.pickPageFirst .z-table-container-row .z-table-container-col:first-child {
|
||||
color: #02baf6;
|
||||
}
|
||||
</style>
|
||||
+537
@@ -0,0 +1,537 @@
|
||||
<template>
|
||||
<!-- 当前任务 -->
|
||||
<view class="pickPage" style="">
|
||||
<opsoft-dialog-notice
|
||||
:dialogNoticeShow="showDialog"
|
||||
:dialogNoticeType="dialogNoticeType"
|
||||
:dialogNoticeTitle="dialogNoticeTitle"
|
||||
:dialogNoticeContent="dialogNoticeContent"
|
||||
@dialogNoticeConfirmClick="dialogNoticeConfirmClick"
|
||||
>
|
||||
</opsoft-dialog-notice>
|
||||
<view class="nav">
|
||||
<view class="nav-left">
|
||||
<view v-for="(item, index) in navInfo">
|
||||
{{ item }}
|
||||
<span
|
||||
v-if="index !== navInfo.length - 1"
|
||||
style="display: inline-block; margin: 0 2px"
|
||||
>
|
||||
 >
|
||||
</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="nav-back" @click="turnBack">返回</view>
|
||||
</view>
|
||||
|
||||
<view class="content">
|
||||
<view class="scan">
|
||||
<view class="scan-left">拣货单号: {{ currentNo }}</view>
|
||||
<view class="scan-right">
|
||||
是否播种: {{ ifSeed ? " 是" : "否" }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="currentTask">
|
||||
<view class="currentTask-top">拣货任务详情</view>
|
||||
</view>
|
||||
|
||||
<view class="taskTable">
|
||||
<z-table
|
||||
class="baseTable"
|
||||
:tableData="baseTableData"
|
||||
:columns="baseColumns"
|
||||
titleTextAlign="center"
|
||||
textAlign="center"
|
||||
emptyText="设置了showLoading=false才会看到我"
|
||||
@onClick="rowClick($event)"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="pickButton" @click="startPick">开始拣货</view>
|
||||
</view>
|
||||
|
||||
<view class="opsoft-card-dialog card-shadow" v-show="dialogShow">
|
||||
<view class="opsoft-card-title">
|
||||
<view class="text">请扫描拣货容器号</view>
|
||||
<view class="icon" @click="dialogShow = false">x</view>
|
||||
</view>
|
||||
|
||||
<view class="opsoft-card-content">
|
||||
<view class="box">
|
||||
<!-- {{ pickDockerNo ? pickDockerNo : '请扫描拣货容器号'}} -->
|
||||
<input
|
||||
type="text"
|
||||
v-model="pickDockerNo"
|
||||
@confirm="confirmEvent"
|
||||
placeholder="请扫描拣货容器号"
|
||||
/>
|
||||
|
||||
<image
|
||||
src="../../../static/img/scan-blue.png"
|
||||
class="img"
|
||||
@click="scanEvent"
|
||||
></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="opsoft-card-footer">
|
||||
<view class="button" @click="noDocker">不使用容器</view>
|
||||
<view class="button" @click="useDocker">确认</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import opsoftDialogNotice from '@/components/opsoft-dialog-notice/opsoft-dialog-notice.vue';
|
||||
import errorStrUntil from '@/common/errorStrUntil.js';
|
||||
export default {
|
||||
props: {
|
||||
// type: {
|
||||
// // 1: 销售; 2: 生产
|
||||
// type: Number,
|
||||
// default: 1
|
||||
// }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogNoticeContent:'',
|
||||
dialogNoticeTitle:'',
|
||||
dialogNoticeType:'',
|
||||
showDialog:false,
|
||||
navInfo: ["拣货平台", "销售拣货", "当前任务"],
|
||||
baseTableData: [
|
||||
{
|
||||
key1: "123",
|
||||
key2: "123",
|
||||
key3: "123",
|
||||
key4: "123",
|
||||
key5: "123",
|
||||
key6: "123",
|
||||
key7: "123",
|
||||
},
|
||||
],
|
||||
baseColumns: [
|
||||
{
|
||||
title: "序号",
|
||||
key: "INDEX",
|
||||
width: 100,
|
||||
formatNum: false,
|
||||
listenerClick: true,
|
||||
},
|
||||
{
|
||||
title: "订单编号",
|
||||
key: "FSRCBILLNO",
|
||||
width: 200,
|
||||
formatNum: false,
|
||||
listenerClick: true,
|
||||
},
|
||||
{
|
||||
title: "产品代码",
|
||||
key: "FMATERIALNUMBER",
|
||||
width: 250,
|
||||
formatNum: false,
|
||||
listenerClick: true,
|
||||
},
|
||||
{
|
||||
title: "产品名称",
|
||||
key: "FMATERIALNAME",
|
||||
width: 250,
|
||||
formatNum: false,
|
||||
listenerClick: true,
|
||||
},
|
||||
{
|
||||
title: "规格型号",
|
||||
key: "FSPECIFICATION",
|
||||
width: 200,
|
||||
formatNum: false,
|
||||
listenerClick: true,
|
||||
},
|
||||
{
|
||||
title: "拣货数量",
|
||||
key: "FQTY",
|
||||
width: 150,
|
||||
formatNum: false,
|
||||
listenerClick: true,
|
||||
},
|
||||
{
|
||||
title: "拣货单位",
|
||||
key: "FUNITNAME",
|
||||
width: 150,
|
||||
formatNum: false,
|
||||
listenerClick: true,
|
||||
},
|
||||
],
|
||||
currentNo: "", // 拣货单号 ORY0323000001
|
||||
ifSeed: true, // 是否播种
|
||||
dialogShow: false, // 显示弹窗
|
||||
// 扫描 拣货容器号
|
||||
pickDockerNo: "",
|
||||
// 容器内码
|
||||
dockerId: "",
|
||||
companyId: "", // 组织id
|
||||
type: 1, // 1: 销售, 2: 生产,
|
||||
ifpickDockerConfirm: false
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
// console.log("页面参数", e);
|
||||
this.currentNo = e.no;
|
||||
this.ifSeed = e.ifSeed === "1"; // 1 是播种
|
||||
this.companyId = e.companyId;
|
||||
this.type = Number(e.type)
|
||||
this.navInfo[1] = this.type === 1 ? '销售拣货' : '生产拣货'
|
||||
this.ifpickDockerConfirm = false;
|
||||
|
||||
if (this.currentNo) {
|
||||
// 从上一个页面传过来的 信息,
|
||||
// 在mounted 里从缓存里拿
|
||||
// this.getTaskDetail();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.ifpickDockerConfirm = false;
|
||||
this.baseTableData = this.$store.state.currentPickArr;
|
||||
this.baseTableData.forEach((item,index) => {
|
||||
// 序号处理
|
||||
item.INDEX = index+1;
|
||||
})
|
||||
// console.log('mounted', this.baseTableData)
|
||||
},
|
||||
mounted() {
|
||||
this.ifpickDockerConfirm = false;
|
||||
},
|
||||
components: {
|
||||
opsoftDialogNotice
|
||||
},
|
||||
methods: {
|
||||
dialogNoticeConfirmClick(){
|
||||
this.showDialog = false;
|
||||
},
|
||||
dialogNoticeProps(err,type){
|
||||
err = errorStrUntil.handle(err);
|
||||
this.showDialog = true;
|
||||
this.dialogNoticeType = 'error';
|
||||
this.dialogNoticeTitle = '异常提示';
|
||||
if(type=='success'){
|
||||
this.dialogNoticeType = 'success';
|
||||
this.dialogNoticeTitle = '执行成功';
|
||||
}
|
||||
this.dialogNoticeContent = err;
|
||||
},
|
||||
rowClick(row) {
|
||||
// console.log(row)
|
||||
},
|
||||
turnBack() {
|
||||
// uni.navigateBack()
|
||||
if (this.type === 1) {
|
||||
uni.navigateTo({
|
||||
url: `STK_PICKTAST`, // no docker number
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/pages/views/STK_PICKTAST_MO/STK_PICKTAST_MO`, // no docker number
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
startPick() {
|
||||
this.dialogShow = true
|
||||
},
|
||||
// 不使用容器
|
||||
noDocker() {
|
||||
this.dialogShow = false
|
||||
this.pickDockerNo = "";
|
||||
|
||||
// 是否分拨 影响分拣完的提示信息
|
||||
let ifSeed = this.ifSeed === '是' ? '1' : '0';
|
||||
if (this.type===1) {
|
||||
uni.navigateTo({
|
||||
url: `STK_SellPicking?companyId=${this.companyId}&ifSeed=${ifSeed}&type=${this.type}`, // no docker number
|
||||
})
|
||||
} else {
|
||||
// 生产
|
||||
uni.navigateTo({
|
||||
url: `/pages/views/STK_PICKTAST/STK_SellPicking?companyId=${this.companyId}&ifSeed=${ifSeed}&type=${this.type}`, // no docker number
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
// 使用容器
|
||||
useDocker() {
|
||||
// 判断拣货容器号有值 且已经触发扫描或者回车
|
||||
if (this.pickDockerNo && this.ifpickDockerConfirm) {
|
||||
let no = this.pickDockerNo
|
||||
this.dialogShow = false;
|
||||
this.pickDockerNo = "";
|
||||
let ifSeed = this.ifSeed === '是' ? '1' : '0';
|
||||
if (this.type === 1) {
|
||||
uni.navigateTo({
|
||||
url: `STK_SellPicking?dockerNo=${no}&companyId=${this.companyId}&dockerId=${this.dockerId}&ifSeed=${ifSeed}&type=${this.type}`, // docker number
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/pages/views/STK_PICKTAST/STK_SellPicking?dockerNo=${no}&companyId=${this.companyId}&dockerId=${this.dockerId}&ifSeed=${ifSeed}&type=${this.type}`, // docker number
|
||||
})
|
||||
}
|
||||
} else if (this.pickDockerNo && this.ifpickDockerConfirm === false) {
|
||||
uni.showToast({
|
||||
title: "填完容器号后请回车",
|
||||
icon: "none",
|
||||
// duration: 2000
|
||||
})
|
||||
}else {
|
||||
uni.showToast({
|
||||
title: "请扫描拣货容器号",
|
||||
icon: "none",
|
||||
// duration: 2000
|
||||
})
|
||||
}
|
||||
},
|
||||
// 容器扫描
|
||||
scanEvent() {
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
this.pickDockerNo = res.result;
|
||||
this.confirmEvent()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 容器回车
|
||||
confirmEvent() {
|
||||
if (!this.pickDockerNo) {
|
||||
uni.showToast({
|
||||
title: "请扫描拣货容器号",
|
||||
icon: "none",
|
||||
})
|
||||
this.ifpickDockerConfirm = false;
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
mask: true
|
||||
})
|
||||
// https://www.tapd.cn/36031001/markdown_wikis/show/#1136031001001000916
|
||||
this.$request.get('/PickInventory/GetContainerInfo', {
|
||||
params: {
|
||||
companyId: this.companyId,
|
||||
containerNo: this.pickDockerNo,
|
||||
}
|
||||
}).then((res) => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '容器扫描成功!',
|
||||
icon: 'none',
|
||||
})
|
||||
this.dockerId = res.TaskContainer.FINTERID // 暂时只需要容器内码
|
||||
this.ifpickDockerConfirm = true;
|
||||
// return Promise.resolve()
|
||||
// return new Promise((resolve)=>{ resolve()})
|
||||
}).catch(err => {
|
||||
this.ifpickDockerConfirm = false;
|
||||
uni.hideLoading();
|
||||
this.dialogNoticeProps(err,'error')
|
||||
})
|
||||
},
|
||||
},
|
||||
watch:{
|
||||
pickDockerNo() {
|
||||
this.ifpickDockerConfirm = false;
|
||||
console.log('watch change')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
$pagePadding: 20px;
|
||||
$primaryColor: #4662ff; // 按钮颜色
|
||||
.pickPage {
|
||||
background-color: #f2f2f2;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.nav {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 60rpx;
|
||||
padding: 0 $pagePadding;
|
||||
background-color: #fff;
|
||||
|
||||
.nav-left {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.nav-back {
|
||||
color: #02a7f0;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
margin: 0 $pagePadding;
|
||||
flex: 1;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.scan {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
height: 80rpx;
|
||||
width: 100%;
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.scan-left {
|
||||
// font-size: 18px;
|
||||
// font-weight: 600;
|
||||
flex-grow: 0;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.scan-right {
|
||||
// font-size: 16px;
|
||||
// flex-grow: 1;
|
||||
}
|
||||
|
||||
.scan-input {
|
||||
// width: 100%;
|
||||
padding-left: 34rpx;
|
||||
height: 80rpx;
|
||||
border: 1px solid #fff;
|
||||
border-radius: 34rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.currentTask-top {
|
||||
background-color: #fff;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding-left: 10px;
|
||||
font-weight: 600;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.taskTable {
|
||||
margin-top: 8rpx;
|
||||
margin-bottom: 8rpx;
|
||||
// height:100%;
|
||||
// max-height: 600px;
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
|
||||
.baseTable {
|
||||
// position: absolute;
|
||||
// bottom: 10px;
|
||||
// :deep(.z-table-container-row)
|
||||
.z-table-container-row {
|
||||
background-color: red !important;
|
||||
}
|
||||
|
||||
.z-table-container-row .z-table-container-col {
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pickButton {
|
||||
position: absolute;
|
||||
height: 100rpx;
|
||||
width: 60%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
bottom: 30px;
|
||||
border: 1px solid #fff;
|
||||
border-radius: 16rpx;
|
||||
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
background-color: $primaryColor;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.opsoft-card-dialog {
|
||||
position: fixed;
|
||||
margin: auto auto;
|
||||
width: 550rpx;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
min-height: 200px;
|
||||
background-color: #fff;
|
||||
border-radius: 16px;
|
||||
/* width: 434.78rpx; */
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.opsoft-card-title {
|
||||
text-align: left;
|
||||
padding: 0 30rpx;
|
||||
|
||||
height: 72.46rpx;
|
||||
// line-height: 72.46rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #d7d7d7;
|
||||
.text {
|
||||
font-size: 32.61rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.opsoft-card-content {
|
||||
margin: 10px;
|
||||
font-size: 25.36rpx;
|
||||
|
||||
.box {
|
||||
border: 1px solid #d7d7d7;
|
||||
text-align: center;
|
||||
height: 150rpx;
|
||||
line-height: 150rpx;
|
||||
// color: #d7d7d7;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.img {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.opsoft-card-footer {
|
||||
display: flex;
|
||||
// flex: 1;
|
||||
justify-content: space-around;
|
||||
margin-bottom: 15rpx;
|
||||
|
||||
.button {
|
||||
// width: 50%;
|
||||
padding: 0 15rpx;
|
||||
text-align: center;
|
||||
height: 72.46rpx;
|
||||
line-height: 66.23rpx;
|
||||
border-radius: 0;
|
||||
background-color: $primaryColor;
|
||||
color: #fff;
|
||||
border-radius: 15rpx;
|
||||
// border: 0.5px solid rgba(235, 237, 240, 1);
|
||||
font-family: 思源黑体;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card-shadow {
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
</style>
|
||||
+1184
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user