From 09c5667700fb6da21d29c41e51fa5482a4b40bc9 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 24 十月 2025 11:22:22 +0800
Subject: [PATCH] 新公司部署相关配置修改
---
src/views/salesOutbound/index.vue | 182 ++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 176 insertions(+), 6 deletions(-)
diff --git a/src/views/salesOutbound/index.vue b/src/views/salesOutbound/index.vue
index 8704650..69c3153 100644
--- a/src/views/salesOutbound/index.vue
+++ b/src/views/salesOutbound/index.vue
@@ -37,6 +37,7 @@
</el-tabs>
<!-- 鎿嶄綔鎸夐挳鍖� -->
<el-space>
+ <el-button type="primary" @click="openForm('add')">鏂板搴旀敹</el-button>
<el-button type="primary" :icon="Plus" @click="openDia(undefined, 'add')">鏂板缓</el-button>
<el-button type="danger" :icon="Delete" @click="handleDelete">鍒犻櫎</el-button>
<el-button type="info" plain :icon="Download" @click="handleExport">瀵煎嚭</el-button>
@@ -65,20 +66,151 @@
/>
</el-card>
<form-dia ref="formDia" @closeDia="handleQuery"></form-dia>
+
+ <!-- 鏂板搴旀敹寮圭獥 -->
+ <el-dialog
+ v-model="dialogFormVisible"
+ title="鏂板搴旀敹"
+ width="70%"
+ @close="closeDia"
+ >
+ <el-form
+ :model="former"
+ label-width="140px"
+ label-position="top"
+ :rules="rules"
+ ref="formRef"
+ >
+ <el-row :gutter="30">
+ <el-col :span="12">
+ <el-form-item label="瀹㈡埛鍚嶇О锛�" prop="customer">
+ <el-input
+ v-model="former.customer"
+ placeholder="鑷姩濉厖"
+ disabled
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鐓ょ锛�" prop="coal">
+ <el-input
+ v-model="former.coal"
+ placeholder="鑷姩濉厖"
+ disabled
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="30">
+ <el-col :span="12">
+ <el-form-item label="閿�鍞�婚噾棰�(鍏�)锛�" prop="totalAmount">
+ <el-input
+ type="number"
+ v-model="former.totalAmount"
+ placeholder="鑷姩濉厖"
+ :step="0.01"
+ disabled
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鏈搴旀敹閲戦锛�" prop="receiptPaymentAmount">
+ <el-input-number :step="0.01" :min="0" style="width: 100%"
+ :precision="2"
+ v-model="former.receiptPaymentAmount"
+ placeholder="璇疯緭鍏�"
+ clearable
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="30">
+ <el-col :span="12">
+ <el-form-item label="鍥炴褰㈠紡锛�" prop="receiptPaymentType">
+ <el-select
+ v-model="former.receiptPaymentType"
+ placeholder="璇烽�夋嫨"
+ clearable
+ >
+ <el-option
+ v-for="item in receipt_payment_type"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鐧昏浜猴細" prop="registrant">
+ <el-input
+ v-model="former.registrant"
+ placeholder="璇疯緭鍏�"
+ clearable
+ disabled
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="30">
+ <el-col :span="12">
+ <el-form-item label="鏉ユ鏃ユ湡锛�" prop="receiptPaymentDate">
+ <el-date-picker
+ style="width: 100%"
+ v-model="former.receiptPaymentDate"
+ value-format="YYYY-MM-DD"
+ format="YYYY-MM-DD"
+ type="date"
+ placeholder="璇烽�夋嫨"
+ clearable
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="闄勪欢涓婁紶锛�" prop="receiptPaymentDate">
+ <SimpleMultiFileUpload
+ style="width: 100%"
+ v-model:ids="ids"
+ v-model:file-list="fileList"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ <template #footer>
+ <div class="dialog-footer">
+ <el-button type="primary" @click="submitForm">纭</el-button>
+ <el-button @click="closeDia">鍙栨秷</el-button>
+ </div>
+ </template>
+ </el-dialog>
</div>
</template>
<script setup>
-import {ref, reactive, onMounted} from "vue";
+import {ref, reactive, onMounted, nextTick} from "vue";
+import SimpleMultiFileUpload from "@/components/FileUpload/SimpleMultiFileUpload.vue"
const { proxy } = getCurrentInstance()
+const { receipt_payment_type } = proxy.useDict("receipt_payment_type");
import {Delete, Download, Plus} from "@element-plus/icons-vue";
+import { ElMessage } from "element-plus";
import ETable from "@/components/Table/ETable.vue";
import Pagination from "@/components/Pagination/index.vue";
import FormDia from "@/views/salesOutbound/components/formDia.vue";
import {delSalesRecord, salesRecordList} from "@/api/salesOutbound/index.js";
+import {
+ receiptPaymentSaveOrUpdate,
+ bindInvoiceNoRegPage,
+ invoiceInfo,
+ receiptPaymentHistoryListNoPage,
+ receiptPaymentDel,
+} from "@/api/salesManagement/receiptPayment.js";
+
const formDia = ref()
const activeTab = ref("out");
+const ids = ref([])
+const fileList = ref([])
// 鏍囩椤垫暟鎹�
const tabs = reactive([
{ name: "out", label: "閿�鍞嚭搴�" },
@@ -86,6 +218,7 @@
// 琛ㄦ牸鏁版嵁
const operationsArr = ref(['edit', 'viewRow']);
const tableLoading = ref(false);
+const dialogFormVisible = ref(false);
const tableData = ref([]);
const columns = ref([
{ prop: "saleDate", label: "閿�鍞棩鏈�", minWidth: 160 },
@@ -97,7 +230,8 @@
{ prop: "saleQuantity", label: "閿�鍞暟閲�", minWidth: 120 },
{ prop: "salePrice", label: "閿�鍞崟浠�(鍚◣)", minWidth: 150 },
{ prop: "totalAmount", label: "閿�鍞�讳环(鍚◣)", minWidth: 120 },
- { prop: "freight", label: "杩愯垂", minWidth: 90 },
+ { prop: "salesFreight", label: "閿�鍞繍璐�", minWidth: 90 },
+ { prop: "purchasingFreight", label: "閲囪喘杩愯垂", minWidth: 90 },
{ prop: "taxCoal", label: "璐攢鐓ょ◣鐜�(%)", minWidth: 120 },
{ prop: "taxTrans", label: "杩愯緭绋庣巼(%)", minWidth: 120 },
{ prop: "grossProfit", label: "姣涘埄娑�", minWidth: 90 },
@@ -109,6 +243,8 @@
const total = ref(0);
const pageNum = ref(1);
const pageSize = ref(10);
+const former = ref({})
+
// 鏌ヨ鍙傛暟
const queryParams = reactive({
saleDate: "",
@@ -179,12 +315,12 @@
"鏁版嵁锛�"
)
.then((res) => {
- if (res) {
- ElMessage.success("姝e湪瀵煎嚭鏁版嵁锛岃绋嶅��...");
+ if (!res) return;
exportData(config.api, config.name);
- }
})
- .catch(() => {});
+ .catch(() => {
+ ElMessage.error("瀵煎嚭澶辫触锛岃閲嶈瘯");
+ });
};
const exportData = (api, name) => {
proxy.download(
@@ -198,6 +334,40 @@
const handleSelectionChange = (selection) => {
selectedRows.value = selection;
};
+
+// 鎵撳紑寮规
+const openForm = () => {
+ if (selectedRows.value.length !== 1) {
+ proxy.$modal.msgError("璇烽�夋嫨涓�鏉℃暟鎹�");
+ return;
+ }
+ invoiceInfo({ id: selectedRows.value[0].id }).then((res) => {
+ console.log(res.data)
+ former.value = { ...res.data };
+ former.value.salesRecordId = former.value.id;
+ former.value.id = "";
+ // form.value.registrant = userStore.nickName;
+ });
+ dialogFormVisible.value = true;
+};
+// 鎻愪氦琛ㄥ崟
+const submitForm = () => {
+ proxy.$refs["formRef"].validate((valid) => {
+ if (valid) {
+ former.value.attachUpload = ids.value.join(",")
+ receiptPaymentSaveOrUpdate(former.value).then((res) => {
+ proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+ closeDia();
+ getList();
+ });
+ }
+ });
+};
+// 鍏抽棴寮规
+const closeDia = () => {
+ proxy.resetForm("formRef");
+ dialogFormVisible.value = false;
+};
</script>
<style scoped>
--
Gitblit v1.9.3