24190e4d563ba89f00db6985ec193de89a263d3e..69c67ff5acedc217a07a18b847ed22284e80a56d
22 小时以前 yyb
核磅录入增加根据接口查询客户名称校验是否一致
69c67f 对比 | 目录
昨天 yyb
核磅录入铜杆提交成功后页清空核磅记录
223737 对比 | 目录
已修改2个文件
83 ■■■■■ 文件已修改
common/http.api.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/wareHouse/nuclearScale/index.vue 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
common/http.api.js
@@ -568,6 +568,8 @@
            createDetail: (params = {}) => vm.$u.post('/mes/weighingVerification/createDetail', params),
            // 核磅记录
            queryPacking: (params = {}) => vm.$u.get('/mes/weighingVerification/queryPacking', params),
            // 核磅扫码查询客户名称
            queryCustomName: (params = {}) => vm.$u.get('/mes/weighingVerification/queryCustomName', params),
        },
        // 取消领料
        cancelMaterialRequisition: {
pages/wareHouse/nuclearScale/index.vue
@@ -130,7 +130,9 @@
            @click="cancelReport(item)"
          >
            <view class="content-header">
              <view class="content-header-title">{{ ScanCodeRecord.length - index }}</view>
              <view class="content-header-title">{{
                ScanCodeRecord.length - index
              }}</view>
            </view>
            <view class="content-body">
              <view class="row-list">
@@ -204,7 +206,7 @@
              </view>
              <view class="packing-registration-param-item-right">
                <u-input
                type="number"
                  type="number"
                  class="item-one item-two"
                  v-model="modalList.verificationWeight"
                />
@@ -216,7 +218,7 @@
              </view>
              <view class="packing-registration-param-item-right">
                <u-input
                type="number"
                  type="number"
                  class="item-one item-two"
                  v-model="modalList.forkliftWeight"
                />
@@ -332,51 +334,37 @@
          waivDevRejNo: codeInfo.WDR ? codeInfo.WDR : "*", // wdr号
          productType: that.form.productType,
        };
        if (codeInfo.CN != "") {
          if (codeInfo.CN != that.form.customerName1) {
            // 扫描报工单二维码
            uni.showModal({
              title: "提示",
              content:
                "客户不一致:" + codeInfo.CN + "||" + that.form.customerName1,
              showCancel: true,
              success: function (res) {
                const isDuplicate = that.ScanCodeRecord.some(
                  (item) => item.outBatchNo === codeInfo.BN
                );
                if (!isDuplicate) {
                  if (that.form.productType == "TG01") {
                    that.$refs.saveForm.open(ScanCodeRecordList);
                  } else {
                    that.ScanCodeRecord.unshift(ScanCodeRecordList);
                  }
                } else {
                  uni.showToast({
                    icon: "none",
                    title: "请勿重复扫码!",
                    duration: 2 * 1000,
                  });
                }
              },
            });
          } else {
            if (that.form.productType == "TG01") {
              that.$refs.saveForm.open(ScanCodeRecordList);
            } else {
              that.ScanCodeRecord.unshift(ScanCodeRecordList);
            }
          }
        if (that.form.productType == "TG01") {
          that.$refs.saveForm.open(ScanCodeRecordList);
        } else {
          if (that.form.productType == "TG01") {
            that.$refs.saveForm.open(ScanCodeRecordList);
          } else {
            that.ScanCodeRecord.unshift(ScanCodeRecordList);
          }
          that.queryCustomName(codeInfo,ScanCodeRecordList);
        }
      }
    });
  },
  methods: {
    queryCustomName(codeInfo,ScanCodeRecordList) {
      // 查询客户名称
      this.$u.api.NuclearScaleEntry.queryCustomName({
        BN: codeInfo.BN,
      }).then((res) => {
        console.log("客户名称:", res);
        if (res.data != this.form.customerName1) {
          let that = this;
          // 扫描报工单二维码
          uni.showModal({
            title: "提示",
            content: "客户不一致:" + res.data + " || " + that.form.customerName1,
            showCancel: true,
            success: function (res) {
                that.ScanCodeRecord.unshift(ScanCodeRecordList);
            },
          });
        } else {
          this.ScanCodeRecord.unshift(ScanCodeRecordList);
        }
      });
    },
    // 取消扫码记录
    cancelReport(item) {
      let that = this;
@@ -446,10 +434,10 @@
          this.$u.toast("提交成功");
          this.ScanCodeRecord = [];
          // if (this.form.productTypeMap == "DT01") {
            this.modalList = {
              verificationWeight: "",
          this.modalList = {
            verificationWeight: "",
            // };
          }
          };
        })
        .catch((err) => {
          uni.hideLoading();
@@ -480,7 +468,8 @@
      this.$u.api.NuclearScaleEntry.createDetail(this.form)
        .then((res) => {
          this.$u.toast("提交成功");
          this.ScanCodeRecord.unshift(Obj);
          this.ScanCodeRecord = [];
          // this.ScanCodeRecord.unshift(Obj);
          this.$refs.saveForm.cancel();
        })
        .catch(() => {