charles
2024-07-18 a0b97eb8e934ba28b9e51824d4cbbcc99cc70e17
src/views/sales/salesDetails/shipmentsDialog.vue
@@ -30,11 +30,12 @@
                  </el-radio-group>
                </el-form-item>
              </el-col>
              <!-- <el-col :span="24">
              <el-col :span="24">
                <el-form-item label="关联项目:" prop="projectId">
                  <el-select
                    v-model="editConfig.infomation.projectId"
                    placeholder="请选择"
                    disabled
                    size="mini"
                  >
                    <el-option
@@ -46,7 +47,7 @@
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col> -->
              </el-col>
              <el-col :span="24">
                <el-form-item  label="发货仓库" prop="addressee">
                  <el-select  v-model="value" placeholder="请选择" @change="optionsChange">
@@ -87,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>
@@ -134,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 {
@@ -229,7 +230,6 @@
    this.setTableForm()
    this.handleRadioChange()
    this.getCommonData()
    this.formInfo()
    this.getUseSystemSet({ modeType: "xsmx" })
    this.getProjectList()
    this.getDeliveryPrepareInfo({
@@ -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
    },
@@ -566,9 +572,6 @@
        pageSize: 100
      }).then((res) => {
        this.projectList = res.data
        // if(res&&res.data.length>0){
        //   this.editConfig.infomation.projectId=res.data[0].projectId
        // }
      })
    },
    // 销售负责人自定义校验规则
@@ -653,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)