Commit 90d7553c7eb0179fdd787f9873b3f3d828a1b715

Authored by 史婷婷
1 parent eac5fc31

feat: 订货单-审核暂存

... ... @@ -141,7 +141,6 @@
141 141 <text class="label">总数量</text><text class="value">{{ form.totalQuantity }}</text>
142 142 </view>
143 143 </view>
144   - <button class="btn submit" type="primary" @click="onSubmit">提交</button>
145 144 </view>
146 145 <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options" v-model="sheet.value"
147 146 @confirm="onSheetConfirm" />
... ... @@ -158,9 +157,9 @@ import { getDicByCodes } from '@/utils/dic'
158 157 export default {
159 158 name: 'OrderListModify',
160 159 components: { Product, SingleSelectSheet },
  160 + props: { id: { type: [String, Number], default: '' } },
161 161 data() {
162 162 return {
163   - id: '',
164 163 form: {
165 164 code: '',
166 165 supplier: '',
... ... @@ -193,24 +192,30 @@ export default {
193 192 packaging: '',
194 193 },
195 194 initPurchaseOrderLineList: [],
196   - dicOptions: { SUPPLIER: [], APPLICABLE_STANDARD: [], AUDIT_STATUS: [] },
  195 + dicOptions: { SUPPLIER: [], APPLICABLE_STANDARD: [] },
197 196 sheet: { visible: false, title: '请选择', options: [], value: '', field: '' }
198 197 }
199 198 },
200   - onLoad(query) {
201   - this.id = (query && (query.id || query.code)) || ''
202   - if (this.id) this.loadDetail(this.id)
203   - this.loadDicOptions()
  199 + watch: {
  200 + id: {
  201 + immediate: true,
  202 + handler(val) {
  203 + const v = (val !== undefined && val !== null) ? String(val) : ''
  204 + if (v) this.loadDetail(v)
  205 + }
  206 + }
  207 + },
  208 + created() {
  209 + this.loadAllDicData()
204 210 },
205 211 methods: {
206 212 loadDicOptions() {
207   - const dicCodes = ['SUPPLIER', 'APPLICABLE_STANDARD', 'AUDIT_STATUS']
  213 + const dicCodes = ['SUPPLIER', 'APPLICABLE_STANDARD']
208 214 return getDicByCodes(dicCodes).then(results => {
209 215 this.dicOptions.SUPPLIER = results.SUPPLIER && results.SUPPLIER.data ? results.SUPPLIER.data : []
210 216 this.dicOptions.APPLICABLE_STANDARD = results.APPLICABLE_STANDARD && results.APPLICABLE_STANDARD.data ? results.APPLICABLE_STANDARD.data : []
211   - this.dicOptions.AUDIT_STATUS = results.AUDIT_STATUS && results.AUDIT_STATUS.data ? results.AUDIT_STATUS.data : []
212 217 this.refreshStandardName()
213   - }).catch(() => { this.dicOptions = { SUPPLIER: [], APPLICABLE_STANDARD: [], AUDIT_STATUS: [] } })
  218 + }).catch(() => { this.dicOptions = { SUPPLIER: [], APPLICABLE_STANDARD: [] } })
214 219 },
215 220 async loadDetail(id) {
216 221 try {
... ... @@ -275,7 +280,7 @@ export default {
275 280
276 281 .scroll {
277 282 flex: 1;
278   - padding: 6rpx 0 310rpx;
  283 + padding: 0 0 350rpx;
279 284 }
280 285
281 286
... ... @@ -460,7 +465,7 @@ export default {
460 465 position: fixed;
461 466 left: 0;
462 467 right: 0;
463   - bottom: 0;
  468 + bottom: 120rpx;
464 469 padding: 0 32rpx 32rpx;
465 470 padding-bottom: calc(32rpx + env(safe-area-inset-bottom));
466 471 background: #fff;
... ...
... ... @@ -324,7 +324,7 @@ export default {
324 324
325 325 &__container {
326 326 padding: 32rpx;
327   - align-items: center;
  327 + // align-items: center;
328 328
329 329 .uni-easyinput {
330 330
... ...
... ... @@ -328,7 +328,6 @@ export default {
328 328
329 329 &__container {
330 330 padding: 32rpx;
331   - align-items: center;
332 331
333 332 .uni-easyinput {
334 333
... ...