| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | :deep(.el-table) { |
| | | margin-bottom: 20px; |
| | | overflow-x: auto; |
| | | .el-table { |
| | | margin: 20px 0 !important; |
| | | } |
| | | |
| | | :deep(.el-table th) { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :title="operationType === 'add' ? 'æ°å¢åºåº' : 'ç¼è¾åºåº'" |
| | | v-model="dialogVisitable" width="800px" @close="cancel"> |
| | | <el-form :model="form" :rules="rules" ref="userRef" label-width="100px"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é宿¥æ" prop="userName"> |
| | | <el-date-picker |
| | | v-model="form.userName" |
| | | type="date" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | clearable |
| | | style="width: 100%" |
| | | placeholder="è¯·éæ©æ¥æ" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="客æ·" prop="nickName"> |
| | | <el-select v-model="form.nickName" placeholder="è¯·éæ©å®¢æ·"> |
| | | <el-option |
| | | v-for="item in customerOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç
¤ç§" prop="type"> |
| | | <el-select v-model="form.nickName" placeholder="è¯·éæ©ç
¤ç§"> |
| | | <el-option |
| | | v-for="item in typeOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åä½" prop="nickName"> |
| | | <el-input v-model="form.nickName" placeholder="请è¾å
¥åä½" maxlength="30" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é宿°é" prop="userName"> |
| | | <el-input v-model="form.userName" placeholder="请è¾å
¥é宿°é" maxlength="30" type="number" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="éå®åä»·" prop="userName"> |
| | | <el-input v-model="form.userName" placeholder="请è¾å
¥éå®åä»·(å«ç¨)" maxlength="30" type="number" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é宿»ä»·" prop="userName"> |
| | | <el-input v-model="form.userName" placeholder="请è¾å
¥é宿»ä»·(å«ç¨)" maxlength="30" type="number" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çå¼" prop="userName"> |
| | | <el-input v-model="form.userName" placeholder="请è¾å
¥çå¼" maxlength="30" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button @click="cancel">åæ¶</el-button> |
| | | <el-button type="primary" @click="submitForm">ä¿å</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {ref, reactive} from "vue"; |
| | | const { proxy } = getCurrentInstance() |
| | | const emit = defineEmits() |
| | | |
| | | const dialogVisitable = ref(false); |
| | | const operationType = ref('add'); |
| | | const customerOptions = ref([]) // 客æ·ä¸ææ¡ |
| | | const typeOptions = ref([]) // ç
¤ç§ä¸ææ¡ |
| | | const data = reactive({ |
| | | form: {}, |
| | | rules: { |
| | | userName: [{ required: true, message: "ç»å½è´¦å·ä¸è½ä¸ºç©º", trigger: "blur" },], |
| | | nickName: [{ required: true, message: "ç¨æ·å§åä¸è½ä¸ºç©º", trigger: "blur" }], |
| | | roleIds: [{ required: true, message: "è§è²ä¸è½ä¸ºç©º", trigger: "change" }], |
| | | deptId: [{ required: true, message: "é¨é¨ä¸è½ä¸ºç©º", trigger: "change" }], |
| | | password: [{ required: true, message: "ç¨æ·å¯ç ä¸è½ä¸ºç©º", trigger: "blur" }, { min: 5, max: 20, message: "ç¨æ·å¯ç é¿åº¦å¿
é¡»ä»äº 5 å 20 ä¹é´", trigger: "blur" }, { pattern: /^[^<>"'|\\]+$/, message: "ä¸è½å
å«éæ³å符ï¼< > \" ' \\\ |", trigger: "blur" }], |
| | | } |
| | | }) |
| | | |
| | | const { form, rules } = toRefs(data) |
| | | |
| | | // æå¼å¼¹æ¡ |
| | | const openDialog = (type, row) => { |
| | | console.log('openDialog', type, row) |
| | | dialogVisitable.value = true |
| | | } |
| | | // æäº¤å并表å |
| | | const submitForm = () => { |
| | | proxy.$refs["userRef"].validate(valid => { |
| | | if (valid) { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | // å
³éå并表å |
| | | const cancel = () => { |
| | | proxy.resetForm("userRef") |
| | | dialogVisitable.value = false |
| | | emit('closeDia') |
| | | } |
| | | defineExpose({ openDialog }) |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | </el-tabs> |
| | | <!-- æä½æé®åº --> |
| | | <el-space> |
| | | <el-button type="primary" :icon="Plus" @click="handleAdd">æ°å»º</el-button> |
| | | <el-button type="primary" :icon="Plus" @click="openDia('add')">æ°å»º</el-button> |
| | | <el-button type="danger" :icon="Delete" @click="handleDelete">å é¤</el-button> |
| | | <el-button type="info" :icon="Download" @click="handleExport">导åº</el-button> |
| | | <el-button type="info" plain :icon="Download" @click="handleExport">导åº</el-button> |
| | | </el-space> |
| | | <!-- è¡¨æ ¼ç»ä»¶ --> |
| | | <div> |
| | | <ETable :loading="tableLoading" |
| | | :table-data="tableData" |
| | | :columns="columns" |
| | | @selection-change="handleSelectionChange" |
| | | :show-selection="true" |
| | | :border="true" |
| | | :maxHeight="480" |
| | | @edit="openDia"></ETable> |
| | | </div> |
| | | <pagination |
| | | v-if="total>0" |
| | | :page-num="pageNum" |
| | | :page-size="pageSize" |
| | | :total="total" |
| | | @pagination="handleQuery" |
| | | :layout="'total, prev, pager, next, jumper'" |
| | | /> |
| | | </el-card> |
| | | <form-dia ref="formDia" @closeDia="handleQuery"></form-dia> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {ref, reactive} from "vue"; |
| | | const { proxy } = getCurrentInstance() |
| | | import {Delete, Download, Plus} from "@element-plus/icons-vue"; |
| | | import ETable from "@/components/Table/ETable.vue"; |
| | | import Pagination from "@/components/Pagination/index.vue"; |
| | | import FormDia from "@/views/salesOutbound/components/formDia.vue"; |
| | | |
| | | const formDia = ref() |
| | | const activeTab = ref("out"); |
| | | // æ ç¾é¡µæ°æ® |
| | | const tabs = reactive([ |
| | | { name: "out", label: "éå®åºåº" }, |
| | | ]); |
| | | // è¡¨æ ¼æ°æ® |
| | | const tableLoading = ref(false); |
| | | const tableData = ref([]); |
| | | const columns = ref([ |
| | | { prop: "supplierName", label: "é宿¥æ", minWidth: 160 }, |
| | | { prop: "identifyNumber", label: "客æ·", minWidth: 120 }, |
| | | { prop: "address", label: "ç
¤ç§", minWidth: 150 }, |
| | | { prop: "unit", label: "åä½", minWidth: 150 }, |
| | | { prop: "bank", label: "åºåæ°é", minWidth: 120 }, |
| | | { prop: "bankAccount", label: "åä»·(å«ç¨)", minWidth: 150 }, |
| | | { prop: "contacts", label: "æ»ä»·(å«ç¨)", minWidth: 100 }, |
| | | { prop: "contactAddress", label: "çå¼", minWidth: 150 }, |
| | | { prop: "maintainer", label: "ç»´æ¤äºº", minWidth: 100 }, |
| | | { prop: "maintainDate", label: "ç»´æ¤æ¥æ", minWidth: 100 }, |
| | | ]); |
| | | const selectedRows = ref([]); |
| | | const total = ref(0); |
| | | const pageNum = ref(1); |
| | | const pageSize = ref(10); |
| | | // æ¥è¯¢åæ° |
| | | const queryParams = reactive({ |
| | | searchText: "", |
| | |
| | | handleQuery(); |
| | | }; |
| | | // æ°å¢åºåº |
| | | const handleAdd = () => { |
| | | |
| | | const openDia = (type, row) => { |
| | | nextTick(() => { |
| | | formDia.value?.openDialog(type, row) |
| | | }) |
| | | }; |
| | | // å é¤åºåº |
| | | const handleDelete = () => { |
| | |
| | | const handleExport = () => { |
| | | |
| | | }; |
| | | // éæ©è¡ |
| | | const handleSelectionChange = (selection) => { |
| | | selectedRows.value = selection; |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |