From 02bc3bfe47e3d5311a0bb041c94e70a34b1ca73c Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期二, 09 四月 2024 09:03:01 +0800
Subject: [PATCH] git ch

---
 wx/unpackage/dist/dev/mp-weixin/pages/new_report/new_report.js |  223 ++++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 155 insertions(+), 68 deletions(-)

diff --git a/wx/unpackage/dist/dev/mp-weixin/pages/new_report/new_report.js b/wx/unpackage/dist/dev/mp-weixin/pages/new_report/new_report.js
index 0a72241..62cbaac 100644
--- a/wx/unpackage/dist/dev/mp-weixin/pages/new_report/new_report.js
+++ b/wx/unpackage/dist/dev/mp-weixin/pages/new_report/new_report.js
@@ -120,9 +120,6 @@
     "u-Textarea": function () {
       return Promise.all(/*! import() | node-modules/uview-ui/components/u--textarea/u--textarea */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u--textarea/u--textarea")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u--textarea/u--textarea.vue */ 509))
     },
-    uUpload: function () {
-      return Promise.all(/*! import() | node-modules/uview-ui/components/u-upload/u-upload */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u-upload/u-upload")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u-upload/u-upload.vue */ 515))
-    },
     uButton: function () {
       return Promise.all(/*! import() | node-modules/uview-ui/components/u-button/u-button */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u-button/u-button")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u-button/u-button.vue */ 406))
     },
@@ -154,50 +151,56 @@
   var _vm = this
   var _h = _vm.$createElement
   var _c = _vm._self._c || _h
+  var g0 = !_vm.id ? _vm.model.memberName && _vm.columns2.length > 0 : null
   if (!_vm._isMounted) {
     _vm.e0 = function ($event) {
       _vm.show = false
     }
     _vm.e1 = function ($event) {
-      _vm.show4 = true
-    }
-    _vm.e2 = function ($event) {
       _vm.show1 = true
     }
-    _vm.e3 = function ($event) {
+    _vm.e2 = function ($event) {
       _vm.show2 = true
     }
-    _vm.e4 = function ($event) {
+    _vm.e3 = function ($event) {
       _vm.model.inHospital = 0
     }
-    _vm.e5 = function ($event) {
+    _vm.e4 = function ($event) {
       _vm.model.inHospital = 1
     }
-    _vm.e6 = function ($event) {
+    _vm.e5 = function ($event) {
       _vm.model.medicalInsurance = 0
     }
-    _vm.e7 = function ($event) {
+    _vm.e6 = function ($event) {
       _vm.model.medicalInsurance = 1
     }
-    _vm.e8 = function ($event) {
+    _vm.e7 = function ($event) {
       _vm.show3 = true
     }
-    _vm.e9 = function ($event) {
+    _vm.e8 = function ($event) {
       _vm.show1 = false
     }
-    _vm.e10 = function ($event) {
+    _vm.e9 = function ($event) {
       _vm.show2 = false
     }
-    _vm.e11 = function ($event) {
+    _vm.e10 = function ($event) {
       _vm.show3 = false
     }
-    _vm.e12 = function ($event) {
+    _vm.e11 = function ($event) {
       _vm.show4 = false
     }
-    _vm.e13 = function ($event) {
+    _vm.e12 = function ($event) {
       _vm.show5 = false
     }
   }
+  _vm.$mp.data = Object.assign(
+    {},
+    {
+      $root: {
+        g0: g0,
+      },
+    }
+  )
 }
 var recyclableRender = false
 var staticRenderFns = []
@@ -334,11 +337,29 @@
 //
 //
 //
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
 var _default = {
   data: function data() {
     return {
       id: null,
-      show: true,
+      show: false,
       show1: false,
       show2: false,
       show3: false,
@@ -435,54 +456,75 @@
     this.id = option.id;
     if (this.id) {
       this.getDetails();
+      this.getArea();
+      this.getUser();
+      return;
     }
+    this.show = true;
     this.getArea();
     this.getUser();
   },
   methods: {
-    getDetails: function getDetails() {
+    clickItem: function clickItem(item) {
+      this.model.memberName = item.name;
+      this.model.memberId = item.id;
+      this.columns2 = [];
+    },
+    // 鎼滅储
+    changeSearch: function changeSearch(name) {
       var _this2 = this;
+      this.columns2 = [];
+      this.$u.api.memberFindListByDTO({
+        name: name
+      }).then(function (res) {
+        if (res.code === 200) {
+          _this2.columns2 = res.data;
+        }
+      });
+    },
+    getDetails: function getDetails() {
+      var _this3 = this;
       this.$u.api.settleClaimsById(this.id).then(function (res) {
         if (res.code === 200) {
-          _this2.model.memberName = res.data.memberName;
-          _this2.model.memberId = res.data.memberId;
-          _this2.model.solutionName = res.data.solutionName;
-          _this2.model.solutionId = res.data.solutionId;
-          _this2.model.worktypeId = res.data.worktypeId;
-          _this2.model.worktypeName = res.data.worktypeName;
-          _this2.model.duId = res.data.duId;
-          _this2.model.duName = res.data.duName;
-          _this2.model.content = res.data.content;
-          _this2.model.reportFileList = res.data.reportFileList;
-          _this2.model.informantName = res.data.informantName;
-          _this2.model.informantPhone = res.data.informantPhone;
-          _this2.model.hospital = res.data.hospital;
-          _this2.model.happenTime = res.data.happenTime;
-          _this2.model.type = res.data.type;
+          _this3.model.memberName = res.data.memberName;
+          _this3.model.memberId = res.data.memberId;
+          _this3.model.solutionName = res.data.solutionName;
+          _this3.model.solutionId = res.data.solutionId;
+          _this3.model.worktypeId = res.data.worktypeId;
+          _this3.model.worktypeName = res.data.worktypeName;
+          _this3.model.duId = res.data.duId;
+          _this3.model.duName = res.data.duName;
+          _this3.model.content = res.data.content;
+          _this3.model.reportFileList = res.data.reportFileList;
+          _this3.model.informantName = res.data.informantName;
+          _this3.model.informantPhone = res.data.informantPhone;
+          _this3.model.hospital = res.data.hospital;
+          _this3.model.happenTime = res.data.happenTime;
+          _this3.model.type = res.data.type;
           if (res.data.type === 0) {
-            _this2.model.typeName = '宸ヤ綔鏈熼棿鍙椾激';
+            _this3.model.typeName = '宸ヤ綔鏈熼棿鍙椾激';
           } else if (res.data.type === 1) {
-            _this2.model.typeName = '涓婁笅鐝�斾腑鍙椾激';
+            _this3.model.typeName = '涓婁笅鐝�斾腑鍙椾激';
           } else if (res.data.type === 2) {
-            _this2.model.typeName = '闈炲伐浣滄椂闂村彈浼�';
+            _this3.model.typeName = '闈炲伐浣滄椂闂村彈浼�';
           } else if (res.data.type === 3) {
-            _this2.model.typeName = '鎰忓鍙椾激';
+            _this3.model.typeName = '鎰忓鍙椾激';
           }
-          _this2.model.inHospital = res.data.inHospital;
-          _this2.model.medicalInsurance = res.data.medicalInsurance;
-          _this2.model.areaInfo = res.data.areaInfo;
-          _this2.model.areaId = res.data.areaId;
+          _this3.model.inHospital = res.data.inHospital;
+          _this3.model.medicalInsurance = res.data.medicalInsurance;
+          _this3.model.areaInfo = res.data.areaInfo;
+          _this3.model.areaId = res.data.areaId;
         }
       });
     },
     // 鎻愪氦鎶ユ
     submit: function submit() {
-      var _this3 = this;
+      var _this4 = this;
       this.$refs.uForm.validate().then(function (res) {
-        if (_this3.id) {
-          _this3.$u.api.settleClaimsUpdateById(_objectSpread({
-            id: _this3.id
-          }, _this3.model)).then(function (res) {
+        if (_this4.id) {
+          _this4.$u.api.settleClaimsUpdateById(_objectSpread({
+            id: _this4.id
+          }, _this4.model)).then(function (res) {
             if (res.code === 200) {
               uni.showToast({
                 title: '鎻愪氦鎴愬姛',
@@ -496,7 +538,7 @@
             }
           });
         } else {
-          _this3.$u.api.settleClaimsCreate(_this3.model).then(function (res) {
+          _this4.$u.api.settleClaimsCreate(_this4.model).then(function (res) {
             if (res.code === 200) {
               uni.showToast({
                 title: '鎻愪氦鎴愬姛',
@@ -513,7 +555,7 @@
       }).catch(function (errors) {});
     },
     openFA: function openFA() {
-      var _this4 = this;
+      var _this5 = this;
       if (!this.model.memberId) return uni.showToast({
         title: '璇峰厛閫夋嫨鍑洪櫓浜�',
         icon: 'none'
@@ -523,19 +565,19 @@
         memberId: this.model.memberId
       }).then(function (res) {
         if (res.code === 200) {
-          _this4.columns3 = [res.data];
-          _this4.show5 = true;
+          _this5.columns3 = [res.data];
+          _this5.show5 = true;
         }
       });
     },
     getUser: function getUser() {
-      var _this5 = this;
+      var _this6 = this;
       this.$u.api.memberFindListByDTO().then(function (res) {
         if (res.code === 200) {
           res.data.forEach(function (item) {
             item.label = item.name + ' - ' + item.idcardNo;
           });
-          _this5.columns2 = [res.data];
+          _this6.columns2 = [res.data];
         }
       });
     },
@@ -555,35 +597,81 @@
       }
     },
     getArea: function getArea() {
-      var _this6 = this;
+      var _this7 = this;
       this.$u.api.findTreeList().then(function (res) {
         if (res.code === 200) {
-          _this6.columns1 = [res.data, res.data[0].childAreasList, res.data[0].childAreasList[0].childAreasList];
-          _this6.area = res.data;
+          _this7.columns1 = [res.data, res.data[0].childAreasList, res.data[0].childAreasList[0].childAreasList];
+          _this7.area = res.data;
+        }
+      });
+    },
+    upload: function upload() {
+      var that = this;
+      uni.chooseMedia({
+        count: 9,
+        mediaType: ['image', 'video'],
+        sourceType: ['album', 'camera'],
+        camera: 'back',
+        success: function success(res) {
+          uni.showLoading({
+            title: '涓婁紶涓�',
+            mask: true
+          });
+          var _loop = function _loop(i) {
+            uni.uploadFile({
+              url: "".concat(that.$baseUrl, "public/upload"),
+              filePath: res.tempFiles[i].tempFilePath,
+              name: 'file',
+              header: {
+                'doumee-auth-token': that.$store.state.cookies
+              },
+              formData: {
+                folder: 'settle'
+              },
+              success: function success(uploadFileRes) {
+                var res = JSON.parse(uploadFileRes.data);
+                console.log(res);
+                that.fileList.push(_objectSpread({}, res.data));
+                that.model.reportFileList.push({
+                  fileurl: res.data.imgaddr,
+                  name: res.data.originname,
+                  type: res.data.type,
+                  url: res.data.url
+                });
+              },
+              complete: function complete() {
+                if (i === res.tempFiles.length - 1) {
+                  uni.hideLoading();
+                }
+              }
+            });
+          };
+          for (var i = 0; i < res.tempFiles.length; i++) {
+            _loop(i);
+          }
         }
       });
     },
     afterRead: function afterRead(e) {
-      var _this7 = this;
+      var _this8 = this;
       uni.showLoading({
         title: '涓婁紶涓�',
         mask: true
       });
-      var _loop = function _loop(i) {
+      var _loop2 = function _loop2(i) {
         uni.uploadFile({
-          url: "".concat(_this7.$baseUrl, "public/upload"),
+          url: "".concat(_this8.$baseUrl, "public/upload"),
           filePath: e.file[i].url,
           name: 'file',
           header: {
-            'doumee-auth-token': _this7.$store.state.cookies
+            'doumee-auth-token': _this8.$store.state.cookies
           },
           formData: {
             folder: 'settle'
           },
           success: function success(uploadFileRes) {
             var res = JSON.parse(uploadFileRes.data);
-            _this7.fileList.push(_objectSpread({}, res.data));
-            _this7.model.reportFileList.push({
+            _this8.model.reportFileList.push({
               fileurl: res.data.imgaddr,
               name: res.data.originname,
               type: res.data.type
@@ -597,12 +685,11 @@
         });
       };
       for (var i = 0; i < e.file.length; i++) {
-        _loop(i);
+        _loop2(i);
       }
     },
-    deletePic: function deletePic(e) {
-      this.model.reportFileList.splice(e.index, 1);
-      this.fileList.splice(e.index, 1);
+    deletePic: function deletePic(index) {
+      this.model.reportFileList.splice(index, 1);
     },
     getTreeName: function getTreeName(list, id) {
       var _this = this;
@@ -641,10 +728,10 @@
       this.show4 = false;
     },
     confirm2: function confirm2(e) {
-      var _this8 = this;
+      var _this9 = this;
       var info = '';
       e.value.forEach(function (item) {
-        info += _this8.getTreeName(_this8.area, item.id);
+        info += _this9.getTreeName(_this9.area, item.id);
       });
       this.model.areaId = e.value.map(function (item) {
         return item.id;

--
Gitblit v1.9.3