Commit 0b57833b by liangjianmin

chore: remove deprecated pda and tally modules

- Delete PDA module pages (exWarehouse, warehousing, selectDate)
- Delete tally module pages (goods, index, addException)
- Remove associated SCSS stylesheets for deleted pages
- Update pages.json to remove deprecated page routes
- Update home page navigation to remove references to deleted modules
- Clean up API endpoints no longer needed by removed modules
- Consolidate codebase by removing unused warehouse and inventory features
parent 17d648fe
.ex-warehousing {
padding: 24rpx;
.uni-table-box {
::v-deep .uni-table-scroll {
height: 83vh;
}
::v-deep .uni-table {
min-width: 100% !important;
}
}
.scan {
position: fixed;
bottom: 104rpx;
left: 0;
right: 0;
width: 301rpx;
height: 86rpx;
background: #197adb;
box-shadow: 0px 9rpx 10rpx 0px rgba(0, 0, 0, 0.11);
border-radius: 43rpx;
margin: 0 auto;
.icon-juxing2 {
font-size: 48rpx;
color: #ffffff;
margin-right: 28rpx;
}
.tt {
font-size: 32rpx;
color: #ffffff;
}
}
.fix-info {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background-color: #ffffff;
.text {
padding-left: 20rpx;
.t1 {
font-size: 24rpx;
color: #6e767a;
}
.t2 {
font-size: 26rpx;
color: #f04844;
font-weight: bold;
}
}
.btn {
width: 220rpx;
height: 88rpx;
background: #197adb;
border-radius: 4rpx;
font-size: 28rpx;
color: #ffffff;
}
}
}
::v-deep {
.checkbox {
width: 45px !important;
display: flex !important;
align-items: center;
}
.uni-table-tr {
display: flex !important;
}
.uni-table-th,
.uni-table-td {
width: 204rpx !important;
display: flex !important;
}
.uni-table-td {
border-right: 1px #ebeef5 solid;
&:last-child {
border-right: none;
}
}
.uni-swipe_text--center {
width: 640rpx !important;
display: flex;
}
uni-swipe-action {
display: flex;
uni-swipe-action-item {
width: 100%;
display: flex;
.uni-swipe {
width: 100%;
display: flex;
}
}
}
}
.warehousing {
padding: 24rpx;
.uni-table-box {
::v-deep .uni-table-scroll {
height: 83vh;
}
::v-deep .uni-table {
min-width: 100% !important;
}
}
.scan {
position: fixed;
bottom: 104rpx;
left: 0;
right: 0;
width: 301rpx;
height: 86rpx;
background: #197adb;
box-shadow: 0px 9rpx 10rpx 0px rgba(0, 0, 0, 0.11);
border-radius: 43rpx;
margin: 0 auto;
.icon-juxing2 {
font-size: 48rpx;
color: #ffffff;
margin-right: 28rpx;
}
.tt {
font-size: 32rpx;
color: #ffffff;
}
}
.fix-info {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background-color: #ffffff;
.text {
padding-left: 20rpx;
.t1 {
font-size: 24rpx;
color: #6e767a;
}
.t2 {
font-size: 26rpx;
color: #f04844;
font-weight: bold;
}
}
.btn {
width: 220rpx;
height: 88rpx;
background: #197adb;
border-radius: 4rpx;
font-size: 28rpx;
color: #ffffff;
}
}
}
::v-deep {
.checkbox {
width: 45px !important;
display: flex !important;
align-items: center;
}
.uni-table-tr {
display: flex !important;
}
.uni-table-th,
.uni-table-td {
width: 204rpx !important;
display: flex !important;
}
.uni-table-td {
border-right: 1px #ebeef5 solid;
&:last-child {
border-right: none;
}
}
.uni-swipe_text--center {
width: 640rpx !important;
display: flex;
}
uni-swipe-action {
display: flex;
uni-swipe-action-item {
width: 100%;
display: flex;
.uni-swipe {
width: 100%;
display: flex;
}
}
}
}
.page-box {
padding: 15rpx 22rpx;
.search-box {
height: 60rpx;
background: #ffffff;
border-radius: 10rpx;
padding: 0 18rpx 0 0;
.sn {
width: 164rpx;
height: 35rpx;
border-right: 1px solid #f0f0f2;
.uni-input {
font-size: 28rpx;
color: #292b33;
font-weight: bold;
}
.uni-arrow {
width: 14rpx;
height: 9rpx;
background: url('https://img.ichunt.com/images/ichunt/202304/10/e4c72319ad41ce1425f71cc6ec35f111.png') no-repeat center;
background-size: contain;
margin-left: 12rpx;
}
}
.search-bar {
width: calc(100% - 164rpx);
.icon-juxing11 {
font-size: 30rpx;
color: #919399;
margin-left: 17rpx;
margin-right: 13rpx;
}
.uni-input {
font-size: 28rpx;
color: #484b59;
}
.icon-a-juxing111 {
font-size: 30rpx;
color: #c6c7cc;
}
}
}
.total-text {
margin-top: 15rpx;
font-size: 28rpx;
color: #919399;
text-align: right;
text {
padding: 0 5rpx;
color: #1969f9;
}
}
.list {
margin-top: 15rpx;
padding-bottom: 100rpx;
.box {
position: relative;
padding: 15px 17rpx 18rpx 17rpx;
background: #ffffff;
box-shadow: 0px 3rpx 3rpx 0px rgba(198, 199, 204, 0.3);
border-radius: 10rpx;
margin-bottom: 15rpx;
flex-wrap: wrap;
border: 1px solid transparent;
.check-box-icon {
position: absolute;
right: 18rpx;
top: 17rpx;
width: 20rpx;
height: 20rpx;
background: url('https://img.ichunt.com/images/ichunt/202304/11/0bf30da3e8ce6c476c210173b5f13d51.png') no-repeat center;
background-size: contain;
display: block;
}
&.curr {
border: 1px solid #1969f9;
.check-box-icon {
background: url('https://img.ichunt.com/images/ichunt/202304/11/71a74e52e94bcf2e89f8df9817d494c6.png') no-repeat center;
background-size: contain;
}
}
.input-box {
margin-bottom: 11rpx;
flex: 0 0 50%;
.bor {
height: 1px;
background-color: #f0f0f2;
color: #f0f0f2;
margin-bottom: 10rpx;
}
.label {
width: 132rpx;
font-size: 28rpx;
color: #919399;
white-space: nowrap;
}
.text {
font-size: 28rpx;
color: #484b59;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.desc {
font-size: 28rpx;
color: #484b59;
word-break: break-all;
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.tt {
font-size: 28rpx;
color: #1969f9;
}
.pick_img_list {
flex-wrap: wrap;
.default {
width: 120rpx;
height: 120rpx;
background: #f5f5f7;
border-radius: 10rpx;
margin-right: 15rpx;
.iconfont {
font-size: 60rpx;
color: #c6c7cc;
}
}
.img_list {
position: relative;
width: 120rpx;
height: 120rpx;
background: #f5f5f7;
border-radius: 10rpx;
margin-right: 15rpx;
margin-bottom: 15rpx;
image {
width: 120rpx;
height: 120rpx;
}
.iconfont {
position: absolute;
right: 0;
top: 0;
font-size: 30rpx;
color: #ff3700;
z-index: 9;
}
}
}
}
.btn-box {
position: absolute;
right: 17rpx;
bottom: 13rpx;
.btn1 {
width: 80rpx;
height: 40rpx;
background: #fff;
border-radius: 8rpx;
font-size: 25rpx;
color: #f00;
border: 1px solid #f00;
margin-right: 10rpx;
}
.btn2 {
width: 100rpx;
height: 60rpx;
background: #1969f9;
border-radius: 8rpx;
font-size: 25rpx;
color: #ffffff;
}
}
.status-box {
position: absolute;
right: 10rpx;
top: 5rpx;
.staus_type_val {
font-size: 28rpx;
color: #1969f9;
border: 1px solid #f0f0f2;
width: 80rpx;
height: 80rpx;
border-radius: 50%;
margin-right: 10rpx;
}
}
}
}
.fix-btn {
position: fixed;
bottom: 0;
width: 100%;
left: 0;
z-index: 999;
.btn1 {
width: 128rpx;
height: 75rpx;
background: #ffffff;
border-right: 1px solid #f0f0f2;
.check-box-icon {
width: 20rpx;
height: 20rpx;
background: url('https://img.ichunt.com/images/ichunt/202304/11/0bf30da3e8ce6c476c210173b5f13d51.png') no-repeat center;
background-size: contain;
display: block;
&.curr {
background: url('https://img.ichunt.com/images/ichunt/202304/11/71a74e52e94bcf2e89f8df9817d494c6.png') no-repeat center;
background-size: contain;
}
}
.text {
margin-left: 10rpx;
font-size: 20rpx;
color: #484b59;
}
}
.btn2 {
width: 300rpx;
height: 75rpx;
background: #02a7f0;
font-size: 23rpx;
color: #ffffff;
}
.btn3 {
width: calc(100% - 428rpx);
height: 75rpx;
background: #1969f9;
font-size: 23rpx;
color: #ffffff;
}
}
}
.no-date {
padding: 30rpx 0;
.iconfont {
font-size: 180rpx;
color: #c6c7cc;
margin-bottom: 30rpx;
}
.text {
font-size: 20rpx;
color: #484b59;
}
}
::v-deep .uni-drawer__content {
width: 85% !important;
}
.tally-index {
height: 100vh;
padding: 0 24rpx;
overflow: hidden;
.fix-box {
margin-top: 24rpx;
}
.column-box {
padding: 0 24rpx;
height: 88rpx;
background: #ffffff;
border-radius: 4rpx;
margin-bottom: 16rpx;
.action-bar {
.btn {
width: 144rpx;
height: 48rpx;
background: #197adb;
border-radius: 4rpx;
font-size: 24rpx;
color: #ffffff;
}
.btn1 {
width: 144rpx;
height: 48rpx;
background: #ffffff;
border-radius: 4rpx;
border: 1px solid #197adb;
font-size: 24rpx;
color: #197adb;
}
.icon-jinggao2 {
position: relative;
font-size: 30rpx;
color: #c6c7cc;
margin-right: 30rpx;
z-index: 22;
}
}
.select-box {
width: 129rpx;
margin-right: 22rpx;
.wrap {
.uni-input {
font-weight: bold;
font-size: 28rpx;
color: #404547;
}
}
.uni-arrow {
font-size: 17rpx;
color: #9ca8ad;
}
}
.input-box {
.uni-input {
font-weight: bold;
font-size: 28rpx;
color: #404547;
&.disabled {
opacity: 0.8;
}
}
.icon-jinggao2 {
font-size: 30rpx;
color: #c6c7cc;
}
}
}
.info {
padding: 24rpx 0;
flex-wrap: wrap;
.grid-item {
padding-bottom: 12rpx;
.t1 {
font-size: 24rpx;
color: #6e767a;
}
.t2 {
font-size: 24rpx;
color: #404547;
font-weight: bold;
}
.t3 {
font-size: 24rpx;
color: #197adb;
font-weight: bold;
}
}
}
.list {
height: calc(100% - 470rpx);
.box {
background: #ffffff;
border-radius: 4rpx;
margin-bottom: 16rpx;
padding: 24rpx;
transition: all 0.4s ease;
&.disabled {
background-color: #f2f9ff;
border: 1px solid #bbdcfd;
}
.pb16 {
padding-bottom: 16rpx;
}
.w130 {
width: 156rpx;
}
.t1 {
font-size: 28rpx;
color: #404547;
font-weight: bold;
}
.t2 {
width: 48rpx;
height: 36rpx;
border-radius: 4rpx;
border: 1px solid #197adb;
font-size: 24rpx;
color: #197adb;
margin-left: 16rpx;
}
.t3 {
font-size: 26rpx;
color: #6e767a;
white-space: nowrap;
}
.t4 {
font-size: 26rpx;
color: #404547;
}
.t5 {
font-size: 24rpx;
color: #197adb;
margin-left: 16rpx;
}
.desc {
width: 80%;
font-size: 26rpx;
color: #404547;
}
.input-text {
.uni-input {
height: 48rpx;
background: #e6edf0;
border-radius: 4rpx;
padding-left: 20rpx;
font-size: 26rpx;
color: #404547;
font-weight: bold;
}
}
.upload-list {
.default {
width: 88rpx;
height: 88rpx;
background-color: #f1f4f6;
border: 1px solid #e6edf0;
.iconfont {
font-size: 48rpx;
color: #d8d8d8;
}
}
.pic-box {
position: relative;
width: 88rpx;
height: 88rpx;
margin-right: 10rpx;
&:nth-of-type(4n) {
margin-right: 0;
}
image {
width: 88rpx;
height: 88rpx;
}
.delete {
position: absolute;
right: 0rpx;
top: -13rpx;
width: 30rpx;
height: 30rpx;
border-radius: 50%;
background-color: #bb3434;
z-index: 9;
.iconfont {
font-size: 20rpx;
color: #ffffff;
}
}
}
}
.btn {
width: 190rpx;
height: 88rpx;
background: #197adb;
border-radius: 4rpx;
font-size: 26rpx;
color: #ffffff;
&.disabled {
background: #9ca8ad;
}
}
}
}
.btn-list {
margin-top: 30%;
flex-wrap: wrap;
.box {
width: 220rpx;
height: 88rpx;
background: #197adb;
border-radius: 4rpx;
font-size: 28rpx;
color: #ffffff;
margin-right: 20rpx;
margin-bottom: 20rpx;
&:nth-child(3) {
margin-right: 0;
}
}
.num {
position: absolute;
width: 40rpx;
height: 40rpx;
line-height: 20px;
border-radius: 20rpx;
background: red;
color: #fff;
top: -9rpx;
right: 8rpx;
font-size: 24rpx;
text-align: center;
}
}
.scroll-Y {
height: 100%;
}
}
.popup-content {
padding: 28rpx 24rpx 24rpx 24rpx;
.selected-items {
flex-wrap: wrap;
.box {
padding: 0 12rpx;
height: 44rpx;
background: #ffffff;
border-radius: 4rpx;
border: 1px solid #197adb;
margin-right: 16rpx;
margin-bottom: 16rpx;
.text {
font-size: 24rpx;
color: #197adb;
}
.close {
margin-left: 5rpx;
font-size: 36rpx;
color: #197adb;
}
}
}
.search-baar {
height: 88rpx;
background: #ffffff;
border-radius: 4rpx;
padding-left: 24rpx;
margin-bottom: 16rpx;
.iconfont {
font-size: 36rpx;
color: #6e767a;
}
.uni-input {
margin-left: 15rpx;
font-size: 28rpx;
color: #404547;
}
}
.data-list {
background: #ffffff;
border-radius: 4rpx;
margin-bottom: 22rpx;
max-height: 504rpx;
overflow-y: auto;
.box {
margin: 0 24rpx;
height: 84rpx;
border-bottom: 1rpx solid #e6edf0;
&:last-child {
border-bottom: none;
}
.text {
font-size: 26rpx;
color: #404547;
}
.check-ico {
width: 24rpx;
height: 25rpx;
background: url('https://img.ichunt.com/images/ichunt/202309/14/3743c01230310f62a2afa41a6c2eea96.png') no-repeat center;
background-size: contain;
display: block;
}
&.curr {
.text {
color: #197adb;
}
.check-ico {
background: url('https://img.ichunt.com/images/ichunt/202309/14/e651ddae61b5f02af4129f723b2cf74f.png') no-repeat center;
background-size: contain;
}
}
}
}
.pop-btn {
height: 88rpx;
background: #197adb;
border-radius: 4rpx;
font-size: 28rpx;
color: #ffffff;
}
}
.popup-content-sn {
background-color: #f1f4f6;
padding: 28rpx 24rpx 24rpx 24rpx;
border-radius: 10rpx;
width: 675rpx;
.tally-title {
margin-bottom: 10rpx;
.t1 {
font-size: 26rpx;
color: #333;
}
.t2 {
font-size: 26rpx;
color: #197adb;
}
}
.tally-list {
padding: 24rpx;
background-color: #ffffff;
margin-top: 24rpx;
.scroll-Y {
max-height: 600rpx;
}
.box {
height: 80rpx;
border-bottom: 1px solid #e6edf0;
&:last-child {
border-bottom: none;
}
.t1 {
font-size: 26rpx;
color: #333;
}
.t2 {
font-size: 26rpx;
color: #333;
}
.t3 {
font-size: 26rpx;
color: #6e767a;
}
.select {
font-size: 26rpx;
color: #197adb;
}
}
}
}
.popup-content-tally-num {
background-color: #f1f4f6;
padding: 50rpx 24rpx 50rpx 24rpx;
border-radius: 10rpx;
width: 550rpx;
.input-box {
margin-bottom: 30rpx;
.label {
width: 190rpx;
font-size: 26rpx;
color: #6e767a;
white-space: nowrap;
}
.tt {
font-weight: bold;
font-size: 28rpx;
color: #404547;
}
.uni-input {
width: 210rpx;
height: 55rpx;
background: #e6edf0;
border-radius: 4rpx;
padding-left: 20rpx;
font-size: 26rpx;
color: #404547;
font-weight: bold;
}
}
.tip {
font-size: 26rpx;
color: #f39d18;
margin-bottom: 40rpx;
}
.btn {
padding: 0 70rpx;
.ok {
width: 140rpx;
height: 60rpx;
background: #197adb;
border-radius: 10rpx;
font-size: 26rpx;
color: #ffffff;
}
.canel {
width: 140rpx;
height: 60rpx;
background: #ffffff;
border-radius: 10rpx;
border: 1px solid #197adb;
font-size: 24rpx;
color: #197adb;
}
}
}
.page-add-exception {
margin-top: 24rpx;
padding: 0 24rpx 24rpx 24rpx;
.scanBarcode {
height: 88rpx;
background: #ffffff;
border-radius: 4rpx;
margin-bottom: 16rpx;
.iconfont {
font-size: 52rpx;
color: #197adb;
}
.tt {
margin-left: 12rpx;
font-size: 26rpx;
color: #404547;
}
}
.section {
padding: 24rpx 24rpx 0 24rpx;
background: #ffffff;
border-radius: 4rpx;
margin-bottom: 16rpx;
.warehouse {
padding-bottom: 24rpx;
border-bottom: 1px solid #e6edf0;
.t1 {
font-size: 22rpx;
color: #000;
margin-bottom: 8rpx;
}
.input-wrap {
.arrow {
width: 12rpx;
height: 12rpx;
background: #197adb;
border-radius: 50%;
margin-right: 16rpx;
}
.uni-input {
font-size: 32rpx;
color: #1e2021;
font-weight: bold;
}
}
.inspection {
width: 72rpx;
height: 36rpx;
border-radius: 4rpx;
border: 1rpx solid #197adb;
font-size: 24rpx;
color: #197adb;
}
}
.box {
height: 80rpx;
border-bottom: 1px solid #e6edf0;
&:last-child {
border-bottom: none;
}
.label {
font-size: 24rpx;
color: #6e767a;
margin-right: 27rpx;
}
.input-wrap {
width: calc(100% - 160rpx);
.text-prompt {
color: #6e767a;
font-size: 24rpx;
}
}
.input-wrap-width {
justify-content: flex-end;
.text {
font-size: 24rpx;
color: #404547;
font-weight: bold;
margin-right: 12rpx;
}
.iconfont {
font-size: 21rpx;
color: #9ca8ad;
}
.uni-input-box {
font-size: 24rpx;
color: #1e2021;
}
}
.tab {
.tab-panel {
width: 120rpx;
height: 48rpx;
background: #9ca8ad;
border-radius: 4rpx;
font-size: 24rpx;
color: #ffffff;
margin-right: 24rpx;
&:last-child {
margin-right: 0;
}
&.curr {
background: #197adb;
}
}
}
.uni-input {
font-size: 24rpx;
color: #404547;
font-weight: bold;
}
}
.upload-box {
margin-top: 24rpx;
position: relative;
z-index: 1;
.title {
margin-bottom: 24rpx;
.tt-l {
font-size: 24rpx;
color: #6e767a;
}
.tt-r {
font-size: 24rpx;
color: #404547;
}
}
.upload-list {
padding-bottom: 48rpx;
flex-wrap: wrap;
.default {
width: 144rpx;
height: 144rpx;
background-color: #f1f4f6;
border: 1rpx solid #e6edf0;
.iconfont {
font-size: 48rpx;
color: #d8d8d8;
}
}
.pic-box {
position: relative;
flex: 0 0 23%;
margin-right: 10rpx;
margin-bottom: 10rpx;
&:nth-of-type(4n) {
margin-right: 0;
}
image {
width: 144rpx;
height: 144rpx;
}
.delete {
position: absolute;
right: 10rpx;
top: -13rpx;
width: 30rpx;
height: 30rpx;
border-radius: 50%;
background-color: #bb3434;
z-index: 999;
.iconfont {
font-size: 20rpx;
color: #ffffff;
}
}
}
}
.model-upload-list {
border-top: 1rpx solid #e6edf0;
.box {
height: 80rpx;
border-bottom: 1rpx solid #e6edf0;
&:last-child {
border-bottom: none;
}
.file {
.t1 {
width: 258rpx;
color: #404547;
font-size: 24rpx;
font-weight: bold;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.t2 {
font-size: 24rpx;
color: #197adb;
margin-left: 4rpx;
margin-right: 16rpx;
}
.clear {
font-size: 24rpx;
color: #404547;
font-weight: bold;
}
}
.file-btn {
.t1 {
font-size: 24rpx;
color: #404547;
font-weight: bold;
margin-right: 12rpx;
}
.iconfont {
font-size: 21rpx;
color: #9ca8ad;
}
}
&.curr {
.file {
.t1 {
color: #197adb;
}
}
}
}
}
}
}
.btn {
position: relative;
z-index: 2;
height: 88rpx;
background: #197adb;
border-radius: 4rpx;
font-size: 28rpx;
color: #ffffff;
&.disabled {
opacity: 0.7;
}
}
}
......@@ -10,11 +10,6 @@
"navigationBarTitleText": "异常理货"
}
}, {
"path": "pages/tallyGoods/addException",
"style": {
"navigationBarTitleText": "新增异常"
}
}, {
"path": "pages/tallyGoods/exceptionSelect",
"style": {
"navigationBarTitleText": "选择异常类型"
......@@ -135,16 +130,6 @@
"navigationBarTitleText": "装箱复核时序蒲"
}
}, {
"path": "pages/pda/warehousing",
"style": {
"navigationBarTitleText": "深圳扫码收货"
}
}, {
"path": "pages/pda/exWarehouse",
"style": {
"navigationBarTitleText": "深圳扫码出库"
}
}, {
"path": "pages/pda/logisticsList",
"style": {
"navigationBarTitleText": "进口物流清单"
......@@ -165,11 +150,6 @@
"navigationBarTitleText": "签到统计"
}
}, {
"path": "pages/pda/selectDate",
"style": {
"navigationBarTitleText": "扫描管理"
}
}, {
"path": "pages/scanInventory/index",
"style": {
"navigationBarTitleText": "扫描盘点"
......@@ -190,23 +170,6 @@
"navigationBarTitleText": "手动合箱"
}
}, {
"path": "pages/tally/index",
"style": {
"navigationBarTitleText": "入库理货",
"app-plus": {
"titleNView": {
"buttons": [{
"index": "0",
"text": "理货记录",
"fontSize": "15px",
"color": "#1969F9",
"float": "right",
"width": "120px"
}]
}
}
}
}, {
"path": "pages/tally/fixBox",
"style": {
"navigationBarTitleText": "合箱"
......@@ -227,11 +190,6 @@
"navigationBarTitleText": "美产商检管理"
}
}, {
"path": "pages/tally/goods",
"style": {
"navigationBarTitleText": "货品查询"
}
}, {
"path": "pages/tally/goodsDetail",
"style": {
"navigationBarTitleText": "货品详情"
......
......@@ -106,16 +106,6 @@
tips: ''
},
{
name: '深圳扫码收货',
iconfont: 'icon-ruku',
tips: ''
},
{
name: '深圳扫码出库',
iconfont: 'icon-cangpeitubiao_chukuhuanhuochuku',
tips: ''
},
{
name: '进口物流清单',
iconfont: 'icon-wuliu',
tips: ''
......@@ -134,21 +124,6 @@
name: '理货确认',
iconfont: 'icon-a-10cangkucangchu2',
tips: ''
},
{
name: '新增异常',
iconfont: 'icon-jinggao1',
tips: ''
},
{
name: '入库理货',
iconfont: 'icon-a-10cangkucangchu4',
tips: ''
},
{
name: '货品查询',
iconfont: 'icon-huopinchaxun',
tips: ''
}
]
};
......@@ -249,14 +224,6 @@
uni.navigateTo({
url: '/pages/goods/rePackageList'
});
} else if (item.name == '深圳扫码收货') {
uni.navigateTo({
url: '/pages/pda/selectDate?type=1'
});
} else if (item.name == '深圳扫码出库') {
uni.navigateTo({
url: '/pages/pda/selectDate?type=2'
});
} else if (item.name == '进口物流清单') {
uni.navigateTo({
url: '/pages/pda/logisticsList'
......@@ -273,18 +240,6 @@
uni.navigateTo({
url: '/pages/tallyGoods/confirm'
});
} else if (item.name == '新增异常') {
uni.navigateTo({
url: '/pages/tallyGoods/addException'
});
} else if (item.name == '入库理货') {
uni.navigateTo({
url: '/pages/tally/index'
});
} else if (item.name == '货品查询') {
uni.navigateTo({
url: '/pages/tally/goods'
});
} else if (item.name == '异常管理') {
uni.navigateTo({
url: '/pages/tally/abnormalManageList'
......
<template>
<view class="ex-warehousing">
<view class="uni-table-box">
<uni-table type="selection" border stripe emptyText="暂无更多数据" @selection-change="selectionChange">
<uni-tr>
<uni-th align="center">入仓号</uni-th>
<uni-th align="center">车序</uni-th>
<uni-th align="center">汇总件数</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in list" :key="index">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item :right-options="options" @click="bindClick($event, index)" @change="swipeChange($event, index)">
<uni-td align="center">{{ item.erp_order_sn || '' }}</uni-td>
<uni-td align="center">{{ item.car_sort || '' }}</uni-td>
<uni-td align="center">{{ item.num || '' }}</uni-td>
</uni-swipe-action-item>
</uni-swipe-action>
</uni-tr>
</uni-table>
</view>
<view class="scan row rowCenter verCenter" @click="scanChange()" hover-class="none">
<text class="iconfont icon-juxing2"></text>
<text class="tt">继续扫描</text>
</view>
<view class="fix-info row bothSide verCenter">
<view class="text row verCenter">
<text class="t1">入仓号数:</text>
<text class="t2">{{ selectedIndexs.length }}</text>
</view>
<view class="btn row rowCenter verCenter" @click="szScanOutChange">出库单号确认</view>
</view>
</view>
</template>
<script>
import { API } from '@/util/api.js';
export default {
data() {
return {
options: [
{
text: '取消',
style: {
backgroundColor: '#007aff'
}
},
{
text: '删除',
style: {
backgroundColor: '#dd524d'
}
}
],
selectedIndexs: [],
erp_order_sn: '',
list: [
{
erp_order_sn: 'B154542',
car_sort: '1车次',
num: 100
},
{
erp_order_sn: 'B1542',
car_sort: '2车次',
num: 10
}
],
filterList: [],
startTime: '',
endTime: ''
};
},
onLoad(options) {
this.erp_order_sn = options.number;
this.startTime = options.startTime;
this.endTime = options.endTime;
this.getData();
},
onShow() {
this.selectedIndexs = [];
},
methods: {
bindClick(e, index) {
console.log('点击了' + (e.position === 'left' ? '左侧' : '右侧') + e.content.text + '按钮');
if (e.content.text == '删除') {
this.list.splice(index, 1);
}
},
swipeChange(e, index) {
//console.log('当前状态:' + e + ',下标:' + index);
},
selectionChange(e) {
this.selectedIndexs = e.detail.index;
this.filterList = this.selectedIndexs.map(i => this.list[i]);
},
scanChange(type) {
uni.scanCode({
success: res => {
console.log(res);
if (res.errMsg == 'scanCode:ok') {
this.erp_order_sn = res.result;
this.getData();
}
},
fail: res => {
console.log(res);
uni.showToast({
title: '扫码失败',
icon: 'error'
});
}
});
},
getData() {
this.request(API.szScanOut, 'POST', { erp_order_sn: this.erp_order_sn, is_submit: 0 }, true).then(res => {
if (res.err_code === 0) {
this.list.push({
car_sort: res.data.car_sort,
erp_order_sn: res.data.erp_order_sn,
num: res.data.num
});
} else {
this.list = [];
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
szScanOutChange() {
if (this.filterList.length <= 0) {
uni.showModal({
title: '提示',
content: '请勾选入仓号',
showCancel: false
});
return false;
}
this.request(API.szScanOut, 'POST', { list: this.filterList, is_submit: 1, erp_order_sn: this.erp_order_sn, startTime: this.startTime, endTime: this.endTime }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '提交成功',
duration: 2000
});
setTimeout(() => {
uni.navigateTo({
url: '/pages/pda/logisticsList'
});
}, 2000);
} else {
uni.showModal({
title: '提示',
content: res.err_msg,
showCancel: false
});
}
});
}
}
};
</script>
<style scoped lang="scss">
@import '../../assets/css/pda/exWarehouse.scss';
</style>
<template>
<view class="logisticsList">
<view class="row seldate-box"><uni-datetime-picker type="daterange" v-model="range" @change="bindDateChange" /></view>
<view class="scan column rowCenter verCenter" @click="scanChange(type)">
<text class="iconfont icon-ruku"></text>
<text class="tt">{{ type == 1 ? '扫码收货' : '扫码出库' }}</text>
</view>
</view>
</template>
<script>
import { API } from '@/util/api.js';
export default {
data() {
return {
type: '',
range: []
};
},
onLoad(options) {
this.type = options.type;
},
methods: {
bindDateChange(e) {
this.range = e;
},
scanChange(type) {
if (this.range.length <= 0) {
uni.showModal({
title: '提示',
content: '请选择时间段',
showCancel: false
});
return false;
}
uni.scanCode({
success: res => {
console.log(res);
if (res.errMsg == 'scanCode:ok') {
if (type == 1) {
uni.navigateTo({
url: '/pages/pda/warehousing?number=' + res.result + '&startTime=' + this.range[0] + '&endTime=' + this.range[1]
});
}
if (type == 2) {
uni.navigateTo({
url: '/pages/pda/exWarehouse?number=' + res.result + '&startTime=' + this.range[0] + '&endTime=' + this.range[1]
});
}
}
},
fail: res => {
console.log(res);
uni.showToast({
title: '扫码失败',
icon: 'error'
});
}
});
}
}
};
</script>
<style scoped lang="scss">
@import '../../assets/css/pda/logisticsList.scss';
</style>
<template>
<view class="warehousing">
<view class="uni-table-box">
<uni-table type="selection" border stripe emptyText="暂无更多数据" @selection-change="selectionChange">
<uni-tr>
<uni-th align="center">入仓号</uni-th>
<uni-th align="center">车序</uni-th>
<uni-th align="center">汇总件数</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in list" :key="index">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item :right-options="options" @click="bindClick($event, index)" @change="swipeChange($event, index)">
<uni-td align="center">{{ item.erp_order_sn || '' }}</uni-td>
<uni-td align="center">{{ item.car_sort || '' }}</uni-td>
<uni-td align="center">{{ item.num || '' }}</uni-td>
</uni-swipe-action-item>
</uni-swipe-action>
</uni-tr>
</uni-table>
</view>
<view class="scan row rowCenter verCenter" @click="scanChange()">
<text class="iconfont icon-juxing2"></text>
<text class="tt">继续扫描</text>
</view>
<view class="fix-info row bothSide verCenter">
<view class="text row verCenter">
<text class="t1">入仓号数:</text>
<text class="t2">{{ selectedIndexs.length }}</text>
</view>
<view class="btn row rowCenter verCenter" @click="szScanInChange">入库单号确认</view>
</view>
</view>
</template>
<script>
import { API } from '@/util/api.js';
export default {
data() {
return {
options: [
{
text: '取消',
style: {
backgroundColor: '#007aff'
}
},
{
text: '删除',
style: {
backgroundColor: '#dd524d'
}
}
],
selectedIndexs: [],
erp_order_sn: '',
list: [],
filterList: [],
startTime: '',
endTime: ''
};
},
onLoad(options) {
this.erp_order_sn = options.number;
this.startTime = options.startTime;
this.endTime = options.endTime;
this.getData();
},
onShow() {
this.selectedIndexs = [];
},
methods: {
bindClick(e, index) {
console.log('点击了' + (e.position === 'left' ? '左侧' : '右侧') + e.content.text + '按钮');
if (e.content.text == '删除') {
this.list.splice(index, 1);
}
},
swipeChange(e, index) {
//console.log('当前状态:' + e + ',下标:' + index);
},
selectionChange(e) {
this.selectedIndexs = e.detail.index;
this.filterList = this.selectedIndexs.map(i => this.list[i]);
},
scanChange() {
uni.scanCode({
success: res => {
console.log(res);
if (res.errMsg == 'scanCode:ok') {
this.erp_order_sn = res.result;
this.getData();
}
},
fail: res => {
console.log(res);
uni.showToast({
title: '扫码失败',
icon: 'error'
});
}
});
},
getData() {
this.request(API.szScanIn, 'POST', { erp_order_sn: this.erp_order_sn, is_submit: 0 }, true).then(res => {
if (res.err_code === 0) {
this.list.push({
car_sort: res.data.car_sort,
erp_order_sn: res.data.erp_order_sn,
num: res.data.num
});
} else {
this.list = [];
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
szScanInChange() {
if (this.filterList.length <= 0) {
uni.showModal({
title: '提示',
content: '请勾选入仓号',
showCancel: false
});
return false;
}
this.request(API.szScanIn, 'POST', { list: this.filterList, is_submit: 1, erp_order_sn: this.erp_order_sn, startTime: this.startTime, endTime: this.endTime }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '提交成功',
duration: 2000
});
setTimeout(() => {
uni.navigateTo({
url: '/pages/pda/logisticsList'
});
}, 2000);
} else {
uni.showModal({
title: '提示',
content: res.err_msg,
showCancel: false
});
}
});
}
}
};
</script>
<style scoped lang="scss">
@import '../../assets/css/pda/warehousing.scss';
</style>
<template>
<view class="page-box">
<!-- 搜索参数 -->
<view class="search-box row bothSide verCenter">
<view class="sn row rowCenter verCenter">
<picker @change="bindPickerChange($event,1)" :value="index" :range="array">
<view class="row verCenter">
<view class="uni-input">{{ array[index] }}</view>
<view class="uni-arrow"></view>
</view>
</picker>
</view>
<view class="search-bar row bothSide verCenter">
<view class="row verCenter" style="width: 100%;">
<text class="iconfont icon-juxing11"></text>
<input class="uni-input" placeholder="输入型号或入仓号或理货批次号查询" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.all_search" @input="handleInput" style="width: 100%;" />
</view>
<text class="iconfont icon-a-juxing111" @click="clearInput()" v-if="input_flag"></text>
</view>
</view>
<view class="total-text" v-if="list.length > 0"><text>{{total}}</text>条数据</view>
<!-- 列表区 -->
<view class="list" v-if="list.length > 0">
<view class="box row" v-for="(item, index) in list" :key="index">
<view class="status-box row verCenter">
<view class="row" style="font-size: 24rpx;color: #1969f9;margin-right: 18rpx;" v-if="item.is_goods_check == 1">商检</view>
<template v-if="item.box_type == 0">
<view class="staus_type_val row rowCenter verCenter">{{item.box_type_cn}}</view>
</template>
<template v-else>
<view class="staus_type_val row rowCenter verCenter" style="border: 1px solid red;color: red;">{{item.box_type_cn}}</view>
</template>
</view>
<view class="input-box row verCenter curr" style="flex: 0 0 100%;">
<text class="tt" style="color: #000;font-weight: bold;">{{ item.box_sn }}</text>
<text class="text" v-if="item.sub_box_qty > 1">({{ item.sub_box_qty }})</text>
<text class="tt" style="margin-left: 50rpx;width: 100rpx;">{{item.tally_status_cn}}</text>
</view>
<view class="input-box row verCenter">
<text class="label">入仓号数:</text>
<text class="text">{{ item.erp_order_sn_num }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">型号数:</text>
<text class="text">{{ item.goods_type_num }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">总净重:</text>
<text class="text">{{ item.net_weight_sum }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">总毛重:</text>
<text class="text">{{ item.gross_weight }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">更新时间:</text>
<text class="text">{{ item.update_time_cn }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">更新人:</text>
<text class="text">{{ item.update_user_name }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">封箱时间:</text>
<text class="text">{{ item.close_time_cn }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">封箱人:</text>
<text class="text">{{ item.tally_user_name }}</text>
</view>
<view class="btn-box row">
<navigator class="btn2 row rowCenter verCenter" :url="'/pages/tally/goodsDetail?wsty_id='+item.wsty_id+'&box_sn='+item.box_sn+'&box_type='+item.box_type+'&tally_status='+item.tally_status">详情</navigator>
</view>
</view>
</view>
<!-- 无数据展示 -->
<view class="no-date column rowCenter verCenter" v-else>
<text class="iconfont icon-a-juxing21"></text>
<text class="text">查不到当前数据</text>
</view>
</view>
</template>
<script>
import { API } from '@/util/api.js';
import debounce from 'lodash/debounce';
export default {
data() {
return {
page: 1,
limit: 30,
list: [],
index: 0,
array: ['全量搜索'],
detail: {}, //详情
input_flag: false,
total: 0,
is_focus: true, //获取焦点动态化
hasMoreData: true, //是否分页加载
searchParams: {
all_search: ''
}
};
},
onReachBottom() {
if (!this.hasMoreData) {
return;
}
this.page++;
this.getData();
},
onShow() {
this.resetChange();
if (this.searchParams.all_search) {
this.getData();
}
},
methods: {
getData() {
this.request(API.getBoxData, 'GET', { page: this.page, limit: this.limit, ...this.searchParams }, true).then(res => {
if (res.err_code === 0) {
this.total = res.data.total;
if (res.data.data.length > 0) {
this.hasMoreData = true;
this.list = this.list.concat(res.data.data);
} else {
this.hasMoreData = false;
}
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 清空数据
*/
clearInput() {
this.resetChange();
this.searchParams.all_search = '';
this.input_flag = false;
this.clearInputAndFocus();
this.getData();
},
/**
* 全量搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
this.resetChange();
var val = event.target.value;
this.searchParams.all_search = '';
if (val) {
this.searchParams.all_search = val;
this.input_flag = true;
this.getData();
} else {
this.input_flag = false;
}
}, 500),
/**
* 重置
*/
resetChange() {
this.list = [];
this.page = 1;
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
},
}
};
</script>
<style scoped lang="scss">
@import '@/assets/css/tally/goods.scss';
</style>
\ No newline at end of file
<template>
<view class="tally-index">
<view class="fix-box">
<view class="column-box row bothSide verCenter">
<view class="input-box row verCenter">
<input class="uni-input" @input="handleInput($event, 1)" :focus="is_focus_1" placeholder="当前箱号" placeholder-style="color:#000;font-weight: bold;" v-model="box_sn" />
</view>
<view class="action-bar row verCenter">
<text class="iconfont icon-jinggao2" @click="clearInput(1)" v-if="box_sn"></text>
<template v-if="box_sn && wsty_id">
<view class="btn1 row rowCenter verCenter" @click="print()" style="margin-right: 8rpx;">打印箱号</view>
<view class="btn row rowCenter verCenter" @click="getBoxSn()">取箱号</view>
</template>
<template v-else>
<view class="btn row rowCenter verCenter" @click="getBoxSn()">取箱号</view>
</template>
</view>
</view>
<view class="column-box row bothSide verCenter">
<view class="input-box row verCenter">
<input class="uni-input" :focus="is_focus_2" :disabled="form.length > 0 && step == 1 && erp_order_sn != ''" :class="{ 'disabled': form.length > 0 && step == 1 && erp_order_sn != '' }" placeholder="输入或扫描入仓号" placeholder-style="color:#000;font-weight: bold;" v-model="erp_order_sn" />
</view>
<view class="action-bar row verCenter">
<text class="iconfont icon-jinggao2" @click="clearInput(2)" v-if="erp_order_sn"></text>
<template v-if="form.length > 0 && step == 1 && erp_order_sn != ''">
<view class="btn1 row rowCenter verCenter" style="margin-right: 8rpx;" @click="cancelRelease()">取消释放</view>
<view class="btn row rowCenter verCenter" @click="getBoxStatus()">关单封箱</view>
</template>
<template v-else>
<view class="btn row rowCenter verCenter" @click="lockTally()">锁定理货</view>
</template>
</view>
</view>
<view class="column-box row verCenter" style="margin-bottom: 0;">
<view class="select-box">
<picker @change="bindPickerChange" :value="index" :range="item">
<view class="wrap row verCenter bothSide">
<view class="uni-input">{{ item[index] }}</view>
<text class="iconfont icon-sanjiaoxing1 uni-arrow"></text>
</view>
</picker>
</view>
<view class="input-box row verCenter" style="width: calc(100% - 129rpx);">
<!-- 其他 -->
<template v-if="index == 0">
<input class="uni-input" maxlength="-1" :focus="is_focus_3" placeholder="输入或扫描" placeholder-style="color:#000;font-weight: bold;" style="width: 100%;" v-model="goods_type" @input="handleInput($event, 2)" />
</template>
<!-- digikey等供应商-->
<template v-else>
<input class="uni-input" maxlength="-1" :focus="is_focus_3" :confirm-type="'none'" :hold-keyboard="false" placeholder="输入或扫描" placeholder-style="color:#000;font-weight: bold;" style="width: 100%;" v-model="keyword" @input="handleInput($event, 2)" />
</template>
<text class="iconfont icon-jinggao2" @click="clearInput(3)" v-if="goods_type || keyword"></text>
</view>
</view>
<!-- 箱子基础信息 -->
<view class="info row verCenter" v-if="tallyData && tallyData.detail">
<view class="grid-item row verCenter" style="width: 40%;">
<view class="t1">业务日期:</view>
<view class="t2">{{ tallyData.create_time_cn }}</view>
</view>
<view class="grid-item row verCenter" style="width: 30%;">
<view class="t1">总数:</view>
<view class="t3">{{ tallyData.goods_sn_num }}</view>
</view>
<view class="grid-item row verCenter" style="width: 30%;">
<view class="t1">未扫描:</view>
<view class="t3">{{ tallyData.no_scan_num }}</view>
</view>
<view class="grid-item row verCenter" style="width: 40%;">
<view class="t1">已扫描:</view>
<view class="t3">{{ tallyData.have_scan_num }}</view>
</view>
<view class="grid-item row verCenter" style="width: 60%;">
<view class="t1">业务:</view>
<view class="t2">{{ tallyData.salesname }}</view>
</view>
</view>
</view>
<!-- 列表 -->
<view class="list" v-if="form.length > 0">
<scroll-view scroll-y="true" class="scroll-Y">
<view class="box" v-for="(item, index) in tallyData.detail" :key="index" :class="{ disabled: item.tally_status == 3 }">
<view class="title pb16 row verCenter" style="position: relative;">
<text class="t1">{{ item.goods_type }}</text>
<text class="t2 row rowCenter verCenter" v-if="item.is_goods_check"></text>
<text style="color: #197adb;font-size: 24rpx;position: absolute;right: 0;top: 0;">{{ item.declaration_type_val }}</text>
</view>
<view class="pb16 row bothSide verCenter">
<view class="row" style="width: 50%;">
<text class="t3 w130">海关编码:</text>
<text class="t4" :style="{ color: isSpecialTaxCode(item.tax_sn) ? 'red' : '' }">{{ item.tax_sn }}</text>
</view>
<!-- 重点检查提醒标识 -->
<view class="row verCenter" style="width: 50%;justify-content: flex-end;" v-if="isSpecialTaxCode(item.tax_sn)">
<text class="iconfont icon-jinggao1" style="color: red;font-size: 32rpx;margin-right: 8rpx;"></text>
<text class="t4" style="text-align: right;color: red;">需重点检查COD</text>
</view>
</view>
<view class="pb16 row bothSide verCenter">
<view class="row" style="width: 50%;">
<text class="t3 w130">物料名称:</text>
<text class="t4">{{ item.goods_title }}</text>
</view>
<!-- 完全理货显示箱号 -->
<view class="row" style="width: 50%;justify-content: flex-end;" v-if="item.tally_status == 3">
<text class="t4" style="text-align: right;color: #197adb;">{{ item.box_sn }}</text>
</view>
</view>
<view class="pb16 row">
<text class="t3 w130">品牌:</text>
<text class="t4">{{ item.brand }}</text>
</view>
<!-- 总数量 -->
<template v-if="item.tally_status == 3">
<view class="pb16 row">
<text class="t3 w130">总数量:</text>
<text class="t4">{{ item.order_numbers }}</text>
</view>
</template>
<!-- 待收数量 && 总数量 -->
<template v-else>
<view class="pb16 row verCenter">
<view class="row" style="width: 50%;">
<text class="t3 w130">待收数量:</text>
<text class="t4">{{ item.wait_tally_num }}</text>
</view>
<view class="row" style="width: 50%;">
<text class="t3 w130">总数量:</text>
<text class="t4">{{ item.order_numbers }}</text>
</view>
</view>
</template>
<view class="pb16 row">
<text class="t3 w130">订单备注:</text>
<text class="desc">{{ item.order_remark }}</text>
</view>
<view class="pb16 row verCenter">
<!-- 已入库数量 -->
<template v-if="item.tally_status == 3">
<text class="t3 w130">已入库数量:</text>
</template>
<!-- 入库数量 -->
<template v-else>
<text class="t3 w130">入库数量:</text>
</template>
<view class="input-text">
<input class="uni-input" :disabled="item.tally_status == 3" type="number" inputmode="numeric" placeholder="输入" placeholder-style="color:#000;font-weight: bold;" v-model="form[index].tally_num" />
</view>
</view>
<view class="pb16 row verCenter">
<text class="t3 w130">原产地:</text>
<view class="input-text">
<!-- 产地不可编辑 -->
<template v-if="item.tally_status == 3">
<input class="uni-input" placeholder="选择产地" placeholder-style="color:#000;font-weight: bold;" disabled="" v-model="form[index].origin" />
</template>
<!-- 产地可编辑 -->
<template v-else>
<input class="uni-input" placeholder="选择产地" placeholder-style="color:#000;font-weight: bold;" disabled="" @click="open(index)" v-model="form[index].origin" />
</template>
</view>
</view>
<view class="pb16 row verCenter">
<text class="t3 w130">净重:</text>
<view class="input-text">
<input class="uni-input" :disabled="item.tally_status == 3" type="number" inputmode="decimal" placeholder="输入" placeholder-style="color:#000;font-weight: bold;" v-model="form[index].net_weight" />
</view>
</view>
<view class="pb16 row verCenter">
<text class="t3 w130">理货备注:</text>
<view class="input-text">
<template v-if="item.tally_status == 3">
<input class="uni-input" :disabled="item.tally_status == 3" type="text" placeholder="输入" placeholder-style="color:#000;font-weight: bold;" v-model="form[index].remark" maxlength="100" @click="viewChange(form[index].remark)" />
</template>
<template v-else>
<input class="uni-input" :disabled="item.tally_status == 3" type="text" placeholder="输入" placeholder-style="color:#000;font-weight: bold;" v-model="form[index].remark" maxlength="100" />
</template>
</view>
</view>
<view class="row bothSide verCenter">
<view class="upload-list row verCenter">
<template v-if="image_list.length > 0">
<view class="pic-box" v-for="(v, i) in image_list[index]" :key="i">
<image :src="v" mode="aspectFill" lazy-load="true" @click="previewChange(image_list[index], i)"></image>
<template v-if="item.tally_status != 3">
<view class="delete row rowCenter verCenter" @click="deletePic(index, i)"><text class="iconfont icon-shanchu"></text></view>
</template>
</view>
</template>
<template v-if="item.tally_status == 3">
<view class="default row rowCenter verCenter" v-if="image_list[index].length < 4"><text class="iconfont icon-xingzhuangjiehe"></text></view>
</template>
<template v-else>
<view class="default row rowCenter verCenter" @click="chooseImageChange(index)" v-if="image_list[index].length < 4"><text class="iconfont icon-xingzhuangjiehe"></text></view>
</template>
</view>
<!-- 取消理货 -->
<template v-if="item.tally_status == 3">
<view class="btn row rowCenter verCenter disabled" @click="cancelTallyDetail(index)">取消理货</view>
</template>
<!-- 提交 -->
<template v-else>
<view class="btn row rowCenter verCenter" @click="submitTallyDetail(index)" :class="{ disabled: isSubmitting }">提 交</view>
</template>
</view>
</view>
</scroll-view>
</view>
<!-- 无数据 -->
<view class="no-data column verCenter rowCenter" v-if="form.length == 0 && tallyData.create_time_cn">
<text class="iconfont icon-jinggao2"></text>
<text class="text">查找不到相关信息</text>
<text class="p">1、请输入正确的入仓号和型号</text>
</view>
<!-- 操作栏 -->
<view class="btn-list row verCenter" v-if="!tallyData.detail">
<navigator url="/pages/tally/fixBox" class="box row rowCenter verCenter" hover-class="none">合 箱</navigator>
<navigator url="/pages/tally/unboxing" class="box row rowCenter verCenter" hover-class="none">重新开箱</navigator>
<navigator url="/pages/tally/abnormalTally" class="box row rowCenter verCenter" hover-class="none">美产商检管理</navigator>
<view style="position:relative;">
<navigator url="/pages/tally/abnormalManageList" class="box row rowCenter verCenter" hover-class="none">异常管理</navigator>
<text class="num row verCenter rowCenter" v-if="stayHandleCount.abnormalQty > 0">{{ stayHandleCount.abnormalQty }}</text>
</view>
<view style="position:relative;">
<navigator url="/pages/tally/retentionList" class="box row rowCenter verCenter" hover-class="none">滞留预警</navigator>
<text class="num row verCenter rowCenter" v-if="stayHandleCount.retentionQty > 0">{{ stayHandleCount.retentionQty }}</text>
</view>
</view>
<!-- 选择国家 -->
<uni-popup ref="popup" background-color="#F1F4F6">
<view class="popup-content">
<view class="search-baar row verCenter">
<text class="iconfont icon-a-riqi11"></text>
<input type="text" class="uni-input" placeholder="请输入国家或地区名称(支持中英文)" placeholder-style="font-size:26rpx;color:#6E767A;" @input="handleInput($event, 3)" v-model="origin" style="width: 100%;" />
</view>
<view class="data-list">
<template v-if="origin_list.length > 0">
<view class="box row bothSide verCenter" v-for="(item, index) in origin_list" :key="index" :class="{ curr: filter_status[index] }" @click="filterChange(index)">
<text class="text">{{ item.name }}</text>
<view class="check-ico"></view>
</view>
</template>
<template v-else>
<view class="box row bothSide verCenter">
<text class="text">暂无数据</text>
</view>
</template>
</view>
<view class="pop-btn row rowCenter verCenter" @click="confirmChange">确 认</view>
</view>
</uni-popup>
<!-- 关单封箱弹窗 -->
<uni-popup ref="inputDialog" type="dialog" :mask-click="true" @maskClick="maskClick">
<uni-popup-dialog ref="inputClose" mode="input" :title="title" v-model="gross_weight" value="" confirmText="新箱子" cancelText="不需要换箱" placeholder="请输入毛重" @close="dialogInputClose" @confirm="dialogInputConfirm" :before-close="true"></uni-popup-dialog>
</uni-popup>
<!-- 多个入仓号查询 -->
<uni-popup ref="popupTally" background-color="#F1F4F6">
<view class="popup-content-sn">
<view class="tally-title">
<text class="t2">{{ erp_order_sn }}</text>
<text class="t1">有相似入仓号订单,请选择</text>
</view>
<view class="tally-list">
<scroll-view scroll-y="true" class="scroll-Y">
<view class="box row verCenter">
<view class="row verCenter" style="width: 90%;">
<text class="t3 row rowCenter verCenter" style="width: 40%;">入仓单号</text>
<text class="t3 row rowCenter verCenter" style="width: 25%;">明细数</text>
<text class="t3 row rowCenter verCenter" style="width: 35%;">入库状态</text>
</view>
</view>
<view class="box row bothSide verCenter" v-for="(item, index) in tallyList" :key="index">
<view class="row verCenter" style="width: 90%;">
<text class="t1 row rowCenter verCenter" style="width: 45%;">{{ item.erp_order_sn }}</text>
<text class="t2 row rowCenter verCenter" style="width: 25%;">{{ item.order_goods_num }}</text>
<text class="t2 row rowCenter verCenter" style="width: 35%;">{{ item.stock_in_status_cn }}</text>
</view>
<text class="select" @click="selecttErpOrderSn(index)">选中</text>
</view>
</scroll-view>
</view>
</view>
</uni-popup>
<!-- 理货提示 -->
<uni-popup ref="popupTallyNum" background-color="#F1F4F6">
<view class="popup-content-tally-num">
<view class="input-box row verCenter">
<text class="label">订单待收数量:</text>
<text class="tt">{{ tally_info.wait_tally_num }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">本次理货数量:</text>
<text class="tt">{{ tally_info.tally_num }}</text>
</view>
<view class="tip">若需再次提交,请确认数量</view>
<view class="input-box row verCenter" style="margin-bottom: 40rpx;">
<text style="color: red;">*</text>
<text class="label">理货数量:</text>
<input class="uni-input" type="number" inputmode="numeric" placeholder="请输入数量" placeholder-style="color:#000;font-weight: bold;" v-model="tally_info.tally_num_temp" />
</view>
<view class="btn row bothSide">
<view class="ok row rowCenter verCenter" @click="submitTallyDetailConfirm()">确认提交</view>
<view class="canel row rowCenter verCenter" @click="tallyDetailConfirmClose()">返回</view>
</view>
</view>
</uni-popup>
<!-- 多个纸箱提示 -->
<uni-popup ref="printScanList" background-color="#F1F4F6">
<view class="popup-content-tally-num">
<view class="text">{{ box_sn }}有{{ checkboxItems.length }}个子箱,选择你需要打印标签</view>
<view class="row verCenter" style="font-size: 28rpx;">
<checkbox-group @change="checkboxAllChange">
<label>
<checkbox value="cb" style="transform:scale(0.7)" color="#197adb" activeBackgroundColor="#197adb" activeBorderColor="#197adb" :checked="allChecked" />全选
</label>
</checkbox-group>
</view>
<view class="uni-list" style="padding-left: 50rpx;">
<scroll-view scroll-y="true" style="max-height:400rpx">
<checkbox-group @change="checkboxChange">
<label class="row verCenter" v-for="item in checkboxItems" :key="item.value">
<view>
<checkbox :value="item.value" :checked="item.checked" style="transform:scale(0.7)" color="#197adb" />
</view>
<view>{{ item.name }}</view>
</label>
</checkbox-group>
</scroll-view>
</view>
<view class="btn row bothSide" style="margin-top: 24rpx;">
<view class="ok row rowCenter verCenter" @click="printMultiple()">打印</view>
<view class="canel row rowCenter verCenter" @click="close()">返回</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import { API } from '@/util/api.js';
import debounce from 'lodash/debounce';
import { createArray } from '@/util/util.js';
export default {
data() {
return {
isSubmitting: false, // 防重复点击标志
email: uni.getStorageSync('email') || '', //操作人邮箱
is_focus_1: true, //获取焦点动态化
is_focus_2: false,
is_focus_3: false,
title: '',
step: 0,
keyword: '',
curr: -1, //当前打开的是哪个产地
fixBoxStyle: '',
noexebshowFalg: true, //控制是否会触发生命周期
index: uni.getStorageSync('goodIndex') || 0,
item: ['型号', 'DigiKey', 'Rochester', 'TME', 'Chip1stop'],
box_sn: '', //箱号信息
wsty_id: '', //箱子id
erp_order_sn: '', //入仓号
goods_type: '', //商品型号
tallyData: {}, //理货信息
image_list: [], //图片列表
filter_status: [], //控制状态
origin_list: [], //产地
origin: '', //搜索国家携带的参数
form: [],
tallyList: [],
isRequestSent: false,
isStopRequest: false,
gross_weight: '',
tally_info: {
tally_num_temp: ''
},
net_weight_total: 0, //净重合计
allChecked: false,
checkboxItems: [],
stayHandleCount: 0
};
},
watch: {
image_list: {
handler(arr) {
arr.forEach((subArr, index) => {
if (subArr.length > 0) {
// 将数组元素用逗号连接成字符串,并赋值给对应的 form 中的 goods_check_pic 字段
this.form[index].goods_check_pic = subArr.join(',');
} else {
this.form[index].goods_check_pic = '';
}
});
},
deep: true // 深度监听
}
},
onNavigationBarButtonTap(e) {
if (e.index == 0) {
uni.navigateTo({
url: '/pages/tally/record'
});
}
},
onShow() {
//获取异常数量
this.getStayHandleCount();
if (this.box_sn && this.erp_order_sn && this.noexebshowFalg) {
this.tallyData = [];
this.form = [];
this.getTallyData();
}
},
methods: {
/**
* 判断是否为特殊海关编码
* @param {String} taxSn 海关编码
*/
isSpecialTaxCode(taxSn) {
if (!taxSn) return false;
var specialCodes = ['854231', '854233', '854239', '854232'];
return specialCodes.some(code => taxSn.startsWith(code));
},
/**
* 点击遮罩层触发
*/
maskClick() {
this.$refs.inputDialog.close();
},
/**
* 找出false对应的下标
* @param {Object} arr
* @param {Object} target
*/
findIndex(arr, target) {
const result = [];
arr.map((item, index) => {
if (item === target) {
result.push(index);
}
});
return result;
},
bindPickerChange: function (e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
uni.setStorageSync('goodIndex', this.index);
this.clearInput(3);
},
/**
*筛选过滤出选中的元素
*/
filterChange(index) {
this.$set(this.filter_status, index, (this.filter_status[index] = !this.filter_status[index]));
let filter_arr = this.findIndex(this.filter_status, true);
let name = filter_arr.map(i => this.origin_list[i].value);
this.form[this.curr].origin = name[0];
this.$forceUpdate();
this.$refs.popup.close();
},
/**
* 选择国家确认-关闭弹窗
*/
confirmChange() {
this.$refs.popup.close();
},
/**
* @param {Object} event 输入框监听
* @param {Object} type 1箱号监听 2型号监听 3输入国家监听
*/
handleInput: debounce(function (event, type) {
var value = event.target.value;
if (type == 1) {
if (value) {
if (value.indexOf('-') !== -1) { // 判断字符串中是否存在 '-'
value = value.split('-')[0]; // 存在则截取 '-' 前的部分
}
this.getBoxSn(value);
}
} else if (type == 2) {
if (value) {
uni.hideKeyboard();
this.identifyQrCodeNumAndSn();
} else {
this.goods_type = '';
this.keyword = '';
this.getTallyData();
}
} else if (type == 3) {
this.origin_list = []; //数组清空
this.getOriginCn();
}
}, 500),
/**
* 打开弹窗
* @param {Object} index
*/
open(index) {
this.curr = index;
this.filter_status.fill(false);
this.$refs.popup.open('bottom');
},
/**
* 选择图片
*/
chooseImageChange(key) {
this.noexebshowFalg = false;
// 使用 chooseImage选择图片
// #ifdef MP-WEIXIN
uni.chooseMedia({
count: 4,
mediaType: ['image'],
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: chooseImageRes => {
console.log('选择图片成功:', chooseImageRes);
// 显示loading
uni.showLoading({
title: '上传中...'
});
// 获取选择的图片路径数组
const imagePaths = chooseImageRes.tempFiles;
// 判断选择的图片数量是否超过最大限制数量
let maxNum = Number(imagePaths.length) + Number(this.image_list[key].length); //当前上传的+已经上传的
if (maxNum > 4) {
uni.hideLoading();
uni.showToast({
title: '图片不超过4张',
icon: 'none'
});
return false;
}
// 遍历图片路径数组,对每张图片进行压缩
imagePaths.forEach((_imagePath, index) => {
// 使用compressImage 压缩图片
uni.compressImage({
src: imagePaths[index].tempFilePath,
quality: 60, //压缩质量,范围0~100,数值越小,质量越低,压缩率越高
success: compressedRes => {
console.log('压缩图片成功:', compressedRes);
// 获取压缩后的图片路径
const compressedImagePath = compressedRes.tempFilePath;
// 在这里处理压缩后的图片,上传到服务器
uni.uploadFile({
url: API.uploadImageHk + '?sys_type=4',
filePath: compressedImagePath,
name: 'file',
timeout: 10000,
header: {
'Content-Type': 'multipart/form-data'
},
success: uploadFileRes => {
console.log('服务器上传图片成功:', uploadFileRes);
uni.hideLoading();
let data = JSON.parse(uploadFileRes.data);
if (data.code === 0) {
this.image_list[key].push(data.data.oss_image_url);
this.$forceUpdate();
} else {
uni.showToast({
title: data.msg,
icon: 'none'
});
}
},
fail: () => {
uni.hideLoading();
uni.showToast({
title: '上传图片失败',
icon: 'none'
});
}
});
},
fail: err => {
console.log('压缩图片失败:', err);
}
});
});
}
});
// #endif
// #ifdef APP-PLUS
uni.chooseImage({
count: 4,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: chooseImageRes => {
console.log('选择图片成功:', chooseImageRes);
// 显示loading
uni.showLoading({
title: '上传中...'
});
// 获取选择的图片路径数组
const imagePaths = chooseImageRes.tempFilePaths;
// 判断选择的图片数量是否超过最大限制数量
let maxNum = Number(imagePaths.length) + Number(this.image_list[key].length); //当前上传的+已经上传的
if (maxNum > 4) {
uni.hideLoading();
uni.showToast({
title: '图片不超过4张',
icon: 'none'
});
return false;
}
// 遍历图片路径数组,对每张图片进行压缩
imagePaths.forEach((imagePath) => {
// 使用compressImage 压缩图片
uni.compressImage({
src: imagePath,
quality: 60, //压缩质量,范围0~100,数值越小,质量越低,压缩率越高
success: compressedRes => {
console.log('压缩图片成功:', compressedRes);
// 获取压缩后的图片路径
const compressedImagePath = compressedRes.tempFilePath;
// 在这里处理压缩后的图片,上传到服务器
uni.uploadFile({
url: API.uploadImageHk + '?sys_type=4',
filePath: compressedImagePath,
name: 'file',
timeout: 10000,
header: {
'Content-Type': 'multipart/form-data'
},
success: uploadFileRes => {
console.log('服务器上传图片成功:', uploadFileRes);
uni.hideLoading();
let data = JSON.parse(uploadFileRes.data);
if (data.code === 0) {
this.image_list[key].push(data.data.oss_image_url);
this.$forceUpdate();
} else {
uni.showToast({
title: data.msg,
icon: 'none'
});
}
},
fail: () => {
uni.hideLoading();
uni.showToast({
title: '上传图片失败',
icon: 'none'
});
}
});
},
fail: err => {
console.log('压缩图片失败:', err);
}
});
});
}
});
// #endif
},
/**
* 预览图片
* @param {Object} img
* @param {Object} index
*/
previewChange(img, index) {
this.noexebshowFalg = false;
uni.previewImage({
current: index,
urls: img
});
},
/**
* 删除图片
* @param {Object} index
*/
deletePic(index, i) {
this.image_list[index].splice(i, 1);
this.$forceUpdate();
},
/**
* 识别
*/
identifyQrCodeNumAndSn() {
if (!this.box_sn) {
uni.showModal({
title: '',
content: '请先取箱号!并将打印的箱号贴于外箱上',
showCancel: false
});
return false;
}
if (this.index == 0) {
//区分其他
this.keyword = '';
this.getTallyData();
} else {
let codeTypeByIndex = {
1: 'DigiKey',
2: 'Rochester',
3: 'TME',
4: 'Chip1stop',
5: 'Mouser'
};
let codeType = codeTypeByIndex[this.index] || '';
let device = uni.getDeviceInfo();
//匹配到内容才开始调接口
if (!this.isRequestSent) {
this.isRequestSent = true; // 设置标志,防止重复发送请求
console.log(this.keyword)
this.request(API.scanQrCode, 'POST', { data: this.keyword, type: codeType, device: device.deviceModel }, true).then(res => {
this.isRequestSent = false; // 请求完成后重置标志
if (res.err_code === 0) {
//如果后台搜索到型号则替换输入框的值
let model = res.data.model || res.data.model2;
if (model) {
this.keyword = model; //兼容TME
this.goods_type = model; //赋值检索出来的型号
}
this.getTallyData((json) => {
//解析出一个物料的情况下才执行此操作
if (json.length == 1) {
//解析处理的产地
if (res.data.origin) {
var originIndex = this.origin_list.findIndex(item => item.name.split('|').includes(res.data.origin)); //通过英文去匹配出对应的中文国家
//排除已理货的数据
if (this.form[0].tally_status != 3) {
this.$set(this.form[0], 'origin', this.origin_list[originIndex].value);
}
}
//解析处理的数量
if (res.data.qty) {
this.$set(this.form[0], 'tally_num', res.data.qty);
//排除已理货的数据
if (this.form[0].tally_status != 3) {
this.$set(this.form[0], 'tally_num', res.data.qty);
}
}
}
});
} else {
uni.showToast({
title: res.msg,
icon: 'none'
});
}
});
}
}
},
/**
* 获取箱号
* @param {Object} box_sn 传值就表示验证入仓号是否正确
*/
getBoxSn(box_sn) {
this.request(API.getBoxSn, 'POST', { box_sn: box_sn }, true).then(res => {
if (res.err_code === 0) {
this.box_sn = res.data.box_sn;
this.wsty_id = res.data.wsty_id;
//取箱号才自动打印,输入箱号不需要自动打印
if (!box_sn) {
this.print(); //取箱号成功则自动调用打印箱号
}
if (this.form.length > 0) {
// 筛选出 tally_status 等于 1 或 2 的数据
var filteredForm = this.form.filter(item => item.tally_status === 1 || item.tally_status === 2);
// 替换 wsty_id
this.form = filteredForm.map(item => {
return { ...item, wsty_id: this.wsty_id, box_sn: this.box_sn };
});
}
} else {
uni.showModal({
title: '',
content: res.err_msg,
showCancel: false,
success: (res) => {
if (res.confirm) {
this.box_sn = '';
this.wsty_id = '';
this.clearInput(1);
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
});
},
/**
* 获取产地
*/
getOrigin() {
this.request(API.getOrigin, 'GET', { origin: this.origin }, true).then(res => {
if (res.err_code === 0) {
this.origin_list = Object.values(res.data);
this.filter_status = createArray(this.origin_list.length, false);
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 获取异常待处理数
*/
getStayHandleCount() {
this.request(API.getStayHandleCount, 'GET', {}, false).then(res => {
if (res.err_code === 0) {
this.stayHandleCount = res.data || 0;
}
});
},
/**
* 获取产地升级版
*/
getOriginCn() {
this.request(API.getOriginCn, 'GET', { coo: this.origin }, true).then(res => {
if (res.err_code === 0) {
this.origin_list = res.data;
this.filter_status = createArray(this.origin_list.length, false);
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 锁定理货
*/
lockTally() {
if (!this.erp_order_sn) {
uni.showToast({
title: '请输入入仓号',
icon: 'error'
});
return false;
}
this.step = 1;
this.getTallyList();
},
/**
* 获取入仓号数量接口
*/
getTallyList() {
this.request(API.getTallyList, 'POST', { erp_order_sn: this.erp_order_sn }, true).then(res => {
if (res.err_code === 0) {
this.tallyList = res.data;
if (res.data.length > 1) {
this.$refs.popupTally.open('center');
} else {
this.getTallyData();
}
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 获取箱状态
*/
getBoxStatus() {
this.request(API.getBoxStatus, 'POST', { box_sn: this.box_sn }, true).then(res => {
if (res.err_code === 0) {
if (res.data == 1) {
uni.navigateTo({
url: '/pages/tally/closeBox?box_sn=' + this.box_sn + '&wsty_id=' + this.wsty_id
})
} else {
let text = res.data == 2 ? '已封箱' : '已装板';
uni.showModal({
title: '',
content: `只有理货中的箱号才可封箱,请重新开箱`,
showCancel: false,
success: (res) => {
if (res.confirm) {
}
}
});
}
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 选中入仓号
* @param {Object} index
*/
selecttErpOrderSn(index) {
this.$refs.popupTally.close();
this.erp_order_sn = this.tallyList[index].erp_order_sn;
this.getTallyData();
},
/**
* 获取锁定理货信息
*
*/
getTallyData(callback) {
this.request(API.getTallyData, 'POST', { erp_order_sn: this.erp_order_sn, goods_type: this.goods_type }, true).then(res => {
if (res.err_code === 0) {
this.tallyData = res.data;
if (res.data.detail.length > 0) {
this.getOriginCn(); //获取产地
// 使用 map 方法生成表单数组
this.form = res.data.detail.map((item) => ({
wait_tally_num: item.wait_tally_num, //待理货数量
tally_status: item.tally_status, //理货状态
tally_num: item.tally_num === 0 ? '' : item.tally_num, // 入库数量,0 时显示为空
origin: item.origin, // 原产地
net_weight: item.net_weight, // 净重
goods_check_pic: item.goods_check_pic, // 商检的必须上传图片
wstydl_id: item.wstydl_id, // 理货明细ID
erp_order_sn: this.erp_order_sn, // 入仓号
box_sn: item.tally_status == 3 ? item.box_sn : this.box_sn,
wsty_id: this.wsty_id, // 箱子id
is_goods_check: item.is_goods_check, //是否商检
remark: item.remark //备注
}));
this.image_list = res.data.detail.map(() => new Array()); //图片特殊处理
//还原理货的图片
res.data.detail.forEach((item, index) => {
if (item.goods_check_pic) {
this.image_list[index] = item.goods_check_pic.split(',');
}
});
typeof callback == 'function' && callback(this.form);
} else {
this.form = [];
}
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 理货数量异常提示
*/
tallyDetailConfirmClose() {
this.$refs.popupTallyNum.close();
},
/**
* 理货明细提交提醒确认
*/
submitTallyDetailConfirm() {
this.tally_info.tally_num = this.tally_info.tally_num_temp; //更新理货数量
if (!this.tally_info.tally_num) {
uni.showToast({
title: '请填写理货数量',
icon: 'none'
});
return false;
}
this.request(API.submitTallyDetail, 'POST', this.tally_info, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '提交成功',
icon: 'success',
duration: 2000
});
setTimeout(() => {
this.$refs.popupTallyNum.close();
//理货提交成功后自动清空型号查询框
this.clearInput(3);
// 用户点击确定按钮后的操作
this.getTallyData();
}, 2000);
} else if (res.err_code === 10000) {
uni.showModal({
title: '',
content: res.err_msg,
showCancel: false,
success: (res) => {
if (res.confirm) {
this.$refs.popupTallyNum.close();
//理货提交成功后自动清空型号查询框
this.clearInput(3);
// 用户点击确定按钮后的操作
this.getTallyData();
}
}
});
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 理货明细提交
*/
submitTallyDetail(index) {
if (this.isSubmitting) return; // 如果正在提交,则直接返回
this.isSubmitting = true; // 设置为提交中
var tally_num = parseInt(this.form[index].tally_num);
var netWeight = parseFloat(this.form[index].net_weight);
if (!tally_num) {
uni.showToast({
title: '请填写入库数量',
icon: 'error'
});
this.isSubmitting = false; // 解锁
return false;
}
if (!this.form[index].origin) {
uni.showToast({
title: '请填写原产地',
icon: 'error'
});
this.isSubmitting = false; // 解锁
return false;
}
if (!netWeight) {
uni.showToast({
title: '请填写净重',
icon: 'error'
});
this.isSubmitting = false; // 解锁
return false;
}
if (this.form[index].is_goods_check) {
if (!this.form[index].goods_check_pic) {
uni.showToast({
title: '该物料为商检,必须要上传图片',
icon: 'none'
});
this.isSubmitting = false; // 解锁
return false;
}
}
if (this.form[index].wait_tally_num != this.form[index].tally_num) {
//当本次理货数量≠待收数量时,则弹出警示弹窗,需用户再次输入理货数量并再次点击【确认提交】时,才执行理货提交
this.tally_info = this.form[index]
this.tally_info.tally_num_temp = '';
this.$refs.popupTallyNum.open('center');
this.isSubmitting = false; // 解锁
return false;
}
this.request(API.submitTallyDetail, 'POST', this.form[index], true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '提交成功',
icon: 'success',
duration: 2000
});
setTimeout(() => {
//理货提交成功后自动清空型号查询框
this.getTallyData();
this.clearInput(3);
this.isSubmitting = false; // 解锁按钮
}, 2000);
} else if (res.err_code === 10000) {
uni.showModal({
title: '',
content: res.err_msg,
showCancel: false,
success: (res) => {
if (res.confirm) {
// 用户点击确定按钮后的操作
this.getTallyData();
this.clearInput(3);
this.isSubmitting = false; // 解锁按钮
}
}
});
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
this.isSubmitting = false; // 解锁按钮
}
});
},
/**
* 理货明细撤销(取消理货)
*/
cancelTallyDetail(index) {
//根据理货明细获取箱数
this.request(API.getBoxNumByDetailId, 'POST', { wstydl_id: this.form[index].wstydl_id }, true).then(json => {
if (json.err_code === 0) {
if (json.data > 1) {
let text = `${this.erp_order_sn}货物分部在${this.box_sn}${json.data}个子箱,请确认是否全部取消`;
uni.showModal({
title: '提示',
content: text,
success: (res) => {
if (res.confirm) {
this.request(API.cancelTallyDetail, 'POST', { wstydl_id: this.form[index].wstydl_id, wsty_id: this.form[index].wsty_id }, true).then(res => {
if (res.err_code === 0) {
this.getTallyData();
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
} else {
uni.showModal({
title: '提示',
content: '确定取消该商品理货吗?',
success: (res) => {
if (res.confirm) {
this.request(API.cancelTallyDetail, 'POST', { wstydl_id: this.form[index].wstydl_id, wsty_id: this.form[index].wsty_id }, true).then(res => {
if (res.err_code === 0) {
this.getTallyData();
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
} else {
uni.showToast({
title: json.err_msg,
icon: 'none'
});
}
});
},
/**
* 取消释放
*/
cancelRelease() {
uni.showModal({
title: '提示',
content: '确定取消释放该入仓号吗?',
success: (res) => {
if (res.confirm) {
this.request(API.cancelRelease, 'POST', { wsty_id: this.wsty_id, erp_order_sn: this.erp_order_sn }, true).then(res => {
if (res.err_code === 0) {
this.erp_order_sn = '';
this.goods_type = '';
this.keyword = '';
this.tallyData = [];
this.form = [];
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
/**
* 关单封箱
*/
closeBox() {
this.net_weight_total = this.form.reduce((total, item) => {
// 如果 tally_status 等于 3 并且 box_sn 等于 box_sn 变量,则累加 net_weight 到总和中
if (item.tally_status === 3 && item.box_sn === this.box_sn) {
total += parseFloat(item.net_weight);
}
return total;
}, 0).toFixed(2); // 保留两位小数s;
this.title = `入仓号${this.erp_order_sn}已经全部验货完毕是否更换新的箱子?\n\n 箱子:${this.box_sn} 总净重:${this.net_weight_total}`;
this.$refs.inputDialog.open();
},
/**
* 新箱子
*/
dialogInputConfirm(val) {
if (!val) {
uni.showToast({
title: '请输入毛重',
icon: 'error'
});
return false;
}
// 判断 val 是否为数字
if (isNaN(val)) {
uni.showToast({
title: '请输入合法数字',
icon: 'error'
});
return false;
}
if (Number(val) < Number(this.net_weight_total)) {
uni.showToast({
title: '毛重不能小于总净重',
icon: 'none'
});
return false;
}
this.request(API.closeBox, 'POST', { wsty_id: this.wsty_id, gross_weight: val, box_sn: this.box_sn }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '操作成功',
icon: 'success',
duration: 2000
});
setTimeout(() => {
this.box_sn = '';
this.wsty_id = '';
this.$refs.inputDialog.close();
this.clearInput(1);
}, 2000);
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 不需要换箱
*/
dialogInputClose() {
this.$refs.inputDialog.close();
},
/**
* 打印箱号
*/
print() {
if (!this.box_sn) {
uni.showModal({
title: '',
content: '请先扫描箱号',
showCancel: false
});
return false;
}
this.request(API.getPrintScanList, 'POST', { box_sn: this.box_sn }, true).then(res => {
if (res.err_code === 0) {
//一个标签的时候直接打印
if (res.data.length == 0) {
uni.showToast({
title: '数据异常',
icon: 'none'
});
} else if (res.data.length == 1) {
this.printConfirm(res.data);
} else {
//多个时候
this.allChecked = false;
this.checkboxItems = [];
res.data.forEach(item => {
this.checkboxItems.push({
value: item,
name: item,
checked: false
});
});
this.$refs.printScanList.open();
}
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 处理打印标签,单个和多个
*/
printConfirm(data) {
var box_sn = [];
if (data.length > 0) {
data.forEach(item => {
box_sn.push({ box_sn: item });
});
}
var params = {
type: 1,
email: this.email,
print_json: JSON.stringify(box_sn)
}
this.request(API.addSCTallyData, 'POST', params, true).then(res => {
if (res.code === 0) {
uni.showToast({
title: '打印箱号成功',
icon: 'success'
})
setTimeout(() => {
this.updateTagPrintTimes(data.join(','));
this.close();
}, 2000)
} else {
uni.showToast({
title: res.msg,
icon: 'none'
});
}
});
},
/**
* 更新统计打印标签次数
*/
updateTagPrintTimes(tag_no) {
this.request(API.updateTagPrintTimes, 'POST', { tag_no: tag_no }, true).then(res => {
});
},
/**
* 全选复选框状态变化
* @param {Object} e
*/
checkboxAllChange(e) {
this.allChecked = e.detail.value.length > 0; // 如果全选框被选中,设置为true
this.checkboxItems.forEach(item => {
item.checked = this.allChecked;
});
},
/**
* 单个复选框状态变化
* @param {Object} e
*/
checkboxChange(e) {
const values = e.detail.value;
this.checkboxItems.forEach(item => {
item.checked = values.includes(item.value);
});
// 更新全选复选框的状态
this.allChecked = this.checkboxItems.every(item => item.checked);
console.log(values);
},
/**
* 多个打印确认
*/
printMultiple() {
var checkedItems = this.checkboxItems.filter(item => item.checked);
if (checkedItems.length == 0) {
uni.showToast({
title: '请勾选要打印的箱号',
icon: 'none'
})
return false;
}
var box_sn = checkedItems.map(item => item.value);
this.printConfirm(box_sn);
},
/**
* 关闭打印多个提示
*/
close() {
this.$refs.printScanList.close();
},
/**
* 清空数据
*/
clearInput(type) {
if (type == 1) {
this.box_sn = '';
this.is_focus_1 = false;
setTimeout(() => {
this.is_focus_1 = true;
}, 200);
} else if (type == 2) {
this.erp_order_sn = '';
this.is_focus_2 = false;
setTimeout(() => {
this.is_focus_2 = true;
}, 200);
//X掉入仓号时,自动清空型号查询框
this.goods_type = '';
this.keyword = '';
this.getTallyData();
} else if (type == 3) {
this.goods_type = '';
this.keyword = '';
this.is_focus_3 = false;
this.getTallyData();
setTimeout(() => {
this.is_focus_3 = true;
}, 200);
}
},
/**
* 查看备注
*/
viewChange(val) {
uni.showModal({
title: '',
content: val,
showCancel: false,
confirmText: '关闭'
});
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
}
}
};
</script>
<style scoped lang="scss">
@import '@/assets/css/tally/index.scss';
::v-deep {
.uni-dialog-input {
font-size: 24rpx !important;
}
.uni-dialog-title-text {
padding: 10px;
text-align: center;
color: #404547;
font-size: 26rpx !important;
font-weight: bold !important;
}
}
</style>
\ No newline at end of file
<template>
<view class="page-add-exception">
<view class="scanBarcode row rowCenter verCenter" @click="scanChange()">
<text class="iconfont icon-juxing6"></text>
<text class="tt">扫描理货单二维码</text>
</view>
<view class="section">
<view class="warehouse">
<text class="t1">入仓号</text>
<view class="input-wrap row verCenter bothSide">
<view class="row verCenter">
<text class="arrow"></text>
<input type="text" @input="handleInput($event)" v-model="formParams.erp_order_sn" class="uni-input" placeholder="请输入" placeholder-style="color:#404547;font-weight:bold;" />
</view>
</view>
</view>
<navigator class="box row bothSide verCenter" :url="'/pages/tallyGoods/exceptionSelect?erp_order_sn='+formParams.erp_order_sn" hover-class="none">
<text class="label">异常类型(必填)</text>
<view class="input-wrap-width row bothSide verCenter">
<text class="text">{{exceptionType ? exceptionType:'请选择'}}</text>
<text class="iconfont icon-sanjiaoxing2"></text>
</view>
</navigator>
<view class="box row bothSide verCenter">
<text class="label">异常型号</text>
<view class="input-wrap-width row verCenter" style="text-align: right;">
<input type="text" class="uni-input-box" placeholder="不可编辑" placeholder-style="color:#919399" style="color: #6e767a;" disabled="" v-model="formParams.goods_type" />
</view>
</view>
<view class="box row bothSide verCenter" url="/pages/tallyGoods/exceptionSelect" hover-class="none">
<text class="label">下单数据</text>
<view class="input-wrap-width row verCenter" style="text-align: right;">
<input type="text" class="uni-input-box" placeholder="不可编辑" placeholder-style="color:#919399" style="color: #6e767a;" disabled="" v-model="formParams.order_data" />
</view>
</view>
<view class="box row bothSide verCenter" url="/pages/tallyGoods/exceptionSelect" hover-class="none">
<text class="label">仓库实到数据</text>
<view class="input-wrap-width row verCenter" style="text-align: right;">
<input type="text" class="uni-input-box" placeholder="请输入" placeholder-style="color:#919399" v-model="formParams.val" />
</view>
</view>
<view class="upload-box">
<view class="title row bothSide verCenter">
<view class="tt-l row verCenter">
<text style="color: red;">*</text>
<text>异常图片上传(必填)</text>
</view>
<text class="tt-r">{{image_list.length}}/5</text>
</view>
<view class="upload-list row verCenter">
<template v-if="image_list.length > 0">
<view class="pic-box" v-for="(v, index) in image_list" :key="index">
<image :src="v" mode="aspectFill" lazy-load="true" @click="previewChange(image_list, index)"></image>
<view class="delete row rowCenter verCenter" @click="deletePic(index)"><text class="iconfont icon-shanchu"></text></view>
</view>
</template>
<view class="default row rowCenter verCenter" @click="chooseImageChange()" v-if="image_list.length < maxNum"><text class="iconfont icon-xingzhuangjiehe"></text></view>
</view>
</view>
</view>
<view class="btn row rowCenter verCenter" @click="submit()">确认提交</view>
</view>
</view>
</template>
<script>
import { API } from '@/util/api.js';
import debounce from 'lodash/debounce';
export default {
data() {
return {
noexebshowFalg: true, //控制是否会触发生命周期
maxNum: 5, //最大上传图片数量
image_list: [], //图片列表
order_data: '', //下单数据
exceptionType: '', //异常类型
formParams: {
erp_order_sn: '', //入仓号
ask_customer_exception_id: '', //问客异常ID
order_goods_id: '', //订单商品ID
val: '', //仓库实到数据
goods_type: '', //异常型号
order_data: '', //下单数据
upload_img: '', //上传图片逗号分割
}
};
},
watch: {
image_list(arr) {
if (arr.length > 0) {
this.formParams.upload_img = arr.join(',');
} else {
this.formParams.upload_img = '';
}
}
},
onLoad() {
uni.removeStorageSync('updateExceptionData'); //先删除存储的选择异常类型
},
onShow() {
//更新选择的异常类型和异常型号
uni.$on('updateExceptionData', data => {
if (data) {
console.log('携带过来的数据:' + JSON.stringify(data));
this.exceptionType = data.allExceptionV2[data.allExceptionV2Index].name; //异常类型
this.formParams.ask_customer_exception_id = data.allExceptionV2[data.allExceptionV2Index].value; //问客异常ID
this.formParams.order_goods_id = data.exceptionData.order_goods_id; //订单商品ID
this.formParams.goods_type = data.exceptionData.goods_type; //异常型号
this.formParams.order_data = data.exceptionData.order_data; //下单数据
this.formParams.val = data.exceptionData.order_data; //默认下单数据和仓库实到数据是一致
uni.removeStorageSync('updateExceptionData');
uni.setStorageSync('updateExceptionData', data); //存储的选择异常类型
}
});
},
methods: {
/**
* 单号搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
this.resetChange();
var val = event.target.value;
this.formParams.erp_order_sn = val;
}, 800),
/**
* 扫描二维码
*/
scanChange() {
uni.scanCode({
success: res => {
console.log(res);
if (res.errMsg == 'scanCode:ok') {
this.formParams.erp_order_sn = res.result;
}
},
fail: function(res) {
console.log(res);
uni.showToast({
title: '扫码失败,请重试',
icon: 'none'
});
}
});
},
/**
* 预览图片
* @param {Object} img
* @param {Object} index
*/
previewChange(img, index) {
this.noexebshowFalg = false; //不允许再次触发onshow这个生命周期
uni.previewImage({
current: index,
urls: img
});
},
/**
* 删除图片
* @param {Object} index
*/
deletePic(index) {
this.image_list.splice(index, 1);
},
/**
* 选择图片
*/
chooseImageChange() {
this.noexebshowFalg = false;
// 使用 chooseImage选择图片
uni.chooseMedia({
count: this.maxNum,
mediaType: ['image'],
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: chooseImageRes => {
console.log('选择图片成功:', chooseImageRes);
// 显示loading
uni.showLoading({
title: '上传中...'
});
// 获取选择的图片路径数组
const imagePaths = chooseImageRes.tempFiles;
// 判断选择的图片数量是否超过最大限制数量
let maxNum = Number(imagePaths.length) + Number(this.image_list.length); //当前上传的+已经上传的
if (maxNum > this.maxNum) {
uni.hideLoading();
uni.showToast({
title: '图片不超过' + this.maxNum + '张',
icon: 'none'
});
return false;
}
// 遍历图片路径数组,对每张图片进行压缩
imagePaths.forEach(imagePath => {
// 使用compressImage 压缩图片
uni.compressImage({
src: imagePath.tempFilePath,
quality: 50, //压缩质量,范围0~100,数值越小,质量越低,压缩率越高
success: compressedRes => {
console.log('压缩图片成功:', compressedRes);
// 获取压缩后的图片路径
const compressedImagePath = compressedRes.tempFilePath;
// 在这里处理压缩后的图片,上传到服务器
uni.uploadFile({
url: API.uploadImage + '?sys_type=4',
filePath: compressedImagePath,
name: 'file',
header: {
'Content-Type': 'multipart/form-data'
},
success: uploadFileRes => {
console.log('服务器上传图片成功:', uploadFileRes);
uni.hideLoading();
let data = JSON.parse(uploadFileRes.data);
if (data.code === 0) {
this.image_list.push(data.data.oss_image_url);
} else {
uni.showToast({
title: data.msg,
icon: 'none'
});
}
},
fail: error => {
console.log('上传图片失败:', error);
uni.hideLoading();
}
});
},
fail: err => {
console.log('压缩图片失败:', err);
}
});
});
}
});
},
/**
* 重置
*/
resetChange() {
},
/**
* 获取入仓号对应的型号列表
*/
getErpOrderSnOrderGoodsSn() {
this.request(API.getErpOrderSnOrderGoodsSn, 'GET', { erp_order_sn: this.formParams.erp_order_sn }, true).then(res => {
if (res.err_code === 0) {
} else {
uni.showToast({
title: res.msg,
icon: 'none'
});
}
});
},
/**
* @param {Object}
* 提交
*/
submit() {
if (!this.formParams.erp_order_sn) {
uni.showModal({
title: '提示',
content: '请先填写入仓号',
showCancel: false
});
return false;
}
if (!this.formParams.goods_type) {
uni.showModal({
title: '提示',
content: '请选择异常类型',
showCancel: false
});
return false;
}
if (this.formParams.order_data != this.formParams.val) {
uni.showModal({
title: '提示',
content: '实到数据和下单数据不一致无法提交',
showCancel: false
});
return false;
}
if (this.image_list.length == 0) {
uni.showModal({
title: '提示',
content: '异常图片至少上传一张',
showCancel: false
});
return false;
}
this.request(API.addAskCustomerV2, 'POST', this.formParams, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '新增成功',
icon: 'success'
});
setTimeout(() => {
uni.switchTab({
url: '/pages/tallyGoods/exception'
})
}, 2000)
} else {
uni.showModal({
title: '提示',
content: res.err_msg,
showCancel: false,
success: res => {
if (res.confirm) {
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
});
}
}
};
</script>
<style scoped lang="scss">
@import '../../assets/css/tallyGoods/addException.scss';
</style>
\ No newline at end of file
// 环境配置:'production' 正式环境 | 'development' 测试环境
var ENV = 'development';
var ENV = 'production';
// 环境配置映射
var ENV_CONFIG = {
......
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 sign in to comment