Browse Source

业务BUG修复

戴艳蓉 3 năm trước cách đây
mục cha
commit
f57ccbc517

+ 15 - 0
src/apis/service/purchase/pordeRGoods/index.js

@@ -0,0 +1,15 @@
+// 业务参数
+import http from '@/apis/axios'
+const api = 'Admin/'
+export default {
+  // 列表
+  list: (data, params) => http(api + 'paymentthinfo', data, 'post', params),
+  // // 分页查询供应商
+  // supplierlist: (data, params) => http(api + "supplierlist", data, "post", params),
+  // // 财务信息列表
+  // companylist: (data, params) => http(api + 'companyall', data, 'post', params),
+  // // 财务信息列表
+  // inv: (data, params) => http(api + 'paymentcgdinv', data, 'post', params),
+  // // 财务信息列表
+  // exam: (data, params) => http(api + 'paymentcgdexam', data, 'post', params),
+}

+ 6 - 3
src/components/Upload/index.vue

@@ -74,7 +74,7 @@ export default {
       return new Promise((resolve, reject) => {
         let that = this;
         if (!this.uploadcondition(files[i])) {
-          resolve('break');
+          resolve("break");
         } else {
           let form = new FormData();
           form.append("image", files[i]);
@@ -83,8 +83,11 @@ export default {
             .post(`${that.imgAPI}Admin/upload`, form)
             .then((res) => {
               if (res && res.data && res.status === 200 && res.data.data) {
-                let data = res.data.data;
-                resolve(`${that.imgAPI}storage/${data[0]}`);
+                const { url, name } = res.data.data[0];
+                resolve({
+                  url: `${that.imgAPI}storage/${url}`,
+                  name: name,
+                });
               } else {
                 reject();
               }

+ 1 - 1
src/views/InvoiceSales/capitalClaim/index.vue

@@ -298,7 +298,7 @@
           @size-change="handleSizeChange"
           @current-change="handlePageChange"
           :current-page="parmValue.page"
-          :page-sizes="[15, 50, 100, 500]"
+          :page-sizes="[15, 50, 100]"
           :page-size="parmValue.size"
           layout="total, sizes, prev, pager, next, jumper"
           :total="count"

+ 3 - 2
src/views/InvoiceSales/invoiceApply/addview.vue

@@ -852,10 +852,11 @@ export default {
     },
     goodChangeEnd(e) {
       if (e) {
-        const { remark, total_fee, good_num } = e;
+        const { remark, total_fee, good_num, unit } = e;
         this.tableData[this.activeIndex].remark = remark;
         this.tableData[this.activeIndex].total_fee = total_fee;
         this.tableData[this.activeIndex].good_num = good_num;
+        this.tableData[this.activeIndex].unit = unit;
       }
     },
     invAddChange() {
@@ -892,7 +893,6 @@ export default {
       this.tableData[index][key] = "text";
     },
     orderRefresh(e) {
-      
       let arr = JSON.parse(JSON.stringify(this.tableData));
       e.forEach((v1) => {
         let fi = arr.findIndex(
@@ -1403,6 +1403,7 @@ export default {
             remark: str,
             total_fee: v1.total_fee,
             num: v1.good_num,
+            unit:v1.unit
           };
           model.good.push(item);
         });

+ 17 - 3
src/views/InvoiceSales/invoiceApply/goodChangeDialog.vue

@@ -25,14 +25,19 @@
         class="demo-ruleForm"
       >
         <el-row>
-          <el-col :span="12">
+          <el-col :span="8">
             <el-form-item label="产品编号" prop="goodNo">
               <p>{{ ruleForm.goodNo }}</p>
             </el-form-item>
           </el-col>
-          <el-col :span="12">
+          <el-col :span="8">
             <el-form-item label="产品单价" prop="goodNo">
-              <p>{{ ruleForm.price}}</p>
+              <p>{{ ruleForm.price }}</p>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="产品单位" prop="unit">
+              <el-input v-model="ruleForm.unit" maxlength="200"></el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -134,6 +139,7 @@ export default {
         goodNo: "",
         goodname: "", // 账号
         remark: "",
+        unit: "",
         num: "",
         inv_num: "",
         over_num: "",
@@ -159,6 +165,13 @@ export default {
             trigger: "blur",
           },
         ],
+        unit: [
+          {
+            required: true,
+            message: "请输入商品单价",
+            trigger: "blur",
+          },
+        ],
         total_fee: [
           {
             required: true,
@@ -217,6 +230,7 @@ export default {
             over_num: "",
             good_num: "",
             total: "",
+            unit:"",
             ainv_fee: "",
             winv_fee: "",
             total_fee: "",

+ 1 - 0
src/views/InvoiceSales/refund/index.vue

@@ -374,6 +374,7 @@ export default {
           label: "操作",
           fixed: "right",
           _noset_: true,
+            width: "110px",
           _slot_: "operation",
         },
       ],

+ 1 - 1
src/views/InvoiceSales/relation/index.vue

@@ -564,7 +564,7 @@ export default {
         {
           prop: "",
           label: "操作",
-          width: "100px",
+          width: "120px",
           fixed: "right",
           _noset_: true,
           _slot_: "operation",

+ 1 - 1
src/views/InvoiceSales/relationQuery/index.vue

@@ -218,7 +218,7 @@
           @size-change="handleSizeChange"
           @current-change="handlePageChange"
           :current-page="parmValue.page"
-          :page-sizes="[15, 50, 100, 500]"
+          :page-sizes="[15, 50, 100]"
           :page-size="parmValue.size"
           layout="total, sizes, prev, pager, next, jumper"
           :total="count"

+ 1 - 0
src/views/InvoiceSales/returnTicket/index.vue

@@ -447,6 +447,7 @@ export default {
           label: "操作",
           fixed: "right",
           _noset_: true,
+           width: "110px",
           _slot_: "operation",
         },
       ],

+ 0 - 37
src/views/parameter/finance/addEdit.vue

@@ -64,33 +64,6 @@
                   :disabled="isDetail"
                 /> </el-form-item
             ></el-col>
-            <!-- <el-col :span="12">
-              <el-form-item
-                label="营业执照"
-                prop="company_img"
-                :disabled="isDetail"
-                class="activity-upload"
-              >
-                <div class="btnupload" style="position: relative">
-                  <img v-if="company_img" :src="company_img" class="avatar" />
-                  <i v-else class="el-icon-plus avatar-uploader-icon"></i>
-                  <Upload
-                    class="Upload"
-                    :accept="'.jpg,.png,.bmp,.jpeg,.gif'"
-                    :multiple="true"
-                    :uploadcondition="beforeAvatarUpload"
-                    @UploadErrorEvent="UploadErrorEvent"
-                    @UploadSuccessEvent="UploadSuccessEvent"
-                  ></Upload>
-                </div>
-                <div class="txt-tips fl">
-                  <p>大小:小于1M</p>
-                  <p>尺寸:100*100</p>
-                  <p>类型:jpg.png.bmp.jpeg.gif</p>
-                  <p></p>
-                </div>
-              </el-form-item>
-            </el-col> -->
             <el-col :span="24">
               <el-form-item label="联系地址" prop="company_address">
                 <el-input
@@ -117,26 +90,16 @@
 </template>
 <script>
 import asyncRequest from "@/apis/service/parameter/finance";
-import Upload from "@/components/Upload";
 import resToken from "@/mixins/resToken";
 import {
-  isnumber,
   isMobile,
   isLicense,
   isPhone,
-  validcontector,
-  isAlphanumeric,
-  isChinese,
-  isEmoticon,
-  validAlphabets,
 } from "@/utils/validate";
 export default {
   name: "Account",
   props: ["showModel", "id", "isDetail"],
   mixins:[resToken],
-  components: {
-    Upload,
-  },
   data() {
     const validateLicense = (rule, value, callback) => {
       if (value !== "") {

+ 35 - 6
src/views/purchase/orderRecord/components/InvoiceHead.vue

@@ -113,13 +113,16 @@
             </el-row>
           </el-col>
           <el-col :span="24" style="text-align: right" v-if="!isDetail">
-
-            <img v-viewer
+            <img
+              v-viewer
               style="width: 80px; heigth: 52px"
               class="fl"
               :src="img"
               alt=""
             />
+            <!-- <el-button type="primary" @click="abnormal"
+              >已发现发票异常,重新修改发票
+            </el-button> -->
             <el-button type="primary" @click="submitForm"
               >查看明细数据
             </el-button>
@@ -130,10 +133,12 @@
   </el-row>
 </template>
 <script>
+import asyncRequest from "@/apis/service/purchase/orderRecord";
+import resToken from "@/mixins/resToken";
 export default {
   name: "orderRecord",
-  props: ["newTime", "oldItem", "newItem", "isDetail", "img", "ratioItem"],
-
+  props: ["newTime", "oldItem", "newItem", "isDetail", "img", "ratioItem","id",  "payNo", "companyNo"],
+  mixins: [resToken],
   data() {
     return {
       examForm: {
@@ -219,7 +224,31 @@ export default {
       this.examsThis = this.exams;
       this.loading = false;
     },
-
+    async abnormal() {
+      console.log(this.id,this.payNo);
+      this.loading = true;
+      let model1 = {
+        sid: this.id,
+        payNo: this.payNo,
+        status: "3",
+      };
+      let res = await asyncRequest.again(model1);
+      if (res && res.code === 0) {
+        const title = "异常已提交,成功返回上一步!";
+        this.$notify.success({
+          title,
+          message: "",
+        });
+        this.showModelThis = false;
+        // 刷新
+        this.$emit("refreshAll");
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+      this.loading = false;
+    },
     async resetForm() {
       // 重置
       await this.$nextTick(() => {
@@ -264,7 +293,7 @@ export default {
           const obj = JSON.parse(JSON.stringify(this.examForm));
           if (obj.buyer_address !== this.oldItem.buyer_address) {
             console.log(obj.buyer_address);
-             console.log(this.oldItem.buyer_address);
+            console.log(this.oldItem.buyer_address);
             this.$message.error("购买方地址、电话不正确!");
             return;
           }

+ 6 - 3
src/views/purchase/orderRecord/components/InvoiceReview.vue

@@ -9,7 +9,12 @@
         @nextStep="nextStep"
         :isDetail="true"
         :img="img"
+        :id="id"
+        :payNo="payNo"
+        :companyNo="companyNo"
       ></invoice-head>
+      <!-- :isDetail="isDetail" -->
+      <!-- "payNo", "companyNo", "isDetail" -->
     </el-col>
     <el-col :span="24">
       <el-form
@@ -474,6 +479,7 @@ export default {
     },
     async initForm() {
       console.log(this.companyNo);
+      console.log(this.id, this.newTime, this.payNo, this.companyNo);
       // console.log(this.payNo);
       this.loading = true;
       this.examsThis = this.exams;
@@ -714,7 +720,6 @@ export default {
           const obj = JSON.parse(JSON.stringify(this.examineForm));
           obj.invid = this.examForm.id;
           console.log(obj);
-          debugger;
           if (obj.status === "4") {
             await this.setstatus(obj);
           } else {
@@ -737,7 +742,6 @@ export default {
       }
     },
     async lastOne() {
-      debugger;
       this.loading = false;
       if (this.activeImg + 1 == this.length) {
         await this.invoiceexam();
@@ -747,7 +751,6 @@ export default {
     },
 
     async invoiceexam() {
-      debugger;
       this.loading = true;
       let res = await asyncRequest.invoiceexam({
         sid: this.id,

+ 50 - 14
src/views/purchase/orderRecord/components/InvoiceUpload.vue

@@ -20,7 +20,14 @@
                   @mouseenter="item.show = true"
                   @mouseout="item.show = false"
                 >
-                  <img :src="item.image" class="avatar" />
+                  <img
+                    :src="item.image"
+                    class="avatar"
+                    :class="{
+                      error: item.status === '4' || item.status === '2',
+                    }"
+                  />
+                  <p class="img_name">{{ item.name }}</p>
                   <i
                     class="el-icon-close"
                     @click="closeImg(index, item.id)"
@@ -155,6 +162,7 @@ export default {
               id: v.id,
               image: v.image,
               status: v.status,
+              name: v.name,
               remark: v.remark ? v.remark.split(";") : "",
               show: false,
             };
@@ -178,14 +186,18 @@ export default {
           this.loading = true;
           const obj = JSON.parse(JSON.stringify(this.ruleForm));
           let isOk = true;
-
+          console.log(obj.image);
           let arr = [];
           obj.image.forEach((v) => {
             if (v.status === "3" || v.status === "4") {
               isOk = false;
             }
             if (v.id === "") {
-              arr.push(v.image);
+              let itemA = {
+                url: v.image,
+                name: v.name,
+              };
+              arr.push(itemA);
             }
           });
           if (!isOk) {
@@ -262,7 +274,8 @@ export default {
     //图片上传成功
     UploadSuccessEvent(data) {
       if (data && data.url && data.url !== "break") {
-        this.ruleForm.image.push({ id: "", image: data.url });
+        const { url, name } = data.url;
+        this.ruleForm.image.push({ id: "", image: url, name: name });
         this.$message.success("图片上传成功!");
         this.$refs.ruleForm.validateField("image");
       }
@@ -312,27 +325,46 @@ export default {
     .img-list-main {
       position: relative;
       width: auto;
-      border-left: 1px solid rgb(220, 223, 230);
+      vertical-align: top;
+      // border-left: 1px solid rgb(220, 223, 230);
       .img-item {
+        vertical-align: top;
         float: left;
         width: 254px;
-        height: 164px;
-        border: 1px solid rgb(220, 223, 230);
-        border-left: 0;
+        height: 186px;
         position: relative;
+        // background: chartreuse;
+        border: 0;
+        // border: 1px solid rgb(220, 223, 230);
+        // border-left: 0;
+        .img_name {
+          height: 20px;
+          line-height: 20px;
+          text-align: center;
+          font-size: 12px;
+          width: 100%;
+          display: inline-block;
+          vertical-align: top;
+          overflow: hidden;
+          margin: -15px 0 0 0;
+          // background: chartreuse;
+          padding: 0;
+        }
+
         &.error {
-          border: 1px solid #c03639;
           .error-m {
             position: absolute;
             background: #f2f2f2;
             left: 0;
             top: 0;
             z-index: 20;
-            width: 250px;
-            height: 160px;
-            line-height: 160px;
+            width: 254px;
+            height: 164px;
+            line-height: 164px;
             text-align: left;
             display: flex;
+            border: 1px solid #c03639;
+            box-sizing: border-box;
             align-items: center;
             padding: 16px;
             box-sizing: border-box;
@@ -358,7 +390,11 @@ export default {
         img {
           display: inline-block;
           width: 100%;
-          height: 100%;
+          height: 164px;
+          border: 1px solid rgb(220, 223, 230);
+          &.error {
+            border: 1px solid #c03639;
+          }
         }
         i {
           position: absolute;
@@ -377,7 +413,7 @@ export default {
     .btnupload {
       float: left;
       border: 1px solid rgb(220, 223, 230);
-      border-left: 0;
+      // border-left: 0;
       box-sizing: border-box;
       width: 254px;
       height: 164px;

+ 2 - 2
src/views/purchase/orderRecord/components/receipt.vue

@@ -231,8 +231,8 @@ export default {
     //图片上传成功
     UploadSuccessEvent(data) {
       if (data.url !== "break") {
-        console.log(data);
-        this.ruleForm.image.push({ id: "", image: data.url });
+        const { url } = data.url;
+        this.ruleForm.image.push({ id: "", image: url });
         this.$message.success("图片上传成功!");
         this.$refs.ruleForm.validateField("image");
       }

+ 16 - 11
src/views/purchase/orderRecord/index.vue

@@ -90,7 +90,7 @@
           <el-row :gutter="10">
             <el-col :span="8" style="width: 155px">
               <el-select
-                v-model="parmValue.inv_status"
+                v-model="parmValue.pay_status"
                 clearable
                 :size="searchSize"
                 placeholder="付款状态"
@@ -610,16 +610,16 @@ export default {
       code: [],
       // 状态
       dstatusOptions: [
-        { id: 0, label: "待提交申请" },
-        { id: 1, label: "待业务审核" },
-        { id: 2, label: "业务审核驳回" },
-        { id: 3, label: "待上传发票" },
-        { id: 4, label: "待识别发票" },
-        { id: 5, label: "待校验结果" },
-        { id: 6, label: "待审核发票" },
-        { id: 7, label: "回票已完成" },
-        // { id: 8, label: "回票已完成" },
-        { id: 9, label: "识别未成功" },
+        { id: " 0", label: "待提交申请" },
+        { id: "1", label: "待业务审核" },
+        { id: "2", label: "业务审核驳回" },
+        { id: "3", label: "待上传发票" },
+        { id: "4", label: "待识别发票" },
+        { id: "5", label: "待校验结果" },
+        { id: "6", label: "待审核发票" },
+        { id: "7", label: "回票已完成" },
+        // { id: "8", label: "回票已完成" },
+        { id: "9", label: "识别未成功" },
       ],
       options: [
         { id: "0", label: "待提交申请" },
@@ -660,6 +660,9 @@ export default {
         startTime: "",
         endTime: "",
         supplierNo: "", //
+        apply: "",
+        pay_status: "",
+        inv_status: "",
         payNo: "", //
         page: 1, // 页码
         size: 15, // 每页显示条数
@@ -805,6 +808,8 @@ export default {
         supplierNo: "", //
         payNo: "", //
         apply: "",
+        pay_status: "",
+        inv_status: "",
         page: 1, // 页码
         size: 15, // 每页显示条数
       };

+ 625 - 0
src/views/purchase/pordeRGoods/index.vue

@@ -0,0 +1,625 @@
+<template>
+  <div class="porder pagePadding">
+    <ex-table
+      v-loading="loading"
+      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
+      :table="table"
+      :data="tableData"
+      :columns="columns"
+      :page="pageInfo"
+      :size="size"
+      @page-curr-change="handlePageChange"
+      @page-size-change="handleSizeChange"
+      @screen-reset="
+        pageInfo.curr = 1;
+        parmValue.page = 1;
+        searchList();
+      "
+      @screen-submit="
+        pageInfo.curr = 1;
+        parmValue.page = 1;
+        searchList();
+      "
+    >
+      <template #table-header="{ selection }">
+        <div style="width: 100%">
+          <el-row style="padding: 0 0 10px 80px">
+            <el-col :span="8" style="width: 440px">
+              <el-select
+                v-model="code"
+                multiple
+                filterable
+                remote
+                :multiple-limit="1"
+                reserve-keyword
+                :size="searchSize"
+                style="width: 100%"
+                placeholder="供应商名称"
+                :remote-method="remoteMethod"
+                :loading="selectLoading"
+                @change="selectChange"
+              >
+                <el-option
+                  v-for="item in activeOptions"
+                  :key="item.code"
+                  :label="item.name + '--------' + item.contector"
+                  :value="item.code"
+                />
+              </el-select>
+            </el-col>
+          </el-row>
+          <el-row :gutter="10">
+            <el-col :span="8" style="width: 120px">
+              <el-select
+                v-model="parmValue.send_status"
+                clearable
+                :size="searchSize"
+                placeholder="发货状态"
+                @change="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-option
+                  v-for="item in send_status_list"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+            </el-col>
+            <el-col :span="8" style="width: 120px">
+              <el-select
+                v-model="parmValue.payinfo"
+                clearable
+                :size="searchSize"
+                placeholder="付款状态"
+                @change="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-option
+                  v-for="item in pay_status_list"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+            </el-col>
+            <el-col :span="8" style="width: 120px">
+              <el-select
+                v-model="parmValue.invinfo"
+                clearable
+                :size="searchSize"
+                placeholder="回票状态"
+                @change="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-option
+                  v-for="item in inv_status_list"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+            </el-col>
+            <el-col :span="8" style="width: 120px">
+              <el-select
+                v-model="parmValue.th_status"
+                clearable
+                :size="searchSize"
+                placeholder="退货状态"
+                @change="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-option
+                  v-for="item in th_status_list"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+            </el-col>
+            <el-col :span="5" style="width: 350px">
+              <el-input
+                clearable
+                style="width: 100%"
+                :size="searchSize"
+                placeholder="关键字"
+                v-model="input"
+              >
+                <el-select
+                  v-model="selectK"
+                  slot="prepend"
+                  style="width: 125px"
+                  placeholder="请选择"
+                >
+                  <el-option
+                    v-for="item in selectKlist"
+                    :key="item.code"
+                    :label="item.name"
+                    :value="item.code"
+                  ></el-option>
+                </el-select>
+                <el-button
+                  slot="append"
+                  icon="el-icon-search"
+                  @click.native="searchList"
+                ></el-button>
+              </el-input>
+            </el-col>
+            <el-col :span="3" style="width: 66px; float: right">
+              <el-button
+                v-if="powers.some((item) => item == '002')"
+                :size="searchSize"
+                type="primary"
+                class="fr"
+                style="margin-left: 10px"
+                @click="searchList"
+              >
+                刷新
+              </el-button>
+            </el-col>
+            <el-col :span="3" style="width: 66px; float: right">
+              <el-button
+                type="warning"
+                class="fr"
+                v-if="powers.some((item) => item == '024')"
+                :size="searchSize"
+                @click="restSearch"
+              >
+                重置
+              </el-button>
+            </el-col>
+          </el-row>
+        </div>
+      </template>
+      <template #th_status="{ scope }">
+        <el-tag
+          size="mini"
+          :type="
+            scope.row.th_status == '3'
+              ? 'danger'
+              : scope.row.th_status == '2'
+              ? 'success'
+              : 'warning'
+          "
+          v-text="
+            (
+              th_status_list.find(
+                (item) => item.value == scope.row.th_status
+              ) || {}
+            ).label || '--'
+          "
+        ></el-tag>
+      </template>
+      <template #is_th="{ scope }">
+        <el-tag
+          size="mini"
+          :type="scope.row.is_th == '1' ? 'success' : 'warning'"
+          >{{ scope.row.is_th == "1" ? "同意" : "不同意" }}</el-tag
+        >
+      </template>
+    </ex-table>
+    <no-auth v-else></no-auth>
+  </div>
+</template>
+<script>
+import asyncRequest from "@/apis/service/purchase/pordeRGoods";
+import ExTable from "@/components/ExTableNew.vue";
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import { mapGetters } from "vuex";
+export default {
+  name: "pordeRGoods",
+  components: {
+    ExTable,
+  },
+  mixins: [mixinPage, resToken],
+  computed: {
+    //组件SIZE设置
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "pordeRGoods"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+      selectK: "1",
+      input: "",
+      selectKlist: [
+        {
+          code: "1",
+          name: "采购单编码",
+        },
+        {
+          code: "2",
+          name: "确认单号",
+        },
+        {
+          code: "3",
+          name: "确认单产品单号",
+        },
+      ],
+      code: [],
+      showModel1: false,
+      showModel2: false,
+      selectLoading: false,
+      activeOptions: [],
+      selection: [],
+      th_status_list: [
+        {
+          value: "1",
+          label: "已完成",
+        },
+        {
+          value: "2",
+          label: "进行中",
+        },
+        {
+          value: "3",
+          label: "已取消",
+        },
+      ],
+      // 状态
+      statusOptions: [
+        { id: "0", label: "禁用" },
+        { id: "1", label: "启用" },
+      ],
+      pickerOptions: {
+        // disabledDate是一个函数,参数是当前选中的日期值,这个函数需要返回一个Boolean值,
+        disabledDate(time) {
+          let date = new Date().valueOf();
+          const one = 1000 * 60 * 60 * 24;
+          date = parseInt(date / one) * one;
+          return time.getTime() <= date;
+        },
+      },
+      loading: false,
+      modelId: 0,
+      parmValue: {
+        name: "", // 账户
+        code: "", // code
+        sequenceNo: "",
+        inv_company: "",
+        inv_status: "",
+        send_status: "",
+        payinfo: "",
+        invinfo: "",
+        th_status: "",
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      },
+      formValue: {
+        name: "", // 账户
+        page: 1, // 页码
+        size: 100, // 每页显示条数
+      },
+      // 表格 - 数据
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      // 表格 - 列参数
+      columns: [
+        {
+          prop: "thNo",
+          label: "退货单号",
+          width: "125px",
+          fixed: "left",
+        },
+        {
+          prop: "th_status",
+          label: "退货状态",
+          _slot_: "th_status",
+          width: "75px",
+        },
+
+        {
+          prop: "th_qrdNo",
+          label: "确认单号",
+          width: "135px",
+        },
+        {
+          prop: "th_qrdcpNo",
+          label: "确认单产品号",
+          width: "155px",
+        },
+        {
+          prop: "th_cgdNo",
+          label: "采购单号",
+          width: "135px",
+        },
+        {
+          prop: "th_company",
+          label: "退货供货商",
+          "min-width": "120px",
+        },
+        {
+          prop: "th_user",
+          label: "申请人",
+          width: "65px",
+        },
+        {
+          prop: "th_num",
+          label: "退货数量",
+          width: "90px",
+        },
+        {
+          prop: "th_qrd_fee",
+          label: "退货确认单金额",
+          width: "110px",
+        },
+        {
+          prop: "th_cgd_fee",
+          label: "退货采购单金额",
+          width: "110px",
+        },
+         {
+          prop: "th_post_fee",
+          label: "快递费",
+          width: "80px",
+        },
+        {
+          prop: "is_th",
+          label: "供货商支出退货",
+          _slot_: "is_th",
+          width: "110px",
+        },
+         {
+          prop: "th_remark",
+          label: "退回备注",
+          width: "110px",
+        },
+        
+        {
+          prop: "createtime",
+          label: "下单时间",
+          width: "145px",
+        },
+      ],
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+  methods: {
+    async restSearch() {
+      this.selectK = "1";
+      this.input = "";
+      this.code = [];
+      this.parmValue.code = this.code.join(",");
+      this.parmValue.sequenceNo = "";
+      this.parmValue.page = 1;
+      this.pageInfo.curr = 1;
+      this.parmValue.inv_company = "";
+      this.parmValue.inv_status = "";
+      this.parmValue.send_status = "";
+      this.parmValue.owner = "";
+      await this.searchList();
+    },
+    async searchList() {
+      this.loading = true;
+      this.parmValue.sequenceNo = this.selectK === "1" ? this.input : "";
+      this.parmValue.inv_company = this.selectK === "2" ? this.input : "";
+      this.parmValue.owner = this.selectK === "3" ? this.input : "";
+      const res = await asyncRequest.list(this.parmValue);
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+        this.pageInfo.total = Number(res.data.count);
+        this.formatGoodList();
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    },
+    async selectChange() {
+      console.log(this.code);
+      this.parmValue.code = this.code.join(",");
+      this.formValue.page = 1;
+      this.pageInfo.curr = 1;
+      await this.searchList();
+    },
+    setBilling(selection) {
+      this.selection = [];
+      if (selection && selection.length === 0) {
+        this.$message.error("请选择采购单");
+        return;
+      }
+      this.selection = selection;
+
+      this.showModel1 = true;
+      this.showModel2 = false;
+      console.log(selection);
+    },
+
+    examBilling(selection) {
+      if (selection && selection.length === 0) {
+        this.$message.error("请选择采购单");
+        return;
+      }
+      let isok = true;
+      selection.forEach((v1) => {
+        if (v1.inv_status !== "1") {
+          isok = false;
+        }
+      });
+      if (!isok) {
+        this.$message.error("只有待审核的采购单才能进行审核操作!");
+        return;
+      }
+      this.selection = selection;
+      console.log(selection);
+      this.showModel1 = false;
+      this.showModel2 = true;
+    },
+    formatGoodList() {
+      this.tableData.map((v1) => {
+        v1.purchasePrice = v1.purchasePrice
+          ? parseFloat(v1.purchasePrice + "").toFixed(2)
+          : "-";
+        v1.totalPrice = v1.totalPrice
+          ? parseFloat(v1.totalPrice + "").toFixed(2)
+          : "-";
+
+        v1.pay_fee = v1.pay_fee ? parseFloat(v1.pay_fee + "").toFixed(2) : "-";
+        v1.wait_fee = v1.wait_fee
+          ? parseFloat(v1.wait_fee + "").toFixed(2)
+          : "-";
+        v1.price = v1.price ? parseFloat(v1.price + "").toFixed(2) : "-";
+        v1.nakedPrice = v1.nakedPrice
+          ? parseFloat(v1.nakedPrice + "").toFixed(2)
+          : "-";
+        v1.markPrice = v1.markPrice
+          ? parseFloat(v1.markPrice + "").toFixed(2)
+          : "-";
+
+        v1.packPrice = v1.packPrice
+          ? parseFloat(v1.packPrice + "").toFixed(2)
+          : "-";
+        v1.certPrice = v1.certPrice
+          ? parseFloat(v1.certPrice + "").toFixed(2)
+          : "-";
+
+        v1.openPrice = v1.openPrice
+          ? parseFloat(v1.openPrice + "").toFixed(2)
+          : "-";
+        v1.craftPrice = v1.certPrice
+          ? parseFloat(v1.craftPrice + "").toFixed(2)
+          : "-";
+
+        v1.postPrice = v1.postPrice
+          ? parseFloat(v1.postPrice + "").toFixed(2)
+          : "-";
+        v1.weight = v1.weight ? parseFloat(v1.weight + "").toFixed(2) : "-";
+
+        v1.diff_fee = v1.diff_fee
+          ? parseFloat(v1.diff_fee + "").toFixed(2)
+          : "-";
+        v1.price = v1.price ? parseFloat(v1.price + "").toFixed(2) : "-";
+
+        v1.inv_open_fee = v1.inv_open_fee
+          ? parseFloat(v1.inv_open_fee + "").toFixed(2)
+          : "-";
+        v1.inv_wait_fee = v1.inv_wait_fee
+          ? parseFloat(v1.inv_wait_fee + "").toFixed(2)
+          : "-";
+
+        return v1;
+      });
+    },
+    async statusConfirm(id, status) {
+      await this.$confirm(`确定要改为${status === "1" ? "禁用" : "启用"}?`, {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          this.loading = true;
+          const model = {
+            companyNo: id,
+            status: status === "1" ? "0" : "1",
+          };
+          const res = await asyncRequest.status(model);
+          if (res && res.code === 0) {
+            this.loading = false;
+            this.$notify.success({
+              title: "状态修改成功!",
+              message: "",
+            });
+            await this.searchList();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.loading = false;
+            this.$message.warning(res.message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+    async remoteMethod(query) {
+      this.selectLoading = true;
+      if (query !== "") {
+        this.activeOptions = [];
+        this.formValue.name = query;
+        const res = await asyncRequest.supplierlist(this.formValue);
+        if (res && res.code === 0 && res.data && res.data.list) {
+          this.activeOptions = res.data.list;
+        } else if (res && res.code >= 100 && res.code <= 104) {
+          await this.logout();
+        } else {
+          this.$message.warning(res.message);
+        }
+      } else {
+        this.activeOptions = [];
+      }
+      this.selectLoading = false;
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.porder {
+  background: rgba(242, 242, 242, 1);
+  min-height: 100%;
+  width: 100%;
+  height: 100%;
+  // background-color: $bg;
+  overflow: hidden;
+
+  // position: absolute;
+  z-index: 2;
+  background: #fff;
+  .change {
+    .title {
+      border-width: 0px;
+      width: 100%;
+      height: 100px;
+      // display: flex;
+      font-weight: 400;
+      font-style: normal;
+      font-size: 22px;
+      text-align: left;
+      padding: 0;
+      padding: 60px 0 0 100px;
+      width: 100%;
+      box-sizing: border-box;
+    }
+  }
+}
+</style>

+ 0 - 0
src/views/purchase/pordeRGoods/采购退货单管理


+ 1 - 1
src/views/system/updates/index.vue

@@ -39,7 +39,7 @@
           @size-change="handleSizeChange"
           @current-change="handlePageChange"
           :current-page="parmValue.page"
-          :page-sizes="[15, 50, 100, 500]"
+          :page-sizes="[15, 50, 100]"
           :page-size="parmValue.size"
           layout="total, sizes, prev, pager, next, jumper"
           :total="count"