123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380 |
- <template>
- <el-dialog
- :title="title"
- :center="true"
- align="left"
- top="5vh"
- width="1040px"
- @close="closeModel"
- :close-on-click-modal="false"
- :visible.sync="showModelThis"
- v-loading="loading"
- element-loading-text="拼命加载中"
- element-loading-spinner="el-icon-loading"
- element-loading-background="rgba(0, 0, 0, 0.8)"
- >
- <el-card>
- <el-row :gutter="10">
- <el-col :span="24">
- <ex-table
- v-loading="false"
- :table="table"
- :data="tableData"
- :columns="columns"
- :page="pageInfo"
- :size="size"
- @page-curr-change="handlePageChange"
- @page-size-change="handleSizeChange"
- @screen-reset="
- pageInfo.curr = 1;
- parmValue.page = 1;
- searchList();
- "
- @screen-submit="
- pageInfo.curr = 1;
- parmValue.page = 1;
- searchList();
- "
- >
- <template #table-header="{}">
- <div style="width: 100%; height: 40px"></div>
- </template>
- </ex-table>
- </el-col>
- <el-col :span="24" style="text-align: right; margin-top: 10px">
- <el-button type="primary" @click="save">保 存 </el-button>
- <el-button type="warning" @click="submitForm">123 </el-button>
- </el-col>
- </el-row>
- </el-card>
- </el-dialog>
- </template>
- <script>
- import asyncRequest from "@/apis/service/stock/newApply";
- import resToken from "@/mixins/resToken";
- import {
- isnumber,
- isMobile,
- validEmail,
- isAlphanumeric,
- isChinese,
- isEmoticon,
- validAlphabets,
- } from "@/utils/validate";
- export default {
- name: "newApply",
- props: ["showModel", "id", "isDetail", "sitem"],
- mixins: [resToken],
- data() {
- const validateusername = (rule, value, callback) => {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- };
- const validatename = (rule, value, callback) => {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- };
- const validatemobile = (rule, value, callback) => {
-
-
-
-
-
-
-
-
-
- };
- const validateEmail = (rule, value, callback) => {
-
-
-
-
-
-
-
-
-
- };
- return {
- loading: true,
- showModel: false,
- isDetail: false,
- modelId: 0,
- tableData: [],
-
-
- tableData: [],
-
- table: {
- stripe: true,
- border: true,
- _defaultHeader_: ["setcol"],
- },
-
- pageInfo: {
- size: 15,
- curr: 1,
- total: 0,
- },
-
- columns: [
- {
- prop: "nickname",
- label: "商品编号",
- },
- {
- prop: "role_name",
- label: "商品名称",
- },
- {
- prop: "mobile",
- label: "数量",
- },
- ],
- loading: false,
- title: "添加账号",
- showModelThis: this.showModel,
- ruleForm: {
- username: "",
- name: "",
- mobile: "",
- email: "",
- role_id: "",
- status: "1",
- item: [],
- },
- rulesThis: this.rules,
- rules: {
- name: [
- {
- required: true,
- validator: validatename,
- trigger: "blur",
- },
- ],
- username: [
- {
- required: true,
- validator: validateusername,
- trigger: "blur",
- },
- ],
- mobile: [
- {
- required: true,
- validator: validatemobile,
- trigger: "blur",
- },
- ],
- email: [
- {
- required: false,
- validator: validateEmail,
- trigger: "blur",
- },
- ],
- role_id: [
- {
- required: true,
- message: "请选择角色",
- trigger: "change",
- },
- ],
- item: [
- {
- type: "array",
- required: true,
- message: "请选择所在部门",
- trigger: "change",
- },
- ],
- status: [
- {
- required: true,
- message: "请选择状态",
- trigger: "change",
- },
- ],
- },
- };
- },
- watch: {
- showModel: function (val) {
- this.showModelThis = val;
- if (val) {
- this.initForm();
- }
- },
- showModelThis(val) {
- if (!val) {
- this.$emit("cancel");
- }
- },
- },
- methods: {
- closeModel() {
- console.log("closeModel!!");
- },
- async initForm() {
- this.loading = true;
- this.title = "可调拨的商品";
- {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- this.loading = false;
- },
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- async initData() {
-
-
-
-
-
-
-
-
-
- },
- async resetForm(sitem) {
-
- await this.$nextTick(() => {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- });
- },
- save() {
- console.log("点击了保存");
- },
- async submitForm() {
- console.log("点击了保存并发起流程");
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .newApply {
- }
- </style>
-
|