|
@@ -17,8 +17,8 @@
|
|
|
:value="item.value"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
- <el-button type="primary" @click="handleResave">保存</el-button>
|
|
|
- <el-upload
|
|
|
+ <el-button type="primary" @click="handleResave" v-if="citystatus">保存</el-button>
|
|
|
+ <!-- <el-upload
|
|
|
class="upload-demo"
|
|
|
multiple
|
|
|
ref="upload"
|
|
@@ -34,10 +34,13 @@
|
|
|
<div>
|
|
|
<el-button>123</el-button>
|
|
|
</div>
|
|
|
- </el-upload>
|
|
|
- <el-button type="primary" @click="handleDownload">导出</el-button>
|
|
|
+ </el-upload> -->
|
|
|
+ <el-button type="primary" @click="handleDownload" v-if="saveStatus">导出</el-button>
|
|
|
<!-- <el-button type="primary" @click="handleDownload" v-if="clickOut">导出</el-button> -->
|
|
|
<el-button type="primary" @click="handleFullscreen()">全屏显示</el-button>
|
|
|
+ <div class="title-tips">
|
|
|
+ <span> 说明:文字结论为必填项</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
<div id="luckysheet" style="width: 75%; height: 70%"></div>
|
|
@@ -76,7 +79,9 @@ export default {
|
|
|
|
|
|
data() {
|
|
|
return {
|
|
|
- bednumber: "",
|
|
|
+ citystatus: false,
|
|
|
+ saveStatus: false,
|
|
|
+ bednumber: "联通",
|
|
|
options: [
|
|
|
{
|
|
|
value: "电信",
|
|
@@ -535,8 +540,9 @@ export default {
|
|
|
res.data.body[0][0].ch_width = 4971;
|
|
|
res.data.body[0][0].ch_height = 4971;
|
|
|
res.data.body[0].push(...data);
|
|
|
- for (let y = res.data.body[0][0].data.length - 1; y >= 0; y--) {
|
|
|
- if (res.data.body[0][0].data[y][0] === null) {
|
|
|
+ console.log(res.data.body);
|
|
|
+ for (let y = res.data.body[0][0].data.length - 1; y >= 3; y--) {
|
|
|
+ if (res.data.body[0][0].data[y][0] === null || !res.data.body[0][0].data[y][0].v) {
|
|
|
res.data.body[0][0].data.splice(y, 1);
|
|
|
}
|
|
|
}
|
|
@@ -572,7 +578,6 @@ export default {
|
|
|
}).then((res) => {
|
|
|
console.log(res);
|
|
|
// this.handleCreate(res.data.body)
|
|
|
- res.data.body[0].subScript = 0;
|
|
|
this.getUnicomList(res.data.body[0]);
|
|
|
});
|
|
|
},
|
|
@@ -586,7 +591,6 @@ export default {
|
|
|
},
|
|
|
}).then((res) => {
|
|
|
console.log(res);
|
|
|
- res.data.body[0].subScript = 1;
|
|
|
res.data.body.push(data);
|
|
|
this.handleCreate(res.data.body);
|
|
|
});
|
|
@@ -601,7 +605,6 @@ export default {
|
|
|
},
|
|
|
}).then((res) => {
|
|
|
console.log(res);
|
|
|
- res.data.body[0].subScript = 2;
|
|
|
this.getMoveList(res.data.body[0]);
|
|
|
});
|
|
|
},
|
|
@@ -615,7 +618,6 @@ export default {
|
|
|
},
|
|
|
}).then((res) => {
|
|
|
console.log(res);
|
|
|
- res.data.body[0].subScript = 3;
|
|
|
res.data.body.push(data);
|
|
|
this.handleCreate(res.data.body);
|
|
|
});
|
|
@@ -664,8 +666,8 @@ export default {
|
|
|
res.data.body[0][0].ch_width = 4971;
|
|
|
res.data.body[0][0].ch_height = 4971;
|
|
|
res.data.body[0].push(...data);
|
|
|
- for (let y = res.data.body[0][0].data.length - 1; y >= 0; y--) {
|
|
|
- if (res.data.body[0][0].data[y][0] === null) {
|
|
|
+ for (let y = res.data.body[0][0].data.length - 1; y >= 3; y--) {
|
|
|
+ if (res.data.body[0][0].data[y][0] === null || !res.data.body[0][0].data[y][0].v) {
|
|
|
res.data.body[0][0].data.splice(y, 1);
|
|
|
}
|
|
|
}
|
|
@@ -686,7 +688,6 @@ export default {
|
|
|
let data = [];
|
|
|
for (let i = 0; i < list.length; i++) {
|
|
|
data.push(list[i][0]);
|
|
|
- list[i][0].subScript = 0;
|
|
|
}
|
|
|
this.getMoves(data);
|
|
|
});
|
|
@@ -1072,11 +1073,11 @@ export default {
|
|
|
let day = time.getDay();
|
|
|
if (day === 4 || day === 5 || day === 6 || day == 7 || day === 1) {
|
|
|
if ((day === 4 && hover <= 15) || (day === 1 && hover >= 15)) {
|
|
|
- that.$message.error("上周四下午三点-本周一下午三点");
|
|
|
+ that.$message.error("可编辑时间:上周四下午三点-本周一下午三点");
|
|
|
return false;
|
|
|
}
|
|
|
} else {
|
|
|
- that.$message.error("上周四下午三点-本周一下午三点");
|
|
|
+ that.$message.error("可编辑时间:上周四下午三点-本周一下午三点");
|
|
|
return false;
|
|
|
}
|
|
|
},
|
|
@@ -1128,31 +1129,31 @@ export default {
|
|
|
// },
|
|
|
};
|
|
|
|
|
|
- switch (data.type) {
|
|
|
- case "file":
|
|
|
- if (data.file) {
|
|
|
- await new Promise((resolve) => {
|
|
|
- luckyexcel.transformExcelToLucky(data.file, (export_json) => {
|
|
|
- options.data = [
|
|
|
- ...export_json.sheets.map((element) => ({
|
|
|
- ...element,
|
|
|
- zoomRatio: 0.75,
|
|
|
- })),
|
|
|
- ];
|
|
|
- options.title = export_json.info.name;
|
|
|
- resolve();
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
- break;
|
|
|
- case "json":
|
|
|
- console.log(123);
|
|
|
- // if (json) {
|
|
|
- // options.data = [];
|
|
|
- // options.title = name;
|
|
|
- // }
|
|
|
- break;
|
|
|
- }
|
|
|
+ // switch (data.type) {
|
|
|
+ // case "file":
|
|
|
+ // if (data.file) {
|
|
|
+ // await new Promise((resolve) => {
|
|
|
+ // luckyexcel.transformExcelToLucky(data.file, (export_json) => {
|
|
|
+ // options.data = [
|
|
|
+ // ...export_json.sheets.map((element) => ({
|
|
|
+ // ...element,
|
|
|
+ // zoomRatio: 0.75,
|
|
|
+ // })),
|
|
|
+ // ];
|
|
|
+ // options.title = export_json.info.name;
|
|
|
+ // resolve();
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // break;
|
|
|
+ // case "json":
|
|
|
+ // console.log(123);
|
|
|
+ // // if (json) {
|
|
|
+ // // options.data = [];
|
|
|
+ // // options.title = name;
|
|
|
+ // // }
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
window.luckysheet.create(options);
|
|
|
// this.handleCreate(options)
|
|
|
|
|
@@ -1598,11 +1599,32 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getTime() {},
|
|
|
+ cityStatus(data) {
|
|
|
+ let cityname = JSON.parse(
|
|
|
+ window.sessionStorage.getItem("userInfo")
|
|
|
+ ).cityName;
|
|
|
+ if (cityname) {
|
|
|
+ let citynames = cityname.substring(0, cityname.length - 3);
|
|
|
+ let datas = [];
|
|
|
+ for (let i = 3; i <= data.data.data.length - 1; i++) {
|
|
|
+ datas.push(data.data.data[i][0]);
|
|
|
+ }
|
|
|
+ let status = datas.every((item) => {
|
|
|
+ console.log(item);
|
|
|
+ if (item && item.v) {
|
|
|
+ return item.v === citynames;
|
|
|
+ } else {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return status;
|
|
|
+ }
|
|
|
+ },
|
|
|
handleResave() {
|
|
|
const sheet_name = window.luckysheet.getSheet().name;
|
|
|
let baseUrl = "";
|
|
|
const datas = window.luckysheet.getSheet(sheet_name);
|
|
|
- // switch (datas.subScript) {
|
|
|
+ // switch (datas.index) {
|
|
|
// case 0:
|
|
|
// baseUrl = "expensesUnicom";
|
|
|
// break;
|
|
@@ -1610,7 +1632,7 @@ export default {
|
|
|
// baseUrl = "questionnaireUnicom";
|
|
|
// break;
|
|
|
// case 2:
|
|
|
- // baseUrl = "expensesTelecom";load
|
|
|
+ // baseUrl = "expensesTelecom";
|
|
|
//
|
|
|
// break;
|
|
|
// case 3:
|
|
@@ -1631,11 +1653,13 @@ export default {
|
|
|
case "黑河联通资费内容":
|
|
|
case "佳木斯联通资费内容":
|
|
|
baseUrl = "expensesUnicom";
|
|
|
- datas.index = 1;
|
|
|
+ datas.index = 0;
|
|
|
datas.subScript = 0;
|
|
|
break;
|
|
|
case "联通问卷内容":
|
|
|
baseUrl = "questionnaireUnicom";
|
|
|
+ datas.index = 1;
|
|
|
+ datas.subScript = 1;
|
|
|
break;
|
|
|
case "七台河电信资费内容":
|
|
|
case "双鸭山电信资费内容":
|
|
@@ -1651,10 +1675,13 @@ export default {
|
|
|
case "黑河电信资费内容":
|
|
|
case "佳木斯电信资费内容":
|
|
|
baseUrl = "expensesTelecom";
|
|
|
- datas.index = 4;
|
|
|
+ datas.index = 0;
|
|
|
+ datas.subScript = 0;
|
|
|
break;
|
|
|
case "电信问卷内容":
|
|
|
baseUrl = "questionnaireTelecom";
|
|
|
+ datas.index = 1;
|
|
|
+ datas.subScript = 1;
|
|
|
}
|
|
|
const workbook_name = window.luckysheet.getWorkbookName();
|
|
|
let value = {};
|
|
@@ -1679,130 +1706,164 @@ export default {
|
|
|
data: data, //文件内容
|
|
|
};
|
|
|
}
|
|
|
- if (datas.subScript === 1) {
|
|
|
- let status = this.cityStatus(value);
|
|
|
- if (status) {
|
|
|
- this.$http({
|
|
|
- // 联通资费内容
|
|
|
- // url: "/market/expensesUnicom/save",
|
|
|
- //联通问卷
|
|
|
- // url: "/market/questionnaireUnicom/save",
|
|
|
- //电信费用
|
|
|
- // url: "/market/expensesTelecom/save",
|
|
|
- //电信问卷
|
|
|
- // url: "/market/questionnaireTelecom/save",
|
|
|
- url: "/market/" + baseUrl + "/save",
|
|
|
- method: "post",
|
|
|
- headers: {
|
|
|
- "Content-Type": "application/json",
|
|
|
- },
|
|
|
- data: value,
|
|
|
- }).then(() => {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "保存成功",
|
|
|
- });
|
|
|
- this.getCheck();
|
|
|
- });
|
|
|
+ // this.$http({
|
|
|
+ // // 联通资费内容
|
|
|
+ // // url: "/market/expensesUnicom/save",
|
|
|
+ // //联通问卷
|
|
|
+ // // url: "/market/questionnaireUnicom/save",
|
|
|
+ // //电信费用
|
|
|
+ // // url: "/market/expensesTelecom/save",
|
|
|
+ // //电信问卷
|
|
|
+ // // url: "/market/questionnaireTelecom/save",
|
|
|
+ // url: "/market/" + baseUrl + "/save",
|
|
|
+ // method: "post",
|
|
|
+ // headers: {
|
|
|
+ // "Content-Type": "application/json",
|
|
|
+ // },
|
|
|
+ // data: value,
|
|
|
+ // }).then(() => {
|
|
|
+ // this.$message({
|
|
|
+ // type: "success",
|
|
|
+ // message: "保存成功",
|
|
|
+ // });
|
|
|
+ // this.getCheck();
|
|
|
+ // });
|
|
|
+
|
|
|
+ //地市公司选择资费时候的 0资费,1问卷
|
|
|
+ let time = new Date();
|
|
|
+ let hover = time.getHours();
|
|
|
+ let day = time.getDay();
|
|
|
+ if (day === 4 || day === 5 || day === 6 || day == 7 || day === 1) {
|
|
|
+ if ((day === 4 && hover <= 15) || (day === 1 && hover >= 15)) {
|
|
|
+ this.$message.error("可编辑时间:上周四下午三点-本周一下午三点");
|
|
|
+ return false;
|
|
|
} else {
|
|
|
- this.$message({
|
|
|
- type: "error",
|
|
|
- message: "不能保存当前城市",
|
|
|
- });
|
|
|
+ if (datas.subScript === 1) {
|
|
|
+ let status = this.cityStatus(value);
|
|
|
+ if (status) {
|
|
|
+ this.$http({
|
|
|
+ // 联通资费内容
|
|
|
+ // url: "/market/expensesUnicom/save",
|
|
|
+ //联通问卷
|
|
|
+ // url: "/market/questionnaireUnicom/save",
|
|
|
+ //电信费用
|
|
|
+ // url: "/market/expensesTelecom/save",
|
|
|
+ //电信问卷
|
|
|
+ // url: "/market/questionnaireTelecom/save",
|
|
|
+ url: "/market/" + baseUrl + "/save",
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ data: value,
|
|
|
+ }).then(() => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "保存成功",
|
|
|
+ });
|
|
|
+ this.getCheck();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: "error",
|
|
|
+ message: "不能保存当前城市",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$http({
|
|
|
+ // 联通资费内容
|
|
|
+ // url: "/market/expensesUnicom/save",
|
|
|
+ //联通问卷
|
|
|
+ // url: "/market/questionnaireUnicom/save",
|
|
|
+ //电信费用
|
|
|
+ // url: "/market/expensesTelecom/save",
|
|
|
+ //电信问卷
|
|
|
+ // url: "/market/questionnaireTelecom/save",
|
|
|
+ url: "/market/" + baseUrl + "/save",
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ data: value,
|
|
|
+ }).then(() => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "保存成功",
|
|
|
+ });
|
|
|
+ this.getCheck();
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
- this.$http({
|
|
|
- // 联通资费内容
|
|
|
- // url: "/market/expensesUnicom/save",
|
|
|
- //联通问卷
|
|
|
- // url: "/market/questionnaireUnicom/save",
|
|
|
- //电信费用
|
|
|
- // url: "/market/expensesTelecom/save",
|
|
|
- //电信问卷
|
|
|
- // url: "/market/questionnaireTelecom/save",
|
|
|
- url: "/market/" + baseUrl + "/save",
|
|
|
- method: "post",
|
|
|
- headers: {
|
|
|
- "Content-Type": "application/json",
|
|
|
- },
|
|
|
- data: value,
|
|
|
- }).then(() => {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "保存成功",
|
|
|
- });
|
|
|
- this.getCheck();
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- // let time = new Date();
|
|
|
- // let hover = time.getHours();
|
|
|
- // let day = time.getDay();
|
|
|
- // if (day === 4 || day === 5 || day === 6 || day == 7 || day === 1) {
|
|
|
- // if ((day === 4 && hover <= 15) || (day === 1 && hover >= 15)) {
|
|
|
- // this.$message.error("不在可编辑时间");
|
|
|
- // return false;
|
|
|
- // } else {
|
|
|
- // this.$http({
|
|
|
- // // 联通资费内容
|
|
|
- // // url: "/market/expensesUnicom/save",
|
|
|
- // //联通问卷
|
|
|
- // // url: "/market/questionnaireUnicom/save",
|
|
|
- // //电信费用
|
|
|
- // // url: "/market/expensesTelecom/save",
|
|
|
- // //电信问卷
|
|
|
- // // url: "/market/questionnaireTelecom/save",
|
|
|
- // url: "/market/" + baseUrl + "/save",
|
|
|
- // method: "post",
|
|
|
- // headers: {
|
|
|
- // "Content-Type": "application/json",
|
|
|
- // },
|
|
|
- // data: value,
|
|
|
- // }).then(() => {
|
|
|
- // this.$message({
|
|
|
- // type: "success",
|
|
|
- // message: "保存成功",
|
|
|
- // });
|
|
|
- // this.getCheck();
|
|
|
- // });
|
|
|
- // }
|
|
|
- // } else {
|
|
|
- // this.$message.error("不在可编辑日期");
|
|
|
- // return false;
|
|
|
- // }
|
|
|
- },
|
|
|
- cityStatus(data) {
|
|
|
- let cityname = JSON.parse(
|
|
|
- window.sessionStorage.getItem("userInfo")
|
|
|
- ).cityName;
|
|
|
- let citynames = cityname.substring(0, cityname.length - 3);
|
|
|
- let datas = [];
|
|
|
- for (let i = 3; i <= data.data.data.length - 1; i++) {
|
|
|
- datas.push(data.data.data[i][0]);
|
|
|
+ this.$message.error("不在可编辑日期");
|
|
|
+ return false;
|
|
|
}
|
|
|
- let status = datas.every((item) => {
|
|
|
- return item.v === citynames;
|
|
|
- });
|
|
|
- return status;
|
|
|
- },
|
|
|
- handleChargeList() {
|
|
|
- this.$http({
|
|
|
- url: "/market/techcentergj/queryLeaderList",
|
|
|
- method: "post",
|
|
|
- headers: {
|
|
|
- "Content-Type": "application/json",
|
|
|
- },
|
|
|
- data: {},
|
|
|
- }).then((response) => {
|
|
|
- this.charge_list = response.data.map((element) => ({
|
|
|
- label: `${element.ou} ${element.secLeaderName}`,
|
|
|
- value: `${element.ou}-${element.secLeaderLogin},${element.secLeaderName}`,
|
|
|
- }));
|
|
|
- });
|
|
|
},
|
|
|
+
|
|
|
+ // let time = new Date();
|
|
|
+ // let hover = time.getHours();
|
|
|
+ // let day = time.getDay();
|
|
|
+ // if (day === 4 || day === 5 || day === 6 || day == 7 || day === 1) {
|
|
|
+ // if ((day === 4 && hover <= 15) || (day === 1 && hover >= 15)) {
|
|
|
+ // this.$message.error("不在可编辑时间");
|
|
|
+ // return false;
|
|
|
+ // } else {
|
|
|
+ // this.$http({
|
|
|
+ // // 联通资费内容
|
|
|
+ // // url: "/market/expensesUnicom/save",
|
|
|
+ // //联通问卷
|
|
|
+ // // url: "/market/questionnaireUnicom/save",
|
|
|
+ // //电信费用
|
|
|
+ // // url: "/market/expensesTelecom/save",
|
|
|
+ // //电信问卷
|
|
|
+ // // url: "/market/questionnaireTelecom/save",
|
|
|
+ // url: "/market/" + baseUrl + "/save",
|
|
|
+ // method: "post",
|
|
|
+ // headers: {
|
|
|
+ // "Content-Type": "application/json",
|
|
|
+ // },
|
|
|
+ // data: value,
|
|
|
+ // }).then(() => {
|
|
|
+ // this.$message({
|
|
|
+ // type: "success",
|
|
|
+ // message: "保存成功",
|
|
|
+ // });
|
|
|
+ // this.getCheck();
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // this.$message.error("不在可编辑日期");
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ handleChargeList() {
|
|
|
+ this.$http({
|
|
|
+ url: "/market/techcentergj/queryLeaderList",
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ data: {},
|
|
|
+ }).then((response) => {
|
|
|
+ this.charge_list = response.data.map((element) => ({
|
|
|
+ label: `${element.ou} ${element.secLeaderName}`,
|
|
|
+ value: `${element.ou}-${element.secLeaderLogin},${element.secLeaderName}`,
|
|
|
+ }));
|
|
|
+ });
|
|
|
},
|
|
|
mounted() {
|
|
|
+ let cityname = JSON.parse(
|
|
|
+ window.sessionStorage.getItem("userInfo")
|
|
|
+ ).cityName;
|
|
|
+ if (cityname) {
|
|
|
+ //地市公司权限
|
|
|
+ this.citystatus = true;
|
|
|
+ } else {
|
|
|
+ //省公司权限
|
|
|
+ this.saveStatus = true;
|
|
|
+ }
|
|
|
// this.getSheet()
|
|
|
+ this.getCheck()
|
|
|
this.getJurisdiction();
|
|
|
this.handleInit();
|
|
|
// this.handleChargeList();
|
|
@@ -1814,6 +1875,18 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scope>
|
|
|
+.title-tips {
|
|
|
+ color: red;
|
|
|
+ font-size: 24px;
|
|
|
+ /* margin-left: 30px; */
|
|
|
+ position: absolute;
|
|
|
+ top: 110px;
|
|
|
+ z-index: 20;
|
|
|
+ display: flex;
|
|
|
+ width: 75%;
|
|
|
+ flex-direction: row-reverse;
|
|
|
+ // left: calc(100% - 50rem);
|
|
|
+}
|
|
|
.el-dialog {
|
|
|
width: 100%;
|
|
|
height: 100%;
|