|
|
@ -16,10 +16,8 @@ |
|
|
|
</div> |
|
|
|
<!-- 标题按钮部分结束 --> |
|
|
|
<!-- Start 新增修改部分 --> |
|
|
|
<div class="listconadd"> |
|
|
|
<div> |
|
|
|
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="right" class="formadd"> |
|
|
|
<div class="wlInfo" style="text-align: center;"><span style="font-size:28px;">外采申请表</span></div> |
|
|
|
<br><br> |
|
|
|
<el-row style="border-left: none;"> |
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>申请编号</span> |
|
|
@ -194,6 +192,7 @@ export default { |
|
|
|
viewTitle: '', |
|
|
|
formobj: { |
|
|
|
sid: '', |
|
|
|
staffSid: window.sessionStorage.getItem('staffSid'), |
|
|
|
applicationCode: '', // 申请编号 |
|
|
|
createByName: window.sessionStorage.getItem('name'), // 申请人姓名 |
|
|
|
applicationDate: '', // 申请日期 |
|
|
@ -212,7 +211,17 @@ export default { |
|
|
|
expenseName: '', // 费用名称 |
|
|
|
totalExpenseAmount: '', // 费用金额合计 |
|
|
|
orgSid: '', // 部门sid |
|
|
|
baseOutsourcingApplicationVehicleDtos:[] |
|
|
|
baseOutsourcingApplicationVehicleDtos:[], |
|
|
|
taskId: '', |
|
|
|
businessSid: '', |
|
|
|
instanceId: '' |
|
|
|
}, |
|
|
|
stopList: { // 终止列表 |
|
|
|
businessSid: '', |
|
|
|
comment: '', |
|
|
|
instanceId: '', |
|
|
|
taskId: '', |
|
|
|
userSid: window.sessionStorage.getItem('userSid') |
|
|
|
}, |
|
|
|
rules: { |
|
|
|
createByName: [{ required: true, message: '申请人姓名不能为空', trigger: 'blur' }], // 申请人姓名 |
|
|
@ -233,25 +242,48 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
// ===获取sid |
|
|
|
var a = window.location.href.indexOf('?') + 1 // 第一个?后面的一个字符的位置 |
|
|
|
var b = window.location.href.indexOf('#data') // 第一个#data出现的位置 |
|
|
|
const info = window.location.href.slice(a, b) |
|
|
|
var sid = info.substr(info.indexOf('=') + 1) |
|
|
|
this.showEdit(sid) |
|
|
|
// ===获取参数 |
|
|
|
var one = window.location.href.lastIndexOf('#') + 1 |
|
|
|
var two = window.location.href.lastIndexOf('}') + 1 |
|
|
|
const data = decodeURI(window.location.href.slice(one, two)) // url解码unescape()已从web中移除,尽量不使用 |
|
|
|
var tar = data.substr(data.indexOf('=') + 1) |
|
|
|
const obj = JSON.parse(tar) |
|
|
|
if (obj.taskName == '已完结' || '已终止') { |
|
|
|
this.isBtnShow = false |
|
|
|
} |
|
|
|
// 撤回列表 |
|
|
|
this.stopList.businessSid = sid |
|
|
|
this.stopList.instanceId = obj.instanceId |
|
|
|
this.stopList.taskId = obj.taskId |
|
|
|
this.formobj.businessSid = sid |
|
|
|
this.formobj.instanceId = obj.instanceId |
|
|
|
this.formobj.taskId = obj.taskId |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleSubmit() { |
|
|
|
const _this = this |
|
|
|
this.$refs['form_obj'].validate(valid => { |
|
|
|
if (valid) { |
|
|
|
// 提交的代码 |
|
|
|
this.submitdisabled = true |
|
|
|
req.submitVehicleReturn(this.formobj).then(resp => { |
|
|
|
this.formobj.userSid = window.sessionStorage.getItem('userSid'); |
|
|
|
this.formobj.orgSid = this.$store.getters.orgSid; |
|
|
|
req |
|
|
|
.doSubmit(this.formobj) |
|
|
|
.then(resp => { |
|
|
|
this.submitdisabled = false |
|
|
|
if (resp.success) { |
|
|
|
_this.handleReturn('true') |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.submitdisabled = false |
|
|
|
}) |
|
|
|
// 加提交后的逻辑 |
|
|
|
} else { |
|
|
|
return false |
|
|
|
// 根据resp.code进行异常情况处理 |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.submitdisabled = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
quedingVehicle(){ |
|
|
|
var obj = this.$refs['vehicle'].getSids(); |
|
|
@ -340,15 +372,15 @@ export default { |
|
|
|
}) |
|
|
|
this.viewTitle = '【新增】外采申请表' |
|
|
|
}, |
|
|
|
showEdit(row) { |
|
|
|
showEdit(sid) { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs['form_obj'].clearValidate() |
|
|
|
}) |
|
|
|
this.viewTitle = '【修改】外采申请表' |
|
|
|
const _this = this |
|
|
|
_this.formobj.sid = row.sid // SID |
|
|
|
_this.formobj.sid = sid // SID |
|
|
|
req |
|
|
|
.fetchBySid(row.sid) |
|
|
|
.fetchBySid(sid) |
|
|
|
.then(resp => { |
|
|
|
if (resp.success) { |
|
|
|
const vdata = resp.data |
|
|
|