混凝土运输管理微信小程序、替班
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

236 lines
7.3 KiB

1 week ago
  1. <template>
  2. <view class="content">
  3. <view class="cr mt40">
  4. <view class="re-card-p32">
  5. <view class="flex-sb">
  6. <view class="re-from-label">请拍摄仪表盘照片</view>
  7. <view class="re-card-show" @click="clickShowExample('https://relief.oss-cn-hangzhou.aliyuncs.com/one01.png')">查看示例</view>
  8. </view>
  9. <input-image @success="(url) => from.a = url" :height="456"/>
  10. <view class="re-card-context">
  11. 请拍摄车辆启动后的仪表 确保柴油油位照片<span>机油压力水温和故障预警照片清晰无倾斜</span>
  12. </view>
  13. </view>
  14. <view class="re-card-p32">
  15. <view class="flex-sb">
  16. <view class="re-from-label">请拍摄车身前方照片</view>
  17. <view class="re-card-show" @click="clickShowExample('https://relief.oss-cn-hangzhou.aliyuncs.com/one02.png')">查看示例</view>
  18. </view>
  19. <input-image @success="(url) => from.b = url" :height="456"/>
  20. <view class="re-card-context">
  21. 需拍摄<span>车辆前方</span>照片以保证车辆交车状况
  22. </view>
  23. </view>
  24. <view class="re-card-p32">
  25. <view class="flex-sb">
  26. <view class="re-from-label">请拍摄车身后方照片</view>
  27. <view class="re-card-show" @click="clickShowExample('https://relief.oss-cn-hangzhou.aliyuncs.com/one08.png')">查看示例</view>
  28. </view>
  29. <input-image @success="(url) => from.c = url" :height="456"/>
  30. <view class="re-card-context">
  31. 需拍摄<span>车辆后方</span>照片以保证车辆交车状况
  32. </view>
  33. </view>
  34. <view class="re-card-p32">
  35. <view class="flex-sb">
  36. <view class="re-from-label">请拍摄车身左侧方照片</view>
  37. <view class="re-card-show" @click="clickShowExample('https://relief.oss-cn-hangzhou.aliyuncs.com/one04.png')">查看示例</view>
  38. </view>
  39. <input-image @success="(url) => from.d = url" :height="456"/>
  40. <view class="re-card-context">
  41. 需拍摄<span>车辆左侧方</span>照片以保证车辆交车状况
  42. </view>
  43. </view>
  44. <view class="re-card-p32">
  45. <view class="flex-sb">
  46. <view class="re-from-label">请拍摄车身右侧方照片</view>
  47. <view class="re-card-show" @click="clickShowExample('https://relief.oss-cn-hangzhou.aliyuncs.com/one03.png')">查看示例</view>
  48. </view>
  49. <input-image @success="(url) => from.e = url" :height="456"/>
  50. <view class="re-card-context">
  51. 需拍摄<span>车辆右侧方</span>照片以保证车辆交车状况
  52. </view>
  53. </view>
  54. <view class="re-card-p32">
  55. <view class="flex-sb">
  56. <view class="re-from-label">请拍摄当前工作环境</view>
  57. <view class="re-card-show" @click="clickShowExample('https://relief.oss-cn-hangzhou.aliyuncs.com/one07.png')">查看示例</view>
  58. </view>
  59. <input-image @success="(url) => from.f = url" :height="456"/>
  60. <view class="re-card-context">
  61. 需拍摄<span>车辆四周</span>照片以保证平台任务相符
  62. </view>
  63. </view>
  64. <view class="re-card-p32">
  65. <view class="flex-sb">
  66. <view class="re-from-label">请拍摄水槽照片</view>
  67. <view class="re-card-show" @click="clickShowExample('https://relief.oss-cn-hangzhou.aliyuncs.com/one05.png')">查看示例</view>
  68. </view>
  69. <input-image @success="(url) => from.g = url" :height="456"/>
  70. <view class="re-card-context">
  71. 需拍摄<span>车辆水槽</span>照片以保证水位能满足车辆降温
  72. </view>
  73. </view>
  74. <view class="re-card-p32">
  75. <view class="flex-sb">
  76. <view class="re-from-label">请拍摄液压油位照片</view>
  77. <view class="re-card-show" @click="clickShowExample('https://relief.oss-cn-hangzhou.aliyuncs.com/one06.png')">查看示例</view>
  78. </view>
  79. <input-image @success="(url) => from.h = url" :height="456"/>
  80. <view class="re-card-context">
  81. 需拍摄<span>车辆液压油位</span>照片以保证油位满足正常施工
  82. </view>
  83. </view>
  84. <!-- <view class="re-card-p32">
  85. <view class="flex-sb">
  86. <view class="re-from-label">请按照要求拍摄一段视频</view>
  87. <view class="re-card-show" @click="clickShowExample('https://relief.oss-cn-hangzhou.aliyuncs.com/one_cv.mp4')">查看示例</view>
  88. </view>
  89. <input-voide @success="(url) => from.i = url" :height="456"/>
  90. <view class="re-card-context">
  91. 请尽量拍摄一段保持<span>在2分钟内</span>的视频视频应包含<span>清晰车牌车身四面施工环境</span>内容
  92. </view>
  93. </view> -->
  94. <view class="re-card-p32">
  95. <view class="re-from-label">备注<span>选填</span></view>
  96. <textarea v-model="from.remark" class="re-card-textarea inpit" placeholder=" 如在施工过程中发现问题,请用文字描述。"/>
  97. </view>
  98. </view>
  99. <view class="re-end-pand">
  100. <button @click="clickSaveAndBack">提交保存</button>
  101. </view>
  102. <show-example ref="showe" :show="show" :url="url" @close="show=false"/>
  103. </view>
  104. </template>
  105. <script>
  106. import InputImage from "/components/input-image.vue"
  107. import InputVoide from "/components/input-voide.vue"
  108. import ShowExample from "/components/show-example.vue"
  109. export default {
  110. components: {
  111. InputImage,
  112. InputVoide,
  113. ShowExample
  114. },
  115. data() {
  116. return {
  117. show: false,
  118. url: "",
  119. orderId: "",
  120. from: {
  121. a:"",
  122. b:"",
  123. c:"",
  124. d:"",
  125. e:"",
  126. f:"",
  127. g:"",
  128. h:"",
  129. i:"",
  130. j:"",
  131. k:"",
  132. remark: ""
  133. },
  134. }
  135. },
  136. onLoad(opn) {
  137. this.orderId = opn.id
  138. },
  139. methods: {
  140. clickShowExample(url){
  141. if(url){
  142. this.url = url
  143. } else {
  144. this.url = "https://relief.oss-cn-hangzhou.aliyuncs.com/yx.jpg"
  145. }
  146. this.show = true
  147. },
  148. clickSaveAndBack(){
  149. if(!this.from.a || !this.from.b || !this.from.c || !this.from.d
  150. ||!this.from.e || !this.from.f || !this.from.g || !this.from.h){
  151. uni.showToast({ icon: "none", title: "请按照要求拍摄上传照片" })
  152. return
  153. }
  154. //if(!this.from.remark){
  155. // uni.showToast({ icon: "none", title: "开工备注必填" })
  156. // return
  157. //}
  158. this.doSubmit()
  159. },
  160. doSubmit(){
  161. const _this = this;
  162. this.from.id = this.$utils.generateUUID()
  163. this.from.status = 1
  164. this.from.step = 1
  165. this.from.orderId = this.orderId
  166. console.log(this.from);
  167. this.$httpPost("/api/order/image", this.from, function(res) {
  168. console.log('[/order/image]', res);
  169. if(res.data && res.data>0){
  170. _this.$httpPost("/api/order/status", _this.from, function(res) {
  171. console.log('[/order/status]', res);
  172. if(res.data){
  173. uni.showToast({ icon: "success", title: "提交成功" })
  174. setTimeout(()=>{
  175. uni.navigateBack({ delta: 1 });
  176. }, 1500)
  177. }
  178. })
  179. } else {
  180. uni.showModal({
  181. title: "提交失败",
  182. content: `本次提交失败,您可以停留在本页面,稍后再次尝试提交,错误码[${res.data}]`,
  183. success: (res) => {
  184. if(res.confirm === true){
  185. }
  186. }
  187. })
  188. }
  189. })
  190. }
  191. }
  192. }
  193. </script>
  194. <style>
  195. page {
  196. background-color: #F5F5F5;
  197. }
  198. .cr {
  199. min-height: calc(88vh);
  200. }
  201. /deep/ uni-radio .uni-radio-input{
  202. background-color: #F40000 !important;
  203. border-color: #F40000 !important;
  204. }
  205. /deep/ uni-radio .uni-radio-input:empty{
  206. background-color: #ffffff !important;
  207. border-color: #d1d1d1 !important;
  208. }
  209. .re-from-car{
  210. width: 72rpx;
  211. height: 60rpx;
  212. margin: 0 16rpx -20rpx 0;
  213. }
  214. </style>