金巢订单模块,以及样式优化

main
wangmeng 2 months ago
parent 660154a7ca
commit be8a7b955d
  1. 8
      src/App.vue
  2. 7
      src/components/basic-crumb/main.vue
  3. 20
      src/styles/element-ui.scss
  4. 5
      src/styles/login.scss
  5. 163
      src/views/approval/approvalDetails.vue
  6. 7
      src/views/approval/approvalRecord.vue
  7. 4
      src/views/order/AddtoTemplate.vue
  8. 19
      src/views/order/addRemittanceRecord.vue
  9. 375
      src/views/order/bankReceiptDetail.vue
  10. 1
      src/views/order/category.vue
  11. 21
      src/views/order/orderAddEdit.vue
  12. 31
      src/views/order/orderList.vue
  13. 8
      src/views/order/orderListFinance.vue
  14. 1
      src/views/order/subcategory.vue
  15. 1
      src/views/order/year.vue
  16. 19
      src/views/product/add/add.vue
  17. 16
      src/views/product/add/category.vue
  18. 22
      src/views/product/add/edit.vue
  19. 34
      src/views/product/add/exchangeRate.vue
  20. 28
      src/views/product/add/productCostPrice.vue
  21. 27
      src/views/product/add/subcategory.vue
  22. 4
      src/views/wel/components/ApprovalTip.vue
  23. 2
      src/views/wel/index.vue

