|
|
- <template>
- <view class="content">
-
- <view class="cr mt40">
-
- <view class="re-card-p32">
- <view class="flex-sb">
- <view class="re-from-label">请拍摄计时结束照片</view>
- <view class="re-card-show" @click="clickShowExample('https://relief.oss-cn-hangzhou.aliyuncs.com/one19.png')">查看示例</view>
- </view>
- <input-image @success="(url) => from.a = url" :height="456"/>
- <view class="re-card-context">
- 需拍摄<span>计时结束计时</span>照片,以保证您的利益。
- </view>
- </view>
-
- <view class="re-card-p32">
- <view class="flex-sb">
- <view class="re-from-label">请拍摄抖料清洗照片</view>
- <view class="re-card-show" @click="clickShowExample('https://relief.oss-cn-hangzhou.aliyuncs.com/one17.png')">查看示例</view>
- </view>
- <input-image @success="(url) => from.b = url" :height="456"/>
- <view class="re-card-context">
- 需拍摄<span>抖料清洗</span>照片。
- </view>
- </view>
-
- <view class="re-card-p32">
- <view class="flex-sb">
- <view class="re-from-label">请拍摄车身照片</view>
- <view class="re-card-show" @click="clickShowExample('https://relief.oss-cn-hangzhou.aliyuncs.com/one19.png')">查看示例</view>
- </view>
- <input-image @success="(url) => from.c = url" :height="456"/>
- <view class="re-card-context">
- 需拍摄<span>车身照片</span>照片,以保证您的利益。
- </view>
- </view>
-
- <view class="re-card-p32">
- <view class="flex-sb">
- <view class="re-from-label">请拍摄仪表盘照片</view>
- <view class="re-card-show" @click="clickShowExample('https://relief.oss-cn-hangzhou.aliyuncs.com/one01.png')">查看示例</view>
- </view>
- <input-image @success="(url) => from.d = url" :height="456"/>
- <view class="re-card-context">
- 需拍摄<span>仪表盘</span>照片,<span>数值清晰,无倾斜,</span>以保证您的利益。
- </view>
- </view>
-
- <view class="re-card-p32">
- <view class="flex-sb">
- <view class="re-from-label">请拍摄签单照片</view>
- <view class="re-card-show" @click="clickShowExample('https://relief.oss-cn-hangzhou.aliyuncs.com/one16.png')">查看示例</view>
- </view>
- <input-image @success="(url) => from.e = url" :height="456"/>
- <view class="re-card-context">
- 需拍摄<span>签单</span>照片,尽量保证<span>字体不倾斜,文字清晰</span>以保证您的后续利益
- </view>
- </view>
-
- <view class="re-card-p32">
- <view class="flex-sb">
- <view class="re-from-label">请拍摄补方小票照片</view>
- <view class="re-card-show" @click="clickShowExample('https://relief.oss-cn-hangzhou.aliyuncs.com/one16.png')">查看示例</view>
- </view>
- <input-image @success="(url) => from.f = url" :height="456"/>
- <view class="re-card-context">
-
- 需拍摄补方小票照片<span>请保证字迹清晰,图片完整</span>照片,以保证您的利益。
- </view>
- </view>
-
- <view class="re-card-p32">
- <view class="flex-sb">
- <view class="re-from-label">请拍摄车辆入库交车照片</view>
- <view class="re-card-show" @click="clickShowExample('https://relief.oss-cn-hangzhou.aliyuncs.com/one18.png')">查看示例</view>
- </view>
- <input-image @success="(url) => from.g = url" :height="456"/>
- <view class="re-card-context">
- 需拍摄<span>车辆入库交车照片</span>,以保证您的利益。
- </view>
- </view>
-
- <view class="re-card-p32">
- <view class="re-from-label">备注<span>(选填)</span></view>
- <textarea v-model="from.remark" class="re-card-textarea inpit" placeholder=" 如在施工过程中发现问题,请用文字描述。"/>
- </view>
-
- </view>
-
- <view class="re-end-pand">
- <button @click="clickSaveAndBack">提交保存</button>
- </view>
-
- <show-example ref="showe" :show="show" :url="url" @close="show=false"/>
-
- </view>
- </template>
-
- <script>
- import InputImage from "/components/input-image.vue"
- import ShowExample from "/components/show-example.vue"
- export default {
- components: {
- InputImage,
- ShowExample
- },
- data() {
- return {
- show: false,
- url: "",
- orderId: "",
- from: {
- a:"",
- b:"",
- c:"",
- d:"",
- e:"",
- f:"",
- g:"",
- h:"",
- i:"",
- j:"",
- k:"",
- remark: ""
- },
- }
- },
- onLoad(opn) {
- this.orderId = opn.id
- },
- methods: {
- clickShowExample(url){
- if(url){
- this.url = url
- } else {
- this.url = "https://relief.oss-cn-hangzhou.aliyuncs.com/yx.jpg"
- }
- this.show = true
- },
- clickSaveAndBack(){
- if(!this.from.a || !this.from.b || !this.from.c || !this.from.d
- ||!this.from.e || !this.from.f || !this.from.g){
- uni.showToast({ icon: "none", title: "请按照要求拍摄上传照片" })
- return
- }
- //if(!this.from.remark){
- // uni.showToast({ icon: "none", title: "备注为必填" })
- // return
- //}
- this.doSubmit()
- },
- doSubmit(){
- const _this = this;
- this.from.id = this.$utils.generateUUID()
- this.from.status = 2
- this.from.step = 3
- this.from.orderId = this.orderId
- console.log(this.from);
- this.$httpPost("/api/order/image", this.from, function(res) {
- console.log('[/order/image]', res);
- if(res.data && res.data>0){
- _this.$httpPost("/api/order/status", _this.from, function(res) {
- console.log('[/order/status]', res);
- if(res.data){
- uni.showToast({ icon: "success", title: "提交成功" })
- setTimeout(()=>{
- uni.navigateBack({ delta: 1 });
- }, 1500)
- }
- })
- } else {
- uni.showModal({
- title: "提交失败",
- content: `本次提交失败,您可以停留在本页面,稍后再次尝试提交,错误码[${res.data}]`,
- success: (res) => {
- if(res.confirm === true){
-
- }
- }
- })
- }
- })
- }
- }
- }
- </script>
-
- <style>
- page {
- background-color: #F5F5F5;
- }
-
- .cr {
- min-height: calc(88vh);
- }
-
- /deep/ uni-radio .uni-radio-input{
- background-color: #F40000 !important;
- border-color: #F40000 !important;
- }
-
- /deep/ uni-radio .uni-radio-input:empty{
- background-color: #ffffff !important;
- border-color: #d1d1d1 !important;
- }
-
- .re-from-car{
- width: 72rpx;
- height: 60rpx;
- margin: 0 16rpx -20rpx 0;
- }
- </style>
|