|
@@ -109,17 +109,26 @@ try {
|
|
|
uInput: function () {
|
|
|
return Promise.all(/*! import() | uni_modules/vk-uview-ui/components/u-input/u-input */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/vk-uview-ui/components/u-input/u-input")]).then(__webpack_require__.bind(null, /*! @/uni_modules/vk-uview-ui/components/u-input/u-input.vue */ 428))
|
|
|
},
|
|
|
+ uImage: function () {
|
|
|
+ return __webpack_require__.e(/*! import() | uni_modules/vk-uview-ui/components/u-image/u-image */ "uni_modules/vk-uview-ui/components/u-image/u-image").then(__webpack_require__.bind(null, /*! @/uni_modules/vk-uview-ui/components/u-image/u-image.vue */ 358))
|
|
|
+ },
|
|
|
uGap: function () {
|
|
|
return __webpack_require__.e(/*! import() | uni_modules/vk-uview-ui/components/u-gap/u-gap */ "uni_modules/vk-uview-ui/components/u-gap/u-gap").then(__webpack_require__.bind(null, /*! @/uni_modules/vk-uview-ui/components/u-gap/u-gap.vue */ 435))
|
|
|
},
|
|
|
uButton: function () {
|
|
|
return __webpack_require__.e(/*! import() | uni_modules/vk-uview-ui/components/u-button/u-button */ "uni_modules/vk-uview-ui/components/u-button/u-button").then(__webpack_require__.bind(null, /*! @/uni_modules/vk-uview-ui/components/u-button/u-button.vue */ 337))
|
|
|
},
|
|
|
+ uToast: function () {
|
|
|
+ return __webpack_require__.e(/*! import() | uni_modules/vk-uview-ui/components/u-toast/u-toast */ "uni_modules/vk-uview-ui/components/u-toast/u-toast").then(__webpack_require__.bind(null, /*! @/uni_modules/vk-uview-ui/components/u-toast/u-toast.vue */ 470))
|
|
|
+ },
|
|
|
uSelect: function () {
|
|
|
return __webpack_require__.e(/*! import() | uni_modules/vk-uview-ui/components/u-select/u-select */ "uni_modules/vk-uview-ui/components/u-select/u-select").then(__webpack_require__.bind(null, /*! @/uni_modules/vk-uview-ui/components/u-select/u-select.vue */ 463))
|
|
|
},
|
|
|
- uToast: function () {
|
|
|
- return __webpack_require__.e(/*! import() | uni_modules/vk-uview-ui/components/u-toast/u-toast */ "uni_modules/vk-uview-ui/components/u-toast/u-toast").then(__webpack_require__.bind(null, /*! @/uni_modules/vk-uview-ui/components/u-toast/u-toast.vue */ 470))
|
|
|
+ uPopup: function () {
|
|
|
+ return __webpack_require__.e(/*! import() | uni_modules/vk-uview-ui/components/u-popup/u-popup */ "uni_modules/vk-uview-ui/components/u-popup/u-popup").then(__webpack_require__.bind(null, /*! @/uni_modules/vk-uview-ui/components/u-popup/u-popup.vue */ 372))
|
|
|
+ },
|
|
|
+ uTag: function () {
|
|
|
+ return __webpack_require__.e(/*! import() | uni_modules/vk-uview-ui/components/u-tag/u-tag */ "uni_modules/vk-uview-ui/components/u-tag/u-tag").then(__webpack_require__.bind(null, /*! @/uni_modules/vk-uview-ui/components/u-tag/u-tag.vue */ 477))
|
|
|
},
|
|
|
}
|
|
|
} catch (e) {
|
|
@@ -143,6 +152,20 @@ var render = function () {
|
|
|
var _vm = this
|
|
|
var _h = _vm.$createElement
|
|
|
var _c = _vm._self._c || _h
|
|
|
+ if (!_vm._isMounted) {
|
|
|
+ _vm.e0 = function ($event) {
|
|
|
+ _vm.groupTypeSelectShow = true
|
|
|
+ }
|
|
|
+ _vm.e1 = function ($event) {
|
|
|
+ _vm.propertySelectShow = true
|
|
|
+ }
|
|
|
+ _vm.e2 = function ($event) {
|
|
|
+ _vm.propertySelectShow = false
|
|
|
+ }
|
|
|
+ _vm.e3 = function ($event) {
|
|
|
+ _vm.propertySelectShow = false
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
var recyclableRender = false
|
|
|
var staticRenderFns = []
|
|
@@ -178,10 +201,71 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
"use strict";
|
|
|
/* WEBPACK VAR INJECTION */(function(uni) {
|
|
|
|
|
|
+var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
value: true
|
|
|
});
|
|
|
exports.default = void 0;
|
|
|
+var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
|
|
|
+var _utils = __webpack_require__(/*! @/utils */ 65);
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
//
|
|
|
//
|
|
|
//
|
|
@@ -210,8 +294,18 @@ exports.default = void 0;
|
|
|
var _default = {
|
|
|
data: function data() {
|
|
|
return {
|
|
|
- curImgUrl: '',
|
|
|
+ groupTypeSelectShow: false,
|
|
|
+ groupTypeSelectList: [],
|
|
|
+ estateList: [],
|
|
|
+ areaTypeObj: {},
|
|
|
+ userInfo2: {},
|
|
|
+ curEstateName: '',
|
|
|
+ propertySelectShow: false,
|
|
|
+ imgArr: [],
|
|
|
form: {
|
|
|
+ estate_id: '',
|
|
|
+ estate_name: '',
|
|
|
+ cur_time: '',
|
|
|
record_remark: null
|
|
|
},
|
|
|
customer_id: null,
|
|
@@ -220,15 +314,36 @@ var _default = {
|
|
|
required: true,
|
|
|
message: '备注不能为空',
|
|
|
trigger: ['change']
|
|
|
+ }],
|
|
|
+ cur_time: [{
|
|
|
+ required: true,
|
|
|
+ message: "提醒时间不能为空",
|
|
|
+ trigger: ['blur', 'change']
|
|
|
}]
|
|
|
},
|
|
|
- remarkTips: '请输入:购房预算(总价/均价/面积段)~现居住区域~现居住产品/面积段~工作类型~购房需求/关注点~已经看过的房源情况',
|
|
|
- propertySelectShow: false,
|
|
|
- propertySelectList: []
|
|
|
+ remarkTips: '请输入'
|
|
|
};
|
|
|
},
|
|
|
onLoad: function onLoad(data) {
|
|
|
+ var _this = this;
|
|
|
this.customer_id = data.id;
|
|
|
+ var userInfo2 = this.userInfo2 = uni.getStorageSync('MD_userInfo2');
|
|
|
+ var dictObj = uni.getStorageSync('MD_dict');
|
|
|
+ this.areaTypeObj = (0, _utils.arrToObj)(dictObj.area_type);
|
|
|
+ this.getEstateList();
|
|
|
+ this.form.group_type = userInfo2.group_type || '1';
|
|
|
+ var list = dictObj.group_type || [];
|
|
|
+ var groupTypeSelectList = [];
|
|
|
+ list.forEach(function (item) {
|
|
|
+ if (item.val == userInfo2.group_type) {
|
|
|
+ _this.form.groupTypeName = item.key;
|
|
|
+ }
|
|
|
+ groupTypeSelectList.push({
|
|
|
+ value: item.val,
|
|
|
+ label: item.key
|
|
|
+ });
|
|
|
+ });
|
|
|
+ this.groupTypeSelectList = [].concat(groupTypeSelectList);
|
|
|
},
|
|
|
created: function created() {},
|
|
|
// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
|
|
@@ -236,42 +351,96 @@ var _default = {
|
|
|
this.$refs.uForm.setRules(this.rules);
|
|
|
},
|
|
|
methods: {
|
|
|
- // // 选择所属项目回调
|
|
|
- // propertySelectConfirm(e) {
|
|
|
- // e.map((val, index) => {
|
|
|
- // this.form.estate_id = val.value;
|
|
|
- // this.form.estate_name = val.label;
|
|
|
- // });
|
|
|
- // },
|
|
|
+ groupTypeSelectConfirm: function groupTypeSelectConfirm(e) {
|
|
|
+ var _this2 = this;
|
|
|
+ e.map(function (val, index) {
|
|
|
+ _this2.form.group_type = val.value;
|
|
|
+ _this2.form.groupTypeName = val.label;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getEstateList: function getEstateList() {
|
|
|
+ var _this3 = this;
|
|
|
+ uni.api.estate.apiestatelist({
|
|
|
+ page_size: 100,
|
|
|
+ report_open: 1,
|
|
|
+ estate_name: this.curEstateName
|
|
|
+ }).then(function (res) {
|
|
|
+ var list = res.list || [];
|
|
|
+ _this3.estateList = (0, _toConsumableArray2.default)(list);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ listItemHandle: function listItemHandle(val) {
|
|
|
+ this.form.estate_id = val.estate_id;
|
|
|
+ this.form.estate_name = val.estate_name;
|
|
|
+ },
|
|
|
addImg: function addImg() {
|
|
|
- var token = uni.getStorageSync('MD_token');
|
|
|
+ var _this4 = this;
|
|
|
+ this.uploadComImg(function (arr) {
|
|
|
+ _this4.imgArr = [].concat((0, _toConsumableArray2.default)(_this4.imgArr), (0, _toConsumableArray2.default)(arr));
|
|
|
+ _this4.imgArr = (0, _toConsumableArray2.default)(imgArr);
|
|
|
+ }, 9);
|
|
|
+ },
|
|
|
+ uploadComImg: function uploadComImg(bc, count, moreStr) {
|
|
|
var that = this;
|
|
|
uni.chooseImage({
|
|
|
- count: 1,
|
|
|
+ count: count ? count : 1,
|
|
|
// 默认9
|
|
|
sizeType: ['compressed'],
|
|
|
+ // original
|
|
|
sourceType: ['album', 'camera'],
|
|
|
success: function success(res) {
|
|
|
var tempFilePaths = res.tempFilePaths;
|
|
|
- uni.uploadFile({
|
|
|
- url: uni.baseUrl + 'api/upload/cloud',
|
|
|
- filePath: tempFilePaths[0],
|
|
|
- name: 'upload',
|
|
|
- formData: {
|
|
|
- 'token': token
|
|
|
- },
|
|
|
- success: function success(res) {
|
|
|
- var cData = JSON.parse(res.data);
|
|
|
- that.curImgUrl = cData.data.url;
|
|
|
- }
|
|
|
- });
|
|
|
+ if (tempFilePaths.length > 0) {
|
|
|
+ var imgBcArr = [];
|
|
|
+ tempFilePaths.forEach(function (p, i) {
|
|
|
+ that.diyUploadFile(p, moreStr).then(function (url) {
|
|
|
+ imgBcArr.push(url);
|
|
|
+ if (bc && imgBcArr.length === tempFilePaths.length) {
|
|
|
+ bc(imgBcArr);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ diyUploadFile: function diyUploadFile(filePath, moreStr) {
|
|
|
+ return new Promise(function (resolve, reject) {
|
|
|
+ var token = uni.getStorageSync('MD_token');
|
|
|
+ var url = uni.baseUrl + 'api/upload/cloud';
|
|
|
+ // if (moreStr === 'noSign') url = uni.baseUrl + 'api/upload/cloud'
|
|
|
+ uni.uploadFile({
|
|
|
+ url: url,
|
|
|
+ filePath: filePath,
|
|
|
+ name: 'upload',
|
|
|
+ formData: {
|
|
|
+ 'token': token
|
|
|
+ },
|
|
|
+ success: function success(res) {
|
|
|
+ var cData = JSON.parse(res.data);
|
|
|
+ var curImg = cData.data.url || '';
|
|
|
+ resolve(curImg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ delImg: function delImg(index) {
|
|
|
+ var imgArr = (0, _toConsumableArray2.default)(this.imgArr);
|
|
|
+ imgArr.splice(index, 1);
|
|
|
+ this.imgArr = (0, _toConsumableArray2.default)(imgArr);
|
|
|
+ },
|
|
|
+ previewImageHandle: function previewImageHandle(current, arr) {
|
|
|
+ uni.previewImage({
|
|
|
+ current: current,
|
|
|
+ urls: this.imgArr
|
|
|
+ });
|
|
|
+ },
|
|
|
submitHandle: function submitHandle() {
|
|
|
- var _this = this;
|
|
|
+ var _this5 = this;
|
|
|
var that = this;
|
|
|
this.$refs.uForm.validate(function (valid) {
|
|
|
+ console.log(valid);
|
|
|
+ return;
|
|
|
if (valid) {
|
|
|
// 验证成功
|
|
|
var apiStr = 'apiprivaterecordadd';
|
|
@@ -279,7 +448,7 @@ var _default = {
|
|
|
record_remark: that.form.record_remark,
|
|
|
customer_id: that.customer_id
|
|
|
};
|
|
|
- if (that.curImgUrl) params.record_img = that.curImgUrl;
|
|
|
+ if (that.imgArr) params.record_img = that.imgArr.join(',');
|
|
|
if (that.isEdit) {
|
|
|
apiStr = 'apiprivaterecordedit';
|
|
|
params.id = that.form.id;
|
|
@@ -299,7 +468,7 @@ var _default = {
|
|
|
uni.$msgConfirm('添加跟进记录成功,是否前往列表?', function () {
|
|
|
uni.navigateBack();
|
|
|
}, function () {
|
|
|
- _this.form = {
|
|
|
+ _this5.form = {
|
|
|
record_remark: null
|
|
|
};
|
|
|
});
|