瀏覽代碼

修改客户明细表文件位置

阿伏兔 4 年之前
父節點
當前提交
c95089b7bf
共有 2 個文件被更改,包括 254 次插入254 次删除
  1. 7 7
      src/api/basicdata/customerDetails/corps.js
  2. 247 247
      src/views/basicdata/corps/index.vue

+ 7 - 7
src/api/basicdata/customerinformation/corps.js → src/api/basicdata/customerDetails/corps.js

@@ -3,7 +3,7 @@ import request from '@/utils/request'
 // 查询客户详情列表
 export function listCorps(query) {
   return request({
-    url: '/basicdata/customerinformation/corps/list',
+    url: '/basicdata/customerDetails/corps/list',
     method: 'get',
     params: query
   })
@@ -12,7 +12,7 @@ export function listCorps(query) {
 // 查询客户详情详细
 export function getCorps(fId) {
   return request({
-    url: '/basicdata/customerinformation/corps/' + fId,
+    url: '/basicdata/customerDetails/corps/' + fId,
     method: 'get'
   })
 }
@@ -20,7 +20,7 @@ export function getCorps(fId) {
 // 新增客户详情
 export function addCorps(data) {
   return request({
-    url: '/basicdata/customerinformation/corps',
+    url: '/basicdata/customerDetails/corps',
     method: 'post',
     data: data
   })
@@ -29,7 +29,7 @@ export function addCorps(data) {
 // 修改客户详情
 export function updateCorps(data) {
   return request({
-    url: '/basicdata/customerinformation/corps',
+    url: '/basicdata/customerDetails/corps',
     method: 'put',
     data: data
   })
@@ -38,7 +38,7 @@ export function updateCorps(data) {
 // 删除客户详情
 export function delCorps(fId) {
   return request({
-    url: '/basicdata/customerinformation/corps/' + fId,
+    url: '/basicdata/customerDetails/corps/' + fId,
     method: 'delete'
   })
 }
@@ -46,8 +46,8 @@ export function delCorps(fId) {
 // 导出客户详情
 export function exportCorps(query) {
   return request({
-    url: '/basicdata/customerinformation/corps/export',
+    url: '/basicdata/customerDetails/corps/export',
     method: 'get',
     params: query
   })
-}
+}

+ 247 - 247
src/views/basicdata/customerinformation/corps/index.vue → src/views/basicdata/corps/index.vue

@@ -20,19 +20,19 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="简称" prop="fCname">
+      <el-form-item label="名称" prop="fName">
         <el-input
-          v-model="queryParams.fCname"
-          placeholder="请输入称"
+          v-model="queryParams.fName"
+          placeholder="请输入称"
           clearable
           size="small"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="名称" prop="fName">
+      <el-form-item label="简称" prop="fCname">
         <el-input
-          v-model="queryParams.fName"
-          placeholder="请输入称"
+          v-model="queryParams.fCname"
+          placeholder="请输入称"
           clearable
           size="small"
           @keyup.enter.native="handleQuery"
@@ -157,18 +157,18 @@
       </el-form-item>
       <el-form-item label="合同起" prop="fContractb">
         <el-date-picker clearable size="small" style="width: 200px"
-                        v-model="queryParams.fContractb"
-                        type="date"
-                        value-format="yyyy-MM-dd"
-                        placeholder="选择合同起">
+          v-model="queryParams.fContractb"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择合同起">
         </el-date-picker>
       </el-form-item>
       <el-form-item label="合同至" prop="fContracte">
         <el-date-picker clearable size="small" style="width: 200px"
-                        v-model="queryParams.fContracte"
-                        type="date"
-                        value-format="yyyy-MM-dd"
-                        placeholder="选择合同至">
+          v-model="queryParams.fContracte"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择合同至">
         </el-date-picker>
       </el-form-item>
       <el-form-item label="税号" prop="fTax">
@@ -252,7 +252,7 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-hasPermi="['basicdata/customerinformation:corps:add']"
+          v-hasPermi="['basicdata/customerDetails:corps:add']"
         >新增</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -262,7 +262,7 @@
           size="mini"
           :disabled="single"
           @click="handleUpdate"
-          v-hasPermi="['basicdata/customerinformation:corps:edit']"
+          v-hasPermi="['basicdata/customerDetails:corps:edit']"
         >修改</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -272,7 +272,7 @@
           size="mini"
           :disabled="multiple"
           @click="handleDelete"
-          v-hasPermi="['basicdata/customerinformation:corps:remove']"
+          v-hasPermi="['basicdata/customerDetails:corps:remove']"
         >删除</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -281,10 +281,10 @@
           icon="el-icon-download"
           size="mini"
           @click="handleExport"
-          v-hasPermi="['basicdata/customerinformation:corps:export']"
+          v-hasPermi="['basicdata/customerDetails:corps:export']"
         >导出</el-button>
       </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="corpsList" @selection-change="handleSelectionChange">
@@ -292,8 +292,8 @@
       <el-table-column label="状态默认 T ,正常T 停用F 下拉选择" align="center" prop="fId" />
       <el-table-column label="客户类别" align="center" prop="fTypeid" :formatter="fTypeidFormat" />
       <el-table-column label="编号" align="center" prop="fNo" />
-      <el-table-column label="简称" align="center" prop="fCname" />
       <el-table-column label="名称" align="center" prop="fName" />
+      <el-table-column label="简称" align="center" prop="fCname" />
       <el-table-column label="英文名称" align="center" prop="fEname" />
       <el-table-column label="电话" align="center" prop="fTel" />
       <el-table-column label="传真" align="center" prop="fFax" />
@@ -333,14 +333,14 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-hasPermi="['basicdata/customerinformation:corps:edit']"
+            v-hasPermi="['basicdata/customerDetails:corps:edit']"
           >修改</el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-            v-hasPermi="['basicdata/customerinformation:corps:remove']"
+            v-hasPermi="['basicdata/customerDetails:corps:remove']"
           >删除</el-button>
         </template>
       </el-table-column>
@@ -370,12 +370,12 @@
         <el-form-item label="编号" prop="fNo">
           <el-input v-model="form.fNo" placeholder="请输入编号" />
         </el-form-item>
-        <el-form-item label="简称" prop="fCname">
-          <el-input v-model="form.fCname" placeholder="请输入简称" />
-        </el-form-item>
         <el-form-item label="名称" prop="fName">
           <el-input v-model="form.fName" placeholder="请输入名称" />
         </el-form-item>
+        <el-form-item label="简称" prop="fCname">
+          <el-input v-model="form.fCname" placeholder="请输入简称" />
+        </el-form-item>
         <el-form-item label="英文名称" prop="fEname">
           <el-input v-model="form.fEname" placeholder="请输入英文名称" />
         </el-form-item>
@@ -417,18 +417,18 @@
         </el-form-item>
         <el-form-item label="合同起" prop="fContractb">
           <el-date-picker clearable size="small" style="width: 200px"
-                          v-model="form.fContractb"
-                          type="date"
-                          value-format="yyyy-MM-dd"
-                          placeholder="选择合同起">
+            v-model="form.fContractb"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择合同起">
           </el-date-picker>
         </el-form-item>
         <el-form-item label="合同至" prop="fContracte">
           <el-date-picker clearable size="small" style="width: 200px"
-                          v-model="form.fContracte"
-                          type="date"
-                          value-format="yyyy-MM-dd"
-                          placeholder="选择合同至">
+            v-model="form.fContracte"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择合同至">
           </el-date-picker>
         </el-form-item>
         <el-form-item label="税号" prop="fTax">
@@ -473,221 +473,221 @@
 </template>
 
 <script>
-  import { listCorps, getCorps, delCorps, addCorps, updateCorps, exportCorps } from "@/api/basicdata/customerinformation/corps";
+import { listCorps, getCorps, delCorps, addCorps, updateCorps, exportCorps } from "@/api/basicdata/customerDetails/corps";
 
-  export default {
-    name: "Corps",
-    components: {
+export default {
+  name: "Corps",
+  components: {
+  },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 客户详情表格数据
+      corpsList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 客户类别字典
+      fTypeidOptions: [],
+      // 结算表票结、月结字典
+      fStltypeidOptions: [],
+      // 删除状态字典
+      delFlagOptions: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        fTypeid: null,
+        fNo: null,
+        fName: null,
+        fCname: null,
+        fEname: null,
+        fTel: null,
+        fFax: null,
+        fEmail: null,
+        fManage: null,
+        fAddr: null,
+        fEaddr: null,
+        fScale: null,
+        fProvince: null,
+        fCity: null,
+        fStltypeid: null,
+        fStldays: null,
+        fContractno: null,
+        fContractb: null,
+        fContracte: null,
+        fTax: null,
+        fInvtel: null,
+        fInvaddr: null,
+        fBankno: null,
+        fBankname: null,
+        fUbankno: null,
+        fUbankname: null,
+        fStatus: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        fNo: [
+          { required: true, message: "编号不能为空", trigger: "blur" }
+        ],
+        fName: [
+          { required: true, message: "名称不能为空", trigger: "blur" }
+        ],
+        fStatus: [
+          { required: true, message: "状态默认 T ,正常T 停用F 下拉选择不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+    this.getDicts("data_customer_category").then(response => {
+      this.fTypeidOptions = response.data;
+    });
+    this.getDicts("data_stltype_type").then(response => {
+      this.fStltypeidOptions = response.data;
+    });
+    this.getDicts("data_delete_state").then(response => {
+      this.delFlagOptions = response.data;
+    });
+  },
+  methods: {
+    /** 查询客户详情列表 */
+    getList() {
+      this.loading = true;
+      listCorps(this.queryParams).then(response => {
+        this.corpsList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
     },
-    data() {
-      return {
-        // 遮罩层
-        loading: true,
-        // 选中数组
-        ids: [],
-        // 非单个禁用
-        single: true,
-        // 非多个禁用
-        multiple: true,
-        // 显示搜索条件
-        showSearch: true,
-        // 总条数
-        total: 0,
-        // 客户详情表格数据
-        corpsList: [],
-        // 弹出层标题
-        title: "",
-        // 是否显示弹出层
-        open: false,
-        // 客户类别字典
-        fTypeidOptions: [],
-        // 结算表票结、月结字典
-        fStltypeidOptions: [],
-        // 删除状态字典
-        delFlagOptions: [],
-        // 查询参数
-        queryParams: {
-          pageNum: 1,
-          pageSize: 10,
-          fTypeid: null,
-          fNo: null,
-          fCname: null,
-          fName: null,
-          fEname: null,
-          fTel: null,
-          fFax: null,
-          fEmail: null,
-          fManage: null,
-          fAddr: null,
-          fEaddr: null,
-          fScale: null,
-          fProvince: null,
-          fCity: null,
-          fStltypeid: null,
-          fStldays: null,
-          fContractno: null,
-          fContractb: null,
-          fContracte: null,
-          fTax: null,
-          fInvtel: null,
-          fInvaddr: null,
-          fBankno: null,
-          fBankname: null,
-          fUbankno: null,
-          fUbankname: null,
-          fStatus: null,
-        },
-        // 表单参数
-        form: {},
-        // 表单校验
-        rules: {
-          fNo: [
-            { required: true, message: "编号不能为空", trigger: "blur" }
-          ],
-          fName: [
-            { required: true, message: "名称不能为空", trigger: "blur" }
-          ],
-          fStatus: [
-            { required: true, message: "状态默认 T ,正常T 停用F 下拉选择不能为空", trigger: "blur" }
-          ],
-        }
+    // 客户类别字典翻译
+    fTypeidFormat(row, column) {
+      return this.selectDictLabel(this.fTypeidOptions, row.fTypeid);
+    },
+    // 结算表票结、月结字典翻译
+    fStltypeidFormat(row, column) {
+      return this.selectDictLabel(this.fStltypeidOptions, row.fStltypeid);
+    },
+    // 删除状态字典翻译
+    delFlagFormat(row, column) {
+      return this.selectDictLabel(this.delFlagOptions, row.delFlag);
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        fId: null,
+        fTypeid: null,
+        fNo: null,
+        fName: null,
+        fCname: null,
+        fEname: null,
+        fTel: null,
+        fFax: null,
+        fEmail: null,
+        fManage: null,
+        fAddr: null,
+        fEaddr: null,
+        fScale: null,
+        fProvince: null,
+        fCity: null,
+        fStltypeid: null,
+        fStldays: null,
+        fContractno: null,
+        fContractb: null,
+        fContracte: null,
+        fTax: null,
+        fInvtel: null,
+        fInvaddr: null,
+        fBankno: null,
+        fBankname: null,
+        fUbankno: null,
+        fUbankname: null,
+        fStatus: "0",
+        delFlag: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        remark: null
       };
+      this.resetForm("form");
     },
-    created() {
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
       this.getList();
-      this.getDicts("data_customer_category").then(response => {
-        this.fTypeidOptions = response.data;
-      });
-      this.getDicts("data_stltype_type").then(response => {
-        this.fStltypeidOptions = response.data;
-      });
-      this.getDicts("data_delete_state").then(response => {
-        this.delFlagOptions = response.data;
-      });
     },
-    methods: {
-      /** 查询客户详情列表 */
-      getList() {
-        this.loading = true;
-        listCorps(this.queryParams).then(response => {
-          this.corpsList = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        });
-      },
-      // 客户类别字典翻译
-      fTypeidFormat(row, column) {
-        return this.selectDictLabel(this.fTypeidOptions, row.fTypeid);
-      },
-      // 结算表票结、月结字典翻译
-      fStltypeidFormat(row, column) {
-        return this.selectDictLabel(this.fStltypeidOptions, row.fStltypeid);
-      },
-      // 删除状态字典翻译
-      delFlagFormat(row, column) {
-        return this.selectDictLabel(this.delFlagOptions, row.delFlag);
-      },
-      // 取消按钮
-      cancel() {
-        this.open = false;
-        this.reset();
-      },
-      // 表单重置
-      reset() {
-        this.form = {
-          fId: null,
-          fTypeid: null,
-          fNo: null,
-          fCname: null,
-          fName: null,
-          fEname: null,
-          fTel: null,
-          fFax: null,
-          fEmail: null,
-          fManage: null,
-          fAddr: null,
-          fEaddr: null,
-          fScale: null,
-          fProvince: null,
-          fCity: null,
-          fStltypeid: null,
-          fStldays: null,
-          fContractno: null,
-          fContractb: null,
-          fContracte: null,
-          fTax: null,
-          fInvtel: null,
-          fInvaddr: null,
-          fBankno: null,
-          fBankname: null,
-          fUbankno: null,
-          fUbankname: null,
-          fStatus: "0",
-          delFlag: null,
-          createBy: null,
-          createTime: null,
-          updateBy: null,
-          updateTime: null,
-          remark: null
-        };
-        this.resetForm("form");
-      },
-      /** 搜索按钮操作 */
-      handleQuery() {
-        this.queryParams.pageNum = 1;
-        this.getList();
-      },
-      /** 重置按钮操作 */
-      resetQuery() {
-        this.resetForm("queryForm");
-        this.handleQuery();
-      },
-      // 多选框选中数据
-      handleSelectionChange(selection) {
-        this.ids = selection.map(item => item.fId)
-        this.single = selection.length!==1
-        this.multiple = !selection.length
-      },
-      /** 新增按钮操作 */
-      handleAdd() {
-        this.reset();
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.fId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加客户详情";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const fId = row.fId || this.ids
+      getCorps(fId).then(response => {
+        this.form = response.data;
         this.open = true;
-        this.title = "添加客户详情";
-      },
-      /** 修改按钮操作 */
-      handleUpdate(row) {
-        this.reset();
-        const fId = row.fId || this.ids
-        getCorps(fId).then(response => {
-          this.form = response.data;
-          this.open = true;
-          this.title = "修改客户详情";
-        });
-      },
-      /** 提交按钮 */
-      submitForm() {
-        this.$refs["form"].validate(valid => {
-          if (valid) {
-            if (this.form.fId != null) {
-              updateCorps(this.form).then(response => {
-                this.msgSuccess("修改成功");
-                this.open = false;
-                this.getList();
-              });
-            } else {
-              addCorps(this.form).then(response => {
-                this.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
-              });
-            }
+        this.title = "修改客户详情";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.fId != null) {
+            updateCorps(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addCorps(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
           }
-        });
-      },
-      /** 删除按钮操作 */
-      handleDelete(row) {
-        const fIds = row.fId || this.ids;
-        this.$confirm('是否确认删除客户详情编号为"' + fIds + '"的数据项?', "警告", {
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const fIds = row.fId || this.ids;
+      this.$confirm('是否确认删除客户详情编号为"' + fIds + '"的数据项?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
@@ -697,11 +697,11 @@
           this.getList();
           this.msgSuccess("删除成功");
         })
-      },
-      /** 导出按钮操作 */
-      handleExport() {
-        const queryParams = this.queryParams;
-        this.$confirm('是否确认导出所有客户详情数据项?', "警告", {
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有客户详情数据项?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
@@ -710,7 +710,7 @@
         }).then(response => {
           this.download(response.msg);
         })
-      }
     }
-  };
+  }
+};
 </script>