This commit is contained in:
刘华勇 2025-05-07 17:07:10 +08:00
parent 7c96f9ed01
commit 0b91c288db
4 changed files with 60 additions and 2 deletions

View File

@ -15,6 +15,14 @@ export function del(id) {
})
}
export function calcShipmentFee() {
return request({
url: 'api/shipmentDetail/calcShipmentFee',
method: 'get'
})
}
export function edit(data) {
return request({
url: 'api/shipmentDetail',

View File

@ -4,6 +4,9 @@
<el-form-item label="客户名称" >
<el-input v-model="form.custName" style="width: 370px;"/>
</el-form-item>
<el-form-item label="客户编号" >
<el-input v-model="form.custNo" style="width: 370px;"/>
</el-form-item>
<el-form-item label="网点名称" >
<el-input v-model="form.netName" style="width: 370px;"/>
</el-form-item>
@ -53,6 +56,7 @@ export default {
form: {
id: '',
custName: '',
custNo: '',
netName: '',
netCode: '',
preChargeNo: '',

View File

@ -35,6 +35,13 @@
<!--工具栏-->
<div class="head-container">
<!-- 搜索 -->
<el-input v-model="query.value" clearable placeholder="输入搜索内容" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
<el-select v-model="query.type" clearable placeholder="类型" class="filter-item" style="width: 130px">
<el-option v-for="item in queryTypeOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
</el-select>
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
<!-- 新增 -->
<div style="display: inline-block;margin: 0px 2px;">
<el-button
@ -73,6 +80,7 @@
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
<!-- <el-table-column prop="id" label="唯一标识符"/> -->
<el-table-column prop="custName" label="客户名称"/>
<el-table-column prop="custNo" label="客户编号"/>
<el-table-column prop="netName" label="网点名称"/>
<el-table-column prop="netCode" label="网点编码"/>
<el-table-column prop="preChargeNo" label="预充单号"/>
@ -135,6 +143,12 @@ export default {
url: "/api/quotation/importQuotation"
},
delLoading: false,
queryTypeOptions: [
{ key: 'custName', display_name: '客户名称' },
{ key: 'netName', display_name: '网点名称' },
{ key: 'netCode', display_name: '网点编码' },
{ key: 'custNo', display_name: '客户编号' }
]
}
},
created() {
@ -148,6 +162,10 @@ export default {
this.url = 'api/quotation'
const sort = 'id,desc'
this.params = { page: this.page, size: this.size, sort: sort }
const query = this.query
const type = query.type
const value = query.value
if (type && value) { this.params[type] = value }
return true
},
subDelete(id) {
@ -178,6 +196,7 @@ export default {
_this.form = {
id: data.id,
custName: data.custName,
custNo: data.custNo,
netName: data.netName,
netCode: data.netCode,
preChargeNo: data.preChargeNo,

View File

@ -49,6 +49,17 @@
type="primary"
icon="el-icon-plus"
@click="add">新增</el-button>
</div>
<!-- 新增 -->
<div style="display: inline-block;margin: 0px 2px;">
<el-button
v-permission="['admin','shipmentDetail:edit']"
class="filter-item"
size="mini"
:loading="calLoading"
type="primary"
icon="el-icon-edit"
@click="calcShipmentFee">批量算运费</el-button>
</div>
<!-- 导入 -->
<div style="display: inline-block;">
@ -121,7 +132,7 @@
<script>
import checkPermission from '@/utils/permission'
import initData from '@/mixins/initData'
import { del, downloadShipmentDetail } from '@/api/shipmentDetail'
import { del,calcShipmentFee, downloadShipmentDetail } from '@/api/shipmentDetail'
import eForm from './form'
import { getToken } from "@/utils/auth";
export default {
@ -141,12 +152,14 @@ export default {
//
url: "/api/shipmentDetail/importShipmentDetai"
},
calLoading: false,
delLoading: false,
queryTypeOptions: [
{ key: 'waybillNo', display_name: '运单编号' },
{ key: 'custName', display_name: '客户名称' },
{ key: 'custNo', display_name: '客户编号' },
{ key: 'sendTime', display_name: '寄件时间' }
{ key: 'sendTime', display_name: '寄件时间' },
{ key: 'isCalc', display_name: '是否已经计算运费' }
]
}
},
@ -167,6 +180,20 @@ export default {
if (type && value) { this.params[type] = value }
return true
},
calcShipmentFee() {
calcShipmentFee().then(res => {
this.calLoading = false
this.dleChangePage()
this.init()
this.$notify({
title: '计算成功',
type: 'success',
duration: 2500
})
}).catch(err => {
this.calLoading = false
})
},
subDelete(id) {
this.delLoading = true
del(id).then(res => {