Browse Source

服务商配置价格司机增加批量新增

dev
马远东 4 months ago
parent
commit
be3e1b6da4
  1. 51
      src/views/cost/Deliverycostmanagement/ServiceProviderPrice.vue

51
src/views/cost/Deliverycostmanagement/ServiceProviderPrice.vue

@ -122,7 +122,15 @@
</el-select>
</el-form-item>
<el-form-item label="司机:" prop="driverId">
<el-select v-model="form.driverId" placeholder="请选择司机">
<el-select
v-model="form.driverId"
:multiple="PriceconfigurationTitle=='价格配置(新增)' ? true : false"
collapse-tags
filterable
collapse-tags-tooltip
:max-collapse-tags="3"
placeholder="请选择司机"
>
<el-option
v-for="item in driver"
:key="item.value"
@ -163,7 +171,7 @@
import { ref, reactive, toRefs, computed, onMounted, nextTick, watch } from 'vue';
import { columnList } from '@/option/storagecost/ServiceProviderPrice.js';
import { getDictionaryBiz } from '@/api/system/dict'; //
import { processRowProperty, setNodeHeight,handleClearTableQuery } from '@/utils/util';
import { processRowProperty, setNodeHeight, handleClearTableQuery } from '@/utils/util';
import { getDriverList } from '@/api/basicdata/basicdataDriverArtery'; //
import {
$_getMyWarehouseList,
@ -333,14 +341,14 @@ const selectionChange = list => {
//
const searchChange = () => {
// details.search = false; //
onLoad()
onLoad();
};
const searchReset=()=>{
details.query={}
queryTop.value={}
const searchReset = () => {
details.query = {};
queryTop.value = {};
handleClearTableQuery(details.columnList);
onLoad()
}
onLoad();
};
//
const sizeChange = val => {
details.page.pageSize = val;
@ -477,13 +485,13 @@ const PageOnload = async () => {
await MyWarehouseList(); //
onLoad();
};
const AddInfo=()=>{
const AddInfo = () => {
ElMessage({
message: '功能维护',
type: 'warning',
})
return
}
});
return;
};
//
PageOnload();
//
@ -498,12 +506,12 @@ const Priceconfigurationsubmission = async () => {
warehouseName:
ServiceWarehouse.value.find(res => res.value == form.value.warehouseId)?.label || '', //
warehouseId: form.value.warehouseId, //ID
driverId: form.value.driverId, //ID
driverName: driver.value.find(res => res.value == form.value.driverId)?.label || '', //
templateId: form.value.templateId, //ID
};
tcloading.value = true;
if (PriceconfigurationTitle.value == '价格配置(编辑)') {
data.driverName =driver.value.find(res => res.value == form.value.driverId)?.label || '', //
data.driverId = form.value.driverId, //ID
data.id = rowData.value.id;
$_ServiceProviderPriceupdate(data)
.then(res => {
@ -524,6 +532,13 @@ const Priceconfigurationsubmission = async () => {
tcloading.value = false;
});
} else {
data['drivers'] =[]
form.value.driverId.forEach(item => {
data['drivers'].push({
driverName:driver.value.find(res => res.value == item)?.label || '',
driverId:item,
})
})
$_ServiceProviderPricesave(data)
.then(res => {
console.log(res, '提交成功');
@ -546,7 +561,7 @@ const Priceconfigurationsubmission = async () => {
};
//
const Informationadd = () => {
form.value.driverId = '';
form.value.driverId = [];
form.value.warehouseId = '';
form.value.templateId = '';
PriceTemplate.value = [];
@ -563,8 +578,8 @@ const EditTemplate = async row => {
rowData.value = row;
form.value.warehouseId = row.warehouseId; //
await Getdriver();
await GetTemplate(); //
await GetTemplate(); //
console.log(row);
Priceconfiguration.value = true;
PriceconfigurationTitle.value = '价格配置(编辑)';
@ -639,7 +654,7 @@ const deleteTemplate = row => {
margin-right: 0;
width: 15%;
align-items: flex-start;
.el-form-item__content{
.el-form-item__content {
justify-content: flex-end;
}
}

Loading…
Cancel
Save