spring
5 小时以前 c52a0824baaa86a719da04fba3ff65fc48a70422
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,