qb 8 months ago
parent
commit
a045078f89
  1. 10
      src/api/storagecost/index.js
  2. 8
      src/option/storagecost/WarehousePricingTemplate.js
  3. 17
      src/views/cost/Deliverycostmanagement/Basicconfiguration.vue
  4. 27
      src/views/cost/Deliverycostmanagement/WarehousePricingTemplate.vue

10
src/api/storagecost/index.js

@ -133,11 +133,19 @@ export const $_expenseDispatchTrainDetail = params => {
responseType: 'blob',
});
};
// 配送-仓库计价模板
export const $_WarehousePricingTemplate = params => {
return request({
url: '/api/logpm-statisticsdata/expenseDispatchPriceTemplate/page',
method: 'get',
params,
});
};
// 新增模板
export const $_WarehouseTemplateHome = data => {
return request({
url: '/api/logpm-statisticsdata/expenseDispatchPriceTemplate/save',
method: 'data',
method: 'post',
data,
});
};

8
src/option/storagecost/WarehousePricingTemplate.js

@ -15,7 +15,7 @@ export const columnList = [
fixed: true,
},
{
prop: 'a1',
prop: 'warehouseName',
label: '仓库名称',
type: 2,
values: '',
@ -26,7 +26,7 @@ export const columnList = [
head: false,
},
{
prop: 'a2',
prop: 'templateName',
label: '仓库计价模板名称',
type: 1,
values: '',
@ -37,7 +37,7 @@ export const columnList = [
head: false,
},
{
prop: 'a3',
prop: 'updateTime',
label: '修改时间',
type: 1,
values: '',
@ -50,7 +50,7 @@ export const columnList = [
{
prop: 'a4',
label: '修改人',
type: 3,
type: 2,
values: '',
width: '150',
checkarr: [ ],

17
src/views/cost/Deliverycostmanagement/Basicconfiguration.vue

@ -58,31 +58,22 @@ const disabledWarehouse = () => {
let WarehouseName = localStorage.getItem('WarehouseName');
if (WarehouseName != 'undefined') {
console.log('不存在仓库');
}
};
const onLoad = () => {
getWarehouse();
disabledWarehouse()
disabledWarehouse();
};
onLoad();
//
const nextstep = () => {
console.log(my_data, 'my_data');
console.log(my_data == true);
console.log(my_data == false);
return;
let data = {
expenseDispatchPriceTemplate: {
templateName: form.value.templateName,
warehouseName: warehouseList.value.find(item => item.id == form.value.warehouse)?.name || '', //
warehouseId: form.value.warehouse, //ID
},
templateName: form.value.templateName,
warehouseName: warehouseList.value.find(item => item.id == form.value.warehouse)?.name || '', //
warehouseId: form.value.warehouse, //ID
};
$_WarehouseTemplateHome(data).then(res => {
console.log(res, '新增成功');

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

@ -121,7 +121,7 @@
import { ref, reactive, toRefs, computed, onMounted, nextTick, watch } from 'vue';
import { columnList } from '@/option/storagecost/WarehousePricingTemplate.js';
import { getDictionaryBiz } from '@/api/system/dict'; //
import { $_getMyWarehouseList } from '@/api/storagecost/index.js';
import { $_getMyWarehouseList ,$_WarehousePricingTemplate} from '@/api/storagecost/index.js';
import { processRowProperty, setNodeHeight } from '@/utils/util';
import functions from '@/utils/functions.js';
import { ElMessageBox, ElMessage } from 'element-plus';
@ -237,10 +237,8 @@ const showdrawer = _flag => {
const inputsc = (index, row) => {
details.query[row.prop] = index;
processRowProperty(index, row, details);
test(details.query);
};
//
const test = val => {};
/** 表格表头时间选择 */
const timesc = (index, row) => {
console.log(index, row);
@ -302,7 +300,27 @@ function updateDictionary(targetArray, dictionaryType) {
});
}
//
const onLoad = () => {};
const onLoad = value => {
let data = {
current: details.page.currentPage,
size: details.page.pageSize,
...details.query,
...value,
};
details.loadingObj.list=true;
$_WarehousePricingTemplate(data).then(res => {
if (res.data.code == 200) {
details.data = res.data.data.records || [];
details.page.total = res.data.data.total; //
}
}).catch((error)=>{
console.log(error);
}).finally(()=>{
details.loadingObj.list=false;
});
;
};
//
const MyWarehouseList = () => {
$_getMyWarehouseList().then(res => {
@ -323,6 +341,7 @@ const EditTemplate = () => {
};
const PageOnload = () => {
MyWarehouseList(); //
onLoad(); //
};

Loading…
Cancel
Save