Commit e1cc6599 by hewei

静态交易页面优化

parent 68b126fa
...@@ -17,7 +17,7 @@ export function edit(data) { ...@@ -17,7 +17,7 @@ export function edit(data) {
} }
export function deleteById(data) { export function deleteById(data) {
return Api.post(`/manager/cur/deleteById`, data) return Api.post(`/manager/cur/deleteById?inr=${data}`)
} }
// export function addAdrData(inr, data) { // export function addAdrData(inr, data) {
......
...@@ -88,6 +88,7 @@ export const Pattern = { ...@@ -88,6 +88,7 @@ export const Pattern = {
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" } { "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
], ],
"dealtim": [ "dealtim": [
{"required": true, "message": "无法保存数据"}
], ],
} }
......
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
</c-col> </c-col>
<c-col :span="24"> <c-col :span="24">
<el-form-item label="交易处理时间" prop="dealtim"> <el-form-item label="交易处理时间" prop="dealtim">
<c-input-currency class="input-currency-left" <c-input-currency value="0.0" class="input-currency-left"
v-model="model.dealtim" v-model="model.dealtim"
placeholder="请输入交易处理时间" placeholder="请输入交易处理时间"
> >
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
</c-col> </c-col>
<c-col :span="12"> <c-col :span="12">
<el-form-item label="最大金额" prop="maxamt"> <el-form-item label="最大金额" prop="maxamt">
<c-input-currency v-model="model.maxamt" placeholder="请输入最大金额" > <c-input-currency class="input-currency-left" v-model="model.maxamt" placeholder="请输入最大金额" >
</c-input-currency> </c-input-currency>
</el-form-item> </el-form-item>
</c-col> </c-col>
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
</c-content> </c-content>
</el-form> </el-form>
<div style="text-align: center"> <div style="text-align: center">
<c-button type="primary" style="margin-right: 10px" @click="commitAdd" v-if="type === 'add'">提 交1</c-button> <c-button type="primary" style="margin-right: 10px" @click="commitAdd" v-if="type === 'add'">提 交</c-button>
<c-button type="primary" style="margin-right: 10px" @click="commitEdit" v-if="type === 'edit'">提 交2</c-button> <c-button type="primary" style="margin-right: 10px" @click="commitEdit" v-if="type === 'edit'">提 交</c-button>
<c-button type="primary" style="margin-right: 10px" @click="commitDelete" v-if="type === 'delete'">提 交3 <c-button type="primary" style="margin-right: 10px" @click="commitDelete" v-if="type === 'delete'">提 交
</c-button> </c-button>
<c-button type="primary" @click="goBack">返 回</c-button> <c-button type="primary" @click="goBack">返 回</c-button>
</div> </div>
......
...@@ -26,8 +26,7 @@ export const Pattern = { ...@@ -26,8 +26,7 @@ export const Pattern = {
{ "max": 6, "message": "最大长度6个字符", "trigger": "blur" } { "max": 6, "message": "最大长度6个字符", "trigger": "blur" }
], ],
"relcur": [ "relcur": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" }, { "required": true, "message": "必输项", "type": "string" },
{ "max": 3, "message": "最大长度3个字符", "trigger": "blur" }
], ],
"relamt": [ "relamt": [
{ "required": true, "message": "必输项", "trigger": "blur" }, { "required": true, "message": "必输项", "trigger": "blur" },
......
...@@ -127,7 +127,7 @@ export default { ...@@ -127,7 +127,7 @@ export default {
edit(this.model) edit(this.model)
.then((res) => { .then((res) => {
this.$message.success("保存成功!"); this.$message.success("保存成功!");
this.goBack() this.goBack(true)
}) })
.catch((err) => { .catch((err) => {
this.$message.error("保存失败!"); this.$message.error("保存失败!");
......
...@@ -64,8 +64,7 @@ export const Pattern = { ...@@ -64,8 +64,7 @@ export const Pattern = {
{ "max": 3, "message": "最大长度3个字符", "trigger": "blur" } { "max": 3, "message": "最大长度3个字符", "trigger": "blur" }
], ],
"newcur": [ "newcur": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" }, { "required": true, "message": "必输项", "type": "string" },
{ "max": 3, "message": "最大长度3个字符", "trigger": "blur" }
], ],
"altcod": [ "altcod": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" }, { "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
......
...@@ -147,34 +147,38 @@ export default { ...@@ -147,34 +147,38 @@ export default {
// curDelete(index, row) { // curDelete(index, row) {
// this.$router.push(`/statics/dbdcur/${row.inr}`) // this.$router.push(`/statics/dbdcur/${row.inr}`)
// }, // },
//进行删除统一化
curDelete(idx, row) { curDelete(idx, row) {
this.$confirm("是否确认删除?", "提示", { this.$router.push(`/statics/dbdcur/${row.inr}`)
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let paramsData = { };
paramsData.inr = row.inr;
deleteById(paramsData)
.then((res) => {
console.log(res);
this.$message.success("删除成功!");
this.onInfcurSearch();
// this.onSearch();
// this.goBack(true)
})
.catch((err) => {
console.log(err);
this.$message.error("删除失败!");
});
}).catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
}, },
// curDelete(idx, row) {
// this.$confirm("是否确认删除?", "提示", {
// confirmButtonText: "确定",
// cancelButtonText: "取消",
// type: "warning",
// })
// .then(() => {
// let paramsData = { };
// paramsData.inr = row.inr;
// deleteById(paramsData)
// .then((res) => {
// console.log(res);
// this.$message.success("删除成功!");
// this.onInfcurSearch();
// // this.onSearch();
// // this.goBack(true)
// })
// .catch((err) => {
// console.log(err);
// this.$message.error("删除失败!");
// });
// }).catch(() => {
// this.$message({
// type: "info",
// message: "已取消删除",
// });
// });
// },
goBack(update) { goBack(update) {
this.$store.dispatch("TagsView/delView", this.$route); this.$store.dispatch("TagsView/delView", this.$route);
this.$router.push({ name: "StaticsInfcur", params: { update } }); this.$router.push({ name: "StaticsInfcur", params: { update } });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment