|
|
@@ -146,6 +146,8 @@
|
|
|
<Contact ref="contact" />
|
|
|
<!-- 分配客户 -->
|
|
|
<Allocate ref="allocate" @refresh="fetchData" />
|
|
|
+ <!-- 领取客户 -->
|
|
|
+ <Pick ref="pick" @refresh="fetchData" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -155,6 +157,7 @@
|
|
|
import Contact from './components/Contact'
|
|
|
import Edit from './components/Edit'
|
|
|
import Allocate from './components/Allocate'
|
|
|
+ import Pick from './components/Pick'
|
|
|
import TableTool from '@/components/table/TableTool'
|
|
|
import downloadFileByByte from '@/utils/base64ToFile'
|
|
|
export default {
|
|
|
@@ -163,6 +166,7 @@
|
|
|
Contact,
|
|
|
Edit,
|
|
|
Allocate,
|
|
|
+ Pick,
|
|
|
TableTool,
|
|
|
},
|
|
|
data() {
|
|
|
@@ -395,31 +399,33 @@
|
|
|
handleReceive() {
|
|
|
if (!this.selectRows.length) return this.$message.warning('请选择客户')
|
|
|
const arr = this.selectRows.map((item) => item.id)
|
|
|
+ this.$refs.pick.ids = arr
|
|
|
+ this.$refs.pick.visible = true
|
|
|
|
|
|
- this.$confirm('确认领取客户?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning',
|
|
|
- })
|
|
|
- .then(async () => {
|
|
|
- const [err, res] = await to(
|
|
|
- api.receiveCustomer({
|
|
|
- ids: arr,
|
|
|
- salesId: this.$store.state.user.id,
|
|
|
- salesName: this.$store.state.user.nickName,
|
|
|
- receive: '1',
|
|
|
- })
|
|
|
- )
|
|
|
- if (err) return
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: '领取成功!',
|
|
|
- })
|
|
|
- this.fetchData()
|
|
|
- }
|
|
|
- })
|
|
|
- .catch((err) => console.log(err))
|
|
|
+ // this.$confirm('确认领取客户?', '提示', {
|
|
|
+ // confirmButtonText: '确定',
|
|
|
+ // cancelButtonText: '取消',
|
|
|
+ // type: 'warning',
|
|
|
+ // })
|
|
|
+ // .then(async () => {
|
|
|
+ // const [err, res] = await to(
|
|
|
+ // api.receiveCustomer({
|
|
|
+ // ids: arr,
|
|
|
+ // salesId: this.$store.state.user.id,
|
|
|
+ // salesName: this.$store.state.user.nickName,
|
|
|
+ // receive: '1',
|
|
|
+ // })
|
|
|
+ // )
|
|
|
+ // if (err) return
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // this.$message({
|
|
|
+ // type: 'success',
|
|
|
+ // message: '领取成功!',
|
|
|
+ // })
|
|
|
+ // this.fetchData()
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // .catch((err) => console.log(err))
|
|
|
},
|
|
|
},
|
|
|
}
|