Browse Source

完善预约单管理--选择客户

master
yunuo970428 11 months ago
parent
commit
c2ae92f874
  1. 4
      yxt-as-ui/src/api/Common/dictcommons.js
  2. 57
      yxt-as-ui/src/components/publicPage/selectCustomer.vue
  3. 8
      yxt-as-ui/src/views/operation/preregistration/preregistrationAdd.vue

4
yxt-as-ui/src/api/Common/dictcommons.js

@ -159,9 +159,9 @@ export function getServiceItemListPage(data) {
} }
// 查询分页列表 -- 客户列表 // 查询分页列表 -- 客户列表
export function customerListPage(params) { export function customerList(params) {
return request({ return request({
url: '/yxtcrm/apiadmin/v1/crmcustomer/customerListPage', url: '/as/v1/ascustomervehicle/customerList',
method: 'post', method: 'post',
data: params, data: params,
headers: { headers: {

57
yxt-as-ui/src/views/operation/preregistration/relation/customer.vue → yxt-as-ui/src/components/publicPage/selectCustomer.vue

@ -10,7 +10,7 @@
<div v-show="isSearchShow" class="search"> <div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" class="tab-header"> <el-form ref="listQueryform" :inline="true" :model="listQuery" class="tab-header">
<el-form-item label="客户名称"> <el-form-item label="客户名称">
<el-input v-model="listQuery.params.name" placeholder="" clearable/> <el-input v-model="listQuery.params.customerName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="车牌号"> <el-form-item label="车牌号">
<el-input v-model="listQuery.params.vehMark" placeholder="" clearable/> <el-input v-model="listQuery.params.vehMark" placeholder="" clearable/>
@ -21,8 +21,10 @@
<el-form-item label="联系电话"> <el-form-item label="联系电话">
<el-input v-model="listQuery.params.mobile" placeholder="" clearable/> <el-input v-model="listQuery.params.mobile" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="客户单位"> <el-form-item label="客户类型">
<el-input v-model="listQuery.params.orgName" placeholder="" clearable/> <el-select v-model="listQuery.params.customerTypeKey" class="addinputw" placeholder="请选择">
<el-option v-for="(item, index) in merType" :key="index.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="btn" style="text-align: center;"> <div class="btn" style="text-align: center;">
@ -68,7 +70,7 @@
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
import { customerListPage } from '@/api/Common/dictcommons' import { customerList, typeValues } from '@/api/Common/dictcommons'
export default { export default {
name: 'Customer', name: 'Customer',
@ -95,6 +97,7 @@ export default {
tableKey: 0, tableKey: 0,
list: [], list: [],
sids: [], // SIDs sids: [], // SIDs
merType: [],
FormLoading: false, FormLoading: false,
listLoading: false, listLoading: false,
// //
@ -103,12 +106,13 @@ export default {
size: 5, size: 5,
total: 0, total: 0,
params: { params: {
orgPath: '', customerName: '',
name: '',
vehMark: '', vehMark: '',
vinNo: '',
mobile: '', mobile: '',
orgName: '', customerTypeKey: '',
vinNo: '' billType: '',
useOrgSid: ''
} }
} }
} }
@ -117,6 +121,13 @@ export default {
this.$refs['btnbar'].setButtonList(this.btnList) this.$refs['btnbar'].setButtonList(this.btnList)
}, },
methods: { methods: {
init() {
typeValues({ type: 'customerType' }).then((res) => {
if (res.success) {
this.merType = res.data
}
})
},
// //
clicksearchShow() { clicksearchShow() {
this.isSearchShow = !this.isSearchShow this.isSearchShow = !this.isSearchShow
@ -142,11 +153,16 @@ export default {
var pageindex = index + 1 + pagestart var pageindex = index + 1 + pagestart
return pageindex return pageindex
}, },
showData(deptSid, type) {
this.init()
this.listQuery.params.useOrgSid = deptSid
this.listQuery.params.billType = type // type
this.getList()
},
// //
getList() { getList() {
this.listLoading = true this.listLoading = true
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') customerList(this.listQuery).then((response) => {
customerListPage(this.listQuery).then(response => {
this.listLoading = false this.listLoading = false
if (response.success) { if (response.success) {
this.list = response.data.records this.list = response.data.records
@ -164,19 +180,14 @@ export default {
}, },
// //
handleReset() { handleReset() {
this.listQuery = { this.listQuery.current = 1
current: 1, this.listQuery.total = 0
size: 5, this.listQuery.size = 5
total: 0, this.listQuery.params.customerName = ''
params: { this.listQuery.params.vehMark = ''
orgPath: '', this.listQuery.params.vinNo = ''
name: '', this.listQuery.params.mobile = ''
vehMark: '', this.listQuery.params.customerTypeKey = ''
mobile: '',
orgName: '',
vinNo: ''
}
}
this.getList() this.getList()
}, },
handleConfirm(row) { handleConfirm(row) {

8
yxt-as-ui/src/views/operation/preregistration/preregistrationAdd.vue

@ -141,19 +141,19 @@
</div> </div>
</div> </div>
<!-- 选择客户 --> <!-- 选择客户 -->
<customer v-show="viewState == 2" ref="divCus" @backData="backData" @doback="resetState"/> <selectCustomer v-show="viewState == 2" ref="divCus" @backData="backData" @doback="resetState"/>
</div> </div>
</template> </template>
<script> <script>
import req from '@/api/operation/preregistration' import req from '@/api/operation/preregistration'
import { selAllByOrgSidPath, selSubjectInfo, getServiceItemListPage } from '@/api/Common/dictcommons' import { selAllByOrgSidPath, selSubjectInfo, getServiceItemListPage } from '@/api/Common/dictcommons'
import customer from './relation/customer' import selectCustomer from '@/components/publicPage/selectCustomer'
export default { export default {
name: 'PreregistrationAdd', name: 'PreregistrationAdd',
components: { components: {
customer selectCustomer
}, },
data() { data() {
return { return {
@ -297,7 +297,7 @@ export default {
}, },
selectCustomer() { selectCustomer() {
this.viewState = 2 this.viewState = 2
this.$refs['divCus'].getList() this.$refs['divCus'].showData(this.formobj.deptSid, '')
}, },
backData(value) { backData(value) {
this.viewState = 1 this.viewState = 1

Loading…
Cancel
Save