提交 6baf1c0a authored 作者: huaxinzhu's avatar huaxinzhu

bug修复,运费模板限制50个

上级 45118920
......@@ -46,14 +46,13 @@
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改
</el-button>
<el-divider direction="vertical"></el-divider>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除
</el-button>
......@@ -68,7 +67,7 @@
@pagination="getList"
/>
<!-- 添加或修改freight对话框 -->
<el-dialog :title="title" :visible.sync="isOpen" v-if="isOpen" width="70%">
<el-dialog :title="title" :visible.sync="isOpen" v-if="isOpen" width="70%" class="freightTemplate-add">
<IndexBtn :option="form" @closeIndexbtn="closeDialog"/>
</el-dialog>
</el-card>
......@@ -240,8 +239,8 @@
},
/** 新增按钮操作 */
handleAdd() {
if(this.total >= 20) {
this.$message({ message: '您已经有20个运费模板了,暂时不再支持更多哦!',type: 'warning'});
if(this.total >= 50) {
this.$message({ message: '您已经有50个运费模板了,暂时不再支持更多!',type: 'warning'});
return;
}
this.reset();
......@@ -273,7 +272,7 @@
getFreight(id).then(response => {
let formdate = response.data
response.data.Dispatching = JSON.parse(formdate.Dispatching)
console.log("点击修改获取的数据:",response.data.Dispatching);
//console.log("点击修改获取的数据:",response.data.Dispatching);
this.form = response.data
this.isOpen = true;
this.title = "修改运费模板";
......@@ -282,7 +281,9 @@
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
debugger
if (valid) {
if (this.form.id != null) {
updateFreight(this.form).then(response => {
if (response.code === 0) {
......@@ -309,20 +310,35 @@
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.Id || this.ids;
this.$confirm('是否确认删除运费模板编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function () {
return delFreight(ids);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(function () {});
this.$confirm('是否确认删除运费模板编号为“' + ids + '"的数据?','警告',{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async()=> {
this.loading = true;
let delResult = await delFreight(ids);
this.loading = false;
if(delResult.code === 1) {
this.$message({type: 'success',message: delResult.msg});
}
if(delResult.code === 0) {
this.$message({type: 'error',message: delResult.msg});
}
}).catch(()=> {});
},
} //methods结束
};
</script>
<style scoped lang="scss" type="text/stylus">
.freightTemplate-add {
/deep/.el-dialog {
height: 80%;
overflow : hidden;
}
/deep/.el-dialog__body{
height: calc(100% - 60px);
overflow-x: hidden;
overflow-y: scroll;
}
}
</style>
......@@ -271,13 +271,15 @@ export default {
item.fp= Number(item.fp*100).toFixed();
item.np = Number(item.np*100).toFixed();
})
console.log("提交前的数据:",this.goodsDate);
//console.log(275,this.goodsDate);
addFreight(this.goodsDate).then(response => {
//console.log(296,response);
if(response.data.code === 1) {
this.$message({ message: '新增成功!', type: 'success'});
this.$emit("closeIndexbtn",false);
if(this.goodsDate.Id === 0) {
this.$message({ message: '新增成功', type: 'success'});
}else {
this.$message({ message: '修改成功', type: 'success'});
}
}
this.loading = false;
});
......
......@@ -30,6 +30,7 @@
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" @click="handleUpdate(scope.row)">修改</el-button>
<el-divider direction="vertical"></el-divider>
<el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
......@@ -87,7 +88,13 @@
</template>
<script>
import {getAddressList, getAreaList, addAddress, getAddressDetails, deleteAddress} from '@/api/module/retreat/address';
import {
addAddress,
deleteAddress,
getAddressDetails,
getAddressList,
getAreaList
} from '@/api/module/retreat/address';
export default {
name: "Address",
......
......@@ -355,6 +355,7 @@
},
//拒绝原因 1:,2:,3:,4:,5,6:,7:,8:,9:,10:,11:,12:,13:,14:
actCause: [
{label: '请选择拒绝原因',value:0},
{label: "买家要求退款金额过高", value: 1},
{label: "买家举证无效,商品没问题", value: 2},
{label: "买家未举证,商品没问题", value: 3},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论