提交代码

提交代码
This commit is contained in:
shawn 2020-02-13 10:40:51 +08:00
parent 9b6952eb56
commit 1973d0d009
12 changed files with 244 additions and 14 deletions

View file

@ -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' }

View file

@ -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
}
}
}
}

View file

@ -102,7 +102,6 @@
:key="tableKey"
:data="list"
:row-key="getRowKeys"
:height="tableHeight"
border
fit
highlight-current-row

View file

@ -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) {

View file

@ -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) {

View file

@ -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',

View file

@ -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',

View file

@ -357,7 +357,7 @@ export default {
},
repositoryname(val) {
this.saleRepositoryId = val.repositoryName
this.personalForm.saleRepositoryId = val.id
this.getemplist.saleRepositoryId = val.id
},
// focus
handlechooseAccept() {

View file

@ -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({

View file

@ -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(() => {

View file

@ -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() {
//

View file

@ -99,8 +99,8 @@ export default {
filters: {
iseffectiveFilter(status) {
const statusMap = {
1: '用',
2: '用'
1: '用',
2: '用'
}
return statusMap[status]
},