yyb
7 天以前 ecced75681242ea0ff23f0c4805a20fbdc87cf14
pages/product/report/components/saveForm.vue
@@ -11,24 +11,12 @@
    <view class="packing-registration-param">
      <scroll-view scroll-y="true" style="height: 100%">
        <view class="packing-registration-param-view">
          <!-- <view class="packing-registration-param-item param-extra">
            <view class="packing-registration-param-item-left">
              <text class="item-one">批号</text>
            </view>
            <view class="packing-registration-param-item-right">
              <u-input
                class="item-one item-two"
                v-model="form.value0"
                disabled
              />
            </view>
          </view> -->
          <view class="packing-registration-param-item param-extra">
            <view class="packing-registration-param-item-left">
              <text class="item-one">长度</text>
            </view>
            <view class="packing-registration-param-item-right">
              <u-input class="item-one item-two" v-model="form.value1" />
              <u-input class="item-one item-two" v-model="form.overallLength" />
            </view>
          </view>
          <view class="packing-registration-param-item param-extra">
@@ -38,7 +26,7 @@
            <view class="packing-registration-param-item-right">
              <u-input
                class="item-one item-two"
                v-model="form.value1"
                v-model="form.proposedLocation"
                disabled
              />
            </view>
@@ -64,7 +52,7 @@
              <text class="item-one">净重</text>
            </view>
            <view class="packing-registration-param-item-right">
              <u-input class="item-one item-two" v-model="form.value1" />
              <u-input class="item-one item-two" v-model="form.theoryWeight" />
            </view>
          </view>
          <view class="packing-registration-param-item param-extra">
@@ -72,7 +60,7 @@
              <text class="item-one">工序</text>
            </view>
            <view class="packing-registration-param-item-right">
              <u-input class="item-one item-two" v-model="form.value1" />
              <u-input class="item-one item-two" v-model="form.name" />
            </view>
          </view>
          <view class="packing-registration-param-item param-extra">
@@ -125,7 +113,7 @@
export default {
  props: {
    operationTaskId: {
      type: String,
      type: Object,
      required: true,
      default: () => ({}),
    },
@@ -133,68 +121,8 @@
  data() {
    return {
      show: false,
      form: {
        outerDiameter: null,
        voltage: null,
        speed: null,
        pressure: null,
        productionSpeed: null,
        grossWeight: null,
        reelNumber: null,
        value7: null,
        value8: null,
        value9: null,
        value10: null,
        value11: null,
      },
      // rules: {
      //   value1: [
      //     { required: true, message: '请输入长度', trigger: ['blur', 'change'] },
      //   ],
      //   value3: [
      //     { required: true, message: '请输入盘号', trigger: ['blur', 'change'] },
      //   ],
      //   value4: [
      //     { required: true, message: '请输入毛重', trigger: ['blur', 'change'] },
      //   ],
      //   value5: [
      //     { required: true, message: '请输入净重', trigger: ['blur', 'change'] },
      //   ],
      //   value7: [
      //     { required: true, message: '请输入成品外径测量值', trigger: ['blur', 'change'] },
      //   ],
      //   value8: [
      //     { required: true, message: '请输入退火电压', trigger: ['blur', 'change'] },
      //   ],
      //   value9: [
      //     { required: true, message: '请输入转速', trigger: ['blur', 'change'] },
      //   ],
      //   value10: [
      //     { required: true, message: '请输入外部气压', trigger: ['blur', 'change'] }
      //   ],
      //   value11: [
      //     { required: true, message: '请输入生产速度', trigger: ['blur', 'change'] }
      //   ]
      // },
      form: {},
    };
  },
  watch: {
    show(val) {
      if (val) {
        this.$nextTick(() => {
          // this.$refs.uFormSave.setRules(this.rules);
          console.log("1222222");
          this.$u.api.workReporting
            .operationTask({
              id: this.operationTaskId,
            })
            .then((res) => {
              console.log("res", res);
              this.form = res.data.records;
            });
        });
      }
    },
  },
  methods: {
    confirm() {
@@ -224,9 +152,10 @@
        return;
      }
      this.$u.api.workReporting
        .submitPDA({ ...this.form, operationTaskId: this.operationTaskId })
        .submitPDA({ ...this.form, operationTaskId: this.operationTaskId.id })
        .then((res) => {
          console.log("res", res);
          this.$emit('update')
          this.$refs.uModal.cancel();
        });
    },
@@ -234,8 +163,10 @@
      this.show = false;
      this.form = {};
    },
    open() {
    open(val) {
      console.log('11daidecanshuskk',val)
      this.show = true;
       this.form = val;
    },
  },
};