{"remainingRequest":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/mer.ws.baibaodun.com.cn/src/views/systemSetting/deliverGoods/freightSet/index.vue?vue&type=script&lang=js","dependencies":[{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/src/views/systemSetting/deliverGoods/freightSet/index.vue","mtime":1701742078558},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n// +----------------------------------------------------------------------\n// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]\n// +----------------------------------------------------------------------\n// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.\n// +----------------------------------------------------------------------\n// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权\n// +----------------------------------------------------------------------\n// | Author: CRMEB Team <admin@crmeb.com>\n// +----------------------------------------------------------------------\n\nimport CreatTemplates from './creatTemplates';\nimport * as logistics from '@/api/logistics.js';\nimport { checkPermi } from '@/utils/permission'; // 权限判断函数\nexport default {\n  name: 'ShippingTemplates',\n  filters: {\n    statusFilter(status) {\n      const statusMap = {\n        0: '全国包邮',\n        1: '部分包邮',\n        2: '自定义',\n      };\n      return statusMap[status];\n    },\n    typeFilter(status) {\n      const statusMap = {\n        0: '无',\n        1: '按件数',\n        2: '按重量',\n        3: '按体积',\n      };\n      return statusMap[status];\n    },\n  },\n  components: { CreatTemplates },\n  data() {\n    return {\n      isShow: false,\n      dialogVisible: false,\n      form: {\n        keywords: '',\n      },\n      tableData: '',\n      page: 1,\n      limit: 20,\n      loading: false,\n    };\n  },\n  created() {\n    if (checkPermi(['merchant:shipping:templates:list'])) this.getDataList();\n  },\n  methods: {\n    checkPermi,\n    // 添加\n    handleSubmit() {\n      this.$refs.addTemplates.dialogVisible = true;\n      if (!localStorage.getItem('cityList')) this.$refs.addTemplates.getCityList();\n      this.$refs.addTemplates.changType(0);\n    },\n    handleSearch() {\n      this.page = 1;\n      this.getDataList();\n    },\n    // 分页\n    pageChange(e) {\n      this.page = e;\n      this.getDataList();\n    },\n    handleSizeChange(e) {\n      this.limit = e;\n      this.getDataList();\n    },\n    // 数据列表\n    getDataList() {\n      this.loading = true;\n      logistics\n        .shippingTemplatesList({\n          keywords: encodeURIComponent(this.form.keywords),\n          page: this.page,\n          limit: this.limit,\n        })\n        .then((res) => {\n          this.loading = false;\n          this.tableData = res;\n        });\n    },\n    // 编辑\n    bindEdit(item) {\n      if (!localStorage.getItem('cityList')) this.$refs.addTemplates.getCityList();\n      this.$refs.addTemplates.getInfo(item.id, item.appoint);\n      this.$refs.addTemplates.changType(1);\n    },\n    // 删除\n    bindDelete(item) {\n      this.$modalSure().then(() => {\n        logistics.shippingDetete({ id: item.id }).then((res) => {\n          this.$message.success('删除成功');\n          this.$store.commit('product/SET_ShippingTemplates', []);\n          this.getDataList();\n        });\n      });\n      // logistics.shippingDetete()\n    },\n    getList() {\n      this.getDataList();\n    },\n  },\n};\n",null]}