spring
昨天 c52a0824baaa86a719da04fba3ff65fc48a70422
src/pages/inventoryManagement/stockManagement/subtract.vue
@@ -28,7 +28,7 @@
          <text class="form-label">毛重(吨)</text>
          <up-input
            v-model="form.grossWeight"
            type="number"
            type="digit"
            placeholder="请输入毛重"
          />
        </view>
@@ -36,7 +36,7 @@
          <text class="form-label">皮重(吨)</text>
          <up-input
            v-model="form.tareWeight"
            type="number"
            type="digit"
            placeholder="请输入皮重"
          />
        </view>
@@ -44,7 +44,7 @@
          <text class="form-label">净重(吨)</text>
          <up-input
            v-model="form.netWeight"
            type="number"
            type="digit"
            disabled
            placeholder="自动计算"
          />
@@ -87,12 +87,11 @@
</template>
<script setup>
import { ref, reactive, watch } from 'vue'
import { ref, reactive, watch, computed } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
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,
@@ -124,14 +123,12 @@
  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 {
@@ -184,8 +181,7 @@
    return
  }
  const payload = { ...form }
  const api = type.value === '0' ? subtractStockInventory : subtractStockUnInventory
  api(payload)
  subtractStockInventory(payload)
    .then(() => {
      uni.showToast({ title: '出库成功', icon: 'success' })
      setTimeout(() => {