|
@@ -24,9 +24,7 @@
|
|
<el-link type="primary" :underline="false" @click="addPlan()">{{
|
|
<el-link type="primary" :underline="false" @click="addPlan()">{{
|
|
`新增${titleText}`
|
|
`新增${titleText}`
|
|
}}</el-link>
|
|
}}</el-link>
|
|
- <el-upload ref="upload" action="#" :limit="1" :http-request="importData" :show-file-list="false">
|
|
|
|
- <el-link type="primary" :underline="false">{{ "导入" }}</el-link>
|
|
|
|
- </el-upload>
|
|
|
|
|
|
+ <el-link type="primary" :underline="false" @click="importDataDialog=true">{{ "导入" }}</el-link>
|
|
<el-link type="primary" :underline="false" @click="exportData()"
|
|
<el-link type="primary" :underline="false" @click="exportData()"
|
|
:download="this.planType == 0 ? '今日计划' : this.planType == 1 ? '明日计划' : this.planType == 2 ? '插单计划' : '' + '.xlsx'">{{
|
|
:download="this.planType == 0 ? '今日计划' : this.planType == 1 ? '明日计划' : this.planType == 2 ? '插单计划' : '' + '.xlsx'">{{
|
|
"导出"
|
|
"导出"
|
|
@@ -200,6 +198,18 @@
|
|
<el-button @click="foremanDetailDialog = false">关闭</el-button>
|
|
<el-button @click="foremanDetailDialog = false">关闭</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
+
|
|
|
|
+ <!--导入计划 -->
|
|
|
|
+ <el-dialog :title="this.titleText+'导入'" :visible.sync="importDataDialog" width="500px">
|
|
|
|
+ <p>1. 下载
|
|
|
|
+ <el-link type="primary" style="margin-left:5px;" :underline="false" :href="'./upload/'+this.titleText+'导入模板.xlsx'" :download="this.titleText+'导入模板.xlsx'">{{this.titleText+'导入模板.xlsx'}}</el-link>
|
|
|
|
+ </p>
|
|
|
|
+ <p style="display: flex;justify-content: center;">
|
|
|
|
+ <el-upload ref="upload" action="#" :limit="1" :http-request="importData" :show-file-list="false">
|
|
|
|
+ <el-button type="primary" :underline="false" :loading="importingData">{{$t("other.startImporting")}}</el-button>
|
|
|
|
+ </el-upload>
|
|
|
|
+ </p>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -230,6 +240,8 @@ export default {
|
|
return v.getTime() < Date.now();
|
|
return v.getTime() < Date.now();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ importDataDialog:false,
|
|
|
|
+ importingData:false,
|
|
steelStampNumber: "",
|
|
steelStampNumber: "",
|
|
planDate: this.todayDate,
|
|
planDate: this.todayDate,
|
|
deptSetDialog: false,
|
|
deptSetDialog: false,
|
|
@@ -745,6 +757,7 @@ export default {
|
|
},
|
|
},
|
|
// 导入数据
|
|
// 导入数据
|
|
importData(item) {
|
|
importData(item) {
|
|
|
|
+ this.importingData = true;
|
|
this.tableDataLoading = true;
|
|
this.tableDataLoading = true;
|
|
let formData = new FormData();
|
|
let formData = new FormData();
|
|
formData.append("file", item.file);
|
|
formData.append("file", item.file);
|
|
@@ -753,6 +766,7 @@ export default {
|
|
res => {
|
|
res => {
|
|
this.$refs.upload.clearFiles();
|
|
this.$refs.upload.clearFiles();
|
|
this.tableDataLoading = false;
|
|
this.tableDataLoading = false;
|
|
|
|
+ this.importingData = false;
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
this.$message({
|
|
this.$message({
|
|
message: '导入成功',
|
|
message: '导入成功',
|