Commit 05df8c37 by liangjianmin

记住,这次代码恢复的节点

parent 6cf29344
.page-box {
padding: 15rpx 22rpx;
.time-interval {
margin-bottom: 15rpx;
.time-interval-box {
width: 48%;
height: 60rpx;
background: #ffffff;
border-radius: 10rpx;
padding-left: 17rpx;
padding-right: 10rpx;
box-sizing: border-box;
.iconfont {
font-size: 30rpx;
color: #919399;
}
.uni-input {
margin-left: 13rpx;
font-size: 24rpx;
}
}
}
.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;
}
}
}
.radio-box {
height: 80rpx;
.radio {
white-space: nowrap;
font-size: 24rpx;
}
}
.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: 18rpx;
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;
}
}
}
}
.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 {
width: 100%;
justify-content: flex-end;
.btn1 {
width: 137rpx;
height: 70rpx;
background: #fff;
border-radius: 4rpx;
font-size: 24rpx;
color: #999;
border: 1px solid #999;
}
.btn2 {
width: 137rpx;
height: 70rpx;
background: #1969f9;
border-radius: 8rpx;
font-size: 25rpx;
color: #ffffff;
margin-left: 14rpx;
}
}
.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-popup__wrapper {
width: 95% !important;
}
.popup-content {
background-color: #f1f4f6;
padding: 50rpx 0 0 0;
border-radius: 10rpx;
.section {
padding: 0 24rpx;
min-height: 120rpx;
padding-bottom: 80rpx;
.input-box {
margin-bottom: 30rpx;
.label {
font-size: 26rpx;
color: #6e767a;
white-space: nowrap;
}
.tt {
font-weight: bold;
font-size: 28rpx;
color: #404547;
}
.uni-input {
width: 310rpx;
height: 80rpx;
background: #e6edf0;
border-radius: 4rpx;
padding-left: 20rpx;
font-size: 26rpx;
color: #404547;
font-weight: bold;
}
.search-btn {
width: 170rpx;
height: 80rpx;
background: #197adb;
font-size: 26rpx;
color: #ffffff;
margin: 0;
}
}
.uni-table {
display: flex;
flex-direction: column;
width: 100%;
border: 1px solid #ccc;
.iconfont {
transition: all 0.4s ease;
font-size: 32rpx;
}
.uni-tr {
display: flex;
width: 100%;
&.curr {
background-color: #dbfbf0;
.iconfont {
font-size: 35rpx;
color: #197adb;
}
}
& + .uni-tr {
border-top: 1px solid #ccc;
}
}
.uni-th,
.uni-td {
flex: 1;
padding: 8rpx 12rpx;
border-right: 1px solid #ccc;
text-align: left;
overflow: hidden;
text-overflow: ellipsis;
font-size: 28rpx;
&:last-child {
border-right: none;
}
}
.uni-th {
font-weight: bold;
background-color: #f1f1f1;
color: #333;
}
.uni-td {
color: #666;
}
.uni-th:first-child,
.uni-td:first-child {
width: 100rpx;
flex: 0 0 100rpx;
text-align: center;
}
.uni-td:nth-child(2),
.uni-th:nth-child(2),
.uni-td:nth-child(3),
.uni-th:nth-child(3) {
white-space: normal;
word-break: break-word;
}
}
}
.btn {
width: 100%;
.ok {
width: 50%;
height: 60rpx;
background: #197adb;
font-size: 26rpx;
color: #ffffff;
}
.canel {
width: 50%;
height: 60rpx;
background: #ffffff;
border-top: 1px solid #999;
font-size: 24rpx;
color: #999;
}
}
}
.abnormalTally {
height: 100vh;
padding: 24rpx 24rpx 0 24rpx;
overflow: hidden;
.head-text {
height: 80rpx;
.t1 {
font-size: 24rpx;
color: #6e767a;
}
.t2 {
font-size: 24rpx;
color: #197adb;
}
}
.input-box {
height: 88rpx;
background: #ffffff;
border-radius: 4rpx;
padding: 0 24rpx;
.uni-input {
font-weight: bold;
font-size: 28rpx;
color: #404547;
}
.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;
}
}
.tab {
height: 90rpx;
.box {
position: relative;
font-size: 26rpx;
color: #404547;
transition: all 0.4s ease;
margin-right: 44rpx;
&:last-child {
margin-right: 0;
}
&.curr {
color: #1e2021;
font-weight: bold;
&:before {
position: absolute;
bottom: -13rpx;
left: 0;
right: 0;
width: 100%;
height: 6rpx;
background: #197adb;
border-radius: 3rpx;
content: '';
}
}
}
}
.list {
height: calc(100% - 346rpx);
.scroll-Y {
height: 100%;
.num {
position: absolute;
left: 24rpx;
top: 30rpx;
width: 40rpx;
height: 28rpx;
border-radius: 4rpx;
border: 1px solid #197adb;
font-size: 22rpx;
color: #197adb;
}
.box {
position: relative;
padding: 24rpx 24rpx 24rpx 72rpx;
background: #ffffff;
border-radius: 4rpx;
margin-bottom: 16rpx;
.mb16 {
margin-bottom: 16rpx;
}
.t1 {
font-size: 26rpx;
color: #404547;
font-weight: bold;
}
.t2 {
font-size: 26rpx;
color: #6e767a;
white-space: nowrap;
}
.t3 {
font-size: 26rpx;
color: #404547;
white-space: nowrap;
}
.t4 {
font-size: 26rpx;
color: #f39d18;
}
.icon-jinggao31 {
font-size: 28rpx;
color: #f39d18;
margin-left: 10rpx;
}
}
.btn-wrap {
justify-content: flex-end;
border-top: 1px solid #e6edf0;
margin-top: 23rpx;
.btn {
margin-top: 23rpx;
width: 144rpx;
height: 48rpx;
background: #197adb;
border-radius: 4rpx;
font-size: 24rpx;
color: #ffffff;
}
}
}
&.pb100 {
padding-bottom: 100rpx;
}
}
.fix-btn {
position: fixed;
bottom: 20rpx;
left: 0;
right: 0;
margin: 0 24rpx;
height: 88rpx;
background: #197adb;
border-radius: 4rpx;
font-size: 28rpx;
color: #ffffff;
}
.filter-tab {
height: 60rpx;
.t1 {
font-size: 26rpx;
color: #404547;
}
.t2 {
font-size: 26rpx;
color: #404547;
}
.time {
.picker-data {
width: 140rpx;
}
.picker-time {
width: 70rpx;
text-align: right;
}
.text {
font-size: 26rpx;
color: #197adb;
white-space: nowrap;
}
}
}
}
.page-box {
padding-bottom: 20rpx;
.base-information {
padding: 0 24rpx;
background: #ffffff;
border-radius: 4rpx;
margin-bottom: 16rpx;
.top {
padding: 23rpx 0;
border-bottom: 1px solid #e6edf0;
.title {
.arrow {
width: 12rpx;
height: 12rpx;
background: #197adb;
margin-right: 16rpx;
border-radius: 50%;
}
.tt {
font-size: 32rpx;
color: #1e2021;
font-weight: bold;
}
}
.toggle {
.iconfont {
font-size: 15rpx;
color: #9ca8ad;
transform: rotate(180deg);
}
.tt {
margin-left: 11rpx;
font-size: 24rpx;
color: #404547;
}
.rotate {
transform: rotate(0deg);
}
}
}
.text-box {
padding: 24rpx 0;
flex-wrap: wrap;
.input-box {
margin-bottom: 18rpx;
flex: 0 0 50%;
.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;
}
}
}
.pp {
height: 80rpx;
.t1 {
width: 156rpx;
font-size: 24rpx;
color: #6e767a;
}
.input-wrap {
.uni-input {
font-size: 24rpx;
}
}
}
.scan-view {
.iconfont {
font-size: 48rpx;
color: #197adb;
}
}
}
.abnormal-information {
padding: 24rpx;
background: #ffffff;
border-radius: 4rpx;
margin-bottom: 48rpx;
.top {
margin-bottom: 24rpx;
.title {
.arrow {
width: 12rpx;
height: 12rpx;
background: #197adb;
margin-right: 16rpx;
border-radius: 50%;
}
.tt {
font-size: 32rpx;
color: #1e2021;
font-weight: bold;
}
}
}
.box {
height: 80rpx;
border-bottom: 1px solid #e6edf0;
.label {
position: relative;
width: 213rpx;
font-size: 28rpx;
color: #6e767a;
&.required:after {
position: absolute;
left: -10rpx;
top: -4rpx;
content: '*';
color: red;
display: block;
}
}
.input-wrap {
width: calc(100% - 213rpx);
.tab-panel {
&:last-child {
margin-right: 0;
}
}
}
.tab {
.tab-panel {
width: 120rpx;
height: 48rpx;
background: #9ca8ad;
border-radius: 4rpx;
font-size: 24rpx;
color: #ffffff;
margin-right: 24rpx;
&.curr {
background: #197adb;
}
}
}
.uni-list-cell-db {
width: calc(100% - 213rpx);
position: relative;
.icon-sanjiaoxing1 {
position: absolute;
right: 0;
top: 15rpx;
font-size: 17rpx;
color: #9ca8ad;
}
}
.uni-input {
font-size: 24rpx;
color: #404547;
font-weight: bold;
}
.uni-input-box {
width: calc(100% - 213rpx);
.uni-input {
font-size: 24rpx;
color: #404547;
font-weight: bold;
}
.scan-view {
.iconfont {
font-size: 48rpx;
color: #197adb;
margin-right: 10rpx;
}
.tt {
font-size: 24rpx;
color: #197adb;
}
}
}
}
.upload-box {
position: relative;
z-index: 1;
padding-top: 23rpx;
padding-bottom: 24rpx;
.title {
margin-bottom: 24rpx;
.tt-l {
font-size: 28rpx;
color: #6e767a;
}
.tt-r {
font-size: 28rpx;
color: #404547;
}
}
.upload-list {
padding-bottom: 28rpx;
border-bottom: 1px solid #e6edf0;
.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 25%;
margin-right: 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;
}
}
}
}
.textarea-box {
position: relative;
padding-top: 23rpx;
textarea {
height: 80rpx;
font-size: 28rpx;
color: #6e767a;
border-bottom: 1px solid #e6edf0;
}
.quickExpressions {
margin-top: 12rpx;
flex-wrap: wrap;
.lable-box {
color: #197adb;
font-size: 26rpx;
margin-right: 30rpx;
margin-bottom: 10rpx;
}
}
}
}
}
.btn {
position: fixed;
bottom: 10rpx;
z-index: 2;
left: 0;
right: 0;
height: 88rpx;
background: #197adb;
border-radius: 4rpx;
font-size: 28rpx;
color: #ffffff;
margin: 0 24rpx;
}
}
.page-box {
padding: 15rpx 22rpx;
.info-box {
padding: 10rpx 17px 20rpx 17px;
background: #ffffff;
box-shadow: 0px 3rpx 3rpx 0px rgba(198, 199, 204, 0.3);
border-radius: 10rpx;
margin-bottom: 15rpx;
.box_sn {
font-size: 28rpx;
color: #484b59;
font-weight: bold;
margin-bottom: 10rpx;
}
.item {
flex-wrap: wrap;
.item-box {
width: 33.3%;
margin-bottom: 10rpx;
.t1 {
font-size: 26rpx;
color: #6e767a;
}
.t2 {
font-size: 26rpx;
color: #197adb;
font-weight: bold;
}
}
}
.input-box {
.tt {
font-size: 28rpx;
color: #919399;
}
.status-color {
font-size: 26rpx;
color: #197adb;
font-weight: bold;
}
.uni-input {
width: 216rpx;
height: 55rpx;
background: #ffffff;
border-radius: 10rpx;
border: 1px solid #919399;
font-size: 28rpx;
padding-left: 18rpx;
margin: 0 6rpx;
}
.btn {
width: 122rpx;
height: 51rpx;
background: #197adb;
font-size: 28rpx;
color: #ffffff;
border-radius: 10rpx;
}
}
}
.list {
margin-top: 15rpx;
padding-bottom: 100rpx;
.box {
position: relative;
padding: 17px 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;
.num {
position: absolute;
left: 17rpx;
top: 0rpx;
font-size: 28rpx;
color: #484b59;
}
.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: 75rpx;
height: 30rpx;
background: #fff;
border-radius: 8rpx;
font-size: 15rpx;
color: #f00;
border: 1px solid #f00;
margin-right: 10rpx;
}
.btn2 {
width: 68rpx;
height: 30rpx;
background: #1969f9;
border-radius: 8rpx;
font-size: 15rpx;
color: #ffffff;
}
}
.status-box {
position: absolute;
right: 10rpx;
top: 5rpx;
.staus_type_val {
font-size: 17rpx;
color: #1969f9;
border: 1px solid #f0f0f2;
width: 45rpx;
height: 45rpx;
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;
}
}
.closeBoxBtn {
position: fixed;
bottom: 20rpx;
left: 0;
right: 0;
margin: 0 24rpx;
height: 88rpx;
background: #197adb;
font-size: 28rpx;
color: #ffffff;
border-radius: 10rpx;
}
}
.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;
}
.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;
}
}
}
.tally-fixBox {
height: 100vh;
padding: 0 24rpx;
overflow: hidden;
.text {
height: 80rpx;
.t1 {
font-size: 24rpx;
color: #6e767a;
}
.t2 {
font-size: 24rpx;
color: #197adb;
}
}
.input-box {
margin-top: 24rpx;
height: 88rpx;
background: #ffffff;
border-radius: 4rpx;
padding: 0 24rpx;
.uni-input {
font-weight: bold;
font-size: 28rpx;
color: #404547;
}
.btn {
width: 144rpx;
height: 48rpx;
background: #197adb;
border-radius: 4rpx;
font-size: 24rpx;
color: #ffffff;
}
.icon-jinggao2 {
position: relative;
font-size: 30rpx;
color: #c6c7cc;
margin-right: 30rpx;
z-index: 22;
}
}
.list {
height: calc(100% - 350rpx);
margin-top: 24rpx;
padding: 24rpx 24rpx 0 24rpx;
background-color: #ffffff;
.title {
font-size: 22rpx;
color: #6e767a;
}
.scroll-Y {
height: 100%;
}
.box {
height: 84rpx;
border-bottom: 1px solid #e6edf0;
&:last-child {
border-bottom: none;
}
.t1 {
font-size: 26rpx;
color: #6e767a;
}
.t2 {
font-size: 26rpx;
color: #1e2021;
margin-left: 22rpx;
}
.tt {
font-size: 26rpx;
color: #197adb;
}
}
}
.fix-btn {
position: fixed;
bottom: 20rpx;
left: 0;
right: 0;
margin: 0 24rpx;
height: 88rpx;
background: #197adb;
border-radius: 4rpx;
font-size: 28rpx;
color: #ffffff;
}
}
.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 {
font-size: 28rpx;
color: #919399;
text-align: right;
text {
padding: 0 5rpx;
color: #1969f9;
}
}
.show-text {
.label {
font-size: 28rpx;
color: #919399;
text-align: right;
}
.text {
font-size: 28rpx;
color: #484b59;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
}
.list {
margin-top: 15rpx;
padding-bottom: 100rpx;
.box {
position: relative;
padding: 17px 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;
.num {
position: absolute;
left: 17rpx;
top: 0rpx;
font-size: 28rpx;
color: #484b59;
}
.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: 75rpx;
height: 30rpx;
background: #fff;
border-radius: 8rpx;
font-size: 15rpx;
color: #f00;
border: 1px solid #f00;
margin-right: 10rpx;
}
.btn2 {
width: 68rpx;
height: 30rpx;
background: #1969f9;
border-radius: 8rpx;
font-size: 15rpx;
color: #ffffff;
}
}
.status-box {
position: absolute;
right: 10rpx;
top: 5rpx;
.staus_type_val {
font-size: 17rpx;
color: #1969f9;
border: 1px solid #f0f0f2;
width: 45rpx;
height: 45rpx;
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;
}
.page-box {
padding: 15rpx 22rpx;
.time-interval {
margin-bottom: 15rpx;
.time-interval-box {
width: 48%;
height: 60rpx;
background: #ffffff;
border-radius: 10rpx;
padding-left: 17rpx;
padding-right: 10rpx;
box-sizing: border-box;
.iconfont {
font-size: 30rpx;
color: #919399;
}
.uni-input {
margin-left: 13rpx;
font-size: 24rpx;
}
}
}
.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 {
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;
left: 15rpx;
top: 32rpx;
width: 40rpx;
height: 40rpx;
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: 18rpx;
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;
}
}
}
}
.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: 144rpx;
height: 48rpx;
background: #fff;
border-radius: 4rpx;
font-size: 24rpx;
color: #999;
border: 1px solid #999;
}
.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;
.btn {
width: 100%;
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;
}
.page-box {
padding: 15rpx 22rpx;
.content {
margin-top: 24rpx;
.search {
height: 80rpx;
background: #ffffff;
border-radius: 4rpx;
padding: 0 24rpx;
.uni-input {
width: 100%;
font-weight: 600;
font-size: 28rpx;
color: #404547;
box-sizing: border-box;
}
.icon-a-juxing111 {
font-size: 30rpx;
color: #c6c7cc;
}
}
.filter-box {
padding: 20rpx 0;
.radio-item {
margin-right: 20px;
font-size: 24rpx;
}
.count {
margin-left: auto;
font-size: 24rpx;
color: #666;
text {
margin: 0 2rpx;
color: #197adb;
}
}
}
.list {
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;
.input-box {
margin-bottom: 18rpx;
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;
}
}
}
}
.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 {
width: 100%;
justify-content: flex-end;
.btn1 {
width: 137rpx;
height: 70rpx;
background: #1969f9;
border-radius: 8rpx;
font-size: 25rpx;
color: #ffffff;
margin-left: 14rpx;
}
}
.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;
}
}
}
}
}
}
.no-date {
padding: 30rpx 0;
.iconfont {
font-size: 180rpx;
color: #c6c7cc;
margin-bottom: 30rpx;
}
.text {
font-size: 20rpx;
color: #484b59;
}
}
.unboxing {
height: 100vh;
padding: 0 24rpx;
overflow: hidden;
.input-box {
margin-top: 24rpx;
margin-bottom: 24rpx;
height: 88rpx;
background: #ffffff;
border-radius: 4rpx;
padding: 0 24rpx;
.uni-input {
font-weight: bold;
font-size: 28rpx;
color: #404547;
}
.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 {
font-size: 30rpx;
color: #c6c7cc;
margin-right: 30rpx;
}
}
.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 {
font-size: 30rpx;
color: #c6c7cc;
margin-right: 30rpx;
}
}
.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;
}
}
}
}
.list {
padding-bottom: 30rpx;
height: calc(100% - 240rpx);
.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;
}
.t4 {
font-size: 26rpx;
color: #404547;
}
.t5 {
font-size: 24rpx;
color: #197adb;
margin-left: 16rpx;
}
.input-text {
position: relative;
z-index: 2;
.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;
}
}
}
}
.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;
}
}
......@@ -170,73 +170,6 @@
"navigationBarTitleText": "手动合箱"
}
}, {
"path": "pages/tally/fixBox",
"style": {
"navigationBarTitleText": "合箱"
}
}, {
"path": "pages/tally/unboxing",
"style": {
"navigationBarTitleText": "重新开箱"
}
}, {
"path": "pages/tally/printBox",
"style": {
"navigationBarTitleText": "打印箱号"
}
}, {
"path": "pages/tally/abnormalTally",
"style": {
"navigationBarTitleText": "美产商检管理"
}
}, {
"path": "pages/tally/goodsDetail",
"style": {
"navigationBarTitleText": "货品详情"
}
}, {
"path": "pages/tally/closeBox",
"style": {
"navigationBarTitleText": "封箱确认"
}
}, {
"path": "pages/tally/record",
"style": {
"navigationBarTitleText": "理货记录"
}
}, {
"path": "pages/tally/abnormalManageList",
"style": {
"navigationBarTitleText": "异常管理",
"app-plus": {
"titleNView": {
"buttons": [{
"index": "0",
"text": "新增异常",
"fontSize": "15px",
"color": "#1969F9",
"float": "right",
"width": "120px"
}]
}
}
}
}, {
"path": "pages/tally/addAbnormal",
"style": {
"navigationBarTitleText": "新增异常"
}
}, {
"path": "pages/tallyGoods/historicalTally",
"style": {
"navigationBarTitleText": "历史理货图片"
}
}, {
"path": "pages/tally/retentionList",
"style": {
"navigationBarTitleText": "滞留预警"
}
}, {
"path": "pages/stockOut/stockOutReceiptUpload",
"style": {
"navigationBarTitleText": "快递回单上传"
......
<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.keyword" @input="handleInput" style="width: 100%;" />
</view>
<text class="iconfont icon-a-juxing111" @click="clearInput()" v-if="input_flag"></text>
</view>
</view>
<view class="row radio-box">
<radio-group @change="radioChange" class="row verCenter" style="width: 100%;">
<label class="radio row verCenter">
<radio value="" style="transform:scale(0.7)" color="#197adb" />全部
</label>
<label class="radio row verCenter">
<radio value="0" style="transform:scale(0.7)" color="#197adb" />待业务处理
</label>
<label class="radio row verCenter">
<radio value="1" style="transform:scale(0.7)" color="#197adb" />待仓库确认
</label>
<label class="radio row verCenter">
<radio value="2" style="transform:scale(0.7)" color="#197adb" />已确认
</label>
<label class="radio row verCenter">
<radio value="-1" style="transform:scale(0.7)" color="#197adb" />作废
</label>
</radio-group>
</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="input-box row verCenter bothSide" style="flex: 0 0 100%;">
<view>
<text class="tt" style="color: #000;font-weight: bold;">{{ item.entrust_no }}</text>
</view>
<view class="row verCenter">
<text class="text" style="color: red;font-weight: bold;">{{ item.abnormal_type_val }}</text>
<text class="text" style="margin-left: 20px;font-weight: bold;">{{ item.abnormal_status_val }}</text>
</view>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;" @click="open()">
<text class="label" @click="open()">异常编码:</text>
<text class="text">{{item.abnormal_number}}</text>
</view>
<template v-if="item.abnormal_type == 1">
<view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #eee;padding: 10rpx 0;">
<text class="label">订单型号:</text>
<text class="text">{{item.order_model}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #eee;padding: 10rpx 0;">
<text class="label">实物型号:</text>
<view class="text">
<rich-text :nodes="highlightDifferences(item.order_model, item.actual_model)"></rich-text>
</view>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;padding: 10rpx 0;">
<text class="label">订单品牌:</text>
<text class="text">{{item.order_brand}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;padding: 10rpx 0;">
<text class="label">订单产地:</text>
<text class="text">{{item.order_origin}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;padding: 10rpx 0;">
<text class="label">订单数量:</text>
<text class="text">{{item.order_qty}}</text>
</view>
</template>
<template v-else-if="item.abnormal_type == 2">
<view class="input-box row verCenter" style="flex: 0 0 100%;padding: 10rpx 0;">
<text class="label">订单型号:</text>
<text class="text">{{item.order_model}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #eee;padding: 10rpx 0;">
<text class="label">订单品牌:</text>
<text class="text">{{item.order_brand}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #eee;padding: 10rpx 0;">
<text class="label">实物品牌:</text>
<view class="text">
<rich-text :nodes="highlightDifferences(item.order_brand, item.actual_brand)"></rich-text>
</view>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;padding: 10rpx 0;">
<text class="label">订单产地:</text>
<text class="text">{{item.order_origin}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;padding: 10rpx 0;">
<text class="label">订单数量:</text>
<text class="text">{{item.order_qty}}</text>
</view>
</template>
<template v-else-if="item.abnormal_type == 3">
<view class="input-box row verCenter" style="flex: 0 0 100%;padding: 10rpx 0;">
<text class="label">订单型号:</text>
<text class="text">{{item.order_model}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;padding: 10rpx 0;">
<text class="label">订单品牌:</text>
<text class="text">{{item.order_brand}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #eee;padding: 10rpx 0;">
<text class="label">订单产地:</text>
<text class="text">{{item.order_origin}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #eee;padding: 10rpx 0;">
<text class="label">实物产地:</text>
<rich-text :nodes="highlightDifferences(item.order_origin, item.actual_origin)"></rich-text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;padding: 10rpx 0;">
<text class="label">订单数量:</text>
<text class="text">{{item.order_qty}}</text>
</view>
</template>
<template v-else-if="item.abnormal_type == 4">
<view class="input-box row verCenter" style="flex: 0 0 100%;padding: 10rpx 0;">
<text class="label">订单型号:</text>
<text class="text">{{item.order_model}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;padding: 10rpx 0;">
<text class="label">订单品牌:</text>
<text class="text">{{item.order_brand}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;padding: 10rpx 0;">
<text class="label">订单产地:</text>
<text class="text">{{item.order_origin}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #eee;padding: 10rpx 0;">
<text class="label">订单数量:</text>
<text class="text">{{item.order_qty}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #eee;padding: 10rpx 0;">
<text class="label">实物数量:</text>
<rich-text :nodes="highlightDifferences(item.order_qty, item.actual_qty)"></rich-text>
</view>
</template>
<template v-else>
<view class="input-box row verCenter" style="flex: 0 0 100%;padding: 10rpx 0;">
<text class="label">订单型号:</text>
<text class="text">{{item.order_model}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;padding: 10rpx 0;">
<text class="label">订单品牌:</text>
<text class="text">{{item.order_brand}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;padding: 10rpx 0;">
<text class="label">订单产地:</text>
<text class="text">{{item.order_origin}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;padding: 10rpx 0;">
<text class="label">订单数量:</text>
<text class="text">{{item.order_qty}}</text>
</view>
</template>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">异常说明:</text>
<text class="text" style="max-width: 500rpx;" @click="show(item.abnormal_explain)">{{item.abnormal_explain}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">业务回复:</text>
<text class="text" style="color: red;" @click="show(item.handle_explain)">{{item.handle_explain}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">创建时间:</text>
<text class="text">{{item.create_time}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">回复时间:</text>
<text class="text">{{item.salesman_handle_time}}</text>
</view>
<view class="input-box row" style="flex: 0 0 100%;">
<text class="label">异常图片:</text>
<view class="pick_img_list row">
<template v-if="item.abnormal_pic_urls.length > 0">
<view class="img_list" v-for="(v, i) in item.abnormal_pic_urls" :key="i">
<image :src="v" mode="aspectFill" @click="previewChange(item.abnormal_pic_urls,i)"></image>
</view>
</template>
</view>
</view>
<view class="btn-box row">
<!-- 除“作废”状态的异常,其他状态异常均可作废 -->
<template v-if="item.abnormal_status != -1">
<view class="btn1 row rowCenter verCenter" @click="cancelAbnormal(item.abnormal_id)">作废</view>
</template>
<!-- 仅“待仓库确认”时可操作 -->
<template v-if="item.abnormal_status == 1">
<view class="btn2 row rowCenter verCenter" @click="confirmAbnormal(item.abnormal_id)">确认</view>
</template>
</view>
</view>
</view>
<!-- 无数据展示 -->
<view class="no-date column rowCenter verCenter" v-else>
<text class="iconfont icon-a-juxing21"></text>
<text class="text">查不到当前数据</text>
</view>
<!-- 新增异常弹窗 -->
<uni-popup ref="popup" background-color="#eee">
<view class="popup-content">
<view class="section">
<view class="input-box row verCenter" style="margin-bottom: 40rpx;">
<text style="color: red;">*</text>
<text class="label">入仓号:</text>
<input class="uni-input" type="text" placeholder="请输入入仓号" placeholder-style="color:#000;font-weight: bold;" v-model="entrust_no" />
<button class="search-btn row rowCenter verCenter" @click="search()">搜索</button>
</view>
<view class="uni-table" v-if="orderDetailByIdList.length > 0">
<view class="uni-tr">
<view class="uni-th">序号</view>
<view class="uni-th">型号</view>
<view class="uni-th">品牌</view>
<view class="uni-th">数量</view>
</view>
<scroll-view scroll-y="true" style="max-height: 500rpx;">
<view class="uni-tr" v-for="(item,index) in orderDetailByIdList" :key="index" @click="selectedChange(2,index)" :class="{curr:orderDetailByIdIndex==index}">
<view class="uni-td">{{index+1}}</view>
<view class="uni-td">{{item.model}}</view>
<view class="uni-td">{{item.brand}}</view>
<view class="uni-td">{{item.qty}}</view>
</view>
</scroll-view>
</view>
</view>
<view class="btn row bothSide">
<view class="canel row rowCenter verCenter" @click="close()" style="height: 80rpx;">返回</view>
<view class="ok row rowCenter verCenter" @click="next()" style="height: 80rpx;">下一步</view>
</view>
</view>
</uni-popup>
<!-- 多个入仓号 -->
<uni-popup ref="popupErpSn" background-color="#eee">
<view class="popup-content">
<view class="section">
<view style="margin-bottom: 20rpx;">
<text style="color: #1969f9;">{{entrust_no}}</text>
<text>有相似入仓号订单,请选择</text>
</view>
<view class="uni-table" v-if="allOrderDataByEntrustNoList.length > 0">
<view class="uni-tr">
<view class="uni-th" style="text-align: center;"></view>
<view class="uni-th" style="text-align: center;">入仓单号</view>
<view class="uni-th" style="text-align: center;">明细数</view>
<view class="uni-th" style="text-align: center;">入库状态</view>
</view>
<scroll-view scroll-y="true" style="max-height: 500rpx;">
<view class="uni-tr" v-for="(item,index) in allOrderDataByEntrustNoList" :key="index" @click="selectedChange(1,index)" :class="{curr:allOrderDataByEntrustNoIndex==index}">
<view class="uni-td" style="text-align: center;">
<template v-if="allOrderDataByEntrustNoIndex==index">
<text class="iconfont icon-danxuankuangdanxuan-xuanzhong-weixuanzhong"></text>
</template>
<template v-else>
<text class="iconfont icon-danxuanxuanzhong-weixuanzhong"></text>
</template>
</view>
<view class="uni-td" style="text-align: center;">{{item.erp_order_sn}}</view>
<view class="uni-td" style="text-align: center;">{{item.detail_count}}</view>
<view class="uni-td" style="text-align: center;">{{item.stock_in_status_val}}</view>
</view>
</scroll-view>
</view>
</view>
<view class="btn row bothSide">
<view class="canel row rowCenter verCenter" @click="close(1)">关闭</view>
<view class="ok row rowCenter verCenter" @click="close(2)">确定</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import { API } from '@/util/api.js';
import debounce from 'lodash/debounce';
export default {
data() {
return {
noexebshowFalg: true, //控制是否会触发生命周期
page: 1,
limit: 10,
list: [],
index: 0,
array: ['全量搜索'],
detail: {}, //详情
input_flag: false,
entrust_no: '', //入仓号
total: 0,
is_focus: true, //获取焦点动态化
hasMoreData: true, //是否分页加载
orderDetailByIdList: [],
orderDetailByIdIndex: -1,
allOrderDataByEntrustNoList: [],
allOrderDataByEntrustNoIndex: -1,
order_id: '',
erp_order_sn: '',
salesman: '',
searchParams: {
keyword: '',
abnormal_status: ''
}
};
},
onReachBottom() {
if (!this.hasMoreData) {
return;
}
this.page++;
this.getData();
},
onNavigationBarButtonTap(e) {
if (e.index == 0) {
this.open();
}
},
onShow() {
if (this.noexebshowFalg) {
this.resetChange();
this.getData();
}
},
methods: {
/**
* td选中
* @param {Object} type
* @param {Object} index
*/
selectedChange(type, index) {
if (type == 1) {
this.allOrderDataByEntrustNoIndex = index;
} else if (type == 2) {
this.orderDetailByIdIndex = index;
}
},
radioChange: function(e) {
var value = e.detail.value;
this.searchParams.abnormal_status = value;
this.resetChange();
this.getData();
},
getData() {
this.request(API.abnormalManageList, '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'
});
}
});
},
/**
* 比较两个字符串并标记不同的字符
* @param {string} str1 - 第一个字符串
* @param {string} str2 - 第二个字符串
* @returns {string} 处理后的第二个字符串,带有<em>标签
*/
highlightDifferences(str1, str2) {
if (str1 && str2) {
// 去除前后空格
str1 = str1.toString().trim();
str2 = str2.toString().trim();
// 初始化结果字符串
let result = '';
const maxLength = Math.max(str1.length, str2.length);
// 逐字符比较
for (let i = 0; i < maxLength; i++) {
const char1 = str1[i] || ''; // 如果str1比str2短,取空字符
const char2 = str2[i] || ''; // 如果str2比str1短,取空字符
// 比较字符
if (char1 !== char2) {
// 如果字符不同,在第二个字符串中用<em>包裹
result += `<span style="color: red">${char2}</span>`;
} else {
// 如果字符相同,直接添加到结果中
result += char2;
}
}
return result;
}
},
/**
* 预览图片
* @param {Object} img
* @param {Object} index
*/
previewChange(arr, index) {
this.noexebshowFalg = false;
uni.previewImage({
current: index,
urls: arr
});
},
/**
* 全量搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
this.resetChange();
var val = event.target.value;
this.searchParams.keyword = '';
if (val) {
this.searchParams.keyword = val;
this.input_flag = true;
} else {
this.input_flag = false;
}
this.getData();
}, 500),
/**
* 清空数据
*/
clearInput(type) {
this.resetChange();
if (type == 'start') {
//清除起始时间
this.searchParams.create_time_begin = '';
this.getData();
} else if (type == 'end') {
//清除结束时间
this.searchParams.create_time_end = '';
this.getData();
} else {
this.searchParams.keyword = '';
this.input_flag = false;
this.clearInputAndFocus();
this.getData();
}
},
/**
* 重置
*/
resetChange() {
this.list = [];
this.page = 1;
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
},
/**
* 入仓号进行模糊查询
*/
getAllOrderDataByEntrustNo() {
this.request(API.getAllOrderDataByEntrustNo, 'GET', { entrust_no: this.entrust_no }, true).then(res => {
if (res.err_code === 0) {
if (res.data.length > 0) {
if (res.data.length == 1) {
this.erp_order_sn = res.data[0].erp_order_sn;
this.salesman = res.data[0].salesman;
this.getOrderDetailById(res.data[0].order_id);
} else {
this.allOrderDataByEntrustNoList = res.data;
this.open(1);
}
} else {
uni.showToast({
title: '暂无该入仓号数据',
icon: 'none'
});
}
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 根据订单ID获取明细
*/
getOrderDetailById(order_id) {
this.request(API.getOrderDetailById, 'GET', { order_id: order_id }, true).then(res => {
if (res.err_code === 0) {
this.order_id = order_id;
this.orderDetailByIdList = [];
this.orderDetailByIdList = res.data;
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 打开弹窗
*/
open(type) {
if (type == 1) {
this.allOrderDataByEntrustNoIndex = -1;
this.allOrderDataByEntrustNoLis = [];
this.$refs.popupErpSn.open();
} else {
this.entrust_no = '';
this.orderDetailByIdIndex = -1;
this.orderDetailByIdList = [];
this.$refs.popup.open();
}
},
/**
* 关闭弹窗
*/
close(type) {
if (type == 1) {
this.$refs.popupErpSn.close();
} else if (type == 2) {
if (this.allOrderDataByEntrustNoIndex == -1) {
uni.showToast({
title: '请选择入仓号',
icon: 'none'
});
return false;
}
this.erp_order_sn = this.allOrderDataByEntrustNoList[this.allOrderDataByEntrustNoIndex].erp_order_sn
this.salesman = this.allOrderDataByEntrustNoList[this.allOrderDataByEntrustNoIndex].salesman
this.getOrderDetailById(this.allOrderDataByEntrustNoList[this.allOrderDataByEntrustNoIndex].order_id);
this.$refs.popupErpSn.close();
} else {
this.$refs.popup.close();
}
},
/**
* 搜索
*/
search() {
if (this.entrust_no.length < 3) {
uni.showToast({
title: '入仓号至少输入三个字符',
icon: 'none'
});
return false;
}
this.getAllOrderDataByEntrustNo();
},
/**
* 下一步
*/
next() {
if (!this.entrust_no) {
uni.showToast({
title: '请输入入仓号',
icon: 'none'
});
return false;
}
if (this.orderDetailByIdIndex == -1) {
uni.showToast({
title: '请选择异常数据',
icon: 'none'
});
return false;
}
this.$refs.popup.close();
this.$refs.popupErpSn.close();
uni.navigateTo({
url: '/pages/tally/addAbnormal?order_id=' + this.order_id + '&erp_order_sn=' + this.erp_order_sn + '&salesman=' + this.salesman + '&orderDetailByIdIndex=' + this.orderDetailByIdIndex
})
},
/**
* 展示文本详情
*/
show(val) {
uni.showModal({
content: val,
showCancel: false,
confirmText: '关闭',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
/**
* 异常作废
*/
cancelAbnormal(abnormal_id) {
uni.showModal({
title: '提示',
content: '是否确认作废该异常?',
success: (res) => {
if (res.confirm) {
this.request(API.cancelAbnormal, 'GET', { abnormal_id: abnormal_id }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '操作成功',
icon: 'success',
duration: 1000
});
setTimeout(() => {
this.resetChange();
this.getData();
}, 1000)
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
/**
* 异常确认
*/
confirmAbnormal(abnormal_id) {
uni.showModal({
title: '提示',
content: '是否确认业务处理方案?',
success: (res) => {
if (res.confirm) {
this.request(API.confirmAbnormal, 'GET', { abnormal_id: abnormal_id }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '确认成功',
icon: 'success',
duration: 1000
});
setTimeout(() => {
this.resetChange();
this.getData();
}, 1000)
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
}
};
</script>
<style scoped lang="scss">
@import '@/assets/css/tally/abnormalManageList.scss';
</style>
\ No newline at end of file
<template>
<view class="abnormalTally">
<view class="input-box row bothSide verCenter" style="margin-bottom: 16rpx;">
<input class="uni-input" placeholder="请取箱号" :focus="is_focus_1" placeholder-style="color:#000;font-weight: bold;" v-model="box_sn" @input="handleInput($event,1)" />
<view class="row verCenter">
<text class="iconfont icon-jinggao2" @click="clearInput(1)" v-if="box_sn"></text>
<template v-if="box_sn">
<view class="btn row rowCenter verCenter" @click="canel()">取消装箱</view>
</template>
<template v-else>
<view class="btn row rowCenter verCenter" @click="getBoxSn()">取箱号</view>
</template>
</view>
</view>
<view class="input-box row bothSide verCenter">
<input class="uni-input" placeholder="请输入或扫描异常批次" :focus="is_focus_2" placeholder-style="color:#000;font-weight: bold;" v-model="abnormal_batch" @input="handleInput($event,2)" />
<view class="row verCenter">
<text class="iconfont icon-jinggao2" @click="clearInput(2)" v-if="abnormal_batch"></text>
</view>
</view>
<view class="tab row verCenter">
<view class="box" v-for="(item,index) in arr" :key="index" :class="{curr:curr==index}" @click="tab(index)">
{{item}}
<template v-if="index == 0">({{num}})</template>
<template v-else-if="index == 1">({{usa_num}})</template>
<template v-else-if="index == 2">({{goods_check_num}})</template>
<template v-else-if="index == 3">({{have_close_box_num}})</template>
</view>
</view>
<view class="filter-tab row bothSide verCenter" v-if="abnormalTallyDetail">
<!-- 已装箱显示 -->
<template v-if="curr == 3">
<view class="t1"></view>
<view class="row verCenter">
<text class="t2">装箱时间:</text>
<view class="time row verCenter">
<picker mode="date" class="picker-data row verCenter" :value="pack_time_start" @change="bindDateChange($event,2)">
<span class="text">{{pack_time_start}}</span>
</picker>
<picker mode="date" class="picker-data row verCenter" :value="pack_time_end" @change="bindDateChange($event,3)">
<span class="text" style="margin-left: 10rpx;">{{pack_time_end}}</span>
</picker>
</view>
</view>
</template>
<!-- 未装箱 -->
<template v-else>
<template v-if="curr == 0">
<view class="t1" v-if="abnormalTallyDetail.confirm_all_num">已确认({{abnormalTallyDetail.confirm_all_num || ''}}</view>
</template>
<template v-else-if="curr == 1">
<view class="t1" v-if="abnormalTallyDetail.confirm_usa_num">已确认({{abnormalTallyDetail.confirm_usa_num || ''}}</view>
</template>
<template v-else-if="curr == 2">
<view class="t1" v-if="abnormalTallyDetail.confirm_goods_check_num">已确认({{abnormalTallyDetail.confirm_goods_check_num || '' }}</view>
</template>
<view class="row verCenter">
<text class="t2">截止时间:</text>
<view class="time row verCenter">
<picker mode="date" class="picker-data row verCenter" :value="confirm_time_date" @change="bindDateChange($event,1)">
<span class="text">{{confirm_time_date}}</span>
</picker>
<picker mode="time" class="picker-time row verCenter" :value="confirm_time_day" @change="bindTimeChange">
<span class="text" style="margin-left: 10rpx;">{{confirm_time_day}}</span>
</picker>
</view>
</view>
</template>
</view>
<view class="list" v-if="list.length > 0" :class="{pb100:curr==3}">
<scroll-view scroll-y="true" class="scroll-Y">
<view class="box" v-for="(item,index) in list" :key="index">
<view class="text row bothSide">
<text class="num row rowCenter verCenter">{{index+1}}</text>
<!-- 左侧 -->
<view class="bar" style="width: 60%;">
<template v-if="curr == 3">
<view class="t1 mb16" style="white-space: nowrap;">{{item.abnormal_batch}}{{item.sync_status_cn}} {{item.box_tally_status_cn || ''}}</view>
</template>
<template v-else>
<view class="t1 mb16">{{item.abnormal_batch}}</view>
</template>
<view class="row verCenter mb16">
<text class="t2">入仓号:</text>
<text class="t3">{{item.erp_order_sn}}</text>
</view>
<view class="row verCenter mb16">
<text class="t2">型号:</text>
<text class="t3">{{item.goods_type}}</text>
</view>
<view class="row verCenter">
<text class="t2">品牌:</text>
<text class="t3">{{item.brand}}</text>
</view>
</view>
<!-- 右侧 -->
<view class="bar" style="width: 40%;margin-top: 30rpx;">
<template v-if="curr == 3">
<view class="row verCenter mb16">
<text class="t2">箱号:</text>
<text class="t3">{{item.box_sn}}</text>
</view>
</template>
<view class="row verCenter mb16">
<text class="t2">数量:</text>
<text class="t3">{{item.tally_num}}</text>
</view>
<view class="row verCenter mb16">
<text class="t2">产地:</text>
<template v-if="item.origin_confirm_status == 1">
<text class="t3" style="color: #197ADB;">{{item.origin}}</text>
<text class="t4" style="margin-left: 2rpx;color: #197ADB;">已确认</text>
</template>
<template v-else>
<text class="t3">{{item.origin}}</text>
<text class="t4" style="margin-left: 2rpx;">未确认</text>
</template>
</view>
<view class="row verCenter mb16">
<text class="t2">商检:</text>
<template v-if="item.is_goods_check == 1">
<text class="t3" style="color: #197ADB;">{{item.is_goods_check_cn}}</text>
</template>
<template v-else>
<text class="t3">{{item.is_goods_check_cn}}</text>
</template>
</view>
</view>
</view>
<template v-if="curr == 3">
<view class="row verCenter mb16" style="margin-top: 16rpx;">
<text class="t2">装箱时间:</text>
<text class="t3">{{item.pack_time}}</text>
</view>
</template>
<template v-else>
<view class="row verCenter mb16" style="margin-top: 16rpx;">
<text class="t2">确认时间:</text>
<text class="t3">{{item.confirm_time_cn}}</text>
</view>
</template>
<view class="btn-wrap row">
<template v-if="curr != 3">
<!-- 商检和美产 产地已确认显示装箱 -->
<template v-if="item.origin_confirm_status">
<view class="btn row rowCenter verCenter" @click="submitAbnormalBox(1,item.wstydl_id)">装 箱</view>
</template>
</template>
<template v-else>
<!-- 已装箱 产地已确认 -->
<template v-if="item.origin_confirm_status">
<view class="btn row rowCenter verCenter" @click="submitAbnormalBox(0,item.wstydl_id,item)">取 出</view>
</template>
<view class="fix-btn row rowCenter verCenter" @click="closeBox()">封 箱</view>
</template>
</view>
</view>
</scroll-view>
</view>
<view class="no-data column verCenter rowCenter" v-else>
<text class="iconfont icon-jinggao2"></text>
<text class="text">查找不到相关信息</text>
<text class="p">1、请输入正确的箱号或异常批次号</text>
</view>
<!-- 关单封箱弹窗 -->
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="input" title="该箱子是否确认封箱?" value="" placeholder="请输入毛重" @close="dialogInputClose" @confirm="dialogInputConfirm" :is-mask-click="true" :before-close="true"></uni-popup-dialog>
</uni-popup>
</view>
</template>
<script>
import { API } from '@/util/api.js';
import debounce from 'lodash/debounce';
export default {
data() {
return {
email: uni.getStorageSync('email') || '', //操作人邮箱
curr: 0,
is_focus_1: true, //获取焦点动态化
is_focus_2: false,
arr: ['全部未装箱', '美产', '商检', '已装箱'],
num: '', //异常数量总数
usa_num: 0,
goods_check_num: 0,
have_close_box_num: 0,
abnormal_batch: '', //异常批次
list: [],
box_sn: '', //箱号信息
wsty_id: '', //箱子id
abnormalTallyDetail: {},
confirm_time: '', //确认时间
pack_time: '', //装箱时间
confirm_time_date: this.getCurrentDate(),
confirm_time_day: '17:00',
pack_time_start: this.getPreviousMonthDate(this.getCurrentDate()),
pack_time_end: this.getCurrentDate()
};
},
onLoad(options) {
this.abnormal_batch = options.abnormal_batch || '';
},
onShow() {
this.getData();
},
created() {
this.updateConfirmTime();
},
methods: {
bindDateChange: function(e, type) {
switch (type) {
case 1:
this.confirm_time_date = e.detail.value;
this.updateConfirmTime();
break;
case 2:
this.pack_time_start = e.detail.value;
this.updatePackTime();
break;
case 3:
const newEndDate = e.detail.value;
if (new Date(newEndDate) < new Date(this.pack_time_start)) {
uni.showToast({
title: '装箱结束时间不能小于装箱开始时间',
icon: 'none'
});
return false;
} else {
this.pack_time_end = e.detail.value;
}
this.updatePackTime();
break;
}
this.getData();
},
bindTimeChange: function(e) {
this.confirm_time_day = e.detail.value;
this.updateConfirmTime();
},
/**
* 获取日期
*/
getCurrentDate() {
const today = new Date();
const year = today.getFullYear();
const month = String(today.getMonth() + 1).padStart(2, '0');
const day = String(today.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
},
/**
* 时间推前一个月
* @param {Object} dateStr
*/
getPreviousMonthDate(dateStr) {
const date = new Date(dateStr);
date.setDate(date.getDate() - 3);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
},
updateConfirmTime() {
this.confirm_time = `${this.confirm_time_date} ${this.confirm_time_day}`;
},
updatePackTime() {
this.pack_time = `${this.pack_time_start}~${this.pack_time_end}`;
},
/**
* 监听输入框
* @param {Object} event
*/
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) {
this.getData();
}
}, 500),
/**
* 确认
*/
confirm() {
if (!this.abnormal_batch) {
uni.showToast({
title: '请输入异常批次',
icon: 'error'
});
return false;
}
this.getData();
},
/**
* 获取箱号
* @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(); //取箱号成功则自动调用打印箱号
}
} 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('用户点击取消');
}
}
});
}
});
},
tab(index) {
this.curr = index;
if (index == 3) {
this.confirm_time = '';
this.updatePackTime();
} else {
this.pack_time = '';
this.updateConfirmTime();
}
this.getData();
},
/**
* 获取异常理货明细
*/
getData() {
this.request(API.getAbnormalTallyDetail, 'GET', { type: this.curr, abnormal_batch: this.abnormal_batch, confirm_time: this.confirm_time, pack_time: this.pack_time }, true).then(res => {
if (res.err_code === 0) {
this.list = res.data.detail;
this.abnormalTallyDetail = res.data;
this.usa_num = res.data.usa_num; //美产
this.goods_check_num = res.data.goods_check_num; //商检
this.have_close_box_num = res.data.have_close_box_num; //已装箱
this.num = this.usa_num + this.goods_check_num; //未装箱
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 异常型号装箱 1装箱 0取出
*/
submitAbnormalBox(type, wstydl_id, item) {
if (type == 1) {
//装箱的时候验证
if (!this.box_sn) {
uni.showModal({
title: '',
content: '请先取箱号!并将打印的箱号贴于外箱上',
showCancel: false
});
return false;
}
} else if (type == 0) {
//取出逻辑
//明细为未推送、推送失败:该箱已封箱,是否确认取出?确认后,则将该物料从箱子中剔除,回到异常待装箱中
if (item.box_tally_status == 2 && (item.sync_status == 1 || item.sync_status == 4)) {
uni.showModal({
content: '该箱已封箱,是否确认取出?确认后,则将该物料从箱子中剔除,回到异常待装箱中',
confirmText: '确认取出',
success: (res) => {
if (res.confirm) {
this.request(API.getBoxNumByDetailId, 'POST', { wstydl_id: wstydl_id }, true).then(json => {
if (json.err_code === 0) {
if (json.data > 1) {
let text = `${item.erp_order_sn}货物分部在${this.box_sn}${json.data}个子箱,请确认是否全部取消`;
uni.showModal({
title: '提示',
content: text,
success: (res) => {
if (res.confirm) {
this.request(API.submitAbnormalBox, 'POST', { type: type, wstydl_id: wstydl_id, wsty_id: this.wsty_id }, true).then(res => {
if (res.err_code === 0) {
uni.showModal({
title: '',
content: type == 1 ? '装箱成功' : '取出成功',
showCancel: false,
success: (res) => {
if (res.confirm) {
this.getData();
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
} else {
this.request(API.submitAbnormalBox, 'POST', { type: type, wstydl_id: wstydl_id, wsty_id: this.wsty_id }, true).then(res => {
if (res.err_code === 0) {
uni.showModal({
title: '',
content: type == 1 ? '装箱成功' : '取出成功',
showCancel: false,
success: (res) => {
if (res.confirm) {
this.getData();
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
}
} else {
uni.showToast({
title: json.err_msg,
icon: 'none'
});
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
return false;
}
}
this.request(API.submitAbnormalBox, 'POST', { type: type, wstydl_id: wstydl_id, wsty_id: this.wsty_id }, true).then(res => {
if (res.err_code === 0) {
uni.showModal({
title: '',
content: type == 1 ? '装箱成功' : '取出成功',
showCancel: false,
success: (res) => {
if (res.confirm) {
this.getData();
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 关单封箱
*/
closeBox() {
if (!this.box_sn) {
uni.showModal({
title: '',
content: '请先取箱号!并将打印的箱号贴于外箱上',
showCancel: false
});
return false;
}
this.getBoxStatus();
},
/**
* 确认
*/
dialogInputConfirm(val) {
if (!val) {
uni.showToast({
title: '请输入毛重',
icon: 'error'
});
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) {
this.box_sn = '';
this.wsty_id = '';
this.getData();
this.$refs.inputDialog.close()
} 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;
}
var params = {
type: 1,
email: this.email,
print_json: JSON.stringify([{ box_sn: this.box_sn }])
}
this.request(API.addSCTallyData, 'POST', params, true).then(res => {
if (res.code === 0) {
uni.showModal({
content: '打印成功,请查看打印机',
showCancel: false
});
setTimeout(() => {
this.updateTagPrintTimes(this.box_sn);
}, 2000)
} 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'
});
}
});
},
/**
* 更新统计打印标签次数
*/
updateTagPrintTimes(tag_no) {
this.request(API.updateTagPrintTimes, 'POST', { tag_no: tag_no }, true).then(res => {
});
},
/**
* 取消装箱
*/
canel() {
this.box_sn = '';
this.wsty_id = '';
},
/**
* 清空数据
*/
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.abnormal_batch = '';
this.is_focus_2 = false;
setTimeout(() => {
this.is_focus_2 = true;
this.getData();
}, 200);
}
},
}
};
</script>
<style scoped lang="scss">
@import '@/assets/css/tally/abnormalTally.scss';
::v-deep {
.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-box">
<view class="base-information">
<view class="top row bothSide verCenter">
<view class="title row verCenter">
<text class="arrow row rowCenter verCenter"></text>
<text class="tt">基础信息</text>
</view>
</view>
<view class="row text-box">
<view class="input-box row verCenter">
<text class="label">入仓号:</text>
<text class="text">{{ form.entrust_no }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">部门:</text>
<text class="text">{{ salesman }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">型号:</text>
<text class="text">{{ orderDetailByIdList.model }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">品牌:</text>
<text class="text">{{ orderDetailByIdList.brand }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">数量:</text>
<text class="text">{{ orderDetailByIdList.qty }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">产地:</text>
<text class="text">{{ orderDetailByIdList.origin }}</text>
</view>
</view>
</view>
<view class="abnormal-information">
<view class="top row bothSide verCenter">
<view class="title row verCenter">
<text class="arrow row rowCenter verCenter"></text>
<text class="tt">异常信息</text>
</view>
</view>
<view class="box row verCenter">
<text class="label required">异常类型</text>
<view class="uni-list-cell-db">
<text class="iconfont icon-sanjiaoxing1"></text>
<picker @change="bindPickerChange(1, $event)" :value="index" :range="array">
<view class="uni-input">{{ array[index] || '请选择异常类型' }}</view>
</picker>
</view>
</view>
<view class="box row verCenter" v-if="index == 0 || index == 1 || index == 2 || index == 3">
<template v-if="index == 0">
<text class="label">实物品牌</text>
<view class="uni-input-box row verCenter bothSide">
<input type="text" class="uni-input" placeholder="请输入" placeholder-style="color:#404547;" v-model="form.actual_brand" style="width: 100%;" />
</view>
</template>
<template v-else-if="index == 1">
<text class="label">实物型号</text>
<view class="uni-input-box row verCenter bothSide">
<input type="text" class="uni-input" placeholder="请输入" placeholder-style="color:#404547;" v-model="form.actual_model" style="width: 100%;" />
</view>
</template>
<template v-else-if="index == 2">
<text class="label">实物产地</text>
<view class="uni-input-box row verCenter bothSide">
<input type="text" class="uni-input" placeholder="请输入" placeholder-style="color:#404547;" v-model="form.actual_origin" style="width: 100%;" />
</view>
</template>
<template v-else-if="index == 3">
<text class="label">实物数量</text>
<view class="uni-input-box row verCenter bothSide">
<input type="text" class="uni-input" placeholder="请输入" placeholder-style="color:#404547;" v-model="form.actual_qty" style="width: 100%;" />
</view>
</template>
</view>
<view class="box row verCenter">
<text class="label required">是否需业务处理</text>
<view class="uni-list-cell-db">
<text class="iconfont icon-sanjiaoxing1"></text>
<picker @change="bindPickerChange(2, $event)" :value="is_business_processing_index" :range="is_business_processing">
<view class="uni-input">{{ is_business_processing[is_business_processing_index] || '请选择' }}</view>
</picker>
</view>
</view>
<view class="upload-box">
<view class="title row bothSide verCenter">
<view class="row verCenter">
<text style="color: red;">*</text>
<text class="tt-l">异常图片上传</text>
</view>
<text class="tt-r">{{ abnormal_pic_url.length }}/4</text>
</view>
<view class="upload-list row verCenter">
<template v-if="abnormal_pic_url.length > 0">
<view class="pic-box" v-for="(v, index) in abnormal_pic_url" :key="index">
<image :src="v" mode="aspectFill" lazy-load="true" @click="previewChange(abnormal_pic_url, 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="abnormal_pic_url.length < 4"><text class="iconfont icon-xingzhuangjiehe"></text></view>
</view>
<view class="textarea-box">
<textarea maxlength="200" placeholder="请输入异常说明" placeholder-style="color:#6E767A;" v-model="form.abnormal_explain"></textarea>
<view class="quickExpressions row">
<view class="lable-box" @click="selectionText(item.expressions)" v-for="(item, index) in quickExpressions" :key="index">{{ item.expressions }}</view>
</view>
</view>
</view>
</view>
<view class="btn row rowCenter verCenter" @click="addAbnormal()">提交</view>
</view>
</template>
<script>
import { API } from '@/util/api.js';
import w_md5 from '../../js_sdk/zww-md5/w_md5.js';
export default {
data() {
return {
noexebshowFalg: true, //控制是否会触发生命周期
array: ['品牌异常', '型号异常', '产地异常', '数量异常', '标签异常', '其他异常'],
index: 0,
salesman: '',
orderDetailByIdIndex: '',
orderDetailByIdList: {},
quickExpressions: [],
is_business_processing: ['否', '是'],
is_business_processing_index: 1,
abnormal_pic_url: [],
order_id: '',
form: {
order_goods_id: '',
entrust_no: '',
abnormal_type: 1,
actual_model: '',
actual_brand: '',
actual_qty: '',
actual_origin: '',
abnormal_explain: '',
abnormal_pic_url: '',
is_business_processing: 1
}
};
},
onLoad(options) {
this.order_id = options.order_id;
this.form.entrust_no = options.erp_order_sn;
this.salesman = options.salesman;
this.orderDetailByIdIndex = options.orderDetailByIdIndex;
},
watch: {
abnormal_pic_url(arr) {
if (arr.length > 0) {
this.form.abnormal_pic_url = arr.join(',');
} else {
this.form.abnormal_pic_url = '';
}
}
},
onShow() {
this.getData();
this.getQuickExpressions();
},
methods: {
bindPickerChange: function (type, e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
if (type == 1) {
this.index = e.detail.value;
this.form.abnormal_type = Number(e.detail.value) + 1;
this.getQuickExpressions(); //更新常用语
} else if (type == 2) {
this.is_business_processing_index = e.detail.value;
this.form.is_business_processing = e.detail.value;
}
},
/**
* 选中常用语
*/
selectionText(val) {
this.form.abnormal_explain = val;
},
getData() {
this.request(API.getOrderDetailById, 'GET', { order_id: this.order_id }, true).then(res => {
if (res.err_code === 0) {
this.orderDetailByIdList = res.data[this.orderDetailByIdIndex];
this.form.order_goods_id = this.orderDetailByIdList.order_goods_id;
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 获取常用语
*/
getQuickExpressions() {
this.request(API.getQuickExpressions, 'GET', { abnormal_type: this.form.abnormal_type }, false).then(res => {
if (res.err_code === 0) {
this.quickExpressions = res.data.list;
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
previewChange(img, index) {
this.noexebshowFalg = false; //不允许再次触发onshow这个生命周期
uni.previewImage({
current: index,
urls: img
});
},
deletePic(index) {
this.abnormal_pic_url.splice(index, 1);
},
chooseImageChange() {
this.noexebshowFalg = false; //不允许再次触发onshow这个生命周期
var self = this;
var time = parseInt(new Date().getTime() / 1000);
// #ifdef MP-WEIXIN
uni.chooseMedia({
count: 4,
mediaType: ['image'],
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: chooseImageRes => {
uni.showLoading({
title: '上传中...'
});
const tempFilePaths = chooseImageRes.tempFiles;
let maxNum = tempFilePaths.length * 1 + self.abnormal_pic_url.length * 1;
if (maxNum > 4) {
uni.hideLoading();
uni.showToast({
title: '图片不超过4张'
});
return false;
}
for (let i = 0; i < tempFilePaths.length; i++) {
uni.uploadFile({
url: API.upload,
filePath: tempFilePaths[i].tempFilePath,
name: 'upload',
formData: {
source: '1',
k1: time,
k2: w_md5.hex_md5_32(w_md5.hex_md5_32(String(time)) + 'fh6y5t4rr351d2c3bryi')
},
success: uploadFileRes => {
uni.hideLoading();
var data = JSON.parse(uploadFileRes.data);
if (data.code === 200) {
self.abnormal_pic_url.push(data.data[0]);
} else {
uni.showToast({
title: data.message,
icon: 'error'
});
}
},
fail: error => {
uni.hideLoading();
}
});
}
}
});
// #endif
// #ifdef APP-PLUS
uni.chooseImage({
count: 4,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: chooseImageRes => {
uni.showLoading({
title: '上传中...'
});
const tempFilePaths = chooseImageRes.tempFilePaths;
let maxNum = tempFilePaths.length * 1 + self.abnormal_pic_url.length * 1;
if (maxNum > 4) {
uni.hideLoading();
uni.showToast({
title: '图片不超过4张'
});
return false;
}
for (let i = 0; i < tempFilePaths.length; i++) {
uni.uploadFile({
url: API.upload,
filePath: tempFilePaths[i],
name: 'upload',
formData: {
source: '1',
k1: time,
k2: w_md5.hex_md5_32(w_md5.hex_md5_32(String(time)) + 'fh6y5t4rr351d2c3bryi')
},
success: uploadFileRes => {
uni.hideLoading();
var data = JSON.parse(uploadFileRes.data);
if (data.code === 200) {
self.abnormal_pic_url.push(data.data[0]);
} else {
uni.showToast({
title: data.message,
icon: 'error'
});
}
},
fail: error => {
uni.hideLoading();
}
});
}
}
});
// #endif
},
/**
* 新增异常
*/
addAbnormal() {
if (this.index == -1) {
uni.showToast({
title: '请选择异常类型',
icon: 'none'
});
return false;
}
if (this.form.is_business_processing === '') {
uni.showToast({
title: '请选择是否需要业务处理',
icon: 'none'
});
return false;
}
if (this.form.abnormal_pic_url == '') {
uni.showToast({
title: '请上传异常图片',
icon: 'none'
});
return false;
}
if (!this.form.abnormal_explain) {
uni.showToast({
title: '请填写异常说明',
icon: 'none'
});
return false;
}
this.request(API.addAbnormal, 'POST', this.form, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '操作成功',
icon: 'success',
duration: 2500,
mask: true
});
setTimeout(() => {
// 在进行导航之前设置全局变量
getApp().globalData.fromPage = "addAbnormal";
uni.navigateBack({
delta: 1
});
}, 2000)
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
}
}
};
</script>
<style scoped lang="scss">
@import '@/assets/css/tally/addAbnormal.scss';
</style>
\ No newline at end of file
<template>
<view class="page-box">
<view class="info-box" v-if="boxData.box_sn">
<view class="box_sn">箱号:{{boxData.box_sn}}</view>
<view class="item row">
<view class="item-box row verCenter">
<view class="t1">入仓号数:</view>
<view class="t2">{{boxData.erp_order_sn_num}}</view>
</view>
<view class="item-box row verCenter">
<view class="t1">型号数:</view>
<view class="t2">{{boxData.goods_type_num}}</view>
</view>
<view class="item-box row verCenter">
<view class="t1">箱类型:</view>
<view class="t2">{{boxData.box_type_cn}}</view>
</view>
<view class="item-box row verCenter">
<view class="t1">总净重:</view>
<view class="t2">{{boxData.net_weight_sum}}kg</view>
</view>
</view>
<view class="input-box row verCenter" style="margin-bottom: 20rpx;">
<view class="row verCenter">
<text style="color: red;">*</text>
<text class="tt">总毛重:</text>
</view>
<input type="number" inputmode="decimal" placeholder="请输入总毛重" class="uni-input" v-model="gross_weight" />
<text class="tt">kg</text>
</view>
<view class="input-box row verCenter">
<view class="row verCenter">
<text style="color: red;">*</text>
<text class="tt">子箱数:</text>
</view>
<template v-if="flag">
<input type="number" inputmode="numeric" placeholder="请输入子箱数" class="uni-input" v-model="sub_box_qty" />
<view style="background-color: #fff;color: #197adb;border: 1px solid #197adb;width: 100rpx;margin: 0 10rpx;" class="btn row rowCenter verCenter" @click="flag=false">取消</view>
<view style="width: 153rpx;" class="btn row rowCenter verCenter" @click="alterTallyTagBySubBoxQty()">保存打印</view>
</template>
<template v-else>
<view class="status-color">{{boxData.sub_box_qty || 1}}</view>
<view class="btn row rowCenter verCenter" v-if="boxData.erp_order_sn_num == 1" @click="flag=true" style="margin-left: 60rpx;">多子箱</view>
</template>
</view>
</view>
<!-- 列表区 -->
<view class="list" v-if="list.length > 0">
<view class="box row" v-for="(item, index) in list" :key="index">
<text class="num">{{index+1}}、</text>
<view class="status-box row verCenter">
<view class="row" style="font-size: 24rpx;color: #1969f9;margin-right: 18rpx;">{{item.declaration_type_val}}</view>
<view class="staus_type_val row rowCenter verCenter" v-if="item.is_goods_check == 1">商检</view>
</view>
<view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">入仓号:</text>
<text class="text">{{item.erp_order_sn}}</text>
</view>
<view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">型号:</text>
<text class="text">{{ item.goods_type }}</text>
<text class="tt" style="margin-left: 8rpx;">{{ item.sync_status_cn }}</text>
</view>
<view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">物料名称:</text>
<text class="text">{{item.goods_title}}</text>
</view>
<view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">品牌:</text>
<text class="text">{{ item.brand }}</text>
</view>
<view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">数量:</text>
<text class="text">{{item.tally_num}}</text>
</view>
<view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">原产地:</text>
<text class="text">{{item.origin}}</text>
</view>
<view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">净重:</text>
<text class="text">{{ item.net_weight }}</text>
</view>
<view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">理货备注:</text>
<text class="text">{{ item.remark }}</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}}</text>
</view>
<view class="input-box row" style="flex: 0 0 100%;">
<text class="label">理货照片:</text>
<view class="pick_img_list row">
<template v-if="item.goods_check_pic">
<view class="img_list" v-for="(v, i) in item.goods_check_pic.split(',')" :key="i">
<image :src="v" mode="aspectFill" @click="previewChange(item.goods_check_pic.split(','),i)"></image>
</view>
</template>
</view>
</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 class="closeBoxBtn row rowCenter verCenter" @click="closeBoxChange">确认封箱</view>
<!-- 多个纸箱提示 -->
<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';
export default {
data() {
return {
email: uni.getStorageSync('email') || '', //操作人邮箱
flag: false,
noexebshowFalg: true, //控制是否会触发生命周期
wsty_id: '',
box_sn: '',
total: 0,
page: 1,
limit: 1000,
list: [],
input_flag: false,
is_focus: true, //获取焦点动态化
boxData: {},
gross_weight: '',
sub_box_qty: '', //子箱号
searchParams: {
all_search: ''
},
allChecked: false,
checkboxItems: []
};
},
onLoad(options) {
this.wsty_id = options.wsty_id || '';
this.box_sn = options.box_sn || '';
},
onShow() {
this.resetChange();
this.getData();
this.getBoxData();
},
methods: {
/**
* 获取箱信息
*/
getBoxData() {
this.request(API.getBoxData, 'GET', { box_sn: this.box_sn }, true).then(res => {
if (res.err_code === 0) {
this.boxData = res.data.data[0];
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 获取明细信息
*/
getData() {
this.request(API.getTallyData, 'GET', { wsty_id: this.wsty_id, ...this.searchParams, is_base: 0 }, true).then(res => {
if (res.err_code === 0) {
this.list = res.data.detail;
this.total = res.data.detail.length;
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 确认封箱
*/
closeBoxChange() {
if (!this.gross_weight) {
uni.showToast({
title: '请输入总毛重',
icon: 'error'
});
return false;
}
if (isNaN(this.gross_weight)) {
uni.showToast({
title: '请输入合法数字',
icon: 'error'
});
return false;
}
if (Number(this.gross_weight) < Number(this.boxData.net_weight_sum)) {
uni.showToast({
title: '毛重不能小于总净重',
icon: 'none'
});
return false;
}
this.request(API.closeBox, 'POST', { wsty_id: this.wsty_id, gross_weight: this.gross_weight, box_sn: this.box_sn }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '操作成功',
icon: 'success',
duration: 2000
});
setTimeout(() => {
uni.navigateBack({
delta: 1
});
}, 2000);
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 重置
*/
resetChange() {
this.list = [];
this.page = 1;
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
},
/**
* 预览图片
* @param {Object} img
* @param {Object} index
*/
previewChange(arr, index) {
this.noexebshowFalg = false;
uni.previewImage({
current: index,
urls: arr
});
},
/**
* 修改子箱数量
*/
alterTallyTagBySubBoxQty() {
if (Number(this.sub_box_qty) < 1) {
uni.showToast({
title: '请输入大于0的整数',
icon: 'none',
duration: 2000
});
return false;
}
this.request(API.alterTallyTagBySubBoxQty, 'POST', { box_sn: this.box_sn, sub_box_qty: this.sub_box_qty }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '操作成功',
icon: 'success',
duration: 2000
});
setTimeout(() => {
this.print();
}, 2000)
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 打印箱号
*/
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) {
this.printConfirm(res.data);
} 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();
this.flag = false;
this.resetChange();
this.getData();
this.getBoxData();
}, 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();
}
}
};
</script>
<style scoped lang="scss">
@import '@/assets/css/tally/closeBox.scss';
</style>
\ No newline at end of file
<template>
<view class="tally-fixBox">
<view class="input-box row bothSide verCenter">
<input class="uni-input" placeholder="输入或扫描箱号" placeholder-style="color:#000;font-weight: bold;" v-model="keyword" @input="handleInput($event)" :focus="is_focus" />
<view class="row verCenter">
<view class="btn row rowCenter verCenter" @click="add()">添 加</view>
</view>
</view>
<view class="list" v-if="list.length > 0">
<scroll-view scroll-y="true" class="scroll-Y">
<view class="title">待合箱箱号:</view>
<view class="box row bothSide verCenter" v-for="(item,index) in list" :key="index">
<view class="row verCenter">
<text class="t1">{{index + 1}}.</text>
<text class="t2">{{item}}</text>
</view>
<view class="tt" @click="deleteFix(index)">删除</view>
</view>
</scroll-view>
</view>
<view class="fix-btn row rowCenter verCenter" @click="fixBox()">合 箱</view>
<!-- 关单封箱弹窗 -->
<uni-popup ref="inputDialog" type="dialog" :mask-click="true" @maskClick="maskClick">
<uni-popup-dialog ref="inputClose" mode="input" :title="title" value="" confirmText="确定" cancelText="取消" placeholder="请输入毛重" @close="dialogInputClose" @confirm="dialogInputConfirm" :before-close="true"></uni-popup-dialog>
</uni-popup>
</view>
</template>
<script>
import { API } from '@/util/api.js';
import debounce from 'lodash/debounce';
export default {
data() {
return {
email: uni.getStorageSync('email') || '', //操作人邮箱
is_focus: true, //获取焦点动态化
keyword: '',
old_box_sn_str: '',
list: [],
title: '',
box_sn: '',
wsty_id: ''
};
},
watch: {
list(arr) {
if (arr.length > 0) {
this.old_box_sn_str = arr.join(',');
} else {
this.old_box_sn_str = '';
}
}
},
methods: {
/**
* 监听输入框
* @param {Object} event
*/
handleInput: debounce(function(event) {
var inputValue = event.target.value;
if (inputValue) {
// 执行添加操作
this.add(inputValue);
// 清空输入框
this.keyword = '';
// 再次获取焦点
this.clearInputAndFocus();
}
}, 800),
/**
* 添加
*/
add() {
if (!this.keyword) {
uni.showModal({
title: '',
content: '请先扫描箱号',
showCancel: false
});
return false;
}
if (this.keyword.indexOf('-') !== -1) { // 判断字符串中是否存在 '-'
this.keyword = this.keyword.split('-')[0]; // 存在则截取 '-' 前的部分
}
// 检查输入的箱号是否已经存在于列表中
if (this.list.includes(this.keyword)) {
uni.showToast({
title: '箱号已存在,请勿重复添加',
icon: 'none'
});
// 清空输入框
this.keyword = '';
return false;
}
// 将输入的箱号添加到列表中
this.list.push(this.keyword);
// 清空输入框
this.keyword = '';
// 再次获取焦点
this.clearInputAndFocus();
},
/**
* 合箱
*/
fixBox() {
if (this.list.length == 0) {
uni.showModal({
title: '',
content: '请先扫描箱号',
showCancel: false
});
return false;
}
this.request(API.fixBox, 'POST', { old_box_sn_str: this.old_box_sn_str }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '合箱成功',
icon: 'success',
duration: 2000
});
setTimeout(() => {
this.box_sn = res.data.box_sn;
this.wsty_id = res.data.wsty_id;
this.print();
}, 2000);
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 打印箱号
*/
print() {
var params = {
type: 1,
email: this.email,
print_json: JSON.stringify([{ box_sn: this.box_sn }])
}
this.request(API.addSCTallyData, 'POST', params, true).then(res => {
if (res.code === 0) {
this.title = `箱号${this.box_sn}打印成功`;
this.$refs.inputDialog.open();
} else {
uni.showToast({
title: res.msg,
icon: 'none'
});
}
});
},
/**
* 删除
*/
deleteFix(index) {
this.list.splice(index, 1);
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
},
/**
* 点击遮罩层触发
*/
maskClick() {
this.$refs.inputDialog.close();
},
/**
* 确定
*/
dialogInputConfirm(val) {
if (!val) {
uni.showToast({
title: '请输入毛重',
icon: 'error'
});
return false;
}
// 判断 val 是否为数字
if (isNaN(val)) {
uni.showToast({
title: '请输入合法数字',
icon: 'error'
});
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.list = [];
// 再次获取焦点
this.clearInputAndFocus();
}, 2000);
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 不需要换箱
*/
dialogInputClose() {
this.$refs.inputDialog.close();
}
}
};
</script>
<style scoped lang="scss">
@import '@/assets/css/tally/fixBox.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;
}
.uni-dialog-button-group .uni-dialog-button:first-child {
display: none;
}
}
</style>
\ No newline at end of file
<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="row bothSide verCenter" style="margin-top: 15rpx;">
<view class="row show-text">
<view class="row" style="margin-right: 50rpx;">
<text class="label">箱状态:</text>
<text class="text">{{tally_status_cn[tally_status]}}</text>
</view>
<view class="row">
<text class="label">装货类型:</text>
<text class="text">{{box_type_cn[box_type]}}</text>
</view>
</view>
<view class="total-text" v-if="list.length > 0"><text>{{total}}</text>条数据</view>
</view>
<!-- 列表区 -->
<view class="list" v-if="list.length > 0">
<view class="box row" v-for="(item, index) in list" :key="index">
<text class="num">{{index+1}}</text>
<view class="status-box column">
<view class="staus_type_val row rowCenter verCenter" v-if="item.is_goods_check == 1">商检</view>
<view style="color: #484b59;font-size: 28rpx;margin-top: 2rpx;">{{item.declaration_type_val}}</view>
</view>
<view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">入仓号:</text>
<text class="text">{{item.erp_order_sn}}</text>
</view>
<view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">异常批次号:</text>
<text class="text">{{item.abnormal_batch}}</text>
</view>
<view class="input-box row verCenter">
<text class="label">型号:</text>
<text class="text">{{ item.goods_type }}</text>
</view>
<view class="input-box row verCenter">
<text class="tt">{{ item.sync_status_cn }}</text>
</view>
<view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">物料名称:</text>
<text class="text">{{item.goods_title}}</text>
</view>
<view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">品牌:</text>
<text class="text">{{ item.brand }}</text>
</view>
<view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">数量:</text>
<text class="text">{{item.tally_num}}</text>
</view>
<view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">原产地:</text>
<text class="text">{{item.origin}}</text>
</view>
<view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">净重:</text>
<text class="text">{{ item.net_weight }}</text>
</view>
<view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">理货备注:</text>
<text class="text">{{ item.remark }}</text>
</view>
<view class="input-box row verCenter" style="flex: 00 100%;">
<text class="label">理货时间:</text>
<text class="text">{{ item.tally_time }}</text>
</view>
<view class="input-box row" style="flex: 0 0 100%;">
<text class="label">理货照片:</text>
<view class="pick_img_list row">
<template v-if="item.goods_check_pic">
<view class="img_list" v-for="(v, i) in item.goods_check_pic.split(',')" :key="i">
<image :src="v" mode="aspectFill" @click="previewChange(item.goods_check_pic.split(','),i)"></image>
</view>
</template>
</view>
</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 {
noexebshowFalg: true, //控制是否会触发生命周期
wsty_id: '',
box_sn: '',
box_type: '',
box_type_cn: ['普货', '美产', '商检'],
tally_status: '',
tally_status_cn: ['理货中', '已封箱', '已装板'],
total: 0,
page: 1,
limit: 1000,
list: [],
index: 0,
array: ['全量搜索'],
detail: {}, //详情
input_flag: false,
is_focus: true, //获取焦点动态化
searchParams: {
all_search: ''
}
};
},
onLoad(options) {
this.wsty_id = options.wsty_id || '';
this.box_sn = options.box_sn || '';
this.box_type = options.box_type || '';
this.tally_status = Number(options.tally_status) - 1 || 0;
},
onShow() {
this.resetChange();
this.getData();
},
methods: {
getData() {
this.request(API.getTallyData, 'GET', { wsty_id: this.wsty_id, ...this.searchParams }, true).then(res => {
if (res.err_code === 0) {
uni.setNavigationBarTitle({
title: this.box_sn
});
this.list = res.data.detail;
this.total = res.data.detail.length;
} 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;
} else {
this.input_flag = false;
}
this.getData();
}, 500),
/**
* 重置
*/
resetChange() {
this.list = [];
this.page = 1;
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
},
/**
* 预览图片
* @param {Object} img
* @param {Object} index
*/
previewChange(arr, index) {
this.noexebshowFalg = false;
uni.previewImage({
current: index,
urls: arr
});
}
}
};
</script>
<style scoped lang="scss">
@import '@/assets/css/tally/goodsDetail.scss';
</style>
\ No newline at end of file
<template>
<view class="printBox">
<view class="input-box row bothSide verCenter">
<input class="uni-input" placeholder="输入或扫描入箱号" placeholder-style="color:#000;font-weight: bold;" v-model="box_sn" :focus="is_focus" />
<view class="row verCenter">
<text class="iconfont icon-jinggao2" @click="clearInput()" v-if="box_sn"></text>
<view class="btn row rowCenter verCenter" @click="print()">打印箱号</view>
</view>
</view>
</view>
</template>
<script>
import { API } from '@/util/api.js';
export default {
data() {
return {
email: uni.getStorageSync('email') || '', //操作人邮箱
is_focus: true, //获取焦点动态化
box_sn: ''
};
},
methods: {
print() {
if (!this.box_sn) {
uni.showModal({
title: '',
content: '请先扫描箱号',
showCancel: false
});
return false;
}
var params = {
type: 1,
email: this.email,
print_json: JSON.stringify([{ box_sn: this.box_sn }])
}
this.request(API.addSCTallyData, 'POST', params, true).then(res => {
if (res.code === 0) {
uni.showModal({
content: '打印成功,请查看打印机',
showCancel: false
});
setTimeout(() => {
this.updateTagPrintTimes(this.box_sn);
}, 2000)
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 更新统计打印标签次数
*/
updateTagPrintTimes(tag_no) {
this.request(API.updateTagPrintTimes, 'POST', { tag_no: tag_no }, true).then(res => {
});
},
/**
* 清空数据
*/
clearInput() {
this.box_sn = '';
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
},
/**
* 再次获取焦点
*/
clearInputAndFocus() {
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
}
}
};
</script>
<style scoped lang="scss">
.printBox {
margin-top: 24rpx;
height: 100vh;
padding: 0 24rpx;
overflow: hidden;
.input-box {
height: 88rpx;
background: #ffffff;
border-radius: 4rpx;
padding: 0 24rpx;
.uni-input {
font-weight: bold;
font-size: 28rpx;
color: #404547;
}
.btn {
width: 144rpx;
height: 48rpx;
background: #197adb;
border-radius: 4rpx;
font-size: 24rpx;
color: #ffffff;
}
.icon-jinggao2 {
position: relative;
font-size: 30rpx;
color: #c6c7cc;
margin-right: 30rpx;
z-index: 22;
}
}
}
</style>
\ No newline at end of file
<template>
<view class="page-box">
<!-- 时间筛选 -->
<view class="time-interval row bothSide verCenter">
<view class="time-interval-box row verCenter bothSide">
<view class="row verCenter">
<text class="iconfont icon-riqi1"></text>
<picker mode="date" @change="bindTimeChange(1, $event)">
<input type="text" class="uni-input" placeholder="请选择起始时间" placeholder-style="color:#919399" v-model="searchParams.create_time_begin" />
</picker>
</view>
<text class="iconfont icon-a-juxing111" @click="clearInput('start')" v-if="searchParams.create_time_begin != ''"></text>
</view>
<view class="time-interval-box row verCenter bothSide">
<view class="row verCenter">
<text class="iconfont icon-riqi1"></text>
<picker mode="date" @change="bindTimeChange(2, $event)">
<input type="text" class="uni-input" placeholder="请选择结束时间" placeholder-style="color:#919399" v-model="searchParams.create_time_end" />
</picker>
</view>
<text class="iconfont icon-a-juxing111" @click="clearInput('end')" v-if="searchParams.create_time_end != ''"></text>
</view>
</view>
<!-- 搜索参数 -->
<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.keyword" @input="handleInput" style="width: 100%;" />
</view>
<text class="iconfont icon-a-juxing111" @click="clearInput()" v-if="input_flag"></text>
</view>
</view>
<view class="row bothSide verCenter" style="padding: 24rpx 0;">
<view class="row verCenter">
<!-- 添加radio选项 -->
<radio-group @change="handleTallyTypeChange" class="row verCenter">
<label class="radio-item" v-for="(item, index) in tallyTypes" :key="index" style="margin-right: 18rpx;">
<radio :value="item.value" :checked="searchParams.tally_type === item.value" color="#1969f9" style="transform:scale(0.7)" />
<text>{{item.label}}</text>
</label>
</radio-group>
</view>
<view class="total-text" v-if="list.length > 0"><text>{{total}}</text>条数据</view>
</view>
<!-- 列表区 -->
<view class="list" v-if="list.length > 0">
<view class="box row" v-for="(item, index) in list" :key="index" :class="{ curr: filter_list[index] }">
<view class="check-box-icon" @click="filterChange(index)"></view>
<view class="input-box row verCenter bothSide" style="flex: 0 0 100%;">
<view style="padding-left: 62rpx;">
<text class="tt" style="color: #000;font-weight: bold;">{{ item.erp_order_sn }}</text>
</view>
<view class="row verCenter">
<text class="text">{{ item.box_sn }}</text>
<text class="text" style="margin-left: 20px" :style="item.tally_status == 1 ? 'color: red' : ''">{{ item.tally_status_val }}</text>
</view>
</view>
<view class="input-box row verCenter bothSide" style="flex: 0 0 100%;">
<view>
<text class="label">物料名称:</text>
<text class="text">{{item.goods_title}}</text>
</view>
<view class="column">
<text class="text">{{item.sync_status_val}}</text>
<text class="text">{{item.declaration_type_val}}</text>
</view>
</view>
<view class="input-box row verCenter bothSide" style="flex: 0 0 100%;">
<view>
<text class="label">型号:</text>
<text class="text">{{item.goods_type}}</text>
</view>
<view>
<view v-if="item.is_goods_check" class="staus_type_val row rowCenter verCenter" style="border: 1px solid red;color: red;padding: 10rpx;border-radius: 50%;">商检</view>
</view>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">品牌:</text>
<text class="text">{{item.brand}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">订单备注:</text>
<text class="text">{{item.order_remark}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">入库数量:</text>
<text class="text">{{item.tally_num}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">原产地:</text>
<text class="text">{{item.origin}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">净重:</text>
<template v-if="filter_edit[index]">
<input type="number" class="uni-input" placeholder-style="color:#919399" style="border: 1px solid #484b59;width: 100rpx;margin-right: 5rpx;padding-left: 5rpx;" v-model="list[index].net_weight">kg
<text class="text" style="color: #1969f9;margin-left: 30rpx;" @click="updateTallyNetWeight(item.wstydl_id,list[index].net_weight,index)">保存</text>
</template>
<template v-else>
<text class="text">{{item.net_weight}}kg</text>
<text class="text" style="color: #1969f9;margin-left: 30rpx;" @click="filterEditChange(index)" v-if="(item.box_sn && item.tally_status == 1) || !item.box_sn">修改</text>
</template>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">理货备注:</text>
<text class="text">{{item.remark}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">理货人:</text>
<text class="text">{{item.tally_user_name}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">理货时间:</text>
<text class="text">{{item.tally_time}}</text>
</view>
<view class="input-box row" style="flex: 0 0 100%;">
<text class="label">理货照片:</text>
<view class="pick_img_list row">
<template v-if="item.goods_check_pic">
<view class="img_list" v-for="(v, i) in item.goods_check_pic.split(',')" :key="i">
<image :src="v" mode="aspectFill" @click="previewChange(item.goods_check_pic.split(','),i)"></image>
</view>
</template>
</view>
</view>
<view class="btn-box row">
<view class="btn1 row rowCenter verCenter" @click="cancelTallyDetail(item)">取消理货</view>
</view>
</view>
</view>
<view class="fix-btn row verCenter" v-if="list.length > 0">
<view class="btn row rowCenter verCenter" @click="reTagPrint()">补打美产/商检标签</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';
import { createArray } from '@/util/util.js';
export default {
data() {
return {
page: 1,
limit: 30,
list: [],
index: 0,
array: ['全量搜索'],
detail: {}, //详情
input_flag: false,
total: 0,
filter_edit: [],
filter_list: [], //筛选已选中的列表
filter_id: [], //入库单列表的入库登记
is_focus: true, //获取焦点动态化
hasMoreData: true, //是否分页加载
searchParams: {
create_time_begin: '', //起始日期
create_time_end: '', //结束日期
keyword: '',
tally_type: '0'
},
tallyTypes: [
{ label: '全部', value: '0' },
{ label: '美产', value: '1' },
{ label: '商检', value: '2' }
]
};
},
onReachBottom() {
if (!this.hasMoreData) {
return;
}
this.page++;
this.getData();
},
mounted() {
},
onShow() {
this.setDefaultTimeInterval();
},
methods: {
/**
* 处理类型切换
*/
handleTallyTypeChange(e) {
this.searchParams.tally_type = e.detail.value;
this.resetChange();
this.getData();
},
/**
* 找出false对应的下标
* @param {Object} arr
* @param {Object} target
*/
findIndex(arr, target) {
const result = [];
arr.map((item, index) => {
if (item === target) {
result.push(index);
}
});
return result;
},
filterEditChange(index) {
this.$set(this.filter_edit, index, (this.filter_edit[index] = !this.filter_edit[index]));
},
/**
* 筛选过滤出选中的元素
*/
filterChange(index) {
this.$set(this.filter_list, index, (this.filter_list[index] = !this.filter_list[index]));
let filter_arr = this.findIndex(this.filter_list, true);
this.filter_id = filter_arr.map(i => this.list[i].wstydl_id);
},
/**
* 设置默认的时间区间为近10天
*/
setDefaultTimeInterval() {
const currentDate = new Date();
// 格式化日期为 YYYY-MM-DD
const formatDate = (date) => {
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
return `${year}-${month}-${day}`;
};
// 结束日期为当前日期
const create_time_end = formatDate(currentDate);
// 起始日期为10天前的日期
const create_time_begin = formatDate(new Date(currentDate.setDate(currentDate.getDate() - 10)));
// 设置到 searchParams
this.searchParams.create_time_begin = create_time_begin;
this.searchParams.create_time_end = create_time_end;
this.getData();
},
/**
* 时间选择
*/
bindTimeChange(type, e) {
this.resetChange();
if (type == 1) {
this.searchParams.create_time_begin = e.detail.value;
} else if (type == 2) {
this.searchParams.create_time_end = e.detail.value;
}
var timeA = new Date(this.searchParams.create_time_begin).getTime();
var timeB = new Date(this.searchParams.create_time_end).getTime();
if (timeB < timeA) {
uni.showToast({
title: '不能小于开始时间',
icon: 'none'
});
this.searchParams.create_time_end = this.searchParams.create_time_begin;
return false;
}
this.getData();
},
getData() {
this.request(API.getTallyRecordList, '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);
this.filter_list = createArray(this.list.length, false);
this.filter_edit = createArray(this.list.length, false);
} else {
this.hasMoreData = false;
}
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 修改理货净重
* @param {Object} wstydl_id
* @param {Object} net_weight
* @param {Object} index
*/
updateTallyNetWeight(wstydl_id, net_weight, index) {
this.request(API.updateTallyNetWeight, 'GET', { wstydl_id: wstydl_id, net_weight: net_weight }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '修改成功',
icon: 'success'
});
setTimeout(() => {
this.$set(this.filter_edit, index, false);
this.$forceUpdate();
}, 2000);
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 补打标签
*/
reTagPrint() {
if (this.filter_id.length == 0) {
uni.showToast({
title: '请勾选货品',
icon: 'error'
});
return false;
}
this.request(API.reTagPrint, 'GET', { wstydl_id: this.filter_id.join(',') }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '打印成功',
icon: 'success'
});
setTimeout(() => {
this.filter_list = createArray(this.list.length, false);
this.filter_id = [];
}, 2000);
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 预览图片
* @param {Object} img
* @param {Object} index
*/
previewChange(arr, index) {
this.noexebshowFalg = false;
uni.previewImage({
current: index,
urls: arr
});
},
/**
* 理货明细撤销(取消理货)
*/
cancelTallyDetail(item) {
//根据理货明细获取箱数
this.request(API.getBoxNumByDetailId, 'POST', { wstydl_id: item.wstydl_id }, true).then(json => {
if (json.err_code === 0) {
if (json.data > 1) {
let text = `${item.erp_order_sn}货物分部在${item.box_sn}${json.data}个子箱,请确认是否全部取消`;
uni.showModal({
title: '提示',
content: text,
success: (res) => {
if (res.confirm) {
this.request(API.cancelTallyDetail, 'POST', { wstydl_id: item.wstydl_id, wsty_id: item.wsty_id }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '操作成功',
icon: 'success'
});
setTimeout(() => {
this.resetChange();
this.getData();
}, 2000)
} 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: item.wstydl_id, wsty_id: item.wsty_id }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '操作成功',
icon: 'success'
});
setTimeout(() => {
this.resetChange();
this.getData();
}, 2000)
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
} else {
uni.showToast({
title: json.err_msg,
icon: 'none'
});
}
});
},
/**
* 全量搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
this.resetChange();
var val = event.target.value;
this.searchParams.keyword = '';
if (val) {
this.searchParams.keyword = val;
this.input_flag = true;
} else {
this.input_flag = false;
}
this.getData();
}, 500),
/**
* 清空数据
*/
clearInput(type) {
this.resetChange();
if (type == 'start') {
//清除起始时间
this.searchParams.create_time_begin = '';
this.getData();
} else if (type == 'end') {
//清除结束时间
this.searchParams.create_time_end = '';
this.getData();
} else {
this.searchParams.keyword = '';
this.input_flag = false;
this.clearInputAndFocus();
this.getData();
}
},
/**
* 重置
*/
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/record.scss';
</style>
\ No newline at end of file
<template>
<view class="page-box">
<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="button" activeColor="#197adb"></uni-segmented-control>
<view class="content">
<view class="search row verCenter bothSide">
<input type="text" placeholder="输入型号或入仓号或箱号查询" class="uni-input" placeholder-style="color:#404547" :focus="is_focus" @input="handleInput" v-model="searchParams.search_val" />
<text class="iconfont icon-a-juxing111" @click="clearInput()" v-if="input_flag"></text>
</view>
<view class="filter-box row verCenter bothSide">
<radio-group @change="handleTallyTypeChange" v-if="current != 1">
<label class="radio-item">
<radio value="0" style="transform:scale(0.7)" color="#197adb" :checked="searchParams.tally_type === '0'" />全部
</label>
<label class="radio-item">
<radio value="2" style="transform:scale(0.7)" color="#197adb" :checked="searchParams.tally_type === '2'" />商检
</label>
<label class="radio-item">
<radio value="1" style="transform:scale(0.7)" color="#197adb" :checked="searchParams.tally_type === '1'" />美产
</label>
</radio-group>
<view class="count"><text>{{total}}</text> 条数据</view>
</view>
<!-- 列表区 -->
<view class="list" v-if="list.length > 0">
<view class="box row" v-for="(item, index) in list" :key="index">
<template v-if="current === 0">
<view class="input-box row verCenter bothSide" style="flex: 0 0 100%;">
<view>
<text class="tt" style="color: #000;font-weight: bold;">{{ item.erp_order_sn }}</text>
</view>
<view class="column" style="align-items: flex-end;">
<text class="text" style="color: red;font-weight: bold;">{{ item.box_status_val }}</text>
<text class="text" style="font-weight: bold;">{{ item.declaration_type_val }}</text>
<text class="text" style="color: red;font-weight: bold;" v-if="item.is_goods_check == 1">商检</text>
</view>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">物料名称:</text>
<text class="text">{{item.goods_name}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">型号:</text>
<text class="text">{{item.model}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">品牌:</text>
<text class="text">{{item.brand}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">订单备注:</text>
<text class="text">{{item.order_remark}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">入库数量:</text>
<text class="text">{{item.qty}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">原产地:</text>
<text class="text">{{item.origin}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">净重:</text>
<text class="text">{{item.net_weight}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">理货备注:</text>
<text class="text">{{item.tally_remark}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">理货时间:</text>
<text class="text">{{item.tally_time}}</text>
</view>
<view class="input-box row" style="flex: 0 0 100%;">
<text class="label">理货照片:</text>
<view class="pick_img_list row">
<template v-if="item.tally_picture">
<view class="img_list" v-for="(v, i) in getPictureArray(item.tally_picture)" :key="i">
<image :src="v" mode="aspectFill" @click="previewChange(item.tally_picture, i)"></image>
</view>
</template>
</view>
</view>
<view class="btn-box row">
<navigator class="btn1 row rowCenter verCenter" :url="'/pages/tally/abnormalTally?abnormal_batch='+item.abnormal_batch">去装箱</navigator>
</view>
</template>
<template v-if="current === 1">
<view class="input-box row verCenter bothSide" style="flex: 0 0 100%;">
<view>
<text class="tt" style="color: #000;font-weight: bold;">{{ item.box_sn }}</text>
<text class="text" style="font-weight: bold;margin-left: 100rpx;"></text>
</view>
<view class="column" style="align-items: flex-end;">
<text class="text" style="margin-left: 20px;font-weight: bold;color: red;">{{ item.box_status_val }}</text>
</view>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">订单号:</text>
<text class="text">{{item.erp_order_sn.join(',')}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">型号数:</text>
<text class="text">{{item.model_num}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">更新时间:</text>
<text class="text">{{item.update_time}}&nbsp;&nbsp;&nbsp;&nbsp;{{item.update_user}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">创建时间:</text>
<text class="text">{{item.create_time}}&nbsp;&nbsp;&nbsp;&nbsp;{{item.create_user}}</text>
</view>
<view class="btn-box row">
<navigator class="btn1 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 class="btn1 row rowCenter verCenter" @click="getBoxStatus(item.box_sn,item.wsty_id)">去封箱</view>
</view>
</template>
<template v-if="current === 2">
<view class="input-box row verCenter bothSide" style="flex: 0 0 100%;">
<view>
<text class="tt" style="color: #000;font-weight: bold;">{{ item.box_sn }}</text>
<text class="text" style="font-weight: bold;margin-left: 100rpx;">{{ item.box_type_val }}</text>
</view>
<view class="column" style="align-items: flex-end;">
<text class="text" style="margin-left: 20px;font-weight: bold;color: red;">{{ item.box_status_val }}</text>
</view>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">订单号:</text>
<text class="text">{{item.erp_order_sn.join(',')}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">型号数:</text>
<text class="text">{{item.model_num}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">封箱时间:</text>
<text class="text">{{item.close_box_time}}&nbsp;&nbsp;&nbsp;&nbsp;{{item.close_box_user}}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">创建时间:</text>
<text class="text">{{item.create_time}}&nbsp;&nbsp;&nbsp;&nbsp;{{item.create_user}}</text>
</view>
<view class="btn-box row">
<navigator class="btn1 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>
</template>
</view>
</view>
<!-- 无数据展示 -->
<view class="no-date column rowCenter verCenter" v-else>
<text class="iconfont icon-a-juxing21"></text>
<text class="text">查不到当前数据</text>
</view>
</view>
</view>
</template>
<script>
import { API } from '@/util/api.js';
import debounce from 'lodash/debounce';
export default {
data() {
return {
noexebshowFalg: true, //控制是否会触发生命周期
page: 1,
limit: 10,
list: [],
total: 0,
items: ['已理货未装箱', '已装箱未封箱', '已封箱未报关'],
input_flag: false,
is_focus: true, //获取焦点动态化
current: 0,
searchParams: {
search_val: '',
type: '1', //获取数据类型 1.已理货未装箱,2.已装箱未封箱,3.已封箱未报关
tally_type: '0' //理货类型 0.全部 1.美产2.商检
}
};
},
onReachBottom() {
if (!this.hasMoreData) {
return;
}
this.page++;
this.getData();
},
onShow() {
this.resetChange();
this.getData();
},
methods: {
getData() {
if (!this.noexebshowFalg) {
this.noexebshowFalg = true; // 重置标志位
return;
}
this.request(API.getRetentionList, 'GET', { page: this.page, limit: this.limit, ...this.searchParams }, true).then(res => {
if (res.err_code === 0) {
this.items = [
`已理货未装箱 (${res.data.retentionDetail.unBoxedQty})`,
`已装箱未封箱 (${res.data.retentionDetail.unCloseBoxQty})`,
`已封箱未报关 (${res.data.retentionDetail.unPlateQty})`
];
this.total = res.data.total;
if (res.data.list.length > 0) {
this.hasMoreData = true;
this.list = this.list.concat(res.data.list);
} else {
this.hasMoreData = false;
}
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 全量搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
const val = event.target.value?.trim() || '';
// 重置列表和分页
this.resetChange();
// 更新搜索参数和输入状态
this.searchParams.keyword = val;
this.input_flag = Boolean(val);
// 获取数据
this.getData();
}, 500),
/**
* 去封箱
*/
getBoxStatus(box_sn, wsty_id) {
this.request(API.getBoxStatus, 'POST', { box_sn: box_sn }, true).then(res => {
if (res.err_code === 0) {
if (res.data == 1) {
uni.navigateTo({
url: '/pages/tally/closeBox?box_sn=' + box_sn + '&wsty_id=' + wsty_id
})
} else {
uni.showModal({
title: '',
content: `只有理货中的箱号才可封箱,请重新开箱`,
showCancel: false,
success: (res) => {
if (res.confirm) {
}
}
});
}
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* tab切换监听
* @param {Object} e
*/
onClickItem(e) {
if (this.current != e.currentIndex) {
this.current = e.currentIndex;
// 根据当前选项卡更新type值
this.searchParams.type = String(e.currentIndex + 1);
// 重置列表并重新获取数据
this.resetChange();
this.getData();
}
},
/**
* 将逗号分隔的图片字符串转换为数组
*/
getPictureArray(pictures) {
return pictures ? pictures.split(',').filter(Boolean) : [];
},
/**
* 预览图片
*/
previewChange(pictures, index) {
this.noexebshowFalg = false;
const imgArray = this.getPictureArray(pictures);
uni.previewImage({
current: imgArray[index],
urls: imgArray
});
},
/**
* 重置
*/
resetChange() {
this.list = [];
this.page = 1;
},
/**
* 再次获取焦点
*/
clearInput() {
this.searchParams.search_val = '';
this.input_flag = false; //关闭叉叉
this.is_focus = false;
setTimeout(() => {
this.is_focus = true;
}, 200);
},
/**
* 理货类型切换
* @param {Object} e
*/
handleTallyTypeChange(e) {
this.searchParams.tally_type = e.detail.value;
this.resetChange();
this.getData();
}
}
};
</script>
<style scoped lang="scss">
@import '@/assets/css/tally/retentionList.scss';
</style>
\ No newline at end of file
<template>
<view class="unboxing">
<view class="input-box row bothSide verCenter">
<input class="uni-input" placeholder="输入或扫描箱号" :focus="is_focus_1" placeholder-style="color:#000;font-weight: bold;" v-model="box_sn" @input="handleInput($event,1)" />
<view class="action-bar row verCenter">
<text class="iconfont icon-jinggao2" @click="clearInput(1)" v-if="box_sn"></text>
<template v-if="box_sn && is_unboxing && tallyData.detail && tallyData.detail.length > 0">
<view class="btn1 row rowCenter verCenter" @click="getBoxStatus()">重新封箱</view>
</template>
<template v-else>
<view class="btn row rowCenter verCenter" @click="unboxing()" v-if="box_sn && tallyData.detail && tallyData.detail.length > 0">开 箱</view>
</template>
</view>
</view>
<view class="column-box row verCenter">
<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_2" placeholder="输入或扫描" placeholder-style="color:#000;font-weight: bold;" style="width: 100%;" v-model="all_search" @input="handleInput($event,2)" />
</template>
<!-- digikey等供应商-->
<template v-else>
<input class="uni-input" maxlength="-1" :focus="is_focus_2" :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(2)" v-if="all_search || keyword" style="margin-right: 0;"></text>
</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">
<text class="t1">{{item.goods_type}}</text>
<text class="t2 row rowCenter verCenter" v-if="item.is_goods_check"></text>
<text class="t5 row rowCenter verCenter">{{item.sync_status_cn}}</text>
</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.erp_order_sn}}</text>
</view>
<view class="pb16 row">
<text class="t3 w130">品牌:</text>
<text class="t4">{{item.brand}}</text>
</view>
<view class="pb16 row">
<text class="t3 w130">金额:</text>
<text class="t4">{{item.total_price}}</text>
</view>
<view class="pb16 row">
<text class="t3 w130">总数量:</text>
<text class="t4">{{item.order_numbers}}</text>
</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="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">
<input class="uni-input" placeholder="选择产地" placeholder-style="color:#000;font-weight: bold;" disabled="" v-model="form[index].origin" />
</view>
</view>
<view class="pb16 row verCenter">
<text class="t3 w130">净重:</text>
<view class="input-text">
<input class="uni-input" disabled="true" 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">
<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)" />
</view>
</view>
<view class="pb16 row verCenter">
<text class="t3 w130">理货照片:</text>
<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>
</view>
</template>
<view class="default row rowCenter verCenter" v-if="image_list[index].length < 4"><text class="iconfont icon-xingzhuangjiehe"></text></view>
</view>
</view>
<view class="row" style="justify-content: flex-end;">
<view class="btn row rowCenter verCenter disabled" @click="cancelTallyDetail(index)">取消理货</view>
</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>
<!-- 选择国家 -->
<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="canelInputDialog" type="dialog" :mask-click="true" @maskClick="maskClick">
<uni-popup-dialog ref="inputClose" mode="input" title="确定取消该商品理货吗?" value="" confirmText="确定" cancelText="取消" placeholder="请输入毛重" @close="dialogInputCanelClose" @confirm="dialogInputCanelConfirm" :before-close="true"></uni-popup-dialog>
</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 {
is_unboxing: false,
is_focus_1: true, //获取焦点动态化
is_focus_2: false, //获取焦点动态化
box_sn: '',
wsty_id: '', //箱子id
keyword: '',
all_search: '', //全量搜索字段
tallyData: {}, //理货信息
goods_type: '', //商品型号
image_list: [], //图片列表
filter_status: [], //控制状态
origin_list: [], //产地
curr: -1, //当前打开的是哪个产地
origin: '', //搜索国家携带的参数
form: {},
formIndex: -1, //记录打开了那个物料
title: '',
gross_weight: '',
index: 0,
item: ['全量', 'DigiKey', 'Rochester', 'TME', 'Chip1stop'],
net_weight_total: 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 // 深度监听
}
},
methods: {
/**
* 点击遮罩层触发
*/
maskClick() {
this.$refs.inputDialog.close();
this.$refs.canelInputDialog.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;
this.clearInput(2);
},
/**
* 选择国家确认-关闭弹窗
*/
confirmChange() {
this.$refs.popup.close();
},
/**
* @param {Object} event 输入框监听
*/
handleInput: debounce(function(event, type) {
var value = event.target.value;
if (type == 1) {
if (value) {
if (value.indexOf('-') !== -1) { // 判断字符串中是否存在 '-'
value = value.split('-')[0]; // 存在则截取 '-' 前的部分
}
this.box_sn = value;
this.getTallyData();
}
} else if (type == 2) {
if (value) {
uni.hideKeyboard();
this.identifyQrCodeNumAndSn();
} else {
this.goods_type = '';
this.keyword = '';
this.all_search = '';
this.getTallyData();
}
} else if (type == 3) {
this.origin_list = []; //数组清空
this.getOriginCn();
}
}, 500),
/**
*筛选过滤出选中的元素
*/
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();
},
/**
* 开箱
*/
unboxing() {
if (!this.box_sn) {
uni.showModal({
title: '',
content: '请先扫描箱号',
showCancel: false
});
return false;
}
this.request(API.reOpenBox, 'POST', { box_sn: this.box_sn }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '开箱成功',
icon: 'success'
})
//这里的必须性是为了拿到箱子id
setTimeout(() => {
this.request(API.getBoxSn, 'POST', { box_sn: this.box_sn }, true).then(res => {
if (res.err_code === 0) {
this.wsty_id = res.data.wsty_id;
this.is_unboxing = true; //表示开箱成功
this.getTallyData();
}
});
}, 2000)
} else {
this.form = [];
uni.showModal({
title: '',
content: res.err_msg,
showCancel: false
});
}
});
},
/**
* 打开弹窗
* @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();
},
/**
* 获取产地
*/
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'
});
}
});
},
/**
* 获取产地升级版
*/
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'
});
}
});
},
/**
* 识别
*/
identifyQrCodeNumAndSn() {
if (!this.box_sn) {
uni.showModal({
title: '',
content: '请先取箱号!并将打印的箱号贴于外箱上',
showCancel: false
});
return false;
}
if (this.index == 0) {
//区分其他
this.goods_type = '';
this.getTallyData();
} else {
this.all_search = '';
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; // 设置标志,防止重复发送请求
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) {
//排除已理货的数据
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'
});
}
});
}
}
},
/**
* 获取锁定理货信息
*
*/
getTallyData(callback) {
this.request(API.getTallyData, 'POST', { box_sn: this.box_sn, goods_type: this.goods_type, all_search: this.all_search }, 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) => ({
box_tally_status: item.box_tally_status, //箱状态
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: item.erp_order_sn, // 入仓号
box_sn: this.box_sn, // 箱子
is_goods_check: item.is_goods_check, //是否商检
sync_status: item.sync_status, //明细同步状态
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'
});
}
});
},
/**
* 理货明细提交
*/
submitTallyDetail(index) {
var tally_num = parseInt(this.form[index].tally_num);
var netWeight = parseFloat(this.form[index].net_weight);
if (!this.box_sn) {
uni.showModal({
title: '',
content: '请先取箱号!并将打印的箱号贴于外箱上',
showCancel: false
});
return false;
}
if (!tally_num) {
uni.showToast({
title: '请填写入库数量',
icon: 'error'
});
return false;
}
if (!this.form[index].origin) {
uni.showToast({
title: '请填写原产地',
icon: 'error'
});
return false;
}
if (!netWeight) {
uni.showToast({
title: '请填写净重',
icon: 'error'
});
return false;
}
if (this.form[index].is_goods_check) {
if (!this.form[index].goods_check_pic) {
uni.showToast({
title: '该物料为商检,必须要上传图片',
icon: 'none'
});
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
});
//理货提交成功后自动清空型号查询框
this.keyword = '';
this.goods_type = '';
setTimeout(() => {
this.getTallyData();
}, 2000);
} else if (res.err_code === 10000) {
uni.showModal({
title: '',
content: res.err_msg,
showCancel: false,
success: (res) => {
if (res.confirm) {
// 用户点击确定按钮后的操作
this.getTallyData();
}
}
});
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 理货明细撤销
*/
cancelTallyDetail(index) {
//A、若该箱状态为“理货中”则,直接取消成功。
if (this.form[index].box_tally_status == 1) {
//执行关单封箱弹窗毛重填写
this.$refs.canelInputDialog.open();
this.formIndex = index;
return false;
}
//B、若该箱状态为“已封箱”则,则需校验该物料明细的推送状态
if (this.form[index].box_tally_status == 2) {
//明细为推送成功、推送中:该物料已推送金蝶,请联系关务取消推送再进行取出
if (this.form[index].sync_status == 2 || this.form[index].sync_status == 3) {
uni.showModal({
content: '该物料已推送金蝶,请联系关务取消推送再进行取出',
success: (res) => {
if (res.confirm) {
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
return false;
}
//明细为未推送、推送失败:则提示该箱已封箱,是否确认取出?确认后,则将该物料从箱子中剔除,回到异常待装箱中
if (this.form[index].sync_status == 1 || this.form[index].sync_status == 4) {
uni.showModal({
title: '',
content: '该箱已封箱,是否确认从该箱中取出?',
confirmText: '确认取出',
success: (res) => {
if (res.confirm) {
//执行关单封箱弹窗毛重填写
this.$refs.canelInputDialog.open();
this.formIndex = index;
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
return false;
}
}
//C、若校验箱状态为“已装板”时,则提示:该箱已装板,请先取消装板
if (this.form[index].box_tally_status == 3) {
uni.showModal({
content: '该箱已装板,请先取消装板',
success: (res) => {
if (res.confirm) {
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
return false;
}
},
/**
* 关单封箱
*/
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.box_sn}已经全部验货完毕是否更换新的箱子?\n\n总净重:${this.net_weight_total}`;
this.$refs.inputDialog.open();
},
/**
* 获取箱状态
*/
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'
});
}
});
},
/**
* 新箱子
*/
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', { box_sn: this.box_sn, gross_weight: val }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '操作成功',
icon: 'success',
duration: 2000
});
setTimeout(() => {
this.box_sn = '';
this.tallyData = [];
this.$refs.inputDialog.close();
this.clearInput(1)
}, 2000);
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 不需要换箱
*/
dialogInputClose() {
var val = this.gross_weight * 1;
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', { box_sn: this.box_sn, gross_weight: val }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '操作成功',
icon: 'success',
duration: 2000
});
setTimeout(() => {
this.is_unboxing = false; //表示开箱成功
this.$refs.inputDialog.close()
}, 2000);
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 取消理货取消
*/
dialogInputCanelClose() {
this.$refs.canelInputDialog.close();
},
/**
* 取消理货确认
*/
dialogInputCanelConfirm(val) {
if (!val) {
uni.showToast({
title: '请输入毛重',
icon: 'error'
});
return false;
}
this.request(API.getBoxNumByDetailId, 'POST', { wstydl_id: this.form[this.formIndex].wstydl_id }, true).then(json => {
if (json.err_code === 0) {
if (json.data > 1) {
let text = `${this.form[this.formIndex].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[this.formIndex].wstydl_id, box_sn: this.box_sn, gross_weight: val }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '取消理货成功',
icon: 'success',
duration: 2000
});
setTimeout(() => {
this.$refs.canelInputDialog.close();
this.getTallyData();
}, 2000);
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
} else {
this.request(API.cancelTallyDetail, 'POST', { wstydl_id: this.form[this.formIndex].wstydl_id, box_sn: this.box_sn, gross_weight: val }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '取消理货成功',
icon: 'success',
duration: 2000
});
setTimeout(() => {
this.$refs.canelInputDialog.close();
this.getTallyData();
}, 2000);
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
}
} else {
uni.showToast({
title: json.err_msg,
icon: 'none'
});
}
});
},
/**
* 查看备注
*/
viewChange(val) {
uni.showModal({
title: '',
content: val,
showCancel: false,
confirmText: '关闭'
});
},
/**
* 清空数据
*/
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.all_search = '';
this.keyword = '';
this.goods_type = '';
this.is_focus_2 = false;
this.getTallyData();
setTimeout(() => {
this.is_focus_2 = true;
}, 200);
}
},
}
};
</script>
<style scoped lang="scss">
@import '@/assets/css/tally/unboxing.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
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