|
@@ -27,7 +27,7 @@
|
|
@change="onChange"
|
|
@change="onChange"
|
|
ref='file'
|
|
ref='file'
|
|
|
|
|
|
- class="inputmultiple" />
|
|
|
|
|
|
+ id="inputmultiple" />
|
|
</div>
|
|
</div>
|
|
<Button style="margin-left:10px" @click="$router.go(-1)">返回</Button>
|
|
<Button style="margin-left:10px" @click="$router.go(-1)">返回</Button>
|
|
<Button style="margin-left:10px" v-if="$route.query.type != 2" @click="saveData">保存</Button>
|
|
<Button style="margin-left:10px" v-if="$route.query.type != 2" @click="saveData">保存</Button>
|
|
@@ -114,7 +114,8 @@ export default {
|
|
{ title: "部件名称", key: "part_title", align: "center", minWidth: 140 },
|
|
{ title: "部件名称", key: "part_title", align: "center", minWidth: 140 },
|
|
{ title: "行号", key: "line_number", align: "center", minWidth: 140 },
|
|
{ title: "行号", key: "line_number", align: "center", minWidth: 140 },
|
|
{ title: "木皮1", key: "veneer_one", align: "center", minWidth: 140 },
|
|
{ title: "木皮1", key: "veneer_one", align: "center", minWidth: 140 },
|
|
- { title: "原材料", key: "material", align: "center", minWidth: 140 },
|
|
|
|
|
|
+ { title: "原材料1", key: "board1", align: "center", minWidth: 140 },
|
|
|
|
+ { title: "原材料2", key: "board2", align: "center", minWidth: 140 },
|
|
{ title: "木皮2", key: "veneer_two", align: "center", minWidth: 140 },
|
|
{ title: "木皮2", key: "veneer_two", align: "center", minWidth: 140 },
|
|
{ title: "毛料尺寸", key: "wollens_size", align: "center", minWidth: 140 },
|
|
{ title: "毛料尺寸", key: "wollens_size", align: "center", minWidth: 140 },
|
|
{ title: "毛料合并的行号", key: "wool_line", align: "center", minWidth: 140 },
|
|
{ title: "毛料合并的行号", key: "wool_line", align: "center", minWidth: 140 },
|
|
@@ -124,6 +125,7 @@ export default {
|
|
{ title: "贴皮面积", key: "treatment_area", align: "center", minWidth: 140 },
|
|
{ title: "贴皮面积", key: "treatment_area", align: "center", minWidth: 140 },
|
|
{ title: "精裁面积", key: "vacuum_area", align: "center", minWidth: 140 },
|
|
{ title: "精裁面积", key: "vacuum_area", align: "center", minWidth: 140 },
|
|
{ title: "工艺要求", key: "technological_requirements", align: "center", minWidth: 140 },
|
|
{ title: "工艺要求", key: "technological_requirements", align: "center", minWidth: 140 },
|
|
|
|
+ { title: "打印芯片", key: "chip_state", align: "center", minWidth: 140 },
|
|
{ title: "匹配状态", key: "state", align: "center", minWidth: 140,slot:'state' },
|
|
{ title: "匹配状态", key: "state", align: "center", minWidth: 140,slot:'state' },
|
|
],
|
|
],
|
|
headers: { Authorization: localStorage.getItem("token") },//请求头
|
|
headers: { Authorization: localStorage.getItem("token") },//请求头
|
|
@@ -311,8 +313,14 @@ export default {
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ repeatFile(){
|
|
|
|
+ document.querySelector('#inputmultiple').setAttribute('type','text');
|
|
|
|
+ document.querySelector('#inputmultiple').setAttribute('type','file');
|
|
|
|
+ },
|
|
async onChange (e) {
|
|
async onChange (e) {
|
|
- let fileList = e.target.files;
|
|
|
|
|
|
+
|
|
|
|
+ let fileList =e.target.files;
|
|
|
|
+ console.log(fileList)
|
|
for (let i in fileList) {
|
|
for (let i in fileList) {
|
|
if (!isNaN(Number(i))) {
|
|
if (!isNaN(Number(i))) {
|
|
this.headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
this.headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
@@ -320,7 +328,7 @@ export default {
|
|
...this.uploadData,
|
|
...this.uploadData,
|
|
your_file: fileList[i],
|
|
your_file: fileList[i],
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+
|
|
await axios({
|
|
await axios({
|
|
url: this.$store.state.ip + '/api/cut_order_import',
|
|
url: this.$store.state.ip + '/api/cut_order_import',
|
|
headers: this.headers,
|
|
headers: this.headers,
|
|
@@ -328,6 +336,7 @@ export default {
|
|
data,
|
|
data,
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
console.log(res)
|
|
console.log(res)
|
|
|
|
+ this.repeatFile();
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
this.$Message.success("导入成功");
|
|
this.$Message.success("导入成功");
|
|
this.cut_order_id = res.data.data.cut_order_id;
|
|
this.cut_order_id = res.data.data.cut_order_id;
|
|
@@ -349,6 +358,8 @@ export default {
|
|
}
|
|
}
|
|
})}
|
|
})}
|
|
|
|
|
|
|
|
+ }else{
|
|
|
|
+ this.$Message.error(res.data.msg)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
// await setTimeout(() => { }, 1000);
|
|
// await setTimeout(() => { }, 1000);
|
|
@@ -364,7 +375,8 @@ export default {
|
|
},
|
|
},
|
|
//点击事件
|
|
//点击事件
|
|
onClickBtn () {
|
|
onClickBtn () {
|
|
- this.$refs.file.click()
|
|
|
|
|
|
+ this.$refs.file.click();
|
|
|
|
+
|
|
}
|
|
}
|
|
},
|
|
},
|
|
};
|
|
};
|
|
@@ -422,7 +434,7 @@ export default {
|
|
position: relative;
|
|
position: relative;
|
|
display: inline-block;
|
|
display: inline-block;
|
|
}
|
|
}
|
|
-.inputmultiple {
|
|
|
|
|
|
+#inputmultiple {
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 100%;
|
|
height: 100%;
|
|
display: none;
|
|
display: none;
|