|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
<div>
|
|
|
|
|
<el-form :inline="true" :model="query" class="query-form" size="mini">
|
|
|
|
|
<el-form-item class="query-form-item">
|
|
|
|
|
<el-input v-model="query.stackId" placeholder="垛号"></el-input>
|
|
|
|
|
<el-input v-model="query.orderId" placeholder="垛号"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button-group>
|
|
|
|
@ -29,6 +29,7 @@
|
|
|
|
|
<el-table v-loading="loading" :data="list" style="width: 100%">
|
|
|
|
|
<el-table-column label="序号" type="index" width="50" fixed></el-table-column>
|
|
|
|
|
<el-table-column label="垛号" prop="orderId" fixed></el-table-column>
|
|
|
|
|
<el-table-column label="扫码数量" prop="codeNum" fixed></el-table-column>
|
|
|
|
|
<el-table-column label="导出状态" prop="exportStatus" fixed>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-tag>
|
|
|
|
@ -45,6 +46,12 @@
|
|
|
|
|
@click.native="codeDetail(scope.row.orderId)"
|
|
|
|
|
>详情
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click.native="exportStackCode(scope.row.orderId)"
|
|
|
|
|
>导出
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
@ -94,14 +101,11 @@
|
|
|
|
|
:close-on-press-escape="false"
|
|
|
|
|
>
|
|
|
|
|
<el-upload
|
|
|
|
|
class="upload-demo"
|
|
|
|
|
action="https://jsonplaceholder.typicode.com/posts/"
|
|
|
|
|
:on-preview="handlePreview"
|
|
|
|
|
:on-remove="handleRemove"
|
|
|
|
|
:before-remove="beforeRemove"
|
|
|
|
|
multiple
|
|
|
|
|
class="upload"
|
|
|
|
|
:action="this.uploadUrl"
|
|
|
|
|
:before-upload="beforeUpload"
|
|
|
|
|
on-success="uploadHandleSuccess"
|
|
|
|
|
:limit="3"
|
|
|
|
|
:on-exceed="handleExceed"
|
|
|
|
|
:file-list="fileList">
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
<div slot="tip" class="el-upload__tip">只能上传 xls/xlsx 文件</div>
|
|
|
|
@ -211,12 +215,13 @@ import {getStackOrderList, deleteStackOrder, updateStack, uploadStack} from "@/a
|
|
|
|
|
import {getStackCodeList, deleteCode, addStackCode} from "@/api/production/stackCode";
|
|
|
|
|
import stackCode from "@/views/production/stackCode";
|
|
|
|
|
import {isBlank} from "@/utils/strUtil";
|
|
|
|
|
import {BASE_URL} from "@/config/app";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
query: {
|
|
|
|
|
stackId: null,
|
|
|
|
|
orderId: null,
|
|
|
|
|
customerId: this.$store.getters.customerId,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20
|
|
|
|
@ -244,6 +249,9 @@ export default {
|
|
|
|
|
codeDetailVisible: false,
|
|
|
|
|
stackVisible: false,
|
|
|
|
|
importVisible: false,
|
|
|
|
|
fileList: [],
|
|
|
|
|
filePath: null,
|
|
|
|
|
uploadUrl: null,
|
|
|
|
|
idQuery: {
|
|
|
|
|
orderIdFk: null
|
|
|
|
|
},
|
|
|
|
@ -256,7 +264,7 @@ export default {
|
|
|
|
|
orderIdFk: null,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
@ -267,7 +275,12 @@ export default {
|
|
|
|
|
this.$router.push({
|
|
|
|
|
path: "",
|
|
|
|
|
});
|
|
|
|
|
this.query = {};
|
|
|
|
|
this.query = {
|
|
|
|
|
orderId: null,
|
|
|
|
|
customerId: this.$store.getters.customerId,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20
|
|
|
|
|
};
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
onSubmit() {
|
|
|
|
@ -334,7 +347,10 @@ export default {
|
|
|
|
|
editStack(row) {
|
|
|
|
|
this.stackVisible = true;
|
|
|
|
|
this.formName = 'edit';
|
|
|
|
|
this.formData = row;
|
|
|
|
|
this.formData = {
|
|
|
|
|
orderId: row.orderId,
|
|
|
|
|
code: null
|
|
|
|
|
};
|
|
|
|
|
this.codeQuery = {
|
|
|
|
|
orderIdFk: row.orderId,
|
|
|
|
|
page: 1,
|
|
|
|
@ -401,6 +417,8 @@ export default {
|
|
|
|
|
this.codeQuery.orderIdFk = res.data.orderIdFk;
|
|
|
|
|
}
|
|
|
|
|
this.getStackCodes();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.message);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.$refs.inputRef.select();
|
|
|
|
@ -426,9 +444,29 @@ export default {
|
|
|
|
|
importStackCode() {
|
|
|
|
|
this.importVisible = true;
|
|
|
|
|
},
|
|
|
|
|
beforeUpload(file) {
|
|
|
|
|
let fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);
|
|
|
|
|
const fileTypeArr = ['xls', 'xlsx'];
|
|
|
|
|
|
|
|
|
|
if (fileTypeArr.indexOf(fileSuffix) === -1) {
|
|
|
|
|
this.$message.warning("只能上传 xls,xlsx 格式文件");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
uploadHandleSuccess(response) {
|
|
|
|
|
if (response.code === 20000) {
|
|
|
|
|
this.filePath = res.data.path;
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error("上传失败:" + response.message);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
exportStackCode(orderId) {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.uploadUrl = BASE_URL + "/udims/stack/order/importStackOrder";
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|