Browse Source

微信端增加投诉功能修改

shengxuefei 3 years ago
parent
commit
262d0d40ed
8 changed files with 173 additions and 9 deletions
  1. 4 4
      app.js
  2. 4 2
      pages/baoxiu/baoxiu.js
  3. 1 1
      pages/tousu/tousu.json
  4. 114 0
      pages/tsjl/tsjl.js
  5. 5 0
      pages/tsjl/tsjl.json
  6. 27 0
      pages/tsjl/tsjl.wxml
  7. 16 0
      pages/tsjl/tsjl.wxss
  8. 2 2
      pages/user/user.js

+ 4 - 4
app.js

@@ -14,10 +14,10 @@
 // const con = require('./utils/con.js')//调用方法
 // con.sayy(' world')
 App({
-  //coreUrl: 'https://yqj.365wy.top/wxcore/api/Values/',//调用后台地址
-  coreUrl: 'http://localhost/wxcore/api/Values/',//调用后台地址
-  //webUrl:'https://yqj.365wy.top/pm/Webservice.asmx',//调用web接口地址
-  webUrl:'http://localhost:85/webservice.asmx',//调用web接口地址
+  coreUrl: 'https://yqj.365wy.top/wxcore/api/Values/',//调用后台地址
+  //coreUrl: 'http://localhost/wxcore/api/Values/',//调用后台地址
+  webUrl:'https://yqj.365wy.top/pm/Webservice.asmx',//调用web接口地址
+  //webUrl:'http://localhost:85/webservice.asmx',//调用web接口地址
   UserName:'admin',//web接口验证账号
   PassWord:'admin123',//web接口验证密码
   userFileUrl:'https://yqj.365wy.top/wxcore/wwwroot/Upload',//客户上传报事图片地址

+ 4 - 2
pages/baoxiu/baoxiu.js

@@ -142,11 +142,13 @@ Page({
                 'SOAPAction':targetNamespace+method,
             }, 
             success:function(res){
-                console.warn('Insertfdc_pm_repair',res);
+                console.info('【Insertfdc_pm_repair】',res);
                 var XMLParser = new Parser.DOMParser();
+                console.info('【Insertfdc_pm_repair】s1');
                 var doc = XMLParser.parseFromString(res.data);
+                console.info('【Insertfdc_pm_repair】s2');
                 var Insertfdc_pm_repairResult = doc.getElementsByTagName("Insertfdc_pm_repairResult")[0].firstChild.nodeValue;
-                console.warn('Insertfdc_pm_repairResult',Insertfdc_pm_repairResult);
+                console.info('Insertfdc_pm_repairResult',Insertfdc_pm_repairResult);
                 if(Insertfdc_pm_repairResult=='保存成功!'){
                     wx.showToast({
                         title: '提交成功!',

+ 1 - 1
pages/tousu/tousu.json

@@ -1,5 +1,5 @@
 {
   "navigationBarBackgroundColor": "#298DF7",
-  "navigationBarTitleText": "我要报修",
+  "navigationBarTitleText": "我要投诉",
   "navigationBarTextStyle":"white"
 }

+ 114 - 0
pages/tsjl/tsjl.js

@@ -0,0 +1,114 @@
+const Parser = require('../xml/xmldom/dom-parser');
+var app = getApp();
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        imgUrl:app.imgUrl,
+        jiaoFeiJiLu:[],
+        vrepairapplycode:'',
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        wx.showToast({
+            title: '加载中',
+            icon: 'loading',
+            duration: 1000
+        })
+        var that = this;
+        var tableBX = [];
+        
+        
+            var method='Getfdc_pm_repairapplyTousuByownerid';
+            var wsdlurl=app.webUrl;
+            var targetNamespace='http://tempuri.org/';
+            var datacopy= '<?xml version="1.0" encoding="utf-8"?>';
+            datacopy += '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">';
+            datacopy += '<soap:Header><MySoapHeader xmlns="http://tempuri.org/">';
+            datacopy += `<UserName>${app.UserName}</UserName>`;
+            datacopy += `<PassWord>${app.PassWord}</PassWord>`;
+            datacopy += '</MySoapHeader></soap:Header>';
+            datacopy += '<soap:Body>';
+            datacopy += '<Getfdc_pm_repairapplyTousuByownerid xmlns="http://tempuri.org/">';
+            datacopy += `<ownerid>${options.ownerid}</ownerid>`;
+            datacopy += '</Getfdc_pm_repairapplyTousuByownerid>';
+            datacopy += '</soap:Body>';
+            datacopy += '</soap:Envelope>';
+            wx.request({
+                url: wsdlurl,
+                data: datacopy, 
+                method: 'POST', 
+                header: { 
+                    'Content-Type':'text/xml; charset=utf-8',
+                    'SOAPAction':targetNamespace+method,
+                }, 
+                success:function(res){
+                    console.info("投诉res",res.data);
+                    var XMLParser = new Parser.DOMParser();
+                    var doc = XMLParser.parseFromString(res.data);
+                    var Getfdc_pm_ownerResult = JSON.parse(doc.getElementsByTagName("Getfdc_pm_repairapplyTousuByowneridResult")[0].firstChild.nodeValue);
+                    if(Getfdc_pm_ownerResult.ok==true){
+                        for (let i = 0; i < Getfdc_pm_ownerResult.Table.length; i++) {
+                            tableBX.push(Getfdc_pm_ownerResult.Table[i]);
+                        }
+                        that.setData({
+                            jiaoFeiJiLu:tableBX
+                        })
+                    }
+                }
+            })
+         
+    },
+    bxjlDetail: function (e) {
+        wx.navigateTo({
+          url: `../bxjlDetail/bxjlDetail?vrepairapplycode=${e.currentTarget.dataset.index}`,
+        })
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 5 - 0
pages/tsjl/tsjl.json

@@ -0,0 +1,5 @@
+{
+  "navigationBarBackgroundColor": "#298DF7",
+  "navigationBarTitleText": "投诉记录",
+  "navigationBarTextStyle":"white"
+}

+ 27 - 0
pages/tsjl/tsjl.wxml

@@ -0,0 +1,27 @@
+<view wx:if="{{jiaoFeiJiLu.length>=0}}" wx:for="{{jiaoFeiJiLu}}" wx:for-item="i" >
+    <view class="diyi"  data-index="{{i.vrepairapplycode}}" bindtap="bxjlDetail" >
+        <text>报修时间:{{i.dapplydate}}</text>
+    </view>
+    <view class="dier" data-index="{{i.vrepairapplycode}}" bindtap="bxjlDetail" >
+        <view class="disan">
+            <view wx:if="{{i.billtype==1}}"><text style="color:#9D9E9E;">维修类型:</text><text style="margin-left:36rpx">报事单</text></view>
+            <view wx:if="{{i.billtype==2}}"><text style="color:#9D9E9E;">维修类型:</text><text style="margin-left:36rpx">整改通知单</text></view>
+            <view wx:if="{{i.billtype==3}}"><text style="color:#9D9E9E;">维修类型:</text><text style="margin-left:36rpx">投诉单</text></view>
+            <view wx:if="{{i.billtype==4}}"><text style="color:#9D9E9E;">维修类型:</text><text style="margin-left:36rpx">咨询单</text></view>
+            <view wx:if="{{i.billtype==5}}"><text style="color:#9D9E9E;">维修类型:</text><text style="margin-left:36rpx">增值服务单</text></view>
+        </view>
+        <view style="margin:0rpx auto;width:700rpx;height:3rpx;background-color:#D8D8D8;"></view>
+        <view class="disan">
+                <text style="color:#9D9E9E;">维修时间:</text><text style="margin-left:36rpx">{{i.drequiredate}}</text>
+        </view>
+        <view style="margin:0rpx auto;width:700rpx;height:3rpx;background-color:#D8D8D8;"></view>
+        <view class="disan">
+            <view wx:if="{{i.vbillstatus==1}}"><text style="color:#9D9E9E;">维修状态:</text><text style="margin-left:36rpx;color:red;">已报事未处理</text></view>
+            <view wx:if="{{i.vbillstatus==2}}"><text style="color:#9D9E9E;">维修状态:</text><text style="margin-left:36rpx;color:#FFCD42;">已处理未回访</text></view>
+            <view wx:if="{{i.vbillstatus==3}}"><text style="color:#9D9E9E;">维修状态:</text><text style="margin-left:36rpx;color:#86DB48;">已回访</text></view>
+        </view>
+    </view>
+</view>
+<view wx:if="{{jiaoFeiJiLu.length<=0}}" class="jfjlimgage">
+    <image style="width: 380rpx;height: 380rpx;" src="{{imgUrl}}1589003625(1).png"></image>
+</view>

+ 16 - 0
pages/tsjl/tsjl.wxss

@@ -0,0 +1,16 @@
+.dier{
+    background-color: #fff;
+    margin:0rpx 16rpx;
+}
+.diyi{
+    padding:35rpx 0px 12rpx 22rpx;
+    color: #9D9E9E;
+    font-size: 10px;
+}
+.dier_yi{
+    padding: 20rpx 0rpx 10rpx 0rpx;
+}
+.disan{
+    padding:30rpx;
+    font-size: 27rpx;
+}

+ 2 - 2
pages/user/user.js

@@ -283,10 +283,10 @@ Page({
     }
   },
   tousuJiLuURL:function(){
-    // 跳转报修记录
+    // 跳转投诉记录
     if(this.data.phone!=''){
       wx.navigateTo({
-        url: `../bxjl/bxjl?ownerid=${this.data.ownerid}`,
+        url: `../tsjl/tsjl?ownerid=${this.data.ownerid}`,
       })
     }
     else{