|
@@ -1,265 +1,114 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
+ <div>
|
|
|
+ <ul class="wall-row"
|
|
|
+ :style="{'width':(this.tableAttr.cols * 39)+'px', 'height':(this.tableAttr.rows * 40) + 'px'}">
|
|
|
+ <li
|
|
|
+ v-for="(item, index) in divList"
|
|
|
+ :key="index"
|
|
|
+ @click="selected"
|
|
|
+ >{{item.locationNo}}
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {
|
|
|
- listFlowConfig,
|
|
|
- getFlowConfig,
|
|
|
- updateFlowConfig,
|
|
|
- listLotattConfig,
|
|
|
- flowConfigLotatt
|
|
|
- } from "@/api/ams/flowConfig";
|
|
|
- import {choseFlow, exec} from "@/api/ams/lineCall";
|
|
|
- import {querySkuDict} from "@/api/base/baseSku";
|
|
|
- import {querySupplierDict} from "@/api/base/supplier";
|
|
|
- import {treeselect} from "@/api/base/locationInfo";
|
|
|
- import {inputTag} from "@/utils/combo/dict";
|
|
|
+ import {locationView} from "@/api/ams/locationView";
|
|
|
|
|
|
export default {
|
|
|
- name: "FlowConfig",
|
|
|
- dicts: ['sys_yes_no', 'ams_inv_quality'],
|
|
|
+ name: "LocationView",
|
|
|
data() {
|
|
|
return {
|
|
|
+ divList: [],
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
- // 选中数组
|
|
|
- ids: [],
|
|
|
- // 子表选中数据
|
|
|
- checkedFlowConfigDetails: [],
|
|
|
- // 非单个禁用
|
|
|
- single: true,
|
|
|
- // 非多个禁用
|
|
|
- multiple: true,
|
|
|
- // 显示搜索条件
|
|
|
- showSearch: true,
|
|
|
- // 总条数
|
|
|
- total: 0,
|
|
|
- // 流程配置头表格数据
|
|
|
- flowConfigList: [],
|
|
|
- // 流程配置体表格数据
|
|
|
- flowConfigDetailsList: [],
|
|
|
- // 弹出层标题
|
|
|
- title: "",
|
|
|
- // 是否显示弹出层
|
|
|
- open: false,
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 10,
|
|
|
- flowName: null,
|
|
|
+ zoneId: 2,
|
|
|
+ warehouseId: 1
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
// 表单校验
|
|
|
- rules: {
|
|
|
- flowName: [
|
|
|
- {required: true, message: "流程名称不能为空", trigger: "blur"}
|
|
|
- ],
|
|
|
- },
|
|
|
- defaultProps: {
|
|
|
- children: "children",
|
|
|
- label: "label"
|
|
|
- },
|
|
|
- inputTagCombo: inputTag,
|
|
|
- supplierCombo: [],
|
|
|
- skuTypeCombo: undefined,
|
|
|
- locationFromOptions: undefined,
|
|
|
- locationToOptions: undefined,
|
|
|
- locationFromCombo: undefined,
|
|
|
- locationToCombo: undefined
|
|
|
+ rules: {},
|
|
|
+ tableAttr: {
|
|
|
+ rows: 3,
|
|
|
+ cols: 3
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.init();
|
|
|
- this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
- /** 查询流程配置头列表 */
|
|
|
- getList() {
|
|
|
- this.loading = true;
|
|
|
- listFlowConfig(this.queryParams).then(response => {
|
|
|
- this.flowConfigList = response.rows;
|
|
|
- this.total = response.total;
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
- },
|
|
|
- // 取消按钮
|
|
|
- cancel() {
|
|
|
- this.open = false;
|
|
|
- this.reset();
|
|
|
- },
|
|
|
- // 表单重置
|
|
|
- reset() {
|
|
|
- this.form = {
|
|
|
- id: null,
|
|
|
- flowName: null,
|
|
|
- sku: '',
|
|
|
- skuTypeFlag: 'Choice',
|
|
|
- qty: null,
|
|
|
- qtyFlag: 'Choice',
|
|
|
- weight: null,
|
|
|
- weightFlag: 'Choice',
|
|
|
- supplier: '',
|
|
|
- supplierFlag: 'Choice',
|
|
|
- locationFrom: null,
|
|
|
- locationFromFlag: null,
|
|
|
- locationTo: null,
|
|
|
- locationToFlag: null,
|
|
|
- createBy: null,
|
|
|
- createTime: null,
|
|
|
- updateBy: null,
|
|
|
- updateTime: null,
|
|
|
- remark: null,
|
|
|
- lineCallDetailsFormList: null
|
|
|
- };
|
|
|
- this.flowConfigDetailsList = [];
|
|
|
- this.resetForm("form");
|
|
|
- },
|
|
|
- /** 搜索按钮操作 */
|
|
|
- handleQuery() {
|
|
|
- this.queryParams.pageNum = 1;
|
|
|
- this.getList();
|
|
|
- },
|
|
|
- /** 重置按钮操作 */
|
|
|
- resetQuery() {
|
|
|
- this.resetForm("queryForm");
|
|
|
- this.handleQuery();
|
|
|
- },
|
|
|
- // 多选框选中数据
|
|
|
- handleSelectionChange(selection) {
|
|
|
- this.ids = selection.map(item => item.id)
|
|
|
- this.single = selection.length !== 1
|
|
|
- this.multiple = !selection.length
|
|
|
- },
|
|
|
- /** 新增按钮操作 */
|
|
|
- handleAdd() {
|
|
|
- this.reset();
|
|
|
- this.open = true;
|
|
|
- this.title = "添加流程配置";
|
|
|
- },
|
|
|
- /** 修改按钮操作 */
|
|
|
- handleUpdate(row) {
|
|
|
- this.reset();
|
|
|
- const id = row.id || this.ids
|
|
|
- // 加载批次属性明细
|
|
|
- flowConfigLotatt(id).then(response => {
|
|
|
- this.flowConfigDetailsList = response.data;
|
|
|
- });
|
|
|
- choseFlow(id).then(response => {
|
|
|
- this.locationFromCombo = response.locationFrom
|
|
|
- this.locationToCombo = response.locationTo
|
|
|
- this.form.skuTypeFlag = response.skuTypeFlag
|
|
|
- this.form.qtyFlag = response.qtyFlag
|
|
|
- this.form.weightFlag = response.weightFlag
|
|
|
- this.form.supplierFlag = response.supplierFlag
|
|
|
- this.form.locationFromFlag = response.locationFromFlag
|
|
|
- this.form.locationToFlag = response.locationToFlag
|
|
|
- this.skuTypeCombo = response.skuList;
|
|
|
- this.open = true;
|
|
|
- this.title = "线边呼叫";
|
|
|
- });
|
|
|
- },
|
|
|
- /** 提交按钮 */
|
|
|
- submitForm() {
|
|
|
- this.$refs["form"].validate(valid => {
|
|
|
- if (valid) {
|
|
|
- if (this.form.skuTypeFlag === 'Required' && this.form.skuType === '') {
|
|
|
- this.$modal.msgError("物料必须选择");
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.form.qtyFlag === 'Required' && this.form.qty === null) {
|
|
|
- this.$modal.msgError("数量必须输入");
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.form.weightFlag === 'Required' && this.form.weight === null) {
|
|
|
- this.$modal.msgError("重量必须输入");
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.form.supplierFlag === 'Required' && this.form.supplier === null) {
|
|
|
- this.$modal.msgError("供应商必须输入");
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.form.locationFromFlag === 'Required' && this.form.locationFrom === null) {
|
|
|
- this.$modal.msgError("必须选择起点位置");
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.form.locationToFlag === 'Required' && this.form.locationTo === null) {
|
|
|
- this.$modal.msgError("必须选择终点位置");
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- if (this.flowConfigDetailsList.length > 0) {
|
|
|
- for (let i = 0; i < this.flowConfigDetailsList.length; i++) {
|
|
|
- if (this.flowConfigDetailsList[i].lotattFlag === 'Required') {
|
|
|
- if(this.flowConfigDetailsList[i].lotattValue === '' || this.flowConfigDetailsList[i].lotattValue === null) {
|
|
|
- this.$modal.msgError(this.flowConfigDetailsList[i].lotattName+"必须输入");
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- let lineCallDetailsFormList = new Array();
|
|
|
- for (let i = 0; i < this.flowConfigDetailsList.length; i++) {
|
|
|
- let obj = new Object();
|
|
|
- obj.lotattId = this.flowConfigDetailsList[i].lotattId
|
|
|
- obj.lotattValue = this.flowConfigDetailsList[i].lotattValue
|
|
|
- lineCallDetailsFormList.push(obj)
|
|
|
- }
|
|
|
- this.form.lineCallDetailsFormList = lineCallDetailsFormList
|
|
|
- console.log(this.form)
|
|
|
- exec(this.form).then(response => {
|
|
|
- if (response.code === 200) {
|
|
|
- this.$modal.msgSuccess("执行成功");
|
|
|
- this.open = false;
|
|
|
- } else {
|
|
|
- this.$modal.msgError(response.msg);
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- /** 流程配置体序号 */
|
|
|
- rowFlowConfigDetailsIndex({row, rowIndex}) {
|
|
|
- row.index = rowIndex + 1;
|
|
|
- },
|
|
|
- /** 流程配置体添加按钮操作 */
|
|
|
- handleAddFlowConfigDetails() {
|
|
|
- let obj = {};
|
|
|
- obj.lotattId = "";
|
|
|
- obj.lotattFlag = "";
|
|
|
- obj.remark = "";
|
|
|
- this.flowConfigDetailsList.push(obj);
|
|
|
- },
|
|
|
- /** 流程配置体删除按钮操作 */
|
|
|
- handleDeleteFlowConfigDetails() {
|
|
|
- if (this.checkedFlowConfigDetails.length == 0) {
|
|
|
- this.$modal.msgError("请先选择要删除的流程配置体数据");
|
|
|
- } else {
|
|
|
- const flowConfigDetailsList = this.flowConfigDetailsList;
|
|
|
- const checkedFlowConfigDetails = this.checkedFlowConfigDetails;
|
|
|
- this.flowConfigDetailsList = flowConfigDetailsList.filter(function (item) {
|
|
|
- return checkedFlowConfigDetails.indexOf(item.index) == -1
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- /** 复选框选中数据 */
|
|
|
- handleFlowConfigDetailsSelectionChange(selection) {
|
|
|
- this.checkedFlowConfigDetails = selection.map(item => item.index)
|
|
|
- },
|
|
|
- // 筛选节点
|
|
|
- filterNode(value, data) {
|
|
|
- if (!value) return true;
|
|
|
- return data.label.indexOf(value) !== -1;
|
|
|
- },
|
|
|
init() {
|
|
|
- // 初始化供应商
|
|
|
- querySupplierDict().then(response => {
|
|
|
- this.supplierCombo = response.data;
|
|
|
- });
|
|
|
+ locationView(this.queryParams).then(response => {
|
|
|
+ let data = response.data
|
|
|
+ this.tableAttr.rows = data.rows
|
|
|
+ this.tableAttr.cols = data.cols
|
|
|
+ this.divList = data.locationViewInfoVOList
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
+
|
|
|
+<style scoped lang="css">
|
|
|
+ .custom-style {
|
|
|
+ position: absolute;
|
|
|
+ margin: 0;
|
|
|
+ padding: 0;
|
|
|
+ height: 440px;
|
|
|
+ width: 400px;
|
|
|
+ left: 50%;
|
|
|
+ top: 50%;
|
|
|
+ margin-left: -200px;
|
|
|
+ margin-top: -210px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .word {
|
|
|
+ display: block;
|
|
|
+ width: 100%;
|
|
|
+ height: 20px;
|
|
|
+ font-size: 13px;
|
|
|
+ background-color: #e2eef6;
|
|
|
+ }
|
|
|
+
|
|
|
+ .word span {
|
|
|
+ line-height: 20px;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .wall-row {
|
|
|
+ width: 400px;
|
|
|
+ height: 400px;
|
|
|
+ padding: 0;
|
|
|
+ margin: 0;
|
|
|
+ display: block;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+
|
|
|
+ .wall-row li {
|
|
|
+ list-style: none;
|
|
|
+ width: 39px;
|
|
|
+ height: 40px;
|
|
|
+ border: 0.5px solid #fff;
|
|
|
+ float: left;
|
|
|
+ background-color: #ebf0f4;
|
|
|
+ }
|
|
|
+
|
|
|
+ .wall-row .bgColor {
|
|
|
+ background-color: #00b4ff;
|
|
|
+ }
|
|
|
+
|
|
|
+ .word-cancel {
|
|
|
+ width: 100%;
|
|
|
+ height: 20px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+
|
|
|
+</style>
|