Browse Source

完善分公司间调车调账

zhanglei
yunuo970428 3 years ago
parent
commit
76bcba36e0
  1. 4
      anrui-scm/anrui-scm-ui/src/api/flow/tiaozhangshenqing.js
  2. 28
      anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js
  3. 427
      anrui-scm/anrui-scm-ui/src/views/workFlow/tiaozhangshenqingFlow/tiaozhangshenqingByWiPinMoney.vue

4
anrui-scm/anrui-scm-ui/src/api/flow/tiaozhangshenqing.js

@ -51,8 +51,8 @@ export default {
getNextNodesForSubmit: function(data) {
return request({
url: '/base/v1/baseaccadjapply/getNextNodesForSubmit',
method: 'get',
params: data
method: 'post',
data: data
})
},
// 审批流程(驳回、终止)获取上一环节

28
anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js

@ -896,6 +896,13 @@ const codemenu = [
import('@/views/workFlow/tiaozhangshenqingFlow/tiaozhangshenqingCallInOrCallOut.vue'),
name: 'tiaozhangshenqingCallInOrCallOut'
},
// 分公司调车调账--分公司销售支持部经理修改内销价格
{
path: '/tiaozhangshenqingFlow/tiaozhangshenqingByWiPinMoney',
component: () =>
import('@/views/workFlow/tiaozhangshenqingFlow/tiaozhangshenqingByWiPinMoney.vue'),
name: 'tiaozhangshenqingByWiPinMoney'
},
// 上装调价申请详情页面
{
path: '/shangzhuangtiaojiaFlow/shangzhuangtiaojiaguanli/shangzhuangtiaojiaDaiBanInfo',
@ -936,6 +943,27 @@ const codemenu = [
component: () =>
import('@/views/workFlow/danchefanliyutiFlow/danchefanliyutiEdit.vue'),
name: 'danchefanliyutiEdit'
},
// 单车返利核对申请详情页面
{
path: '/danchefanliheduiFlow/danchefanliheduiDaiBanInfo',
component: () =>
import('@/views/workFlow/danchefanliheduiFlow/danchefanliheduiDaiBanInfo.vue'),
name: 'danchefanliheduiDaiBanInfo'
},
// 单车返利核对办理页面
{
path: '/danchefanliheduiFlow/danchefanliheduiYiBanInfo',
component: () =>
import('@/views/workFlow/danchefanliheduiFlow/danchefanliheduiYiBanInfo.vue'),
name: 'danchefanliheduiYiBanInfo'
},
// 单车返利核对
{
path: '/danchefanliheduiFlow/danchefanliheduiEdit',
component: () =>
import('@/views/workFlow/danchefanliheduiFlow/danchefanliheduiEdit.vue'),
name: 'danchefanliheduiEdit'
}
]
export default codemenu

427
anrui-scm/anrui-scm-ui/src/views/workFlow/tiaozhangshenqingFlow/tiaozhangshenqingByWiPinMoney.vue

@ -0,0 +1,427 @@
<template>
<div class="app-container">
<div>
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>分公司间调账申请详情</div>
<!--start 添加修改按钮-->
<div>
<el-button type="primary" @click="openAgree('同意')"> </el-button>
<el-button type="danger" @click="openReject('驳回')"> </el-button>
<el-button type="danger" @click="openStop('终止')"> </el-button>
</div>
<!--end 添加修改按钮-->
<!--end 详情按钮-->
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class=""><!-- -->
<div class="title">分公司间调账申请</div>
<el-form ref="dataForm" :model="temp" :rules="rules" :inline="true" label-width="120px">
<div class="invoiceadd" style="margin-top: 5px;">
<el-row>
<el-col :span="8">
<el-form-item prop="accadjTypeValue" label="调账类型">
<span>{{ temp.accadjTypeValue }}</span>
</el-form-item>
</el-col>
<el-col :span="8"><!-- :readonly="depositVehicleList[scope.$index].inboundDate" -->
<el-form-item prop="callOutOrgName" label="调出分公司">
<span>{{ temp.callOutOrgName }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="callInOrgName" label="调入分公司">
<span>{{ temp.callInOrgName }}</span>
</el-form-item>
</el-col>
</el-row>
</div>
<div class="addtable">
<div class="tabletitle">
<div class="titlename">
申请车辆列表
</div>
</div>
<template class="tablelist">
<el-table :key="tableKey" :data="list" border style="width: 100%" :index="index">
<el-table-column align="center" fixed label="序号" type="index" :index="index + 1" width="60"/>
<el-table-column label="车型名称" align="center" width="190">
<template slot-scope="scope">
<span>{{ scope.row.vehicleAlias }}</span>
</template>
</el-table-column>
<el-table-column label="常用配置" align="center" width="360">
<template slot-scope="scope">
<span>{{ scope.row.configName }}</span>
</template>
</el-table-column>
<el-table-column label="车架号" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="库存地点" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.inventoryLocationName }}</span>
</template>
</el-table-column>
<el-table-column label="内销价格" align="center" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.witPinMoney" clearable placeholder=""></el-input>
</template>
</el-table-column>
<!-- <el-table-column label="发票类型" align="center" width="140">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.invoiceTypeValue }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="运费" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.freight }}</span>
</template>
</el-table-column>
<el-table-column label="运费承担方" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.freightUndertakerName }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="left" header-align="center" width="300">
<template slot-scope="scope">
<span>{{ scope.row.remarks }}</span>
</template>
</el-table-column>
</el-table>
</template>
</div>
</el-form>
</div>
<!--End 添加修改部分-->
</div>
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form label-position="right" class="formadd">
<el-row v-show="currentLink" style="border-top: 1px solid #E0E3EB">
<el-col :span="4" class="tleftb">当前环节</el-col>
<el-col :span="20">
<el-form-item prop="purchasingUnitName"><span>{{ current.taskName }}->{{ nextNode.name }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row :class="{ rowClass:!currentLink }">
<el-col :span="4" class="tleftb">意见</el-col>
<el-col :span="20">
<el-form-item>
<el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" 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="confirm"> </el-button>
<el-button type="info " size="mini" @click="nodeDialogVisible = false"> </el-button>
</div>
</el-form>
</el-dialog>
</div>
</template>
<script>
import { fetchDetailsBySid } from '@/api/supplychain/tiaozhangshenqing.js'
import req from '@/api/flow/tiaozhangshenqing'
export default {
name: 'tiaozhangshenqingByWiPinMoney',
data() {
return {
isXuanche: false,
viewTitle: '',
dialogStatus: '',
tableKey: 0,
index: 0,
list: [],
depositVehicleList: [],
accadjTypeValue_list: [],
//
temp: {
sid: '',
applyDate: '', //
accadjTypeKey: '', // key
accadjTypeValue: '', // value
callOutOrgSid: '', // sid
callOutOrgName: '', //
callInOrgSid: '', // sid
callInOrgName: '', //
baseInternalPurchaseVehicles: [] //
},
rules: {},
submitdisabled: false, //
disabled: false, //
// ------------------------------------
currentLink: true, //
dialogList: {
comment: ''
},
xmlData: '', // xml
taskList: [],
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
//
agreeList: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: '',
baseInternalPurchaseVehicles: []
},
//
regectList: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
userSid: ''
},
//
stopList: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
userSid: ''
}
}
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: document.body.scrollHeight + 220 + 'px'
}
}, '*')
},
created() {
// ===
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('获取到的obj', obj)
//
this.agreeList.businessSid = obj.businessSid
this.agreeList.instanceId = obj.instanceId
this.agreeList.taskId = obj.taskId
this.agreeList.taskDefKey = obj.taskDefKey
this.agreeList.userSid = window.sessionStorage.getItem('userSid')
this.agreeList.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
//
this.regectList.businessSid = obj.businessSid
this.regectList.instanceId = obj.instanceId
this.regectList.taskId = obj.taskId
this.regectList.userSid = window.sessionStorage.getItem('userSid')
//
this.stopList.businessSid = obj.businessSid
this.stopList.instanceId = obj.instanceId
this.stopList.taskId = obj.taskId
this.stopList.userSid = window.sessionStorage.getItem('userSid')
//
this.transactState = obj.transactState
//
this.showInfo(obj.businessSid)
this.getModelDetail(obj.deployId)
this.getFlowViewer(obj.instanceId)
},
methods: {
showInfo(sid) {
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
})
fetchDetailsBySid(sid).then(resp => {
if (resp.success) {
const data = resp.data
this.temp = data
this.list = data.baseInternalPurchaseVehicles
console.log('编辑初始化', this.temp)
}
}).catch(e => {
this.submitdisabled = false
})
},
// ---------- ------------------------------
/** xml 文件 */
getModelDetail(deployId) {
// xml
req.readXml(deployId).then((res) => {
this.xmlData = res.data
})
},
//
getFlowViewer(procInsId) {
req.getFlowViewer(procInsId).then((res) => {
this.taskList = res.data
})
},
//
openAgree(val) {
this.operation = val
this.dialogList.comment = '同意'
this.nodeDialogVisible = true
this.currentLink = true //
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, baseInternalPurchaseVehicles: this.temp.baseInternalPurchaseVehicles }).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.dialogList.comment = ''
this.currentLink = true //
// const formVariables = {
// businessSid: this.regectList.businessSid
// }
req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey }).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.dialogList.comment = ''
this.currentLink = false //
this.nodeDialogVisible = true
},
/** 选择代办人确认 */
confirm() {
if (this.operation === '同意') {
this.handleAgree()
} else if (this.operation === '驳回') {
this.handleReject()
} else if (this.operation === '终止') {
this.handleStop()
}
},
/** 同意任务 */
handleAgree() {
this.agreeList.comment = this.dialogList.comment
if (this.agreeList.comment === '') {
this.$message({
showClose: true,
message: '请填写同意意见!',
type: 'error'
})
return
}
this.agreeList.baseInternalPurchaseVehicles = this.temp.baseInternalPurchaseVehicles
req.agreeTask(this.agreeList).then((response) => {
if (response.success) {
this.$message({
showClose: true,
message: '执行成功',
type: 'success'
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 驳回任务 */
handleReject() {
this.regectList.comment = this.dialogList.comment
if (this.regectList.comment === '') {
this.$message({
showClose: true,
message: '请填写驳回意见!',
type: 'error'
})
return
}
req.rejectTask(this.regectList).then((response) => {
if (response.success) {
this.$message({
showClose: true,
message: '执行成功',
type: 'success'
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 终止任务 */
handleStop() {
this.stopList.comment = this.dialogList.comment
if (this.stopList.comment === '') {
this.$message({
showClose: true,
message: '请填写终止意见!',
type: 'error'
})
return
}
req.breakTask(this.stopList).then((response) => {
if (response.success) {
this.$message({
showClose: true,
message: '执行成功',
type: 'success'
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.title {
padding: 28px 0;
text-align: center;
}
.rowClass {
border-top: 1px solid #E0E3EB;
}
</style>
Loading…
Cancel
Save