xuwenqiang1992 %!s(int64=2) %!d(string=hai) anos
pai
achega
d8dc08f40e

+ 1 - 1
LICENSE

@@ -1,6 +1,6 @@
 MIT License
 
-Copyright (c) 2021-present 印刷ERP
+Copyright (c) 2021-present 飞猫跑腿
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

+ 3 - 3
index.html

@@ -6,10 +6,10 @@
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <meta
       name="description"
-      content="印刷erp"
+      content="飞猫跑腿"
     />
-    <meta name="keywords" content="印刷erp" />
-    <title>印刷ERP</title>
+    <meta name="keywords" content="飞猫跑腿" />
+    <title>飞猫跑腿</title>
   </head>
 
   <body>

+ 1 - 1
licenses/vue3-element-admin/LICENSE

@@ -1,6 +1,6 @@
 MIT License
 
-Copyright (c) 2021-present 印刷ERP
+Copyright (c) 2021-present 飞猫跑腿
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

+ 2 - 2
mock/dept.mock.ts

@@ -14,7 +14,7 @@ export default defineMock([
       data: [
         {
           value: 1,
-          label: "印刷ERP",
+          label: "飞猫跑腿",
           children: [
             {
               value: 2,
@@ -40,7 +40,7 @@ export default defineMock([
         {
           id: 1,
           parentId: 0,
-          name: "印刷ERP",
+          name: "飞猫跑腿",
           sort: 1,
           status: 1,
           children: [

+ 1 - 1
mock/user.mock.ts

@@ -60,7 +60,7 @@ export default defineMock([
               "https://oss.youlai.tech/youlai-boot/2023/05/16/811270ef31f548af9cffc026dfc3777b.gif",
             email: null,
             status: 1,
-            deptName: "印刷ERP",
+            deptName: "飞猫跑腿",
             roleNames: "系统管理员",
             createTime: "2019-10-10",
           },

+ 2 - 2
package.json

@@ -1,5 +1,5 @@
 {
-  "name": "印刷ERP",
+  "name": "飞猫跑腿",
   "version": "2.8.2",
   "private": true,
   "type": "module",
@@ -84,7 +84,7 @@
     "vue-tsc": "^1.8.27"
   },
   "repository": "git地址",
-  "author": "印刷ERP",
+  "author": "飞猫跑腿",
   "license": "MIT",
   "engines": {
     "node": ">=18.0.0"

+ 12 - 4
src/api/baseInfo/index.ts

@@ -1,6 +1,14 @@
 // @ts-nocheck
 import request from "@/utils/request";
 //禁用平台需求条件档案
+export function callDoc(data) {
+    return request({
+        url: "/doc/callDoc",
+        method: "post",
+        data: data,
+    });
+}
+//禁用平台需求条件档案
 export function voidPlatformRequire(data) {
   return request({
     url: "/platform/voidPlatformRequire",
@@ -28,7 +36,7 @@ export function addPlatformRequire(data) {
 export function getPlatformRequire(data) {
   return request({
     url: "/platform/getPlatformRequire",
-    method: "post",
+    method: "get",
     params: data,
   });
 }
@@ -36,7 +44,7 @@ export function getPlatformRequire(data) {
 export function queryPlatformRequireList(data) {
   return request({
     url: "/platform/queryPlatformRequireList",
-    method: "post",
+    method: "get",
     params: data,
   });
 }
@@ -68,7 +76,7 @@ export function addPlatformInfo(data) {
 export function getPlatformInfo(data) {
   return request({
     url: "/platform/getPlatformInfo",
-    method: "post",
+    method: "get",
     params: data,
   });
 }
@@ -76,7 +84,7 @@ export function getPlatformInfo(data) {
 export function queryPlatformList(data) {
   return request({
     url: "/platform/queryPlatformList",
-    method: "post",
+    method: "get",
     params: data,
   });
 }

+ 34 - 0
src/api/store/index.ts

@@ -0,0 +1,34 @@
+// @ts-nocheck
+import request from "@/utils/request";
+//生成门店平台授权地址
+export function generateStoreAuthUrl_Douyin(data) {
+    return request({
+        url: "/store/generateStoreAuthUrl_Douyin",
+        method: "post",
+        data: data,
+    });
+}
+//新增门店品牌
+export function addStoreBrand(data) {
+    return request({
+        url: "/store/addStoreBrand",
+        method: "post",
+        data: data,
+    });
+}
+//新增门店
+export function addStoreInfo(data) {
+    return request({
+        url: "/store/addStoreInfo",
+        method: "post",
+        data: data,
+    });
+}
+//获取门店
+export function queryViewStoreInfo(data) {
+    return request({
+        url: "/store/queryViewStoreInfo",
+        method: "get",
+        data: data,
+    });
+}

+ 51 - 0
src/api/system/index.ts

@@ -1,5 +1,56 @@
 // @ts-nocheck
 import request from "@/utils/request";
+// 禁用启用字典
+export function voidDictType(data) {
+  return request({
+    url: '/system/voidDictType',
+    method: 'post',
+    params: data
+  })
+}
+// 查询字典类型列表
+export function getDictTypeList(query) {
+  return request({
+    url: '/system/getDictTypeList',
+    method: 'post',
+    params: query
+  })
+}
+
+// 查询字典类型详细
+export function getDictTypeInfoById(data) {
+  return request({
+    url: '/system/getDictTypeInfoById',
+    method: 'post',
+    params: data
+  })
+}
+
+// 新增字典类型
+export function addDictType(data) {
+  return request({
+    url: '/system/addDictType',
+    method: 'post',
+    params: data
+  })
+}
+
+// 修改字典类型
+export function updateDictType(data) {
+  return request({
+    url: '/system/updateDictType',
+    method: 'post',
+    params: data
+  })
+}
+
+// 删除字典类型
+export function delType(dictId) {
+  return request({
+    url: '/system/dict/type/' + dictId,
+    method: 'delete'
+  })
+}
 //获取业务脚本列表
 export function invalidateScriptCache(data) {
   return request({

+ 3 - 3
src/permission.ts

@@ -11,13 +11,13 @@ NProgress.configure({ showSpinner: false }); // 进度条
 const permissionStore = usePermissionStoreHook();
 
 // 白名单路由
-document.title = '印刷ERP'
+document.title = '飞猫跑腿'
 const whiteList = ["/login","/test"];
-document.title = "印刷ERP"
+document.title = "飞猫跑腿"
 router.beforeEach(async (to, from, next) => {
   NProgress.start();
   if(to.meta.title){
-    document.title = `${to.meta.title}-印刷ERP`
+    document.title = `${to.meta.title}-飞猫跑腿`
   }
 
   const hasToken = getToken('Access-Token')

+ 2 - 2
src/settings.ts

@@ -1,5 +1,5 @@
 const defaultSettings: AppSettings = {
-  title: "印刷ERP",
+  title: "飞猫跑腿",
   version: "v2.8.2",
   showSettings: true,
   tagsView: true,
@@ -10,7 +10,7 @@ const defaultSettings: AppSettings = {
   size: "default",
   language: "zh-cn",
   themeColor: "#409EFF",
-  watermark: { enabled: false, content: "印刷ERP" },
+  watermark: { enabled: false, content: "飞猫跑腿" },
 };
 
 export default defaultSettings;

+ 32 - 35
src/views/baseInfo/platform/compt/childDialog.vue

@@ -31,13 +31,13 @@
             </el-form-item>
           </el-col>
           <el-col :span="24">
-            <el-form-item prop="requireList" label="平台接入需求">
-              <el-select v-model="formData.requireId" placeholder="请选择" style="width: 320px">
+            <el-form-item prop="requireList" label="平台编码">
+              <el-select v-model="formData.platformCode" placeholder="请选择" style="width: 320px">
                 <el-option
-                    v-for="type in typeOptions"
-                    :key="type.id"
-                    :label="type.requireName"
-                    :value="type.id">
+                    v-for="type in callModuleOptions"
+                    :key="type.code"
+                    :label="type.code"
+                    :value="type.code">
                 </el-option>
               </el-select>
             </el-form-item>
@@ -56,7 +56,7 @@
   </div>
 </template>
 <script setup lang="ts">
-import {getPlatformInfo,addPlatformInfo,updatePlatformInfo,queryPlatformRequireList} from "@/api/baseInfo";
+import {getPlatformInfo, addPlatformInfo, updatePlatformInfo, callDoc} from "@/api/baseInfo";
 import type {FormInstance} from 'element-plus'
 
 let dialogVisible = ref(false)
@@ -64,16 +64,15 @@ let dialogTitle = ref("")
 const formRef = ref<FormInstance>()
 const emit = defineEmits(['dialogChange'])
 const formData = reactive({
-  platformName: '',
+  platformCode: '',
   platformType: '',//平台类别 0订单平台/1配送平台,
-  requireList:null,
-  requireId:"",
-  id: ""
+  platformName:'',
+  id: "",
 })
 const rules = reactive({
   platformName: [{required: true, message: "请输入平台名称", trigger: "blur"}],
 });
-const typeOptions = ref<any>()
+let callModuleOptions = ref(new Array<any>())
 const optionsList = [
   {
     id: 1,
@@ -89,9 +88,6 @@ const optionsList = [
 function handleSubmit() {
   formRef.value.validate((valid: any) => {
     if (valid) {
-      console.log(formData.requireId);
-      formData.requireList =typeOptions.value.find(x=> x.id === formData.requireId)
-      console.log(formData.requireList);
       const itemId = formData.id;
       if (itemId) {
         //修改
@@ -126,7 +122,8 @@ function handleSubmit() {
 
 function getItemData(item) {
   const data = {
-    idPlatform: item
+    id: item,
+    withDetail: false,
   }
   getPlatformInfo(data).then(response => {
     if (response.httpCode == 200) {
@@ -136,28 +133,13 @@ function getItemData(item) {
   })
 }
 
-function getRequireList() {
-  const page = {
-    pageIndex: 1,
-    pageSize: 100,
-  };
-  const data = {
-    'params': JSON.stringify({
-      'voidFlag': 0
-    }),
-    "page": JSON.stringify(page)
-  }
-  queryPlatformRequireList(data).then((response) => {
-    if (response.httpCode == 200) {
-      const {data} = response
-      typeOptions.value = data
-    }
-  })
-}
+
 /**  重置表单 */
 function resetForm() {
   formRef.value.resetFields();
   formData.id = ''
+  formData.platformType = ''
+  formData.platformCode = ''
 }
 
 /**关闭弹窗 */
@@ -166,8 +148,23 @@ function closeDialog() {
   formRef.value.resetFields();
   formData.id = undefined;
 }
+function getCallDoc() {
+  const params = {
+    "businessMethod": "PlateForm_CodeList",
+    "params": "{}"
+  }
+  callDoc(params).then((response) => {
+    if (response.httpCode == 200) {
+      const { data } = response
+      callModuleOptions.value = JSON.parse(data)
+    }
+  })
+}
 onMounted(() => {
-  getRequireList()
+  if(callModuleOptions.value.length<=0){
+    getCallDoc()
+  }
+
 })
 defineExpose({
   dialogVisible,

+ 7 - 4
src/views/baseInfo/platform/index.vue

@@ -26,7 +26,7 @@
         highlight-current-row
         border
       >
-        <el-table-column label="操作" width="140">
+        <el-table-column label="操作" width="200">
           <template #default="{row}">
             <el-button link @click="openDialog(row.id)" type="primary">
               <i-ep-edit/>
@@ -34,6 +34,9 @@
             </el-button>
             <el-button v-if="row.voidFlag==0" link @click="handleDisable(row.id,1)" type="warning">禁用</el-button>
             <el-button v-if="row.voidFlag==1" type="success" link @click="handleDisable(row.id,0)">启用</el-button>
+            <el-button link @click="router.push({path: '/baseInfo/requireList/' + row.id,query: { 'id':row.id, 'platformName': row.platformName }})" type="primary">
+              平台条件
+            </el-button>
           </template>
         </el-table-column>
         <el-table-column
@@ -45,6 +48,7 @@
           </template>
         </el-table-column>
         <el-table-column prop="platformName" width="250" label="名称"/>
+        <el-table-column prop="platformCode" width="200" label="平台编号"/>
         <el-table-column
             prop="platformType"
             label="平台类别">
@@ -95,10 +99,10 @@
 import {queryPlatformList,voidPlatformInfo} from "@/api/baseInfo";
 import ChildDialog from './compt/ChildDialog.vue'
 import {useTable} from '@/hooks/useTable'
-
+import {useRouter} from "vue-router";
+const router = useRouter();
 let disableLock = ref('')
 const childDialog = ref<any>()
-
 //增加编辑
 function openDialog(item?: any) {
   childDialog.value.dialogVisible = true;
@@ -145,7 +149,6 @@ function handleDisable(id, status) {
 function dialogChange() {
   getTableData()
 }
-
 const queryForm = reactive({
   keyWord: '',
   voidFlag: 0

+ 8 - 9
src/views/baseInfo/requireList/compt/childDialog.vue

@@ -14,7 +14,7 @@
       >
         <el-row>
           <el-col :span="24">
-            <el-form-item prop="requireName" label="名称">
+            <el-form-item prop="requireName" label="条件名称">
               <el-input v-model="formData.requireName"/>
             </el-form-item>
           </el-col>
@@ -23,11 +23,6 @@
               <el-input v-model="formData.requireCode"/>
             </el-form-item>
           </el-col>
-          <el-col :span="24">
-            <el-form-item prop="requireList" label="取值的选择类型">
-              <el-input v-model="formData.valueType"/>
-            </el-form-item>
-          </el-col>
         </el-row>
 
       </el-form>
@@ -47,21 +42,23 @@ import type {FormInstance} from 'element-plus'
 
 let dialogVisible = ref(false)
 let dialogTitle = ref("")
+let intterId = ref('')
 const formRef = ref<FormInstance>()
 const emit = defineEmits(['dialogChange'])
 const formData = reactive({
   requireName: '',
   requireCode: '',//平台类别 0订单平台/1配送平台,
-  valueType:'',
+  idPlatform:'',
   id: ""
 })
 
 const rules = reactive({
-  requireName: [{required: true, message: "请输入名称", trigger: "blur"}],
+  requireName: [{required: true, message: "请输入条件名称", trigger: "blur"}],
 });
 function handleSubmit() {
   formRef.value.validate((valid: any) => {
     if (valid) {
+      formData.idPlatform = intterId.value
       const itemId = formData.id;
       if (itemId) {
         //修改
@@ -96,7 +93,8 @@ function handleSubmit() {
 
 function getItemData(item) {
   const data = {
-    idRequire: item
+    idRequire: item,
+    idPlatform: intterId.value
   }
   getPlatformRequire(data).then(response => {
     if (response.httpCode == 200) {
@@ -123,6 +121,7 @@ defineExpose({
   dialogVisible,
   dialogTitle,
   getItemData,
+  intterId,
   resetForm
 })
 </script>

+ 21 - 2
src/views/baseInfo/requireList/index.vue

@@ -46,7 +46,6 @@
         </el-table-column>
         <el-table-column prop="requireName" width="250" label="名称"/>
         <el-table-column prop="requireCode" width="300" label="唯一code"/>
-        <el-table-column prop="valueType" width="300" label="取值的选择类型"/>
         <el-table-column
           prop="status"
           label="状态">
@@ -85,13 +84,20 @@
 import {queryPlatformRequireList,voidPlatformRequire} from "@/api/baseInfo";
 import ChildDialog from './compt/ChildDialog.vue'
 import {useTable} from '@/hooks/useTable'
+import {useRoute} from "vue-router";
+const currentRoute = useRoute();
+import {useTagsViewStore} from "@/store/modules/tagsView";
+const tagsViewStore = useTagsViewStore();
 
 let disableLock = ref('')
+let idPlatform = ref('')
+let platformName = ref('')
 const childDialog = ref<any>()
 
 //增加编辑
 function openDialog(item?: any) {
   childDialog.value.dialogVisible = true;
+  childDialog.value.intterId = idPlatform.value;
   if (item) {
     childDialog.value.dialogTitle = "编辑";
     nextTick(() => {
@@ -116,10 +122,11 @@ function handleDisable(id, status) {
   }).then(() => {
     const postData = {
       id: id,
+      idPlatform: idPlatform.value,
       voidFlag: status
     }
     const params = {
-      "platformInfo": JSON.stringify(postData),
+      "platformRequire": JSON.stringify(postData),
     }
     voidPlatformRequire(params).then((response) => {
       if (response.httpCode == 200) {
@@ -138,8 +145,20 @@ function dialogChange() {
 
 const queryForm = reactive({
   keyWord: '',
+  idPlatform: '',
   voidFlag: 0
 })
+onMounted(() => {
+  const {query} = currentRoute
+  idPlatform.value = query.id
+  queryForm.idPlatform = query.id
+  platformName.value = query.platformName
+  const tempRoute = Object.assign({}, currentRoute)
+  var title = "平台条件"
+  const route = Object.assign({}, tempRoute, {title: `${title}-${query.platformName}`})
+  //@ts-ignore
+  tagsViewStore.updateVisitedView({...route});
+})
 watch(
   () => disableLock.value,
   (disableLock) => {

+ 1 - 1
src/views/dashboard/index.vue

@@ -10,7 +10,7 @@ function testThrottle() {
 </script>
 
 <template>
-  <div class="dashboard-container">印刷ERP
+  <div class="dashboard-container">飞猫跑腿
 <!--    <el-input v-model="input" placeholder="Please input" />-->
 <!--    <el-button v-throttle @click="testThrottle" type="primary">节流点击</el-button>-->
   </div>

+ 1 - 1
src/views/login/index.vue

@@ -79,7 +79,7 @@
         class="absolute bottom-1 text-[10px] text-center"
         v-show="useAppStore().device == 'desktop'"
     >
-      <p>Copyright © 2016 - 2024印刷ERP</p>
+      <p>Copyright © 2016 - 2024飞猫跑腿</p>
     </div>
   </div>
 </template>

+ 0 - 1
src/views/product/parseInfo/index.vue

@@ -138,7 +138,6 @@ function saveScriptTableItem() {
   })
 }
 function addRow() {
-  console.log(copyRow);
   var listItem = []
   Object.getOwnPropertyNames(JSON.parse(JSON.stringify(copyRow))).forEach(function(key) {
     let newObj = {

+ 78 - 0
src/views/store/storeList/compt/childDialog.vue

@@ -0,0 +1,78 @@
+<template>
+  <div class="dialog">
+    <el-dialog
+        v-model="dialogVisible"
+        :title="dialogTitle"
+        width="480"
+        @close="closeDialog()"
+    >
+      <el-form
+          ref="formRef"
+          :model="formData"
+          :rules="rules"
+          label-width="120px"
+      >
+        <el-row>
+          <el-col :span="24">
+            <el-form-item prop="clientName" label="客户名称">
+              <el-input v-model="formData.clientName"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+      </el-form>
+
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button v-throttle type="primary" @click="handleSubmit">确 定</el-button>
+          <el-button @click="closeDialog()">取 消</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+<script setup lang="ts">
+import {queryViewStoreInfo} from "@/api/store";
+import type {FormInstance} from 'element-plus'
+
+let dialogVisible = ref(false)
+let dialogTitle = ref("")
+const formRef = ref<FormInstance>()
+const emit = defineEmits(['dialogChange'])
+const formData = reactive({
+  clientName:'',
+  id: ""
+})
+const rules = reactive({
+  clientName: [{required: true, message: "请输入客户名称", trigger: "blur"}],
+});
+function handleSubmit() {
+
+}
+
+function getItemData(item) {
+
+}
+
+/**  重置表单 */
+function resetForm() {
+  formRef.value.resetFields();
+  formData.id = ''
+}
+
+/**关闭弹窗 */
+function closeDialog() {
+  dialogVisible.value = false
+  formRef.value.resetFields();
+  formData.id = undefined;
+}
+defineExpose({
+  dialogVisible,
+  dialogTitle,
+  getItemData,
+  resetForm
+})
+</script>
+<style scoped lang="scss">
+
+</style>

+ 155 - 0
src/views/store/storeList/index.vue

@@ -0,0 +1,155 @@
+<template>
+  <div class="app-container">
+    <div class="filter-container">
+      <el-input @keyup.enter="handleSearch" class="w200px mr5px" v-model="queryForm.keyWord" placeholder="关键字搜索"/>
+      <el-button type="primary" @click="handleSearch">
+        <i-ep-search/>
+        搜索
+      </el-button>
+      <div class="w100px ml10px" style="display: inline-block;">
+        <el-checkbox style="position: absolute;top: 11px" v-model="disableLock" label="已禁用"
+                     border></el-checkbox>
+      </div>
+      <el-button @click="openDialog()" color="#11a983">
+        <i-ep-plus/>
+        增加门店
+      </el-button>
+      <el-button type="primary" @click="refreshTableInfo">
+        <i-ep-refresh/>
+      </el-button>
+    </div>
+    <div class="table-con">
+      <el-table
+          :data="tableData"
+          highlight-current-row
+          border
+      >
+        <el-table-column label="操作" width="140">
+          <template #default="{row}">
+            <el-button link @click="openDialog(row.id)" type="primary">
+              <i-ep-edit/>
+              编辑
+            </el-button>
+            <el-button v-if="row.enable==1" link @click="handleDisable(row.id,0)" type="warning">禁用</el-button>
+            <el-button v-if="row.enable==0" type="success" link @click="handleDisable(row.id,1)">启用</el-button>
+          </template>
+        </el-table-column>
+        <el-table-column
+            type="index"
+            label="#"
+            width="50">
+          <template #default="scope">
+            <span>{{ scope.$index + 1 }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="storeName" width="150" label="门店名称">
+          <template #default="{row}">
+            {{row.storeInfo.storeName}}
+          </template>
+        </el-table-column>
+        <el-table-column prop="storeName" width="150" label="门店品牌">
+          <template #default="{row}">
+            {{row.storeInfo.brandName}}
+          </template>
+        </el-table-column>
+        <el-table-column prop="storeName" width="150" label="联系电话">
+          <template #default="{row}">
+            {{row.storeInfo.contractPhone}}
+          </template>
+        </el-table-column>
+        <el-table-column prop="storeName" show-overflow-tooltip width="350" label="地址">
+          <template #default="{row}">
+            {{row.storeInfo.storeProvince}}{{row.storeInfo.storeDistrict}}{{row.storeInfo.storeAddress}}
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="status"
+            label="状态">
+          <template #default="{row}">
+            <el-tag v-if="row.storeInfo.voidFlag==0" type="success">
+              正常
+            </el-tag>
+            <el-tag v-else="row.storeInfo.voidFlag==1" type="danger">
+              停用
+            </el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="createTime"
+            label="创建时间"
+            width="155">
+          <template #default="{row}">
+          <span v-if="row.createTime">
+           {{ $filters.getTime(row.createTime)}}
+          </span>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+<!--    <child-dialog ref="childDialog" @dialogChange="dialogChange"></child-dialog>-->
+  </div>
+</template>
+<script setup lang="ts">
+import {queryViewStoreInfo} from "@/api/store";
+// import ChildDialog from './compt/childDialog.vue'
+
+let disableLock = ref('')
+const childDialog = ref<any>()
+let tableData = ref([])
+//增加编辑
+function openDialog(item?: any) {
+  childDialog.value.dialogVisible = true;
+  if (item) {
+    childDialog.value.dialogTitle = "编辑";
+    nextTick(() => {
+      childDialog.value.getItemData(item)
+    });
+  } else {
+    nextTick(() => {
+      childDialog.value.dialogTitle = "增加";
+      childDialog.value.resetForm()
+    })
+
+
+  }
+}
+function getTableData() {
+  const params = {}
+  queryViewStoreInfo(params).then((response) => {
+    if (response.httpCode == 200) {
+      const { data } = response
+      console.log(data);
+      tableData.value = data
+    }
+  })
+}
+function handleSearch() {
+
+}
+function handleDisable(id, status) {
+
+}
+function refreshTableInfo() {
+
+}
+onMounted(() => {
+  getTableData();
+});
+const queryForm = reactive({
+  keyWord: '',
+  enable: 1
+})
+watch(
+    () => disableLock.value,
+    (disableLock) => {
+      if (disableLock) {
+        queryForm.enable = 0
+        getTableData()
+      } else {
+        queryForm.enable = 1
+        getTableData()
+      }
+    }
+);
+</script>
+

+ 11 - 0
src/views/store/storeSet/index.vue

@@ -0,0 +1,11 @@
+<script setup lang="ts">
+
+</script>
+
+<template>
+
+</template>
+
+<style scoped lang="scss">
+
+</style>

+ 121 - 0
src/views/system/dictType/compt/childDialog.vue

@@ -0,0 +1,121 @@
+<template>
+  <div class="dialog">
+    <el-dialog
+        v-model="dialogVisible"
+        :title="dialogTitle"
+        width="480px"
+        @close="closeDialog()"
+    >
+      <el-form
+          ref="formRef"
+          :model="formData"
+          :rules="rules"
+          label-width="120px"
+      >
+        <el-row>
+          <el-col :span="24">
+            <el-form-item prop="paperTypeName" label="分类名称">
+              <el-input v-model="formData.paperTypeName"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+      </el-form>
+
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button v-throttle type="primary" @click="handleSubmit">确 定</el-button>
+          <el-button @click="closeDialog()">取 消</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+<script setup lang="ts">
+import {addPaperInfoType, getPaperInfoType, updatePaperInfoType} from "@/api/baseInfo";
+import type {FormInstance} from 'element-plus'
+
+let dialogVisible = ref(false)
+let dialogTitle = ref("")
+const formRef = ref<FormInstance>()
+const emit = defineEmits(['dialogChange'])
+const formData = reactive({
+  paperTypeName: '',
+  id: ""
+})
+const rules = reactive({
+  paperTypeName: [{required: true, message: "请输入产品分类名称", trigger: "blur"}],
+});
+
+function handleSubmit() {
+  formRef.value.validate((valid: any) => {
+    if (valid) {
+      const itemId = formData.id;
+      if (itemId) {
+        //修改
+        const postData = JSON.stringify(formData)
+        const params = {
+          "infoType": postData,
+        }
+        updatePaperInfoType(params).then((response) => {
+          dialogVisible.value = false
+          if (response.httpCode == 200) {
+            emit('dialogChange');
+            ElMessage.success("操作成功");
+          }
+        })
+      } else {
+        //增加
+        const postData = JSON.stringify(formData)
+        const params = {
+          "infoType": postData,
+        }
+        addPaperInfoType(params).then((response) => {
+          dialogVisible.value = false
+          if (response.httpCode == 200) {
+            emit('dialogChange');
+            ElMessage.success("操作成功");
+          }
+        })
+      }
+    }
+  });
+}
+
+function getItemData(item) {
+  const data = {
+    id: item
+  }
+  getPaperInfoType(data).then(response => {
+    if (response.httpCode == 200) {
+      const data = response.data
+      Object.assign(formData, {...data});
+    }
+  })
+}
+
+/**  重置表单 */
+function resetForm() {
+  formRef.value.resetFields();
+  formData.id = ''
+}
+
+/**关闭弹窗 */
+function closeDialog() {
+  dialogVisible.value = false
+  formRef.value.resetFields();
+  formData.id = undefined;
+}
+
+defineExpose({
+  dialogVisible,
+  dialogTitle,
+  getItemData,
+  resetForm
+})
+</script>
+
+
+<style scoped lang="scss">
+
+</style>

+ 168 - 0
src/views/system/dictType/index.vue

@@ -0,0 +1,168 @@
+<template>
+  <div class="app-container">
+    <div class="filter-container">
+      <el-input @keyup.enter="handleSearch" class="w200px mr5px" v-model="queryForm.keyWord" placeholder="关键字搜索"/>
+      <el-button type="primary" @click="handleSearch">
+        <i-ep-search/>
+        搜索
+      </el-button>
+      <div class="w100px ml10px" style="display: inline-block;">
+        <el-checkbox style="position: absolute;top: 11px" v-model="disableLock" label="已禁用"
+                     border></el-checkbox>
+      </div>
+      <el-button @click="openDialog()" color="#11a983">
+        <i-ep-plus/>
+        增加纸张分类
+      </el-button>
+      <el-button type="primary" @click="refreshTableInfo">
+        <i-ep-refresh/>
+      </el-button>
+    </div>
+    <div class="table-con">
+      <el-table
+        :max-height="tableHeight"
+        v-loading="loading"
+        :data="tableData"
+        highlight-current-row
+        border
+      >
+        <el-table-column label="操作" width="140">
+          <template #default="{row}">
+            <el-button link @click="openDialog(row.id)" type="primary">
+              <i-ep-edit/>
+              编辑
+            </el-button>
+            <el-button v-if="row.voidFlag==0" link @click="handleDisable(row.id,1)" type="warning">禁用</el-button>
+            <el-button v-if="row.voidFlag==1" type="success" link @click="handleDisable(row.id,0)">启用</el-button>
+          </template>
+        </el-table-column>
+        <el-table-column
+          type="index"
+          label="#"
+          width="50">
+          <template #default="scope">
+            <span>{{ scope.$index + 1 }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="paperName" width="250" label="分类名称"/>
+        <el-table-column prop="paperTypeName" width="300" label="纸张类型名称"/>
+        <el-table-column
+          prop="status"
+          label="状态">
+          <template #default="{row}">
+            <el-tag v-if="row.voidFlag==0" type="success">
+              正常
+            </el-tag>
+            <el-tag v-else="row.voidFlag==1" type="danger">
+              停用
+            </el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="createTime"
+          label="创建时间"
+          width="155">
+          <template #default="{row}">
+          <span v-if="row.createTime">
+           {{ $filters.getTime(row.createTime)}}
+          </span>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+        v-if="total > 0"
+        v-model:total="total"
+        v-model:page="queryPage.pageIndex"
+        v-model:limit="queryPage.pageSize"
+        @pagination="getTableData"
+      />
+    </div>
+    <child-dialog ref="childDialog" @dialogChange="dialogChange"></child-dialog>
+  </div>
+</template>
+<script setup lang="ts">
+import {getDictTypeList, voidDictType} from "@/api/system";
+import ChildDialog from './compt/ChildDialog.vue'
+import {useRouter} from "vue-router";
+const router = useRouter();
+import {useTable} from '@/hooks/useTable'
+
+let disableLock = ref('')
+const childDialog = ref<any>()
+
+//增加编辑
+function openDialog(item?: any) {
+  childDialog.value.dialogVisible = true;
+  if (item) {
+    childDialog.value.dialogTitle = "编辑";
+    nextTick(() => {
+      childDialog.value.getItemData(item)
+    });
+  } else {
+    nextTick(() => {
+      childDialog.value.dialogTitle = "增加";
+      childDialog.value.resetForm()
+    })
+
+
+  }
+}
+
+//禁用删除
+function handleDisable(id, status) {
+  ElMessageBox.confirm("确认操作?", "警告", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  }).then(() => {
+    const postData = {
+      id: id,
+      voidFlag: status
+    }
+    const params = {
+      "dictType": JSON.stringify(postData),
+    }
+      voidDictType(params).then((response) => {
+      if (response.httpCode == 200) {
+        ElMessage.success("操作成功");
+        getTableData();
+      }
+
+    })
+  })
+}
+
+//修改成功后传递事件
+function dialogChange() {
+  getTableData()
+}
+
+const queryForm = reactive({
+  keyWord: '',
+  voidFlag: 0
+})
+watch(
+  () => disableLock.value,
+  (disableLock) => {
+    if (disableLock) {
+      queryForm.voidFlag = 1
+      getTableData()
+    } else {
+      queryForm.voidFlag = 0
+      getTableData()
+    }
+  }
+);
+const {
+  tableData,
+  queryPage,
+  total,
+  loading,
+  getTableData,
+  tableHeight,
+  handleSearch,//搜索
+  refreshTableInfo,//刷新
+} = useTable(getDictTypeList, queryForm);
+</script>
+
+

+ 1 - 1
vite.config.ts

@@ -54,7 +54,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
           // // 线上接口地址
           // target: "http://vapi.youlai.tech",
           // 开发接口地址
-          target: "http://192.168.1.44:52105",
+          target: "http://192.168.1.24:12991",//24涛哥//44春禾//25小梁
           rewrite: (path) =>
             path.replace(new RegExp("^" + env.VITE_APP_BASE_API), ""),
         },