|
@@ -0,0 +1,159 @@
|
|
|
+<template>
|
|
|
+ <div class="sale">
|
|
|
+ <div class="top">
|
|
|
+ <el-input
|
|
|
+ v-model="con"
|
|
|
+ clearable
|
|
|
+ placeholder="报警内容"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ <!--
|
|
|
+ <span class="text">计时时间:</span>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="startTime"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="选择日期"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ <span class="text">至</span>
|
|
|
+ <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
|
|
|
+ </el-date-picker>
|
|
|
+ <el-button type="primary" @click="exportAllExcel()">
|
|
|
+ <i class="el-icon-download"></i>导出(Excel)
|
|
|
+ </el-button>
|
|
|
+ -->
|
|
|
+ <el-button type="primary" class="btn" @click="onclick">
|
|
|
+ <i class="el-icon-search"></i>查询
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <div class="tab">
|
|
|
+ <dilTable v-bind.sync="option" max-height="300">
|
|
|
+ <el-table-column fixed="right" label="操作" width="180">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="step">
|
|
|
+ <el-button
|
|
|
+ @click="editRemark(scope.row)"
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ >编辑备注</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </dilTable>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-dialog title="编辑备注" :visible.sync="editopen" width="500px" append-to-body @submit.native.prevent>
|
|
|
+ <el-form ref="form" :model="form" label-width="100px">
|
|
|
+ <el-form-item label="异常内容" prop="abnormalContent">
|
|
|
+ <el-input type="textarea" :rows="3" resize="none" v-model="form.abnormalContent" disabled style="width: 300px"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="异常时间" prop="abnormalTime">
|
|
|
+ <el-input v-model="form.abnormalTime" disabled style="width: 300px"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="跟踪备注" prop="trackRemark">
|
|
|
+ <el-input type="textarea" :rows="3" v-model="form.trackRemark" placeholder="请输入跟踪备注" style="width: 300px"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import { getCookie } from "@/utils/util.js";
|
|
|
+
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ inputText: "",
|
|
|
+ option: {
|
|
|
+ // 表格请求数据的地址
|
|
|
+ requestUrl: ""
|
|
|
+ },
|
|
|
+ orderId: 0,
|
|
|
+ con:'',
|
|
|
+ editopen: false,
|
|
|
+ form: {}
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.option.requestUrl = "/api/v1/tms/getShipWarningList?apiId=540";
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ reset() {
|
|
|
+ this.form = {
|
|
|
+ orderId: undefined,
|
|
|
+ abnormalContent: undefined,
|
|
|
+ abnormalTime: undefined,
|
|
|
+ trackRemark: undefined,
|
|
|
+ trackTime: undefined
|
|
|
+ };
|
|
|
+ },
|
|
|
+ editRemark(row) {
|
|
|
+ this.reset();
|
|
|
+ this.orderId = row.orderId;
|
|
|
+ let map = {
|
|
|
+ orderId: this.orderId
|
|
|
+ };
|
|
|
+ this.axios.post("/api/v1/tms/getShipWarningResult", map).then(res => {
|
|
|
+ this.form = res.data.data
|
|
|
+ this.editopen = true;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onclick() {
|
|
|
+ this.option.requestUrl =
|
|
|
+ "/api/v1/tms/getShipWarningList?apiId=540" +
|
|
|
+ "&con="+
|
|
|
+ this.con;
|
|
|
+ },
|
|
|
+ submitForm(){
|
|
|
+ if(this.form.trackRemark==null || this.form.trackRemark == ""){
|
|
|
+ this.$message.error("请输入内容");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let map = {
|
|
|
+ orderId: this.form.orderId,
|
|
|
+ trackRemark: this.form.trackRemark,
|
|
|
+ userId: getCookie('userId')
|
|
|
+ };
|
|
|
+ this.axios.post("/api/v1/tms/updateShipWarning", map).then(res => {
|
|
|
+ this.$message.success("编辑成功");
|
|
|
+ this.editopen = false;
|
|
|
+ this.$router.go(0)
|
|
|
+ });
|
|
|
+ },
|
|
|
+ cancel() {
|
|
|
+ this.editopen = false;
|
|
|
+ this.reset();
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss">
|
|
|
+.sale {
|
|
|
+ .top {
|
|
|
+ padding: 1.25rem 1.875rem;
|
|
|
+ .el-input {
|
|
|
+ width: 20%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.el-table th.el-table__cell > .cell {
|
|
|
+ display: inline-block;
|
|
|
+ -webkit-box-sizing: border-box;
|
|
|
+ box-sizing: border-box;
|
|
|
+ position: relative;
|
|
|
+ vertical-align: middle;
|
|
|
+ padding-left: 10px;
|
|
|
+ padding-right: 10px;
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+.step {
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+</style>
|