NULL1222 2 недель назад
Родитель
Сommit
bcc7fbd954

+ 2 - 1
app.json

@@ -31,7 +31,8 @@
                 "workerHome/index",
                 "handling/detail",
                 "handling/transferWorkOrder/transfer",
-                "handling/assignAgent/assign"
+                "handling/assignAgent/assign",
+                "handling/linkWork/link"
             ]
         }
     ],

+ 2 - 1
bgj/handling/detail.js

@@ -11,7 +11,8 @@ Page({
     }, {
       label: "关联工单",
       idname: "sc_serviceformid",
-      color: "#3874F6"
+      color: "#3874F6",
+      model: "#linkWork"
     }, {
       label: "附件",
       idname: "sc_serviceformid",

+ 2 - 1
bgj/handling/detail.json

@@ -1,7 +1,8 @@
 {
     "usingComponents": {
         "Files": "/components/files/index",
-        "Record": "/components/record/index"
+        "Record": "/components/record/index",
+        "LinkWork": "/bgj/handling/linkWork/link"
     },
     "navigationBarTitleText": "服务预约单详情"
 }

+ 6 - 5
bgj/handling/detail.wxml

@@ -9,14 +9,15 @@
     <text style="margin-right: 20rpx;">{{detail.scenecontactphonenumber}}</text>
   </view>
   <view class="row">{{language['创建时间']||'创建时间'}}:{{detail.createdate}} </view>
-  <view class="row">{{language['经销商']||'经销商'}}:{{ detail.enterprisename ? (language[detail.enterprisename] || detail.enterprisename) : '--' }}</view>
+  <view class="row">{{language['经销商']||'经销商'}}:{{ detail.enterprisename ? (language[detail.enterprisename] ||
+    detail.enterprisename) : '--' }}</view>
 </view>
 <view style="height: 20rpx;" />
-<Yl_FunTabs  list='{{tabsList}}' showIcon='{{false}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
+<Yl_FunTabs list='{{tabsList}}' showIcon='{{false}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
   <Preview slot='服务预约' list1='{{list1}}' list2='{{list2}}' />
-  <view slot="关联工单" class="detail-info"></view>
+  <LinkWork slot="关联工单" id='linkWork' sc_serviceformid="{{sc_serviceformid}}"></LinkWork>
   <Record slot='操作记录' id="Record" ownertable='sc_serviceform' ownerid='{{detail.sc_serviceformid}}' />
-	<Files slot='附件' id="Files" ownertable='sc_serviceform' ownerid='{{detail.sc_serviceformid}}' />
-	<view style="height: 180rpx;" />
+  <Files slot='附件' id="Files" ownertable='sc_serviceform' ownerid='{{detail.sc_serviceformid}}' />
+  <view style="height: 180rpx;" />
 </Yl_FunTabs>
 <Yl_Tabbar wx:if="{{tabbarList.length}}" list='{{tabbarList}}' bind:callback="tabbarOnClick" />

+ 63 - 0
bgj/handling/linkWork/link.js

@@ -0,0 +1,63 @@
+const _Http = getApp().globalData.http;
+
+Component({
+  options: {
+    addGlobalClass: true
+  },
+  properties: {
+    sc_serviceformid: {
+      type: String,
+      value: ''
+    }
+  },
+  data: {
+    id: 2026052214171102,
+    content: {
+      sc_serviceformid: "",
+      nocache: true,
+      pageNumber: 1,
+      pageSize: 20,
+      where: {
+        condition: "",
+      }
+    },
+    list: []
+  },
+  lifetimes: {
+    attached: function () {
+      getApp().globalData.Language.getLanguagePackage(this)
+    },
+    ready() {
+      this.getList(true);
+    }
+  },
+  methods: {
+    getList( init = false) {
+      let content = {
+        ...this.data.content,
+        sc_serviceformid : this.properties.sc_serviceformid
+      };
+      if (init) {
+        content.pageNumber = 1
+        content.pageTotal = 1
+      }
+      _Http.basic({
+        "id":  this.data.id,
+        content
+      }).then(res => {
+        console.log("服务受理列表", res)
+        if (res.code != '1') return wx.showToast({
+          title: res.data,
+          icon: "none"
+        });
+        let list = res.data
+        this.setData({
+          "content.pageNumber": res.pageNumber + 1,
+          "content.pageTotal": res.pageTotal,
+          "content.total": res.total,
+          list: res.pageNumber == 1 ? list : this.data.list.concat(list),
+        })
+      })
+    },
+  }
+});

+ 5 - 0
bgj/handling/linkWork/link.json

@@ -0,0 +1,5 @@
+{
+    "component": true,
+    "usingComponents": {
+    }
+}

+ 57 - 0
bgj/handling/linkWork/link.scss

@@ -0,0 +1,57 @@
+.link-item {
+  width: 690rpx;
+  background: #ffffff;
+  border-radius: 8rpx;
+  padding: 16rpx 20rpx 20rpx;
+  box-sizing: border-box;
+  margin: 20rpx auto 0;
+  .item-head {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    width: 100%;
+    padding-bottom: 18rpx;
+    margin-bottom: 20rpx;
+    border-bottom: 2rpx solid #dddddd;
+
+    .btn {
+      display: flex;
+      align-items: center;
+      padding: 0 16rpx;
+      background: #3874f6;
+      border-radius: 4rpx;
+      font-family: PingFang SC, PingFang SC;
+      font-weight: 400;
+      font-size: 24rpx;
+      line-height: 48rpx;
+      color: #ffffff;
+      font-style: normal;
+    }
+
+    .status {
+      font-family: PingFang SC, PingFang SC;
+      font-weight: 400;
+      font-size: 28rpx;
+      text-align: left;
+      font-style: normal;
+    }
+  }
+  .address {
+    font-family: PingFang SC, PingFang SC;
+    font-weight: 400;
+    font-size: 28rpx;
+    color: #333333;
+    text-align: left;
+    font-style: normal;
+  }
+  .row {
+    padding-top: 8rpx;
+    font-family: PingFang SC, PingFang SC;
+    font-weight: 400;
+    font-size: 24rpx;
+    color: #999999;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+  }
+}

+ 18 - 0
bgj/handling/linkWork/link.wxml

@@ -0,0 +1,18 @@
+<navigator url="#" class="link-item" wx:for="{{list}}" wx:key="sc_serviceformid">
+  <view class="item-head">
+    <view class="btn">{{language[item.type] || item.type}}</view>
+    <view class="status" style="color:{{sColors[item.status]}};">{{language[item.status]||item.status}}</view>
+  </view>
+  <view class="address">{{item.province + item.city + item.county + item.address}}</view>
+  <view class="row">{{language['工单号']||'工单号'}}:{{item.billno}}</view>
+  <view class="row">
+    {{language['客户']||'客户'}}:{{item.name}}
+    <text style="margin-right: 20rpx;">{{item.phonenumber}}</text>
+  </view>
+  <view class="row">
+    {{language['现场联系人']||'现场联系人'}}:{{item.scenecontact}}
+    <text style="margin-right: 20rpx;">{{item.scenecontactphonenumber}}</text>
+  </view>
+  <view class="row">{{language['负责人']||'负责人'}}:{{item.leadername}} </view>
+</navigator>
+<My_Empty wx:if="{{list.length==0}}" />