index.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <script>
  2. import { MODEIFYBUYER } from "@/api/business/purchase/task";
  3. export default {
  4. name: "ModifyBuyerDialog",
  5. components: {},
  6. data() {
  7. return {
  8. size: "mini",
  9. visible: false,
  10. loading: false,
  11. params: { id: "", buyer: "", buyerName: "" },
  12. };
  13. },
  14. computed: {},
  15. watch: {},
  16. methods: {
  17. setVisible(prop) {
  18. this.visible = prop;
  19. },
  20. beforeOpenDoSome(prop) {
  21. this.params.id = prop;
  22. },
  23. async handleComfire(prop) {
  24. try {
  25. this.loading = true;
  26. const { code, msg } = await MODEIFYBUYER([prop]);
  27. if (code === 200) {
  28. this.$notify.success({ title: msg });
  29. this.visible = false;
  30. } else {
  31. this.$notify.warning({ title: msg });
  32. }
  33. } catch (err) {
  34. //
  35. } finally {
  36. this.loading = false;
  37. }
  38. },
  39. },
  40. created() {},
  41. mounted() {},
  42. destroyed() {},
  43. };
  44. </script>
  45. <template>
  46. <el-dialog title="转派" width="30%" :visible.sync="visible">
  47. <el-alert
  48. title="转派后,采购任务将会从您的采购任务清单中删除,转移到转派目标人员的已受理采购任务清单中,您确定要转派吗?"
  49. type="info"
  50. show-icon
  51. :closable="false"
  52. style="margin-bottom: 10px"
  53. >
  54. </el-alert>
  55. <el-form
  56. :size="size"
  57. :model="params"
  58. label-width="0px"
  59. label-position="right"
  60. >
  61. <el-form-item prop="" label="">
  62. <dr-popover-select
  63. v-model="params.buyerName"
  64. title="转派人员"
  65. type="CONTACTS_PARAM"
  66. :data-mapping="{ buyer: 'code', buyerName: 'name' }"
  67. :source.sync="params"
  68. >
  69. </dr-popover-select>
  70. </el-form-item>
  71. </el-form>
  72. <span slot="footer">
  73. <el-button :size="size" @click="visible = false">取 消</el-button>
  74. <el-button :size="size" type="primary" @click="handleComfire(params)"
  75. >确 定</el-button
  76. >
  77. </span>
  78. </el-dialog>
  79. </template>
  80. <style scoped></style>