|
@@ -128,13 +128,38 @@
|
|
|
clearable
|
|
|
filterable
|
|
|
multiple
|
|
|
+ @change="exportColumnsChange"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in exportColumnsOptions"
|
|
|
+ v-for="(item, index) in exportColumnsOptions"
|
|
|
:key="item.prop"
|
|
|
:label="item.label"
|
|
|
:value="item.prop"
|
|
|
>
|
|
|
+ <span style="float: left">{{ item.label }}</span>
|
|
|
+ <span
|
|
|
+ style="
|
|
|
+ float: right;
|
|
|
+ color: #8492a6;
|
|
|
+ font-size: 16px;
|
|
|
+ margin-left: 10px;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ class="iconBtn"
|
|
|
+ v-show="index < exportColumnsOptions.length - 1"
|
|
|
+ @click="(e) => tempFun(e, item, 'bottom', index)"
|
|
|
+ icon="el-icon-bottom"
|
|
|
+ circle
|
|
|
+ ></el-button>
|
|
|
+ <el-button
|
|
|
+ class="iconBtn"
|
|
|
+ v-show="index > 0"
|
|
|
+ @click="(e) => tempFun(e, item, 'top', index)"
|
|
|
+ icon="el-icon-top"
|
|
|
+ circle
|
|
|
+ ></el-button>
|
|
|
+ </span>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -361,6 +386,8 @@
|
|
|
>回 单</el-button
|
|
|
></el-dropdown-item
|
|
|
> -->
|
|
|
+
|
|
|
+ <!-- v-show="scope.row.accountingType == 3" -->
|
|
|
<el-dropdown-item v-show="scope.row.accountingType == 3"
|
|
|
><el-button
|
|
|
size="mini"
|
|
@@ -369,6 +396,14 @@
|
|
|
>驳 回</el-button
|
|
|
></el-dropdown-item
|
|
|
>
|
|
|
+ <el-dropdown-item v-show="scope.row.accountingType != 3"
|
|
|
+ ><el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ @click="handlerCancel(scope.row)"
|
|
|
+ >撤销登账</el-button
|
|
|
+ ></el-dropdown-item
|
|
|
+ >
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</template>
|
|
@@ -802,6 +837,7 @@ import {
|
|
|
cancelBilling,
|
|
|
rejectHandler,
|
|
|
dynamicExport,
|
|
|
+ cancelAccountEntry,
|
|
|
} from "@/api/system/SaleAccountsReceivableDetail";
|
|
|
import {
|
|
|
getCustomList,
|
|
@@ -824,8 +860,9 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
selections: [], //勾选行数据
|
|
|
- exportColumns: [], //导出列数据
|
|
|
+ exportColumns: ["allCol"], //导出列数据
|
|
|
exportColumnsOptions: [
|
|
|
+ { label: "全部列", prop: "allCol" },
|
|
|
{ label: "账务类型", prop: "accountingType" },
|
|
|
{ label: "客户名称", prop: "customName" },
|
|
|
{ label: "日期", prop: "accountsReceivableDate" },
|
|
@@ -972,6 +1009,59 @@ export default {
|
|
|
}),
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 撤销登账
|
|
|
+ handlerCancel(row) {
|
|
|
+ this.$confirm("是否确认驳回?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(async () => {
|
|
|
+ try {
|
|
|
+ let payload = {
|
|
|
+ status: 3,
|
|
|
+ id: row.id,
|
|
|
+ otherCollectionId: row.otherCollectionId,
|
|
|
+ customerId: row.customerId,
|
|
|
+ receivedAmount: row.receivedAmount,
|
|
|
+ };
|
|
|
+ let res = await cancelAccountEntry(payload);
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success("撤销成功!");
|
|
|
+ this.getList();
|
|
|
+ } else {
|
|
|
+ throw new Error(res.msg);
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ this.$message.error(error);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: "info",
|
|
|
+ message: "已中止撤销",
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 交换数组中两个元素位置回调
|
|
|
+ exchangeItemHandler(i, j, arr) {
|
|
|
+ let temp = arr[i];
|
|
|
+ arr[i] = arr[j];
|
|
|
+ arr[j] = temp;
|
|
|
+ },
|
|
|
+
|
|
|
+ // 移动列顺序回调
|
|
|
+ tempFun(e, item, type, index) {
|
|
|
+ console.log(e, 1111);
|
|
|
+ if (type == "top") {
|
|
|
+ this.exchangeItemHandler(index, index - 1, this.exportColumnsOptions);
|
|
|
+ } else {
|
|
|
+ this.exchangeItemHandler(index, index + 1, this.exportColumnsOptions);
|
|
|
+ }
|
|
|
+ this.$forceUpdate();
|
|
|
+ console.log(this.exportColumnsOptions);
|
|
|
+ e.stopPropagation();
|
|
|
+ },
|
|
|
// 驳回回调
|
|
|
handlerReturn(row) {
|
|
|
this.$confirm("是否确认驳回?", "提示", {
|
|
@@ -1440,6 +1530,17 @@ export default {
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
},
|
|
|
+ //导出列改变回调
|
|
|
+ exportColumnsChange(val) {
|
|
|
+ if (val.includes("allCol")) {
|
|
|
+ if (this.exportColumns[this.exportColumns.length - 1] != "allCol") {
|
|
|
+ this.$message.error("已勾选全部列");
|
|
|
+ }
|
|
|
+ this.exportColumns = ["allCol"];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 获取导出列数据
|
|
|
+ getExportColumns(selectColumns) {},
|
|
|
/** 导出按钮操作 */
|
|
|
async handleExport() {
|
|
|
let payLoad = {
|
|
@@ -1459,23 +1560,47 @@ export default {
|
|
|
delete payLoad.queryMap.pageNum;
|
|
|
delete payLoad.queryMap.pageSize;
|
|
|
}
|
|
|
- payLoad.dictTransform = {
|
|
|
- accountingType: JSON.stringify(this.dict.type.accounting_type),
|
|
|
- paymentMethod: JSON.stringify(
|
|
|
- this.dict.type.collection_registration_payment_method
|
|
|
- ),
|
|
|
- billingType: JSON.stringify(
|
|
|
- this.dict.type.accounts_receivable_billing_type
|
|
|
- ),
|
|
|
+ let tempDictTransform = {
|
|
|
+ accountingType: this.dict.type.accounting_type,
|
|
|
+ paymentMethod: this.dict.type.collection_registration_payment_method,
|
|
|
+ billingType: this.dict.type.accounts_receivable_billing_type,
|
|
|
+ returnReceipt: [
|
|
|
+ { value: "1", label: "已回单" },
|
|
|
+ { value: "0", label: "未回单" },
|
|
|
+ ],
|
|
|
};
|
|
|
+ console.log(tempDictTransform);
|
|
|
+ payLoad.basicMap.dictTransform = JSON.stringify(tempDictTransform);
|
|
|
// 导出列数据
|
|
|
- let tempExelMap = {};
|
|
|
- this.exportColumns.forEach((item) => {
|
|
|
- tempExelMap[item] = this.exportColumnsOptions.find(
|
|
|
- (i) => i.prop == item
|
|
|
- )?.label;
|
|
|
- });
|
|
|
+ let tempExelMap = [];
|
|
|
+ if (this.exportColumns[0] == "allCol") {
|
|
|
+ this.exportColumnsOptions.forEach((item, index) => {
|
|
|
+ // tempExelMap[item.prop] = item.label;
|
|
|
+ if (index != 0) {
|
|
|
+ let obj = {};
|
|
|
+ obj[item.prop] = item.label;
|
|
|
+ tempExelMap.push(obj);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ // this.exportColumns.forEach((item) => {
|
|
|
+ // tempExelMap[item] = this.exportColumnsOptions.find(
|
|
|
+ // (i) => i.prop == item
|
|
|
+ // )?.label;
|
|
|
+ // });
|
|
|
+ tempExelMap = this.exportColumnsOptions
|
|
|
+ .filter((item) => {
|
|
|
+ return this.exportColumns.includes(item.prop);
|
|
|
+ })
|
|
|
+ .map((item) => {
|
|
|
+ let obj = {};
|
|
|
+ obj[item.prop] = item.label;
|
|
|
+ return obj;
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
payLoad.execlMap = JSON.stringify(tempExelMap);
|
|
|
+ console.log(payLoad);
|
|
|
|
|
|
// let res = await dynamicExport(payLoad);
|
|
|
this.download(
|
|
@@ -1489,3 +1614,27 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.iconBtn {
|
|
|
+ padding: 4px;
|
|
|
+}
|
|
|
+.sequenceIcon {
|
|
|
+ display: inline-block;
|
|
|
+ pointer-events: none;
|
|
|
+}
|
|
|
+.sequenceIcon.up {
|
|
|
+ position: absolute;
|
|
|
+ right: 35px;
|
|
|
+ top: 50%;
|
|
|
+ transform: translateY(-50%);
|
|
|
+}
|
|
|
+.sequenceIcon.down {
|
|
|
+ position: absolute;
|
|
|
+ right: 50px;
|
|
|
+ top: 50%;
|
|
|
+ transform: translateY(-50%);
|
|
|
+}
|
|
|
+.sequenceIcon:hover {
|
|
|
+ color: rgb(115, 195, 233);
|
|
|
+}
|
|
|
+</style>
|