repairConfirmation.vue 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. <template>
  2. <zj-page-layout :hasFooter="true" :isScroll="false">
  3. <view class="card-container">
  4. <block v-if="defaultPath">
  5. <image :src="imageUrl + defaultPath" class="canvasImg" mode="widthFix"></image>
  6. </block>
  7. <block v-else>
  8. <image :src="path" class="canvasImg" mode="widthFix"></image>
  9. <l-painter
  10. isCanvasToTempFilePath
  11. pathType="url"
  12. @success="canvasSuccess($event)"
  13. hidden
  14. css="background: #ffffff; border-radius: 20rpx; padding: 0 30rpx;"
  15. >
  16. <template>
  17. <l-painter-view css="text-align: center; line-height: 140rpx;">
  18. <l-painter-text text="确认书" css="font-size: 40rpx; font-weight: 500;" />
  19. </l-painter-view>
  20. <template v-if="type == 'gz'">
  21. <l-painter-view css="text-align: left; line-height: 38rpx;text-indent: 2em;">
  22. <l-painter-text
  23. text="鉴于格力电器售后服务过程中存在用户未自行提供产品标配之外辅材配件(如:空气开关、铜管、支架、地架等格力指定专供辅材)需要用户额外付费配置的现象,按照珠海格力公司售后服务要求:为避免安装维修人员使用劣质辅材配件影响产品质量有损品牌名誉以及乱收费从而扰乱格力售后服务市场,本人承诺:本人务必在指定售后服务网点自行采购辅材配件以供备用,在从事安装工单或维修工单中涉及产品标配以外辅材配件按照指导价销售给用户并需要将应当收取用户的辅材配件费用录入系统内对应工单,并要用户扫码付款即“电子支付”后,再由广州嘉讯茂机电工程有限公司通过微信分账形式直接支付到本人微信钱包中。"
  24. css="font-size: 26rpx;text-indent: 2em;"
  25. />
  26. </l-painter-view>
  27. <l-painter-view css="text-align: left; line-height: 38rpx;text-indent: 2em;">
  28. <l-painter-text
  29. text="本人通过售卖自行购入的安装维修服务过程中需使用到非产品标配辅材配件,此费用由用户在格力售后系统平台结算后,平台通过微信分账形式返还给乙方,产生的微信支付手续费由乙方自行承担。本人已清楚知晓收到的微信分账结算费用属于辅材配件费用,不属于本人履行安装维修服务而获取的工资报酬组成。广州嘉讯茂机电工程有限公司不为本人向用户收取的辅材配件费用承担任何责任。"
  30. css="font-size: 26rpx;text-indent: 2em;"
  31. />
  32. </l-painter-view>
  33. </template>
  34. <template v-if="type == 'fs'">
  35. <l-painter-view css="text-align: left; line-height: 38rpx;text-indent: 2em;">
  36. <l-painter-text
  37. text="鉴于格力电器售后服务过程中存在用户未自行提供产品标配之外辅材配件(如:空气开关、铜管、支架、地架等格力指定专供辅材)需要用户额外付费配置的现象,按照珠海格力公司售后服务要求:为避免安装维修人员使用劣质辅材配件影响产品质量有损品牌名誉以及乱收费从而扰乱格力售后服务市场,本人承诺:本人务必在指定售后服务网点自行采购辅材配件以供备用,在从事安装工单或维修工单中涉及产品标配以外辅材配件按照指导价销售给用户并需要将应当收取用户的辅材配件费用录入系统内对应工单,并要用户扫码付款即“电子支付”后,再由佛山嘉讯茂机电工程有限公司通过微信分账形式直接支付到本人微信钱包中。"
  38. css="font-size: 26rpx;text-indent: 2em;"
  39. />
  40. </l-painter-view>
  41. <l-painter-view css="text-align: left; line-height: 38rpx;text-indent: 2em;">
  42. <l-painter-text
  43. text="本人通过售卖自行购入的安装维修服务过程中需使用到非产品标配辅材配件,此费用由用户在格力售后系统平台结算后,平台通过微信分账形式返还给乙方,产生的微信支付手续费由乙方自行承担。本人已清楚知晓收到的微信分账结算费用属于辅材配件费用,不属于本人履行安装维修服务而获取的工资报酬组成。佛山嘉讯茂机电工程有限公司不为本人向用户收取的辅材配件费用承担任何责任。"
  44. css="font-size: 26rpx;text-indent: 2em;"
  45. />
  46. </l-painter-view>
  47. </template>
  48. <l-painter-view>
  49. <l-painter-text text="服务人员:" css="font-size: 28rpx; color: #666666;" />
  50. <l-painter-text
  51. :text="`${userInfo.nickName || ''}(${userInfo.workerNumber || ''})`"
  52. css="font-size: 28rpx;"
  53. />
  54. </l-painter-view>
  55. <l-painter-view css="margin-top: 20rpx;">
  56. <l-painter-text text="签署日期:" css="font-size: 28rpx; color: #666666;" />
  57. <l-painter-text :text="getNowDate()" css="font-size: 28rpx;" />
  58. </l-painter-view>
  59. <l-painter-view css="margin-top: 20rpx;">
  60. <l-painter-text text="用户签名:" css="font-size: 28rpx; color: #666666;" />
  61. </l-painter-view>
  62. <template v-if="signNameUrl">
  63. <l-painter-image
  64. :src="signNameUrl"
  65. css="object-fit: contain; margin-top: 20rpx; width: 600rpx; height: 400rpx;"
  66. />
  67. </template>
  68. <template v-else>
  69. <l-painter-view css="height: 600rpx"></l-painter-view>
  70. </template>
  71. </template>
  72. </l-painter>
  73. </block>
  74. </view>
  75. <template slot="footer">
  76. <view class="footer-btn-group" v-if="!isFinishSign && !defaultPath">
  77. <u-button text="点击签名" type="primary" size="large" @click="navToPage(`/pages/signName`)"></u-button>
  78. </view>
  79. <view class="footer-btn-group" v-else>
  80. <u-button text="重新签名" type="primary" size="large" plain @click="navToPage(`/pages/signName`)"></u-button>
  81. <u-button text="确认提交" type="primary" size="large" @click="submitData"></u-button>
  82. </view>
  83. </template>
  84. </zj-page-layout>
  85. </template>
  86. <script>
  87. import lPainter from '@/components/lime-painter/components/l-painter/l-painter.vue'
  88. import lPainterView from '@/components/lime-painter/components/l-painter-view/l-painter-view.vue'
  89. import lPainterText from '@/components/lime-painter/components/l-painter-text/l-painter-text.vue'
  90. import store from '@/store/index.js'
  91. import { platform } from '@/common/utils/index'
  92. import { mini_env } from '@/common/utils/util'
  93. export default {
  94. components: {
  95. lPainter,
  96. lPainterView,
  97. lPainterText
  98. },
  99. data() {
  100. return {
  101. imageUrl: this.$imageUrl,
  102. userInfo: {},
  103. signNameUrl: '',
  104. defaultPath: '',
  105. path: '',
  106. isFinishSign: false,
  107. type: ''
  108. }
  109. },
  110. async onLoad({ url, type }) {
  111. this.type = type
  112. this.userInfo = await this.$getUserInfo()
  113. if (url) {
  114. this.defaultPath = url
  115. }
  116. uni.$on('finishSign', async data => {
  117. this.defaultPath = ''
  118. this.signNameUrl = data
  119. })
  120. },
  121. onUnload() {
  122. uni.$off('finishSign')
  123. },
  124. methods: {
  125. getNowDate() {
  126. const date = new Date()
  127. let year = date.getFullYear()
  128. let month = date.getMonth() + 1
  129. let day = date.getDate()
  130. month = month > 9 ? month : '0' + month
  131. day = day > 9 ? day : '0' + day
  132. return `${year}年${month}月${day}日`
  133. },
  134. canvasSuccess(val) {
  135. if (this.signNameUrl) {
  136. this.isFinishSign = true
  137. }
  138. this.path = val
  139. },
  140. navToPage(url) {
  141. uni.navigateTo({
  142. url
  143. })
  144. },
  145. async submitData() {
  146. mini_env(bool => {
  147. uni.uploadFile({
  148. header: {
  149. 'x-token': store.getters.token,
  150. APPID: store.getters.appId,
  151. Program: {
  152. H5: 'wap',
  153. APP: 'app',
  154. APPNVUE: 'app',
  155. WEIXIN: 'miniProgram'
  156. }[platform()],
  157. source: bool ? 'A' : 'B',
  158. miniOpenId: store.getters.miniOpenId,
  159. sharerOpenId: store.getters.sharerOpenId
  160. },
  161. url: `${process.env.VUE_APP_BASE_URL + process.env.VUE_APP_BASE_API}/worker/ocr/handwriting`,
  162. files: [
  163. {
  164. name: 'file',
  165. uri: this.path
  166. },
  167. {
  168. name: 'signFile',
  169. uri: this.signNameUrl
  170. }
  171. ],
  172. formData: {
  173. type: this.type
  174. },
  175. success: uploadFileRes => {
  176. if (JSON.parse(uploadFileRes.data)?.data) {
  177. this.$navToPage(
  178. {
  179. url: '/pages/index/index'
  180. },
  181. 'switchTab'
  182. )
  183. } else {
  184. uni.showModal({
  185. title: '提交失败',
  186. content: '您的签名不符合要求,请重新签署!',
  187. showCancel: false,
  188. confirmText: '知道了',
  189. success: function (res) {}
  190. })
  191. }
  192. }
  193. })
  194. })
  195. }
  196. }
  197. }
  198. </script>
  199. <style lang="scss" scoped>
  200. .card-container {
  201. @include zj-card;
  202. margin: 30rpx;
  203. .canvasImg {
  204. width: 100%;
  205. }
  206. .title {
  207. font-size: 40rpx;
  208. font-weight: 500;
  209. line-height: 140rpx;
  210. text-align: center;
  211. }
  212. .main {
  213. flex: 1;
  214. padding-bottom: 30rpx;
  215. .row {
  216. padding: 15rpx 0;
  217. display: flex;
  218. align-items: center;
  219. color: $reg-font;
  220. ::v-deep .u-button {
  221. width: 180rpx;
  222. height: 68rpx;
  223. }
  224. text {
  225. color: $main-font;
  226. font-weight: 500;
  227. }
  228. }
  229. }
  230. .bottom {
  231. padding-bottom: 60rpx;
  232. .text {
  233. color: $sec-font;
  234. }
  235. .info {
  236. margin-top: 30rpx;
  237. view {
  238. color: $minor-color;
  239. line-height: 36rpx;
  240. }
  241. }
  242. }
  243. }
  244. </style>