Browse Source

车辆成本增加搜索,价格配置增加数字自动选择,修复已知bug

dev
马远东 4 months ago
parent
commit
bd5b6cf2d8
  1. 26
      src/components/pric/tablePric.vue
  2. 10
      src/views/cost/Deliverycostmanagement/ServiceProviderPrice.vue
  3. 48
      src/views/cost/Deliverycostmanagement/Traincostbreakdown.vue
  4. 4
      src/views/cost/Deliverycostmanagement/WarehousePricingTemplate.vue

26
src/components/pric/tablePric.vue

@ -24,6 +24,8 @@
:controls="false"
:value-on-clear="0"
placeholder="请输入价格"
:ref="setInputNumberRef(scope.$index, column.prop)"
@focus="handleInputNumberFocus(scope.$index, column.prop)"
/>
<el-select
@ -116,6 +118,30 @@ const props = defineProps({
default: () => [],
},
});
const inputNumberRefs = ref({});
function setInputNumberRef(index, prop) {
return (el) => {
if (el) {
inputNumberRefs.value[`${index}-${prop}`] = el;
}
};
}
function handleInputNumberFocus(index, prop) {
const inputNumberRef = inputNumberRefs.value[`${index}-${prop}`];
if (inputNumberRef) {
// 使 nextTick DOM
nextTick(() => {
// DOM
const inputElement = inputNumberRef.$el.querySelector('input');
if (inputElement) {
//
inputElement.select();
}
});
}
}
console.log(props.height, 'props');
</script>

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

@ -6,7 +6,7 @@
<el-row v-if="search">
<!-- 查询模块 -->
<el-form :inline="true" :model="queryTop" class="el-fr-d">
<div>
<!-- <div>
<el-form-item label="承运方名称">
<el-input v-model="queryTop.region" placeholder="请输入承运方名称" />
</el-form-item>
@ -22,7 +22,7 @@
:default-time="defaultTime2"
/>
</el-form-item>
</div>
</div> -->
<!-- 查询按钮 -->
<el-form-item class="el-btn">
<el-button type="primary" icon="el-icon-search" @click="searchChange"> </el-button>
@ -39,9 +39,9 @@
<el-button type="primary" @click="AddInfo"
><el-icon><Download /></el-icon></el-button
>
<el-button type="primary" @click="AddInfo"
<!-- <el-button type="primary" @click="AddInfo"
><el-icon><Upload /></el-icon></el-button
>
> -->
<el-button type="primary" @click="Informationadd"
><el-icon><Plus /></el-icon></el-button
>
@ -655,7 +655,7 @@ const deleteTemplate = row => {
width: 15%;
align-items: flex-start;
.el-form-item__content {
justify-content: flex-end;
// justify-content: flex-end;
}
}
}

48
src/views/cost/Deliverycostmanagement/Traincostbreakdown.vue

@ -8,6 +8,23 @@
<el-form :inline="true" :model="TopQuery" class="el-fr-d">
<!-- 查询按钮 -->
<el-form-item class="el-btn">
<el-form-item label="目的仓">
<el-select
collapse-tags
:max-collapse-tags="3"
v-model="TopQuery.destinationWarehouse"
multiple
placeholder="请选择仓库"
style="min-width: 340px"
>
<el-option
v-for="item in warehouseList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="配送日期">
<el-date-picker
v-model="TopQuery.time"
@ -114,10 +131,7 @@
<div v-loading="Abnormaladjustment.loading" element-loading-text="Loading...">
<el-form :model="Abnormaladjustment.form" label-width="auto" style="max-width: 600px">
<el-form-item label="异动费用:">
<el-input-number
v-model="Abnormaladjustment.form.changeAmount"
:controls="false"
/>
<el-input-number v-model="Abnormaladjustment.form.changeAmount" :controls="false" />
</el-form-item>
<el-form-item label="异动费用备注:">
<el-input
@ -243,6 +257,7 @@ import {
$_Traincostbreakdownsubmit,
$_Traincostbreakdownsubmitpage,
} from '@/api/storagecost/index.js';
import { ElMessageBox, ElMessage } from 'element-plus';
import { downloadXls } from '@/utils/util';
import { useStore } from 'vuex';
@ -250,6 +265,7 @@ import dayjs from 'dayjs';
const $router = useRouter(); //
const $useStore = useStore(); //
const $route = useRoute(); //
const warehouseList = ref([]);
const TopQuery = ref({});
//
const Abnormaladjustment = ref({
@ -417,9 +433,16 @@ const TopSearch = () => {
delete details.query.deliveryDateStart;
delete details.query.deliveryDateEnd;
}
if (TopQuery.value.destinationWarehouse?.length) {
details.query.destinationWarehouse = TopQuery.value.destinationWarehouse.join(',');
} else {
delete details.query.destinationWarehouse;
}
};
//
const searchChange = () => {
TopSearch(); //
onLoad();
};
//
@ -475,8 +498,6 @@ function updateDictionary(targetArray, dictionaryType) {
//
const onLoad = async value => {
console.log($route, 'route');
await TopSearch(); //
let data = {
current: details.page.currentPage,
size: details.page.pageSize,
@ -500,9 +521,21 @@ const onLoad = async value => {
details.loadingObj.list = false;
});
};
//
const MyWarehouseList = () => {
$_getMyWarehouseList().then(res => {
console.log(res, '仓库列表');
res.data.data.forEach(item => {
warehouseList.value.push({
value: item.name,
label: item.name,
});
});
});
};
//
const PageOnload = () => {
MyWarehouseList(); //
onLoad(); //
};
//
@ -538,6 +571,7 @@ const AbnormaladjustmentClick = row => {
Abnormaladjustment.value.dialogVisible = true;
Abnormaladjustment.value.form = { id, changeAmount, changeNote };
};
//
const AbnormaladjustmentSubmit = async () => {
if (!Abnormaladjustment.value.form.changeNote) {

4
src/views/cost/Deliverycostmanagement/WarehousePricingTemplate.vue

@ -23,7 +23,7 @@
</el-select>
</el-form-item>
<el-form-item label="修改时间">
<!-- <el-form-item label="修改时间">
<el-date-picker
v-model="queryTop.costSettlementYear"
type="datetimerange"
@ -34,7 +34,7 @@
:shortcuts="shortcuts"
:default-time="defaultTime2"
/>
</el-form-item>
</el-form-item> -->
</div>
<!-- 查询按钮 -->
<el-form-item class="el-btn">

Loading…
Cancel
Save