123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- <template>
- <!-- 添加车皮卸车实绩 -->
- <div class="addWagonLoad">
- <page-title>返回</page-title>
- <div class="main">
- <el-divider content-position="left"></el-divider>
- </div>
- <div>
- <dilTable
- v-bind.sync="option"
- ref="table"
- @selection-change="selectionChange"
- >
- </dilTable>
- </div>
- <!-- <el-divider content-position="left">车皮卸车实绩</el-divider> -->
- <div class="form">
- <div class="form_box" style="margin-right: 10rem">
- <dil-form :formId="255" v-model="form1" ref="from1"></dil-form>
- </div>
- </div>
- <div class="button-box">
- <el-button @click="cancel">取消</el-button>
- <el-button type="primary" @click="makeSure">确定</el-button>
- </div>
- </div>
- </template>
- <script>
- import PageTitle from "@/components/Page/Title";
- import { sjTime, isNumber } from "@/utils/sharedJsFile";
- import { getCookie } from "@/utils/util.js";
- export default {
- components: { PageTitle },
- data() {
- return {
- form1: {},
- option: {
- // 表格请求数据的地址
- requestUrl: "/api/v1/tms/getWagonNo/3?apiId=213",
- // 控制显示当选列
- selectionType: "select",
- },
- value: undefined,
- list: [],
- };
- },
- mounted() {},
- methods: {
- selectionChange(selection) {
- this.list = [];
- selection.forEach((e) => {
- this.list.push({
- resultWagonNo: e.resultWagonNo,
- resultId: e.resultId,
- purchaseOrderId: e.purchaseOrderId,
- unloadingPointId: e.unloadingPointId,
- });
- });
- },
- // 确定
- makeSure() {
- let tmstrainWagonUnloadResult = {
- wagonNoList: this.list,
- resultArrivalDate: sjTime(this.form1.resultArrivalDate),
- resultUnloadTime: sjTime(this.form1.resultUnloadTime),
- resultRemark: this.form1.resultRemark,
- resultType: 3,
- };
- console.log(tmstrainWagonUnloadResult);
- if (
- tmstrainWagonUnloadResult.wagonNoList == null ||
- tmstrainWagonUnloadResult.resultArrivalDate == null ||
- tmstrainWagonUnloadResult.resultUnloadTime == null
- )
- this.$message.error("存在空值!");
- else
- this.axios
- .post(
- "/api/v1/tms/insertTmstrainWagonUnLoadResult",
- tmstrainWagonUnloadResult
- )
- .then((res) => {
- if ((res.data.code = "200")) {
- this.$message({
- type: "success",
- message: "新增成功!",
- });
- this.$router.go(-1);
- }else{
- ({ type: "failed", message: "新增失败!" });
- }
-
- });
- },
- // 取消
- cancel() {
- this.$router.go(-1);
- },
- },
- };
- </script>
- <style lang='scss' scoped>
- .addWagonLoad {
- .form {
- display: flex;
- .form_box {
- width: 320px;
- margin-left: 35%;
- margin-top: 30px;
- margin-right: 22px;
- .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: 220px;
- }
- .el-textarea {
- .el-textarea__inner {
- display: block;
- resize: vertical;
- padding: 5px 13px;
- line-height: 1.5;
- width: 70%;
- border-radius: 4px;
- margin-left: 56px;
- margin-top: -25px;
- }
- }
- }
- }
- }
- }
- }
- }
- .button-box {
- margin-top: 50px;
- margin-left: 600px;
- }
- }
- </style>
|