This commit is contained in:
linfso 2025-06-11 20:11:25 +08:00
parent 9036b0e878
commit 906d4aea49
6 changed files with 139 additions and 33 deletions

View File

@ -42,3 +42,13 @@ export function delEmisQuotePrice(quoteId) {
method: 'delete'
})
}
// 批量修改报价时间
export function batchUpdatePriceDate(data) {
return request({
url: '/emis/emisQuotePrice/batch',
method: 'put',
data: data
})
}

View File

@ -12,7 +12,6 @@
value-format="yyyy-MM-dd HH:mm:ss"
default-time = "00:00:00"
placeholder="请选择开始日期"
@change="onStartDateChange"
>
</el-date-picker>
</el-form-item>
@ -30,17 +29,15 @@
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<!-- <el-col :span="8">
<el-form-item label="启用状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio :label="1">启用</el-radio>
<el-radio :label="0">停用</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-col> -->
</el-row>
</el-form>
<div style="text-align: center;margin-bottom: 10px;">
@ -53,10 +50,10 @@
<script>
import { updateEmisQuotePrice } from "@/api/emis/emisQuotePrice";
import { batchUpdatePriceDate } from "@/api/emis/emisQuotePrice";
export default {
name: "emisCustomerUserForm",
name: "BatchQuotePriceUpdateForm",
props:{
ids:{
type:[Number,Array]
@ -67,8 +64,6 @@ export default {
dicts: ['emis_cus_settled_type'],
data() {
return {
openSiteSelectTreeForm:false,
emisCustomerUserOptions: [],
// 遮罩层
loading: true,
// 表单参数
@ -76,6 +71,12 @@ export default {
isDataChangeCount:0,
// 表单校验
rules: {
startDate: [
{ required: true, message: "开始时间不能为空", trigger: ["blur",'change'] }
],
endDate: [
{ required: true, message: "结束时间不能为空", trigger: ["blur",'change'] }
],
}
};
@ -101,15 +102,7 @@ export default {
},
methods: {
handleSelectSite(){
this.openSiteSelectTreeForm=true;
},
onSelectSiteTreeCheckChange(item){
this.openSiteSelectTreeForm=false;
this.form.bizSiteName=item.selectSiteNameStr;
this.form.bizSite=item.selectSiteCodeStr;
// console.log(item)
},
// 取消按钮
cancel() {
this.reset();
@ -131,17 +124,27 @@ export default {
if (this.isDataChangeCount>0 ) {
console.log(this.ids);
if(this.ids.length==0){
this.form.quoteId=item;
await updateEmisQuotePrice(this.form).then(response => {
// console.log(response);
});
}else{
this.ids.forEach(async item => {
this.form.quoteId=item;
await updateEmisQuotePrice(this.form).then(response => {
// console.log(response);
});
});
let updList = [];
let item={
quoteId:this.ids,
startDate:this.form.startDate,
endDate:this.form.endDate
}
updList.push(item);
await batchUpdatePriceDate(updList);
}
else if(this.ids.length>0){
let updList = [];
for(let i=0;i<this.ids.length;i++){
let item={
quoteId:this.ids[i],
startDate:this.form.startDate,
endDate:this.form.endDate
}
updList.push(item);
}
await batchUpdatePriceDate(updList);
}
this.$modal.msgSuccess("修改成功");
this.$emit("on-changed");

View File

@ -135,6 +135,17 @@
v-hasPermi="['emis:emisQuotePrice:edit']"
>修改报价</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-edit"
size="mini"
:disabled="multiple"
@click="handleBatchUpdate"
v-hasPermi="['emis:emisQuotePrice:edit']"
>批量修改报价时间</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
@ -249,6 +260,10 @@
<specialQuotePriceForm :quoteId="currentId" :isCopy="isCopy" :chargeType="chargeType" @on-changed="handleFormChanged" @on-cancel="cancelForm"></specialQuotePriceForm>
</el-dialog>
<el-dialog :title="titleBatchForm" :visible.sync="openBatchUpdateForm" width="50%" :destroy-on-close="true" :close-on-click-modal="false" v-dialogDrag append-to-body>
<BatchQuotePriceUpdateForm :ids="ids" @on-changed="handleBatchFormChanged" @on-cancel="cancelBatchForm"></BatchQuotePriceUpdateForm>
</el-dialog>
</XdPageContainer>
</template>
@ -309,6 +324,9 @@ export default {
titleForm: "",
isCopy: false,
openBatchUpdateForm:false,
titleBatchForm: "",
// 显示编辑框更多
moreInputVisible: false,
// 弹出展示层
@ -431,6 +449,19 @@ export default {
this.openForm = true;
this.isCopy = false;
this.titleForm = "修改特殊报价";
},
/** 修改按钮操作 */
handleBatchUpdate(row) {
// this.currentId= row.id;
this.openBatchUpdateForm = true;
this.titleBatchForm = "批量修改";
},
handleBatchFormChanged(){
this.openBatchUpdateForm = false;
this.getList();
},
cancelBatchForm(){
this.openBatchUpdateForm = false;
},
handleCopy() {
// console.log(this.currentQuote);

View File

@ -128,17 +128,17 @@
v-hasPermi="['emis:emisQuotePrice:edit']"
>修改报价</el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
:disabled="multiple"
@click="handleBatchUpdate"
v-hasPermi="['emis:emisQuotePrice:edit']"
>批量修改</el-button>
</el-col> -->
>批量修改报价时间</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"

View File

@ -138,6 +138,17 @@
@click="handleUpdate"
v-hasPermi="['emis:emisQuotePrice:edit']"
>修改报价</el-button>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-edit"
size="mini"
:disabled="multiple"
@click="handleBatchUpdate"
v-hasPermi="['emis:emisQuotePrice:edit']"
>批量修改报价时间</el-button>
</el-col>
</el-col>
<el-col :span="1.5">
<el-button
@ -254,6 +265,10 @@
<vipSpecialQuotePriceForm :quoteId="currentId" :isCopy="isCopy" :chargeType="chargeType" @on-changed="handleFormChanged" @on-cancel="cancelForm"></vipSpecialQuotePriceForm>
</el-dialog>
<el-dialog :title="titleBatchForm" :visible.sync="openBatchUpdateForm" width="50%" :destroy-on-close="true" :close-on-click-modal="false" v-dialogDrag append-to-body>
<BatchQuotePriceUpdateForm :ids="ids" @on-changed="handleBatchFormChanged" @on-cancel="cancelBatchForm"></BatchQuotePriceUpdateForm>
</el-dialog>
</XdPageContainer>
</template>
@ -320,6 +335,9 @@ export default {
titleForm: "",
isCopy: false,
openBatchUpdateForm:false,
titleBatchForm: "",
// 显示编辑框更多
moreInputVisible: false,
// 弹出展示层
@ -442,6 +460,19 @@ export default {
this.openForm = true;
this.isCopy = false;
this.titleForm = "修改特殊报价";
},
/** 修改按钮操作 */
handleBatchUpdate(row) {
// this.currentId= row.id;
this.openBatchUpdateForm = true;
this.titleBatchForm = "批量修改";
},
handleBatchFormChanged(){
this.openBatchUpdateForm = false;
this.getList();
},
cancelBatchForm(){
this.openBatchUpdateForm = false;
},
handleCopy() {
// console.log(this.currentQuote);

View File

@ -133,6 +133,17 @@
v-hasPermi="['emis:emisQuotePrice:edit']"
>修改报价</el-button>
</el-col>
<el-col :span="1.5"></el-col>
<el-button
type="danger"
plain
icon="el-icon-edit"
size="mini"
:disabled="multiple"
@click="handleBatchUpdate"
v-hasPermi="['emis:emisQuotePrice:edit']"
>批量修改报价时间</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
@ -250,6 +261,10 @@
<vipTransQuotePriceForm :quoteId="currentId" :isCopy="isCopy" :chargeType="chargeType" @on-changed="handleFormChanged" @on-cancel="cancelForm"></vipTransQuotePriceForm>
</el-dialog>
<el-dialog :title="titleBatchForm" :visible.sync="openBatchUpdateForm" width="50%" :destroy-on-close="true" :close-on-click-modal="false" v-dialogDrag append-to-body>
<BatchQuotePriceUpdateForm :ids="ids" @on-changed="handleBatchFormChanged" @on-cancel="cancelBatchForm"></BatchQuotePriceUpdateForm>
</el-dialog>
</XdPageContainer>
</template>
@ -313,6 +328,9 @@ export default {
titleForm: "",
isCopy: false,
openBatchUpdateForm:false,
titleBatchForm: "",
// 显示编辑框更多
moreInputVisible: false,
// 弹出展示层
@ -436,6 +454,19 @@ export default {
this.openForm = true;
this.isCopy = false;
this.titleForm = "修改干线运输费";
},
/** 修改按钮操作 */
handleBatchUpdate(row) {
// this.currentId= row.id;
this.openBatchUpdateForm = true;
this.titleBatchForm = "批量修改";
},
handleBatchFormChanged(){
this.openBatchUpdateForm = false;
this.getList();
},
cancelBatchForm(){
this.openBatchUpdateForm = false;
},
handleCopy() {
// console.log(this.currentQuote);