diff --git a/src/views/production/stackManage.vue b/src/views/production/stackManage.vue
index 7fce8c5..54f6b10 100644
--- a/src/views/production/stackManage.vue
+++ b/src/views/production/stackManage.vue
@@ -2,7 +2,7 @@
-
+
@@ -29,6 +29,7 @@
+
@@ -45,6 +46,12 @@
@click.native="codeDetail(scope.row.orderId)"
>详情
+ 导出
+
点击上传
只能上传 xls/xlsx 文件
@@ -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";
},
};