Browse Source

Merge remote-tracking branch 'origin/master'

master
fanzongzhe 10 months ago
parent
commit
ad7bda477f
  1. 2
      yxt-as-ui/src/api/operation/settleAccounts.js
  2. 21
      yxt-as-ui/src/router/index.js
  3. 584
      yxt-as-ui/src/views/workFlow/jiesuanFlow/settleAccountsDaiBan.vue
  4. 364
      yxt-as-ui/src/views/workFlow/jiesuanFlow/settleAccountsEdit.vue
  5. 370
      yxt-as-ui/src/views/workFlow/jiesuanFlow/settleAccountsYiBan.vue

2
yxt-as-ui/src/api/operation/settleAccounts.js

@ -44,7 +44,7 @@ export default {
// 流程审批(加签)
delegate: function(params) {
return request({
url: '/as/v1/settleaccounts/delegate',
url: '/as/v1/settleaccounts/delegateProcess',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }

21
yxt-as-ui/src/router/index.js

@ -1120,6 +1120,27 @@ export const constantRoutes = [{
import('@/views/workFlow/jishizhichengFlow/technicalTitleFilingYiBan.vue'),
name: 'TechnicalTitleFilingYiBan'
},
// 结算申请 -- 编辑
{
path: '/jiesuanFlow/settleAccountsEdit',
component: () =>
import('@/views/workFlow/jiesuanFlow/settleAccountsEdit.vue'),
name: 'SettleAccountsEdit'
},
// 结算申请 -- 待办
{
path: '/jiesuanFlow/settleAccountsDaiBan',
component: () =>
import('@/views/workFlow/jiesuanFlow/settleAccountsDaiBan.vue'),
name: 'SettleAccountsDaiBan'
},
// 结算申请 -- 已办
{
path: '/jiesuanFlow/settleAccountsYiBan',
component: () =>
import('@/views/workFlow/jiesuanFlow/settleAccountsYiBan.vue'),
name: 'SettleAccountsYiBan'
},
// 404 page must be placed at the end !!!
// { path: '*', redirect: '/404', hidden: true }
]

584
yxt-as-ui/src/views/workFlow/jiesuanFlow/settleAccountsDaiBan.vue

@ -0,0 +1,584 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" @click="openCountersign('加签')"> </el-button>
<el-button type="primary" size="small" @click="openAgree('同意')"> </el-button>
<el-button type="danger" size="small" @click="openReject('驳回')"> </el-button>
<el-button type="danger" size="small" @click="openStop('终止')"> </el-button>
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.dept }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.applyDate }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.remarks" clearable placeholder="" /></el-form-item>
</el-col>
</el-row>
<div class="title">单据信息</div>
<el-row>
<el-col :span="8">
<div class="span-sty">单据编号</div>
<el-form-item><span class="addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">单据日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.sourceBillDate }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">服务顾问</div>
<el-form-item><span class="addinputInfo">{{ formobj.waitorName }}</span></el-form-item>
</el-col>
</el-row>
<el-row v-if="formobj.billType !== ''">
<el-col :span="8">
<div class="span-sty">维修单类型</div>
<el-form-item><span class="addinputInfo">{{ formobj.billType }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">科目</div>
<el-form-item><span class="addinputInfo">{{ formobj.subject }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">是否外出</div>
<el-form-item><span class="addinputInfo">{{ formobj.isGoOut == '1' ? '是' : formobj.isGoOut == '2' ? '否' : '' }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">客户名称</div>
<el-form-item><span class="addinputInfo">{{ formobj.customerName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">联系电话</div>
<el-form-item><span class="addinputInfo">{{ formobj.mobile }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">车牌号/车架号</div>
<el-form-item><span class="addinputInfo">{{ formobj.vehMark }}/{{ formobj.vinNo }}</span></el-form-item>
</el-col>
</el-row>
<el-row v-if="formobj.billType !== ''">
<el-col :span="8">
<div class="span-sty">是否开票</div>
<el-form-item><span class="addinputInfo">{{ formobj.isInvoicing == '1' ? '是' : formobj.isInvoicing == '0' ? '否' : '' }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">税率</div>
<el-form-item><span class="addinputInfo">{{ formobj.taxRate }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">加税点项目</div>
<el-form-item><span class="addinputInfo">{{ formobj.taxItems }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">应收金额</div>
<el-form-item><span class="addinputInfo">{{ formobj.receivableAmount }} = 工时费{{ formobj.hourAmount }} + 材料费{{ formobj.goodsAmount }} + 附加费{{ formobj.addAmount }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">结算金额</div>
<el-form-item><span class="addinputInfo">{{ formobj.settleAmount }} = 合计金额{{ formobj.receivableAmount }} - 优惠<span>{{ formobj.discountAmount }}</span></span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<div class="span-sty">成本合计</div>
<el-form-item><span class="addinputInfo">{{ formobj.costAmount }}</span></el-form-item>
</el-col>
<el-col :span="12">
<div class="span-sty">利润额</div>
<el-form-item><span class="addinputInfo">{{ formobj.profit }}</span></el-form-item>
</el-col>
</el-row>
<div v-if="formobj.sitemVos.length > 0">
<div class="title">维修项目</div>
<el-table :key="serviceKey" :data="formobj.sitemVos" :index="index" border style="width: 100%">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="serviceItem" label="维修项目" align="center" width="200" />
<el-table-column prop="sitemReceivableAmount" label="应收金额" align="center" width="150" />
<el-table-column prop="discountAmount" label="优惠" align="center" width="150" />
<el-table-column prop="sitemSettleAmount" label="结算金额" align="center" width="150" />
<el-table-column prop="sitemCost" label="成本小计" align="center" width="150" />
<el-table-column prop="sitemPrint" label="利润额" align="center" width="150" />
<el-table-column prop="remarks" label="备注" align="center" min-width="300" />
</el-table>
</div>
<div class="title">商品</div>
<el-table :key="tableKey" :data="formobj.goodsDetailsVos" :index="index" border style="width: 100%">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" />
<el-table-column prop="goodsSpuName" label="商品名称" width="100" align="center" />
<el-table-column prop="goodsSkuCode" label="图号" width="100" align="center" />
<el-table-column prop="goodsReceivableAmount" label="应收金额" align="center" width="150" />
<el-table-column prop="discountAmount" label="优惠" align="center" width="150" />
<el-table-column prop="goodsSettleAmount" label="结算金额" align="center" width="150" />
<el-table-column prop="goodsCost" label="成本小计" align="center" width="150" />
<el-table-column prop="goodsPrint" label="利润额" align="center" width="150" />
<el-table-column prop="remarks" label="备注" align="center" min-width="300" />
</el-table>
<div class="title">附加项目</div>
<el-row>
<el-col :span="8">
<div class="span-sty">外出费()</div>
<el-form-item>
<div style="display: flex;flex-direction: row;justify-content: space-between;align-items: center">
<span class="addinputInfo">{{ formobj.outAmount }}</span>
<span v-show="formobj.outKPAmount !== ''">开票金额{{ formobj.outKPAmount }}</span>
</div>
</el-form-item>
</el-col>
<el-col :span="16">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.outRemarks }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">厂家补助()</div>
<el-form-item>
<div style="display: flex;flex-direction: row;justify-content: space-between;align-items: center">
<span class="addinputInfo">{{ formobj.subsidyAmount }}</span>
<span v-show="formobj.subsidyKPAmount !== ''">开票金额{{ formobj.subsidyKPAmount }}</span>
</div>
</el-form-item>
</el-col>
<el-col :span="16">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.subsidyRemarks }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">施救费()</div>
<el-form-item>
<div style="display: flex;flex-direction: row;justify-content: space-between;align-items: center">
<span class="addinputInfo">{{ formobj.rescueAmount }}</span>
<span v-show="formobj.rescueKPAmount !== ''">开票金额{{ formobj.rescueKPAmount }}</span>
</div>
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.rescueRemarks }}</span></el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<div style="display: flex;flex-direction: column;justify-content:flex-start;align-items: flex-start;">
<el-button type="text" v-for="(item, index) in formobj.fileName" :key="index" @click="handleOpen(item.url)">{{ item.name }}</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
<el-table :key="subjoinKey" :data="formobj.aitemVos" :index="index" border style="width: 100%">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="aitemName" label="其它附加项目" align="center" width="200" />
<el-table-column prop="aitemReceivableAmount" label="应收金额" align="center" width="150" />
<el-table-column prop="aitemCost" label="成本" align="center" width="150" />
<el-table-column prop="aitemPrint" label="利润额" align="center" width="150" />
<el-table-column prop="remarks" label="备注" align="center" min-width="200" />
</el-table>
</el-form>
</div>
</div>
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formadd" >
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span class="icon">*</span>加签人员:
</el-col>
<el-col :span="20">
<el-form-item>
<el-select v-model="countersign.assignee" placeholder="请选择" filterable>
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span>当前环节:</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item>
</el-col>
</el-row>
<el-row :class="{rowClass:!currentLink}">
<el-col :span="4" class="tleftb">
<span>意见:</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable ></el-input></el-form-item>
</el-col>
</el-row>
<div style="text-align:center;margin-top: 20px;">
<el-button type="primary" size="mini" @click="reject"> </el-button>
<el-button type="info " size="mini" @click="nodeDialogVisible = false"> </el-button>
</div>
</el-form>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/operation/settleAccounts'
import { selectStaffListss } from '@/api/Common/dictcommons'
export default {
name: 'SettleAccountsDaiBan',
data() {
return {
viewTitle: '',
viewState: 1,
submitdisabled: false,
tableKey: 0,
index: 0,
// service
serviceKey: 1,
// subjoin
subjoinKey: 2,
formobj: {
sid: '',
orgPath: '',
useOrgSid: '',
useOrgName: '',
createBySid: '',
createByName: '',
deptSid: '',
dept: '',
billNo: '',
remarks: '',
applyDate: '',
sourceSid: '',
sourceBillNo: '',
sourceBillDate: '',
waitorName: '',
billType: '',
subject: '',
isGoOut: '',
customerName: '',
mobile: '',
vinNo: '',
vehMark: '',
isInvoicing: '',
taxRate: '',
taxItems: '',
receivableAmount: '',
hourAmount: '',
goodsAmount: '',
addAmount: '',
discountAmount: '',
settleAmount: '',
costAmount: '',
profit: '',
sitemVos: [],
goodsDetailsVos: [],
aitemVos: [],
outAmount: '',
outKPAmount: '',
outRemarks: '',
subsidyAmount: '',
subsidyKPAmount: '',
subsidyRemarks: '',
rescueAmount: '',
rescueKPAmount: '',
rescueRemarks: '',
fileName: [],
taskId: '',
instanceId: ''
},
rules: {},
options: [],
operation: '', //
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
countersignLink: false,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
//
countersign: {
taskId: '',
assignee: '',
userSid: '',
instanceId: '',
views: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
// this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
//
this.countersign.taskId = obj.taskId
this.countersign.userSid = window.sessionStorage.getItem('userSid')
this.countersign.instanceId = obj.instanceId
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
this.viewTitle = '结算申请详情'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.fetchBySid(sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
selectStaffListss().then((res) => {
if (res.success) {
this.options = res.data
}
})
},
handleOpen(value) {
window.open(value, '_blank')
},
//
openCountersign(val) {
this.operation = val
this.currentLink = true
this.countersignLink = true
this.dialogList.comment = ''
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openAgree(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = '同意'
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openReject(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = ''
req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openStop(val) {
this.operation = val
this.currentLink = false
this.countersignLink = false
this.dialogList.comment = ''
this.nodeDialogVisible = true
},
reject() {
if (this.operation === '同意') {
this.handleAgree()
} else if (this.operation === '驳回') {
if (this.dialogList.comment === '') {
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' })
} else {
this.handleReject()
}
} else if (this.operation === '终止') {
if (this.dialogList.comment === '') {
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' })
} else {
this.handleStop()
}
} else if (this.operation === '加签') {
this.handleCountersign()
}
},
/** 加签 */
handleCountersign() {
if (this.countersign.assignee === '') {
this.$message({ showClose: true, type: 'error', message: '请选择加签人员' })
return
}
if (this.dialogList.comment === '') {
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' })
return
}
this.countersign.views = this.dialogList.comment
req.delegate(this.countersign).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 同意任务 */
handleAgree() {
this.linkByParameter.comment = this.dialogList.comment
req.complete(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 驳回任务 */
handleReject() {
this.linkByParameter.comment = this.dialogList.comment
req.reject(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 终止任务 */
handleStop() {
this.linkByParameter.comment = this.dialogList.comment
req.breakProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.rowClass{
border-top: 1px solid #E0E3EB;
}
</style>

364
yxt-as-ui/src/views/workFlow/jiesuanFlow/settleAccountsEdit.vue

@ -0,0 +1,364 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button>
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.dept }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.applyDate }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.remarks" clearable placeholder="" /></el-form-item>
</el-col>
</el-row>
<div class="title">单据信息</div>
<el-row>
<el-col :span="8">
<div class="span-sty">单据编号</div>
<el-form-item><span class="addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">单据日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.sourceBillDate }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">服务顾问</div>
<el-form-item><span class="addinputInfo">{{ formobj.waitorName }}</span></el-form-item>
</el-col>
</el-row>
<el-row v-if="formobj.billType !== ''">
<el-col :span="8">
<div class="span-sty">维修单类型</div>
<el-form-item><span class="addinputInfo">{{ formobj.billType }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">科目</div>
<el-form-item><span class="addinputInfo">{{ formobj.subject }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">是否外出</div>
<el-form-item><span class="addinputInfo">{{ formobj.isGoOut == '1' ? '是' : formobj.isGoOut == '2' ? '否' : '' }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">客户名称</div>
<el-form-item><span class="addinputInfo">{{ formobj.customerName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">联系电话</div>
<el-form-item><span class="addinputInfo">{{ formobj.mobile }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">车牌号/车架号</div>
<el-form-item><span class="addinputInfo">{{ formobj.vehMark }}/{{ formobj.vinNo }}</span></el-form-item>
</el-col>
</el-row>
<el-row v-if="formobj.billType !== ''">
<el-col :span="8">
<div class="span-sty">是否开票</div>
<el-form-item><span class="addinputInfo">{{ formobj.isInvoicing == '1' ? '是' : formobj.isInvoicing == '0' ? '否' : '' }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">税率</div>
<el-form-item><span class="addinputInfo">{{ formobj.taxRate }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">加税点项目</div>
<el-form-item><span class="addinputInfo">{{ formobj.taxItems }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">应收金额</div>
<el-form-item><span class="addinputInfo">{{ formobj.receivableAmount }} = 工时费{{ formobj.hourAmount }} + 材料费{{ formobj.goodsAmount }} + 附加费{{ formobj.addAmount }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">结算金额</div>
<el-form-item><span class="addinputInfo">{{ formobj.settleAmount }} = 合计金额{{ formobj.receivableAmount }} - 优惠<span>{{ formobj.discountAmount }}</span></span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<div class="span-sty">成本合计</div>
<el-form-item><span class="addinputInfo">{{ formobj.costAmount }}</span></el-form-item>
</el-col>
<el-col :span="12">
<div class="span-sty">利润额</div>
<el-form-item><span class="addinputInfo">{{ formobj.profit }}</span></el-form-item>
</el-col>
</el-row>
<div v-if="formobj.sitemVos.length > 0">
<div class="title">维修项目</div>
<el-table :key="serviceKey" :data="formobj.sitemVos" :index="index" border style="width: 100%">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="serviceItem" label="维修项目" align="center" width="200" />
<el-table-column prop="sitemReceivableAmount" label="应收金额" align="center" width="150" />
<el-table-column prop="discountAmount" label="优惠" align="center" width="150" />
<el-table-column prop="sitemSettleAmount" label="结算金额" align="center" width="150" />
<el-table-column prop="sitemCost" label="成本小计" align="center" width="150" />
<el-table-column prop="sitemPrint" label="利润额" align="center" width="150" />
<el-table-column prop="remarks" label="备注" align="center" min-width="300" />
</el-table>
</div>
<div class="title">商品</div>
<el-table :key="tableKey" :data="formobj.goodsDetailsVos" :index="index" border style="width: 100%">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" />
<el-table-column prop="goodsSpuName" label="商品名称" width="100" align="center" />
<el-table-column prop="goodsSkuCode" label="图号" width="100" align="center" />
<el-table-column prop="goodsReceivableAmount" label="应收金额" align="center" width="150" />
<el-table-column prop="discountAmount" label="优惠" align="center" width="150" />
<el-table-column prop="goodsSettleAmount" label="结算金额" align="center" width="150" />
<el-table-column prop="goodsCost" label="成本小计" align="center" width="150" />
<el-table-column prop="goodsPrint" label="利润额" align="center" width="150" />
<el-table-column prop="remarks" label="备注" align="center" min-width="300" />
</el-table>
<div class="title">附加项目</div>
<el-row>
<el-col :span="8">
<div class="span-sty">外出费()</div>
<el-form-item>
<div style="display: flex;flex-direction: row;justify-content: space-between;align-items: center">
<span class="addinputInfo">{{ formobj.outAmount }}</span>
<span v-show="formobj.outKPAmount !== ''">开票金额{{ formobj.outKPAmount }}</span>
</div>
</el-form-item>
</el-col>
<el-col :span="16">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.outRemarks }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">厂家补助()</div>
<el-form-item>
<div style="display: flex;flex-direction: row;justify-content: space-between;align-items: center">
<span class="addinputInfo">{{ formobj.subsidyAmount }}</span>
<span v-show="formobj.subsidyKPAmount !== ''">开票金额{{ formobj.subsidyKPAmount }}</span>
</div>
</el-form-item>
</el-col>
<el-col :span="16">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.subsidyRemarks }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">施救费()</div>
<el-form-item>
<div style="display: flex;flex-direction: row;justify-content: space-between;align-items: center">
<span class="addinputInfo">{{ formobj.rescueAmount }}</span>
<span v-show="formobj.rescueKPAmount !== ''">开票金额{{ formobj.rescueKPAmount }}</span>
</div>
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.rescueRemarks }}</span></el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<div style="display: flex;flex-direction: column;justify-content:flex-start;align-items: flex-start;">
<el-button type="text" v-for="(item, index) in formobj.fileName" :key="index" @click="handleOpen(item.url)">{{ item.name }}</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
<el-table :key="subjoinKey" :data="formobj.aitemVos" :index="index" border style="width: 100%">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="aitemName" label="其它附加项目" align="center" width="200" />
<el-table-column prop="aitemReceivableAmount" label="应收金额" align="center" width="150" />
<el-table-column prop="aitemCost" label="成本" align="center" width="150" />
<el-table-column prop="aitemPrint" label="利润额" align="center" width="150" />
<el-table-column prop="remarks" label="备注" align="center" min-width="200" />
</el-table>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/operation/settleAccounts'
export default {
name: 'SettleAccountsEdit',
data() {
return {
viewTitle: '',
viewState: 1,
submitdisabled: false,
tableKey: 0,
index: 0,
// service
serviceKey: 1,
// subjoin
subjoinKey: 2,
formobj: {
sid: '',
orgPath: '',
useOrgSid: '',
useOrgName: '',
createBySid: '',
createByName: '',
deptSid: '',
dept: '',
billNo: '',
remarks: '',
applyDate: '',
sourceSid: '',
sourceBillNo: '',
sourceBillDate: '',
waitorName: '',
billType: '',
subject: '',
isGoOut: '',
customerName: '',
mobile: '',
vinNo: '',
vehMark: '',
isInvoicing: '',
taxRate: '',
taxItems: '',
receivableAmount: '',
hourAmount: '',
goodsAmount: '',
addAmount: '',
discountAmount: '',
settleAmount: '',
costAmount: '',
profit: '',
sitemVos: [],
goodsDetailsVos: [],
aitemVos: [],
outAmount: '',
outKPAmount: '',
outRemarks: '',
subsidyAmount: '',
subsidyKPAmount: '',
subsidyRemarks: '',
rescueAmount: '',
rescueKPAmount: '',
rescueRemarks: '',
fileName: [],
taskId: '',
instanceId: ''
},
rules: {}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
this.viewTitle = '【编辑】结算申请'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.fetchBySid(sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
},
handleOpen(value) {
window.open(value, '_blank')
},
saveOrUpdate() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.saveOrUpdate(this.formobj).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
submit() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.submit(this.formobj).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '提交成功' })
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
</style>

370
yxt-as-ui/src/views/workFlow/jiesuanFlow/settleAccountsYiBan.vue

@ -0,0 +1,370 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.dept }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.applyDate }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.remarks" clearable placeholder="" /></el-form-item>
</el-col>
</el-row>
<div class="title">单据信息</div>
<el-row>
<el-col :span="8">
<div class="span-sty">单据编号</div>
<el-form-item><span class="addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">单据日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.sourceBillDate }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">服务顾问</div>
<el-form-item><span class="addinputInfo">{{ formobj.waitorName }}</span></el-form-item>
</el-col>
</el-row>
<el-row v-if="formobj.billType !== ''">
<el-col :span="8">
<div class="span-sty">维修单类型</div>
<el-form-item><span class="addinputInfo">{{ formobj.billType }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">科目</div>
<el-form-item><span class="addinputInfo">{{ formobj.subject }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">是否外出</div>
<el-form-item><span class="addinputInfo">{{ formobj.isGoOut == '1' ? '是' : formobj.isGoOut == '2' ? '否' : '' }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">客户名称</div>
<el-form-item><span class="addinputInfo">{{ formobj.customerName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">联系电话</div>
<el-form-item><span class="addinputInfo">{{ formobj.mobile }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">车牌号/车架号</div>
<el-form-item><span class="addinputInfo">{{ formobj.vehMark }}/{{ formobj.vinNo }}</span></el-form-item>
</el-col>
</el-row>
<el-row v-if="formobj.billType !== ''">
<el-col :span="8">
<div class="span-sty">是否开票</div>
<el-form-item><span class="addinputInfo">{{ formobj.isInvoicing == '1' ? '是' : formobj.isInvoicing == '0' ? '否' : '' }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">税率</div>
<el-form-item><span class="addinputInfo">{{ formobj.taxRate }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">加税点项目</div>
<el-form-item><span class="addinputInfo">{{ formobj.taxItems }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">应收金额</div>
<el-form-item><span class="addinputInfo">{{ formobj.receivableAmount }} = 工时费{{ formobj.hourAmount }} + 材料费{{ formobj.goodsAmount }} + 附加费{{ formobj.addAmount }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">结算金额</div>
<el-form-item><span class="addinputInfo">{{ formobj.settleAmount }} = 合计金额{{ formobj.receivableAmount }} - 优惠<span>{{ formobj.discountAmount }}</span></span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<div class="span-sty">成本合计</div>
<el-form-item><span class="addinputInfo">{{ formobj.costAmount }}</span></el-form-item>
</el-col>
<el-col :span="12">
<div class="span-sty">利润额</div>
<el-form-item><span class="addinputInfo">{{ formobj.profit }}</span></el-form-item>
</el-col>
</el-row>
<div v-if="formobj.sitemVos.length > 0">
<div class="title">维修项目</div>
<el-table :key="serviceKey" :data="formobj.sitemVos" :index="index" border style="width: 100%">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="serviceItem" label="维修项目" align="center" width="200" />
<el-table-column prop="sitemReceivableAmount" label="应收金额" align="center" width="150" />
<el-table-column prop="discountAmount" label="优惠" align="center" width="150" />
<el-table-column prop="sitemSettleAmount" label="结算金额" align="center" width="150" />
<el-table-column prop="sitemCost" label="成本小计" align="center" width="150" />
<el-table-column prop="sitemPrint" label="利润额" align="center" width="150" />
<el-table-column prop="remarks" label="备注" align="center" min-width="300" />
</el-table>
</div>
<div class="title">商品</div>
<el-table :key="tableKey" :data="formobj.goodsDetailsVos" :index="index" border style="width: 100%">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" />
<el-table-column prop="goodsSpuName" label="商品名称" width="100" align="center" />
<el-table-column prop="goodsSkuCode" label="图号" width="100" align="center" />
<el-table-column prop="goodsReceivableAmount" label="应收金额" align="center" width="150" />
<el-table-column prop="discountAmount" label="优惠" align="center" width="150" />
<el-table-column prop="goodsSettleAmount" label="结算金额" align="center" width="150" />
<el-table-column prop="goodsCost" label="成本小计" align="center" width="150" />
<el-table-column prop="goodsPrint" label="利润额" align="center" width="150" />
<el-table-column prop="remarks" label="备注" align="center" min-width="300" />
</el-table>
<div class="title">附加项目</div>
<el-row>
<el-col :span="8">
<div class="span-sty">外出费()</div>
<el-form-item>
<div style="display: flex;flex-direction: row;justify-content: space-between;align-items: center">
<span class="addinputInfo">{{ formobj.outAmount }}</span>
<span v-show="formobj.outKPAmount !== ''">开票金额{{ formobj.outKPAmount }}</span>
</div>
</el-form-item>
</el-col>
<el-col :span="16">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.outRemarks }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">厂家补助()</div>
<el-form-item>
<div style="display: flex;flex-direction: row;justify-content: space-between;align-items: center">
<span class="addinputInfo">{{ formobj.subsidyAmount }}</span>
<span v-show="formobj.subsidyKPAmount !== ''">开票金额{{ formobj.subsidyKPAmount }}</span>
</div>
</el-form-item>
</el-col>
<el-col :span="16">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.subsidyRemarks }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">施救费()</div>
<el-form-item>
<div style="display: flex;flex-direction: row;justify-content: space-between;align-items: center">
<span class="addinputInfo">{{ formobj.rescueAmount }}</span>
<span v-show="formobj.rescueKPAmount !== ''">开票金额{{ formobj.rescueKPAmount }}</span>
</div>
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.rescueRemarks }}</span></el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<div style="display: flex;flex-direction: column;justify-content:flex-start;align-items: flex-start;">
<el-button type="text" v-for="(item, index) in formobj.fileName" :key="index" @click="handleOpen(item.url)">{{ item.name }}</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
<el-table :key="subjoinKey" :data="formobj.aitemVos" :index="index" border style="width: 100%">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="aitemName" label="其它附加项目" align="center" width="200" />
<el-table-column prop="aitemReceivableAmount" label="应收金额" align="center" width="150" />
<el-table-column prop="aitemCost" label="成本" align="center" width="150" />
<el-table-column prop="aitemPrint" label="利润额" align="center" width="150" />
<el-table-column prop="remarks" label="备注" align="center" min-width="200" />
</el-table>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/operation/settleAccounts'
export default {
name: 'SettleAccountsYiBan',
data() {
return {
viewTitle: '',
viewState: 1,
submitdisabled: false,
tableKey: 0,
index: 0,
// service
serviceKey: 1,
// subjoin
subjoinKey: 2,
formobj: {
sid: '',
orgPath: '',
useOrgSid: '',
useOrgName: '',
createBySid: '',
createByName: '',
deptSid: '',
dept: '',
billNo: '',
remarks: '',
applyDate: '',
sourceSid: '',
sourceBillNo: '',
sourceBillDate: '',
waitorName: '',
billType: '',
subject: '',
isGoOut: '',
customerName: '',
mobile: '',
vinNo: '',
vehMark: '',
isInvoicing: '',
taxRate: '',
taxItems: '',
receivableAmount: '',
hourAmount: '',
goodsAmount: '',
addAmount: '',
discountAmount: '',
settleAmount: '',
costAmount: '',
profit: '',
sitemVos: [],
goodsDetailsVos: [],
aitemVos: [],
outAmount: '',
outKPAmount: '',
outRemarks: '',
subsidyAmount: '',
subsidyKPAmount: '',
subsidyRemarks: '',
rescueAmount: '',
rescueKPAmount: '',
rescueRemarks: '',
fileName: [],
taskId: '',
instanceId: ''
},
rules: {},
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
this.viewTitle = '结算申请详情'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.fetchBySid(sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
},
handleOpen(value) {
window.open(value, '_blank')
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
},
/** 撤回任务 */
handleRevoke() {
req.revokeProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
</style>
Loading…
Cancel
Save