Commit 32c73457 authored by Administrator's avatar Administrator

Merge branch 'pre-release' into 'jd_dev'

Pre release合并到jd分支0116

See merge request !133
parents 8322129e 62986ad5
...@@ -891,3 +891,41 @@ export function loadBatGNRTReceiptList(data) { ...@@ -891,3 +891,41 @@ export function loadBatGNRTReceiptList(data) {
params params
}) })
} }
//银行收支明细列表
export function loadBankBalanceDetailsList(data) {
let params = {
pageNo: data.pageNo,
pageSize: data.pageSize
}
return request({
url: "/ecw/BankReceiptDetails/income/page",
method: "post",
data,
params
})
}
// 批量生成收款单
export function handleBankGNRTReceipt(data) {
return request({
url: "/ecw/receipt/batch-gen-receipt",
method: "post",
data
})
}
// 财务-批量生成收款单费用明细列表
export function loadReceivablePage(data) {
let params = {
page: data.page,
rows: data.rows
}
return request({
url: "/ecw/receivable/batch-gen-receipt/receivable/page",
method: "post",
data,
params
})
}
...@@ -4821,5 +4821,21 @@ ...@@ -4821,5 +4821,21 @@
"批量提交审核": "Batch submission for review", "批量提交审核": "Batch submission for review",
"导入提示信息,请确认是否提交": "Import prompt information, please confirm whether to submit", "导入提示信息,请确认是否提交": "Import prompt information, please confirm whether to submit",
"银行收款信息模板": "Template of bank collection information", "银行收款信息模板": "Template of bank collection information",
"仅允许导入xls、xlsx格式文件。": "Only xls and xlsx format files are allowed to be imported." "仅允许导入xls、xlsx格式文件。": "Only xls and xlsx format files are allowed to be imported.",
"缺少生成收款单的必要的信息": "Lack of information necessary to generate receipts",
"请先选择需要批量处理的订单": "Please select the order to be processed in bulk first",
"设置开票信息": "Set billing information",
"已选择订单/提单": "Order/bill of lading has been selected",
"设置是否开票": "Sets whether to invoice",
"批量设置收款单信息": "Set the receipt information in batches",
"批量生成收款单": "Batch generate receipt",
"设置收款单信息": "Set the receipt information",
"运输信息": "transport information",
"付款名称": "Name of payment",
"收款明细税率%": "Collection details tax rate %",
"期望收款账号": "Expected collection account number",
"开票税率": "Tax rate of billing",
"汇率有效期": "Validity period of exchange rate",
"收款明细税率": "Collection details tax rate",
"请输入收款明细税率": "Please enter the tax rate of the collection details"
} }
...@@ -283,7 +283,9 @@ export const DICT_TYPE = { ...@@ -283,7 +283,9 @@ export const DICT_TYPE = {
RECEIPT_DETAIL_STATUS: "receipt_detail_status", //明细状态 RECEIPT_DETAIL_STATUS: "receipt_detail_status", //明细状态
INVOICEING_LINK: "invoicing_link", //开票环节 INVOICEING_LINK: "invoicing_link", //开票环节
RECEIPT_GENERATE_PATH: "receipt_generate_path", //收款单生成路径 RECEIPT_GENERATE_PATH: "receipt_generate_path", //收款单生成路径
RECEIPT_LINK: "receipt_link" //应收款日志环节 RECEIPT_LINK: "receipt_link", //应收款日志环节
ECW_INCOME_RELATION_SYMBOL: "income_relation_symbol", //银行收支明细查询关系符号
LADING_BILL_STATUS_DATA: "lading_Bill_Status_Data"
} }
/** /**
......
...@@ -67,6 +67,13 @@ ...@@ -67,6 +67,13 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('包装类型')" align="center" prop="">
<template slot-scope="scope">
<span v-for="(unit,index) in scope.row.units.split(',')" :key="index">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="unit" /><span v-if="index<scope.row.units.split(',').length-1">, </span>
</span>
</template>
</el-table-column>
<el-table-column :label="$t('关联单')" align="center" prop="hasRelationOrder" width="120"> <el-table-column :label="$t('关联单')" align="center" prop="hasRelationOrder" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="primary" v-if="scope.row.hasRelationOrder" @click.native="showRelatedOrder(scope.row)">{{ $t('') }}</el-link> <el-link type="primary" v-if="scope.row.hasRelationOrder" @click.native="showRelatedOrder(scope.row)">{{ $t('') }}</el-link>
...@@ -93,6 +100,11 @@ ...@@ -93,6 +100,11 @@
{{getTotlContent(scope.row,['weight'])}} {{getTotlContent(scope.row,['weight'])}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('储位')" align="center" prop="positionNo">
<template slot-scope="scope">
{{notset(scope.row.positionNo)}}
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width"> <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="moveOut(scope.row)" v-if="!isUnderReview && scope.row.installNum === 0">{{$t('移出')}}</el-button> <el-button type="text" size="small" @click="moveOut(scope.row)" v-if="!isUnderReview && scope.row.installNum === 0">{{$t('移出')}}</el-button>
...@@ -364,6 +376,23 @@ export default { ...@@ -364,6 +376,23 @@ export default {
this.newshipmentObj = data ?? {}; this.newshipmentObj = data ?? {};
}); });
}, },
//去重
notset(string) {
if (!string) return string
let arr = string.split(',')
arr = arr.filter((item, index) => {
return arr.indexOf(item) == index
})
return arr.toString()
},
getpositionNo(arr){
if(!arr) return arr
let data = []
arr.forEach(item=>{
data.push(item.areaName+item.locationName)
})
return data.toString()
},
/* 装柜部分列表 */ /* 装柜部分列表 */
getLoadSecGoodsList() { getLoadSecGoodsList() {
loadSecGoodsList({ shipmentId: this.shipmentObj.id }).then((res) => { loadSecGoodsList({ shipmentId: this.shipmentObj.id }).then((res) => {
......
...@@ -87,6 +87,26 @@ ...@@ -87,6 +87,26 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('报关方式')" align="center" prop="customsType">
<template slot-scope="scope">
<div :class="scope.row.customsType !== 1 ? 'custom_type_red' : ''">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="scope.row.customsType" />
</div>
</template>
</el-table-column>
<el-table-column :label="$t('包装类型')" align="center" prop="">
<template slot-scope="scope">
<span v-for="(unit,index) in scope.row.units.split(',')" :key="index">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="unit" /><span v-if="index<scope.row.units.split(',').length-1">, </span>
</span>
</template>
</el-table-column>
<el-table-column :label="$t('关联单')" align="center" prop="hasRelationOrder" width="120">
<template slot-scope="scope">
<el-link type="primary" v-if="scope.row.hasRelationOrder" @click.native="showRelatedOrder(scope.row)">{{ $t('') }}</el-link>
<span v-else>{{ $t('') }}</span>
</template>
</el-table-column>
<el-table-column <el-table-column
:label="$t('计划/已装')" :label="$t('计划/已装')"
align="center" align="center"
...@@ -94,7 +114,7 @@ ...@@ -94,7 +114,7 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="primary" @click.native="orderClick(scope.row)"> <el-link type="primary" @click.native="orderClick(scope.row)">
{{ scope.row.sumNum }}/{{ scope.row.installNum }} {{ scope.row.sumNum }}/{{ scope.row.installNum }} <span v-if="scope.row.mixStatus === 1">{{$t('混箱')}}</span>
</el-link> </el-link>
</template> </template>
</el-table-column> </el-table-column>
......
...@@ -25,9 +25,29 @@ ...@@ -25,9 +25,29 @@
<dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="row.productRecord" /> <dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="row.productRecord" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('报关方式')" align="center" prop="customsType">
<template slot-scope="scope">
<div :class="scope.row.customsType !== 1 ? 'custom_type_red' : ''">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="scope.row.customsType" />
</div>
</template>
</el-table-column>
<el-table-column :label="$t('包装类型')" align="center" prop="">
<template slot-scope="scope">
<span v-for="(unit,index) in scope.row.units.split(',')" :key="index">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="unit" /><span v-if="index<scope.row.units.split(',').length-1">, </span>
</span>
</template>
</el-table-column>
<el-table-column :label="$t('关联单')" align="center" prop="hasRelationOrder" width="120">
<template slot-scope="scope">
<el-link type="primary" v-if="scope.row.hasRelationOrder" @click.native="showRelatedOrder(scope.row)">{{ $t('') }}</el-link>
<span v-else>{{ $t('') }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('箱数')" align="center" prop="sumNum"> <el-table-column :label="$t('箱数')" align="center" prop="sumNum">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.sumNum }} {{ scope.row.sumNum }}<span v-if="scope.row.mixStatus === 1">{{$t('混箱')}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('纸箱尺寸')" align="center"> <el-table-column :label="$t('纸箱尺寸')" align="center">
......
...@@ -67,6 +67,13 @@ ...@@ -67,6 +67,13 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('包装类型')" align="center" prop="">
<template slot-scope="scope">
<span v-for="(unit,index) in scope.row.units.split(',')" :key="index">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="unit" /><span v-if="index<scope.row.units.split(',').length-1">, </span>
</span>
</template>
</el-table-column>
<el-table-column :label="$t('关联单')" align="center" prop="hasRelationOrder" width="120"> <el-table-column :label="$t('关联单')" align="center" prop="hasRelationOrder" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="primary" v-if="scope.row.hasRelationOrder" @click.native="showRelatedOrder(scope.row)">{{ $t('') }}</el-link> <el-link type="primary" v-if="scope.row.hasRelationOrder" @click.native="showRelatedOrder(scope.row)">{{ $t('') }}</el-link>
...@@ -93,6 +100,11 @@ ...@@ -93,6 +100,11 @@
{{getTotlContent(scope.row,['weight'])}} {{getTotlContent(scope.row,['weight'])}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('储位')" align="center" prop="positionNo">
<template slot-scope="scope">
{{notset(scope.row.positionNo)}}
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width"> <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="moveOut(scope.row)" v-if="!isUnderReview && scope.row.installNum === 0">{{$t('移出')}}</el-button> <el-button type="text" size="small" @click="moveOut(scope.row)" v-if="!isUnderReview && scope.row.installNum === 0">{{$t('移出')}}</el-button>
...@@ -364,6 +376,23 @@ export default { ...@@ -364,6 +376,23 @@ export default {
this.newshipmentObj = data ?? {}; this.newshipmentObj = data ?? {};
}); });
}, },
//去重
notset(string) {
if (!string) return string
let arr = string.split(',')
arr = arr.filter((item, index) => {
return arr.indexOf(item) == index
})
return arr.toString()
},
getpositionNo(arr){
if(!arr) return arr
let data = []
arr.forEach(item=>{
data.push(item.areaName+item.locationName)
})
return data.toString()
},
/* 装柜部分列表 */ /* 装柜部分列表 */
getLoadSecGoodsList() { getLoadSecGoodsList() {
loadSecGoodsList({ shipmentId: this.shipmentObj.id }).then((res) => { loadSecGoodsList({ shipmentId: this.shipmentObj.id }).then((res) => {
......
<template>
<div class="app-container">
<el-card>
<el-form ref="queryForm" :model="queryParams" label-width="100px" label-position="left" :inline="true">
<el-form-item :label="$t('开户银行')" style="margin-bottom: 0; margin-top: 20px" prop="platformAccountIds">
<el-select multiple clearable v-model="queryParams.platformAccountIds" :placeholder="$t('开户银行')" style="width: 220px">
<el-option v-for="item in bankData" :key="item.id" :label="item.baAccountName + '(' + item.baAccountNum + ')'" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item :label="$t('支/收')" style="margin-bottom: 0; margin-top: 20px" prop="isIncome">
<el-select clearable v-model="queryParams.isIncome" :placeholder="$t('请选择')" style="width: 220px">
<el-option :label="$t('收')" :value="0" />
<el-option :label="$t('支')" :value="1" />
</el-select>
</el-form-item>
<el-form-item :label="$t('金额')" style="margin-bottom: 0; margin-top: 20px">
<el-form-item prop="relationSymbol">
<dict-selector :type="DICT_TYPE.ECW_INCOME_RELATION_SYMBOL" clearable style="width: 130px" v-model="queryParams.relationSymbol" />
</el-form-item>
<el-form-item prop="amount">
<el-input v-model="queryParams.amount" style="width: 130px" placeholder="请输入数值" clearable />
</el-form-item>
</el-form-item>
<el-form-item :label="$t('关联单号')" prop="relationNo" style="margin-bottom: 0; margin-top: 20px">
<el-input v-model="queryParams.relationNo" style="width: 130px" placeholder="请输入" clearable />
</el-form-item>
<el-form-item :label="$t('交易日期')" prop="tradeDate" style="margin-bottom: 0; margin-top: 20px">
<el-date-picker v-model="queryParams.tradeDate" style="width: 240px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
</el-form-item>
<el-form-item style="margin-bottom: 0; margin-top: 20px">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t("搜索") }}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{ $t("重置") }}</el-button>
</el-form-item>
</el-form>
</el-card>
<div class="mb8 showBar pad-t" v-loading="loading">
<el-descriptions class="margin-top barTop" :column="1" :size="size" border>
<el-descriptions-item>
<template slot="label"> {{ $t("收:") }}: </template>
<span class="unit" v-for="item in currentAmount" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId * 1) }}{{ item.amount }}</span>
</el-descriptions-item>
</el-descriptions>
</div>
<div class="table-box">
<el-table v-loading="loading" :data="list" border>
<el-table-column type="index" :index="indexMethod" />
<el-table-column :label="$t('开户银行')" width="160" align="center" prop="accountBankName"> </el-table-column>
<el-table-column :label="$t('支/收')" width="160" align="center">
<template slot-scope="scope">
<span v-if="scope.row.isIncome == 0"> {{ $t("") }}</span>
<span v-else>{{ $t("") }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('金额')" width="160" align="center">
<template slot-scope="{ row }"> {{ getCurrencySymbol(row.currencyId * 1) }}{{ row.amount }} </template>
</el-table-column>
<el-table-column :label="$t('交易关联单号')" width="200" align="center">
<template slot-scope="{ row }">
<div v-for="item in row.orderInfoList">
<router-link :to="`/financial/receiptDetail?id=${row.receiptId}`" class="link-type"> {{ row.receiptNo }} </router-link> -
<router-link :to="`/order/detail?orderId=${item.orderId}`" class="link-type"> {{ item.tidanNo }} </router-link>
</div>
</template>
</el-table-column>
<el-table-column :label="$t('交易日期')" prop="amountDate" width="160" align="center" />
<el-table-column :label="$t('备注')" align="center" prop="remark" />
<el-table-column :label="$t('账号余额')" align="center" width="200">
<template slot-scope="{ row }">
<span class="unit" v-for="item in row.accountBalance" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId * 1) }}{{ item.amount }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('详情')" width="160" align="center">
<template slot-scope="{ row }">
<el-button size="small" type="primary" v-if="row.receiptId" @click="goBankReceiptDetailsList(row)">{{ $t("查看") }}</el-button>
<template v-else>-</template>
</template>
</el-table-column>
</el-table>
</div>
<el-descriptions class="margin-top pad-t" v-loading="loading" :column="2" border>
<el-descriptions-item>
<template slot="label"> {{ $t("汇总") }}: </template>
<span class="unit" v-for="item in totalAmount" :key="item.currencyId">{{ getCurrencySymbol(item.currencyId * 1) }}{{ item.amount }}</span>
</el-descriptions-item>
</el-descriptions>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" @pagination="getList" />
</div>
</template>
<script>
import { loadBankBalanceDetailsList } from "@/api/ecw/financial"
import { getBankAccountPage } from "@/api/ecw/bankAccount"
import { mapGetters } from "vuex"
export default {
data() {
return {
total: 0,
loading: true,
currentAmount: [],
totalAmount: [],
queryParams: {
platformAccountIds: [],
isIncome: "",
tradeDate: "",
amount: "",
relationSymbol: "",
pageNo: 1,
pageSize: 10
},
bankData: []
}
},
async created() {
const { data } = await getBankAccountPage({ pageNo: 1, pageSize: 1000 })
this.bankData = data.list
this.handleQuery()
},
computed: {
...mapGetters(["getCurrencySymbol"])
},
methods: {
goBankReceiptDetailsList(row) {
this.$router.push({ path: "/financial/BankReceiptDetails", query: { receiptNo: row.receiptNo } })
},
indexMethod(index) {
return index * this.queryParams.pageNo + 1
},
resetQuery() {
this.$refs["queryForm"].resetFields()
this.queryParams.pageNo = 1
this.queryParams.pageSize = 10
this.handleQuery()
},
handleQuery() {
this.loading = true
this.$nextTick(() => {
this.queryParams.pageNo = 1
this.getList()
})
},
async getList() {
const params = this.removeEmpty({ ...this.queryParams })
this.addBeginAndEndTime(params, params.tradeDate, "AmountDate")
console.log("sdsdd", params)
const { data } = await loadBankBalanceDetailsList(params)
this.list = data.list
this.loading = false
this.totalAmount = data.totalAmount
this.currentAmount = data.currentAmount
this.total = data.total
}
}
}
</script>
<style lang="scss" scoped>
.table-box {
padding: 0 10px;
}
.pad-t {
padding: 10px 0;
}
.unit {
padding-left: 10px;
}
</style>
<template>
<div class="app-container">
<div class="title">
{{ $t("批量生成收款单") }}
</div>
<div class="btn-box">
<el-button type="primary" size="small" @click="setReceiptInfo">{{ $t("设置收款单信息") }}</el-button>
<el-button type="primary" size="small" @click="setWhetherToInvoice">{{ $t("设置是否开票") }}</el-button>
<el-button type="primary" size="small" @click="setInvoiceInfo">{{ $t("设置开票信息") }}</el-button>
</div>
<div class="table-box">
<el-table ref="multipleTable" :row-class-name="tableRowClassName" v-loading="loading" :data="list" @selection-change="handleSelectionChange" border>
<el-table-column type="selection" width="55" align="center" fixed="left" />
<el-table-column width="200" align="center" :label="$t('运输信息')">
<template v-slot="{ row }"> {{ getWareHouseLabel(row.departureWareHouseId) }}- <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId"></dict-tag> /{{ getWareHouseLabel(row.objectiveWareHouseId) }} </template>
</el-table-column>
<el-table-column :label="$t('订单号')" prop="orderNo">
<template slot-scope="scope">
<router-link
:to="{
path: '/order/detail',
query: { orderId: scope.row.orderId }
}"
class="link-type"
>
<span>{{ scope.row.orderNo }}</span>
</router-link>
</template>
</el-table-column>
<el-table-column :label="$t('提单号')" prop="tidanNo" />
<el-table-column :label="$t('付款方')" width="160" align="center">
<template slot-scope="scope">
<span v-if="scope.row.drawee == 3"> {{ $t("自定义") }}</span>
<span v-else> {{ scope.row.drawee == 1 ? $t("发货人") : $t("收货人") }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('付款名称')" width="160" align="center">
<template v-slot="{ row }">
<div>
<router-link :to="`/customer/query/${row.payerId}`" class="link-type">
{{ row.customerNo }}
</router-link>
</div>
<div>{{ row.payerName ? row.payerName : row.customerName }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('费用明细')">
<template v-slot="{ row }">
<div>
<router-link :to="`/financial/orderItemCostDetails/${row.orderId}/${row.drawee}`" class="link-type">
{{ $t("费用明细") }}
</router-link>
</div>
</template>
</el-table-column>
<el-table-column :label="$t('收款明细税率%')" prop="taxPoint"> </el-table-column>
<el-table-column :label="$t('期望收款账号')" prop="platformAccountName"> </el-table-column>
<el-table-column :label="$t('汇率有效期')" width="200" prop="rateValidateDate"> </el-table-column>
<el-table-column :label="$t('备注')" width="200" prop="remark"> </el-table-column>
<el-table-column :label="$t('是否开票')">
<template v-slot="{ row }">
<span v-if="row.openInvoice == '1'">
{{ $t("") }}
</span>
<span v-else-if="row.openInvoice == '0'">
{{ $t("") }}
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column :label="$t('开票抬头')" prop="invoice"> </el-table-column>
<el-table-column :label="$t('纳税人识别号')" prop="taxpayer"> </el-table-column>
<el-table-column :label="$t('开户行')" prop="accountBank"> </el-table-column>
<el-table-column :label="$t('账号')" prop="accountName"> </el-table-column>
<el-table-column :label="$t('开票品名')" prop="projectName"> </el-table-column>
<el-table-column :label="$t('开票税率')" prop="taxRate"> </el-table-column>
<el-table-column :label="$t('开票地址/电话')" prop="addressPhone"> </el-table-column>
<el-table-column :label="$t('操作')" fixed="right">
<template v-slot="{ row }">
<el-button type="primary" @click="openSingleEditDialog(row)" size="small">{{ $t("编辑") }}</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="footer">
<el-button type="primary" @click="submitList">{{ $t("提交") }}</el-button>
</div>
<!-- 单个 编辑 弹窗-->
<el-dialog :before-close="handleCloseBefore" :title="$t('编辑')" :visible.sync="openSinglEditForm" width="500" append-to-body>
<div class="pad-t">{{ $t("已选择订单/提单") }}:{{ singlEditForm.orderNo }}-{{ singlEditForm.tidanNo }}</div>
<el-form ref="singlEditForm" :model="singlEditForm" label-width="160px">
<div class="title">{{ $t("收款信息") }}</div>
<el-form-item :label="$t('收款明细税率')" prop="taxPoint">
<el-input v-model="singlEditForm.taxPoint" style="width: 200px" :placeholder="$t('请输入收款明细税率')" />
</el-form-item>
<el-form-item :label="$t('期望收款账号')" prop="platformAccountId">
<el-select style="width: 200px" filterable clear v-model="singlEditForm.platformAccountId" :placeholder="$t('请选择收款账户')">
<el-option v-for="(item, i) in bankData" :key="'opt-code' + i" :label="item.baAccountName + '(' + item.baAccountNum + ')'" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('汇率有效期')" prop="rateValidateDate">
<el-date-picker style="width: 200px" v-model="singlEditForm.rateValidateDate" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" :placeholder="$t('选择日期时间')"> </el-date-picker>
</el-form-item>
<el-form-item :label="$t('备注')">
<el-input style="width: 200px" v-model="singlEditForm.remark" maxlength="500"></el-input>
</el-form-item>
<div class="title">{{ $t("开票信息") }}</div>
<el-form-item
:label="$t('是否开票')"
prop="openInvoice"
:rules="{
required: true,
trigger: ['blur', 'change'],
message: $t('请选择是否开票')
}"
>
<el-select style="width: 200px" v-model="singlEditForm.openInvoice" :placeholder="$t('请选择是否需要开票')">
<el-option :value="1" :label="$t('是')"></el-option>
<el-option :value="0" :label="$t('否')"></el-option>
</el-select>
</el-form-item>
<div v-if="singlEditForm.openInvoice == 1">
<el-form-item
:label="$t('发票抬头')"
prop="invoice"
:rules="{
required: true,
trigger: ['blur', 'change'],
message: $t('请输入发票抬头')
}"
>
<el-input style="width: 200px" v-model="singlEditForm.invoice"></el-input>
</el-form-item>
<el-form-item
:label="$t('纳税人识别号')"
prop="taxpayer"
:rules="{
required: true,
trigger: ['blur', 'change'],
message: $t('请输入纳税人识别号')
}"
>
<el-input style="width: 200px" v-model="singlEditForm.taxpayer"></el-input>
</el-form-item>
<el-form-item
:label="$t('开户行')"
prop="accountBank"
:rules="{
required: true,
trigger: ['blur', 'change'],
message: $t('请输入开户行')
}"
>
<el-input style="width: 200px" v-model="singlEditForm.accountBank"></el-input>
</el-form-item>
<el-form-item
:label="$t('账号')"
prop="accountName"
:rules="{
required: true,
trigger: ['blur', 'change'],
message: $t('请输入账号')
}"
>
<el-input style="width: 200px" v-model="singlEditForm.accountName"></el-input>
</el-form-item>
<el-form-item
:label="$t('开票品名')"
prop="projectName"
:rules="{
required: true,
trigger: ['blur', 'change'],
message: $t('请输入开票品名')
}"
>
<el-input style="width: 200px" v-model="singlEditForm.projectName"></el-input>
</el-form-item>
<el-form-item
:label="$t('开票税率')"
prop="taxRate"
:rules="{
required: true,
trigger: ['blur', 'change'],
message: $t('请输入税率')
}"
>
<el-input-number style="width: 200px" :controls="false" v-model="singlEditForm.taxRate"></el-input-number>
</el-form-item>
<el-form-item
:label="$t('开票地址/电话')"
prop="addressPhone"
:rules="{
required: true,
trigger: ['blur', 'change'],
message: $t('请输入开票地址/电话')
}"
>
<el-input style="width: 200px" v-model="singlEditForm.addressPhone"></el-input>
</el-form-item>
</div>
<!-- <el-form-item :label="$t('开票资料备注')">
<el-input style="width: 280px" v-model="singlEditForm.invoiceRemark"></el-input>
</el-form-item> -->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitSingleForm">{{ $t("确 定") }}</el-button>
<el-button @click="cancel">{{ $t("取 消") }}</el-button>
</div>
</el-dialog>
<!-- 批量设置收款单信息 -->
<el-dialog :before-close="handleCloseBefore" :title="$t('批量设置收款单信息')" :visible.sync="openBatchReceiptInfo" width="500" append-to-body>
<div class="pat-t orderBox">
<div class="left">{{ $t("已选择订单/提单") }}</div>
<div class="right">
<div class="orderInfoItem" v-for="item in multipleSelectedList">{{ item.orderNo }}/{{ item.tidanNo }}</div>
</div>
</div>
<el-form ref="singlEditForm" :model="singlEditForm" label-width="160px">
<el-form-item :label="$t('收款明细税率')" prop="taxPoint">
<el-input v-model="singlEditForm.taxPoint" style="width: 200px" :placeholder="$t('请输入收款明细税率')" />
</el-form-item>
<el-form-item :label="$t('期望收款账号')" prop="platformAccountId">
<el-select style="width: 200px" filterable clear v-model="singlEditForm.platformAccountId" :placeholder="$t('请选择收款账户')">
<el-option v-for="(item, i) in bankData" :key="'opt-code' + i" :label="item.baAccountName + '(' + item.baAccountNum + ')'" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('汇率有效期')" prop="rateValidateDate">
<el-date-picker style="width: 200px" v-model="singlEditForm.rateValidateDate" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" :placeholder="$t('选择日期时间')"> </el-date-picker>
</el-form-item>
<el-form-item :label="$t('备注')">
<el-input style="width: 200px" v-model="singlEditForm.remark" maxlength="500"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitBatchReceipt">{{ $t("确 定") }}</el-button>
<el-button @click="cancel">{{ $t("取 消") }}</el-button>
</div>
</el-dialog>
<!-- 批量设置是否开票 -->
<el-dialog :before-close="handleCloseBefore" :title="$t('设置是否开票')" :visible.sync="openSetsWhetherToInvoice" width="500" append-to-body>
<div class="pat-t orderBox">
<div class="left">{{ $t("已选择订单/提单") }}</div>
<div class="right">
<div class="orderInfoItem" v-for="item in multipleSelectedList">{{ item.orderNo }}/{{ item.tidanNo }}</div>
</div>
</div>
<el-form ref="singlEditForm" :model="singlEditForm" label-width="160px">
<el-form-item
:label="$t('是否开票')"
prop="openInvoice"
:rules="{
required: true,
trigger: ['blur', 'change'],
message: $t('请选择是否开票')
}"
>
<el-select style="width: 200px" v-model="singlEditForm.openInvoice" :placeholder="$t('请选择是否需要开票')">
<el-option :value="1" :label="$t('是')"></el-option>
<el-option :value="0" :label="$t('否')"></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitBatchReceipt">{{ $t("确 定") }}</el-button>
<el-button @click="cancel">{{ $t("取 消") }}</el-button>
</div>
</el-dialog>
<!-- 批量设置开票信息 -->
<el-dialog :before-close="handleCloseBefore" :title="$t('设置开票信息')" :visible.sync="openBatchInvoiceInfo" width="500" append-to-body>
<el-form ref="singlEditForm" :model="singlEditForm" label-width="160px">
<div>
<el-form-item
:label="$t('发票抬头')"
prop="invoice"
:rules="{
required: true,
trigger: ['blur', 'change'],
message: $t('请输入发票抬头')
}"
>
<el-input style="width: 200px" v-model="singlEditForm.invoice"></el-input>
</el-form-item>
<el-form-item
:label="$t('纳税人识别号')"
prop="taxpayer"
:rules="{
required: true,
trigger: ['blur', 'change'],
message: $t('请输入纳税人识别号')
}"
>
<el-input style="width: 200px" v-model="singlEditForm.taxpayer"></el-input>
</el-form-item>
<el-form-item
:label="$t('开户行')"
prop="accountBank"
:rules="{
required: true,
trigger: ['blur', 'change'],
message: $t('请输入开户行')
}"
>
<el-input style="width: 200px" v-model="singlEditForm.accountBank"></el-input>
</el-form-item>
<el-form-item
:label="$t('账号')"
prop="accountName"
:rules="{
required: true,
trigger: ['blur', 'change'],
message: $t('请输入账号')
}"
>
<el-input style="width: 200px" v-model="singlEditForm.accountName"></el-input>
</el-form-item>
<el-form-item
:label="$t('开票品名')"
prop="projectName"
:rules="{
required: true,
trigger: ['blur', 'change'],
message: $t('请输入开票品名')
}"
>
<el-input style="width: 200px" v-model="singlEditForm.projectName"></el-input>
</el-form-item>
<el-form-item
:label="$t('开票税率')"
prop="taxRate"
:rules="{
required: true,
trigger: ['blur', 'change'],
message: $t('请输入税率')
}"
>
<el-input-number style="width: 200px" :controls="false" v-model="singlEditForm.taxRate"></el-input-number>
</el-form-item>
<el-form-item
:label="$t('开票地址/电话')"
prop="addressPhone"
:rules="{
required: true,
trigger: ['blur', 'change'],
message: $t('请输入开票地址/电话')
}"
>
<el-input style="width: 200px" v-model="singlEditForm.addressPhone"></el-input>
</el-form-item>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitBatchReceipt">{{ $t("确 定") }}</el-button>
<el-button @click="cancel">{{ $t("取 消") }}</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getWarehouseList } from "@/api/ecw/warehouse"
import { loadBatGNRTReceiptList, handleBankGNRTReceipt } from "@/api/ecw/financial"
import { getBankAccountPage } from "@/api/ecw/bankAccount"
import { deepClone } from "@/utils"
export default {
name: "EcwFinancialBatchgeneratereceipt",
data() {
return {
openBatchReceiptInfo: false, // 批量设置收款单信息
openSetsWhetherToInvoice: false, // 批量设置是否开票
openBatchInvoiceInfo: false, //批量设置信息
bankData: [],
singlEditForm: {},
selectStatusList: [],
openSinglEditForm: false,
loading: false,
multipleSelectedList: [],
list: [],
queryParams: {
orderIds: [],
page: 1,
rows: 10
}
}
},
created() {
getWarehouseList().then((res) => {
this.loadOrderDataList()
this.warehouseList = res.data
})
getBankAccountPage({ pageNo: 1, pageSize: 1000 }).then((res) => {
this.bankData = res.data.list
})
this.queryParams.orderIds = this.$route.params.id.split(",")
},
methods: {
setWhetherToInvoice() {
if (this.multipleSelectedList.length == 0) {
this.$modal.msgError(`请先选择需要批量处理的订单`)
return
}
this.openSetsWhetherToInvoice = true
this.$nextTick(() => {
this.$refs["singlEditForm"].clearValidate()
})
},
setInvoiceInfo() {
if (this.multipleSelectedList.length == 0) {
this.$modal.msgError(`请先选择需要批量处理的订单`)
return
}
const stringLabel = []
let multiple = this.multipleSelectedList.filter((item) => {
if (item.openInvoice == 0) {
stringLabel.push(item.tidanNo + "/" + item.orderNo)
}
return item.openInvoice == 0
})
if (multiple.length > 0) {
this.$modal.msgError(`订单/提单号:${stringLabel}状态为不开票,无需设置开票信息`)
return
}
this.openBatchInvoiceInfo = true //批量设置信息
this.$nextTick(() => {
this.$refs["singlEditForm"].clearValidate()
})
},
//批量设置收款单信息
async submitBatchReceipt() {
const result = await this.validateFormResult("singlEditForm")
if (result) {
const currentSelectRow = deepClone(this.multipleSelectedList)
this.list = this.list.map((element, index, array) => {
const current = this.multipleSelectedList.filter((item) => item.orderId == element.orderId)
if (current.length > 0) {
if (this.singlEditForm.platformAccountId) {
this.changePlatformAccountId(this.singlEditForm.platformAccountId)
}
if (this.singlEditForm.openInvoice == 0) {
element.invoice = null
element.taxpayer = null
element.accountBank = null
element.accountName = null
element.projectName = null
element.taxRate = null
element.addressPhone = null
}
element = { ...element, ...this.singlEditForm }
}
this.$refs.multipleTable.toggleRowSelection(element, true)
return element
})
this.$nextTick(() => {
this.list.forEach((element) => {
const current = currentSelectRow.filter((item) => item.orderId == element.orderId)
if (current.length > 0) {
this.$refs.multipleTable.toggleRowSelection(element, true)
}
})
// currentSelectRow.forEach((element) => {
// this.$refs.multipleTable.toggleRowSelection(element, true)
// })
})
this.handleCloseBefore()
}
},
// 打开批量设置收款单信息弹窗
setReceiptInfo() {
if (this.multipleSelectedList.length == 0) {
this.$modal.msgError(`请先选择需要批量处理的订单`)
return
}
this.openBatchReceiptInfo = true
this.$nextTick(() => {
this.$refs["singlEditForm"].clearValidate()
})
},
handleCloseBefore(el) {
this.singlEditForm = {}
this.$refs["singlEditForm"].clearValidate()
this.$nextTick(() => {
this.openSinglEditForm = false
this.openBatchReceiptInfo = false // 批量设置收款单信息
this.openSetsWhetherToInvoice = false // 批量设置是否开票
this.openBatchInvoiceInfo = false
})
},
//修改table样式
tableRowClassName({ row, rowIndex }) {
let current = this.selectStatusList.filter((item) => item == row.orderId)
if (current.length > 0) {
return "success-row"
}
return ""
},
async submitList() {
let paramsList = this.list.filter((item) => {
if (item.openInvoice == 0 || (item.openInvoice == 1 && item.invoice)) {
return item
}
})
if (paramsList.length != this.list.length) {
this.$modal.msgError(`缺少生成收款单的必要的信息`)
return
}
await this.$confirm(this.$t("确认提交修改?"), this.$t("提示"))
await handleBankGNRTReceipt(paramsList)
this.$modal.msgSuccess("修改成功")
this.$router.go(-1)
},
openSingleEditDialog(row) {
this.openSinglEditForm = true
this.selectStatusList = [row.orderId]
this.singlEditForm = deepClone(row)
this.$nextTick(() => {
this.$refs["singlEditForm"].clearValidate()
})
},
async validateFormResult(formEl) {
return await this.$refs[formEl].validate()
},
cancel() {
this.singlEditForm = {}
this.$refs["singlEditForm"].clearValidate()
this.openSinglEditForm = false
this.openBatchReceiptInfo = false // 批量设置收款单信息
this.openSetsWhetherToInvoice = false // 批量设置是否开票
this.openBatchInvoiceInfo = false
},
changePlatformAccountId(platformAccountId) {
const bankInfo = this.bankData.filter((item) => item.id == platformAccountId)
this.singlEditForm.platformAccountName = bankInfo[0].baAccountName
},
//单个编辑
async submitSingleForm() {
const result = await this.validateFormResult("singlEditForm")
if (result) {
if (this.singlEditForm.platformAccountId) {
this.changePlatformAccountId(this.singlEditForm.platformAccountId)
}
let currentRow = deepClone(this.singlEditForm)
let multipleRow = deepClone(this.multipleSelectedList)
this.list = this.list.map((element, index, array) => {
if (element.orderId == this.singlEditForm.orderId) {
element = this.singlEditForm
}
return element
})
this.handleCloseBefore()
this.openSinglEditForm = false
this.$nextTick(() => {
this.list.forEach((element) => {
const current = multipleRow.filter((item) => item.orderId == element.orderId)
if (current.length > 0) {
this.$refs.multipleTable.toggleRowSelection(element, true)
}
})
this.selectStatusList = [currentRow.orderId]
})
}
},
handleSelectionChange(val) {
// this.$nextTick(() => {
console.log("888", val)
this.multipleSelectedList = val
this.selectStatusList = val.map((item) => {
return item.orderId
})
// })
},
getWareHouseLabel(id) {
const houseItem = this.warehouseList.filter((item) => {
return item.id == id
})
return houseItem.length > 0 ? this.$l(houseItem[0], "title") : "-"
},
loadOrderDataList() {
this.loading = true
loadBatGNRTReceiptList(this.queryParams).then((res) => {
this.list = res.data.list
this.loading = false
})
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-table .warning-row {
background: oldlace;
}
::v-deep .el-table .success-row {
background: #f0f9eb;
}
.title {
padding: 20px 0;
font-size: 18px;
font-weight: bold;
}
.pad-t {
padding: 10px 0;
}
.footer {
display: flex;
padding-top: 30px;
justify-content: center;
}
.orderBox {
padding-bottom: 10px;
display: flex;
.left {
width: 160px;
}
.right {
flex: 1;
}
.orderInfoItem {
padding-bottom: 4px;
}
}
</style>
...@@ -96,7 +96,14 @@ ...@@ -96,7 +96,14 @@
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="row.orderStatus" /> <dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="row.orderStatus" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('应收汇总')"> </el-table-column> <el-table-column :label="$t('应收汇总')">
<template slot-scope="{ row }">
<div v-for="item in row.receivableAmount">
{{ getCurrencySymbol(item.currencyId) }}
{{ item.amount }}
</div>
</template>
</el-table-column>
<el-table-column :label="$t('自编号状态')" prop="selfNoStatus"> <el-table-column :label="$t('自编号状态')" prop="selfNoStatus">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<dict-tag :type="DICT_TYPE.BOX_ORDER_SHIPMENT_STATE" value="row.selfNoStatus"></dict-tag> <dict-tag :type="DICT_TYPE.BOX_ORDER_SHIPMENT_STATE" value="row.selfNoStatus"></dict-tag>
...@@ -106,9 +113,9 @@ ...@@ -106,9 +113,9 @@
<el-table-column :label="$t('费用明细')" fixed="right"> <el-table-column :label="$t('费用明细')" fixed="right">
<template v-slot="{ row }"> <template v-slot="{ row }">
<div> <div>
<!-- <router-link :to="`/customer/query/${row.payerId}`" class="link-type"> --> <router-link :to="`/financial/orderItemCostDetails/${row.orderId}/${row.drawee}`" class="link-type">
{{ $t("费用明细") }} {{ $t("费用明细") }}
<!-- </router-link> --> </router-link>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -118,6 +125,7 @@ ...@@ -118,6 +125,7 @@
</template> </template>
<script> <script>
import { mapGetters } from "vuex"
import { getWarehouseList } from "@/api/ecw/warehouse" import { getWarehouseList } from "@/api/ecw/warehouse"
import { getRegionList } from "@/api/ecw/order" import { getRegionList } from "@/api/ecw/order"
import { loadBatGNRTReceiptList } from "@/api/ecw/financial" import { loadBatGNRTReceiptList } from "@/api/ecw/financial"
...@@ -132,6 +140,7 @@ export default { ...@@ -132,6 +140,7 @@ export default {
objWareHouseList: [], objWareHouseList: [],
cityList: [], cityList: [],
countryList: [], countryList: [],
multipleSelectedList: [],
queryParams: { queryParams: {
departureWareHouseId: [], //始发地 departureWareHouseId: [], //始发地
destCountry: [], //目的国 destCountry: [], //目的国
...@@ -143,6 +152,9 @@ export default { ...@@ -143,6 +152,9 @@ export default {
} }
} }
}, },
computed: {
...mapGetters(["getCurrencySymbol"])
},
watch: { watch: {
"queryParams.destCountry": { "queryParams.destCountry": {
handler(val, oldVal) { handler(val, oldVal) {
...@@ -175,7 +187,9 @@ export default { ...@@ -175,7 +187,9 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
handleSelectionChange() {}, handleSelectionChange(val) {
this.multipleSelectedList = val
},
getWareHouseLabel(id) { getWareHouseLabel(id) {
const houseItem = this.warehouseList.filter((item) => { const houseItem = this.warehouseList.filter((item) => {
return item.id == id return item.id == id
...@@ -234,7 +248,16 @@ export default { ...@@ -234,7 +248,16 @@ export default {
this.getList() this.getList()
}) })
}, },
batGNRTReceipt() {}, batGNRTReceipt() {
if (this.multipleSelectedList.length == 0) {
this.$modal.msgError(this.$t("请先选择"))
return
}
const ids = this.multipleSelectedList.map((item) => {
return item.orderId
})
this.$router.push({ path: "/financial/batchGenerateReceipt/" + ids })
},
getList() { getList() {
this.loading = true this.loading = true
loadBatGNRTReceiptList(this.queryParams).then((response) => { loadBatGNRTReceiptList(this.queryParams).then((response) => {
......
...@@ -232,7 +232,7 @@ export default { ...@@ -232,7 +232,7 @@ export default {
let p2 = [] let p2 = []
for (var i = 0; i < this.ids.length; i++) { for (var i = 0; i < this.ids.length; i++) {
var obj = {} var obj = {}
obj.id = this.ids[i] obj.id = this.ids[i].bmpId
obj.comment = this.form.comment obj.comment = this.form.comment
p2.push(obj) p2.push(obj)
} }
...@@ -257,7 +257,7 @@ export default { ...@@ -257,7 +257,7 @@ export default {
batchApprove(key) { batchApprove(key) {
if (this.ids.length == 0) { if (this.ids.length == 0) {
//this.modal.msgSuccess //this.modal.msgSuccess
this.$message.error(this.$t("请选择需要批量不通过的任务。")) this.$message.error(this.$t("请选择需要批量操作的任务。"))
return return
} }
this.form.comment = "" this.form.comment = ""
......
...@@ -173,6 +173,7 @@ ...@@ -173,6 +173,7 @@
</el-table-column> </el-table-column>
<!-- 本次核销金额(美元) --> <!-- 本次核销金额(美元) -->
<el-table-column <el-table-column
width="160"
:label=" :label="
$t('本次核销金额({currency})', { $t('本次核销金额({currency})', {
currency: getBaseCurrencynName(bankReceiptDetails.writeOffCurrencyId) currency: getBaseCurrencynName(bankReceiptDetails.writeOffCurrencyId)
...@@ -180,7 +181,7 @@ ...@@ -180,7 +181,7 @@
" "
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number @change="changeCurrentItemWirteOff(scope.row.id)" v-if="statusKey != 'view' && bankReceiptDetails.writeOffAmount" :min="0" :precision="2" :controls="false" v-model="scope.row.writeOffAmount"></el-input-number> <el-input-number style="width: 138px" @change="changeCurrentItemWirteOff(scope.row.id)" v-if="statusKey != 'view' && bankReceiptDetails.writeOffAmount" :min="0" :precision="2" :controls="false" v-model="scope.row.writeOffAmount"></el-input-number>
<span v-else>{{ scope.row.writeOffAmount }}</span> <span v-else>{{ scope.row.writeOffAmount }}</span>
</template> </template>
<!-- writeOffAmount --> <!-- writeOffAmount -->
...@@ -398,6 +399,7 @@ export default { ...@@ -398,6 +399,7 @@ export default {
}, },
saveFrom() { saveFrom() {
const params = { ...this.bankReceiptDetails } const params = { ...this.bankReceiptDetails }
params.writeOffCurrencyId = this.bankReceiptDetails.writeOffCurrencyId
params.receivableWriteOffList = [] params.receivableWriteOffList = []
try { try {
let totalInput = 0 let totalInput = 0
......
...@@ -366,9 +366,7 @@ ...@@ -366,9 +366,7 @@
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('开票资料备注')"> <el-descriptions-item :label="$t('开票资料备注')">
<el-form-item label="" label-width="0" style="margin-bottom: 0"> <el-input type="textarea" rows="1" show-word-limit style="width: 78%" v-model="form.invoiceRemark" maxlength="500"></el-input>
<el-input v-model="form.invoiceRemark" maxlength="500"></el-input>
</el-form-item>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-card> </el-card>
...@@ -1070,8 +1068,8 @@ export default { ...@@ -1070,8 +1068,8 @@ export default {
// this.list[index].exchangeRate = row.writeOffRate // this.list[index].exchangeRate = row.writeOffRate
// this.list[index].baseAmount = row.writeOffAmount // this.list[index].baseAmount = row.writeOffAmount
// console.log("listdd", this.list) // console.log("listdd", this.list)
console.log("listdde", row)
this.form.receiptAccountList[index + 1].writeOffAmount = writeOffAmountTotal this.form.receiptAccountList[this.form.receiptAccountList.length - 1].writeOffAmount = writeOffAmountTotal
}, },
rateChange(row, index) { rateChange(row, index) {
if (row.collectionRate == 0 && parseInt(row.collectionRate) === 0) { if (row.collectionRate == 0 && parseInt(row.collectionRate) === 0) {
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</el-card> </el-card>
<div class="tableTop"> <div class="tableTop">
<el-table v-loading="loading" :data="invoiceList" border> <el-table v-loading="loading" :data="invoiceList" border>
<el-table-column :label="$t('开票编号')" width="160" align="center" prop="invoiceNo"> <el-table-column :label="$t('开票编号')" fixed="left" width="160" align="center" prop="invoiceNo">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<router-link <router-link
:to="{ :to="{
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
</router-link> </router-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('收款单号')" width="160" align="center" prop="receiptNo"> <el-table-column :label="$t('收款单号')" fixed="left" width="160" align="center" prop="receiptNo">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<router-link <router-link
:to="{ :to="{
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
</router-link> </router-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('申请日期')" width="160" align="center" prop="invoiceInfoSaveTime" /> <el-table-column :label="$t('申请日期')" width="160" align="center" prop="createTime" />
<el-table-column :label="$t('申请人/部门')" width="200" align="center"> <el-table-column :label="$t('申请人/部门')" width="200" align="center">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<div>{{ row.applyUserName }}/{{ row.departmentName }}</div> <div>{{ row.applyUserName }}/{{ row.departmentName }}</div>
......
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
</el-descriptions> </el-descriptions>
</el-card> </el-card>
<!-- 开票信息 --> <!-- 开票信息 -->
<el-card class="margin-top-card" v-if="$route.query.key == 'view' || $route.query.key == 'submitInfo' || $route.query.key == 'editInfo' || $route.query.key == 'delInfo'"> <el-card class="margin-top-card" v-if="($route.query.key == 'view' && form.invoiceNumber) || $route.query.key == 'submitInfo' || $route.query.key == 'editInfo' || $route.query.key == 'delInfo'">
<div slot="header" class="card-title">{{ $t("开票信息") }}</div> <div slot="header" class="card-title">{{ $t("开票信息") }}</div>
<el-descriptions :column="3" border> <el-descriptions :column="3" border>
<el-descriptions-item :label="$t('发票号码')"> <el-descriptions-item :label="$t('发票号码')">
...@@ -611,6 +611,7 @@ export default { ...@@ -611,6 +611,7 @@ export default {
invoiceTime: this.form.invoiceTime, invoiceTime: this.form.invoiceTime,
invoiceInfoRemark: this.form?.invoiceInfoRemark || "" invoiceInfoRemark: this.form?.invoiceInfoRemark || ""
} }
await this.$modal.confirm(this.$t(`确认提交开票吗?`))
const data = await updateInvoiceApplicationInfo(params) const data = await updateInvoiceApplicationInfo(params)
if (data.code === 0) { if (data.code === 0) {
this.$message({ this.$message({
......
<template>
<div class="app-container">
<el-card class="card-form">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px" class="card">
<el-form-item :label="$t('收款类型')" prop="collectionType">
<dict-selector ref="dictMethod" multiple v-model="queryParams.collectionType" :type="DICT_TYPE.PAYMENT_TYPE"></dict-selector>
</el-form-item>
<el-form-item :label="$t('费用来源')" prop="feeSource">
<dict-selector ref="dictMethod" multiple v-model="queryParams.feeSource" :type="DICT_TYPE.ECW_FEE_SOURCE"></dict-selector>
</el-form-item>
<el-form-item :label="$t('收入类型')" prop="feeType">
<dict-selector ref="dictMethod" multiple v-model="queryParams.feeType" :type="DICT_TYPE.FEE_TYPE"></dict-selector>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t("搜索") }}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{ $t("重置") }}</el-button>
</el-form-item>
</el-form>
</el-card>
<div class="mb8 showBar pad-t">
<el-descriptions class="margin-top barTop" :column="1" :size="size" border>
<el-descriptions-item label-class-name="my-label-total">
<template slot="label"> {{ $t("合计金额:") }}: </template>
<span class="unit" v-for="item in totalActualAmount" :key="item.currencyId"> {{ $t("总金额") }}{{ getCurrencySymbol(item.currencyId * 1) }}{{ item.amount }}</span>
</el-descriptions-item>
</el-descriptions>
</div>
<div class="table">
<!-- 礼品列表 -->
<el-table ref="multipleTable" v-loading="loading" :data="list">
<el-table-column prop="titleZh" :label="$t('品名')" align="center">
<template slot-scope="{ row }">
{{ $l(row, "title") }}
</template>
</el-table-column>
<el-table-column prop="num" :label="$t('箱数')" width="100" align="center"></el-table-column>
<el-table-column prop="volumeOrWeight" :label="$t('体积/重量')" width="180" align="center">
<template slot-scope="{ row }">
<div>{{ row.volume }}m³/{{ row.weight }}kg</div>
</template>
</el-table-column>
<el-table-column :label="$t('付款方')" width="160" align="center">
<template slot-scope="scope">
<span v-if="scope.row.drawee == 3"> {{ $t("自定义") }}</span>
<span v-else> {{ scope.row.drawee == 1 ? $t("发货人") : $t("收货人") }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('收款类型')" align="center">
<template slot-scope="{ row }">
<dict-tag :type="DICT_TYPE.PAYMENT_TYPE" :value="row.collectionType" />
</template>
</el-table-column>
<el-table-column :label="$t('费用来源')" prop="feeSource" align="center">
<template slot-scope="{ row }">
<dict-tag :type="DICT_TYPE.ECW_FEE_SOURCE" :value="row.feeSource" />
</template>
</el-table-column>
<el-table-column prop="incomeType" :label="$t('收入类型')" width="120" align="center">
<template slot-scope="{ row }">
<div>
<dict-tag :type="DICT_TYPE.FEE_TYPE" :value="row.feeType" />
</div>
</template>
</el-table-column>
<el-table-column :label="$t('单价金额')" prop="unitPrice" align="center">
<template slot-scope="{ row }">{{ getCurrencySymbol(row.currencyId * 1) }} {{ row.unitPrice }} </template>
</el-table-column>
<el-table-column :label="$t('总金额')" prop="totalAmount" align="center">
<template slot-scope="{ row }"> {{ getCurrencySymbol(row.currencyId * 1) }}{{ row.totalAmount }} </template>
</el-table-column>
</el-table>
</div>
<!-- //分页列表 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows" @pagination="getList" />
</div>
</template>
<script>
import { mapGetters } from "vuex"
import { loadReceivablePage } from "@/api/ecw/financial"
export default {
// this.$route.params.id.split(",")
data() {
return {
list: [],
size: "small",
loading: true,
total: 0,
totalActualAmount: [],
queryParams: {
collectionType: [],
feeSource: [],
feeType: [],
orderId: this.$route.params.id,
paymentUser: this.$route.params.drawee,
page: 1,
rows: 10
}
}
},
computed: {
...mapGetters(["getCurrencySymbol"])
},
created() {
this.getList()
},
methods: {
async getList() {
const params = this.removeEmpty({ ...this.queryParams })
const { data } = await loadReceivablePage(params)
this.list = data.list
this.loading = false
this.totalActualAmount = data.totalActualAmount
this.total = data.total
},
resetQuery() {
this.$refs["queryForm"].resetFields()
this.queryParams.page = 1
this.queryParams.rows = 10
this.handleQuery()
},
handleQuery() {
this.loading = true
this.$nextTick(() => {
this.queryParams.page = 1
this.getList()
})
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .card-form .el-form-item {
margin-bottom: 0;
}
.pad-t {
padding: 10px 0;
}
::v-deep .my-label-total {
width: 300px;
}
</style>
...@@ -7,7 +7,11 @@ ...@@ -7,7 +7,11 @@
<el-descriptions-item :label="$t('状态')"> <el-descriptions-item :label="$t('状态')">
<dict-tag :type="DICT_TYPE.ECW_RECEIPT_STATE" :value="form.state" /> <dict-tag :type="DICT_TYPE.ECW_RECEIPT_STATE" :value="form.state" />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('客户')">{{ form.customerName }}</el-descriptions-item> <el-descriptions-item :label="$t('客户')">
<router-link :to="'/customer/query/' + form.customerId">
{{ form.customerName }}
</router-link>
</el-descriptions-item>
<el-descriptions-item :label="$t('部门')">{{ form.departmentName }}</el-descriptions-item> <el-descriptions-item :label="$t('部门')">{{ form.departmentName }}</el-descriptions-item>
<el-descriptions-item :label="$t('业务员')">{{ form.salesmanName }}</el-descriptions-item> <el-descriptions-item :label="$t('业务员')">{{ form.salesmanName }}</el-descriptions-item>
<!-- <el-descriptions-item :label="$t('手续费(RMB)')">{{ form.feeRate }}</el-descriptions-item> --> <!-- <el-descriptions-item :label="$t('手续费(RMB)')">{{ form.feeRate }}</el-descriptions-item> -->
...@@ -1488,6 +1492,7 @@ export default { ...@@ -1488,6 +1492,7 @@ export default {
}, },
saveFrom() { saveFrom() {
const params = { ...this.addForm } const params = { ...this.addForm }
params.writeOffCurrencyId = this.list[0].baseCurrencyId
params.receivableWriteOffList = [] params.receivableWriteOffList = []
try { try {
let totalInput = 0 let totalInput = 0
......
...@@ -247,7 +247,7 @@ ...@@ -247,7 +247,7 @@
<div v-html="continueUploadModal.msg"></div> <div v-html="continueUploadModal.msg"></div>
<span slot="footer" class="dialog-footer-upload"> <span slot="footer" class="dialog-footer-upload">
<el-button @click="continueUploadModal.show = false">{{ $t("取 消") }}</el-button> <el-button @click="continueUploadModal.show = false">{{ $t("取 消") }}</el-button>
<el-button type="primary" @click="continueUpload">{{ $t("确 定") }}</el-button> <el-button type="primary" :disabled="!fileCopy" @click="continueUpload">{{ $t("确 定") }}</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -382,7 +382,9 @@ export default { ...@@ -382,7 +382,9 @@ export default {
}, },
methods: { methods: {
continueUpload() { continueUpload() {
this.$message.success(this.$t("正在提交,请稍后。"))
this.$refs.upload.handleStart(this.fileCopy.raw) this.$refs.upload.handleStart(this.fileCopy.raw)
this.fileCopy = null
this.$refs.upload.submit() this.$refs.upload.submit()
}, },
handleShowFileUploadDialog() { handleShowFileUploadDialog() {
...@@ -410,6 +412,7 @@ export default { ...@@ -410,6 +412,7 @@ export default {
// 文件上传成功处理 // 文件上传成功处理
handleFileSuccess(response, file, fileList) { handleFileSuccess(response, file, fileList) {
this.upload.isUploading = false this.upload.isUploading = false
this.continueUploadModal.show = false
// 错误 // 错误
if (response.code == "1004520042") { if (response.code == "1004520042") {
// this.$modal.msgError(response.msg) // this.$modal.msgError(response.msg)
...@@ -438,7 +441,7 @@ export default { ...@@ -438,7 +441,7 @@ export default {
return return
} }
this.upload.open = false this.upload.open = false
this.fileCopy = null
this.$refs.upload.clearFiles() this.$refs.upload.clearFiles()
// 拼接提示语 // 拼接提示语
// let data = response.data // let data = response.data
...@@ -459,7 +462,9 @@ export default { ...@@ -459,7 +462,9 @@ export default {
}, },
// 提交上传文件 // 提交上传文件
submitFileForm() { submitFileForm() {
this.$refs.upload.submit() if (!this.fileCopy) {
this.$refs.upload.submit()
}
}, },
//发票新增/编辑页面 //发票新增/编辑页面
goInvoiceOperate({ id, key }) { goInvoiceOperate({ id, key }) {
......
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<!-- <el-form-item :label="$t('来源')" prop="fromId"> <!-- <el-form-item :label="$t('来源')" prop="fromId">
<el-input v-model="queryParams.fromId" :placeholder="$t('请输入站内信来源')" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.fromId" :placeholder="$t('请输入站内信来源')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>--> </el-form-item>-->
<el-form-item :label="$t('发送时间')"> <el-form-item :label="$t('发送时间')">
<el-date-picker v-model="dateRangeSendTime" style="width: 240px" value-format="yyyy-MM-dd" <el-date-picker v-model="dateRangeSendTime" style="width: 240px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('标题')" prop="title"> <el-form-item :label="$t('标题')" prop="title">
<el-input v-model="queryParams.title" :placeholder="$t('请输入标题')" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.title" :placeholder="$t('请输入标题')" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('消息类型')" prop="type"> <el-form-item :label="$t('消息类型')" prop="type">
<el-select v-model="queryParams.type" :placeholder="$t('请选择')" clearable size="small"> <el-select v-model="queryParams.type" :placeholder="$t('请选择')" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.INTERNAL_MESSAGE_TYPE)" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.INTERNAL_MESSAGE_TYPE)" :key="dict.value" :label="dict.label" :value="dict.value" />
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('状态')" prop="status"> <el-form-item :label="$t('状态')" prop="status">
<el-select v-model="queryParams.status" :placeholder="$t('请选择')" clearable size="small"> <el-select v-model="queryParams.status" :placeholder="$t('请选择')" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.INTERNAL_MESSAGE_READ_STATUS)" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.INTERNAL_MESSAGE_READ_STATUS)" :key="dict.value" :label="dict.label" :value="dict.value" />
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('创建时间')"> <el-form-item :label="$t('创建时间')">
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd" <el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('搜索') }}</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t("搜索") }}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{ $t('重置') }}</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">{{ $t("重置") }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<el-table-column :label="$t('编号')" align="center" prop="id" /> <el-table-column :label="$t('编号')" align="center" prop="id" />
<!-- <el-table-column :label="$t('来源')" align="center" prop="fromId" />--> <!-- <el-table-column :label="$t('来源')" align="center" prop="fromId" />-->
<el-table-column :label="$t('发送时间')" align="center" prop="sendTime" width="180"> <el-table-column :label="$t('发送时间')" align="center" prop="sendTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.sendTime) }}</span> <span>{{ parseTime(scope.row.sendTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('标题')" align="center" prop="title" /> <el-table-column :label="$t('标题')" align="center" prop="title" />
<!-- <el-table-column :label="$t('内容')" align="center" prop="content" />--> <!-- <el-table-column :label="$t('内容')" align="center" prop="content" />-->
<el-table-column :label="$t('消息类型')" align="center" prop="type"> <el-table-column :label="$t('消息类型')" align="center" prop="type">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.INTERNAL_MESSAGE_TYPE" :value="scope.row.type" /> <dict-tag :type="DICT_TYPE.INTERNAL_MESSAGE_TYPE" :value="scope.row.type" />
...@@ -65,46 +59,43 @@ ...@@ -65,46 +59,43 @@
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width"> <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="viewMessage(scope.row)">{{ $t('查看') }}</el-button> <el-button size="mini" type="text" icon="el-icon-edit" @click="viewMessage(scope.row)">{{ $t("查看") }}</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="deleteFn(scope.row)">{{ $t('删除') }}</el-button> <el-button size="mini" type="text" icon="el-icon-delete" @click="deleteFn(scope.row)">{{ $t("删除") }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows" @pagination="getList" />
@pagination="getList"/>
<el-dialog <el-dialog :title="$t('站内信')" :visible.sync="dialogVisible" width="50%">
:title="$t('站内信')"
:visible.sync="dialogVisible"
width="50%">
<div class="from"> <div class="from">
<div class="from-item"> <div class="from-item">
<div class="label">{{ $t('标题:') }}</div> <div class="label">{{ $t("标题:") }}</div>
<div class="content">{{publicObj.title}}</div> <div class="content">{{ publicObj.title }}</div>
</div> </div>
<div class="from-item"> <div class="from-item">
<div class="label">{{ $t('消息分类:') }}</div> <div class="label">{{ $t("消息分类:") }}</div>
<div class="content">{{type[publicObj.type]}}</div> <dict-tag :type="DICT_TYPE.INTERNAL_MESSAGE_TYPE" :value="publicObj.type" />
</div> <!-- <div class="content">{{type[publicObj.type]}}</div> -->
<div class="from-item"> </div>
<div class="label">{{ $t('创建时间') }}</div> <div class="from-item">
<div class="content">{{parseTime(publicObj.createTime)}}</div> <div class="label">{{ $t("创建时间") }}</div>
</div> <div class="content">{{ parseTime(publicObj.createTime) }}</div>
<div class="from-item"> </div>
<div class="label">{{ $t('消息内容:') }}</div> <div class="from-item">
<div class="content">{{publicObj.content}}</div> <div class="label">{{ $t("消息内容:") }}</div>
</div> <div class="content">{{ publicObj.content }}</div>
</div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">{{ $t('关 闭') }}</el-button> <el-button @click="dialogVisible = false">{{ $t("关 闭") }}</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getMyInternalMessagePage ,getRedInternalMessage, deleteInternalMessage} from "@/api/system/internalMessage"; import { getMyInternalMessagePage, getRedInternalMessage, deleteInternalMessage } from "@/api/system/internalMessage"
export default { export default {
name: "MyInternalMessage", name: "MyInternalMessage",
data() { data() {
...@@ -133,41 +124,41 @@ export default { ...@@ -133,41 +124,41 @@ export default {
title: null, title: null,
content: null, content: null,
type: null, type: null,
status: this.$route.query.status?this.$route.query.status:null, status: this.$route.query.status ? this.$route.query.status : null
}, },
// 表单参数 // 表单参数
form: {}, form: {},
dialogVisible:false, dialogVisible: false,
publicObj:{}, publicObj: {},
type: { type: {
1:this.$t('订单消息'), 1: this.$t("订单消息"),
2:this.$t('出货消息'), 2: this.$t("出货消息"),
3:this.$t('提醒消息'), 3: this.$t("提醒消息")
}, }
}; }
}, },
computed:{ computed: {
notMessage() { notMessage() {
return this.$store.state.user.notMessage; return this.$store.state.user.notMessage
} }
}, },
created() { created() {
this.getList(); this.getList()
}, },
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true
// 处理查询参数 // 处理查询参数
let params = {...this.queryParams}; let params = { ...this.queryParams }
this.addBeginAndEndTime(params, this.dateRangeSendTime, 'sendTime'); this.addBeginAndEndTime(params, this.dateRangeSendTime, "sendTime")
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime")
// 执行查询 // 执行查询
getMyInternalMessagePage(params).then(response => { getMyInternalMessagePage(params).then((response) => {
this.list = response.data.list; this.list = response.data.list
this.total = response.data.total; this.total = response.data.total
this.loading = false; this.loading = false
}); })
}, },
/** 表单重置 */ /** 表单重置 */
reset() { reset() {
...@@ -177,71 +168,73 @@ export default { ...@@ -177,71 +168,73 @@ export default {
sendTime: undefined, sendTime: undefined,
title: undefined, title: undefined,
content: undefined, content: undefined,
type: undefined, type: undefined
}; }
this.resetForm("form"); this.resetForm("form")
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNo = 1; this.queryParams.pageNo = 1
this.getList(); this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.dateRangeSendTime = []; this.dateRangeSendTime = []
this.dateRangeCreateTime = []; this.dateRangeCreateTime = []
this.resetForm("queryForm"); this.resetForm("queryForm")
this.handleQuery(); this.handleQuery()
}, },
viewMessage(row){ viewMessage(row) {
this.publicObj = row; this.publicObj = row
this.dialogVisible = true; this.dialogVisible = true
if(row.status == 0)this.setNotMessage(row.id) if (row.status == 0) this.setNotMessage(row.id)
}, },
setNotMessage(id){ setNotMessage(id) {
getRedInternalMessage({messageId:id}).then(r =>{ getRedInternalMessage({ messageId: id }).then((r) => {
console.log(r) console.log(r)
if(r.code === 0){ if (r.code === 0) {
this.getList() this.getList()
let num = Number(this.notMessage); let num = Number(this.notMessage)
this.$store.commit('NOt_MESSAGE',--num); this.$store.commit("NOt_MESSAGE", --num)
} }
}) })
}, },
deleteFn(row){ deleteFn(row) {
this.$confirm(`是否要删除编号为“${row.id}”的站内信?`, this.$t('提示'), { this.$confirm(`是否要删除编号为“${row.id}”的站内信?`, this.$t("提示"), {
confirmButtonText: this.$t('确定'), confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t('取消'), cancelButtonText: this.$t("取消"),
type: 'warning' type: "warning"
}).then(() => { })
deleteInternalMessage(row.id).then(r => { .then(() => {
if(r.code === 0){ deleteInternalMessage(row.id).then((r) => {
this.$message({ if (r.code === 0) {
type: 'success', this.$message({
message: '删除成功!' type: "success",
}); message: "删除成功!"
this.getList(); })
} this.getList()
}
})
})
.catch(() => {
this.$message({
type: "info",
message: this.$t("已取消删除")
})
}) })
}).catch(() => {
this.$message({
type: 'info',
message: this.$t('已取消删除')
});
});
} }
} }
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.from{ .from {
.from-item{ .from-item {
display: flex; display: flex;
margin: 10px 0; margin: 10px 0;
.label{ .label {
width:80px; width: 80px;
} }
.content{ .content {
flex: 1; flex: 1;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment