zhanbo.xu

feat: 开发模拟回执

......@@ -3,7 +3,7 @@ import request from "@/utils/request";
// POST
// /mockReceipt/add
// 新增模拟回执
export function add(data) {
export function addInfo(data) {
return request({
url: "/bus-customer/mockReceipt/add",
method: "post",
......
This diff is collapsed. Click to expand it.
......@@ -10,46 +10,52 @@
<el-row class="row-border">
<!-- 角色名称 -->
<el-col :span="5">
<Formitem label="经营人代码" prop="operatorCode">
<el-input
<Formitem label="回执类型" prop="receiptType">
<el-select
type="text"
class="inputShadow"
id="inputInner--operatorCode"
resize="none"
v-model="sreachFormData.operatorCode"
id="inputInner--receiptType"
v-model="sreachFormData.receiptType"
clearable
filterable
placeholder=""
></el-input>
>
<el-option
v-for="item in receiptTypeList"
:key="item.value"
:label="item.itemChineseName"
:value="item.itemValue"
></el-option>
</el-select>
</Formitem>
</el-col>
<el-col :span="5">
<Formitem label="经营人名称" prop="operatorName">
<Formitem label="订单编号" prop="orderNo">
<el-input
type="text"
class="inputShadow"
id="inputInner--operatorName"
id="inputInner--orderNo"
resize="none"
v-model="sreachFormData.operatorName"
v-model="sreachFormData.orderNo"
clearable
placeholder=""
></el-input>
</Formitem>
</el-col>
<el-col :span="5">
<Formitem label="所属口岸" prop="portCode">
<Formitem label="回执状态" prop="receiptStatus">
<el-select
type="text"
id="inputInner--portCode"
v-model="sreachFormData.portCode"
id="inputInner--receiptStatus"
v-model="sreachFormData.receiptStatus"
clearable
filterable
placeholder=""
>
<el-option
v-for="item in portCodeList"
:key="item"
:label="item"
:value="item"
v-for="item in receiptStatusList"
:key="item.value"
:label="item.itemChineseName"
:value="item.itemValue"
></el-option>
</el-select>
</Formitem>
......@@ -109,31 +115,20 @@
:selectFixed="false"
:rowSelectDataType="false"
>
<template slot="optionColumn">
<el-table-column align="left" label="操作">
<template slot-scope="scope">
<el-button type="text" @click="update(scope.row)"> 修改 </el-button>
</template>
</el-table-column>
</template>
</Table>
<DialogVue
:outerVisible="outerVisible"
:title="dialogTitle"
:type="editType"
:active="activeData"
@close="dialogClose"
:portCodeList="portCodeList"
:receiptStatusList="receiptStatusList"
:receiptTypeList="receiptTypeList"
/>
</div>
</template>
<script>
import {
getOperatorPlaceList,
getPortCodeList,
} from "@/api/supervisePlaceManage-api.js";
import { searchList } from "@/api/receiptManagement-api.js";
import { getDictData } from "@/api/system/dict-api.js";
import DialogVue from "./dialog.vue";
export default {
name: "SupervisePlaceManage",
......@@ -143,16 +138,15 @@ export default {
data() {
return {
sreachFormData: {
portCode: "",
operatorCode: "",
operatorName: "",
receiptType: "",
orderNo: "",
receiptStatus: "",
},
page: {
pageIndex: 1,
pageSize: 20,
total: 0,
},
activeData: null,
tableData: [],
headerData: [
{
......@@ -191,32 +185,39 @@ export default {
},
tableMaxheight: null,
outerVisible: false,
dialogTitle: "",
editType: "",
portCodeList: [],
receiptStatusList: [],
receiptTypeList: [],
};
},
created() {
this.search(0);
this.fetchReceiptStatus();
},
mounted() {
this.tableMaxheight = window.innerHeight - 300;
this.fetchPortCodeList();
},
methods: {
// 获取所属口岸
fetchPortCodeList() {
getPortCodeList()
fetchReceiptStatus() {
getDictData({ doctCode: "RECEIPT_TYPE" })
.then((res) => {
if (res.code === "200") {
this.portCodeList = res.data;
} else {
if (res.code == "200") {
this.receiptTypeList = res.data;
}
})
.catch((err) => {
console.log(err);
console.error(err);
});
getDictData({ doctCode: "RECEIPT_STATUS" })
.then((res) => {
if (res.code == "200") {
this.receiptStatusList = res.data;
}
})
.catch((err) => {
console.error(err);
});
},
clear() {
this.$refs.sreachForm.resetFields();
},
......@@ -248,20 +249,11 @@ export default {
});
},
addRole() {
this.dialogTitle = "监管场所管理新增";
this.editType = "add";
this.outerVisible = true;
},
update(val) {
this.dialogTitle = "监管场所管理修改";
this.editType = "update";
this.outerVisible = true;
this.activeData = JSON.parse(JSON.stringify(val));
},
dialogClose() {
this.outerVisible = false;
this.activeData = null;
this.search(1);
},
//分页
......
......@@ -274,24 +274,6 @@ export default {
this.loadings.dialogLoading = false;
});
},
//菜单权限修改
menuChangeapi(val) {
updateOperatorPlace(val)
.then((res) => {
if (res.code === "200") {
this.msgSuccess(res.message);
this.close();
this.$store.dispatch("GenerateRoutes");
} else {
this.alertWarningMsg(res.message);
this.loadings.dialogLoading = false;
}
})
.catch((err) => {
console.log(err);
this.loadings.dialogLoading = false;
});
},
close() {
this.formData = {
......