出库任务
This commit is contained in:
parent
f9178d85f7
commit
ea41b35a28
|
|
@ -42,3 +42,11 @@ export function delTask(taskId) {
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function taskOutRequest(data) {
|
||||||
|
return request({
|
||||||
|
url: '/app/task/createOutRequest',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,17 @@
|
||||||
v-hasPermi="['app:stock:export']"
|
v-hasPermi="['app:stock:export']"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleCK"
|
||||||
|
v-hasPermi="['app:stock:export']"
|
||||||
|
>物料出库</el-button>
|
||||||
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
|
@ -216,6 +227,23 @@
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
<el-dialog :title="title" :visible.sync="ck" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="物料编号" prop="goodsId" >
|
||||||
|
<el-input v-model="form.goodsId" placeholder="请输入载具号" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="需求数量" prop="needNum">
|
||||||
|
<el-input v-model="form.needNum" placeholder="请输入需求数量" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForms">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 添加或修改【请填写功能名称】对话框 -->
|
<!-- 添加或修改【请填写功能名称】对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
|
@ -281,6 +309,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listStock, getStock, delStock, addStock, updateStock } from "@/api/system/stock";
|
import { listStock, getStock, delStock, addStock, updateStock } from "@/api/system/stock";
|
||||||
|
import {taskOutRequest} from "@/api/system/task";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Stock",
|
name: "Stock",
|
||||||
|
|
@ -304,6 +333,11 @@ export default {
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
|
ck: false,
|
||||||
|
taskOut:{
|
||||||
|
goodsId: null,
|
||||||
|
needNum: null,
|
||||||
|
},
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
|
|
@ -356,6 +390,9 @@ export default {
|
||||||
createTime: [
|
createTime: [
|
||||||
{ required: true, message: "入库时间不能为空", trigger: "blur" }
|
{ required: true, message: "入库时间不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
needNum: [
|
||||||
|
{ required: true, message: "需求数量不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
@ -375,6 +412,7 @@ export default {
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
this.ck = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
|
|
@ -454,6 +492,20 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
submitForms() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
taskOutRequest(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("出库成功");
|
||||||
|
this.ck = false;
|
||||||
|
this.getList();
|
||||||
|
}).catch(() => {
|
||||||
|
this.ck = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const stockIds = row.stockId || this.ids;
|
const stockIds = row.stockId || this.ids;
|
||||||
|
|
@ -469,7 +521,17 @@ export default {
|
||||||
this.download('app/stock/export', {
|
this.download('app/stock/export', {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `stock_${new Date().getTime()}.xlsx`)
|
}, `stock_${new Date().getTime()}.xlsx`)
|
||||||
}
|
},
|
||||||
|
handleCK(row) {
|
||||||
|
this.reset();
|
||||||
|
const stockId = row.stockId || this.ids
|
||||||
|
getStock(stockId).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.ck = true;
|
||||||
|
this.title = "物料出库";
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user