@ -105,9 +105,17 @@ export default {
.el-button{
font-size: 1.25vw;
border-radius: 10px;
}
.el-form-item__label{
font-size: 1.25vw;
}
::v-deep .el-table__header th {
background-color: #3176FD !important;
color: #fff;
}
::v-deep .el-table__header tr:last-child th {
background-color: #3176FD !important;
}
</style>

@ -24,8 +24,8 @@ export default {
<style lang='scss' scoped>
::v-deep .el-breadcrumb__item:last-child .el-breadcrumb__inner{
font-weight: 700;
color: #303133;
// font-weight: 700;
color: #101010;
cursor: pointer;
}
@ -33,5 +33,8 @@ export default {
color: #409EFF;
cursor: pointer;
}
::v-deep .el-breadcrumb__inner a, .el-breadcrumb__inner.is-link {
font-weight: 500 !important;
}
</style>

@ -69,3 +69,23 @@
.el-divider--horizontal {
margin: 12px 0 !important;
}
.el-table__header th {
background-color: #3A84FF !important;
color: #fff;
}
.el-table__header tr:last-child th {
background-color: #3A84FF !important;
}
.el-dialog__header{
background-color: #3A84FF !important;
color: #fff;
}
.el-button--primary {
color: #FFF;
background-color: #3A84FF !important;
border-color: #3A84FF !important;
}
.el-checkbox__inner{
// background-color: #3176FD !important;
}

@ -112,16 +112,17 @@
.btn-submit {
width: 100%;
height: 45px;
border: 1px solid #409EFF;
border: 1px solid #409EFF !important;
background: none;
font-size: 18px;
letter-spacing: 2px;
font-weight: 300;
color: #409EFF;
color: #409EFF !important;
cursor: pointer;
margin-top: 30px;
font-family: "neo";
transition: 0.25s;
background-color:none !important ;
}
.login-submit {

@ -11,7 +11,7 @@
<!-- 订单信息卡片 -->
<div class="boxcard" v-if="!loading && orderData">
<div class="card-header">订单信息</div>
<el-row :gutter="25" class="order-info-container">
<el-row :gutter="40" class="order-info-container">
<!-- 左侧订单信息el-col -->
<div style="padding:20px;width:100%">
<el-col :span="12">
@ -67,7 +67,7 @@
<span class="label">申请优惠金额:</span>
<span class="value">
<el-input
v-model="orderData.discountprice"
v-model="orderData.discountAmount"
:disabled="isDisabled"
style="width: 100px"
placeholder="请输入"
@ -98,9 +98,9 @@
/>%
</span>
</div>
<div class="info-item" v-if="orderData.monetaryUnit =='CNY'">
<div class="info-item" v-if="orderData.monetaryUnit !=='CNY'">
<!-- 中国的话 不存在 -->
{{orderData.monetaryUnit}}
<!-- {{orderData.monetaryUnit}} -->
<span class="label">优惠汇率:</span>
<span class="value">
<el-input
@ -145,10 +145,10 @@
</div>
<!-- 按钮组仅最后一行显示 -->
<div
class="btn-group"
v-if="index === orderData.extraChargeList.length - 1 && !isDisabled"
class="btn-group"
>
<el-button
<template v-if="index === orderData.extraChargeList.length - 1 && !isDisabled">
<el-button
type="success"
icon="el-icon-plus"
circle
@ -161,13 +161,15 @@
@click="removeFeeItem"
:disabled="orderData.extraChargeList.length <= 1"
/>
</template>
</div>
</div>
</div>
</div>
</div>
<!-- 系统信息卡片 -->
<!-- 项目信息卡片 -->
<div
class="systemBox"
v-if="
@ -177,9 +179,9 @@
orderData.projectList.length > 0
"
>
<div class="card-header">系统信息</div>
<div class="card-header">项目信息</div>
<div class="system-info-container">
<!-- 系统列表 -->
<!-- 项目列表 -->
<div
class="system-item"
v-for="(project, index) in orderData.projectList"
@ -191,7 +193,7 @@
<!-- {{project}} -->
<!-- <span class="system-code">{{ project.code }}</span> -->
<span class="system-name">{{ project.name }}</span>
<span class="system-name">{{ project.num }}</span>
<span class="system-name">{{ project.unit }}</span>
<span></span>
@ -211,15 +213,17 @@
border
max-height="430px"
size="small"
:header-cell-style="{ 'text-align': 'center' }"
:cell-style="{ 'text-align': 'center' }"
>
<el-table-column prop="code" label="产品编号" />
<el-table-column prop="name" label="产品名称" />
<el-table-column prop="spec" label="产品规格" />
<el-table-column prop="num" label="产品数量" />
<el-table-column prop="unit" label="单位" />
<el-table-column prop="standardPrice" label="公司指导价" />
<el-table-column prop="sellingPrice" label="销售价" />
<el-table-column prop="splitPrice" label="分成金额" />
<el-table-column prop="code" label="产品编号" width="170" />
<el-table-column prop="name" label="产品名称" width="170"/>
<el-table-column prop="spec" label="产品规格" width="170" />
<el-table-column prop="num" label="产品数量" width="170" />
<el-table-column prop="unit" label="单位" width="80"/>
<el-table-column prop="standardPrice" label="公司指导价" width="210"/>
<el-table-column prop="sellingPrice" label="销售价" width="210"/>
<el-table-column prop="splitPrice" label="分成金额" width="210"/>
</el-table>
<div class="rowTotal">
<div class="rowleft">
@ -227,13 +231,13 @@
</div>
<div class="rowright">
<div class="item">
公司指导价合计 {{project.standardPrice}}
公司指导价合计 {{project.standardPrice}}
</div>
<div class="item">
销售价合计 {{project.sellingPrice}}
销售价合计 {{project.sellingPrice}}
</div>
<div class="item">
分成金额合计 {{project.splitPrice}}
分成金额合计 {{project.splitPrice}}
</div>
</div>
</div>
@ -246,17 +250,17 @@
<div v-if="isDisabled" class="approval-action-box">
<span style="color:#ffff">审批意见 </span>
<el-input
v-model="orderData.aporoveRemarks"
v-model="orderData.approveRemarks"
disabled
style="width: 80%; margin-right: 20px"
style="width: 70vw; margin-right: 20px"
/>
</div>
<template v-if="!isDisabled">
<el-input
style=""
v-model="orderData.aporoveRemarks"
v-model="orderData.approveRemarks"
placeholder="请输入审批意见"
style="width: 80%; margin-right: 20px"
style="width: 70vw; margin-right: 20px"
/>
<el-button
type="danger"
@ -274,9 +278,10 @@
<el-dialog
title="客户详情"
:visible.sync="customerDialogVisible"
width="400px"
width="450px"
append-to-body
:modal="false"
class="customer-dialog"
>
<div class="customer-detail">
<div class="detail-item">
@ -344,7 +349,7 @@ export default {
loading: false, //
orderData: {}, //
expandProjectIndex: -1,
// aporoveRemarks: "", //
// approveRemarks: "", //
orderId: "",
isDisabled:""
@ -358,6 +363,7 @@ export default {
this.getOrderDetail(orderId);
this.orderId = orderId;
}
},
methods: {
async getOrderDetail(orderId) {
@ -369,7 +375,9 @@ export default {
//
if (res.data.code === 200) {
this.orderData = res.data.data; //
if(this.$route.query.mode !== 'view' && this.orderData.targetCurrency !== 'CNY'){
this.getExchangeRateList()
}
if (
!this.orderData.extraChargeList ||
this.orderData.extraChargeList.length === 0
@ -386,6 +394,23 @@ export default {
//
this.loading = false;
}
},
//
getExchangeRateList() {
getExchangeRateList({
baseCurrency: "CNY", //
targetCurrency: this.orderData.monetaryUnit, //
current: 1,
size: 1000,
})
.then((res) => {
if (res.data.code === 200) {
const tableData = res.data.data.records || [];
this.orderData.exchangeRate = tableData[0].rate
// this.total = res.data.data.total || 0;
}
})
.catch(() => {});
},
//
calcCommissionPrice() {
@ -450,14 +475,14 @@ calcCommissionPrice() {
}
},
// /
// /
toggleProject(index) {
// -1
this.expandProjectIndex = this.expandProjectIndex === index ? -1 : index;
},
/**
* 方法计算前端分页数据
* @param {Object} system - 系统对象
* @param {Object} system - 项目对象
*/
calcPageData(system) {
const { productList, currentPage, pageSize } = system;
@ -490,9 +515,12 @@ calcCommissionPrice() {
//
async handleApproval(mode) {
// if (!this.aporoveRemarks) {
// if (!this.approveRemarks) {
// return this.$message.warning("");
// }
if (mode === 'reject' && !this.orderData.approveRemarks.trim()) {
return this.$message.warning("请输入审批意见");
}
// 3- 4-
let status = 3;
if (mode == "reject") {
@ -505,14 +533,14 @@ calcCommissionPrice() {
exchangeRate: this.orderData.exchangeRate,
commissionPrice: this.orderData.commissionPrice,
status: status,
aporoveRemarks:this.orderData.aporoveRemarks,
approveRemarks:this.orderData.approveRemarks,
extraChargeList: this.orderData.extraChargeList
.filter((item) => item.type && item.price) //
.map((item) => ({
type: item.type,
price: item.price,
})),
discountprice:this.orderData.discountprice,
discountAmount:this.orderData.discountAmount,
};
console.log("requestData1111",requestData)
//
@ -608,6 +636,17 @@ calcCommissionPrice() {
color: #303133;
}
}
::v-deep .el-input {
display: inline-flex;
align-items: center;
// line-height:32px
.el-input__inner {
height: 32px !important;
line-height: 32px !important;
padding: 0 15px !important; //
box-sizing: border-box;
}
}
.formula {
color: #909399;
@ -634,7 +673,7 @@ calcCommissionPrice() {
.fee-item {
display: flex;
align-items: center;
width: 50%;
width: 44%;
.label {
width: 80px;
text-align: left;
@ -646,6 +685,7 @@ calcCommissionPrice() {
//
.btn-group {
width: 12%;
display: flex;
gap: 10px; //
margin-left: 20px;
@ -732,14 +772,12 @@ calcCommissionPrice() {
}
}
.customer-detail {
color: #2244f5;
font-size: 20px !important;
}
.detail-label {
display:block;
width: 240px;
}
// .customer-detail {
// color: #2244f5;
// font-size: 20px !important;
// }
.rowTotal{
display: flex;
justify-content: space-between;
@ -749,9 +787,46 @@ calcCommissionPrice() {
width:80%;
justify-content: flex-end;
.item{
margin: 0 40px;
// width: 200px;
margin: 0 20px;
}
}
}
}
</style>
<style lang="scss">
.customer-dialog{
.el-dialog__body{
padding: 0 30px !important;
}
}
/* 专门处理弹窗 */
.customer-dialog .customer-detail {
padding: 10px 20px;
font-size: 14px;
// color: #2244f5 !important;
}
.customer-dialog .detail-item {
display: flex;
align-items: flex-start;
// padding: 10px 0;
}
.customer-dialog .detail-label {
width: 110px;
font-weight: 500;
color: #606266;
text-align: left;
padding-right: 15px;
}
.customer-dialog .detail-value {
flex: 1;
// color: #2244f5 !important;
// word-wrap: break-word;
// word-break: break-all;
}
</style>

@ -7,7 +7,7 @@
<!-- 搜索区域 -->
<div class="search-bar">
<el-input v-model="searchKeyword" placeholder="搜索审批记录..." class="search-input"></el-input>
<el-button size="small" type="primary" plain round @click="handleSearch">查询</el-button>
<el-button size="small" type="primary" plain @click="handleSearch">查询</el-button>
</div>
<!-- 标签切换待审批/已审批 -->
@ -247,10 +247,9 @@ export default {
}
.page-title {
font-size: 20px;
font-weight: bold;
font-size: 1.5vw;
text-align: center;
margin-bottom: 20px;
}
.search-bar {

@ -60,7 +60,7 @@
<el-table-column
prop="unitCn"
label="单位"
width="80"
width="60"
align="center"
></el-table-column>
<el-table-column
@ -137,7 +137,7 @@
<el-table-column
prop="unitCn"
label="单位"
width="80"
width="60"
align="center"
></el-table-column>
<el-table-column

@ -9,18 +9,18 @@
<!-- 订单信息卡片 -->
<el-card class="info-card" shadow="hover">
<div class="card-header">订单信息</div>
<el-form :model="orderForm" label-width="150px" class="order-form">
<el-form :model="orderForm" label-width="120px" class="order-form">
<el-form-item label="订单编号">
<el-input v-model="orderForm.code" disabled style="width:200px"> </el-input>
<el-input v-model="orderForm.code" disabled style="width:270px"> </el-input>
</el-form-item>
<el-form-item label="订单总金额">
<el-input v-model="orderForm.sellingPrice" disabled style="width:200px"></el-input>
<el-input v-model="orderForm.sellingPrice" disabled style="width:180px"></el-input>
</el-form-item>
<el-form-item label="已汇金额">
<el-input v-model="orderForm.remittedAmount" disabled style="width:200px"></el-input>
<el-input v-model="orderForm.remittedAmount" disabled style="width:180px"></el-input>
</el-form-item>
<el-form-item label="待汇金额">
<el-input v-model="orderForm.unremittedAmount" disabled style="width:200px"></el-input>
<el-input v-model="orderForm.unremittedAmount" disabled style="width:180px"></el-input>
</el-form-item>
</el-form>
</el-card>
@ -310,12 +310,13 @@ export default {
.order-form {
display: flex;
flex-wrap: wrap;
// flex-wrap: wrap;
// gap: 10px;
justify-content: space-evenly;
// justify-content: space-evenly;
.el-form-item {
width: 25%; // 4
// width: calc(25% - 22.5px);
margin: 0 10px;
margin-bottom: 0;
}
}
@ -342,7 +343,7 @@ export default {
}
}
.paddingBox{
padding: 50px;
padding: 0 20px;
}
}
</style>

@ -35,19 +35,19 @@
<el-image
:src="item.url"
style="width: 200px; height: 160px; object-fit: cover"
:preview-src-list="[item.url]"
:alt="`${item.name}水单`"
@click="openFloatImage(item.url, item.name)"
>
<div slot="error" class="image-slot">
<i class="el-icon-picture-outline"></i>
</div>
</el-image>
<!-- 放大查看按钮点击触发图片预览 -->
<!-- 放大查看按钮触发浮窗 -->
<el-button
type="primary"
size="mini"
icon="el-icon-zoom-in"
@click="previewImage(item.url)"
@click="openFloatImage(item.url, item.name)"
style="margin-top: 5px"
:disabled="!item.url"
>
@ -57,7 +57,7 @@
<!-- 删除按钮悬浮显示 -->
<div class="delete-btn-box">
<el-button
v-if="canShowDeleteBtn"
v-if="canShowDeleteBtn"
type="text"
icon="el-icon-delete"
class="delete-btn"
@ -91,55 +91,47 @@ export default {
data() {
return {
receiptList: [],
loading: false, //
loading: false,
orderId: "",
// 使
// defaultImg: "https://img.yzcdn.cn/vant/cat.jpeg",
floatWindow: null, // DOM
floatMask: null,
imgScale: 1, // 1
isWindowMax: false, //
originalWindowStyle: {}, //
};
},
computed: {
...mapGetters(["userInfo"]),
canShowDeleteBtn() {
//
const allowRoles = ["administrator","manager","sale","jinchao","saleManager"];
if (!this.userInfo || !this.userInfo.role_name) return false;
//
return allowRoles.includes(this.userInfo.role_name);
}
computed: {
...mapGetters(["userInfo"]),
canShowDeleteBtn() {
const allowRoles = ["administrator", "manager", "sale", "jinchao", "saleManager"];
if (!this.userInfo || !this.userInfo.role_name) return false;
return allowRoles.includes(this.userInfo.role_name);
},
},
mounted() {
this.orderId = this.$route.query.id || "";
//
this.getReceiptList();
//
if (this.$route.query.isUpdate == true) {
this.handleUpdateStatus();
}
//
window.addEventListener('beforeunload', () => {
this.closeFloatImage(true);
});
},
computed:{
destroyed() {
//
},
methods: {
//
async getReceiptList() {
try {
this.loading = true;
// if (!orderId) {
// this.$message.warning('ID')
// this.loading = false
// return
// }
// 2.
const res = await getReceiptDetailList({
current: 1,
size: 100000,
orderId: this.orderId,
});
// 3.
if (res.data.code === 200) {
this.receiptList = res.data.data.records;
} else {
@ -152,18 +144,15 @@ export default {
this.loading = false;
}
},
//
//
async handleUpdateStatus() {
try {
const res = await updateStatus({
orderId: this.orderId,
});
await updateStatus({ orderId: this.orderId });
} catch (err) {}
},
//
//
async handleDelete(waterBillId) {
try {
// 1.
await this.$confirm(
"确定要删除此水单吗?删除后将无法恢复!",
"删除确认",
@ -174,34 +163,282 @@ export default {
dangerMode: true,
}
);
// 2.
const res = await deleteWaterBill({ id: waterBillId });
// 3.
if (res.data.code === 200) {
this.$message.success("水单删除成功");
// 4.
this.getReceiptList();
} else {
this.$message.error("删除失败:" + (res.data.msg || "接口返回异常"));
}
} catch (err) {
//
if (err !== "cancel") {
console.error("删除水单失败:", err);
this.$message.error("删除水单异常,请重试");
}
}
},
//
previewImage(imgUrl) {
// ++
openFloatImage(imgUrl, imgName = "水单图片") {
if (!imgUrl) {
this.$message.warning("暂无水单图片可查看");
return;
}
const imageDom = document.querySelector(`[src="${imgUrl}"]`);
if (imageDom) {
imageDom.click();
//
this.imgScale = 1;
this.isWindowMax = false;
//
if (this.floatWindow) {
this.floatWindow.style.display = "block";
const floatImg = this.floatWindow.querySelector(".float-img");
floatImg.src = imgUrl;
floatImg.style.transform = `scale(1)`; //
this.floatWindow.querySelector(".float-title").innerText = imgName;
return;
}
// 1.
const floatBox = document.createElement("div");
floatBox.className = "water-bill-float-window";
//
this.originalWindowStyle = {
width: '800px',
height: '600px',
top: '20px',
right: '20px',
left: 'auto' // left
};
floatBox.style.cssText = `
position: fixed;
top: 20px;
right: 20px;
z-index: 9999999;
background: #fff;
border-radius: 8px;
box-shadow: 0 2px 12px rgba(0,0,0,0.2);
padding: 8px;
width: 800px;
height: 600px;
box-sizing: border-box;
cursor: move;
transition: all 0.2s ease;
`;
// 2. ++
const floatHeader = document.createElement("div");
floatHeader.className = "float-header";
floatHeader.style.cssText = `
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 6px;
padding-bottom: 6px;
border-bottom: 1px solid #f0f0f0;
user-select: none;
`;
//
const floatTitle = document.createElement("div");
floatTitle.className = "float-title";
floatTitle.style.cssText = `font-size: 14px; font-weight: 500; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`;
floatTitle.innerText = imgName;
floatTitle.title = imgName; //
// /
const maxBtn = document.createElement("button");
maxBtn.className = "float-max-btn";
maxBtn.style.cssText = `
border: none;
background: #f5f5f5;
border-radius: 50%;
width: 30px;
height: 30px;
cursor: pointer;
color: #666;
font-size: 16px;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
margin-right: 8px;
`;
maxBtn.innerText = "□";
maxBtn.title = "最大化/还原";
maxBtn.onclick = () => this.toggleMaxWindow(floatBox);
//
const closeBtn = document.createElement("button");
closeBtn.className = "float-close-btn";
closeBtn.style.cssText = `
border: none;
background: #f5f5f5;
border-radius: 50%;
width: 30px;
height: 30px;
cursor: pointer;
color: #666;
font-size: 20px;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
`;
closeBtn.innerText = "×";
closeBtn.onclick = () => this.closeFloatImage();
// + +
const headerRight = document.createElement("div");
headerRight.style.display = "flex";
headerRight.style.alignItems = "center";
headerRight.appendChild(maxBtn);
headerRight.appendChild(closeBtn);
floatHeader.appendChild(floatTitle);
floatHeader.appendChild(headerRight);
// 3.
const imgContainer = document.createElement("div");
imgContainer.className = "float-img-container";
imgContainer.style.cssText = `
width: 100%;
height: calc(100% - 34px);
text-align: center;
overflow: auto;
display: flex;
align-items: center;
justify-content: center;
`;
const floatImg = document.createElement("img");
floatImg.className = "float-img";
floatImg.style.cssText = `
max-width: 100%;
max-height: 100%;
object-fit: contain;
border-radius: 4px;
transition: transform 0.1s ease;
transform-origin: center center; /* 缩放以图片中心为原点 */
`;
floatImg.src = imgUrl;
floatImg.alt = imgName;
//
floatImg.onerror = function () {
this.src = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjRjVGNUY1Ii8+PHBhdGggZD0iTTEwIDMySDEwMFYxMEgxMFYzMnoiIGZpbGw9IiM5OTkiLz48cGF0aCBkPSJNMzAgODBIMjBWNTBIMzBWNzBaIiBmaWxsPSIjOTk5Ii8+PHBhdGggZD0iTTUwIDgwSDRWNTBIMDVWNzBaIiBmaWxsPSIjOTk5Ii8+PHBhdGggZD0iTTcwIDgwSDYwVjUwSDcwVjcwWiIgZmlsbD0iIzkkIi8+PC9zdmc+";
this.alt = "图片加载失败";
};
//
floatImg.addEventListener("wheel", (e) => this.imgWheelZoom(e, floatImg));
imgContainer.appendChild(floatImg);
// 4.
floatBox.appendChild(floatHeader);
floatBox.appendChild(imgContainer);
// 5. bodyVue
document.body.appendChild(floatBox);
//
this.floatWindow = floatBox;
// 6.
this.draggableFloatWindow(floatBox, floatBox);
},
// /
toggleMaxWindow(floatBox) {
if (!floatBox) return;
this.isWindowMax = !this.isWindowMax;
const imgContainer = floatBox.querySelector(".float-img-container");
if (this.isWindowMax) {
// 10px
floatBox.style.width = `calc(100% - 20px)`;
floatBox.style.height = `calc(100% - 20px)`;
floatBox.style.top = `10px`;
floatBox.style.left = `10px`;
floatBox.style.right = `auto`;
//
imgContainer.style.height = `calc(100% - 34px)`;
//
floatBox.querySelector(".float-max-btn").innerText = "▢";
floatBox.querySelector(".float-max-btn").title = "还原";
} else {
//
floatBox.style.width = this.originalWindowStyle.width;
floatBox.style.height = this.originalWindowStyle.height;
floatBox.style.top = this.originalWindowStyle.top;
floatBox.style.right = this.originalWindowStyle.right;
floatBox.style.left = this.originalWindowStyle.left;
//
imgContainer.style.height = `calc(100% - 34px)`;
//
floatBox.querySelector(".float-max-btn").innerText = "□";
floatBox.querySelector(".float-max-btn").title = "最大化";
}
},
//
imgWheelZoom(e, img) {
//
e.preventDefault();
e.stopPropagation();
// ==
const delta = e.deltaY < 0 ? 0.1 : -0.1;
// 0.5-3
this.imgScale = Math.max(0.5, Math.min(3, this.imgScale + delta));
//
img.style.transform = `scale(${this.imgScale})`;
},
// isRemoveDOM
closeFloatImage(isRemove = false) {
if (this.floatWindow) {
if (isRemove) {
//
const floatImg = this.floatWindow.querySelector(".float-img");
floatImg && floatImg.removeEventListener("wheel", this.imgWheelZoom);
document.body.removeChild(this.floatWindow);
this.floatWindow = null;
//
this.imgScale = 1;
this.isWindowMax = false;
} else {
this.floatWindow.style.display = "none";
}
}
//
if (this.floatMask) {
document.body.removeChild(this.floatMask);
this.floatMask = null;
}
},
//
draggableFloatWindow(wrapEl, dragEl) {
let isDown = false;
let startX, startY, wrapLeft, wrapTop;
//
dragEl.addEventListener("mousedown", (e) => {
// /
if (e.target.className.includes("float-close-btn") || e.target.className.includes("float-max-btn")) {
return;
}
isDown = true;
startX = e.clientX;
startY = e.clientY;
wrapLeft = wrapEl.offsetLeft;
wrapTop = wrapEl.offsetTop;
wrapEl.style.zIndex = "10000";
e.preventDefault();
});
//
document.addEventListener("mousemove", (e) => {
if (!isDown) return;
const moveX = e.clientX - startX;
const moveY = e.clientY - startY;
wrapEl.style.left = `${wrapLeft + moveX}px`;
wrapEl.style.top = `${wrapTop + moveY}px`;
wrapEl.style.right = "auto"; //
wrapEl.style.transform = "none";
});
// /
const stopDrag = () => {
if (isDown) {
isDown = false;
wrapEl.style.zIndex = "9999"; //
}
};
document.addEventListener("mouseup", stopDrag);
document.addEventListener("mouseleave", stopDrag);
},
},
};
@ -231,7 +468,6 @@ export default {
.receipt-info {
display: flex;
// justify-content: space-between;
align-items: center;
.info-left {
@ -276,9 +512,8 @@ export default {
text-align: center;
width: 40%;
}
//
.delete-btn-box {
//
margin-right: 10px;
.delete-btn {
@ -296,7 +531,6 @@ export default {
}
}
//
.empty-tip {
text-align: center;
padding: 50px 0;
@ -310,7 +544,6 @@ export default {
}
}
//
.image-slot {
display: flex;
justify-content: center;
@ -322,3 +555,43 @@ export default {
}
}
</style>
<!-- 全局样式浮窗相关风格 -->
<style lang="scss">
.water-bill-float-window {
transition: box-shadow 0.2s ease, width 0.2s ease, height 0.2s ease, top 0.2s ease, left 0.2s ease;
&:hover {
box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
// /hover
.float-close-btn, .float-max-btn {
&:hover {
background: #f56c6c;
color: #fff;
}
}
//
.float-img {
pointer-events: auto;
user-drag: none;
-webkit-user-drag: none;
&:hover {
cursor: zoom-in; //
}
}
//
.float-img-container {
&::-webkit-scrollbar {
width: 6px;
height: 6px;
}
&::-webkit-scrollbar-thumb {
border-radius: 3px;
background: #ccc;
}
&::-webkit-scrollbar-track {
background: #f5f5f5;
}
}
}
</style>

@ -268,6 +268,7 @@ export default {
font-size: 1.5vw;
margin-top: 2.1vw;
margin-left: 3.4vw;
color: #101010;
}

@ -174,10 +174,11 @@
<el-form-item label="申请优惠金额:" label-width="200px">
<el-input
v-model="form.discountAmount"
placeholder="请输入优惠金额"
type="number"
placeholder="请输入优惠金额"
style="width: 100%"
:disabled="isViewMode"
type="number"
min="0"
/>
</el-form-item>
</el-col>
@ -201,18 +202,18 @@
<el-table :data="projectList" border size="small" style="width: 100%">
<el-table-column label="编号" width="100" align="center" prop="sort">
</el-table-column>
<el-table-column label="项目名称" width="250" align="center">
<el-table-column label="项目名称" width="180" align="center">
<template slot-scope="scope">
<el-input
v-model="scope.row.name"
size="mini"
:disabled="isViewMode"
placeholder="请输入"
style="width: 210px"
style="width: 150px"
/>
</template>
</el-table-column>
<el-table-column label="项目数量" width="180" align="center">
<el-table-column label="项目数量" width="150" align="center">
<template slot-scope="scope">
<el-input
v-model="scope.row.num"
@ -221,17 +222,17 @@
min="1"
:disabled="isViewMode"
placeholder="请输入"
style="width: 150px"
style="width: 120px"
/>
</template>
</el-table-column>
<el-table-column label="单位" width="190" align="center">
<el-table-column label="单位" width="110" align="center">
<template slot-scope="scope">
<el-input
v-model="scope.row.unit"
size="mini"
placeholder="请输入"
style="width: 150px"
style="width: 80px"
:disabled="isViewMode"
/>
</template>
@ -358,7 +359,7 @@ export default {
standardPrice: "",
sellingPrice: "",
splitPrice: "",
discountAmount: "",
discountAmount: 0,
},
monetaryUnitList: [],
categoryShow: false,
@ -801,7 +802,7 @@ export default {
standardPrice: "",
sellingPrice: "",
splitPrice: "",
discountAmount: "",
discountAmount: 0,
};
//
this.projectList = [];

@ -149,7 +149,12 @@
<el-table-column label="分成金额" prop="splitPrice" width="120" />
<el-table-column label="已汇金额" prop="remittedAmount" width="120" />
<el-table-column label="待汇金额" prop="unremittedAmount" width="120" />
<el-table-column label="货币单位" prop="monetaryUnit" width="120" />
<el-table-column label="货币单位" width="120">
<template slot-scope="scope">
<!-- 调用方法传入编码获取名称 -->
{{ getMonetaryUnitText(scope.row.monetaryUnit) }}
</template>
</el-table-column>
<el-table-column label="订单日期" prop="orderDate" width="130" />
<el-table-column label="状态" prop="status" width="120">
<template slot-scope="scope">
@ -313,6 +318,9 @@
<script>
import basicCrumb from "@/components/basic-crumb/main";
import {
getCurrencyList,
} from "@/api/order/orderAddEdit";
import { mapGetters } from "vuex";
import website from "@/config/website";
import { getToken } from "@/util/auth";
@ -380,10 +388,12 @@ export default {
5: { text: "完成", tagType: "success" },
6: { text: "关闭", tagType: "gray" },
},
monetaryUnitList:[]
};
},
created() {},
mounted() {
this.loadCurrencyList();
// +
this.loadCustomerList();
this.loadOrderList();
@ -406,6 +416,25 @@ export default {
},
methods: {
//
async loadCurrencyList() {
try {
const res = await getCurrencyList();
if (res.data.code === 200) {
this.monetaryUnitList = res.data.data || [];
}
} catch (err) {
this.$message.error("网络异常,无法加载货币单位列表");
}
},
getMonetaryUnitText(code) {
if (!code) return "-";
const unitItem = this.monetaryUnitList.find(item => item.dictKey === code);
//
return unitItem ? unitItem.dictValue : code;
},
//
async loadOrderList() {
this.isLoading = true;

@ -463,10 +463,10 @@ export default {
padding: 20px;
}
.page-title {
font-size: 1.5vw;
text-align: center;
margin-bottom: 20px;
font-weight: 600;
font-size: 1.5vw;
margin: 10px 0;
width: 100%;
text-align: center;
}
.btnBox {
display: flex;

@ -296,6 +296,7 @@ export default {
font-size: 1.5vw;
margin-top: 2.1vw;
margin-left: 3.4vw;
color: #101010;
}
.prodct_list{

@ -121,6 +121,7 @@ export default {
margin-top: 2.1vw;
margin-left: 3.4vw;
text-align: center;
color: #101010;
}
.selectTittle {
font-size: 1.2vw;

@ -1,5 +1,5 @@
<template>
<div class="container">
<div class="container" v-if="!loading">
<!-- 产品新增 -->
<basic-crumb></basic-crumb>
<div class="title">产品新增</div>
@ -19,8 +19,8 @@
</el-form-item>
</el-col>
<el-col :span="8" style="display:flex;justify-content: flex-end;">
<el-button size="small" type="primary" @click="handleSearch">搜索</el-button>
<el-button size="small" @click="handleReset">重置</el-button>
<el-button size="small" type="primary" @click="handleSearch">查询</el-button>
<el-button size="small" @click="handleReset">清空</el-button>
</el-col>
</el-row>
@ -37,6 +37,7 @@
</div>
<div>
<el-button type="primary" @click="saveProduct">保存产品</el-button>
<el-button type="primary" @click="handleCancle">取消</el-button>
</div>
</div>
@ -93,7 +94,7 @@
:disabled="scope.row.bizType == 2 || (scope.row.id && !scope.row.isEditing)"></el-input>
</template>
</el-table-column>
<el-table-column prop="standardPrice" label="公司指导价" align="center" width="140">
<el-table-column prop="standardPrice" label="公司指导价" align="center" width="150">
<template #default="scope">
<el-input v-model="scope.row.standardPrice" v-if="scope.row.bizType == 1 || !scope.row.bizType"
@input="handlePrice(scope.row.standardPrice, scope.$index)"
@ -186,7 +187,8 @@ export default {
searchForm: {
// nameCn: '', //
// bizRemark: '' //
}
},
loading: true
}
},
@ -326,6 +328,7 @@ blurBizPrice(value, index) {
})
},
getProductList(id) {
this.loading = true;
this.subcategoryId = id
let query = {
catalogId: id,
@ -338,6 +341,7 @@ blurBizPrice(value, index) {
if(this.searchForm.bizRemark){
query.bizRemark = this.searchForm.bizRemark
}
getProduct(query).then(res => {
this.tableData = res.data.data.records
this.tableData.map(item => {
@ -356,8 +360,9 @@ blurBizPrice(value, index) {
this.tableData.push({ multiple: 1, isEditing: false })
}
this.originData = JSON.parse(JSON.stringify(res.data.data.records))
this.loading = false;
})
},
// ========== ==========
initTableData(sourceData) {
@ -772,7 +777,7 @@ blurBizPrice(value, index) {
<style scoped lang="scss">
.container {
width: 99%;
// height: 99%;
height: 99% !important;
background: rgb(255, 255, 255);
margin: 0 auto;
margin-top: 8px;

@ -1,5 +1,5 @@
<template>
<div class="container">
<div class="container" v-if="!loading">
<basic-crumb></basic-crumb>
<!-- 产品新增-大类 -->
<div class="title">请点击选择产品大类</div>
@ -69,7 +69,8 @@ export default {
formDialog: false, //
dialogTitle: '', // /
formData: {},
menuStyle:{}
menuStyle:{},
loading: true,
}
},
computed: {
@ -97,7 +98,8 @@ export default {
console.log("userInfo.role_name:", this.userInfo.role_name); // administrator,jinchao,saleManager
},
methods:{
getCategoryList(){
getCategoryList(){
// this.loading = true
getCategory({
parentId:0,
size:9999,
@ -110,6 +112,7 @@ export default {
}
})
this.productArr = res.data.data.records
this.loading = false
})
},
handleAdd(){
@ -170,7 +173,7 @@ export default {
}
})
}).catch(() => {
this.$message.info('已取消删除')
// this.$message.info('')
})
}
}
@ -268,6 +271,7 @@ export default {
font-size: 1.5vw;
margin-top: 2.1vw;
margin-left: 3.4vw;
color: #101010;
}
@ -283,7 +287,7 @@ export default {
width: 10.42vw;
height: 10.42vw;
border-radius: 2.08vw;
background: #f4ce98;
background: #f1ab46;
display: flex;
align-items: center;
justify-content: center;
@ -293,7 +297,7 @@ export default {
text-align: center;
cursor: pointer;
&:hover {
background: #e8b878;
// background: #e8b878;
}
}
}

@ -1,5 +1,5 @@
<template>
<div class="container">
<div class="container" v-if="!loading">
<!-- 编辑产品信息 -->
<basic-crumb></basic-crumb>
<div class="title">产品实物新增</div>
@ -168,15 +168,29 @@ export default {
productId:'',
tableData:[],
subcategoryId:'',
showError:false
showError:false,
loading: true
}
},
mounted(){
this.name = this.$route.query.name
this.code = this.$route.query.code
this.subcategoryId = this.$route.query.subcategoryId
this.getDetail(this.$route.query.id)
this.getProjectObj()
// this.getDetail(this.$route.query.id)
// this.getProjectObj(
// Promiseloading
const detailPromise = this.getDetail(this.productId)
const projectObjPromise = this.getProjectObj()
Promise.all([detailPromise, projectObjPromise])
.then(() => {
this.loading = false
})
.catch((err) => {
console.error('接口请求失败:', err)
this.loading = false
this.$message.error('数据加载失败,请刷新重试')
})
},
methods:{
getProjectObj(){

@ -4,9 +4,9 @@
<div class="title">汇率管理</div>
<div class="english_box">
<div class="top_bottom">
<el-form ref="searchForm" :model="searchForm" label-width="100px">
<el-form ref="searchForm" :model="searchForm" label-width="140px">
<el-row>
<el-col :span="8">
<el-col :span="10">
<el-form-item label="基础货币">
<!-- 基础货币下拉选择器 -->
<el-select
@ -22,7 +22,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="10">
<el-form-item label="目标货币">
<!-- 目标货币下拉选择器 -->
<el-select
@ -38,15 +38,18 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="8"> </el-col>
</el-row>
<el-row>
<el-col :span="24" style="display: flex; justify-content: flex-end">
<el-col :span="4">
<el-col style="display: flex; justify-content: flex-end">
<el-button size="small" type="primary" @click="handleSearch"
>查询</el-button
>
<el-button size="small" @click="handleReset">清空</el-button>
</el-col>
</el-col>
</el-row>
<el-row>
</el-row>
</el-form>
</div>
@ -61,33 +64,34 @@
<el-table
:data="tableData"
border
width="100%"
height="425"
header-cell-style="text-align: center;"
cell-style="text-align: center;"
>
<el-table-column label="序号" width="80" type="index"></el-table-column>
<el-table-column label="基础货币" width="230">
<el-table-column label="基础货币">
<template slot-scope="scope">
{{ getCurrencyName(scope.row.baseCurrency) }}
</template>
</el-table-column>
<el-table-column label="目标货币" width="230">
<el-table-column label="目标货币">
<template slot-scope="scope">
{{ getCurrencyName(scope.row.targetCurrency) }}
</template>
</el-table-column>
<el-table-column label="汇率" prop="rate" width="230"></el-table-column>
<el-table-column label="汇率" prop="rate" ></el-table-column>
<el-table-column
label="更新人"
prop="updateUserName"
width="230"
></el-table-column>
<el-table-column
label="更新时间"
prop="updateTime"
width="230"
width="260"
></el-table-column>
<el-table-column label="操作" width="230">
<el-table-column label="操作" >
<template slot-scope="scope">
<div style="display: flex; justify-content: center; gap: 10px">
<el-button type="text" @click="openEditDialog(scope.row)"
@ -239,7 +243,7 @@ export default {
searchForm: {
baseCurrency: "", //
targetCurrency: "", //
status: "", //
// status: "", //
},
tableData: [], //
total: 0, //
@ -445,7 +449,7 @@ export default {
});
})
.catch(() => {
this.$message.info("已取消删除");
// this.$message.info("");
});
},
resetForm() {

@ -1,5 +1,5 @@
<template>
<div class="container">
<div class="container" v-if="!loading">
<basic-crumb></basic-crumb>
<div class="title">产品成本价管理</div>
<div class="english_box">
@ -56,6 +56,7 @@
</div>
</div>
<div class="table_box">
<div class="table-container">
<el-table
:data="tableData"
border
@ -63,43 +64,43 @@
header-cell-style="text-align: center;"
cell-style="text-align: center;"
>
<el-table-column label="序号" width="80" type="index"></el-table-column>
<el-table-column label="序号" type="index" width="90"></el-table-column>
<el-table-column
label="产品编号"
prop="code"
width="180"
></el-table-column>
<el-table-column
label="产品大类"
prop="catalogOne"
width="190"
></el-table-column>
<el-table-column
label="产品小类"
prop="catalogTwo"
width="190"
></el-table-column>
<el-table-column
label="产品名称"
prop="nameCn"
width="180"
></el-table-column>
<el-table-column
label="产品规格"
prop="specCn"
width="180"
></el-table-column>
<el-table-column label="当前成本价" width="180">
<el-table-column label="当前成本价">
<template #default="scope"> {{ scope.row.costPrice }} </template>
</el-table-column>
<el-table-column
label="最后更新时间"
prop="updateTime"
width="240"
width="260"
></el-table-column>
<el-table-column label="操作" width="230" fixed="right">
<el-table-column label="操作" >
<template slot-scope="scope">
<div style="display: flex; justify-content: center">
<el-button type="text" @click="openEditDialog(scope.row)"
@ -112,6 +113,7 @@
</template>
</el-table-column>
</el-table>
</div>
<el-pagination
style="display: flex; justify-content: flex-end; margin-top: 10px"
@size-change="handleSizeChange"
@ -255,6 +257,7 @@ export default {
historySize: 10, //
historyTotal: 0, //
currentProductId: "", // ID
loading: true
};
},
mounted() {
@ -337,8 +340,11 @@ export default {
this.tableData = res.data.data.records || [];
this.total = res.data.data.total;
}
this.loading = false
})
.catch(() => {
this.loading = false
this.$message.error("数据加载失败");
});
},
@ -457,4 +463,6 @@ export default {
text-align: center;
}
}
</style>

@ -1,5 +1,5 @@
<template>
<div class="container">
<div class="container" v-if="!loading">
<!-- 产品新增-产品小类 -->
<!-- <el-breadcrumb separator="/">
<el-breadcrumb-item v-for="item in lastRoute" :key="item.id" :to="{ path: item.url }">
@ -98,6 +98,7 @@ export default {
menuStyle: {},
dialogTitle: '',
currentItem: null,//
loading: true,
};
},
computed: {
@ -128,6 +129,7 @@ export default {
},
methods: {
getCategoryList(id){
// this.loading = true
this.categoryId = id
getCategory(
{
@ -137,6 +139,7 @@ export default {
}
).then(res =>{
this.productArr = res.data.data.records
this.loading = false
})
},
changeArr(arr, targetUrl){
@ -271,7 +274,7 @@ export default {
this.$message.error('删除小类失败')
})
}).catch(() => {
this.$message.info('已取消删除')
// this.$message.info('')
})
},
},
@ -295,6 +298,7 @@ export default {
font-size: 1.5vw;
margin-top: 2.1vw;
margin-left: 3.4vw;
color: #101010;
}
.prodct_list{
@ -309,18 +313,18 @@ export default {
width: 10.42vw;
height: 10.42vw;
border-radius: 2.08vw;
background: #f4ce98;
background: #f1ab46;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
margin: 1.67vw;
font-size: 1.8vw;
font-size: 2.5vw;
text-align: center;
cursor: pointer;
&:hover {
background: #e8b878;
}
// &:hover {
// background: #e8b878;
// }
}
}
//
@ -328,8 +332,7 @@ export default {
position: fixed;
width: 120px;
background: #fff;
border: 1px solid #e6e6e6;
border-radius: 4px;
border: 1px solid #e6e6e6;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
z-index: 9999;
@ -337,9 +340,9 @@ export default {
padding: 8px 16px;
cursor: pointer;
&:hover {
background: #f5f5f5;
}
// &:hover {
// background: #f1ab46;
// }
&:not(:last-child) {
border-bottom: 1px solid #e6e6e6;

@ -43,8 +43,8 @@ export default {
bottom: 30px;
right: 30px;
z-index: 9999;
width: 320px;
height: 180px;
width: 20vw;
height: 20vh;
padding: 28px 20px;
background: #f9c7c7;
border-radius: 0;

@ -314,7 +314,7 @@ import { resetRouter } from '@/router/router';
width: 100%;
display: flex;
flex-wrap: wrap;
padding: 0 1.5vw;
.router_item{
width: 10.42vw;
height: 10.42vw;

Loading…
Cancel
Save