eadit.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958
  1. <template>
  2. <view class="content">
  3. <view class="kk"></view>
  4. <view class="box" style="padding-bottom: 0;">
  5. <view class="title">基础信息</view>
  6. <view class="line">
  7. <view class="lineLeft">
  8. <span class="linexx">*</span> <span>活动名称</span>
  9. </view>
  10. <view class="lineRight">
  11. <input type="text" v-model="activityName" placeholder="请输入" class="lineRightInput" placeholder-class="inputPlace">
  12. </view>
  13. </view>
  14. <view class="line">
  15. <view class="lineLeft">
  16. <span class="linexx">*</span> <span>报名时间</span>
  17. </view>
  18. <view class="lineRight timelineRight">
  19. <picker mode="date" :value="startTime" @change="bindTimeChangeStart">
  20. <view class="dateViewno" v-if="!startTime">开始时间</view>
  21. <view class="dateView" v-else>{{startTime}}</view>
  22. </picker>
  23. <view class="timeHx">-</view>
  24. <picker mode="date" :value="endTime" @change="bindTimeChangeendTime" :start='startTime'>
  25. <view class="dateViewno" v-if="!endTime">结束时间</view>
  26. <view class="dateView" v-else>{{endTime}}</view>
  27. </picker>
  28. </view>
  29. </view>
  30. <view class="line" style="border: none;">
  31. <view class="lineLeft">
  32. <span class="linexx">*</span> <span>活动门店</span>
  33. </view>
  34. <view class="lineRight shopckBox">
  35. <view class="shopListNo" v-if="!shopNames">请选择活动门店,可多选</view>
  36. <view class="shopListY" v-if="shopNames">{{shopNames}}</view>
  37. <view class="addshop" @click="addShop">添加</view>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="kk"></view>
  42. <view class="box" style="padding-bottom: 0;">
  43. <view class="title">报名信息</view>
  44. <view class="line">
  45. <view class="lineLeft">
  46. <span class="linexx">*</span> <span>报名凭证</span>
  47. </view>
  48. <view class="lineRight clWhereBox">
  49. <view class="clWhereLine" :class="{clWhereActive:clWhereString.indexOf(1)!=-1}">手机号</view>
  50. <view class="clWhereLine" :class="{clWhereActive:clWhereString.indexOf(2)!=-1}" @click="clWhere(2)">车牌号</view>
  51. <view class="clWhereLine" :class="{clWhereActive:clWhereString.indexOf(3)!=-1}" @click="clWhere(3)">姓名</view>
  52. <view class="clWhereLine" :class="{clWhereActive:clWhereString.indexOf(4)!=-1}" @click="clWhere(4)">单位</view>
  53. </view>
  54. </view>
  55. <view class="line">
  56. <view class="lineLeft">
  57. <span class="linexx">*</span> <span>最多报名人数</span>
  58. </view>
  59. <view class="lineRight">
  60. <input :disabled="isExistGroup" type="number" v-model="number" placeholder="请输入" class="lineRightInput" placeholder-class="inputPlace">
  61. </view>
  62. </view>
  63. <view class="line" ><!-- style="border: none;" -->
  64. <view class="lineLeft">
  65. <span class="linexx">*</span> <span>支付方式</span>
  66. </view>
  67. <view class="lineRight payBox">
  68. <view class="payType" @click="payTypeCL(1)">
  69. <img src="../../static/img/ckn.png" alt="" class="payTypeImg" v-if="payType!=1">
  70. <img src="../../static/img/cky.png" alt="" class="payTypeImg" v-if="payType==1">
  71. <view class="payTypeTxt">在线支付</view>
  72. </view>
  73. <view class="payType" @click="nopayCl" style="padding-left: 30rpx;">
  74. <img src="../../static/img/cky.png" alt="" class="payTypeImg" v-if="payType==2">
  75. <img src="../../static/img/ckn.png" alt="" class="payTypeImg" v-if="payType!=2">
  76. <view class="payTypeTxt">无需支付</view>
  77. </view>
  78. </view>
  79. </view>
  80. <view class="line" v-if="payType==1">
  81. <view class="lineLeft">
  82. <span class="linexx">*</span> <span>支付金额</span>
  83. </view>
  84. <view class="lineRight">
  85. <input :disabled="isExistGroup" type="text" v-model="money" placeholder="请输入" class="lineRightInput" placeholder-class="inputPlace">
  86. </view>
  87. </view>
  88. <view v-if="payType==1">
  89. <view class="line line3">
  90. <view class="lineLeft">
  91. <span>拼团设置</span>
  92. </view>
  93. <view class="lineRight"><switch :disabled="isExistGroup" :checked='groupType' @change="switchgroupType" style="transform:scale(0.8)"/></view>
  94. </view>
  95. <view v-if="groupType">
  96. <view class="line" >
  97. <view class="lineLeft">
  98. <span class="linexx">*</span> <span>拼团人数</span>
  99. </view>
  100. <view class="lineRight">
  101. <input type="number" :disabled="isExistGroup" @blur="blurgroupNumber" v-model="groupNumber" placeholder="可输入大于1的整数" class="lineRightInput" placeholder-class="inputPlace">
  102. </view>
  103. </view>
  104. <view class="line" >
  105. <view class="lineLeft">
  106. <span class="linexx">*</span> <span>拼团有效期</span>
  107. </view>
  108. <view class="lineRight">
  109. <input type="digit" :disabled="isExistGroup" @blur="blurgroupTime" v-model="groupTime" placeholder="可输入0.5至72小时" class="linecInput" placeholder-class="inputPlace">
  110. </view>
  111. <viwe class="lineRight">小时</viwe>
  112. </view>
  113. <view class="line" >
  114. <view class="lineLeft">
  115. <span class="linexx">*</span> <span>拼团价</span>
  116. </view>
  117. <view class="lineRight">
  118. <input type="digit" :disabled="isExistGroup" @blur="blurgroupMoney" v-model="groupMoney" placeholder="需小于支付金额" class="linecInput" placeholder-class="inputPlace">
  119. </view>
  120. <viwe class="lineRight">元</viwe>
  121. </view>
  122. <view class="line line3">
  123. <view class="lineLeft2">
  124. <span class="linexx">*</span><span>拼团超时自动成团</span>
  125. <image @click="zyct" src="../../static/img/icon_help.png" mode="" class="helpIcon"></image>
  126. </view>
  127. <view class="lineRight"><switch :disabled="isExistGroup" :checked='groupOutState' @change="switchgroupOutState" style="transform:scale(0.8)"/></view>
  128. </view>
  129. <view class="line line3">
  130. <view class="lineLeft2">
  131. <span class="linexx">*</span><span>自由参团</span>
  132. <image @click="zdct" src="../../static/img/icon_help.png" mode="" class="helpIcon"></image>
  133. </view>
  134. <view class="lineRight"><switch :disabled="isExistGroup" :checked='groupRestrictions' @change="switchgroupRestrictions" style="transform:scale(0.8)"/></view>
  135. </view>
  136. </view>
  137. </view>
  138. </view>
  139. <view class="kk"></view>
  140. <view class="box">
  141. <view class="title">活动详情</view>
  142. <view class="line">
  143. <view class="lineLeft">
  144. <span>活动说明</span>
  145. </view>
  146. <view class="lineRight">
  147. <textarea placeholder-class="inputPlace" v-model="activityContent" placeholder="请输入" class="textsr"/>
  148. </view>
  149. </view>
  150. <view class="line2">
  151. <view class="lineTitle">主图</view>
  152. <view class="lineMS">此图在活动顶部显示,建议宽度750px</view>
  153. <view class="lineImgBOx">
  154. <view class="lineimghz" v-if="img" >
  155. <img src="../../static/img/del.png" alt="" class="lineimgdel" @click="delimgzt" >
  156. <img :src="img" alt="" class="lineimg" @click="previewImage(img)">
  157. </view>
  158. <view class="lineimghz" @click="upimgzt" v-if="!img">
  159. <img src="../../static/img/scimg.png" alt="" class="lineimg">
  160. </view>
  161. </view>
  162. </view>
  163. <view class="line2">
  164. <view class="lineTitle">详情图片</view>
  165. <view class="lineMS">此图在活动底部显示,可用于显示门店照片等,建议宽度750px</view>
  166. <view class="lineImgBOx">
  167. <view class="lineimghz" v-for="(item,index) in imgListArr">
  168. <img src="../../static/img/del.png" alt="" class="lineimgdel" @click="delimg(index)" >
  169. <img :src="item" alt="" class="lineimg" @click="previewImage(item)">
  170. </view>
  171. <view class="lineimghz" @click="upimg">
  172. <img src="../../static/img/scimg.png" alt="" class="lineimg">
  173. </view>
  174. </view>
  175. </view>
  176. <view class="line lineBorderNo">
  177. <view class="lineLeft">
  178. <span>音乐</span>
  179. </view>
  180. <view class="lineRight musicRight" @click="goMusic">
  181. <view class="musicMS">选择/更换音乐</view>
  182. <img src="../../static/img/jt.png" alt="" class="musicJt">
  183. </view>
  184. </view>
  185. <view class="musicBox" v-if="ckMusic">
  186. <view class="musicLine">
  187. <view class="musicLineLeft">
  188. <img src="../../static/img/music.png" alt="" class="musicImg">
  189. <view class="musicName">{{ckMusic.name}}</view>
  190. </view>
  191. <view>
  192. <img src="../../static/img/sanchu.png" alt="" class="musicDel" @click="musicDel">
  193. </view>
  194. </view>
  195. </view>
  196. </view>
  197. <view style="height: 120rpx;"></view>
  198. <view class="preview" @click="preview">预览</view>
  199. <w-compress ref='wCompress' />
  200. </view>
  201. </template>
  202. <script>
  203. import WCompress from '@/components/w-compress/w-compress.vue'
  204. export default {
  205. components: {
  206. WCompress
  207. },
  208. data() {
  209. return {
  210. id:'', //类型:String 可有字段 备注:新增无编辑有
  211. activityName:'', //类型:String 必有字段 备注:活动名称
  212. startTime:"", //类型:String 必有字段 备注:营业开始时间
  213. endTime:"", //类型:String 必有字段 备注:营业结束时间
  214. number:"", //类型:String 必有字段 备注:报名人数
  215. activityContent:"", //类型:String 必有字段 备注:活动说明
  216. //clWhere:'', //类型:String 必有字段 备注:报名凭证1,2,3,4 1手机号2车牌号3姓名4单位
  217. payType:1, //类型:String 必有字段 备注:1在线支付2无需支付
  218. music:"", //类型:String 必有字段 备注:背景音乐
  219. clState:'', //类型:String 必有字段 备注:1未启用2启用
  220. img:'', //类型:String 必有字段 备注:从首页带进来的图片
  221. imgList:'',//类型:String 必有字段 备注:详情图片多个以逗号分割
  222. datetimerange: '',
  223. shopNames:'',
  224. shopList:'',
  225. clWhereList:[1,],
  226. clWhereString:'1',
  227. imgListArr:[],
  228. money:'',
  229. ckMusic:'',
  230. id:'',
  231. groupNumber:'',
  232. groupType:false,
  233. groupTime:'',
  234. groupMoney:'',
  235. groupOutState:false,
  236. groupRestrictions:false,
  237. isExistGroup:false,
  238. }
  239. },
  240. onLoad(opt) {
  241. this.img=opt.img;
  242. if(opt.id){
  243. this.id=opt.id;
  244. this.getDetails()
  245. }
  246. },
  247. onShow() {
  248. const shopckList = uni.getStorageSync("shopckList");
  249. this.ckMusic=uni.getStorageSync("ckmusic")
  250. if(this.ckMusic){
  251. this.music=this.ckMusic.id
  252. }
  253. var shopNames=[];
  254. var shopList=[];
  255. if(shopckList){
  256. shopckList.forEach(item=>{
  257. shopNames.push(item.shopName)
  258. shopList.push(item.id)
  259. })
  260. this.shopNames=shopNames.join(',')
  261. this.shopList=shopList.join(',')
  262. }
  263. },
  264. methods: {
  265. nopayCl(){
  266. if(this.isExistGroup){
  267. return false
  268. }
  269. this.payType=2;
  270. this.groupType=false
  271. },
  272. payTypeCL(){
  273. if(this.isExistGroup){
  274. return false
  275. }
  276. this.payType=1;
  277. },
  278. zdct(){
  279. uni.showModal({
  280. title: '自由参团',
  281. content: '如果开启自由参团,则用户可以在详情页直接参团;如果关闭,则用户只能通过好友分享的链接参与拼团',
  282. showCancel:false,
  283. confirmText:'我知道了',
  284. success: function (res) {
  285. }
  286. });
  287. },
  288. zyct(){
  289. uni.showModal({
  290. title: '拼团超时自动成团',
  291. content: '如果开启:过了拼团有效期或拼团活动结束后未能成团,则自动成团;如果关闭:过了拼团有效期或拼团活动结束后未能成团,则拼团失败,团内用户的支付金额将原路退回。',
  292. showCancel:false,
  293. confirmText:'我知道了',
  294. success: function (res) {
  295. }
  296. });
  297. },
  298. switchgroupType(e){
  299. console.log(e)
  300. this.groupType=e.detail.value
  301. },
  302. switchgroupOutState(e){
  303. this.groupOutState=e.detail.value
  304. },
  305. switchgroupRestrictions(e){
  306. this.groupRestrictions=e.detail.value
  307. },
  308. previewImage(img){
  309. var arr=[]
  310. arr.push(img)
  311. uni.previewImage({
  312. urls: arr,
  313. longPressActions: {
  314. itemList: ['发送给朋友', '保存图片',],
  315. success: function(data) {},
  316. fail: function(err) {}
  317. }
  318. });
  319. },
  320. getDetails(){
  321. uni.showLoading({
  322. title: '加载中'
  323. })
  324. this.$http('openH5SetTheGuest/getActivityDetails', {
  325. id:this.id
  326. },'GET').then(res => {
  327. uni.hideLoading();
  328. var jkdata=res.data.data
  329. this.activityName=jkdata.activityName;
  330. this.activityContent=jkdata.activityContent;
  331. this.money=jkdata.money;
  332. this.number=jkdata.number;
  333. this.clWhereString=jkdata.clWhere;
  334. this.clWhereList=this.clWhereString.split(',');
  335. this.startTime=jkdata.startTime.slice(0,10);
  336. this.endTime=jkdata.endTime.slice(0,10);
  337. this.payType=jkdata.payType;
  338. this.img=res.data.img.img;
  339. this.isExistGroup=res.data.isExistGroup
  340. if(res.data.imgList){
  341. res.data.imgList.forEach(item=>{
  342. this.imgListArr.push(item.img)
  343. })
  344. }
  345. var shopNames=[];
  346. var shopList=[];
  347. if(res.data.shopList){
  348. res.data.shopList.forEach(item=>{
  349. item.id=item.shopId
  350. shopNames.push(item.shopName)
  351. shopList.push(item.shopId)
  352. })
  353. this.shopNames=shopNames.join(',')
  354. this.shopList=shopList.join(',')
  355. }
  356. var useshoplist=res.data.shopList
  357. this.ckMusic=res.data.selectedMusic;
  358. if(this.ckMusic){
  359. this.music=this.ckMusic.id;
  360. uni.setStorage({
  361. key: 'ckmusic',
  362. data: this.ckMusic,
  363. success: function () {
  364. }
  365. });
  366. }else{
  367. uni.removeStorageSync('ckmusic');
  368. }
  369. this.groupType=jkdata.groupType==1?true:false;
  370. this.groupNumber=jkdata.groupNumber;
  371. this.groupTime=jkdata.groupTime;
  372. this.groupMoney=jkdata.groupMoney;
  373. this.groupOutState=jkdata.groupOutState;
  374. this.groupRestrictions=jkdata.groupRestrictions;
  375. //console.log(this.imgListArr)
  376. uni.setStorage({
  377. key: 'shopckList',
  378. data: useshoplist,
  379. success: function () {
  380. }
  381. });
  382. //this.list=res.data
  383. })
  384. },
  385. delimgzt(){
  386. this.img=''
  387. },
  388. upimgzt(){
  389. var that = this;
  390. uni.chooseImage({
  391. sourceType: ['album','camera'],
  392. count:1,
  393. sizeType:['compressed'],
  394. success: (chooseImageRes) => {
  395. const tempFilePaths = chooseImageRes.tempFilePaths;
  396. that.file=tempFilePaths[0];
  397. that.$refs.wCompress.start(that.file, {
  398. pixels: 600000, // 最大分辨率,默认二百万
  399. quality: 0.9, // 压缩质量,默认0.8
  400. type: 'png', // 图片类型,默认jpg
  401. base64: true, // 是否返回base64,默认false,非H5有效
  402. }).then(resxx => {
  403. uni.uploadFile({
  404. url: that.$request.baseUrl+'accompany/SuperCheckSheet/uploadFile', //仅为示例,非真实的接口地址
  405. filePath: resxx,
  406. name: 'file',
  407. formData: {
  408. 'user': 'test'
  409. },
  410. success: (uploadFileRes) => {
  411. that.img=JSON.parse(uploadFileRes.data).data[0]
  412. }
  413. });
  414. }).catch(e => {
  415. })
  416. // uni.uploadFile({
  417. // url: that.$request.baseUrl+'accompany/SuperCheckSheet/uploadFile', //仅为示例,非真实的接口地址
  418. // filePath: tempFilePaths[0],
  419. // name: 'file',
  420. // formData: {
  421. // 'user': 'test'
  422. // },
  423. // success: (uploadFileRes) => {
  424. // console.log(JSON.parse(uploadFileRes.data).data );
  425. // that.img=JSON.parse(uploadFileRes.data).data[0]
  426. // }
  427. // });
  428. }
  429. });
  430. },
  431. blurgroupNumber(){
  432. if(this.groupNumber%1 != 0||this.groupNumber<2){
  433. uni.showToast({
  434. title: '请输入大于1整数',
  435. icon:'none',
  436. duration: 2000
  437. });
  438. }
  439. },
  440. blurgroupTime(){
  441. if(!this.groupTime){
  442. uni.showToast({
  443. title: '请输入拼团有效期',
  444. icon:'none',
  445. duration: 2000
  446. });
  447. }else if(this.groupTime<0.5||this.groupTime>72){
  448. uni.showToast({
  449. title: '有效期为0.5小时至72小时',
  450. icon:'none',
  451. duration: 2000
  452. });
  453. }
  454. },
  455. blurgroupMoney(){
  456. if(this.groupMoney>this.money||this.groupMoney==this.money){
  457. uni.showToast({
  458. title: '拼团价格需小于支付金额',
  459. icon:'none',
  460. duration: 2000
  461. });
  462. }
  463. },
  464. preview(){
  465. /* if(this.isExistGroup){
  466. uni.showToast({
  467. title: '已有用户参与该拼团活动,无法修改报名信息',
  468. icon:'none',
  469. duration: 3000
  470. });
  471. return false
  472. } */
  473. //console.log(this.clWhere)
  474. // if(this.money==0){
  475. // this.money=0
  476. // }
  477. if(this.money==null){
  478. this.money=''
  479. }
  480. if(this.payType==2){
  481. this.money=0;
  482. }
  483. console.log(this.money)
  484. if(this.activityName==''){
  485. uni.showToast({
  486. title: '请输入活动名称',
  487. icon:'none',
  488. duration: 2000
  489. });
  490. return false;
  491. }else if(!this.startTime||!this.endTime){
  492. uni.showToast({
  493. title: '请选择报名时间',
  494. icon:'none',
  495. duration: 2000
  496. });
  497. return false;
  498. }else if(this.shopList==''){
  499. uni.showToast({
  500. title: '请选择活动门店',
  501. icon:'none',
  502. duration: 2000
  503. });
  504. return false;
  505. }else if(this.clWhereString==''){
  506. uni.showToast({
  507. title: '请选择报名凭证',
  508. icon:'none',
  509. duration: 2000
  510. });
  511. return false;
  512. }else if(this.number==''){
  513. uni.showToast({
  514. title: '请输入最多报名人数',
  515. icon:'none',
  516. duration: 2000
  517. });
  518. return false;
  519. }else if(this.money!==0&&this.money==''&&this.payType==1){
  520. uni.showToast({
  521. title: '请输入支付金额',
  522. icon:'none',
  523. duration: 2000
  524. });
  525. return false;
  526. }else if(this.groupType){
  527. if(!this.groupNumber){
  528. uni.showToast({
  529. title: '请输入拼团人数',
  530. icon:'none',
  531. duration: 2000
  532. });
  533. return false;
  534. }else if(this.groupNumber%1 != 0||this.groupNumber<2){
  535. uni.showToast({
  536. title: '请输入大于1整数',
  537. icon:'none',
  538. duration: 2000
  539. });
  540. return false;
  541. }
  542. if(!this.groupTime){
  543. uni.showToast({
  544. title: '请输入拼团有效期',
  545. icon:'none',
  546. duration: 2000
  547. });
  548. return false;
  549. }else if(this.groupTime<0.5||this.groupTime>72){
  550. uni.showToast({
  551. title: '有效期为0.5小时至72小时',
  552. icon:'none',
  553. duration: 2000
  554. });
  555. return false;
  556. }
  557. if(!this.groupMoney){
  558. uni.showToast({
  559. title: '请输入价格',
  560. icon:'none',
  561. duration: 2000
  562. });
  563. return false;
  564. }else if(this.groupMoney>this.money||this.groupMoney==this.money){
  565. uni.showToast({
  566. title: '拼团价格需小于支付金额',
  567. icon:'none',
  568. duration: 2000
  569. });
  570. return false;
  571. }
  572. }
  573. //return false;
  574. var editdata={
  575. id:this.id,
  576. activityName:this.activityName,
  577. startTime:this.startTime+ ' 00:00:00',
  578. endTime:this.endTime+ ' 23:59:59',
  579. number:this.number,
  580. activityContent:this.activityContent,
  581. clWhere:this.clWhereString,
  582. payType:this.payType,
  583. music:this.music,
  584. money:this.money,
  585. shopList:this.shopList,
  586. img:this.img,
  587. imgList:this.imgListArr.join(','),
  588. clState:'',
  589. groupType:this.groupType?1:0,
  590. groupNumber:this.groupNumber,
  591. groupTime:this.groupTime,
  592. groupMoney:this.groupMoney,
  593. groupOutState:this.groupOutState?1:0,
  594. groupRestrictions:this.groupRestrictions?1:0
  595. }
  596. console.log(editdata)
  597. //return false;
  598. uni.setStorage({
  599. key: 'editdata',
  600. data: editdata,
  601. success: function () {
  602. uni.navigateTo({
  603. url:'jkDetail?type=1'
  604. })
  605. }
  606. });
  607. },
  608. addShop(){
  609. uni.navigateTo({
  610. url:'ckshop'
  611. })
  612. },
  613. goMusic(){
  614. uni.navigateTo({
  615. url:'ckmusic'
  616. })
  617. },
  618. musicDel(){
  619. this.music='';
  620. this.ckMusic=''
  621. uni.removeStorageSync('ckmusic');
  622. },
  623. bindTimeChangeStart(e){
  624. console.log(e)
  625. this.startTime=e.detail.value;
  626. },
  627. bindTimeChangeendTime(e){
  628. this.endTime=e.detail.value;
  629. },
  630. clWhere(num){
  631. if(this.isExistGroup){
  632. return false
  633. }
  634. console.log(this.clWhereList)
  635. this.clWhereString=this.clWhereList.join(',');
  636. if(this.clWhereString.indexOf(num)!=-1){
  637. // this.clWhereList.remove(num)
  638. let index = this.clWhereList.indexOf(num);
  639. this.clWhereList.splice(index, 1)
  640. //this.remove(num)
  641. }else{
  642. this.clWhereList.push(num)
  643. }
  644. this.clWhereString=this.clWhereList.join(',');
  645. console.log(this.clWhereString)
  646. },
  647. delimg(index){
  648. this.imgListArr.splice(index, 1)
  649. },
  650. upimg(){
  651. var that = this;
  652. uni.chooseImage({
  653. sourceType: ['album','camera'],
  654. count:9,
  655. sizeType:['compressed'],
  656. success: (chooseImageRes) => {
  657. const tempFilePaths = chooseImageRes.tempFilePaths;
  658. that.file=tempFilePaths[0]
  659. that.$refs.wCompress.start(that.file, {
  660. pixels: 600000, // 最大分辨率,默认二百万
  661. quality: 0.9, // 压缩质量,默认0.8
  662. type: 'png', // 图片类型,默认jpg
  663. base64: true, // 是否返回base64,默认false,非H5有效
  664. }).then(resxx => {
  665. uni.uploadFile({
  666. url: that.$request.baseUrl+'accompany/SuperCheckSheet/uploadFile', //仅为示例,非真实的接口地址
  667. filePath: resxx,
  668. name: 'file',
  669. formData: {
  670. 'user': 'test'
  671. },
  672. success: (uploadFileRes) => {
  673. that.imgListArr=that.imgListArr.concat(JSON.parse(uploadFileRes.data).data)
  674. }
  675. });
  676. }).catch(e => {
  677. })
  678. // uni.uploadFile({
  679. // url: that.$request.baseUrl+'accompany/SuperCheckSheet/uploadFile', //仅为示例,非真实的接口地址
  680. // filePath: tempFilePaths[0],
  681. // name: 'file',
  682. // formData: {
  683. // 'user': 'test'
  684. // },
  685. // success: (uploadFileRes) => {
  686. // console.log(JSON.parse(uploadFileRes.data).data );
  687. // that.imgListArr=that.imgListArr.concat(JSON.parse(uploadFileRes.data).data)
  688. // //that.imgArr=that.imgArr.concat(JSON.parse(uploadFileRes.data).data) ;
  689. // //that.imgurl=JSON.parse(uploadFileRes.data).data[0];
  690. // //that.goAddzdy(that.imgurl)
  691. // }
  692. // });
  693. }
  694. });
  695. }
  696. }
  697. }
  698. </script>
  699. <style scoped>
  700. .content{
  701. min-height: 100vh;
  702. background:#F4F5F7;
  703. }
  704. .lineLeft2{
  705. width: 300rpx;color: #666666;display: flex;align-items: center;
  706. }
  707. .helpIcon{
  708. width: 26rpx;height: 26rpx;padding-left: 10rpx;padding-top: 4rpx;
  709. }
  710. .preview{
  711. width: 750rpx;
  712. height: 98rpx;
  713. background: #3F90F7;
  714. line-height: 98rpx;
  715. text-align: center;
  716. color: #ffffff;
  717. font-size: 30rpx;
  718. position: fixed;
  719. left: 0;
  720. bottom: 0;
  721. }
  722. .musicBox{
  723. padding: 0 24rpx;
  724. }
  725. .musicLine{
  726. display: flex;
  727. justify-content: space-between;
  728. margin-bottom:30rpx;
  729. padding:26rpx 24rpx;
  730. background: #F4F5F7;
  731. border-radius: 10rpx;
  732. }
  733. .musicName{
  734. color: #3C3C3C;font-size: 24rpx;
  735. padding-left: 10rpx;
  736. }
  737. .musicLineLeft{
  738. display: flex;
  739. }
  740. .musicDel{
  741. width: 30rpx;
  742. height: 30rpx;
  743. }
  744. .musicImg{
  745. width: 36rpx;
  746. height: 36rpx;
  747. }
  748. .line2{
  749. padding: 30rpx 24rpx;
  750. border-bottom: 1px solid #EEEEEE;
  751. }
  752. .musicJt{
  753. width: 28rpx;
  754. height: 28rpx;
  755. margin-top: 8rpx;
  756. }
  757. .musicRight{
  758. display: flex;
  759. justify-content: space-between;
  760. width: 500rpx;
  761. }
  762. .musicMS{
  763. color: #CCCCCC;
  764. }
  765. .lineimgdel{
  766. width: 37rpx;
  767. height: 37rpx;
  768. position: absolute;
  769. top: -18rpx;
  770. right: -18rpx;
  771. }
  772. .lineimghz{
  773. margin-right: 24rpx;
  774. position: relative;
  775. margin-top: 24rpx;
  776. }
  777. .lineimg{
  778. width: 150rpx;
  779. height: 150rpx;
  780. }
  781. .lineTitle{
  782. color: #666666;font-size: 28rpx;
  783. }
  784. .lineMS{
  785. color: #999999;font-size: 24rpx;padding-top: 10rpx;
  786. }
  787. .lineImgBOx{
  788. display: flex;
  789. flex-wrap: wrap;
  790. }
  791. .payBox{
  792. display: flex;
  793. }
  794. .payTypeImg{
  795. width: 36rpx;
  796. height: 36rpx;
  797. }
  798. .payType{
  799. display: flex;
  800. line-height: 36rpx;
  801. }
  802. .payTypeTxt{
  803. padding-left: 10rpx;
  804. color: #3C3C3C;
  805. }
  806. .line{
  807. display: flex;
  808. font-size: 28rpx;
  809. padding: 30rpx 24rpx;
  810. border-bottom: 1px solid #EEEEEE;
  811. }
  812. .linexx{
  813. color: #FF3B30;
  814. }
  815. .dateView{
  816. color:#3C3C3C ;
  817. }
  818. .lineLeft{
  819. width: 200rpx;
  820. color: #666666;
  821. }
  822. .clWhereBox{
  823. display: flex;
  824. }
  825. .clWhereLine{
  826. width: 100rpx;
  827. height: 52rpx;
  828. background: #F4F5F7;
  829. border-radius: 10rpx;
  830. text-align: center;
  831. color: #3C3C3C;
  832. line-height: 52rpx;
  833. font-size: 24rpx;
  834. margin-right: 24rpx;
  835. }
  836. .clWhereBox .clWhereActive{
  837. background: #EAF3FF;
  838. border: 2rpx solid #3F90F7;
  839. height: 48rpx;
  840. color: #3F90F7;
  841. height: 48rpx;
  842. line-height: 48rpx;
  843. width: 96rpx;
  844. }
  845. .timelineRight{
  846. display: flex;
  847. }
  848. .textsr{
  849. width: 500rpx;
  850. height: 180rpx;
  851. }
  852. .shopListNo{
  853. width: 400rpx;
  854. white-space:nowrap;
  855. overflow:hidden;
  856. text-overflow:ellipsis;
  857. color: #CCCCCC;
  858. }
  859. .shopListY{
  860. width: 400rpx;
  861. white-space:nowrap;
  862. overflow:hidden;
  863. text-overflow:ellipsis;
  864. color: #3C3C3C;
  865. }
  866. .addshop{
  867. color: #3F90F7;
  868. padding-left: 10rpx;
  869. }
  870. .shopckBox{
  871. display: flex;
  872. }
  873. .timeHx{
  874. color: #CCCCCC;
  875. padding: 0 30rpx;
  876. }
  877. .lineRightInput{
  878. font-size: 28rpx;
  879. color:#3C3C3C ;
  880. width: 500rpx;
  881. }
  882. .linecInput{
  883. font-size: 28rpx;
  884. color:#3C3C3C ;
  885. width: 400rpx;
  886. }
  887. .lineRight{
  888. color:#3C3C3C ;
  889. }
  890. .inputPlace{
  891. color: #CCCCCC;
  892. }
  893. .dateViewno{
  894. color: #CCCCCC;
  895. }
  896. .box{
  897. background: #ffffff;
  898. padding-bottom: 30rpx;
  899. }
  900. .kk{
  901. background:#F4F5F7;
  902. height: 20rpx;
  903. }
  904. .title{
  905. padding-left: 24rpx;
  906. padding-top: 30rpx;
  907. color: #333333;
  908. font-size: 32rpx;
  909. line-height: 45rpx;
  910. font-weight: 500;
  911. }
  912. .lineBorderNo{
  913. border-bottom: none !important;
  914. }
  915. .line3{
  916. display: flex;justify-content: space-between;
  917. padding: 16rpx 24rpx;
  918. }
  919. .line3 .lineLeft{
  920. display: flex;align-items: center;
  921. }
  922. </style>