Commit 472988ae authored by pengyunqian's avatar pengyunqian

update:最小配送量

parent 46096a00
......@@ -111,8 +111,8 @@
clearable
placeholder="请选择配送工具"
>
<el-option label="电动车" value="0"></el-option>
<el-option label="摩托车" value="1"></el-option>
<el-option label="电动车" value="1"></el-option>
<el-option label="摩托车" value="2"></el-option>
</el-select>
</el-form-item>
</el-form>
......@@ -297,6 +297,8 @@ export default {
const { name, max_capacity, min_capacity, tool_type } = this.addDeliverer;
if (!name) return ElMessage("请填写配送员姓名");
if (!max_capacity) return ElMessage("请填写配送上限");
if (min_capacity !== '' && min_capacity <= 0) return ElMessage("最小配送量不能为0或小于0");
if (!min_capacity) return ElMessage("请填写最小配送量");
if (!tool_type) return ElMessage("请选择配送工具");
const params = {
name,
......@@ -305,7 +307,8 @@ export default {
tool_type: +tool_type,
};
try {
await getAddDeliverer(params);
const {code, reason} = await getAddDeliverer(params);
if(code !== 0) return this.$message.error(reason || "添加配送员失败")
ElMessage("添加配送员成功");
this.getDelivererList();
this.dialogFormAdd = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment