| | |
| | | import dayjs from 'dayjs' |
| | | import PageHeader from '@/components/PageHeader.vue' |
| | | import { subtractStockInventory } from '@/api/inventoryManagement/stockInventory.js' |
| | | import { subtractStockUnInventory } from '@/api/inventoryManagement/stockUninventory.js' |
| | | |
| | | const form = reactive({ |
| | | id: undefined, |
| | |
| | | remark: '' |
| | | }) |
| | | |
| | | const type = ref('0') // 0 合格库存,1 不合格库存 |
| | | const type = ref('0') // 固定合格库存 |
| | | const showWeighingDatePicker = ref(false) |
| | | const weighingDateValue = ref(Date.now()) |
| | | |
| | |
| | | }) |
| | | |
| | | onLoad((options) => { |
| | | if (options && options.type != null) { |
| | | type.value = options.type |
| | | } |
| | | type.value = '0' |
| | | const cached = uni.getStorageSync('stockSubtractRecord') |
| | | if (cached) { |
| | | try { |
| | |
| | | return |
| | | } |
| | | const payload = { ...form } |
| | | const api = type.value === '0' ? subtractStockInventory : subtractStockUnInventory |
| | | api(payload) |
| | | subtractStockInventory(payload) |
| | | .then(() => { |
| | | uni.showToast({ title: '出库成功', icon: 'success' }) |
| | | setTimeout(() => { |