Commit d160421db59a89ff4801b8e8f867f7cc35164ad6

Authored by 史婷婷
1 parent 3cc0f6c3

feat: 草稿要车单 增加编辑按钮 check 判定

Showing 1 changed file with 20 additions and 6 deletions
@@ -13,10 +13,13 @@ @@ -13,10 +13,13 @@
13 <view class="row"><text class="label">卸货地点</text><text class="value">{{ form.destination }}</text></view> 13 <view class="row"><text class="label">卸货地点</text><text class="value">{{ form.destination }}</text></view>
14 <view class="row"><text class="label">接货人/联络人</text><text class="value">{{ form.consignee }}</text></view> 14 <view class="row"><text class="label">接货人/联络人</text><text class="value">{{ form.consignee }}</text></view>
15 <view class="row"><text class="label">联系电话</text><text class="value">{{ form.phone }}</text></view> 15 <view class="row"><text class="label">联系电话</text><text class="value">{{ form.phone }}</text></view>
16 - <view class="row"><text class="label">回货计划安排</text><text class="value">{{ form.returnPlanArrangement }}</text></view> 16 + <view class="row"><text class="label">回货计划安排</text><text class="value">{{ form.returnPlanArrangement }}</text>
  17 + </view>
17 <view class="row"><text class="label">特殊需求、其他等</text><text class="value">{{ form.other }}</text></view> 18 <view class="row"><text class="label">特殊需求、其他等</text><text class="value">{{ form.other }}</text></view>
18 - <view class="row"><text class="label">装货特别要求/需求</text><text class="value">{{ form.specialLoadingRequirement }}</text></view>  
19 - <view class="row"><text class="label">是否冻结</text><text class="value">{{ form.freeze ? '是' : '否' }}</text></view> 19 + <view class="row"><text class="label">装货特别要求/需求</text><text class="value">{{ form.specialLoadingRequirement
  20 + }}</text></view>
  21 + <view class="row"><text class="label">是否冻结</text><text class="value">{{ form.freeze ? '是' : '否' }}</text>
  22 + </view>
20 </view> 23 </view>
21 </view> 24 </view>
22 </scroll-view> 25 </scroll-view>
@@ -27,6 +30,7 @@ @@ -27,6 +30,7 @@
27 <script> 30 <script>
28 import { getDetailApi, cancelApi } from '@/api/draft_order.js' 31 import { getDetailApi, cancelApi } from '@/api/draft_order.js'
29 import DetailButtons from '@/components/detail-buttons/index.vue' 32 import DetailButtons from '@/components/detail-buttons/index.vue'
  33 +import { checkApi } from '@/api/order_list.js'
30 34
31 export default { 35 export default {
32 name: 'DraftOrderDetail', 36 name: 'DraftOrderDetail',
@@ -88,8 +92,18 @@ export default { @@ -88,8 +92,18 @@ export default {
88 if (typeof fn === 'function') fn() 92 if (typeof fn === 'function') fn()
89 }, 93 },
90 onEdit() { 94 onEdit() {
91 - const id = this.form.id || this.form.code  
92 - if (id) uni.navigateTo({ url: `/pages/draft_order/modify?id=${id}` }) 95 + const id = this.form.id || this.form.code;
  96 + const query = id ? ('?id=' + encodeURIComponent(id)) : '';
  97 + // purchaseOrderId 订单id
  98 + checkApi({ id: this.form.purchaseOrderId }).then(res => {
  99 + if (res.code === 200) {
  100 + uni.navigateTo({ url: '/pages/draft_order/modify' + query })
  101 + } else {
  102 + uni.showToast({ title: res.msg || '失败', icon: 'none' })
  103 + }
  104 + }).catch((e) => {
  105 + uni.showToast({ title: e.msg, icon: 'none' })
  106 + })
93 }, 107 },
94 onAuditDetail() { 108 onAuditDetail() {
95 uni.setStorageSync('sourceBusinessId', this.form.id) 109 uni.setStorageSync('sourceBusinessId', this.form.id)
@@ -154,7 +168,7 @@ export default { @@ -154,7 +168,7 @@ export default {
154 background-size: 100% 100%; 168 background-size: 100% 100%;
155 background-position: center; 169 background-position: center;
156 170
157 - &_AUDIT { 171 + &_AUDIT {
158 background-image: url('~@/static/images/dev_manage/status_1.png'); 172 background-image: url('~@/static/images/dev_manage/status_1.png');
159 } 173 }
160 174