charles
2024-07-18 a0b97eb8e934ba28b9e51824d4cbbcc99cc70e17
fxi:解决发货bug
3个文件已修改
25 ■■■■■ 已修改文件
src/router/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/salesDetails/shipmentsDialog.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js
@@ -103,7 +103,7 @@
// 导出路由 在 main.js 里使用
const createRouter = () =>
  new Router({
    mode: "history",
    mode: "hash",
    // base: window.getServerJson.context,
    scrollBehavior: () => ({ y: 0 }),
    routes: constantRoutes
src/views/sales/salesDetails/shipmentsDialog.vue
@@ -88,7 +88,7 @@
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" size="small" :disabled="dissatisfy" @click="saveClick('form')">确定发货</el-button>
        <el-button type="primary" size="small" :disabled="dissatisfy" @click.stop="saveClick('form')">确定发货</el-button>
        <el-button size="small" @click="editConfig.visible = false">取消</el-button>
      </div>
    </el-dialog>
@@ -135,7 +135,7 @@
          { label: "订单完成数量", min:120,prop: "finishAmount",},
          { label: "可用库存", prop: "availableAmount",},
          { label: "未发货数量", prop: "leftAmount", min:120, },
          { label: "本次发货数量", prop: "outputAmount", min:120,inputFloat: true,isRequird:true,},
          { label: "本次发货数量", prop: "outputAmount", min:120,inputFloat: true},
          { label: "剩余发货数量", prop: "availableAmount",min:120,},
        ]
    return {
@@ -312,12 +312,18 @@
                isShipments=false
              }
            }
          })
          });
          if(isShipments){
            this.$message.warning("发货数量超出未发货数量或超出当前可用库存")
          }else if(shipmentsNum){
          }/*else if(shipmentsNum){
            this.$message.warning("发货数量不能为0")
          }else{
          }*/else{
              //过滤掉为空的数据
              params.products=params.products.filter(item=>item.outputAmount);
              if(params.products.length===0){
                  this.$message.warning('没有满足发货条件的明细,无法发货');
                  return;
              }
            confirmOutput(params).then((res)=>{
              if(res&&res.code===200){
                this.$message.success("发货成功!")
@@ -341,7 +347,7 @@
          outputAmount:this.editConfig.infomation.deliverType===1?item.leftAmount:item.outputAmount // 本次发货数量
        }
        params.products.push(obj)
      })
      });
      return params
    },
@@ -650,7 +656,7 @@
          { label: "订单完成数量", min:120, prop: "finishAmount" ,},
          { label: "可用库存", prop: "availableAmount",},
          { label: "未发货数量", prop: "leftAmount", min:120, },
          { label: "本次发货数量", prop: "outputAmount",  min:120,inputFloat: true,isRequird:true,},
          { label: "本次发货数量", prop: "outputAmount",  min:120,inputFloat: true},
          { label: "剩余发货数量", prop: "availableAmount", min:120,},
        ]
        this.productTableList.tableColumn=this.setColumnVisible(this.productTableList.showcol, this.tableColumn)
vue.config.js
@@ -1,6 +1,7 @@
const path = require("path")
// 基础路径 注意发布之前要先修改这里
const publicPath = process.env.VUE_APP_PUBLIC_PATH || "/"
//const publicPath = process.env.VUE_APP_PUBLIC_PATH || "/"
const publicPath="./";
function resolve(dir) {
  return path.join(__dirname, dir)
}