index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695
  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. that.$refs.uToast.success('订单取消成功!');
  198. uni.navigateBack({
  199. delta: 1
  200. })
  201. }).catch(err => {
  202. console.log(err)
  203. that.$refs.uToast.error(err.msg);
  204. })
  205. }
  206. }
  207. });
  208. },
  209. cancelWedOrder() {
  210. var that = this;
  211. uni.showModal({
  212. content: '是否取消该婚庆订单?',
  213. cancelText: '取消',
  214. confirmText: '确定',
  215. success: function(res) {
  216. if (res.confirm) {
  217. that.$axios.post('app/wedding/cancelWeddingOrderByIds/',
  218. that.info.weddingId
  219. ).then(res => {
  220. that.$refs.uToast.success('婚庆订单取消成功!');
  221. uni.navigateBack({
  222. delta: 1
  223. })
  224. }).catch(err => {
  225. that.$refs.uToast.error(err.msg);
  226. })
  227. }
  228. }
  229. });
  230. },
  231. getData(orderId) {
  232. this.$axios.get('app/order/orderDetailById/' + orderId).then(res => {
  233. console.log(res)
  234. this.info = res.data;
  235. this.wedinfo = res.data.orderWedding[0];
  236. let startTime = this.getFormatTimeText(this.info.activityBeginTime);
  237. let endTime = this.getFormatTimeText(this.info.activityEndTime);
  238. let idx = this.timeTagList.indexOf(this.info.activityBeginTime + '~' + this.info.activityEndTime);
  239. let labelText = idx > -1 &&this.tagList[idx].tagName? this.tagList[idx].tagName : (startTime + '~' + endTime);
  240. console.error( this.tagList.tagName,labelText)
  241. // this.info.labelText = labelText;
  242. this.$set(this.info, 'labelText', labelText)
  243. uni.setStorage({
  244. key: 'orderFollowList',
  245. data: res.data.orderFollowList
  246. })
  247. var packageContent = '',
  248. orderExtraContent = '',
  249. paytypeContent = '';
  250. //普通套餐内容
  251. for (var i in this.info.orderPackage.itemsExs) {
  252. packageContent += (this.info.orderPackage.itemsExs[i].isChange == '1' ? (
  253. '<span style="color: #cf9236!important;" >' + (this.info.orderPackage.itemsExs[
  254. i].itemName || '-') +
  255. '</span>') :
  256. (this.info.orderPackage.itemsExs[i].itemName || '-')) + '、';
  257. }
  258. for (var i in this.info.orderPackage.itemsFoods) {
  259. packageContent += (this.info.orderPackage.itemsFoods[i].isChange == '1' ? (
  260. '<span style="color: #cf9236!important;" >' + (this.info.orderPackage
  261. .itemsFoods[i].foodName || '-') +
  262. '</span>') :
  263. (this.info.orderPackage.itemsFoods[i].foodName || '-')) + '、';
  264. }
  265. if (packageContent.substring(packageContent.length - 1, packageContent.length) == '、') {
  266. this.info.packageContent = packageContent.substring(0, packageContent.length - 1)
  267. }
  268. //增加项目内容
  269. for (var i in this.info.orderExtra.itemsExs) {
  270. orderExtraContent += (this.info.orderExtra.itemsExs[i].itemName || '-') + ':' + (this.info
  271. .orderExtra.itemsExs[
  272. i].itemPrice || 0) +
  273. '*' +
  274. this.info.orderExtra.itemsExs[i].itemCount + '、';
  275. }
  276. for (var i in this.info.orderExtra.itemsFoods) {
  277. orderExtraContent += (this.info.orderExtra.itemsFoods[i].foodName || '-') + ':' + (this
  278. .info.orderExtra.itemsFoods[
  279. i].foodPrice || 0) +
  280. '*' + this.info.orderExtra.itemsFoods[i].foodCount + '、';
  281. }
  282. if (orderExtraContent.substring(orderExtraContent.length - 1, orderExtraContent.length) ==
  283. '、') {
  284. this.info.orderExtraContent = orderExtraContent.substring(0, orderExtraContent.length - 1)
  285. }
  286. for (var i in this.info.payTypes) {
  287. console.log(this.info.payTypes[i].payTypeCode)
  288. if (this.info.payTypes[i].payTypeCode == '03') {
  289. paytypeContent += '<br/>' + (this.info.payTypes[i].housePrice || 0) + '元/场'
  290. }
  291. if (this.info.payTypes[i].payTypeCode == '01') {
  292. paytypeContent += '<br/>' + (this.info.payTypes[i].onePrice || 0) + '元*' + (this.info
  293. .payTypes[i].orderCount ||
  294. 0) + '人=' +
  295. ((this.info.payTypes[i].onePrice || 0) * (this.info.payTypes[i].orderCount || 0)) +
  296. '元';
  297. }
  298. if (this.info.payTypes[i].payTypeCode == '02') {
  299. paytypeContent += '<br/>' + (this.info.payTypes[i].onePrice || 0) + '元*' + (this.info
  300. .payTypes[i].orderCount ||
  301. 0) + '桌=' +
  302. ((this.info.payTypes[i].onePrice || 0) * (this.info.payTypes[i].orderCount || 0)) +
  303. '元' + (this.info.payTypes[
  304. i].bakOrderCount ?
  305. ('(备桌' + this.info.payTypes[i].bakOrderCount + '桌)') : '');
  306. }
  307. }
  308. this.info.paytypeContent = paytypeContent;
  309. var wedpackageContent = '',
  310. wedorderExtraContent = '';
  311. if (this.info.hasWedding == '1') {
  312. for (var i in this.wedinfo.weddingItemsExs) {
  313. wedpackageContent += this.wedinfo.weddingItemsExs[i].itemName + '、';
  314. }
  315. if (wedpackageContent.substring(wedpackageContent.length - 1, wedpackageContent.length) ==
  316. '、') {
  317. wedpackageContent = wedpackageContent.substring(0, wedpackageContent.length - 1)
  318. }
  319. for (var i in this.wedinfo.extra) {
  320. wedorderExtraContent += this.wedinfo.extra[i].itemName + ':' + this.wedinfo.extra[i]
  321. .itemPrice + '*' + this.wedinfo
  322. .extra[i].itemCount + '、';
  323. }
  324. if (wedorderExtraContent.substring(wedorderExtraContent.length - 1, wedorderExtraContent
  325. .length) == '、') {
  326. wedorderExtraContent = wedorderExtraContent.substring(0, wedorderExtraContent.length -
  327. 1)
  328. }
  329. this.wedinfo.packageContent = wedpackageContent;
  330. this.wedinfo.orderExtraContent = wedorderExtraContent;
  331. }
  332. this.getAuthState();
  333. }).catch(err => {
  334. console.log(err)
  335. // this.$refs.uToast.error(err.msg);
  336. })
  337. },
  338. changeTab(data) {
  339. this.stateTab = data;
  340. },
  341. getTimeRange() {
  342. this.$axios.get('/config/baseByStoreId/' + uni.getStorageSync('storeId')).then(res => {
  343. console.log('基本店铺设置信息', res.data)
  344. let orderTag = [];
  345. for (let i in res.data.orderTag) {
  346. orderTag.push(res.data.orderTag[i].beginTime + '~' + res.data.orderTag[i].endTime)
  347. }
  348. this.timeTagList = orderTag;
  349. this.tagList = res.data.orderTag;
  350. }).catch(err => {
  351. this.$message.error(err.msg);
  352. })
  353. },
  354. gotoShare() {
  355. var info = this.info;
  356. var content = '';
  357. var packageContent = '',
  358. orderExtraContent = '',
  359. payContent = '';
  360. //套餐文字
  361. for (var i in info.orderPackage.itemsExs) {
  362. packageContent += info.orderPackage.itemsExs[i].itemName + '、';
  363. }
  364. for (var i in info.orderPackage.itemsFoods) {
  365. packageContent += info.orderPackage.itemsFoods[i].foodName + '、';
  366. }
  367. if (packageContent.substring(packageContent.length - 1, packageContent.length) == '、') {
  368. info.packageContent = packageContent.substring(0, packageContent.length - 1)
  369. }
  370. //额外项目文字
  371. for (var i in info.orderExtra.itemsExs) {
  372. orderExtraContent += (info.orderExtra.itemsExs[i].itemName || '-') + ':' + (info.orderExtra.itemsExs[i]
  373. .itemPrice ||
  374. 0) + '*' +
  375. info.orderExtra.itemsExs[i].itemCount + '、';
  376. }
  377. for (var i in info.orderExtra.itemsFoods) {
  378. orderExtraContent += (info.orderExtra.itemsFoods[i].foodName || '-') + ':' + (info.orderExtra
  379. .itemsFoods[i].foodPrice ||
  380. 0) + '*' +
  381. info.orderExtra.itemsFoods[i].foodCount + '、';
  382. }
  383. if (orderExtraContent.substring(orderExtraContent.length - 1, orderExtraContent.length) == '、') {
  384. info.orderExtraContent = orderExtraContent.substring(0, orderExtraContent.length - 1)
  385. }
  386. var payTypes = info.payTypes;
  387. payTypes.sort((a, b) => {
  388. return Number(b.payTypeCode) - Number(a.payTypeCode);
  389. })
  390. for (var i in payTypes) {
  391. if (payTypes[i].payTypeCode == '03') {
  392. payContent += '包场费用:' + (payTypes[i].housePrice || 0) + '\n';
  393. }
  394. if (payTypes[i].payTypeCode == '02') {
  395. payContent += '预定桌数:' + (payTypes[i].orderCount || 0) + '\n';
  396. payContent += '每桌单价:' + (payTypes[i].onePrice || 0) + '\n';
  397. }
  398. if (payTypes[i].payTypeCode == '01') {
  399. payContent += '预定人数:' + (payTypes[i].orderCount || 0) + '\n';
  400. payContent += '每人单价:' + (payTypes[i].onePrice || 0) + '\n';
  401. }
  402. }
  403. var storeList = uni.getStorageSync('storeInfo').store;
  404. console.log(storeList)
  405. var storeName = '';
  406. for (var i in storeList) {
  407. if (storeList[i].storeId == uni.getStorageSync('storeId')) {
  408. storeName = storeList[i].storeName;
  409. break;
  410. }
  411. }
  412. // let activityBeginTime = this.getFormatTimeText(info.activityBeginTime);
  413. // let activityEndTime = this.getFormatTimeText(info.activityEndTime);
  414. // let idx = this.timeTagList.indexOf(info.activityBeginTime + '~' + info.activityEndTime);
  415. // let labelText = idx > -1 ? this.tagList[idx].tagName : (activityBeginTime + '~' + activityEndTime);
  416. let activityBeginTime = this.getFormatTimeText(info.activityBeginTime);
  417. let activityEndTime = this.getFormatTimeText(info.activityEndTime);
  418. let idx = this.timeTagList.indexOf(info.activityBeginTime + '~' + info.activityEndTime);
  419. let labelText = activityBeginTime + '~' + activityEndTime; //2022-05-04宋哥要求显示时间段 不用改成标签
  420. //复制未处理
  421. content = storeName + '预定单' + '\n' +
  422. '客户名称:' + info.customName + '\n' +
  423. '客户电话:' + (info.phone || '无') + '\n' +
  424. '订单日期:' + info.orderDate + '\n' +
  425. // '预定时段:' + info.labelText + '\n' +
  426. '预定时段:' + labelText + '\n' +//2022-05-04宋哥要求显示时间段 不用改成标签
  427. '预定场地:' + info.houseName + '\n' +
  428. (info.packageName ? ('套餐名称:' + info.packageName + '\n' +
  429. (info.packageContent ? (' (' + info.packageContent + ')\n') : '')) : '') +
  430. payContent +
  431. (orderExtraContent.length > 0 ? ('增加项目:' + info.extraRealMoney + '\n') : '') +
  432. (info.orderExtraContent ? ' (' + info.orderExtraContent + ')\n' : '') +
  433. '已交订金:' + (info.downPayment || 0) + '\n' +
  434. // '下单日期:' + info.createTime + '\n' +
  435. '下单日期:' + info.createTime.substring(5, 16) + '\n' + //2022-05-04宋哥要求改成月日时分格式
  436. '接待人员:' + (info.createUserName || '无') + '\n' +
  437. (info.createUserPhone ? ('接待电话:' + info.createUserPhone + '\n') : '') +
  438. '订单备注:' + (info.remark ? info.remark : '无') + '\n';
  439. var wedcontent = '';
  440. if (this.info.hasWedding == '1') {
  441. var wedpackageContent = '',
  442. wedorderExtraContent = '';
  443. var weddingData = this.wedinfo;
  444. for (var i in weddingData.weddingItemsExs) {
  445. wedpackageContent += weddingData.weddingItemsExs[i].itemName + '、';
  446. }
  447. if (wedpackageContent.substring(wedpackageContent.length - 1, wedpackageContent.length) == '、') {
  448. weddingData.packageContent = wedpackageContent.substring(0, wedpackageContent.length - 1)
  449. }
  450. for (var i in weddingData.extra) {
  451. wedorderExtraContent += weddingData.extra[i].itemName + ':' + weddingData.extra[i].itemPrice +
  452. '*' + weddingData.extra[
  453. i].itemCount + '、';
  454. }
  455. if (wedorderExtraContent.substring(wedorderExtraContent.length - 1, wedorderExtraContent.length) ==
  456. '、') {
  457. weddingData.orderExtraContent = wedorderExtraContent.substring(0, wedorderExtraContent.length - 1)
  458. }
  459. wedcontent = '-----------------------\n' +
  460. '新郎姓名:' + weddingData.maleName + '\n' +
  461. '新娘姓名:' + weddingData.femaleName + '\n' +
  462. '手机号码:' + (weddingData.phoneMale || '无') + '\n' +
  463. '其他手机:' + (weddingData.phoneFemale || '无') + '\n' +
  464. '典礼时间:' + weddingData.weddingBeginTime + '\n' +
  465. '套餐名称:' + (weddingData.weddingPackageName || '未选') + '\n' +
  466. (weddingData.packageContent ? (' (' + weddingData.packageContent + ')\n') : '') +
  467. '增加项目:' + (weddingData.exItemMoney || 0) + '\n' +
  468. (weddingData.orderExtraContent ? (' (' + weddingData.orderExtraContent + ')\n') : '') +
  469. '婚庆共计:' + (weddingData.orderMoney || 0) + '\n' +
  470. '婚庆订金:' + (weddingData.downPayment || 0) + '\n' +
  471. '接待人员:' + weddingData.createUserName + '\n' +
  472. '接待电话:' + (weddingData.createUserPhone || '无') + '\n' +
  473. '下单日期:' + weddingData.createTime + '\n' +
  474. '订单备注:' + (weddingData.remark || '无') + '\n';
  475. }
  476. console.log(content + wedcontent)
  477. uni.setClipboardData({
  478. data: content + wedcontent,
  479. success: function() {
  480. console.log('success');
  481. }
  482. });
  483. // uni.share({
  484. // provider: 'weixin',
  485. // scene: "WXSceneSession",
  486. // type: 5,
  487. // imageUrl: 'https://img-cdn-qiniu.dcloud.net.cn/uniapp/app/share-logo@3.png',
  488. // title: '欢迎体验uniapp',
  489. // miniProgram: {
  490. // id: 'gh_abcdefg',
  491. // path: 'pages/index/index',
  492. // type: 0,
  493. // webUrl: 'http://uniapp.dcloud.io'
  494. // },
  495. // success: ret => {
  496. // console.log(JSON.stringify(ret));
  497. // }
  498. // });
  499. },
  500. getFormatTimeText(time) {
  501. let ytime = Number(time.replace(':', ''));
  502. var c1 = Number(ytime / 100).toFixed(0)
  503. c1 = c1 < 10 ? ('0' + c1) : (c1 > 23 ? ('次日' + ((c1 - 24) > 9 ? (c1 - 24) : ('0' + (c1 - 24)))) : c1);
  504. c1 = c1 + ':' + (ytime % 100 ? '30' : '00')
  505. return c1;
  506. },
  507. gotoPage(page) {
  508. console.log(page)
  509. if (page == "addwedding") {
  510. uni.navigateTo({
  511. url: '../wedding/index?type=0&orderId=' + this.id + '&beginTime=' + this.info
  512. .activityBeginTime + '&endTime=' + this.info.activityEndTime
  513. })
  514. }
  515. if (page == "editwedding") {
  516. uni.navigateTo({
  517. url: '../wedding/index?type=1&orderId=' + this.id + '&wedId=' + this.info.weddingId +
  518. '&beginTime=' + this.info.activityBeginTime + '&endTime=' + this.info.activityEndTime
  519. })
  520. }
  521. if (page == 'returnvisit') {
  522. uni.navigateTo({
  523. url: '../history/index'
  524. })
  525. }
  526. if (page == 'remind') {
  527. uni.navigateTo({
  528. url: '../remind/index?id=' + this.id + '&customName=' + this.info.customName +
  529. '&orderDate=' + this.info.orderDate
  530. })
  531. }
  532. if (page == "share") {
  533. // this.showshare = false;
  534. uni.setStorage({
  535. key: 'shareInfo',
  536. data: this.info
  537. })
  538. uni.navigateTo({
  539. url: '../share/index',
  540. success: res => {
  541. this.showshare = false;
  542. },
  543. fail: () => {},
  544. complete: () => {}
  545. });
  546. }
  547. if (page == 'manage')
  548. uni.navigateTo({
  549. url: '../manage/index?type=1&id=' + this.id
  550. })
  551. }
  552. },
  553. }
  554. </script>
  555. <style lang="scss" scoped>
  556. .mask {
  557. position: fixed;
  558. top: 0;
  559. left: 0;
  560. background: rgba(0, 0, 0, 0.3);
  561. width: 100%;
  562. height: 100%;
  563. z-index: 510;
  564. }
  565. .remark {
  566. font-size: 28rpx;
  567. color: #555555;
  568. }
  569. .common_handle_style_zw {
  570. height: 139rpx;
  571. }
  572. .iconjuxing13 {
  573. font-size: 38rpx;
  574. }
  575. .common_handle_style {
  576. position: fixed;
  577. background: white;
  578. bottom: 0;
  579. left: 0;
  580. width: 100%;
  581. height: 119rpx;
  582. .common_handle_style_item {
  583. text-align: center;
  584. // width: 200rpx;
  585. .common_handle_style_img {
  586. width: 53rpx;
  587. height: 50rpx;
  588. font-size: 50rpx;
  589. color: #007AFF;
  590. margin: 0 auto;
  591. }
  592. .common_handle_style_text {
  593. color: #007AFF;
  594. font-size: 24rpx;
  595. line-height: 24rpx;
  596. margin-top: 10rpx;
  597. }
  598. }
  599. }
  600. .z-share-popup {
  601. position: fixed;
  602. width: 690rpx;
  603. left: 30rpx;
  604. z-index: 600;
  605. height: 210rpx;
  606. border-radius: 20rpx;
  607. background: white;
  608. .z-share-popup_item {
  609. text-align: center;
  610. .z-share-popup_imgarea {
  611. height: 80rpx;
  612. text-align: center;
  613. .z-share-popup_img {
  614. width: 80rpx;
  615. }
  616. }
  617. .z-share-popup_text {
  618. font-size: 24rpx;
  619. color: #333333;
  620. margin-top: 10rpx;
  621. }
  622. }
  623. }
  624. @keyframes show {
  625. 0% {
  626. bottom: -100%;
  627. }
  628. 100% {
  629. bottom: 30rpx;
  630. }
  631. }
  632. @keyframes hide {
  633. 0% {
  634. bottom: 30rpx;
  635. }
  636. 100% {
  637. bottom: -100%;
  638. }
  639. }
  640. .animate_show {
  641. animation: show .5s;
  642. animation-fill-mode: forwards;
  643. }
  644. .animate_hide {
  645. animation: hide .5s;
  646. animation-fill-mode: forwards;
  647. }
  648. </style>