Commit 089f82d5 by LJM

报关

parent 221827d6
.home-index { .check-in {
padding-bottom: 158rpx;
.head { .head {
padding-top: 12rpx; border-top: 1rpx solid #cad9e0;
height: 180rpx; padding: 0 24rpx;
height: 100rpx;
background: #ffffff; background: #ffffff;
border-bottom: 1px solid #e6edf0; .icon-riqi1 {
padding-left: 28rpx; font-size: 36rpx;
padding-right: 24rpx; color: #6e767a;
.box {
.icon-juxing {
font-size: 120rpx;
color: #197adb;
margin-right: 24rpx;
}
.t1 {
font-size: 36rpx;
color: #197adb;
font-weight: bold;
}
.t2 {
font-size: 24rpx;
color: #404547;
margin-top: 12rpx;
}
.t3 {
font-size: 22rpx;
color: #6e767a;
}
} }
} .tt {
.fast-entry { margin-left: 12rpx;
position: relative; font-size: 28rpx;
background: #ffffff; color: #1e2021;
padding-top: 24rpx;
&::after {
position: absolute;
bottom: 0px;
left: 0;
right: 0;
width: 100%;
height: 1px;
background-color: #ffffff;
content: '';
} }
.tit { .time-box {
font-size: 24rpx; font-size: 24rpx;
color: #6e767a;
}
.uni-input {
margin-right: 12rpx;
}
.icon-sanjiaoxing3 {
font-size: 17rpx;
color: #9ca8ad;
}
}
.title {
padding-left: 24rpx;
margin-top: 32rpx;
background-color: #ffffff;
height: 93rpx;
.arrow {
width: 12rpx;
height: 12rpx;
background: #197adb;
border-radius: 50%;
margin-right: 16rpx;
}
.tt {
font-size: 32rpx;
color: #1e2021; color: #1e2021;
font-weight: bold; font-weight: bold;
margin-bottom: 36rpx;
padding-left: 24rpx;
} }
.bar { }
flex-wrap: wrap; .uni-table {
.box { padding: 0 24rpx 120rpx 24rpx;
position: relative; background: #fff;
flex: 1; .uni-th {
height: 177rpx; height: 62rpx;
border-right: 1px solid #e6edf0; background: #fff;
border-bottom: 1px solid #e6edf0; border-top: 1px solid #cad9e0;
&:nth-of-type(3n) { border-bottom: 1px solid #cad9e0;
border-right: 1px solid transparent; text {
} flex: 0 0 20%;
.num { font-size: 22rpx;
position: absolute; color: #404547;
right: 32rpx; border-right: 1px solid #cad9e0;
top: 5rpx; &:last-child {
width: 42rpx; border-right: none;
height: 32rpx;
background: #bb3434;
border-radius: 16rpx;
font-size: 20rpx;
color: #ffffff;
} }
.iconfont { }
font-size: 64rpx; }
color: #197adb; .uni-tr {
height: 100%;
background: #fff;
border-bottom: 1px solid #cad9e0;
text {
flex: 0 0 20%;
font-size: 22rpx;
color: #6e767a;
border-right: 1px solid #cad9e0;
padding: 8rpx 0;
&:last-child {
border-right: none;
} }
.text { &.color {
margin-top: 8rpx; color: #0079fe;
font-size: 22rpx;
color: #404547;
} }
} }
} }
} }
.scan {
position: fixed;
bottom: 50rpx;
left: 0;
right: 0;
width: 301rpx;
height: 86rpx;
background: #197adb;
box-shadow: 0px 9rpx 10rpx 0px rgba(0, 0, 0, 0.11);
border-radius: 43rpx;
margin: 0 auto;
.icon-juxing2 {
font-size: 48rpx;
color: #ffffff;
margin-right: 28rpx;
}
.tt {
font-size: 32rpx;
color: #ffffff;
}
}
} }
.home-index { .futureGoods {
padding-bottom: 158rpx;
.head { .head {
padding-top: 12rpx; border-top: 1rpx solid #cad9e0;
height: 180rpx; padding: 0 24rpx;
height: 100rpx;
background: #ffffff; background: #ffffff;
border-bottom: 1px solid #e6edf0; .icon-riqi1 {
padding-left: 28rpx; font-size: 36rpx;
padding-right: 24rpx; color: #6e767a;
.box {
.icon-juxing {
font-size: 120rpx;
color: #197adb;
margin-right: 24rpx;
}
.t1 {
font-size: 36rpx;
color: #197adb;
font-weight: bold;
}
.t2 {
font-size: 24rpx;
color: #404547;
margin-top: 12rpx;
}
.t3 {
font-size: 22rpx;
color: #6e767a;
}
} }
} .tt {
.fast-entry { margin-left: 12rpx;
position: relative; font-size: 28rpx;
background: #ffffff; color: #1e2021;
padding-top: 24rpx;
&::after {
position: absolute;
bottom: 0px;
left: 0;
right: 0;
width: 100%;
height: 1px;
background-color: #ffffff;
content: '';
} }
.tit { .time-box {
font-size: 24rpx; font-size: 24rpx;
color: #6e767a;
}
.uni-input {
margin-right: 12rpx;
}
.icon-sanjiaoxing3 {
font-size: 17rpx;
color: #9ca8ad;
}
}
.title {
padding-left: 24rpx;
margin: 32rpx 24rpx 0 24rpx;
background-color: #ffffff;
height: 93rpx;
.arrow {
width: 12rpx;
height: 12rpx;
background: #197adb;
border-radius: 50%;
margin-right: 16rpx;
}
.tt {
font-size: 32rpx;
color: #1e2021; color: #1e2021;
font-weight: bold; font-weight: bold;
margin-bottom: 36rpx;
padding-left: 24rpx;
} }
.bar { }
flex-wrap: wrap; .uni-table-box {
.box { padding-bottom: 50rpx;
position: relative; margin: 0 24rpx;
flex: 1; background-color: #ffffff;
height: 177rpx; ::v-deep .uni-table-scroll {
border-right: 1px solid #e6edf0; }
border-bottom: 1px solid #e6edf0; ::v-deep .uni-table {
&:nth-of-type(3n) { min-width: 100% !important;
border-right: 1px solid transparent;
}
.num {
position: absolute;
right: 32rpx;
top: 5rpx;
width: 42rpx;
height: 32rpx;
background: #bb3434;
border-radius: 16rpx;
font-size: 20rpx;
color: #ffffff;
}
.iconfont {
font-size: 64rpx;
color: #197adb;
}
.text {
margin-top: 8rpx;
font-size: 22rpx;
color: #404547;
}
}
} }
} }
.scan { .fix-box {
position: fixed; position: fixed;
bottom: 50rpx; bottom: 0;
left: 0; width: 100%;
right: 0; height: 98rpx;
width: 301rpx; background: #ffffff;
height: 86rpx; padding: 0 24rpx;
background: #197adb; .t1 {
box-shadow: 0px 9rpx 10rpx 0px rgba(0, 0, 0, 0.11); font-size: 22rpx;
border-radius: 43rpx; color: #404547;
margin: 0 auto;
.icon-juxing2 {
font-size: 48rpx;
color: #ffffff;
margin-right: 28rpx;
} }
.tt { .t2 {
font-size: 32rpx; font-size: 32rpx;
color: #197adb;
font-weight: bold;
}
.btn {
width: 252rpx;
height: 78rpx;
background: #bb3434;
border-radius: 4rpx;
font-size: 28rpx;
color: #ffffff; color: #ffffff;
} }
} }
} }
::v-deep {
.uni-table-scroll {
width: auto !important;
margin: 0 24rpx;
}
.checkbox {
width: 45px !important;
display: flex !important;
align-items: center;
}
.disabledClass {
.checkbox {
.is-checked {
background-color: #e6edf0 !important;
border-color: #e6edf0 !important;
}
}
}
.uni-table-tr {
display: flex !important;
}
.uni-table-th,
.uni-table-td {
width: 25% !important;
display: flex !important;
font-weight: normal !important;
}
.uni-table-td {
border-right: 1px #ebeef5 solid;
}
}
.home-index { .declaration-index {
padding-bottom: 158rpx;
.head { .head {
padding-top: 12rpx; border-top: 1rpx solid #cad9e0;
height: 180rpx; padding: 0 24rpx;
height: 100rpx;
background: #ffffff; background: #ffffff;
border-bottom: 1px solid #e6edf0; .icon-riqi1 {
padding-left: 28rpx; font-size: 36rpx;
padding-right: 24rpx; color: #6e767a;
.box {
.icon-juxing {
font-size: 120rpx;
color: #197adb;
margin-right: 24rpx;
}
.t1 {
font-size: 36rpx;
color: #197adb;
font-weight: bold;
}
.t2 {
font-size: 24rpx;
color: #404547;
margin-top: 12rpx;
}
.t3 {
font-size: 22rpx;
color: #6e767a;
}
} }
} .tt {
.fast-entry { margin-left: 12rpx;
position: relative; font-size: 28rpx;
background: #ffffff; color: #1e2021;
padding-top: 24rpx;
&::after {
position: absolute;
bottom: 0px;
left: 0;
right: 0;
width: 100%;
height: 1px;
background-color: #ffffff;
content: '';
} }
.tit { .time-box {
font-size: 24rpx; font-size: 24rpx;
color: #1e2021; color: #6e767a;
}
.uni-input {
margin-right: 12rpx;
}
.icon-sanjiaoxing3 {
font-size: 17rpx;
color: #9ca8ad;
}
}
.content {
padding-top: 40rpx;
.t1 {
font-size: 28rpx;
color: #404547;
margin-bottom: 16rpx;
text-align: center;
}
.t2 {
font-size: 42rpx;
color: #197adb;
font-weight: bold; font-weight: bold;
margin-bottom: 36rpx; text-align: center;
padding-left: 24rpx; margin-bottom: 70rpx;
} }
.bar { .btn-box {
flex-wrap: wrap; position: relative;
.box { .btn {
position: relative; width: 488rpx;
flex: 1; height: 128rpx;
height: 177rpx; background: #197adb;
border-right: 1px solid #e6edf0; border-radius: 4rpx;
border-bottom: 1px solid #e6edf0; font-size: 28rpx;
&:nth-of-type(3n) { color: #ffffff;
border-right: 1px solid transparent; margin-bottom: 120rpx;
font-weight: bold;
&.curr {
background: #cad9e0;
color: #404547;
} }
.num { }
position: absolute; .is {
right: 32rpx; position: absolute;
top: 5rpx; bottom: 72rpx;
width: 42rpx; left: 0;
height: 32rpx; right: 0;
background: #bb3434; .time {
border-radius: 16rpx; font-size: 26rpx;
font-size: 20rpx; color: #404547;
color: #ffffff; margin-right: 36rpx;
} }
.iconfont { .author {
font-size: 64rpx; font-size: 26rpx;
color: #197adb; color: #197adb;
} }
.text { .status {
margin-top: 8rpx; font-size: 26rpx;
font-size: 22rpx;
color: #404547; color: #404547;
} }
} }
} }
} }
.scan { .fix-btn {
position: fixed; position: fixed;
bottom: 50rpx; bottom: 110rpx;
left: 0; left: 0;
right: 0; right: 0;
width: 301rpx; width: 100%;
height: 86rpx; .entry-btn {
background: #197adb; margin: 0 24rpx;
box-shadow: 0px 9rpx 10rpx 0px rgba(0, 0, 0, 0.11); height: 88rpx;
border-radius: 43rpx; background: #bb3434;
margin: 0 auto; border-radius: 4rpx;
.icon-juxing2 { font-size: 28rpx;
font-size: 48rpx;
color: #ffffff; color: #ffffff;
margin-right: 28rpx;
} }
.tt { .statistics {
font-size: 32rpx; margin-top: 24rpx;
color: #ffffff; padding: 10rpx 0;
background-color: #ffffff;
.iconfont {
font-size: 44rpx;
color: #404547;
margin-bottom: 4rpx;
}
.tt {
font-size: 20rpx;
color: #6e767a;
}
} }
} }
} }
...@@ -11,6 +11,22 @@ ...@@ -11,6 +11,22 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-sanjiaoxing3:before {
content: "\e78b";
}
.icon-chakanbeizhu:before {
content: "\e78c";
}
.icon-riqi1:before {
content: "\e78d";
}
.icon-juxing10:before {
content: "\e78e";
}
.icon-weixin:before { .icon-weixin:before {
content: "\e600"; content: "\e600";
} }
......
<template> <template>
<view class="mine-index"></view> <view class="check-in">
<view class="head row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-riqi1"></text>
<text class="tt">报关日期选择</text>
</view>
<view class="time-box">
<picker mode="date" :value="date" @change="bindDateChange">
<view class="row verCenter">
<view class="uni-input">{{ date }}</view>
<text class="iconfont icon-sanjiaoxing3"></text>
</view>
</picker>
</view>
</view>
<view class="title row verCenter">
<text class="arrow"></text>
<text class="tt">报关单列表</text>
</view>
<view class="uni-table">
<view class="uni-th row">
<text class="row verCenter rowCenter">报告时间</text>
<text class="row verCenter rowCenter">查车确认</text>
<text class="row verCenter rowCenter">通关确认</text>
<text class="row verCenter rowCenter">入库确认</text>
<text class="row verCenter rowCenter">未来</text>
</view>
<template v-if="list.length > 0">
<view class="uni-tr row verCenter" v-for="(item, index) in list" :key="index">
<text class="row verCenter rowCenter">{{ item.date || '-' }}</text>
<text class="row verCenter rowCenter">{{ item.car_confirm_time || '-' }}</text>
<text class="row verCenter rowCenter">{{ item.pass_customs_time || '-' }}</text>
<text class="row verCenter rowCenter">{{ item.sz_getgoods_time || '-' }}</text>
<text class="row verCenter rowCenter">{{ item.no_num }}</text>
</view>
</template>
<template v-else>
<view class="uni-tr row verCenter"><text class="row verCenter rowCenter" style="flex:0 0 100%">暂无数据</text></view>
</template>
</view>
</view>
</template> </template>
<script> <script>
import { API } from '@/util/api.js'; import { API } from '@/util/api.js';
export default { export default {
data() { data() {
return {}; const currentDate = this.getDate({
format: true
});
return {
date: currentDate,
list: []
};
}, },
onShow() { onShow() {
this.getData(); this.getData();
}, },
methods: { methods: {
bindDateChange: function(e) {
this.date = e.detail.value;
this.getData();
},
getDate() {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
month = month > 9 ? month : '0' + month;
day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`;
},
getData() { getData() {
this.request(API.userInfo, 'POST', {}, false).then(res => { this.request(API.getCustomsDeclarationAndReceiptStatistics, 'GET', { date: this.date }, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
if (res.data.length > 0) {
this.is_loading = false;
this.list = res.data;
} else {
this.list = [];
}
} else { } else {
uni.showToast({
title: res.err_msg,
icon: 'error'
});
} }
}); });
} }
......
<template> <template>
<view class="mine-index"></view> <view class="futureGoods">
<view class="head row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-riqi1"></text>
<text class="tt">报关日期选择</text>
</view>
<view class="time-box">
<picker mode="date" :value="date" @change="bindDateChange">
<view class="row verCenter">
<view class="uni-input">{{ date }}</view>
<text class="iconfont icon-sanjiaoxing3"></text>
</view>
</picker>
</view>
</view>
<view class="title row verCenter">
<text class="arrow"></text>
<text class="tt">报关单列表</text>
</view>
<view class="uni-table-box">
<uni-table type="selection" border stripe emptyText="暂无更多数据" @selection-change="selectionChange">
<uni-tr>
<uni-th align="center">入仓号</uni-th>
<uni-th align="center">车序</uni-th>
<uni-th align="center">汇总件数</uni-th>
<uni-th align="center">到货状态</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in list" :key="index" :disabledClass="item.status == '未来货'">
<uni-td align="center">{{ item.entrustNo || '' }}</uni-td>
<uni-td align="center">{{ item.car_sort || '' }}</uni-td>
<uni-td align="center">{{ item.sumCustomsQty || '' }}</uni-td>
<uni-td align="center">
<template v-if="item.status == '正常'">
<text style="color: #197ADB;">{{ item.status || '' }}</text>
</template>
<template v-else>
<text style="color: #BB3434;">{{ item.status || '' }}</text>
</template>
</uni-td>
</uni-tr>
</uni-table>
</view>
<view class="fix-box row bothSide verCenter">
<view>
<text class="t1">已选择:</text>
<text class="t2">{{ filterList.length }}</text>
</view>
<view class="btn row rowCenter verCenter" @click="createRegistrationOfNonArrivalGoods()">未来货登记</view>
</view>
</view>
</template> </template>
<script> <script>
import { API } from '@/util/api.js'; import { API } from '@/util/api.js';
export default { export default {
data() { data() {
return {}; const currentDate = this.getDate({
format: true
});
return {
date: currentDate,
list: [],
selectedIndexs: [],
filterList: [],
erp_order_sn: [],
car_sort: []
};
}, },
onShow() { onShow() {
this.getData(); this.getData();
}, },
methods: { methods: {
bindDateChange: function(e) {
this.date = e.detail.value;
this.getData();
},
getDate() {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
month = month > 9 ? month : '0' + month;
day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`;
},
selectionChange(e) {
this.selectedIndexs = e.detail.index;
this.filterList = this.selectedIndexs.map(i => this.list[i]);
this.filterList = this.filterList.filter((currentValue, index, arr) => {
if (currentValue.status == '正常') {
return arr;
}
});
},
/**
* 生成今天的未来-货登记
*/
createRegistrationOfNonArrivalGoods() {
if (this.filterList.length <= 0) {
uni.showModal({
title: '提示',
content: '请选择报关单',
showCancel: false
});
return false;
}
this.erp_order_sn = this.filterList.map(obj => {
return obj.entrustNo;
});
this.car_sort = this.filterList.map(obj => {
return obj.car_sort;
});
this.request(API.createRegistrationOfNonArrivalGoods, 'GET', { 'erp_order_sn[]': this.erp_order_sn.join(','), 'car_sort[]': this.car_sort.join(',') }, true).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '操作成功',
icon: 'success'
});
setTimeout(() => {
uni.redirectTo({
url: '/pages/declaration/index'
});
}, 2000);
} else {
uni.showModal({
title: '提示',
content: res.err_msg,
showCancel: false
});
}
});
},
/**
* 获取金蝶的未来货登记
*/
getData() { getData() {
this.request(API.userInfo, 'POST', {}, false).then(res => { this.request(API.getEasRegistrationOfNonArrivalGoods, 'GET', { date: this.date }, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
if (res.data.length > 0) {
this.list = res.data;
} else {
this.list = [];
}
} else if (res.err_code === 20046) {
} else { } else {
uni.showToast({
title: res.err_msg,
icon: 'error'
});
} }
}); });
} }
......
<template> <template>
<view class="mine-index"></view> <view class="declaration-index">
<view class="head row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-riqi1"></text>
<text class="tt">报关日期选择</text>
</view>
<view class="time-box">
<picker mode="date" :value="date" @change="bindDateChange">
<view class="row verCenter">
<view class="uni-input">{{ date }}</view>
<text class="iconfont icon-sanjiaoxing3"></text>
</view>
</picker>
</view>
</view>
<view class="content column rowCenter verCenter">
<view class="t1">当前时间:</view>
<view class="t2">{{ timer }}</view>
<view class="btn-box">
<template v-if="andReceipt.car_confirm_time">
<view class="btn row rowCenter verCenter curr">查车确认 (关务)</view>
<view class="is row rowCenter verCenter">
<text class="time">{{ andReceipt.car_confirm_time }}</text>
<text class="author">{{ andReceipt.car_confirm_name }}</text>
<text class="status">已确认</text>
</view>
</template>
<template v-else>
<view class="btn row rowCenter verCenter" @click="signTodayCustomsDeclarationAndReceipt(1)">查车确认 (关务)</view>
</template>
</view>
<view class="btn-box">
<template v-if="andReceipt.pass_customs_time">
<view class="btn row rowCenter verCenter curr">通关确认 (关务)</view>
<view class="is row rowCenter verCenter">
<text class="time">{{ andReceipt.pass_customs_time }}</text>
<text class="author">{{ andReceipt.pass_customs_name }}</text>
<text class="status">已确认</text>
</view>
</template>
<template v-else>
<view class="btn row rowCenter verCenter" @click="signTodayCustomsDeclarationAndReceipt(2)">通关确认 (关务)</view>
</template>
</view>
<view class="btn-box">
<template v-if="andReceipt.sz_getgoods_time">
<view class="btn row rowCenter verCenter curr">深圳收货确认</view>
<view class="is row rowCenter verCenter">
<text class="time">{{ andReceipt.sz_getgoods_time }}</text>
<text class="author">{{ andReceipt.sz_getgoods_name }}</text>
<text class="status">已确认</text>
</view>
</template>
<template v-else>
<view class="btn row rowCenter verCenter" @click="signTodayCustomsDeclarationAndReceipt(3)">深圳收货确认</view>
</template>
</view>
</view>
<view class="fix-btn">
<navigator class="entry-btn row rowCenter verCenter" url="/pages/declaration/futureGoods" hover-class="none">未来货登记</navigator>
<navigator class="statistics column rowCenter verCenter" url="/pages/declaration/checkIn" hover-class="none">
<text class="iconfont icon-juxing10"></text>
<text class="tt">签到统计</text>
</navigator>
</view>
</view>
</template> </template>
<script> <script>
import { API } from '@/util/api.js'; import { API } from '@/util/api.js';
export default { export default {
data() { data() {
return {}; const currentDate = this.getDate({
format: true
});
return {
date: currentDate,
andReceipt: {},
timer: ''
};
}, },
onShow() { onShow() {
this.getData(); setInterval(() => {
this.getTime();
}, 1000);
this.getTodayCustomsDeclarationAndReceipt();
}, },
methods: { methods: {
getData() { getDate() {
this.request(API.userInfo, 'POST', {}, false).then(res => { const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
month = month > 9 ? month : '0' + month;
day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`;
},
getTime() {
var date = new Date();
var year = date.getFullYear();
var month = date.getMonth() + 1;
var day = date.getDate();
var hour = date.getHours() < 10 ? '0' + date.getHours() : date.getHours();
var minute = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();
var second = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
month >= 1 && month <= 9 ? (month = '0' + month) : '';
day >= 0 && day <= 9 ? (day = '0' + day) : '';
var timer = year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second;
this.timer = timer;
},
bindDateChange: function(e) {
this.date = e.detail.value;
this.getTodayCustomsDeclarationAndReceipt();
},
/**
* 获取报关收货信息
*/
getTodayCustomsDeclarationAndReceipt() {
this.request(API.getTodayCustomsDeclarationAndReceipt, 'POST', { datetime: this.date }, false).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
this.andReceipt = res.data;
} else { } else {
uni.showModal({
title: '提示',
content: res.err_msg,
showCancel: false
});
}
});
},
signTodayCustomsDeclarationAndReceipt(type) {
if (type == 2) {
if (this.andReceipt.car_confirm_time == '') {
uni.showModal({
title: '提示',
content: '请先签到查车确认 (关务)',
showCancel: false
});
return false;
}
}
if (type == 3) {
if (this.andReceipt.car_confirm_time == '') {
uni.showModal({
title: '提示',
content: '请先签到查车确认 (关务)',
showCancel: false
});
return false;
}
if (this.andReceipt.pass_customs_time == '') {
uni.showModal({
title: '提示',
content: '请先签到通关确认 (关务)',
showCancel: false
});
return false;
}
}
this.request(API.signTodayCustomsDeclarationAndReceipt, 'POST', { type: type }, false).then(res => {
if (res.err_code === 0) {
uni.showToast({
title: '操作成功',
duration: 2000
});
setTimeout(() => {
this.getTodayCustomsDeclarationAndReceipt();
}, 2000);
} else {
uni.showModal({
title: '提示',
content: res.err_msg,
showCancel: false
});
} }
}); });
} }
......
...@@ -131,7 +131,7 @@ export default { ...@@ -131,7 +131,7 @@ export default {
}, },
{ {
name: '报关收货签到', name: '报关收货签到',
iconfont: 'icon-wuliu', iconfont: 'icon-chakanbeizhu',
tips: '' tips: ''
} }
] ]
......
No preview for this file type
<template> <template>
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
<tr class="uni-table-tr"> <tr class="uni-table-tr">
<th v-if="selection === 'selection' && ishead" class="checkbox" :class="{ 'tr-table--border': border }"> <th v-if="selection === 'selection' && ishead" class="checkbox" :class="{ 'tr-table--border': border }"><table-checkbox :checked="checked" :indeterminate="indeterminate" :disabled="disabled" @checkboxSelected="checkboxSelected"></table-checkbox></th>
<table-checkbox :checked="checked" :indeterminate="indeterminate" :disabled="disabled" @checkboxSelected="checkboxSelected"></table-checkbox> <slot></slot>
</th> <!-- <uni-th class="th-fixed">123</uni-th> -->
<slot></slot> </tr>
<!-- <uni-th class="th-fixed">123</uni-th> --> <!-- #endif -->
</tr> <!-- #ifndef H5 -->
<!-- #endif --> <view class="uni-table-tr" :class="{ disabledClass: disabledClass }">
<!-- #ifndef H5 --> <view v-if="selection === 'selection'" class="checkbox" :class="{ 'tr-table--border': border }"><table-checkbox :checked="checked" :indeterminate="indeterminate" :disabled="disabled" @checkboxSelected="checkboxSelected"></table-checkbox></view>
<view class="uni-table-tr"> <slot></slot>
<view v-if="selection === 'selection' " class="checkbox" :class="{ 'tr-table--border': border }"> </view>
<table-checkbox :checked="checked" :indeterminate="indeterminate" :disabled="disabled" @checkboxSelected="checkboxSelected"></table-checkbox> <!-- #endif -->
</view>
<slot></slot>
</view>
<!-- #endif -->
</template> </template>
<script> <script>
import tableCheckbox from './table-checkbox.vue' import tableCheckbox from './table-checkbox.vue';
/** /**
* Tr 表格行组件 * Tr 表格行组件
* @description 表格行组件 仅包含 th,td 组件 * @description 表格行组件 仅包含 th,td 组件
* @tutorial https://ext.dcloud.net.cn/plugin?id= * @tutorial https://ext.dcloud.net.cn/plugin?id=
*/ */
export default { export default {
name: 'uniTr', name: 'uniTr',
components: { tableCheckbox }, components: { tableCheckbox },
props: { props: {
disabled: { disabledClass: {
type: Boolean, type: Boolean,
default: false default: false
}, },
keyValue: { disabled: {
type: [String, Number], type: Boolean,
default: '' default: false
} },
}, keyValue: {
options: { type: [String, Number],
virtualHost: true default: ''
}, }
data() { },
return { options: {
value: false, virtualHost: true
border: false, },
selection: false, data() {
widthThArr: [], return {
ishead: true, value: false,
checked: false, border: false,
indeterminate:false selection: false,
} widthThArr: [],
}, ishead: true,
created() { checked: false,
this.root = this.getTable() indeterminate: false
this.head = this.getTable('uniThead') };
if (this.head) { },
this.ishead = false created() {
this.head.init(this) this.root = this.getTable();
} this.head = this.getTable('uniThead');
this.border = this.root.border if (this.head) {
this.selection = this.root.type this.ishead = false;
this.root.trChildren.push(this) this.head.init(this);
const rowData = this.root.data.find(v => v[this.root.rowKey] === this.keyValue) }
if(rowData){ this.border = this.root.border;
this.rowData = rowData this.selection = this.root.type;
} this.root.trChildren.push(this);
this.root.isNodata() const rowData = this.root.data.find(v => v[this.root.rowKey] === this.keyValue);
}, if (rowData) {
mounted() { this.rowData = rowData;
if (this.widthThArr.length > 0) { }
const selectionWidth = this.selection === 'selection' ? 50 : 0 this.root.isNodata();
this.root.minWidth = this.widthThArr.reduce((a, b) => Number(a) + Number(b)) + selectionWidth },
} mounted() {
}, if (this.widthThArr.length > 0) {
// #ifndef VUE3 const selectionWidth = this.selection === 'selection' ? 50 : 0;
destroyed() { this.root.minWidth = this.widthThArr.reduce((a, b) => Number(a) + Number(b)) + selectionWidth;
const index = this.root.trChildren.findIndex(i => i === this) }
this.root.trChildren.splice(index, 1) },
this.root.isNodata() // #ifndef VUE3
}, destroyed() {
// #endif const index = this.root.trChildren.findIndex(i => i === this);
// #ifdef VUE3 this.root.trChildren.splice(index, 1);
unmounted() { this.root.isNodata();
const index = this.root.trChildren.findIndex(i => i === this) },
this.root.trChildren.splice(index, 1) // #endif
this.root.isNodata() // #ifdef VUE3
}, unmounted() {
// #endif const index = this.root.trChildren.findIndex(i => i === this);
methods: { this.root.trChildren.splice(index, 1);
minWidthUpdate(width) { this.root.isNodata();
this.widthThArr.push(width) },
}, // #endif
// 选中 methods: {
checkboxSelected(e) { minWidthUpdate(width) {
let rootData = this.root.data.find(v => v[this.root.rowKey] === this.keyValue) this.widthThArr.push(width);
this.checked = e.checked },
this.root.check(rootData||this, e.checked,rootData? this.keyValue:null) // 选中
}, checkboxSelected(e) {
change(e) { let rootData = this.root.data.find(v => v[this.root.rowKey] === this.keyValue);
this.root.trChildren.forEach(item => { this.checked = e.checked;
if (item === this) { this.root.check(rootData || this, e.checked, rootData ? this.keyValue : null);
this.root.check(this, e.detail.value.length > 0 ? true : false) },
} change(e) {
}) this.root.trChildren.forEach(item => {
}, if (item === this) {
/** this.root.check(this, e.detail.value.length > 0 ? true : false);
* 获取父元素实例 }
*/ });
getTable(name = 'uniTable') { },
let parent = this.$parent /**
let parentName = parent.$options.name * 获取父元素实例
while (parentName !== name) { */
parent = parent.$parent getTable(name = 'uniTable') {
if (!parent) return false let parent = this.$parent;
parentName = parent.$options.name let parentName = parent.$options.name;
} while (parentName !== name) {
return parent parent = parent.$parent;
} if (!parent) return false;
} parentName = parent.$options.name;
} }
return parent;
}
}
};
</script> </script>
<style lang="scss"> <style lang="scss">
$border-color: #ebeef5; $border-color: #ebeef5;
.uni-table-tr { .uni-table-tr {
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
display: table-row; display: table-row;
transition: all 0.3s; transition: all 0.3s;
box-sizing: border-box; box-sizing: border-box;
/* #endif */ /* #endif */
} }
.checkbox { .checkbox {
padding: 0 8px; padding: 0 8px;
width: 26px; width: 26px;
padding-left: 12px; padding-left: 12px;
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
/* #endif */ /* #endif */
color: #333; color: #333;
font-weight: 500; font-weight: 500;
border-bottom: 1px $border-color solid; border-bottom: 1px $border-color solid;
font-size: 14px; font-size: 14px;
// text-align: center; // text-align: center;
} }
.tr-table--border { .tr-table--border {
border-right: 1px $border-color solid; border-right: 1px $border-color solid;
} }
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
.uni-table-tr { .uni-table-tr {
::v-deep .uni-table-th { ::v-deep .uni-table-th {
&.table--border:last-child { &.table--border:last-child {
// border-right: none; // border-right: none;
} }
} }
::v-deep .uni-table-td { ::v-deep .uni-table-td {
&.table--border:last-child { &.table--border:last-child {
// border-right: none; // border-right: none;
} }
} }
} }
/* #endif */ /* #endif */
......
...@@ -124,8 +124,27 @@ const API = { ...@@ -124,8 +124,27 @@ const API = {
/** /**
* 扫描出入库列表 * 扫描出入库列表
*/ */
szScanOutInList: API_BASE + '/supplywechatwms/szScanOutInList' szScanOutInList: API_BASE + '/supplywechatwms/szScanOutInList',
/**
* 获取报关收货信息
*/
getTodayCustomsDeclarationAndReceipt: API_BASE + '/supplywechatwms/getTodayCustomsDeclarationAndReceipt',
/**
* 签到今天的报关收货信息
*/
signTodayCustomsDeclarationAndReceipt: API_BASE + '/supplywechatwms/signTodayCustomsDeclarationAndReceipt',
/**
* 获取金蝶的未来货登记
*/
getEasRegistrationOfNonArrivalGoods: API_BASE + '/supplywechatwms/getEasRegistrationOfNonArrivalGoods',
/**
* 生成今天的未来-货登记
*/
createRegistrationOfNonArrivalGoods: API_BASE + '/supplywechatwms/createRegistrationOfNonArrivalGoods',
/**
* 获取今天的报关收货统计
*/
getCustomsDeclarationAndReceiptStatistics: API_BASE + '/supplywechatwms/getCustomsDeclarationAndReceiptStatistics',
} }
......
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