From 689a08bf0688f7d77c7dbeafc43081530ff6b915 Mon Sep 17 00:00:00 2001 From: shawn Date: Fri, 14 Feb 2020 09:15:51 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E7=9A=84=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改问题的合并 --- src/api/SaleContract.js | 3 + .../InstallmentApply/AddInstallmentApply.vue | 10 +- .../InstallmentApply/InstallmentApplyList.vue | 20 +- src/views/SaleContract/SaleContractList.vue | 23 +- .../SaleContract/components/MyDialog.vue | 7 +- src/views/SaleOut/AddSaleOut.vue | 64 ++- src/views/SaleOut/NewAccessoriesOut.vue | 20 +- src/views/SaleOut/SaleOutList.vue | 4 +- src/views/SaleOut/components/MyDelivery2.vue | 358 +++++++++++++++++ src/views/SaleOut/components/MyDialog.vue | 133 +++++-- src/views/SaleOut/components/MyEmp2.vue | 364 ++++++++++++++++++ 11 files changed, 939 insertions(+), 67 deletions(-) create mode 100644 src/views/SaleOut/components/MyDelivery2.vue create mode 100644 src/views/SaleOut/components/MyEmp2.vue diff --git a/src/api/SaleContract.js b/src/api/SaleContract.js index 34558312..5adf9d29 100644 --- a/src/api/SaleContract.js +++ b/src/api/SaleContract.js @@ -30,6 +30,9 @@ export function searchsaleContract(query) { if (query.number !== '' && query.number !== null && query.number !== undefined) { params.append('number', query.number) // 你要传给后台的参数值 key/value } + if (query.isActive !== '' && query.isActive !== null && query.isActive !== undefined) { + params.append('isActive', query.isActive) // 你要传给后台的参数值 key/value + } if (query.customerType !== '' && query.customerType !== null && query.customerType !== undefined) { params.append('customerType', query.customerType) // 你要传给后台的参数值 key/value } diff --git a/src/views/InstallmentApply/AddInstallmentApply.vue b/src/views/InstallmentApply/AddInstallmentApply.vue index 9107b09e..8c69295f 100644 --- a/src/views/InstallmentApply/AddInstallmentApply.vue +++ b/src/views/InstallmentApply/AddInstallmentApply.vue @@ -590,7 +590,7 @@
- {{ $t('Hmodule.baoc') }} + {{ $t('Hmodule.baoc') }} {{ $t('Hmodule.cancel') }}
@@ -615,7 +615,7 @@
- {{ $t('Hmodule.baoc') }} + {{ $t('Hmodule.baoc') }} {{ $t('Hmodule.cancel') }}
@@ -1410,6 +1410,7 @@ export default { this.personalForm.consultancyAddressTwo = nowlistdata[1].consultancyAddress } } + this.isclick = true const Data2 = this.productForm for (const key in Data2) { if (Data2[key] === '' || Data2[key] === undefined || Data2[key] === null) { @@ -1424,7 +1425,6 @@ export default { } } const parms = JSON.stringify(Data) - this.isclick = true this.$refs.personalForm.validate((valid) => { if (valid) { this.$refs.upload.submit() @@ -1468,10 +1468,6 @@ export default { return false } }) - - setTimeout(() => { - this.isclick = false - }, 5000) }, // 取消操作 handlecancel() { diff --git a/src/views/InstallmentApply/InstallmentApplyList.vue b/src/views/InstallmentApply/InstallmentApplyList.vue index e1cf23f1..3c9f3590 100644 --- a/src/views/InstallmentApply/InstallmentApplyList.vue +++ b/src/views/InstallmentApply/InstallmentApplyList.vue @@ -758,17 +758,21 @@ export default { isReview(row) { if (row.approvalUseVos !== '' && row.approvalUseVos !== null && row.approvalUseVos !== undefined && row.approvalUseVos.length !== 0) { const approvalUse = row.approvalUseVos - const index = approvalUse[approvalUse.length - 1].stepHandler.indexOf(',' + this.$store.getters.userId + ',') - console.log('index', index) - console.log('this.$store.getters.userId', this.$store.getters.userId) - console.log('approvalUse[approvalUse.length - 1].stepHandler', approvalUse[approvalUse.length - 1].stepHandler) - if (index > -1 && (row.judgeStat === 1 || row.judgeStat === 0)) { - if (row.isInvestigation === 2) { - return true + if (approvalUse[approvalUse.length - 1].stepHandler) { + const index = approvalUse[approvalUse.length - 1].stepHandler.indexOf(',' + this.$store.getters.userId + ',') + console.log('index', index) + console.log('this.$store.getters.userId', this.$store.getters.userId) + console.log('approvalUse[approvalUse.length - 1].stepHandler', approvalUse[approvalUse.length - 1].stepHandler) + if (index > -1 && (row.judgeStat === 1 || row.judgeStat === 0)) { + if (row.isInvestigation === 2) { + return true + } else { + return false + } + // return true } else { return false } - // return true } else { return false } diff --git a/src/views/SaleContract/SaleContractList.vue b/src/views/SaleContract/SaleContractList.vue index a938b454..0b4e9ea1 100644 --- a/src/views/SaleContract/SaleContractList.vue +++ b/src/views/SaleContract/SaleContractList.vue @@ -151,6 +151,7 @@ + + diff --git a/src/views/SaleOut/components/MyDialog.vue b/src/views/SaleOut/components/MyDialog.vue index 516b4a5c..3c14daf6 100644 --- a/src/views/SaleOut/components/MyDialog.vue +++ b/src/views/SaleOut/components/MyDialog.vue @@ -64,7 +64,7 @@ - + @@ -340,7 +340,7 @@ @@ -496,8 +496,8 @@ import { updatesaleOut } from '@/api/SaleOut' import { searchCategory } from '@/api/Supplier' import { searchSaleCategory } from '@/api/SaleCategory' import { getlocation, locationlist, countlist, batchlist } from '@/api/public' -import MyEmp from './MyEmp' -import MyDelivery from './MyDelivery' +import MyEmp from './MyEmp2' +import MyDelivery from './MyDelivery2' import MyDetail from './MyDetail' import MyApply from './MyApply' import MySupplier from './MySupplier' @@ -737,10 +737,33 @@ export default { watch: { editcontrol() { this.editVisible = this.editcontrol - this.chooseSourceType() + // this.chooseSourceType() }, editdata() { this.personalForm = this.editdata + if (this.personalForm.sourceType === '5' || this.personalForm.sourceType === undefined) { + this.Isproduct = false + this.IsSourceNumber = true + this.personalForm.saleType = '1' + // if (this.$refs.editable.getRecords().length !== 0 && this.$refs.editable.getRecords() !== undefined && this.$refs.editable.getRecords() !== null) { + // this.$refs.editable.clear() + // } + } else if (this.personalForm.sourceType === '6') { + this.IsSourceNumber = true + this.Isproduct = true + this.personalForm.saleType = '1' + } else if (this.personalForm.sourceType === '2') { + this.Isproduct = true + this.IsSourceNumber = false + this.personalForm.saleType = '2' + } else { + this.Isproduct = true + this.IsSourceNumber = false + this.personalForm.saleType = '1' + // if (this.$refs.editable.getRecords().length !== 0 && this.$refs.editable.getRecords() !== undefined && this.$refs.editable.getRecords() !== null) { + // this.$refs.editable.clear() + // } + } this.personalForm.couponMoney = this.personalForm.couponSupport console.log('this.personalForm.receivableMoney', this.personalForm.receivableMoney) if (this.personalForm.couponNumbers === '' || this.personalForm.couponNumbers === null || this.personalForm.couponNumbers === undefined) { @@ -852,6 +875,24 @@ export default { _that = this }, methods: { + switchsaletype(val) { + console.log('val', val) + if (val === '1' && this.personalForm.sourceType === '2') { + this.$notify.error({ + title: 'wrong', + message: '该单据为分期', + offset: 100 + }) + this.personalForm.saleType = '2' + } else { + this.$notify.error({ + title: 'wrong', + message: '该单据为现金', + offset: 100 + }) + this.personalForm.saleType = '1' + } + }, changeCoupon() { console.log('this.personalForm.couponSupports2', this.personalForm2.couponSupports) const parms2 = JSON.stringify(this.personalForm2.couponSupports) @@ -1101,6 +1142,11 @@ export default { }) } }, + isEdit4(row) { + console.log('222', row) + const re = row.productCode.slice(0, 2) + if (re === '05') { return true } else { return false } + }, isEdit3(row) { console.log('222', row) const re = row.productCode.slice(0, 2) @@ -1353,24 +1399,34 @@ export default { }) }, chooseSourceType(val) { + this.$refs.editable.clear() + this.receivableMoney = '' + this.personalForm.ridMoney = '' + this.personalForm.ridBikeMoney = '' console.log(val) - if (val === '5' || val === '4') { - this.isEdit = true - } else { - this.isEdit = false - } + console.log('this.list2', this.list2) if (val === '5' || val === undefined) { this.Isproduct = false this.IsSourceNumber = true - if (this.$refs.editable.getRecords() !== undefined && this.$refs.editable.getRecords() !== null && this.$refs.editable.getRecords().length !== 0) { - this.$refs.editable.clear() - } + this.personalForm.saleType = '1' + // if (this.$refs.editable.getRecords().length !== 0 && this.$refs.editable.getRecords() !== undefined && this.$refs.editable.getRecords() !== null) { + // this.$refs.editable.clear() + // } + } else if (val === '6') { + this.IsSourceNumber = true + this.Isproduct = true + this.personalForm.saleType = '1' + } else if (val === '2') { + this.Isproduct = true + this.IsSourceNumber = false + this.personalForm.saleType = '2' } else { this.Isproduct = true this.IsSourceNumber = false - if (this.$refs.editable.getRecords() !== undefined && this.$refs.editable.getRecords() !== null && this.$refs.editable.getRecords().length !== 0) { - this.$refs.editable.clear() - } + this.personalForm.saleType = '1' + // if (this.$refs.editable.getRecords().length !== 0 && this.$refs.editable.getRecords() !== undefined && this.$refs.editable.getRecords() !== null) { + // this.$refs.editable.clear() + // } } }, // 出库仓库focus事件触发 @@ -1406,8 +1462,16 @@ export default { this.deliverycontrol = true }, deliveryName(val) { - this.transferPersonId = val.personName - this.personalForm.transferPersonId = val.id + // this.transferPersonId = val.personName + // this.personalForm.transferPersonId = val.id + const salepersonids = val.map(item => { + return item.id + }) + this.personalForm.transferPersonId = salepersonids.join(',') + const salepersonnames = val.map(item => { + return item.personName + }) + this.transferPersonId = salepersonnames.join(',') }, getdatatime() { // 默认显示今天 var date = new Date() @@ -1861,12 +1925,18 @@ export default { }, // 销售员回显 stockName(val) { - this.salePersonId = val.personName - this.personalForm.salePersonId = val.id - this.saleRepositoryId = val.repositoryName - this.personalForm.saleRepositoryId = val.repositoryId - this.roleId = val.postName - this.personalForm.roleId = val.postId + const salepersonids = val.map(item => { + return item.id + }) + this.personalForm.salePersonId = salepersonids.join(',') + const salepersonnames = val.map(item => { + return item.personName + }) + this.salePersonId = salepersonnames.join(',') + // this.saleRepositoryId = val.repositoryName + // this.personalForm.saleRepositoryId = val.repositoryId + // this.roleId = val.postName + // this.personalForm.roleId = val.postId }, // 清空记录 restAllForm() { @@ -1929,11 +1999,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', diff --git a/src/views/SaleOut/components/MyEmp2.vue b/src/views/SaleOut/components/MyEmp2.vue new file mode 100644 index 00000000..861fe28e --- /dev/null +++ b/src/views/SaleOut/components/MyEmp2.vue @@ -0,0 +1,364 @@ + + + + + From f4f5236b60c84b8b9ddc3a52d91f1bb5f651f584 Mon Sep 17 00:00:00 2001 From: shawn Date: Fri, 14 Feb 2020 13:28:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=94=80=E5=94=AE=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E5=8D=95=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 销售出库单更新 --- src/views/SaleOut/SaleOutList.vue | 6 ++++++ src/views/SaleOut/components/MyDetail.vue | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/views/SaleOut/SaleOutList.vue b/src/views/SaleOut/SaleOutList.vue index 0a951c62..9635fd8f 100644 --- a/src/views/SaleOut/SaleOutList.vue +++ b/src/views/SaleOut/SaleOutList.vue @@ -341,6 +341,12 @@ export default { message: '确认成功!' }) this.getlist() + } else { + this.$notify.error({ + title: 'wrong', + message: res.data.msg, + offset: 100 + }) } }) }) diff --git a/src/views/SaleOut/components/MyDetail.vue b/src/views/SaleOut/components/MyDetail.vue index 8b7f30f1..656a958f 100644 --- a/src/views/SaleOut/components/MyDetail.vue +++ b/src/views/SaleOut/components/MyDetail.vue @@ -229,7 +229,9 @@ export default { this.getemplist.searchRepositoryId = this.query.saleRepositoryId chooseProduct(this.getemplist).then(res => { if (res.data.ret === 200) { - this.list = res.data.data.content.list + this.list = res.data.data.content.list.filter(item => { + return item.existStock > 0 + }) this.total = res.data.data.content.totalCount } setTimeout(() => { @@ -271,7 +273,9 @@ export default { chooseProduct(this.getemplist).then(res => { if (res.data.ret === 200) { console.log(res.data.data.content.list) - this.list = res.data.data.content.list + this.list = res.data.data.content.list.filter(item => { + return item.existStock > 0 + }) this.total = res.data.data.content.totalCount // this.restFilter() } else {