shopTourOver.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <view class="shopTourOver-wrap">
  3. <!-- 店长签名 -->
  4. <view class="autograph-con">
  5. <text class="autograph-tit">店长签名:</text>
  6. <view class="autograph-main">
  7. <autograph-to-pic canvasId="handWriting-dz" :isEmpty="isEmpty" />
  8. </view>
  9. </view>
  10. <!-- 巡店人签名 -->
  11. <view class="autograph-con">
  12. <text class="autograph-tit">巡店人签名:</text>
  13. <view class="autograph-main">
  14. <autograph-to-pic canvasId="handWriting-xd" :isEmpty="isEmpty" />
  15. </view>
  16. </view>
  17. <u-button type="primary" shape="circle" class="submit-btn" @click="submitFun">提交</u-button>
  18. </view>
  19. </template>
  20. <script>
  21. import AutographToPic from '@/components/autograph-to-pic/autograph-to-pic.vue'
  22. import {submitTask} from '@/api/task'
  23. import { clzConfirm,saveBase64ToAliOss } from '@/libs/tools'
  24. export default{
  25. components: {
  26. AutographToPic
  27. },
  28. data(){
  29. return{
  30. isEmpty: [ // 是否为空判断
  31. {name: 'handWriting-dz', state: true},
  32. {name: 'handWriting-xd', state: true}
  33. ],
  34. taskId: '',
  35. inspectorSign:'', // 巡店人签名
  36. storeManagerSign:'', // 店长签名
  37. }
  38. },
  39. onLoad(opts) {
  40. this.taskId = opts.taskId
  41. },
  42. methods: {
  43. // 提交本次任务
  44. submitFun(){
  45. const _this = this
  46. console.log({inspectorSign: _this.inspectorSign, storeManagerSign: _this.storeManagerSign})
  47. // clzConfirm({
  48. // title: '提示',
  49. // content: '确定提交本次巡店?',
  50. // success: function(res) {
  51. // if (res.confirm || res.index == 0) {
  52. // submitTask({
  53. // id: _this.taskId,
  54. // inspectorSign: _this.inspectorSign,
  55. // storeManagerSign: _this.storeManagerSign
  56. // }).then(ret=>{
  57. // console.log(ret)
  58. // if(ret.status == 200){
  59. // // 关闭上页
  60. // uni.$emit("closeTour",1)
  61. // // 打开完成页面
  62. // uni.redirectTo({
  63. // url:"/pages/shopTourCompleted/shopTourCompleted?taskId="+_this.taskId
  64. // })
  65. // }
  66. // uni.showToast({
  67. // icon:'none',
  68. // title: ret.message
  69. // })
  70. // })
  71. // }
  72. // }
  73. // });
  74. },
  75. }
  76. }
  77. </script>
  78. <style lang="scss" scoped>
  79. page{
  80. background-color: #f8f8f8;
  81. height: calc(100vh - 44px);
  82. }
  83. .shopTourOver-wrap{
  84. height: 100%;
  85. .autograph-con{
  86. margin: 30upx 30upx 0;
  87. border-radius: 12upx;
  88. background-color: #fff;
  89. .autograph-tit{
  90. display: block;
  91. padding: 20upx 30upx;
  92. }
  93. }
  94. .submit-btn{
  95. width: 80%;
  96. margin: 60upx auto 40upx;
  97. }
  98. }
  99. </style>