酒店桌布为微信小程序
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.

321 lines
5.9 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
  1. <template>
  2. <!-- 破损上报 -->
  3. <view class="help">
  4. <navbar title="破损上报" leftClick @leftClick="$utils.navigateBack" />
  5. <uv-radio-group
  6. @change="change"
  7. v-model="form.orderDetailId">
  8. <view class="flex">
  9. <view class="server-item"
  10. v-for="(p, i) in list"
  11. :key="i">
  12. <view class="radio">
  13. <uv-radio :name="p.id"
  14. :disabled="!!p.status"
  15. activeColor="#FA5A0A" size="40rpx"
  16. icon-size="35rpx"></uv-radio>
  17. </view>
  18. <view class="img-box">
  19. <image :src="p.pic" mode="aspectFill"></image>
  20. </view>
  21. <view class="server-info">
  22. <view class="server-title">
  23. 产品名称{{p.goodsName}}
  24. </view>
  25. <view class="sales-volume" style="margin-top: 5px;">
  26. <view class="desc">规格{{p.sku}}</view>
  27. </view>
  28. <view class="sales-volume" style="margin-top: 5px;">
  29. <view class="desc">数量{{p.num}}</view>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </uv-radio-group>
  35. <view class="type">
  36. <span>破损数量</span>
  37. <span>
  38. <uv-number-box
  39. v-model="form.num" :min="1"
  40. :max="max"></uv-number-box>
  41. </span>
  42. </view>
  43. <view class="help-box">
  44. <view>
  45. <uv-textarea
  46. :count="true"
  47. v-model="form.info"
  48. border="none" height="400"
  49. placeholder="请输入破损的细节部位....."
  50. :text-style="{color:'#000',fontSize:'28rpx'}" />
  51. </view>
  52. <view>
  53. <view class="help-issue">
  54. <text>上传图片</text>
  55. <text style="color: #BD3624;">*</text>
  56. </view>
  57. <view class="help-screenshot">
  58. <uv-upload :fileList="fileList" multiple :maxCount="6" width="180rpx"
  59. height="180rpx" multiple @afterRead="afterRead" @delete="deleteImage">
  60. <image src="../static/help/uploading.png" mode="aspectFill"
  61. style="width: 180rpx;height: 180rpx;" />
  62. </uv-upload>
  63. </view>
  64. </view>
  65. <view class="help-button">
  66. <view
  67. @click="submit">提交审核</view>
  68. </view>
  69. </view>
  70. </view>
  71. </template>
  72. <script>
  73. import mixinOrder from '@/mixins/order.js'
  74. export default {
  75. mixins : [mixinOrder],
  76. data() {
  77. return {
  78. fileList: [],
  79. form : {
  80. orderDetailId : 0,
  81. num : 1,
  82. info : '',
  83. },
  84. list: {},
  85. orderId: 0,
  86. max : 1,
  87. }
  88. },
  89. onLoad(agrs) {
  90. this.orderId = agrs.id
  91. },
  92. onShow() {
  93. this.getData()
  94. },
  95. methods: {
  96. change(e){
  97. this.list.forEach(n => {
  98. if(n.id == e){
  99. this.max = n.num
  100. }
  101. })
  102. },
  103. deleteImage(e){
  104. this.fileList.splice(e.index, 1)
  105. },
  106. afterRead(e){
  107. let self = this
  108. e.file.forEach(file => {
  109. self.$Oss.ossUpload(file.url).then(url => {
  110. self.fileList.push({
  111. url
  112. })
  113. })
  114. })
  115. },
  116. // 查询订单详情
  117. getData() {
  118. this.$api('detailList', {
  119. id: this.orderId
  120. }, res => {
  121. uni.stopPullDownRefresh()
  122. if (res.code == 200) {
  123. this.list = res.result
  124. }
  125. })
  126. },
  127. submit(){
  128. this.form.pic = this.fileList.map(item=>item.url).join(",")
  129. if (this.$utils.verificationAll(this.form, {
  130. orderDetailId : '请选择产品',
  131. info: '请输入破损的细节部位',
  132. pic: '请上传图片',
  133. })) {
  134. return
  135. }
  136. this.orderConfirmedDamage({id : this.orderId}, 2, this.form,
  137. () => {
  138. uni.redirectTo({
  139. url:'/pages/index/order'
  140. })
  141. })
  142. },
  143. }
  144. }
  145. </script>
  146. <style scoped lang="scss">
  147. .help {
  148. .server-item {
  149. display: flex;
  150. flex-wrap: wrap;
  151. align-items: center;
  152. background: white;
  153. border-radius: 15rpx;
  154. box-sizing: border-box;
  155. margin: 30rpx;
  156. width: 690rpx;
  157. .radio{
  158. width: 100rpx;
  159. height: 180rpx;
  160. display: flex;
  161. justify-content: center;
  162. align-items: center;
  163. }
  164. .img-box {
  165. width: 180rpx;
  166. height: 180rpx;
  167. border-radius: 10rpx;
  168. overflow: hidden;
  169. image {
  170. width: 100%;
  171. height: 100%;
  172. }
  173. }
  174. .server-info {
  175. display: flex;
  176. flex-direction: column;
  177. justify-content: space-around;
  178. box-sizing: border-box;
  179. padding: 10rpx 15rpx;
  180. .server-title {
  181. display: flex;
  182. margin-bottom: 10rpx;
  183. }
  184. .coupon {
  185. display: flex;
  186. justify-content: center;
  187. align-items: center;
  188. background: #F29E45;
  189. color: white;
  190. width: 120rpx;
  191. height: 40rpx;
  192. border-radius: 10rpx;
  193. margin-left: 10rpx;
  194. font-size: 22rpx;
  195. }
  196. .time-coupon,
  197. .price {
  198. display: flex;
  199. flex-wrap: wrap;
  200. align-items: center;
  201. }
  202. .time-coupon {
  203. margin: 10rpx 0rpx;
  204. font-size: 26rpx;
  205. justify-content: space-between;
  206. width: 100%;
  207. .flex {
  208. justify-content: center;
  209. align-items: center;
  210. }
  211. image {
  212. width: 25rpx;
  213. height: 25rpx;
  214. }
  215. .time {
  216. color: #B8B8B8;
  217. margin-left: 6rpx;
  218. }
  219. }
  220. .sales-volume {
  221. display: flex;
  222. align-items: center;
  223. color: #B8B8B8;
  224. font-size: 24rpx;
  225. image {
  226. width: 25rpx;
  227. height: 25rpx;
  228. }
  229. }
  230. }
  231. }
  232. .type {
  233. display: flex;
  234. align-items: center;
  235. background-color: #FFF;
  236. width: 92%;
  237. margin: 30rpx 4%;
  238. padding: 20rpx;
  239. box-sizing: border-box;
  240. >span:nth-of-type(1) {
  241. width: 70%;
  242. }
  243. >span:nth-of-type(2) {
  244. width: 30%;
  245. }
  246. }
  247. .help-box {
  248. width: 92%;
  249. margin-left: 4%;
  250. .help-issue {
  251. margin: 20rpx;
  252. font-size: 28rpx;
  253. font-weight: 600;
  254. color: #000;
  255. }
  256. .help-screenshot {
  257. display: flex;
  258. align-items: center;
  259. background-color: #fff;
  260. padding: 20rpx;
  261. }
  262. .help-button {
  263. display: flex;
  264. justify-content: center;
  265. font-size: 24rpx;
  266. flex-shrink: 0;
  267. margin-top: 60rpx;
  268. view {
  269. padding: 14rpx 120rpx;
  270. border-radius: 38rpx;
  271. }
  272. view:nth-child(1) {
  273. background: $uni-color;
  274. color: #fff;
  275. }
  276. view:nth-child(2) {
  277. color: #FFFDF6;
  278. background-color: #C83741;
  279. }
  280. }
  281. }
  282. }
  283. </style>