123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496 |
- <template>
- <div class="app-container">
- <!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
- <el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
- </el-form-item>
- </el-form> -->
- <el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
- <el-button
- type="primary"
- plain
- icon="el-icon-plus"
- size="mini"
- @click="handleAdd"
- v-hasPermi="['business:BONDEDUPPLY:add']"
- >新增</el-button
- >
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="success"
- plain
- icon="el-icon-edit"
- size="mini"
- :disabled="single"
- @click="handleUpdate"
- v-hasPermi="['business:BONDEDUPPLY:edit']"
- >修改</el-button
- >
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="danger"
- plain
- icon="el-icon-delete"
- size="mini"
- :disabled="multiple"
- @click="handleDelete"
- v-hasPermi="['business:BONDEDUPPLY:remove']"
- >删除</el-button
- >
- </el-col>
- <!-- <el-col :span="1.5">
- <el-button
- type="warning"
- plain
- icon="el-icon-download"
- size="mini"
- @click="handleExport"
- v-hasPermi="['business:BONDEDUPPLY:export']"
- >导出</el-button
- >
- </el-col> -->
- <right-toolbar
- :showSearch.sync="showSearch"
- @queryTable="getList"
- ></right-toolbar>
- </el-row>
- <el-table :data="BONDEDUPPLYList" @selection-change="handleSelectionChange">
- <el-table-column type="selection" width="55" align="center" />
- <el-table-column label="录单单位名称 " align="center" prop="lddwmc">
- </el-table-column>
- <el-table-column label="进出口标志 " align="center" prop="jckbz">
- </el-table-column>
- <el-table-column label="进出口日期 " align="center" prop="jckrq">
- </el-table-column>
- <el-table-column label="净重 " align="center" prop="jz">
- </el-table-column>
- <el-table-column label="净值 " align="center" prop="jingzhi">
- </el-table-column>
- <el-table-column label="件数 " align="center" prop="js">
- </el-table-column>
- <el-table-column label="境内收发货人编号 " align="center" prop="jnsfhrbh">
- </el-table-column>
- <el-table-column label="境内收发货人名称 " align="center" prop="jnsfhrmc">
- </el-table-column>
- <el-table-column label="境外发货人代码 " align="center" prop="jwfhrdm">
- </el-table-column>
- <el-table-column label="境外收发货人名称 " align="center" prop="jwsfhrmc">
- </el-table-column>
- <el-table-column label="境外收发货人地址 " align="center" prop="jwsfhrdz">
- </el-table-column>
- <el-table-column label="启运日期 " align="center" prop="qyrq">
- </el-table-column>
- <el-table-column label="卸毕日期 " align="center" prop="xbrq">
- </el-table-column>
- <el-table-column label="供应链主键" align="center" prop="id">
- </el-table-column>
- <el-table-column label="保税区主键" align="center" prop="deptId">
- </el-table-column>
- <el-table-column label="报关单币种统计 " align="center" prop="bgdbztj">
- </el-table-column>
- <el-table-column label="申报单位名称 " align="center" prop="sbdwmc">
- </el-table-column>
- <el-table-column label="录单单位编码名称 " align="center" prop="lddwbmmc">
- </el-table-column>
- <el-table-column label="创建时间" align="center" prop="createTime">
- </el-table-column>
- <el-table-column
- fixed="right"
- label="操作"
- align="center"
- class-name="small-padding fixed-width"
- >
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="handleUpdate(scope.row)"
- v-hasPermi="['business:BONDEDUPPLY:edit']"
- >修改</el-button
- >
- <el-button
- size="mini"
- type="text"
- icon="el-icon-delete"
- @click="handleDelete(scope.row)"
- v-hasPermi="['business:BONDEDUPPLY:remove']"
- >删除</el-button
- >
- </template>
- </el-table-column>
- </el-table>
- <pagination
- v-show="total > 0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
- <!-- 添加或修改保税区供应链数据对话框 -->
- <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="35%" append-to-body>
- <el-form ref="form" :model="form" :rules="rules" label-width="140px">
- <el-form-item label="录单单位名称" prop="lddwmc">
- <el-input v-model="form.lddwmc"></el-input>
- </el-form-item>
- <el-form-item label="进出口标志" prop="jckbz">
- <el-input v-model="form.jckbz"></el-input>
- </el-form-item>
- <el-form-item label="进出口日期" prop="jckrq">
- <!-- <el-input v-model="form.jckrq"></el-input> -->
- <el-date-picker
- v-model="form.jckrq"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="选择日期"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item label="净重" prop="jz">
- <el-input v-model="form.jz"></el-input>
- </el-form-item>
- <el-form-item label="净值" prop="jingzhi">
- <el-input v-model="form.jingzhi"></el-input>
- </el-form-item>
- <el-form-item label="件数" prop="js">
- <el-input v-model="form.js"></el-input>
- </el-form-item>
- <el-form-item label="境内收发货人标号" prop="jnsfhrbh">
- <el-input v-model="form.jnsfhrbh"></el-input>
- </el-form-item>
- <el-form-item label="境内收发货人名称 " prop="jnsfhrmc">
- <el-input v-model="form.jnsfhrmc"></el-input>
- </el-form-item>
- <el-form-item label="境外发货人代码 " prop="jwfhrdm">
- <el-input v-model="form.jwfhrdm"></el-input>
- </el-form-item>
- <el-form-item label="境外收发货人名称 " prop="jwsfhrmc">
- <el-input v-model="form.jwsfhrmc"></el-input>
- </el-form-item>
- <el-form-item label="境外收发货人地址 " prop="jwsfhrdz">
- <el-input v-model="form.jwsfhrdz"></el-input>
- </el-form-item>
- <el-form-item label="启运日期 " prop="qyrq">
- <!-- <el-input v-model="form.qyrq"></el-input> -->
- <el-date-picker
- v-model="form.qyrq"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="选择日期"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item label="卸毕日期 " prop="xbrq">
- <el-input v-model="form.xbrq"></el-input>
- <!-- <el-date-picker
- v-model="form.xbrq"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="选择日期"
- >
- </el-date-picker> -->
- </el-form-item>
- <!-- <el-form-item label="供应链主键 " prop="id">
- <el-input v-model="form.id"></el-input>
- </el-form-item>
- <el-form-item label="保税区主键 " prop="deptId">
- <el-input v-model="form.deptId"></el-input>
- </el-form-item> -->
- <el-form-item label="报关单币种统计 " prop="bgdbztj">
- <el-input v-model="form.bgdbztj"></el-input>
- </el-form-item>
- <el-form-item label="申报单位名称 " prop="sbdwmc">
- <el-input v-model="form.sbdwmc"></el-input>
- </el-form-item>
- <el-form-item label="录单单位编码名称 " prop="lddwbmmc">
- <el-input v-model="form.lddwbmmc"></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitForm">确 定</el-button>
- <el-button @click="cancel">取 消</el-button>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- listBONDEDUPPLY,
- getBONDEDUPPLY,
- delBONDEDUPPLY,
- addBONDEDUPPLY,
- updateBONDEDUPPLY,
- } from "@/api/portal/BONDEDUPPLY/BONDEDUPPLY";
- export default {
- name: "BONDEDUPPLY",
- data() {
- return {
- // 根路径
- baseURL: process.env.VUE_APP_BASE_API,
- // 遮罩层
- loading: true,
- // 选中数组
- ids: [],
- // 非单个禁用
- single: true,
- // 非多个禁用
- multiple: true,
- // 显示搜索条件
- showSearch: true,
- // 总条数
- total: 0,
- // 保税区供应链数据表格数据
- BONDEDUPPLYList: [],
- // 弹出层标题
- title: "",
- // 是否显示弹出层
- open: false,
- // 查询参数
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- lddwmc: null,
- jckbz: null,
- jckrq: null,
- jz: null,
- jingzhi: null,
- js: null,
- jnsfhrbh: null,
- jnsfhrmc: null,
- jwfhrdm: null,
- jwsfhrmc: null,
- jwsfhrdz: null,
- qyrq: null,
- xbrq: null,
- id: null,
- deptId: null,
- bgdbztj: null,
- sbdwmc: null,
- lddwbmmc: null,
- createTime: null,
- },
- // 表单参数
- form: {},
- // 表单校验
- rules: {
- lddwmc: [
- { required: true, message: "录单单位名称 不能为空", trigger: "blur" },
- ],
- jckbz: [
- { required: true, message: "进出口标志 不能为空", trigger: "blur" },
- ],
- jckrq: [
- { required: true, message: "进出口日期 不能为空", trigger: "blur" },
- ],
- jz: [{ required: true, message: "净重 不能为空", trigger: "blur" }],
- jingzhi: [
- { required: true, message: "净值 不能为空", trigger: "blur" },
- ],
- js: [{ required: true, message: "件数 不能为空", trigger: "blur" }],
- jnsfhrbh: [
- {
- required: true,
- message: "境内收发货人编号 不能为空",
- trigger: "blur",
- },
- ],
- jnsfhrmc: [
- {
- required: true,
- message: "境内收发货人名称 不能为空",
- trigger: "blur",
- },
- ],
- jwfhrdm: [
- {
- required: true,
- message: "境外发货人代码 不能为空",
- trigger: "blur",
- },
- ],
- jwsfhrmc: [
- {
- required: true,
- message: "境外收发货人名称 不能为空",
- trigger: "blur",
- },
- ],
- jwsfhrdz: [
- {
- required: true,
- message: "境外收发货人地址 不能为空",
- trigger: "blur",
- },
- ],
- qyrq: [
- { required: true, message: "启运日期 不能为空", trigger: "blur" },
- ],
- xbrq: [
- { required: true, message: "卸毕日期 不能为空", trigger: "blur" },
- ],
- id: [
- { required: true, message: "供应链主键不能为空", trigger: "blur" },
- ],
- deptId: [
- { required: true, message: "保税区主键不能为空", trigger: "blur" },
- ],
- bgdbztj: [
- {
- required: true,
- message: "报关单币种统计 不能为空",
- trigger: "blur",
- },
- ],
- sbdwmc: [
- { required: true, message: "申报单位名称 不能为空", trigger: "blur" },
- ],
- lddwbmmc: [
- {
- required: true,
- message: "录单单位编码名称 不能为空",
- trigger: "blur",
- },
- ],
- },
- };
- },
- created() {
- this.getList();
- },
- methods: {
- /** 查询保税区供应链数据列表 */
- getList() {
- this.loading = true;
- listBONDEDUPPLY(this.queryParams).then((response) => {
- this.BONDEDUPPLYList = response.rows;
- this.total = response.total;
- this.loading = false;
- });
- },
- // 取消按钮
- cancel() {
- this.open = false;
- this.reset();
- },
- // 表单重置
- reset() {
- this.form = {
- lddwmc: null,
- jckbz: null,
- jckrq: null,
- jz: null,
- jingzhi: null,
- js: null,
- jnsfhrbh: null,
- jnsfhrmc: null,
- jwfhrdm: null,
- jwsfhrmc: null,
- jwsfhrdz: null,
- qyrq: null,
- xbrq: null,
- id: null,
- deptId: null,
- bgdbztj: null,
- sbdwmc: null,
- lddwbmmc: null,
- };
- this.resetForm("form");
- },
- /** 搜索按钮操作 */
- handleQuery() {
- this.queryParams.pageNum = 1;
- this.getList();
- },
- /** 重置按钮操作 */
- resetQuery() {
- this.resetForm("queryForm");
- this.handleQuery();
- },
- // 多选框选中数据
- handleSelectionChange(selection) {
- this.ids = selection.map((item) => item.id);
- console.log(this.ids);
- this.single = selection.length !== 1;
- this.multiple = !selection.length;
- },
- /** 新增按钮操作 */
- handleAdd() {
- this.reset();
- this.open = true;
- this.title = "添加保税区供应链数据";
- },
- /** 修改按钮操作 */
- handleUpdate(row) {
- console.log(row.lddwmc);
- this.reset();
- let lddwmc = row.id || this.ids;
- getBONDEDUPPLY(lddwmc).then((response) => {
- this.form = response.data;
- this.open = true;
- this.title = "修改保税区供应链数据";
- console.log(this.form, "form");
- });
- },
- /** 提交按钮 */
- submitForm() {
- console.log(this.form, "------------------------------");
- this.$refs["form"].validate((valid) => {
- if (valid) {
- if (this.form.id == null) {
- addBONDEDUPPLY(this.form).then((response) => {
- this.$modal.msgSuccess("新增成功");
- this.open = false;
- this.getList();
- this.reset();
- });
- } else {
- updateBONDEDUPPLY(this.form).then((response) => {
- this.$modal.msgSuccess("修改成功");
- this.open = false;
- this.getList();
- this.reset();
- });
- }
- }
- });
- },
- /** 删除按钮操作 */
- handleDelete(row) {
- const lddwmcs = row.id || this.ids;
- console.log(lddwmcs);
- this.$modal
- .confirm(
- '是否确认删除保税区供应链数据编号为"' + lddwmcs + '"的数据项?'
- )
- .then(function () {
- return delBONDEDUPPLY(lddwmcs);
- })
- .then(() => {
- this.getList();
- this.$modal.msgSuccess("删除成功");
- })
- .catch(() => {});
- },
- /** 导出按钮操作 */
- handleExport() {
- this.download(
- "/BONDEDUPPLY/export",
- {
- ...this.queryParams,
- },
- `BONDEDUPPLY_new Date().getTme()}.xlsx`
- );
- },
- },
- };
- </script>
|