taskdetail.vue 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213
  1. <template>
  2. <view>
  3. <!-- 胶囊 -->
  4. <mvBar :mysNavConfig="mysNavConfig"></mvBar>
  5. <view style="margin-top: 160rpx;"></view>
  6. <view v-if="!loading">
  7. <!-- 任务状态 -->
  8. <view style="padding-bottom: 30rpx;margin: 0 30rpx">
  9. <view style="display: flex;justify-content: center;font-size: 44rpx;padding-bottom: 20rpx;">
  10. <p>{{msg1}}</p>
  11. <view class="upload-btn" v-if="isShowUpload" @click="toUpload()">
  12. <image src="../../static/img/icon-upload.png" style="height: 40rpx;width: 40rpx;"></image>
  13. <p style="font-size: 28rpx;">快速上传</p>
  14. </view>
  15. </view>
  16. <view style="display: flex;justify-content: center;font-size: 24rpx;color: #999999;text-align:center">
  17. <p>{{msg2}}</p>
  18. </view>
  19. <view style="display: flex;justify-content: center;font-size: 24rpx;color: #999999;text-align:center"
  20. v-if="msg3 != ''">
  21. <p>{{msg3}}</p>
  22. </view>
  23. </view>
  24. <view style="display: flex;justify-content: center;align-items: center;" v-if="isShowUpload && !isSpecial">
  25. <image style="height: 60rpx;width: 60rpx;" src="../../static/img/icon-time.png"></image>
  26. <p style="font-size: 30rpx;color: #f2d241;" v-if="!isTimeOut">剩余时间:{{timeLeft}}</p>
  27. <p style="font-size: 30rpx;color: #f2d241;" v-if="isTimeOut">超时:{{timeLeft}}</p>
  28. </view>
  29. <view class="address" v-if="!isSpecial">
  30. <view class="address_icon">
  31. <image style="width: 50rpx;height: 50rpx;" :src="picture.icon_loc" mode="">
  32. </image>
  33. </view>
  34. <view style="width: 70%;">
  35. <view style="display: flex;">
  36. <p class='ipon' style="padding-right: 100rpx;">{{address.receiver_name}}</p>
  37. <p class='ipon'>{{address.phone_number}}</p>
  38. </view>
  39. <p class='ipon'>{{address.full_detail_addr}}</p>
  40. </view>
  41. <view class="address_edit" @click="editAddress()" v-if="task.task_stage < 4">
  42. <image :src="picture.icon_edit" mode="">
  43. </image>
  44. </view>
  45. </view>
  46. <view class="basicInfo">
  47. <image :src="product.PhotoUrl" style="width: 150rpx;height: 150rpx;" mode="">
  48. </image>
  49. <view class="basicInfo_txt">
  50. <p style="margin-bottom: 10rpx;font-size: 35rpx;font-weight: 550;">{{project.project_name}}</p>
  51. <p style="font-size: 30rpx;">商品价值:{{project.Product.ProductPrice}}元</p>
  52. </view>
  53. </view>
  54. <view class="keyInfo">
  55. <view style="margin-bottom: 40rpx;">
  56. <p style="font-size: 36rpx;font-weight: 550;">关键任务信息</p>
  57. </view>
  58. <view v-if="!isSpecial">
  59. <p style="font-weight: 600;margin-bottom: 10rpx;">合作方式</p>
  60. <p>粉丝量:{{strategy.show_followers_low}}-{{strategy.show_followers_up}}
  61. &nbsp;&nbsp;
  62. 稿费:{{strategy.fee_form_t}}
  63. </p>
  64. </view>
  65. <view class="line"></view>
  66. <view style="margin-top: 20rpx;margin-bottom: 10rpx;">
  67. <p style="font-weight: 600;margin-bottom: 10rpx;">社媒平台:</p>
  68. <p>{{project.project_platform_t}}</p>
  69. </view>
  70. <view class="line"></view>
  71. <p style="font-weight: 600;margin-top: 10rpx;">任务要求</p>
  72. <view class="keyInfo_task">
  73. <view style="display: flex;align-items: center;margin: 10rpx 0;">
  74. <p>内容形式:</p>
  75. <p>{{project.content}}</p>
  76. </view>
  77. <view style="display: flex;align-items: center;margin: 10rpx 0;">
  78. <p>任务形式:</p>
  79. <p>{{project.project_form_t}}</p>
  80. </view>
  81. <view style="margin-top: 20rpx;margin-bottom: 10rpx;">
  82. <p>商品描述:</p>
  83. <text>{{project.Product.ProductDetail}}</text>
  84. </view>
  85. <view style="margin-top: 20rpx;margin-bottom: 10rpx;">
  86. <p>任务详情:</p>
  87. <text>{{project.project_detail}}</text>
  88. </view>
  89. </view>
  90. </view>
  91. <view class="task-progress">
  92. <p style="font-size: 32rpx;font-weight: 600;">任务进度</p>
  93. <view class="task-progress-card" v-bind:style="task.task_stage == 1 ? 'background-color: #f2d241' : ''">
  94. <view class="tpc-txt1">
  95. <p>报名信息</p>
  96. </view>
  97. <view class="tpc-txt2" @click="toApplyinfo()">
  98. <p>查看</p>
  99. <image class="tpc-icon" :src="picture.icon_right"></image>
  100. </view>
  101. </view>
  102. <view class="task-progress-card"
  103. v-if="(task.task_stage >= 5 && task.task_stage <= 15) || ((task.task_stage === 16 || task.task_stage === 3) && task.logistics_status >= 2)"
  104. v-bind:style="task.task_stage >= 5 && task.task_stage <= 6 ? 'background-color: #f2d241' : ''">
  105. <view class="tpc-txt1">
  106. <p>物流信息</p>
  107. </view>
  108. <view class="tpc-txt2" @click="toLogisticsinfo()">
  109. <p>查看</p>
  110. <image class="tpc-icon" :src="picture.icon_right"></image>
  111. </view>
  112. </view>
  113. <view class="task-progress-card"
  114. v-if="project.content_type == 2 && ((task.task_stage >= 7 && task.task_stage <= 15) || ((task.task_stage === 16 || task.task_stage === 3) && task.script_status == 5))"
  115. v-bind:style="task.task_stage >= 7 && task.task_stage <= 8 ? 'background-color: #f2d241' : ''">
  116. <view class="tpc-txt1">
  117. <p>上传拍摄脚本</p>
  118. </view>
  119. <view class="tpc-txt2" @click="toUpload()" v-if="task.script_status == 1">
  120. <p style="color: red;">待添加</p>
  121. <image class="tpc-icon" :src="picture.icon_right"></image>
  122. </view>
  123. <view class="tpc-txt2" @click="toUpload()" v-if="task.script_status == 2">
  124. <p style="color: #fff;">已添加</p>
  125. <image class="tpc-icon" :src="picture.icon_right"></image>
  126. </view>
  127. <view class="tpc-txt2" @click="toUpload()" v-if="task.script_status == 3">
  128. <p style="color: red;">待修改</p>
  129. <image class="tpc-icon" :src="picture.icon_right"></image>
  130. </view>
  131. <view class="tpc-txt2" @click="toUpload()" v-if="task.script_status == 4">
  132. <p style="color: #fff;">已修改</p>
  133. <image class="tpc-icon" :src="picture.icon_right"></image>
  134. </view>
  135. <view class="tpc-txt2" @click="toScriptRecord()" v-if="task.script_status == 5">
  136. <p>查看</p>
  137. <image class="tpc-icon" :src="picture.icon_right"></image>
  138. </view>
  139. </view>
  140. <view class="task-progress-card"
  141. v-if="(task.task_stage >= 9 && task.task_stage <= 15) || ((task.task_stage === 16 || task.task_stage === 3) && task.sketch_status == 5)"
  142. v-bind:style="task.task_stage >= 9 && task.task_stage <= 10 ? 'background-color: #f2d241' : ''">
  143. <view class="tpc-txt1">
  144. <p>上传初稿</p>
  145. </view>
  146. <view class="tpc-txt2" @click="toUpload()" v-if="task.sketch_status == 1">
  147. <p style="color: red;">待添加</p>
  148. <image class="tpc-icon" :src="picture.icon_right"></image>
  149. </view>
  150. <view class="tpc-txt2" @click="toUpload()" v-if="task.sketch_status == 2">
  151. <p style="color: #fff;">已添加</p>
  152. <image class="tpc-icon" :src="picture.icon_right"></image>
  153. </view>
  154. <view class="tpc-txt2" @click="toUpload()" v-if="task.sketch_status == 3">
  155. <p style="color: red;">待修改</p>
  156. <image class="tpc-icon" :src="picture.icon_right"></image>
  157. </view>
  158. <view class="tpc-txt2" @click="toUpload()" v-if="task.sketch_status == 4">
  159. <p style="color: #fff;">已修改</p>
  160. <image class="tpc-icon" :src="picture.icon_right"></image>
  161. </view>
  162. <view class="tpc-txt2" @click="toSketchRecord()" v-if="task.sketch_status == 5">
  163. <p>查看</p>
  164. <image class="tpc-icon" :src="picture.icon_right"></image>
  165. </view>
  166. </view>
  167. <view class="task-progress-card"
  168. v-if="(task.task_stage >= 11 && task.task_stage <= 15) || ((task.task_stage === 16 || task.task_stage === 3) && task.link_status == 5)"
  169. v-bind:style="task.task_stage >= 11 && task.task_stage <= 12 ? 'background-color: #f2d241' : ''">
  170. <view class="tpc-txt1">
  171. <p>上传链接</p>
  172. </view>
  173. <view class="tpc-txt2" @click="toUpload()" v-if="task.link_status == 1">
  174. <p style="color: red;">待添加</p>
  175. <image class="tpc-icon" :src="picture.icon_right"></image>
  176. </view>
  177. <view class="tpc-txt2" @click="toUpload()" v-if="task.link_status == 2">
  178. <p style="color: #fff;">已添加</p>
  179. <image class="tpc-icon" :src="picture.icon_right"></image>
  180. </view>
  181. <view class="tpc-txt2" @click="toUpload()" v-if="task.link_status == 3">
  182. <p style="color: red;">待修改</p>
  183. <image class="tpc-icon" :src="picture.icon_right"></image>
  184. </view>
  185. <view class="tpc-txt2" @click="toUpload()" v-if="task.link_status == 4">
  186. <p style="color: #fff;">已修改</p>
  187. <image class="tpc-icon" :src="picture.icon_right"></image>
  188. </view>
  189. <view class="tpc-txt2" @click="toLinkRecord()" v-if="task.link_status == 5">
  190. <p>查看</p>
  191. <image class="tpc-icon" :src="picture.icon_right"></image>
  192. </view>
  193. </view>
  194. <view class="task-progress-card"
  195. v-if="(task.task_stage >= 13 && task.task_stage <= 15) || ((task.task_stage === 16 || task.task_stage === 3) && task.data_status == 5)"
  196. v-bind:style="task.task_stage >= 13 && task.task_stage <= 14 ? 'background-color: #f2d241' : ''">
  197. <view class="tpc-txt1">
  198. <p>上传数据</p>
  199. </view>
  200. <view class="tpc-txt2" @click="toUpload()" v-if="task.data_status == 1">
  201. <p style="color: red;">待添加</p>
  202. <image class="tpc-icon" :src="picture.icon_right"></image>
  203. </view>
  204. <view class="tpc-txt2" @click="toUpload()" v-if="task.data_status == 2">
  205. <p style="color: #fff;">已添加</p>
  206. <image class="tpc-icon" :src="picture.icon_right"></image>
  207. </view>
  208. <view class="tpc-txt2" @click="toUpload()" v-if="task.data_status == 3">
  209. <p style="color: red;">待修改</p>
  210. <image class="tpc-icon" :src="picture.icon_right"></image>
  211. </view>
  212. <view class="tpc-txt2" @click="toUpload()" v-if="task.data_status == 4">
  213. <p style="color: #fff;">已修改</p>
  214. <image class="tpc-icon" :src="picture.icon_right"></image>
  215. </view>
  216. <view class="tpc-txt2" @click="toDataRecord()" v-if="task.data_status == 5">
  217. <p>查看</p>
  218. <image class="tpc-icon" :src="picture.icon_right"></image>
  219. </view>
  220. </view>
  221. <view class="task-progress-card" v-if="task.task_stage === 15" style="background-color: #f2d241">
  222. <view class="tpc-txt1">
  223. <p>已结案</p>
  224. </view>
  225. <view class="tpc-txt2" @click="toWithdraw()">
  226. <p>前往提现</p>
  227. <image class="tpc-icon" :src="picture.icon_right"></image>
  228. </view>
  229. </view>
  230. <view class="task-progress-info">
  231. <view style="padding: 10rpx 0;">
  232. <span style="display: flex;align-items: center;">
  233. <p>任务id:{{task.task_id}}</p>
  234. <image :src="picture.icon_copy" mode="" style="width: 40rpx;height: 40rpx;"
  235. @click="handleCopy()" />
  236. </span>
  237. </view>
  238. <view style="padding: 10rpx 0;">
  239. <p>报名时间:{{task.create_date}}</p>
  240. </view>
  241. <view v-if="task.task_stage > 1" style="padding: 10rpx 0;">
  242. <p>确认合作:{{task.select_date}}</p>
  243. </view>
  244. <view v-for="(item,index) in taskLogs" style="padding: 10rpx 0;">
  245. <p>{{item.content}}:{{item.log_at}}</p>
  246. </view>
  247. </view>
  248. </view>
  249. <view class="block"></view>
  250. <view class="submit" v-if="task.task_stage >= 7 && task.task_stage <= 14">
  251. <button type="default" class="submit_btn" @click="submit()" :disabled="isNotShowSubmit"
  252. v-bind:style="isNotShowSubmit ? '' : 'background-color: #f2d241'">
  253. 确认提交</button>
  254. </view>
  255. <view class="submit" v-if="task.task_stage === 15">
  256. <button type="default" class="submit_btn" @click="toWithdraw()"
  257. v-bind:style="isNotShowSubmit ? '' : 'background-color: #f2d241'">
  258. 前往提现</button>
  259. </view>
  260. </view>
  261. </view>
  262. </template>
  263. <script>
  264. import region from '@/components/pca-code.json';
  265. import mvBar from "@/components/mys_navBar/mysNavBar";
  266. import {
  267. fansview
  268. } from '@/components/utils.js';
  269. export default {
  270. components: {
  271. mvBar
  272. },
  273. data() {
  274. return {
  275. isTimeOut: false,
  276. isNotShowSubmit: true,
  277. isShowUpload: false,
  278. loading: true,
  279. isSpecial: false,
  280. timeLeft: "",
  281. msg1: "",
  282. msg2: "",
  283. msg3: "",
  284. infoMsg1: [
  285. "等待企业确认合作",
  286. "恭喜任务申请成功!",
  287. "任务申请失败",
  288. "等待发货中",
  289. "商家已发货",
  290. "商品已签收",
  291. "等待上传拍摄脚本",
  292. "等待脚本审核",
  293. "等待上传初稿",
  294. "等待初稿审核",
  295. "等待上传链接",
  296. "等待链接审核",
  297. "等待上传作品数据",
  298. "等待数据审核",
  299. "已结案",
  300. "任务终止",
  301. ],
  302. infoMsg2: [
  303. "商家将在申请截止后5天内审核完毕",
  304. "请仔细查看任务要求和任务详情,开始执行任务吧!",
  305. "账号未达到入选标准,请小主尝试申请其他任务吧",
  306. "发货后可在任务进度中查看物流单号",
  307. "请在物流进度中查看物流单号/虚拟产品兑换码",
  308. "请在物流进度中查看物流单号/虚拟产品兑换码",
  309. "请在任务进度中上传拍摄脚本,商家审核通过后再进行拍摄",
  310. "商家正在审核脚本,请耐心等待。",
  311. "请在任务进度中上传图文/视频初稿,商家审核通过后再进行发布",
  312. "商家正在审核初稿,请耐心等待。",
  313. "恭喜作品审核通过,请及时发布并在任务进度中上传发布链接。",
  314. "商家正在审核链接,请耐心等待。",
  315. "恭喜链接审核通过,请在作品发布7天后上传作品数据。",
  316. "商家正在审核数据,请耐心等待。",
  317. "本项目已结案,可申请佣金提现。",
  318. "长时间未上传,任务已终止。",
  319. ],
  320. infoMsg3: [
  321. "企业将在5个工作日内完成核对账号信息,请耐心等待",
  322. "请仔细查看任务要求和任务详情,开始执行任务吧!",
  323. "账号非企业定向邀请账号,请小主尝试申请其他任务吧",
  324. "发货后可在任务进度中查看物流单号",
  325. "请在物流进度中查看物流单号/虚拟产品兑换码",
  326. "请在物流进度中查看物流单号/虚拟产品兑换码",
  327. "请在任务进度中上传拍摄脚本,商家审核通过后再进行拍摄",
  328. "请在任务进度中上传拍摄脚本,商家审核通过后再进行拍摄",
  329. "请在任务进度中上传图文/视频初稿,商家审核通过后再进行发布",
  330. "请在任务进度中上传图文/视频初稿,商家审核通过后再进行发布",
  331. "恭喜作品审核通过,请及时发布并在任务进度中上传发布链接。",
  332. "恭喜作品审核通过,请及时发布并在任务进度中上传发布链接。",
  333. "恭喜链接审核通过,请在作品发布7天后上传作品数据。",
  334. "恭喜链接审核通过,请在作品发布7天后上传作品数据。",
  335. "本项目已结案,可申请佣金提现。",
  336. "长时间未上传,任务已终止。",
  337. ],
  338. platform: [
  339. "红book",
  340. "抖音",
  341. "微博",
  342. "快手",
  343. "B站",
  344. "大众点评",
  345. "知乎",
  346. ],
  347. task: {},
  348. address: {},
  349. project: {},
  350. product: {},
  351. account: {},
  352. strategy: {},
  353. picture: {
  354. togoimg: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/task16.png',
  355. icon_copy: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent_upload/icon-copy.png',
  356. icon_edit: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-edit.png',
  357. icon_loc: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-loc.png',
  358. icon_right: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent_upload/icon-arrow-right.png',
  359. home8: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home8.png',
  360. home10: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home10.png',
  361. home11: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home11.png',
  362. },
  363. task_type_info: ["实体商品寄拍", "虚拟产品测评", "线下探店打卡"],
  364. taskLogs: [],
  365. mysNavConfig: {
  366. isHome: false,
  367. /* 固定导航 */
  368. navFixed: true,
  369. /* 标题 (屏幕中心居中 两边图标中心居中使用slot center1) */
  370. navTitle: {
  371. text: "我的任务详情",
  372. color: "",
  373. fontSize: "32rpx", // px upx rpx
  374. fontWeight: "", // 100 - 700
  375. },
  376. btnType: "type2",
  377. onLeftClick: '',
  378. /* type2 按钮 */
  379. type2Config: {
  380. // 左图标
  381. leftPath: "https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/png2.png",
  382. // 右图标
  383. rightPath: "https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/png4.png",
  384. // 圆角
  385. radius: "40rpx",
  386. },
  387. },
  388. }
  389. },
  390. async onShow() {
  391. this.loading = true;
  392. uni.showLoading({
  393. title: '加载中'
  394. });
  395. await this.getTaskInfo();
  396. await this.getTaskLogs();
  397. if (!this.isSpecial) {
  398. this.getLeftTime();
  399. } else {
  400. this.loading = false;
  401. uni.hideLoading();
  402. }
  403. },
  404. onLoad(options) {
  405. this.taskId = options.taskId
  406. },
  407. methods: {
  408. handleCopy() {
  409. wx.setClipboardData({
  410. data: this.task.task_id.toString(),
  411. success: function(res) {
  412. console.log("复制成功");
  413. }
  414. });
  415. },
  416. async getLeftTime(value) {
  417. switch (this.task.task_stage) {
  418. case 7:
  419. // 首次提交
  420. if (this.task.script_status === 1) {
  421. let logistics = null;
  422. await this.$https.get('/youngee/c/t/g/get-task-logistics-info' +
  423. "?" +
  424. "task_id" +
  425. "=" +
  426. this.taskId
  427. ).then(res => {
  428. logistics = res.data.data
  429. })
  430. if (logistics.auto_script_break_at !== "") {
  431. this.timeLeft = this.thistime(logistics.auto_script_break_at)
  432. } else {
  433. // 为脚本违约限制时间赋值并返回
  434. await this.$https.post('/youngee/c/t/p/get-auto-time', {
  435. task_id: this.taskId,
  436. type: 1,
  437. }).then(res => {
  438. this.timeLeft = this.thistime(res.data.data)
  439. })
  440. }
  441. } else {
  442. let scriptList = null;
  443. let script = null;
  444. await this.$https.get('/youngee/c/t/g/get-task-script' +
  445. "?" +
  446. "task_id" +
  447. "=" +
  448. this.taskId)
  449. .then(res => {
  450. scriptList = res.data.data
  451. for (let i = 0; i < scriptList.length; ++i) {
  452. if (scriptList[i].is_review === 1) {
  453. script = scriptList[i]
  454. }
  455. }
  456. })
  457. if (script.auto_script_break_at !== "") {
  458. this.timeLeft = this.thistime(script.auto_script_break_at)
  459. } else {
  460. // 为脚本违约限制时间赋值并返回
  461. await this.$https.post('/youngee/c/t/p/get-auto-time', {
  462. task_id: this.taskId,
  463. type: 2,
  464. }).then(res => {
  465. this.timeLeft = this.thistime(res.data.data)
  466. })
  467. }
  468. }
  469. this.msg1 = this.isTimeOut ? "脚本上传违约" : this.msg1
  470. break;
  471. case 9:
  472. // 首次提交
  473. if (this.task.sketch_status === 1) {
  474. if (this.project.content_type === 1) {
  475. let logistics = null;
  476. await this.$https.get('/youngee/c/t/g/get-task-logistics-info' +
  477. "?" +
  478. "task_id" +
  479. "=" +
  480. this.taskId
  481. ).then(res => {
  482. logistics = res.data.data
  483. })
  484. if (logistics.auto_sketch_break_at !== "") {
  485. this.timeLeft = this.thistime(logistics.auto_sketch_break_at)
  486. } else {
  487. // 为初稿违约限制时间赋值并返回
  488. await this.$https.post('/youngee/c/t/p/get-auto-time', {
  489. task_id: this.taskId,
  490. type: 4,
  491. }).then(res => {
  492. this.timeLeft = this.thistime(res.data.data)
  493. })
  494. }
  495. } else {
  496. let scriptList = null;
  497. await this.$https.get('/youngee/c/t/g/get-task-script' +
  498. "?" +
  499. "task_id" +
  500. "=" +
  501. this.taskId)
  502. .then(res => {
  503. scriptList = res.data.data
  504. })
  505. for (let i = 0; i < scriptList.length; ++i) {
  506. if (scriptList[i].is_ok === 1) {
  507. if (scriptList[i].auto_sketch_break_at !== "") {
  508. this.timeLeft = this.thistime(scriptList[i].auto_sketch_break_at)
  509. } else {
  510. // 为初稿违约限制时间赋值并返回
  511. await this.$https.post('/youngee/c/t/p/get-auto-time', {
  512. task_id: this.taskId,
  513. type: 3,
  514. }).then(res => {
  515. this.timeLeft = this.thistime(res.data.data)
  516. })
  517. }
  518. }
  519. }
  520. }
  521. } else { //修改
  522. let sketchList = null;
  523. let sketch = null;
  524. await this.$https.get('/youngee/c/t/g/get-task-sketch' +
  525. "?" +
  526. "task_id" +
  527. "=" +
  528. this.taskId)
  529. .then(res => {
  530. sketchList = res.data.data
  531. for (let i = 0; i < sketchList.length; ++i) {
  532. if (sketchList[i].is_review === 1) {
  533. sketch = sketchList[i]
  534. }
  535. }
  536. })
  537. if (sketch.auto_sketch_break_at !== "") {
  538. this.timeLeft = this.thistime(sketch.auto_sketch_break_at)
  539. } else {
  540. // 为脚本违约限制时间赋值并返回
  541. let type = this.project.content_type === 1 ? 6 : 5;
  542. await this.$https.post('/youngee/c/t/p/get-auto-time', {
  543. task_id: this.taskId,
  544. type: type,
  545. }).then(res => {
  546. this.timeLeft = this.thistime(res.data.data)
  547. })
  548. }
  549. }
  550. this.msg1 = this.isTimeOut ? "初稿上传违约" : this.msg1
  551. break;
  552. case 11:
  553. // 首次提交
  554. if (this.task.link_status === 1) {
  555. let sketchList = null;
  556. await this.$https.get('/youngee/c/t/g/get-task-sketch' +
  557. "?" +
  558. "task_id" +
  559. "=" +
  560. this.taskId)
  561. .then(res => {
  562. sketchList = res.data.data
  563. })
  564. for (let i = 0; i < sketchList.length; ++i) {
  565. if (sketchList[i].is_ok === 1) {
  566. if (sketchList[i].auto_link_break_at !== "") {
  567. this.timeLeft = this.thistime(sketchList[i].auto_link_break_at)
  568. } else {
  569. // 为链接违约限制时间赋值并返回
  570. await this.$https.post('/youngee/c/t/p/get-auto-time', {
  571. task_id: this.taskId,
  572. type: 7,
  573. }).then(res => {
  574. this.timeLeft = this.thistime(res.data.data)
  575. })
  576. }
  577. }
  578. }
  579. } else {
  580. let linkList = null;
  581. let link = null;
  582. await this.$https.get('/youngee/c/t/g/get-task-link' +
  583. "?" +
  584. "task_id" +
  585. "=" +
  586. this.taskId)
  587. .then(res => {
  588. linkList = res.data.data
  589. for (let i = 0; i < linkList.length; ++i) {
  590. if (linkList[i].is_review === 1) {
  591. link = linkList[i]
  592. }
  593. }
  594. })
  595. if (link.auto_link_break_at !== "") {
  596. this.timeLeft = this.thistime(link.auto_link_break_at)
  597. } else {
  598. // 为脚本违约限制时间赋值并返回
  599. await this.$https.post('/youngee/c/t/p/get-auto-time', {
  600. task_id: this.taskId,
  601. type: 8,
  602. }).then(res => {
  603. this.timeLeft = this.thistime(res.data.data)
  604. })
  605. }
  606. }
  607. this.msg1 = this.isTimeOut ? "链接上传违约" : this.msg1
  608. break;
  609. case 13:
  610. // 首次提交
  611. if (this.task.data_status === 1) {
  612. let linkList = null;
  613. await this.$https.get('/youngee/c/t/g/get-task-link' +
  614. "?" +
  615. "task_id" +
  616. "=" +
  617. this.taskId)
  618. .then(res => {
  619. linkList = res.data.data
  620. })
  621. for (let i = 0; i < linkList.length; ++i) {
  622. if (linkList[i].is_ok === 1) {
  623. if (linkList[i].auto_data_break_at !== "") {
  624. this.timeLeft = this.thistime(linkList[i].auto_data_break_at)
  625. } else {
  626. // 为数据违约限制时间赋值并返回
  627. await this.$https.post('/youngee/c/t/p/get-auto-time', {
  628. task_id: this.taskId,
  629. type: 9,
  630. }).then(res => {
  631. this.timeLeft = this.thistime(res.data.data)
  632. })
  633. }
  634. }
  635. }
  636. } else {
  637. let dataList = null;
  638. let data = null;
  639. await this.$https.get('/youngee/c/t/g/get-task-data' +
  640. "?" +
  641. "task_id" +
  642. "=" +
  643. this.taskId)
  644. .then(res => {
  645. dataList = res.data.data
  646. for (let i = 0; i < dataList.length; ++i) {
  647. if (dataList[i].is_review === 1) {
  648. data = dataList[i]
  649. }
  650. }
  651. })
  652. if (data.auto_data_break_at !== "") {
  653. this.timeLeft = this.thistime(data.auto_data_break_at)
  654. } else {
  655. // 为脚本违约限制时间赋值并返回
  656. await this.$https.post('/youngee/c/t/p/get-auto-time', {
  657. task_id: this.taskId,
  658. type: 10,
  659. }).then(res => {
  660. this.timeLeft = this.thistime(res.data.data)
  661. })
  662. }
  663. }
  664. this.msg1 = this.isTimeOut ? "数据上传违约" : this.msg1
  665. break;
  666. default:
  667. break;
  668. }
  669. this.loading = false;
  670. uni.hideLoading();
  671. },
  672. getTaskInfo() {
  673. return this.$https.get('/youngee/c/t/g/get-task-detail' +
  674. "?" +
  675. "task_id" +
  676. "=" +
  677. this.taskId
  678. ).then(res => {
  679. console.log(res)
  680. this.task = res.data.data.task_info
  681. this.address = JSON.parse(res.data.data.task_info.talent_post_addr_snap);
  682. let a = this.address.region_code.toString().slice(0, 2)
  683. let b = this.address.region_code.toString().slice(0, 4)
  684. let c = 0
  685. for (var i = 0; i < region.length; i++) {
  686. if (region[i].code == a) {
  687. a = region[i].name
  688. for (var j = 0; j < region[i].children.length; j++) {
  689. if (region[i].children[j].code == b) {
  690. b = region[i].children[j].name
  691. for (var o = 0; o < region[i].children[j].children.length; o++) {
  692. if (region[i].children[j].children[o].code == this.address
  693. .region_code) {
  694. c = region[i].children[j].children[o].name
  695. }
  696. }
  697. }
  698. }
  699. }
  700. }
  701. this.address.full_detail_addr = a + b + c + this.address.detail_addr
  702. this.account = JSON.parse(res.data.data.task_info.talent_platform_info_snap);
  703. this.account.show_fans_count = fansview(this.account.fans_count)
  704. this.project = res.data.data.project_detail
  705. this.project.Product = JSON.parse(res.data.data.project_detail.product_snap);
  706. let ProductPhoto = JSON.parse(res.data.data.project_detail.product_photo_snap);
  707. for (let j = 0; j < ProductPhoto.length; ++j) {
  708. if (ProductPhoto[j].Symbol == 1) {
  709. this.product = ProductPhoto[j]
  710. }
  711. }
  712. this.strategy = res.data.data.strategy
  713. this.isSpecial = this.project.project_type === 2 ? true : false;
  714. if (!this.isSpecial) {
  715. this.strategy.show_followers_low = fansview(this.strategy.followers_low)
  716. this.strategy.show_followers_up = fansview(this.strategy.followers_up)
  717. this.strategy.fee_form_t = this.strategy.fee_form === 1 ? '产品置换' : (this.strategy
  718. .fee_form ===
  719. 2 ?
  720. '固定稿费 ' +
  721. this.task.task_reward : '创作者自报价 ' + this.task.task_reward)
  722. }
  723. this.project.content = this.project.content_type === 1 ? "图文" : "视频" // 任务形式
  724. this.project.project_form_t = this.task_type_info[this.project.project_form - 1] // 任务类型
  725. this.project.project_platform_t = this.platform[this.project.project_platform - 1] // 社媒平台
  726. // 不同任务阶段提示消息
  727. this.msg1 = this.infoMsg1[this.task.task_stage - 1]
  728. this.msg2 = this.isSpecial ? this.infoMsg3[this.task.task_stage - 1] : this.infoMsg2[this.task
  729. .task_stage - 1]
  730. if (this.task.task_stage == 7) {
  731. this.msg3 = "延迟上传脚本,可能导致佣金扣除。"
  732. } else if (this.task.task_stage == 9) {
  733. this.msg3 = "延迟上传初稿,可能导致佣金扣除。"
  734. } else if (this.task.task_stage == 11) {
  735. this.msg3 = "延迟上传链接,可能导致佣金扣除。"
  736. } else if (this.task.task_stage == 13) {
  737. this.msg3 = "延迟上传数据,可能导致佣金扣除。"
  738. }
  739. // 判断是否显示快速上传按钮
  740. if (this.task.task_stage == 7 || this.task.task_stage == 9 || this.task.task_stage == 11 ||
  741. this.task.task_stage == 13) {
  742. this.isShowUpload = true
  743. }
  744. // 判断确认提交按钮是否可用
  745. if (this.task.task_stage == 7 && (this.task.script_status == 2 || this.task.script_status ==
  746. 4)) {
  747. this.isNotShowSubmit = false
  748. }
  749. if (this.task.task_stage == 9 && (this.task.sketch_status == 2 || this.task.sketch_status ==
  750. 4)) {
  751. this.isNotShowSubmit = false
  752. }
  753. if (this.task.task_stage == 11 && (this.task.link_status == 2 || this.task.link_status == 4)) {
  754. this.isNotShowSubmit = false
  755. }
  756. if (this.task.task_stage == 13 && (this.task.data_status == 2 || this.task.data_status == 4)) {
  757. this.isNotShowSubmit = false
  758. }
  759. })
  760. },
  761. getTaskLogs() {
  762. return this.$https.get('/youngee/c/t/g/get-task-log' +
  763. "?" +
  764. "task_id" +
  765. "=" +
  766. this.taskId
  767. ).then(res => {
  768. this.taskLogs = res.data.data
  769. })
  770. },
  771. toUpload() {
  772. if (this.task.task_stage == 7) { // 上传脚本
  773. var data = {
  774. taskId: this.task.task_id,
  775. scriptStatus: this.task.script_status
  776. };
  777. data = JSON.stringify(data)
  778. uni.navigateTo({
  779. url: '/pages/workspace/uploadscript?textObj=' + encodeURIComponent(data)
  780. });
  781. } else if (this.task.task_stage == 9) { // 上传初稿
  782. var data = {
  783. taskId: this.task.task_id,
  784. sketchStatus: this.task.sketch_status
  785. };
  786. data = JSON.stringify(data)
  787. uni.navigateTo({
  788. url: '/pages/workspace/uploadsketch?textObj=' + encodeURIComponent(data)
  789. });
  790. } else if (this.task.task_stage == 11) { // 上传链接
  791. var data = {
  792. taskId: this.task.task_id,
  793. linkStatus: this.task.link_status
  794. };
  795. data = JSON.stringify(data)
  796. uni.navigateTo({
  797. url: '/pages/workspace/uploadlink?textObj=' + encodeURIComponent(data)
  798. });
  799. } else if (this.task.task_stage == 13) { // 上传数据
  800. var data = {
  801. taskId: this.task.task_id,
  802. dataStatus: this.task.data_status
  803. };
  804. data = JSON.stringify(data)
  805. uni.navigateTo({
  806. url: '/pages/workspace/uploaddata?textObj=' + encodeURIComponent(data)
  807. });
  808. }
  809. },
  810. toScriptRecord() {
  811. var data = {
  812. taskId: this.task.task_id,
  813. };
  814. data = JSON.stringify(data)
  815. uni.navigateTo({
  816. url: '/pages/workspace/scriptrecord?textObj=' + encodeURIComponent(data)
  817. });
  818. },
  819. toSketchRecord() {
  820. var data = {
  821. taskId: this.task.task_id,
  822. };
  823. data = JSON.stringify(data)
  824. uni.navigateTo({
  825. url: '/pages/workspace/sketchrecord?textObj=' + encodeURIComponent(data)
  826. });
  827. },
  828. toLinkRecord() {
  829. var data = {
  830. taskId: this.task.task_id,
  831. };
  832. data = JSON.stringify(data)
  833. uni.navigateTo({
  834. url: '/pages/workspace/linkrecord?textObj=' + encodeURIComponent(data)
  835. });
  836. },
  837. toDataRecord() {
  838. var data = {
  839. taskId: this.task.task_id,
  840. };
  841. data = JSON.stringify(data)
  842. uni.navigateTo({
  843. url: '/pages/workspace/datarecord?textObj=' + encodeURIComponent(data)
  844. });
  845. },
  846. toApplyinfo() {
  847. var data = {
  848. account: this.account,
  849. };
  850. data = JSON.stringify(data)
  851. uni.navigateTo({
  852. url: '/pages/workspace/applyInformation?textObj=' + encodeURIComponent(data)
  853. });
  854. },
  855. toLogisticsinfo() {
  856. console.log(this.project.project_form)
  857. var data = {
  858. address: this.address,
  859. taskId: this.task.task_id,
  860. projectForm: this.project.project_form
  861. };
  862. data = JSON.stringify(data)
  863. uni.navigateTo({
  864. url: '/pages/workspace/deliveryInformation?textObj=' + encodeURIComponent(data)
  865. });
  866. },
  867. editAddress() {
  868. var data = {
  869. address: this.address,
  870. taskId: this.task.task_id,
  871. };
  872. data = JSON.stringify(data)
  873. uni.navigateTo({
  874. url: '/pages/workspace/editaddress?textObj=' + encodeURIComponent(data)
  875. });
  876. },
  877. // 计算结束时间
  878. thistime(val) {
  879. // 转换格式
  880. var beginTime = new Date(val.replace(/-/g, "/"));
  881. // 当前时间
  882. var thisTime = new Date();
  883. // 相减
  884. var dateMiss = beginTime.getTime() - thisTime.getTime();
  885. this.isTimeOut = dateMiss < 0 ? true : false
  886. dateMiss = dateMiss < 0 ? -dateMiss : dateMiss
  887. // 天数
  888. var day = Math.floor(dateMiss / (24 * 3600 * 1000));
  889. // 减去天数剩下的毫秒数
  890. var backOne = dateMiss % (24 * 3600 * 1000);
  891. // 小时数
  892. var hours = Math.floor(backOne / (3600 * 1000));
  893. // 减去小时数剩下的毫秒数
  894. var backHour = backOne % (3600 * 1000);
  895. // 分钟数
  896. var min = Math.floor(backHour / (60 * 1000));
  897. var deadline_time = day + '天' + hours + '时' + min + '分'
  898. return deadline_time
  899. },
  900. toWithdraw() {
  901. uni.navigateTo({
  902. url: '/pages/mycenter/myincome?showTab=1'
  903. });
  904. },
  905. submit() {
  906. if (this.task.task_stage == 7) { // 提交脚本
  907. let that = this
  908. uni.showModal({
  909. title: '提示',
  910. content: '提交后无法修改并进行审核,确认提交?',
  911. success: function(res) {
  912. if (res.confirm) {
  913. that.$https.get('/youngee/c/t/g/submit-task-script' +
  914. "?" +
  915. "task_id" +
  916. "=" +
  917. that.task.task_id)
  918. .then(res => {
  919. console.log(res)
  920. uni.navigateBack()
  921. })
  922. } else if (res.cancel) {
  923. console.log('用户点击取消');
  924. }
  925. }
  926. });
  927. } else if (this.task.task_stage == 9) { // 提交初稿
  928. let that = this
  929. uni.showModal({
  930. title: '提示',
  931. content: '提交后无法修改并进行审核,确认提交?',
  932. success: function(res) {
  933. if (res.confirm) {
  934. that.$https.get('/youngee/c/t/g/submit-task-sketch' +
  935. "?" +
  936. "task_id" +
  937. "=" +
  938. that.task.task_id)
  939. .then(res => {
  940. console.log(res)
  941. uni.navigateBack()
  942. })
  943. } else if (res.cancel) {
  944. console.log('用户点击取消');
  945. }
  946. }
  947. });
  948. } else if (this.task.task_stage == 11) { // 提交链接
  949. let that = this
  950. uni.showModal({
  951. title: '提示',
  952. content: '提交后无法修改并进行审核,确认提交?',
  953. success: function(res) {
  954. if (res.confirm) {
  955. that.$https.get('/youngee/c/t/g/submit-task-link' +
  956. "?" +
  957. "task_id" +
  958. "=" +
  959. that.task.task_id)
  960. .then(res => {
  961. console.log(res)
  962. uni.navigateBack()
  963. })
  964. } else if (res.cancel) {
  965. console.log('用户点击取消');
  966. }
  967. }
  968. });
  969. } else if (this.task.task_stage == 13) { // 提交数据
  970. let that = this
  971. uni.showModal({
  972. title: '提示',
  973. content: '提交后无法修改并进行审核,确认提交?',
  974. success: function(res) {
  975. if (res.confirm) {
  976. that.$https.get('/youngee/c/t/g/submit-task-data' +
  977. "?" +
  978. "task_id" +
  979. "=" +
  980. that.task.task_id)
  981. .then(res => {
  982. console.log(res)
  983. uni.navigateBack()
  984. })
  985. } else if (res.cancel) {
  986. console.log('用户点击取消');
  987. }
  988. }
  989. });
  990. }
  991. }
  992. }
  993. }
  994. </script>
  995. <style lang="scss" scoped>
  996. text {
  997. font-size: 12px;
  998. }
  999. .basicInfo {
  1000. display: flex;
  1001. margin-top: 20rpx;
  1002. padding: 20rpx 40rpx;
  1003. background-color: #FFFFFF;
  1004. .basicInfo_txt {
  1005. margin-left: 40rpx;
  1006. padding-top: 20rpx;
  1007. }
  1008. }
  1009. .upload-btn {
  1010. display: flex;
  1011. align-items: center;
  1012. justify-content: center;
  1013. background-color: #f2d241;
  1014. border-radius: 10rpx;
  1015. padding: 5rpx;
  1016. margin-left: 20rpx;
  1017. cursor: pointer;
  1018. }
  1019. .address {
  1020. display: flex;
  1021. margin: 20rpx 0;
  1022. // padding: 20rpx 20rpx;
  1023. background-color: #FFFFFF;
  1024. justify-content: space-around;
  1025. align-items: center;
  1026. .address_icon {
  1027. width: 15%;
  1028. vertical-align: middle;
  1029. display: flex;
  1030. justify-content: center;
  1031. }
  1032. .address_edit {
  1033. width: 15%;
  1034. }
  1035. .address_edit image {
  1036. vertical-align: middle;
  1037. width: 50rpx;
  1038. height: 50rpx;
  1039. display: inline-block;
  1040. padding-right: 14rpx;
  1041. }
  1042. .ipon {
  1043. color: #333333;
  1044. font-size: 30rpx;
  1045. font-weight: 500;
  1046. margin-bottom: 10rpx;
  1047. }
  1048. }
  1049. .keyInfo {
  1050. padding: 20rpx 20rpx;
  1051. background-color: #FFFFFF;
  1052. .keyInfo_task {
  1053. color: #999999;
  1054. }
  1055. }
  1056. .keyInfo h3 {
  1057. font-weight: 600;
  1058. }
  1059. .keyInfo p {
  1060. font-size: 30rpx;
  1061. }
  1062. .account {
  1063. display: flex;
  1064. align-items: center;
  1065. // justify-content: space-between;
  1066. // width: 90%;
  1067. margin: 20rpx 0;
  1068. padding: 20rpx 20rpx;
  1069. background-color: #FFFFFF;
  1070. font-size: 35rpx;
  1071. .account_txt {
  1072. display: inline-block;
  1073. padding: 0 0 0 1%;
  1074. width: 400rpx;
  1075. }
  1076. .account_txt image {
  1077. vertical-align: middle;
  1078. width: 50rpx;
  1079. height: 50rpx;
  1080. display: inline-block;
  1081. padding-right: 14rpx;
  1082. }
  1083. .account_fans {
  1084. display: flex;
  1085. width: 250rpx;
  1086. }
  1087. .account_fans p {
  1088. display: inline-block;
  1089. color: #333333;
  1090. font-weight: 550;
  1091. }
  1092. .account_btn {}
  1093. }
  1094. .task-progress {
  1095. padding: 20rpx;
  1096. .task-progress-card {
  1097. margin: 15rpx 0;
  1098. display: flex;
  1099. align-items: center;
  1100. // margin: 20rpx;
  1101. padding: 10rpx;
  1102. font-size: 30rpx;
  1103. border-radius: 10rpx;
  1104. .tpc-txt1 {
  1105. display: flex;
  1106. justify-content: flex-start;
  1107. // margin-left: 20rpx;
  1108. }
  1109. .tpc-txt2 {
  1110. display: flex;
  1111. align-items: center;
  1112. justify-content: flex-end;
  1113. // margin-right: 20rpx;
  1114. flex: 1;
  1115. .tpc-icon {
  1116. width: 30rpx;
  1117. height: 30rpx;
  1118. }
  1119. }
  1120. }
  1121. .task-progress-info {
  1122. padding: 10rpx;
  1123. font-size: 30rpx;
  1124. border-radius: 10rpx;
  1125. background-color: #f2f2f2;
  1126. }
  1127. }
  1128. .block {
  1129. width: 100%;
  1130. height: 100rpx;
  1131. margin-top: 5%;
  1132. }
  1133. .submit {
  1134. box-shadow: 0rpx 5rpx 40rpx #ccc;
  1135. width: 100%;
  1136. position: fixed;
  1137. bottom: 0rpx;
  1138. display: flex;
  1139. height: 90rpx;
  1140. padding-top: 2%;
  1141. background-color: #FFFFFF;
  1142. .submit_btn {
  1143. width: 60%;
  1144. // background-color: #FCCF41;
  1145. border-radius: 20rpx;
  1146. font-size: 36rpx;
  1147. line-height: 200%;
  1148. letter-spacing: 10rpx;
  1149. font-weight: 500;
  1150. height: 80%;
  1151. }
  1152. }
  1153. .line {
  1154. border-bottom: 1rpx solid #d5d5d5;
  1155. width: 98%;
  1156. margin: 10rpx 1%;
  1157. }
  1158. </style>