|
|
@@ -47,8 +47,8 @@
|
|
|
<el-radio-group
|
|
|
v-model="r.row.isWorkday"
|
|
|
@change="onEnableChange(r.row)">
|
|
|
- <el-radio text-color="#48bb78" :label="1">营业</el-radio>
|
|
|
- <el-radio text-color="#f56565" :label="0">歇业</el-radio>
|
|
|
+ <el-radio text-color="#48bb78" label="1">营业</el-radio>
|
|
|
+ <el-radio text-color="#f56565" label="0">歇业</el-radio>
|
|
|
</el-radio-group>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -68,7 +68,7 @@
|
|
|
style="width: 100%"
|
|
|
size="mini"
|
|
|
:picker-options="pickerOptions"
|
|
|
- :disabled="!r.row.isWorkday ||!r.row.isWorkday"
|
|
|
+ :disabled="r.row.isWorkday=='0' ||!r.row.isWorkday"
|
|
|
v-model="r.row.openTime"/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -98,7 +98,7 @@
|
|
|
style="width: 100%"
|
|
|
size="mini"
|
|
|
:picker-options="pickerOptions"
|
|
|
- :disabled="!r.row.isWorkday || !r.row.isWorkday"
|
|
|
+ :disabled="r.row.isWorkday=='0' || !r.row.isWorkday"
|
|
|
v-model="r.row.closeTime"/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -173,7 +173,7 @@ export default {
|
|
|
orgId:null,
|
|
|
formData: {
|
|
|
orgIds:[],
|
|
|
- dayOfWeeks: json,
|
|
|
+ dayOfWeeks: null,
|
|
|
effectiveDate:null,
|
|
|
},
|
|
|
disabled: false,
|
|
|
@@ -205,14 +205,16 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
edit(row){
|
|
|
this.title = '编辑作息模版';
|
|
|
this.isShow = true;
|
|
|
- this.formData = row;
|
|
|
+ this.id = row.id;
|
|
|
+ this.orgId = row.orgId;
|
|
|
+ this.getData();
|
|
|
},
|
|
|
add(){
|
|
|
this.title = '新增作息模版';
|
|
|
+ this.formData.dayOfWeeks = JSON.parse(JSON.stringify(json));
|
|
|
this.isShow = true;
|
|
|
},
|
|
|
show(row) {
|
|
|
@@ -250,7 +252,7 @@ export default {
|
|
|
checkItem(dayOfWeek){
|
|
|
console.log(dayOfWeek,'dayOfWeek');
|
|
|
//是否启用
|
|
|
- if(!dayOfWeek.isWorkday) return true;
|
|
|
+ if(dayOfWeek.isWorkday == '0') return true;
|
|
|
if (!( dayOfWeek.openTime && dayOfWeek.closeTime)) {
|
|
|
this.$message.error(`${dayOfWeek.dayOfWeekText}的营业时间未完整配置`);
|
|
|
return;
|
|
|
@@ -278,12 +280,13 @@ export default {
|
|
|
},
|
|
|
async getData() {
|
|
|
queryInfoById({id:this.id}).then(res=>{
|
|
|
+ res.data.effectiveDate = new Date(res.data.effectiveDate);
|
|
|
this.formData = res.data;
|
|
|
this.formData.orgIds = [res.data.orgId];
|
|
|
})
|
|
|
},
|
|
|
onEnableChange(workTime) {
|
|
|
- if (!workTime.isWorkday) {
|
|
|
+ if (workTime.isWorkday=='0') {
|
|
|
workTime.openTime = null;
|
|
|
workTime.closeTime = null;
|
|
|
// workTime.noonbreakStart = null;
|
|
|
@@ -296,7 +299,7 @@ export default {
|
|
|
this.id=null;
|
|
|
this.formData = {
|
|
|
orgIds: [],
|
|
|
- dayOfWeeks: json,
|
|
|
+ dayOfWeeks: null,
|
|
|
effectiveDate: null,
|
|
|
checkDataResult:null,
|
|
|
};
|