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

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{ .el-button{
font-size: 1.25vw; font-size: 1.25vw;
border-radius: 10px;
} }
.el-form-item__label{ .el-form-item__label{
font-size: 1.25vw; 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> </style>

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

@ -69,3 +69,23 @@
.el-divider--horizontal { .el-divider--horizontal {
margin: 12px 0 !important; 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 { .btn-submit {
width: 100%; width: 100%;
height: 45px; height: 45px;
border: 1px solid #409EFF; border: 1px solid #409EFF !important;
background: none; background: none;
font-size: 18px; font-size: 18px;
letter-spacing: 2px; letter-spacing: 2px;
font-weight: 300; font-weight: 300;
color: #409EFF; color: #409EFF !important;
cursor: pointer; cursor: pointer;
margin-top: 30px; margin-top: 30px;
font-family: "neo"; font-family: "neo";
transition: 0.25s; transition: 0.25s;
background-color:none !important ;
} }
.login-submit { .login-submit {

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

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

@ -9,18 +9,18 @@
<!-- 订单信息卡片 --> <!-- 订单信息卡片 -->
<el-card class="info-card" shadow="hover"> <el-card class="info-card" shadow="hover">
<div class="card-header">订单信息</div> <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-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>
<el-form-item label="订单总金额"> <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>
<el-form-item label="已汇金额"> <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>
<el-form-item label="待汇金额"> <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-item>
</el-form> </el-form>
</el-card> </el-card>
@ -310,12 +310,13 @@ export default {
.order-form { .order-form {
display: flex; display: flex;
flex-wrap: wrap; // flex-wrap: wrap;
// gap: 10px; // gap: 10px;
justify-content: space-evenly; // justify-content: space-evenly;
.el-form-item { .el-form-item {
width: 25%; // 4 // width: calc(25% - 22.5px);
margin: 0 10px;
margin-bottom: 0; margin-bottom: 0;
} }
} }
@ -342,7 +343,7 @@ export default {
} }
} }
.paddingBox{ .paddingBox{
padding: 50px; padding: 0 20px;
} }
} }
</style> </style>

@ -35,19 +35,19 @@
<el-image <el-image
:src="item.url" :src="item.url"
style="width: 200px; height: 160px; object-fit: cover" style="width: 200px; height: 160px; object-fit: cover"
:preview-src-list="[item.url]"
:alt="`${item.name}水单`" :alt="`${item.name}水单`"
@click="openFloatImage(item.url, item.name)"
> >
<div slot="error" class="image-slot"> <div slot="error" class="image-slot">
<i class="el-icon-picture-outline"></i> <i class="el-icon-picture-outline"></i>
</div> </div>
</el-image> </el-image>
<!-- 放大查看按钮点击触发图片预览 --> <!-- 放大查看按钮触发浮窗 -->
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
icon="el-icon-zoom-in" icon="el-icon-zoom-in"
@click="previewImage(item.url)" @click="openFloatImage(item.url, item.name)"
style="margin-top: 5px" style="margin-top: 5px"
:disabled="!item.url" :disabled="!item.url"
> >
@ -57,7 +57,7 @@
<!-- 删除按钮悬浮显示 --> <!-- 删除按钮悬浮显示 -->
<div class="delete-btn-box"> <div class="delete-btn-box">
<el-button <el-button
v-if="canShowDeleteBtn" v-if="canShowDeleteBtn"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
class="delete-btn" class="delete-btn"
@ -91,55 +91,47 @@ export default {
data() { data() {
return { return {
receiptList: [], receiptList: [],
loading: false, // loading: false,
orderId: "", orderId: "",
// 使 floatWindow: null, // DOM
// defaultImg: "https://img.yzcdn.cn/vant/cat.jpeg", floatMask: null,
imgScale: 1, // 1
isWindowMax: false, //
originalWindowStyle: {}, //
}; };
}, },
computed: { computed: {
...mapGetters(["userInfo"]), ...mapGetters(["userInfo"]),
canShowDeleteBtn() { canShowDeleteBtn() {
// const allowRoles = ["administrator", "manager", "sale", "jinchao", "saleManager"];
const allowRoles = ["administrator","manager","sale","jinchao","saleManager"]; if (!this.userInfo || !this.userInfo.role_name) return false;
if (!this.userInfo || !this.userInfo.role_name) return false; return allowRoles.includes(this.userInfo.role_name);
//
return allowRoles.includes(this.userInfo.role_name);
}
}, },
},
mounted() { mounted() {
this.orderId = this.$route.query.id || ""; this.orderId = this.$route.query.id || "";
//
this.getReceiptList(); this.getReceiptList();
//
if (this.$route.query.isUpdate == true) { if (this.$route.query.isUpdate == true) {
this.handleUpdateStatus(); this.handleUpdateStatus();
} }
//
window.addEventListener('beforeunload', () => {
this.closeFloatImage(true);
});
}, },
computed:{ destroyed() {
//
}, },
methods: { methods: {
// //
async getReceiptList() { async getReceiptList() {
try { try {
this.loading = true; this.loading = true;
// if (!orderId) {
// this.$message.warning('ID')
// this.loading = false
// return
// }
// 2.
const res = await getReceiptDetailList({ const res = await getReceiptDetailList({
current: 1, current: 1,
size: 100000, size: 100000,
orderId: this.orderId, orderId: this.orderId,
}); });
// 3.
if (res.data.code === 200) { if (res.data.code === 200) {
this.receiptList = res.data.data.records; this.receiptList = res.data.data.records;
} else { } else {
@ -152,18 +144,15 @@ export default {
this.loading = false; this.loading = false;
} }
}, },
// //
async handleUpdateStatus() { async handleUpdateStatus() {
try { try {
const res = await updateStatus({ await updateStatus({ orderId: this.orderId });
orderId: this.orderId,
});
} catch (err) {} } catch (err) {}
}, },
// //
async handleDelete(waterBillId) { async handleDelete(waterBillId) {
try { try {
// 1.
await this.$confirm( await this.$confirm(
"确定要删除此水单吗?删除后将无法恢复!", "确定要删除此水单吗?删除后将无法恢复!",
"删除确认", "删除确认",
@ -174,34 +163,282 @@ export default {
dangerMode: true, dangerMode: true,
} }
); );
// 2.
const res = await deleteWaterBill({ id: waterBillId }); const res = await deleteWaterBill({ id: waterBillId });
// 3.
if (res.data.code === 200) { if (res.data.code === 200) {
this.$message.success("水单删除成功"); this.$message.success("水单删除成功");
// 4.
this.getReceiptList(); this.getReceiptList();
} else { } else {
this.$message.error("删除失败:" + (res.data.msg || "接口返回异常")); this.$message.error("删除失败:" + (res.data.msg || "接口返回异常"));
} }
} catch (err) { } catch (err) {
//
if (err !== "cancel") { if (err !== "cancel") {
console.error("删除水单失败:", err); console.error("删除水单失败:", err);
this.$message.error("删除水单异常,请重试"); this.$message.error("删除水单异常,请重试");
} }
} }
}, },
// // ++
previewImage(imgUrl) { openFloatImage(imgUrl, imgName = "水单图片") {
if (!imgUrl) { if (!imgUrl) {
this.$message.warning("暂无水单图片可查看"); this.$message.warning("暂无水单图片可查看");
return; return;
} }
const imageDom = document.querySelector(`[src="${imgUrl}"]`); //
if (imageDom) { this.imgScale = 1;
imageDom.click(); 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 { .receipt-info {
display: flex; display: flex;
// justify-content: space-between;
align-items: center; align-items: center;
.info-left { .info-left {
@ -276,9 +512,8 @@ export default {
text-align: center; text-align: center;
width: 40%; width: 40%;
} }
//
.delete-btn-box { .delete-btn-box {
//
margin-right: 10px; margin-right: 10px;
.delete-btn { .delete-btn {
@ -296,7 +531,6 @@ export default {
} }
} }
//
.empty-tip { .empty-tip {
text-align: center; text-align: center;
padding: 50px 0; padding: 50px 0;
@ -310,7 +544,6 @@ export default {
} }
} }
//
.image-slot { .image-slot {
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -322,3 +555,43 @@ export default {
} }
} }
</style> </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; font-size: 1.5vw;
margin-top: 2.1vw; margin-top: 2.1vw;
margin-left: 3.4vw; margin-left: 3.4vw;
color: #101010;
} }

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

@ -149,7 +149,12 @@
<el-table-column label="分成金额" prop="splitPrice" width="120" /> <el-table-column label="分成金额" prop="splitPrice" width="120" />
<el-table-column label="已汇金额" prop="remittedAmount" width="120" /> <el-table-column label="已汇金额" prop="remittedAmount" width="120" />
<el-table-column label="待汇金额" prop="unremittedAmount" 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="orderDate" width="130" />
<el-table-column label="状态" prop="status" width="120"> <el-table-column label="状态" prop="status" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
@ -313,6 +318,9 @@
<script> <script>
import basicCrumb from "@/components/basic-crumb/main"; import basicCrumb from "@/components/basic-crumb/main";
import {
getCurrencyList,
} from "@/api/order/orderAddEdit";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import website from "@/config/website"; import website from "@/config/website";
import { getToken } from "@/util/auth"; import { getToken } from "@/util/auth";
@ -380,10 +388,12 @@ export default {
5: { text: "完成", tagType: "success" }, 5: { text: "完成", tagType: "success" },
6: { text: "关闭", tagType: "gray" }, 6: { text: "关闭", tagType: "gray" },
}, },
monetaryUnitList:[]
}; };
}, },
created() {}, created() {},
mounted() { mounted() {
this.loadCurrencyList();
// + // +
this.loadCustomerList(); this.loadCustomerList();
this.loadOrderList(); this.loadOrderList();
@ -406,6 +416,25 @@ export default {
}, },
methods: { 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() { async loadOrderList() {
this.isLoading = true; this.isLoading = true;

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

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

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

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

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

@ -1,5 +1,5 @@
<template> <template>
<div class="container"> <div class="container" v-if="!loading">
<!-- 编辑产品信息 --> <!-- 编辑产品信息 -->
<basic-crumb></basic-crumb> <basic-crumb></basic-crumb>
<div class="title">产品实物新增</div> <div class="title">产品实物新增</div>
@ -168,15 +168,29 @@ export default {
productId:'', productId:'',
tableData:[], tableData:[],
subcategoryId:'', subcategoryId:'',
showError:false showError:false,
loading: true
} }
}, },
mounted(){ mounted(){
this.name = this.$route.query.name this.name = this.$route.query.name
this.code = this.$route.query.code this.code = this.$route.query.code
this.subcategoryId = this.$route.query.subcategoryId this.subcategoryId = this.$route.query.subcategoryId
this.getDetail(this.$route.query.id) // this.getDetail(this.$route.query.id)
this.getProjectObj() // 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:{ methods:{
getProjectObj(){ getProjectObj(){

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

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

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

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

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

Loading…
Cancel
Save