zhc4dev
wangjiadong 2 years ago
parent c5179047a7
commit 6f1ca46049
  1. 41
      ant-design-vue-jeecg/src/views/customerpayment/admin/CustomerPaymentList.vue
  2. 6
      ant-design-vue-jeecg/src/views/customerpayment/admin/modules/CustomerPaymentForm.vue
  3. 40
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/controller/CustomerPaymentController.java
  4. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/entity/CustomerPayment.java
  5. 16
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/mapper/CustomerPaymentMapper.java
  6. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/service/ICustomerPaymentService.java
  7. 35
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/service/impl/CustomerPaymentServiceImpl.java

@ -100,27 +100,21 @@
</template>
<span slot="action" slot-scope="text, record">
<a @click="paixu(record)">排序</a>
<a-divider type="vertical" />
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
<a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</a-table>
</div>
<customer-payment-modal1 ref="modalFormpaixu" @ok="modalFormOk"></customer-payment-modal1>
<customer-payment-modal ref="modalForm" @ok="modalFormOk"></customer-payment-modal>
</a-card>
</template>
@ -131,13 +125,15 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import CustomerPaymentModal from './modules/CustomerPaymentModal'
import CustomerPaymentModal1 from './modules/CustomerPaymentModal1'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'CustomerPaymentList',
mixins:[JeecgListMixin, mixinDevice],
components: {
CustomerPaymentModal
CustomerPaymentModal,
CustomerPaymentModal1
},
data () {
return {
@ -161,6 +157,12 @@
align:"center",
dataIndex: 'userId_dictText'
},
{
title:'排序',
align:"center",
sorter: true,
dataIndex: 'sort'
},
{
title:'支付类型',
align:"center",
@ -201,6 +203,8 @@
}
],
url: {
up: "/customerpayment/customerPayment/up",
down: "/customerpayment/customerPayment/down",
list: "/customerpayment/customerPayment/list",
delete: "/customerpayment/customerPayment/delete",
deleteBatch: "/customerpayment/customerPayment/deleteBatch",
@ -221,6 +225,11 @@
},
},
methods: {
paixu: function (record) {
this.$refs.modalFormpaixu.edit(record.userId);
this.$refs.modalFormpaixu.title = record.userId_dictText+"测体管理";
this.$refs.modalFormpaixu.disableSubmit = false;
},
initDictConfig(){
},
getSuperFieldList(){

@ -16,6 +16,12 @@
/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sort">
<a-input-number v-model="model.sort" placeholder="请输入排序" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="支付类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paymentType">
<j-dict-select-tag type="radio" v-model="model.paymentType" dictCode="zflx" placeholder="请选择支付类型" />

@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.customermeasure.entity.CustomerMeasure;
import org.jeecg.modules.demo.customerpayment.entity.CustomerPayment;
import org.jeecg.modules.demo.customerpayment.service.ICustomerPaymentService;
@ -73,6 +74,23 @@ public class CustomerPaymentController extends JeecgController<CustomerPayment,
return Result.OK(pageList);
}
@AutoLog(value = "顾客支付信息管理-分页列表查询")
@ApiOperation(value="顾客支付信息管理-分页列表查询", notes="顾客支付信息管理-分页列表查询")
@GetMapping(value = "/list1")
public Result<?> queryPageList1(CustomerPayment customerPayment,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<CustomerPayment> queryWrapper = QueryGenerator.initQueryWrapper(customerPayment, req.getParameterMap());
queryWrapper.eq("user_id",customerPayment.getUserId());
Page<CustomerPayment> page = new Page<CustomerPayment>(pageNo, pageSize);
IPage<CustomerPayment> pageList = customerPaymentService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
@ -192,4 +210,26 @@ public class CustomerPaymentController extends JeecgController<CustomerPayment,
return super.importExcel(request, response, CustomerPayment.class);
}
@AutoLog(value = "排序")
@ApiOperation(value="排序", notes="排序")
@GetMapping(value = "/up")
public Result<?> shang(@RequestParam(name="id",required=true) String id) {
customerPaymentService.up(id);
return Result.ok("升序成功");
}
@AutoLog(value = "排序")
@ApiOperation(value="排序", notes="排序")
@GetMapping(value = "/down")
public Result<?> xia(@RequestParam(name="id",required=true) String id) {
int a=customerPaymentService.findSort(id);
if(a==0){
return Result.error("当前已经是最低级别!!!");}else {
customerPaymentService.down(id);
return Result.ok("降序成功");
}
}
}

@ -86,4 +86,8 @@ public class CustomerPayment implements Serializable {
@Excel(name = "开户支行", width = 15)
@ApiModelProperty(value = "开户支行")
private java.lang.String bankzh;
/**排序*/
@Excel(name = "排序", width = 15)
@ApiModelProperty(value = "排序")
private java.lang.Integer sort;
}

@ -5,6 +5,8 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.jeecg.modules.demo.customerpayment.entity.CustomerPayment;
/**
@ -15,4 +17,18 @@ import org.jeecg.modules.demo.customerpayment.entity.CustomerPayment;
*/
public interface CustomerPaymentMapper extends BaseMapper<CustomerPayment> {
@Select("select sort from customer_payment where id=#{id} ")
Integer upfindsort(String id);
@Select("select id from customer_payment where sort=#{i} ")
String findproid(int i);
@Update("update customer_payment set sort =#{i} where id = #{id} ")
void innew(String id, int i);
@Update("update customer_payment set sort =#{sort} where id = #{proid} ")
void innewpro(String proid, Integer sort);
@Select("select sort from customer_payment where id=#{id} ")
int findSort(String id);
}

@ -11,4 +11,9 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface ICustomerPaymentService extends IService<CustomerPayment> {
void up(String id);
int findSort(String id);
void down(String id);
}

@ -3,6 +3,7 @@ package org.jeecg.modules.demo.customerpayment.service.impl;
import org.jeecg.modules.demo.customerpayment.entity.CustomerPayment;
import org.jeecg.modules.demo.customerpayment.mapper.CustomerPaymentMapper;
import org.jeecg.modules.demo.customerpayment.service.ICustomerPaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -16,4 +17,38 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class CustomerPaymentServiceImpl extends ServiceImpl<CustomerPaymentMapper, CustomerPayment> implements ICustomerPaymentService {
@Autowired
CustomerPaymentMapper customerPaymentMapper;
@Override
public void up(String id) {
Integer sort = customerPaymentMapper.upfindsort(id);
if (sort>0) {
//升序前找到后一个排序
String proid = customerPaymentMapper.findproid(sort + 1);
if (proid!="") {
//调换排序
customerPaymentMapper.innew(id,sort+1);
customerPaymentMapper.innewpro(proid,sort);
}
}
}
@Override
public int findSort(String id) {
return customerPaymentMapper.findSort(id);
}
@Override
public void down(String id) {
Integer sort = customerPaymentMapper.upfindsort(id);
if (sort>0) {
String proid = customerPaymentMapper.findproid(sort - 1);
if (proid!="") {
customerPaymentMapper.innew(id,sort-1);
customerPaymentMapper.innewpro(proid,sort);
}
}
}
}

Loading…
Cancel
Save