xiaodai2022 2 роки тому
батько
коміт
4b33096c7b

Різницю між файлами не показано, бо вона завелика
+ 0 - 3
dist/index.html


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/css/chunk-a546229a.4c5fc19a.css


BIN
dist/static/css/chunk-a546229a.4c5fc19a.css.gz


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/0.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/app.a2b039bf.js


BIN
dist/static/js/app.a2b039bf.js.gz


Різницю між файлами не показано, бо вона завелика
+ 1 - 1
dist/static/js/app.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/chunk-0b024dde.aade6449.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/chunk-121c28d0.0222b091.js


BIN
dist/static/js/chunk-121c28d0.0222b091.js.gz


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/chunk-1d0a69b6.974cf17c.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/chunk-6e922e31.aba313dd.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/chunk-a4a85b14.a7d3ec07.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/chunk-a546229a.d04a5aef.js


BIN
dist/static/js/chunk-a546229a.d04a5aef.js.gz


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/chunk-b7f101b0.dbc6e1c6.js


+ 3 - 3
src/apis/service/serviceParam/supplierAccount/index.js

@@ -7,7 +7,7 @@ export default {
   // 添加
   add: (data, params) => http(api + "addAccount", data, "post", params),
   // 删除
-  delete: (data, params) => http(api + "supplerdelete", data, "post", params),
+  delete: (data, params) => http(api + "deleteAccount", data, "post", params),
   // 分页查询
   list: (data, params) => http(api + "getAccountList", data, "post", params),
   // 更新
@@ -15,7 +15,7 @@ export default {
   // 修改状态
   status: (data, params) => http(api + "statusAccount", data, "post", params),
   // 详情
-  detail: (data, params) => http(api + "deleteAccount", data, "post", params),
+  detail: (data, params) => http(api + "readAccount", data, "post", params),
   // 修改密码
-  setpwd: (data, params) => http(api + "passset", data, "post", params),
+  setpwd: (data, params) => http(api + "changePassword", data, "post", params),
 };

+ 46 - 18
src/views/serviceParam/supplierAccount/addEdit.vue

@@ -26,7 +26,7 @@
             class="demo-ruleForm"
           >
             <el-row>
-              <el-col :span="24">
+              <el-col :span="12">
                 <el-form-item label="姓名" prop="nickname">
                   <el-input
                     v-model="ruleForm.nickname"
@@ -36,7 +36,7 @@
                   />
                 </el-form-item>
               </el-col>
-              <el-col :span="24">
+              <el-col :span="12">
                 <el-form-item label="手机号" prop="mobile">
                   <el-input
                     v-model="ruleForm.mobile"
@@ -66,16 +66,26 @@
                     style="width: 100%"
                     :size="'mini'"
                   >
-                    <el-table-column prop="code" label="供应商编码" width="180">
+                    <el-table-column prop="supplierNo" label="供应商编码" width="180">
                     </el-table-column>
-                    <el-table-column prop="label" label="供应商名称" min-width="180">
+                    <el-table-column
+                      prop="supplierName"
+                      label="供应商名称"
+                      min-width="180"
+                    >
                     </el-table-column>
+
                     <el-table-column fixed="right" width="50">
                       <template slot="header" slot-scope="scope">
                         <span>操作</span>
                       </template>
                       <template slot-scope="scope">
-                        <el-tooltip effect="dark" content="删除" placement="top">
+                        <el-tooltip
+                          effect="dark"
+                          v-if="!isDetail"
+                          content="删除"
+                          placement="top"
+                        >
                           <i
                             class="el-icon-delete tb-icon"
                             @click="deleteRow(scope.$index, ruleForm.supplierNo)"
@@ -104,7 +114,7 @@
                 <el-button @click="showModelThis = false" :size="'mini'">{{
                   isDetail ? "关 闭" : "取 消"
                 }}</el-button>
-                <div class="fl tl" style="width: 450px">
+                <div class="fl tl" v-if="!isDetail" style="width: 450px">
                   <span>添加供应商:</span>
                   <search-supplier
                     :size="'mini'"
@@ -194,7 +204,7 @@ export default {
       is_mainoptions: [],
       isIndeterminate: false,
       ruleForm: {
-        id: "",
+        uid: "",
         supplierNo: [],
         nickname: "", // 真实姓名
         mobile: "",
@@ -265,7 +275,7 @@ export default {
     },
     async initData() {
       const { code, data, message } = await asyncRequest.detail({
-        id: this.id,
+        uid: this.id,
       });
       if (code === 0) {
         await this.resetForm(data);
@@ -280,11 +290,16 @@ export default {
     },
     async supplierChange(e) {
       const { code, label } = e;
-      if (code !== "") {
+      const scode = code ?? "";
+      if (scode !== "") {
         const list = this.ruleForm.supplierNo;
-        const index = list.forEach((si) => si.code === code);
-        if (index !== -1) {
-          this.ruleForm.supplierNo.push({ id: "", code, label });
+        const index = list.findIndex((si) => si.supplierNo === scode);
+        if (index === -1) {
+          this.ruleForm.supplierNo.push({
+            id: "",
+            supplierNo: scode,
+            supplierName: label,
+          });
         } else {
           this.$message.warning("该供应商已添加!");
         }
@@ -300,16 +315,16 @@ export default {
           this.$refs.ruleForm.clearValidate();
           if (sitem) {
             const {
-              id,
-              supplierNo,
+              uid,
+              supplier_list,
               nickname, // 真实姓名
               mobile,
               email,
             } = sitem;
 
             this.ruleForm = {
-              id,
-              supplierNo,
+              uid,
+              supplierNo: supplier_list,
               nickname, // 真实姓名
               mobile,
               email,
@@ -341,15 +356,28 @@ export default {
             }
             let res = {};
             if (this.id === "add") {
-              delete model["id"];
+              delete model["uid"];
               let arr = [];
               supplierNo.forEach((a) => {
-                arr.push(a.code);
+                arr.push(a.supplierNo);
               });
               model.supplierNo = arr;
               console.log(model);
               res = await asyncRequest.add(model);
             } else {
+              let arr2 = [];
+              supplierNo.forEach((a) => {
+                let iitem = {
+                  supplierNo: a.supplierNo,
+                  supplierName: a.supplierName,
+                };
+                if (a.id) {
+                  iitem.id = a.id;
+                }
+                arr2.push(iitem);
+              });
+              model.supplier_list = arr2;
+              delete model["supplierNo"];
               console.log(model);
               res = await asyncRequest.update(model);
             }

+ 9 - 14
src/views/serviceParam/supplierAccount/columns.js

@@ -531,41 +531,36 @@ const rules = {
   //   trigger: "change",
   // },
 };
- // 表格 - 列参数
- const columns= [
+// 表格 - 列参数
+const columns = [
+  { type: "expand", _slot_: "expand" },
 
   {
     prop: "nickname",
     label: "姓名",
-    width: "90",
   },
   {
     prop: "mobile",
     label: "手机号",
-    width: "110",
   },
   {
     prop: "email",
     label: "邮箱",
-    width: "170",
-  },
-  {
-    prop: "supplier_list",
-    label: "所在供应商",
-    _slot_: "supplier_list",
   },
+  // {
+  //   prop: "supplier_list",
+  //   label: "所在供应商",
+  //   _slot_: "supplier_list",
+  // },
   {
     prop: "status",
     label: "状态",
     _slot_: "status",
-    width: "80",
   },
 
-
   {
     prop: "creater",
     label: "创建人",
-    width: "100",
   },
   {
     prop: "addtime",
@@ -593,5 +588,5 @@ export {
   options9,
   listCol,
   rules,
-  columns
+  columns,
 };

+ 24 - 29
src/views/serviceParam/supplierAccount/index.vue

@@ -109,23 +109,20 @@
             "
           ></el-tag>
         </template>
-        <template #ocr_status="{ scope }">
-          <el-tag
-            :size="tablebtnSize"
-            :type="
-              scope.row.ocr_status == '0'
-                ? 'info'
-                : scope.row.ocr_status == '1'
-                ? 'primary'
-                : scope.row.ocr_status == '2'
-                ? 'danger'
-                : ''
-            "
-            v-text="
-              (ocr_status.find((item) => item.id == scope.row.ocr_status) || {}).label ||
-              '--'
-            "
-          ></el-tag>
+        <template #expand="{ scope }">
+          <el-table :data="scope.row.supplier_list" style="width: 100%" border>
+            <el-table-column
+              prop="supplierNo"
+              label="供应商编号"
+              width="180"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              prop="supplierName"
+              label="供应商名称"
+              show-overflow-tooltip
+            />
+          </el-table>
         </template>
 
         <template #operation="{ scope }">
@@ -137,7 +134,7 @@
           >
             <i
               class="el-icon-refresh-left tb-icon"
-              @click="openPasswordModal(scope.row.id, false)"
+              @click="openPasswordModal(scope.row.uid)"
             ></i>
           </el-tooltip>
           <el-tooltip
@@ -164,7 +161,7 @@
           >
             <i
               class="el-icon-video-pause tb-icon"
-              @click="changeStatus(scope.row.id, scope.row.status)"
+              @click="changeStatus(scope.row.uid, scope.row.status)"
             ></i>
           </el-tooltip>
           <el-tooltip
@@ -175,7 +172,7 @@
           >
             <i
               class="el-icon-video-play tb-icon"
-              @click="changeStatus(scope.row.id, scope.row.status)"
+              @click="changeStatus(scope.row.uid, scope.row.status)"
             ></i>
           </el-tooltip>
           <el-tooltip
@@ -184,7 +181,7 @@
             content="删除"
             placement="top"
           >
-            <i class="el-icon-delete tb-icon" @click="deleteItem(scope.row.id)"></i>
+            <i class="el-icon-delete tb-icon" @click="deleteItem(scope.row.uid)"></i>
           </el-tooltip>
         </template>
       </ex-table>
@@ -198,9 +195,8 @@
       />
 
       <reset-password
-        :id="passwordModelId"
+        :uid="passwordModelId"
         :show-model="passwordModel"
-        :is-detail="isPasswordDetail"
         @refresh="searchList"
         @cancel="passwordModel = false"
       />
@@ -320,10 +316,9 @@ export default {
       this.parmValue.page = 1;
       await this.searchList();
     },
-    openPasswordModal(id, isDetail) {
+    openPasswordModal(id) {
       this.passwordModel = true;
       this.passwordModelId = id;
-      this.isPasswordDetail = isDetail;
     },
 
     /**
@@ -331,7 +326,7 @@ export default {
      * @param {String} id id
      * @param {String} status 0-禁用 1-启用
      */
-    async changeStatus(id, status) {
+    async changeStatus(uid, status) {
       await this.$confirm(`确定要改为${status === "1" ? "禁用" : "启用"}?`, {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
@@ -340,7 +335,7 @@ export default {
         .then(async () => {
           this.loading = true;
           const model = {
-            id: id,
+            uid,
             status: status === "1" ? "0" : "1",
           };
           const { code, data, message } = await asyncRequest.status(model);
@@ -362,7 +357,7 @@ export default {
           console.log("取消");
         });
     },
-    async deleteItem(id) {
+    async deleteItem(uid) {
       await this.$confirm("确定要删除?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
@@ -370,7 +365,7 @@ export default {
       })
         .then(async () => {
           const model = {
-            id: id,
+            uid,
           };
           const { code, message } = await asyncRequest.delete(model);
           if (code === 0) {

+ 4 - 3
src/views/serviceParam/supplierAccount/resetPassword.vue

@@ -66,7 +66,7 @@ import { isnumber, isAlphanumeric, validAlphabets } from "@/utils/validate";
 import resToken from "@/mixins/resToken";
 export default {
   name: "Account",
-  props: ["showModel", "id", "isDetail"],
+  props: ["showModel", "uid", "isDetail"],
   mixins: [resToken],
   data() {
     const validateNewPassword = (rule, value, callback) => {
@@ -103,7 +103,7 @@ export default {
       title: "重置密码",
       showModelThis: this.showModel,
       ruleForm: {
-        id: this.id,
+        uid: this.uid,
         password: "",
         confirmPassword: "",
       },
@@ -146,7 +146,7 @@ export default {
           this.$refs.ruleForm.resetFields();
           this.$refs.ruleForm.clearValidate();
           this.ruleForm = {
-            id: this.id,
+            uid: this.uid,
             password: "",
             confirmPassword: "",
           };
@@ -159,6 +159,7 @@ export default {
           if (!this.loading) {
             this.loading = true;
             const obj = JSON.parse(JSON.stringify(this.ruleForm));
+            delete obj["confirmPassword"];
             const res = await asyncRequest.setpwd(obj);
             this.loading = false;
             if (res && res.code === 0) {

Деякі файли не було показано, через те що забагато файлів було змінено