Commit ed993312 by 周志凯

fix: business time

1 parent bbe13f6f
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
></el-option> ></el-option>
</el-select> </el-select>
</div> </div>
<div class="manage-select-box"> <!-- <div class="manage-select-box">
<el-select <el-select
v-model="createTypeVal" v-model="createTypeVal"
class="mall-opt" class="mall-opt"
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
</div> </div> -->
<!-- 监控点 --> <!-- 监控点 -->
<div class="manage-select-box"> <div class="manage-select-box">
<el-input <el-input
...@@ -55,19 +55,19 @@ ...@@ -55,19 +55,19 @@
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<div class="btn-box"> <div class="btn-box">
<!-- <el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
class="manage-add-btn fl-btn" class="manage-add-btn fl-btn"
@click="addClerk" @click="addClerk"
icon="el-icon-circle-plus-outline" icon="el-icon-circle-plus-outline"
>{{$t('dialog.addClerk')}}</el-button> --> >{{$t('dialog.addClerk')}}</el-button>
<el-button <!-- <el-button
type="primary" type="primary"
size="mini" size="mini"
class="manage-add-btn fl-btn" class="manage-add-btn fl-btn"
@click="onMarkClerkClick" @click="onMarkClerkClick"
>{{$t('dialog.markClerk')}}</el-button> >{{$t('dialog.markClerk')}}</el-button> -->
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -325,7 +325,7 @@ export default { ...@@ -325,7 +325,7 @@ export default {
}, },
createTypeList: [ createTypeList: [
{ label: this.$t("dialog.addClerk"), value: 0 }, { label: this.$t("dialog.addClerk"), value: 0 },
{ label: this.$t("table.autoTag"), value: 1 } // { label: this.$t("table.autoTag"), value: 1 }
], ],
createTypeVal: "", createTypeVal: "",
clerkName: "", clerkName: "",
......
...@@ -538,6 +538,7 @@ export default { ...@@ -538,6 +538,7 @@ export default {
this.editForm.latitude = latLng.lat; this.editForm.latitude = latLng.lat;
}, },
editBusTime() { editBusTime() {
return new Promise(resolve => {
var today = new Date(), var today = new Date(),
params = {}, params = {},
url = ""; url = "";
...@@ -566,13 +567,14 @@ export default { ...@@ -566,13 +567,14 @@ export default {
} }
this.$api.management this.$api.management
.addOrEditOpenTime(url, params) .addOrEditOpenTime(url, params)
.then(res => {}) .then(res => { resolve() })
.catch(err => { .catch(err => {
this.$message({ this.$message({
message: this.$t("message.businessTimeErr"), message: this.$t("message.businessTimeErr"),
type: "error" type: "error"
}); });
}); });
})
}, },
editSubmit(formName) { editSubmit(formName) {
this.$refs[formName].validate(valid => { this.$refs[formName].validate(valid => {
...@@ -581,12 +583,12 @@ export default { ...@@ -581,12 +583,12 @@ export default {
this.editForm.openDate = this.editForm.openDate + " 00:00:00"; this.editForm.openDate = this.editForm.openDate + " 00:00:00";
this.$api.management this.$api.management
.editMall(this.rowId, this.editForm) .editMall(this.rowId, this.editForm)
.then(data => { .then(async data => {
if (this.editForm.businessTime) { if (this.editForm.businessTime) {
this.editBusTime(); await this.editBusTime();
} }
await this.$parent.getOpenTime();
this.editDialogVisible = false; this.editDialogVisible = false;
// this.$parent.getOpenTime();
this.$parent.getTableData(); this.$parent.getTableData();
}) })
.catch(error => { .catch(error => {
......
...@@ -387,6 +387,7 @@ export default { ...@@ -387,6 +387,7 @@ export default {
.catch(error => {}); .catch(error => {});
}, },
getOpenTime() { getOpenTime() {
return new Promise(resolve => {
let accountId = this.$cookie.get("accountId"); let accountId = this.$cookie.get("accountId");
this.$api.management this.$api.management
.openTimeList({ .openTimeList({
...@@ -412,10 +413,12 @@ export default { ...@@ -412,10 +413,12 @@ export default {
}); });
this.openTimeObj = temp; this.openTimeObj = temp;
this.openTimeId = idObj; this.openTimeId = idObj;
resolve()
}) })
.catch(err => { .catch(err => {
console.log(err); console.log(err);
}); });
})
}, },
TimeFormatter(row, column, cellValue) { TimeFormatter(row, column, cellValue) {
return this.openTimeObj[row.id]; return this.openTimeObj[row.id];
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!