Ver Fonte

售后工单查询报错

hezhanp há 7 meses atrás
pai
commit
21025f4bb2

+ 3 - 1
src/views/saleManage/contact/components/darwerComponents/saleOderAftersalesList.vue

@@ -195,7 +195,9 @@ export default {
       }
     },
     datasource({ page, limit, where, order }) {
-      return getSalesWorkOrder({ orderid: this.saleOrderData.id });
+      
+      let isDispatch = '1';
+      return getSalesWorkOrder({ orderid: this.saleOrderData.id,isDispatch });
     },
     // async declarationForm(row, type) {
     //   if (type === 'view') {

+ 3 - 1
src/views/saleManage/saleOrder/components/darwerComponents/saleOderAftersalesList.vue

@@ -195,7 +195,9 @@ export default {
       }
     },
     datasource({ page, limit, where, order }) {
-      return getSalesWorkOrder({ orderid: this.saleOrderData.id });
+      
+      let isDispatch = '1';
+      return getSalesWorkOrder({ orderid: this.saleOrderData.id,isDispatch });
     },
     // async declarationForm(row, type) {
     //   if (type === 'view') {

+ 181 - 179
src/views/salesServiceManagement/accessory/components/workOrderList.vue

@@ -39,195 +39,197 @@
 </template>
 
 <script>
-  import { getSalesWorkOrder } from '@/api/salesServiceManagement/index';
-  import workSearch from './workSearch.vue';
-  // import AssetTree from '@/components/AssetTree';
+import { getSalesWorkOrder } from '@/api/salesServiceManagement/index';
+import workSearch from './workSearch.vue';
+// import AssetTree from '@/components/AssetTree';
 
