Переглянути джерело

chore:报备单字段调整

snow 1 рік тому
батько
коміт
83a93fd735

+ 55 - 32
src/views/sellOut/filing/config/columns.js

@@ -1,14 +1,20 @@
 const columns = [
-  {
-    type: "selection",
-    fixed: "left",
-    _noset_: true,
-  },
+  // {
+  //   type: "selection",
+  //   fixed: "left",
+  //   _noset_: true,
+  // },
   {
     prop: "filingCode",
     label: "报备单编号",
     width: "155px",
   },
+  {
+    prop: "status",
+    label: "状态",
+    width: "125px",
+    _slot_: "status",
+  },
   {
     prop: "catinfo",
     label: "商品分类",
@@ -20,11 +26,21 @@ const columns = [
     "min-width": "145px",
   },
 
-  // {
-  //   prop: "good_price",
-  //   label: "销售数量",
-  //   width: "110px",
-  // },
+  {
+    prop: "num",
+    label: "总数量",
+    width: "110px",
+  },
+  {
+    prop: "transfer_num",
+    label: "已转单数量",
+    width: "110px",
+  },
+  {
+    prop:'wait_num',
+    label:'未转单数量',
+    width:'110px'
+  },
   {
     prop: "cgd_charge",
     label: "采购价",
@@ -42,20 +58,27 @@ const columns = [
   },
   {
     prop: "companyName",
-    label: "企业客户名称",
-    width: "145px",
+    label: "企业客户",
+    width: "165px",
+    _slot_:'company'
   },
   {
-    prop: "companyCode",
-    label: "企业客户编号",
-    width: "145px",
+    prop: "customerName",
+    label: "业务公司",
+    width: "225px",
+    _slot_:'customer'
   },
   {
-    prop: "status",
-    label: "状态",
-    width: "145px",
-    _slot_: "status",
+    prop: "supplierName",
+    label: "供应商公司",
+    width: "225px",
+    _slot_:'supplier'
   },
+  // {
+  //   prop: "companyCode",
+  //   label: "企业客户编号",
+  //   width: "145px",
+  // },
   {
     prop: "addtime",
     label: "创建时间",
@@ -66,7 +89,7 @@ const columns = [
     label: "操作",
     fixed: "right",
     _noset_: true,
-    width: "80px",
+    width: "110px",
     _slot_: "operation",
   },
 ];
@@ -83,12 +106,12 @@ export const options13 = [
 ];
 
 const statusOptions = [
-  { value: "0", label: "待审核判断合规" },
-  { value: "1", label: "不合规" },
-  { value: "2", label: "合规待转单" },
-  { value: "3", label: "部分转单" },
-  { value: "4", label: "全部转单" },
-  { value: "5", label: "取消转单" }
+  { value: "0", label: "待审核是否合规" },
+  { value: "1", label: "审核不合规" },
+  { value: "2", label: "合规待转单" },
+  { value: "3", label: "部分转单" },
+  { value: "4", label: "全部转单" },
+  { value: "5", label: "取消转单" }
 ];
 
 export const editColumns = [
@@ -577,6 +600,12 @@ const listCol = [
     label: "编号",
     width: "160px",
   },
+  {
+    prop: "status",
+    label: "状态",
+    _slot_: "status",
+    width: "118px",
+  },
   {
     prop: "good_thumb_img",
     label: "图片",
@@ -602,12 +631,6 @@ const listCol = [
     _slot_: "isonline",
     width: "70px",
   },
-  {
-    prop: "status",
-    label: "状态",
-    _slot_: "status",
-    width: "118px",
-  },
   {
     prop: "supplierNo",
     label: "供应商编号",

+ 78 - 9
src/views/sellOut/filing/index.vue

@@ -100,11 +100,24 @@
               />
             </el-col>
 
+            <el-col :span="4" style="margin-top: 15px;margin-left:10px">
+              <search-supplier
+                :size="'mini'"
+                :value="parmValue.supplierNo"
+                :disabled="false"
+                :placeholder="'供应商名称'"
+                :names="parmValue.supplierName"
+                :is-detail="true"
+                :no-disabled="true"
+                @searchChange="supplierChange"
+              />
+            </el-col>
+
             <el-col :span="4" style="margin-top: 15px; margin-left: 10px">
               <el-select
                 clearable
                 size="mini"
-                placeholder="请选择状态"
+                placeholder="状态"
                 v-model="parmValue.status"
                 @change="
                   pageInfo.curr = 1;
@@ -134,6 +147,33 @@
         </div>
       </template>
 
+      <template #company="{scope}">
+        <div style="display:flex;align-items:center">
+          <el-tooltip :content="'企业客户编码 : ' + (scope.row.companyCode || '--')" placement="top">
+            <i class="el-icon-warning-outline" style="margin-right:2px;cursor:pointer" />
+          </el-tooltip>
+          {{scope.row.companyName}}
+        </div>
+      </template>
+
+      <template #customer="{scope}">
+        <div style="display:flex;align-items:center">
+          <el-tooltip :content="'业务公司编码 : ' + (scope.row.customerCode || '--')" placement="top">
+            <i class="el-icon-warning-outline" style="margin-right:2px;cursor:pointer" />
+          </el-tooltip>
+          {{scope.row.customerName}}
+        </div>
+      </template>
+
+      <template #supplier="{scope}">
+        <div style="display:flex;align-items:center">
+          <el-tooltip :content="'供应商公司编码 : ' + (scope.row.supplierNo || '--')" placement="top">
+            <i class="el-icon-warning-outline" style="margin-right:2px;cursor:pointer" />
+          </el-tooltip>
+          {{scope.row.supplierName}}
+        </div>
+      </template>
+
       <template #status="{ scope }">
         <el-tag
           :size="tablebtnSize"
@@ -151,17 +191,26 @@
           <i class="el-icon-view tb-icon" @click="getRouter('/sellOut/filingDetail', scope.row.id)"></i>
         </el-tooltip>
 
-        <el-tooltip
-          effect="dark"
-          content="修改"
-          placement="top"
-          v-if="!isSupertube && powers.includes('005')"
-        >
+        <el-tooltip effect="dark" content="修改" placement="top">
           <i
+            v-if="String(scope.row.status) === '1' && !isSupertube"
             class="el-icon-edit tb-icon"
             @click="getRouter('/sellOut/filingDetail', scope.row.id,'edit')"
           />
         </el-tooltip>
+
+        <!-- TODO:未开通供应商端账号可以在这里取消 -->
+        <el-tooltip effect="dark" content="取消转单" placement="top">
+          <i
+            v-if="
+              String(scope.row.status) !== '4' 
+              && String(scope.row.status) !== '5' 
+              && Number(scope.row.wsm_has_account) === 0
+            "
+            class="el-icon-refresh-right tb-icon"
+            @click="handleCancel(scope.row.id)"
+          ></i>
+        </el-tooltip>
       </template>
     </ex-table>
   </div>
@@ -230,6 +279,7 @@ export default {
       wsm_code: [],
       wsm_supplierNo: [],
       parmValue: {
+        supplierNo: [],
         companyCode: [],
         start_date: "", //新建起始时间
         end_date: "" // 新建结束时间
@@ -264,7 +314,7 @@ export default {
       const { page, size, start_date, end_date } = this.parmValue;
 
       this.pageInfo = {
-        size: size,
+        size: this.pageInfo.size,
         curr: page,
         total: 0
       };
@@ -277,6 +327,19 @@ export default {
   },
 
   methods: {
+    async handleCancel(id) {
+      const { code, message } = await asyncRequest.cancel({ id });
+      if (Number(code) === 0) {
+        this.searchList();
+      } else {
+        this.$message.warning(message);
+      }
+    },
+    async supplierChange(e) {
+      const { code, label } = e;
+      this.parmValue.supplierNo = code ? [code] : [];
+      this.searchList();
+    },
     getRouter(toRouter, queryId, type) {
       console.log(toRouter, queryId);
       if (toRouter && queryId) {
@@ -382,9 +445,15 @@ export default {
       const res = await asyncRequest.list({
         ...this.parmValue,
         ...this.timeOBJ,
+        ...this.pageInfo,
+        supplierNo: Array.isArray(this.parmValue.supplierNo)
+          ? this.parmValue.supplierNo[0]
+          : this.parmValue.supplierNo,
         companyCode: Array.isArray(this.parmValue.companyCode)
           ? this.parmValue.companyCode[0]
-          : this.parmValue.companyCode
+          : this.parmValue.companyCode,
+        noRelation: true,
+        customerCode: this.currentCompany
       });
       const { code, data } = await this.useResHandle(res);
       if (code === 0) {

Різницю між файлами не показано, бо вона завелика
+ 560 - 506
src/views/supplierSellOut/supplierFiling/config/columns.js


+ 1 - 1
src/views/supplierSellOut/supplierFiling/cpns/baseForm.vue

@@ -292,9 +292,9 @@
                 >
                   <el-option
                     v-for="group in options10"
-                    :key="group.id"
                     :label="group.name"
                     :value="group.id"
+                    :key="group.id"
                   />
                 </el-select>
               </el-form-item>

+ 93 - 25
src/views/supplierSellOut/supplierFiling/index.vue

@@ -10,14 +10,14 @@
       @page-curr-change="handlePageChange"
       @page-size-change="handleSizeChange"
       @screen-reset="
-          pageInfo.curr = 1;
-          parmValue.page = 1;
-          searchList();
+        pageInfo.curr = 1;
+        parmValue.page = 1;
+        searchList();
       "
       @screen-submit="
-          pageInfo.curr = 1;
-          parmValue.page = 1;
-          searchList();
+        pageInfo.curr = 1;
+        parmValue.page = 1;
+        searchList();
       "
       @selection="selection_change"
     >
@@ -40,9 +40,11 @@
                 size="mini"
                 placeholder="报备单号"
                 v-model="parmValue.filingCode"
-                @blur="pageInfo.curr = 1;
-                       parmValue.page = 1;
-                       searchList();"
+                @blur="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
               />
             </el-col>
 
@@ -51,9 +53,11 @@
                 size="mini"
                 placeholder="商品名称"
                 v-model="parmValue.good_name"
-                @blur="pageInfo.curr = 1;
-                     parmValue.page = 1;
-                     searchList();"
+                @blur="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
               />
             </el-col>
 
@@ -69,6 +73,7 @@
               <el-button type="warning" class="fr" :size="searchSize" @click="restSearch">重置</el-button>
             </el-col>
           </el-row>
+
           <el-row>
             <el-col :span="3" class="fr" style="width: 66px; margin-top: 10px">
               <el-button
@@ -76,14 +81,18 @@
                 :size="searchSize"
                 type="success"
                 style="float: right"
-                @click="routeGoto('/supplierSellOut/supplierFilingDetail', { id: 'add', type: 'add' })"
+                @click="
+                  routeGoto('/supplierSellOut/supplierFilingDetail', {
+                    id: 'add',
+                    type: 'add',
+                  })
+                "
               >添加</el-button>
             </el-col>
-
-            <el-col :span="4" style="margin-top:15px;">
+            <el-col :span="4" style="margin-top: 15px">
               <search-customer
                 size="mini"
-                :names="parmValue.khName"
+                :names="khName"
                 :is-detail="type !== 'add'"
                 :value="parmValue.companyCode"
                 placeholder="客户公司"
@@ -91,22 +100,32 @@
               />
             </el-col>
 
-            <el-col :span="4" style="margin-top:15px;margin-left:10px">
+            <el-col :span="4" style="margin-top: 15px;margin-left:10px">
+              <search-work-company
+                :value="parmValue.customerCode"
+                :placeholder="'业务公司'"
+                :size="'mini'"
+                @searchChange="company_idsearchChange"
+              />
+            </el-col>
+
+            <el-col :span="4" style="margin-top: 15px; margin-left: 10px">
               <el-select
                 clearable
                 size="mini"
-                placeholder="请选择状态"
+                placeholder="状态"
                 v-model="parmValue.status"
                 @change="
-                      pageInfo.curr = 1;
-                      parmValue.page = 1;
-                      searchList();"
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
               >
                 <el-option
                   v-for="status in statusOptions"
-                  :label="status.label"
-                  :value="status.value"
                   :key="status.value"
+                  :value="status.value"
+                  :label="status.label"
                 />
               </el-select>
             </el-col>
@@ -124,12 +143,42 @@
         </div>
       </template>
 
+      <template #company="{scope}">
+        <div style="display:flex;align-items:center">
+          <el-tooltip :content="'企业客户编码 : ' + (scope.row.companyCode || '--')" placement="top">
+            <i class="el-icon-warning-outline" style="margin-right:2px;cursor:pointer" />
+          </el-tooltip>
+          {{scope.row.companyName}}
+        </div>
+      </template>
+
+      <template #customer="{scope}">
+        <div style="display:flex;align-items:center">
+          <el-tooltip :content="'业务公司编码 : ' + (scope.row.customerCode || '--')" placement="top">
+            <i class="el-icon-warning-outline" style="margin-right:2px;cursor:pointer" />
+          </el-tooltip>
+          {{scope.row.customerName}}
+        </div>
+      </template>
+
+      <template #supplier="{scope}">
+        <div style="display:flex;align-items:center">
+          <el-tooltip :content="'供应商公司编码 : ' + (scope.row.supplierNo || '--')" placement="top">
+            <i class="el-icon-warning-outline" style="margin-right:2px;cursor:pointer" />
+          </el-tooltip>
+          {{scope.row.supplierName}}
+        </div>
+      </template>
+
       <template #status="{ scope }">
         <el-tag
           :size="tablebtnSize"
           v-text="
-          (statusOptions.find((item) => item.value == scope.row.status) || {}).label || '--'
-        "
+            (statusOptions.find(
+              (item) => item.value == scope.row.status) || {}
+            ).label ||
+            '--'
+          "
         ></el-tag>
       </template>
 
@@ -138,6 +187,14 @@
           <i
             class="el-icon-view tb-icon"
             @click="getRouter('/supplierSellOut/supplierFilingDetail', scope.row.id)"
+          ></i>
+        </el-tooltip>
+
+        <el-tooltip effect="dark" content="修改" placement="top">
+          <i
+            v-if="String(scope.row.status) === '1' && !isSupertube"
+            class="el-icon-edit tb-icon"
+            @click="getRouter('/supplierSellOut/supplierFilingDetail', scope.row.id,'edit')"
           />
         </el-tooltip>
 
@@ -152,6 +209,7 @@
     </ex-table>
   </div>
 </template>
+
 <script>
 import asyncRequest from "@/apis/service/sellOut/filing";
 import { columns, statusOptions } from "./config/columns";
@@ -218,6 +276,7 @@ export default {
       wsm_supplierNo: [],
       parmValue: {
         khName: "",
+        customerCode: [],
         companyCode: "",
         start_date: "", //新建起始时间
         end_date: "" // 新建结束时间
@@ -370,10 +429,14 @@ export default {
       const res = await asyncRequest.list({
         ...this.parmValue,
         ...this.timeOBJ,
+        ...this.pageInfo,
         khName: undefined,
         companyCode: Array.isArray(this.parmValue.companyCode)
           ? this.parmValue.companyCode[0]
           : this.parmValue.companyCode,
+        customerCode: Array.isArray(this.parmValue.customerCode)
+          ? this.parmValue.customerCode[0]
+          : this.parmValue.customerCode,
         supplierNo: this.currentCompany,
         noRelation: true
       });
@@ -389,6 +452,11 @@ export default {
       }
       this.loading = false;
     },
+    company_idsearchChange(e) {
+      const { code } = e;
+      this.parmValue.customerCode = code || "";
+      this.searchList();
+    },
     // 时间
     async handleTime(e) {
       this.timeOBJ.start_date = e?.startTime ?? "";

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