|
|
|
@ -49,8 +49,13 @@
|
|
|
|
|
:show-arrow="false"
|
|
|
|
|
:filter-option="false"
|
|
|
|
|
:not-found-content="null"
|
|
|
|
|
@change="handleChangeUser"
|
|
|
|
|
@search="SearchUser">
|
|
|
|
|
@change="handleChangeUser">
|
|
|
|
|
<div slot="dropdownRender" slot-scope="menu">
|
|
|
|
|
<div style="padding: 4px 8px; cursor: pointer;" @mousedown="(e) => e.preventDefault()">
|
|
|
|
|
<a-button size="small" type="primary" @click="handleAllSelect">全选</a-button>
|
|
|
|
|
<VNodes :vnodes="menu" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<a-select-option v-for="item in customerByList" :key="item.id" :value="item.id">
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
</a-select-option>
|
|
|
|
@ -74,9 +79,10 @@
|
|
|
|
|
:show-arrow="false"
|
|
|
|
|
:filter-option="false"
|
|
|
|
|
:not-found-content="null"
|
|
|
|
|
@search="SearchUser"
|
|
|
|
|
allowClear
|
|
|
|
|
@search="SearchUser($event, 0)"
|
|
|
|
|
@change="e => {
|
|
|
|
|
ChangeUser(e, 'saleName')
|
|
|
|
|
ChangeUser(e, 'saleName', 0)
|
|
|
|
|
}
|
|
|
|
|
">
|
|
|
|
|
<a-select-option v-for="item in UserList" :key="item.id" :value="item.id">
|
|
|
|
@ -92,14 +98,15 @@
|
|
|
|
|
v-model="CreateData.opId"
|
|
|
|
|
:default-active-first-option="false"
|
|
|
|
|
:show-arrow="false"
|
|
|
|
|
allowClear
|
|
|
|
|
:filter-option="false"
|
|
|
|
|
:not-found-content="null"
|
|
|
|
|
@search="SearchUser"
|
|
|
|
|
@search="SearchUser($event, 1)"
|
|
|
|
|
@change="e => {
|
|
|
|
|
ChangeUser(e, 'opName')
|
|
|
|
|
ChangeUser(e, 'opName', 1)
|
|
|
|
|
}
|
|
|
|
|
">
|
|
|
|
|
<a-select-option v-for="item in UserList" :key="item.id" :value="item.id">
|
|
|
|
|
<a-select-option v-for="item in UserList1" :key="item.id" :value="item.id">
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
@ -110,16 +117,17 @@
|
|
|
|
|
<a-select
|
|
|
|
|
show-search
|
|
|
|
|
v-model="CreateData.docId"
|
|
|
|
|
allowClear
|
|
|
|
|
:default-active-first-option="false"
|
|
|
|
|
:show-arrow="false"
|
|
|
|
|
:filter-option="false"
|
|
|
|
|
:not-found-content="null"
|
|
|
|
|
@search="SearchUser"
|
|
|
|
|
@search="SearchUser($event, 2)"
|
|
|
|
|
@change="e => {
|
|
|
|
|
ChangeUser(e, 'docName')
|
|
|
|
|
ChangeUser(e, 'docName', 2)
|
|
|
|
|
}
|
|
|
|
|
">
|
|
|
|
|
<a-select-option v-for="item in UserList" :key="item.id" :value="item.id">
|
|
|
|
|
<a-select-option v-for="item in UserList2" :key="item.id" :value="item.id">
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
@ -136,12 +144,13 @@
|
|
|
|
|
:show-arrow="false"
|
|
|
|
|
:filter-option="false"
|
|
|
|
|
:not-found-content="null"
|
|
|
|
|
@search="SearchUser"
|
|
|
|
|
allowClear
|
|
|
|
|
@search="SearchUser($event, 3)"
|
|
|
|
|
@change="e => {
|
|
|
|
|
ChangeUser(e, 'custserviceName')
|
|
|
|
|
ChangeUser(e, 'custserviceName', 3)
|
|
|
|
|
}
|
|
|
|
|
">
|
|
|
|
|
<a-select-option v-for="item in UserList" :key="item.id" :value="item.id">
|
|
|
|
|
<a-select-option v-for="item in UserList3" :key="item.id" :value="item.id">
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
@ -155,13 +164,14 @@
|
|
|
|
|
:default-active-first-option="false"
|
|
|
|
|
:show-arrow="false"
|
|
|
|
|
:filter-option="false"
|
|
|
|
|
allowClear
|
|
|
|
|
:not-found-content="null"
|
|
|
|
|
@search="SearchUser"
|
|
|
|
|
@search="SearchUser($event, 4)"
|
|
|
|
|
@change="e => {
|
|
|
|
|
ChangeUser(e, 'route')
|
|
|
|
|
ChangeUser(e, 'route', 4)
|
|
|
|
|
}
|
|
|
|
|
">
|
|
|
|
|
<a-select-option v-for="item in UserList" :key="item.id" :value="item.id">
|
|
|
|
|
<a-select-option v-for="item in UserList4" :key="item.id" :value="item.id">
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
@ -174,14 +184,15 @@
|
|
|
|
|
v-model="CreateData.lineManageID"
|
|
|
|
|
:default-active-first-option="false"
|
|
|
|
|
:show-arrow="false"
|
|
|
|
|
allowClear
|
|
|
|
|
:filter-option="false"
|
|
|
|
|
:not-found-content="null"
|
|
|
|
|
@search="SearchUser"
|
|
|
|
|
@search="SearchUser($event, 5)"
|
|
|
|
|
@change="e => {
|
|
|
|
|
ChangeUser(e, 'lineManage')
|
|
|
|
|
ChangeUser(e, 'lineManage', 5)
|
|
|
|
|
}
|
|
|
|
|
">
|
|
|
|
|
<a-select-option v-for="item in UserList" :key="item.id" :value="item.id">
|
|
|
|
|
<a-select-option v-for="item in UserList5" :key="item.id" :value="item.id">
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
@ -228,7 +239,14 @@ import { DjyCustomerSuggest, GetSysUserPage, DjyCustomerContacts, DjyCustomerdet
|
|
|
|
|
import { GetProjectList, CreateBookingAndSlot, GetBookingOrder } from '@/api/modular/main/TaskmanageList'
|
|
|
|
|
import { mapGetters } from 'vuex'
|
|
|
|
|
import { ValidateCreateBookingOrder, CreateBooking0rder } from '@/api/modular/main/CompanySiteaccount'
|
|
|
|
|
let timer
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
VNodes: {
|
|
|
|
|
functional: true,
|
|
|
|
|
render: (h, ctx) => ctx.props.vnodes
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
SlotVisible: false,
|
|
|
|
@ -254,10 +272,16 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
CustomerList: [],
|
|
|
|
|
UserList: [],
|
|
|
|
|
UserList1: [],
|
|
|
|
|
UserList2: [],
|
|
|
|
|
UserList3: [],
|
|
|
|
|
UserList4: [],
|
|
|
|
|
UserList5: [],
|
|
|
|
|
fetching: false,
|
|
|
|
|
spinning: false,
|
|
|
|
|
customerByList: [],
|
|
|
|
|
type: '',
|
|
|
|
|
UserListAll: [],
|
|
|
|
|
userInfoList: [],
|
|
|
|
|
slotEdit: {},
|
|
|
|
|
bookingServiceItem: []
|
|
|
|
@ -279,7 +303,12 @@ export default {
|
|
|
|
|
this.bookingServiceItem = res.data
|
|
|
|
|
})
|
|
|
|
|
GetSysUserPage().then(res => {
|
|
|
|
|
this.UserList = res.data
|
|
|
|
|
this.UserList = JSON.parse(JSON.stringify(res.data))
|
|
|
|
|
this.UserList1 = JSON.parse(JSON.stringify(res.data))
|
|
|
|
|
this.UserList2 = JSON.parse(JSON.stringify(res.data))
|
|
|
|
|
this.UserList3 = JSON.parse(JSON.stringify(res.data))
|
|
|
|
|
this.UserList4 = JSON.parse(JSON.stringify(res.data))
|
|
|
|
|
this.UserListAll = JSON.parse(JSON.stringify(res.data))
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
@ -293,12 +322,12 @@ export default {
|
|
|
|
|
projectList.push(item.serviceProjectCode)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const ApiData = {
|
|
|
|
|
slotId: this.slotEdit.id,
|
|
|
|
|
projectList,
|
|
|
|
|
...this.CreateData
|
|
|
|
|
}
|
|
|
|
|
ApiData.customerList = ApiData.customerContactId
|
|
|
|
|
this.spinning = true
|
|
|
|
|
CreateBooking0rder(ApiData).then(res => {
|
|
|
|
|
if (res.success) {
|
|
|
|
@ -347,6 +376,17 @@ export default {
|
|
|
|
|
this.spinning = false
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleAllSelect() {
|
|
|
|
|
const arr = []
|
|
|
|
|
const arr1 = []
|
|
|
|
|
this.customerByList.forEach(item => {
|
|
|
|
|
arr.push(item.id)
|
|
|
|
|
arr1.push(item)
|
|
|
|
|
})
|
|
|
|
|
this.$set(this.CreateData, 'customerContactId', arr)
|
|
|
|
|
this.userInfoList = arr1
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
},
|
|
|
|
|
init2() {
|
|
|
|
|
this.SlotVisible = true
|
|
|
|
|
this.spinning = true
|
|
|
|
@ -384,6 +424,7 @@ export default {
|
|
|
|
|
projectList,
|
|
|
|
|
...this.CreateData
|
|
|
|
|
}
|
|
|
|
|
ApiData.customerList = ApiData.customerContactId
|
|
|
|
|
if (this.CreateData.customerList.length > 0) {
|
|
|
|
|
const arr = []
|
|
|
|
|
this.customerByList.forEach(item => {
|
|
|
|
@ -426,17 +467,101 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
this.userInfoList = arr
|
|
|
|
|
},
|
|
|
|
|
SearchUser(e) {
|
|
|
|
|
GetSysUserPage({ name: e }).then(res => {
|
|
|
|
|
this.UserList = res.data
|
|
|
|
|
})
|
|
|
|
|
debounce(func, wait, ...args) {
|
|
|
|
|
if (timer) clearTimeout(timer)
|
|
|
|
|
timer = setTimeout(() => {
|
|
|
|
|
func.apply(this, args)
|
|
|
|
|
}, wait)
|
|
|
|
|
},
|
|
|
|
|
ChangeUser(e, Tname) {
|
|
|
|
|
this.UserList.forEach(item => {
|
|
|
|
|
if (item.id == e) {
|
|
|
|
|
this.CreateData[Tname] = item.name
|
|
|
|
|
SearchUser(e, type) {
|
|
|
|
|
if (e) {
|
|
|
|
|
GetSysUserPage({ name: e }).then(res => {
|
|
|
|
|
if (type === 0) {
|
|
|
|
|
this.UserList = res.data
|
|
|
|
|
}
|
|
|
|
|
if (type === 1) {
|
|
|
|
|
this.UserList1 = res.data
|
|
|
|
|
}
|
|
|
|
|
if (type === 2) {
|
|
|
|
|
this.UserList2 = res.data
|
|
|
|
|
}
|
|
|
|
|
if (type === 3) {
|
|
|
|
|
this.UserList3 = res.data
|
|
|
|
|
}
|
|
|
|
|
if (type === 4) {
|
|
|
|
|
this.UserList4 = res.data
|
|
|
|
|
}
|
|
|
|
|
if (type === 5) {
|
|
|
|
|
this.UserList5 = res.data
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
ChangeUser(e, Tname, type) {
|
|
|
|
|
if (e) {
|
|
|
|
|
if (type === 0) {
|
|
|
|
|
this.UserList.forEach(item => {
|
|
|
|
|
if (item.id == e) {
|
|
|
|
|
this.CreateData[Tname] = item.name
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if (type === 1) {
|
|
|
|
|
this.UserList1.forEach(item => {
|
|
|
|
|
if (item.id == e) {
|
|
|
|
|
this.CreateData[Tname] = item.name
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (type === 2) {
|
|
|
|
|
this.UserList2.forEach(item => {
|
|
|
|
|
if (item.id == e) {
|
|
|
|
|
this.CreateData[Tname] = item.name
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (type === 3) {
|
|
|
|
|
this.UserList3.forEach(item => {
|
|
|
|
|
if (item.id == e) {
|
|
|
|
|
this.CreateData[Tname] = item.name
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (type === 4) {
|
|
|
|
|
this.UserList4.forEach(item => {
|
|
|
|
|
if (item.id == e) {
|
|
|
|
|
this.CreateData[Tname] = item.name
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (type === 5) {
|
|
|
|
|
this.UserList5.forEach(item => {
|
|
|
|
|
if (item.id == e) {
|
|
|
|
|
this.CreateData[Tname] = item.name
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (type === 0) {
|
|
|
|
|
this.UserList = JSON.parse(JSON.stringify(this.UserListAll))
|
|
|
|
|
}
|
|
|
|
|
if (type === 1) {
|
|
|
|
|
this.UserList1 = JSON.parse(JSON.stringify(this.UserListAll))
|
|
|
|
|
}
|
|
|
|
|
if (type === 2) {
|
|
|
|
|
this.UserList2 = JSON.parse(JSON.stringify(this.UserListAll))
|
|
|
|
|
}
|
|
|
|
|
if (type === 3) {
|
|
|
|
|
this.UserList3 = JSON.parse(JSON.stringify(this.UserListAll))
|
|
|
|
|
}
|
|
|
|
|
if (type === 4) {
|
|
|
|
|
this.UserList4 = JSON.parse(JSON.stringify(this.UserListAll))
|
|
|
|
|
}
|
|
|
|
|
if (type === 5) {
|
|
|
|
|
this.UserList5 = JSON.parse(JSON.stringify(this.UserListAll))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
},
|
|
|
|
|
ChangeCustomer(e) {
|
|
|
|
|
this.customerByList = []
|
|
|
|
@ -462,29 +587,29 @@ export default {
|
|
|
|
|
this.CreateData.custserviceId = Number(res.data.custserviceid)
|
|
|
|
|
this.CreateData.custserviceName = res.data.doc
|
|
|
|
|
} else {
|
|
|
|
|
this.CreateData.custserviceId = ''
|
|
|
|
|
this.CreateData.custserviceName = ''
|
|
|
|
|
this.$set(this.CreateData, 'custserviceId', '')
|
|
|
|
|
this.$set(this.CreateData, 'custserviceName', '')
|
|
|
|
|
}
|
|
|
|
|
if (res.data.docid) {
|
|
|
|
|
this.CreateData.docId = Number(res.data.docid)
|
|
|
|
|
this.CreateData.docName = res.data.custservice
|
|
|
|
|
} else {
|
|
|
|
|
this.CreateData.docId = ''
|
|
|
|
|
this.CreateData.docName = ''
|
|
|
|
|
this.$set(this.CreateData, 'docId', '')
|
|
|
|
|
this.$set(this.CreateData, 'docName', '')
|
|
|
|
|
}
|
|
|
|
|
if (res.data.opid) {
|
|
|
|
|
this.CreateData.opId = Number(res.data.opid)
|
|
|
|
|
this.CreateData.opName = res.data.op
|
|
|
|
|
} else {
|
|
|
|
|
this.CreateData.opId = ''
|
|
|
|
|
this.CreateData.opName = ''
|
|
|
|
|
this.$set(this.CreateData, 'opId', '')
|
|
|
|
|
this.$set(this.CreateData, 'opName', '')
|
|
|
|
|
}
|
|
|
|
|
if (res.data.saleid) {
|
|
|
|
|
this.CreateData.saleId = Number(res.data.saleid)
|
|
|
|
|
this.CreateData.saleName = res.data.sale
|
|
|
|
|
} else {
|
|
|
|
|
this.CreateData.saleId = ''
|
|
|
|
|
this.CreateData.saleName = ''
|
|
|
|
|
this.$set(this.CreateData, 'saleId', '')
|
|
|
|
|
this.$set(this.CreateData, 'saleName', '')
|
|
|
|
|
}
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
} else {
|
|
|
|
|