Browse Source

修复已知bug,表格新增双击复制

dev-xx
马远东 8 months ago
parent
commit
14810b8330
  1. 12
      src/api/storagecost/index.js
  2. 10
      src/components/tablecmt/tablecmt.vue
  3. 134
      src/views/cost/Deliverycostmanagement/Categorypricingunit.vue
  4. 308
      src/views/cost/Deliverycostmanagement/DeliveryCostPricingTemplate.vue
  5. 20
      src/views/warehouse/updownGoods/warehouseUpdownGoodsLog.vue

12
src/api/storagecost/index.js

@ -186,10 +186,18 @@ export const $_expenseDispatchPriceUnitupdate = data => {
// 配送-模板-品牌品类计价单位-删除
export const $_expenseDispatchPriceUnitremove = data => {
export const $_expenseDispatchPriceUnitremove = params => {
return request({
url: '/api/logpm-statisticsdata/expenseDispatchPriceUnit/remove',
method: 'post',
data,
params,
});
};
// 配送-模板-配送成本计价模板-新增
export const $_expenseDispatchPriceRulesave = params => {
return request({
url: '/api/logpm-statisticsdata/expenseDispatchPriceRule/save',
method: 'post',
params,
});
};

10
src/components/tablecmt/tablecmt.vue

@ -97,6 +97,7 @@
<template #default="scope">
<el-text
@click.stop @dblclick.stop="Copytxt(scope.row[column.prop])"
class="mx-2 tabculconte"
:class="
scope.row[column.prop] == props.searchInput && scope.row[column.prop]
@ -468,6 +469,8 @@ function godowns(url) {
let shownm = ref(false);
function copyalls(column: TableColumnType) {
console.log(column,'column');
const _isReturn = column.type == 1 || column.type == 2 || column.type == 3;
if (!_isReturn) return;
let text = '';
@ -651,12 +654,13 @@ watchEffect(() => {
}
}
});
//
function copyContent(content: string) {
//
let copyResult = true;
//
const text = content || '让我们一起快乐的敲代码吧~';
const text = content || '暂无内容';
// clipboard
if (!!window.navigator.clipboard) {
// clipboardpromise
@ -716,7 +720,9 @@ function copyContent(content: string) {
return copyResult;
}
}
function Copytxt(Value){
copyContent(Value)
}
const handleRefresh = () => {
for (let i = 0; i < newcolumnList.value.length; i++) {
const item = newcolumnList.value[i];

134
src/views/cost/Deliverycostmanagement/Categorypricingunit.vue

@ -45,8 +45,8 @@
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
<div class="ElBtnClass">
<el-text size="small" @click="handleEdit(slotProps.scope)"> </el-text>
<el-text size="small" @click="handledelete(slotProps.scope)"> </el-text>
<el-text size="small" @click="handleEdit(slotProps.scope.row)"> </el-text>
<el-text size="small" @click="handledelete(slotProps.scope.row)"> </el-text>
</div>
</template>
</template>
@ -73,8 +73,8 @@
</el-row>
</div>
<el-dialog v-model="dialogedit" :title="categorytitle" width="40%">
<el-form :model="form" class="elform">
<el-form-item label="成本结算品类">
<el-form :model="form" class="elform" ref="ruleFormRef" :rules="rules">
<el-form-item label="成本结算品类" prop="categoryId">
<el-select
v-model="form.categoryId"
filterable
@ -93,7 +93,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="计价单位">
<el-form-item label="计价单位" prop="unit">
<el-select v-model="form.unit" placeholder="请选择计价单位" style="width: 240px">
<el-option
v-for="item in Pricingunit"
@ -138,6 +138,7 @@ import { ElMessageBox, ElMessage } from 'element-plus';
import { downloadXls } from '@/utils/util';
import { useStore } from 'vuex';
import dayjs from 'dayjs';
import error from '@/error';
const categorytitle = ref('新增');
const $router = useRouter(); //
const $useStore = useStore(); //
@ -145,8 +146,13 @@ const Methodloading = ref(false);
const $route = useRoute(); //
const dialogedit = ref(false); //
const form = ref({});
const ruleFormRef = ref(null);
const categoryList = ref([]); //
const Pricingunit = ref([]);
const rules = reactive({
categoryId: [{ required: true, message: '请选择成本结算品类', trigger: 'blur' }],
unit: [{ required: true, message: '请选择计价单位', trigger: 'blur' }],
});
const details = reactive({
/** 是否开启搜索 */
search: false,
@ -349,16 +355,47 @@ PageOnload();
const handleEdit = row => {
console.log(row);
dialogedit.value = true;
form.value.categoryId = row.categoryId;
form.value.unit = row.unit;
categoryList.value = [
{
goodsName: '',
goodsId: row.categoryId,
},
];
};
//
const handledelete=()=>{
let data={
}
$_expenseDispatchPriceUnitremove(data).then(res=>{
console.log(res,'删除成功');
const handledelete = row => {
ElMessageBox.confirm('是否确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
}
.then(() => {
let data = {
ids: row.id,
};
details.loadingObj.list = true;
$_expenseDispatchPriceUnitremove(data)
.then(res => {
console.log(res, '删除成功');
if (res.data.code == 200) {
ElMessage({
message: res.data.msg,
type: 'success',
});
}
})
.catch(error => {
console.log(error);
})
.finally(() => {
details.loadingObj.list = false;
onLoad();
});
})
.catch(() => {});
};
//
const addCategory = () => {
dialogedit.value = true;
@ -383,20 +420,65 @@ const remoteMethod = goodsName => {
}
};
//
const Categoryaddition = () => {
let data = {
categoryId: form.value.categoryId, //
unit: form.value.unit, //
};
if (categorytitle.value == '新增') {
$_expenseDispatchPriceUnitadd(data).then(res => {
console.log(res, '新增成功');
});
} else {
$_expenseDispatchPriceUnitupdate(data).then(res => {
console.log(res, '修改成功');
});
}
const Categoryaddition = async () => {
ruleFormRef.value.validate(valid => {
if (valid) {
let data = {
categoryId: form.value.categoryId, //
unit: form.value.unit, //
};
details.loadingObj.list = true;
if (categorytitle.value == '新增') {
$_expenseDispatchPriceUnitadd(data)
.then(res => {
console.log(res, '新增成功');
if (res.data.code == 200) {
ElMessage({
message: res.data.msg,
type: 'success',
});
onLoad();
ElMessageBox.confirm('是否继续添加?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {})
.catch(() => {
dialogedit.value = false; //
form.value.categoryId = '';
form.value.unit = '';
categoryList.value = [];
});
}
})
.catch(error => {
console.log(error);
})
.finally(() => {
details.loadingObj.list = false;
});
} else {
$_expenseDispatchPriceUnitupdate(data)
.then(res => {
console.log(res, '修改成功');
if (res.data.code == 200) {
ElMessage({
message: res.data.msg,
type: 'success',
});
onLoad();
}
})
.catch(error => {
console.log(error);
})
.finally(() => {
details.loadingObj.list = false;
});
}
}
});
};
</script>

308
src/views/cost/Deliverycostmanagement/DeliveryCostPricingTemplate.vue

@ -1,129 +1,186 @@
<template>
<div style="padding: 0 10px">
<div class="content">
<!-- 配置计价规则 -->
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane label="商配" name="0"></el-tab-pane>
<el-tab-pane label="市配" name="1"></el-tab-pane>
</el-tabs>
<el-form :model="formLoad" class="el_pricing">
<el-form-item label="是否有附加费">
<el-radio-group v-model="formLoad.a" class="ml-4">
<el-radio value="1" size="large"></el-radio>
<el-radio value="0" size="large"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否公里数计费">
<el-radio-group v-model="formLoad.a" class="ml-4">
<el-radio value="1" size="large"></el-radio>
<el-radio value="0" size="large"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="公里计算规则">
<el-radio-group v-model="formLoad.a" class="ml-4">
<el-radio value="1" size="large">总公里</el-radio>
<el-radio value="0" size="large">点位公里</el-radio>
<el-radio value="0" size="large">最远点位公里数</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否计算返程">
<el-radio-group v-model="formLoad.a" class="ml-4">
<el-radio value="1" size="large"></el-radio>
<el-radio value="0" size="large"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否补贴起步公里数计费">
<el-radio-group v-model="formLoad.a" class="ml-4">
<el-radio value="1" size="large"></el-radio>
<el-radio value="0" size="large"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="补贴公里计算规则">
<el-radio-group v-model="formLoad.a" class="ml-4">
<el-radio value="1" size="large">总公里数</el-radio>
<el-radio value="0" size="large">点位公里数</el-radio>
<el-radio value="0" size="large">最远点位公里数</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否计算返程">
<el-radio-group v-model="formLoad.a" class="ml-4">
<el-radio value="1" size="large"></el-radio>
<el-radio value="0" size="large"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否超区公里计费">
<el-radio-group v-model="formLoad.a" class="ml-4">
<el-radio value="1" size="large"></el-radio>
<el-radio value="0" size="large"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="超区公里数计算规则">
<el-radio-group v-model="formLoad.a" class="ml-4">
<el-radio value="1" size="large">总公里数</el-radio>
<el-radio value="0" size="large">点位公里数</el-radio>
<el-radio value="0" size="large">最远点位公里数</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="超区点位计费模式">
<el-radio-group v-model="formLoad.a" class="ml-4">
<el-radio value="1" size="large">统一计费</el-radio>
<el-radio value="0" size="large">区域计费</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否计算返程">
<el-radio-group v-model="formLoad.a" class="ml-4">
<el-radio value="1" size="large"></el-radio>
<el-radio value="0" size="large"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否点位补贴计费">
<el-radio-group v-model="formLoad.a" class="ml-4">
<el-radio value="1" size="large"></el-radio>
<el-radio value="0" size="large"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否保底费">
<el-radio-group v-model="formLoad.a" class="ml-4">
<el-radio value="1" size="large"></el-radio>
<el-radio value="0" size="large"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否补贴油费">
<el-radio-group v-model="formLoad.a" class="ml-4">
<el-radio value="1" size="large"></el-radio>
<el-radio value="0" size="large"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="补贴油费计算规则">
<el-radio-group v-model="formLoad.a" class="ml-4">
<el-radio value="1" size="large">总公里数</el-radio>
<el-radio value="0" size="large">点位公里数</el-radio>
<el-radio value="0" size="large">最远点位公里数</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否计算返程">
<el-radio-group v-model="formLoad.a" class="ml-4">
<el-radio value="1" size="large"></el-radio>
<el-radio value="0" size="large"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否附加费">
<el-radio-group v-model="formLoad.a" class="ml-4">
<el-radio value="1" size="large"></el-radio>
<el-radio value="0" size="large"></el-radio>
</el-radio-group>
</el-form-item>
<el-form :model="form" class="el_pricing">
<div class="el_row">
<el-form-item label="是否有附加费">
<el-radio-group v-model="form.ynSurcharge">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
</div>
<div class="el_row">
<el-form-item label="是否公里数计费">
<el-radio-group v-model="form.ynChargedKilometer">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
<template v-if="form.ynChargedKilometer">
<el-form-item label="公里计算规则">
<el-radio-group v-model="form.kilometerCalculationRule">
<el-radio :label="1">总公里</el-radio>
<el-radio :label="2">点位公里</el-radio>
<el-radio :label="3">最远点位公里数</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="公里计费是否计算返程">
<el-radio-group v-model="form.ynKilometerReturn">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
</template>
</div>
<div class="el_row">
<el-form-item label="是否补贴起步公里数计费">
<el-radio-group v-model="form.ynSubsidyInitKilometerBill">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
<template v-if="form.ynSubsidyInitKilometerBill">
<el-form-item label="补贴公里计算规则">
<el-radio-group v-model="form.subsidyKilometerRule">
<el-radio :label="1">总公里数</el-radio>
<el-radio :label="2">点位公里数</el-radio>
<el-radio :label="3">最远点位公里数</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="补贴公里是否计算返程">
<el-radio-group v-model="form.ynSubsidyKilometerReturn">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
</template>
</div>
<div class="el_row">
<el-form-item label="是否超区公里计费">
<el-radio-group v-model="form.ynOverZoneKilometer">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
<template v-if="form.ynOverZoneKilometer">
<el-form-item label="超区公里数计算规则">
<el-radio-group v-model="form.overZoneKilometerRule">
<el-radio :label="1">总公里数</el-radio>
<el-radio :label="2">点位公里数</el-radio>
<el-radio :label="3">最远点位公里数</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="超区点位计费模式">
<el-radio-group v-model="form.overZoneSiteMode">
<el-radio :label="1">统一计费</el-radio>
<el-radio :label="0">区域计费</el-radio>
</el-radio-group>
</el-form-item>
</template>
</div>
<div class="el_row">
<el-form-item label="超区点位是否计算返程">
<el-radio-group v-model="form.ynOverZoneKilometerReturn">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
</div>
<div class="el_row">
<el-form-item label="是否点位补贴计费">
<el-radio-group v-model="form.ynSiteSubsidy">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
</div>
<div class="el_row">
<el-form-item label="是否保底费">
<el-radio-group v-model="form.ynMinimumFee">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
</div>
<div class="el_row">
<el-form-item label="是否补贴油费">
<el-radio-group v-model="form.ynSubsidyFuelCost">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
<template v-if="form.ynSubsidyFuelCost">
<el-form-item label="补贴油费计算规则">
<el-radio-group v-model="form.subsidyFuelCostRule">
<el-radio :label="1">总公里数</el-radio>
<el-radio :label="2">点位公里数</el-radio>
<el-radio :label="3">最远点位公里数</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="补贴油费是否计算返程">
<el-radio-group v-model="form.ynSubsidyFuelCostReturn">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
</template>
</div>
</el-form>
</div>
<div class="footer">
<el-button type="primary" @click="preservation"
>保存<el-icon><Promotion /></el-icon
></el-button>
<el-button type="primary" @click="nextstep"
>下一步<el-icon><ArrowRightBold /></el-icon
></el-button>
</div>
</template>
<script setup>
import { ref } from 'vue';
const formLoad = ref({});
const activeName=ref('0')
const handleClick=()=>{
console.log(activeName.value)
}
import { $_expenseDispatchPriceRulesave } from '@/api/storagecost/index.js';
const form = ref({
ynSurcharge: 0, //
ynChargedKilometer: 0, //
kilometerCalculationRule: 1, //
ynKilometerReturn: 0, //
ynSubsidyInitKilometerBill: 0, //
subsidyKilometerRule: 1, //
ynSubsidyKilometerReturn: 0, //
ynOverZoneKilometer: 0, //
overZoneKilometerRule: 1, //
overZoneSiteMode: 0, //
ynOverZoneKilometerReturn: 0, //
ynSiteSubsidy: 0, //
ynMinimumFee: 0, //
ynSubsidyFuelCost: 0, //
subsidyFuelCostRule: 1, //
ynSubsidyFuelCostReturn: 0, //
});
const activeName = ref('0');
const handleClick = () => {
console.log(activeName.value);
};
const preservation = () => {
let data = {
templateId:'1820287812099485698',
...form.value
};
$_expenseDispatchPriceRulesave(data).then(res => {
console.log(res, '新增成');
});
};
</script>
<style scoped lang="scss">
@ -311,4 +368,27 @@ const handleClick=()=>{
.SuperAdd {
display: flex;
}
.footer {
position: fixed;
bottom: 10px;
left: 4%;
width: 100%;
display: flex;
justify-content: center;
.el-button {
width: 120px;
height: 40px;
font-size: 16px;
}
}
.el_pricing {
.el_row {
width: 100%;
display: flex;
}
}
.content {
padding: 0 10px;
padding-bottom: 50px;
}
</style>

20
src/views/warehouse/updownGoods/warehouseUpdownGoodsLog.vue

@ -7,7 +7,7 @@
<div>
<el-form-item label="货物仓库:">
<el-input
v-model="query.warehouseName"
v-model.trim="query.warehouseName"
@keyup.enter="searchChange"
clearable
placeholder="请输入货物仓库"
@ -15,7 +15,7 @@
</el-form-item>
<el-form-item label="订单自编码:">
<el-input
v-model="query.orderCode"
v-model.trim="query.orderCode"
@keyup.enter="searchChange"
clearable
placeholder="请输入订单自编码"
@ -23,7 +23,7 @@
</el-form-item>
<el-form-item label="包件编码:">
<el-input
v-model="query.orderPackageCode"
v-model.trim="query.orderPackageCode"
@keyup.enter="searchChange"
clearable
placeholder="请输入包件编码"
@ -43,7 +43,7 @@
</el-form-item>
<el-form-item label="操作员:">
<el-input
v-model="query.createUserName"
v-model.trim="query.createUserName"
@keyup.enter="searchChange"
clearable
placeholder="请输入操作员名称"
@ -216,7 +216,7 @@ import {
} from '@/api/warehouse/warehouseUpdownGoodsLog';
import option from '@/option/warehouse/warehouseUpdownGoodsLog';
import { mapGetters } from 'vuex';
import { downloadXls, handleClearTableQuery } from '@/utils/util';
import { downloadXls, handleClearTableQuery,setNodeHeight } from '@/utils/util';
export default {
data() {
return {
@ -670,17 +670,17 @@ export default {
page: {
currentPage: 1,
pageSize: 30,
total: 40,
total: 0,
},
page1: {
currentPage: 1,
pageSize: 30,
total: 40,
total:0,
},
page2: {
currentPage: 1,
pageSize: 30,
total: 40,
total: 0,
},
//
form: {},
@ -854,11 +854,11 @@ export default {
this.onLoad(this.page2, {}, 'page2');
},
onLoad(page, params = {}, uname) {
this.loading = true;
this.loading = false;
if (uname == 'page1') {
getinventorypage(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(
res => {
const data = res.data.data;
const data = res.data.data ;
if (uname) {
this[uname].total = data.total;
}

Loading…
Cancel
Save