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;
padding-right: 24rpx;
.box {
.icon-juxing {
font-size: 120rpx;
color: #197adb;
margin-right: 24rpx;
}
.t1 {
font-size: 36rpx; font-size: 36rpx;
color: #197adb; color: #6e767a;
font-weight: bold;
} }
.t2 { .tt {
font-size: 24rpx; margin-left: 12rpx;
color: #404547; font-size: 28rpx;
margin-top: 12rpx; color: #1e2021;
} }
.t3 { .time-box {
font-size: 22rpx; font-size: 24rpx;
color: #6e767a; color: #6e767a;
} }
.uni-input {
margin-right: 12rpx;
} }
.icon-sanjiaoxing3 {
font-size: 17rpx;
color: #9ca8ad;
} }
.fast-entry { }
position: relative; .title {
background: #ffffff; padding-left: 24rpx;
padding-top: 24rpx; margin-top: 32rpx;
&::after {
position: absolute;
bottom: 0px;
left: 0;
right: 0;
width: 100%;
height: 1px;
background-color: #ffffff; background-color: #ffffff;
content: ''; height: 93rpx;
.arrow {
width: 12rpx;
height: 12rpx;
background: #197adb;
border-radius: 50%;
margin-right: 16rpx;
} }
.tit { .tt {
font-size: 24rpx; 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 {
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; font-size: 22rpx;
color: #404547; color: #404547;
border-right: 1px solid #cad9e0;
&:last-child {
border-right: none;
} }
} }
} }
.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;
}
&.color {
color: #0079fe;
} }
.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;
padding-right: 24rpx;
.box {
.icon-juxing {
font-size: 120rpx;
color: #197adb;
margin-right: 24rpx;
}
.t1 {
font-size: 36rpx; font-size: 36rpx;
color: #197adb; color: #6e767a;
font-weight: bold;
} }
.t2 { .tt {
font-size: 24rpx; margin-left: 12rpx;
color: #404547; font-size: 28rpx;
margin-top: 12rpx; color: #1e2021;
} }
.t3 { .time-box {
font-size: 22rpx; font-size: 24rpx;
color: #6e767a; color: #6e767a;
} }
.uni-input {
margin-right: 12rpx;
} }
.icon-sanjiaoxing3 {
font-size: 17rpx;
color: #9ca8ad;
} }
.fast-entry { }
position: relative; .title {
background: #ffffff; padding-left: 24rpx;
padding-top: 24rpx; margin: 32rpx 24rpx 0 24rpx;
&::after {
position: absolute;
bottom: 0px;
left: 0;
right: 0;
width: 100%;
height: 1px;
background-color: #ffffff; background-color: #ffffff;
content: ''; height: 93rpx;
.arrow {
width: 12rpx;
height: 12rpx;
background: #197adb;
border-radius: 50%;
margin-right: 16rpx;
} }
.tit { .tt {
font-size: 24rpx; font-size: 32rpx;
color: #1e2021; color: #1e2021;
font-weight: bold; font-weight: bold;
margin-bottom: 36rpx;
padding-left: 24rpx;
} }
.bar {
flex-wrap: wrap;
.box {
position: relative;
flex: 1;
height: 177rpx;
border-right: 1px solid #e6edf0;
border-bottom: 1px solid #e6edf0;
&:nth-of-type(3n) {
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 { .uni-table-box {
font-size: 64rpx; padding-bottom: 50rpx;
color: #197adb; margin: 0 24rpx;
background-color: #ffffff;
::v-deep .uni-table-scroll {
}
::v-deep .uni-table {
min-width: 100% !important;
} }
.text { }
margin-top: 8rpx; .fix-box {
position: fixed;
bottom: 0;
width: 100%;
height: 98rpx;
background: #ffffff;
padding: 0 24rpx;
.t1 {
font-size: 22rpx; font-size: 22rpx;
color: #404547; color: #404547;
} }
.t2 {
font-size: 32rpx;
color: #197adb;
font-weight: bold;
} }
.btn {
width: 252rpx;
height: 78rpx;
background: #bb3434;
border-radius: 4rpx;
font-size: 28rpx;
color: #ffffff;
} }
} }
.scan { }
position: fixed;
bottom: 50rpx; ::v-deep {
left: 0; .uni-table-scroll {
right: 0; width: auto !important;
width: 301rpx; margin: 0 24rpx;
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 { .checkbox {
font-size: 32rpx; width: 45px !important;
color: #ffffff; 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;
padding-right: 24rpx;
.box {
.icon-juxing {
font-size: 120rpx;
color: #197adb;
margin-right: 24rpx;
}
.t1 {
font-size: 36rpx; font-size: 36rpx;
color: #197adb; color: #6e767a;
font-weight: bold;
} }
.t2 { .tt {
font-size: 24rpx; margin-left: 12rpx;
color: #404547; font-size: 28rpx;
margin-top: 12rpx; color: #1e2021;
} }
.t3 { .time-box {
font-size: 22rpx; font-size: 24rpx;
color: #6e767a; color: #6e767a;
} }
.uni-input {
margin-right: 12rpx;
} }
.icon-sanjiaoxing3 {
font-size: 17rpx;
color: #9ca8ad;
} }
.fast-entry {
position: relative;
background: #ffffff;
padding-top: 24rpx;
&::after {
position: absolute;
bottom: 0px;
left: 0;
right: 0;
width: 100%;
height: 1px;
background-color: #ffffff;
content: '';
} }
.tit { .content {
font-size: 24rpx; padding-top: 40rpx;
color: #1e2021; .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;
.box {
position: relative; position: relative;
flex: 1; .btn {
height: 177rpx; width: 488rpx;
border-right: 1px solid #e6edf0; height: 128rpx;
border-bottom: 1px solid #e6edf0; background: #197adb;
&:nth-of-type(3n) { border-radius: 4rpx;
border-right: 1px solid transparent; font-size: 28rpx;
}
.num {
position: absolute;
right: 32rpx;
top: 5rpx;
width: 42rpx;
height: 32rpx;
background: #bb3434;
border-radius: 16rpx;
font-size: 20rpx;
color: #ffffff; color: #ffffff;
margin-bottom: 120rpx;
font-weight: bold;
&.curr {
background: #cad9e0;
color: #404547;
} }
.iconfont { }
font-size: 64rpx; .is {
position: absolute;
bottom: 72rpx;
left: 0;
right: 0;
.time {
font-size: 26rpx;
color: #404547;
margin-right: 36rpx;
}
.author {
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; }
.statistics {
margin-top: 24rpx;
padding: 10rpx 0;
background-color: #ffffff;
.iconfont {
font-size: 44rpx;
color: #404547;
margin-bottom: 4rpx;
} }
.tt { .tt {
font-size: 32rpx; font-size: 20rpx;
color: #ffffff; 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 { } else {
this.list = [];
}
} 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 { } else {
this.list = [];
}
} else if (res.err_code === 20046) {
} 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>
</th>
<slot></slot> <slot></slot>
<!-- <uni-th class="th-fixed">123</uni-th> --> <!-- <uni-th class="th-fixed">123</uni-th> -->
</tr> </tr>
<!-- #endif --> <!-- #endif -->
<!-- #ifndef H5 --> <!-- #ifndef H5 -->
<view class="uni-table-tr"> <view class="uni-table-tr" :class="{ disabledClass: disabledClass }">
<view v-if="selection === 'selection' " class="checkbox" :class="{ 'tr-table--border': border }"> <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>
<table-checkbox :checked="checked" :indeterminate="indeterminate" :disabled="disabled" @checkboxSelected="checkboxSelected"></table-checkbox>
</view>
<slot></slot> <slot></slot>
</view> </view>
<!-- #endif --> <!-- #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 组件
...@@ -29,6 +25,10 @@ export default { ...@@ -29,6 +25,10 @@ export default {
name: 'uniTr', name: 'uniTr',
components: { tableCheckbox }, components: { tableCheckbox },
props: { props: {
disabledClass: {
type: Boolean,
default: false
},
disabled: { disabled: {
type: Boolean, type: Boolean,
default: false default: false
...@@ -49,77 +49,77 @@ export default { ...@@ -49,77 +49,77 @@ export default {
widthThArr: [], widthThArr: [],
ishead: true, ishead: true,
checked: false, checked: false,
indeterminate:false indeterminate: false
} };
}, },
created() { created() {
this.root = this.getTable() this.root = this.getTable();
this.head = this.getTable('uniThead') this.head = this.getTable('uniThead');
if (this.head) { if (this.head) {
this.ishead = false this.ishead = false;
this.head.init(this) this.head.init(this);
} }
this.border = this.root.border this.border = this.root.border;
this.selection = this.root.type this.selection = this.root.type;
this.root.trChildren.push(this) this.root.trChildren.push(this);
const rowData = this.root.data.find(v => v[this.root.rowKey] === this.keyValue) const rowData = this.root.data.find(v => v[this.root.rowKey] === this.keyValue);
if(rowData){ if (rowData) {
this.rowData = rowData this.rowData = rowData;
} }
this.root.isNodata() this.root.isNodata();
}, },
mounted() { mounted() {
if (this.widthThArr.length > 0) { if (this.widthThArr.length > 0) {
const selectionWidth = this.selection === 'selection' ? 50 : 0 const selectionWidth = this.selection === 'selection' ? 50 : 0;
this.root.minWidth = this.widthThArr.reduce((a, b) => Number(a) + Number(b)) + selectionWidth this.root.minWidth = this.widthThArr.reduce((a, b) => Number(a) + Number(b)) + selectionWidth;
} }
}, },
// #ifndef VUE3 // #ifndef VUE3
destroyed() { destroyed() {
const index = this.root.trChildren.findIndex(i => i === this) const index = this.root.trChildren.findIndex(i => i === this);
this.root.trChildren.splice(index, 1) this.root.trChildren.splice(index, 1);
this.root.isNodata() this.root.isNodata();
}, },
// #endif // #endif
// #ifdef VUE3 // #ifdef VUE3
unmounted() { unmounted() {
const index = this.root.trChildren.findIndex(i => i === this) const index = this.root.trChildren.findIndex(i => i === this);
this.root.trChildren.splice(index, 1) this.root.trChildren.splice(index, 1);
this.root.isNodata() this.root.isNodata();
}, },
// #endif // #endif
methods: { methods: {
minWidthUpdate(width) { minWidthUpdate(width) {
this.widthThArr.push(width) this.widthThArr.push(width);
}, },
// 选中 // 选中
checkboxSelected(e) { checkboxSelected(e) {
let rootData = this.root.data.find(v => v[this.root.rowKey] === this.keyValue) let rootData = this.root.data.find(v => v[this.root.rowKey] === this.keyValue);
this.checked = e.checked this.checked = e.checked;
this.root.check(rootData||this, e.checked,rootData? this.keyValue:null) this.root.check(rootData || this, e.checked, rootData ? this.keyValue : null);
}, },
change(e) { change(e) {
this.root.trChildren.forEach(item => { this.root.trChildren.forEach(item => {
if (item === this) { if (item === this) {
this.root.check(this, e.detail.value.length > 0 ? true : false) this.root.check(this, e.detail.value.length > 0 ? true : false);
} }
}) });
}, },
/** /**
* 获取父元素实例 * 获取父元素实例
*/ */
getTable(name = 'uniTable') { getTable(name = 'uniTable') {
let parent = this.$parent let parent = this.$parent;
let parentName = parent.$options.name let parentName = parent.$options.name;
while (parentName !== name) { while (parentName !== name) {
parent = parent.$parent parent = parent.$parent;
if (!parent) return false if (!parent) return false;
parentName = parent.$options.name parentName = parent.$options.name;
} }
return parent return parent;
} }
} }
} };
</script> </script>
<style lang="scss"> <style lang="scss">
......
...@@ -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