|
|
@ -187,7 +187,7 @@ import configuration from './chexingbyconfiguration' |
|
|
|
import shangzhuangpeizhi from '../../../views/supplychain/cheliangpaichan/shangzhuangselect/shangzhuangpeizhi' |
|
|
|
import shangzhuangpeizhiAdd from '../../../views/supplychain/cheliangpaichan/shangzhuangselect/shangzhuangpeizhiAdd' |
|
|
|
import vehicleconfiguration from '@/views/cheliang/cheliangcaigou/relation/vehicleconfiguration' |
|
|
|
import { getPathSidByUserSid, fetchBySid, selectSysUserList, fetchDetailsByUseOrgSid, brandDown, selectNameByOrg } from '@/api/cheliang/dictcommons' |
|
|
|
import { getOrgSidByPath, fetchBySid, selectSysUserList, fetchDetailsByUseOrgSid, brandDown, selectNameByOrg } from '@/api/cheliang/dictcommons' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'cheliangpaichanAdd', |
|
|
@ -238,6 +238,7 @@ export default { |
|
|
|
orgDeptSid: '', |
|
|
|
carBrandName: '', |
|
|
|
carBrandSid: '', |
|
|
|
orgPath: '', |
|
|
|
busVehicleApplyDetailList: [] |
|
|
|
}, |
|
|
|
rules: {}, |
|
|
@ -256,14 +257,14 @@ export default { |
|
|
|
this.applyType_list = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
selectSysUserList({ userSid: window.sessionStorage.getItem('userSid') }).then((resp) => { |
|
|
|
selectSysUserList({ userSid: window.sessionStorage.getItem('userSid'), orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.user_list = resp.data |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
getUserOrg() { |
|
|
|
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((resp) => { |
|
|
|
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.formobj.createOrgSid = resp.data |
|
|
|
fetchBySid(this.formobj.createOrgSid).then((response) => { |
|
|
@ -294,17 +295,13 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
newDate() { |
|
|
|
let date = new Date() |
|
|
|
let year = date.getFullYear() // 年 |
|
|
|
let month = date.getMonth() + 1 // 月 |
|
|
|
let day = date.getDate() // 日 |
|
|
|
if (month < 10) { |
|
|
|
month = '0' + month |
|
|
|
var nowDate = new Date() |
|
|
|
var date = { |
|
|
|
year: nowDate.getFullYear(), |
|
|
|
month: nowDate.getMonth() + 1, |
|
|
|
day: nowDate.getDate() |
|
|
|
} |
|
|
|
if (day < 10) { |
|
|
|
day = '0' + day |
|
|
|
} |
|
|
|
this.formobj.applicationDate = year + '-' + month + '-' + day |
|
|
|
this.formobj.applicationDate = date.year + '-' + (date.month >= 10 ? date.month : '0' + date.month) + '-' + (date.day >= 10 ? date.day : '0' + date.day) |
|
|
|
}, |
|
|
|
oninput(val, limit = 0) { |
|
|
|
val = val.replace(/[^\d]/g, '') // 保留数字 |
|
|
@ -328,7 +325,7 @@ export default { |
|
|
|
return |
|
|
|
} |
|
|
|
this.viewState = 2 |
|
|
|
this.$refs['divconfiguration'].showData(this.formobj.busVehicleApplyDetailList, this.formobj.carBrandSid) |
|
|
|
this.$refs['divconfiguration'].showData(this.formobj.busVehicleApplyDetailList, this.formobj.carBrandSid, this.formobj.createOrgSid) |
|
|
|
}, |
|
|
|
handleLook(row) { |
|
|
|
this.viewState = 5 |
|
|
@ -353,6 +350,7 @@ export default { |
|
|
|
}) |
|
|
|
this.dialogStatus = 'add' |
|
|
|
this.viewTitle = '【新增】厂家采购' |
|
|
|
this.formobj.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|
|
|
this.formobj.createBySid = window.sessionStorage.getItem('userSid') |
|
|
|
this.formobj.createByName = window.sessionStorage.getItem('name') |
|
|
|
}, |
|
|
@ -574,7 +572,7 @@ export default { |
|
|
|
}, |
|
|
|
handleShangZhuang(index) { |
|
|
|
this.viewState = 3 |
|
|
|
this.$refs['divShangzhuangpeizhi'].showData(index) |
|
|
|
this.$refs['divShangzhuangpeizhi'].showData(index, this.formobj.createOrgSid) |
|
|
|
}, |
|
|
|
backPeizhi(val, index) { |
|
|
|
this.viewState = 1 |
|
|
@ -665,6 +663,7 @@ export default { |
|
|
|
this.formobj.orgDeptSid = '' |
|
|
|
this.formobj.carBrandName = '' |
|
|
|
this.formobj.carBrandSid = '' |
|
|
|
this.formobj.orgPath = '' |
|
|
|
this.user_list = [] |
|
|
|
this.submitdisabled = false |
|
|
|
this.formobj.busVehicleApplyDetailList = [] |
|
|
|