|
@@ -1,35 +1,27 @@
|
|
|
<template>
|
|
|
<!-- 修改批车作业页面 -->
|
|
|
- <div id="contractDetails">
|
|
|
- <page-title>批车作业</page-title>
|
|
|
- <div class="main">
|
|
|
- <span class="text">修改批车车作业</span>
|
|
|
- <span class="a"></span>
|
|
|
- </div>
|
|
|
- <div class="contractTitle">
|
|
|
- <div class="form-box">
|
|
|
- <div class="form-one">
|
|
|
- <dil-form :formId="140" v-model="form1"></dil-form>
|
|
|
- </div>
|
|
|
+ <div class="contractDetails">
|
|
|
+ <div class="form">
|
|
|
+ <div class="form_box">
|
|
|
+ <dil-form :formId="140" v-model="form1"></dil-form>
|
|
|
</div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="button-box">
|
|
|
+ </div>
|
|
|
+ <div class="button_box">
|
|
|
<el-button @click="onClickCancel">返回</el-button>
|
|
|
<el-button type="primary" @click="onClickConfirm">确认</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
<script>
|
|
|
import PageTitle from "@/components/Page/Title";
|
|
|
+import { sjTime,isNumber } from "@/utils/sharedJsFile";
|
|
|
export default {
|
|
|
components: { PageTitle },
|
|
|
- data(){
|
|
|
- return {
|
|
|
- form1: {},
|
|
|
- }
|
|
|
- },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ form1: {},
|
|
|
+ };
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.information();
|
|
|
},
|
|
@@ -37,14 +29,16 @@ export default {
|
|
|
information() {
|
|
|
//编辑批车作业 渲染数据
|
|
|
this.axios
|
|
|
- .post("/api/v1/tms/getApproveWagonPleaseById/" + this.$route.params.resultId)
|
|
|
+ .post(
|
|
|
+ "/api/v1/tms/getApproveWagonPleaseById/" + this.$route.params.resultId
|
|
|
+ )
|
|
|
.then((res) => {
|
|
|
res.data.data.forEach((e) => {
|
|
|
this.form1 = e;
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
- // 返回
|
|
|
+ // 返回
|
|
|
onClickCancel() {
|
|
|
this.$router.go(-1);
|
|
|
},
|
|
@@ -52,12 +46,12 @@ export default {
|
|
|
onClickConfirm() {
|
|
|
let approveWagonPlease = {
|
|
|
resultId: this.$route.params.resultId,
|
|
|
- resultApproveDate: this.form1.resultApproveDate,
|
|
|
+ resultApproveDate: sjTime(this.form1.resultApproveDate),
|
|
|
resultApproveNumber: this.form1.resultApproveNumber,
|
|
|
shipperId: this.form1.shipperId,
|
|
|
resultCategory: this.form1.resultCategory,
|
|
|
sendStationId: this.form1.sendStationId,
|
|
|
- toTheStationId: this.form1.toTheStationId
|
|
|
+ toTheStationId: this.form1.toTheStationId,
|
|
|
};
|
|
|
function isNumber() {
|
|
|
var value = approveWagonPlease.resultApproveNumber;
|
|
@@ -71,29 +65,61 @@ export default {
|
|
|
}
|
|
|
var val = this.value;
|
|
|
if (
|
|
|
- approveWagonPlease.resultApproveDate==null||
|
|
|
- approveWagonPlease.resultApproveNumber==null||
|
|
|
- approveWagonPlease.shipperId==null||
|
|
|
- approveWagonPlease.resultCategory==null||
|
|
|
- approveWagonPlease.sendStationId==null||
|
|
|
- approveWagonPlease.toTheStationId==null
|
|
|
- ) this.$message.error("存在空值!");
|
|
|
+ approveWagonPlease.resultApproveDate == null ||
|
|
|
+ approveWagonPlease.resultApproveNumber == null ||
|
|
|
+ approveWagonPlease.shipperId == null ||
|
|
|
+ approveWagonPlease.resultCategory == null ||
|
|
|
+ approveWagonPlease.sendStationId == null ||
|
|
|
+ approveWagonPlease.toTheStationId == null
|
|
|
+ )
|
|
|
+ this.$message.error("存在空值!");
|
|
|
+ else if (!isNumber(val)) this.$message.error("请车数必须是数字!");
|
|
|
else
|
|
|
- if (!isNumber(val)) this.$message.error("请车数必须是数字!");
|
|
|
- else
|
|
|
- this.axios
|
|
|
- .post("/api/v1/tms/updateApproveWagonPlease", approveWagonPlease)
|
|
|
- .then(() => {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "修改成功!",
|
|
|
+ this.axios
|
|
|
+ .post("/api/v1/tms/updateApproveWagonPlease", approveWagonPlease)
|
|
|
+ .then(() => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "修改成功!",
|
|
|
+ });
|
|
|
+ this.$router.go(-1);
|
|
|
});
|
|
|
- this.$router.go(-1);
|
|
|
- });
|
|
|
},
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
-<style lang="scss" scoped>
|
|
|
-// @import "@/styles/appoint/contract/ContractInsert.scss";
|
|
|
+<style lang="scss">
|
|
|
+.contractDetails {
|
|
|
+ .form {
|
|
|
+ display: flex;
|
|
|
+ .form_box {
|
|
|
+ width: 340px;
|
|
|
+ margin-left: 35%;
|
|
|
+ margin-top: 30px;
|
|
|
+ margin-right: 20px;
|
|
|
+ .el-form {
|
|
|
+ .preview-group {
|
|
|
+ .el-form-item {
|
|
|
+ .el-form-item__label {
|
|
|
+ display: inline-block;
|
|
|
+ width: 70px !important;
|
|
|
+ }
|
|
|
+ .el-form-item__content {
|
|
|
+ .el-select {
|
|
|
+ width: 250px;
|
|
|
+ }
|
|
|
+ .el-input {
|
|
|
+ width: 250px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .button_box {
|
|
|
+ margin-left: 42%;
|
|
|
+ margin-top: 55px;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|