戴艳蓉 %!s(int64=3) %!d(string=hai) anos
pai
achega
7dd2df3eeb

+ 7 - 0
src/apis/components/process-time-line.js

@@ -0,0 +1,7 @@
+import http from "@/apis/axios";
+const api = "admin/";
+export default {
+  // 列表
+  list: (data, params) => http(api + "process", data, "post", params),
+};
+   

+ 1 - 1
src/apis/service/process/oing/index.js

@@ -7,7 +7,7 @@ export default {
   // 删除
   delete: (data, params) => http(api + 'delete', data, 'post', params),
   // 分页查询
-  list: (data, params) => http(api + 'grouplist', data, 'post', params),
+  list: (data, params) => http(api + 'processlist', data, 'post', params),
   // 详情
   detail: (data, params) => http(api + 'groupinfo', data, 'post', params),
   // 更新

+ 2 - 0
src/components/globalComponents/process-time-line/index.js

@@ -0,0 +1,2 @@
+import Main from './main.vue'
+export default Main

+ 69 - 0
src/components/globalComponents/process-time-line/main.vue

@@ -0,0 +1,69 @@
+<template>
+  <!-- <div class=""> -->
+  <!-- 123456 -->
+  <el-timeline reverse>
+   
+    <el-timeline-item  v-for="(item, index) in options"
+        :key="item.time + index" :timestamp="item.addtime" placement="top">
+      <!-- <el-card> -->
+        <!-- 111 -->
+        <h4>王小虎 {{item.status_name}}</h4>
+        <!-- <p>王小虎 提交于 2018/4/12 20:46</p> -->
+      <!-- </el-card> -->
+    </el-timeline-item>
+  </el-timeline>
+  <!-- </div> -->
+</template>
+
+<script>
+import asyncRequest from "@/apis/components/process-time-line";
+import resToken from "@/mixins/resToken";
+export default {
+  name: "processTimeLine",
+  props: ["type", "orderCode", "newTime"],
+  mixins: [resToken],
+  data() {
+    return {
+      options: [],
+      loading: false,
+    };
+  },
+  watch: {
+    newTime: function (val) {
+      console.log(val);
+      if (val) {
+        this.getList();
+      }
+    },
+  },
+  mounted() {
+    this.getList();
+  },
+
+  methods: {
+    async getList() {
+      console.log(123456);
+      if (!this.loading) {
+        this.loading=true
+        this.options = [];
+        const res = await asyncRequest.list({
+          type: this.type,
+          orderCode: this.orderCode,
+        });
+        if (res && res.code === 0 && res.data) {
+          this.options = res.data;
+          // this.recursion(this.options);
+        } else {
+          this.options = [];
+        }
+        this.loading=false
+      }
+    },
+  },
+};
+</script>
+<style lang="scss">
+.date-picker.el-input {
+  // width: 150px !important;
+}
+</style>

+ 0 - 0
src/views/process/oing/数据共享 → src/components/globalComponents/process-time-line/流程时间线


+ 1 - 1
src/components/globalComponents/search-customer/main.vue

@@ -54,7 +54,7 @@ export default {
   },
   watch: {
     names: function (val, old) {
-      console.log(val, old);
+      // console.log(val, old);
       this.searchName = val;
       if (this.isDetail && this.searchName) {
         this.remoteMethod(this.searchName);

+ 6 - 5
src/views/process/oing/index.vue

@@ -132,7 +132,7 @@
 <script>
 import addEdit from "./addEdit";
 // import asyncRequest from "@/apis/service/process/oing";
-// import asyncRequest from "@/mock/service/process/oing"; //引入mock数据
+import asyncRequest from "@/apis/service/process/oing"; //引入mock数据
 import statusList from "@/assets/js/statusList";
 import roleLevel from "@/assets/js/roleLevel";
 import mixinPage from "@/mixins/elPaginationHandle";
@@ -239,7 +239,7 @@ export default {
     };
   },
   mounted() {
-    // this.searchList();
+    this.searchList();
   },
   methods: {
     restSearch() {
@@ -305,9 +305,10 @@ export default {
       const res = await asyncRequest.list(this.parmValue);
       // console.log(...res.data.list);
       if (res && res.code === 0 && res.data) {
-        this.tableData = res.data.list;
-        console.log(this.tableData);
-        this.pageInfo.total = Number(res.data.count);
+        console.log(res.data);
+        // this.tableData = res.data.list;
+        // console.log(this.tableData);
+        // this.pageInfo.total = Number(res.data.count);
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();
       } else {

+ 0 - 0
src/views/process/oing/待办


+ 16 - 10
src/views/sellOut/salesOrder/detail.vue

@@ -5,8 +5,8 @@
       v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
     >
       <div class="tl" style="padding: 10px 0">
-        <span  > {{ status }}----{{ powers }}</span>
-       
+        <span> {{ status }}----{{ powers }}</span>
+
         <el-button
           type="primary"
           plain
@@ -45,7 +45,7 @@
         >
       </div>
 
-      <el-collapse v-model="activeNames">
+      <!-- <el-collapse v-model="activeNames">
         <el-collapse-item title="销售订单信息" name="0">
           <add-form
             :newTime="newTime"
@@ -73,7 +73,14 @@
             @refresh="initData()"
           />
         </el-collapse-item>
-      </el-collapse>
+      </el-collapse> -->
+
+      <process-time-line
+        v-if="newTime !== ''"
+        :newTime="newTime"
+        :type="'XSQRD'"
+        :orderCode="orderCode"
+      />
     </div>
     <div v-else>
       <no-auth></no-auth>
@@ -117,7 +124,7 @@ export default {
       finishStatus: "finish",
       activeNames: ["0", "1", "2", "3", "4", "5"],
       sitem: null,
-
+      orderCode: "",
       status: "",
       newTime: "",
       loading: false,
@@ -130,10 +137,6 @@ export default {
     this.initData();
   },
   methods: {
-    handClick(value) {
-      console.log("执行子组件事件", value);
-      this.company = value;
-    },
     async statusConfirm(status, message) {
       await this.$confirm(`确定要${message}?`, {
         confirmButtonText: "确定",
@@ -152,7 +155,9 @@ export default {
         });
     },
     getNewTime() {
-      this.newTime = new Date().valueOf();
+      this.newTime = new Date().valueOf()+"";
+      console.log(this.orderCode);
+      console.log(this.newTime);
     },
 
     async deleteById(message) {
@@ -203,6 +208,7 @@ export default {
       if (res && res.code === 0 && res.data) {
         this.sitem = res.data;
         this.status = this.sitem.status;
+        this.orderCode = this.sitem.orderCode;
         this.getNewTime();
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();