11 changed files with 2319 additions and 871 deletions
@ -0,0 +1,245 @@ |
|||
<template> |
|||
<div> |
|||
<el-upload ref="imgUpload" v-loading="loadding" class="avatar-uploader" :headers="accessToken" |
|||
:action="uploadFile" accept=".jpg,.jpeg,.png,.bmp,.pdf,.JPG,.JPEG,.BMP" list-type="picture-card" |
|||
:file-list="files" :on-remove="removeImage" :on-preview="handlePictureCardPreview" |
|||
:on-progress="uploadProgrees" |
|||
:on-error="uploadError" :on-success="uploadImgSuccess_FuJian"> |
|||
<i class="el-icon-plus avatar-uploader-icon"/> |
|||
</el-upload> |
|||
<el-dialog :visible.sync="dialogVisible" :append-to-body="true" title="查看图片"> |
|||
<img width="100%" :src="dialogImageUrl" alt=""> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { uploadFile } from '@/api/portal/Upload.js' |
|||
import { getStorage } from '@/utils/auth.js' //token |
|||
import { mapGetters } from 'vuex' |
|||
|
|||
export default { |
|||
model: { |
|||
prop: 'name', |
|||
event: 'change' |
|||
}, |
|||
props: { |
|||
placeholder: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
bucket: { |
|||
type: String, |
|||
default: 'abc' |
|||
}, |
|||
// 长度 |
|||
width: { |
|||
type: String, |
|||
default: '270px' |
|||
}, |
|||
limit: { |
|||
type: Number, |
|||
default: 1 |
|||
}, |
|||
accept: { |
|||
type: String, |
|||
default: |
|||
'.jpg,.jpeg,.png,.JPG,.JPEG' |
|||
}, |
|||
// 文件名称 |
|||
name: { |
|||
type: Array, |
|||
required: true |
|||
}, |
|||
uploadData: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
dialogImageUrl: '', |
|||
dialogVisible: false, |
|||
accessToken: null, |
|||
uploadFile: uploadFile, |
|||
fileList_FuJian: [], |
|||
enclosure: '', |
|||
file_add: '', |
|||
file_catch: '', |
|||
files: [], |
|||
files_list: [], |
|||
filedUrl: '', |
|||
// fileUrl: fileUrl, |
|||
// showpicture:false, |
|||
isview: false, |
|||
nameArr: '', |
|||
loadding: false, |
|||
stateName: '' |
|||
} |
|||
}, |
|||
computed: { |
|||
...mapGetters([ |
|||
'id', |
|||
'departmentCode', |
|||
'departmentLevel', |
|||
'departmentType', |
|||
'token' |
|||
]) |
|||
}, |
|||
watch: { |
|||
name: { |
|||
deep: true, |
|||
immediate: true, |
|||
handler(newVal, oldVal) { |
|||
console.log('aaaa1', newVal) |
|||
this.files = newVal |
|||
// if (this.stateName = 'xunidingjinAdd') { |
|||
// if (this.files.length > 1) { |
|||
// this.files.splice(0, 1) |
|||
// } |
|||
// } |
|||
console.log('aaaa2', this.files) |
|||
} |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$nextTick(() => { |
|||
this.Init() |
|||
}) |
|||
}, |
|||
created() { |
|||
this.uploadFile = uploadFile // 接口 |
|||
this.accessToken = { |
|||
token: getStorage() |
|||
} |
|||
}, |
|||
methods: { |
|||
showImg(imgList) { |
|||
this.stateName = 'xunidingjinAdd' |
|||
this.files = imgList |
|||
console.log('回显图片', this.files) |
|||
}, |
|||
view() { |
|||
// window.open(this.filedUrl) |
|||
}, |
|||
// 页面第一次加载 |
|||
Init() { |
|||
if (this.name !== undefined) { |
|||
this.files = [] |
|||
for (var i = 0; i < this.name.length; i++) { |
|||
this.files.push({ |
|||
name: this.name[i], |
|||
url: this.name[i] |
|||
}) |
|||
} |
|||
} |
|||
}, |
|||
// 上传方案--成功后执行 |
|||
uploadImgSuccess_FuJian(response, file, fileList) { |
|||
console.log('您选择的file:', file) |
|||
if (file.response.code === '200') { |
|||
this.loadding = false |
|||
// 返显图片 |
|||
this.filedUrl = this.fileUrl + file.response.data |
|||
// var uid = file.response.data |
|||
this.files.push({ |
|||
name: file.response.data.sourceFileName, |
|||
url: file.response.data.fullUrl, |
|||
filePath: file.response.data.filePath, |
|||
size: file.response.data.size |
|||
}) |
|||
this.$emit('change', this.files) |
|||
this.$emit('eett', this.files) |
|||
} |
|||
}, |
|||
|
|||
removeImage(file, ImageFileList) { |
|||
this.files.splice(this.files.indexOf(file), 1) |
|||
const imgFiles = [] |
|||
|
|||
this.files.forEach((o) => { |
|||
imgFiles.push(o.url) |
|||
}) |
|||
this.$emit('fileChange', this.files) |
|||
}, |
|||
handleRemove(file, fileList) { |
|||
console.log('file:' + JSON.stringify(file)) |
|||
console.log('fileList:' + JSON.stringify(fileList)) |
|||
this.enclosure = '' |
|||
// 1. 保存新增文件id(this.file_add) |
|||
this.getNewFileId(fileList) |
|||
// 2. 保存数据库读取的已有文件id(this.file_catch) |
|||
this.getCatchFileId(file) |
|||
// 3. 保存并拼接id |
|||
this.getFileId() |
|||
// 4. 返回拼接id |
|||
this.$emit('change', this.enclosure) |
|||
}, |
|||
// 返回this.file_add(新上传文件的id拼接集合) |
|||
getNewFileId(fileList) { |
|||
// debugger |
|||
this.file_add = '' |
|||
for (var i = 0; i < fileList.length; i++) { |
|||
if (fileList[i].response && fileList[i].response.code === '200') { |
|||
this.file_add = this.file_add + fileList[i].response.data + ',' |
|||
} |
|||
} |
|||
if (this.file_add !== '') { |
|||
this.file_add = this.file_add.substring(0, this.file_add.length - 1) |
|||
} |
|||
// console.log('1. this.file_add: ' + this.file_add) |
|||
}, |
|||
// 返回this.file_catch(数库一寸照的文件的id的拼接集合) |
|||
getCatchFileId(file) { |
|||
for (var i = 0; i < this.files_list.length; i++) { |
|||
if (this.file_catch !== '') { |
|||
// 1. 检查当前删除的文件是否是修改文件列表里面的,如果是,将修改列表里去除此id |
|||
if (this.files_list[i].name === file.name) { |
|||
// 2. 拆开file_catch到fils_arry |
|||
var fils_arry = this.file_catch.split(',') |
|||
// 3. 从fils_arry去除 this.files_list[i].id |
|||
var arry = [] |
|||
fils_arry.forEach((element) => { |
|||
// 不加载文件里面的 |
|||
if (element !== this.files_list[i].id) { |
|||
arry.push(element) |
|||
} |
|||
}) |
|||
// 4. 重新拼接成file_catch |
|||
this.file_catch = arry.join(',') |
|||
} |
|||
} |
|||
} |
|||
// console.log('2. this.file_catch:' + this.file_catch) |
|||
}, |
|||
// 保存并拼接id |
|||
getFileId() { |
|||
// console.log('3. this.file_catch:' + this.file_catch + ',this.file_add:' + this.file_add) |
|||
if (this.file_catch !== '') { |
|||
if (this.file_add !== '') { |
|||
this.enclosure = this.file_catch + ',' + this.file_add |
|||
} else { |
|||
this.enclosure = this.file_catch |
|||
} |
|||
} else { |
|||
this.enclosure = this.file_add |
|||
} |
|||
}, |
|||
handlePictureCardPreview(file) { |
|||
this.dialogImageUrl = file.url |
|||
this.dialogVisible = true |
|||
}, |
|||
// 上传失败 |
|||
uploadError() { |
|||
this.loadding = false |
|||
}, |
|||
uploadProgrees(event, file, fileList) { |
|||
if (Number(event.percent) > 0) { |
|||
this.loadding = true |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped></style> |
@ -0,0 +1,331 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>分公司间调车申请详情</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<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> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<div class="titwu"><span>分公司间调车申请详情</span></div> |
|||
<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 spanOneWidth"><span>调车类型</span></div> |
|||
<el-form-item> |
|||
<span class="addinputInfo addinputwOne">{{ formobj.shuntingTypeValue }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty spanOneWidth"><span>调出分公司</span></div> |
|||
<el-form-item> |
|||
<span class="addinputInfo addinputwOne">{{ formobj.sellerOrgName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty spanOneWidth"><span>调入分公司</span></div> |
|||
<el-form-item> |
|||
<span class="addinputInfo addinputwOne">{{ formobj.buyerOrgName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title"> |
|||
<div>申请车辆列表</div> |
|||
</div> |
|||
<el-table :key="tableKey" :data="formobj.baseInternalPurchaseVehicles" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="车型" align="center" header-align="center" width="200"> |
|||
<template slot-scope="scope" prop="vehicleName"> |
|||
<span>{{ scope.row.vehicleAlias }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="常用配置" align="left" header-align="center" width="400"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.configName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="车架号" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.vinNo }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="库存地点" align="center" width="150"> |
|||
<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"> |
|||
<span>{{ scope.row.witPinMoney }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="发票类型" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.invoiceTypeValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="运费" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.freight }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="运费承担方" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.freightUndertakerType }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.remarks }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
</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" class="trightb"> |
|||
<el-form-item prop="purchasingUnitName"><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb">意见</el-col> |
|||
<el-col :span="20" class="trightb"> |
|||
<el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" clearable ></el-input> |
|||
</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/supplychain/cheliangneigou' |
|||
|
|||
export default { |
|||
name: 'neigouDaiBanByBusinessDivisionInfo', |
|||
data() { |
|||
return { |
|||
index: 0, |
|||
tableKey: 0, |
|||
// 表单数据 |
|||
formobj: {}, |
|||
operation: '', // 点击操作按钮 |
|||
dialogList: { |
|||
comment: '' |
|||
}, |
|||
startTask: true, |
|||
current: { |
|||
taskDefKey: '', |
|||
taskName: '' // 当前环节名称 |
|||
}, |
|||
nextNode: {}, // 下一环节 |
|||
nodeDialogVisible: false, |
|||
currentLink: true, |
|||
// 环节所需参数 |
|||
linkByParameter: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
orgSidPath: '', |
|||
taskDefKey: '', |
|||
userSid: '' |
|||
}, |
|||
rules: {} |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用 |
|||
const obj = JSON.parse(decodeURIComponent(data)) |
|||
console.log('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.showInfo(obj.businessSid) |
|||
}, |
|||
mounted() { |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 告诉父级页面,子页面的弹框高度。 |
|||
code: 2, |
|||
data: 400 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
methods: { |
|||
showInfo(sid) { |
|||
req.fetchBySid(sid).then((res) => { |
|||
if (res.success) { |
|||
this.formobj = res.data |
|||
} |
|||
}) |
|||
}, |
|||
// 同意 |
|||
openAgree(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.dialogList.comment = '同意' |
|||
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey }).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.dialogList.comment = '' |
|||
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.currentLink = 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() |
|||
} |
|||
} |
|||
}, |
|||
/** 同意任务 */ |
|||
handleAgree() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.companyToDivisionOperate(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> |
|||
.listconadd { |
|||
height: calc(100vh - 0px) !important; |
|||
} |
|||
.title { |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
.spanOneWidth { |
|||
width: 100px !important; |
|||
} |
|||
.addinputwOne { |
|||
margin-left: 110px !important; |
|||
} |
|||
</style> |
@ -0,0 +1,512 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<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="listconadd"> |
|||
<div class="titwu"><span>车辆入账申请单</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd"> |
|||
<el-row class="rowStyle"> |
|||
<el-col :span="20" class="colOneStyle"></el-col> |
|||
<el-col :span="4" class="tleftb colOneStyle"> |
|||
<span style="font-size: 16px">金额单位:元</span> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="3" class="tleftb"><span>分公司</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.useOrgName }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>申请日期</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.applicationDate }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>申请人</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.applicationName }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>采购订单编号</span></el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item>{{ formobj.purchaseOrderNo }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>车型</span></el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item>{{ formobj.modelName }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>常用配置</span></el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item>{{ formobj.configName }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>厂家合同价</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.contractPrice }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>其中上装价格</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.amongSzPrice }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>上装价格计算依据</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.szPriceCalBasis }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8" class="tcenterb"><span>其中含运费</span></el-col> |
|||
<el-col :span="3" class="tleftb"><span>一次运费</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.onceFreight }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>二次运费</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.secondaryFreight }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title"> |
|||
<div>政策详情(含签单折让、开票下浮等)</div> |
|||
<el-checkbox disabled v-model="freightChecked"><span style="color: #FFFFFF">扣减运费</span></el-checkbox> |
|||
</div> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>政策1</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.policyOne }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>可享受金额</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.eligibleAmountOne }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8" class="tcenterb"><span>计算政策2时:<el-checkbox disabled style="padding-left: 5px" v-model="policyOneChecked">扣减政策1</el-checkbox></span><span style="padding-left: 15px">计算政策3时:<el-checkbox disabled style="padding-left: 5px" v-model="policyTwoChecked">扣减政策1</el-checkbox><el-checkbox disabled v-model="policyThreeChecked">扣减政策2</el-checkbox></span></el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>政策2</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.policyTwo }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>可享受比例(%)</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.eligibleProportionTwo }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>对应金额</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.corrMoneyTwo }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>政策3</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.policyThree }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>可享受比例(%)</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.eligibleProportionThree }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>对应金额</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.corrMoneyThree }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>金额合计</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.moneyCount }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>政策备注</span></el-col> |
|||
<el-col :span="13"> |
|||
<el-form-item>{{ formobj.policyRemarks }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>厂家政策截图</span></el-col> |
|||
<el-col :span="21"> |
|||
<div v-for="item in formobj.scmFiles" style="float: left"> |
|||
<div style="display: flex;flex-direction: column;justify-content: center;align-items: center;" > |
|||
<el-image style="cursor:pointer;width: 150px;height: 150px;margin-top: 5px" :src="item.filePath" @click="magnify(item.filePath)"> |
|||
</el-image> |
|||
</div> |
|||
</div> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>厂家结算价</span></el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item>{{ formobj.costPrice }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title"> |
|||
<div>车辆列表</div> |
|||
</div> |
|||
<el-table :key="tableKey" :data="formobj.vehicleList" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="60px" label="序号" type="index" :index="index + 1" align="center" /> |
|||
<el-table-column label="车架号" align="left" header-align="center"> |
|||
<template slot-scope="scope" prop="vehicleName"> |
|||
{{ scope.row.vinNo }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" header-align="center"> |
|||
<template slot-scope="scope" prop="remarks"> |
|||
{{ scope.row.remarks }} |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>厂家入库日期</span></el-col> |
|||
<el-col :span="9"> |
|||
<el-form-item>{{ formobj.priceDate }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>厂家发车日期</span></el-col> |
|||
<el-col :span="9"> |
|||
<el-form-item>{{ formobj.departureDate }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>备注</span></el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item>{{ formobj.remarks }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<el-dialog :visible.sync="dialogVisible"> |
|||
<img width="100%" :src="dialogUrl" alt=""> |
|||
</el-dialog> |
|||
<!-- 选择待办人 的弹出框--> |
|||
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%"> |
|||
<el-form class="formaddcopy02" > |
|||
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="24"> |
|||
<div class="span-sty spanTwoWidth"><span>当前环节:</span></div> |
|||
<el-form-item><span class="addinputInfo addinputOne">{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty spanTwoWidth"><span>意见:</span></div> |
|||
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw addinputOne" 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/ruzhang/scmapplyinbound' |
|||
|
|||
export default { |
|||
name: 'ruzhangDaiBanInfo', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
dialogVisible: false, |
|||
dialogUrl: '', |
|||
freightChecked: false, // 扣减运费 |
|||
policyOneChecked: false, // 计算政策2: 扣减政策1 |
|||
policyTwoChecked: false, // 计算政策3: 扣减政策1 |
|||
policyThreeChecked: false, // 计算政策3: 扣减政策2 |
|||
operation: '', // 点击操作按钮 |
|||
dialogList: { |
|||
comment: '' |
|||
}, |
|||
startTask: true, |
|||
current: { |
|||
taskDefKey: '', |
|||
taskName: '' // 当前环节名称 |
|||
}, |
|||
nextNode: {}, // 下一环节 |
|||
nodeDialogVisible: false, |
|||
currentLink: true, |
|||
// 表单数据 |
|||
formobj: { |
|||
amongSzPrice: '', |
|||
applicationCode: '', |
|||
applicationDate: '', |
|||
applicationName: '', |
|||
applicationSid: '', |
|||
configName: '', |
|||
configSid: '', |
|||
contractPrice: '', |
|||
corrMoneyThree: '', |
|||
corrMoneyTwo: '', |
|||
costPrice: '', |
|||
departureDate: '', |
|||
eligibleAmountOne: '', |
|||
eligibleProportionThree: '', |
|||
eligibleProportionTwo: '', |
|||
insideCode: '', |
|||
modelName: '', |
|||
modelSid: '', |
|||
moneyCount: '', |
|||
nodeState: '', |
|||
num: '', |
|||
onceFreight: '', |
|||
policyOne: '', |
|||
policyRemarks: '', |
|||
policyThree: '', |
|||
policyTwo: '', |
|||
priceDate: '', |
|||
purchaseOrderNo: '', |
|||
remarks: '', |
|||
secondaryFreight: '', |
|||
userSid: '', |
|||
useOrgName: '', |
|||
useOrgSid: '', |
|||
deductionFreight: '', |
|||
deductionPolicyThreeOne: '', |
|||
deductionPolicyThreeTwo: '', |
|||
deductionPolicyTwoOne: '', |
|||
scmFiles: [], |
|||
vehicleList: [], |
|||
vehicleOrderSid: '' |
|||
}, |
|||
// 环节所需参数 |
|||
linkByParameter: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
orgSidPath: '', |
|||
taskDefKey: '', |
|||
userSid: '' |
|||
}, |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // url解码unescape()已从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.showInfo(obj.businessSid) |
|||
}, |
|||
mounted() { |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 告诉父级页面,子页面的弹框高度。 |
|||
code: 2, |
|||
data: 600 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
methods: { |
|||
showInfo(sid, row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '入账单' |
|||
console.log('编辑回显', sid, row) |
|||
req.fetchBySid(sid).then(resp => { |
|||
const data = resp.data |
|||
this.formobj = data |
|||
if (this.formobj.deductionFreight === '0') { |
|||
this.freightChecked = true |
|||
} else { |
|||
this.freightChecked = false |
|||
} |
|||
if (this.formobj.deductionPolicyTwoOne === '0') { |
|||
this.policyOneChecked = true |
|||
} else { |
|||
this.policyOneChecked = false |
|||
} |
|||
if (this.formobj.deductionPolicyTwoOne === '0') { |
|||
this.policyTwoChecked = true |
|||
} else { |
|||
this.policyTwoChecked = false |
|||
} |
|||
if (this.formobj.deductionPolicyThreeTwo === '0') { |
|||
this.policyThreeChecked = true |
|||
} else { |
|||
this.policyThreeChecked = false |
|||
} |
|||
}).catch(e => { |
|||
this.formobj = row |
|||
}) |
|||
}, |
|||
magnify(val) { |
|||
this.dialogVisible = true |
|||
this.dialogUrl = val |
|||
}, |
|||
// 同意 |
|||
openAgree(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.dialogList.comment = '同意' |
|||
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey }).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.dialogList.comment = '' |
|||
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.currentLink = 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() |
|||
} |
|||
} |
|||
}, |
|||
/** 同意任务 */ |
|||
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> |
|||
.listconadd { |
|||
height: calc(100vh - 0px) !important; |
|||
} |
|||
.title { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
.tcenterb { |
|||
text-align: center; |
|||
font-size: 14px; |
|||
color: #606266; |
|||
line-height: 40px !important; |
|||
font-weight: 600; |
|||
} |
|||
.rowStyle { |
|||
border-left: 0px; |
|||
} |
|||
.colOneStyle { |
|||
border-right: 0px !important; |
|||
border-bottom: 0px !important; |
|||
} |
|||
.freight { |
|||
color: #FFFFFF; |
|||
} |
|||
</style> |
@ -1,497 +0,0 @@ |
|||
<template> |
|||
<div> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button v-show="transactState == '00'" type="primary" @click="openAgree">同 意</el-button> |
|||
<el-button v-show="transactState == '00'" type="danger" @click="openReject">驳 回</el-button> |
|||
<el-button v-show="transactState == '00'" type="danger" @click="openStop">终 止</el-button> |
|||
<el-button v-show="transactState == '01'" type="danger" @click="openRevoke">撤 回</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div> |
|||
<div class="wlInfo"><span>车辆入账单</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="top"> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"><el-form-item label="申请编号:" /></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item><el-input v-model="formobj.applicationCode" readonly /></el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="el-form-item-right"><el-form-item label="采购订单编号:" /></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item><el-input v-model="formobj.purchaseOrderNo" readonly /></el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="el-form-item-right"><el-form-item label="申请人:" /></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item><el-input v-model="formobj.applicationName" readonly /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"><el-form-item label="车型:" /></el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item><el-input v-model="formobj.modelName" readonly /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"><el-form-item label="常用配置:" /></el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item><el-input v-model="formobj.configName" readonly /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="tableStyle"><div style="margin-left: 5px;font-weight: bold">车辆列表</div></div> |
|||
<el-table :key="tableKey" :data="formobj.vehicleList" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center" /> |
|||
<el-table-column label="车架号" align="left" header-align="center"> |
|||
<template slot-scope="scope" prop="vehicleName"> |
|||
<el-input v-model="scope.row.vinNo" placeholder="" class="addinputw" clearable readonly /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" header-align="center"> |
|||
<template slot-scope="scope" prop="remarks"> |
|||
<el-input v-model="scope.row.remarks" placeholder="" class="addinputw" clearable readonly /> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-row class="linetwo" style="margin-top: 10px"> |
|||
<el-col> |
|||
<el-col :span="3" class="el-form-item-right"><el-form-item label="厂家发车日期:" /></el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item><el-input v-model="formobj.departureDate" placeholder="" class="addinputw" clearable readonly /></el-form-item> |
|||
</el-col> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"><el-form-item label="备注:" /></el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item><el-input v-model="formobj.remarks" clearable readonly /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
|
|||
<!-- 选择待办人 同意 的弹出框--> |
|||
<el-dialog title="同意" :visible.sync="nodeDialogVisible" width="80%"> |
|||
<el-form label-position="right" class="formadd"> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb">当前环节</el-col> |
|||
<el-col :span="20" class="trightb"> |
|||
<el-form-item prop="purchasingUnitName"> |
|||
<span>{{ formobj.nodeState }}->{{ nextNode.name }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb">意见</el-col> |
|||
<el-col :span="20" class="trightb"><el-input v-model="formobj.comment" size="small" placeholder="审批意见" class="addinputw" clearable /></el-col> |
|||
</el-row> |
|||
<div style="text-align:center;margin-top: 20px;"> |
|||
<el-button type="primary" size="mini" @click="handleAgree">确 定</el-button> |
|||
<el-button type="info " size="mini" @click="closeNodeDialog">取 消</el-button> |
|||
</div> |
|||
</el-form> |
|||
</el-dialog> |
|||
<!-- 选择待办人 驳回 的弹出框--> |
|||
<el-dialog title="驳回" :visible.sync="nodeDialogVisibleForReject" width="80%"> |
|||
<el-form label-position="right" class="formadd"> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb">当前环节</el-col> |
|||
<el-col :span="20" class="trightb"> |
|||
<el-form-item prop="purchasingUnitName"> |
|||
<span>{{ formobj.nodeState }}->{{ nextNode.name }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb">原因</el-col> |
|||
<el-col :span="20" class="trightb"><el-input v-model="formobj.comment" size="small" placeholder="驳回原因" class="addinputw" clearable /></el-col> |
|||
</el-row> |
|||
<div style="text-align:center;margin-top: 20px;"> |
|||
<el-button type="primary" size="mini" @click="handleReject">确 定</el-button> |
|||
<el-button type="info " size="mini" @click="closeNodeDialog">取 消</el-button> |
|||
</div> |
|||
</el-form> |
|||
</el-dialog> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/ruzhang/scmapplyinbound' |
|||
export default { |
|||
name: 'RuzhangInfo', |
|||
data() { |
|||
return { |
|||
// 选择待办人弹框 |
|||
nodeDialogVisible: false, |
|||
nodeDialogVisibleForReject: false, |
|||
// 下一环节 |
|||
nextNode: {}, |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
// 表单数据 |
|||
formobj: { |
|||
sid: '', // 一条数据的sid |
|||
userSid: window.sessionStorage.getItem('userSid'), // 用户人sid |
|||
orgSidPath: window.sessionStorage.getItem('orgSidPath'), |
|||
staffSid: window.sessionStorage.getItem('staffSid'), |
|||
configName: '', |
|||
configSid: '', |
|||
departureDate: '', |
|||
modelName: '', |
|||
modelSid: '', |
|||
purchaseOrderNo: '', |
|||
remarks: '', // 备注 |
|||
vehicleOrderSid: '', |
|||
vehicleList: [], |
|||
comment:'' |
|||
}, |
|||
dialogList: { |
|||
comment: '' |
|||
}, |
|||
transactState: '', // 办理状态 |
|||
// 同意办理列表 |
|||
agreeList: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
userSid: window.sessionStorage.getItem('userSid') |
|||
}, |
|||
// 驳回列表 |
|||
regectList: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
userSid: window.sessionStorage.getItem('userSid') |
|||
}, |
|||
// 终止列表 |
|||
stopList: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
userSid: window.sessionStorage.getItem('userSid') |
|||
}, |
|||
// 撤回 |
|||
revokeList: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
userSid: window.sessionStorage.getItem('userSid') |
|||
}, |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
created() { |
|||
// ===获取参数 |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用 |
|||
var dd = decodeURIComponent(data) |
|||
const obj = JSON.parse(dd) |
|||
var sid = obj.businessSid |
|||
this.showInfo(sid) |
|||
|
|||
// 同意列表 |
|||
this.agreeList.businessSid = sid |
|||
this.agreeList.instanceId = obj.instanceId |
|||
this.agreeList.taskId = obj.taskId |
|||
// 驳回列表 |
|||
this.regectList.businessSid = sid |
|||
this.regectList.instanceId = obj.instanceId |
|||
this.regectList.taskId = obj.taskId |
|||
// 终止列表 |
|||
this.stopList.businessSid = sid |
|||
this.stopList.instanceId = obj.instanceId |
|||
this.stopList.taskId = obj.taskId |
|||
// 撤回列表 |
|||
this.revokeList.businessSid = sid |
|||
this.revokeList.instanceId = obj.instanceId |
|||
this.revokeList.taskId = obj.taskId |
|||
// 办理状态 |
|||
this.transactState = obj.transactState |
|||
window.parent.postMessage( |
|||
{ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 告诉父级页面,子页面的弹框高度。 |
|||
code: 2, |
|||
data: 600 + 'px' |
|||
} |
|||
}, |
|||
'*' |
|||
) |
|||
}, |
|||
methods: { |
|||
// 关闭弹出框 选择待办人弹框 |
|||
closeNodeDialog() { |
|||
this.nodeDialogVisible = false |
|||
this.nodeDialogVisibleForReject = false |
|||
}, |
|||
showInfo(sid, row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '入账单详情' |
|||
console.log('编辑回显', sid, row) |
|||
req |
|||
.fetchBySid(sid) |
|||
.then(resp => { |
|||
const data = resp.data |
|||
this.formobj.applicationSid = data.applicationSid |
|||
this.formobj.applicationName = data.applicationName |
|||
this.formobj.applicationCode = data.applicationCode |
|||
this.formobj.remarks = data.remarks |
|||
this.formobj.sid = sid |
|||
this.formobj.configName = data.configName |
|||
this.formobj.configSid = data.configSid |
|||
this.formobj.departureDate = data.departureDate |
|||
this.formobj.modelName = data.modelName |
|||
this.formobj.modelSid = data.modelSid |
|||
this.formobj.purchaseOrderNo = data.purchaseOrderNo |
|||
this.formobj.vehicleOrderSid = data.vehicleOrderSid |
|||
this.formobj.taskDefKey = data.taskDefKey |
|||
this.formobj.taskId = data.taskId |
|||
this.formobj.nodeState = data.nodeState |
|||
if (data.inboundVehicleList.length > 0) { |
|||
data.inboundVehicleList.forEach(e => { |
|||
this.formobj.vehicleList.push({ |
|||
applySid: e.applySid, |
|||
remarks: e.remarks, |
|||
modelSid: e.modelSid, |
|||
sid: e.sid, |
|||
vinNo: e.vinNo |
|||
}) |
|||
}) |
|||
} |
|||
}) |
|||
.catch(e => { |
|||
this.formobj = row |
|||
}) |
|||
}, |
|||
// 同意 |
|||
openAgree() { |
|||
this.formobj.comment = '同意' |
|||
// 查验下一环节要用到,流程定义的id |
|||
req.getNextNodesForSubmit(this.formobj).then(resp => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
/** 同意任务 */ |
|||
handleAgree() { |
|||
if (!this.formobj.comment) { |
|||
alert('请填写审批意见!') |
|||
return |
|||
} |
|||
// 意见 |
|||
// 下一环节的用户sid |
|||
// 调用后台接口流转 |
|||
req.businessAgree(this.formobj).then(response => { |
|||
if (response.code === '200') { |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage( |
|||
{ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, |
|||
'*' |
|||
) |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
// 驳回 |
|||
openReject() { |
|||
req.getPreviousNodesForReject(this.formobj).then(resp => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
// 循环获取当前环节的下一个环节信息 |
|||
var startTask = arr[0].startTask |
|||
if (startTask) { |
|||
alert('当前环节不能驳回!') |
|||
return |
|||
} |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisibleForReject = true |
|||
} |
|||
}) |
|||
}, |
|||
/** 驳回任务 */ |
|||
handleReject() { |
|||
if (!this.formobj.comment) { |
|||
alert('请填写审批意见!') |
|||
return |
|||
} |
|||
this.regectList.comment = this.formobj.comment |
|||
req.rejectTask(this.regectList).then(response => { |
|||
if (response.code === '200') { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisibleForReject = false |
|||
window.parent.postMessage( |
|||
{ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
code: 1 |
|||
} |
|||
}, |
|||
'*' |
|||
) |
|||
// this.refreshIt() |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
// 终止 |
|||
openStop() { |
|||
this.$confirm('是否确认执行终止操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}) |
|||
.then(() => { |
|||
this.handleStop() |
|||
}) |
|||
.catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消终止' |
|||
}) |
|||
}) |
|||
}, |
|||
/** 确认撤回任务 */ |
|||
openRevoke() { |
|||
this.$confirm('是否确认执行撤回操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}) |
|||
.then(() => { |
|||
this.handleRevoke() |
|||
}) |
|||
.catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消撤回' |
|||
}) |
|||
}) |
|||
}, |
|||
/** 终止任务 */ |
|||
handleStop() { |
|||
this.stopList.comment = this.dialogList.comment |
|||
req.breakTask(this.stopList).then(response => { |
|||
if (response.code === '200') { |
|||
window.parent.postMessage( |
|||
{ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, |
|||
'*' |
|||
) |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
/** 撤回任务 */ |
|||
handleRevoke() { |
|||
this.revokeList.comment = this.dialogList.comment |
|||
req.revokeTask(this.revokeList).then(response => { |
|||
if (response.code === '200') { |
|||
window.parent.postMessage( |
|||
{ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, |
|||
'*' |
|||
) |
|||
} else { |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.wlInfo { |
|||
text-align: center; |
|||
font-size: 28px; |
|||
line-height: 90px; |
|||
} |
|||
.lineone { |
|||
border-bottom: 2px solid #e0e3eb; |
|||
} |
|||
.lineone .el-form-item { |
|||
margin-bottom: -10px; |
|||
} |
|||
.lineone >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.linetwo { |
|||
margin-top: 10px; |
|||
} |
|||
.linetwo .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
} |
|||
.linetwo >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.tableStyle { |
|||
background-color: #ffffff; |
|||
display: flex; |
|||
justify-content: flex-start; |
|||
align-items: center; |
|||
border: 1px solid #dfe4ed; |
|||
height: 40px; |
|||
} |
|||
.el-form-item-right { |
|||
text-align: right; |
|||
} |
|||
.inputType { |
|||
width: 600px; |
|||
} |
|||
</style> |
@ -0,0 +1,396 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button type="danger" size="small" @click="openRevoke()">撤 回 </el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<div class="titwu"><span>车辆入账申请单</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd"> |
|||
<el-row class="rowStyle"> |
|||
<el-col :span="20" class="colOneStyle"></el-col> |
|||
<el-col :span="4" class="tleftb colOneStyle"> |
|||
<span style="font-size: 16px">金额单位:元</span> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="3" class="tleftb"><span>分公司</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.useOrgName }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>申请日期</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.applicationDate }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>申请人</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.applicationName }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>采购订单编号</span></el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item>{{ formobj.purchaseOrderNo }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>车型</span></el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item>{{ formobj.modelName }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>常用配置</span></el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item>{{ formobj.configName }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>厂家合同价</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.contractPrice }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>其中上装价格</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.amongSzPrice }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>上装价格计算依据</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.szPriceCalBasis }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8" class="tcenterb"><span>其中含运费</span></el-col> |
|||
<el-col :span="3" class="tleftb"><span>一次运费</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.onceFreight }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>二次运费</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.secondaryFreight }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title"> |
|||
<div>政策详情(含签单折让、开票下浮等)</div> |
|||
<el-checkbox disabled v-model="freightChecked"><span style="color: #FFFFFF">扣减运费</span></el-checkbox> |
|||
</div> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>政策1</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.policyOne }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>可享受金额</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.eligibleAmountOne }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8" class="tcenterb"><span>计算政策2时:<el-checkbox disabled style="padding-left: 5px" v-model="policyOneChecked">扣减政策1</el-checkbox></span><span style="padding-left: 15px">计算政策3时:<el-checkbox disabled style="padding-left: 5px" v-model="policyTwoChecked">扣减政策1</el-checkbox><el-checkbox disabled v-model="policyThreeChecked">扣减政策2</el-checkbox></span></el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>政策2</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.policyTwo }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>可享受比例(%)</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.eligibleProportionTwo }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>对应金额</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.corrMoneyTwo }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>政策3</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.policyThree }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>可享受比例(%)</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.eligibleProportionThree }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>对应金额</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.corrMoneyThree }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>金额合计</span></el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item>{{ formobj.moneyCount }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>政策备注</span></el-col> |
|||
<el-col :span="13"> |
|||
<el-form-item>{{ formobj.policyRemarks }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>厂家政策截图</span></el-col> |
|||
<el-col :span="21"> |
|||
<div v-for="item in formobj.scmFiles" style="float: left"> |
|||
<div style="display: flex;flex-direction: column;justify-content: center;align-items: center;" > |
|||
<el-image style="cursor:pointer;width: 150px;height: 150px;margin-top: 5px" :src="item.filePath" @click="magnify(item.filePath)"> |
|||
</el-image> |
|||
</div> |
|||
</div> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>厂家结算价</span></el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item>{{ formobj.costPrice }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title"> |
|||
<div>车辆列表</div> |
|||
</div> |
|||
<el-table :key="tableKey" :data="formobj.vehicleList" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="60px" label="序号" type="index" :index="index + 1" align="center" /> |
|||
<el-table-column label="车架号" align="left" header-align="center"> |
|||
<template slot-scope="scope" prop="vehicleName"> |
|||
{{ scope.row.vinNo }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" header-align="center"> |
|||
<template slot-scope="scope" prop="remarks"> |
|||
{{ scope.row.remarks }} |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>厂家入库日期</span></el-col> |
|||
<el-col :span="9"> |
|||
<el-form-item>{{ formobj.priceDate }}</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="tleftb"><span>厂家发车日期</span></el-col> |
|||
<el-col :span="9"> |
|||
<el-form-item>{{ formobj.departureDate }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="tleftb"><span>备注</span></el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item>{{ formobj.remarks }}</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<el-dialog :visible.sync="dialogVisible"> |
|||
<img width="100%" :src="dialogUrl" alt=""> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/ruzhang/scmapplyinbound' |
|||
|
|||
export default { |
|||
name: 'ruzhangYiBanInfo', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
dialogVisible: false, |
|||
dialogUrl: '', |
|||
freightChecked: false, // 扣减运费 |
|||
policyOneChecked: false, // 计算政策2: 扣减政策1 |
|||
policyTwoChecked: false, // 计算政策3: 扣减政策1 |
|||
policyThreeChecked: false, // 计算政策3: 扣减政策2 |
|||
// 表单数据 |
|||
formobj: { |
|||
amongSzPrice: '', |
|||
applicationCode: '', |
|||
applicationDate: '', |
|||
applicationName: '', |
|||
applicationSid: '', |
|||
configName: '', |
|||
configSid: '', |
|||
contractPrice: '', |
|||
corrMoneyThree: '', |
|||
corrMoneyTwo: '', |
|||
costPrice: '', |
|||
departureDate: '', |
|||
eligibleAmountOne: '', |
|||
eligibleProportionThree: '', |
|||
eligibleProportionTwo: '', |
|||
insideCode: '', |
|||
modelName: '', |
|||
modelSid: '', |
|||
moneyCount: '', |
|||
nodeState: '', |
|||
num: '', |
|||
onceFreight: '', |
|||
policyOne: '', |
|||
policyRemarks: '', |
|||
policyThree: '', |
|||
policyTwo: '', |
|||
priceDate: '', |
|||
purchaseOrderNo: '', |
|||
remarks: '', |
|||
secondaryFreight: '', |
|||
userSid: '', |
|||
useOrgName: '', |
|||
useOrgSid: '', |
|||
deductionFreight: '', |
|||
deductionPolicyThreeOne: '', |
|||
deductionPolicyThreeTwo: '', |
|||
deductionPolicyTwoOne: '', |
|||
scmFiles: [], |
|||
vehicleList: [], |
|||
vehicleOrderSid: '' |
|||
}, |
|||
// 环节所需参数 |
|||
linkByParameter: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
orgSidPath: '', |
|||
taskDefKey: '', |
|||
userSid: '' |
|||
}, |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // url解码unescape()已从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.showInfo(obj.businessSid) |
|||
}, |
|||
mounted() { |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 告诉父级页面,子页面的弹框高度。 |
|||
code: 2, |
|||
data: 400 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
methods: { |
|||
showInfo(sid, row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '入账单' |
|||
console.log('编辑回显', sid, row) |
|||
req.fetchBySid(sid).then(resp => { |
|||
const data = resp.data |
|||
this.formobj = data |
|||
if (this.formobj.deductionFreight === '0') { |
|||
this.freightChecked = true |
|||
} else { |
|||
this.freightChecked = false |
|||
} |
|||
if (this.formobj.deductionPolicyTwoOne === '0') { |
|||
this.policyOneChecked = true |
|||
} else { |
|||
this.policyOneChecked = false |
|||
} |
|||
if (this.formobj.deductionPolicyTwoOne === '0') { |
|||
this.policyTwoChecked = true |
|||
} else { |
|||
this.policyTwoChecked = false |
|||
} |
|||
if (this.formobj.deductionPolicyThreeTwo === '0') { |
|||
this.policyThreeChecked = true |
|||
} else { |
|||
this.policyThreeChecked = false |
|||
} |
|||
}).catch(e => { |
|||
this.formobj = row |
|||
}) |
|||
}, |
|||
magnify(val) { |
|||
this.dialogVisible = true |
|||
this.dialogUrl = val |
|||
}, |
|||
/** 确认撤回任务 */ |
|||
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 |
|||
}) |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.title { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
.tcenterb { |
|||
text-align: center; |
|||
font-size: 14px; |
|||
color: #606266; |
|||
line-height: 40px !important; |
|||
font-weight: 600; |
|||
} |
|||
.rowStyle { |
|||
border-left: 0px; |
|||
} |
|||
.colOneStyle { |
|||
border-right: 0px !important; |
|||
border-bottom: 0px !important; |
|||
} |
|||
.freight { |
|||
color: #FFFFFF; |
|||
} |
|||
</style> |
Loading…
Reference in new issue