mirror of
https://github.com/shawncai/ERP.git
synced 2024-12-28 19:11:00 +08:00
提交代码
提交代码
This commit is contained in:
parent
9b6952eb56
commit
1973d0d009
12 changed files with 244 additions and 14 deletions
|
@ -130,7 +130,7 @@ export default {
|
|||
{ required: true, message: '请选择职位', trigger: 'change' }
|
||||
],
|
||||
productCategoryId: [
|
||||
{ required: true, validator: validatePass, trigger: 'change' }
|
||||
{ required: true, message: '请选择物品分类', trigger: 'change' }
|
||||
],
|
||||
commissionType: [
|
||||
{ required: true, message: '请选择供应商分组', trigger: 'change' }
|
||||
|
|
|
@ -268,8 +268,17 @@ export default {
|
|||
},
|
||||
// 物品选择添加
|
||||
handleAddTo() {
|
||||
this.productVisible = false
|
||||
this.$emit('mater', this.moreaction)
|
||||
if (this.moreaction.salePrice === 0) {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: '该商品销售价格为0, 不允许分期',
|
||||
offset: 100
|
||||
})
|
||||
return false
|
||||
} else {
|
||||
this.$emit('mater', this.moreaction)
|
||||
this.productVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -102,7 +102,6 @@
|
|||
:key="tableKey"
|
||||
:data="list"
|
||||
:row-key="getRowKeys"
|
||||
:height="tableHeight"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
|
|
|
@ -647,6 +647,14 @@ export default {
|
|||
},
|
||||
// 保存操作
|
||||
handlesave() {
|
||||
if (this.regionId.length === 1) {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: '请选择正确区域',
|
||||
offset: 100
|
||||
})
|
||||
return false
|
||||
}
|
||||
this.RepositoryForm.regionId = this.regionId[this.regionId.length - 1]
|
||||
var pattern = /((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d)|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d))$)/
|
||||
// console.log(pattern.test(this.RepositoryForm.phone))
|
||||
|
@ -699,6 +707,14 @@ export default {
|
|||
},
|
||||
// 继续录入
|
||||
handleentry() {
|
||||
if (this.regionId.length === 1) {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: '请选择正确区域',
|
||||
offset: 100
|
||||
})
|
||||
return false
|
||||
}
|
||||
this.RepositoryForm.regionId = this.regionId[this.regionId.length - 1]
|
||||
this.$refs.RepositoryForm.validate((valid) => {
|
||||
if (valid) {
|
||||
|
|
|
@ -2231,11 +2231,24 @@ export default {
|
|||
}).forEach(function(elem) {
|
||||
const re = elem.productCode.slice(0, 2)
|
||||
if (re === '01') {
|
||||
if (elem.carCode === null || elem.carCode === undefined || elem.carCode === '' || elem.motorCode === null || elem.motorCode === undefined || elem.motorCode === '' || elem.batteryCode === null || elem.batteryCode === undefined || elem.batteryCode === '') {
|
||||
if (elem.carCode === null || elem.carCode === undefined || elem.carCode === '' || elem.motorCode === null || elem.motorCode === undefined || elem.motorCode === '') {
|
||||
m = 2
|
||||
}
|
||||
}
|
||||
if (re === '05') {
|
||||
if (elem.batteryCode === null || elem.batteryCode === undefined || elem.batteryCode === '') {
|
||||
m = 3
|
||||
}
|
||||
}
|
||||
})
|
||||
if (m === 3) {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: '电池出库时相关编码必填',
|
||||
offset: 100
|
||||
})
|
||||
return false
|
||||
}
|
||||
if (m === 2) {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
|
@ -2244,6 +2257,7 @@ export default {
|
|||
})
|
||||
return false
|
||||
}
|
||||
|
||||
// 保存时同样商品不能有同一个批次
|
||||
let i = 0
|
||||
EnterDetail.map(function(elem) {
|
||||
|
|
|
@ -2249,11 +2249,24 @@ export default {
|
|||
}).forEach(function(elem) {
|
||||
const re = elem.productCode.slice(0, 2)
|
||||
if (re === '01') {
|
||||
if (elem.carCode === null || elem.carCode === undefined || elem.carCode === '' || elem.motorCode === null || elem.motorCode === undefined || elem.motorCode === '' || elem.batteryCode === null || elem.batteryCode === undefined || elem.batteryCode === '') {
|
||||
if (elem.carCode === null || elem.carCode === undefined || elem.carCode === '' || elem.motorCode === null || elem.motorCode === undefined || elem.motorCode === '') {
|
||||
m = 2
|
||||
}
|
||||
}
|
||||
if (re === '05') {
|
||||
if (elem.batteryCode === null || elem.batteryCode === undefined || elem.batteryCode === '') {
|
||||
m = 3
|
||||
}
|
||||
}
|
||||
})
|
||||
if (m === 3) {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: '电池出库时相关编码必填',
|
||||
offset: 100
|
||||
})
|
||||
return false
|
||||
}
|
||||
if (m === 2) {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
|
|
|
@ -750,6 +750,7 @@ export default {
|
|||
couponSupport: 0
|
||||
}
|
||||
],
|
||||
title: '配件',
|
||||
salePersonId: this.$store.getters.userId,
|
||||
address: '',
|
||||
createPersonId: this.$store.getters.userId,
|
||||
|
@ -2177,6 +2178,7 @@ export default {
|
|||
// 清空记录
|
||||
restAllForm() {
|
||||
this.personalForm = {
|
||||
title: '配件',
|
||||
salePersonId: this.$store.getters.userId,
|
||||
address: '',
|
||||
createPersonId: this.$store.getters.userId,
|
||||
|
@ -2226,11 +2228,24 @@ export default {
|
|||
}).forEach(function(elem) {
|
||||
const re = elem.productCode.slice(0, 2)
|
||||
if (re === '01') {
|
||||
if (elem.carCode === null || elem.carCode === undefined || elem.carCode === '' || elem.motorCode === null || elem.motorCode === undefined || elem.motorCode === '' || elem.batteryCode === null || elem.batteryCode === undefined || elem.batteryCode === '') {
|
||||
if (elem.carCode === null || elem.carCode === undefined || elem.carCode === '' || elem.motorCode === null || elem.motorCode === undefined || elem.motorCode === '') {
|
||||
m = 2
|
||||
}
|
||||
}
|
||||
if (re === '05') {
|
||||
if (elem.batteryCode === null || elem.batteryCode === undefined || elem.batteryCode === '') {
|
||||
m = 3
|
||||
}
|
||||
}
|
||||
})
|
||||
if (m === 3) {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: '电池出库时相关编码必填',
|
||||
offset: 100
|
||||
})
|
||||
return false
|
||||
}
|
||||
if (m === 2) {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
|
|
|
@ -357,7 +357,7 @@ export default {
|
|||
},
|
||||
repositoryname(val) {
|
||||
this.saleRepositoryId = val.repositoryName
|
||||
this.personalForm.saleRepositoryId = val.id
|
||||
this.getemplist.saleRepositoryId = val.id
|
||||
},
|
||||
// 出库人focus事件触发
|
||||
handlechooseAccept() {
|
||||
|
|
|
@ -395,7 +395,7 @@ export default {
|
|||
return val
|
||||
},
|
||||
test(row, val) {
|
||||
console.log(row, val)
|
||||
console.log('val', val)
|
||||
const finid = val[val.length - 1]
|
||||
const needata = this.findtreedata(this.treedata, finid)
|
||||
console.log('needata', needata)
|
||||
|
@ -439,7 +439,87 @@ export default {
|
|||
},
|
||||
// 新增收入明细
|
||||
insertEvent(index) {
|
||||
this.$refs.editable.insertAt({ productCode: null }, index)
|
||||
if (this.$store.getters.repositoryId !== 0 && this.$store.getters.repositoryId !== null && this.$store.getters.repositoryId !== undefined && this.$store.getters.repositoryId !== '') {
|
||||
console.log('this.$store.getters.regionId', this.$store.getters.regionId)
|
||||
|
||||
const needata = this.findPathByLeafId(this.$store.getters.regionId, this.regions)
|
||||
console.log('needata', needata)
|
||||
if (needata.includes(28)) {
|
||||
const subjectdata = [1, 2, 9, 43, 283]
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId, subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(29)) {
|
||||
const subjectdata = [1, 2, 9, 43, 279]
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId, subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(47)) {
|
||||
const subjectdata = [1, 2, 9, 43, 231]
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId, subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(65)) {
|
||||
const subjectdata = [1, 2, 9, 43, 280]
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId, subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(66)) {
|
||||
const subjectdata = [1, 2, 9, 43, 282]
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId, subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(67)) {
|
||||
const subjectdata = [1, 2, 9, 43, 285]
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId, subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(68)) {
|
||||
const subjectdata = [1, 2, 9, 43, 286]
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId, subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(79)) {
|
||||
const subjectdata = [1, 2, 9, 43, 284]
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId, subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(80)) {
|
||||
const subjectdata = [1, 2, 9, 43, 281]
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId, subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(81)) {
|
||||
const subjectdata = [1, 2, 9, 43, 287]
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId, subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(90)) {
|
||||
const subjectdata = [1, 2, 9, 43, 236]
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId, subjectFinance: subjectdata }, index)
|
||||
} else {
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId }, index)
|
||||
}
|
||||
} else {
|
||||
const needata = this.findPathByLeafId(this.$store.getters.regionId, this.regions)
|
||||
console.log('needata', needata)
|
||||
if (needata.includes(28)) {
|
||||
const subjectdata = [1, 2, 9, 43, 283]
|
||||
this.$refs.editable.insertAt({ subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(29)) {
|
||||
const subjectdata = [1, 2, 9, 43, 279]
|
||||
this.$refs.editable.insertAt({ subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(47)) {
|
||||
const subjectdata = [1, 2, 9, 43, 231]
|
||||
this.$refs.editable.insertAt({ subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(65)) {
|
||||
const subjectdata = [1, 2, 9, 43, 280]
|
||||
this.$refs.editable.insertAt({ subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(66)) {
|
||||
const subjectdata = [1, 2, 9, 43, 282]
|
||||
this.$refs.editable.insertAt({ subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(67)) {
|
||||
const subjectdata = [1, 2, 9, 43, 285]
|
||||
this.$refs.editable.insertAt({ subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(68)) {
|
||||
const subjectdata = [1, 2, 9, 43, 286]
|
||||
this.$refs.editable.insertAt({ subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(79)) {
|
||||
const subjectdata = [1, 2, 9, 43, 284]
|
||||
this.$refs.editable.insertAt({ subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(80)) {
|
||||
const subjectdata = [1, 2, 9, 43, 281]
|
||||
this.$refs.editable.insertAt({ subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(81)) {
|
||||
const subjectdata = [1, 2, 9, 43, 287]
|
||||
this.$refs.editable.insertAt({ subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(90)) {
|
||||
const subjectdata = [1, 2, 9, 43, 236]
|
||||
this.$refs.editable.insertAt({ subjectFinance: subjectdata }, index)
|
||||
} else {
|
||||
this.$refs.editable.insertAt({ }, index)
|
||||
}
|
||||
}
|
||||
},
|
||||
getTypes() {
|
||||
// 部门列表数据
|
||||
|
@ -540,6 +620,11 @@ export default {
|
|||
}
|
||||
const parms = JSON.stringify(Data)
|
||||
const EnterDetail = this.$refs.editable.getRecords()
|
||||
// row.subjectName = needata.subjectName
|
||||
// row.subjectCode = needata.subjectNumber
|
||||
for (const i in EnterDetail) {
|
||||
EnterDetail[i].subjectCode = EnterDetail[i].subjectFinance[EnterDetail[i].subjectFinance.length - 1]
|
||||
}
|
||||
console.log('EnterDetail', EnterDetail)
|
||||
if (EnterDetail.length === 0) {
|
||||
this.$notify.error({
|
||||
|
|
|
@ -405,6 +405,9 @@ export default {
|
|||
searchtransfer(this.getemplist).then(res => {
|
||||
if (res.data.ret === 200) {
|
||||
this.list = res.data.data.content.list
|
||||
// const detaildata = res.data.data.content.list.map(item => {
|
||||
// return item.approvalUseVos
|
||||
// })
|
||||
this.total = res.data.data.content.totalCount
|
||||
}
|
||||
setTimeout(() => {
|
||||
|
|
|
@ -465,9 +465,85 @@ export default {
|
|||
regionListVos: this.tranKTree(item.regionListVos)
|
||||
}))
|
||||
},
|
||||
// 新增收入明细
|
||||
// 新增收入
|
||||
insertEvent(index) {
|
||||
this.$refs.editable.insertAt({ productCode: null }, index)
|
||||
if (this.$store.getters.repositoryId !== 0 && this.$store.getters.repositoryId !== null && this.$store.getters.repositoryId !== undefined && this.$store.getters.repositoryId !== '') {
|
||||
console.log('this.$store.getters.regionId', this.$store.getters.regionId)
|
||||
|
||||
const needata = this.findPathByLeafId(this.$store.getters.regionId, this.regions)
|
||||
console.log('needata', needata)
|
||||
if (needata.includes(28)) {
|
||||
const subjectdata = [1, 2, 9, 43, 283]
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId, subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(29)) {
|
||||
const subjectdata = [1, 2, 9, 43, 279]
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId, subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(47)) {
|
||||
const subjectdata = [1, 2, 9, 43, 231]
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId, subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(65)) {
|
||||
const subjectdata = [1, 2, 9, 43, 280]
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId, subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(66)) {
|
||||
const subjectdata = [1, 2, 9, 43, 282]
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId, subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(67)) {
|
||||
const subjectdata = [1, 2, 9, 43, 285]
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId, subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(68)) {
|
||||
const subjectdata = [1, 2, 9, 43, 286]
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId, subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(79)) {
|
||||
const subjectdata = [1, 2, 9, 43, 284]
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId, subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(80)) {
|
||||
const subjectdata = [1, 2, 9, 43, 281]
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId, subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(81)) {
|
||||
const subjectdata = [1, 2, 9, 43, 287]
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId, subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(90)) {
|
||||
const subjectdata = [1, 2, 9, 43, 236]
|
||||
this.$refs.editable.insertAt({ repositoryId: this.$store.getters.repositoryId, subjectFinance: subjectdata }, index)
|
||||
}
|
||||
} else {
|
||||
const needata = this.findPathByLeafId(this.$store.getters.regionId, this.regions)
|
||||
console.log('needata', needata)
|
||||
if (needata.includes(28)) {
|
||||
const subjectdata = [1, 2, 9, 43, 283]
|
||||
this.$refs.editable.insertAt({ subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(29)) {
|
||||
const subjectdata = [1, 2, 9, 43, 279]
|
||||
this.$refs.editable.insertAt({ subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(47)) {
|
||||
const subjectdata = [1, 2, 9, 43, 231]
|
||||
this.$refs.editable.insertAt({ subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(65)) {
|
||||
const subjectdata = [1, 2, 9, 43, 280]
|
||||
this.$refs.editable.insertAt({ subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(66)) {
|
||||
const subjectdata = [1, 2, 9, 43, 282]
|
||||
this.$refs.editable.insertAt({ subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(67)) {
|
||||
const subjectdata = [1, 2, 9, 43, 285]
|
||||
this.$refs.editable.insertAt({ subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(68)) {
|
||||
const subjectdata = [1, 2, 9, 43, 286]
|
||||
this.$refs.editable.insertAt({ subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(79)) {
|
||||
const subjectdata = [1, 2, 9, 43, 284]
|
||||
this.$refs.editable.insertAt({ subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(80)) {
|
||||
const subjectdata = [1, 2, 9, 43, 281]
|
||||
this.$refs.editable.insertAt({ subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(81)) {
|
||||
const subjectdata = [1, 2, 9, 43, 287]
|
||||
this.$refs.editable.insertAt({ subjectFinance: subjectdata }, index)
|
||||
} else if (needata.includes(90)) {
|
||||
const subjectdata = [1, 2, 9, 43, 236]
|
||||
this.$refs.editable.insertAt({ subjectFinance: subjectdata }, index)
|
||||
}
|
||||
}
|
||||
},
|
||||
getTypes() {
|
||||
// 部门列表数据
|
||||
|
|
|
@ -99,8 +99,8 @@ export default {
|
|||
filters: {
|
||||
iseffectiveFilter(status) {
|
||||
const statusMap = {
|
||||
1: '停用',
|
||||
2: '启用'
|
||||
1: '启用',
|
||||
2: '停用'
|
||||
}
|
||||
return statusMap[status]
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue