胡半仙 3 vuotta sitten
vanhempi
commit
dc82c01a1f
2 muutettua tiedostoa jossa 74 lisäystä ja 6 poistoa
  1. 1 1
      config/index.js
  2. 73 5
      src/views/inward/components/inwardFactory/timeTaskResult.vue

+ 1 - 1
config/index.js

@@ -74,7 +74,7 @@ let proxyTable = {
   },
   "/views/api/v1": {
     target: "http://172.16.33.166:8080",
-    // target: "http://192.168.1.115:8080",
+    // target: "http://192.168.1.115:8019",
     ws: true,
     pathRewrite: {
       "^/views/api/v1": "/api/v1"

+ 73 - 5
src/views/inward/components/inwardFactory/timeTaskResult.vue

@@ -23,7 +23,7 @@
                 <template slot-scope="scope">
                     <div class="step">
                         <el-button
-                        @click="getStepsList(scope.row)"
+                        @click="detailclick1(scope.row)"
                         type="text"
                         size="small"
                         >运输详情</el-button>
@@ -33,14 +33,34 @@
                   </el-button> -->
                 </template>
                 </el-table-column>
+                <!-- 运输进程详情 -->
+                <el-table-column type="expand" width="1">
+                    <template slot-scope="props">
+                        <el-form label-position="center" inline class="demo-table-expand">
+                        <div v-if="false">{{ props }}</div>
+                        <div>
+                            <el-table :data="tableData1" border>
+                            <el-table-column
+                                v-for="(item, i) in tableHead"
+                                :key="i"
+                                :prop="item.prop"
+                                :label="item.label"
+                                :width="item.width"
+                            ></el-table-column>
+                            </el-table>
+                        </div>
+                        </el-form>
+                    </template>
+                </el-table-column>
             </dilTable>
         </div>
+        
         <!-- 运输进程详情 -->
-        <el-drawer
+        <!-- <el-drawer
             :visible.sync="drawer"
-            :direction="direction">
+            :direction="direction"> -->
             <!-- 步骤条显示 -->
-            <div style="height: 200px;content-align:center" >
+            <!-- <div style="height: 200px;content-align:center" >
                 <el-table
                 :data="stepList"
                 style="width: 100%">
@@ -56,7 +76,7 @@
                 </el-table-column>
                 </el-table>
             </div>
-        </el-drawer>
+        </el-drawer> -->
     </div>
 </template>
 <script>
@@ -70,6 +90,19 @@ export default {
                 // 表格请求数据的地址
                 requestUrl: "",
             },
+            tableHead: [
+                {
+                prop: "linkName",
+                label: "计时状态",
+                width: 150,
+                },
+                {
+                prop: "pointDate",
+                label: "时间",
+                width: 150,
+                }
+            ],
+            tableData1: [],
             tableData: [],
             startTime: null,
             endTime: null,
@@ -91,6 +124,41 @@ export default {
         }
     },
     methods:{
+        // -------查看物资详情(已拒绝)
+        detailclick1(row) {
+        // 记录重复点击次数
+        if (this.oldRow1 === row) {
+            this.oldRowCount1 += 1;
+        }
+        this.orderId = row.orderId
+        let map = {
+            orderId : this.orderId
+        }
+        // 切换当前详情表
+        this.$refs.excelDom.toggleRowExpansion(row);
+        // 打开前关闭上一个详情表
+        if (this.oldRow1 != "") {
+            if (this.oldRow1 != row) {
+            if (this.oldRowCount1 % 2 === 1) {
+                this.$refs.excelDom.toggleRowExpansion(this.oldRow1);
+            } else {
+                this.oldRowCount1 = 1;
+            }
+            } else {
+            this.oldRow1 = null;
+            return;
+            }
+        }
+        // 重置上一个点击对象
+        this.oldRow1 = row;
+        // 根据销售订单物资中间表id查询物资信息
+        this.axios
+            .post("/api/v1/oms/getOrderResult?orderId=",map)
+            .then((res) => {
+            console.log("res",res)
+            this.tableData1 = res.data;
+            });
+        },
         getStepsList(row){
             console.log(row.orderId)
             this.orderId = row.orderId