spring
4 小时以前 c52a0824baaa86a719da04fba3ff65fc48a70422
src/pages/inventoryManagement/stockManagement/add.vue
@@ -35,11 +35,11 @@
      <view v-else class="form-section">
        <view class="section-title">过磅信息</view>
        <view class="form-row">
          <text class="form-label">车牌号</text>
          <text class="form-label required">车牌号</text>
          <up-input v-model="form.licensePlateNo" placeholder="请输入车牌号" />
        </view>
        <view class="form-row">
          <text class="form-label">毛重(吨)</text>
          <text class="form-label required">毛重(吨)</text>
          <up-input
            v-model="form.grossWeight"
            type="digit"
@@ -47,7 +47,7 @@
          />
        </view>
        <view class="form-row">
          <text class="form-label">皮重(吨)</text>
          <text class="form-label required">皮重(吨)</text>
          <up-input
            v-model="form.tareWeight"
            type="digit"
@@ -64,7 +64,7 @@
          />
        </view>
        <view class="form-row">
          <text class="form-label">过磅日期</text>
          <text class="form-label required">过磅日期</text>
          <view class="selector-trigger" @click="openWeighingDatePicker">
            <text class="selector-text" :class="{ placeholder: !form.weighingDate }">
              {{ form.weighingDate || '请选择过磅日期' }}
@@ -73,7 +73,7 @@
          </view>
        </view>
        <view class="form-row">
          <text class="form-label">过磅员</text>
          <text class="form-label required">过磅员</text>
          <up-input v-model="form.weighingOperator" placeholder="请输入过磅员" />
        </view>
      </view>
@@ -288,6 +288,27 @@
      uni.showToast({ title: '请输入数量', icon: 'none' })
      return
    }
  } else {
    if (!form.licensePlateNo) {
      uni.showToast({ title: '请输入车牌号', icon: 'none' })
      return
    }
    if (!form.grossWeight || Number(form.grossWeight) <= 0) {
      uni.showToast({ title: '请输入毛重', icon: 'none' })
      return
    }
    if (!form.tareWeight || Number(form.tareWeight) <= 0) {
      uni.showToast({ title: '请输入皮重', icon: 'none' })
      return
    }
    if (!form.weighingDate) {
      uni.showToast({ title: '请选择过磅日期', icon: 'none' })
      return
    }
    if (!form.weighingOperator) {
      uni.showToast({ title: '请输入过磅员', icon: 'none' })
      return
    }
  }
  const base = {