spring
10 小时以前 c52a0824baaa86a719da04fba3ff65fc48a70422
fix: 入库数量必填
已修改2个文件
67 ■■■■ 文件已修改
src/pages/consumablesLogistics/stockManagement/add.vue 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/inventoryManagement/stockManagement/add.vue 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/consumablesLogistics/stockManagement/add.vue
@@ -26,23 +26,23 @@
      <view 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>
          <up-input v-model="form.grossWeight" type="number" placeholder="请输入毛重" />
          <text class="form-label required">毛重(吨)</text>
          <up-input v-model="form.grossWeight" type="digit" placeholder="请输入毛重" />
        </view>
        <view class="form-row">
          <text class="form-label">皮重(吨)</text>
          <up-input v-model="form.tareWeight" type="number" placeholder="请输入皮重" />
          <text class="form-label required">皮重(吨)</text>
          <up-input v-model="form.tareWeight" type="digit" placeholder="请输入皮重" />
        </view>
        <view class="form-row">
          <text class="form-label">净重(吨)</text>
          <up-input v-model="form.netWeight" type="number" disabled placeholder="自动计算" />
          <up-input v-model="form.netWeight" type="digit" disabled placeholder="自动计算" />
        </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 || "请选择过磅日期" }}
@@ -51,7 +51,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>
@@ -220,6 +220,26 @@
    uni.showToast({ title: "请选择产品", icon: "none" });
    return;
  }
  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 payload = {
    productId: form.productId,
    productModelId: form.productModelId,
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 = {