|
@ -36,15 +36,15 @@ |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="8"><!-- :readonly="vehicleList[scope.$index].inboundDate" --> |
|
|
<el-col :span="8"><!-- :readonly="vehicleList[scope.$index].inboundDate" --> |
|
|
<el-form-item prop="money" label="调出分公司"> |
|
|
<el-form-item prop="money" label="调出分公司"> |
|
|
<el-select v-model="temp.callOutOrgSid" placeholder="请选择" clearable class="addinputw" :disabled="temp.accadjTypeKey == '02' || dialogStatus == 'edit'" @change="callOutOrgSidChange"> |
|
|
<el-select v-model="temp.callOutOrgName" placeholder="请选择" clearable class="addinputw" :disabled="temp.accadjTypeKey == '02' || dialogStatus == 'edit'" @change="callOutOrgSidChange"> |
|
|
<el-option v-for="item in useOrg_list" :key="item.sid" :label="item.name" :value="item.sid"/> |
|
|
<el-option v-for="item in useOrg_list" :key="item.sid" :label="item.name" :value="item.name"/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="8"> |
|
|
<el-col :span="8"> |
|
|
<el-form-item prop="money" label="调入分公司"> |
|
|
<el-form-item prop="money" label="调入分公司"> |
|
|
<el-select v-model="temp.callInOrgSid" placeholder="请选择" clearable class="addinputw" :disabled="temp.accadjTypeKey == '01' || dialogStatus == 'edit'" @change="callInOrgSidChange"> |
|
|
<el-select v-model="temp.callInOrgName" placeholder="请选择" clearable class="addinputw" :disabled="temp.accadjTypeKey == '01' || dialogStatus == 'edit'" @change="callInOrgSidChange"> |
|
|
<el-option v-for="item in useOrg_list" :key="item.sid" :label="item.name" :value="item.sid"/> |
|
|
<el-option v-for="item in useOrg_list" :key="item.sid" :label="item.name" :value="item.name"/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
@ -128,7 +128,7 @@ |
|
|
<script> |
|
|
<script> |
|
|
import tiaozhangcheliangList from './relation/tiaozhangcheliangList' |
|
|
import tiaozhangcheliangList from './relation/tiaozhangcheliangList' |
|
|
import { fetchDetailsBySid, save, submitAccAdjApply } from '@/api/supplychain/tiaozhangshenqing.js' |
|
|
import { fetchDetailsBySid, save, submitAccAdjApply } from '@/api/supplychain/tiaozhangshenqing.js' |
|
|
import { getOrg, getPathSidByUserSid } from '@/api/cheliang/basevehiclemodel' |
|
|
import { getPathSidByUserSid, getListOrgByBrand, fetchBySid } from '@/api/cheliang/dictcommons' |
|
|
import { typeValues } from '@/api/cheliang/dictcommons' |
|
|
import { typeValues } from '@/api/cheliang/dictcommons' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
@ -145,6 +145,7 @@ export default { |
|
|
list: [], |
|
|
list: [], |
|
|
vehicleList: [], |
|
|
vehicleList: [], |
|
|
useOrg: '', |
|
|
useOrg: '', |
|
|
|
|
|
useOrgName: '', |
|
|
accadjType_list: [], |
|
|
accadjType_list: [], |
|
|
useOrg_list: [], |
|
|
useOrg_list: [], |
|
|
// 表单数据 |
|
|
// 表单数据 |
|
@ -212,6 +213,11 @@ export default { |
|
|
if (res.code === '200') { |
|
|
if (res.code === '200') { |
|
|
this.useOrg = res.data |
|
|
this.useOrg = res.data |
|
|
this.temp.createOrgSid = res.data |
|
|
this.temp.createOrgSid = res.data |
|
|
|
|
|
fetchBySid(this.useOrg).then((resp) => { |
|
|
|
|
|
if (resp.success) { |
|
|
|
|
|
this.useOrgName = resp.data.name |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
@ -224,46 +230,51 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
getListOrgAll() { |
|
|
|
|
|
getOrg().then((res) => { |
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
this.useOrg_list = res.data |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
accadjTypeKeyChange(val) { |
|
|
accadjTypeKeyChange(val) { |
|
|
if (val) { |
|
|
if (val) { |
|
|
const choosetItem = this.accadjType_list.filter((item) => item.dictKey === val) |
|
|
const choosetItem = this.accadjType_list.filter((item) => item.dictKey === val) |
|
|
this.temp.accadjTypeValue = choosetItem[0].dictValue |
|
|
this.temp.accadjTypeValue = choosetItem[0].dictValue |
|
|
console.log('name:', this.temp.accadjTypeValue, 'key:', this.temp.accadjTypeKey) |
|
|
console.log('name:', this.temp.accadjTypeValue, 'key:', this.temp.accadjTypeKey) |
|
|
// 调入 |
|
|
// 调入 |
|
|
if (this.temp.accadjTypeKey == '01') { |
|
|
if (this.temp.accadjTypeKey === '01') { |
|
|
this.temp.callInOrgSid = this.useOrg |
|
|
this.temp.callInOrgSid = this.useOrg |
|
|
const name = this.useOrg_list.filter((item) => item.sid === this.temp.callInOrgSid) |
|
|
// const name = this.useOrg_list.filter((item) => item.sid === this.temp.callInOrgSid) |
|
|
this.temp.callInOrgName = name[0].name |
|
|
this.temp.callInOrgName = this.useOrgName |
|
|
console.log('name:', this.temp.callInOrgName, 'sid:', this.temp.callInOrgSid) |
|
|
console.log('name:', this.temp.callInOrgName, 'sid:', this.temp.callInOrgSid) |
|
|
this.temp.callOutOrgName = '' |
|
|
this.temp.callOutOrgName = '' |
|
|
this.temp.callOutOrgSid = '' |
|
|
this.temp.callOutOrgSid = '' |
|
|
|
|
|
getListOrgByBrand(this.useOrg).then((resp) => { |
|
|
|
|
|
if (resp.success) { |
|
|
|
|
|
this.useOrg_list = resp.data |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
// 调出 |
|
|
// 调出 |
|
|
if (this.temp.accadjTypeKey == '02') { |
|
|
if (this.temp.accadjTypeKey === '02') { |
|
|
this.temp.callOutOrgSid = this.useOrg |
|
|
this.temp.callOutOrgSid = this.useOrg |
|
|
const name = this.useOrg_list.filter((item) => item.sid === this.temp.callOutOrgSid) |
|
|
// const name = this.useOrg_list.filter((item) => item.sid === this.temp.callOutOrgSid) |
|
|
this.temp.callOutOrgName = name[0].name |
|
|
this.temp.callOutOrgName = this.useOrgName |
|
|
console.log('name:', this.temp.callOutOrgName, 'sid:', this.temp.callOutOrgSid) |
|
|
console.log('name:', this.temp.callOutOrgName, 'sid:', this.temp.callOutOrgSid) |
|
|
this.temp.callInOrgName = '' |
|
|
this.temp.callInOrgName = '' |
|
|
this.temp.callInOrgSid = '' |
|
|
this.temp.callInOrgSid = '' |
|
|
|
|
|
getListOrgByBrand(this.useOrg).then((resp) => { |
|
|
|
|
|
if (resp.success) { |
|
|
|
|
|
this.useOrg_list = resp.data |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
callOutOrgSidChange(val) { |
|
|
callOutOrgSidChange(val) { |
|
|
const choosetItem = this.useOrg_list.filter((item) => item.sid === val) |
|
|
const choosetItem = this.useOrg_list.filter((item) => item.name === val) |
|
|
this.temp.callOutOrgName = choosetItem[0].name |
|
|
this.temp.callOutOrgName = choosetItem[0].name |
|
|
|
|
|
this.temp.callOutOrgSid = choosetItem[0].sid |
|
|
console.log('name:', this.temp.callOutOrgName, 'key:', this.temp.callOutOrgSid) |
|
|
console.log('name:', this.temp.callOutOrgName, 'key:', this.temp.callOutOrgSid) |
|
|
}, |
|
|
}, |
|
|
callInOrgSidChange(val) { |
|
|
callInOrgSidChange(val) { |
|
|
const choosetItem = this.useOrg_list.filter((item) => item.sid === val) |
|
|
const choosetItem = this.useOrg_list.filter((item) => item.name === val) |
|
|
this.temp.callInOrgName = choosetItem[0].name |
|
|
this.temp.callInOrgName = choosetItem[0].name |
|
|
|
|
|
this.temp.callInOrgSid = choosetItem[0].sid |
|
|
console.log('name:', this.temp.callInOrgName, 'key:', this.temp.callInOrgSid) |
|
|
console.log('name:', this.temp.callInOrgName, 'key:', this.temp.callInOrgSid) |
|
|
}, |
|
|
}, |
|
|
handletiaozhangcheliang() { |
|
|
handletiaozhangcheliang() { |
|
@ -329,26 +340,6 @@ export default { |
|
|
this.list.splice(index, 1) |
|
|
this.list.splice(index, 1) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
showAdd() { |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.$refs['dataForm'].clearValidate() |
|
|
|
|
|
}) |
|
|
|
|
|
// this.temp.name = window.sessionStorage.getItem('name') |
|
|
|
|
|
this.temp.createBySid = window.sessionStorage.getItem('userSid') |
|
|
|
|
|
// req.detailsInfo(this.temp.sid).then(resp => { |
|
|
|
|
|
// const data = resp.data |
|
|
|
|
|
// this.temp.applicationCode = data.applicationCode |
|
|
|
|
|
// this.temp.createTime = data.createTime |
|
|
|
|
|
// }).catch(e => { |
|
|
|
|
|
// this.submitdisabled = false |
|
|
|
|
|
// }) |
|
|
|
|
|
this.dialogStatus = 'add' |
|
|
|
|
|
this.viewTitle = '【新增】分公司间调账申请' |
|
|
|
|
|
this.getPathSid() |
|
|
|
|
|
this.getType() |
|
|
|
|
|
this.getListOrgAll() |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showEdit(businessSid, instanceId, taskId) { |
|
|
showEdit(businessSid, instanceId, taskId) { |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.$refs['dataForm'].clearValidate() |
|
|
this.$refs['dataForm'].clearValidate() |
|
@ -371,7 +362,6 @@ export default { |
|
|
}) |
|
|
}) |
|
|
this.getPathSid() |
|
|
this.getPathSid() |
|
|
this.getType() |
|
|
this.getType() |
|
|
this.getListOrgAll() |
|
|
|
|
|
}, |
|
|
}, |
|
|
handleCreate() { |
|
|
handleCreate() { |
|
|
this.$refs['dataForm'].validate(valid => { |
|
|
this.$refs['dataForm'].validate(valid => { |
|
|