123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- <template>
- <!-- 添加包裹 -->
- <view class="back">
- <view class="box" style="border-radius: 16rpx 16rpx 0 0 ">
- <view class="boxitem u-flex">
- <text class="name">{{i18n.TrackingNumber}}</text>
- <input style="flex: 1;" type="text" :placeholder="i18n.trackingNumber" v-model="logistics_no" />
- </view>
- </view>
- <view class="box">
- <view class="boxitem u-flex">
- <text class="name">{{i18n.Expresscompany}}</text>
- <input style="flex: 1;" type="text" :placeholder="i18n.ExpressCompany" v-model="logistics_company_name" />
- </view>
- </view>
- <view class="box" style="border-radius:0 0 16rpx 16rpx">
- <view class="boxitem u-flex">
- <text class="name">{{i18n.Parcelweight}}</text>
- <input style="flex: 1;" type="text" :placeholder="i18n.parcelWeight" v-model="estimated_weight" />
- <text>kg</text>
- </view>
- </view>
- <view class="btn" @click="offline">
- {{i18n.Addlist}}
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- logistics_company_name:'',// 顺丰快递 是 String 快递公司
- logistics_no:'',//11111111 是 String 快递单号
- estimated_weight:'',// 222 是 String 包裹重量
- };
- },
- computed: {
- i18n() {
- return this.$t('index')
- }
- },
- onShow() {
- uni.setNavigationBarTitle({
- title: this.i18n.Addparcel
- })
- },
- methods:{
- //线下下单
- offline() {
- uni.$u.http.post('/api/express-order/offline-create', {
- logistics_company_code:this.logistics_company_name,// 顺丰快递 是 String 快递公司
- logistics_no:this.logistics_no,//11111111 是 String 快递单号
- estimated_weight:this.estimated_weight,// 222 是 String 包裹重量
- }).then((res) => {
- this.$u.toast('添加成功')
- // uni.navigateTo({
- // url:'pageB/myPackage'
- // })
- setTimeout(()=>{
- uni.navigateBack()
- },800)
- }).catch(() => {
-
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .btn {
- width: 686rpx;
- height: 88rpx;
- background: #F83224;
- border-radius: 44rpx;
- font-family: PingFangSC, PingFang SC;
- font-weight: 500;
- font-size: 32rpx;
- color: #FFFFFF;
- line-height: 88rpx;
- text-align: center;
- font-style: normal;
- margin-top: 94rpx;
- }
- .back {
- box-sizing: border-box;
- padding: 20rpx 24rpx;
- }
- .box {
- padding: 0 28rpx;
- box-sizing: border-box;
- width: 702rpx;
- // height: 324rpx;
- background: #FFFFFF;
- // border-radius: 16rpx;
- box-sizing: border-box;
- .boxitem {
- height: 100rpx;
- width: 646rpx;
- border-bottom: 2rpx solid rgba(151, 151, 151, 0.1);
- box-sizing: border-box;
- }
- .name {
- width: 150rpx;
- display: block;
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 30rpx;
- color: #222222;
- line-height: 42rpx;
- text-align: left;
- font-style: normal;
- margin-right: 44rpx;
- }
- }
- </style>
|