|
|
@ -217,7 +217,7 @@ |
|
|
|
<script> |
|
|
|
import req from '@/api/ruzhang/scmapplyinbound' |
|
|
|
import upload_picture from '@/components/uploadFile/upload_picture' |
|
|
|
import { getPathSidByUserSid, fetchBySid } from '@/api/cheliang/dictcommons' |
|
|
|
import { getOrgSidByPath, fetchBySid } from '@/api/cheliang/dictcommons' |
|
|
|
export default { |
|
|
|
name: 'RuzhangAdd', |
|
|
|
components: { |
|
|
@ -280,7 +280,8 @@ export default { |
|
|
|
deductionPolicyFourThree: '', // 计算政策4: 扣减政策3 |
|
|
|
scmFiles: [], |
|
|
|
vehicleList: [], |
|
|
|
vehicleOrderSid: '' |
|
|
|
vehicleOrderSid: '', |
|
|
|
orgPath: '' |
|
|
|
}, |
|
|
|
rules: {}, |
|
|
|
submitdisabled: false |
|
|
@ -288,7 +289,7 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
init() { |
|
|
|
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((resp) => { |
|
|
|
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.formobj.useOrgSid = resp.data |
|
|
|
fetchBySid(this.formobj.useOrgSid).then((res) => { |
|
|
@ -632,6 +633,7 @@ export default { |
|
|
|
const data = resp.data |
|
|
|
this.formobj = data |
|
|
|
this.formobj.userSid = window.sessionStorage.getItem('userSid') |
|
|
|
this.formobj.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|
|
|
if (this.formobj.scmFiles.length > 0) { |
|
|
|
this.formobj.scmFiles.forEach((e) => { |
|
|
|
this.imgList.push({ |
|
|
@ -817,6 +819,21 @@ export default { |
|
|
|
} else { |
|
|
|
this.formobj.deductionPolicyFourThree = 1 |
|
|
|
} |
|
|
|
// 判断车辆列表不能为空 |
|
|
|
var hint1 = 0 |
|
|
|
if (this.formobj.vehicleList.length > 0) { |
|
|
|
for (var i = 0; i < this.formobj.vehicleList.length; i++) { |
|
|
|
if (this.formobj.vehicleList[i].vinNo !== '') { |
|
|
|
hint1 = 1 |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (hint1 === 0) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '车辆列表不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
// 判断车辆列表中是否有未填写的车架号记录,如果有则进行分批入库的功能 |
|
|
|
var hint = 0 |
|
|
|
if (this.formobj.vehicleList.length > 0) { |
|
|
|
for (var i = 0; i < this.formobj.vehicleList.length; i++) { |
|
|
@ -854,6 +871,7 @@ export default { |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
hint = 0 |
|
|
|
hint1 = 0 |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$refs['form_obj'].validate(valid => { |
|
|
|