index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697
  1. <template>
  2. <view>
  3. <z-navbar title="预定详情" back diyBack @goBack="goBack">
  4. <view slot="right" class="iconfont iconjuxing13" @click="gotoPage('returnvisit')" v-if="isWedding!=1">
  5. </view>
  6. </z-navbar>
  7. <template v-if="info&&info.hasWedding=='1'&&info.isWedding=='1'">
  8. <z-tabs shadow :tabs="['预定详情','婚庆预定详情']" v-model="stateTab" bgcolor="white" textselectedcolor="#333333"
  9. @change="changeTab"></z-tabs>
  10. </template>
  11. <template v-if="stateTab==0">
  12. <z-cell label="客户姓名" :content="info.customName"></z-cell>
  13. <z-cell label="客户电话"
  14. :content="info.phone?(isSeeOther==1?info.phone:(info.phone.substring(0,3)+'****'+info.phone.substring(7))):'无'">
  15. </z-cell>
  16. <z-cell label="预定时间" :content="info.orderDate+' '+info.labelText">
  17. </z-cell>
  18. <z-cell label="预定场地" :content="info.houseName"></z-cell>
  19. <z-cell label="收费方式" v-if="info.houseTypeCode!='03'" :contentStyle="{'text-align':'right'}"
  20. :content="((info.mainPayTypeText||'无')+(info.paytypeContent||''))"></z-cell>
  21. <z-cell label="套餐内容" v-if="info.houseTypeCode!='03'"
  22. :content="(info.packageName||'无')+(info.packageContent&&info.packageContent.length?('('+info.packageContent+')'):'')">
  23. </z-cell>
  24. <z-cell label="增加项目"
  25. :content="info.extraRealMoney+'元'+(info.orderExtraContent&&info.orderExtraContent.length?('('+info.orderExtraContent+')'):'')">
  26. </z-cell>
  27. <z-cell label="已收订金" :content="info.downPayment+'元'"></z-cell>
  28. <z-cell label="总计应收" :content="(info.orderMoney||0)+'元'"></z-cell>
  29. <z-cell label="提醒日期" v-if="info.houseTypeCode!='03'&&info.alertDate" :content="info.alertDate||'无'">
  30. </z-cell>
  31. <z-cell label="预定类型" :content="info.orderTypeText" v-if="info.houseTypeCode=='01'"></z-cell>
  32. <z-cell label="预定状态" :content="info.orderStateText"></z-cell>
  33. <z-cell label="顾客来源" :content="info.customFromText"></z-cell>
  34. <z-cell label="接待人员" :content="info.createUserName"></z-cell>
  35. <z-cell label="接待电话" v-if="info.createUserPhone" :content="info.createUserPhone||'无'"></z-cell>
  36. <z-cell label="备注信息" hideline></z-cell>
  37. <view class="plr-30 remark">
  38. {{info.remark||'无'}}
  39. </view>
  40. </template>
  41. <template v-else>
  42. <z-cell label="新郎姓名" :content="wedinfo.maleName"></z-cell>
  43. <z-cell label="新娘姓名" :content="wedinfo.femaleName"></z-cell>
  44. <z-cell label="手机号码" :content="wedinfo.phoneMale||'无'"></z-cell>
  45. <z-cell label="其他手机号码" :content="wedinfo.phoneFemale||'无'"></z-cell>
  46. <z-cell label="典礼开始时间" :content="info.orderDate+' '+(wedinfo.beginTime||'(暂未确定)')"></z-cell>
  47. <z-cell label="婚庆价格" :content="(wedinfo.weddingMoney||0)+'元'"></z-cell>
  48. <z-cell label="套餐内容"
  49. :content="(wedinfo.weddingPackageName||'未选')+ (wedinfo.packageContent?wedinfo.packageContent:'')">
  50. </z-cell>
  51. <z-cell label="增加项目"
  52. :content="(wedinfo.exItemMoney||0)+'元'+(wedinfo.orderExtraContent?wedinfo.orderExtraContent:'')">
  53. </z-cell>
  54. <z-cell label="已收婚庆订金" :content="(wedinfo.downPayment||0)+'元'"></z-cell>
  55. <z-cell label="下单日期" :content="wedinfo.createTime"></z-cell>
  56. <z-cell label="接待电话" :content="wedinfo.createUserPhone||'无'"></z-cell>
  57. <z-cell label="备注信息" hideline></z-cell>
  58. <view class="plr-30 remark">
  59. {{wedinfo.remark||'无'}}
  60. </view>
  61. </template>
  62. <view class="common_handle_style_zw"></view>
  63. <view class="common_handle_style shadow-2 flex-n fac fja" v-if="isEditOther">
  64. <!-- v-if="Date.now()<new Date(scope.row.beginTime).getTime()&&scope.row.confirmState!='01'&&scope.row.confirmState!='02'" -->
  65. <view class="common_handle_style_item " @click="gotoPage('remind')"
  66. v-if="info.alertDate&&Date.now()<new Date(info.orderDate+' '+info.activityBeginTime).getTime()&&info.confirmState!='01'&&info.confirmState!='02'">
  67. <view class="common_handle_style_img iconfont iconjuxing17"></view>
  68. <view class="common_handle_style_text">处理预定提醒</view>
  69. </view>
  70. <template v-if="info.isWedding=='1'">
  71. <view class="common_handle_style_item " @click="gotoPage('editwedding')" v-if="info.hasWedding=='1'">
  72. <view class="common_handle_style_img iconfont iconhunqing"></view>
  73. <view class="common_handle_style_text">编辑婚庆</view>
  74. </view>
  75. <view class="common_handle_style_item " @click="gotoPage('addwedding')" v-if="info.hasWedding=='0'">
  76. <view class="common_handle_style_img iconfont iconhunqing"></view>
  77. <view class="common_handle_style_text">新增婚庆</view>
  78. </view>
  79. </template>
  80. <view class="common_handle_style_item " @click="gotoPage('manage')"
  81. v-if="info.confirmState!='01'&&info.confirmState!='02'">
  82. <view class="common_handle_style_img iconfont iconjuxing21"></view>
  83. <view class="common_handle_style_text">编辑预定</view>
  84. </view>
  85. <view class="common_handle_style_item" @click="showshare=true">
  86. <view class="common_handle_style_img iconfont iconjuxing22kaobei"></view>
  87. <view class="common_handle_style_text">分享预定</view>
  88. </view>
  89. <view class="common_handle_style_item" @click="cancelOrder" v-if="info&&info.auth&&info.auth.isDelete=='1'">
  90. <view class="common_handle_style_img iconfont iconjuxing21kaobei2"></view>
  91. <view class="common_handle_style_text">取消订单</view>
  92. </view>
  93. <view class="common_handle_style_item" @click="cancelWedOrder"
  94. v-if="wedinfo&&wedinfo.auth&&wedinfo.auth.isDelete=='1'">
  95. <view class="common_handle_style_img iconfont iconjuxing21kaobei2"></view>
  96. <view class="common_handle_style_text">取消婚庆</view>
  97. </view>
  98. </view>
  99. <view class="mask" @click="showshare=false" @touchmove.stop.prevent="moveHandle" v-if="showshare"></view>
  100. <view class="z-share-popup flex-n fac fja" v-if="showshare" :class="[{'animate_show':showshare}]">
  101. <view class="z-share-popup_item" @click="gotoShare">
  102. <view class="z-share-popup_imgarea flex-n fac fjc">
  103. <image class="z-share-popup_img" mode="widthFix" src="../../../static/copy.png"></image>
  104. </view>
  105. <view class="z-share-popup_text">
  106. 复制到剪切板
  107. </view>
  108. </view>
  109. <view class="z-share-popup_item" @click="gotoPage('share')">
  110. <view class="z-share-popup_imgarea flex-n fac fjc">
  111. <image class="z-share-popup_img" mode="widthFix" src="../../../static/erweima.png"></image>
  112. </view>
  113. <view class="z-share-popup_text">
  114. 生成二维码
  115. </view>
  116. </view>
  117. </view>
  118. <u-toast ref="uToast"></u-toast>
  119. </view>
  120. </template>
  121. <script>
  122. const app = getApp({
  123. allowDefault: true
  124. });
  125. export default {
  126. data() {
  127. return {
  128. id: '',
  129. info: {},
  130. wedinfo: {},
  131. stateTab: 0,
  132. isWedding: 0,
  133. hasWedding: 0,
  134. showshare: false,
  135. isEditOther: 1,
  136. isSeeOther: 0,
  137. timeTagList: [],
  138. tagList: []
  139. }
  140. },
  141. mounted() {
  142. },
  143. onLoad(option) {
  144. console.log(option)
  145. this.id = option.id;
  146. // this.getData(option.id);
  147. },
  148. onShow() {
  149. this.getTimeRange();
  150. this.getData(this.id);
  151. },
  152. methods: {
  153. goBack() {
  154. // var pages = getCurrentPages();
  155. // var prevPage = pages[pages.length - 2]; //上一个页面
  156. // prevPage.$vm.datevalue = this.info.orderDate;
  157. // prevPage.$vm.backState = false;
  158. // prevPage.$vm.tabInfo(); //重点$vm
  159. // console.warn('1231231')
  160. uni.$emit('saveOrder',this.info.orderDate);
  161. uni.navigateBack({
  162. delta: 1
  163. })
  164. },
  165. getAuthState() {
  166. this.$axios.post("storeAuth/findByRoleIdStoreId", {
  167. "roleId": uni.getStorageSync('roleId'),
  168. "storeId": uni.getStorageSync('storeId')
  169. }).then(res => {
  170. console.warn(res.data)
  171. //不可编辑
  172. if (res.data.auth.isEditOther == '0') {
  173. if (this.info.createUserCode != app.globalData.userId) {
  174. this.isEditOther = 0;
  175. }
  176. }
  177. if (res.data.auth.isSeeOther == '0') {
  178. if (this.info.createUserCode != app.globalData.userId) {
  179. this.isSeeOther = 0;
  180. }
  181. }
  182. }).catch(err => {
  183. this.$refs.uToast.error(err.msg);
  184. })
  185. },
  186. cancelOrder() {
  187. var that = this;
  188. uni.showModal({
  189. content: '是否取消该预定单?',
  190. cancelText: '取消',
  191. confirmText: '确定',
  192. success: function(res) {
  193. if (res.confirm) {
  194. that.$axios.post('app/order/cancelByIds/',
  195. that.id
  196. ).then(res => {
  197. uni.$emit('saveOrder',that.info.orderDate);
  198. that.$refs.uToast.success('订单取消成功!');
  199. uni.navigateBack({
  200. delta: 1
  201. })
  202. }).catch(err => {
  203. console.log(err)
  204. that.$refs.uToast.error(err.msg);
  205. })
  206. }
  207. }
  208. });
  209. },
  210. cancelWedOrder() {
  211. var that = this;
  212. uni.showModal({
  213. content: '是否取消该婚庆订单?',
  214. cancelText: '取消',
  215. confirmText: '确定',
  216. success: function(res) {
  217. if (res.confirm) {
  218. that.$axios.post('app/wedding/cancelWeddingOrderByIds/',
  219. that.info.weddingId
  220. ).then(res => {
  221. uni.$emit('saveOrder',that.info.orderDate);
  222. that.$refs.uToast.success('婚庆订单取消成功!');
  223. uni.navigateBack({
  224. delta: 1
  225. })
  226. }).catch(err => {
  227. that.$refs.uToast.error(err.msg);
  228. })
  229. }
  230. }
  231. });
  232. },
  233. getData(orderId) {
  234. this.$axios.get('app/order/orderDetailById/' + orderId).then(res => {
  235. console.log(res)
  236. this.info = res.data;
  237. this.wedinfo = res.data.orderWedding[0];
  238. let startTime = this.getFormatTimeText(this.info.activityBeginTime);
  239. let endTime = this.getFormatTimeText(this.info.activityEndTime);
  240. let idx = this.timeTagList.indexOf(this.info.activityBeginTime + '~' + this.info.activityEndTime);
  241. let labelText = idx > -1 &&this.tagList[idx].tagName? this.tagList[idx].tagName : (startTime + '~' + endTime);
  242. console.error( this.tagList.tagName,labelText)
  243. // this.info.labelText = labelText;
  244. this.$set(this.info, 'labelText', labelText)
  245. uni.setStorage({
  246. key: 'orderFollowList',
  247. data: res.data.orderFollowList
  248. })
  249. var packageContent = '',
  250. orderExtraContent = '',
  251. paytypeContent = '';
  252. //普通套餐内容
  253. for (var i in this.info.orderPackage.itemsExs) {
  254. packageContent += (this.info.orderPackage.itemsExs[i].isChange == '1' ? (
  255. '<span style="color: #cf9236!important;" >' + (this.info.orderPackage.itemsExs[
  256. i].itemName || '-') +
  257. '</span>') :
  258. (this.info.orderPackage.itemsExs[i].itemName || '-')) + '、';
  259. }
  260. for (var i in this.info.orderPackage.itemsFoods) {
  261. packageContent += (this.info.orderPackage.itemsFoods[i].isChange == '1' ? (
  262. '<span style="color: #cf9236!important;" >' + (this.info.orderPackage
  263. .itemsFoods[i].foodName || '-') +
  264. '</span>') :
  265. (this.info.orderPackage.itemsFoods[i].foodName || '-')) + '、';
  266. }
  267. if (packageContent.substring(packageContent.length - 1, packageContent.length) == '、') {
  268. this.info.packageContent = packageContent.substring(0, packageContent.length - 1)
  269. }
  270. //增加项目内容
  271. for (var i in this.info.orderExtra.itemsExs) {
  272. orderExtraContent += (this.info.orderExtra.itemsExs[i].itemName || '-') + ':' + (this.info
  273. .orderExtra.itemsExs[
  274. i].itemPrice || 0) +
  275. '*' +
  276. this.info.orderExtra.itemsExs[i].itemCount + '、';
  277. }
  278. for (var i in this.info.orderExtra.itemsFoods) {
  279. orderExtraContent += (this.info.orderExtra.itemsFoods[i].foodName || '-') + ':' + (this
  280. .info.orderExtra.itemsFoods[
  281. i].foodPrice || 0) +
  282. '*' + this.info.orderExtra.itemsFoods[i].foodCount + '、';
  283. }
  284. if (orderExtraContent.substring(orderExtraContent.length - 1, orderExtraContent.length) ==
  285. '、') {
  286. this.info.orderExtraContent = orderExtraContent.substring(0, orderExtraContent.length - 1)
  287. }
  288. for (var i in this.info.payTypes) {
  289. console.log(this.info.payTypes[i].payTypeCode)
  290. if (this.info.payTypes[i].payTypeCode == '03') {
  291. paytypeContent += '<br/>' + (this.info.payTypes[i].housePrice || 0) + '元/场'
  292. }
  293. if (this.info.payTypes[i].payTypeCode == '01') {
  294. paytypeContent += '<br/>' + (this.info.payTypes[i].onePrice || 0) + '元*' + (this.info
  295. .payTypes[i].orderCount ||
  296. 0) + '人=' +
  297. ((this.info.payTypes[i].onePrice || 0) * (this.info.payTypes[i].orderCount || 0)) +
  298. '元';
  299. }
  300. if (this.info.payTypes[i].payTypeCode == '02') {
  301. paytypeContent += '<br/>' + (this.info.payTypes[i].onePrice || 0) + '元*' + (this.info
  302. .payTypes[i].orderCount ||
  303. 0) + '桌=' +
  304. ((this.info.payTypes[i].onePrice || 0) * (this.info.payTypes[i].orderCount || 0)) +
  305. '元' + (this.info.payTypes[
  306. i].bakOrderCount ?
  307. ('(备桌' + this.info.payTypes[i].bakOrderCount + '桌)') : '');
  308. }
  309. }
  310. this.info.paytypeContent = paytypeContent;
  311. var wedpackageContent = '',
  312. wedorderExtraContent = '';
  313. if (this.info.hasWedding == '1') {
  314. for (var i in this.wedinfo.weddingItemsExs) {
  315. wedpackageContent += this.wedinfo.weddingItemsExs[i].itemName + '、';
  316. }
  317. if (wedpackageContent.substring(wedpackageContent.length - 1, wedpackageContent.length) ==
  318. '、') {
  319. wedpackageContent = wedpackageContent.substring(0, wedpackageContent.length - 1)
  320. }
  321. for (var i in this.wedinfo.extra) {
  322. wedorderExtraContent += this.wedinfo.extra[i].itemName + ':' + this.wedinfo.extra[i]
  323. .itemPrice + '*' + this.wedinfo
  324. .extra[i].itemCount + '、';
  325. }
  326. if (wedorderExtraContent.substring(wedorderExtraContent.length - 1, wedorderExtraContent
  327. .length) == '、') {
  328. wedorderExtraContent = wedorderExtraContent.substring(0, wedorderExtraContent.length -
  329. 1)
  330. }
  331. this.wedinfo.packageContent = wedpackageContent;
  332. this.wedinfo.orderExtraContent = wedorderExtraContent;
  333. }
  334. this.getAuthState();
  335. }).catch(err => {
  336. console.log(err)
  337. // this.$refs.uToast.error(err.msg);
  338. })
  339. },
  340. changeTab(data) {
  341. this.stateTab = data;
  342. },
  343. getTimeRange() {
  344. this.$axios.get('/config/baseByStoreId/' + uni.getStorageSync('storeId')).then(res => {
  345. console.log('基本店铺设置信息', res.data)
  346. let orderTag = [];
  347. for (let i in res.data.orderTag) {
  348. orderTag.push(res.data.orderTag[i].beginTime + '~' + res.data.orderTag[i].endTime)
  349. }
  350. this.timeTagList = orderTag;
  351. this.tagList = res.data.orderTag;
  352. }).catch(err => {
  353. this.$message.error(err.msg);
  354. })
  355. },
  356. gotoShare() {
  357. var info = this.info;
  358. var content = '';
  359. var packageContent = '',
  360. orderExtraContent = '',
  361. payContent = '';
  362. //套餐文字
  363. for (var i in info.orderPackage.itemsExs) {
  364. packageContent += info.orderPackage.itemsExs[i].itemName + '、';
  365. }
  366. for (var i in info.orderPackage.itemsFoods) {
  367. packageContent += info.orderPackage.itemsFoods[i].foodName + '、';
  368. }
  369. if (packageContent.substring(packageContent.length - 1, packageContent.length) == '、') {
  370. info.packageContent = packageContent.substring(0, packageContent.length - 1)
  371. }
  372. //额外项目文字
  373. for (var i in info.orderExtra.itemsExs) {
  374. orderExtraContent += (info.orderExtra.itemsExs[i].itemName || '-') + ':' + (info.orderExtra.itemsExs[i]
  375. .itemPrice ||
  376. 0) + '*' +
  377. info.orderExtra.itemsExs[i].itemCount + '、';
  378. }
  379. for (var i in info.orderExtra.itemsFoods) {
  380. orderExtraContent += (info.orderExtra.itemsFoods[i].foodName || '-') + ':' + (info.orderExtra
  381. .itemsFoods[i].foodPrice ||
  382. 0) + '*' +
  383. info.orderExtra.itemsFoods[i].foodCount + '、';
  384. }
  385. if (orderExtraContent.substring(orderExtraContent.length - 1, orderExtraContent.length) == '、') {
  386. info.orderExtraContent = orderExtraContent.substring(0, orderExtraContent.length - 1)
  387. }
  388. var payTypes = info.payTypes;
  389. payTypes.sort((a, b) => {
  390. return Number(b.payTypeCode) - Number(a.payTypeCode);
  391. })
  392. for (var i in payTypes) {
  393. if (payTypes[i].payTypeCode == '03') {
  394. payContent += '包场费用:' + (payTypes[i].housePrice || 0) + '\n';
  395. }
  396. if (payTypes[i].payTypeCode == '02') {
  397. payContent += '预定桌数:' + (payTypes[i].orderCount || 0) + '\n';
  398. payContent += '每桌单价:' + (payTypes[i].onePrice || 0) + '\n';
  399. }
  400. if (payTypes[i].payTypeCode == '01') {
  401. payContent += '预定人数:' + (payTypes[i].orderCount || 0) + '\n';
  402. payContent += '每人单价:' + (payTypes[i].onePrice || 0) + '\n';
  403. }
  404. }
  405. var storeList = uni.getStorageSync('storeInfo').store;
  406. console.log(storeList)
  407. var storeName = '';
  408. for (var i in storeList) {
  409. if (storeList[i].storeId == uni.getStorageSync('storeId')) {
  410. storeName = storeList[i].storeName;
  411. break;
  412. }
  413. }
  414. // let activityBeginTime = this.getFormatTimeText(info.activityBeginTime);
  415. // let activityEndTime = this.getFormatTimeText(info.activityEndTime);
  416. // let idx = this.timeTagList.indexOf(info.activityBeginTime + '~' + info.activityEndTime);
  417. // let labelText = idx > -1 ? this.tagList[idx].tagName : (activityBeginTime + '~' + activityEndTime);
  418. let activityBeginTime = this.getFormatTimeText(info.activityBeginTime);
  419. let activityEndTime = this.getFormatTimeText(info.activityEndTime);
  420. let idx = this.timeTagList.indexOf(info.activityBeginTime + '~' + info.activityEndTime);
  421. let labelText = activityBeginTime + '~' + activityEndTime; //2022-05-04宋哥要求显示时间段 不用改成标签
  422. //复制未处理
  423. content = storeName + '预定单' + '\n' +
  424. '客户名称:' + info.customName + '\n' +
  425. '客户电话:' + (info.phone || '无') + '\n' +
  426. '订单日期:' + info.orderDate + '\n' +
  427. // '预定时段:' + info.labelText + '\n' +
  428. '预定时段:' + labelText + '\n' +//2022-05-04宋哥要求显示时间段 不用改成标签
  429. '预定场地:' + info.houseName + '\n' +
  430. (info.packageName ? ('套餐名称:' + info.packageName + '\n' +
  431. (info.packageContent ? (' (' + info.packageContent + ')\n') : '')) : '') +
  432. payContent +
  433. (orderExtraContent.length > 0 ? ('增加项目:' + info.extraRealMoney + '\n') : '') +
  434. (info.orderExtraContent ? ' (' + info.orderExtraContent + ')\n' : '') +
  435. '已交订金:' + (info.downPayment || 0) + '\n' +
  436. // '下单日期:' + info.createTime + '\n' +
  437. '下单日期:' + info.createTime.substring(5, 16) + '\n' + //2022-05-04宋哥要求改成月日时分格式
  438. '接待人员:' + (info.createUserName || '无') + '\n' +
  439. (info.createUserPhone ? ('接待电话:' + info.createUserPhone + '\n') : '') +
  440. '订单备注:' + (info.remark ? info.remark : '无') + '\n';
  441. var wedcontent = '';
  442. if (this.info.hasWedding == '1') {
  443. var wedpackageContent = '',
  444. wedorderExtraContent = '';
  445. var weddingData = this.wedinfo;
  446. for (var i in weddingData.weddingItemsExs) {
  447. wedpackageContent += weddingData.weddingItemsExs[i].itemName + '、';
  448. }
  449. if (wedpackageContent.substring(wedpackageContent.length - 1, wedpackageContent.length) == '、') {
  450. weddingData.packageContent = wedpackageContent.substring(0, wedpackageContent.length - 1)
  451. }
  452. for (var i in weddingData.extra) {
  453. wedorderExtraContent += weddingData.extra[i].itemName + ':' + weddingData.extra[i].itemPrice +
  454. '*' + weddingData.extra[
  455. i].itemCount + '、';
  456. }
  457. if (wedorderExtraContent.substring(wedorderExtraContent.length - 1, wedorderExtraContent.length) ==
  458. '、') {
  459. weddingData.orderExtraContent = wedorderExtraContent.substring(0, wedorderExtraContent.length - 1)
  460. }
  461. wedcontent = '-----------------------\n' +
  462. '新郎姓名:' + weddingData.maleName + '\n' +
  463. '新娘姓名:' + weddingData.femaleName + '\n' +
  464. '手机号码:' + (weddingData.phoneMale || '无') + '\n' +
  465. '其他手机:' + (weddingData.phoneFemale || '无') + '\n' +
  466. '典礼时间:' + weddingData.weddingBeginTime + '\n' +
  467. '套餐名称:' + (weddingData.weddingPackageName || '未选') + '\n' +
  468. (weddingData.packageContent ? (' (' + weddingData.packageContent + ')\n') : '') +
  469. '增加项目:' + (weddingData.exItemMoney || 0) + '\n' +
  470. (weddingData.orderExtraContent ? (' (' + weddingData.orderExtraContent + ')\n') : '') +
  471. '婚庆共计:' + (weddingData.orderMoney || 0) + '\n' +
  472. '婚庆订金:' + (weddingData.downPayment || 0) + '\n' +
  473. '接待人员:' + weddingData.createUserName + '\n' +
  474. '接待电话:' + (weddingData.createUserPhone || '无') + '\n' +
  475. '下单日期:' + weddingData.createTime + '\n' +
  476. '订单备注:' + (weddingData.remark || '无') + '\n';
  477. }
  478. console.log(content + wedcontent)
  479. uni.setClipboardData({
  480. data: content + wedcontent,
  481. success: function() {
  482. console.log('success');
  483. }
  484. });
  485. // uni.share({
  486. // provider: 'weixin',
  487. // scene: "WXSceneSession",
  488. // type: 5,
  489. // imageUrl: 'https://img-cdn-qiniu.dcloud.net.cn/uniapp/app/share-logo@3.png',
  490. // title: '欢迎体验uniapp',
  491. // miniProgram: {
  492. // id: 'gh_abcdefg',
  493. // path: 'pages/index/index',
  494. // type: 0,
  495. // webUrl: 'http://uniapp.dcloud.io'
  496. // },
  497. // success: ret => {
  498. // console.log(JSON.stringify(ret));
  499. // }
  500. // });
  501. },
  502. getFormatTimeText(time) {
  503. let ytime = Number(time.replace(':', ''));
  504. var c1 = Number(ytime / 100).toFixed(0)
  505. c1 = c1 < 10 ? ('0' + c1) : (c1 > 23 ? ('次日' + ((c1 - 24) > 9 ? (c1 - 24) : ('0' + (c1 - 24)))) : c1);
  506. c1 = c1 + ':' + (ytime % 100 ? '30' : '00')
  507. return c1;
  508. },
  509. gotoPage(page) {
  510. console.log(page)
  511. if (page == "addwedding") {
  512. uni.navigateTo({
  513. url: '../wedding/index?type=0&orderId=' + this.id + '&beginTime=' + this.info
  514. .activityBeginTime + '&endTime=' + this.info.activityEndTime
  515. })
  516. }
  517. if (page == "editwedding") {
  518. uni.navigateTo({
  519. url: '../wedding/index?type=1&orderId=' + this.id + '&wedId=' + this.info.weddingId +
  520. '&beginTime=' + this.info.activityBeginTime + '&endTime=' + this.info.activityEndTime
  521. })
  522. }
  523. if (page == 'returnvisit') {
  524. uni.navigateTo({
  525. url: '../history/index'
  526. })
  527. }
  528. if (page == 'remind') {
  529. uni.navigateTo({
  530. url: '../remind/index?id=' + this.id + '&customName=' + this.info.customName +
  531. '&orderDate=' + this.info.orderDate
  532. })
  533. }
  534. if (page == "share") {
  535. // this.showshare = false;
  536. uni.setStorage({
  537. key: 'shareInfo',
  538. data: this.info
  539. })
  540. uni.navigateTo({
  541. url: '../share/index',
  542. success: res => {
  543. this.showshare = false;
  544. },
  545. fail: () => {},
  546. complete: () => {}
  547. });
  548. }
  549. if (page == 'manage')
  550. uni.navigateTo({
  551. url: '../manage/index?type=1&id=' + this.id
  552. })
  553. }
  554. },
  555. }
  556. </script>
  557. <style lang="scss" scoped>
  558. .mask {
  559. position: fixed;
  560. top: 0;
  561. left: 0;
  562. background: rgba(0, 0, 0, 0.3);
  563. width: 100%;
  564. height: 100%;
  565. z-index: 510;
  566. }
  567. .remark {
  568. font-size: 28rpx;
  569. color: #555555;
  570. }
  571. .common_handle_style_zw {
  572. height: 139rpx;
  573. }
  574. .iconjuxing13 {
  575. font-size: 38rpx;
  576. }
  577. .common_handle_style {
  578. position: fixed;
  579. background: white;
  580. bottom: 0;
  581. left: 0;
  582. width: 100%;
  583. height: 119rpx;
  584. .common_handle_style_item {
  585. text-align: center;
  586. // width: 200rpx;
  587. .common_handle_style_img {
  588. width: 53rpx;
  589. height: 50rpx;
  590. font-size: 50rpx;
  591. color: #007AFF;
  592. margin: 0 auto;
  593. }
  594. .common_handle_style_text {
  595. color: #007AFF;
  596. font-size: 24rpx;
  597. line-height: 24rpx;
  598. margin-top: 10rpx;
  599. }
  600. }
  601. }
  602. .z-share-popup {
  603. position: fixed;
  604. width: 690rpx;
  605. left: 30rpx;
  606. z-index: 600;
  607. height: 210rpx;
  608. border-radius: 20rpx;
  609. background: white;
  610. .z-share-popup_item {
  611. text-align: center;
  612. .z-share-popup_imgarea {
  613. height: 80rpx;
  614. text-align: center;
  615. .z-share-popup_img {
  616. width: 80rpx;
  617. }
  618. }
  619. .z-share-popup_text {
  620. font-size: 24rpx;
  621. color: #333333;
  622. margin-top: 10rpx;
  623. }
  624. }
  625. }
  626. @keyframes show {
  627. 0% {
  628. bottom: -100%;
  629. }
  630. 100% {
  631. bottom: 30rpx;
  632. }
  633. }
  634. @keyframes hide {
  635. 0% {
  636. bottom: 30rpx;
  637. }
  638. 100% {
  639. bottom: -100%;
  640. }
  641. }
  642. .animate_show {
  643. animation: show .5s;
  644. animation-fill-mode: forwards;
  645. }
  646. .animate_hide {
  647. animation: hide .5s;
  648. animation-fill-mode: forwards;
  649. }
  650. </style>