记账图片添加和删除
This commit is contained in:
@ -88,7 +88,7 @@ export function getAccountRecordDetail(data){
|
||||
data
|
||||
})
|
||||
}
|
||||
//工单对账计算金额(记账)
|
||||
//工单对账计算金额(计算)
|
||||
export function accountRecordCompute(data){
|
||||
return request({
|
||||
url:'/supplierAppV2/dispatchApp/accountRecord/accountRecordCompute',
|
||||
@ -97,7 +97,7 @@ export function accountRecordCompute(data){
|
||||
data
|
||||
})
|
||||
}
|
||||
//修改服务商记账信息 (重新记账)
|
||||
//修改服务商记账信息 (提交记账)
|
||||
export function updateAccountRecordInfo(data){
|
||||
return request({
|
||||
url:'/supplierAppV2/dispatchApp/accountRecord/updateAccountRecordInfo',
|
||||
@ -106,6 +106,37 @@ export function updateAccountRecordInfo(data){
|
||||
data
|
||||
})
|
||||
}
|
||||
// 查询工单记账图片
|
||||
export function selectRecordPictureList(data){
|
||||
return request({
|
||||
url:'/supplierAppV2/dispatchApp/accountRecord/selectRecordPictureList',
|
||||
method:'POST',
|
||||
contentType:'application/json',
|
||||
data
|
||||
})
|
||||
}
|
||||
//删除记账图片
|
||||
export function deleteImage(data){
|
||||
return request({
|
||||
url:'/supplierAppV2/dispatchApp/accountRecord/deleteImage',
|
||||
method:'POST',
|
||||
contentType:'application/json',
|
||||
data
|
||||
})
|
||||
}
|
||||
//新增记账图片 form-data
|
||||
export function insertRecordPicture(data){
|
||||
return request({
|
||||
url:'/supplierAppV2/dispatchApp/accountRecord/insertRecordPicture',
|
||||
method:'POST',
|
||||
contentType:'multipart/form-data',
|
||||
data,
|
||||
// headers: {
|
||||
// 'Content-Type': 'multipart/form-data',
|
||||
// },
|
||||
})
|
||||
}
|
||||
|
||||
//开票通知列表
|
||||
export function notifyInvoiceList(data){
|
||||
return request({
|
||||
|
@ -29,7 +29,7 @@
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="titleLeft">工单状态:</span>
|
||||
<span class="content" >{{ orderInfo.taskSuccessStatus?.label }}</span>
|
||||
<span class="content" >{{ orderInfo.taskStatus?.label }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="titleLeft">结算比例:</span>
|
||||
@ -102,15 +102,15 @@
|
||||
<div>收取客户金额:</div>
|
||||
<div class="halfOpcity inputContent"><input type="number" v-model="form.supplierCustomerAmount"/>元</div>
|
||||
</div>
|
||||
<div class="flex-between">
|
||||
<div class="flex-between" style="background-color: #ccc">
|
||||
<div>基本费用:</div>
|
||||
<div class="halfOpcity inputContent"><input type="number" :disabled="basePriceDisabled" v-model="form.supplierBasePrice"/>元</div>
|
||||
<div class="halfOpcity inputContent" ><input type="number" :disabled="basePriceDisabled" v-model="form.supplierBasePrice"/>元</div>
|
||||
</div>
|
||||
<div class="flex-between">
|
||||
<div class="flex-between" style="background-color: #ccc">
|
||||
<div>额外费用总计:</div>
|
||||
<div class="halfOpcity inputContent"><input type="number" :disabled="true" v-model="form.supplierExtraPrice"/>元</div>
|
||||
</div>
|
||||
<div class="flex-between">
|
||||
<div class="flex-between" style="background-color: #ccc">
|
||||
<div>费用总计: </div>
|
||||
<div class="halfOpcity inputContent"><input type="number" :disabled="true" v-model="form.supplierSettleAmount"/>元</div>
|
||||
</div>
|
||||
@ -172,11 +172,11 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col1">基本费用:{{orderInfo.basePrice +'元'}}</td>
|
||||
<td class="col2 halfOpc" style="background-color: #6C81CD"><input :disabled="basePriceDisabled" v-model="form.supplierBasePrice"/></td>
|
||||
<td class="col2 halfOpc" style="background-color: #6C81CD"><input style="background-color: #6C81CD" :disabled="basePriceDisabled" v-model="form.supplierBasePrice"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col1">额外费用总计:{{orderInfo.extraPrice +'元'}}</td>
|
||||
<td class="col2 halfOpc"><input :disabled="true" v-model="form.supplierExtraPrice"/></td>
|
||||
<td class="col2 halfOpc" style="background-color: #6C81CD"><input style="background-color: #6C81CD" :disabled="true" v-model="form.supplierExtraPrice"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col1">收取客户:{{orderInfo.customerAmount +'元'}}</td>
|
||||
@ -184,28 +184,30 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col1">费用总计:{{orderInfo.settleAmount +'元'}}</td>
|
||||
<td class="col2">
|
||||
<input :disabled="true" v-model="form.supplierSettleAmount"/>
|
||||
<td class="col2" style="background-color: rgba(108,129,205,.5)">
|
||||
<input style="background-color: #6C81CD;opacity: .5;" :disabled="true" v-model="form.supplierSettleAmount"/>
|
||||
<button class="btnCom" @click="compute">计算</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col1 alignLeft" style="border-bottom-left-radius: 3px">
|
||||
<div class="title col1" style="white-space: nowrap;">审核失败原因</div>
|
||||
<div class="reason">{{orderInfo.financeRefuseAuditRemark}}</div>
|
||||
<div class="imgWrap" v-show="orderInfo.auditPhoto">
|
||||
<img class="camerImg" :src="orderInfo.auditPhoto" >
|
||||
<div class="reason">{{orderInfo.auditRemark}}</div>
|
||||
<div v-show="orderInfo.auditPhoto">
|
||||
<img v-for="(item,index) in auditPhotoList" :key="index" class="camerImg" :src="item.url" >
|
||||
</div>
|
||||
</td>
|
||||
<td class="col2 alignLeft" style="border-bottom-right-radius: 3px">
|
||||
<div class="title"> 本次补充说明:</div>
|
||||
<!-- <div class="reason">审核失败原因审核失败原因审核失败原因审核失败原因审核失败原因</div>-->
|
||||
<div class="imgWrap" style="display: flex">
|
||||
<div class="title" style="margin-bottom: 8px"> 备注:{{orderInfo.supplierRemark}}</div>
|
||||
<div class="title" style="margin-bottom: 8px"> 本次补充说明:</div>
|
||||
<div style="display: flex;margin-bottom: 5px">
|
||||
<img v-for="(item,index) in supplierPhotoList" :key="index" class="supplierImg" :src="item.url" @click="delSupplierPhoto(item)">
|
||||
</div>
|
||||
<div style="display: flex">
|
||||
<van-uploader
|
||||
v-model="fileList"
|
||||
@after-read="handleFileRead"
|
||||
multiple
|
||||
:max-count="3"
|
||||
v-model="files"
|
||||
:after-read="handleFileRead"
|
||||
multiple
|
||||
:preview-size="54"
|
||||
accept="image"
|
||||
capture="camera"
|
||||
@ -222,14 +224,19 @@
|
||||
<script>
|
||||
import {myMixins} from '@/utils/myMixins'
|
||||
import {leftCopy} from '@/utils/common'
|
||||
import {getAccountRecordDetail,accountRecordCompute,updateAccountRecordInfo} from "@/api/mine"
|
||||
import {
|
||||
getAccountRecordDetail, accountRecordCompute,
|
||||
updateAccountRecordInfo, insertRecordPicture,
|
||||
selectRecordPictureList,deleteImage
|
||||
} from "@/api/mine"
|
||||
import TwoCommonBtn from "@/components/twoBtnCommon.vue"
|
||||
export default {
|
||||
name: "accountingView",
|
||||
mixins:[myMixins],
|
||||
data(){
|
||||
return{
|
||||
fileList:[],
|
||||
files: [],
|
||||
formData:'',
|
||||
id:'',
|
||||
postfix:'',
|
||||
orderInfo:{},
|
||||
@ -257,6 +264,8 @@ export default {
|
||||
extraPrice:'0',
|
||||
commitLoading: false,
|
||||
auditFormShow:false,
|
||||
auditPhotoList:[],
|
||||
supplierPhotoList:[],
|
||||
form:{
|
||||
id:'',
|
||||
taskOrderCostHisId:'',
|
||||
@ -334,7 +343,6 @@ export default {
|
||||
this.$nextTick(async ()=>{
|
||||
await this.getDetail()
|
||||
})
|
||||
console.log("this.basePriceDisabled",this.basePriceDisabled)
|
||||
},
|
||||
computed:{
|
||||
basePriceDisabled(){
|
||||
@ -350,11 +358,9 @@ export default {
|
||||
},
|
||||
},
|
||||
methods:{
|
||||
handleFileRead({ file }) {
|
||||
const url = URL.createObjectURL(file);
|
||||
this.fileList.push({ file, url });
|
||||
this.$toast('图片上传成功');
|
||||
},
|
||||
handleFileRead() {
|
||||
// console.log("file",file)
|
||||
},
|
||||
async compute() {
|
||||
//现金业务置为0
|
||||
// if(this.form.contractSettleTypeString == '车主现收'){
|
||||
@ -391,6 +397,16 @@ export default {
|
||||
// console.log("有责任险",this.form.supplierSettleAmount)
|
||||
}
|
||||
},
|
||||
async pictureList(){
|
||||
let res = await selectRecordPictureList({
|
||||
taskOrderCostRecordId:this.id,
|
||||
state:0,
|
||||
postfix:this.postfix
|
||||
})
|
||||
if(res.code === 200){
|
||||
this.supplierPhotoList = res.data
|
||||
}
|
||||
},
|
||||
async getDetail(){
|
||||
this.abState = false
|
||||
this.bcState = false
|
||||
@ -420,7 +436,9 @@ export default {
|
||||
this.fixedPrice = this.orderInfo.fixedPrice
|
||||
this.fixedPriceType=this.orderInfo.fixedPriceType
|
||||
this.supplierId=this.orderInfo.supplierId
|
||||
this.auditPhotoList=this.orderInfo.auditPhoto
|
||||
}
|
||||
await this.pictureList()
|
||||
if(this.accountStatus == 1 || this.accountStatus == 0){//没有记录,等待审核
|
||||
leftCopy(this.form, {...res.data})
|
||||
// console.log("form",this.form)
|
||||
@ -509,16 +527,31 @@ export default {
|
||||
accountStatus: accountStatus,
|
||||
supplierBridgeAmount:parseInt(this.form.supplierBridgeAmountAb || 0) + parseInt(this.form.supplierBridgeAmountBc || 0) + parseInt(this.form.supplierBridgeAmountCa || 0)
|
||||
});
|
||||
const formData = new FormData();
|
||||
this.files.forEach((file) => {
|
||||
formData.append('file', file.file);
|
||||
});
|
||||
formData.append('taskOrderCostRecordId', this.id);
|
||||
formData.append('state', 0);
|
||||
formData.append('postfix', this.postfix);
|
||||
await insertRecordPicture(formData);
|
||||
if(res.code === 200){
|
||||
this.$toast('操作成功')
|
||||
// setTimeout(()=>{
|
||||
// this.$router.back()
|
||||
// },)
|
||||
setTimeout(()=>{
|
||||
this.$router.back()
|
||||
},2000)
|
||||
}
|
||||
// this.hiddenReset();
|
||||
this.$emit('success');
|
||||
this.commitLoading = false;
|
||||
},
|
||||
async delSupplierPhoto(item){
|
||||
let res = await deleteImage({
|
||||
recordPictureId:item.id,
|
||||
postfix:this.postfix
|
||||
})
|
||||
this.$toast(res.msg)
|
||||
await this.pictureList()
|
||||
}
|
||||
},
|
||||
components:{
|
||||
TwoCommonBtn
|
||||
@ -636,15 +669,21 @@ img{
|
||||
}
|
||||
.alignLeft{
|
||||
text-align: left !important;
|
||||
opacity: 1 !important;
|
||||
.reason{
|
||||
@include fontWeightSize(400,11px);
|
||||
color: #FF8F37;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
.camerImg{
|
||||
@include widHeiMar(54px,42px,4px);
|
||||
@include widHeiMar(54px,42px,5px);
|
||||
margin-top: 15px;
|
||||
}
|
||||
.supplierImg{
|
||||
@include widHeiMar(54px,42px,8px);
|
||||
margin-top: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
.title{
|
||||
@include fontWeightSize(400,11px);
|
||||
opacity: .5;
|
||||
|
@ -29,7 +29,7 @@
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="titleLeft">工单状态:</span>
|
||||
<span class="content" >{{ orderInfo.taskSuccessStatus?.label }}</span>
|
||||
<span class="content" >{{ orderInfo.taskStatus?.label }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="titleLeft">结算比例:</span>
|
||||
|
@ -11,10 +11,10 @@
|
||||
@click-left="goBack"
|
||||
>
|
||||
<template slot="right">
|
||||
<div class="rightWrap">
|
||||
<div class="rightWrap" @click="showDatetime = !showDatetime">
|
||||
<span class="dateTitle">{{ ymTime }}</span>
|
||||
<img src="@/assets/line.png" class="img1"/>
|
||||
<img src="@/assets/arrow_bottom.png" class="img2" @click="showDatetime = !showDatetime"/>
|
||||
<img src="@/assets/arrow_bottom.png" class="img2"/>
|
||||
</div>
|
||||
</template>
|
||||
</van-nav-bar>
|
||||
@ -24,9 +24,8 @@
|
||||
v-if="showDatetime"
|
||||
v-model="currentDate"
|
||||
type="year-month"
|
||||
title="查询时间"
|
||||
@confirm="onConfirm"
|
||||
@cancel="showDatetime == false"
|
||||
@cancel="showDatetime = false"
|
||||
/>
|
||||
<div class="tab_wrap">
|
||||
<div v-for="(item, index) in tabArr" :key="index" :class="{'active' : activeIndex == index}"
|
||||
@ -168,6 +167,7 @@ export default {
|
||||
z-index: 11;
|
||||
top: 46px;
|
||||
right: 0;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.navBar {
|
||||
|
Reference in New Issue
Block a user