Selaa lähdekoodia

代码提交/码单打印当前为前端打印

lph 10 kuukautta sitten
vanhempi
säilyke
802e27d798

+ 8 - 0
zkqy-ui/src/api/tablelist/commonTable.js

@@ -466,3 +466,11 @@ export function againRecordBatch(data) {
     data: data,
   })
 }
+// 订单管理   校验订单是否已全部记录批次
+export function checkOrder(data) {
+  return request({
+    url: '/system/order/checkOrder',
+    method: 'get',
+    params: data,
+  })
+}

+ 3 - 0
zkqy-ui/src/views/orderMange/codeListManage/printIndex.vue

@@ -819,6 +819,9 @@ export default {
         // this.$message.success(`总码单打印成功!`);
         // 前端打印
         codeListPrint(this.printTableData, "printDom");
+
+        // 更新总码单id
+        this.summertId = new Date().getTime(); //总码单id重新生成
       } else {
         this.$message.error(`${msg}箱单失败`);
       }

+ 5 - 1
zkqy-ui/src/views/orderMange/components/dialogForm/OutBound.vue

@@ -200,6 +200,10 @@ export default {
   methods: {
     // 记录批次回调
     async myRecordBatchHandler(row, btnData) {
+      if (!this.tableData.length) {
+        this.$message.error("暂无数据需要记录批次");
+        return;
+      }
       this.isCanRecordBatch = true;
       let payload = this.tableData.map((item) => {
         let { saleNo } = this.row;
@@ -233,7 +237,7 @@ export default {
       let result = await printOutsourceOrder(payload);
       if (result.code == 200) {
         this.$message.success("记录成功");
-        this.getTableData(this.row);
+        this.getTableData(this.row, false);
       } else {
         this.$message.error(result.msg);
       }

+ 27 - 2
zkqy-ui/src/views/orderMange/components/dialogForm/OutStockDetail.vue

@@ -63,7 +63,7 @@
     >
       <el-table-column type="expand">
         <template slot-scope="props">
-          <el-table :data="props.row.children" border stripe>
+          <el-table :row-style="rowStyleFun" :data="props.row.children" border>
             <el-table-column type="index" width="50" />
             <el-table-column
               v-for="col in columns"
@@ -187,6 +187,20 @@ export default {
     this.row = {};
   },
   methods: {
+    // 行样式
+    rowStyleFun(scope) {
+      let { row, rowIndex } = scope;
+      if (row.confirmOut == 0) {
+        console.log(row.confirmOut == 0);
+        //手持机出库数据  还未进行pc出库
+        // return "background-color: #55e905;";
+        return {
+          backgroundColor: "#55e905",
+        };
+      } else {
+        return {};
+      }
+    },
     // 判断该行是否是最后一个需要重新登账的数据
     getIsLastReAcount(row) {
       return (
@@ -220,6 +234,10 @@ export default {
             returnReceipt: 0,
             orderUpdate: isLastReAcount,
           };
+          payload.isOrederUpdate =
+            this.tableData.filter((item) => item.batchState == 1)?.length > 1
+              ? false
+              : true;
           let res = await againRecordBatch(payload);
           if (res.code == 200) {
             this.$message.success("重新登账成功");
@@ -237,11 +255,12 @@ export default {
     },
     // 获取详情回调
     async getDetail(tree) {
-      console.log(1111);
       let res = await outboundDetails({
         saleOrderNo: tree.saleNo,
         productNo: tree.productNo,
         isEnablePaging: false,
+        batchNumber: tree.batchNumber,
+        confirmOut: 1,
       });
       if (res.code == 200) {
         tree.children = res.rows;
@@ -465,6 +484,12 @@ export default {
           this.allTableData.filter((v) => v.batchNumber === val) || []
         )
       );
+      this.$nextTick(() => {
+        //关闭所有展开行
+        this.tableData.forEach((item) => {
+          this.$refs.tableRef.toggleRowExpansion(item, false);
+        });
+      });
     },
     // 获取批号选项数据
     getBatchOptions(rows) {

+ 10 - 0
zkqy-ui/src/views/orderMange/index.vue

@@ -845,6 +845,7 @@ import {
   getProductSpecificationsByProductName,
   printOutsourceOrder,
   productColourList,
+  checkOrder,
 } from "@/api/tablelist/commonTable";
 import { updateOrder } from "@/api/system/retailMange.js";
 import { listData } from "@/api/system/tenant/data";
@@ -3639,6 +3640,15 @@ export default {
         type: "warning",
       })
         .then(async () => {
+          let checkPayload = {
+            saleNo: row.saleNo,
+            batchNumber: 0,
+          };
+          let checkRes = await checkOrder(checkPayload);
+          if (!checkRes) {
+            this.$message.error("请前往'打印销售单'记录批次");
+            return;
+          }
           let payload = {
             id: row.id,
             status: 6,

+ 28 - 6
zkqy-ui/src/views/orderMange/outStock/index.vue

@@ -291,7 +291,7 @@
         >
           <el-table
             ref="tableRef"
-            :data="batchMap[activeName].list"
+            :data="tableData"
             border
             stripe
             row-key="productNo"
@@ -319,7 +319,9 @@
                     <template slot-scope="scope">
                       <el-button
                         v-show="
-                          props.row.batchState == 1 || scope.row.confirmOut == 0
+                          !props.row.batchNumber ||
+                          props.row.batchState == 1 ||
+                          scope.row.confirmOut == 0
                         "
                         size="mini"
                         type="danger"
@@ -405,6 +407,7 @@ export default {
   data() {
     return {
       // 详情弹窗数据  start
+      detailBatchData: [], //批次详情数据
       load: true,
       currentSaleOrder: {}, //当前订单数据
       detailVisible: false,
@@ -564,6 +567,14 @@ export default {
         }
       });
       this.batchOptions = Object.values(this.batchMap);
+      this.detailVisible = true;
+      this.$nextTick(() => {
+        // this.$refs.tableRef.doLayout();
+        console.log(this.$refs.tableRef);
+        this.tableData.forEach((item) => {
+          this.$refs.tableRef[0].toggleRowExpansion(item, false);
+        });
+      });
     },
     // 获取出库详情回调
     async outStockDetailHandler() {
@@ -573,10 +584,6 @@ export default {
       console.log("lotRes", lotRes);
       if (lotRes.code == 200) {
         this.initPatchData(lotRes.data);
-        this.detailVisible = true;
-        this.$nextTick(() => {
-          this.$refs.tableRef.doLayout();
-        });
       }
     },
     // 批次改变
@@ -717,6 +724,13 @@ export default {
             .then(async () => {
               let payLoad = { ...this.form };
               payLoad.transferWarehouse = payLoad.deliveryWarehouse;
+              payLoad.saleOrderNo = this.currentSaleOrder.saleOrderNo;
+              // 所有批次中,只要有一个状态处于重新登账状态为false
+              payLoad.orderUpdate = this.detailBatchData.some(
+                (item) => item.batchState == 1
+              )
+                ? false
+                : true;
               if (!this.form.id) {
                 return;
               }
@@ -856,6 +870,10 @@ export default {
           this.allSaleProductInfoList = JSON.parse(
             JSON.stringify(saleProductInfoList)
           );
+          console.log(
+            "this.allSaleProductInfoList",
+            this.allSaleProductInfoList
+          );
           this.saleProductInfoList =
             this.formateProductData(saleProductInfoList);
           // 使用 reduce 方法来累加相同 productCode 和 productColor 的第一条数据的 boxNum
@@ -923,6 +941,7 @@ export default {
             },
           ];
           this.form.batchNumber = "all";
+          this.detailBatchData = JSON.parse(JSON.stringify(lotRes.data));
 
           lotRes.data.forEach((item) => {
             if (!item.batchNumber) {
@@ -955,6 +974,9 @@ export default {
     ...mapState({
       nickName: (state) => state.user.nickName,
     }),
+    tableData() {
+      return this.batchMap[this.activeName].list;
+    },
   },
   mounted() {
     this.initData();

+ 670 - 0
zkqy-ui/src/views/system/financialManage/invoiceDetail.vue

@@ -0,0 +1,670 @@
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="68px"
+    >
+      <!-- <el-form-item label="流水号" prop="serialNumber">
+        <el-input
+          v-model="queryParams.serialNumber"
+          placeholder="请输入流水号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item> -->
+      <el-form-item label="日期范围" prop="otherCollectionDate">
+        <!-- <el-date-picker
+          clearable
+          v-model="queryParams.otherCollectionDate"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="请选择日期"
+        >
+        </el-date-picker> -->
+        <el-date-picker
+          v-model="timeRange"
+          type="daterange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          @change="timeRangeChange"
+        >
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="客户" prop="customerId">
+        <!-- <el-input
+          v-model="queryParams.customerId"
+          placeholder="请输入客户编号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        /> -->
+        <el-select
+          v-model="queryParams.customerId"
+          placeholder="请选择客户"
+          clearable
+          filterable
+          @change="handleQuery"
+        >
+          <el-option
+            v-for="item in customSelectData"
+            :key="item.id"
+            :label="item.customName"
+            :value="item.id"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <!-- <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['system:SaleOtherCollection:add']"
+          >新增</el-button
+        >
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['system:SaleOtherCollection:edit']"
+          >修改</el-button
+        >
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['system:SaleOtherCollection:remove']"
+          >删除</el-button
+        >
+      </el-col> -->
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['system:SaleOtherCollection:export']"
+          >导出</el-button
+        >
+      </el-col>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
+    </el-row>
+
+    <el-table
+      v-loading="loading"
+      :data="SaleOtherCollectionList"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="客户代码" align="center" prop="serialNumber" />
+      <el-table-column label="客户" align="center" prop="customerName" />
+      <el-table-column label="期初" align="center">
+        <el-table-column label="应收"></el-table-column>
+        <el-table-column label="开票"></el-table-column>
+      </el-table-column>
+      <el-table-column label="上期" align="center">
+        <el-table-column label="应收"></el-table-column>
+        <el-table-column label="开票"></el-table-column>
+      </el-table-column>
+      <el-table-column label="本期" align="center">
+        <el-table-column label="应收"></el-table-column>
+        <el-table-column label="开票"></el-table-column>
+        <el-table-column label="已收"></el-table-column>
+      </el-table-column>
+      <el-table-column label="期末" align="center">
+        <el-table-column label="应收"></el-table-column>
+        <el-table-column label="开票"></el-table-column>
+        <el-table-column label="差额"></el-table-column>
+      </el-table-column>
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
+        <template slot-scope="scope">
+          <el-dropdown>
+            <el-button type="warning" plain size="small">
+              操作<i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <!-- <el-dropdown-item
+                v-show="scope.row.status == 1 || scope.row.status == 3"
+                ><el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-edit"
+                  @click="handleUpdate(scope.row)"
+                  v-hasPermi="['system:SaleOtherCollection:edit']"
+                  >修改</el-button
+                ></el-dropdown-item
+              > -->
+              <el-dropdown-item
+                ><el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-c-scale-to-original"
+                  @click="handleDetail(scope.row)"
+                  >查看明细</el-button
+                ></el-dropdown-item
+              >
+              <!-- <el-dropdown-item
+                v-show="scope.row.status == 1 || scope.row.status == 3"
+                ><el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-circle-check"
+                  @click="handleSubmit(scope.row)"
+                  v-hasPermi="['system:SaleOtherCollection:edit']"
+                  >提交</el-button
+                ></el-dropdown-item
+              > -->
+              <!-- <el-dropdown-item
+                v-show="scope.row.status == 1 || scope.row.status == 3"
+                ><el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-delete"
+                  @click="handleDelete(scope.row)"
+                  v-hasPermi="['system:SaleOtherCollection:remove']"
+                  >删除</el-button
+                ></el-dropdown-item
+              > -->
+            </el-dropdown-menu>
+          </el-dropdown>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改其他收款对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
+      <el-row :gutter="20">
+        <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+          <!-- <el-form-item label="流水号" prop="serialNumber">
+          <el-input v-model="form.serialNumber" placeholder="请输入流水号" />
+        </el-form-item> -->
+          <el-col :span="12">
+            <el-form-item label="日期" prop="otherCollectionDate">
+              <el-date-picker
+                clearable
+                v-model="form.otherCollectionDate"
+                type="date"
+                value-format="yyyy-MM-dd"
+                placeholder="请选择日期"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="客户" prop="customerId">
+              <el-select
+                v-model="form.customerId"
+                placeholder="请选择客户"
+                clearable
+                filterable
+              >
+                <el-option
+                  v-for="item in customSelectData"
+                  :key="item.id"
+                  :label="item.customName"
+                  :value="item.id"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="经办人" prop="personInChargeId">
+              <el-select
+                v-model="form.personInChargeId"
+                placeholder="请选择经办人"
+                clearable
+                filterable
+              >
+                <el-option
+                  v-for="item in financeSelectData"
+                  :key="item.userId"
+                  :label="item.nickName"
+                  :value="item.userId"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="付款方式" prop="paymentMethod">
+              <el-select
+                v-model="form.paymentMethod"
+                placeholder="请选择付款方式"
+                clearable
+                filterable
+              >
+                <el-option
+                  v-for="item in dict.type
+                    .collection_registration_payment_method"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="出门证号" prop="travelCertificateNumber">
+              <el-input
+                v-model="form.travelCertificateNumber"
+                placeholder="请输入出门证号"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="部门" prop="deptId">
+              <!-- <el-input v-model="form.deptId" placeholder="请输入部门编号" /> -->
+              <el-select
+                v-model="form.deptId"
+                placeholder="请选择部门"
+                clearable
+                filterable
+              >
+                <el-option
+                  v-for="item in deptSelectData"
+                  :key="item.deptId"
+                  :label="item.deptName"
+                  :value="item.deptId"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <!-- <el-form-item label="收款明细" prop="collectionDetails">
+            <el-input
+              v-model="form.collectionDetails"
+              placeholder="请输入收款明细"
+            />
+          </el-form-item> -->
+          <el-col :span="12">
+            <el-form-item label="应收项目" prop="itemReceivable">
+              <!-- <el-input
+                v-model="form.itemReceivable"
+                placeholder="请输入应收项目"
+              /> -->
+              <el-select
+                v-model="form.itemReceivable"
+                placeholder="请选择应收项目"
+                clearable
+                filterable
+              >
+                <el-option
+                  v-for="item in dict.type.item_receivable"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="金额" prop="amount">
+              <el-input v-model="form.amount" placeholder="请输入金额" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="备注" prop="collectionDetails">
+              <el-input
+                v-model="form.collectionDetails"
+                placeholder="请输入备注"
+              />
+            </el-form-item>
+          </el-col>
+        </el-form>
+      </el-row>
+      <!-- 应收表格 -->
+      <!-- <el-table
+        :data="receiveTableData"
+        border
+        stripe
+        @selection-change="handleSelectionChange"
+      >
+        <el-table-column type="index" width="50" />
+        <el-table-column label="应收项目" prop="itemReceivable" />
+        <el-table-column label="金额" prop="amount" />
+        <el-table-column label="操作">
+          <template slot-scope="scope"> </template>
+        </el-table-column>
+      </el-table> -->
+
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 明细弹窗 -->
+  </div>
+</template>
+
+<script>
+import {
+  listSaleOtherCollection,
+  getSaleOtherCollection,
+  delSaleOtherCollection,
+  addSaleOtherCollection,
+  updateSaleOtherCollection,
+  getDeptList,
+  getFinanceList,
+} from "@/api/system/SaleOtherCollection";
+import { getCustomList } from "@/api/system/SaleRegistrationCollection";
+import moment from "moment";
+
+export default {
+  name: "SaleOtherCollection",
+  dicts: [
+    "collection_registration_payment_method",
+    "item_receivable",
+    "registration_collection_status",
+  ],
+  data() {
+    return {
+      detailShow: false, //明细弹窗
+      timeRange: [],
+      financeSelectData: [], //经办人选择数据
+      deptSelectData: [], //部门选择数据
+      customSelectData: [], //客户选择数据
+      receiveTableData: [], //应收款表格数据
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 其他收款表格数据
+      SaleOtherCollectionList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        settlementUnitId: null, //结算单位
+        customerId: null, //客户id
+        // 发票号
+        invoiceNo: null,
+        startTime: null,
+        endTime: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {},
+    };
+  },
+  created() {},
+  async mounted() {
+    await this.initSelectData();
+    this.getList();
+  },
+  methods: {
+    // 查看明细回调
+    handleDetail(row) {
+      this.detailShow = true;
+    },
+    // 提交回调
+    async handleSubmit(row) {
+      this.$confirm("是否确认提交?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          let payload = {
+            id: row.id,
+            status: 2,
+          };
+          let res = await updateSaleOtherCollection(payload);
+          if (res.code == 200) {
+            this.$message({
+              type: "success",
+              message: "提交成功!",
+            });
+            this.getList();
+          } else {
+            this.$message({
+              type: "error",
+              message: res.msg,
+            });
+          }
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消提交",
+          });
+        });
+    },
+    // 日期范围改变回调
+    timeRangeChange(val) {
+      this.queryParams.startTime = moment(val[0]).format("YYYY-MM-DD");
+      this.queryParams.endTime = moment(val[1]).format("YYYY-MM-DD");
+      this.handleQuery();
+    },
+    // 根据字典value获取字典label
+    getDictLabel(value, dict) {
+      return (
+        this.dict.type[dict].find((item) => {
+          return item.value === value;
+        })?.label || ""
+      );
+    },
+    // 初始化下拉框选择数据
+    async initSelectData() {
+      try {
+        // 客户数据
+        let res1 = await getCustomList({ isEnablePaging: false });
+        if (res1.code == 200) {
+          this.customSelectData = res1.rows;
+        } else {
+          throw new Error(res1.msg);
+        }
+        // 部门数据
+        let res2 = await getDeptList({ isEnablePaging: false });
+        if (res2.code == 200) {
+          this.deptSelectData = res2.data;
+        } else {
+          throw new Error(res2.msg);
+        }
+        // 经办人数据
+        let res3 = await getFinanceList({ isEnablePaging: false });
+        if (res3.code == 200) {
+          this.financeSelectData = res3.data;
+        } else {
+          throw new Error(res3.msg);
+        }
+      } catch (error) {
+        this.$message.error(error);
+      }
+    },
+    /** 查询其他收款列表 */
+    getList() {
+      this.loading = true;
+      listSaleOtherCollection(this.queryParams).then((response) => {
+        this.SaleOtherCollectionList = response.rows.map((item) => {
+          item.customerName =
+            this.customSelectData.find((item2) => item2.id == item.customerId)
+              ?.customName || "";
+          item.deptName =
+            this.deptSelectData.find((item2) => item2.deptId == item.deptId)
+              ?.deptName || "";
+          item.personInCharge =
+            this.financeSelectData.find(
+              (item2) => item2.userId == item.personInChargeId
+            )?.nickName || "";
+          return item;
+        });
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        serialNumber: null,
+        otherCollectionDate: new Date(),
+        customerId: null,
+        personInChargeId: null,
+        paymentMethod: null,
+        travelCertificateNumber: null,
+        deptId: null,
+        collectionDetails: null,
+        itemReceivable: null,
+        amount: null,
+        bookkeepingFlag: null,
+        status: null,
+        remark: null,
+        createBy: null,
+        createById: null,
+        createTime: null,
+        updateBy: null,
+        updateById: null,
+        updateTime: null,
+        delFlag: null,
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加其他收款";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids;
+      getSaleOtherCollection(id).then((response) => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改其他收款";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateSaleOtherCollection(this.form).then((response) => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            this.form.status = 1;
+            this.form.serialNumber = new Date().getTime();
+            addSaleOtherCollection(this.form).then((response) => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal
+        .confirm('是否确认删除其他收款编号为"' + ids + '"的数据项?')
+        .then(function () {
+          return delSaleOtherCollection(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download(
+        "system/SaleOtherCollection/export",
+        {
+          ...this.queryParams,
+        },
+        `SaleOtherCollection_${new Date().getTime()}.xlsx`
+      );
+    },
+  },
+};
+</script>

+ 8 - 4
zkqy-ui/src/views/system/financialManage/saleAccountsReceivableDetail.vue

@@ -411,7 +411,9 @@
               <!-- v-show="scope.row.accountingType == 3" -->
               <el-dropdown-item
                 v-show="
-                  scope.row.accountingType == 3 || scope.row.accountingType == 4
+                  scope.row.accountingType == 3 ||
+                  scope.row.accountingType == 4 ||
+                  scope.row.returnReceipt == '0'
                 "
                 ><el-button
                   size="mini"
@@ -420,9 +422,11 @@
                   >撤销登账</el-button
                 ></el-dropdown-item
               >
-              <el-dropdown-item
+              <!-- <el-dropdown-item
                 v-show="
-                  scope.row.accountingType != 3 && scope.row.accountingType != 4
+                  scope.row.accountingType != 3 &&
+                  scope.row.accountingType != 4 &&
+                  scope.row.returnReceipt == '0'
                 "
                 ><el-button
                   size="mini"
@@ -430,7 +434,7 @@
                   @click="handlerReturn(scope.row, scope.$index)"
                   >撤销登账</el-button
                 ></el-dropdown-item
-              >
+              > -->
             </el-dropdown-menu>
           </el-dropdown>
         </template>