123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935 |
- <template>
- <div class="tenant">
- <div class="content">
- <byTable
- :source="sourceList.data"
- :pagination="sourceList.pagination"
- :config="config"
- :loading="loading"
- :selectConfig="selectConfig"
- highlight-current-row
- :action-list="[
- {
- text: '导出Excel',
- action: () => deriveExcel(),
- },
- {
- text: '添加流水',
- action: () => openModal('add'),
- },
- {
- text: '内部转账',
- action: () => openTransferMoney('add'),
- },
- ]"
- @moreSearch="moreSearch"
- @get-list="getList">
- <template #amount="{ item }">
- <div :style="'color: ' + (item.status === '10' ? '#04cb04;' : 'red;')">
- <span style="padding-right: 4px" v-if="item.currency">{{ item.currency }}</span>
- <span style="padding-right: 4px" v-else>
- {{ accountCurrency[0].value }}
- </span>
- <span v-if="item.status === '20'">-</span>
- <span>{{ moneyFormat(item.amount, 2) }}</span>
- </div>
- </template>
- <template #contractCodes="{ item }">
- <div style="width: 100%">
- <div v-if="item.contractCodes">
- <div v-for="(contract, index) in item.contractCodes.split(',')" :key="index">
- <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="openDetails(contract)">{{ contract }}</a>
- </div>
- </div>
- </div>
- </template>
- </byTable>
- </div>
- <el-dialog :title="modalType == 'add' ? '添加流水' : '编辑流水'" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loadingDialog">
- <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
- <template #transactionTime>
- <div>
- <el-date-picker v-model="formData.data.transactionTime" type="datetime" placeholder="请选择交易时间" value-format="YYYY-MM-DD HH:mm:ss" />
- </div>
- </template>
- <template #money>
- <div style="width: 100%">
- <el-row :gutter="10">
- <el-col :span="6">
- <el-form-item prop="status">
- <el-select v-model="formData.data.status" placeholder="请选择" style="width: 100%" @change="changeStatus()">
- <el-option v-for="item in status" :key="item.value" :label="item.label" :value="item.value" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item prop="currency">
- <el-select v-model="formData.data.currency" placeholder="请选择" style="width: 100%">
- <el-option v-for="item in accountCurrency" :key="item.value" :label="item.label" :value="item.value" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item prop="amount">
- <el-input-number
- onmousewheel="return false;"
- v-model="formData.data.amount"
- placeholder="请输入金额"
- style="width: 100%"
- :precision="2"
- :controls="false"
- :min="0" />
- </el-form-item>
- </el-col>
- </el-row>
- </div>
- </template>
- <template #received>
- <div>
- <el-form-item prop="received">
- <el-radio-group v-model="formData.data.received">
- <el-radio v-for="item in received" :key="item.value" :label="item.value" border>{{ item.label }}</el-radio>
- </el-radio-group>
- </el-form-item>
- </div>
- </template>
- </byForm>
- <template #footer>
- <el-button @click="dialogVisible = false" size="large">取 消</el-button>
- <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
- </template>
- </el-dialog>
- <el-dialog title="内部转账" v-if="transferMoneyModal" v-model="transferMoneyModal" width="600" v-loading="loadingDialog">
- <byForm :formConfig="transferMoneyConfig" :formOption="formOption" v-model="formData2.data" :rules="rules2" ref="transferMoneySubmit">
- </byForm>
- <template #footer>
- <el-button @click="transferMoneyModal = false" size="large">取 消</el-button>
- <el-button type="primary" @click="submitForm2()" size="large">确 定</el-button>
- </template>
- </el-dialog>
- <el-dialog title="高级检索" v-if="openSearch" v-model="openSearch" width="600" :before-close="cancelSearch">
- <byForm :formConfig="formSearchConfig" :formOption="formOption" v-model="sourceList.pagination">
- <template #money>
- <div style="width: 100%">
- <el-row :gutter="10">
- <el-col :span="11">
- <el-input-number
- onmousewheel="return false;"
- v-model="sourceList.pagination.beginAmount"
- placeholder="请输入"
- style="width: 100%"
- :precision="2"
- :controls="false"
- :min="0" />
- </el-col>
- <el-col :span="2" style="text-align: center">到</el-col>
- <el-col :span="11">
- <el-input-number
- onmousewheel="return false;"
- v-model="sourceList.pagination.endAmount"
- placeholder="请输入"
- style="width: 100%"
- :precision="2"
- :controls="false"
- :min="0" />
- </el-col>
- </el-row>
- </div>
- </template>
- <template #time>
- <div style="width: 100%">
- <el-row :gutter="10">
- <el-col :span="11">
- <el-date-picker
- v-model="sourceList.pagination.startTime"
- type="datetime"
- placeholder="请选择"
- style="width: 100%"
- value-format="YYYY-MM-DD HH:mm:ss" />
- </el-col>
- <el-col :span="2" style="text-align: center">到</el-col>
- <el-col :span="11">
- <el-date-picker
- v-model="sourceList.pagination.stopTime"
- type="datetime"
- placeholder="请选择"
- style="width: 100%"
- value-format="YYYY-MM-DD HH:mm:ss" />
- </el-col>
- </el-row>
- </div>
- </template>
- </byForm>
- <template #footer>
- <el-button @click="cancelSearch()" size="large">取 消</el-button>
- <el-button type="primary" @click="submitSearch()" size="large">确 定</el-button>
- </template>
- </el-dialog>
- <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="860">
- <ContractPDF :rowData="rowData"></ContractPDF>
- <template #footer>
- <el-button @click="openPrint = false" size="large">取消</el-button>
- <el-button v-print="printObj" size="large">打印</el-button>
- <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
- </template>
- </el-dialog>
- </div>
- </template>
- <script setup>
- import { computed, ref } from "vue";
- import byTable from "@/components/byTable/index";
- import byForm from "@/components/byForm/index";
- import useUserStore from "@/store/modules/user";
- import { ElMessage, ElMessageBox } from "element-plus";
- import moment from "moment";
- import ContractPDF from "@/components/PDF/contractPDF.vue";
- const { proxy } = getCurrentInstance();
- const accountCurrency = ref([]);
- const accountList = ref([]);
- const status = ref([
- {
- label: "收入",
- value: "10",
- },
- {
- label: "支出",
- value: "20",
- },
- ]);
- const received = ref([
- {
- label: "是",
- value: "10",
- },
- {
- label: "否",
- value: "20",
- },
- ]);
- const sourceList = ref({
- data: [],
- pagination: {
- total: 0,
- pageNum: 1,
- pageSize: 10,
- keyword: "",
- accountManagementId: "",
- currency: "",
- status: "",
- received: "",
- beginAmount: undefined,
- endAmount: undefined,
- startTime: "",
- stopTime: "",
- remarks: "",
- },
- });
- const loading = ref(false);
- const selectConfig = computed(() => {
- return [
- {
- label: "收支类型",
- prop: "status",
- data: status.value,
- },
- {
- label: "资金账户",
- prop: "accountManagementId",
- data: accountList.value,
- },
- {
- label: "币种",
- prop: "currency",
- data: accountCurrency.value,
- },
- ];
- });
- const config = computed(() => {
- return [
- {
- attrs: {
- label: "归属公司",
- prop: "corporationName",
- width: 160,
- },
- },
- {
- attrs: {
- label: "关联销售合同",
- slot: "contractCodes",
- width: 160,
- },
- },
- {
- attrs: {
- label: "资金账户",
- prop: "accountManagementName",
- width: 200,
- },
- },
- {
- attrs: {
- label: "交易时间",
- prop: "transactionTime",
- width: 160,
- },
- },
- {
- attrs: {
- label: "交易金额",
- slot: "amount",
- width: 200,
- },
- },
- {
- attrs: {
- label: "对方账户",
- prop: "name",
- width: 200,
- },
- },
- {
- attrs: {
- label: "对方银行",
- prop: "openingBank",
- width: 200,
- },
- },
- {
- attrs: {
- label: "对方账号",
- prop: "accountOpening",
- width: 240,
- },
- },
- {
- attrs: {
- label: "摘要",
- prop: "remarks",
- },
- },
- {
- attrs: {
- label: "操作",
- width: "120",
- align: "center",
- },
- renderHTML(row) {
- return [
- {
- attrs: {
- label: "修改",
- type: "primary",
- text: true,
- },
- el: "button",
- click() {
- update(row);
- },
- },
- {
- attrs: {
- label: "删除",
- type: "primary",
- text: true,
- },
- el: "button",
- click() {
- ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- }).then(() => {
- proxy
- .post("/accountRunningWater/delete", {
- id: row.id,
- })
- .then(() => {
- ElMessage({
- message: "删除成功",
- type: "success",
- });
- getList();
- });
- });
- },
- },
- ];
- },
- },
- ];
- });
- const getDict = () => {
- proxy
- .post("/dictTenantData/page", {
- pageNum: 1,
- pageSize: 999,
- dictCode: "account_currency",
- tenantId: useUserStore().user.tenantId,
- })
- .then((res) => {
- if (res.rows && res.rows.length > 0) {
- accountCurrency.value = res.rows.map((item) => {
- return {
- label: item.dictValue,
- value: item.dictKey,
- };
- });
- }
- });
- proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 999 }).then((res) => {
- if (res.rows && res.rows.length > 0) {
- accountList.value = res.rows.map((item) => {
- return {
- label: item.alias,
- value: item.id,
- };
- });
- }
- });
- };
- const getList = async (req) => {
- sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
- loading.value = true;
- proxy.post("/accountRunningWater/page", sourceList.value.pagination).then((res) => {
- sourceList.value.data = res.rows;
- sourceList.value.pagination.total = res.total;
- setTimeout(() => {
- loading.value = false;
- }, 200);
- });
- };
- getDict();
- getList();
- let transferMoneyModal = ref(false);
- const openTransferMoney = () => {
- formData2.data = {
- transactionTime: moment().format("yyyy-MM-DD HH:mm:ss"),
- isTransaction: '0'
- };
- transferMoneyModal.value = true;
- };
- const modalType = ref("add");
- const dialogVisible = ref(false);
- const loadingDialog = ref(false);
- const submit = ref(null);
- const formOption = reactive({
- inline: true,
- labelWidth: 100,
- itemWidth: 100,
- rules: [],
- });
- const formData = reactive({
- data: {
- isTransaction:'1',
- },
- });
- const formData2 = reactive({
- data: {},
- });
- const transferMoneyConfig = computed(() => {
- return [
- {
- label: "转出信息",
- },
- {
- type: "select",
- prop: "accountManagementId",
- label: "转出账户",
- data: accountList.value,
- },
- {
- type: 'selectInput',
- label: '转出金额',
- prop: "amount",
- itemWidth: 60,
- data: accountCurrency.value,
- placeholder: '请输入',
- selectPlaceholder: '币种',
- selectProp: 'currency',
- fn: (value) => {
- //判断value的类型
- if(isNaN(value)){
-
- formData2.data.inCurrency = formData2.data.currency
- formData2.data.commissionCurrency = formData2.data.currency
- }else{
- if (value != '') {
- if (value.indexOf('.') > -1) {
- formData2.data.amount = value.slice(0, value.indexOf('.') + 3)
- } else {
- formData2.data.amount = value
- }
- }
- formData2.data.inAmount = formData2.data.amount
- }
- },
- },
-
- {
- type: "date",
- prop: "transactionTime",
- label: "转出时间",
- itemType: "datetime",
- },
-
- {
- label: "转入信息",
- },
- {
- type: "select",
- prop: "inAccountManagementId",
- label: "转入账户",
- data: accountList.value,
- },
- {
- type: 'selectInput',
- label: '转入金额',
- prop: "inAmount",
- itemWidth: 60,
- data: accountCurrency.value,
- placeholder: '请输入',
- selectPlaceholder: '币种',
- selectProp: 'inCurrency',
- },
- {
- label: "其他信息",
- },
- {
- type: "radio",
- prop: "isTransaction",
- label: "是否往来",
- data: [
- {
- label: "是",
- value: '1',
- },
- {
- label: "否",
- value: '0',
- },
- ],
- },
- {
- type: 'selectInput',
- label: '手续费',
- prop: "commissionAmount",
- itemWidth: 60,
- data: accountCurrency.value,
- placeholder: '请输入',
- selectPlaceholder: '币种',
- selectProp: 'commissionCurrency',
- },
-
- {
- type: "input",
- prop: "remarks",
- label: "摘要",
- itemType: "textarea",
- },
- ];
- });
- const formConfig = computed(() => {
- return [
- {
- label: "账户信息",
- },
- {
- type: "select",
- prop: "accountManagementId",
- label: "选择账户",
- data: accountList.value,
- },
- {
- label: "交易信息",
- },
- {
- type: "slot",
- prop: "transactionTime",
- slotName: "transactionTime",
- label: "交易时间",
- },
- {
- type: "slot",
- prop: "money",
- slotName: "money",
- label: "交易金额",
- },
- formData.data.status == "10"
- ? {
- type: "slot",
- prop: "received",
- slotName: "received",
- label: "合同到账",
- }
- : {},
- // sysUserMenu/list
- //单选框
- {
- type: "radio",
- prop: "isTransaction",
- label: "是否往来",
- data: [
- {
- label: "是",
- value: 1,
- },
- {
- label: "否",
- value: 0,
- },
- ],
- fn: (val) => {
- formData.data.transactionDeptId = ''
- formData.data.deptType = "";
- formConfig.value[7].data = transactionDepartmentData.value
- },
- },
- {
- type: "select",
- prop: "transactionDeptId",
- label: "往来单位",
- data: [],
- isShow: formData.data.isTransaction == 1,
- fn: (val) => {
- if (val) {
- let list = transactionDepartmentData.value.filter((item) => item.id === val);
- if (list && list.length > 0) {
- formData.data.deptType = list[0].deptType;
- } else {
- formData.data.deptType = "";
- }
- } else {
- formData.data.deptType = "";
- }
- },
- },
- {
- type: "input",
- prop: "name",
- label: "账户名称",
- itemType: "text",
- },
- {
- type: "input",
- prop: "openingBank",
- label: "开户银行",
- itemType: "text",
- },
- {
- type: "input",
- prop: "accountOpening",
- label: "银行账号",
- itemType: "text",
- },
- {
- label: "对方信息",
- },
-
- {
- type: "select",
- prop: "otherId",
- label: "对方名称",
- data: [
- {
- label: "客户",
- value: "10",
- },
- {
- label: "供应商",
- value: "20",
- },
- {
- label: "其他",
- value: "30",
- },
- ],
- },
- {
- type: "input",
- prop: "name",
- label: "账户名称",
- itemType: "text",
- },
- {
- type: "input",
- prop: "openingBank",
- label: "开户银行",
- itemType: "text",
- },
- {
- type: "input",
- prop: "accountOpening",
- label: "银行账号",
- itemType: "text",
- },
- {
- label: "其他信息",
- },
- {
- type: "input",
- prop: "remarks",
- label: "摘要",
- itemType: "textarea",
- },
- ];
- });
- const validatePass = (rule, value, callback) => {
- console.log(formData2.data.currency);
- if (!formData2.data.currency) {
- callback(new Error("请输入金额和选择币种"));
- } else {
- callback();
- }
- };
- const validatePass2 = (rule, value, callback) => {
- if (!formData2.data.inCurrency) {
- callback(new Error("请输入金额和选择币种"));
- } else {
- callback();
- }
- };
- const rules = ref({
- accountManagementId: [{ required: true, message: "请选择账户", trigger: "change" }],
- transactionTime: [{ required: true, message: "请选择交易时间", trigger: "change" }],
- status: [{ required: true, message: "请选择收支类型", trigger: "change" }],
- currency: [{ required: true, message: "请选择币种", trigger: "change" }],
- received: [{ required: true, message: "请选择合同是否到账", trigger: "change" }],
- inAccountManagementId: [{ required: true, message: "请选择账户", trigger: "change" }],
- inAmount: [{ required: true, message: "请输入金额和选择币种", trigger: "blur" }, { required: true, validator: validatePass2, trigger: "blur" }],
- isTransaction: [{ required: true, message: "请选择是否往来", trigger: "change" }],
- transactionDeptId: [{ required: true, message: "请选择往来单位", trigger: "change" }],
- amount: [{ required: true, message: "请输入金额", trigger: "blur" }],
- });
- const rules2 = ref({
- accountManagementId: [{ required: true, message: "请选择账户", trigger: "change" }],
- transactionTime: [{ required: true, message: "请选择交易时间", trigger: "change" }],
- status: [{ required: true, message: "请选择收支类型", trigger: "change" }],
- currency: [{ required: true, message: "请选择币种", trigger: "change" }],
- received: [{ required: true, message: "请选择合同是否到账", trigger: "change" }],
- inAccountManagementId: [{ required: true, message: "请选择账户", trigger: "change" }],
- inAmount: [{ required: true, message: "请输入金额和选择币种", trigger: "blur" }, { required: true, validator: validatePass2, trigger: "blur" }],
- isTransaction: [{ required: true, message: "请选择是否往来", trigger: "change" }],
- transactionDeptId: [{ required: true, message: "请选择往来单位", trigger: "change" }],
- amount: [{ required: true, message: "请输入金额和选择币种", trigger: "blur" }, { required: true, validator: validatePass, trigger: "blur" }]
- });
- const openModal = (val) => {
- modalType.value = val;
-
- formData.data = {
- transactionTime: moment().format("yyyy-MM-DD HH:mm:ss"),
- };
- console.log(formConfig.value);
- loadingDialog.value = false;
- dialogVisible.value = true;
- };
- const transactionDepartmentData = ref([])
- const getTransactionDepartment = () => {
- return proxy
- .get("transactionDepartment/list?pageNum=1&pageSize=999", {})
- .then((res) => {
- transactionDepartmentData.value = res.data.map((item) => {
- return {
- label: item.name,
- value: item.id,
- };
- });
- formConfig.value[7].data = transactionDepartmentData.value
- formConfig.value = {...formConfig.value}
- });
- };
- getTransactionDepartment()
- const changeStatus = () => {
- formData.data.received = "";
- };
- const transferMoneySubmit = ref(null);
- const submitForm2 = () => {
- transferMoneySubmit.value.handleSubmit(() => {
- console.log(formData2.data)
- loadingDialog.value = true;
- proxy.post("/accountRunningWater/internalTransfer", {...formData2.data}).then(
- () => {
- ElMessage({
- message: modalType.value == "add" ? "转账成功" : "转账成功",
- type: "success",
- });
- transferMoneyModal.value = false;
- getList();
- },
- (err) => {
- console.log(err);
- loadingDialog.value = false;
- }
- );
- });
- };
- const submitForm = () => {
- submit.value.handleSubmit(() => {
- if (!formData.data.amount || Number(formData.data.amount) == 0) {
- return ElMessage("交易金额不能为0");
- }
- loadingDialog.value = true;
- proxy.post("/accountRunningWater/" + modalType.value, formData.data).then(
- () => {
- ElMessage({
- message: modalType.value == "add" ? "添加成功" : "编辑成功",
- type: "success",
- });
- dialogVisible.value = false;
- getList();
- },
- (err) => {
- console.log(err);
- loadingDialog.value = false;
- }
- );
- });
- };
- const update = (row) => {
- modalType.value = "edit";
- loadingDialog.value = true;
- proxy.post("/accountRunningWater/detail", { id: row.id }).then((res) => {
- formData.data = res;
- loadingDialog.value = false;
- getTransactionDepartment()
- });
-
- dialogVisible.value = true;
- };
- const deriveExcel = () => {
- let queryParams = proxy.deepClone(sourceList.value.pagination);
- queryParams.pageNum = 1;
- queryParams.pageSize = 9999;
- proxy.postTwo("/accountRunningWater/exportExcel", queryParams).then((res) => {
- exportData(res, "资金流水.xlsx");
- });
- };
- const exportData = (res, name) => {
- const content = res;
- const blob = new Blob([content], { type: "application/ms-excel" });
- const fileName = name;
- if ("download" in document.createElement("a")) {
- // 非IE下载
- const elink = document.createElement("a");
- elink.download = fileName;
- elink.style.display = "none";
- elink.href = URL.createObjectURL(blob);
- document.body.appendChild(elink);
- elink.click();
- URL.revokeObjectURL(elink.href); // 释放URL 对象
- document.body.removeChild(elink);
- } else {
- navigator.msSaveBlob(blob, fileName);
- }
- };
- const openSearch = ref(false);
- const formSearchConfig = computed(() => {
- return [
- {
- type: "select",
- prop: "accountManagementId",
- label: "资金账户",
- data: accountList.value,
- clearable: true,
- },
- {
- type: "select",
- prop: "status",
- label: "交易类型",
- data: status.value,
- itemWidth: 50,
- clearable: true,
- },
- {
- type: "select",
- prop: "received",
- label: "是否合同到账",
- data: received.value,
- itemWidth: 50,
- clearable: true,
- },
- {
- type: "select",
- prop: "currency",
- label: "币种",
- data: accountCurrency.value,
- clearable: true,
- },
- {
- type: "slot",
- slotName: "money",
- label: "交易金额",
- },
- {
- type: "slot",
- slotName: "time",
- label: "交易时间",
- },
- {
- type: "input",
- prop: "remarks",
- label: "摘要",
- itemType: "text",
- },
- ];
- });
- let copySearch = ref({});
- const moreSearch = () => {
- copySearch.value = proxy.deepClone(sourceList.value.pagination);
- openSearch.value = true;
- };
- const cancelSearch = () => {
- sourceList.value.pagination = copySearch.value;
- openSearch.value = false;
- };
- const submitSearch = () => {
- if (
- sourceList.value.pagination.beginAmount &&
- sourceList.value.pagination.endAmount &&
- Number(sourceList.value.pagination.beginAmount) > Number(sourceList.value.pagination.endAmount)
- ) {
- return ElMessage("交易金额输入错误");
- }
- if (
- sourceList.value.pagination.startTime &&
- sourceList.value.pagination.stopTime &&
- sourceList.value.pagination.startTime > sourceList.value.pagination.stopTime
- ) {
- return ElMessage("开始时间不能大于结束时间");
- }
- openSearch.value = false;
- sourceList.value.pagination.keyword = '';
- sourceList.value.pagination.pageNum = 1;
- getList();
- };
- const openPrint = ref(false);
- const rowData = ref({});
- const openDetails = (val) => {
- rowData.value = {
- code: val,
- };
- openPrint.value = true;
- };
- const printObj = ref({
- id: "printMe",
- popTitle: "",
- extraCss: "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
- extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
- });
- const clickDownload = () => {
- proxy.getPdf("外销合同PDF文件");
- };
- </script>
- <style lang="scss" scoped>
- .tenant {
- padding: 20px;
- }
- ::v-deep(.el-input-number .el-input__inner) {
- text-align: left;
- }
- </style>
|