mirror of
https://github.com/shawncai/ERP.git
synced 2024-12-28 19:11:00 +08:00
beyond
This commit is contained in:
commit
2117e42a95
12 changed files with 950 additions and 68 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -590,7 +590,7 @@
|
|||
</el-card>
|
||||
<!--操作-->
|
||||
<div class="buttons" style="margin-top: 20px">
|
||||
<el-button type="primary" style="background:#3696fd;border-color:#3696fd;width: 98px" @click="handlesave()">{{ $t('Hmodule.baoc') }}</el-button>
|
||||
<el-button :loading="isclick" type="primary" style="background:#3696fd;border-color:#3696fd;width: 98px" @click="handlesave()">{{ $t('Hmodule.baoc') }}</el-button>
|
||||
<el-button v-no-more-click type="primary" style="background:#3696fd;border-color:#3696fd;width: 98px" @click="handlesave3()">{{ $t('collectAndPay.lsbc') }}</el-button>
|
||||
<el-button type="danger" @click="handlecancel()">{{ $t('Hmodule.cancel') }}</el-button>
|
||||
</div>
|
||||
|
@ -616,7 +616,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
<div class="buttons" style="margin-left: 27%;margin-top: 20px">
|
||||
<el-button :loading="isclick" type="primary" style="background:#3696fd;border-color:#3696fd;width: 98px" @click="handlesave2()">{{ $t('Hmodule.baoc') }}</el-button>
|
||||
<el-button type="primary" style="background:#3696fd;border-color:#3696fd;width: 98px" @click="handlesave2()">{{ $t('Hmodule.baoc') }}</el-button>
|
||||
<el-button type="danger" @click="handlecance2()">{{ $t('Hmodule.cancel') }}</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
|
@ -1505,6 +1505,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) {
|
||||
|
@ -1519,7 +1520,6 @@ export default {
|
|||
}
|
||||
}
|
||||
const parms = JSON.stringify(Data)
|
||||
this.isclick = true
|
||||
this.$refs.personalForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$refs.upload.submit()
|
||||
|
@ -1563,10 +1563,6 @@ export default {
|
|||
return false
|
||||
}
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
this.isclick = false
|
||||
}, 5000)
|
||||
},
|
||||
// 取消操作
|
||||
handlecancel() {
|
||||
|
|
|
@ -764,17 +764,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
|
||||
}
|
||||
|
|
|
@ -151,6 +151,7 @@
|
|||
|
||||
<script>
|
||||
import { searchsaleContract, deletesaleContract, updatesaleContract2 } from '@/api/SaleContract'
|
||||
import { searchsaleOut } from '@/api/SaleOut'
|
||||
import { getdeptlist } from '@/api/BasicSettings'
|
||||
import { searchStockCategory } from '@/api/StockCategory'
|
||||
import waves from '@/directive/waves' // Waves directive
|
||||
|
@ -295,9 +296,25 @@ export default {
|
|||
return false
|
||||
}
|
||||
}
|
||||
console.log(this.moreaction)
|
||||
this.$store.dispatch('getnewsaleoutdata', this.moreaction[0])
|
||||
this.$router.push('/SaleOut/AddSaleOut')
|
||||
const parms = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sourceNumber: this.moreaction[0].number,
|
||||
repositoryId: 0,
|
||||
regionIds: null
|
||||
}
|
||||
searchsaleOut(parms).then(res => {
|
||||
if (res.data.data.content.totalCount === 0) {
|
||||
this.$store.dispatch('getnewsaleoutdata', this.moreaction[0])
|
||||
this.$router.push('/SaleOut/AddSaleOut')
|
||||
} else {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: '该合同已生成出库单',
|
||||
offset: 100
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
checkPermission,
|
||||
// 不让勾选
|
||||
|
|
|
@ -579,6 +579,9 @@ export default {
|
|||
this.editVisible = this.editcontrol
|
||||
// this.getTypes()
|
||||
this.getuploadurl()
|
||||
this.getTypes()
|
||||
this.getways()
|
||||
this.getratelist()
|
||||
},
|
||||
editdata() {
|
||||
this.personalForm = this.editdata
|
||||
|
@ -602,9 +605,7 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
this.getTypes()
|
||||
this.getways()
|
||||
this.getratelist()
|
||||
|
||||
},
|
||||
beforeCreate() {
|
||||
_that = this
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="$t('SaleOut.saleType')" prop="saleType" style="width: 100%;">
|
||||
<el-select v-model="personalForm.saleType" style="margin-left: 18px;width: 200px">
|
||||
<el-select v-model="personalForm.saleType" style="margin-left: 18px;width: 200px" @change="switchsaletype">
|
||||
<el-option value="1" label="现金" />
|
||||
<el-option value="2" label="分期" />
|
||||
</el-select>
|
||||
|
@ -561,8 +561,8 @@ import { getAllBatch, vehicleInfo, getQuantity2 } from '@/api/public'
|
|||
import { createsaleOut } from '@/api/SaleOut'
|
||||
import { searchSaleCategory } from '@/api/SaleCategory'
|
||||
import { getlocation, locationlist, countlist, batchlist, productlist } from '@/api/public'
|
||||
import MyEmp from './components/MyEmp'
|
||||
import MyDelivery from '../DailyAdjust/components/MyDelivery'
|
||||
import MyEmp from './components/MyEmp2'
|
||||
import MyDelivery from './components/MyDelivery2'
|
||||
import MyDetail from './components/MyDetail'
|
||||
import { searchCategory } from '@/api/Supplier'
|
||||
import MyApply from './components/MyApply'
|
||||
|
@ -907,6 +907,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.couponSupports', this.personalForm.couponSupports)
|
||||
const parms2 = JSON.stringify(this.personalForm.couponSupports)
|
||||
|
@ -961,6 +979,7 @@ export default {
|
|||
getinformation4() {
|
||||
if (this.$store.getters.newsaleoutdata) {
|
||||
this.personalForm.sourceType = '2'
|
||||
this.personalForm.saleType = '2'
|
||||
console.log('this.$store.getters.newsaleoutdatacontract', this.$store.getters.newsaleoutdata)
|
||||
this.installappley(this.$store.getters.newsaleoutdata)
|
||||
this.getReceivableMoney()
|
||||
|
@ -1575,15 +1594,22 @@ export default {
|
|||
if (val === '5' || val === 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 (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
|
||||
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()
|
||||
// }
|
||||
|
@ -1622,8 +1648,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()
|
||||
|
@ -2168,12 +2202,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() {
|
||||
|
|
|
@ -568,7 +568,7 @@ import { getAllBatch, vehicleInfo, getQuantity2 } from '@/api/public'
|
|||
import { createsaleOut } from '@/api/SaleOut'
|
||||
import { searchSaleCategory } from '@/api/SaleCategory'
|
||||
import { getlocation, locationlist, countlist, batchlist, productlist } from '@/api/public'
|
||||
import MyEmp from './components/MyEmp'
|
||||
import MyEmp from './components/MyEmp2'
|
||||
import MyDelivery from '../DailyAdjust/components/MyDelivery'
|
||||
import MyDetail from './components/MyDetail3'
|
||||
import { searchCategory } from '@/api/Supplier'
|
||||
|
@ -2178,12 +2178,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() {
|
||||
|
|
|
@ -342,6 +342,12 @@ export default {
|
|||
message: '确认成功!'
|
||||
})
|
||||
this.getlist()
|
||||
} else {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: res.data.msg,
|
||||
offset: 100
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
|
@ -518,8 +524,8 @@ export default {
|
|||
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(approvalUse[approvalUse.length - 1].stepHandler)
|
||||
// console.log(index)
|
||||
console.log(approvalUse[approvalUse.length - 1].stepHandler)
|
||||
console.log(index)
|
||||
if (index > -1 && (row.judgeStat === 1 || row.judgeStat === 0)) {
|
||||
return true
|
||||
}
|
||||
|
|
358
src/views/SaleOut/components/MyDelivery2.vue
Normal file
358
src/views/SaleOut/components/MyDelivery2.vue
Normal file
|
@ -0,0 +1,358 @@
|
|||
<template>
|
||||
<el-dialog :visible.sync="employeeVisible" :deliverycontrol="deliverycontrol" :close-on-press-escape="false" :title="$t('Hmodule.xzyg')" top="10px" append-to-body @close="$emit('update:deliverycontrol', false)">
|
||||
<div class="filter-container">
|
||||
<el-input v-model="getemplist.employeename" :placeholder="$t('NewEmployeeInformation.employeename')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
|
||||
<el-input v-model="getemplist.jobnumber" :placeholder="$t('NewEmployeeInformation.jobnumber2')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
|
||||
<el-date-picker
|
||||
v-model="getemplist.time"
|
||||
:placeholder="$t('Hmodule.xzrq')"
|
||||
type="date"
|
||||
class="filter-item"
|
||||
value-format="yyyy-MM-dd"/>
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
width="500"
|
||||
trigger="click">
|
||||
<el-cascader
|
||||
:options="regions2"
|
||||
:props="props2"
|
||||
v-model="getemplistregions"
|
||||
:show-all-levels="false"
|
||||
:placeholder="$t('Hmodule.xzqy')"
|
||||
change-on-select
|
||||
filterable
|
||||
clearable
|
||||
style="width: 40%;float: left;margin-left: 20px"
|
||||
@change="handlechange4"
|
||||
/>
|
||||
<el-select v-model="getemplist.repositoryid" :placeholder="$t('Hmodule.xzmd')" clearable filterable style="width: 40%;float: right;margin-right: 20px">
|
||||
<el-option
|
||||
v-for="(item, index) in repositories"
|
||||
:key="index"
|
||||
:label="item.repositoryName"
|
||||
:value="item.id"/>
|
||||
</el-select>
|
||||
<el-select v-model="getemplist.postid" :value="getemplist.postid" :placeholder="$t('NewEmployeeInformation.postid2')" class="filter-item" clearable style="width: 40%;float: left;margin-top: 10px;margin-left: 20px">
|
||||
<el-option
|
||||
v-for="(item, index) in jobs"
|
||||
:key="index"
|
||||
:label="item.categoryName"
|
||||
:value="item.id"/>
|
||||
</el-select>
|
||||
<el-select v-model="getemplist.deptid" :placeholder="$t('NewEmployeeInformation.deptid2')" class="filter-item" clearable style="width: 40%;float: right;margin-top: 10px;margin-right: 20px">
|
||||
<el-option
|
||||
v-for="(item, index) in depts"
|
||||
:key="index"
|
||||
:label="item.deptName"
|
||||
:value="item.id"/>
|
||||
</el-select>
|
||||
<div class="seachbutton" style="width: 100%;float: right;margin-top: 20px">
|
||||
<el-button v-waves class="filter-item" type="primary" style="float: right" @click="handleFilter">{{ $t('public.search') }}</el-button>
|
||||
</div>
|
||||
<el-button v-waves slot="reference" type="primary" class="filter-item" style="width: 130px">{{ $t('public.filter') }}<svg-icon icon-class="shaixuan" style="margin-left: 4px"/></el-button>
|
||||
</el-popover>
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" style="width: 86px" @click="handleFilter">{{ $t('public.search') }}</el-button>
|
||||
<el-button v-waves class="filter-item" icon="el-icon-plus" type="success" style="width: 86px;" @click="handleAdd">{{ $t('public.add') }}</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="list"
|
||||
:key="tableKey"
|
||||
:row-key="getRowKeys"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
style="width: 100%"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
:reserve-selection="true"
|
||||
type="selection"
|
||||
width="55"
|
||||
fixed="left"
|
||||
align="center"/>
|
||||
<el-table-column
|
||||
:label="$t('NewEmployeeInformation.id')"
|
||||
:resizable="false"
|
||||
property="id"
|
||||
align="center"
|
||||
width="50"/>
|
||||
<el-table-column
|
||||
:label="$t('NewEmployeeInformation.jobNumber')"
|
||||
:resizable="false"
|
||||
property="jobNumber"
|
||||
align="center"
|
||||
width="100"/>
|
||||
<el-table-column
|
||||
:label="$t('NewEmployeeInformation.account')"
|
||||
:resizable="false"
|
||||
property="account"
|
||||
width="150"
|
||||
align="center"/>
|
||||
<el-table-column :label="$t('NewEmployeeInformation.name')" :resizable="false" align="center" width="109">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.firstName }} {{ scope.row.middleName }} {{ scope.row.lastName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('NewEmployeeInformation.gender')" :resizable="false" prop="gender" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.gender | genderFilter }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('NewEmployeeInformation.deptName')" :resizable="false" prop="deptName" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.deptName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('NewEmployeeInformation.regionName')" :resizable="false" prop="regionName" align="center" width="230">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.regionName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('NewEmployeeInformation.repositoryName')" :resizable="false" prop="repositoryName" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.repositoryName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button v-waves class="filter-item" type="success" style="width: 100px;float: left;margin-top: 10px" @click="handleConfirm">{{ $t('Hmodule.sure') }}</el-button>
|
||||
<pagination v-show="total>0" :total="total" :page.sync="getemplist.pagenum" :limit.sync="getemplist.pagesize" @pagination="gitemplist" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { regionlist, searchRepository } from '@/api/public'
|
||||
import { getemplist, getdeptlist, searchEmpCategory } from '@/api/EmployeeInformation'
|
||||
import waves from '@/directive/waves' // Waves directive
|
||||
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
var _that
|
||||
export default {
|
||||
directives: { waves },
|
||||
components: { Pagination },
|
||||
filters: {
|
||||
genderFilter(status) {
|
||||
const statusMap = {
|
||||
1: '男',
|
||||
2: '女'
|
||||
}
|
||||
return statusMap[status]
|
||||
}
|
||||
},
|
||||
props: {
|
||||
deliverycontrol: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
select_orderId: [],
|
||||
select_order_number: [],
|
||||
getRowKeys(row) {
|
||||
return row.id
|
||||
},
|
||||
// 职位搜索时参数
|
||||
jobCat: {
|
||||
type: 2,
|
||||
pagenum: 1,
|
||||
pagesize: 9999
|
||||
},
|
||||
// 职位列表
|
||||
jobs: [],
|
||||
// 转化数据
|
||||
choosedata: '',
|
||||
// 仓库管理员回显数据
|
||||
managerPeople: '',
|
||||
// 小区经理回显数据
|
||||
regionManagerId: '',
|
||||
// / 弹窗选择
|
||||
// 单选表格样式
|
||||
currentRow: null,
|
||||
// 员工表格数据
|
||||
list: [],
|
||||
// 员工表格数据条数
|
||||
total: 0,
|
||||
// 员工表格识别
|
||||
tableKey: 0,
|
||||
// 加载员工表格
|
||||
listLoading: true,
|
||||
// 员工查询列表数据
|
||||
getemplist: {
|
||||
repositoryid: '',
|
||||
regionid: '',
|
||||
postid: '',
|
||||
deptid: '',
|
||||
employeename: '',
|
||||
pagenum: 1,
|
||||
pagesize: 10,
|
||||
stat: 1, loginRepositoryId: this.$store.getters.repositoryId, regionIds: this.$store.getters.regionIds,
|
||||
time: '',
|
||||
jobnumber: ''
|
||||
},
|
||||
// 部门列表
|
||||
depts: [],
|
||||
// 区域级联数据转化
|
||||
props2: {
|
||||
value: 'id',
|
||||
label: 'regionName',
|
||||
children: 'regionListVos'
|
||||
},
|
||||
// 区域数据
|
||||
regions2: [],
|
||||
getemplistregions: [],
|
||||
// 门店数据
|
||||
repositories: [],
|
||||
// 员工选择框控制
|
||||
employeeVisible: this.deliverycontrol,
|
||||
// 小区经理选择框控制
|
||||
regionManagerVisible: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
deliverycontrol() {
|
||||
this.employeeVisible = this.deliverycontrol
|
||||
this.gitemplist()
|
||||
}
|
||||
},
|
||||
beforeCreate() {
|
||||
_that = this
|
||||
},
|
||||
methods: {
|
||||
// 仓库管理员选择开始
|
||||
gitemplist() {
|
||||
// 员工列表数据
|
||||
this.listLoading = true
|
||||
console.log(this.getemplist)
|
||||
getemplist(this.getemplist).then(res => {
|
||||
if (res.data.ret === 200) {
|
||||
this.list = res.data.data.content.list
|
||||
this.total = res.data.data.content.totalCount
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.listLoading = false
|
||||
}, 0.5 * 100)
|
||||
})
|
||||
// 部门列表数据
|
||||
getdeptlist().then(res => {
|
||||
if (res.data.ret === 200) {
|
||||
this.depts = res.data.data.content
|
||||
}
|
||||
})
|
||||
// 区域数据
|
||||
regionlist().then(res => {
|
||||
if (res.data.ret === 200) {
|
||||
this.regions2 = this.tranKTree(res.data.data.content)
|
||||
}
|
||||
})
|
||||
// 职位列表数据
|
||||
searchEmpCategory(this.jobCat).then(res => {
|
||||
if (res.data.ret === 200) {
|
||||
this.jobs = res.data.data.content.list
|
||||
} else {
|
||||
console.log('职位列表出错')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 转化数据方法
|
||||
tranKTree(arr) {
|
||||
if (!arr || !arr.length) return
|
||||
return arr.map(item => ({
|
||||
id: item.id,
|
||||
regionName: item.regionName,
|
||||
regionListVos: this.tranKTree(item.regionListVos)
|
||||
}))
|
||||
},
|
||||
// 查询
|
||||
handleFilter() {
|
||||
this.getemplist.regionid = this.getemplistregions[this.getemplistregions.length - 1]
|
||||
getemplist(this.getemplist).then(res => {
|
||||
if (res.data.ret === 200) {
|
||||
this.list = res.data.data.content.list
|
||||
this.total = res.data.data.content.totalCount
|
||||
}
|
||||
})
|
||||
},
|
||||
// 新增数据
|
||||
handleAdd() {
|
||||
this.employeeVisible = false
|
||||
this.$router.push('/EmployeeInformation/NewEmployeeInformation')
|
||||
},
|
||||
// 根据区域选择门店
|
||||
handlechange4(val) {
|
||||
console.log(val)
|
||||
const finalid = val[val.length - 1]
|
||||
searchRepository(finalid).then(res => {
|
||||
if (res.data.ret === 200) {
|
||||
console.log(res)
|
||||
this.repositories = res.data.data.content.list
|
||||
} else {
|
||||
this.$message.error('出错了')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 清空历史搜索数据
|
||||
restemplist() {
|
||||
this.getemplist = {
|
||||
repositoryid: '',
|
||||
regionid: '',
|
||||
postid: '',
|
||||
deptid: '',
|
||||
employeename: '',
|
||||
pagenum: 1,
|
||||
pagesize: 10,
|
||||
stat: 1, loginRepositoryId: this.$store.getters.repositoryId, regionIds: this.$store.getters.regionIds,
|
||||
time: '',
|
||||
jobnumber: ''
|
||||
}
|
||||
this.getemplistregions = []
|
||||
},
|
||||
// 批量操作
|
||||
handleSelectionChange(rows) {
|
||||
this.moreaction = rows
|
||||
this.select_order_number = this.moreaction.length
|
||||
this.select_orderId = []
|
||||
if (rows) {
|
||||
rows.forEach(row => {
|
||||
if (row) {
|
||||
this.select_orderId.push(row.id)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 确认添加数据
|
||||
handleConfirm() {
|
||||
console.log('this.moreaction', this.moreaction)
|
||||
const saledata = this.moreaction.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
personName: item.personName
|
||||
}
|
||||
})
|
||||
this.employeeVisible = false
|
||||
this.$emit('deliveryName', saledata)
|
||||
}
|
||||
// 仓库管理员选择结束
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.ERP-container {
|
||||
margin: 50px 30px;
|
||||
}
|
||||
.filter-item{
|
||||
width: 140px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.form-name{
|
||||
font-size: 18px;
|
||||
color: #373e4f;
|
||||
margin-bottom: -20px;
|
||||
margin-top: 30px;
|
||||
}
|
||||
.container{
|
||||
margin-top: 2%;
|
||||
border: 1px solid #eceff6;
|
||||
}
|
||||
</style>
|
|
@ -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 {
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('SaleOut.saleType')" prop="saleType" style="width: 100%;">
|
||||
<el-select v-model="personalForm.saleType" style="margin-left: 18px;width: 200px">
|
||||
<el-select v-model="personalForm.saleType" style="margin-left: 18px;width: 200px" @change="switchsaletype">
|
||||
<el-option value="1" label="现金" />
|
||||
<el-option value="2" label="分期" />
|
||||
</el-select>
|
||||
|
@ -348,7 +348,7 @@
|
|||
</el-editable-column>
|
||||
<el-editable-column :edit-render="{name: 'ElInput', type: 'visible'}" :label="$t('updates.dcbm')" prop="batteryCode" align="center" min-width="150" >
|
||||
<template slot="edit" slot-scope="scope">
|
||||
<el-input v-if="isEdit2(scope.row)" v-model="scope.row.batteryCode" clearable @blur="getInfo2(scope.row)"/>
|
||||
<el-input v-if="isEdit4(scope.row)" v-model="scope.row.batteryCode" clearable @blur="getInfo2(scope.row)"/>
|
||||
<span v-else>{{ scope.row.batteryCode }}</span>
|
||||
</template>
|
||||
</el-editable-column>
|
||||
|
@ -504,8 +504,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'
|
||||
|
@ -745,10 +745,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) {
|
||||
|
@ -860,6 +883,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)
|
||||
|
@ -1109,6 +1150,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)
|
||||
|
@ -1361,24 +1407,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事件触发
|
||||
|
@ -1414,8 +1470,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()
|
||||
|
@ -1869,12 +1933,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() {
|
||||
|
@ -1943,11 +2013,24 @@ export default {
|
|||
if (m4 === 1) {
|
||||
m3 = 2
|
||||
}
|
||||
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',
|
||||
|
|
364
src/views/SaleOut/components/MyEmp2.vue
Normal file
364
src/views/SaleOut/components/MyEmp2.vue
Normal file
|
@ -0,0 +1,364 @@
|
|||
<template>
|
||||
<el-dialog :visible.sync="employeeVisible" :control="control" :close-on-press-escape="false" :title="$t('Hmodule.xzyg')" top="10px" append-to-body @close="$emit('update:control', false)">
|
||||
<div class="filter-container">
|
||||
<el-input v-model="getemplist.employeename" :placeholder="$t('NewEmployeeInformation.employeename')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
|
||||
<el-input v-model="getemplist.jobnumber" :placeholder="$t('NewEmployeeInformation.jobnumber2')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
|
||||
<el-date-picker
|
||||
v-model="getemplist.time"
|
||||
:placeholder="$t('Hmodule.xzrq')"
|
||||
type="date"
|
||||
class="filter-item"
|
||||
value-format="yyyy-MM-dd"/>
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
width="500"
|
||||
trigger="click">
|
||||
<el-cascader
|
||||
:options="regions2"
|
||||
:props="props2"
|
||||
v-model="getemplistregions"
|
||||
:show-all-levels="false"
|
||||
:placeholder="$t('Hmodule.xzqy')"
|
||||
change-on-select
|
||||
filterable
|
||||
clearable
|
||||
style="width: 40%;float: left;margin-left: 20px"
|
||||
@change="handlechange4"
|
||||
/>
|
||||
<el-select v-model="getemplist.repositoryid" :placeholder="$t('Hmodule.xzmd')" clearable filterable style="width: 40%;float: right;margin-right: 20px">
|
||||
<el-option
|
||||
v-for="(item, index) in repositories"
|
||||
:key="index"
|
||||
:label="item.repositoryName"
|
||||
:value="item.id"/>
|
||||
</el-select>
|
||||
<el-select v-model="getemplist.postid" :value="getemplist.postid" :placeholder="$t('NewEmployeeInformation.postid2')" class="filter-item" clearable style="width: 40%;float: left;margin-top: 10px;margin-left: 20px">
|
||||
<el-option
|
||||
v-for="(item, index) in jobs"
|
||||
:key="index"
|
||||
:label="item.categoryName"
|
||||
:value="item.id"/>
|
||||
</el-select>
|
||||
<el-select v-model="getemplist.deptid" :placeholder="$t('NewEmployeeInformation.deptid2')" class="filter-item" clearable style="width: 40%;float: right;margin-top: 10px;margin-right: 20px">
|
||||
<el-option
|
||||
v-for="(item, index) in depts"
|
||||
:key="index"
|
||||
:label="item.deptName"
|
||||
:value="item.id"/>
|
||||
</el-select>
|
||||
<div class="seachbutton" style="width: 100%;float: right;margin-top: 20px">
|
||||
<el-button v-waves class="filter-item" type="primary" style="float: right" @click="handleFilter">{{ $t('public.search') }}</el-button>
|
||||
</div>
|
||||
<el-button v-waves slot="reference" type="primary" class="filter-item" style="width: 130px">{{ $t('public.filter') }}<svg-icon icon-class="shaixuan" style="margin-left: 4px"/></el-button>
|
||||
</el-popover>
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" style="width: 86px" @click="handleFilter">{{ $t('public.search') }}</el-button>
|
||||
<el-button v-waves class="filter-item" icon="el-icon-plus" type="success" style="width: 86px;" @click="handleAdd">{{ $t('public.add') }}</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="list"
|
||||
:key="tableKey"
|
||||
:row-key="getRowKeys"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
style="width: 100%"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
:reserve-selection="true"
|
||||
type="selection"
|
||||
width="55"
|
||||
fixed="left"
|
||||
align="center"/>
|
||||
<el-table-column
|
||||
:label="$t('NewEmployeeInformation.id')"
|
||||
:resizable="false"
|
||||
property="id"
|
||||
align="center"
|
||||
width="50"/>
|
||||
<el-table-column
|
||||
:label="$t('NewEmployeeInformation.jobNumber')"
|
||||
:resizable="false"
|
||||
property="jobNumber"
|
||||
align="center"
|
||||
width="100"/>
|
||||
<el-table-column
|
||||
:label="$t('NewEmployeeInformation.account')"
|
||||
:resizable="false"
|
||||
property="account"
|
||||
width="150"
|
||||
align="center"/>
|
||||
<el-table-column :label="$t('NewEmployeeInformation.name')" :resizable="false" align="center" width="109">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.firstName }} {{ scope.row.middleName }} {{ scope.row.lastName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('NewEmployeeInformation.gender')" :resizable="false" prop="gender" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.gender | genderFilter }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('NewEmployeeInformation.deptName')" :resizable="false" prop="deptName" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.deptName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('NewEmployeeInformation.regionName')" :resizable="false" prop="regionName" align="center" width="230">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.regionName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('NewEmployeeInformation.repositoryName')" :resizable="false" prop="repositoryName" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.repositoryName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button v-waves class="filter-item" type="success" style="width: 100px;float: left;margin-top: 10px" @click="handleConfirm">{{ $t('Hmodule.sure') }}</el-button>
|
||||
<pagination v-show="total>0" :total="total" :page.sync="getemplist.pagenum" :limit.sync="getemplist.pagesize" @pagination="gitemplist" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { regionlist, searchRepository } from '@/api/public'
|
||||
import { getemplist, getdeptlist, searchEmpCategory } from '@/api/EmployeeInformation'
|
||||
import waves from '@/directive/waves' // Waves directive
|
||||
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
var _that
|
||||
export default {
|
||||
directives: { waves },
|
||||
components: { Pagination },
|
||||
filters: {
|
||||
genderFilter(status) {
|
||||
const statusMap = {
|
||||
1: '男',
|
||||
2: '女'
|
||||
}
|
||||
return statusMap[status]
|
||||
}
|
||||
},
|
||||
props: {
|
||||
control: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
select_orderId: [],
|
||||
select_order_number: [],
|
||||
getRowKeys(row) {
|
||||
return row.id
|
||||
},
|
||||
// 职位搜索时参数
|
||||
jobCat: {
|
||||
type: 2,
|
||||
pagenum: 1,
|
||||
pagesize: 9999
|
||||
},
|
||||
// 职位列表
|
||||
jobs: [],
|
||||
// 转化数据
|
||||
choosedata: '',
|
||||
// 仓库管理员回显数据
|
||||
managerPeople: '',
|
||||
// 小区经理回显数据
|
||||
regionManagerId: '',
|
||||
// / 弹窗选择
|
||||
// 单选表格样式
|
||||
currentRow: null,
|
||||
// 员工表格数据
|
||||
list: [],
|
||||
// 员工表格数据条数
|
||||
total: 0,
|
||||
// 员工表格识别
|
||||
tableKey: 0,
|
||||
// 加载员工表格
|
||||
listLoading: true,
|
||||
// 员工查询列表数据
|
||||
getemplist: {
|
||||
repositoryid: '',
|
||||
regionid: '',
|
||||
postid: '',
|
||||
deptid: '',
|
||||
employeename: '',
|
||||
pagenum: 1,
|
||||
pagesize: 10,
|
||||
stat: 1, loginRepositoryId: this.$store.getters.repositoryId, regionIds: this.$store.getters.regionIds,
|
||||
time: '',
|
||||
jobnumber: ''
|
||||
},
|
||||
// 部门列表
|
||||
depts: [],
|
||||
// 区域级联数据转化
|
||||
props2: {
|
||||
value: 'id',
|
||||
label: 'regionName',
|
||||
children: 'regionListVos'
|
||||
},
|
||||
// 区域数据
|
||||
regions2: [],
|
||||
getemplistregions: [],
|
||||
// 门店数据
|
||||
repositories: [],
|
||||
// 员工选择框控制
|
||||
employeeVisible: this.control,
|
||||
// 小区经理选择框控制
|
||||
regionManagerVisible: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
control() {
|
||||
this.employeeVisible = this.control
|
||||
this.gitemplist()
|
||||
}
|
||||
},
|
||||
beforeCreate() {
|
||||
_that = this
|
||||
},
|
||||
methods: {
|
||||
// 仓库管理员选择开始
|
||||
gitemplist() {
|
||||
// 员工列表数据
|
||||
this.listLoading = true
|
||||
console.log(this.getemplist)
|
||||
getemplist(this.getemplist).then(res => {
|
||||
if (res.data.ret === 200) {
|
||||
this.list = res.data.data.content.list
|
||||
this.total = res.data.data.content.totalCount
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.listLoading = false
|
||||
}, 0.5 * 100)
|
||||
})
|
||||
// 部门列表数据
|
||||
getdeptlist().then(res => {
|
||||
if (res.data.ret === 200) {
|
||||
this.depts = res.data.data.content
|
||||
}
|
||||
})
|
||||
// 区域数据
|
||||
regionlist().then(res => {
|
||||
if (res.data.ret === 200) {
|
||||
this.regions2 = this.tranKTree(res.data.data.content)
|
||||
}
|
||||
})
|
||||
// 职位列表数据
|
||||
searchEmpCategory(this.jobCat).then(res => {
|
||||
if (res.data.ret === 200) {
|
||||
this.jobs = res.data.data.content.list
|
||||
} else {
|
||||
console.log('职位列表出错')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 转化数据方法
|
||||
tranKTree(arr) {
|
||||
if (!arr || !arr.length) return
|
||||
return arr.map(item => ({
|
||||
id: item.id,
|
||||
regionName: item.regionName,
|
||||
regionListVos: this.tranKTree(item.regionListVos)
|
||||
}))
|
||||
},
|
||||
// 查询
|
||||
handleFilter() {
|
||||
this.getemplist.regionid = this.getemplistregions[this.getemplistregions.length - 1]
|
||||
getemplist(this.getemplist).then(res => {
|
||||
if (res.data.ret === 200) {
|
||||
this.list = res.data.data.content.list
|
||||
this.total = res.data.data.content.totalCount
|
||||
} else {
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
message: '出错了',
|
||||
offset: 100
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 新增数据
|
||||
handleAdd() {
|
||||
this.employeeVisible = false
|
||||
this.$router.push('/EmployeeInformation/NewEmployeeInformation')
|
||||
},
|
||||
// 根据区域选择门店
|
||||
handlechange4(val) {
|
||||
console.log(val)
|
||||
const finalid = val[val.length - 1]
|
||||
searchRepository(finalid).then(res => {
|
||||
if (res.data.ret === 200) {
|
||||
console.log(res)
|
||||
this.repositories = res.data.data.content.list
|
||||
} else {
|
||||
this.$message.error('出错了')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 清空历史搜索数据
|
||||
restemplist() {
|
||||
this.getemplist = {
|
||||
repositoryid: '',
|
||||
regionid: '',
|
||||
postid: '',
|
||||
deptid: '',
|
||||
employeename: '',
|
||||
pagenum: 1,
|
||||
pagesize: 10,
|
||||
stat: 1, loginRepositoryId: this.$store.getters.repositoryId, regionIds: this.$store.getters.regionIds,
|
||||
time: '',
|
||||
jobnumber: ''
|
||||
}
|
||||
this.getemplistregions = []
|
||||
},
|
||||
// 批量操作
|
||||
handleSelectionChange(rows) {
|
||||
this.moreaction = rows
|
||||
this.select_order_number = this.moreaction.length
|
||||
this.select_orderId = []
|
||||
if (rows) {
|
||||
rows.forEach(row => {
|
||||
if (row) {
|
||||
this.select_orderId.push(row.id)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 确认添加数据
|
||||
handleConfirm() {
|
||||
console.log('this.moreaction', this.moreaction)
|
||||
const saledata = this.moreaction.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
personName: item.personName
|
||||
}
|
||||
})
|
||||
this.employeeVisible = false
|
||||
this.$emit('stockName', saledata)
|
||||
}
|
||||
// 仓库管理员选择结束
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.ERP-container {
|
||||
margin: 50px 30px;
|
||||
}
|
||||
.filter-item{
|
||||
width: 140px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.form-name{
|
||||
font-size: 18px;
|
||||
color: #373e4f;
|
||||
margin-bottom: -20px;
|
||||
margin-top: 30px;
|
||||
}
|
||||
.container{
|
||||
margin-top: 2%;
|
||||
border: 1px solid #eceff6;
|
||||
}
|
||||
</style>
|
Loading…
Reference in a new issue