yyb
2025-09-23 45b9b391916c94c42cea303c5c0f0fe0d0b1306c
取消领料和领料页面
已修改4个文件
96 ■■■■■ 文件已修改
common/http.api.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/storeManagement/CancelMaterialRequisition/index.vue 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/storeManagement/MaterialRequisition/index.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/sys/home/index.vue 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
common/http.api.js
@@ -564,12 +564,12 @@
        // 取消领料
        cancelMaterialRequisition: {
            // 取消领料确认
            cancelMaterialRequisition: (params = {}) => vm.$u.get('/mes/weighingVerification/cancelMaterialRequisition', params),
            cancelMaterialRequisition: (params = {}) => vm.$u.get('/mes/jdat_wagonBalance/cancelMaterialRequisition', params),
        },
        // 领料
        materialRequisition: {
            // 领料确认
            materialRequisition: (params = {}) => vm.$u.get('/mes/weighingVerification/materialRequisition', params),
            materialRequisition: (params = {}) => vm.$u.get('/mes/jdat_wagonBalance/materialRequisition', params),
        },
    };
pages/storeManagement/CancelMaterialRequisition/index.vue
@@ -51,7 +51,7 @@
                  <view class="_label-name">净重:</view>
                </view>
                <view class="_content">
                  {{ item.NW }}
                  {{ item.KW }}
                </view>
              </view>
            </view>
@@ -95,7 +95,7 @@
                </view>
                <view class="packing-registration-param-item-right">
                  <text class="item-one item-two">{{
                    detailedList.NW
                    detailedList.KW
                  }}</text>
                </view>
              </view>
@@ -150,23 +150,29 @@
    });
  },
  methods: {
        // 回显扫码的信息
    cancel() {
      // 处理取消逻辑
      this.showModal = false;
    },
    // 回显扫码的信息
    saveForm(val) {
        this.detailedList = val;
        this.showModal = true;
      },
    confirm() {
    //   // 处理确认逻辑
    //   this.$u.api.cancelMaterialRequisition
    //     .cancelMaterialRequisition({
    //       ...this.detailedList,
    //     })
    //     .then((res) => {
    //       this.hasScanSnList.push(this.detailedList);
    //       console.log("记录", this.hasScanSnList);
    //       this.$u.toast("取消领料成功");
        //     });
      // 处理确认逻辑
      this.$u.api.cancelMaterialRequisition
        .cancelMaterialRequisition({
          ...this.detailedList,
        })
        .then((res) => {
          this.hasScanSnList.push(this.detailedList);
          console.log("记录", this.hasScanSnList);
          this.$u.toast("取消领料成功");
        })
        .catch((err) => {
          this.$u.toast("取消领料失败");
        });
    },
  },
};
pages/storeManagement/MaterialRequisition/index.vue
@@ -51,7 +51,7 @@
                  <view class="_label-name">净重:</view>
                </view>
                <view class="_content">
                  {{ item.NW }}
                  {{ item.KW }}
                </view>
              </view>
            </view>
@@ -95,7 +95,7 @@
                </view>
                <view class="packing-registration-param-item-right">
                  <text class="item-one item-two">{{
                    detailedList.NW
                    detailedList.KW
                  }}</text>
                </view>
              </view>
@@ -150,23 +150,29 @@
    });
  },
  methods: {
    cancel() {
      // 处理取消逻辑
      this.showModal = false;
    },
        // 回显扫码的信息
    saveForm(val) {
        this.detailedList = val;
        this.showModal = true;
      },
    confirm() {
    //   // 处理确认逻辑
    //   this.$u.api.materialRequisition
    //     .materialRequisition({
    //       ...this.detailedList,
    //     })
    //     .then((res) => {
    //       this.hasScanSnList.push(this.detailedList);
    //       console.log("记录", this.hasScanSnList);
    //       this.$u.toast("领料成功");
        //     });
      // 处理确认逻辑
      this.$u.api.materialRequisition
        .materialRequisition({
          ...this.detailedList,
        })
        .then((res) => {
          this.hasScanSnList.push(this.detailedList);
          console.log("记录", this.hasScanSnList);
          this.$u.toast("领料成功");
        })
        .catch((err) => {
          this.$u.toast("领料失败");
        });
    },
  },
};
pages/sys/home/index.vue
@@ -84,21 +84,21 @@
                        // },
                    ]
                },
                // {
                //     title: '仓库管理',
                //     list: [
                //         {
                //             name: '领料',
                //             url: '/pages/storeManagement/MaterialRequisition/index',
                //             icon: 'eleven'
                //         },
                //         {
                //             name: '取消领料',
                //             url: '/pages/storeManagement/CancelMaterialRequisition/index',
                //             icon: 'twelve'
                //         },
                //     ]
                // }
                {
                    title: '仓库管理',
                    list: [
                        {
                            name: '领料',
                            url: '/pages/storeManagement/MaterialRequisition/index',
                            icon: 'eleven'
                        },
                        {
                            name: '取消领料',
                            url: '/pages/storeManagement/CancelMaterialRequisition/index',
                            icon: 'twelve'
                        },
                    ]
                }
            ]
        };
    },