Commit ed993312 by 周志凯

fix: business time

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