123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188 |
- <template>
- <!-- 添加运单 -->
- <view>
- <u-navbar :title="headline" autoBack placeholder></u-navbar>
- <x-form ref="recipients" :list="list" :model="recipientsModel" :rules="rules"></x-form>
- <view style="width: 100%;height: 150rpx;"></view>
- <view class="btn_print" @click="printWaybill">
- <u-button type="primary" shape="circle" :text="headline"></u-button>
- </view>
- </view>
- </template>
- <script>
- import {
- iceRaftRulesil
- } from "./waybill.js";
- export default {
- name: 'addIceRaft',
- data() {
- return {
- recipientsModel: {
- code: '',
- status: '',
- freezeClaim: '',
- },
- rules: {
- code: {
- required: true,
- message: '请输入编号',
- trigger: ['blur', 'change']
- },
- status: {
- required: true,
- message: '请选择状态',
- trigger: ['blur', 'change']
- },
- freezeClaim: {
- required: true,
- message: '请输入冷冻要求',
- trigger: ['blur', 'change']
- },
- },
- list: iceRaftRulesil(),
- userInfo: {},
- headline: '添加冰排',
- type: 1,
- }
- },
- onShow() {},
- onLoad(value) {},
- mounted() {
- var userInfo = this.$cache.getCache('userInfo')
- this.userInfo = userInfo
- },
- methods: {
- // tianjia运单
- async printWaybill() {
- let flag1 = await this.$refs['recipients'].validateForm();
- if (flag1) {
- let params = {
- codeList: [],
- freezeClaim: Number(this.recipientsModel.freezeClaim),
- status: null,
- }
- if (this.recipientsModel.status == '正常') {
- params.status = '2'
- } else {
- params.status = '1'
- }
- params.codeList.push(this.recipientsModel.code)
- this.$api.post('/api/ice-raft', params).then(res => {
- if (res.code == 200) {
- uni.redirectTo({
- url: '/pages/order/iceRaft'
- })
- }
- })
- } else {
- uni.$u.toast('请先完善表单')
- }
- },
- }
- }
- </script>
- <style lang="scss">
- page {
- background-color: #fff !important;
- }
- .title_waybill {
- font-size: 32rpx;
- padding: 20rpx;
- }
- .title_waybill1 {
- position: relative;
- margin: 20rpx;
- border-bottom: 1rpx;
- padding-bottom: 20rpx;
- }
- .card_Address {
- position: relative;
- }
- .card_flex_il {
- display: flex;
- align-items: center;
- padding: 20rpx;
- }
- .title_sou {
- font-size: 32rpx;
- }
- .card_Address:before {
- content: " ";
- position: absolute;
- left: 0;
- bottom: 0;
- width: 100%;
- height: 1px;
- border-top: 1px solid #e7e6e4;
- -webkit-transform-origin: 0 0;
- transform-origin: 0 0;
- -webkit-transform: scaleY(0.5);
- transform: scaleY(0.5);
- }
- .card_courier {
- min-height: 600rpx;
- padding-bottom: 20rpx;
- }
- .scroll-view {
- max-height: 60vh;
- overflow: hidden;
- }
- .headline {
- padding: 30rpx 30rpx 0rpx 30rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- padding-bottom: 30rpx;
- font-size: 32rpx;
- font-weight: 600;
- }
- .search_card {
- padding: 0rpx 30rpx 10rpx 30rpx;
- }
- .courier_item {
- margin: 20rpx 20rpx;
- width: calc(100% - 80rpx);
- padding: 20rpx;
- border-radius: 20rpx;
- // box-shadow: 0 2rpx 10rpx 0 rgba(0, 0, 0, .1);
- border: 1rpx solid #e7e6e4;
- }
- .courier_name {
- display: flex;
- flex-direction: column;
- }
- .title_name {
- font-weight: 600;
- font-size: 32rpx;
- margin-bottom: 10rpx;
- }
- .title_phone {
- font-size: 28rpx;
- }
- .xd_title {
- width: auto;
- font-size: 28rpx;
- font-weight: 500;
- padding: 15rpx 30rpx;
- border-radius: 35rpx;
- // border: 3rpx solid #82848a;
- background-color: #E4E7ED;
- }
- </style>
|