Elements-SY

Merge branch 'et86' into 2023-08-14

......@@ -161,7 +161,6 @@ export default {
this.$refs.tableRef.$refs.bodyWrapper.children[0].children[1]
.children[0].clientHeight;
this.trHeight = trEl;
// console.log(this);
});
}, 800),
......
......@@ -53,7 +53,7 @@
:disabled="scope.row.edit | isEdit"
min="-7"
max="7"
v-on:keyup.enter="value = value.replace(/^-?[0-9]\d*$/, '')"
v-input-filter
clearable
placeholder=""
/>
......@@ -417,6 +417,36 @@ export default {
this.PostFindDestinationFltRuleByFlightNo();
},
mounted() {},
directives: {
"input-filter": {
bind: function (el, binding) {
el.handler = function (event) {
let regExp = /[^0-9a-zA-Z_]/g;
let newValue = event.target.value.replace(regExp, "");
if (newValue !== event.target.value) {
event.target.value = newValue;
event.target.dispatchEvent(new Event("input"));
}
};
el.addEventListener("input", el.handler);
},
unbind: function (el) {
el.removeEventListener("input", el.handler);
},
/*
-7 +7
0~7
或者 空
不能输入小数点
Math.abs(-7);
不能输入和选择未来日期,
不能输入和选择历史日期,
选择时间范围,
只能输入四位正整数,不能够有小数点,
只能输入四位正整数保留3位小数,
*/
},
},
filters: {
isEdit: function (value) {
switch (value) {
......@@ -467,8 +497,8 @@ export default {
list.map((item) => {
routeList.push(item);
});
let isEtesRoute = list.filter(item=>item.isEtesRoute == "Y"); // 过滤普通航线
if(isEtesRoute.length == 0){
let isEtesRoute = list.filter((item) => item.isEtesRoute == "Y"); // 过滤普通航线
if (isEtesRoute.length == 0) {
this.msgError("该航班下的航线均为普通航线");
}
this.tableData[this.currentIndex].fltRoute = "";
......
......@@ -85,11 +85,11 @@
</el-col>
<el-col :span="10">
<el-input v-if="val.isLocation == '1'" v-model="val.location" type="textarea"
:rows="4" resize="none" style="width: 500px" placeholder="始发站之间用回车符分隔"
:rows="4" resize="none" style="width: 500px" placeholder="始发站之间用分号分隔"
@change="change" @input="change($event)">
</el-input>
<el-input v-else v-model="val.notLocation" type="textarea" :rows="4"
resize="none" style="width: 500px" placeholder="始发站之间用回车符分隔" @change="change"
resize="none" style="width: 500px" placeholder="始发站之间用分号分隔" @change="change"
@input="change($event)">
</el-input>
</el-col>
......@@ -105,11 +105,11 @@
</el-col>
<el-col :span="10">
<el-input v-if="val.isDestinationSite == '1'" v-model="val.destinationSite" type="textarea"
:rows="4" resize="none" style="width: 500px" placeholder="目的站之间用回车符分隔"
:rows="4" resize="none" style="width: 500px" placeholder="目的站之间用分号分隔"
@change="change" @input="change($event)">
</el-input>
<el-input v-else v-model="val.notDestinationSite" type="textarea" :rows="4"
resize="none" style="width: 500px" placeholder="目的站之间用回车符分隔" @change="change"
resize="none" style="width: 500px" placeholder="目的站之间用分号分隔" @change="change"
@input="change($event)">
</el-input>
</el-col>
......@@ -337,11 +337,11 @@
</el-col>
<el-col :span="10">
<el-input v-if="val.isLocation == '1'" v-model="val.location" type="textarea" :rows="4"
resize="none" style="width: 500px" placeholder="始发站之间用回车符分隔" @change="change"
resize="none" style="width: 500px" placeholder="始发站之间用分号分隔" @change="change"
@input="change($event)">
</el-input>
<el-input v-else v-model="val.notLocation" type="textarea" :rows="4" resize="none"
style="width: 500px" placeholder="始发站之间用回车符分隔" @change="change"
style="width: 500px" placeholder="始发站之间用分号分隔" @change="change"
@input="change($event)">
</el-input>
</el-col>
......@@ -357,11 +357,11 @@
</el-col>
<el-col :span="10">
<el-input v-if="val.isDestinationSite == '1'" v-model="val.destinationSite" type="textarea"
:rows="4" resize="none" style="width: 500px" placeholder="目的站之间用回车符分隔"
:rows="4" resize="none" style="width: 500px" placeholder="目的站之间用分号分隔"
@change="change" @input="change($event)">
</el-input>
<el-input v-else v-model="val.notDestinationSite" type="textarea" :rows="4"
resize="none" style="width: 500px" placeholder="目的站之间用回车符分隔" @change="change"
resize="none" style="width: 500px" placeholder="目的站之间用分号分隔" @change="change"
@input="change($event)">
</el-input>
</el-col>
......@@ -605,7 +605,6 @@ export default {
}
},
created() {
// console.log(this.$route.params)
this.dictData()
this.status = this.$route.params.handle
this.$route.params.handle === 'detail' ? this.disabled = true : this.disabled = false
......@@ -720,7 +719,6 @@ export default {
this.infoForm.fltDate = res.data.list.ruleDate
this.infoForm.route = res.data.list.flightRoute
this.infoForm.list.push(this.dataHandle(res.data.list))
console.log('A:',this.infoForm.list)
} else {
this.isEmpty = true
}
......@@ -760,7 +758,6 @@ export default {
res.data.list.forEach(item => {
this.infoForm.list.push(this.dataHandle(item))
})
console.log('B:',this.infoForm.list)
} else {
//航班类型为Purple Tail则显示所有航线维度
this.routeList.forEach(route => {
......@@ -782,7 +779,6 @@ export default {
})
}
})
console.log('C:',this.infoForm.list)
}
} else {
//航线为空,对应航班或航班+日期下的全部维度(需补全未创建维度)
......@@ -805,7 +801,6 @@ export default {
})
}
})
console.log('D:',this.infoForm.list)
}
} else {
//未请求到数据
......@@ -833,7 +828,6 @@ export default {
})
this.infoForm.list.push(this.dataHandle(item))
})
console.log('E:',this.infoForm.list)
} else {
//航班类型Purple Tail展示全部航线维度
let routesStatus = 1
......@@ -857,7 +851,6 @@ export default {
})
}
})
console.log('F:',this.infoForm.list)
}
} else {
//未查询到,插入占位基础数据使用户新建
......@@ -873,7 +866,6 @@ export default {
})
}
})
console.log('G:',this.infoForm.list)
} else {
//航班类型Purple Tail展示全部航线维度
// this.isEmpty = true
......@@ -885,7 +877,6 @@ export default {
routePriority: route.routePriority,
})
})
console.log('H:',this.infoForm.list)
}
}
}).catch(err => {
......@@ -928,7 +919,6 @@ export default {
})
}
})
console.log('I:',this.infoForm.list)
} else {
this.routeList.forEach((route) => {
this.infoForm.list.push({
......@@ -938,7 +928,6 @@ export default {
routePriority: route.routePriority,
})
})
console.log('J:',this.infoForm.list)
}
}).catch(err => {
this.isEmpty = true
......@@ -953,7 +942,6 @@ export default {
routePriority: route.routePriority,
})
})
console.log('K:',this.infoForm.list)
}
}
}
......@@ -985,7 +973,6 @@ export default {
routePriority: item.ordinal
})
})
console.log('L:',this.infoForm.list)
} else {
this.msgWarning('未查询到航线信息!')
this.routeList = []
......@@ -1002,6 +989,7 @@ export default {
},
//保存
submit(val) {
console.log('提交:',val)
let routeArr = []
let data = this.setDataHandle(JSON.parse(JSON.stringify(this.infoForm.list[val])))
if (new Number(data.minNumOfPieces) > new Number(data.maxNumOfPieces)) {
......@@ -1011,7 +999,6 @@ export default {
} else if (data.handlingCode == '' && data.serviceCode == '' && data.subCategory == '' && data.typeOfGoods == '' && data.puporpuxCode == '' && (!data.location || data.location == '') && data.notLocation == '' && (!data.destinationSite || data.destinationSite == '') && data.notDestinationSite == '' && (data.includeUrsa == null || data.notIncludeUrsa == null) && (!data.minNumOfPieces || data.minNumOfPieces == '') && (!data.maxNumOfPieces || data.maxNumOfPieces == '') && (!data.minWeight || data.minWeight == '') && (!data.maxWeight || data.maxWeight == '')) {
this.msgWarning('未添加规则信息,请添加后再保存!')
} else {
// this.loading = true
this.routeList.forEach((item, idx) => {
routeArr.push(item.route)
})
......@@ -1033,9 +1020,9 @@ export default {
this.loading = false
if (res.code === 200) {
this.fltNoDisabled = true
this.$forceUpdate()
this.msgSuccess('保存成功!')
this.infoForm.list[val] = this.dataHandle(res.data)
this.$forceUpdate()
} else {
this.msgWarning(res.msg)
}
......@@ -1189,12 +1176,15 @@ export default {
},
//数据处理
dataHandle(val) {
val.isLocation = '1'
val.isLocation = '1' // 始发站 radio
val.location ? val.isLocation = '1' : ''
val.notLocation ? val.isLocation = '2' : ''
val.isDestinationSite = '1'
val.notDestinationSite ? val.isDestinationSite = '1' : ''
val.notLocation ? val.isDestinationSite = '2' : ''
val.isDestinationSite = '1' // 目的站 radio
val.destinationSite ? val.isDestinationSite = '1' : ''
val.notDestinationSite ? val.isDestinationSite = '2' : ''
val.maxNumOfPieces == null ? val.maxNumOfPieces = undefined : val.maxNumOfPieces = val.maxNumOfPieces//最大件数
val.maxWeight == null ? val.maxWeight = undefined : val.maxWeight = val.maxWeight//最大重量
val.minNumOfPieces == null ? val.minNumOfPieces = undefined : val.minNumOfPieces = val.minNumOfPieces//最小件数
......
......@@ -33,7 +33,6 @@ export default {
}
},
created() {
console.log(this.$route)
this.tableData = this.$route.query.data
this.fromRoute = this.$route.query.from
},
......
......@@ -85,7 +85,7 @@ export default {
roleFormDisabled: false,
tableLoading: false,
total: 0,
tableHeight: null
tableHeight: 300
};
},
created() {
......@@ -94,7 +94,7 @@ export default {
}
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.selectionRoleForm.$el.offsetHeight - 250
// this.tableHeight = window.innerHeight - this.$refs.selectionRoleForm.$el.offsetHeight - 250
},
activated() {
this.selectRoleList();
......
......@@ -44,7 +44,7 @@
v-hasPermi="['system:user:openClose']" @click="userStatus(scope)">{{
scope.row.isValid == 1 ? "停用" : "启用"
}}</el-button>
<el-button type="danger" size="mini" @click="removeUser(scope)" v-hasPermi="['system:user:delete']" style="margin-top: 5px;margin-left: 0;">删除用户
<el-button type="danger" size="mini" @click="removeUser(scope)" v-hasPermi="['system:user:delete']">删除用户
</el-button>
</template>
</el-table-column>
......