wangxin 1 рік тому
батько
коміт
a4fc2f7344

+ 0 - 1
src/api/business/entrust/deduct.js

@@ -20,7 +20,6 @@ export function getDeduct(id) {
 }
 
 export function genDeduct(options) {
-  console.log(options)
   request.defaults.baseURL = '/ezhizao-yzbh-entrust'
   return request({
     url: '/business/deduct/gen',

+ 0 - 1
src/components/CustomerFormCom/index.vue

@@ -229,7 +229,6 @@ function handlerSelectCategory() {
 
 /** 输入框输出建议 */
 function querySearchAsync(queryString, cb) {
-  console.log("输出建议", currentSource.value);
   // 根据选择id获取数据
   if (currentSource.value.referrerDataSource === "channel") {
     const query = { name: queryString };

+ 1 - 1
src/utils/index.js

@@ -52,7 +52,7 @@ export function numberToCurrencyNo(value) {
     // 有小数部分
 
     floatPart = valueArray[1].toString(); // 取得小数部分
-    console.log("整数部分", intPartFormat + "." + floatPart, "小数部分");
+
     return intPartFormat + "." + floatPart;
   }
   return intPartFormat + floatPart;

+ 217 - 149
src/views/business/contracts/simpleCompany/index.vue

@@ -1,8 +1,8 @@
 <template>
-    <div class="page-container list-container">
-        <!-- 功能按钮区 -->
-        <div class="list-btns-container">
-            <!-- <el-button
+  <div class="page-container list-container">
+    <!-- 功能按钮区 -->
+    <div class="list-btns-container">
+      <!-- <el-button
                   type="primary"
                   size="small"
                   icon="Plus"
@@ -35,205 +35,273 @@
                   @click="handleExport"
                   v-hasPermi="['business:company:export']"
           >导出</el-button> -->
-            <!--<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>-->
-        </div>
-        <!-- 搜索区 -->
-        <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true">
-            <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true">
-                <el-form-item label="客户名称:" prop="name">
-                    <el-input v-model="queryParams.name" placeholder="请输入客户名称" clearable @keyup.enter="handleQuery" />
-                </el-form-item>
-                <el-form-item label="统一社会信用码:" prop="socialCreditCode">
-                    <el-input v-model="queryParams.socialCreditCode" placeholder="请输入统一社会信用码" clearable
-                        @keyup.enter="handleQuery" />
-                </el-form-item>
-                <el-form-item label="客户负责人:" prop="leaderName">
-                    <el-input v-model="queryParams.leaderName" placeholder="请输入客户负责人" clearable
-                        @keyup.enter="handleQuery" />
-                </el-form-item>
-                <el-form-item>
-                    <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
-                    <el-button icon="Refresh" @click="resetQuery">重置</el-button>
-                </el-form-item>
-            </el-form>
-        </el-form>
-
-        <!-- 列表区 -->
-        <el-table v-loading="loading" :data="companyList" size="small" border height="100%"
-            @selection-change="handleSelectionChange">
-            <el-table-column type="selection" width="55" align="center" />
-            <el-table-column label="序号" align="center" type="index" />
-            <el-table-column label="客户名称" width="230" align="center" prop="name" />
-            <el-table-column label="税号" width="180" align="center" prop="socialCreditCode" />
-            <el-table-column label="注册省-市-区" width="180" align="center" prop="province">
-                <template #default="scope">
-                    <span>{{ scope.row.province + '-' + scope.row.city + '-' + scope.row.district }}</span>
-                </template>
-            </el-table-column>
-            <el-table-column label="年收入" align="center" prop="annualIncome" />
-            <el-table-column label="纳税类型" align="center" prop="taxType" />
-            <el-table-column label="是否零申报" width="100" align="center" prop="isZero">
-                <template #default="scope">
-                    <span>{{ scope.row.isZero === 1 ? "是" : scope.row.isZero === 0 ? "否" : '' }}</span>
-                </template>
-            </el-table-column>
-            <el-table-column label="客服" align="center" prop="adviserName" />
-            <el-table-column label="负责人" align="center" prop="leaderName" />
-
-            <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <!--<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>-->
+    </div>
+    <!-- 搜索区 -->
+    <el-form
+      class="list-search-container"
+      size="small"
+      :model="queryParams"
+      ref="queryRef"
+      :inline="true"
+    >
+      <el-form
+        class="list-search-container"
+        size="small"
+        :model="queryParams"
+        ref="queryRef"
+        :inline="true"
+      >
+        <el-form-item label="客户名称:" prop="name">
+          <el-input
+            v-model="queryParams.name"
+            placeholder="请输入客户名称"
+            clearable
+            @keyup.enter="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item label="统一社会信用码:" prop="socialCreditCode">
+          <el-input
+            v-model="queryParams.socialCreditCode"
+            placeholder="请输入统一社会信用码"
+            clearable
+            @keyup.enter="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item label="客户负责人:" prop="leaderName">
+          <el-input
+            v-model="queryParams.leaderName"
+            placeholder="请输入客户负责人"
+            clearable
+            @keyup.enter="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" icon="Search" @click="handleQuery"
+            >搜索</el-button
+          >
+          <el-button icon="Refresh" @click="resetQuery">重置</el-button>
+        </el-form-item>
+      </el-form>
+    </el-form>
+
+    <!-- 列表区 -->
+    <el-table
+      v-loading="loading"
+      :data="companyList"
+      size="small"
+      border
+      height="100%"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="序号" align="center" type="index" />
+      <el-table-column
+        label="客户名称"
+        width="230"
+        align="center"
+        prop="name"
+      />
+      <el-table-column
+        label="税号"
+        width="180"
+        align="center"
+        prop="socialCreditCode"
+      />
+      <el-table-column
+        label="注册省-市-区"
+        width="180"
+        align="center"
+        prop="province"
+      >
+        <template #default="scope">
+          <span>{{
+            scope.row.province + "-" + scope.row.city + "-" + scope.row.district
+          }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="年收入" align="center" prop="annualIncome" />
+      <el-table-column label="纳税类型" align="center" prop="taxType" />
+      <el-table-column
+        label="是否零申报"
+        width="100"
+        align="center"
+        prop="isZero"
+      >
+        <template #default="scope">
+          <span>{{
+            scope.row.isZero === 1 ? "是" : scope.row.isZero === 0 ? "否" : ""
+          }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="客服" align="center" prop="adviserName" />
+      <el-table-column label="负责人" align="center" prop="leaderName" />
+
+      <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
               <template #default="scope">
                   <el-button link type="warning" size="small" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['business:company:edit']">修改</el-button>
                   <el-button link type="danger" size="small" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['business:company:remove']">删除</el-button>
               </template>
           </el-table-column> -->
-        </el-table>
+    </el-table>
 
-        <!-- 分页 -->
-        <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
-            v-model:limit="queryParams.pageSize" @pagination="getList" />
+    <!-- 分页 -->
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize"
+      @pagination="getList"
+    />
 
-        <!-- 表单 -->
-        <company-form ref="companyRef" :get-list="getList"></company-form>
-    </div>
+    <!-- 表单 -->
+    <company-form ref="companyRef" :get-list="getList"></company-form>
+  </div>
 </template>
 
 <script setup name="Company">
 import { listCompany, delCompany } from "@/api/business/crm/company";
-import companyForm from "./form"
-const { proxy } = getCurrentInstance()
+import companyForm from "./form";
+const { proxy } = getCurrentInstance();
 /** 字典数组区 */
 /** 查询 对象 */
 
 const companyList = ref([]);
 const loading = ref(true);
-const ids = ref([])
+const ids = ref([]);
 const single = ref(true);
 const multiple = ref(true);
 const total = ref(0);
 /** 查询对象 */
 const queryParams = ref({
-    pageNum: 1,
-    pageSize: 20,
-    category: null,
-    code: null,
-    name: null,
-    shortName: null,
-    oldName: null,
-    owner: null,
-    phone: null,
-    email: null,
-    contactAddress: null,
-    source: null,
-    type: null,
-    socialCreditCode: null,
-    mainBusiness: null,
-    legalRepresentative: null,
-    foundationDate: null,
-    licenceDate: null,
-    businessStartDate: null,
-    businessEndDate: null,
-    isPermanentlyEffective: null,
-    registerMoney: null,
-    registerMoneyUnit: null,
-    provinceCode: null,
-    province: null,
-    cityCode: null,
-    city: null,
-    districtCode: null,
-    district: null,
-    address: null,
-    businessField: null,
-    taxType: null,
-    isZero: null,
-    competentTaxAuthority: null,
-    taxCollectorName: null,
-    taxCollectorPhone: null,
-    taxMonth: null,
-    openingBank: null,
-    bankAccount: null,
-    annualIncome: null,
-    governmentAccountNo: null,
-    governmentPassword: null,
-    socialSecurityAccountNo: null,
-    socialSecurityPassword: null,
-    employeePassword: null,
-    housingFundPassword: null,
-    housingFundUnitAccount: null,
-    housingFundDeductionPassword: null,
-    collectionMethod: null,
-    quotaAmount: null,
-    isPayOnWindow: null,
-    isFirstSocialSecurity: null,
-    isFirstHousingFund: null,
-    leaderId: null,
-    adviserId: null,
-    leaderName: null,
-    adviserName: null,
-})
+  pageNum: 1,
+  pageSize: 20,
+  category: null,
+  code: null,
+  name: null,
+  shortName: null,
+  oldName: null,
+  owner: null,
+  phone: null,
+  email: null,
+  contactAddress: null,
+  source: null,
+  type: null,
+  socialCreditCode: null,
+  mainBusiness: null,
+  legalRepresentative: null,
+  foundationDate: null,
+  licenceDate: null,
+  businessStartDate: null,
+  businessEndDate: null,
+  isPermanentlyEffective: null,
+  registerMoney: null,
+  registerMoneyUnit: null,
+  provinceCode: null,
+  province: null,
+  cityCode: null,
+  city: null,
+  districtCode: null,
+  district: null,
+  address: null,
+  businessField: null,
+  taxType: null,
+  isZero: null,
+  competentTaxAuthority: null,
+  taxCollectorName: null,
+  taxCollectorPhone: null,
+  taxMonth: null,
+  openingBank: null,
+  bankAccount: null,
+  annualIncome: null,
+  governmentAccountNo: null,
+  governmentPassword: null,
+  socialSecurityAccountNo: null,
+  socialSecurityPassword: null,
+  employeePassword: null,
+  housingFundPassword: null,
+  housingFundUnitAccount: null,
+  housingFundDeductionPassword: null,
+  collectionMethod: null,
+  quotaAmount: null,
+  isPayOnWindow: null,
+  isFirstSocialSecurity: null,
+  isFirstHousingFund: null,
+  leaderId: null,
+  adviserId: null,
+  leaderName: null,
+  adviserName: null,
+});
 
 /***********************  方法区  ****************************/
 
 /** 查询company列表 */
 function getList() {
-    loading.value = true;
-    listCompany(queryParams.value).then(response => {
-        companyList.value = response.rows;
-        total.value = response.total;
-        loading.value = false;
-        console.log(companyList.value)
-    });
+  loading.value = true;
+  listCompany(queryParams.value).then((response) => {
+    companyList.value = response.rows;
+    total.value = response.total;
+    loading.value = false;
+  });
 }
 
 /** 搜索按钮操作 */
 function handleQuery() {
-    queryParams.value.pageNum = 1;
-    getList();
+  queryParams.value.pageNum = 1;
+  getList();
 }
 
 /** 重置按钮操作 */
 function resetQuery() {
-    proxy.resetForm("queryRef");
-    queryParams.value.name = "";
-    queryParams.value.socialCreditCode = "";
-    queryParams.value.leaderName = "";
-    handleQuery();
+  proxy.resetForm("queryRef");
+  queryParams.value.name = "";
+  queryParams.value.socialCreditCode = "";
+  queryParams.value.leaderName = "";
+  handleQuery();
 }
 
 // 多选框选中数据
 function handleSelectionChange(selection) {
-    ids.value = selection.map(item => item.id);
-    single.value = selection.length != 1;
-    multiple.value = !selection.length;
+  ids.value = selection.map((item) => item.id);
+  single.value = selection.length != 1;
+  multiple.value = !selection.length;
 }
 
 /** 新增按钮操作 */
 function handleAdd() {
-    proxy.$refs.companyRef.open()
+  proxy.$refs.companyRef.open();
 }
 
 /** 修改按钮操作 */
 function handleUpdate(row) {
-    const id = row.id || ids.value
-    proxy.$refs.companyRef.open(id)
+  const id = row.id || ids.value;
+  proxy.$refs.companyRef.open(id);
 }
 
-
 /** 删除按钮操作 */
 function handleDelete(row) {
-    const _ids = row.id || ids.value;
-    proxy.$modal.confirm('是否确认删除选中的数据项?').then(function () {
-        return delCompany(_ids);
-    }).then(() => {
-        getList();
-        proxy.$modal.msgSuccess("删除成功!");
-    }).catch(() => { });
+  const _ids = row.id || ids.value;
+  proxy.$modal
+    .confirm("是否确认删除选中的数据项?")
+    .then(function () {
+      return delCompany(_ids);
+    })
+    .then(() => {
+      getList();
+      proxy.$modal.msgSuccess("删除成功!");
+    })
+    .catch(() => {});
 }
 
 /** 导出按钮操作 */
 function handleExport() {
-    proxy.download('business/company/export', {
-        ...queryParams.value
-    }, `company_${new Date().getTime()}.xlsx`)
+  proxy.download(
+    "business/company/export",
+    {
+      ...queryParams.value,
+    },
+    `company_${new Date().getTime()}.xlsx`
+  );
 }
 
 getList();

+ 0 - 4
src/views/business/contracts/standardCpmpany/add.vue

@@ -336,9 +336,7 @@ function open() {
 function init() {
   listSource()
     .then((res) => {
-      console.log(res);
       sourceCategories.value = res.rows;
-      console.log(sourceCategories.value);
     })
     .catch((err) => {
       console.log(err);
@@ -359,10 +357,8 @@ function submitForm() {
       if (valid) {
         addCompany(form.value)
           .then((res) => {
-            console.log(res);
             visible.value = false;
             getList.value();
-            // emit("success");
           })
           .catch((err) => {
             console.log(err);

+ 0 - 3
src/views/business/contracts/standardCpmpany/form.vue

@@ -466,7 +466,6 @@ function open(id) {
   if (id) {
     getStandardCompany(id).then((response) => {
       form.value = response.data;
-      console.log(response.data);
       editStatus.value = false;
       title.value = "修改客户";
       zero.value = form.value.isZero;
@@ -598,7 +597,6 @@ function handleAddBatch() {
 }
 
 function handleSingleSelected(person) {
-  console.log("单选带回", person);
   if (
     form.value.members.findIndex((item) => item.personId === person.id) === -1
   ) {
@@ -614,7 +612,6 @@ function handleSingleSelected(person) {
 }
 
 function handleMultipleSelected(selection) {
-  console.log("多选回带", selection);
   for (var i = 0; i < selection.length; ++i) {
     const newPerson = {};
     if (

+ 0 - 1
src/views/business/contracts/standardCpmpany/index.vue

@@ -338,7 +338,6 @@ function linkList() {
 
 /** 输入框输出建议 */
 const querySearchAsync = (queryString, cb) => {
-  console.log(links);
   const results = queryString
     ? links.value.filter(createFilter(queryString))
     : links.value;

+ 0 - 2
src/views/business/contracts/standardCpmpany/setEntrustDialog.vue

@@ -165,7 +165,6 @@ const content = ref("请输入员工姓名");
 const ids = ref([]);
 
 function submitForm() {
-  console.log(loops.value);
   let type = loops.value.findIndex((v) => v == 1);
   form.value.taskTypeIds = loops.value;
   form.value.companies = list.value;
@@ -189,7 +188,6 @@ function closeIsZero() {
 }
 
 function handleSave() {
-  console.log(form.value.isZero);
   if (form.value.isZero == null) {
     proxy.$modal.msgError("请选择是否零申报!");
   } else {

+ 1 - 0
src/views/business/financial/collection/form.vue

@@ -335,6 +335,7 @@
                         <el-input-number
                           v-model="scope.row.arriveAmount"
                           size="small"
+                          :min="0.0"
                           placeholder="本次付款金额"
                           :precision="2"
                           :controls="false"

+ 1 - 0
src/views/business/financial/contract/form.vue

@@ -337,6 +337,7 @@
                         <el-input-number
                           v-model="scope.row.arriveAmount"
                           size="small"
+                          :min="0.0"
                           placeholder="本次付款金额"
                           :precision="2"
                           :controls="false"

+ 155 - 62
src/views/business/source/channel/index.vue

@@ -2,74 +2,168 @@
   <div class="page-container list-container">
     <!-- 功能按钮区 -->
     <div class="list-btns-container">
-      <el-button type="primary" size="small" icon="Plus" @click="handleAdd"
-        v-hasPermi="['business:channel:add']">新增</el-button>
-
-      <el-button type="danger" size="small" icon="Delete" :disabled="multiple" @click="handleDelete"
-        v-hasPermi="['business:channel:remove']">删除</el-button>
+      <el-button
+        type="primary"
+        size="small"
+        icon="Plus"
+        @click="handleAdd"
+        v-hasPermi="['business:channel:add']"
+        >新增</el-button
+      >
+
+      <el-button
+        type="danger"
+        size="small"
+        icon="Delete"
+        :disabled="multiple"
+        @click="handleDelete"
+        v-hasPermi="['business:channel:remove']"
+        >删除</el-button
+      >
 
       <!--<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>-->
     </div>
     <!-- 搜索区 -->
-    <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
-      label-width="68px">
+    <el-form
+      class="list-search-container"
+      size="small"
+      :model="queryParams"
+      ref="queryRef"
+      :inline="true"
+      label-width="68px"
+    >
       <el-form-item label="渠道名称:" prop="name">
-        <el-input v-model="queryParams.name" placeholder="请输入渠道名称" style="width: 150px" size="small" clearable
-          @keyup.enter="handleQuery" />
+        <el-input
+          v-model="queryParams.name"
+          placeholder="请输入渠道名称"
+          style="width: 150px"
+          size="small"
+          clearable
+          @keyup.enter="handleQuery"
+        />
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
+        <el-button type="primary" icon="Search" @click="handleQuery"
+          >搜索</el-button
+        >
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
     <!-- 列表区 -->
-    <el-table v-loading="loading" :data="channelList" size="small" border height="100%"
-      @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="channelList"
+      size="small"
+      border
+      height="100%"
+      @selection-change="handleSelectionChange"
+    >
       <el-table-column type="selection" width="55" align="center" />
       <!-- <el-table-column label="序号" align="center" type="index" /> -->
       <el-table-column label="渠道名称" align="center" prop="name">
         <template #default="scope">
-          <el-input v-if="scope.row.isAdd" v-model="scope.row.name" size="small" placeholder="请输入渠道"></el-input>
-          <el-input v-else-if="scope.row.isEdit" size="small" v-model="scope.row.name"></el-input>
+          <el-input
+            v-if="scope.row.isAdd"
+            v-model="scope.row.name"
+            size="small"
+            placeholder="请输入渠道"
+          ></el-input>
+          <el-input
+            v-else-if="scope.row.isEdit"
+            size="small"
+            v-model="scope.row.name"
+          ></el-input>
           <span v-else>{{ scope.row.name }}</span>
         </template>
       </el-table-column>
-      <el-table-column v-if="categoryShow" label="渠道类别" align="center" prop="channelCategoryName" />
+      <el-table-column
+        v-if="categoryShow"
+        label="渠道类别"
+        align="center"
+        prop="channelCategoryName"
+      />
       <el-table-column label="负责人" align="center" prop="creatorName">
         <template #default="scope">
-          <el-autocomplete size="small" v-if="scope.row.isEdit || scope.row.isAdd" v-model="scope.row.creatorName"
-            :fetch-suggestions="querySearchAsync" style="width: 100%" :trigger-on-focus="true" placeholder="请输入负责人"
-            @select="handleSelect" />
+          <el-autocomplete
+            size="small"
+            v-if="scope.row.isEdit || scope.row.isAdd"
+            v-model="scope.row.creatorName"
+            :fetch-suggestions="querySearchAsync"
+            style="width: 100%"
+            :trigger-on-focus="true"
+            placeholder="请输入负责人"
+            @select="handleSelect"
+          />
           <span v-else>{{ scope.row.creatorName }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="添加时间" align="center" prop="createTime" width="180">
+      <el-table-column
+        label="添加时间"
+        align="center"
+        prop="createTime"
+        width="180"
+      >
         <template #default="scope">
           <span>{{ parseTime(scope.row.createTime) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120">
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+        width="120"
+      >
         <template #default="scope">
           <template v-if="!scope.row.isEdit && !scope.row.isAdd">
-            <el-button v-show="!scope.row.isEdit && !scope.row.isAdd" link type="warning" size="small"
-              @click="handleUpdate(scope.row)" v-hasPermi="['business:channel:edit']">修改</el-button>
-            <el-button v-show="!scope.row.isEdit && !scope.row.isAdd" link type="danger" size="small"
-              @click="handleDelete(scope.row)" v-hasPermi="['business:channel:remove']">删除</el-button>
+            <el-button
+              v-show="!scope.row.isEdit && !scope.row.isAdd"
+              link
+              type="warning"
+              size="small"
+              @click="handleUpdate(scope.row)"
+              v-hasPermi="['business:channel:edit']"
+              >修改</el-button
+            >
+            <el-button
+              v-show="!scope.row.isEdit && !scope.row.isAdd"
+              link
+              type="danger"
+              size="small"
+              @click="handleDelete(scope.row)"
+              v-hasPermi="['business:channel:remove']"
+              >删除</el-button
+            >
           </template>
           <template v-if="scope.row.isEdit || scope.row.isAdd">
-            <el-button v-show="scope.row.isEdit || scope.row.isAdd" link type="primary" size="small"
-              @click="handleSave(scope.row)">保存</el-button>
-            <el-button v-show="scope.row.isEdit || scope.row.isAdd" link size="small"
-              @click="handCancel(scope.row)">取消</el-button>
+            <el-button
+              v-show="scope.row.isEdit || scope.row.isAdd"
+              link
+              type="primary"
+              size="small"
+              @click="handleSave(scope.row)"
+              >保存</el-button
+            >
+            <el-button
+              v-show="scope.row.isEdit || scope.row.isAdd"
+              link
+              size="small"
+              @click="handCancel(scope.row)"
+              >取消</el-button
+            >
           </template>
         </template>
       </el-table-column>
     </el-table>
 
     <!-- 分页 -->
-    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
-      @pagination="getList" />
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize"
+      @pagination="getList"
+    />
   </div>
 </template>
 
@@ -249,44 +343,43 @@ function handleSourceCurrentChange(row) {
 /** 保存按钮操作 */
 function handleSave(row) {
   if (
-    row.name.length > 0 &&
-    row.creatorName.length > 0 &&
-    row.name !== null &&
-    row.creatorName !== null
+    !(row.name && row.creatorName) ||
+    (!row.name.length > 0 && !row.creatorName.length > 0)
   ) {
-    const index = userList.value.findIndex(
-      (item) => item.nickName == row.creatorName
-    );
+    proxy.$modal.msgError("渠道名称和负责人不能为空!");
+    return;
+  }
 
-    if (index != -1) {
-      row.employeeId = userList.value[index].userId;
-    }
+  const index = userList.value.findIndex(
+    (item) => item.nickName == row.creatorName
+  );
 
-    console.log(row);
-    if (row.isAdd) {
-      addChannel(row).then((response) => {
-        proxy.$modal.msgSuccess("添加成功");
-        // visible.value = false;
-        getList.value();
-      });
-      row.isAdd = false;
-      getList();
-    }
+  if (index != -1) {
+    row.employeeId = userList.value[index].userId;
+  }
 
-    if (row.isEdit) {
-      updateChannel(row).then((response) => {
-        proxy.$modal.msgSuccess("修改成功");
-        // visible.value = false;
-        getList.value();
-      });
-      queryParams.isEdit = false;
-      getList();
-    }
+  console.log(row);
+  if (row.isAdd) {
+    addChannel(row).then((response) => {
+      proxy.$modal.msgSuccess("添加成功");
+      // visible.value = false;
+      getList.value();
+    });
+    row.isAdd = false;
+    getList();
+  }
 
+  if (row.isEdit) {
+    updateChannel(row).then((response) => {
+      proxy.$modal.msgSuccess("修改成功");
+      // visible.value = false;
+      getList.value();
+    });
+    queryParams.isEdit = false;
     getList();
-  } else {
-    proxy.$modal.msgError("渠道名称和负责人不能为空!");
   }
+
+  getList();
 }
 
 /** 修改按钮操作 */
@@ -306,7 +399,7 @@ function handleDelete(row) {
       getList();
       proxy.$modal.msgSuccess("删除成功!");
     })
-    .catch(() => { });
+    .catch(() => {});
 }
 
 /** 导出按钮操作 */

+ 84 - 23
src/views/index.vue

@@ -1,7 +1,8 @@
 <template>
   <div class="page-container list-container">
     <div>
-      <span style="
+      <span
+        style="
           display: inline-block;
           height: 20px;
           line-height: 18px;
@@ -10,30 +11,64 @@
           margin-top: 5px;
           font-weight: 700;
           border-left: 3px;
-        ">待完成任务</span>
-      <el-button type="success" icon="link" :disabled="multiple" size="small" @click="handleTyransfer"
-        v-hasPermi="['business:workOrder:tyransfer']">转交</el-button>
+        "
+        >待完成任务</span
+      >
+      <el-button
+        type="success"
+        icon="link"
+        :disabled="multiple"
+        size="small"
+        @click="handleTyransfer"
+        v-hasPermi="['business:workOrder:tyransfer']"
+        >转交</el-button
+      >
     </div>
     <!-- v-hasPermi="['business:workOrder:transfer']" -->
 
     <!-- 搜索区 -->
-    <el-form class="list-search-container" size="small" :model="queryParams" ref="queryRef" :inline="true"
-      label-width="68px" @selection-change="handleSelectionChange">
+    <el-form
+      class="list-search-container"
+      size="small"
+      :model="queryParams"
+      ref="queryRef"
+      :inline="true"
+      label-width="68px"
+      @selection-change="handleSelectionChange"
+    >
       <el-form-item label="客户名称:" prop="companyName">
-        <el-input style="width: 150px" v-model="queryParams.companyName" placeholder="请输入客户名称" clearable
-          @keyup.enter="handleQuery" />
+        <el-input
+          style="width: 150px"
+          v-model="queryParams.companyName"
+          placeholder="请输入客户名称"
+          clearable
+          @keyup.enter="handleQuery"
+        />
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
+        <el-button type="primary" icon="Search" @click="handleQuery"
+          >搜索</el-button
+        >
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
     <!-- 列表区 -->
-    <el-table v-loading="loading" :data="orderList" size="small" border height="100%"
-      @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="orderList"
+      size="small"
+      border
+      height="100%"
+      @selection-change="handleSelectionChange"
+    >
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="客户名称" align="center" prop="companyName" width="250" />
+      <el-table-column
+        label="客户名称"
+        align="center"
+        prop="companyName"
+        width="250"
+      />
       <el-table-column label="类型" align="center" width="150">
         <template #default="scope">
           {{ scope.row.type === 1 ? "循环工单" : "代办工单" }}
@@ -43,19 +78,39 @@
       </el-table-column>
     </el-table>
     <!-- 分页 -->
-    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
-      @pagination="getList" />
-    <el-dialog title="转交执行人" v-model="formOpen" width="500px" append-to-body draggable @close="cancel">
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize"
+      @pagination="getList"
+    />
+    <el-dialog
+      title="转交执行人"
+      v-model="formOpen"
+      width="500px"
+      append-to-body
+      draggable
+      @close="cancel"
+    >
       <el-form ref="dictRef" :model="form" :rules="rules" label-width="100">
         <el-form-item label="转交执行人:" :prop="content">
-          <el-autocomplete :fetch-suggestions="querySearchAsync" :trigger-on-focus="true" v-model="selectionName"
-            placeholder="输入执行人" popper-class="my-autocomplete" @select="handleSelectEmployee">
+          <el-autocomplete
+            :fetch-suggestions="querySearchAsync"
+            :trigger-on-focus="true"
+            v-model="selectionName"
+            placeholder="输入执行人"
+            popper-class="my-autocomplete"
+            @select="handleSelectEmployee"
+          >
             <template #default="{ item }">
-              <div style="
+              <div
+                style="
                   display: flex;
                   flex-direction: row;
                   justify-content: space-between;
-                ">
+                "
+              >
                 <div class="name" style="font-size: 12px">
                   {{ item.nickName }}
                 </div>
@@ -69,8 +124,16 @@
       </el-form>
       <template #footer>
         <div class="dialog-footer">
-          <el-button type="primary" icon="Finished" size="small" @click="submitForm">确 定</el-button>
-          <el-button icon="close" size="small" @click="formOpen = false">取 消</el-button>
+          <el-button
+            type="primary"
+            icon="Finished"
+            size="small"
+            @click="submitForm"
+            >确 定</el-button
+          >
+          <el-button icon="close" size="small" @click="formOpen = false"
+            >取 消</el-button
+          >
         </div>
       </template>
     </el-dialog>
@@ -119,7 +182,6 @@ function getList() {
 
     total.value = response.total;
     loading.value = false;
-    console.log("查询", response);
   });
 }
 
@@ -172,7 +234,6 @@ const querySearchAsync = (queryString, cb) => {
 
 //转交搜索框输入
 function handleSelectEmployee(item) {
-  console.log(item);
   selectionName.value = item.nickName;
   selectionUser.value = item;
 }

+ 0 - 1
src/views/login.vue

@@ -155,7 +155,6 @@ function login() {
         userStore
           .login(loginForm.value)
           .then(() => {
-            console.log(loginForm.value);
             router.push({ path: redirect.value || "/" });
           })
           .catch(() => {