Browse Source

no message

linwenxin 1 year ago
parent
commit
03ba70943e

+ 17 - 0
src/api/workOrderPool.js

@@ -168,3 +168,20 @@ export function orderBaseDetail(params) {
   })
 }
 
+export function settleNormInstallQuery(params) {
+  return request({
+    url: `/settle/norm/install/query`,
+    method: 'post',
+    params
+  })
+}
+
+export function settleNormOtherQuery(params) {
+  return request({
+    url: `/settle/norm/other/query`,
+    method: 'post',
+    params
+  })
+}
+
+

+ 1 - 1
src/views/mallManagement/goods/watermark/index.vue

@@ -19,7 +19,7 @@ export default {
         [
           [
             {
-              name: '添加模块',
+              name: '添加水印',
               isRole: true,
               click: () => {
                 this.$router.push({

+ 73 - 34
src/views/workOrder/workOrderPool/detailModule/SettleAccounts/index.vue

@@ -20,7 +20,7 @@ import { required, mobileRequired, mobile, httpUrl, email } from '@/components/t
 import { listPageV2 } from "@/api/workOrder/settlementStandardInstall";
 import { listPageV2 as listPageV2Repair } from "@/api/workOrder/settlementStandardRepair";
 import { listPageV2 as listPageV2Other } from "@/api/workOrder/settlementStandardOther";
-import { orderBaseSettleNormDetail, orderBaseSettleNormConfirm } from "@/api/workOrderPool.js";
+import { orderBaseSettleNormDetail, orderBaseSettleNormConfirm, settleNormInstallQuery, settleNormOtherQuery } from "@/api/workOrderPool.js";
 import { EventBus } from '@/utils/eventBus'
 export default {
   props: {
@@ -45,13 +45,43 @@ export default {
       return [
         {
           columnAttributes: {
+            label: '产品品牌',
+            prop: 'brand'
+          },
+        },
+        {
+          columnAttributes: {
+            label: '产品大类',
+            prop: 'mainName'
+          },
+        },
+        {
+          columnAttributes: {
+            label: '产品小类',
+            prop: 'smallName'
+          },
+        },
+        {
+          columnAttributes: {
+            label: '产品机型',
+            prop: 'goodsName'
+          },
+        },
+        {
+          columnAttributes: {
+            label: '数量',
+            prop: 'orderNum'
+          },
+        },
+        {
+          columnAttributes: {
             label: '工单类型',
             prop: 'typeName'
           },
         },
         {
           columnAttributes: {
-            label: '产品大类',
+            label: '结算产品大类',
             prop: 'parentCategoryId'
           },
           render: (h, { row, column, index }) => {
@@ -85,7 +115,7 @@ export default {
         },
         {
           columnAttributes: {
-            label: '产品小类',
+            label: '结算产品小类',
             prop: 'categoryId'
           },
           render: (h, { row, column, index }) => {
@@ -109,24 +139,18 @@ export default {
                     }
                   }}
                   placeholder="请选择">
-                  {this.classifyListLv2.filter(item => item.parentId === row.parentCategoryId).map((item, index_) => <el-option key={index_} label={item.name} value={item.categoryId}></el-option>)}
+                  {this.classifyListLv2.filter(item => item.parentCategoryId === row.parentCategoryId).map((item, index_) => <el-option key={index_} label={item.name} value={item.categoryId}></el-option>)}
                 </el-select>
               </el-form-item>
             </div>
           }
         },
-        {
-          columnAttributes: {
-            label: '机型',
-            prop: 'goodsName'
-          },
-        },
         ...(() => {
           if (this.formData.orderType == 'INSTALL') {
             return [
               {
                 columnAttributes: {
-                  label: '功率',
+                  label: '结算功率',
                   prop: 'label'
                 },
                 render: (h, { row, column, index }) => {
@@ -162,7 +186,7 @@ export default {
               },
               {
                 columnAttributes: {
-                  label: '数量',
+                  label: '结算数量',
                   prop: 'settleNum'
                 },
                 render: (h, { row, column, index }) => {
@@ -536,6 +560,43 @@ export default {
                 this.gonglr = res.data.records
               })
             }
+            settleNormInstallQuery({
+              settleNormType: this.formData.orderType,
+              type: this.formData.orderSmallType
+            }).then(res => {
+              var classifyList = {}
+              this.classifyListLv2 = res.data.map(item => {
+                var { children, ...data } = item
+                classifyList[data.parentCategoryId] = data.parentCategoryName
+                return {
+                  name: data.categoryName,
+                  ...data
+                }
+              });
+              this.classifyList = Object.keys(classifyList).map(key => ({
+                name: classifyList[key],
+                categoryId: key
+              }))
+            })
+            // // 获取产品大类小类
+            // getClassifyList({ type: 2, status: true }).then(res => {
+            //   var classifyListLv2 = []
+            //   this.classifyList = res.data.map(item => {
+            //     var { children, ...data } = item
+            //     classifyListLv2.push(...(children || []))
+            //     return {
+            //       ...data
+            //     }
+            //   });
+            //   this.classifyListLv2 = classifyListLv2
+            // })
+            settleNormOtherQuery().then(res => {
+              this.gongqt = res.data;
+              this.gongqtdl = Array.from(new Set(res.data.map(item => item.type))).map(type => ({
+                label: type,
+                value: type
+              }));
+            })
           })
         }
       },
@@ -543,28 +604,6 @@ export default {
       immediate: true,
     },
   },
-  created() {
-    // 获取产品大类小类
-    getClassifyList({ type: 2, status: true }).then(res => {
-      var classifyListLv2 = []
-      this.classifyList = res.data.map(item => {
-        var { children, ...data } = item
-        classifyListLv2.push(...(children || []))
-        return {
-          ...data
-        }
-      });
-      this.classifyListLv2 = classifyListLv2
-    })
-    // 其他类型
-    listPageV2Other({ "pageNum": 1, "pageSize": -1, "params": [] }).then(res => {
-      this.gongqt = res.data.records
-      this.gongqtdl = Array.from(new Set(res.data.records.map(item => item.type))).map(type => ({
-        label: type,
-        value: type
-      }))
-    })
-  },
   methods: {
     getflList(list = [], row = {},) {
       return list.filter(item => (

+ 9 - 0
src/views/workOrder/workOrderPool/index.vue

@@ -318,6 +318,15 @@ export default {
           )
         }
       }
+      if (item.jname === 'appointmentTime') {
+        defaultData.render = (h, { row, index, column }) => {
+          return (
+            <div style="padding:0 6px;cursor: pointer;">
+              {row[column.columnAttributes.prop].split(" ")[0]}
+            </div>
+          )
+        }
+      }
       return defaultData
     },