zuozhengqing
2024-03-30 c4158c84f0b6b17ccb2818d80b963d803fb922b4
销售明细单确认发货完成替换接口,发货修改判断条件
2个文件已修改
54 ■■■■■ 已修改文件
src/views/sales/salesDetails/index.vue 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/salesDetails/shipmentsDialog.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/salesDetails/index.vue
@@ -795,60 +795,15 @@
          console.log(res, "resss")
          if (res.data) {
            this.productTableList.tableInfomation = res.data?.length > 0 ? res.data : []
            // let accumulator=res.data
            // const reducedArray = array.reduce((accumulator, currentItem) => {
            //   // 查找当前number是否已存在于accumulator中
            //   const existingItem = accumulator.find(item => item.number === currentItem.number);
            //   if (existingItem) {
            //     // 如果存在,累加num
            //     existingItem.amount += currentItem.amount;
            //   } else {
            //     // 如果不存在,将当前项添加到accumulator中
            //     accumulator.push(currentItem);
            //   }
            //   return accumulator;
            // }, []); // 初始化accumulator为一个空数组
            // console.log(reducedArray,"新数组");
          }
          this.loading = false
        })
        // let obj=[
        //   {
        //     name:"小明",
        //     id:1,
        //     num:10
        //   },
        //   {
        //     name:"小明",
        //     id:1,
        //     num:20
        //   },
        //   {
        //     name:"小明",
        //     id:1,
        //     num:5
        //   },
        //   {
        //     name:"小红",
        //     id:1,
        //     num:5
        //   },
        //   {
        //     name:"小红",
        //     id:1,
        //     num:10
        //   },
        //   {
        //     name:"小房",
        //     id:5,
        //     num:3
        //   },
        // ]
        .catch(() => {
          this.productTableList.tableInfomation = []
          this.loading = false
        })
      this.updateStatus(row.id, 4)
      // await confirmOutputOver({saleDetailNumber:row.number}).then((res)=>{
      //   if(res&&res.code===200){
      //     this.$message.success("确认发货完成")
@@ -858,8 +813,7 @@
    },
    // 关闭
    closeClick(row) {
      console.log(row, "关闭")
      this.updateStatus(row.id, 4)
      this.updateStatus(row.id, 6)
    },
    // 修改状态
    async updateStatus(id, status) {
src/views/sales/salesDetails/shipmentsDialog.vue
@@ -296,7 +296,7 @@
          let shipmentsNum=false
          this.shipmentsList.map((item)=>{
            if(this.editConfig.infomation.deliverType===1){
              if(item.leftAmount<item.availableAmount&&item.leftAmount>0){
              if(item.leftAmount<=item.availableAmount&&item.leftAmount>0){
                isShipments=false
              }else if(item.leftAmount<=0){
                shipmentsNum=true