-  export default {
-    components: {
-      workSearch
-      // AssetTree
-    },
-    props: {
-      classType: {
-        type: Number | String,
-        default: 1
-      }
-    },
-    data() {
-      return {
-        visible: false,
-        workOrderStatus: [
-          { code: 0, label: '待接收' },
-          { code: 1, label: '已接收' },
-          { code: 2, label: '执行中' },
-          { code: 3, label: '待验收' },
-          { code: 4, label: '待评价' },
-          { code: 5, label: '已完成' },
-          { code: 6, label: '验收不通过' }
-        ],
-        columns: [
-          {
-            action: 'action',
-            slot: 'action',
-            align: 'center',
-            label: '选择'
-          },
-          {
-            columnKey: 'index',
-            label: '序号',
-            type: 'index',
-            width: 55,
-            align: 'center',
-            showOverflowTooltip: true,
-            fixed: 'left'
-          },
-          {
-            prop: 'code',
-            slot: 'code',
-            label: '工单编号',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 150
-          },
-          {
-            prop: 'planCode',
-            label: '计划单号',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            prop: 'planName',
-            label: '计划名称',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            prop: 'executeUserName',
-            label: '报工人',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            prop: 'accepterUserName',
-            label: '验收人',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            prop: 'accepterTime',
-            label: '验收时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            prop: 'acceptTime',
-            label: '开始时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            prop: 'finishTime',
-            label: '结束时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            prop: 'planFinishTime',
-            label: '计划完成时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            columnKey: 'inFactDuration',
-            label: '实际售后时长(分钟)',
-            align: 'center',
-            resizable: false,
-            showOverflowTooltip: true,
-            minWidth: 120,
-            formatter: (row) => {
-              if (row.finishTime && row.acceptTime) {
-                return parseInt(
-                  (new Date(row.finishTime).getTime() -
-                    new Date(row.acceptTime).getTime()) /
-                    60000
-                );
-              }
-            }
-          },
-          {
-            prop: 'orderStatus',
-            label: '状态',
-            align: 'center',
-            showOverflowTooltip: true,
-            formatter: (row) => {
-              return this.workOrderStatus.find(
-                (item) => item.code == row.orderStatus
-              )?.label;
+export default {
+  components: {
+    workSearch
+    // AssetTree
+  },
+  props: {
+    classType: {
+      type: Number | String,
+      default: 1
+    }
+  },
+  data() {
+    return {
+      visible: false,
+      workOrderStatus: [
+        { code: 0, label: '待接收' },
+        { code: 1, label: '已接收' },
+        { code: 2, label: '执行中' },
+        { code: 3, label: '待验收' },
+        { code: 4, label: '待评价' },
+        { code: 5, label: '已完成' },
+        { code: 6, label: '验收不通过' }
+      ],
+      columns: [
+        {
+          action: 'action',
+          slot: 'action',
+          align: 'center',
+          label: '选择'
+        },
+        {
+          columnKey: 'index',
+          label: '序号',
+          type: 'index',
+          width: 55,
+          align: 'center',
+          showOverflowTooltip: true,
+          fixed: 'left'
+        },
+        {
+          prop: 'code',
+          slot: 'code',
+          label: '工单编号',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 150
+        },
+        {
+          prop: 'planCode',
+          label: '计划单号',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          prop: 'planName',
+          label: '计划名称',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          prop: 'executeUserName',
+          label: '报工人',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          prop: 'accepterUserName',
+          label: '验收人',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          prop: 'accepterTime',
+          label: '验收时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          prop: 'acceptTime',
+          label: '开始时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          prop: 'finishTime',
+          label: '结束时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          prop: 'planFinishTime',
+          label: '计划完成时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          columnKey: 'inFactDuration',
+          label: '实际售后时长(分钟)',
+          align: 'center',
+          resizable: false,
+          showOverflowTooltip: true,
+          minWidth: 120,
+          formatter: (row) => {
+            if (row.finishTime && row.acceptTime) {
+              return parseInt(
+                (new Date(row.finishTime).getTime() -
+                  new Date(row.acceptTime).getTime()) /
+                  60000
+              );
             }
           }
-        ],
-        radio: null,
-        current: {}
-      };
-    },
-
-    watch: {},
-    methods: {
-      open(item) {
-        if (item) {
-          this.radio = item.id;
-          this.current = item;
+        },
+        {
+          prop: 'orderStatus',
+          label: '状态',
+          align: 'center',
+          showOverflowTooltip: true,
+          formatter: (row) => {
+            return this.workOrderStatus.find(
+              (item) => item.code == row.orderStatus
+            )?.label;
+          }
         }
-        this.visible = true;
-      },
+      ],
+      radio: null,
+      current: {}
+    };
+  },
 
-      /* 表格数据源 */
-      datasource({ page, limit, where, order }) {
-        return getSalesWorkOrder({
-          pageNum: page,
-          size: limit,
-          // orderStatus: 5,
-          ...where
-        });
-      },
+  watch: {},
+  methods: {
+    open(item) {
+      if (item) {
+        this.radio = item.id;
+        this.current = item;
+      }
+      this.visible = true;
+    },
 
-      /* 刷新表格 */
-      reload(where) {
-        where = {
-          ...where,
-        };
-        this.$refs.table.reload({ page: 1, where });
-      },
+    /* 表格数据源 */
+    datasource({ page, limit, where, order }) {
+      let isDispatch = '1';
+      return getSalesWorkOrder({
+        pageNum: page,
+        size: limit,
+        // orderStatus: 5,
+        isDispatch,
+        ...where
+      });
+    },
 
-      // 单击获取id
-      cellClick(row) {
-        this.current = row;
-        this.radio = row.id;
-      },
-      handleClose() {
-        this.visible = false;
-        this.current = null;
-        this.radio = '';
-      },
+    /* 刷新表格 */
+    reload(where) {
+      where = {
+        ...where
+      };
+      this.$refs.table.reload({ page: 1, where });
+    },
 
-      selected() {
-        if (!this.current) {
-          return this.$message.warning('请选择工单');
-        }
-        this.$emit('changeSelect', this.current);
-        this.handleClose();
+    // 单击获取id
+    cellClick(row) {
+      this.current = row;
+      this.radio = row.id;
+    },
+    handleClose() {
+      this.visible = false;
+      this.current = null;
+      this.radio = '';
+    },
+
+    selected() {
+      if (!this.current) {
+        return this.$message.warning('请选择工单');
       }
+      this.$emit('changeSelect', this.current);
+      this.handleClose();
     }
-  };
+  }
+};
 </script>
 
 <style lang="scss" scoped></style>

+ 1 - 0
src/views/salesServiceManagement/demandList/index.vue

@@ -511,6 +511,7 @@ export default {
       this.reload();
     },
     handleCommand(command, row) {
+      console.log(command,row)
       if (command === 'handleRevoke') {
         this.handleRevoke(row);
       }

+ 3 - 0
src/views/salesServiceManagement/workOrder/components/drawer.vue

@@ -229,9 +229,12 @@ export default {
     },
     datasource({ page, limit, where }) {
       this.loading = true;
+      
+      let isDispatch = '1';
       const params = {
         pageNum: page,
         size: limit,
+        isDispatch,
         ...where
       };
       return getSalesWorkOrder(params).finally(() => {

+ 2 - 2
src/views/salesServiceManagement/workOrder/index.vue

@@ -54,7 +54,7 @@
         </template>
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
-          <el-link
+          <!-- <el-link
             type="primary"
             :underline="false"
             @click="declarationForm(row, 'edit')"
@@ -63,7 +63,7 @@
               $hasPermission('eom:aftersalesworkorder:update')
             "
             >修改</el-link
-          >
+          > -->
           <el-link
             type="primary"
             :underline="false"