Merge branch 'beta' into kk

beta-prop-all^2
dongxiaoke 2 years ago
commit bb4e521c47
  1. 25
      jianshui-admin/src/main/java/com/jianshui/web/controller/platform/InvoiceParamConfigController.java
  2. 1
      jianshui-platform/src/main/java/com/jianshui/platform/domain/InvoiceParamConfig.java
  3. 8
      jianshui-platform/src/main/java/com/jianshui/platform/mapper/InvoiceParamConfigMapper.java
  4. 9
      jianshui-platform/src/main/java/com/jianshui/platform/service/IInvoiceParamConfigService.java
  5. 32
      jianshui-platform/src/main/java/com/jianshui/platform/service/impl/InvoiceParamConfigServiceImpl.java
  6. 27
      jianshui-platform/src/main/resources/com/jianshui/platform/mapper/InvoiceParamConfigMapper.xml
  7. 20
      jianshui-ui/src/api/platform/exportmanage.js
  8. 36
      jianshui-ui/src/api/platform/exportsetting.js
  9. 40
      jianshui-ui/src/views/platform/exportmanage/index.vue
  10. 671
      jianshui-ui/src/views/platform/exportsetting/index.vue

@ -28,7 +28,7 @@ import com.jianshui.common.core.page.TableDataInfo;
* @date 2023-06-28 * @date 2023-06-28
*/ */
@RestController @RestController
@RequestMapping("/platform/config") @RequestMapping("/platform/exportmanage")
public class InvoiceParamConfigController extends BaseController public class InvoiceParamConfigController extends BaseController
{ {
@Autowired @Autowired
@ -37,7 +37,7 @@ public class InvoiceParamConfigController extends BaseController
/** /**
* 查询导入设置列表 * 查询导入设置列表
*/ */
@PreAuthorize("@ss.hasPermi('platform:config:list')") @PreAuthorize("@ss.hasPermi('platform:exportmanage:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(InvoiceParamConfig invoiceParamConfig) public TableDataInfo list(InvoiceParamConfig invoiceParamConfig)
{ {
@ -46,10 +46,21 @@ public class InvoiceParamConfigController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
* 查询单个导入设置列表
*/
@PreAuthorize("@ss.hasPermi('platform:exportmanage:list')")
@GetMapping("/findByName")
public AjaxResult findByName()
{
return invoiceParamConfigService.findByName();
}
/** /**
* 导出导入设置列表 * 导出导入设置列表
*/ */
@PreAuthorize("@ss.hasPermi('platform:config:export')") @PreAuthorize("@ss.hasPermi('platform:exportmanage:export')")
@Log(title = "导入设置", businessType = BusinessType.EXPORT) @Log(title = "导入设置", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, InvoiceParamConfig invoiceParamConfig) public void export(HttpServletResponse response, InvoiceParamConfig invoiceParamConfig)
@ -62,7 +73,7 @@ public class InvoiceParamConfigController extends BaseController
/** /**
* 获取导入设置详细信息 * 获取导入设置详细信息
*/ */
@PreAuthorize("@ss.hasPermi('platform:config:query')") @PreAuthorize("@ss.hasPermi('platform:exportmanage:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
@ -72,7 +83,7 @@ public class InvoiceParamConfigController extends BaseController
/** /**
* 新增导入设置 * 新增导入设置
*/ */
@PreAuthorize("@ss.hasPermi('platform:config:add')") @PreAuthorize("@ss.hasPermi('platform:exportmanage:add')")
@Log(title = "导入设置", businessType = BusinessType.INSERT) @Log(title = "导入设置", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody InvoiceParamConfig invoiceParamConfig) public AjaxResult add(@RequestBody InvoiceParamConfig invoiceParamConfig)
@ -83,7 +94,7 @@ public class InvoiceParamConfigController extends BaseController
/** /**
* 修改导入设置 * 修改导入设置
*/ */
@PreAuthorize("@ss.hasPermi('platform:config:edit')") @PreAuthorize("@ss.hasPermi('platform:exportmanage:edit')")
@Log(title = "导入设置", businessType = BusinessType.UPDATE) @Log(title = "导入设置", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody InvoiceParamConfig invoiceParamConfig) public AjaxResult edit(@RequestBody InvoiceParamConfig invoiceParamConfig)
@ -94,7 +105,7 @@ public class InvoiceParamConfigController extends BaseController
/** /**
* 删除导入设置 * 删除导入设置
*/ */
@PreAuthorize("@ss.hasPermi('platform:config:remove')") @PreAuthorize("@ss.hasPermi('platform:exportmanage:remove')")
@Log(title = "导入设置", businessType = BusinessType.DELETE) @Log(title = "导入设置", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)

@ -1,6 +1,5 @@
package com.jianshui.platform.domain; package com.jianshui.platform.domain;
import java.math.BigDecimal;
import com.jianshui.common.annotation.Excel; import com.jianshui.common.annotation.Excel;
import com.jianshui.common.core.domain.BaseEntity; import com.jianshui.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;

@ -2,6 +2,7 @@ package com.jianshui.platform.mapper;
import java.util.List; import java.util.List;
import com.jianshui.platform.domain.InvoiceParamConfig; import com.jianshui.platform.domain.InvoiceParamConfig;
import org.apache.ibatis.annotations.Param;
/** /**
* 导入设置Mapper接口 * 导入设置Mapper接口
@ -58,4 +59,11 @@ public interface InvoiceParamConfigMapper
* @return 结果 * @return 结果
*/ */
public int deleteInvoiceParamConfigByIds(Long[] ids); public int deleteInvoiceParamConfigByIds(Long[] ids);
/**
* 功能描述: 根据企业名称查询配置参数
* @param sellername
* @return : com.jianshui.platform.domain.InvoiceParamConfig
*/
InvoiceParamConfig findByCompanyServiceName(@Param("sellername") String sellername);
} }

@ -1,6 +1,8 @@
package com.jianshui.platform.service; package com.jianshui.platform.service;
import java.util.List; import java.util.List;
import com.jianshui.common.core.domain.AjaxResult;
import com.jianshui.platform.domain.InvoiceParamConfig; import com.jianshui.platform.domain.InvoiceParamConfig;
/** /**
@ -58,4 +60,11 @@ public interface IInvoiceParamConfigService
* @return 结果 * @return 结果
*/ */
public int deleteInvoiceParamConfigById(Long id); public int deleteInvoiceParamConfigById(Long id);
/**
* 功能描述: 获取企业配置
* @return : com.jianshui.common.core.domain.AjaxResult
*/
AjaxResult findByName();
} }

@ -1,8 +1,8 @@
package com.jianshui.platform.service.impl; package com.jianshui.platform.service.impl;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
import com.jianshui.common.core.domain.AjaxResult;
import com.jianshui.common.core.domain.entity.Companyservice; import com.jianshui.common.core.domain.entity.Companyservice;
import com.jianshui.common.core.domain.entity.SysUser; import com.jianshui.common.core.domain.entity.SysUser;
import com.jianshui.common.utils.DateUtils; import com.jianshui.common.utils.DateUtils;
@ -26,7 +26,6 @@ public class InvoiceParamConfigServiceImpl implements IInvoiceParamConfigService
{ {
@Autowired @Autowired
private InvoiceParamConfigMapper invoiceParamConfigMapper; private InvoiceParamConfigMapper invoiceParamConfigMapper;
@Autowired @Autowired
private SysUserMapper sysUserMapper; private SysUserMapper sysUserMapper;
@ -70,11 +69,27 @@ public class InvoiceParamConfigServiceImpl implements IInvoiceParamConfigService
Long userId = SecurityUtils.getUserId(); Long userId = SecurityUtils.getUserId();
SysUser sysUser = sysUserMapper.selectUserById(userId); SysUser sysUser = sysUserMapper.selectUserById(userId);
Companyservice companyservice = companyserviceMapper.selectCompanyserviceByCompanyid(sysUser.getCompanyId()); Companyservice companyservice = companyserviceMapper.selectCompanyserviceByCompanyid(sysUser.getCompanyId());
InvoiceParamConfig byCompanyServiceName = invoiceParamConfigMapper.findByCompanyServiceName(companyservice.getSellername());
if (byCompanyServiceName != null){
// 删除对应数据
invoiceParamConfigMapper.deleteInvoiceParamConfigById(byCompanyServiceName.getId());
// 封装参数 // 封装参数
invoiceParamConfig.setCreateTime(DateUtils.getNowDate()); invoiceParamConfig.setCreateTime(DateUtils.getNowDate());
invoiceParamConfig.setCompanyName(companyservice.getSellername()); invoiceParamConfig.setCompanyName(companyservice.getSellername());
invoiceParamConfig.setCreateBy(sysUser.getCreateBy()); invoiceParamConfig.setCreateBy(sysUser.getCreateBy());
//存入对应数据
return invoiceParamConfigMapper.insertInvoiceParamConfig(invoiceParamConfig); return invoiceParamConfigMapper.insertInvoiceParamConfig(invoiceParamConfig);
}else {
// 封装参数
invoiceParamConfig.setCreateTime(DateUtils.getNowDate());
invoiceParamConfig.setCompanyName(companyservice.getSellername());
invoiceParamConfig.setCreateBy(sysUser.getCreateBy());
//存入对应数据
return invoiceParamConfigMapper.insertInvoiceParamConfig(invoiceParamConfig);
}
} }
/** /**
@ -113,4 +128,17 @@ public class InvoiceParamConfigServiceImpl implements IInvoiceParamConfigService
{ {
return invoiceParamConfigMapper.deleteInvoiceParamConfigById(id); return invoiceParamConfigMapper.deleteInvoiceParamConfigById(id);
} }
/**
* 功能描述: 获取企业配置
* @return : com.jianshui.common.core.domain.AjaxResult
*/
@Override
public AjaxResult findByName() {
Long userId = SecurityUtils.getUserId();
SysUser sysUser = sysUserMapper.selectUserById(userId);
Companyservice companyservice = companyserviceMapper.selectCompanyserviceByCompanyid(sysUser.getCompanyId());
InvoiceParamConfig invoiceParamConfig = invoiceParamConfigMapper.findByCompanyServiceName(companyservice.getSellername());
return AjaxResult.success(invoiceParamConfig);
}
} }

