|
@@ -10,14 +10,15 @@
|
|
<view class="padding-container" v-if='pendingShow'>
|
|
<view class="padding-container" v-if='pendingShow'>
|
|
<scroll-view class="scroll-container" scroll-y>
|
|
<scroll-view class="scroll-container" scroll-y>
|
|
<view v-for="(item, index) in listData" :key="index"
|
|
<view v-for="(item, index) in listData" :key="index"
|
|
- :class="{'list-item':true,'selected':isSelected(item)}" >
|
|
|
|
|
|
+ :class="{'list-item':true,'selected':isSelected(item)}">
|
|
<!-- @click="handleSelection(item)" -->
|
|
<!-- @click="handleSelection(item)" -->
|
|
<view class="title-container uni-row">
|
|
<view class="title-container uni-row">
|
|
<view class="title uni-row">
|
|
<view class="title uni-row">
|
|
<text class="label">{{ item['dictDataLabel'] }}</text>
|
|
<text class="label">{{ item['dictDataLabel'] }}</text>
|
|
<text class="label code">{{ item['process'].processAlias }}</text>
|
|
<text class="label code">{{ item['process'].processAlias }}</text>
|
|
<text class="label code" style="margin-left: 16rpx;">→</text>
|
|
<text class="label code" style="margin-left: 16rpx;">→</text>
|
|
- <text class="label code" style="margin-left: 16rpx;">{{ item['nextProcess'].processAlias }}</text>
|
|
|
|
|
|
+ <text class="label code"
|
|
|
|
+ style="margin-left: 16rpx;">{{ item['nextProcess'].processAlias }}</text>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view class="right-info uni-row">
|
|
<view class="right-info uni-row">
|
|
@@ -57,14 +58,16 @@
|
|
<scroll-view class="scroll-container" scroll-y>
|
|
<scroll-view class="scroll-container" scroll-y>
|
|
<!-- 循环周转中的数据 -->
|
|
<!-- 循环周转中的数据 -->
|
|
<view class='item-container'>
|
|
<view class='item-container'>
|
|
- <view class="turnover-title uni-row">
|
|
|
|
- <view class="uni-row">
|
|
|
|
- <view><text class='title-color'>{{turnoverContentTitle}}</text></view>
|
|
|
|
|
|
+ <view v-if="products.length > 0" class="turnover-title uni-row">
|
|
|
|
+ <view class="uni-row" style="align-items: center;">
|
|
|
|
+ <view><text class='title-color'>{{turnoverContentTitle}}箱</text></view>
|
|
<view><text class="second-info">{{turnoverSecondTitle}}</text></view>
|
|
<view><text class="second-info">{{turnoverSecondTitle}}</text></view>
|
|
</view>
|
|
</view>
|
|
- <!-- <view><text class="label">周转中</text></view> -->
|
|
|
|
|
|
+ <view><text class="label">周转中</text></view>
|
|
</view>
|
|
</view>
|
|
- <view :class="{'list-container':true,'selected':isSelected(item)}" v-for="(item,index) in products" :key='index' @click="handleSelection(item)">
|
|
|
|
|
|
+ <view :class="{'list-container':true,'selected':isSelected(item)}" v-for="(item,index) in products"
|
|
|
|
+ :key='index'>
|
|
|
|
+ <!-- @click="handleSelection(item)" -->
|
|
<view class="list-container-item product-description uni-row">
|
|
<view class="list-container-item product-description uni-row">
|
|
<text class="label left-value">产品描述</text>
|
|
<text class="label left-value">产品描述</text>
|
|
<text class="label right-value">{{item['productDescription']}}</text>
|
|
<text class="label right-value">{{item['productDescription']}}</text>
|
|
@@ -105,13 +108,18 @@
|
|
import {
|
|
import {
|
|
getDayWorkItemList
|
|
getDayWorkItemList
|
|
} from '@/api/business/dayWorkItem.js'
|
|
} from '@/api/business/dayWorkItem.js'
|
|
- import { updateDayWorkItem,updateDayWorkItemBatch } from '@/api/business/dayWorkItem.js'
|
|
|
|
- import { getDictInfoByType } from '@/api/dict/dict.js'
|
|
|
|
|
|
+ import {
|
|
|
|
+ updateDayWorkItem,
|
|
|
|
+ updateDayWorkItemBatch
|
|
|
|
+ } from '@/api/business/dayWorkItem.js'
|
|
|
|
+ import {
|
|
|
|
+ getDictInfoByType
|
|
|
|
+ } from '@/api/dict/dict.js'
|
|
|
|
|
|
|
|
|
|
const pendingTitle = ref('待周转')
|
|
const pendingTitle = ref('待周转')
|
|
const turnoverTitle = ref('周转中')
|
|
const turnoverTitle = ref('周转中')
|
|
- const turnoverContentTitle = ref('')
|
|
|
|
|
|
+ const turnoverContentTitle = ref(0)
|
|
const turnoverSecondTitle = ref('')
|
|
const turnoverSecondTitle = ref('')
|
|
const sum = ref(0)
|
|
const sum = ref(0)
|
|
const pendingClass = ref({
|
|
const pendingClass = ref({
|
|
@@ -134,7 +142,7 @@
|
|
|
|
|
|
function init() {
|
|
function init() {
|
|
getDayWorkItemList({
|
|
getDayWorkItemList({
|
|
- status: 3
|
|
|
|
|
|
+ status: 4
|
|
}).then(res => {
|
|
}).then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
listData.value = res.rows;
|
|
listData.value = res.rows;
|
|
@@ -146,51 +154,55 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
getDayWorkItemList({
|
|
getDayWorkItemList({
|
|
- status: 4
|
|
|
|
|
|
+ status: 5
|
|
}).then(res => {
|
|
}).then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
products.value = res.rows;
|
|
products.value = res.rows;
|
|
// 设置箱数
|
|
// 设置箱数
|
|
- for (var i = 0; i < products.value.length; i++) {
|
|
|
|
|
|
+ for (let i = 0; i < products.value.length; i++) {
|
|
products.value[i].carriers = products.value[i].carrierName.split('、').length;
|
|
products.value[i].carriers = products.value[i].carrierName.split('、').length;
|
|
|
|
+ turnoverContentTitle.value += products.value[i].carriers;
|
|
}
|
|
}
|
|
|
|
+ // 设置总数和目标
|
|
|
|
+ turnoverSecondTitle.value = products.value[0].process.processAlias + " → " + products.value[0]
|
|
|
|
+ .nextProcess.processAlias
|
|
console.log(res)
|
|
console.log(res)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
- function reflush(){
|
|
|
|
|
|
+
|
|
|
|
+ function reflush() {
|
|
init();
|
|
init();
|
|
}
|
|
}
|
|
-
|
|
|
|
- function handleConfirmUnbind(){
|
|
|
|
|
|
+
|
|
|
|
+ function handleConfirmUnbind() {
|
|
handleDoTurn();
|
|
handleDoTurn();
|
|
}
|
|
}
|
|
-
|
|
|
|
- function handleStartTurn(){
|
|
|
|
|
|
+
|
|
|
|
+ function handleStartTurn() {
|
|
// if(selection.value.length > 0){
|
|
// if(selection.value.length > 0){
|
|
// let msg = '是否确认周转?';
|
|
// let msg = '是否确认周转?';
|
|
// confirm.value.open(msg);
|
|
// confirm.value.open(msg);
|
|
// }
|
|
// }
|
|
// turnoverTask.value.open(selection.value);
|
|
// turnoverTask.value.open(selection.value);
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url:"/pages/startTurnover/index"
|
|
|
|
|
|
+ url: "/pages/startTurnover/index"
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
- function handleConfirmDelivery(){
|
|
|
|
- if(selection.value.length > 0){
|
|
|
|
|
|
+
|
|
|
|
+ function handleConfirmDelivery() {
|
|
|
|
+ if(products.value.length > 0){
|
|
let msg = '是否确认送达?';
|
|
let msg = '是否确认送达?';
|
|
confirm.value.open(msg);
|
|
confirm.value.open(msg);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
- function handleDoTurn(){
|
|
|
|
|
|
+
|
|
|
|
+ function handleDoTurn() {
|
|
// 设置周转状态
|
|
// 设置周转状态
|
|
- for (var i = 0; i < selection.value.length; i++) {
|
|
|
|
- selection.value[i].status = selection.value[i].status == '4'? '5' : '4';
|
|
|
|
|
|
+ for (var i = 0; i < products.value.length; i++) {
|
|
|
|
+ products.value[i].status = '6';
|
|
}
|
|
}
|
|
- updateDayWorkItemBatch(selection.value).then(res => {
|
|
|
|
|
|
+ updateDayWorkItemBatch(products.value).then(res => {
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
icon: 'success',
|
|
icon: 'success',
|
|
@@ -209,7 +221,7 @@
|
|
// 清空选中数组
|
|
// 清空选中数组
|
|
selection.value = [];
|
|
selection.value = [];
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
function isSelected(item) {
|
|
function isSelected(item) {
|
|
return selection.value.includes(item);
|
|
return selection.value.includes(item);
|
|
}
|
|
}
|
|
@@ -379,7 +391,8 @@
|
|
.turnover-container {
|
|
.turnover-container {
|
|
.scroll-container {
|
|
.scroll-container {
|
|
.item-container {
|
|
.item-container {
|
|
- padding: 8rpx 0 32rpx 0;
|
|
|
|
|
|
+ // height: 90%;
|
|
|
|
+ // padding: 8rpx 0 32rpx 0;
|
|
margin: 0 24rpx;
|
|
margin: 0 24rpx;
|
|
margin-bottom: 24rpx;
|
|
margin-bottom: 24rpx;
|
|
background-color: rgba(255, 255, 255, 1);
|
|
background-color: rgba(255, 255, 255, 1);
|
|
@@ -427,12 +440,12 @@
|
|
|
|
|
|
.title-color {
|
|
.title-color {
|
|
color: rgba(22, 132, 252, 1);
|
|
color: rgba(22, 132, 252, 1);
|
|
- font-size: 32rpx;
|
|
|
|
|
|
+ font-size: 36rpx;
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
}
|
|
}
|
|
|
|
|
|
.second-info {
|
|
.second-info {
|
|
- font-size: 32rpx;
|
|
|
|
|
|
+ font-size: 36rpx;
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
margin-left: 32rpx;
|
|
margin-left: 32rpx;
|
|
}
|
|
}
|