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