| 1 |
- {"remainingRequest":"C:\\Users\\Administrator\\Desktop\\crmeb5.0\\template\\admin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\Administrator\\Desktop\\crmeb5.0\\template\\admin\\src\\pages\\setting\\freight\\index.vue?vue&type=style&index=0&id=00ec1e33&lang=scss&scoped=true","dependencies":[{"path":"C:\\Users\\Administrator\\Desktop\\crmeb5.0\\template\\admin\\src\\pages\\setting\\freight\\index.vue","mtime":1761185180177},{"path":"C:\\Users\\Administrator\\Desktop\\crmeb5.0\\template\\admin\\node_modules\\css-loader\\index.js","mtime":499162500000},{"path":"C:\\Users\\Administrator\\Desktop\\crmeb5.0\\template\\admin\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":499162500000},{"path":"C:\\Users\\Administrator\\Desktop\\crmeb5.0\\template\\admin\\node_modules\\postcss-loader\\src\\index.js","mtime":499162500000},{"path":"C:\\Users\\Administrator\\Desktop\\crmeb5.0\\template\\admin\\node_modules\\sass-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\Administrator\\Desktop\\crmeb5.0\\template\\admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\Administrator\\Desktop\\crmeb5.0\\template\\admin\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:DQoudGFiQm94X2ltZyB7DQogIHdpZHRoOiAzNnB4Ow0KICBoZWlnaHQ6IDM2cHg7DQogIGJvcmRlci1yYWRpdXM6IDRweDsNCiAgY3Vyc29yOiBwb2ludGVyOw0KICBpbWcgew0KICAgIHdpZHRoOiAxMDAlOw0KICAgIGhlaWdodDogMTAwJTsNCiAgfQ0KfQ0K"},{"version":3,"sources":["index.vue"],"names":[],"mappings":";AAqQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"index.vue","sourceRoot":"src/pages/setting/freight","sourcesContent":["<template>\r\n <div>\r\n <el-card :bordered=\"false\" shadow=\"never\" class=\"ivu-mb-16\" :body-style=\"{ padding: 0 }\">\r\n <div class=\"padding-add\">\r\n <el-form\r\n ref=\"levelFrom\"\r\n :model=\"levelFrom\"\r\n :label-width=\"labelWidth\"\r\n label-position=\"right\"\r\n @submit.native.prevent\r\n inline\r\n >\r\n <el-form-item label=\"是否显示:\">\r\n <el-select\r\n v-model=\"levelFrom.is_show\"\r\n placeholder=\"请选择\"\r\n clearable\r\n @change=\"userSearchs\"\r\n class=\"form_content_width\"\r\n >\r\n <el-option value=\"\" label=\"全部\"></el-option>\r\n <el-option value=\"1\" label=\"显示\"></el-option>\r\n <el-option value=\"0\" label=\"不显示\"></el-option>\r\n </el-select>\r\n </el-form-item>\r\n <el-form-item label=\"搜索:\" label-for=\"keyword\">\r\n <el-input class=\"form_content_width\" v-model=\"levelFrom.keyword\" placeholder=\"请输入物流公司名称或者编码\" />\r\n </el-form-item>\r\n <el-form-item>\r\n <el-button type=\"primary\" v-db-click @click=\"userSearchs\">查询</el-button>\r\n </el-form-item>\r\n </el-form>\r\n </div>\r\n </el-card>\r\n <el-card :bordered=\"false\" shadow=\"never\" class=\"ivu-mt\">\r\n <el-button type=\"primary\" v-db-click @click=\"syncExpress\">同步物流公司</el-button>\r\n <el-table\r\n :data=\"levelLists\"\r\n ref=\"table\"\r\n class=\"mt14\"\r\n v-loading=\"loading\"\r\n no-userFrom-text=\"暂无数据\"\r\n no-filtered-userFrom-text=\"暂无筛选结果\"\r\n >\r\n <el-table-column label=\"ID\" width=\"80\">\r\n <template slot-scope=\"scope\">\r\n <span>{{ scope.row.id }}</span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"物流公司名称\" min-width=\"100\">\r\n <template slot-scope=\"scope\">\r\n <span>{{ scope.row.name }}</span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"编码\" min-width=\"100\">\r\n <template slot-scope=\"scope\">\r\n <span>{{ scope.row.code }}</span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"排序\" min-width=\"100\">\r\n <template slot-scope=\"scope\">\r\n <span>{{ scope.row.sort }}</span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"是否显示\" min-width=\"100\">\r\n <template slot-scope=\"scope\">\r\n <el-switch\r\n :active-value=\"1\"\r\n :inactive-value=\"0\"\r\n v-model=\"scope.row.is_show\"\r\n :value=\"scope.row.is_show\"\r\n @change=\"onchangeIsShow(scope.row)\"\r\n size=\"large\"\r\n >\r\n </el-switch>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"操作\" fixed=\"right\" width=\"80\">\r\n <template slot-scope=\"scope\">\r\n <a v-db-click @click=\"edit(scope.row)\">编辑</a>\r\n </template>\r\n </el-table-column>\r\n </el-table>\r\n <div class=\"acea-row row-right page\">\r\n <pagination\r\n v-if=\"total\"\r\n :total=\"total\"\r\n :page.sync=\"levelFrom.page\"\r\n :limit.sync=\"levelFrom.limit\"\r\n @pagination=\"getList\"\r\n />\r\n </div>\r\n </el-card>\r\n </div>\r\n</template>\r\n<script>\r\nimport { mapState } from 'vuex';\r\nimport {\r\n freightCreateApi,\r\n freightListApi,\r\n freightEditApi,\r\n freightStatusApi,\r\n freightSyncExpressApi,\r\n} from '@/api/setting';\r\nexport default {\r\n name: 'user_level',\r\n data() {\r\n return {\r\n grid: {\r\n xl: 7,\r\n lg: 7,\r\n md: 12,\r\n sm: 24,\r\n xs: 24,\r\n },\r\n loading: false,\r\n columns1: [\r\n {\r\n title: 'ID',\r\n key: 'id',\r\n width: 80,\r\n },\r\n {\r\n title: '物流公司名称',\r\n key: 'name',\r\n minWidth: 100,\r\n },\r\n {\r\n title: '编码',\r\n key: 'code',\r\n minWidth: 120,\r\n },\r\n {\r\n title: '排序',\r\n key: 'sort',\r\n sortable: true,\r\n minWidth: 100,\r\n },\r\n {\r\n title: '是否显示',\r\n slot: 'is_shows',\r\n minWidth: 120,\r\n },\r\n {\r\n title: '操作',\r\n slot: 'action',\r\n fixed: 'right',\r\n minWidth: 120,\r\n },\r\n ],\r\n levelFrom: {\r\n keyword: '',\r\n is_show: '',\r\n page: 1,\r\n limit: 20,\r\n },\r\n levelLists: [],\r\n total: 0,\r\n FromData: null,\r\n };\r\n },\r\n created() {\r\n this.getList();\r\n },\r\n computed: {\r\n ...mapState('media', ['isMobile']),\r\n labelWidth() {\r\n return this.isMobile ? undefined : '80px';\r\n },\r\n labelPosition() {\r\n return this.isMobile ? 'top' : 'right';\r\n },\r\n },\r\n methods: {\r\n // 删除\r\n del(row, tit, num) {\r\n let delfromData = {\r\n title: tit,\r\n num: num,\r\n url: `freight/express/${row.id}`,\r\n method: 'DELETE',\r\n ids: '',\r\n };\r\n this.$modalSure(delfromData)\r\n .then((res) => {\r\n this.$message.success(res.msg);\r\n this.levelLists.splice(num, 1);\r\n })\r\n .catch((res) => {\r\n this.$message.error(res.msg);\r\n });\r\n },\r\n // 修改是否显示\r\n onchangeIsShow(row) {\r\n let data = {\r\n id: row.id,\r\n status: row.is_show,\r\n };\r\n freightStatusApi(data)\r\n .then(async (res) => {\r\n this.$message.success(res.msg);\r\n })\r\n .catch((res) => {\r\n this.$message.error(res.msg);\r\n });\r\n },\r\n // 等级列表\r\n getList() {\r\n this.loading = true;\r\n freightListApi(this.levelFrom)\r\n .then(async (res) => {\r\n let data = res.data;\r\n this.levelLists = data.list;\r\n this.total = data.count;\r\n this.loading = false;\r\n })\r\n .catch((res) => {\r\n this.loading = false;\r\n this.$message.error(res.msg);\r\n });\r\n },\r\n // 添加\r\n add() {\r\n this.$modalForm(freightCreateApi()).then(() => this.getList());\r\n // freightCreateApi().then(async res => {\r\n // this.FromData = res.data;\r\n // this.$refs.edits.modals = true;\r\n // }).catch(res => {\r\n // this.$message.error(res.msg);\r\n // })\r\n },\r\n // 编辑\r\n edit(row) {\r\n this.$modalForm(freightEditApi(row.id)).then(() => this.getList());\r\n // freightEditApi(row.id).then(async res => {\r\n // this.FromData = res.data;\r\n // this.$refs.edits.modals = true;\r\n // }).catch(res => {\r\n // this.$message.error(res.msg);\r\n // })\r\n },\r\n // 表格搜索\r\n userSearchs() {\r\n this.levelFrom.page = 1;\r\n this.getList();\r\n },\r\n syncExpress() {\r\n freightSyncExpressApi()\r\n .then(async (res) => {\r\n this.$message.success(res.msg);\r\n this.getList();\r\n })\r\n .catch((res) => {\r\n this.$message.error(res.msg);\r\n });\r\n },\r\n },\r\n};\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.tabBox_img {\r\n width: 36px;\r\n height: 36px;\r\n border-radius: 4px;\r\n cursor: pointer;\r\n img {\r\n width: 100%;\r\n height: 100%;\r\n }\r\n}\r\n</style>\r\n"]}]}
|