| | |
| | | uIcon: function () { |
| | | return Promise.all(/*! import() | node-modules/uview-ui/components/u-icon/u-icon */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u-icon/u-icon")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u-icon/u-icon.vue */ 379)) |
| | | }, |
| | | uCalendar: function () { |
| | | return Promise.all(/*! import() | node-modules/uview-ui/components/u-calendar/u-calendar */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u-calendar/u-calendar")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u-calendar/u-calendar.vue */ 542)) |
| | | }, |
| | | uPicker: function () { |
| | | return Promise.all(/*! import() | node-modules/uview-ui/components/u-picker/u-picker */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u-picker/u-picker")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u-picker/u-picker.vue */ 581)) |
| | | }, |
| | | } |
| | | } catch (e) { |
| | | if ( |
| | |
| | | var _vm = this |
| | | var _h = _vm.$createElement |
| | | var _c = _vm._self._c || _h |
| | | if (!_vm._isMounted) { |
| | | _vm.e0 = function ($event) { |
| | | _vm.show = true |
| | | } |
| | | _vm.e1 = function ($event) { |
| | | _vm.show1 = true |
| | | } |
| | | _vm.e2 = function ($event, index) { |
| | | var _temp = arguments[arguments.length - 1].currentTarget.dataset, |
| | | _temp2 = _temp.eventParams || _temp["event-params"], |
| | | index = _temp2.index |
| | | var _temp, _temp2 |
| | | return _vm.form.multifileList.splice(index, 1) |
| | | } |
| | | _vm.e3 = function ($event) { |
| | | _vm.viewStatus = !_vm.viewStatus |
| | | } |
| | | _vm.e4 = function ($event) { |
| | | _vm.show = false |
| | | } |
| | | _vm.e5 = function ($event) { |
| | | _vm.show1 = false |
| | | } |
| | | } |
| | | } |
| | | var recyclableRender = false |
| | | var staticRenderFns = [] |
| | |
| | | /***/ (function(module, exports, __webpack_require__) { |
| | | |
| | | "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 _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11)); |
| | | var _vuex = __webpack_require__(/*! vuex */ 33); |
| | | function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } |
| | | function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } |
| | | var _default = { |
| | | computed: _objectSpread(_objectSpread({}, (0, _vuex.mapState)(['userInfo'])), {}, { |
| | | totalPrice: function totalPrice() { |
| | | return this.form.estimatedAccount / 100; |
| | | } |
| | | }), |
| | | data: function data() { |
| | | return {}; |
| | | return { |
| | | show: false, |
| | | show1: false, |
| | | form: { |
| | | days: '', |
| | | startDate: '', |
| | | endDate: '', |
| | | lat: '', |
| | | lgt: '', |
| | | location: '', |
| | | workType: 0, |
| | | locationRemark: '', |
| | | categoryId: '', |
| | | categoryName: '', |
| | | priceNum1: '', |
| | | priceNum2: '', |
| | | price: '', |
| | | supplement: '', |
| | | multifileList: [], |
| | | linkName: '', |
| | | linkPhone: '', |
| | | priceUnit: '元/人/天', |
| | | estimatedAccount: '', |
| | | carType: 0, |
| | | type: 0 |
| | | }, |
| | | settlementType: [{ |
| | | name: '按天付费', |
| | | id: 0 |
| | | }, { |
| | | name: '按次付费', |
| | | id: 1 |
| | | }, { |
| | | name: '按重量付费', |
| | | id: 2 |
| | | }], |
| | | cateList: [], |
| | | viewStatus: false |
| | | }; |
| | | }, |
| | | onLoad: function onLoad(option) { |
| | | this.form.linkPhone = this.userInfo.telephone; |
| | | this.form.priceNum1 = option.days; |
| | | this.form.startDate = option.startDate; |
| | | this.form.endDate = option.endDate; |
| | | this.form.lat = option.latitude; |
| | | this.form.lgt = option.longitude; |
| | | this.form.location = option.address; |
| | | this.form.workType = option.workType; |
| | | this.getCateList(); |
| | | }, |
| | | methods: { |
| | | // 提交订单 |
| | | submit: function submit() { |
| | | if (!this.form.categoryId) { |
| | | return uni.showToast({ |
| | | title: '请选择分拣品种', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | if (!this.form.priceNum2) { |
| | | return uni.showToast({ |
| | | title: '请输入用工数量', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | if (!this.form.price) { |
| | | return uni.showToast({ |
| | | title: '请输入费用标准', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | if (!this.form.linkPhone) { |
| | | return uni.showToast({ |
| | | title: '请输入联系电话', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | this.$u.api.release(_objectSpread(_objectSpread({}, this.form), {}, { |
| | | price: Number(this.form.price) * 100 |
| | | })).then(function (res) { |
| | | if (res.code == 200) { |
| | | uni.navigateTo({ |
| | | url: "/pages/success/success?orderId=".concat(res.data) |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | // 计算金额 |
| | | getPrice: function getPrice() { |
| | | var _this = this; |
| | | if (this.form.price && this.form.priceNum1 && this.form.priceNum2) { |
| | | this.$u.api.getTotal({ |
| | | price: Number(this.form.price) * 100, |
| | | priceUnit: this.form.priceUnit, |
| | | priceNum1: this.form.priceNum1, |
| | | priceNum2: this.form.priceNum2, |
| | | type: this.form.type, |
| | | workType: this.form.workType |
| | | }).then(function (res) { |
| | | _this.form.estimatedAccount = res.data; |
| | | }); |
| | | } |
| | | }, |
| | | confirmDate: function confirmDate(e) { |
| | | this.form.startDate = e[0]; |
| | | this.form.endDate = e[e.length - 1]; |
| | | this.form.days = e.length; |
| | | this.show = false; |
| | | }, |
| | | selectAddress: function selectAddress() { |
| | | var _this2 = this; |
| | | uni.chooseLocation({ |
| | | success: function success(res) { |
| | | _this2.form.lat = res.latitude; |
| | | _this2.form.lgt = res.longitude; |
| | | _this2.form.address = res.address; |
| | | } |
| | | }); |
| | | }, |
| | | clickType: function clickType(id) { |
| | | this.form.carType = id; |
| | | if (id === 0) { |
| | | this.form.priceUnit = '元/人/天'; |
| | | } else { |
| | | this.form.priceUnit = '元/人/小时'; |
| | | } |
| | | }, |
| | | confirmCategary: function confirmCategary(e) { |
| | | this.form.categoryId = e.value[0].id; |
| | | this.form.categoryName = e.value[0].name; |
| | | this.show1 = false; |
| | | }, |
| | | getCateList: function getCateList() { |
| | | var _this3 = this; |
| | | this.$u.api.getCategoryList({ |
| | | type: 0 |
| | | }).then(function (res) { |
| | | _this3.cateList = [res.data]; |
| | | }); |
| | | }, |
| | | uploadImg: function uploadImg() { |
| | | var _this4 = this; |
| | | uni.chooseImage({ |
| | | success: function success(chooseImageRes) { |
| | | var tempFilePaths = chooseImageRes.tempFilePaths; |
| | | uni.uploadFile({ |
| | | url: _this4.$baseUrl + '/web/public/upload', |
| | | filePath: tempFilePaths[0], |
| | | name: 'file', |
| | | formData: { |
| | | 'folder': 'orders' |
| | | }, |
| | | success: function success(uploadFileRes) { |
| | | var res = JSON.parse(uploadFileRes.data); |
| | | _this4.form.multifileList.push({ |
| | | fileurl: res.data.imgaddr, |
| | | name: res.data.originname, |
| | | url: res.data.url, |
| | | type: 0 |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | exports.default = _default; |
| | | /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"])) |
| | | |
| | | /***/ }), |
| | | |