@ -57,6 +57,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectInvoiceParamConfigVo"/> <include refid="selectInvoiceParamConfigVo"/>
where id = #{id} where id = #{id}
</select> </select>
<select id="findByCompanyServiceName" resultMap="InvoiceParamConfigResult">
select * from invoice_param_config where company_name = #{sellername}
</select>
<insert id="insertInvoiceParamConfig" parameterType="InvoiceParamConfig" useGeneratedKeys="true" keyProperty="id"> <insert id="insertInvoiceParamConfig" parameterType="InvoiceParamConfig" useGeneratedKeys="true" keyProperty="id">
insert into invoice_param_config insert into invoice_param_config
@ -75,10 +78,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productName != null and productName != ''">product_name,</if> <if test="productName != null and productName != ''">product_name,</if>
<if test="specification != null">specification,</if> <if test="specification != null">specification,</if>
<if test="unit != null">unit,</if> <if test="unit != null">unit,</if>
<if test="price != null">price,</if> <if test="price != null and price != ''">price,</if>
<if test="num != null">num,</if> <if test="num != null and num != ''">num,</if>
<if test="taxamt != null">taxamt,</if> <if test="taxamt != null and taxamt != ''">taxamt,</if>
<if test="taxrate != null">taxrate,</if> <if test="taxrate != null and taxrate != ''">taxrate,</if>
<if test="tax != null">tax,</if> <if test="tax != null">tax,</if>
<if test="discount != null">discount,</if> <if test="discount != null">discount,</if>
<if test="deduction != null">deduction,</if> <if test="deduction != null">deduction,</if>
@ -110,10 +113,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productName != null and productName != ''">#{productName},</if> <if test="productName != null and productName != ''">#{productName},</if>
<if test="specification != null">#{specification},</if> <if test="specification != null">#{specification},</if>
<if test="unit != null">#{unit},</if> <if test="unit != null">#{unit},</if>
<if test="price != null">#{price},</if> <if test="price != null and price != ''">#{price},</if>
<if test="num != null">#{num},</if> <if test="num != null and num != ''">#{num},</if>
<if test="taxamt != null">#{taxamt},</if> <if test="taxamt != null and taxamt != ''">#{taxamt},</if>
<if test="taxrate != null">#{taxrate},</if> <if test="taxrate != null and taxrate != ''">#{taxrate},</if>
<if test="tax != null">#{tax},</if> <if test="tax != null">#{tax},</if>
<if test="discount != null">#{discount},</if> <if test="discount != null">#{discount},</if>
<if test="deduction != null">#{deduction},</if> <if test="deduction != null">#{deduction},</if>
@ -149,10 +152,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productName != null and productName != ''">product_name = #{productName},</if> <if test="productName != null and productName != ''">product_name = #{productName},</if>
<if test="specification != null">specification = #{specification},</if> <if test="specification != null">specification = #{specification},</if>
<if test="unit != null">unit = #{unit},</if> <if test="unit != null">unit = #{unit},</if>
<if test="price != null">price = #{price},</if> <if test="price != null and price != ''">price = #{price},</if>
<if test="num != null">num = #{num},</if> <if test="num != null and num != ''">num = #{num},</if>
<if test="taxamt != null">taxamt = #{taxamt},</if> <if test="taxamt != null and taxamt != ''">taxamt = #{taxamt},</if>
<if test="taxrate != null">taxrate = #{taxrate},</if> <if test="taxrate != null and taxrate != ''">taxrate = #{taxrate},</if>
<if test="tax != null">tax = #{tax},</if> <if test="tax != null">tax = #{tax},</if>
<if test="discount != null">discount = #{discount},</if> <if test="discount != null">discount = #{discount},</if>
<if test="deduction != null">deduction = #{deduction},</if> <if test="deduction != null">deduction = #{deduction},</if>

