|
@@ -121,17 +121,11 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" width="200px" align="center" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
- <!-- <el-button size="mini" type="primary" @click="moveToEdit(scope.row)"
|
|
|
- :disabled="scope.row.shareEditStatus == 1">编辑
|
|
|
- </el-button> -->
|
|
|
<el-button type="primary" icon="el-icon-edit" @click="moveToEdit(scope.row)"
|
|
|
size="small" style="height: 50%;">编辑</el-button>
|
|
|
<el-button type="primary" icon="el-icon-share" plain
|
|
|
v-if="scope.row.addUserId == shareadmin" @click="shareBtn(scope.row)" size="small"
|
|
|
style="height: 50%;">分享</el-button>
|
|
|
- <!-- <el-button size="mini" type="primary" v-if="scope.row.addUserId == shareadmin"
|
|
|
- @click="shareBtn(scope.row)">分享
|
|
|
- </el-button> -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -478,94 +472,6 @@ export default {
|
|
|
this.page = e;
|
|
|
this.currentPage(this.dataList)
|
|
|
},
|
|
|
- //外部导入
|
|
|
- // async addExport(e) {
|
|
|
- // await this.$http({
|
|
|
- // url: '/market/cOnlineSyncExcel/addExcel',
|
|
|
- // method: "post",
|
|
|
- // headers: {
|
|
|
- // "Content-Type": "application/json",
|
|
|
- // },
|
|
|
- // data: {
|
|
|
- // folderId: '',
|
|
|
- // },
|
|
|
- // }).then((res) => {
|
|
|
- // this.startUpload(e, res.data.desc)
|
|
|
- // });
|
|
|
- // },
|
|
|
- startUpload(e, res) {
|
|
|
- let _this = this;
|
|
|
- let files = e.target.files;
|
|
|
- if (files == null || files.length == 0) {
|
|
|
- window.top.$vm.$message({
|
|
|
- message: '没有文件导入',
|
|
|
- type: 'info'
|
|
|
- })
|
|
|
- return;
|
|
|
- }
|
|
|
- let name = files[0].name;
|
|
|
- let suffixArr = name.split("."),
|
|
|
- suffix = suffixArr[suffixArr.length - 1];
|
|
|
- if (suffix != "xlsx") {
|
|
|
- window.top.$vm.$message({
|
|
|
- message: '目前只支持xlsx文件的导入',
|
|
|
- type: 'info'
|
|
|
- })
|
|
|
- return;
|
|
|
- }
|
|
|
- // 解析文件
|
|
|
- LuckyExcel.transformExcelToLucky(files[0], function (exportJson, luckysheetfile) {
|
|
|
- if (exportJson.sheets == null || exportJson.sheets.length == 0) {
|
|
|
- window.top.$vm.$message({
|
|
|
- message: '无法读取excel文件的内容,当前不支持xls文件',
|
|
|
- type: 'info'
|
|
|
- })
|
|
|
- return;
|
|
|
- }
|
|
|
- let exceljson = JSON.stringify(exportJson)
|
|
|
- _this.$util.ajaxJson("正在导入中", getConfig().EXCEL_URL + "/sheet/excel/importFile", { exceldata: exceljson, id: res }, function (res) {
|
|
|
- // console.log('[ res ] >', res)
|
|
|
- _this.addNewStatus = false;
|
|
|
- document.getElementById('excelId').setAttribute("value", res.id);
|
|
|
- _this.showExcel = true;
|
|
|
-
|
|
|
-
|
|
|
- });
|
|
|
- }
|
|
|
- );
|
|
|
-
|
|
|
- },
|
|
|
- // async handleUpload(file) {
|
|
|
- // console.log(file);
|
|
|
- // const isLt2M = file.size / 1024 / 1024 < 100;
|
|
|
- // if (!isLt2M) {
|
|
|
- // this.$message.error("上传文件大小不能超过 20MB!");
|
|
|
- // return false;
|
|
|
- // }
|
|
|
- // this.loading = true;
|
|
|
- // let query = new FormData();
|
|
|
- // query.append("file", file);
|
|
|
- // console.log(query);
|
|
|
- // this.$http({
|
|
|
- // url: this.fileInfo.url,
|
|
|
- // method: "post",
|
|
|
- // headers: {
|
|
|
- // "Content-Type": "application/json",
|
|
|
- // },
|
|
|
- // data: query,
|
|
|
- // }).then((res) => {
|
|
|
-
|
|
|
- // }).catch((res) => {
|
|
|
- // this.$message({
|
|
|
- // message: file.name + "上传失败",
|
|
|
- // type: "error",
|
|
|
- // });
|
|
|
-
|
|
|
- // });
|
|
|
- // // await this.addExport(e)
|
|
|
-
|
|
|
-
|
|
|
- // },
|
|
|
processWoNo() {
|
|
|
console.log(this.woNo);
|
|
|
var _this = this;
|
|
@@ -587,17 +493,30 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
|
- _this.$message({
|
|
|
- message: '请填写完毕后点击“保存”按钮',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- var id = res.data.desc;
|
|
|
- //放入id,切换到excel模式
|
|
|
- document.getElementById('excelId').setAttribute("value", id);
|
|
|
- _this.showExcel = true;
|
|
|
- console.log(_this.showExcel);
|
|
|
+ // moveToEdit(e)
|
|
|
+ // _this.$message({
|
|
|
+ // message: '请填写完毕后点击“保存”按钮',
|
|
|
+ // type: 'success'
|
|
|
+ // });
|
|
|
+ // var id = res.data.desc;
|
|
|
+ // //放入id,切换到excel模式
|
|
|
+ // document.getElementById('excelId').setAttribute("value", id);
|
|
|
+ // _this.showExcel = true;
|
|
|
+ // console.log(_this.showExcel);
|
|
|
}
|
|
|
});
|
|
|
+ this.$http({
|
|
|
+ url: '/market/cOnlineSyncExcel/getExcleInfoByOaId',
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ id: _this.woNo,
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ this.moveToEdit(res.data.body)
|
|
|
+ });
|
|
|
},
|
|
|
moveExcel() {
|
|
|
var _this = this;
|