@ -1,44 +1,44 @@
import request from '@/utils/request' import request from '@/utils/request'
// 查询导入设置列表 // 查询导入设置列表
export function listConfig(query) { export function listExportmanage(query) {
return request({ return request({
url: '/platform/config/list', url: '/platform/exportmanage/list',
method: 'get', method: 'get',
params: query params: query
}) })
} }
// 查询导入设置详细 // 查询导入设置详细
export function getConfig(id) { export function getExportmanage(id) {
return request({ return request({
url: '/platform/config/' + id, url: '/platform/exportmanage/' + id,
method: 'get' method: 'get'
}) })
} }
// 新增导入设置 // 新增导入设置
export function addConfig(data) { export function addExportmanage(data) {
return request({ return request({
url: '/platform/config', url: '/platform/exportmanage',
method: 'post', method: 'post',
data: data data: data
}) })
} }
// 修改导入设置 // 修改导入设置
export function updateConfig(data) { export function updateExportmanage(data) {
return request({ return request({
url: '/platform/config', url: '/platform/exportmanage',
method: 'put', method: 'put',
data: data data: data
}) })
} }
// 删除导入设置 // 删除导入设置
export function delConfig(id) { export function delExportmanage(id) {
return request({ return request({
url: '/platform/config/' + id, url: '/platform/exportmanage/' + id,
method: 'delete' method: 'delete'
}) })
} }

@ -0,0 +1,36 @@
import request from '@/utils/request'
//查询单个记录
export function oneExportmanage() {
return request({
url: '/platform/exportmanage/findByName',
method: 'get'
})
}
// 新增导入设置
export function addExportmanage(data) {
return request({
url: '/platform/exportmanage',
method: 'post',
data: data
})
}
// 修改导入设置
export function updateExportmanage(data) {
return request({
url: '/platform/exportmanage',
method: 'put',
data: data
})
}
// 删除导入设置
export function delExportmanage(id) {
return request({
url: '/platform/exportmanage/' + id,
method: 'delete'
})
}

@ -34,7 +34,7 @@
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['platform:config:add']" v-hasPermi="['platform:exportmanage:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -45,7 +45,7 @@
size="mini" size="mini"
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['platform:config:edit']" v-hasPermi="['platform:exportmanage:edit']"
>修改</el-button> >修改</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -56,7 +56,7 @@
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['platform:config:remove']" v-hasPermi="['platform:exportmanage:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -66,16 +66,16 @@
icon="el-icon-download" icon="el-icon-download"
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['platform:config:export']" v-hasPermi="['platform:exportmanage:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="configList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="exportmanageList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键ID" align="center" prop="id" /> <!-- <el-table-column label="主键ID" align="center" prop="id" />-->
<!-- <el-table-column label="企业名称" align="center" prop="companyName" />--> <el-table-column label="企业名称" align="center" prop="companyName" />
<el-table-column label="单据编号" align="center" prop="receiptNumber" /> <el-table-column label="单据编号" align="center" prop="receiptNumber" />
<el-table-column label="客户名称/编码" align="center" prop="customerName" /> <el-table-column label="客户名称/编码" align="center" prop="customerName" />
<el-table-column label="客户税号" align="center" prop="customerTaxNumber" /> <el-table-column label="客户税号" align="center" prop="customerTaxNumber" />
@ -114,14 +114,14 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['platform:config:edit']" v-hasPermi="['platform:exportmanage:edit']"
>修改</el-button> >修改</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['platform:config:remove']" v-hasPermi="['platform:exportmanage:remove']"
>删除</el-button> >删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -239,10 +239,10 @@
</template> </template>
<script> <script>
import { listConfig, getConfig, delConfig, addConfig, updateConfig } from "@/api/platform/config"; import { listExportmanage, getExportmanage, delExportmanage, addExportmanage, updateExportmanage } from "@/api/platform/exportmanage";
export default { export default {
name: "Config", name: "Exportmanage",
dicts: ['signboard'], dicts: ['signboard'],
data() { data() {
return { return {
@ -259,7 +259,7 @@ export default {
// //
total: 0, total: 0,
// //
configList: [], exportmanageList: [],
// //
title: "", title: "",
// //
@ -309,8 +309,8 @@ export default {
/** 查询导入设置列表 */ /** 查询导入设置列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listConfig(this.queryParams).then(response => { listExportmanage(this.queryParams).then(response => {
this.configList = response.rows; this.exportmanageList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
@ -386,7 +386,7 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const id = row.id || this.ids const id = row.id || this.ids
getConfig(id).then(response => { getExportmanage(id).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改导入设置"; this.title = "修改导入设置";
@ -397,13 +397,13 @@ export default {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.id != null) { if (this.form.id != null) {
updateConfig(this.form).then(response => { updateExportmanage(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
} else { } else {
addConfig(this.form).then(response => { addExportmanage(this.form).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
@ -416,7 +416,7 @@ export default {
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除导入设置编号为"' + ids + '"的数据项?').then(function() { this.$modal.confirm('是否确认删除导入设置编号为"' + ids + '"的数据项?').then(function() {
return delConfig(ids); return delExportmanage(ids);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
@ -424,9 +424,9 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('platform/config/export', { this.download('platform/exportmanage/export', {
...this.queryParams ...this.queryParams
}, `config_${new Date().getTime()}.xlsx`) }, `exportmanage_${new Date().getTime()}.xlsx`)
} }
} }
}; };

@ -0,0 +1,671 @@
<template>
<div class="app-container">
<el-tabs v-model="activeName">
<el-tab-pane label="Excel设置" name="second">
<el-form :model="form" ref="form" :inline="true" :rules="rules" label-width="150px">
<el-form-item class="el-form-item__label" label="单据编号" prop="receiptNumber">
<el-input
v-model="form.receiptNumber"
placeholder="单据编号"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="客户名称/编码" prop="customerName" style="margin-left: -10px;">
<el-input
v-model="form.customerName"
placeholder="客户名称/编码"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="客户税号" prop="customerTaxNumber">
<el-input
v-model="form.customerTaxNumber"
placeholder="客户税号"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="客户地址" prop="customerAddress">
<el-input
v-model="form.customerAddress"
placeholder="客户地址"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="客户电话" prop="customerPhone">
<el-input
v-model="form.customerPhone"
placeholder="客户电话"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="开户银行" prop="bankName">
<el-input
v-model="form.bankName"
placeholder="开户银行"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="银行账号" prop="bankNumber">
<el-input
v-model="form.bankNumber"
placeholder="银行账号"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="手机号" prop="phone">
<el-input
v-model="form.phone"
placeholder="手机号"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="邮箱" prop="email">
<el-input
v-model="form.email"
placeholder="邮箱"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input
v-model="form.remark"
placeholder="备注"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="商品名称/编码" prop="productName">
<el-input
v-model="form.productName"
placeholder="商品名称/编码"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="规格型号" prop="specification">
<el-input
v-model="form.specification"
placeholder="规格型号"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="单位" prop="unit">
<el-input
v-model="form.unit"
placeholder="单位"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="单价" prop="price">
<el-input
v-model="form.price"
placeholder="单价"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="数量" prop="num">
<el-input
v-model="form.num"
placeholder="数量"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="金额" prop="taxamt">
<el-input
v-model="form.taxamt"
placeholder="金额"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="税率" prop="taxrate">
<el-input
v-model="form.taxrate"
placeholder="税率"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="税额" prop="tax">
<el-input
v-model="form.tax"
placeholder="税额"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="折扣" prop="discount">
<el-input
v-model="form.discount"
placeholder="折扣"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="扣除额" prop="deduction">
<el-input
v-model="form.deduction"
placeholder="扣除额"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="含税标识" prop="signboard">
<el-select v-model="form.signboard" placeholder="含税标识" size="small" style="width: 130px;font-size: 10px"
default-value="1">
<el-option
v-for="dict in dict.type.signboard"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="零税率标识" prop="zeroTaxRate">
<el-input
v-model="form.zeroTaxRate"
placeholder="零税率标识"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="编码简称" prop="encodingName">
<el-input
v-model="form.encodingName"
placeholder="编码简称"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="编码版本号" prop="encodingVersion">
<el-input
v-model="form.encodingVersion"
placeholder="编码版本号"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="优惠政策类型" prop="discountsType">
<el-input
v-model="form.discountsType"
placeholder="优惠政策类型"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="税收分类编码" prop="taxClassificationCode">
<el-input
v-model="form.taxClassificationCode"
placeholder="税收分类编码"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<el-form-item label="是否享受优惠政策" prop="isornotDiscounts">
<el-input
v-model="form.isornotDiscounts"
placeholder="是否享受优惠政策"
size="small"
style="width: 130px;font-size: 10px"
@blur="checkInput"
/>
</el-form-item>
<br>
<el-form-item style="margin-left: 1000px">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</el-form-item>
</el-form>
</el-tab-pane>
<el-tab-pane label="参数配置" name="first">
<div align="center" style="color: #00afff">
<div style="font-size: 25px">
是否启用参数配置
<el-radio v-model="radio1" label="1" border>禁用</el-radio>
<el-radio v-model="radio1" label="2" border>开启</el-radio>
</div>
</div>
<el-card shadow="always" style="margin-top: 10px">
<div align="center">
<el-divider class="divider" direction="vertical"></el-divider>
<span class="spacer">商品编码</span>
<el-radio v-model="radio2" label="1" border :disabled="radio1 === '1'">关闭</el-radio>
<el-radio v-model="radio2" label="2" border :disabled="radio1 === '1'">开启</el-radio>
<el-divider class="divider" direction="vertical"></el-divider>
<span class="spacer">商品名称</span>
<el-radio v-model="radio3" label="1" border :disabled="radio1 === '1' || radio2 === '2'">关闭</el-radio>
<el-radio v-model="radio3" label="2" border :disabled="radio1 === '1' || radio2 === '2'">开启</el-radio>
</div>
</el-card>
<el-card shadow="always" style="margin-top: 20px">
<div align="center">
<el-divider class="divider" direction="vertical"></el-divider>
<span class="spacer">规格型号</span>
<el-radio v-model="radio4" label="1" border :disabled="radio1 === '1' || radio2 === '2'">关闭</el-radio>
<el-radio v-model="radio4" label="2" border :disabled="radio1 === '1' || radio2 === '2'">开启</el-radio>
<el-divider class="divider" direction="vertical"></el-divider>
<span class="spacer">计量单位</span>
<el-radio v-model="radio5" label="1" border :disabled="radio1 === '1' || radio2 === '2'">关闭</el-radio>
<el-radio v-model="radio5" label="2" border :disabled="radio1 === '1' || radio2 === '2'">开启</el-radio>
</div>
</el-card>
<div align="center" style="margin-top: 30px">
<el-row>
<el-button type="primary" @click=""> </el-button>
</el-row>
</div>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import {oneExportmanage, addExportmanage, updateExportmanage} from "@/api/platform/exportsetting";
export default {
name: "Exportmanage",
dicts: ['signboard'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
exportmanageList: [],
//
title: "",
//
open: false,
//
queryParams: {
receiptNumber: null,
customerName: null,
customerTaxNumber: null,
customerAddress: null,
customerPhone: null,
bankName: null,
bankNumber: null,
phone: null,
email: null,
remark: null,
productName: null,
specification: null,
unit: null,
price: null,
num: null,
taxamt: null,
taxrate: null,
tax: null,
discount: null,
deduction: null,
signboard: null,
zeroTaxRate: null,
encodingName: null,
encodingVersion: null,
discountsType: null,
taxClassificationCode: null,
isornotDiscounts: null,
},
//
form: {},
//
rules: {
companyName: [
{required: true, message: "企业名称不能为空", trigger: "blur"}
],
receiptNumber: [
{required: true, message: "单据编号不能为空", trigger: "blur"}
],
customerName: [
{required: true, message: "客户名称/编码不能为空", trigger: "blur"}
],
productName: [
{required: true, message: "商品名称/编码不能为空", trigger: "blur"}
],
price: [
{required: true, message: "单价不能为空", trigger: "blur"}
],
num: [
{required: true, message: "数量不能为空", trigger: "blur"}
],
taxamt: [
{required: true, message: "金额不能为空", trigger: "blur"}
],
taxrate: [
{required: true, message: "税率不能为空", trigger: "blur"}
],
},
//
activeName: 'second',
//
radio1: '1',
radio2: '1',
radio3: '1',
radio4: '1',
radio5: '1',
//
enteredLetters: []
};
},
watch: {
radio1(newVal) {
if (newVal === '2') {
this.radio2 = '2';
}else if (newVal === '1'){
this.radio2 = '1';
this.radio3 = '1';
this.radio4 = '1';
this.radio5 = '1';
}
},
radio2(newVal){
if (newVal === '2') {
this.radio3 = '1';
this.radio4 = '1';
this.radio5 = '1';
}
}
},
created() {
this.getList();
this.form.signboard = "1";
},
methods: {
/** 查询导入设置列表 */
getList() {
this.loading = true;
oneExportmanage().then(response => {
if (response.data != null) {
this.form = response.data;
}
this.loading = false;
});
},
//
checkInput() {
const regex = /^[A-Z]$/;
if (!regex.test(this.form.customerTaxNumber)) {
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.customerTaxNumber = '';
}else if (!regex.test(this.form.receiptNumber)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.receiptNumber = '';
}else if (!regex.test(this.form.customerName)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.customerName = '';
}else if (!regex.test(this.form.customerAddress)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.customerAddress = '';
}else if (!regex.test(this.form.customerPhone)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.customerPhone = '';
}else if (!regex.test(this.form.bankName)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.bankName = '';
}else if (!regex.test(this.form.bankNumber)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.bankNumber = '';
}else if (!regex.test(this.form.phone)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.phone = '';
}else if (!regex.test(this.form.email)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.email = '';
}else if (!regex.test(this.form.remark)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.remark = '';
}else if (!regex.test(this.form.productName)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.productName = '';
}else if (!regex.test(this.form.specification)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.specification = '';
}else if (!regex.test(this.form.unit)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.unit= '';
}else if (!regex.test(this.form.price)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.price = '';
}else if (!regex.test(this.form.num)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.num = '';
}else if (!regex.test(this.form.taxamt)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.taxamt = '';
}else if (!regex.test(this.form.taxrate)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.taxrate = '';
}else if (!regex.test(this.form.tax)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.tax = '';
}else if (!regex.test(this.form.discount)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.discount = '';
}else if (!regex.test(this.form.deduction)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.deduction = '';
}else if (!regex.test(this.form.zeroTaxRate)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.zeroTaxRate = '';
}else if (!regex.test(this.form.encodingName)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.encodingName = '';
}else if (!regex.test(this.form.encodingVersion)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.encodingVersion = '';
}else if (!regex.test(this.form.taxClassificationCode)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.taxClassificationCode = '';
}else if (!regex.test(this.form.isornotDiscounts)){
this.$message({
message: '请输入Excel列字母A-Z',
type: 'warning'
});
this.form.isornotDiscounts = '';
}
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
companyName: null,
receiptNumber: null,
customerName: null,
customerTaxNumber: null,
customerAddress: null,
customerPhone: null,
bankName: null,
bankNumber: null,
phone: null,
email: null,
remark: null,
productName: null,
specification: null,
unit: null,
price: null,
num: null,
taxamt: null,
taxrate: null,
tax: null,
discount: null,
deduction: null,
signboard: null,
zeroTaxRate: null,
encodingName: null,
encodingVersion: null,
discountsType: null,
taxClassificationCode: null,
isornotDiscounts: null,
source: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateExportmanage(this.form).then(response => {
this.$modal.msgSuccess("保存成功");
this.open = false;
this.getList();
});
} else {
addExportmanage(this.form).then(response => {
this.$modal.msgSuccess("保存成功");
this.open = false;
this.getList();
});
}
}
});
},
}
};
</script>
<style>
.spacer {
padding-right: 100px;
}
.divider {
border: 2px solid #00afff; /* 设置分割线为2像素宽度的蓝色实线 */
}
.el-form-item__label {
white-space: nowrap;
}
</style>